X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fmain.c;h=ca59e8f692fc7a70d71b948f6197db1fe5067334;hp=5ad230da024586744008c01df19c16be51358905;hb=a7c06161253796a30a0237a7f5a044f459c8cf35;hpb=b6191e2bcd1c798efe34d42284ae4ba0b17d6836 diff --git a/src/main.c b/src/main.c index 5ad230da..ca59e8f6 100644 --- a/src/main.c +++ b/src/main.c @@ -17,9 +17,11 @@ #include "init.h" #include "game.h" #include "tape.h" +#include "tools.h" #include "events.h" #include "config.h" +Bitmap *bitmap_db_store; Bitmap *bitmap_db_cross; Bitmap *bitmap_db_field; Bitmap *bitmap_db_panel; @@ -39,7 +41,15 @@ SDL_Thread *server_thread; int key_joystick_mapping = 0; +#if 1 +#if NEW_SCROLL +boolean redraw[2 + MAX_LEV_FIELDX + 2][2 + MAX_LEV_FIELDY + 2]; +#else +boolean redraw[MAX_LEV_FIELDX + 2][MAX_LEV_FIELDY + 2]; +#endif +#else boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE]; +#endif int redraw_x1 = 0, redraw_y1 = 0; short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; @@ -84,15 +94,38 @@ int ActiveFont[NUM_FONTS]; int lev_fieldx, lev_fieldy; int scroll_x, scroll_y; +int WIN_XSIZE = 672, WIN_YSIZE = 560; +int SCR_FIELDX = 17, SCR_FIELDY = 17; +int SX = 8, SY = 8; +int REAL_SX = 6, REAL_SY = 6; +int DX = 566, DY = 60; +int VX = 566, VY = 400; +int EX = 566, EY = 356; +int dDX, dDY; +int SXSIZE = 17 * TILEX; /* SCR_FIELDX * TILEX */ +int SYSIZE = 17 * TILEY; /* SCR_FIELDY * TILEY */ +int FULL_SXSIZE = 2 + 17 * TILEX + 2; /* 2 + SXSIZE + 2 */ +int FULL_SYSIZE = 2 + 17 * TILEY + 2; /* 2 + SYSIZE + 2 */ +int TILESIZE_VAR = TILESIZE; + +#if 1 +int FX, FY; +#else int FX = SX, FY = SY; +#endif int ScrollStepSize; int ScreenMovDir = MV_NONE, ScreenMovPos = 0; int ScreenGfxPos = 0; int BorderElement = EL_STEELWALL; int GameFrameDelay = GAME_FRAME_DELAY; int FfwdFrameDelay = FFWD_FRAME_DELAY; +#if 1 +int BX1, BY1; +int BX2, BY2; +#else int BX1 = 0, BY1 = 0; int BX2 = SCR_FIELDX - 1, BY2 = SCR_FIELDY - 1; +#endif int SBX_Left, SBX_Right; int SBY_Upper, SBY_Lower; int ZX, ZY; @@ -112,6 +145,7 @@ struct SetupInfo setup; struct GameInfo game; struct GlobalInfo global; struct BorderInfo border; +struct ViewportInfo viewport; struct TitleFadingInfo fading; struct TitleFadingInfo title_initial_default; struct TitleFadingInfo title_default; @@ -120,15 +154,18 @@ struct TitleMessageInfo titlemessage_initial[MAX_NUM_TITLE_MESSAGES]; struct TitleMessageInfo titlemessage_default; struct TitleMessageInfo titlemessage[MAX_NUM_TITLE_MESSAGES]; struct TitleMessageInfo readme; -struct InitInfo init; +struct InitInfo init, init_last; struct MenuInfo menu; struct DoorInfo door_1, door_2; +struct RequestInfo request; struct PreviewInfo preview; + struct GraphicInfo *graphic_info = NULL; struct SoundInfo *sound_info = NULL; struct MusicInfo *music_info = NULL; struct MusicFileInfo *music_file_info = NULL; struct HelpAnimInfo *helpanim_info = NULL; + SetupFileHash *helptext_info = NULL; SetupFileHash *image_config_hash = NULL; SetupFileHash *element_token_hash = NULL; @@ -5427,12 +5464,14 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] = { ".TITLE", GFX_SPECIAL_ARG_TITLE, }, { ".MAIN", GFX_SPECIAL_ARG_MAIN, }, { ".LEVELS", GFX_SPECIAL_ARG_LEVELS }, + { ".LEVELNR", GFX_SPECIAL_ARG_LEVELNR }, { ".SCORES", GFX_SPECIAL_ARG_SCORES, }, { ".EDITOR", GFX_SPECIAL_ARG_EDITOR, }, { ".INFO", GFX_SPECIAL_ARG_INFO, }, { ".SETUP", GFX_SPECIAL_ARG_SETUP, }, { ".PLAYING", GFX_SPECIAL_ARG_PLAYING, }, { ".DOOR", GFX_SPECIAL_ARG_DOOR, }, + { ".TAPE", GFX_SPECIAL_ARG_TAPE, }, { ".PANEL", GFX_SPECIAL_ARG_PANEL, }, { ".PREVIEW", GFX_SPECIAL_ARG_PREVIEW, }, { ".CRUMBLED", GFX_SPECIAL_ARG_CRUMBLED, }, @@ -5559,6 +5598,7 @@ int main(int argc, char *argv[]) MSDOS_POINTER_FILENAME, COOKIE_PREFIX, FILENAME_PREFIX, GAME_VERSION_ACTUAL); + InitExitMessageFunction(DisplayExitMessage); InitExitFunction(CloseAllAndExit); InitPlatformDependentStuff();