From e7848c8192e524612660b30ea09475e59f485e98 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 24 Feb 2019 17:29:37 +0100 Subject: [PATCH] Make debug less spammy --- Source/player.cpp | 7 +++++++ SourceX/sound.cpp | 4 ++-- SourceX/storm.cpp | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Source/player.cpp b/Source/player.cpp index a90d60c93..4fd990c80 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -328,8 +328,15 @@ DWORD __fastcall GetPlrGFXSize(char *szCel) for (c = 0; c < sizeof(ClassStrTbl) / sizeof(ClassStrTbl[0]); c++) { for (a = 0; ArmourChar[a]; a++) { for (w = 0; WepChar[w]; w++) { // BUGFIX loads non-existing animagions; DT is only for N, BT is only for U, D & H + if (szCel[0] == 'D' && szCel[1] == 'T' && WepChar[w] != 'N') { + continue; //Death has no weapon^M + } + if (szCel[0] == 'B' && szCel[1] == 'L' && (WepChar[w] != 'U' || WepChar[w] != 'D' || WepChar[w] != 'H')) { + continue; //No block with out weapon + } sprintf(prefix, "%c%c%c", CharChar[c], ArmourChar[a], WepChar[w]); sprintf(pszName, "PlrGFX\\%s\\%s\\%s%s.CL2", ClassStrTbl[c], prefix, prefix, szCel); + if (WOpenFile(pszName, &file, TRUE)) { size = WGetFileSize(file, 0); WCloseFile(file); diff --git a/SourceX/sound.cpp b/SourceX/sound.cpp index 6ccbaa3cb..2346a0c45 100644 --- a/SourceX/sound.cpp +++ b/SourceX/sound.cpp @@ -35,7 +35,7 @@ char unk_volume[4][2] = { void __fastcall snd_update(BOOL bStopAll) { - DUMMY_PRINT("snd_update: %d", bStopAll); + DUMMY_ONCE(); } void __fastcall snd_stop_snd(TSnd *pSnd) @@ -81,7 +81,7 @@ TSnd *__fastcall sound_file_load(char *path) void __fastcall sound_file_cleanup(TSnd *sound_file) { - DUMMY(); + DUMMY_ONCE(); } void __fastcall snd_init(HWND hWnd) diff --git a/SourceX/storm.cpp b/SourceX/storm.cpp index 133c8da09..123feeee1 100644 --- a/SourceX/storm.cpp +++ b/SourceX/storm.cpp @@ -60,7 +60,7 @@ BOOL STORMAPI SFileDdaEnd(HANDLE directsound) BOOL STORMAPI SFileDdaGetPos(HANDLE directsound, int a2, int a3) { - DUMMY(); + DUMMY_ONCE(); return 0; }