diff --git a/SaveLoadScreen.cpp b/SaveLoadScreen.cpp index e016c352..e2ba1f6c 100644 --- a/SaveLoadScreen.cpp +++ b/SaveLoadScreen.cpp @@ -430,11 +430,16 @@ void SetSaveLoadExitScreen( UINT32 uiScreen ) SetPendingNewScreen( uiScreen ); +#if 0 + // 0verhaul: This is a repeat of the previous line, but with a different variable set. + // None of it really makes sense. Why would a quicksave be different from a regular one? + // Why should ctrl+L act differently than alt+L? if( gfDoingQuickLoad ) { fFirstTimeInGameScreen = TRUE; SetPendingNewScreen( uiScreen ); } +#endif ExitSaveLoadScreen(); diff --git a/Standard Gaming Platform/sgp.cpp b/Standard Gaming Platform/sgp.cpp index 2edec67b..3313820d 100644 --- a/Standard Gaming Platform/sgp.cpp +++ b/Standard Gaming Platform/sgp.cpp @@ -791,6 +791,9 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR p //EmergencyExitButtonInit(); //end rain +#ifdef _DEBUG + _CrtSetDbgFlag( _CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_DELAY_FREE_MEM_DF | _CRTDBG_LEAK_CHECK_DF); +#endif ghInstance = hInstance; diff --git a/Strategic/Strategic Movement.cpp b/Strategic/Strategic Movement.cpp index b31bd8d4..c6d8c81d 100644 --- a/Strategic/Strategic Movement.cpp +++ b/Strategic/Strategic Movement.cpp @@ -2444,7 +2444,7 @@ void InitiateGroupMovementToNextSector( GROUP *pGroup ) { AssertMsg( 0, String("Group %d (%s) attempting illegal move from %c%d to %c%d (%s).", pGroup->ubGroupID, ( pGroup->fPlayer ) ? "Player" : "AI", - pGroup->ubSectorY+'A', pGroup->ubSectorX, pGroup->ubNextY+'A', pGroup->ubNextX, + pGroup->ubSectorY+'A'-1, pGroup->ubSectorX, pGroup->ubNextY+'A'-1, pGroup->ubNextX, gszTerrain[SectorInfo[ubSector].ubTraversability[ubDirection]] ) ); } diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 92c99b3d..7a40fb7a 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -232,15 +232,14 @@ BATTLESNDS_STRUCT gBattleSndsData[] = // ---------------------------------------- Inventory::Inventory() { + OBJECTTYPE filler; + memset( &filler, 0, sizeof( OBJECTTYPE ) ); slotCnt = NUM_INV_SLOTS; inv.reserve(slotCnt); for (int idx=0; idx < slotCnt; ++idx) { //OBJECTTYPE *filler = new OBJECTTYPE; // Use MEMALLOC? - OBJECTTYPE *filler = NULL; - filler = (OBJECTTYPE*)MemAlloc( sizeof( OBJECTTYPE ) ); - memset( filler, 0, sizeof( OBJECTTYPE ) ); - inv.push_back(*filler); + inv.push_back(filler); } clear(); Assert (inv.size() == slotCnt);