element = value;
graphic = el2panelimg(value);
- // printf("::: %d, '%s' [%d]\n", element, EL_NAME(element), size);
+#if 0
+ Debug("game:DisplayGameControlValues", "%d, '%s' [%d]",
+ element, EL_NAME(element), size);
+#endif
if (element >= EL_GRAPHIC_1 && element <= EL_GRAPHIC_8 && size == 0)
size = TILESIZE;
byte mapped_action[MAX_PLAYERS];
#if DEBUG_PLAYER_ACTIONS
- printf(":::");
+ Print(":::");
for (i = 0; i < MAX_PLAYERS; i++)
- printf(" %d, ", stored_player[i].effective_action);
+ Print(" %d, ", stored_player[i].effective_action);
#endif
for (i = 0; i < MAX_PLAYERS; i++)
stored_player[i].effective_action = mapped_action[i];
#if DEBUG_PLAYER_ACTIONS
- printf(" =>");
+ Print(" =>");
for (i = 0; i < MAX_PLAYERS; i++)
- printf(" %d, ", stored_player[i].effective_action);
- printf("\n");
+ Print(" %d, ", stored_player[i].effective_action);
+ Print("\n");
#endif
}
#if DEBUG_PLAYER_ACTIONS
else
{
- printf(":::");
+ Print(":::");
for (i = 0; i < MAX_PLAYERS; i++)
- printf(" %d, ", stored_player[i].effective_action);
- printf("\n");
+ Print(" %d, ", stored_player[i].effective_action);
+ Print("\n");
}
#endif
#endif
}
#if DEBUG_REDRAW
- printf("::: FRAME %d: %d redrawn\n", FrameCounter, num_redrawn);
+ Debug("game:playing:SP", "FRAME %d: %d redrawn", FrameCounter, num_redrawn);
#endif
}
{
subGetRandomNumber();
- // printf("::: ExplosionShake [%d]\n", FrameCounter);
+ // Debug("game:playing:SP", "ExplosionShake [%d]", FrameCounter);
}
ScreenScrollXPos = MurphyScreenXPos - (SCR_FIELDX / 2) * TILESIZE;
// process all images which default to same image as "global.door"
if (strEqual(fi->default_filename, fi_global_door->default_filename))
{
- // printf("::: special treatment needed for token '%s'\n", fi->token);
+#if 0
+ Debug("init:InitGraphicCompatibilityInfo",
+ "special treatment needed for token '%s'", fi->token);
+#endif
graphic_info[i].bitmaps = graphic_info[IMG_GLOBAL_DOOR].bitmaps;
graphic_info[i].bitmap = graphic_info[IMG_GLOBAL_DOOR].bitmap;
if (gfx_new_identifier != NULL || force_reload_gfx)
{
#if 0
- printf("RELOADING GRAPHICS '%s' -> '%s' ['%s', '%s']\n",
- artwork.gfx_current_identifier,
- gfx_new_identifier,
- artwork.gfx_current->identifier,
- leveldir_current->graphics_set);
+ Debug("init:ReloadCustomArtwork",
+ "RELOADING GRAPHICS '%s' -> '%s' ['%s', '%s']",
+ artwork.gfx_current_identifier,
+ gfx_new_identifier,
+ artwork.gfx_current->identifier,
+ leveldir_current->graphics_set);
#endif
InitImages();
while (node)
{
- printf("['%s' (%d)]\n", node->key,
- ((struct ListNodeInfo *)node->content)->num_references);
+ Debug("internal:dumpList", "['%s' (%d)]", node->key,
+ ((struct ListNodeInfo *)node->content)->num_references);
node = node->next;
}
- printf("[%d nodes]\n", getNumNodes(node_first));
+ Debug("internal:dumpList", "[%d nodes]", getNumNodes(node_first));
}
#endif
counter[counter_nr][1] = counter[counter_nr][0];
if (message)
- Error(ERR_DEBUG, "%s%s%s %.3f %s",
- debug_print_timestamp_get_padding(counter_nr * indent_size),
- message,
- debug_print_timestamp_get_padding(padding_size - strlen(message)),
- timestamp_interval / 1000,
- unit);
+ Debug("time", "%s%s%s %.3f %s",
+ debug_print_timestamp_get_padding(counter_nr * indent_size),
+ message,
+ debug_print_timestamp_get_padding(padding_size - strlen(message)),
+ timestamp_interval / 1000,
+ unit);
}
#if 0
static int LastFrameCounter = 0;
boolean changed = (FrameCounter != LastFrameCounter);
- printf("::: FrameCounter == %d [%s]\n", FrameCounter,
- (changed ? "-" : "SAME FRAME UPDATED"));
+ Debug("internal:frame", "FrameCounter == %d [%s]", FrameCounter,
+ (changed ? "-" : "SAME FRAME UPDATED"));
LastFrameCounter = FrameCounter;
{
int i;
- printf("Dumping TreeInfo:\n");
+ Print("Dumping TreeInfo:\n");
while (node)
{
for (i = 0; i < (depth + 1) * 3; i++)
- printf(" ");
+ Print(" ");
- printf("'%s' / '%s'\n", node->identifier, node->name);
+ Print("'%s' / '%s'\n", node->identifier, node->name);
/*
// use for dumping artwork info tree
- printf("subdir == '%s' ['%s', '%s'] [%d])\n",
- node->subdir, node->fullpath, node->basepath, node->in_user_dir);
+ Print("subdir == '%s' ['%s', '%s'] [%d])\n",
+ node->subdir, node->fullpath, node->basepath, node->in_user_dir);
*/
if (node->node_group != NULL)
{
int i;
- printf("::: network buffer maximum size: %d\n", nb->max_size);
- printf("::: network buffer size: %d\n", nb->size);
- printf("::: network buffer position : %d\n", nb->pos);
+ Print("::: network buffer maximum size: %d\n", nb->max_size);
+ Print("::: network buffer size: %d\n", nb->size);
+ Print("::: network buffer position : %d\n", nb->pos);
for (i = 0; i < nb->size; i++)
{
if ((i % 16) == 0)
- printf("\n::: ");
+ Print("\n::: ");
- printf("%02x ", nb->buffer[i]);
+ Print("%02x ", nb->buffer[i]);
}
- printf("\n");
+ Print("\n");
}
static void SendNetworkBufferToAllButOne(struct NetworkBuffer *nb,
int sound_local = base + nr;
#if 0
- printf("::: %d, %d, %d: %d ['%s'], %d ['%s']\n",
- nr, initial, is_image,
- sound_global, getSoundListEntry(sound_global)->filename,
- sound_local, getSoundListEntry(sound_local)->filename);
+ Debug("screens:getTitleSound", "%d, %d, %d: %d ['%s'], %d ['%s']",
+ nr, initial, is_image,
+ sound_global, getSoundListEntry(sound_global)->filename,
+ sound_local, getSoundListEntry(sound_local)->filename);
#endif
if (!strEqual(getSoundListEntry(sound_local)->filename, UNDEFINED_FILENAME))
int music_local = base + nr;
#if 0
- printf("::: %d, %d, %d: %d ['%s'], %d ['%s']\n",
- nr, initial, is_image,
- music_global, getMusicListEntry(music_global)->filename,
- music_local, getMusicListEntry(music_local)->filename);
+ Debug("screens:getTitleMusic", "%d, %d, %d: %d ['%s'], %d ['%s']",
+ nr, initial, is_image,
+ music_global, getMusicListEntry(music_global)->filename,
+ music_local, getMusicListEntry(music_local)->filename);
#endif
if (!strEqual(getMusicListEntry(music_local)->filename, UNDEFINED_FILENAME))
int rect_y = ALIGNED_TEXT_YPOS(rect);
#if 0
- printf("::: insideTextPosRect: (%d, %d), (%d, %d) [%d, %d] (%d, %d) => %d\n",
- x, y, rect_x, rect_y, rect->x, rect->y, rect->width, rect->height,
- (x >= rect_x && x < rect_x + rect->width &&
- y >= rect_y && y < rect_y + rect->height));
+ Debug("screens:insideTextPosRect",
+ "(%d, %d), (%d, %d) [%d, %d] (%d, %d) => %d",
+ x, y, rect_x, rect_y, rect->x, rect->y, rect->width, rect->height,
+ (x >= rect_x && x < rect_x + rect->width &&
+ y >= rect_y && y < rect_y + rect->height));
#endif
return (x >= rect_x && x < rect_x + rect->width &&
static void execSetupArtwork(void)
{
#if 0
- printf("::: '%s', '%s', '%s'\n",
- artwork.gfx_current->subdir,
- artwork.gfx_current->fullpath,
- artwork.gfx_current->basepath);
+ Debug("screens:execSetupArtwork", "'%s', '%s', '%s'",
+ artwork.gfx_current->subdir,
+ artwork.gfx_current->fullpath,
+ artwork.gfx_current->basepath);
#endif
setup.graphics_set = artwork.gfx_current->identifier;
action[i] = tape.pos[tape.counter].action[i];
#if DEBUG_TAPE_WHEN_PLAYING
- printf("%05d", FrameCounter);
+ Print("%05d", FrameCounter);
for (i = 0; i < MAX_TAPE_ACTIONS; i++)
- printf(" %08x", action[i]);
- printf("\n");
+ Print(" %08x", action[i]);
+ Print("\n");
#endif
tape.set_centered_player = 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
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();