Skip to content

Commit 9b0cd5d

Browse files
committed
Remove DPrintf
1 parent b0538c6 commit 9b0cd5d

31 files changed

+146
-157
lines changed

client/sdl/i_system.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ std::string I_GetClipboardText()
686686
if (!bytes_left)
687687
{
688688
XDestroyWindow(dis, WindowEvents);
689-
DPrintf("I_GetClipboardText: Len was: %lu", len);
689+
DPrintFmt("I_GetClipboardText: Len was: {}", len);
690690
XUnlockDisplay(dis);
691691
XCloseDisplay(dis);
692692
return "";

client/sdl/i_video.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -879,12 +879,12 @@ void I_SetVideoMode(const IVideoMode& requested_mode)
879879
assert(I_VideoInitialized());
880880

881881
if (window->getVideoMode() != requested_mode)
882-
DPrintf("I_SetVideoMode: could not set video mode to %s. Using %s instead.\n",
883-
I_GetVideoModeString(requested_mode).c_str(),
884-
I_GetVideoModeString(window->getVideoMode()).c_str());
882+
DPrintFmt("I_SetVideoMode: could not set video mode to {}. Using {} instead.\n",
883+
I_GetVideoModeString(requested_mode),
884+
I_GetVideoModeString(window->getVideoMode()));
885885
else
886-
DPrintf("I_SetVideoMode: set video mode to %s\n",
887-
I_GetVideoModeString(window->getVideoMode()).c_str());
886+
DPrintFmt("I_SetVideoMode: set video mode to {}\n",
887+
I_GetVideoModeString(window->getVideoMode()));
888888

889889
const argb_t* palette = V_GetGamePalette()->colors;
890890
if (matted_surface)

client/sdl/i_video_sdl12.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,11 @@ void ISDL12Window::getEvents()
451451
{
452452
// Debugging messages
453453
if (sdl_ev.active.state & SDL_APPMOUSEFOCUS)
454-
DPrintf("SDL_ACTIVEEVENT SDL_APPMOUSEFOCUS %s\n", sdl_ev.active.gain ? "gained" : "lost");
454+
DPrintFmt("SDL_ACTIVEEVENT SDL_APPMOUSEFOCUS {}\n", sdl_ev.active.gain ? "gained" : "lost");
455455
if (sdl_ev.active.state & SDL_APPINPUTFOCUS)
456-
DPrintf("SDL_ACTIVEEVENT SDL_APPINPUTFOCUS %s\n", sdl_ev.active.gain ? "gained" : "lost");
456+
DPrintFmt("SDL_ACTIVEEVENT SDL_APPINPUTFOCUS {}\n", sdl_ev.active.gain ? "gained" : "lost");
457457
if (sdl_ev.active.state & SDL_APPACTIVE)
458-
DPrintf("SDL_ACTIVEEVENT SDL_APPACTIVE %s\n", sdl_ev.active.gain ? "gained" : "lost");
458+
DPrintFmt("SDL_ACTIVEEVENT SDL_APPACTIVE {}\n", sdl_ev.active.gain ? "gained" : "lost");
459459

460460
// TODO: do we need to do anything here anymore?
461461
}

client/sdl/i_video_sdl20.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -552,57 +552,57 @@ void ISDL20Window::getEvents()
552552
{
553553
if (sdl_ev.window.event == SDL_WINDOWEVENT_SHOWN)
554554
{
555-
DPrintf("SDL_WINDOWEVENT_SHOWN\n");
555+
DPrintFmt("SDL_WINDOWEVENT_SHOWN\n");
556556
}
557557
else if (sdl_ev.window.event == SDL_WINDOWEVENT_HIDDEN)
558558
{
559-
DPrintf("SDL_WINDOWEVENT_HIDDEN\n");
559+
DPrintFmt("SDL_WINDOWEVENT_HIDDEN\n");
560560
mMouseFocus = mKeyboardFocus = false;
561561
}
562562
else if (sdl_ev.window.event == SDL_WINDOWEVENT_EXPOSED)
563563
{
564-
DPrintf("SDL_WINDOWEVENT_EXPOSED\n");
564+
DPrintFmt("SDL_WINDOWEVENT_EXPOSED\n");
565565
mMouseFocus = mKeyboardFocus = true;
566566
}
567567
else if (sdl_ev.window.event == SDL_WINDOWEVENT_MINIMIZED)
568568
{
569-
DPrintf("SDL_WINDOWEVENT_MINIMIZED\n");
569+
DPrintFmt("SDL_WINDOWEVENT_MINIMIZED\n");
570570
mMouseFocus = mKeyboardFocus = false;
571571
}
572572
else if (sdl_ev.window.event == SDL_WINDOWEVENT_MAXIMIZED)
573573
{
574-
DPrintf("SDL_WINDOWEVENT_MAXIMIZED\n");
574+
DPrintFmt("SDL_WINDOWEVENT_MAXIMIZED\n");
575575
}
576576
else if (sdl_ev.window.event == SDL_WINDOWEVENT_RESTORED)
577577
{
578-
DPrintf("SDL_WINDOWEVENT_RESTORED\n");
578+
DPrintFmt("SDL_WINDOWEVENT_RESTORED\n");
579579
}
580580
else if (sdl_ev.window.event == SDL_WINDOWEVENT_ENTER)
581581
{
582-
DPrintf("SDL_WINDOWEVENT_ENTER\n");
582+
DPrintFmt("SDL_WINDOWEVENT_ENTER\n");
583583
mMouseFocus = true;
584584
}
585585
else if (sdl_ev.window.event == SDL_WINDOWEVENT_LEAVE)
586586
{
587-
DPrintf("SDL_WINDOWEVENT_LEAVE\n");
587+
DPrintFmt("SDL_WINDOWEVENT_LEAVE\n");
588588
mMouseFocus = false;
589589
}
590590
else if (sdl_ev.window.event == SDL_WINDOWEVENT_FOCUS_GAINED)
591591
{
592-
DPrintf("SDL_WINDOWEVENT_FOCUS_GAINED\n");
592+
DPrintFmt("SDL_WINDOWEVENT_FOCUS_GAINED\n");
593593
mKeyboardFocus = true;
594594
}
595595
else if (sdl_ev.window.event == SDL_WINDOWEVENT_FOCUS_LOST)
596596
{
597-
DPrintf("SDL_WINDOWEVENT_FOCUS_LOST\n");
597+
DPrintFmt("SDL_WINDOWEVENT_FOCUS_LOST\n");
598598
mKeyboardFocus = false;
599599
}
600600
else if (sdl_ev.window.event == SDL_WINDOWEVENT_RESIZED)
601601
{
602602
// Resizable window mode resolutions
603603
uint16_t width = sdl_ev.window.data1;
604604
uint16_t height = sdl_ev.window.data2;
605-
DPrintf("SDL_WINDOWEVENT_RESIZED (%dx%d)\n", width, height);
605+
DPrintFmt("SDL_WINDOWEVENT_RESIZED ({}x{})\n", width, height);
606606

607607
int current_time = I_MSTime();
608608
if ((EWindowMode)vid_fullscreen.asInt() == WINDOW_Windowed && current_time > mAcceptResizeEventsTime)

client/src/cl_game.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ void G_Ticker (void)
11501150
consoleplayer().mo = consoleplayer().camera = mobj->ptr();
11511151
consoleplayer().mo->player = &consoleplayer();
11521152
G_PlayerReborn(consoleplayer());
1153-
DPrintf("Did not receive spawn for consoleplayer.\n");
1153+
DPrintFmt("Did not receive spawn for consoleplayer.\n");
11541154
}
11551155

11561156
CL_SimulateWorld();

client/src/cl_maplist.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ void MaplistCache::ev_tic() {
193193
break;
194194
case MAPLIST_TIMEOUT:
195195
this->error = "Maplist update timed out.";
196-
DPrintf("MaplistCache::ev_tic: Maplist Cache Update Timeout.\n");
197-
DPrintf("- Successfully Cached Maps: %lu\n", this->maplist.size());
198-
DPrintf("- Destination Maplist Size: %lu\n", this->size);
199-
DPrintf("- Valid Indexes: %d\n", this->valid_indexes);
196+
DPrintFmt("MaplistCache::ev_tic: Maplist Cache Update Timeout.\n");
197+
DPrintFmt("- Successfully Cached Maps: {}\n", this->maplist.size());
198+
DPrintFmt("- Destination Maplist Size: {}\n", this->size);
199+
DPrintFmt("- Valid Indexes: {}\n", this->valid_indexes);
200200
break;
201201
case MAPLIST_THROTTLED:
202202
this->error = "Server refused to send the maplist.";
@@ -288,7 +288,7 @@ void MaplistCache::status_handler(maplist_status_t status) {
288288
this->status = status;
289289
break;
290290
default:
291-
DPrintf("MaplistCache::status_handler: Unknown status %d from server.\n", status);
291+
DPrintFmt("MaplistCache::status_handler: Unknown status {} from server.\n", status);
292292
return;
293293
}
294294
}
@@ -306,7 +306,7 @@ bool MaplistCache::update_status_handler(maplist_status_t status) {
306306
case MAPLIST_OUTDATED:
307307
return true;
308308
default:
309-
DPrintf("MaplistCache::status_handler: Unknown status %d from server.\n", status);
309+
DPrintFmt("MaplistCache::status_handler: Unknown status {} from server.\n", status);
310310
return true;
311311
}
312312
}

client/src/cl_parse.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ static void CL_FireWeapon(const odaproto::svc::FireWeapon* msg)
13221322

13231323
if (firedweap != p->readyweapon)
13241324
{
1325-
DPrintf("CL_FireWeapon: weapon misprediction\n");
1325+
DPrintFmt("CL_FireWeapon: weapon misprediction\n");
13261326
A_ForceWeaponFire(p->mo, firedweap, servertic);
13271327

13281328
// Request the player's ammo status from the server

client/src/cl_vote.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ BEGIN_COMMAND(callvote) {
221221
&CMD_RandmapVoteErrback);
222222
return;
223223
default:
224-
DPrintf("callvote: Unknown uncaught votecmd %d.\n", votecmd);
224+
DPrintFmt("callvote: Unknown uncaught votecmd {}.\n", votecmd);
225225
return;
226226
}
227227

client/src/r_bsp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void R_ReallocDrawSegs(void)
9696
drawsegs = (drawseg_t*)Realloc(drawsegs, newmax*sizeof(*drawsegs));
9797
ds_p = drawsegs + pos; // jff 8/9/98 fix from ZDOOM1.14a
9898
maxdrawsegs = newmax;
99-
DPrintf("MaxDrawSegs increased to %d\n", maxdrawsegs);
99+
DPrintFmt("MaxDrawSegs increased to {}\n", maxdrawsegs);
100100
}
101101
}
102102

