X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=da629d537244d5e8a2330c6fdce43c6c9464f80d;hb=d3e8110e6f4f9fb2f92ecf7c7842fbf56c8f2e01;hp=4313bf7eb8071ce773fc4db735ee17c17eebe935;hpb=1100054eec7c45458359fd56072341bd661f4a9c;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index 4313bf7e..da629d53 100644 --- a/src/main.h +++ b/src/main.h @@ -1,14 +1,14 @@ /*********************************************************** -* Rocks'n'Diamonds -- McDuffin Strikes Back! * +* Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* (c) 1995-98 Artsoft Entertainment * -* Holger Schemel * -* Oststrasse 11a * -* 33604 Bielefeld * -* phone: ++49 +521 290471 * -* email: aeglos@valinor.owl.de * +* (c) 1995-2001 Artsoft Entertainment * +* Holger Schemel * +* Detmolder Strasse 189 * +* 33604 Bielefeld * +* Germany * +* e-mail: info@artsoft.org * *----------------------------------------------------------* -* main.h * +* main.h * ***********************************************************/ #ifndef MAIN_H @@ -24,15 +24,10 @@ #include #include -#ifdef DEBUG -#define DEBUG_TIMING 0 -#endif - #include "libgame/libgame.h" #define WIN_XSIZE 672 #define WIN_YSIZE 560 -#define WIN_SDL_DEPTH 16 /* !!! change this !!! */ #if !defined(PLATFORM_MSDOS) #define WIN_XPOS 0 @@ -101,6 +96,7 @@ #define EP_BIT_BELT (1 << 0) #define EP_BIT_BELT_SWITCH (1 << 1) #define EP_BIT_TUBE (1 << 2) +#define EP_BIT_SLIPPERY_GEMS (1 << 3) #define IS_AMOEBALIVE(e) (Elementeigenschaften1[e] & EP_BIT_AMOEBALIVE) #define IS_AMOEBOID(e) (Elementeigenschaften1[e] & EP_BIT_AMOEBOID) @@ -137,6 +133,7 @@ #define IS_BELT(e) (Elementeigenschaften2[e] & EP_BIT_BELT) #define IS_BELT_SWITCH(e) (Elementeigenschaften2[e] & EP_BIT_BELT_SWITCH) #define IS_TUBE(e) (Elementeigenschaften2[e] & EP_BIT_TUBE) +#define IS_SLIPPERY_GEMS(e) (Elementeigenschaften2[e] & EP_BIT_SLIPPERY_GEMS) #define IS_PLAYER(x,y) (ELEM_IS_PLAYER(StorePlayer[x][y])) @@ -281,7 +278,7 @@ struct PlayerInfo int index_nr, client_nr, element_nr; byte action; /* action from local input device */ - byte effective_action; /* action aknowledged from network server + byte effective_action; /* action acknowledged from network server or summarized over all configured input devices when in single player mode */ byte programmed_action; /* action forced by game itself (like moving @@ -302,6 +299,7 @@ struct PlayerInfo int move_delay_value; int last_move_dir; + int is_moving; unsigned long push_delay; unsigned long push_delay_value; @@ -324,6 +322,12 @@ struct PlayerInfo struct LevelInfo { + int file_version; /* version of file the level was stored with */ + int game_version; /* version of game engine to play this level */ + boolean encoding_16bit_field; /* level contains 16-bit elements */ + boolean encoding_16bit_yamyam; /* yamyam contains 16-bit elements */ + boolean encoding_16bit_amoeba; /* amoeba contains 16-bit elements */ + int fieldx; int fieldy; int time; @@ -345,6 +349,9 @@ struct LevelInfo struct TapeInfo { + int file_version; /* version of file this level tape was stored with */ + int game_version; /* version of game engine to play this tapeĀ“s level */ + int version; int level_nr; unsigned long random_seed; unsigned long date; @@ -357,6 +364,7 @@ struct TapeInfo boolean fast_forward; boolean changed; boolean player_participates[MAX_PLAYERS]; + int num_participating_players; struct { byte action[MAX_PLAYERS]; @@ -366,6 +374,7 @@ struct TapeInfo struct GameInfo { + int version; int emulation; int yam_content_nr; boolean magic_wall_active; @@ -376,6 +385,7 @@ struct GameInfo int belt_dir_nr[4]; int switchgate_pos; int balloon_dir; + boolean explosions_delayed; }; struct GlobalInfo @@ -417,6 +427,7 @@ extern boolean Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern short JustStopped[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern short AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern short AmoebaCnt[MAX_NUM_AMOEBA], AmoebaCnt2[MAX_NUM_AMOEBA]; +extern short ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern unsigned long Elementeigenschaften1[MAX_ELEMENTS]; extern unsigned long Elementeigenschaften2[MAX_ELEMENTS]; @@ -906,6 +917,10 @@ extern int num_element_info; #define EL_TRAP_ACTIVE 522 #define EL_SPRING_MOVING 523 #define EL_SP_MURPHY_CLONE 524 +#define EL_QUICKSAND_EMPTYING 525 +#define EL_MAGIC_WALL_EMPTYING 526 +#define EL_MAGIC_WALL_BD_EMPTYING 527 +#define EL_AMOEBA_DRIPPING 528 /* "unreal" (and therefore not drawable) runtime elements */ #define EL_BLOCKED 600 @@ -918,6 +933,9 @@ extern int num_element_info; #define EL_MAUERND 607 #define EL_BURNING 608 #define EL_PLAYER_IS_LEAVING 609 +#define EL_QUICKSAND_FILLING 610 +#define EL_MAGIC_WALL_FILLING 611 +#define EL_MAGIC_WALL_BD_FILLING 612 /* game graphics: ** 0 - 255: graphics from "RocksScreen" @@ -1427,70 +1445,63 @@ extern int num_element_info; /* the names of the sounds */ -#define SND_ALCHEMY 0 -#define SND_AMOEBE 1 -#define SND_ANTIGRAV 2 -#define SND_AUTSCH 3 -#define SND_BLURB 4 -#define SND_BONG 5 -#define SND_BUING 6 -#define SND_CHASE 7 -#define SND_CZARDASZ 8 -#define SND_DENG 9 -#define SND_FUEL 10 -#define SND_GONG 11 -#define SND_HALLOFFAME 12 -#define SND_HOLZ 13 -#define SND_HUI 14 -#define SND_KABUMM 15 -#define SND_KINK 16 -#define SND_KLAPPER 17 -#define SND_KLING 18 -#define SND_KLOPF 19 -#define SND_KLUMPF 20 -#define SND_KNACK 21 -#define SND_KNURK 22 -#define SND_KRACH 23 -#define SND_LACHEN 24 -#define SND_LASER 25 -#define SND_MIEP 26 -#define SND_NETWORK 27 -#define SND_NJAM 28 -#define SND_OEFFNEN 29 -#define SND_PLING 30 -#define SND_PONG 31 -#define SND_PUSCH 32 -#define SND_QUIEK 33 -#define SND_QUIRK 34 -#define SND_RHYTHMLOOP 35 -#define SND_ROAAAR 36 -#define SND_ROEHR 37 -#define SND_RUMMS 38 -#define SND_SCHLOPP 39 -#define SND_SCHLURF 40 -#define SND_SCHRFF 41 -#define SND_SCHWIRR 42 -#define SND_SIRR 43 -#define SND_SLURP 44 -#define SND_SPROING 45 -#define SND_TWILIGHT 46 -#define SND_TYGER 47 -#define SND_VOYAGER 48 -#define SND_WARNTON 49 -#define SND_WHOOSH 50 -#define SND_ZISCH 51 -#define SND_SP_BASE 52 -#define SND_SP_INFOTRON 53 -#define SND_SP_ZONKDOWN 54 -#define SND_SP_ZONKPUSH 55 -#define SND_SP_BUG 56 -#define SND_SP_BOOM 57 -#define SND_SP_BOOOM 58 -#define SND_SP_EXIT 59 -#define SND_EMPTY 60 -#define SND_GATE 61 - -#define NUM_SOUNDS 62 +#define SND_AMOEBE 0 +#define SND_ANTIGRAV 1 +#define SND_AUTSCH 2 +#define SND_BLURB 3 +#define SND_BONG 4 +#define SND_BUING 5 +#define SND_DENG 6 +#define SND_FUEL 7 +#define SND_GONG 8 +#define SND_HALLOFFAME 9 +#define SND_HOLZ 10 +#define SND_HUI 11 +#define SND_KABUMM 12 +#define SND_KINK 13 +#define SND_KLAPPER 14 +#define SND_KLING 15 +#define SND_KLOPF 16 +#define SND_KLUMPF 17 +#define SND_KNACK 18 +#define SND_KNURK 19 +#define SND_KRACH 20 +#define SND_LACHEN 21 +#define SND_LASER 22 +#define SND_MIEP 23 +#define SND_NJAM 24 +#define SND_OEFFNEN 25 +#define SND_PLING 26 +#define SND_PONG 27 +#define SND_PUSCH 28 +#define SND_QUIEK 29 +#define SND_QUIRK 30 +#define SND_RHYTHMLOOP 31 +#define SND_ROAAAR 32 +#define SND_ROEHR 33 +#define SND_RUMMS 34 +#define SND_SCHLOPP 35 +#define SND_SCHLURF 36 +#define SND_SCHRFF 37 +#define SND_SCHWIRR 38 +#define SND_SIRR 39 +#define SND_SLURP 40 +#define SND_SPROING 41 +#define SND_WARNTON 42 +#define SND_WHOOSH 43 +#define SND_ZISCH 44 +#define SND_SP_BASE 45 +#define SND_SP_INFOTRON 46 +#define SND_SP_ZONKDOWN 47 +#define SND_SP_ZONKPUSH 48 +#define SND_SP_BUG 49 +#define SND_SP_BOOM 50 +#define SND_SP_BOOOM 51 +#define SND_SP_EXIT 52 +#define SND_EMPTY 53 +#define SND_GATE 54 + +#define NUM_SOUNDS 55 /* default input keys */ #define DEFAULT_KEY_LEFT KSYM_Left @@ -1522,10 +1533,14 @@ extern int num_element_info; #define SETUPINPUT 9 #define CALIBRATION 10 -#define PROGRAM_VERSION_STRING "1.5.0" +#define PROGRAM_VERSION_MAJOR 2 +#define PROGRAM_VERSION_MINOR 0 +#define PROGRAM_VERSION_PATCH 1 +#define PROGRAM_VERSION_STRING "2.0.1" + #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" #define PROGRAM_AUTHOR_STRING "Holger Schemel" -#define PROGRAM_RIGHTS_STRING "Copyright ^1995-2000 by" +#define PROGRAM_RIGHTS_STRING "Copyright ^1995-2001 by" #define PROGRAM_DOS_PORT_STRING "DOS port done by Guido Schulz" #define PROGRAM_IDENT_STRING PROGRAM_VERSION_STRING " " TARGET_STRING #define WINDOW_TITLE_STRING PROGRAM_TITLE_STRING " " PROGRAM_IDENT_STRING @@ -1537,6 +1552,37 @@ extern int num_element_info; #define X11_ICONMASK_FILENAME "rocks_iconmask.xbm" #define MSDOS_POINTER_FILENAME "mouse.pcx" +#define VERSION_IDENT(x,y,z) ((x) * 10000 + (y) * 100 + (z)) +#define VERSION_MAJOR(x) ((x) / 10000) +#define VERSION_MINOR(x) (((x) % 10000) / 100) +#define VERSION_PATCH(x) ((x) % 100) + +/* file version numbers for resource files (levels, tapes, score, setup, etc.) +** currently supported/known file version numbers: +** 1.0 (old) +** 1.2 (still in use) +** 1.4 (still in use) +** 2.0 (actual) +*/ +#define FILE_VERSION_1_0 VERSION_IDENT(1,0,0) +#define FILE_VERSION_1_2 VERSION_IDENT(1,2,0) +#define FILE_VERSION_1_4 VERSION_IDENT(1,4,0) +#define FILE_VERSION_2_0 VERSION_IDENT(2,0,0) + +/* file version does not change for every program version, but is changed + when new features are introduced that are incompatible with older file + versions, so that they can be treated accordingly */ +#define FILE_VERSION_ACTUAL FILE_VERSION_2_0 + +#define GAME_VERSION_1_0 FILE_VERSION_1_0 +#define GAME_VERSION_1_2 FILE_VERSION_1_2 +#define GAME_VERSION_1_4 FILE_VERSION_1_4 +#define GAME_VERSION_2_0 FILE_VERSION_2_0 + +#define GAME_VERSION_ACTUAL VERSION_IDENT(PROGRAM_VERSION_MAJOR, \ + PROGRAM_VERSION_MINOR, \ + PROGRAM_VERSION_PATCH) + /* for DrawGraphicAnimation() [tools.c] and AnimateToon() [cartoons.c] */ #define ANIM_NORMAL 0 #define ANIM_OSCILLATE 1