X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_em%2Femerald.h;h=50038d4d2135a3ed5cba9a795d4a0514b6370f1f;hb=fc74bc0bdaa45f861017061025c56f3148cf1b59;hp=8ddda6d3a6e1578701d4537a462e381249f55f49;hpb=8bcfb5f59474c6f95075317ff29574446b89625d;p=rocksndiamonds.git diff --git a/src/game_em/emerald.h b/src/game_em/emerald.h index 8ddda6d3..50038d4d 100644 --- a/src/game_em/emerald.h +++ b/src/game_em/emerald.h @@ -48,6 +48,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // constant definitions // ---------------------------------------------------------------------------- +/* maximum cave size */ #define CAVE_WIDTH MAX_PLAYFIELD_WIDTH #define CAVE_HEIGHT MAX_PLAYFIELD_HEIGHT @@ -57,20 +58,35 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define CAVE_BUFFER_WIDTH (CAVE_WIDTH + 2 * CAVE_BUFFER_XOFFSET) #define CAVE_BUFFER_HEIGHT (CAVE_HEIGHT + 2 * CAVE_BUFFER_YOFFSET) -/* - ----------------------------------------------------------------------------- - definition of elements used in the Emerald Mine Club engine; - the element names (mostly) have the following properties: - - elements that start with 'X' can be stored in a level file - - elements that start with 'Y' indicate moving or active elements - - elements that start with 'Z' are internal elements without graphics - - elements that end with 'B' are the "backside" of moving elements - ----------------------------------------------------------------------------- -*/ + +// ---------------------------------------------------------------------------- +// definition of elements used in the Emerald Mine Club engine; +// the element names (mostly) have the following properties: +// - elements that start with 'X' are not animated (more or less) +// - elements that start with 'Y' are animated elements +// - elements that start with 'Z' are internal elements (without graphics) +// - elements that end with 'B' or '_blank' change to the "Xblank" element +// ---------------------------------------------------------------------------- enum { - Xblank = 0, + Zborder, /* special code to indicate border */ + Zplayer, /* special code to indicate player */ + + Zbug, /* internal bug explosion */ + Ztank, /* internal tank/alien/bomb explosion */ + Zeater, /* internal eater explosion */ + Zdynamite, /* internal dynamite explosion */ + Zboom, /* explosion */ + + Xchain, /* chain explosion; transition to Zboom */ + Xboom_bug, /* bug explosion; transition to Zbug */ + Xboom_tank, /* tank/alien/bomb explosion; transition to Ztank */ + Xboom_android, /* android explosion; transition to Xboom_2 */ + Xboom_1, /* tile explosion; transition to Xboom_2 */ + Xboom_2, /* transition to boom[] */ + + Xblank, Xsplash_e, Xsplash_w, @@ -110,12 +126,12 @@ enum Xandroid, Xandroid_1_n, - Xandroid_2_n, Xandroid_1_e, - Xandroid_2_e, Xandroid_1_w, - Xandroid_2_w, Xandroid_1_s, + Xandroid_2_n, + Xandroid_2_e, + Xandroid_2_w, Xandroid_2_s, Yandroid_n, Yandroid_nB, @@ -478,7 +494,7 @@ enum Xalpha_8, Xalpha_9, Xalpha_excla, - Xalpha_quote, + Xalpha_apost, Xalpha_comma, Xalpha_minus, Xalpha_perio, @@ -527,20 +543,7 @@ enum Ygrass_blank, Ydirt_blank, - Xboom_bug, /* bug explosion; transition to Zbug */ - Xboom_bomb, /* tank/alien/bomb explosion; transition to Ztank */ - Xboom_android, /* android explosion; transition to Xboom_2 */ - Xboom_1, /* tile explosion; transition to Xboom_2 */ - Xboom_2, /* transition to boom[] */ - - Zbug, /* internal bug explosion */ - Ztank, /* internal tank/alien/bomb explosion */ - Zeater, /* internal eater explosion */ - Zdynamite, /* internal dynamite explosion */ - Zplayer, /* special code to indicate player */ - Zborder, /* special code to indicate border */ - - TILE_MAX + GAME_TILE_MAX }; /* other definitions */ @@ -569,7 +572,7 @@ enum enum { - SOUND_blank = 0, /* player walks on blank */ + SOUND_blank, /* player walks on blank */ SOUND_roll, /* player pushes stone/bomb/nut/spring */ SOUND_stone, /* stone hits ground */ SOUND_nut, /* nut hits ground */ @@ -613,6 +616,37 @@ enum // data structure definitions // ---------------------------------------------------------------------------- +/* structure used by logic() for gameplay */ + +struct PLAYER +{ + int num; + int exists; + int alive_initial; + int alive; + + int dynamite; + int dynamite_cnt; + int keys; + int anim; + + int x; + int y; + int oldx; + int oldy; + + int last_move_dir; + + int joy_n:1; + int joy_e:1; + int joy_s:1; + int joy_w:1; + int joy_snap:1; + int joy_drop:1; + int joy_stick:1; + int joy_spin:1; +}; + struct LOGIC { int width; /* cave width */ @@ -675,13 +709,14 @@ struct LOGIC int home; /* number of players not yet at home */ /* 0 == all players at home */ + boolean testmode; /* test mode */ boolean killed_out_of_time; /* kill player due to time out */ int exit_x, exit_y; /* kludge for playing player exit sound */ short eater_array[8][9]; /* eater data */ short ball_array[8][8]; /* ball data */ - short android_array[TILE_MAX]; /* android clone data */ + short android_array[GAME_TILE_MAX]; /* android clone data */ short cavebuf[CAVE_BUFFER_WIDTH][CAVE_BUFFER_HEIGHT]; short nextbuf[CAVE_BUFFER_WIDTH][CAVE_BUFFER_HEIGHT]; @@ -699,33 +734,4 @@ struct LOGIC short **boom; }; -struct PLAYER -{ - int num; - int exists; - int alive_initial; - int alive; - - int dynamite; - int dynamite_cnt; - int keys; - int anim; - - int x; - int y; - int oldx; - int oldy; - - int last_move_dir; - - int joy_n:1; - int joy_e:1; - int joy_s:1; - int joy_w:1; - int joy_snap:1; - int joy_drop:1; - int joy_stick:1; - int joy_spin:1; -}; - #endif // EMERALD_H