rnd-20140114-1-src
authorHolger Schemel <info@artsoft.org>
Tue, 14 Jan 2014 22:35:34 +0000 (23:35 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 09:00:34 +0000 (11:00 +0200)
* added graphic configuration options for request (dialog) buttons

13 files changed:
ChangeLog
build-scripts/create_element_defs.pl
src/conf_gfx.c
src/conf_gfx.h
src/conf_var.c
src/conftime.h
src/events.c
src/libgame/misc.c
src/libgame/sdl.c
src/libgame/system.h
src/main.c
src/tools.c
src/tools.h

index e04626b..d6269f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2014-01-14
+       * added graphic configuration options for request (dialog) buttons
+
 2014-01-07
        * fixed problems related to fullscreen switching and window scaling
 
index 02182e4..bd90162 100755 (executable)
@@ -2388,6 +2388,7 @@ sub print_image_config_vars
            $var =~ s/^(menu\.main\..*)\.chars$/$1.size/;
            $var =~ s/^(game\.panel\..*)\.chars$/$1.size/;
            $var =~ s/^(game\.panel\..*)\.tile_size$/$1.size/;
+           $var =~ s/^(request\.button\..*)\.tile_size$/$1.size/;
            $var =~ s/\.digits$/.size/;
            $var =~ s/\.element$/.id/;
            $var =~ s/\.draw_order$/.sort_priority/;
index 5e81ef4..61fa003 100644 (file)
@@ -4862,6 +4862,37 @@ struct ConfigInfo image_config[] =
   { "tape.label.gfx.date.height",              "13"                    },
   { "tape.label.gfx.time",                     UNDEFINED_FILENAME      },
 
+  { "request.button.gfx.yes",                  "RocksDoor.png"         },
+  { "request.button.gfx.yes.x",                        "302"                   },
+  { "request.button.gfx.yes.y",                        "0"                     },
+  { "request.button.gfx.yes.width",            "46"                    },
+  { "request.button.gfx.yes.height",           "28"                    },
+  { "request.button.gfx.yes.pressed_xoffset",  "-100"                  },
+  { "request.button.gfx.no",                   "RocksDoor.png"         },
+  { "request.button.gfx.no.x",                 "352"                   },
+  { "request.button.gfx.no.y",                 "0"                     },
+  { "request.button.gfx.no.width",             "46"                    },
+  { "request.button.gfx.no.height",            "28"                    },
+  { "request.button.gfx.no.pressed_xoffset",   "-100"                  },
+  { "request.button.gfx.confirm",              "RocksDoor.png"         },
+  { "request.button.gfx.confirm.x",            "302"                   },
+  { "request.button.gfx.confirm.y",            "30"                    },
+  { "request.button.gfx.confirm.width",                "96"                    },
+  { "request.button.gfx.confirm.height",       "28"                    },
+  { "request.button.gfx.confirm.pressed_xoffset", "-100"               },
+  { "request.button.gfx.player_1",             "RocksDoor.png"         },
+  { "request.button.gfx.player_1.x",           "305"                   },
+  { "request.button.gfx.player_1.y",           "185"                   },
+  { "request.button.gfx.player_1.width",       "30"                    },
+  { "request.button.gfx.player_1.height",      "30"                    },
+  { "request.button.gfx.player_1.pressed_xoffset", "-100"              },
+  { "request.button.gfx.player_2",             UNDEFINED_FILENAME      },
+  { "request.button.gfx.player_2.clone_from",  "request.button.gfx.player_1" },
+  { "request.button.gfx.player_3",             UNDEFINED_FILENAME      },
+  { "request.button.gfx.player_3.clone_from",  "request.button.gfx.player_1" },
+  { "request.button.gfx.player_4",             UNDEFINED_FILENAME      },
+  { "request.button.gfx.player_4.clone_from",  "request.button.gfx.player_1" },
+
   { "font.initial_1",                          "RocksFontSmall.png"    },
   { "font.initial_1.x",                                "0"                     },
   { "font.initial_1.y",                                "0"                     },
@@ -6663,6 +6694,29 @@ struct ConfigInfo image_config[] =
   { "tape.text.time.digits",                   "-1"                    },
   { "tape.text.time.font",                     "font.tape_recorder"    },
 
+  { "request.button.yes.x",                    "2"                     },
+  { "request.button.yes.y",                    "250"                   },
+  { "request.button.no.x",                     "52"                    },
+  { "request.button.no.y",                     "250"                   },
+  { "request.button.confirm.x",                        "2"                     },
+  { "request.button.confirm.y",                        "250"                   },
+  { "request.button.player_1.x",               "20"                    },
+  { "request.button.player_1.y",               "200"                   },
+  { "request.button.player_1.draw_player",     "true"                  },
+  { "request.button.player_1.tile_size",       "16"                    },
+  { "request.button.player_2.x",               "50"                    },
+  { "request.button.player_2.y",               "200"                   },
+  { "request.button.player_2.draw_player",     "true"                  },
+  { "request.button.player_2.tile_size",       "16"                    },
+  { "request.button.player_3.x",               "20"                    },
+  { "request.button.player_3.y",               "230"                   },
+  { "request.button.player_3.draw_player",     "true"                  },
+  { "request.button.player_3.tile_size",       "16"                    },
+  { "request.button.player_4.x",               "50"                    },
+  { "request.button.player_4.y",               "230"                   },
+  { "request.button.player_4.draw_player",     "true"                  },
+  { "request.button.player_4.tile_size",       "16"                    },
+
   { "game.forced_scroll_delay_value",          "-1"                    },
   { "game.use_native_emc_graphics_engine",     "false"                 },
   { "game.use_native_sp_graphics_engine",      "true"                  },
index 32ae13b..f63c06e 100644 (file)
 #define IMG_TAPE_LABEL_GFX_SINGLE_STEP                 1712
 #define IMG_TAPE_LABEL_GFX_DATE                                1713
 #define IMG_TAPE_LABEL_GFX_TIME                                1714
-#define IMG_FONT_INITIAL_1                             1715
-#define IMG_FONT_INITIAL_2                             1716
-#define IMG_FONT_INITIAL_3                             1717
-#define IMG_FONT_INITIAL_4                             1718
-#define IMG_FONT_TITLE_1                               1719
-#define IMG_FONT_TITLE_2                               1720
-#define IMG_FONT_TITLE_2_SETUP                         1721
-#define IMG_FONT_MENU_1                                        1722
-#define IMG_FONT_MENU_1_ACTIVE                         1723
-#define IMG_FONT_MENU_2                                        1724
-#define IMG_FONT_MENU_2_ACTIVE                         1725
-#define IMG_FONT_TEXT_1                                        1726
-#define IMG_FONT_TEXT_1_MAIN                           1727
-#define IMG_FONT_TEXT_1_LEVELS                         1728
-#define IMG_FONT_TEXT_1_LEVELNR                                1729
-#define IMG_FONT_TEXT_1_SETUP                          1730
-#define IMG_FONT_TEXT_1_PREVIEW                                1731
-#define IMG_FONT_TEXT_1_SCORES                         1732
-#define IMG_FONT_TEXT_1_ACTIVE_SCORES                  1733
-#define IMG_FONT_TEXT_1_PANEL                          1734
-#define IMG_FONT_TEXT_1_DOOR                           1735
-#define IMG_FONT_TEXT_2                                        1736
-#define IMG_FONT_TEXT_2_MAIN                           1737
-#define IMG_FONT_TEXT_2_LEVELS                         1738
-#define IMG_FONT_TEXT_2_LEVELNR                                1739
-#define IMG_FONT_TEXT_2_SETUP                          1740
-#define IMG_FONT_TEXT_2_PREVIEW                                1741
-#define IMG_FONT_TEXT_2_SCORES                         1742
-#define IMG_FONT_TEXT_2_ACTIVE_SCORES                  1743
-#define IMG_FONT_TEXT_3                                        1744
-#define IMG_FONT_TEXT_3_LEVELS                         1745
-#define IMG_FONT_TEXT_3_LEVELNR                                1746
-#define IMG_FONT_TEXT_3_SETUP                          1747
-#define IMG_FONT_TEXT_3_PREVIEW                                1748
-#define IMG_FONT_TEXT_3_SCORES                         1749
-#define IMG_FONT_TEXT_3_ACTIVE_SCORES                  1750
-#define IMG_FONT_TEXT_4                                        1751
-#define IMG_FONT_TEXT_4_MAIN                           1752
-#define IMG_FONT_TEXT_4_LEVELS                         1753
-#define IMG_FONT_TEXT_4_LEVELNR                                1754
-#define IMG_FONT_TEXT_4_SETUP                          1755
-#define IMG_FONT_TEXT_4_SCORES                         1756
-#define IMG_FONT_TEXT_4_ACTIVE_SCORES                  1757
-#define IMG_FONT_ENVELOPE_1                            1758
-#define IMG_FONT_ENVELOPE_2                            1759
-#define IMG_FONT_ENVELOPE_3                            1760
-#define IMG_FONT_ENVELOPE_4                            1761
-#define IMG_FONT_INPUT_1                               1762
-#define IMG_FONT_INPUT_1_MAIN                          1763
-#define IMG_FONT_INPUT_1_ACTIVE                                1764
-#define IMG_FONT_INPUT_1_ACTIVE_MAIN                   1765
-#define IMG_FONT_INPUT_1_ACTIVE_SETUP                  1766
-#define IMG_FONT_INPUT_2                               1767
-#define IMG_FONT_INPUT_2_ACTIVE                                1768
-#define IMG_FONT_OPTION_OFF                            1769
-#define IMG_FONT_OPTION_ON                             1770
-#define IMG_FONT_VALUE_1                               1771
-#define IMG_FONT_VALUE_2                               1772
-#define IMG_FONT_VALUE_OLD                             1773
-#define IMG_FONT_LEVEL_NUMBER                          1774
-#define IMG_FONT_LEVEL_NUMBER_ACTIVE                   1775
-#define IMG_FONT_TAPE_RECORDER                         1776
-#define IMG_FONT_GAME_INFO                             1777
-#define IMG_FONT_INFO_ELEMENTS                         1778
-#define IMG_FONT_INFO_LEVELSET                         1779
-#define IMG_GLOBAL_BORDER                              1780
-#define IMG_GLOBAL_DOOR                                        1781
-#define IMG_GLOBAL_BUSY                                        1782
-#define IMG_EDITOR_ELEMENT_BORDER                      1783
-#define IMG_EDITOR_ELEMENT_BORDER_INPUT                        1784
-#define IMG_EDITOR_CASCADE_LIST                                1785
-#define IMG_EDITOR_CASCADE_LIST_ACTIVE                 1786
-#define IMG_BACKGROUND                                 1787
-#define IMG_BACKGROUND_TITLE_INITIAL                   1788
-#define IMG_BACKGROUND_TITLE                           1789
-#define IMG_BACKGROUND_MAIN                            1790
-#define IMG_BACKGROUND_LEVELS                          1791
-#define IMG_BACKGROUND_LEVELNR                         1792
-#define IMG_BACKGROUND_SCORES                          1793
-#define IMG_BACKGROUND_EDITOR                          1794
-#define IMG_BACKGROUND_INFO                            1795
-#define IMG_BACKGROUND_INFO_ELEMENTS                   1796
-#define IMG_BACKGROUND_INFO_MUSIC                      1797
-#define IMG_BACKGROUND_INFO_CREDITS                    1798
-#define IMG_BACKGROUND_INFO_PROGRAM                    1799
-#define IMG_BACKGROUND_INFO_VERSION                    1800
-#define IMG_BACKGROUND_INFO_LEVELSET                   1801
-#define IMG_BACKGROUND_SETUP                           1802
-#define IMG_BACKGROUND_PLAYING                         1803
-#define IMG_BACKGROUND_DOOR                            1804
-#define IMG_BACKGROUND_TAPE                            1805
-#define IMG_BACKGROUND_PANEL                           1806
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_1           1807
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_2           1808
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_3           1809
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_4           1810
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_5           1811
-#define IMG_BACKGROUND_TITLESCREEN_1                   1812
-#define IMG_BACKGROUND_TITLESCREEN_2                   1813
-#define IMG_BACKGROUND_TITLESCREEN_3                   1814
-#define IMG_BACKGROUND_TITLESCREEN_4                   1815
-#define IMG_BACKGROUND_TITLESCREEN_5                   1816
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_1          1817
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_2          1818
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_3          1819
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_4          1820
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_5          1821
-#define IMG_BACKGROUND_TITLEMESSAGE_1                  1822
-#define IMG_BACKGROUND_TITLEMESSAGE_2                  1823
-#define IMG_BACKGROUND_TITLEMESSAGE_3                  1824
-#define IMG_BACKGROUND_TITLEMESSAGE_4                  1825
-#define IMG_BACKGROUND_TITLEMESSAGE_5                  1826
-#define IMG_BACKGROUND_ENVELOPE_1                      1827
-#define IMG_BACKGROUND_ENVELOPE_2                      1828
-#define IMG_BACKGROUND_ENVELOPE_3                      1829
-#define IMG_BACKGROUND_ENVELOPE_4                      1830
-#define IMG_TITLESCREEN_INITIAL_1                      1831
-#define IMG_TITLESCREEN_INITIAL_2                      1832
-#define IMG_TITLESCREEN_INITIAL_3                      1833
-#define IMG_TITLESCREEN_INITIAL_4                      1834
-#define IMG_TITLESCREEN_INITIAL_5                      1835
-#define IMG_TITLESCREEN_1                              1836
-#define IMG_TITLESCREEN_2                              1837
-#define IMG_TITLESCREEN_3                              1838
-#define IMG_TITLESCREEN_4                              1839
-#define IMG_TITLESCREEN_5                              1840
+#define IMG_REQUEST_BUTTON_GFX_YES                     1715
+#define IMG_REQUEST_BUTTON_GFX_NO                      1716
+#define IMG_REQUEST_BUTTON_GFX_CONFIRM                 1717
+#define IMG_REQUEST_BUTTON_GFX_PLAYER_1                        1718
+#define IMG_REQUEST_BUTTON_GFX_PLAYER_2                        1719
+#define IMG_REQUEST_BUTTON_GFX_PLAYER_3                        1720
+#define IMG_REQUEST_BUTTON_GFX_PLAYER_4                        1721
+#define IMG_FONT_INITIAL_1                             1722
+#define IMG_FONT_INITIAL_2                             1723
+#define IMG_FONT_INITIAL_3                             1724
+#define IMG_FONT_INITIAL_4                             1725
+#define IMG_FONT_TITLE_1                               1726
+#define IMG_FONT_TITLE_2                               1727
+#define IMG_FONT_TITLE_2_SETUP                         1728
+#define IMG_FONT_MENU_1                                        1729
+#define IMG_FONT_MENU_1_ACTIVE                         1730
+#define IMG_FONT_MENU_2                                        1731
+#define IMG_FONT_MENU_2_ACTIVE                         1732
+#define IMG_FONT_TEXT_1                                        1733
+#define IMG_FONT_TEXT_1_MAIN                           1734
+#define IMG_FONT_TEXT_1_LEVELS                         1735
+#define IMG_FONT_TEXT_1_LEVELNR                                1736
+#define IMG_FONT_TEXT_1_SETUP                          1737
+#define IMG_FONT_TEXT_1_PREVIEW                                1738
+#define IMG_FONT_TEXT_1_SCORES                         1739
+#define IMG_FONT_TEXT_1_ACTIVE_SCORES                  1740
+#define IMG_FONT_TEXT_1_PANEL                          1741
+#define IMG_FONT_TEXT_1_DOOR                           1742
+#define IMG_FONT_TEXT_2                                        1743
+#define IMG_FONT_TEXT_2_MAIN                           1744
+#define IMG_FONT_TEXT_2_LEVELS                         1745
+#define IMG_FONT_TEXT_2_LEVELNR                                1746
+#define IMG_FONT_TEXT_2_SETUP                          1747
+#define IMG_FONT_TEXT_2_PREVIEW                                1748
+#define IMG_FONT_TEXT_2_SCORES                         1749
+#define IMG_FONT_TEXT_2_ACTIVE_SCORES                  1750
+#define IMG_FONT_TEXT_3                                        1751
+#define IMG_FONT_TEXT_3_LEVELS                         1752
+#define IMG_FONT_TEXT_3_LEVELNR                                1753
+#define IMG_FONT_TEXT_3_SETUP                          1754
+#define IMG_FONT_TEXT_3_PREVIEW                                1755
+#define IMG_FONT_TEXT_3_SCORES                         1756
+#define IMG_FONT_TEXT_3_ACTIVE_SCORES                  1757
+#define IMG_FONT_TEXT_4                                        1758
+#define IMG_FONT_TEXT_4_MAIN                           1759
+#define IMG_FONT_TEXT_4_LEVELS                         1760
+#define IMG_FONT_TEXT_4_LEVELNR                                1761
+#define IMG_FONT_TEXT_4_SETUP                          1762
+#define IMG_FONT_TEXT_4_SCORES                         1763
+#define IMG_FONT_TEXT_4_ACTIVE_SCORES                  1764
+#define IMG_FONT_ENVELOPE_1                            1765
+#define IMG_FONT_ENVELOPE_2                            1766
+#define IMG_FONT_ENVELOPE_3                            1767
+#define IMG_FONT_ENVELOPE_4                            1768
+#define IMG_FONT_INPUT_1                               1769
+#define IMG_FONT_INPUT_1_MAIN                          1770
+#define IMG_FONT_INPUT_1_ACTIVE                                1771
+#define IMG_FONT_INPUT_1_ACTIVE_MAIN                   1772
+#define IMG_FONT_INPUT_1_ACTIVE_SETUP                  1773
+#define IMG_FONT_INPUT_2                               1774
+#define IMG_FONT_INPUT_2_ACTIVE                                1775
+#define IMG_FONT_OPTION_OFF                            1776
+#define IMG_FONT_OPTION_ON                             1777
+#define IMG_FONT_VALUE_1                               1778
+#define IMG_FONT_VALUE_2                               1779
+#define IMG_FONT_VALUE_OLD                             1780
+#define IMG_FONT_LEVEL_NUMBER                          1781
+#define IMG_FONT_LEVEL_NUMBER_ACTIVE                   1782
+#define IMG_FONT_TAPE_RECORDER                         1783
+#define IMG_FONT_GAME_INFO                             1784
+#define IMG_FONT_INFO_ELEMENTS                         1785
+#define IMG_FONT_INFO_LEVELSET                         1786
+#define IMG_GLOBAL_BORDER                              1787
+#define IMG_GLOBAL_DOOR                                        1788
+#define IMG_GLOBAL_BUSY                                        1789
+#define IMG_EDITOR_ELEMENT_BORDER                      1790
+#define IMG_EDITOR_ELEMENT_BORDER_INPUT                        1791
+#define IMG_EDITOR_CASCADE_LIST                                1792
+#define IMG_EDITOR_CASCADE_LIST_ACTIVE                 1793
+#define IMG_BACKGROUND                                 1794
+#define IMG_BACKGROUND_TITLE_INITIAL                   1795
+#define IMG_BACKGROUND_TITLE                           1796
+#define IMG_BACKGROUND_MAIN                            1797
+#define IMG_BACKGROUND_LEVELS                          1798
+#define IMG_BACKGROUND_LEVELNR                         1799
+#define IMG_BACKGROUND_SCORES                          1800
+#define IMG_BACKGROUND_EDITOR                          1801
+#define IMG_BACKGROUND_INFO                            1802
+#define IMG_BACKGROUND_INFO_ELEMENTS                   1803
+#define IMG_BACKGROUND_INFO_MUSIC                      1804
+#define IMG_BACKGROUND_INFO_CREDITS                    1805
+#define IMG_BACKGROUND_INFO_PROGRAM                    1806
+#define IMG_BACKGROUND_INFO_VERSION                    1807
+#define IMG_BACKGROUND_INFO_LEVELSET                   1808
+#define IMG_BACKGROUND_SETUP                           1809
+#define IMG_BACKGROUND_PLAYING                         1810
+#define IMG_BACKGROUND_DOOR                            1811
+#define IMG_BACKGROUND_TAPE                            1812
+#define IMG_BACKGROUND_PANEL                           1813
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_1           1814
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_2           1815
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_3           1816
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_4           1817
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_5           1818
+#define IMG_BACKGROUND_TITLESCREEN_1                   1819
+#define IMG_BACKGROUND_TITLESCREEN_2                   1820
+#define IMG_BACKGROUND_TITLESCREEN_3                   1821
+#define IMG_BACKGROUND_TITLESCREEN_4                   1822
+#define IMG_BACKGROUND_TITLESCREEN_5                   1823
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_1          1824
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_2          1825
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_3          1826
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_4          1827
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_5          1828
+#define IMG_BACKGROUND_TITLEMESSAGE_1                  1829
+#define IMG_BACKGROUND_TITLEMESSAGE_2                  1830
+#define IMG_BACKGROUND_TITLEMESSAGE_3                  1831
+#define IMG_BACKGROUND_TITLEMESSAGE_4                  1832
+#define IMG_BACKGROUND_TITLEMESSAGE_5                  1833
+#define IMG_BACKGROUND_ENVELOPE_1                      1834
+#define IMG_BACKGROUND_ENVELOPE_2                      1835
+#define IMG_BACKGROUND_ENVELOPE_3                      1836
+#define IMG_BACKGROUND_ENVELOPE_4                      1837
+#define IMG_TITLESCREEN_INITIAL_1                      1838
+#define IMG_TITLESCREEN_INITIAL_2                      1839
+#define IMG_TITLESCREEN_INITIAL_3                      1840
+#define IMG_TITLESCREEN_INITIAL_4                      1841
+#define IMG_TITLESCREEN_INITIAL_5                      1842
+#define IMG_TITLESCREEN_1                              1843
+#define IMG_TITLESCREEN_2                              1844
+#define IMG_TITLESCREEN_3                              1845
+#define IMG_TITLESCREEN_4                              1846
+#define IMG_TITLESCREEN_5                              1847
 
-#define NUM_IMAGE_FILES                                        1841
+#define NUM_IMAGE_FILES                                        1848
 
 #endif /* CONF_GFX_H */
index e09bb0f..f10abd8 100644 (file)
@@ -5348,6 +5348,94 @@ struct TokenIntPtrInfo image_config_vars[] =
     "tape.text.time.font",
     &tape.text.time.font
   },
