4 /* 2000-07-30T11:06:03Z */
6 // ----------------------------------------------------------------------------
7 // constant definitions
8 // ----------------------------------------------------------------------------
10 /* define these for backwards compatibility */
11 #define EM_ENGINE_BAD_ROLL
12 #define EM_ENGINE_BAD_SPRING
14 /* define these to use additional elements */
15 #define EM_ENGINE_USE_ADDITIONAL_ELEMENTS
17 /* internal definitions for EM engine */
18 #ifdef EM_ENGINE_BAD_ROLL
22 #ifdef EM_ENGINE_BAD_SPRING
26 /* one border for ZBORDER elements, one border for steelwall, if needed */
27 #define EM_MAX_CAVE_WIDTH (MAX_PLAYFIELD_WIDTH + 2 + 2)
28 #define EM_MAX_CAVE_HEIGHT (MAX_PLAYFIELD_HEIGHT + 2 + 2)
31 -----------------------------------------------------------------------------
32 definition of elements used in the Emerald Mine Club engine;
33 the element names have the following properties:
34 - elements that start with 'X' can be stored in a level file
35 - elements that start with 'Y' indicate moving elements
36 - elements that end with 'B' are the "backside" of moving elements
37 -----------------------------------------------------------------------------
42 Xblank = 0, /* still */
43 Yacid_splash_eB, /* hmm */
44 Yacid_splash_wB, /* hmm */
46 #ifdef EM_ENGINE_BAD_ROLL
47 Xstone_force_e, /* only use these in eater */
277 #ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
355 #ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
356 Xsand_stonesand_quickout_1,
357 Xsand_stonesand_quickout_2,
385 #ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
467 Xboom_bug, /* passed from explode to synchro (linked explosion);
468 transition to explode_normal */
469 Xboom_bomb, /* passed from explode to synchro (linked explosion);
470 transition to explode_normal */
471 Xboom_android, /* passed from explode to synchro;
472 transition to boom_2 */
473 Xboom_1, /* passed from explode to synchro;
474 transition to boom_2 */
475 Xboom_2, /* transition to boom[] */
477 Znormal, /* passed from synchro to explode, only in next[];
479 Zdynamite, /* passed from synchro to explode, only in next[];
481 Zplayer, /* special code to indicate player;
483 ZBORDER, /* special code to indicate border;
489 /* other definitions */
503 SAMPLE_blank = 0, /* player walks on blank */
504 SAMPLE_roll, /* player pushes stone/bomb/nut/spring */
505 SAMPLE_stone, /* stone hits ground */
506 SAMPLE_nut, /* nut hits ground */
507 SAMPLE_crack, /* stone hits nut */
508 SAMPLE_bug, /* bug moves */
509 SAMPLE_tank, /* tank moves */
510 SAMPLE_android_clone, /* android places something */
511 SAMPLE_android_move, /* android moves */
512 SAMPLE_spring, /* spring hits ground/wall/bumper, stone hits spring */
513 SAMPLE_slurp, /* spring kills alien */
514 SAMPLE_eater, /* eater sits */
515 SAMPLE_eater_eat, /* eater eats diamond */
516 SAMPLE_alien, /* alien moves */
517 SAMPLE_collect, /* player collects object */
518 SAMPLE_diamond, /* diamond/emerald hits ground */
519 SAMPLE_squash, /* stone squashes diamond */
520 SAMPLE_wonderfall, /* object falls thru wonderwall */
521 SAMPLE_drip, /* drip hits ground */
522 SAMPLE_push, /* player pushes balloon/android */
523 SAMPLE_dirt, /* player walks on dirt */
524 SAMPLE_acid, /* acid splashes */
525 SAMPLE_ball, /* ball places something */
526 SAMPLE_grow, /* growing wall grows */
527 SAMPLE_wonder, /* wonderwall is active */
528 SAMPLE_door, /* player goes thru door (gate) */
529 SAMPLE_exit_open, /* exit opens */
530 SAMPLE_exit_leave, /* player goes into exit */
531 SAMPLE_dynamite, /* player places dynamite */
532 SAMPLE_tick, /* dynamite ticks */
533 SAMPLE_press, /* player presses wheel/wind/switch */
534 SAMPLE_wheel, /* wheel moves */
535 SAMPLE_boom, /* explosion */
536 SAMPLE_time, /* time runs out */
537 SAMPLE_die, /* player dies */
543 // ----------------------------------------------------------------------------
544 // data structure definitions
545 // ----------------------------------------------------------------------------
549 int home_initial; /* number of players (initial) */
550 int home; /* number of players not yet at home */
551 /* 0 == all players at home */
553 int width; /* playfield width */
554 int height; /* playfield height */
556 int time_seconds; /* available time (seconds) */
557 int time_initial; /* available time (initial) */
558 int time; /* time remaining (runtime) */
560 boolean killed_out_of_time; /* kill player due to time out */
562 int required_initial; /* emeralds needed (initial) */
563 int required; /* emeralds needed (runtime) */
565 int score; /* score */
567 /* all below entries must be filled every time a level is read */
569 int alien_score; /* score for killing alien */
570 int amoeba_time; /* amoeba speed */
571 int android_move_cnt_initial; /* android move counter (initial) */
572 int android_move_cnt; /* android move counter */
573 int android_move_time; /* android move reset time */
574 int android_clone_cnt_initial;/* android clone counter (initial) */
575 int android_clone_cnt; /* android clone counter */
576 int android_clone_time; /* android clone reset time */
577 int ball_cnt; /* ball counter */
578 int ball_pos; /* ball array pos counter */
579 int ball_random; /* ball is random flag */
580 int ball_state_initial; /* ball active flag (initial) */
581 int ball_state; /* ball active flag */
582 int ball_time; /* ball reset time */
583 int bug_score; /* score for killing bug */
584 int diamond_score; /* score for collecting diamond */
585 int dynamite_score; /* score for collecting dynamite */
586 int eater_pos; /* eater array pos */
587 int eater_score; /* score for killing eater */
588 int emerald_score; /* score for collecting emerald */
589 int exit_score; /* score for entering exit */
590 int key_score; /* score for colleting key */
591 int lenses_cnt_initial; /* lenses counter (initial) */
592 int lenses_cnt; /* lenses counter */
593 int lenses_score; /* score for collecting lenses */
594 int lenses_time; /* lenses reset time */
595 int magnify_cnt_initial; /* magnify counter (initial) */
596 int magnify_cnt; /* magnify counter */
597 int magnify_score; /* score for collecting magnifier */
598 int magnify_time; /* magnify reset time */
599 int nut_score; /* score for cracking nut */
600 int shine_cnt; /* shine counter for emerald/diamond */
601 int slurp_score; /* score for slurping alien */
602 int tank_score; /* score for killing tank */
603 int wheel_cnt_initial; /* wheel counter (initial) */
604 int wheel_cnt; /* wheel counter */
605 int wheel_x_initial; /* wheel x pos (initial) */
606 int wheel_x; /* wheel x pos */
607 int wheel_y_initial; /* wheel y pos (initial) */
608 int wheel_y; /* wheel y pos */
609 int wheel_time; /* wheel reset time */
610 int wind_cnt_initial; /* wind counter (initial) */
611 int wind_cnt; /* wind time counter */
612 int wind_direction_initial; /* wind direction (initial) */
613 int wind_direction; /* wind direction */
614 int wind_time; /* wind reset time */
615 int wonderwall_state_initial; /* wonderwall active flag (initial) */
616 int wonderwall_state; /* wonderwall active flag */
617 int wonderwall_time_initial; /* wonderwall time (initial) */
618 int wonderwall_time; /* wonderwall time */
619 short eater_array[8][9]; /* eater data */
620 short ball_array[8][8]; /* ball data */
621 short android_array[TILE_MAX];/* android clone table */
622 int num_ball_arrays; /* number of ball data arrays used */
624 int exit_x, exit_y; /* kludge for playing player exit sound */