rnd-20100615-1-src
authorHolger Schemel <info@artsoft.org>
Mon, 14 Jun 2010 22:28:12 +0000 (00:28 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:59:26 +0000 (10:59 +0200)
* added sound button graphics to graphics config

ChangeLog
src/Makefile
src/conf_gfx.c
src/conf_gfx.h
src/conftime.h
src/game.c
src/game.h
src/tape.c

index b62b85c2d608e809cf90f1db6b78c7f390e68f3e..059ade08fbd9f2ae230da4a0d78ca7d0870d4672 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2010-06-14
+       * added sound button graphics to graphics config
+
 2010-06-13
        * added tape button graphics and screen positions to graphics config
 
index 20b8f36790085e47ac016cb2d2759f61ffd2f01e..646631a83456276606e42305da8080c2331faee1 100644 (file)
@@ -232,6 +232,7 @@ GAME_SP_DIR = game_sp
 GAME_SP = $(GAME_SP_DIR)/game_sp.a
 
 RNDLIBS = $(LIBGAME) $(GAME_EM) $(GAME_SP)
+AUTOCONF = conf_gfx.h conf_snd.h conf_mus.h
 
 ICONBASE = windows_icon
 ifeq ($(PLATFORM),cross-win32)
@@ -249,7 +250,7 @@ endif
 # build targets
 # -----------------------------------------------------------------------------
 
-all: libgame_dir game_em_dir game_sp_dir $(PROGNAME)
+all: $(AUTOCONF) libgame_dir game_em_dir game_sp_dir $(PROGNAME)
 
 $(PROGNAME): $(RNDLIBS) $(TIMESTAMP_FILE) $(OBJS) $(ICON)
        $(CC) $(PROFILING) $(OBJS) $(ICON) $(RNDLIBS) $(LDFLAGS) -o $(PROGNAME)
index 9755a6dd5aef9e042fbd8b07d778fc63c189f6c0..5fb7849384501cc03a889ffb401971308ca50293 100644 (file)
@@ -4696,6 +4696,46 @@ struct ConfigInfo image_config[] =
   { "menu.scrollbar.active.ypos",              "10"                    },
   { "menu.scrollbar.active.frames",            "1"                     },
 
+  { "game.button.gfx.stop",                    "RocksDoor.pcx"         },
+  { "game.button.gfx.stop.x",                  "305"                   },
+  { "game.button.gfx.stop.y",                  "185"                   },
+  { "game.button.gfx.stop.width",              "30"                    },
+  { "game.button.gfx.stop.height",             "30"                    },
+  { "game.button.gfx.stop.pressed_xoffset",    "-100"                  },
+  { "game.button.gfx.pause",                   "RocksDoor.pcx"         },
+  { "game.button.gfx.pause.x",                 "335"                   },
+  { "game.button.gfx.pause.y",                 "185"                   },
+  { "game.button.gfx.pause.width",             "30"                    },
+  { "game.button.gfx.pause.height",            "30"                    },
+  { "game.button.gfx.pause.pressed_xoffset",   "-100"                  },
+  { "game.button.gfx.play",                    "RocksDoor.pcx"         },
+  { "game.button.gfx.play.x",                  "365"                   },
+  { "game.button.gfx.play.y",                  "185"                   },
+  { "game.button.gfx.play.width",              "30"                    },
+  { "game.button.gfx.play.height",             "30"                    },
+  { "game.button.gfx.play.pressed_xoffset",    "-100"                  },
+  { "game.button.gfx.sound_music",             "RocksDoor.pcx"         },
+  { "game.button.gfx.sound_music.x",           "305"                   },
+  { "game.button.gfx.sound_music.y",           "245"                   },
+  { "game.button.gfx.sound_music.width",       "30"                    },
+  { "game.button.gfx.sound_music.height",      "30"                    },
+  { "game.button.gfx.sound_music.pressed_xoffset", "-100"              },
+  { "game.button.gfx.sound_music.active_yoffset", "-30"                        },
+  { "game.button.gfx.sound_loops",             "RocksDoor.pcx"         },
+  { "game.button.gfx.sound_loops.x",           "335"                   },
+  { "game.button.gfx.sound_loops.y",           "245"                   },
+  { "game.button.gfx.sound_loops.width",       "30"                    },
+  { "game.button.gfx.sound_loops.height",      "30"                    },
+  { "game.button.gfx.sound_loops.pressed_xoffset", "-100"              },
+  { "game.button.gfx.sound_loops.active_yoffset", "-30"                        },
+  { "game.button.gfx.sound_simple",            "RocksDoor.pcx"         },
+  { "game.button.gfx.sound_simple.x",          "365"                   },
+  { "game.button.gfx.sound_simple.y",          "245"                   },
+  { "game.button.gfx.sound_simple.width",      "30"                    },
+  { "game.button.gfx.sound_simple.height",     "30"                    },
+  { "game.button.gfx.sound_simple.pressed_xoffset", "-100"             },
+  { "game.button.gfx.sound_simple.active_yoffset", "-30"               },
+
   { "tape.button.gfx.eject",                   "RocksDoor.pcx"         },
   { "tape.button.gfx.eject.x",                 "305"                   },
   { "tape.button.gfx.eject.y",                 "357"                   },
index 03a32f7dbc3452fb043056ff59e855f2b4ff1c28..8ecb3d8707d2ab02af8e746af0bac64574675ae4 100644 (file)
 #define IMG_MENU_BUTTON_QUIT_ACTIVE                    1678
 #define IMG_MENU_SCROLLBAR                             1679
 #define IMG_MENU_SCROLLBAR_ACTIVE                      1680
-#define IMG_TAPE_BUTTON_GFX_EJECT                      1681
-#define IMG_TAPE_BUTTON_GFX_EXTRA                      1682
-#define IMG_TAPE_BUTTON_GFX_STOP                       1683
-#define IMG_TAPE_BUTTON_GFX_PAUSE                      1684
-#define IMG_TAPE_BUTTON_GFX_RECORD                     1685
-#define IMG_TAPE_BUTTON_GFX_PLAY                       1686
-#define IMG_FONT_INITIAL_1                             1687
-#define IMG_FONT_INITIAL_2                             1688
-#define IMG_FONT_INITIAL_3                             1689
-#define IMG_FONT_INITIAL_4                             1690
-#define IMG_FONT_TITLE_1                               1691
-#define IMG_FONT_TITLE_2                               1692
-#define IMG_FONT_TITLE_2_SETUP                         1693
-#define IMG_FONT_MENU_1                                        1694
-#define IMG_FONT_MENU_1_ACTIVE                         1695
-#define IMG_FONT_MENU_2                                        1696
-#define IMG_FONT_MENU_2_ACTIVE                         1697
-#define IMG_FONT_TEXT_1                                        1698
-#define IMG_FONT_TEXT_1_MAIN                           1699
-#define IMG_FONT_TEXT_1_LEVELS                         1700
-#define IMG_FONT_TEXT_1_SETUP                          1701
-#define IMG_FONT_TEXT_1_PREVIEW                                1702
-#define IMG_FONT_TEXT_1_SCORES                         1703
-#define IMG_FONT_TEXT_1_ACTIVE_SCORES                  1704
-#define IMG_FONT_TEXT_1_PANEL                          1705
-#define IMG_FONT_TEXT_1_DOOR                           1706
-#define IMG_FONT_TEXT_2                                        1707
-#define IMG_FONT_TEXT_2_MAIN                           1708
-#define IMG_FONT_TEXT_2_LEVELS                         1709
-#define IMG_FONT_TEXT_2_SETUP                          1710
-#define IMG_FONT_TEXT_2_PREVIEW                                1711
-#define IMG_FONT_TEXT_2_SCORES                         1712
-#define IMG_FONT_TEXT_2_ACTIVE_SCORES                  1713
-#define IMG_FONT_TEXT_3                                        1714
-#define IMG_FONT_TEXT_3_LEVELS                         1715
-#define IMG_FONT_TEXT_3_SETUP                          1716
-#define IMG_FONT_TEXT_3_PREVIEW                                1717
-#define IMG_FONT_TEXT_3_SCORES                         1718
-#define IMG_FONT_TEXT_3_ACTIVE_SCORES                  1719
-#define IMG_FONT_TEXT_4                                        1720
-#define IMG_FONT_TEXT_4_MAIN                           1721
-#define IMG_FONT_TEXT_4_LEVELS                         1722
-#define IMG_FONT_TEXT_4_SETUP                          1723
-#define IMG_FONT_TEXT_4_SCORES                         1724
-#define IMG_FONT_TEXT_4_ACTIVE_SCORES                  1725
-#define IMG_FONT_ENVELOPE_1                            1726
-#define IMG_FONT_ENVELOPE_2                            1727
-#define IMG_FONT_ENVELOPE_3                            1728
-#define IMG_FONT_ENVELOPE_4                            1729
-#define IMG_FONT_INPUT_1                               1730
-#define IMG_FONT_INPUT_1_MAIN                          1731
-#define IMG_FONT_INPUT_1_ACTIVE                                1732
-#define IMG_FONT_INPUT_1_ACTIVE_MAIN                   1733
-#define IMG_FONT_INPUT_1_ACTIVE_SETUP                  1734
-#define IMG_FONT_INPUT_2                               1735
-#define IMG_FONT_INPUT_2_ACTIVE                                1736
-#define IMG_FONT_OPTION_OFF                            1737
-#define IMG_FONT_OPTION_ON                             1738
-#define IMG_FONT_VALUE_1                               1739
-#define IMG_FONT_VALUE_2                               1740
-#define IMG_FONT_VALUE_OLD                             1741
-#define IMG_FONT_LEVEL_NUMBER                          1742
-#define IMG_FONT_LEVEL_NUMBER_ACTIVE                   1743
-#define IMG_FONT_TAPE_RECORDER                         1744
-#define IMG_FONT_GAME_INFO                             1745
-#define IMG_FONT_INFO_ELEMENTS                         1746
-#define IMG_FONT_INFO_LEVELSET                         1747
-#define IMG_GLOBAL_BORDER                              1748
-#define IMG_GLOBAL_DOOR                                        1749
-#define IMG_GLOBAL_BUSY                                        1750
-#define IMG_EDITOR_ELEMENT_BORDER                      1751
-#define IMG_EDITOR_ELEMENT_BORDER_INPUT                        1752
-#define IMG_EDITOR_CASCADE_LIST                                1753
-#define IMG_EDITOR_CASCADE_LIST_ACTIVE                 1754
-#define IMG_BACKGROUND                                 1755
-#define IMG_BACKGROUND_TITLE_INITIAL                   1756
-#define IMG_BACKGROUND_TITLE                           1757
-#define IMG_BACKGROUND_MAIN                            1758
-#define IMG_BACKGROUND_LEVELS                          1759
-#define IMG_BACKGROUND_SCORES                          1760
-#define IMG_BACKGROUND_EDITOR                          1761
-#define IMG_BACKGROUND_INFO                            1762
-#define IMG_BACKGROUND_INFO_ELEMENTS                   1763
-#define IMG_BACKGROUND_INFO_MUSIC                      1764
-#define IMG_BACKGROUND_INFO_CREDITS                    1765
-#define IMG_BACKGROUND_INFO_PROGRAM                    1766
-#define IMG_BACKGROUND_INFO_VERSION                    1767
-#define IMG_BACKGROUND_INFO_LEVELSET                   1768
-#define IMG_BACKGROUND_SETUP                           1769
-#define IMG_BACKGROUND_PLAYING                         1770
-#define IMG_BACKGROUND_DOOR                            1771
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_1           1772
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_2           1773
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_3           1774
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_4           1775
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_5           1776
-#define IMG_BACKGROUND_TITLESCREEN_1                   1777
-#define IMG_BACKGROUND_TITLESCREEN_2                   1778
-#define IMG_BACKGROUND_TITLESCREEN_3                   1779
-#define IMG_BACKGROUND_TITLESCREEN_4                   1780
-#define IMG_BACKGROUND_TITLESCREEN_5                   1781
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_1          1782
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_2          1783
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_3          1784
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_4          1785
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_5          1786
-#define IMG_BACKGROUND_TITLEMESSAGE_1                  1787
-#define IMG_BACKGROUND_TITLEMESSAGE_2                  1788
-#define IMG_BACKGROUND_TITLEMESSAGE_3                  1789
-#define IMG_BACKGROUND_TITLEMESSAGE_4                  1790
-#define IMG_BACKGROUND_TITLEMESSAGE_5                  1791
-#define IMG_BACKGROUND_ENVELOPE_1                      1792
-#define IMG_BACKGROUND_ENVELOPE_2                      1793
-#define IMG_BACKGROUND_ENVELOPE_3                      1794
-#define IMG_BACKGROUND_ENVELOPE_4                      1795
-#define IMG_TITLESCREEN_INITIAL_1                      1796
-#define IMG_TITLESCREEN_INITIAL_2                      1797
-#define IMG_TITLESCREEN_INITIAL_3                      1798
-#define IMG_TITLESCREEN_INITIAL_4                      1799
-#define IMG_TITLESCREEN_INITIAL_5                      1800
-#define IMG_TITLESCREEN_1                              1801
-#define IMG_TITLESCREEN_2                              1802
-#define IMG_TITLESCREEN_3                              1803
-#define IMG_TITLESCREEN_4                              1804
-#define IMG_TITLESCREEN_5                              1805
+#define IMG_GAME_BUTTON_GFX_STOP                       1681
+#define IMG_GAME_BUTTON_GFX_PAUSE                      1682
+#define IMG_GAME_BUTTON_GFX_PLAY                       1683
+#define IMG_GAME_BUTTON_GFX_SOUND_MUSIC                        1684
+#define IMG_GAME_BUTTON_GFX_SOUND_LOOPS                        1685
+#define IMG_GAME_BUTTON_GFX_SOUND_SIMPLE               1686
+#define IMG_TAPE_BUTTON_GFX_EJECT                      1687
+#define IMG_TAPE_BUTTON_GFX_EXTRA                      1688
+#define IMG_TAPE_BUTTON_GFX_STOP                       1689
+#define IMG_TAPE_BUTTON_GFX_PAUSE                      1690
+#define IMG_TAPE_BUTTON_GFX_RECORD                     1691
+#define IMG_TAPE_BUTTON_GFX_PLAY                       1692
+#define IMG_FONT_INITIAL_1                             1693
+#define IMG_FONT_INITIAL_2                             1694
+#define IMG_FONT_INITIAL_3                             1695
+#define IMG_FONT_INITIAL_4                             1696
+#define IMG_FONT_TITLE_1                               1697
+#define IMG_FONT_TITLE_2                               1698
+#define IMG_FONT_TITLE_2_SETUP                         1699
+#define IMG_FONT_MENU_1                                        1700
+#define IMG_FONT_MENU_1_ACTIVE                         1701
+#define IMG_FONT_MENU_2                                        1702
+#define IMG_FONT_MENU_2_ACTIVE                         1703
+#define IMG_FONT_TEXT_1                                        1704
+#define IMG_FONT_TEXT_1_MAIN                           1705
+#define IMG_FONT_TEXT_1_LEVELS                         1706
+#define IMG_FONT_TEXT_1_SETUP                          1707
+#define IMG_FONT_TEXT_1_PREVIEW                                1708
+#define IMG_FONT_TEXT_1_SCORES                         1709
+#define IMG_FONT_TEXT_1_ACTIVE_SCORES                  1710
+#define IMG_FONT_TEXT_1_PANEL                          1711
+#define IMG_FONT_TEXT_1_DOOR                           1712
+#define IMG_FONT_TEXT_2                                        1713
+#define IMG_FONT_TEXT_2_MAIN                           1714
+#define IMG_FONT_TEXT_2_LEVELS                         1715
+#define IMG_FONT_TEXT_2_SETUP                          1716
+#define IMG_FONT_TEXT_2_PREVIEW                                1717
+#define IMG_FONT_TEXT_2_SCORES                         1718
+#define IMG_FONT_TEXT_2_ACTIVE_SCORES                  1719
+#define IMG_FONT_TEXT_3                                        1720
+#define IMG_FONT_TEXT_3_LEVELS                         1721
+#define IMG_FONT_TEXT_3_SETUP                          1722
+#define IMG_FONT_TEXT_3_PREVIEW                                1723
+#define IMG_FONT_TEXT_3_SCORES                         1724
+#define IMG_FONT_TEXT_3_ACTIVE_SCORES                  1725
+#define IMG_FONT_TEXT_4                                        1726
+#define IMG_FONT_TEXT_4_MAIN                           1727
+#define IMG_FONT_TEXT_4_LEVELS                         1728
+#define IMG_FONT_TEXT_4_SETUP                          1729
+#define IMG_FONT_TEXT_4_SCORES                         1730
+#define IMG_FONT_TEXT_4_ACTIVE_SCORES                  1731
+#define IMG_FONT_ENVELOPE_1                            1732
+#define IMG_FONT_ENVELOPE_2                            1733
+#define IMG_FONT_ENVELOPE_3                            1734
+#define IMG_FONT_ENVELOPE_4                            1735
+#define IMG_FONT_INPUT_1                               1736
+#define IMG_FONT_INPUT_1_MAIN                          1737
+#define IMG_FONT_INPUT_1_ACTIVE                                1738
+#define IMG_FONT_INPUT_1_ACTIVE_MAIN                   1739
+#define IMG_FONT_INPUT_1_ACTIVE_SETUP                  1740
+#define IMG_FONT_INPUT_2                               1741
+#define IMG_FONT_INPUT_2_ACTIVE                                1742
+#define IMG_FONT_OPTION_OFF                            1743
+#define IMG_FONT_OPTION_ON                             1744
+#define IMG_FONT_VALUE_1                               1745
+#define IMG_FONT_VALUE_2                               1746
+#define IMG_FONT_VALUE_OLD                             1747
+#define IMG_FONT_LEVEL_NUMBER                          1748
+#define IMG_FONT_LEVEL_NUMBER_ACTIVE                   1749
+#define IMG_FONT_TAPE_RECORDER                         1750
+#define IMG_FONT_GAME_INFO                             1751
+#define IMG_FONT_INFO_ELEMENTS                         1752
+#define IMG_FONT_INFO_LEVELSET                         1753
+#define IMG_GLOBAL_BORDER                              1754
+#define IMG_GLOBAL_DOOR                                        1755
+#define IMG_GLOBAL_BUSY                                        1756
+#define IMG_EDITOR_ELEMENT_BORDER                      1757
+#define IMG_EDITOR_ELEMENT_BORDER_INPUT                        1758
+#define IMG_EDITOR_CASCADE_LIST                                1759
+#define IMG_EDITOR_CASCADE_LIST_ACTIVE                 1760
+#define IMG_BACKGROUND                                 1761
+#define IMG_BACKGROUND_TITLE_INITIAL                   1762
+#define IMG_BACKGROUND_TITLE                           1763
+#define IMG_BACKGROUND_MAIN                            1764
+#define IMG_BACKGROUND_LEVELS                          1765
+#define IMG_BACKGROUND_SCORES                          1766
+#define IMG_BACKGROUND_EDITOR                          1767
+#define IMG_BACKGROUND_INFO                            1768
+#define IMG_BACKGROUND_INFO_ELEMENTS                   1769
+#define IMG_BACKGROUND_INFO_MUSIC                      1770
+#define IMG_BACKGROUND_INFO_CREDITS                    1771
+#define IMG_BACKGROUND_INFO_PROGRAM                    1772
+#define IMG_BACKGROUND_INFO_VERSION                    1773
+#define IMG_BACKGROUND_INFO_LEVELSET                   1774
+#define IMG_BACKGROUND_SETUP                           1775
+#define IMG_BACKGROUND_PLAYING                         1776
+#define IMG_BACKGROUND_DOOR                            1777
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_1           1778
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_2           1779
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_3           1780
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_4           1781
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_5           1782
+#define IMG_BACKGROUND_TITLESCREEN_1                   1783
+#define IMG_BACKGROUND_TITLESCREEN_2                   1784
+#define IMG_BACKGROUND_TITLESCREEN_3                   1785
+#define IMG_BACKGROUND_TITLESCREEN_4                   1786
+#define IMG_BACKGROUND_TITLESCREEN_5                   1787
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_1          1788
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_2          1789
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_3          1790
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_4          1791
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_5          1792
+#define IMG_BACKGROUND_TITLEMESSAGE_1                  1793
+#define IMG_BACKGROUND_TITLEMESSAGE_2                  1794
+#define IMG_BACKGROUND_TITLEMESSAGE_3                  1795
+#define IMG_BACKGROUND_TITLEMESSAGE_4                  1796
+#define IMG_BACKGROUND_TITLEMESSAGE_5                  1797
+#define IMG_BACKGROUND_ENVELOPE_1                      1798
+#define IMG_BACKGROUND_ENVELOPE_2                      1799
+#define IMG_BACKGROUND_ENVELOPE_3                      1800
+#define IMG_BACKGROUND_ENVELOPE_4                      1801
+#define IMG_TITLESCREEN_INITIAL_1                      1802
+#define IMG_TITLESCREEN_INITIAL_2                      1803
+#define IMG_TITLESCREEN_INITIAL_3                      1804
+#define IMG_TITLESCREEN_INITIAL_4                      1805
+#define IMG_TITLESCREEN_INITIAL_5                      1806
+#define IMG_TITLESCREEN_1                              1807
+#define IMG_TITLESCREEN_2                              1808
+#define IMG_TITLESCREEN_3                              1809
+#define IMG_TITLESCREEN_4                              1810
+#define IMG_TITLESCREEN_5                              1811
 
-#define NUM_IMAGE_FILES                                        1806
+#define NUM_IMAGE_FILES                                        1812
 
 #endif /* CONF_GFX_H */
index 869d05879b142df32277338e63ab5bd412736e81..c6eacc50f2b169bc806be5f491a434362a466cf6 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2010-06-13 23:40"
+#define COMPILE_DATE_STRING "2010-06-15 00:25"
index aa33bc08531458faf66e140ff397ea710fdf23f4..cb3434a1f353de60aead1b156901c3230089adbc 100644 (file)
@@ -16694,98 +16694,38 @@ boolean CheckEngineSnapshot()
 
 /* ---------- new game button stuff ---------------------------------------- */
 
-/* graphic position values for game buttons */
-#define GAME_BUTTON_XSIZE      30
-#define GAME_BUTTON_YSIZE      30
-#define GAME_BUTTON_XPOS       5
-#define GAME_BUTTON_YPOS       215
-#define SOUND_BUTTON_XPOS      5
-#define SOUND_BUTTON_YPOS      (GAME_BUTTON_YPOS + GAME_BUTTON_YSIZE)
-
-#define GAME_BUTTON_STOP_XPOS  (GAME_BUTTON_XPOS + 0 * GAME_BUTTON_XSIZE)
-#define GAME_BUTTON_PAUSE_XPOS (GAME_BUTTON_XPOS + 1 * GAME_BUTTON_XSIZE)
-#define GAME_BUTTON_PLAY_XPOS  (GAME_BUTTON_XPOS + 2 * GAME_BUTTON_XSIZE)
-#define SOUND_BUTTON_MUSIC_XPOS        (SOUND_BUTTON_XPOS + 0 * GAME_BUTTON_XSIZE)
-#define SOUND_BUTTON_LOOPS_XPOS        (SOUND_BUTTON_XPOS + 1 * GAME_BUTTON_XSIZE)
-#define SOUND_BUTTON_SIMPLE_XPOS (SOUND_BUTTON_XPOS + 2 * GAME_BUTTON_XSIZE)
-
 static struct
 {
-  int *x, *y;
-  int gd_x, gd_y;
+  int graphic;
+  struct Rect *pos;
   int gadget_id;
   char *infotext;
 } gamebutton_info[NUM_GAME_BUTTONS] =
 {
-#if 1
-  {
-    &game.button.stop.x,       &game.button.stop.y,
-    GAME_BUTTON_STOP_XPOS,     GAME_BUTTON_YPOS,
-    GAME_CTRL_ID_STOP,
-    "stop game"
-  },
-  {
-    &game.button.pause.x,      &game.button.pause.y,
-    GAME_BUTTON_PAUSE_XPOS,    GAME_BUTTON_YPOS,
-    GAME_CTRL_ID_PAUSE,
-    "pause game"
-  },
-  {
-    &game.button.play.x,       &game.button.play.y,
-    GAME_BUTTON_PLAY_XPOS,     GAME_BUTTON_YPOS,
-    GAME_CTRL_ID_PLAY,
-    "play game"
-  },
-  {
-    &game.button.sound_music.x,        &game.button.sound_music.y,
-    SOUND_BUTTON_MUSIC_XPOS,   SOUND_BUTTON_YPOS,
-    SOUND_CTRL_ID_MUSIC,
-    "background music on/off"
-  },
   {
-    &game.button.sound_loops.x,        &game.button.sound_loops.y,
-    SOUND_BUTTON_LOOPS_XPOS,   SOUND_BUTTON_YPOS,
-    SOUND_CTRL_ID_LOOPS,
-    "sound loops on/off"
+    IMG_GAME_BUTTON_GFX_STOP,          &game.button.stop,
+    GAME_CTRL_ID_STOP,                 "stop game"
   },
   {
-    &game.button.sound_simple.x,&game.button.sound_simple.y,
-    SOUND_BUTTON_SIMPLE_XPOS,  SOUND_BUTTON_YPOS,
-    SOUND_CTRL_ID_SIMPLE,
-    "normal sounds on/off"
-  }
-#else
-  {
-    GAME_BUTTON_STOP_XPOS,     GAME_BUTTON_YPOS,
-    GAME_CTRL_ID_STOP,
-    "stop game"
-  },
-  {
-    GAME_BUTTON_PAUSE_XPOS,    GAME_BUTTON_YPOS,
-    GAME_CTRL_ID_PAUSE,
-    "pause game"
+    IMG_GAME_BUTTON_GFX_PAUSE,         &game.button.pause,
+    GAME_CTRL_ID_PAUSE,                        "pause game"
   },
   {
-    GAME_BUTTON_PLAY_XPOS,     GAME_BUTTON_YPOS,
-    GAME_CTRL_ID_PLAY,
-    "play game"
+    IMG_GAME_BUTTON_GFX_PLAY,          &game.button.play,
+    GAME_CTRL_ID_PLAY,                 "play game"
   },
   {
-    SOUND_BUTTON_MUSIC_XPOS,   SOUND_BUTTON_YPOS,
-    SOUND_CTRL_ID_MUSIC,
-    "background music on/off"
+    IMG_GAME_BUTTON_GFX_SOUND_MUSIC,   &game.button.sound_music,
+    SOUND_CTRL_ID_MUSIC,               "background music on/off"
   },
   {
-    SOUND_BUTTON_LOOPS_XPOS,   SOUND_BUTTON_YPOS,
-    SOUND_CTRL_ID_LOOPS,
-    "sound loops on/off"
+    IMG_GAME_BUTTON_GFX_SOUND_LOOPS,   &game.button.sound_loops,
+    SOUND_CTRL_ID_LOOPS,               "sound loops on/off"
   },
   {
-    SOUND_BUTTON_SIMPLE_XPOS,  SOUND_BUTTON_YPOS,
-    SOUND_CTRL_ID_SIMPLE,
-    "normal sounds on/off"
+    IMG_GAME_BUTTON_GFX_SOUND_SIMPLE,  &game.button.sound_simple,
+    SOUND_CTRL_ID_SIMPLE,              "normal sounds on/off"
   }
-#endif
 };
 
 void CreateGameButtons()
@@ -16794,23 +16734,22 @@ void CreateGameButtons()
 
   for (i = 0; i < NUM_GAME_BUTTONS; i++)
   {
-    Bitmap *gd_bitmap = graphic_info[IMG_GLOBAL_DOOR].bitmap;
+    struct GraphicInfo *gfx = &graphic_info[gamebutton_info[i].graphic];
+    struct Rect *pos = gamebutton_info[i].pos;
     struct GadgetInfo *gi;
     int button_type;
     boolean checked;
     unsigned long event_mask;
-    int x, y;
-    int gd_xoffset, gd_yoffset;
-    int gd_x1, gd_x2, gd_y1, gd_y2;
+    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 gd_xa  = gfx->src_x + gfx->active_xoffset;
+    int gd_ya  = gfx->src_y + gfx->active_yoffset;
+    int gd_xap = gfx->src_x + gfx->active_xoffset + gfx->pressed_xoffset;
+    int gd_yap = gfx->src_y + gfx->active_yoffset + gfx->pressed_yoffset;
     int id = i;
 
-    x = DX + *gamebutton_info[i].x;
-    y = DY + *gamebutton_info[i].y;
-    gd_xoffset = gamebutton_info[i].gd_x;
-    gd_yoffset = gamebutton_info[i].gd_y;
-    gd_x1 = DOOR_GFX_PAGEX4 + gd_xoffset;
-    gd_x2 = DOOR_GFX_PAGEX3 + gd_xoffset;
-
     if (id == GAME_CTRL_ID_STOP ||
        id == GAME_CTRL_ID_PAUSE ||
        id == GAME_CTRL_ID_PLAY)
@@ -16818,8 +16757,6 @@ void CreateGameButtons()
       button_type = GD_TYPE_NORMAL_BUTTON;
       checked = FALSE;
       event_mask = GD_EVENT_RELEASED;
-      gd_y1  = DOOR_GFX_PAGEY1 + gd_yoffset - GAME_BUTTON_YSIZE;
-      gd_y2  = DOOR_GFX_PAGEY1 + gd_yoffset - GAME_BUTTON_YSIZE;
     }
     else
     {
@@ -16829,28 +16766,21 @@ void CreateGameButtons()
         (id == SOUND_CTRL_ID_LOOPS && setup.sound_loops) ||
         (id == SOUND_CTRL_ID_SIMPLE && setup.sound_simple) ? TRUE : FALSE);
       event_mask = GD_EVENT_PRESSED;
-      gd_y1  = DOOR_GFX_PAGEY1 + gd_yoffset;
-      gd_y2  = DOOR_GFX_PAGEY1 + gd_yoffset - GAME_BUTTON_YSIZE;
     }
 
     gi = CreateGadget(GDI_CUSTOM_ID, id,
                      GDI_INFO_TEXT, gamebutton_info[i].infotext,
-#if 1
-                     GDI_X, x,
-                     GDI_Y, y,
-#else
-                     GDI_X, DX + gd_xoffset,
-                     GDI_Y, DY + gd_yoffset,
-#endif
-                     GDI_WIDTH, GAME_BUTTON_XSIZE,
-                     GDI_HEIGHT, GAME_BUTTON_YSIZE,
+                     GDI_X, DX + pos->x,
+                     GDI_Y, DY + pos->y,
+                     GDI_WIDTH, gfx->width,
+                     GDI_HEIGHT, gfx->height,
                      GDI_TYPE, button_type,
                      GDI_STATE, GD_BUTTON_UNPRESSED,
                      GDI_CHECKED, checked,
-                     GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y1,
-                     GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y1,
-                     GDI_ALT_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y2,
-                     GDI_ALT_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y2,
+                     GDI_DESIGN_UNPRESSED, gfx->bitmap, gd_x, gd_y,
+                     GDI_DESIGN_PRESSED, gfx->bitmap, gd_xp, gd_yp,
+                     GDI_ALT_DESIGN_UNPRESSED, gfx->bitmap, gd_xa, gd_ya,
+                     GDI_ALT_DESIGN_PRESSED, gfx->bitmap, gd_xap, gd_yap,
                      GDI_DIRECT_DRAW, FALSE,
                      GDI_EVENT_MASK, event_mask,
                      GDI_CALLBACK_ACTION, HandleGameButtons,
index c764e1d39163d18cf7dd56f5e54215fc7143906b..a8345e27e3518b3392774640d26de626ac80a19d 100644 (file)
@@ -89,12 +89,12 @@ struct GamePanelInfo
 
 struct GameButtonInfo
 {
-  struct MenuPosInfo stop;
-  struct MenuPosInfo pause;
-  struct MenuPosInfo play;
-  struct MenuPosInfo sound_music;
-  struct MenuPosInfo sound_loops;
-  struct MenuPosInfo sound_simple;
+  struct Rect stop;
+  struct Rect pause;
+  struct Rect play;
+  struct Rect sound_music;
+  struct Rect sound_loops;
+  struct Rect sound_simple;
 };
 
 #else
index 116f11cf51da41b9ce5c3e3ad44f273712b835d5..1b9d64ae0c2a36097cf6b107067fd05da29b756b 100644 (file)
@@ -1197,90 +1197,38 @@ void AutoPlayTape()
 
 /* ---------- new tape button stuff ---------------------------------------- */
 
-/* graphic position values for tape buttons */
-#define TAPE_BUTTON_XSIZE      18
-#define TAPE_BUTTON_YSIZE      18
-#define TAPE_BUTTON_XPOS       5
-#define TAPE_BUTTON_YPOS       77
-
-#define TAPE_BUTTON_EJECT_XPOS (TAPE_BUTTON_XPOS + 0 * TAPE_BUTTON_XSIZE)
-#define TAPE_BUTTON_EXTRA_XPOS (TAPE_BUTTON_XPOS + 0 * TAPE_BUTTON_XSIZE)
-#define TAPE_BUTTON_STOP_XPOS  (TAPE_BUTTON_XPOS + 1 * TAPE_BUTTON_XSIZE)
-#define TAPE_BUTTON_PAUSE_XPOS (TAPE_BUTTON_XPOS + 2 * TAPE_BUTTON_XSIZE)
-#define TAPE_BUTTON_RECORD_XPOS        (TAPE_BUTTON_XPOS + 3 * TAPE_BUTTON_XSIZE)
-#define TAPE_BUTTON_PLAY_XPOS  (TAPE_BUTTON_XPOS + 4 * TAPE_BUTTON_XSIZE)
-
 static struct
 {
-#if 1
-  struct Rect *tbi;
   int graphic;
-#else
-  int x, y;
-#endif
+  struct Rect *pos;
   int gadget_id;
   char *infotext;
 } tapebutton_info[NUM_TAPE_BUTTONS] =
 {
   {
-#if 1
-    &tape.button.eject,
-    IMG_TAPE_BUTTON_GFX_EJECT,
-#else
-    TAPE_BUTTON_EJECT_XPOS,    TAPE_BUTTON_YPOS,
-#endif
-    TAPE_CTRL_ID_EJECT,
-    "eject tape"
+    IMG_TAPE_BUTTON_GFX_EJECT,         &tape.button.eject,
+    TAPE_CTRL_ID_EJECT,                        "eject tape"
   },
   {
-#if 1
-    &tape.button.eject,                /* (same position as "eject" button) */
-    IMG_TAPE_BUTTON_GFX_EXTRA,
-#else
-    TAPE_BUTTON_EXTRA_XPOS,    TAPE_BUTTON_YPOS,
-#endif
-    TAPE_CTRL_ID_EXTRA,
-    "extra functions"
+    /* (same position as "eject" button) */
+    IMG_TAPE_BUTTON_GFX_EXTRA,         &tape.button.eject,
+    TAPE_CTRL_ID_EXTRA,                        "extra functions"
   },
   {
-#if 1
-    &tape.button.stop,
-    IMG_TAPE_BUTTON_GFX_STOP,
-#else
-    TAPE_BUTTON_STOP_XPOS,     TAPE_BUTTON_YPOS,
-#endif
-    TAPE_CTRL_ID_STOP,
-    "stop tape"
+    IMG_TAPE_BUTTON_GFX_STOP,          &tape.button.stop,
+    TAPE_CTRL_ID_STOP,                 "stop tape"
   },
   {
-#if 1
-    &tape.button.pause,
-    IMG_TAPE_BUTTON_GFX_PAUSE,
-#else
-    TAPE_BUTTON_PAUSE_XPOS,    TAPE_BUTTON_YPOS,
-#endif
-    TAPE_CTRL_ID_PAUSE,
-    "pause tape"
+    IMG_TAPE_BUTTON_GFX_PAUSE,         &tape.button.pause,
+    TAPE_CTRL_ID_PAUSE,                        "pause tape"
   },
   {
-#if 1
-    &tape.button.record,
-    IMG_TAPE_BUTTON_GFX_RECORD,
-#else
-    TAPE_BUTTON_RECORD_XPOS,   TAPE_BUTTON_YPOS,
-#endif
-    TAPE_CTRL_ID_RECORD,
-    "record tape"
+    IMG_TAPE_BUTTON_GFX_RECORD,                &tape.button.record,
+    TAPE_CTRL_ID_RECORD,               "record tape"
   },
   {
-#if 1
-    &tape.button.play,
-    IMG_TAPE_BUTTON_GFX_PLAY,
-#else
-    TAPE_BUTTON_PLAY_XPOS,     TAPE_BUTTON_YPOS,
-#endif
-    TAPE_CTRL_ID_PLAY,
-    "play tape"
+    IMG_TAPE_BUTTON_GFX_PLAY,          &tape.button.play,
+    TAPE_CTRL_ID_PLAY,                 "play tape"
   }
 };
 
@@ -1290,58 +1238,25 @@ void CreateTapeButtons()
 
   for (i = 0; i < NUM_TAPE_BUTTONS; i++)
   {
-#if 1
-    // struct TapeButtonInfo *tbi = tapebutton_info[i].tbi;
-    int graphic = tapebutton_info[i].graphic;
-    Bitmap *gd_bitmap = graphic_info[graphic].bitmap;
-#else
-    Bitmap *gd_bitmap = graphic_info[IMG_GLOBAL_DOOR].bitmap;
-#endif
+    struct GraphicInfo *gfx = &graphic_info[tapebutton_info[i].graphic];
+    struct Rect *pos = tapebutton_info[i].pos;
     struct GadgetInfo *gi;
-    int gd_xoffset, gd_yoffset;
-#if 1
-    int gd_x1, gd_x2, gd_y1, gd_y2;
-#else
-    int gd_x1, gd_x2, gd_y;
-#endif
+    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 1
-    gd_x1 = graphic_info[graphic].src_x;
-    gd_y1 = graphic_info[graphic].src_y;
-    gd_x2 = gd_x1 + graphic_info[graphic].pressed_xoffset;
-    gd_y2 = gd_y1 + graphic_info[graphic].pressed_yoffset;
-    gd_xoffset = tapebutton_info[i].tbi->x;
-    gd_yoffset = tapebutton_info[i].tbi->y;
-#else
-    gd_xoffset = tapebutton_info[i].x;
-    gd_yoffset = tapebutton_info[i].y;
-    gd_x1 = DOOR_GFX_PAGEX4 + gd_xoffset;
-    gd_x2 = DOOR_GFX_PAGEX3 + gd_xoffset;
-    gd_y  = DOOR_GFX_PAGEY2 + gd_yoffset;
-
-    if (i == TAPE_CTRL_ID_EXTRA)
-    {
-      gd_x1 = DOOR_GFX_PAGEX6 + gd_xoffset;
-      gd_x2 = DOOR_GFX_PAGEX5 + gd_xoffset;
-    }
-#endif
-
     gi = CreateGadget(GDI_CUSTOM_ID, id,
                      GDI_INFO_TEXT, tapebutton_info[i].infotext,
-                     GDI_X, VX + gd_xoffset,
-                     GDI_Y, VY + gd_yoffset,
-                     GDI_WIDTH, TAPE_BUTTON_XSIZE,
-                     GDI_HEIGHT, TAPE_BUTTON_YSIZE,
+                     GDI_X, VX + pos->x,
+                     GDI_Y, VY + pos->y,
+                     GDI_WIDTH, gfx->width,
+                     GDI_HEIGHT, gfx->height,
                      GDI_TYPE, GD_TYPE_NORMAL_BUTTON,
                      GDI_STATE, GD_BUTTON_UNPRESSED,
-#if 1
-                     GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y1,
-                     GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y2,
-#else
-                     GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y,
-                     GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y,
-#endif
+                     GDI_DESIGN_UNPRESSED, gfx->bitmap, gd_x, gd_y,
+                     GDI_DESIGN_PRESSED, gfx->bitmap, gd_xp, gd_yp,
                      GDI_DIRECT_DRAW, FALSE,
                      GDI_EVENT_MASK, GD_EVENT_RELEASED,
                      GDI_CALLBACK_ACTION, HandleTapeButtons,