+  {
+    "request.button.yes.x",
+    &request.button.yes.x
+  },
+  {
+    "request.button.yes.y",
+    &request.button.yes.y
+  },
+  {
+    "request.button.no.x",
+    &request.button.no.x
+  },
+  {
+    "request.button.no.y",
+    &request.button.no.y
+  },
+  {
+    "request.button.confirm.x",
+    &request.button.confirm.x
+  },
+  {
+    "request.button.confirm.y",
+    &request.button.confirm.y
+  },
+  {
+    "request.button.player_1.x",
+    &request.button.player_1.x
+  },
+  {
+    "request.button.player_1.y",
+    &request.button.player_1.y
+  },
+  {
+    "request.button.player_1.draw_player",
+    &request.button.player_1.draw_player
+  },
+  {
+    "request.button.player_1.tile_size",
+    &request.button.player_1.size
+  },
+  {
+    "request.button.player_2.x",
+    &request.button.player_2.x
+  },
+  {
+    "request.button.player_2.y",
+    &request.button.player_2.y
+  },
+  {
+    "request.button.player_2.draw_player",
+    &request.button.player_2.draw_player
+  },
+  {
+    "request.button.player_2.tile_size",
+    &request.button.player_2.size
+  },
+  {
+    "request.button.player_3.x",
+    &request.button.player_3.x
+  },
+  {
+    "request.button.player_3.y",
+    &request.button.player_3.y
+  },
+  {
+    "request.button.player_3.draw_player",
+    &request.button.player_3.draw_player
+  },
+  {
+    "request.button.player_3.tile_size",
+    &request.button.player_3.size
+  },
+  {
+    "request.button.player_4.x",
+    &request.button.player_4.x
+  },
+  {
+    "request.button.player_4.y",
+    &request.button.player_4.y
+  },
+  {
+    "request.button.player_4.draw_player",
+    &request.button.player_4.draw_player
+  },
+  {
+    "request.button.player_4.tile_size",
+    &request.button.player_4.size
+  },
   {
     "game.forced_scroll_delay_value",
     &game.forced_scroll_delay_value
index 51d2a86..6513193 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2014-01-10 23:04"
+#define COMPILE_DATE_STRING "2014-01-14 23:33"
index f428eeb..88fc321 100644 (file)
@@ -188,6 +188,13 @@ void EventLoop(void)
        }
       }
     }
