From 36db236079625715067371cd3bcaf7187e2f087c Mon Sep 17 00:00:00 2001 From: Wanne Date: Thu, 6 Jul 2006 05:47:28 +0000 Subject: [PATCH] - Enabled some useful Assert-Messages, so we get notifications about errors in DEBUG Mode. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@330 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Credits.cpp | 2 +- JA2.suo | Bin 70144 -> 70144 bytes JA2.vcproj | 2 +- Strategic/Queen Command.cpp | 4 ++-- Strategic/Strategic Movement.cpp | 6 +++--- Strategic/strategicmap.cpp | 2 +- Tactical/ArmsDealerInvInit.cpp | 2 +- Tactical/Campaign.cpp | 4 ++-- Tactical/Inventory Choosing.cpp | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Credits.cpp b/Credits.cpp index 9d31ec96..c5d854f3 100644 --- a/Credits.cpp +++ b/Credits.cpp @@ -793,7 +793,7 @@ BOOLEAN AddCreditNode( UINT32 uiType, UINT32 uiFlags, STR16 pString ) //if if( uiType == CRDT_NODE_NONE) { - //Assert( 0 ); + Assert( 0 ); return( TRUE ); } diff --git a/JA2.suo b/JA2.suo index 7260a739fd112d8c8d5be6e092ef6e092e0153fa..c65887cff54a2e2bf7ce0746cb46e5f1f1cd288b 100644 GIT binary patch delta 729 zcmZ8fPe@c@5TAMb?LU0`_w7GHsYFclVvB@Hg=BwVG2K8<1{!Nn>w{u@hm42~Ja(vt z`sgMh5mXR8&`xQsUXmcYD2B@hz)c2HB5H*%_yHyv0}|0tbWZhV0O&5I zEdXDL8eG!4IwBV%k@qs*&XN1k|&ke zvqh8!XJCf2r9nj~cP2LFi(otZ5r&NK&0bFy&6a)QAL&>{Q-V}eCT8iEHAZVzA33Rc zwCQ)MK*NzE6|!oZ52-I(NBIf;W<6Sd0`S&B!ov4AI@`TrO{Phum9* z%pCgN2Q@cfDsCEUnt+^-V^k}gc(}10vw91$OCOY@OW{$xEm^vQU2VshyrZz=aR7((g2L6MAg&sETVci%eN`A< z-V0+Ebz2mF=$#fE4au#@o@A5Dj*0h>KGeqP{;bm5el8ph;2RxB%30pucuG`!dJh1dL5RxQ!MdDbs7vP_6I T>Ke5tnLEwk6wey^(;oZ_N-f*~ delta 741 zcmZWnO=uHQ5T4m=cJuT0C&?z}U@EO4h$zJ1L266uAC@3Ah*CkpmDZwl!B7{p_EI5- z9D0a8>O(~6p?EGXR1Y4i>8W~X?@|>!i-#y^p>bZSrRc!-X5Kf$%)EIsv!Ko_sEeMe zePicyKb{4X>bh=#2>^QuZ4$n&=DE*m%4;q7#Y~Lm6@Vh4z!PRFdN~7dodEL22hAyU zKi&8Po=yRTBIKBWYfvKnRPvvnq)AQ70_TXYf)BUpB#L)i*}iE;=0zfJf(LgbouuOe zMUHmJQL;Qq%LHd&jN)X1Nl67`*42;!IkIJzo!(o?3UmGtJEWhg@Y7Ba9sWHv%#8os zP7SO4r&H#q=8tecU191!AwesBK*2Q6W%uQ6nnr?gswcueh(3or|vAb7)b+}WpwYtVEa@f0^LF?U(60dhVL3L{=BpMd>h*v5Wo-3#b zH;k8rYoof&Z-lXje`+2R_cW}FuNrEiuAwbvEi8zdiDe#HF?r*bs$bcju4sqxgm6t< zUea+{5ic}6DmHXvOEJu#uwyuGj39MGB6SxZSh@R{;ZP(_jC_aOlb1fjS>#34=8H`x zGI9KZVeux01H!e?= 1 && sSectorX <= 16 ); - //Assert( sSectorY >= 1 && sSectorY <= 16 ); + Assert( sSectorX >= 1 && sSectorX <= 16 ); + Assert( sSectorY >= 1 && sSectorY <= 16 ); pSector = &SectorInfo[ SECTOR( sSectorX, sSectorY ) ]; ubNumTroops = (UINT8)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites); diff --git a/Strategic/Strategic Movement.cpp b/Strategic/Strategic Movement.cpp index 6997f545..49065614 100644 --- a/Strategic/Strategic Movement.cpp +++ b/Strategic/Strategic Movement.cpp @@ -3253,14 +3253,14 @@ BOOLEAN PlayersBetweenTheseSectors( INT16 sSource, INT16 sDest, INT32 *iCountEnt if( gpBattleGroup ) { - //Assert( gfPreBattleInterfaceActive ); + Assert( gfPreBattleInterfaceActive ); sBattleSector = (INT16)SECTOR( gpBattleGroup->ubSectorX, gpBattleGroup->ubSectorY ); } // debug only if ( gfDisplayPotentialRetreatPaths == TRUE ) { - //Assert( gfPreBattleInterfaceActive ); + Assert( gfPreBattleInterfaceActive ); } @@ -3771,7 +3771,7 @@ BOOLEAN LoadPlayerGroupList( HWFILE hFile, GROUP **pGroup ) sTempID = GetSoldierIDFromMercID( pTemp->ubProfileID ); //Should never happen - //Assert( sTempID != -1 ); + Assert( sTempID != -1 ); pTemp->ubID = (UINT8) sTempID; pTemp->pSoldier = &Menptr[ pTemp->ubID ]; diff --git a/Strategic/strategicmap.cpp b/Strategic/strategicmap.cpp index bbde02e2..d9021bb3 100644 --- a/Strategic/strategicmap.cpp +++ b/Strategic/strategicmap.cpp @@ -2660,7 +2660,7 @@ void JumpIntoAdjacentSector( UINT8 ubTacticalDirection, UINT8 ubJumpCode, INT16 pGroup = GetGroup( ubPrevGroupID ); Assert( pGroup ); Assert( pGroup->fPlayer ); - //Assert( pGroup->ubGroupSize ); + Assert( pGroup->ubGroupSize ); pPlayer = pGroup->pPlayerList; while( pPlayer ) { diff --git a/Tactical/ArmsDealerInvInit.cpp b/Tactical/ArmsDealerInvInit.cpp index 531e3804..16bd7c2e 100644 --- a/Tactical/ArmsDealerInvInit.cpp +++ b/Tactical/ArmsDealerInvInit.cpp @@ -1459,7 +1459,7 @@ UINT8 GetDealerItemCategoryNumber( UINT16 usItemIndex ) // WANNE: commented the assert out, because we always get the assertion in debug mode! // should never be trying to locate an item that's not covered in the table! - //Assert( FALSE ); + Assert( FALSE ); return( 0 ); } diff --git a/Tactical/Campaign.cpp b/Tactical/Campaign.cpp index d742d486..6f2150bd 100644 --- a/Tactical/Campaign.cpp +++ b/Tactical/Campaign.cpp @@ -65,8 +65,8 @@ void StatChange(SOLDIERTYPE *pSoldier, UINT8 ubStat, UINT16 usNumChances, UINT8 if (pSoldier == NULL || pSoldier->bActive == FALSE) return; // THIS SHOULD NEVER HAPPEN - //Assert(pSoldier != NULL); - //Assert(pSoldier->bActive); + Assert(pSoldier != NULL); + Assert(pSoldier->bActive); // ignore non-player soldiers if (!PTR_OURTEAM) diff --git a/Tactical/Inventory Choosing.cpp b/Tactical/Inventory Choosing.cpp index 9b7412ed..52a09ebe 100644 --- a/Tactical/Inventory Choosing.cpp +++ b/Tactical/Inventory Choosing.cpp @@ -2638,7 +2638,7 @@ UINT16 SelectStandardArmyGun( UINT8 uiGunLevel ) } - //Assert(usGunIndex); + Assert(usGunIndex); return(usGunIndex); }