From: Holger Schemel Date: Sun, 19 Jul 2009 17:01:50 +0000 (+0200) Subject: rnd-20090719-1-src X-Git-Tag: 3.3.0.0^2~92 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e63e92923fa0196ba7d538d4c8f5a16994e3bee8;p=rocksndiamonds.git rnd-20090719-1-src --- diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 49dca0a7..4c7e7cb7 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -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 !!! */ diff --git a/src/conf_gfx.h b/src/conf_gfx.h index 471937df..a49440ca 100644 --- a/src/conf_gfx.h +++ b/src/conf_gfx.h @@ -1631,187 +1631,188 @@ #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 */ diff --git a/src/conftime.h b/src/conftime.h index 256aa3ec..aecacc95 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2009-06-23 23:34" +#define COMPILE_DATE_STRING "2009-07-19 19:01" diff --git a/src/engines.h b/src/engines.h index 715edef3..fec4df2b 100644 --- a/src/engines.h +++ b/src/engines.h @@ -18,13 +18,13 @@ #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 */ diff --git a/src/game_em/export.h b/src/game_em/export.h index f1657123..05e7ae65 100644 --- a/src/game_em/export.h +++ b/src/game_em/export.h @@ -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 */ diff --git a/src/game_sp/Globals.c b/src/game_sp/Globals.c index 40caf810..a51d7be0 100644 --- a/src/game_sp/Globals.c +++ b/src/game_sp/Globals.c @@ -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); diff --git a/src/game_sp/InitGameConditions.c b/src/game_sp/InitGameConditions.c index ccbd2147..d5818d25 100644 --- a/src/game_sp/InitGameConditions.c +++ b/src/game_sp/InitGameConditions.c @@ -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; diff --git a/src/game_sp/MainForm.c b/src/game_sp/MainForm.c index 2fe26339..9cb124e5 100644 --- a/src/game_sp/MainForm.c +++ b/src/game_sp/MainForm.c @@ -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 diff --git a/src/game_sp/MainGameLoop.c b/src/game_sp/MainGameLoop.c index a57bdd79..2852dd06 100644 --- a/src/game_sp/MainGameLoop.c +++ b/src/game_sp/MainGameLoop.c @@ -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 diff --git a/src/game_sp/Makefile b/src/game_sp/Makefile index f6b31aab..97311dc0 100644 --- a/src/game_sp/Makefile +++ b/src/game_sp/Makefile @@ -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 \ \ diff --git a/src/game_sp/export.h b/src/game_sp/export.h index 8b86c166..37af76fb 100644 --- a/src/game_sp/export.h +++ b/src/game_sp/export.h @@ -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 */ diff --git a/src/game_sp/global.h b/src/game_sp/global.h index f6f1d538..cce27bbf 100644 --- a/src/game_sp/global.h +++ b/src/game_sp/global.h @@ -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 index 00000000..1c36d12b --- /dev/null +++ b/src/game_sp/init.c @@ -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() +{ +} diff --git a/src/game_sp/main_sp.h b/src/game_sp/main_sp.h index 127445a0..0c0db95b 100644 --- a/src/game_sp/main_sp.h +++ b/src/game_sp/main_sp.h @@ -34,8 +34,14 @@ #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 */ diff --git a/src/game_sp/modAnimations.c b/src/game_sp/modAnimations.c index 5cb66433..31d4a671 100644 --- a/src/game_sp/modAnimations.c +++ b/src/game_sp/modAnimations.c @@ -65,5 +65,6 @@ void GoPlay() { // Call subFetchAndInitLevelB EndFlag = False; + subMainGameLoop(); } diff --git a/src/game_sp/modMPX.c b/src/game_sp/modMPX.c index fcb564f0..b2c26024 100644 --- a/src/game_sp/modMPX.c +++ b/src/game_sp/modMPX.c @@ -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); diff --git a/src/game_sp/vb_lib.c b/src/game_sp/vb_lib.c index 6cdfdec1..c4df2cf3 100644 --- a/src/game_sp/vb_lib.c +++ b/src/game_sp/vb_lib.c @@ -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) diff --git a/src/game_sp/vb_lib.h b/src/game_sp/vb_lib.h index d68de81d..97340ec8 100644 --- a/src/game_sp/vb_lib.h +++ b/src/game_sp/vb_lib.h @@ -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 */ diff --git a/src/init.c b/src/init.c index ea5ec18d..058590d9 100644 --- a/src/init.c +++ b/src/init.c @@ -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)