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 */
420 Xboom_bug, /* passed from explode to synchro (linked explosion);
421 transition to explode_normal */
422 Xboom_bomb, /* passed from explode to synchro (linked explosion);
423 transition to explode_normal */
424 Xboom_android, /* passed from explode to synchro;
425 transition to boom_2 */
426 Xboom_1, /* passed from explode to synchro;
427 transition to boom_2 */
428 Xboom_2, /* transition to boom[] */
430 Znormal, /* passed from synchro to explode, only in next[];
432 Zdynamite, /* passed from synchro to explode, only in next[];
434 Zplayer, /* special code to indicate player;
436 ZBORDER, /* special code to indicate border;
444 SAMPLE_blank = 0, /* player walks on blank */
445 SAMPLE_roll, /* player pushes stone/bomb/nut/spring */
446 SAMPLE_stone, /* stone hits ground */
447 SAMPLE_nut, /* nut hits ground */
448 SAMPLE_crack, /* stone hits nut */
449 SAMPLE_bug, /* bug moves */
450 SAMPLE_tank, /* tank moves */
451 SAMPLE_android, /* android places something */
452 SAMPLE_spring, /* spring hits ground/wall/bumper, stone hits spring */
453 SAMPLE_slurp, /* spring kills alien */
454 SAMPLE_eater, /* eater sits/eats diamond */
455 SAMPLE_alien, /* alien moves */
456 SAMPLE_collect, /* player collects object */
457 SAMPLE_diamond, /* diamond/emerald hits ground */
458 SAMPLE_squash, /* stone squashes diamond */
459 SAMPLE_wonderfall, /* object falls thru wonderwall */
460 SAMPLE_drip, /* drip hits ground */
461 SAMPLE_push, /* player pushes balloon/android */
462 SAMPLE_dirt, /* player walks on dirt */
463 SAMPLE_acid, /* acid splashes */
464 SAMPLE_ball, /* ball places something */
465 SAMPLE_grow, /* growing wall grows */
466 SAMPLE_wonder, /* wonderwall is active */
467 SAMPLE_door, /* player goes thru door (gate) */
468 SAMPLE_exit, /* player goes into exit */
469 SAMPLE_dynamite, /* player places dynamite */
470 SAMPLE_tick, /* dynamite ticks */
471 SAMPLE_press, /* player presses wheel/wind/switch */
472 SAMPLE_wheel, /* wheel moves */
473 SAMPLE_boom, /* explosion */
474 SAMPLE_time, /* time runs out */
475 SAMPLE_die, /* player dies */
482 unsigned int home_initial; /* number of players (initial) */
483 unsigned int home; /* number of players not yet at home */
484 /* 0 == all players at home */
486 unsigned int width; /* playfield width */
487 unsigned int height; /* playfield height */
489 unsigned int time_seconds; /* available time (seconds) */
490 unsigned int time_initial; /* available time (initial) */
491 unsigned int time; /* time remaining (runtime) */
493 unsigned int required_initial; /* emeralds needed (initial) */
494 unsigned int required; /* emeralds needed (runtime) */
496 unsigned int score; /* score */
498 /* fill in all below /every/ time you read a level */
499 unsigned int alien_score; /* alien popped by stone/spring score */
500 unsigned int amoeba_time; /* amoeba speed */
501 unsigned int android_move_cnt_initial; /* android move time counter (initial) */
502 unsigned int android_move_cnt; /* android move time counter */
503 unsigned int android_move_time; /* android move reset time */
504 unsigned int android_clone_cnt_initial; /* android clone time counter (initial) */
505 unsigned int android_clone_cnt; /* android clone time counter */
506 unsigned int android_clone_time; /* android clone reset time */
507 unsigned int ball_cnt; /* ball time counter */
508 unsigned int ball_pos; /* ball array pos counter */
509 unsigned int ball_random; /* ball is random flag */
510 unsigned int ball_state_initial; /* ball currently on flag (initial) */
511 unsigned int ball_state; /* ball currently on flag */
512 unsigned int ball_time; /* ball reset time */
513 unsigned int bug_score; /* bug popped by stone/spring score */
514 unsigned int diamond_score; /* diamond collect score */
515 unsigned int dynamite_score; /* dynamite collect scoer*/
516 unsigned int eater_pos; /* eater array pos */
517 unsigned int eater_score; /* eater popped by stone/spring score */
518 unsigned int emerald_score; /* emerald collect score */
519 unsigned int exit_score; /* exit score */
520 unsigned int key_score; /* key collect score */
521 unsigned int lenses_cnt_initial; /* lenses time counter (initial) */
522 unsigned int lenses_cnt; /* lenses time counter */
523 unsigned int lenses_score; /* lenses collect score */
524 unsigned int lenses_time; /* lenses reset time */
525 unsigned int magnify_cnt_initial; /* magnify time counter (initial) */
526 unsigned int magnify_cnt; /* magnify time counter */
527 unsigned int magnify_score; /* magnify collect score */
528 unsigned int magnify_time; /* magnify reset time */
529 unsigned int nut_score; /* nut crack score */
530 unsigned int shine_cnt; /* shine counter for emerald/diamond */
531 unsigned int slurp_score; /* slurp alien score */
532 unsigned int tank_score; /* tank popped by stone/spring */
533 unsigned int wheel_cnt_initial; /* wheel time counter (initial) */
534 unsigned int wheel_cnt; /* wheel time counter */
535 unsigned int wheel_x_initial; /* wheel x pos (initial) */
536 unsigned int wheel_x; /* wheel x pos */
537 unsigned int wheel_y_initial; /* wheel y pos (initial) */
538 unsigned int wheel_y; /* wheel y pos */
539 unsigned int wheel_time; /* wheel reset time */
540 unsigned int wind_cnt_initial; /* wind time counter (initial) */
541 unsigned int wind_cnt; /* wind time counter */
542 unsigned int wind_direction_initial;/* wind direction (initial) */
543 unsigned int wind_direction; /* wind direction */
544 unsigned int wind_time; /* wind reset time */
545 unsigned int wonderwall_state_initial; /* wonderwall currently on flag (initial) */
546 unsigned int wonderwall_state; /* wonderwall currently on flag */
547 unsigned int wonderwall_time_initial;/* wonderwall time (initial) */
548 unsigned int wonderwall_time; /* wonderwall time */
549 unsigned short eater_array[8][9]; /* eater data */
550 unsigned short ball_array[8][8]; /* ball data */
551 unsigned short android_array[TILE_MAX]; /* android clone table */
557 unsigned int alive_initial;
560 unsigned int dynamite;
561 unsigned int dynamite_cnt;
565 unsigned int x_initial;
566 unsigned int y_initial;
577 unsigned joy_stick:1;
582 /* ------------------------------------------------------------------------- */
583 /* definitions and structures for use by the main game functions */
584 /* ------------------------------------------------------------------------- */
586 /* values for native Emerald Mine game version */
587 #define FILE_VERSION_EM_V3 3
588 #define FILE_VERSION_EM_V4 4
589 #define FILE_VERSION_EM_V5 5
590 #define FILE_VERSION_EM_V6 6
592 #define FILE_VERSION_EM_ACTUAL FILE_VERSION_EM_V6
599 struct PLAYER *ply1, *ply2;
601 unsigned short cave[EM_MAX_CAVE_WIDTH][EM_MAX_CAVE_HEIGHT];
604 struct GraphicInfo_EM
608 int src_offset_x, src_offset_y;
609 int dst_offset_x, dst_offset_y;
613 #endif /* MAIN_EM_H */