4 #include "../engines.h"
7 /* 2000-07-30T11:06:03Z ---------------------------------------------------- */
9 #define EM_MAX_CAVE_WIDTH 102
10 #define EM_MAX_CAVE_HEIGHT 102
12 /* define these for backwards compatibility */
13 #define EM_ENGINE_BAD_ROLL
14 #define EM_ENGINE_BAD_SPRING
18 -----------------------------------------------------------------------------
19 definition of elements used in the Emerald Mine Club engine;
20 the element names have the following properties:
21 - elements that start with an 'X' can be stored in a level file;
22 - elements that start with an 'Y' indicate moving elements;
23 - elements that end with a 'B' are the "backside" of a moving element.
24 -----------------------------------------------------------------------------
29 Xblank = 0, /* still */
30 Yacid_splash_eB, /* hmm */
31 Yacid_splash_wB, /* hmm */
33 #ifdef EM_ENGINE_BAD_ROLL
34 Xstone_force_e, /* only use these in eater */
448 Xboom_bug, /* passed from explode to synchro (linked explosion);
449 transition to explode_normal */
450 Xboom_bomb, /* passed from explode to synchro (linked explosion);
451 transition to explode_normal */
452 Xboom_android, /* passed from explode to synchro;
453 transition to boom_2 */
454 Xboom_1, /* passed from explode to synchro;
455 transition to boom_2 */
456 Xboom_2, /* transition to boom[] */
458 Znormal, /* passed from synchro to explode, only in next[];
460 Zdynamite, /* passed from synchro to explode, only in next[];
462 Zplayer, /* special code to indicate player;
464 ZBORDER, /* special code to indicate border;
482 SAMPLE_blank = 0, /* player walks on blank */
483 SAMPLE_roll, /* player pushes stone/bomb/nut/spring */
484 SAMPLE_stone, /* stone hits ground */
485 SAMPLE_nut, /* nut hits ground */
486 SAMPLE_crack, /* stone hits nut */
487 SAMPLE_bug, /* bug moves */
488 SAMPLE_tank, /* tank moves */
489 SAMPLE_android_clone, /* android places something */
490 SAMPLE_android_move, /* android moves */
491 SAMPLE_spring, /* spring hits ground/wall/bumper, stone hits spring */
492 SAMPLE_slurp, /* spring kills alien */
493 SAMPLE_eater, /* eater sits */
494 SAMPLE_eater_eat, /* eater eats diamond */
495 SAMPLE_alien, /* alien moves */
496 SAMPLE_collect, /* player collects object */
497 SAMPLE_diamond, /* diamond/emerald hits ground */
498 SAMPLE_squash, /* stone squashes diamond */
499 SAMPLE_wonderfall, /* object falls thru wonderwall */
500 SAMPLE_drip, /* drip hits ground */
501 SAMPLE_push, /* player pushes balloon/android */
502 SAMPLE_dirt, /* player walks on dirt */
503 SAMPLE_acid, /* acid splashes */
504 SAMPLE_ball, /* ball places something */
505 SAMPLE_grow, /* growing wall grows */
506 SAMPLE_wonder, /* wonderwall is active */
507 SAMPLE_door, /* player goes thru door (gate) */
508 SAMPLE_exit_open, /* exit opens */
509 SAMPLE_exit_leave, /* player goes into exit */
510 SAMPLE_dynamite, /* player places dynamite */
511 SAMPLE_tick, /* dynamite ticks */
512 SAMPLE_press, /* player presses wheel/wind/switch */
513 SAMPLE_wheel, /* wheel moves */
514 SAMPLE_boom, /* explosion */
515 SAMPLE_time, /* time runs out */
516 SAMPLE_die, /* player dies */
523 unsigned int home_initial; /* number of players (initial) */
524 unsigned int home; /* number of players not yet at home */
525 /* 0 == all players at home */
527 unsigned int width; /* playfield width */
528 unsigned int height; /* playfield height */
530 unsigned int time_seconds; /* available time (seconds) */
531 unsigned int time_initial; /* available time (initial) */
532 unsigned int time; /* time remaining (runtime) */
534 boolean killed_out_of_time; /* kill player due to time out */
536 unsigned int required_initial; /* emeralds needed (initial) */
537 unsigned int required; /* emeralds needed (runtime) */
539 unsigned int score; /* score */
541 /* all below entries must be filled every time a level is read */
543 unsigned int alien_score; /* score for killing alien */
544 unsigned int amoeba_time; /* amoeba speed */
545 unsigned int android_move_cnt_initial;/* android move counter (initial) */
546 unsigned int android_move_cnt; /* android move counter */
547 unsigned int android_move_time; /* android move reset time */
548 unsigned int android_clone_cnt_initial;/* android clone counter (initial) */
549 unsigned int android_clone_cnt; /* android clone counter */
550 unsigned int android_clone_time; /* android clone reset time */
551 unsigned int ball_cnt; /* ball counter */
552 unsigned int ball_pos; /* ball array pos counter */
553 unsigned int ball_random; /* ball is random flag */
554 unsigned int ball_state_initial; /* ball active flag (initial) */
555 unsigned int ball_state; /* ball active flag */
556 unsigned int ball_time; /* ball reset time */
557 unsigned int bug_score; /* score for killing bug */
558 unsigned int diamond_score; /* score for collecting diamond */
559 unsigned int dynamite_score; /* score for collecting dynamite */
560 unsigned int eater_pos; /* eater array pos */
561 unsigned int eater_score; /* score for killing eater */
562 unsigned int emerald_score; /* score for collecting emerald */
563 unsigned int exit_score; /* score for entering exit */
564 unsigned int key_score; /* score for colleting key */
565 unsigned int lenses_cnt_initial; /* lenses counter (initial) */
566 unsigned int lenses_cnt; /* lenses counter */
567 unsigned int lenses_score; /* score for collecting lenses */
568 unsigned int lenses_time; /* lenses reset time */
569 unsigned int magnify_cnt_initial; /* magnify counter (initial) */
570 unsigned int magnify_cnt; /* magnify counter */
571 unsigned int magnify_score; /* score for collecting magnifier */
572 unsigned int magnify_time; /* magnify reset time */
573 unsigned int nut_score; /* score for cracking nut */
574 unsigned int shine_cnt; /* shine counter for emerald/diamond */
575 unsigned int slurp_score; /* score for slurping alien */
576 unsigned int tank_score; /* score for killing tank */
577 unsigned int wheel_cnt_initial; /* wheel counter (initial) */
578 unsigned int wheel_cnt; /* wheel counter */
579 unsigned int wheel_x_initial; /* wheel x pos (initial) */
580 unsigned int wheel_x; /* wheel x pos */
581 unsigned int wheel_y_initial; /* wheel y pos (initial) */
582 unsigned int wheel_y; /* wheel y pos */
583 unsigned int wheel_time; /* wheel reset time */
584 unsigned int wind_cnt_initial; /* wind counter (initial) */
585 unsigned int wind_cnt; /* wind time counter */
586 unsigned int wind_direction_initial; /* wind direction (initial) */
587 unsigned int wind_direction; /* wind direction */
588 unsigned int wind_time; /* wind reset time */
589 unsigned int wonderwall_state_initial;/* wonderwall active flag (initial) */
590 unsigned int wonderwall_state; /* wonderwall active flag */
591 unsigned int wonderwall_time_initial; /* wonderwall time (initial) */
592 unsigned int wonderwall_time; /* wonderwall time */
593 unsigned short eater_array[8][9]; /* eater data */
594 unsigned short ball_array[8][8]; /* ball data */
595 unsigned short android_array[TILE_MAX];/* android clone table */
596 unsigned int num_ball_arrays; /* number of ball data arrays used */
603 unsigned int alive_initial;
606 unsigned int dynamite;
607 unsigned int dynamite_cnt;
611 unsigned int x_initial;
612 unsigned int y_initial;
618 unsigned int last_move_dir;
626 unsigned joy_stick:1;
631 /* ------------------------------------------------------------------------- */
632 /* definitions and structures for use by the main game functions */
633 /* ------------------------------------------------------------------------- */
635 /* values for native Emerald Mine game version */
636 #define FILE_VERSION_EM_V3 3
637 #define FILE_VERSION_EM_V4 4
638 #define FILE_VERSION_EM_V5 5
639 #define FILE_VERSION_EM_V6 6
641 #define FILE_VERSION_EM_ACTUAL FILE_VERSION_EM_V6
645 Bitmap *screenbuffer;
652 unsigned short cave[EM_MAX_CAVE_WIDTH][EM_MAX_CAVE_HEIGHT];
655 struct PLAYER *ply[MAX_PLAYERS];
658 struct GraphicInfo_EM
662 int src_offset_x, src_offset_y;
663 int dst_offset_x, dst_offset_y;
666 Bitmap *crumbled_bitmap;
667 int crumbled_src_x, crumbled_src_y;
668 int crumbled_border_size;
670 boolean has_crumbled_graphics;
671 boolean preserve_background;
673 int unique_identifier; /* used to identify needed screen updates */
676 #endif /* MAIN_EM_H */