#include "screens.h"
-// select level set with EMC X11 graphics before activating EM GFX debugging
-#define DEBUG_EM_GFX FALSE
#define DEBUG_FRAME_TIME FALSE
// tool button identifiers
},
{
- Xacid_splash_e, FALSE, FALSE,
+ Xsplash_e, FALSE, FALSE,
EL_ACID_SPLASH_RIGHT, -1, -1
},
{
- Xacid_splash_w, FALSE, FALSE,
+ Xsplash_w, FALSE, FALSE,
EL_ACID_SPLASH_LEFT, -1, -1
},
EL_MAGIC_WALL, -1, -1
},
{
- XwonderwallB, FALSE, FALSE,
+ Ywonderwall, FALSE, FALSE,
EL_MAGIC_WALL, ACTION_ACTIVE, -1
},
EL_ROBOT_WHEEL, -1, -1
},
{
- XwheelB, FALSE, FALSE,
+ Ywheel, FALSE, FALSE,
EL_ROBOT_WHEEL, ACTION_ACTIVE, -1
},
EL_EMC_MAGIC_BALL_SWITCH, -1, -1
},
{
- XswitchB, FALSE, FALSE,
+ Yswitch, FALSE, FALSE,
EL_EMC_MAGIC_BALL_SWITCH, ACTION_ACTIVE, -1
},
EL_EMC_SPRING_BUMPER, -1, -1
},
{
- XbumperB, FALSE, FALSE,
+ Ybumper, FALSE, FALSE,
EL_EMC_SPRING_BUMPER, ACTION_ACTIVE, -1
},
EL_INVISIBLE_WALL, -1, -1
},
{
- Xfake_blankB, FALSE, FALSE,
+ Yfake_blank, FALSE, FALSE,
EL_INVISIBLE_WALL, ACTION_ACTIVE, -1
},
EL_EMC_FAKE_GRASS, -1, -1
},
{
- Xfake_grassB, FALSE, FALSE,
+ Yfake_grass, FALSE, FALSE,
EL_EMC_FAKE_GRASS, ACTION_ACTIVE, -1
},
EL_EMC_DRIPPER, -1, -1
},
{
- Xfake_amoebaB, FALSE, FALSE,
+ Yfake_amoeba, FALSE, FALSE,
EL_EMC_DRIPPER, ACTION_ACTIVE, -1
},
},
{
- Xslidewall_ns, TRUE, FALSE,
+ Xslide_ns, TRUE, FALSE,
EL_EXPANDABLE_WALL_VERTICAL, -1, -1
},
{
- Yslidewall_ns_blank, FALSE, FALSE,
+ Yslide_ns_blank, FALSE, FALSE,
EL_EXPANDABLE_WALL_VERTICAL, ACTION_GROWING, -1
},
{
- Xslidewall_ew, TRUE, FALSE,
+ Xslide_ew, TRUE, FALSE,
EL_EXPANDABLE_WALL_HORIZONTAL, -1, -1
},
{
- Yslidewall_ew_blank, FALSE, FALSE,
+ Yslide_ew_blank, FALSE, FALSE,
EL_EXPANDABLE_WALL_HORIZONTAL, ACTION_GROWING, -1
},
EL_EM_EXIT_OPEN, -1, -1
},
+ {
+ Xpause, FALSE, FALSE,
+ EL_EMPTY, -1, -1
+ },
+
{
Xwall_1, TRUE, FALSE,
EL_WALL, -1, -1
return game.team_mode || network_playing;
}
-int getGameFrameDelay_EM(int native_em_game_frame_delay)
-{
- int game_frame_delay_value;
-
- game_frame_delay_value =
- (tape.playing && tape.fast_forward ? FfwdFrameDelay :
- GameFrameDelay == GAME_FRAME_DELAY ? native_em_game_frame_delay :
- GameFrameDelay);
-
- if (tape.playing && tape.warp_forward && !tape.pausing)
- game_frame_delay_value = 0;
-
- return game_frame_delay_value;
-}
-
unsigned int InitRND(int seed)
{
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
{
switch (tile)
{
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
return (frame_em > 5 ? EL_EMPTY : element);
default:
{
switch (tile)
{
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
return EL_EMPTY;
case Ynut_stone:
case Ytank_s_e:
case Ytank_w_s:
case Ytank_n_w:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
case Ynut_stone:
return TRUE;
}
{
int i, j, p;
-#if DEBUG_EM_GFX
- int num_em_gfx_errors = 0;
-
- if (graphic_info_em_object[0][0].bitmap == NULL)
- {
- // EM graphics not yet initialized in em_open_all()
-
- return;
- }
-
- printf("::: [4 errors can be ignored (1 x 'bomb', 3 x 'em_dynamite']\n");
-#endif
-
// always start with reliable default values
for (i = 0; i < TILE_MAX; i++)
{
special_animation && j == 4 ? 3 :
effective_action != action ? 0 :
j);
-
-#if DEBUG_EM_GFX
- Bitmap *debug_bitmap = g_em->bitmap;
- int debug_src_x = g_em->src_x;
- int debug_src_y = g_em->src_y;
-#endif
-
int frame = getAnimationFrame(g->anim_frames,
g->anim_delay,
g->anim_mode,
bit 5 - 0 ( 6 bit): graphic height */
g_em->unique_identifier =
(graphic << 16) | (frame << 12) | (g_em->width << 6) | g_em->height;
-
-#if DEBUG_EM_GFX
-
- // skip check for EMC elements not contained in original EMC artwork
- if (element == EL_EMC_FAKE_ACID)
- continue;
-
- if (g_em->bitmap != debug_bitmap ||
- g_em->src_x != debug_src_x ||
- g_em->src_y != debug_src_y ||
- g_em->src_offset_x != 0 ||
- g_em->src_offset_y != 0 ||
- g_em->dst_offset_x != 0 ||
- g_em->dst_offset_y != 0 ||
- g_em->width != TILEX ||
- g_em->height != TILEY)
- {
- static int last_i = -1;
-
- if (i != last_i)
- {
- printf("\n");
- last_i = i;
- }
-
- printf("::: EMC GFX ERROR for element %d -> %d ('%s', '%s', %d)",
- i, element, element_info[element].token_name,
- element_action_info[effective_action].suffix, direction);
-
- if (element != effective_element)
- printf(" [%d ('%s')]",
- effective_element,
- element_info[effective_element].token_name);
-
- printf("\n");
-
- if (g_em->bitmap != debug_bitmap)
- printf(" %d (%d): different bitmap! (0x%08x != 0x%08x)\n",
- j, is_backside, (int)(g_em->bitmap), (int)(debug_bitmap));
-
- if (g_em->src_x != debug_src_x ||
- g_em->src_y != debug_src_y)
- printf(" frame %d (%c): %d,%d (%d,%d) should be %d,%d (%d,%d)\n",
- j, (is_backside ? 'B' : 'F'),
- g_em->src_x, g_em->src_y,
- g_em->src_x / 32, g_em->src_y / 32,
- debug_src_x, debug_src_y,
- debug_src_x / 32, debug_src_y / 32);
-
- if (g_em->src_offset_x != 0 ||
- g_em->src_offset_y != 0 ||
- g_em->dst_offset_x != 0 ||
- g_em->dst_offset_y != 0)
- printf(" %d (%d): offsets %d,%d and %d,%d should be all 0\n",
- j, is_backside,
- g_em->src_offset_x, g_em->src_offset_y,
- g_em->dst_offset_x, g_em->dst_offset_y);
-
- if (g_em->width != TILEX ||
- g_em->height != TILEY)
- printf(" %d (%d): size %d,%d should be %d,%d\n",
- j, is_backside,
- g_em->width, g_em->height, TILEX, TILEY);
-
- num_em_gfx_errors++;
- }
-#endif
-
}
}
Bitmap *src_bitmap;
int src_x, src_y;
int sync_frame = j;
-
-#if DEBUG_EM_GFX
- Bitmap *debug_bitmap = g_em->bitmap;
- int debug_src_x = g_em->src_x;
- int debug_src_y = g_em->src_y;
-#endif
-
int frame = getAnimationFrame(g->anim_frames,
g->anim_delay,
g->anim_mode,
g_em->dst_offset_y = 0;
g_em->width = TILEX;
g_em->height = TILEY;
-
-#if DEBUG_EM_GFX
-
- // skip check for EMC elements not contained in original EMC artwork
- if (element == EL_PLAYER_3 ||
- element == EL_PLAYER_4)
- continue;
-
- if (g_em->bitmap != debug_bitmap ||
- g_em->src_x != debug_src_x ||
- g_em->src_y != debug_src_y)
- {
- static int last_i = -1;
-
- if (i != last_i)
- {
- printf("\n");
- last_i = i;
- }
-
- printf("::: EMC GFX ERROR for p/a %d/%d -> %d ('%s', '%s', %d)",
- p, i, element, element_info[element].token_name,
- element_action_info[effective_action].suffix, direction);
-
- if (element != effective_element)
- printf(" [%d ('%s')]",
- effective_element,
- element_info[effective_element].token_name);
-
- printf("\n");
-
- if (g_em->bitmap != debug_bitmap)
- printf(" %d: different bitmap! (0x%08x != 0x%08x)\n",
- j, (int)(g_em->bitmap), (int)(debug_bitmap));
-
- if (g_em->src_x != debug_src_x ||
- g_em->src_y != debug_src_y)
- printf(" frame %d: %d,%d (%d,%d) should be %d,%d (%d,%d)\n",
- j,
- g_em->src_x, g_em->src_y,
- g_em->src_x / 32, g_em->src_y / 32,
- debug_src_x, debug_src_y,
- debug_src_x / 32, debug_src_y / 32);
-
- num_em_gfx_errors++;
- }
-#endif
-
}
}
}
-
-#if DEBUG_EM_GFX
- printf("\n");
- printf("::: [%d errors found]\n", num_em_gfx_errors);
-
- exit(0);
-#endif
}
static void CheckSaveEngineSnapshot_EM(byte action[MAX_PLAYERS], int frame,