4 #include "../engines.h"
7 /* 2000-07-30T11:06:03Z ---------------------------------------------------- */
10 /* one border for ZBORDER elements, one border for steelwall, if needed */
11 #define EM_MAX_CAVE_WIDTH (MAX_PLAYFIELD_WIDTH + 2 + 2)
12 #define EM_MAX_CAVE_HEIGHT (MAX_PLAYFIELD_HEIGHT + 2 + 2)
14 #define EM_MAX_CAVE_WIDTH 102
15 #define EM_MAX_CAVE_HEIGHT 102
18 /* define these for backwards compatibility */
19 #define EM_ENGINE_BAD_ROLL
20 #define EM_ENGINE_BAD_SPRING
24 -----------------------------------------------------------------------------
25 definition of elements used in the Emerald Mine Club engine;
26 the element names have the following properties:
27 - elements that start with 'X' can be stored in a level file
28 - elements that start with 'Y' indicate moving elements
29 - elements that end with 'B' are the "backside" of moving elements
30 -----------------------------------------------------------------------------
35 Xblank = 0, /* still */
36 Yacid_splash_eB, /* hmm */
37 Yacid_splash_wB, /* hmm */
39 #ifdef EM_ENGINE_BAD_ROLL
40 Xstone_force_e, /* only use these in eater */
454 Xboom_bug, /* passed from explode to synchro (linked explosion);
455 transition to explode_normal */
456 Xboom_bomb, /* passed from explode to synchro (linked explosion);
457 transition to explode_normal */
458 Xboom_android, /* passed from explode to synchro;
459 transition to boom_2 */
460 Xboom_1, /* passed from explode to synchro;
461 transition to boom_2 */
462 Xboom_2, /* transition to boom[] */
464 Znormal, /* passed from synchro to explode, only in next[];
466 Zdynamite, /* passed from synchro to explode, only in next[];
468 Zplayer, /* special code to indicate player;
470 ZBORDER, /* special code to indicate border;
488 SAMPLE_blank = 0, /* player walks on blank */
489 SAMPLE_roll, /* player pushes stone/bomb/nut/spring */
490 SAMPLE_stone, /* stone hits ground */
491 SAMPLE_nut, /* nut hits ground */
492 SAMPLE_crack, /* stone hits nut */
493 SAMPLE_bug, /* bug moves */
494 SAMPLE_tank, /* tank moves */
495 SAMPLE_android_clone, /* android places something */
496 SAMPLE_android_move, /* android moves */
497 SAMPLE_spring, /* spring hits ground/wall/bumper, stone hits spring */
498 SAMPLE_slurp, /* spring kills alien */
499 SAMPLE_eater, /* eater sits */
500 SAMPLE_eater_eat, /* eater eats diamond */
501 SAMPLE_alien, /* alien moves */
502 SAMPLE_collect, /* player collects object */
503 SAMPLE_diamond, /* diamond/emerald hits ground */
504 SAMPLE_squash, /* stone squashes diamond */
505 SAMPLE_wonderfall, /* object falls thru wonderwall */
506 SAMPLE_drip, /* drip hits ground */
507 SAMPLE_push, /* player pushes balloon/android */
508 SAMPLE_dirt, /* player walks on dirt */
509 SAMPLE_acid, /* acid splashes */
510 SAMPLE_ball, /* ball places something */
511 SAMPLE_grow, /* growing wall grows */
512 SAMPLE_wonder, /* wonderwall is active */
513 SAMPLE_door, /* player goes thru door (gate) */
514 SAMPLE_exit_open, /* exit opens */
515 SAMPLE_exit_leave, /* player goes into exit */
516 SAMPLE_dynamite, /* player places dynamite */
517 SAMPLE_tick, /* dynamite ticks */
518 SAMPLE_press, /* player presses wheel/wind/switch */
519 SAMPLE_wheel, /* wheel moves */
520 SAMPLE_boom, /* explosion */
521 SAMPLE_time, /* time runs out */
522 SAMPLE_die, /* player dies */
529 int home_initial; /* number of players (initial) */
530 int home; /* number of players not yet at home */
531 /* 0 == all players at home */
533 int width; /* playfield width */
534 int height; /* playfield height */
536 int time_seconds; /* available time (seconds) */
537 int time_initial; /* available time (initial) */
538 int time; /* time remaining (runtime) */
540 boolean killed_out_of_time; /* kill player due to time out */
542 int required_initial; /* emeralds needed (initial) */
543 int required; /* emeralds needed (runtime) */
545 int score; /* score */
547 /* all below entries must be filled every time a level is read */
549 int alien_score; /* score for killing alien */
550 int amoeba_time; /* amoeba speed */
551 int android_move_cnt_initial; /* android move counter (initial) */
552 int android_move_cnt; /* android move counter */
553 int android_move_time; /* android move reset time */
554 int android_clone_cnt_initial;/* android clone counter (initial) */
555 int android_clone_cnt; /* android clone counter */
556 int android_clone_time; /* android clone reset time */
557 int ball_cnt; /* ball counter */
558 int ball_pos; /* ball array pos counter */
559 int ball_random; /* ball is random flag */
560 int ball_state_initial; /* ball active flag (initial) */
561 int ball_state; /* ball active flag */
562 int ball_time; /* ball reset time */
563 int bug_score; /* score for killing bug */
564 int diamond_score; /* score for collecting diamond */
565 int dynamite_score; /* score for collecting dynamite */
566 int eater_pos; /* eater array pos */
567 int eater_score; /* score for killing eater */
568 int emerald_score; /* score for collecting emerald */
569 int exit_score; /* score for entering exit */
570 int key_score; /* score for colleting key */
571 int lenses_cnt_initial; /* lenses counter (initial) */
572 int lenses_cnt; /* lenses counter */
573 int lenses_score; /* score for collecting lenses */
574 int lenses_time; /* lenses reset time */
575 int magnify_cnt_initial; /* magnify counter (initial) */
576 int magnify_cnt; /* magnify counter */
577 int magnify_score; /* score for collecting magnifier */
578 int magnify_time; /* magnify reset time */
579 int nut_score; /* score for cracking nut */
580 int shine_cnt; /* shine counter for emerald/diamond */
581 int slurp_score; /* score for slurping alien */
582 int tank_score; /* score for killing tank */
583 int wheel_cnt_initial; /* wheel counter (initial) */
584 int wheel_cnt; /* wheel counter */
585 int wheel_x_initial; /* wheel x pos (initial) */
586 int wheel_x; /* wheel x pos */
587 int wheel_y_initial; /* wheel y pos (initial) */
588 int wheel_y; /* wheel y pos */
589 int wheel_time; /* wheel reset time */
590 int wind_cnt_initial; /* wind counter (initial) */
591 int wind_cnt; /* wind time counter */
592 int wind_direction_initial; /* wind direction (initial) */
593 int wind_direction; /* wind direction */
594 int wind_time; /* wind reset time */
595 int wonderwall_state_initial; /* wonderwall active flag (initial) */
596 int wonderwall_state; /* wonderwall active flag */
597 int wonderwall_time_initial; /* wonderwall time (initial) */
598 int wonderwall_time; /* wonderwall time */
599 short eater_array[8][9]; /* eater data */
600 short ball_array[8][8]; /* ball data */
601 short android_array[TILE_MAX];/* android clone table */
602 int num_ball_arrays; /* number of ball data arrays used */
637 /* ------------------------------------------------------------------------- */
638 /* definitions and structures for use by the main game functions */
639 /* ------------------------------------------------------------------------- */
641 /* values for native Emerald Mine game version */
642 #define FILE_VERSION_EM_V3 3
643 #define FILE_VERSION_EM_V4 4
644 #define FILE_VERSION_EM_V5 5
645 #define FILE_VERSION_EM_V6 6
647 #define FILE_VERSION_EM_ACTUAL FILE_VERSION_EM_V6
651 Bitmap *screenbuffer;
656 boolean any_player_moving;
657 int last_moving_player;
658 int last_player_direction[MAX_PLAYERS];
665 short cave[EM_MAX_CAVE_WIDTH][EM_MAX_CAVE_HEIGHT];
668 struct PLAYER *ply[MAX_PLAYERS];
671 struct GraphicInfo_EM
675 int src_offset_x, src_offset_y;
676 int dst_offset_x, dst_offset_y;
679 Bitmap *crumbled_bitmap;
680 int crumbled_src_x, crumbled_src_y;
681 int crumbled_border_size;
683 boolean has_crumbled_graphics;
684 boolean preserve_background;
686 int unique_identifier; /* used to identify needed screen updates */
689 extern struct GameInfo_EM game_em;
691 #endif /* MAIN_EM_H */