+
+    // !!! CHECK THIS:
+    // !!! this may result in "HandleNoEvent()" never being called
+    // !!! (especially due to continuously processed tocuh events)
+    // !!! and therefore toon animations being stopped while events
+    // !!! are being processed (even if they are all thrown away)
+
     else
     {
       /* when playing, display a special mouse pointer inside the playfield */
@@ -427,7 +434,9 @@ void HandleWindowEvent(WindowEvent *event)
        event_name, event->data1, event->data2);
 #endif
 
-  if (event->event == SDL_WINDOWEVENT_EXPOSED)
+  if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED ||
+      event->event == SDL_WINDOWEVENT_RESIZED ||
+      event->event == SDL_WINDOWEVENT_EXPOSED)
     SDLRedrawWindow();
 
 #if 0
@@ -513,6 +522,7 @@ void HandleFingerEvent(FingerEvent *event)
   int max_events = 10;
 #endif
 
+#if 0
 #if DEBUG_EVENTS
   Error(ERR_DEBUG, "FINGER EVENT: finger was %s, touch ID %lld, finger ID %lld, x/y %f/%f, dx/dy %f/%f, pressure %f",
        event->type == EVENT_FINGERPRESS ? "pressed" :
@@ -523,6 +533,7 @@ void HandleFingerEvent(FingerEvent *event)
        event->dx, event->dy,
        event->pressure);
 #endif
