-
-#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
-