X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2Fexport.h;h=2dbd0ae0995307046d14b9b336bbbc9e84a84faf;hb=fe43dcf8ac7fb16e80d60a0c187bcbd65f40b5f2;hp=f54bb28aee2c012a4b1405d5e4a0a630147393ba;hpb=572a4bab20b6f36ef1a4782094b27ac5a703a476;p=rocksndiamonds.git diff --git a/src/game_sp/export.h b/src/game_sp/export.h index f54bb28a..2dbd0ae0 100644 --- a/src/game_sp/export.h +++ b/src/game_sp/export.h @@ -14,15 +14,17 @@ #define SP_NUM_LEVELS_PER_PACKAGE 111 -#define SP_PLAYFIELD_WIDTH 60 -#define SP_PLAYFIELD_HEIGHT 24 +#define SP_STD_PLAYFIELD_WIDTH 60 +#define SP_STD_PLAYFIELD_HEIGHT 24 #define SP_LEVEL_NAME_LEN 23 #define SP_MAX_SPECIAL_PORTS 10 #define SP_HEADER_SIZE 96 -#define SP_PLAYFIELD_SIZE (SP_PLAYFIELD_WIDTH * \ - SP_PLAYFIELD_HEIGHT) -#define SP_LEVEL_SIZE (SP_HEADER_SIZE + SP_PLAYFIELD_SIZE) +#define SP_STD_PLAYFIELD_SIZE (SP_STD_PLAYFIELD_WIDTH * \ + SP_STD_PLAYFIELD_HEIGHT) +#define SP_MAX_PLAYFIELD_SIZE (SP_MAX_PLAYFIELD_WIDTH * \ + SP_MAX_PLAYFIELD_HEIGHT) +#define SP_STD_LEVEL_SIZE (SP_HEADER_SIZE + SP_STD_PLAYFIELD_SIZE) #if 0 #define SP_SCREEN_BUFFER_XSIZE (SCR_FIELDX + 2) @@ -33,6 +35,19 @@ #define SP_MAX_TAPE_LEN 64010 /* (see "spfix63.doc") */ +/* sound actions */ + +#define actActive 0 +#define actImpact 1 +#define actExploding 2 +#define actDigging 3 +#define actSnapping 4 +#define actCollecting 5 +#define actPassing 6 +#define actPushing 7 +#define actDropping 8 + + /* ------------------------------------------------------------------------- */ /* data structure definitions */ /* ------------------------------------------------------------------------- */ @@ -87,6 +102,18 @@ struct GameInfo_SP { boolean LevelSolved; boolean GameOver; + + /* needed for updating panel */ + int time_played; + int infotrons_still_needed; + int red_disk_count; + int score; + + /* needed for engine snapshots */ + char **preceding_buffer; + int preceding_buffer_size; + + int scroll_xoffset, scroll_yoffset; }; struct DemoInfo_SP @@ -109,6 +136,9 @@ struct LevelInfo_SP byte playfield[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT]; struct DemoInfo_SP demo; + + /* used for runtime values */ + struct GameInfo_SP *game_sp; }; struct GraphicInfo_SP @@ -132,6 +162,14 @@ struct GraphicInfo_SP struct EngineSnapshotInfo_SP { struct GameInfo_SP game_sp; + + int PlayField16[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE]; + byte PlayField8[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE]; + byte DisPlayField[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE]; + + int AnimationPosTable[SP_MAX_PLAYFIELD_SIZE]; + byte AnimationSubTable[SP_MAX_PLAYFIELD_SIZE]; + byte TerminalState[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE]; }; @@ -140,7 +178,7 @@ struct EngineSnapshotInfo_SP /* ------------------------------------------------------------------------- */ extern struct GlobalInfo_SP global_sp_info; -extern struct GameInfo_SP game_sp_info; +extern struct GameInfo_SP game_sp; extern struct LevelInfo_SP native_sp_level; extern struct GraphicInfo_SP graphic_info_sp_object[TILE_MAX][8]; extern struct GraphicInfo_SP graphic_info_sp_player[MAX_PLAYERS][SPR_MAX][8]; @@ -149,6 +187,9 @@ extern struct EngineSnapshotInfo_SP engine_snapshot_sp; extern void sp_open_all(); extern void sp_close_all(); +extern void InitPrecedingPlayfieldMemory(); +extern void InitGfxBuffers_SP(); + extern void InitGameEngine_SP(); extern void GameActions_SP(byte *, boolean); @@ -157,6 +198,7 @@ extern unsigned int InitEngineRandom_SP(long); extern void setLevelInfoToDefaults_SP(); extern void copyInternalEngineVars_SP(); extern boolean LoadNativeLevel_SP(char *, int); +extern void SaveNativeLevel_SP(char *); extern void BackToFront_SP(void); extern void BlitScreenToBitmap_SP(Bitmap *); @@ -169,4 +211,6 @@ extern void SaveEngineSnapshotValues_SP(); extern int map_key_RND_to_SP(int); extern int map_key_SP_to_RND(int); +extern int getRedDiskReleaseFlag_SP(); + #endif /* GAME_SP_EXPORT_H */