+#endif
 
 #if 0
   int x = (int)(event->x * video.width);
@@ -603,12 +614,13 @@ void HandleTextEvent(TextEvent *event)
   Key key = getKeyFromKeyName(text);
 
 #if DEBUG_EVENTS
-  Error(ERR_DEBUG, "TEXT EVENT: text == '%s' [%d byte(s), '%c'/%d], resulting key == %d (%s)",
+  Error(ERR_DEBUG, "TEXT EVENT: text == '%s' [%d byte(s), '%c'/%d], resulting key == %d (%s) [%04x]",
        text,
        strlen(text),
        text[0], (int)(text[0]),
        key,
-       getKeyNameFromKey(key));
+       getKeyNameFromKey(key),
+       GetKeyModState());
 #endif
 
   // if (game_status != GAME_MODE_PLAYING && GetKeyModState() != KMOD_None)
index 8114d79..ae4b5d7 100644 (file)
@@ -1664,6 +1664,9 @@ void translate_keyname(Key *keysym, char **x11name, char **name, int mode)
     { KSYM_odiaeresis, "XK_odiaeresis",        "\xc3\xb6" },
     { KSYM_udiaeresis, "XK_udiaeresis",        "\xc3\xbc" },
     { KSYM_ssharp,     "XK_ssharp",            "\xc3\x9f" },
