int sy = SCREENY(y);
char *token_name;
- printf_line("-", 79);
- printf("Field Info: SCREEN(%d, %d), LEVEL(%d, %d)\n", sx, sy, x, y);
- printf_line("-", 79);
+ Info("---");
+ Info("Field Info: SCREEN(%d, %d), LEVEL(%d, %d)", sx, sy, x, y);
+ Info("---");
if (!IN_LEV_FIELD(x, y))
{
- printf("(not in level field)\n");
- printf("\n");
+ Info("(not in level field)");
+ Info("");
return;
}
token_name = element_info[Tile[x][y]].token_name;
- printf(" Tile: %d\t['%s']\n", Tile[x][y], token_name);
- printf(" Back: %s\n", print_if_not_empty(Back[x][y]));
- printf(" Store: %s\n", print_if_not_empty(Store[x][y]));
- printf(" Store2: %s\n", print_if_not_empty(Store2[x][y]));
- printf(" StorePlayer: %s\n", print_if_not_empty(StorePlayer[x][y]));
- printf(" MovPos: %d\n", MovPos[x][y]);
- printf(" MovDir: %d\n", MovDir[x][y]);
- printf(" MovDelay: %d\n", MovDelay[x][y]);
- printf(" ChangeDelay: %d\n", ChangeDelay[x][y]);
- printf(" CustomValue: %d\n", CustomValue[x][y]);
- printf(" GfxElement: %d\n", GfxElement[x][y]);
- printf(" GfxAction: %d\n", GfxAction[x][y]);
- printf(" GfxFrame: %d [%d]\n", GfxFrame[x][y], FrameCounter);
- printf(" Player x/y: %d, %d\n", local_player->jx, local_player->jy);
- printf("\n");
+ Info("Tile: %d\t['%s']", Tile[x][y], token_name);
+ Info("Back: %s", print_if_not_empty(Back[x][y]));
+ Info("Store: %s", print_if_not_empty(Store[x][y]));
+ Info("Store2: %s", print_if_not_empty(Store2[x][y]));
+ Info("StorePlayer: %s", print_if_not_empty(StorePlayer[x][y]));
+ Info("MovPos: %d", MovPos[x][y]);
+ Info("MovDir: %d", MovDir[x][y]);
+ Info("MovDelay: %d", MovDelay[x][y]);
+ Info("ChangeDelay: %d", ChangeDelay[x][y]);
+ Info("CustomValue: %d", CustomValue[x][y]);
+ Info("GfxElement: %d", GfxElement[x][y]);
+ Info("GfxAction: %d", GfxAction[x][y]);
+ Info("GfxFrame: %d [%d]", GfxFrame[x][y], FrameCounter);
+ Info("Player x/y: %d, %d", local_player->jx, local_player->jy);
+ Info("");
}
void DumpTileFromScreen(int sx, int sy)
safety++;
if (safety > max_fieldx * max_fieldy)
- Error(ERR_EXIT, "Something went wrong in 'FloodFill()'. Please debug.");
+ Fail("Something went wrong in 'FloodFill()'. Please debug.");
old_element = field[from_x][from_y];
field[from_x][from_y] = fill_element;
#if DEBUG
if (!IN_SCR_FIELD(x, y))
{
- printf("DrawGraphic(): x = %d, y = %d, graphic = %d\n", x, y, graphic);
- printf("DrawGraphic(): This should never happen!\n");
+ Debug("draw:DrawGraphic", "x = %d, y = %d, graphic = %d", x, y, graphic);
+ Debug("draw:DrawGraphic", "This should never happen!");
+
return;
}
#endif
#if DEBUG
if (!IN_SCR_FIELD(x, y))
{
- printf("DrawGraphic(): x = %d, y = %d, graphic = %d\n", x, y, graphic);
- printf("DrawGraphic(): This should never happen!\n");
+ Debug("draw:DrawFixedGraphic", "x = %d, y = %d, graphic = %d",
+ x, y, graphic);
+ Debug("draw:DrawFixedGraphic", "This should never happen!");
+
return;
}
#endif
#if DEBUG
if (!IN_SCR_FIELD(x, y))
{
- printf("DrawGraphicThruMask(): x = %d,y = %d, graphic = %d\n",x,y,graphic);
- printf("DrawGraphicThruMask(): This should never happen!\n");
+ Debug("draw:DrawGraphicThruMask", "x = %d,y = %d, graphic = %d",
+ x, y, graphic);
+ Debug("draw:DrawGraphicThruMask", "This should never happen!");
+
return;
}
#endif
#if DEBUG
if (!IN_SCR_FIELD(x, y))
{
- printf("DrawGraphicThruMask(): x = %d,y = %d, graphic = %d\n",x,y,graphic);
- printf("DrawGraphicThruMask(): This should never happen!\n");
+ Debug("draw:DrawFixedGraphicThruMask", "x = %d,y = %d, graphic = %d",
+ x, y, graphic);
+ Debug("draw:DrawFixedGraphicThruMask", "This should never happen!");
+
return;
}
#endif
#if DEBUG
if (!IN_SCR_FIELD(x, y))
{
- printf("DrawGraphicShifted(): x = %d, y = %d, graphic = %d\n",x,y,graphic);
- printf("DrawGraphicShifted(): This should never happen!\n");
+ Debug("draw:DrawGraphicShiftedNormal", "x = %d, y = %d, graphic = %d",
+ x, y, graphic);
+ Debug("draw:DrawGraphicShiftedNormal", "This should never happen!");
+
return;
}
#endif
#if DEBUG
if (!IN_LEV_FIELD(player->jx, player->jy))
{
- printf("DrawPlayerField(): x = %d, y = %d\n", player->jx, player->jy);
- printf("DrawPlayerField(): This should never happen!\n");
+ Debug("draw:DrawPlayerExt", "x = %d, y = %d", player->jx, player->jy);
+ Debug("draw:DrawPlayerExt", "This should never happen!");
draw_player[pnr] = FALSE;
if (width > door_rect->width)
width = door_rect->width;
- // printf("::: k == %d [%d] \n", k, start_step);
+ // Debug("tools:MoveDoor", "k == %d [%d]", k, start_step);
}
if (pos->step_yoffset < 0) // door part on bottom side
GDI_END);
if (gi == NULL)
- Error(ERR_EXIT, "cannot create gadget");
+ Fail("cannot create gadget");
tool_gadget[id] = gi;
}
}
}
-void CheckSingleStepMode_EM(byte action[MAX_PLAYERS], int frame,
- boolean any_player_moving,
- boolean any_player_snapping,
- boolean any_player_dropping)
+boolean CheckSingleStepMode_EM(byte action[MAX_PLAYERS], int frame,
+ boolean any_player_moving,
+ boolean any_player_snapping,
+ boolean any_player_dropping)
{
if (tape.single_step && tape.recording && !tape.pausing)
if (frame == 7 && !any_player_dropping)
CheckSaveEngineSnapshot_EM(action, frame, any_player_moving,
any_player_snapping, any_player_dropping);
+
+ return tape.pausing;
}
void CheckSingleStepMode_SP(boolean murphy_is_waiting,
init_gfx_buffers = TRUE;
init_gadgets_and_anims = TRUE;
- // printf("::: video: init_video_buffer, init_gfx_buffers\n");
+ // Debug("tools:viewport", "video: init_video_buffer, init_gfx_buffers");
}
if (new_scr_fieldx != SCR_FIELDX ||
SCR_FIELDX = new_scr_fieldx;
SCR_FIELDY = new_scr_fieldy;
- // printf("::: new_scr_fieldx != SCR_FIELDX ...\n");
+ // Debug("tools:viewport", "new_scr_fieldx != SCR_FIELDX ...");
}
if (new_sx != SX ||
if (new_tilesize_var != TILESIZE_VAR)
{
- // printf("::: new_tilesize_var != TILESIZE_VAR\n");
+ // Debug("tools:viewport", "new_tilesize_var != TILESIZE_VAR");
// changing tile size invalidates scroll values of engine snapshots
FreeEngineSnapshotSingle();
init_gfx_buffers = TRUE;
init_gadgets_and_anims = TRUE;
- // printf("::: viewports: init_gfx_buffers\n");
- // printf("::: viewports: init_gadgets_and_anims\n");
+ // Debug("tools:viewport", "viewports: init_gfx_buffers");
+ // Debug("tools:viewport", "viewports: init_gadgets_and_anims");
}
if (init_gfx_buffers)
{
- // printf("::: init_gfx_buffers\n");
+ // Debug("tools:viewport", "init_gfx_buffers");
SCR_FIELDX = new_scr_fieldx_buffers;
SCR_FIELDY = new_scr_fieldy_buffers;
if (init_video_buffer)
{
- // printf("::: init_video_buffer\n");
+ // Debug("tools:viewport", "init_video_buffer");
FreeAllImageTextures(); // needs old renderer to free the textures
if (init_gadgets_and_anims)
{
- // printf("::: init_gadgets_and_anims\n");
+ // Debug("tools:viewport", "init_gadgets_and_anims");
InitGadgets();
InitGlobalAnimations();