rnd-20090719-1-src
authorHolger Schemel <info@artsoft.org>
Sun, 19 Jul 2009 17:01:50 +0000 (19:01 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:57:23 +0000 (10:57 +0200)
19 files changed:
src/conf_gfx.c
src/conf_gfx.h
src/conftime.h
src/engines.h
src/game_em/export.h
src/game_sp/Globals.c
src/game_sp/InitGameConditions.c
src/game_sp/MainForm.c
src/game_sp/MainGameLoop.c
src/game_sp/Makefile
src/game_sp/export.h
src/game_sp/global.h
src/game_sp/init.c [new file with mode: 0644]
src/game_sp/main_sp.h
src/game_sp/modAnimations.c
src/game_sp/modMPX.c
src/game_sp/vb_lib.c
src/game_sp/vb_lib.h
src/init.c

index 49dca0a7271981c746a4e9f41e97ab43fca69cc8..4c7e7cb7cfcfdd46edade4706bcb458f9c39022a 100644 (file)
@@ -4336,6 +4336,10 @@ struct ConfigInfo image_config[] =
   /* images not associated to game elements (used for menu screens etc.) */
   /* keyword to stop parser: "NO_MORE_ELEMENT_IMAGES" <-- do not change! */
 
+#if 1
+  { "sp_objects",                              "sp_objects.pcx"        },
+#endif
+
 #if 1
   /* !!! TEMPORARILY STORED HERE -- PROBABLY TO BE CHANGED !!! */
 
index 471937df3b308d25fa2f7ce49d90fd395805ae54..a49440cab9e2fe2249af1777916df059fbabe798 100644 (file)
 #define IMG_GROUP_31_EDITOR                            1610
 #define IMG_GROUP_32                                   1611
 #define IMG_GROUP_32_EDITOR                            1612
-#define IMG_EMC_OBJECT                                 1613
-#define IMG_EMC_SPRITE                                 1614
-#define IMG_TOON_1                                     1615
-#define IMG_TOON_2                                     1616
-#define IMG_TOON_3                                     1617
-#define IMG_TOON_4                                     1618
-#define IMG_TOON_5                                     1619
-#define IMG_TOON_6                                     1620
-#define IMG_TOON_7                                     1621
-#define IMG_TOON_8                                     1622
-#define IMG_TOON_9                                     1623
-#define IMG_TOON_10                                    1624
-#define IMG_TOON_11                                    1625
-#define IMG_TOON_12                                    1626
-#define IMG_TOON_13                                    1627
-#define IMG_TOON_14                                    1628
-#define IMG_TOON_15                                    1629
-#define IMG_TOON_16                                    1630
-#define IMG_TOON_17                                    1631
-#define IMG_TOON_18                                    1632
-#define IMG_TOON_19                                    1633
-#define IMG_TOON_20                                    1634
-#define IMG_MENU_CALIBRATE_RED                         1635
-#define IMG_MENU_CALIBRATE_BLUE                                1636
-#define IMG_MENU_CALIBRATE_YELLOW                      1637
-#define IMG_MENU_BUTTON                                        1638
-#define IMG_MENU_BUTTON_ACTIVE                         1639
-#define IMG_MENU_BUTTON_LEFT                           1640
-#define IMG_MENU_BUTTON_LEFT_ACTIVE                    1641
-#define IMG_MENU_BUTTON_RIGHT                          1642
-#define IMG_MENU_BUTTON_RIGHT_ACTIVE                   1643
-#define IMG_MENU_BUTTON_UP                             1644
-#define IMG_MENU_BUTTON_UP_ACTIVE                      1645
-#define IMG_MENU_BUTTON_DOWN                           1646
-#define IMG_MENU_BUTTON_DOWN_ACTIVE                    1647
-#define IMG_MENU_BUTTON_ENTER_MENU                     1648
-#define IMG_MENU_BUTTON_ENTER_MENU_ACTIVE              1649
-#define IMG_MENU_BUTTON_LEAVE_MENU                     1650
-#define IMG_MENU_BUTTON_LEAVE_MENU_ACTIVE              1651
-#define IMG_MENU_BUTTON_NEXT_LEVEL                     1652
-#define IMG_MENU_BUTTON_NEXT_LEVEL_ACTIVE              1653
-#define IMG_MENU_BUTTON_PREV_LEVEL                     1654
-#define IMG_MENU_BUTTON_PREV_LEVEL_ACTIVE              1655
-#define IMG_MENU_BUTTON_NAME                           1656
-#define IMG_MENU_BUTTON_NAME_ACTIVE                    1657
-#define IMG_MENU_BUTTON_LEVELS                         1658
-#define IMG_MENU_BUTTON_LEVELS_ACTIVE                  1659
-#define IMG_MENU_BUTTON_SCORES                         1660
-#define IMG_MENU_BUTTON_SCORES_ACTIVE                  1661
-#define IMG_MENU_BUTTON_EDITOR                         1662
-#define IMG_MENU_BUTTON_EDITOR_ACTIVE                  1663
-#define IMG_MENU_BUTTON_INFO                           1664
-#define IMG_MENU_BUTTON_INFO_ACTIVE                    1665
-#define IMG_MENU_BUTTON_GAME                           1666
-#define IMG_MENU_BUTTON_GAME_ACTIVE                    1667
-#define IMG_MENU_BUTTON_SETUP                          1668
-#define IMG_MENU_BUTTON_SETUP_ACTIVE                   1669
-#define IMG_MENU_BUTTON_QUIT                           1670
-#define IMG_MENU_BUTTON_QUIT_ACTIVE                    1671
-#define IMG_MENU_SCROLLBAR                             1672
-#define IMG_MENU_SCROLLBAR_ACTIVE                      1673
-#define IMG_FONT_INITIAL_1                             1674
-#define IMG_FONT_INITIAL_2                             1675
-#define IMG_FONT_INITIAL_3                             1676
-#define IMG_FONT_INITIAL_4                             1677
-#define IMG_FONT_TITLE_1                               1678
-#define IMG_FONT_TITLE_2                               1679
-#define IMG_FONT_TITLE_2_SETUP                         1680
-#define IMG_FONT_MENU_1                                        1681
-#define IMG_FONT_MENU_1_ACTIVE                         1682
-#define IMG_FONT_MENU_2                                        1683
-#define IMG_FONT_MENU_2_ACTIVE                         1684
-#define IMG_FONT_TEXT_1                                        1685
-#define IMG_FONT_TEXT_1_MAIN                           1686
-#define IMG_FONT_TEXT_1_LEVELS                         1687
-#define IMG_FONT_TEXT_1_SETUP                          1688
-#define IMG_FONT_TEXT_1_PREVIEW                                1689
-#define IMG_FONT_TEXT_1_SCORES                         1690
-#define IMG_FONT_TEXT_1_ACTIVE_SCORES                  1691
-#define IMG_FONT_TEXT_1_PANEL                          1692
-#define IMG_FONT_TEXT_1_DOOR                           1693
-#define IMG_FONT_TEXT_2                                        1694
-#define IMG_FONT_TEXT_2_MAIN                           1695
-#define IMG_FONT_TEXT_2_LEVELS                         1696
-#define IMG_FONT_TEXT_2_SETUP                          1697
-#define IMG_FONT_TEXT_2_PREVIEW                                1698
-#define IMG_FONT_TEXT_2_SCORES                         1699
-#define IMG_FONT_TEXT_2_ACTIVE_SCORES                  1700
-#define IMG_FONT_TEXT_3                                        1701
-#define IMG_FONT_TEXT_3_LEVELS                         1702
-#define IMG_FONT_TEXT_3_SETUP                          1703
-#define IMG_FONT_TEXT_3_PREVIEW                                1704
-#define IMG_FONT_TEXT_3_SCORES                         1705
-#define IMG_FONT_TEXT_3_ACTIVE_SCORES                  1706
-#define IMG_FONT_TEXT_4                                        1707
-#define IMG_FONT_TEXT_4_MAIN                           1708
-#define IMG_FONT_TEXT_4_LEVELS                         1709
-#define IMG_FONT_TEXT_4_SETUP                          1710
-#define IMG_FONT_TEXT_4_SCORES                         1711
-#define IMG_FONT_TEXT_4_ACTIVE_SCORES                  1712
-#define IMG_FONT_ENVELOPE_1                            1713
-#define IMG_FONT_ENVELOPE_2                            1714
-#define IMG_FONT_ENVELOPE_3                            1715
-#define IMG_FONT_ENVELOPE_4                            1716
-#define IMG_FONT_INPUT_1                               1717
-#define IMG_FONT_INPUT_1_MAIN                          1718
-#define IMG_FONT_INPUT_1_ACTIVE                                1719
-#define IMG_FONT_INPUT_1_ACTIVE_MAIN                   1720
-#define IMG_FONT_INPUT_1_ACTIVE_SETUP                  1721
-#define IMG_FONT_INPUT_2                               1722
-#define IMG_FONT_INPUT_2_ACTIVE                                1723
-#define IMG_FONT_OPTION_OFF                            1724
-#define IMG_FONT_OPTION_ON                             1725
-#define IMG_FONT_VALUE_1                               1726
-#define IMG_FONT_VALUE_2                               1727
-#define IMG_FONT_VALUE_OLD                             1728
-#define IMG_FONT_LEVEL_NUMBER                          1729
-#define IMG_FONT_LEVEL_NUMBER_ACTIVE                   1730
-#define IMG_FONT_TAPE_RECORDER                         1731
-#define IMG_FONT_GAME_INFO                             1732
-#define IMG_FONT_INFO_ELEMENTS                         1733
-#define IMG_FONT_INFO_LEVELSET                         1734
-#define IMG_GLOBAL_BORDER                              1735
-#define IMG_GLOBAL_DOOR                                        1736
-#define IMG_GLOBAL_BUSY                                        1737
-#define IMG_EDITOR_ELEMENT_BORDER                      1738
-#define IMG_EDITOR_ELEMENT_BORDER_INPUT                        1739
-#define IMG_EDITOR_CASCADE_LIST                                1740
-#define IMG_EDITOR_CASCADE_LIST_ACTIVE                 1741
-#define IMG_BACKGROUND                                 1742
-#define IMG_BACKGROUND_TITLE_INITIAL                   1743
-#define IMG_BACKGROUND_TITLE                           1744
-#define IMG_BACKGROUND_MAIN                            1745
-#define IMG_BACKGROUND_LEVELS                          1746
-#define IMG_BACKGROUND_SCORES                          1747
-#define IMG_BACKGROUND_EDITOR                          1748
-#define IMG_BACKGROUND_INFO                            1749
-#define IMG_BACKGROUND_INFO_ELEMENTS                   1750
-#define IMG_BACKGROUND_INFO_MUSIC                      1751
-#define IMG_BACKGROUND_INFO_CREDITS                    1752
-#define IMG_BACKGROUND_INFO_PROGRAM                    1753
-#define IMG_BACKGROUND_INFO_VERSION                    1754
-#define IMG_BACKGROUND_INFO_LEVELSET                   1755
-#define IMG_BACKGROUND_SETUP                           1756
-#define IMG_BACKGROUND_PLAYING                         1757
-#define IMG_BACKGROUND_DOOR                            1758
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_1           1759
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_2           1760
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_3           1761
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_4           1762
-#define IMG_BACKGROUND_TITLESCREEN_INITIAL_5           1763
-#define IMG_BACKGROUND_TITLESCREEN_1                   1764
-#define IMG_BACKGROUND_TITLESCREEN_2                   1765
-#define IMG_BACKGROUND_TITLESCREEN_3                   1766
-#define IMG_BACKGROUND_TITLESCREEN_4                   1767
-#define IMG_BACKGROUND_TITLESCREEN_5                   1768
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_1          1769
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_2          1770
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_3          1771
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_4          1772
-#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_5          1773
-#define IMG_BACKGROUND_TITLEMESSAGE_1                  1774
-#define IMG_BACKGROUND_TITLEMESSAGE_2                  1775
-#define IMG_BACKGROUND_TITLEMESSAGE_3                  1776
-#define IMG_BACKGROUND_TITLEMESSAGE_4                  1777
-#define IMG_BACKGROUND_TITLEMESSAGE_5                  1778
-#define IMG_BACKGROUND_ENVELOPE_1                      1779
-#define IMG_BACKGROUND_ENVELOPE_2                      1780
-#define IMG_BACKGROUND_ENVELOPE_3                      1781
-#define IMG_BACKGROUND_ENVELOPE_4                      1782
-#define IMG_TITLESCREEN_INITIAL_1                      1783
-#define IMG_TITLESCREEN_INITIAL_2                      1784
-#define IMG_TITLESCREEN_INITIAL_3                      1785
-#define IMG_TITLESCREEN_INITIAL_4                      1786
-#define IMG_TITLESCREEN_INITIAL_5                      1787
-#define IMG_TITLESCREEN_1                              1788
-#define IMG_TITLESCREEN_2                              1789
-#define IMG_TITLESCREEN_3                              1790
-#define IMG_TITLESCREEN_4                              1791
-#define IMG_TITLESCREEN_5                              1792
+#define IMG_SP_OBJECTS                                 1613
+#define IMG_EMC_OBJECT                                 1614
+#define IMG_EMC_SPRITE                                 1615
+#define IMG_TOON_1                                     1616
+#define IMG_TOON_2                                     1617
+#define IMG_TOON_3                                     1618
+#define IMG_TOON_4                                     1619
+#define IMG_TOON_5                                     1620
+#define IMG_TOON_6                                     1621
+#define IMG_TOON_7                                     1622
+#define IMG_TOON_8                                     1623
+#define IMG_TOON_9                                     1624
+#define IMG_TOON_10                                    1625
+#define IMG_TOON_11                                    1626
+#define IMG_TOON_12                                    1627
+#define IMG_TOON_13                                    1628
+#define IMG_TOON_14                                    1629
+#define IMG_TOON_15                                    1630
+#define IMG_TOON_16                                    1631
+#define IMG_TOON_17                                    1632
+#define IMG_TOON_18                                    1633
+#define IMG_TOON_19                                    1634
+#define IMG_TOON_20                                    1635
+#define IMG_MENU_CALIBRATE_RED                         1636
+#define IMG_MENU_CALIBRATE_BLUE                                1637
+#define IMG_MENU_CALIBRATE_YELLOW                      1638
+#define IMG_MENU_BUTTON                                        1639
+#define IMG_MENU_BUTTON_ACTIVE                         1640
+#define IMG_MENU_BUTTON_LEFT                           1641
+#define IMG_MENU_BUTTON_LEFT_ACTIVE                    1642
+#define IMG_MENU_BUTTON_RIGHT                          1643
+#define IMG_MENU_BUTTON_RIGHT_ACTIVE                   1644
+#define IMG_MENU_BUTTON_UP                             1645
+#define IMG_MENU_BUTTON_UP_ACTIVE                      1646
+#define IMG_MENU_BUTTON_DOWN                           1647
+#define IMG_MENU_BUTTON_DOWN_ACTIVE                    1648
+#define IMG_MENU_BUTTON_ENTER_MENU                     1649
+#define IMG_MENU_BUTTON_ENTER_MENU_ACTIVE              1650
+#define IMG_MENU_BUTTON_LEAVE_MENU                     1651
+#define IMG_MENU_BUTTON_LEAVE_MENU_ACTIVE              1652
+#define IMG_MENU_BUTTON_NEXT_LEVEL                     1653
+#define IMG_MENU_BUTTON_NEXT_LEVEL_ACTIVE              1654
+#define IMG_MENU_BUTTON_PREV_LEVEL                     1655
+#define IMG_MENU_BUTTON_PREV_LEVEL_ACTIVE              1656
+#define IMG_MENU_BUTTON_NAME                           1657
+#define IMG_MENU_BUTTON_NAME_ACTIVE                    1658
+#define IMG_MENU_BUTTON_LEVELS                         1659
+#define IMG_MENU_BUTTON_LEVELS_ACTIVE                  1660
+#define IMG_MENU_BUTTON_SCORES                         1661
+#define IMG_MENU_BUTTON_SCORES_ACTIVE                  1662
+#define IMG_MENU_BUTTON_EDITOR                         1663
+#define IMG_MENU_BUTTON_EDITOR_ACTIVE                  1664
+#define IMG_MENU_BUTTON_INFO                           1665
+#define IMG_MENU_BUTTON_INFO_ACTIVE                    1666
+#define IMG_MENU_BUTTON_GAME                           1667
+#define IMG_MENU_BUTTON_GAME_ACTIVE                    1668
+#define IMG_MENU_BUTTON_SETUP                          1669
+#define IMG_MENU_BUTTON_SETUP_ACTIVE                   1670
+#define IMG_MENU_BUTTON_QUIT                           1671
+#define IMG_MENU_BUTTON_QUIT_ACTIVE                    1672
+#define IMG_MENU_SCROLLBAR                             1673
+#define IMG_MENU_SCROLLBAR_ACTIVE                      1674
+#define IMG_FONT_INITIAL_1                             1675
+#define IMG_FONT_INITIAL_2                             1676
+#define IMG_FONT_INITIAL_3                             1677
+#define IMG_FONT_INITIAL_4                             1678
+#define IMG_FONT_TITLE_1                               1679
+#define IMG_FONT_TITLE_2                               1680
+#define IMG_FONT_TITLE_2_SETUP                         1681
+#define IMG_FONT_MENU_1                                        1682
+#define IMG_FONT_MENU_1_ACTIVE                         1683
+#define IMG_FONT_MENU_2                                        1684
+#define IMG_FONT_MENU_2_ACTIVE                         1685
+#define IMG_FONT_TEXT_1                                        1686
+#define IMG_FONT_TEXT_1_MAIN                           1687
+#define IMG_FONT_TEXT_1_LEVELS                         1688
+#define IMG_FONT_TEXT_1_SETUP                          1689
+#define IMG_FONT_TEXT_1_PREVIEW                                1690
+#define IMG_FONT_TEXT_1_SCORES                         1691
+#define IMG_FONT_TEXT_1_ACTIVE_SCORES                  1692
+#define IMG_FONT_TEXT_1_PANEL                          1693
+#define IMG_FONT_TEXT_1_DOOR                           1694
+#define IMG_FONT_TEXT_2                                        1695
+#define IMG_FONT_TEXT_2_MAIN                           1696
+#define IMG_FONT_TEXT_2_LEVELS                         1697
+#define IMG_FONT_TEXT_2_SETUP                          1698
+#define IMG_FONT_TEXT_2_PREVIEW                                1699
+#define IMG_FONT_TEXT_2_SCORES                         1700
+#define IMG_FONT_TEXT_2_ACTIVE_SCORES                  1701
+#define IMG_FONT_TEXT_3                                        1702
+#define IMG_FONT_TEXT_3_LEVELS                         1703
+#define IMG_FONT_TEXT_3_SETUP                          1704
+#define IMG_FONT_TEXT_3_PREVIEW                                1705
+#define IMG_FONT_TEXT_3_SCORES                         1706
+#define IMG_FONT_TEXT_3_ACTIVE_SCORES                  1707
+#define IMG_FONT_TEXT_4                                        1708
+#define IMG_FONT_TEXT_4_MAIN                           1709
+#define IMG_FONT_TEXT_4_LEVELS                         1710
+#define IMG_FONT_TEXT_4_SETUP                          1711
+#define IMG_FONT_TEXT_4_SCORES                         1712
+#define IMG_FONT_TEXT_4_ACTIVE_SCORES                  1713
+#define IMG_FONT_ENVELOPE_1                            1714
+#define IMG_FONT_ENVELOPE_2                            1715
+#define IMG_FONT_ENVELOPE_3                            1716
+#define IMG_FONT_ENVELOPE_4                            1717
+#define IMG_FONT_INPUT_1                               1718
+#define IMG_FONT_INPUT_1_MAIN                          1719
+#define IMG_FONT_INPUT_1_ACTIVE                                1720
+#define IMG_FONT_INPUT_1_ACTIVE_MAIN                   1721
+#define IMG_FONT_INPUT_1_ACTIVE_SETUP                  1722
+#define IMG_FONT_INPUT_2                               1723
+#define IMG_FONT_INPUT_2_ACTIVE                                1724
+#define IMG_FONT_OPTION_OFF                            1725
+#define IMG_FONT_OPTION_ON                             1726
+#define IMG_FONT_VALUE_1                               1727
+#define IMG_FONT_VALUE_2                               1728
+#define IMG_FONT_VALUE_OLD                             1729
+#define IMG_FONT_LEVEL_NUMBER                          1730
+#define IMG_FONT_LEVEL_NUMBER_ACTIVE                   1731
+#define IMG_FONT_TAPE_RECORDER                         1732
+#define IMG_FONT_GAME_INFO                             1733
+#define IMG_FONT_INFO_ELEMENTS                         1734
+#define IMG_FONT_INFO_LEVELSET                         1735
+#define IMG_GLOBAL_BORDER                              1736
+#define IMG_GLOBAL_DOOR                                        1737
+#define IMG_GLOBAL_BUSY                                        1738
+#define IMG_EDITOR_ELEMENT_BORDER                      1739
+#define IMG_EDITOR_ELEMENT_BORDER_INPUT                        1740
+#define IMG_EDITOR_CASCADE_LIST                                1741
+#define IMG_EDITOR_CASCADE_LIST_ACTIVE                 1742
+#define IMG_BACKGROUND                                 1743
+#define IMG_BACKGROUND_TITLE_INITIAL                   1744
+#define IMG_BACKGROUND_TITLE                           1745
+#define IMG_BACKGROUND_MAIN                            1746
+#define IMG_BACKGROUND_LEVELS                          1747
+#define IMG_BACKGROUND_SCORES                          1748
+#define IMG_BACKGROUND_EDITOR                          1749
+#define IMG_BACKGROUND_INFO                            1750
+#define IMG_BACKGROUND_INFO_ELEMENTS                   1751
+#define IMG_BACKGROUND_INFO_MUSIC                      1752
+#define IMG_BACKGROUND_INFO_CREDITS                    1753
+#define IMG_BACKGROUND_INFO_PROGRAM                    1754
+#define IMG_BACKGROUND_INFO_VERSION                    1755
+#define IMG_BACKGROUND_INFO_LEVELSET                   1756
+#define IMG_BACKGROUND_SETUP                           1757
+#define IMG_BACKGROUND_PLAYING                         1758
+#define IMG_BACKGROUND_DOOR                            1759
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_1           1760
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_2           1761
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_3           1762
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_4           1763
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_5           1764
+#define IMG_BACKGROUND_TITLESCREEN_1                   1765
+#define IMG_BACKGROUND_TITLESCREEN_2                   1766
+#define IMG_BACKGROUND_TITLESCREEN_3                   1767
+#define IMG_BACKGROUND_TITLESCREEN_4                   1768
+#define IMG_BACKGROUND_TITLESCREEN_5                   1769
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_1          1770
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_2          1771
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_3          1772
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_4          1773
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_5          1774
+#define IMG_BACKGROUND_TITLEMESSAGE_1                  1775
+#define IMG_BACKGROUND_TITLEMESSAGE_2                  1776
+#define IMG_BACKGROUND_TITLEMESSAGE_3                  1777
+#define IMG_BACKGROUND_TITLEMESSAGE_4                  1778
+#define IMG_BACKGROUND_TITLEMESSAGE_5                  1779
+#define IMG_BACKGROUND_ENVELOPE_1                      1780
+#define IMG_BACKGROUND_ENVELOPE_2                      1781
+#define IMG_BACKGROUND_ENVELOPE_3                      1782
+#define IMG_BACKGROUND_ENVELOPE_4                      1783
+#define IMG_TITLESCREEN_INITIAL_1                      1784
+#define IMG_TITLESCREEN_INITIAL_2                      1785
+#define IMG_TITLESCREEN_INITIAL_3                      1786
+#define IMG_TITLESCREEN_INITIAL_4                      1787
+#define IMG_TITLESCREEN_INITIAL_5                      1788
+#define IMG_TITLESCREEN_1                              1789
+#define IMG_TITLESCREEN_2                              1790
+#define IMG_TITLESCREEN_3                              1791
+#define IMG_TITLESCREEN_4                              1792
+#define IMG_TITLESCREEN_5                              1793
 
-#define NUM_IMAGE_FILES                                        1793
+#define NUM_IMAGE_FILES                                        1794
 
 #endif /* CONF_GFX_H */
index 256aa3ec589bbe3e1a649f548554ddb1bcbf6269..aecacc95573e5e59ed8aff6b9d470a60088c4c1b 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2009-06-23 23:34"
+#define COMPILE_DATE_STRING "2009-07-19 19:01"
index 715edef3902d09b03fe2080ec2b589900407e5fb..fec4df2b879888a5448366e215f33312e20fc2b9 100644 (file)
 #include "game_em/export.h"
 #include "game_sp/export.h"
 
+#include "game.h"
+
 
 /* ========================================================================= */
 /* functions and definitions exported from main program to game_em           */
 /* ========================================================================= */
 
-#include "game.h"
-
 extern void SetBitmaps_EM(Bitmap **);
 extern void UpdateEngineValues(int, int);
 extern void DrawAllGameValues(int, int, int, int, int);
@@ -39,4 +39,12 @@ void SetGfxAnimation_EM(struct GraphicInfo_EM *, int, int, int, int);
 void getGraphicSourceObjectExt_EM(struct GraphicInfo_EM *, int, int, int, int);
 void getGraphicSourcePlayerExt_EM(struct GraphicInfo_EM *, int, int, int);
 
+
+/* ========================================================================= */
+/* functions and definitions exported from main program to game_em           */
+/* ========================================================================= */
+
+extern void SetBitmaps_SP(Bitmap **);
+
+
 #endif /* ENGINES_H */
index f165712375a4f9138386b8abd1f509058695c9c9..05e7ae65c5d8ce7c5ccec27055d7d3c32d00a0e1 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef GAME_SP_EXPORT_H
-#define GAME_SP_EXPORT_H
+#ifndef EXPORT_H
+#define EXPORT_H
 
 /* ========================================================================= */
 /* functions and definitions exported from game_em to main program           */
@@ -743,4 +743,4 @@ extern void DrawGameDoorValues_EM();
 extern void LoadEngineSnapshotValues_EM();
 extern void SaveEngineSnapshotValues_EM();
 
-#endif /* GAME_SP_EXPORT_H */
+#endif /* EXPORT_H */
index 40caf81082fbc27785b7e769596db6dcb41214ec..a51d7be0acecf1a6434b6d835ea90c392adacdb2 100644 (file)
@@ -301,6 +301,7 @@ void ReadLevel()
   // byte T;
 
   DemoAvailable = False;
+
   if (STRING_IS_LIKE(CurPath, "*.mpx"))
   {
     ReadMPX();
@@ -323,28 +324,52 @@ void ReadLevel()
   FieldWidth = 60;
   FieldHeight = 24;
   HeaderSize = 96;
+
   FieldMax = (FieldWidth * FieldHeight) + HeaderSize - 1;
   LevelMax = (FieldWidth * FieldHeight) - 1;
+
   PlayField8 = REDIM_1D(sizeof(byte), 0, FieldMax + 1 - 1);
   DisPlayField = REDIM_1D(sizeof(byte), 0, FieldMax + 1 - 1);
+
   // FNum = FreeFile();
 
   // --- On Error GoTo ReadLevelEH
+
+#if 1
+  CurPath = "/home/aeglos/projects/rocksndiamonds/levels/TEST_supaplex/supaplex/levels.dat";
+  LevelNumber = 1;
+#endif
+
+  printf("::: '%s', %d\n", CurPath, LevelNumber);
+
   FNum = fopen(CurPath, "rb");
+
   i = (LevelNumber - 1) * ((long)(FieldMax) + 1) + 1;
+#if 1
+  FILE_GET(FNum, i, PlayField8, FieldMax + 1);
+#else
   FILE_GET(FNum, i, &PlayField8, sizeof(PlayField8));
+#endif
   i = (LevelNumber) * ((long)(FieldMax) + 1) + 1 - HeaderSize;
   FILE_GET(FNum, i, &LInfo, sizeof(LInfo)); // store level info in an extra structure
+
   fclose(FNum);
+
   // --- On Error GoTo 0
 
   if (FieldMax < FileMax)
     DemoAvailable = True;
 
   ReadSignature();
+
   PlayField16 = REDIM_1D(sizeof(int), -FieldWidth, FieldMax);
+
   for (i = 0; i <= FieldMax; i++)
   {
+#if 0
+    printf("::: %d: %d\n", i, PlayField8[i]);
+#endif
+
     PlayField16[i] = PlayField8[i];
     DisPlayField[i] = PlayField8[i];
     PlayField8[i] = 0;
@@ -353,10 +378,14 @@ void ReadLevel()
   AnimationPosTable = REDIM_1D(sizeof(int), 0, LevelMax - 2 *FieldWidth);
   AnimationSubTable = REDIM_1D(sizeof(byte), 0, LevelMax - 2 *FieldWidth);
   TerminalState = REDIM_1D(sizeof(byte), FieldWidth, LevelMax - FieldWidth);
+
   GravityFlag = LInfo.InitialGravity;
   FreezeZonks = LInfo.InitialFreezeZonks;
+
   subRandomize();
+
   LevelLoaded = True;
+
   return;
 
 #if 0
@@ -385,7 +414,11 @@ static void ReadDemo()
   // FNum = FreeFile();
   FNum = fopen(CurPath, "rb");
   i = (LevelNumber - 1) * ((long)(FieldMax) + 1) + 1;
+#if 1
+  FILE_GET(FNum, i, PlayField8, FileMax + 1);
+#else
   FILE_GET(FNum, i, &PlayField8, sizeof(PlayField8));
+#endif
   i = (LevelNumber) * ((long)(FieldMax) + 1) + 1 - HeaderSize;
   FILE_GET(FNum, i, &LInfo, sizeof(LInfo)); // store level info in an extra structure
   fclose(FNum);
index ccbd2147175d9d6d7351f0fc5092473cffd5f2b6..d5818d25acbc285be57c8c64348d5483457ec40b 100644 (file)
@@ -309,8 +309,11 @@ int subFetchAndInitLevelA(boolean UpdatePlayTime)
     DemoFlag = 1;
 
   GameBusyFlag = 0; // restore scissors too
+
   subFetchAndInitLevel();   // Fetch and initialize a level
+
   GameBusyFlag = 1; // no free screen write
+
   if (1 <= demo_stopped)
   {
     if (1 == demo_stopped)
@@ -343,7 +346,9 @@ int subFetchAndInitLevel()
 
   Trace("modInitGameConditions", "--> subFetchAndInitLevel");
   Trace("modInitGameConditions", "Call ReadLevel");
+
   ReadLevel();                   // Read LEVELS.DAT
+
   Trace("modInitGameConditions", "ReadLevel return subFetchAndInitLeveled");
 
   if (RecordDemoFlag == 1)
@@ -356,17 +361,27 @@ int subFetchAndInitLevel()
   // Debug.Print "FetchPlay: " & Hex(RandomSeed)
   //  End If
   GameBusyFlag = -GameBusyFlag;   // make <>1
+
   Trace("modInitGameConditions", "subConvertToEasySymbols");
+
   InfoCountInLevel = subConvertToEasySymbols(); // Convert to easy symbols
   GameBusyFlag = -GameBusyFlag;     // restore
+
   Trace("modInitGameConditions", "subDisplayLevel");
+
   subDisplayLevel();               // Paint (Init) game field
   subDisplayPanel();                 // Paint (Init) Panel
+
   ResetInfotronsNeeded(InfoCountInLevel);  // and reset Infotron count
+
   Data_SubRstFlg = 1;
+
   Trace("modInitGameConditions", "subInitGameConditions");
+
   subInitGameConditions();                 // Init game conditions (vars)
+
   InitMurphyPos();                 // Locate Murphy + screen pos
+
   Trace("modInitGameConditions", "<-- subFetchAndInitLevel");
 
   return subFetchAndInitLevel;
index 2fe2633924d4e38895e9d1eb8c849a890fd26b8a..9cb124e5e92b3bf434ee5e1d0e9281318ecae64e 100644 (file)
@@ -2422,10 +2422,13 @@ void menPlay_Click()
 #endif
 
   subFetchAndInitLevelB();
+
   // Trace "MainForm", "CountDown 1"
   CountDown(2, (0 == DemoFlag));
   // Trace "MainForm", "Call GoPlay"
+
   GoPlay();
+
   // Trace "MainForm", "GoPlay returned"
 
 #if 0
@@ -2451,8 +2454,11 @@ void menPlay_Click()
 
   bPlaying = False;
   // Trace "MainForm", "Call subFetchAndInitLevel"
+
   subFetchAndInitLevel();
+
   // Trace "MainForm", "subFetchAndInitLevel returned"
+
   Stage.Blt();
 
 #if 0
index a57bdd7959b5a09a42019b2421c6640d7d294253..2852dd0639494e48b662ddb0b8f50c4adbadb4d4 100644 (file)
@@ -63,10 +63,12 @@ int subMainGameLoop()
   // This was a bug in the original Supaplex: sometimes red disks could not
   // be released.  This happened If Murphy was killed DURING a red disk release
   // and the next try started.
+
   RedDiskReleasePhase = 0; // (re-)enable red disk release
   UpdatedFlag = 0;
   GameLoopRunning = 1;
   LevelStatus = 0;
+
   // ----------------------------------------------------------------------------
   // --------------------- START OF GAME-BUSY LOOP ------------------------------
   // ----------------------------------------------------------------------------
@@ -117,6 +119,7 @@ locRepeatMainGameLoop:                           // start repeating game loop
   // loc_g_186F:
 
   subProcessKeyboardInput();                 // Check keyboard, act on keys
+
   // 'HACK:
   //  TimerVar = TimerVar + 1
   //  DoEvents
@@ -126,18 +129,23 @@ locRepeatMainGameLoop:                           // start repeating game loop
 
   // ----------------------------------------------------------------------------
   //
+
   subDoGameStuff();                 // do all game stuff
+
   //
   // ----------------------------------------------------------------------------
 
   //  Call subDisplayPlayingTime                 ' playing time on screen
+
   subCheckRestoreRedDiskCountDisplay();    // Restore panel: red-disk hole
 
   subRedDiskReleaseExplosion();       // Red Disk release and explode
   subFollowUpExplosions();  // every explosion may cause up to 8 following explosions
 
   bx = subCalculateScreenScrollPos();     // calculate screen start addrs
+
   ScreenPosition = bx;
+
   // Now new X and new Y are calculated, and bx = screen position = ScreenPosition
   data_h_Ytmp = ScreenScrollYPos; // copy Y for next soft scroll
   data_h_Xtmp = ScreenScrollXPos; // copy X for next soft scroll
index f6b31aab163442868783f9ac3425275c828484e9..97311dc0432fed7c936cbb8ce84554b83a792fcd 100644 (file)
@@ -12,7 +12,8 @@
 # configuration
 # -----------------------------------------------------------------------------
 
-SRCS = main.c                  \
+SRCS = init.c                  \
+       main.c                  \
        vb_lib.c                \
        vb_vars.c               \
                                \
@@ -55,7 +56,8 @@ SRCS =        main.c                  \
        modGeneralTricks.c      \
        modMPX.c
 
-OBJS = main.o                  \
+OBJS = init.o                  \
+       main.o                  \
        vb_lib.o                \
        vb_vars.o               \
                                \
index 8b86c1669e2f84d34727f477d6c1a6286736000f..37af76fb867304084c40b71bc43e16655f45a943 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef EXPORT_H
-#define EXPORT_H
+#ifndef GAME_SP_EXPORT_H
+#define GAME_SP_EXPORT_H
 
 /* ========================================================================= */
 /* functions and definitions exported from game_sp to main program           */
@@ -61,6 +61,9 @@ extern struct GraphicInfo_SP graphic_info_sp_object[TILE_MAX][8];
 extern struct GraphicInfo_SP graphic_info_sp_player[MAX_PLAYERS][SPR_MAX][8];
 extern struct EngineSnapshotInfo_SP engine_snapshot_sp;
 
+extern void sp_open_all();
+extern void sp_close_all();
+
 extern void InitGameEngine_SP();
 extern void GameActions_SP(byte *, boolean);
 
@@ -77,4 +80,4 @@ extern void DrawGameDoorValues_SP();
 extern void LoadEngineSnapshotValues_SP();
 extern void SaveEngineSnapshotValues_SP();
 
-#endif /* EXPORT_H */
+#endif /* GAME_SP_EXPORT_H */
index f6f1d538749ea3ba5f40aad0cc133a7939477e78..cce27bbf515022e7fe630232ef11094519800f1f 100644 (file)
@@ -44,4 +44,8 @@
 #include "modGeneralTricks.h"
 #include "modMPX.h"
 
+
+#include "main_sp.h"
+
+
 #endif /* GAME_SP_GLOBAL_H */
diff --git a/src/game_sp/init.c b/src/game_sp/init.c
new file mode 100644 (file)
index 0000000..1c36d12
--- /dev/null
@@ -0,0 +1,21 @@
+
+#include "main_sp.h"
+#include "global.h"
+
+
+Bitmap *sp_objects;
+
+Bitmap *screenBitmap;
+
+
+void sp_open_all()
+{
+  SetBitmaps_SP(&sp_objects);
+
+  screenBitmap = CreateBitmap(MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY,
+                              DEFAULT_DEPTH);
+}
+
+void sp_close_all()
+{
+}
index 127445a0909c4193436ee7d0527dadda0474ab03..0c0db95bbb9283a2f853c2b6717586418606f31c 100644 (file)
 #define TILEX                  (ORIG_TILEX             * ZOOM_FACTOR)
 #define TILEY                  (ORIG_TILEY             * ZOOM_FACTOR)
 
+#define ORIG_SCR_MENUX         20
+#define ORIG_SCR_MENUY         12
+#define SCR_MENUX              17
+#define SCR_MENUY              12
 #define SCR_FIELDX             17
 #define SCR_FIELDY             17
+#define MAX_BUF_XSIZE          (SCR_FIELDX + 2)
+#define MAX_BUF_YSIZE          (SCR_FIELDY + 2)
 
 /* often used screen positions */
 #define SX                     8
@@ -56,6 +62,10 @@ extern struct LevelInfo_SP native_sp_level;
 
 extern struct GameInfo_SP game_sp;
 
+extern Bitmap *screenBitmap;
+
+extern Bitmap *sp_objects;
+
 
 /* ------------------------------------------------------------------------- */
 /* exported functions                                                        */
index 5cb66433bf01223f3f5a4c7e4c5f7449ea4cf4cd..31d4a67191b793831cd9592c7a6422dc19daa23c 100644 (file)
@@ -65,5 +65,6 @@ void GoPlay()
 {
   //  Call subFetchAndInitLevelB
   EndFlag = False;
+
   subMainGameLoop();
 }
index fcb564f034aaa36c3764e43c67bb055a997d514e..b2c2602476e8a9e957fa1b917526f997e7b0ece6 100644 (file)
@@ -144,7 +144,11 @@ void ReadMPX()
   PlayField8 = REDIM_1D(sizeof(byte), 0, FileMax + 1 - 1);
   DisPlayField = REDIM_1D(sizeof(byte), 0, FieldMax + 1 - 1);
   i = LDesc[LevelNumber].OffSet;
+#if 1
+  FILE_GET(FNum, i, PlayField8, FileMax + 1);
+#else
   FILE_GET(FNum, i, &PlayField8, sizeof(PlayField8));
+#endif
   i = i + LevelMax + 1;
   FILE_GET(FNum, i, &LInfo, sizeof(LInfo)); // store level info in an extra structure
   fclose(FNum);
index 6cdfdec1e2504ce73eb7823d97eb392ee5199d79..c4df2cf3d853ce0493659bcec7a4623251287b6b 100644 (file)
@@ -7,11 +7,13 @@
 #include "vb_vars.h"
 #include "vb_lib.h"
 
+#include "main_sp.h"
+
 
 /* helper functions for constructs not supported by C */
 void *REDIM_1D(int a, int b, int c)
 {
-  return 0;
+  return checked_calloc(a * (c - b + 1));
 }
 
 void *REDIM_2D(int a, int b, int c, int d, int e)
@@ -57,9 +59,12 @@ boolean STRING_IS_LIKE(char *a, char *b)
 }
 
 
-int FILE_GET(FILE *a, int b, void *c, int d)
+void FILE_GET(FILE *a, int b, void *c, int d)
 {
-  return 0;
+  fseek(a, b, SEEK_SET);
+
+  while (d--)
+    *(byte *)c++ = fgetc(a);
 }
 
 int FILE_PUT(FILE *a, int b, void *c, int d)
index d68de81d0e674bd61d37690c1fe77a140851c49b..97340ec81c780dde01a8e790108cbd5bc0d57988 100644 (file)
@@ -25,7 +25,7 @@ extern char *INT_TO_STR(int);
 
 extern boolean STRING_IS_LIKE(char *, char *);
 
-extern int FILE_GET(FILE *, int, void *, int);
+extern void FILE_GET(FILE *, int, void *, int);
 extern int FILE_PUT(FILE *, int, void *, int);
 
 /* this is just a workaround -- handle array definitions later */
index ea5ec18de985d667f2fccda3b504cdbc3f7c1fc5..058590d94734c4966a9bac9b92febfaf4aea5f61 100644 (file)
@@ -329,6 +329,14 @@ void SetBitmaps_EM(Bitmap **em_bitmap)
 }
 #endif
 
+#if 1
+/* !!! FIX THIS (CHANGE TO USING NORMAL ELEMENT GRAPHIC DEFINITIONS) !!! */
+void SetBitmaps_SP(Bitmap **sp_bitmap)
+{
+  *sp_bitmap = graphic_info[IMG_SP_OBJECTS].bitmap;
+}
+#endif
+
 static int getFontBitmapID(int font_nr)
 {
   int special = -1;
@@ -6223,6 +6231,10 @@ void OpenAll()
   em_open_all();
 #endif
 
+#if 1
+  sp_open_all();
+#endif
+
   if (global.autoplay_leveldir)
   {
     AutoPlayTape();
@@ -6270,6 +6282,10 @@ void CloseAllAndExit(int exit_value)
   em_close_all();
 #endif
 
+#if 1
+  sp_close_all();
+#endif
+
   FreeAllImages();
 
 #if defined(TARGET_SDL)