+
+    /* other keys (for reverse mapping only) */
+    { KSYM_space,      "XK_space",             " " },
 #endif
 
 #if defined(TARGET_SDL2)
@@ -2493,13 +2496,22 @@ boolean fileHasSuffix(char *basename, char *suffix)
   return FALSE;
 }
 
+#if defined(TARGET_SDL)
+static boolean FileCouldBeArtwork(char *basename)
+{
+  return (!strEqual(basename, ".") &&
+         !strEqual(basename, "..") &&
+         !fileHasSuffix(basename, "txt") &&
+         !fileHasSuffix(basename, "conf"));
+}
+#endif
+
 boolean FileIsGraphic(char *filename)
 {
   char *basename = getBaseNamePtr(filename);
 
 #if defined(TARGET_SDL)
-  return (!fileHasSuffix(basename, "txt") &&
-         !fileHasSuffix(basename, "conf"));
+  return FileCouldBeArtwork(basename);
 #else
   return fileHasSuffix(basename, "pcx");
 #endif
@@ -2510,8 +2522,7 @@ boolean FileIsSound(char *filename)
   char *basename = getBaseNamePtr(filename);
 
 #if defined(TARGET_SDL)
-  return (!fileHasSuffix(basename, "txt") &&
-         !fileHasSuffix(basename, "conf"));
+  return FileCouldBeArtwork(basename);
 #else
   return fileHasSuffix(basename, "wav");
 #endif
@@ -2522,8 +2533,7 @@ boolean FileIsMusic(char *filename)
   char *basename = getBaseNamePtr(filename);
 
 #if defined(TARGET_SDL)
-  return (!fileHasSuffix(basename, "txt") &&
-         !fileHasSuffix(basename, "conf"));
+  return FileCouldBeArtwork(basename);
 #else
   if (FileIsSound(basename))
     return TRUE;
index 6561171..4fd21a3 100644 (file)
@@ -429,7 +429,9 @@ static SDL_Surface *SDLCreateScreen(DrawBuffer **backbuffer,
 
 #if USE_RENDERER
   float window_scaling_factor = (float)setup.window_scaling_percent / 100;
+#if !USE_DESKTOP_FULLSCREEN
   float screen_scaling_factor = (fullscreen ? 1 : window_scaling_factor);
+#endif
 
   video.window_width  = window_scaling_factor * width;
   video.window_height = window_scaling_factor * height;
index dfa7a4f..abb63b5 100644 (file)
@@ -1198,6 +1198,7 @@ struct TextPosInfo
   int size;
   int font, font_alt;
   boolean draw_masked;
+  boolean draw_player;         /* special case for network player buttons */
   int sort_priority;
   int id;
 };
index aaa3a5b..ca59e8f 100644 (file)
@@ -17,6 +17,7 @@
 #include "init.h"
 #include "game.h"
 #include "tape.h"
+#include "tools.h"
 #include "events.h"
 #include "config.h"
 
@@ -156,12 +157,15 @@ struct TitleMessageInfo   readme;
 struct InitInfo                init, init_last;
 struct MenuInfo                menu;
 struct DoorInfo                door_1, door_2;
+struct RequestInfo     request;
 struct PreviewInfo     preview;
+
 struct GraphicInfo     *graphic_info = NULL;
 struct SoundInfo       *sound_info = NULL;
 struct MusicInfo       *music_info = NULL;
 struct MusicFileInfo   *music_file_info = NULL;
 struct HelpAnimInfo    *helpanim_info = NULL;
+
 SetupFileHash          *helptext_info = NULL;
 SetupFileHash         *image_config_hash = NULL;
 SetupFileHash         *element_token_hash = NULL;
index f71aacb..f7735c7 100644 (file)
@@ -2541,7 +2541,11 @@ void AnimateEnvelope(int envelope_nr, int anim_mode, int action)
 
     SetDrawtoField(DRAW_BUFFERED);
 
+#if 1
+    BlitScreenToBitmap(backbuffer);
+#else
     BlitBitmap(fieldbuffer, backbuffer, FX, FY, SXSIZE, SYSIZE, SX, SY);
+#endif
 
     SetDrawtoField(DRAW_BACKBUFFER);
 
@@ -2671,7 +2675,11 @@ void AnimateEnvelopeDoor(char *text, int anim_mode, int action)
 #else
     SetDrawtoField(DRAW_BUFFERED);
 
+#if 1
+    BlitScreenToBitmap(backbuffer);
+#else
     BlitBitmap(fieldbuffer, backbuffer, FX, FY, SXSIZE, SYSIZE, SX, SY);
+#endif
 
     SetDrawtoField(DRAW_BACKBUFFER);
 #endif
@@ -4659,6 +4667,102 @@ void UndrawSpecialEditorDoor()
 
 /* ---------- new tool button stuff ---------------------------------------- */
 
+#if 1
+
+static struct
+{
+  int graphic;
+  struct TextPosInfo *pos;
+  int gadget_id;
+  char *infotext;
+} toolbutton_info[NUM_TOOL_BUTTONS] =
+{
+  {
+    IMG_REQUEST_BUTTON_GFX_YES,                &request.button.yes,
+    TOOL_CTRL_ID_YES,                  "yes"
+  },
+  {
+    IMG_REQUEST_BUTTON_GFX_NO,         &request.button.no,
+    TOOL_CTRL_ID_NO,                   "no"
+  },
+  {
+    IMG_REQUEST_BUTTON_GFX_CONFIRM,    &request.button.confirm,
+    TOOL_CTRL_ID_CONFIRM,              "confirm"
+  },
+  {
+    IMG_REQUEST_BUTTON_GFX_PLAYER_1,   &request.button.player_1,
+    TOOL_CTRL_ID_PLAYER_1,             "player 1"
+  },
+  {
+    IMG_REQUEST_BUTTON_GFX_PLAYER_2,   &request.button.player_2,
+    TOOL_CTRL_ID_PLAYER_2,             "player 2"
+  },
+  {
+    IMG_REQUEST_BUTTON_GFX_PLAYER_3,   &request.button.player_3,
+    TOOL_CTRL_ID_PLAYER_3,             "player 3"
+  },
+  {
+    IMG_REQUEST_BUTTON_GFX_PLAYER_4,   &request.button.player_4,
+    TOOL_CTRL_ID_PLAYER_4,             "player 4"
+  }
+};
+
+void CreateToolButtons()
+{
+  int i;
+
+  for (i = 0; i < NUM_TOOL_BUTTONS; i++)
+  {
+    struct GraphicInfo *gfx = &graphic_info[toolbutton_info[i].graphic];
+    struct TextPosInfo *pos = toolbutton_info[i].pos;
+    struct GadgetInfo *gi;
+    Bitmap *deco_bitmap = None;
+    int deco_x = 0, deco_y = 0, deco_xpos = 0, deco_ypos = 0;
+    unsigned int event_mask = GD_EVENT_RELEASED;
+    int gd_x   = gfx->src_x;
+    int gd_y   = gfx->src_y;
+    int gd_xp  = gfx->src_x + gfx->pressed_xoffset;
+    int gd_yp  = gfx->src_y + gfx->pressed_yoffset;
+    int id = i;
+
+    if (id >= TOOL_CTRL_ID_PLAYER_1 && id <= TOOL_CTRL_ID_PLAYER_4)
+    {
+      int player_nr = id - TOOL_CTRL_ID_PLAYER_1;
+
+      getSizedGraphicSource(PLAYER_NR_GFX(IMG_PLAYER_1, player_nr), 0,
+                           pos->size, &deco_bitmap, &deco_x, &deco_y);
+      deco_xpos = (gfx->width  - pos->size) / 2;
+      deco_ypos = (gfx->height - pos->size) / 2;
+    }
+
+    gi = CreateGadget(GDI_CUSTOM_ID, id,
+                     GDI_INFO_TEXT, toolbutton_info[i].infotext,
+                     GDI_X, DX + pos->x,
+                     GDI_Y, DY + pos->y,
+                     GDI_WIDTH, gfx->width,
+                     GDI_HEIGHT, gfx->height,
+                     GDI_TYPE, GD_TYPE_NORMAL_BUTTON,
+                     GDI_STATE, GD_BUTTON_UNPRESSED,
+                     GDI_DESIGN_UNPRESSED, gfx->bitmap, gd_x, gd_y,
+                     GDI_DESIGN_PRESSED, gfx->bitmap, gd_xp, gd_yp,
+                     GDI_DECORATION_DESIGN, deco_bitmap, deco_x, deco_y,
+                     GDI_DECORATION_POSITION, deco_xpos, deco_ypos,
+                     GDI_DECORATION_SIZE, pos->size, pos->size,
+                     GDI_DECORATION_SHIFTING, 1, 1,
+                     GDI_DIRECT_DRAW, FALSE,
+                     GDI_EVENT_MASK, event_mask,
+                     GDI_CALLBACK_ACTION, HandleToolButtons,
+                     GDI_END);
+
+    if (gi == NULL)
+      Error(ERR_EXIT, "cannot create gadget");
+
+    tool_gadget[id] = gi;
+  }
+}
+
+#else
+
 /* graphic position values for tool buttons */
 #define TOOL_BUTTON_YES_XPOS           2
 #define TOOL_BUTTON_YES_YPOS           250
@@ -4817,6 +4921,8 @@ void CreateToolButtons()
   }
 }
 
+#endif
+
 void FreeToolButtons()
 {
   int i;
index d834df7..424c7fe 100644 (file)
 
 #define REQUEST_WAIT_FOR_INPUT (REQ_ASK | REQ_CONFIRM | REQ_PLAYER)
 
+
+struct RequestButtonInfo
+{
+  struct TextPosInfo yes;
+  struct TextPosInfo no;
+  struct TextPosInfo confirm;
+  struct TextPosInfo player_1;
+  struct TextPosInfo player_2;
+  struct TextPosInfo player_3;
+  struct TextPosInfo player_4;
+};
+
+struct RequestInfo
+{
+  struct RequestButtonInfo button;
+};
+
+extern struct RequestInfo request;
+
+
 void DumpTile(int, int);
 
 void DrawMaskedBorder_FIELD();