client/src/s_sound.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ static void S_StartSound(fixed_t* pt, fixed_t x, fixed_t y, int channel,
595595
// check for bogus sound #
596596
if (sfx_id < 1 || sfx_id > static_cast<int>(S_sfx.size()) - 1)
597597
{
598-
DPrintf("Bad sfx #: %d\n", sfx_id);
598+
DPrintFmt("Bad sfx #: {}\n", sfx_id);
599599
return;
600600
}
601601

@@ -620,7 +620,7 @@ static void S_StartSound(fixed_t* pt, fixed_t x, fixed_t y, int channel,
620620
// check for bogus sound lump
621621
if (sfxinfo->lumpnum < 0 || sfxinfo->lumpnum > static_cast<int>(numlumps))
622622
{
623-
DPrintf("Bad sfx lump #: %d\n", sfxinfo->lumpnum);
623+
DPrintFmt("Bad sfx lump #: {}\n", sfxinfo->lumpnum);
624624
return;
625625
}
626626

@@ -798,7 +798,7 @@ static void S_StartNamedSound(AActor *ent, fixed_t *pt, fixed_t x, fixed_t y, in
798798

799799
if (sfx_id == -1)
800800
{
801-
DPrintf("Unknown sound %s\n", soundname);
801+
DPrintFmt("Unknown sound {}\n", soundname);
802802
return;
803803
}
804804

@@ -864,7 +864,7 @@ static void S_StopChannel(unsigned int cnum)
864864

865865
if (cnum >= numChannels)
866866
{
867-
DPrintf("Trying to stop invalid channel %d\n", cnum);
867+
DPrintFmt("Trying to stop invalid channel {}\n", cnum);
868868
return;
869869
}
870870

client/src/v_draw.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ void DCanvas::DrawSWrapper(EWrapperCode drawer, const patch_t* patch, int x0, in
666666
#ifdef RANGECHECK
667667
if (x0 < 0 || x0 + destwidth > surface_width || y0 < 0 || y0 + destheight > surface_height)
668668
{
669-
DPrintf("DCanvas::DrawSWrapper: bad patch (ignored)\n");
669+
DPrintFmt("DCanvas::DrawSWrapper: bad patch (ignored)\n");
670670
return;
671671
}
672672
#endif

common/cmdlib.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ int ParseHex(const char* hex)
166166
else if (*str >= 'A' && *str <= 'F')
167167
num += 10 + *str-'A';
168168
else {
169-
DPrintf("Bad hex number: %s\n",hex);
169+
DPrintFmt("Bad hex number: {}\n",hex);
170170
return 0;
171171
}
172172
str++;

0 commit comments

Comments
 (0)