diff --git a/Source/cursor.cpp b/Source/cursor.cpp index 07b564775..798f5719b 100644 --- a/Source/cursor.cpp +++ b/Source/cursor.cpp @@ -75,7 +75,7 @@ const int InvItemHeight[] = { void InitCursor() { - /// ASSERT: assert(! pCursCels); + assert(! pCursCels); pCursCels = LoadFileInMem("Data\\Inv\\Objcurs.CEL", NULL); ClearCursor(); } diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 8a273b096..c68dea101 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -858,7 +858,7 @@ BOOL LeftMouseCmd(BOOL bShift) { BOOL bNear; - /// ASSERT: assert(MouseY < 352); // PANEL_TOP + assert(MouseY < PANEL_TOP); // 352 if (leveltype == DTYPE_TOWN) { if (pcursitem != -1 && pcurs == CURSOR_HAND) @@ -1023,7 +1023,7 @@ void diablo_hotkey_msg(DWORD dwMsg) } strcat(szFileName, "\\Diablo.ini"); - /// ASSERT: assert(dwMsg < sizeof(spszMsgTbl) / sizeof(spszMsgTbl[0])); + assert(dwMsg < sizeof(spszMsgTbl) / sizeof(spszMsgTbl[0])); GetPrivateProfileString("NetMsg", spszMsgHotKeyTbl[dwMsg], spszMsgTbl[dwMsg], szMsg, sizeof(szMsg), szFileName); NetSendCmdString(-1, szMsg); } @@ -1521,7 +1521,7 @@ void PressChar(int vkey) void LoadLvlGFX() { - /// ASSERT: assert(! pDungeonCels); + assert(! pDungeonCels); switch (leveltype) { case DTYPE_TOWN: @@ -1564,7 +1564,7 @@ void LoadLvlGFX() void LoadAllGFX() { - /// ASSERT: assert(! pSpeedCels); + assert(! pSpeedCels); pSpeedCels = DiabloAllocPtr(0x100000); IncProgress(); IncProgress(); @@ -1756,7 +1756,7 @@ void LoadGameLevel(BOOL firstflag, int lvldir) ResyncMPQuests(); #ifndef SPAWN } else { - /// ASSERT: assert(! pSpeedCels); + assert(! pSpeedCels); pSpeedCels = DiabloAllocPtr(0x100000); LoadSetMap(); IncProgress(); diff --git a/Source/dx.cpp b/Source/dx.cpp index 54efb059a..b6b114f11 100644 --- a/Source/dx.cpp +++ b/Source/dx.cpp @@ -99,9 +99,9 @@ void dx_init(HWND hWnd) BOOL bSuccess; GUID *lpGUID; - /// ASSERT: assert(! gpBuffer); - /// ASSERT: assert(! sgdwLockCount); - /// ASSERT: assert(! sgpBackBuf); + assert(! gpBuffer); + assert(! sgdwLockCount); + assert(! sgpBackBuf); SetFocus(hWnd); ShowWindow(hWnd, SW_SHOWNORMAL); @@ -157,7 +157,7 @@ void dx_init(HWND hWnd) GdiSetBatchLimit(1); dx_create_back_buffer(); bSuccess = SDrawManualInitialize(hWnd, lpDDInterface, lpDDSPrimary, NULL, NULL, lpDDSBackBuf, lpDDPalette, NULL); - /// ASSERT: assert(bSuccess); + assert(bSuccess); } static void lock_buf_priv() diff --git a/Source/effects.cpp b/Source/effects.cpp index 35df489b8..477f442f1 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -1082,8 +1082,8 @@ void stream_play(TSFX *pSFX, int lVolume, int lPan) { BOOL success; - /// ASSERT: assert(pSFX); - /// ASSERT: assert(pSFX->bFlags & sfx_STREAM); + assert(pSFX); + assert(pSFX->bFlags & sfx_STREAM); stream_stop(); lVolume += sound_get_or_set_sound_volume(1); if (lVolume >= VOLUME_MIN) { diff --git a/Source/engine.cpp b/Source/engine.cpp index 619cd9d38..6fe623b17 100644 --- a/Source/engine.cpp +++ b/Source/engine.cpp @@ -2751,7 +2751,7 @@ void Cl2Draw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -2942,12 +2942,12 @@ void Cl2DrawOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWid /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -3161,12 +3161,12 @@ void Cl2DrawLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int C /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -3377,12 +3377,12 @@ void Cl2DrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelS /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -3427,12 +3427,12 @@ void Cl2DrawSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSk /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -3636,12 +3636,12 @@ void Cl2DrawOutlineSafe(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -3868,12 +3868,12 @@ void Cl2DrawLightTblSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, i /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -4097,12 +4097,12 @@ void Cl2DrawLightSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) diff --git a/Source/error.cpp b/Source/error.cpp index 5d09863d6..3ac8bdbce 100644 --- a/Source/error.cpp +++ b/Source/error.cpp @@ -109,7 +109,7 @@ void DrawDiabloMsg() sy += 12; } - /// ASSERT: assert(gpBuffer); + assert(gpBuffer); #define TRANS_RECT_X (PANEL_LEFT + 104) #define TRANS_RECT_Y (DIALOG_TOP - 8) diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index fee71eb71..347d7292f 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -384,7 +384,7 @@ void gmenu_slider_set(TMenuItem *pItem, int min, int max, int value) { int nSteps; - /// ASSERT: assertassert(pItem, "gmenu.cpp", 445); + assert(pItem); nSteps = (int)(pItem->dwFlags & 0xFFF000) >> 12; if (nSteps < 2) nSteps = 2;