Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Core/GameEngine/Source/Common/INI/INI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ UnsignedInt INI::load( AsciiString filename, INILoadType loadType, Xfer *pXfer )
}
else
{
DEBUG_ASSERTCRASH( 0, ("[LINE: %d - FILE: '%s'] Unknown block '%s'",
DEBUG_CRASH( ("[LINE: %d - FILE: '%s'] Unknown block '%s'",
getLineNum(), getFilename().str(), token ) );
throw INI_UNKNOWN_TOKEN;
}
Expand Down Expand Up @@ -524,7 +524,7 @@ void INI::readLine( void )
// check for at the max
if ( p == m_buffer+INI_MAX_CHARS_PER_LINE )
{
DEBUG_ASSERTCRASH( 0, ("Buffer too small (%d) and was truncated, increase INI_MAX_CHARS_PER_LINE", INI_MAX_CHARS_PER_LINE) );
DEBUG_CRASH( ("Buffer too small (%d) and was truncated, increase INI_MAX_CHARS_PER_LINE", INI_MAX_CHARS_PER_LINE) );
}
}

Expand Down Expand Up @@ -1524,7 +1524,7 @@ void INI::initFromINIMulti( void *what, const MultiIniFieldParse& parseTableList

if( what == nullptr )
{
DEBUG_ASSERTCRASH( 0, ("INI::initFromINI - Invalid parameters supplied!") );
DEBUG_CRASH( ("INI::initFromINI - Invalid parameters supplied!") );
throw INI_INVALID_PARAMS;
}

Expand Down Expand Up @@ -1578,7 +1578,7 @@ void INI::initFromINIMulti( void *what, const MultiIniFieldParse& parseTableList

if (!found)
{
DEBUG_ASSERTCRASH( 0, ("[LINE: %d - FILE: '%s'] Unknown field '%s' in block '%s'",
DEBUG_CRASH( ("[LINE: %d - FILE: '%s'] Unknown field '%s' in block '%s'",
INI::getLineNum(), INI::getFilename().str(), field, m_curBlockStart) );
}

Expand All @@ -1591,7 +1591,7 @@ void INI::initFromINIMulti( void *what, const MultiIniFieldParse& parseTableList
{

done = TRUE;
DEBUG_ASSERTCRASH( 0, ("Error parsing block '%s', in INI file '%s'. Missing '%s' token",
DEBUG_CRASH( ("Error parsing block '%s', in INI file '%s'. Missing '%s' token",
m_curBlockStart, getFilename().str(), m_blockEndToken) );
throw INI_MISSING_END_TOKEN;

Expand Down Expand Up @@ -1667,7 +1667,7 @@ void INI::initFromINIMulti( void *what, const MultiIniFieldParse& parseTableList
if( nameList == nullptr || nameList[ 0 ] == nullptr )
{

DEBUG_ASSERTCRASH( 0, ("INTERNAL ERROR! scanIndexList, invalid name list") );
DEBUG_CRASH( ("INTERNAL ERROR! scanIndexList, invalid name list") );
throw INI_INVALID_NAME_LIST;

}
Expand All @@ -1692,7 +1692,7 @@ void INI::initFromINIMulti( void *what, const MultiIniFieldParse& parseTableList
{
if( lookupList == nullptr || lookupList[ 0 ].name == nullptr )
{
DEBUG_ASSERTCRASH( 0, ("INTERNAL ERROR! scanLookupList, invalid name list") );
DEBUG_CRASH( ("INTERNAL ERROR! scanLookupList, invalid name list") );
throw INI_INVALID_NAME_LIST;
}

Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/Common/System/Radar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ Bool Radar::removeObject( Object *obj )
return TRUE;
else
{
DEBUG_ASSERTCRASH( 0, ("Radar: Tried to remove object '%s' which was not found",
DEBUG_CRASH( ("Radar: Tried to remove object '%s' which was not found",
obj->getTemplate()->getName().str()) );
return FALSE;
}
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/GameClient/Credits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ void CreditsManager::addText( AsciiString text )
}
break;
default:
DEBUG_ASSERTCRASH( FALSE, ("CreditsManager::addText we tried to add a credit text with the wrong style before it. Style is %d", m_currentStyle) );
DEBUG_CRASH( ("CreditsManager::addText we tried to add a credit text with the wrong style before it. Style is %d", m_currentStyle) );
delete cLine;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Transition *getTransitionForStyle( Int style )
return NEW ScoreScaleUpTransition;

default:
DEBUG_ASSERTCRASH(FALSE, ("getTransitionForStyle:: An invalid style was passed in. Style = %d", style));
DEBUG_CRASH(("getTransitionForStyle:: An invalid style was passed in. Style = %d", style));
return nullptr;
}
return nullptr;
Expand Down Expand Up @@ -532,7 +532,7 @@ TransitionGroup *GameWindowTransitionsHandler::getNewGroup( AsciiString name )
// test to see if we're trying to add an already existing group.
if(findGroup(name))
{
DEBUG_ASSERTCRASH(FALSE, ("GameWindowTransitionsHandler::getNewGroup - We already have a group %s", name.str()));
DEBUG_CRASH(("GameWindowTransitionsHandler::getNewGroup - We already have a group %s", name.str()));
return nullptr;
}
TransitionGroup *g = NEW TransitionGroup;
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Source/GameClient/GUI/LoadScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ void MultiPlayerLoadScreen::processProgress(Int playerId, Int percentage)

if( percentage < 0 || percentage > 100 || playerId >= MAX_SLOTS || playerId < 0 || m_playerLookup[playerId] == -1)
{
DEBUG_ASSERTCRASH(FALSE, ("Percentage %d was passed in for Player %d", percentage, playerId));
DEBUG_CRASH(("Percentage %d was passed in for Player %d", percentage, playerId));
return;
}
//DEBUG_LOG(("Percentage %d was passed in for Player %d (in loadscreen position %d)", percentage, playerId, m_playerLookup[playerId]));
Expand Down Expand Up @@ -1831,7 +1831,7 @@ void GameSpyLoadScreen::processProgress(Int playerId, Int percentage)

if( percentage < 0 || percentage > 100 || playerId >= MAX_SLOTS || playerId < 0 || m_playerLookup[playerId] == -1)
{
DEBUG_ASSERTCRASH(FALSE, ("Percentage %d was passed in for Player %d", percentage, playerId));
DEBUG_CRASH(("Percentage %d was passed in for Player %d", percentage, playerId));
return;
}
//DEBUG_LOG(("Percentage %d was passed in for Player %d (in loadscreen position %d)", percentage, playerId, m_playerLookup[playerId]));
Expand Down Expand Up @@ -1969,7 +1969,7 @@ void MapTransferLoadScreen::processProgress(Int playerId, Int percentage, AsciiS

if( percentage < 0 || percentage > 100 || playerId >= MAX_SLOTS || playerId < 0 || m_playerLookup[playerId] == -1)
{
DEBUG_ASSERTCRASH(FALSE, ("Percentage %d was passed in for Player %d", percentage, playerId));
DEBUG_CRASH(("Percentage %d was passed in for Player %d", percentage, playerId));
return;
}

Expand Down
12 changes: 6 additions & 6 deletions Core/GameEngine/Source/GameClient/GameText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ Bool GameTextManager::parseStringFile( const char *filename )
{
if ( stricmp ( m_stringInfo[i].label.str(), m_buffer ) == 0)
{
DEBUG_ASSERTCRASH ( FALSE, ("String label '%s' multiply defined!", m_buffer ));
DEBUG_CRASH ( ("String label '%s' multiply defined!", m_buffer ));
}
}

Expand All @@ -1055,7 +1055,7 @@ Bool GameTextManager::parseStringFile( const char *filename )
{
if (!readLine ( m_buffer, sizeof(m_buffer)-1, file ))
{
DEBUG_ASSERTCRASH (FALSE, ("Unexpected end of string file"));
DEBUG_CRASH (("Unexpected end of string file"));
ok = FALSE;
goto quit;
}
Expand All @@ -1073,7 +1073,7 @@ Bool GameTextManager::parseStringFile( const char *filename )
if ( readString )
{
// only one string per label allows
DEBUG_ASSERTCRASH ( FALSE, ("String label '%s' has more than one string defined!", m_stringInfo[listCount].label.str()));
DEBUG_CRASH ( ("String label '%s' has more than one string defined!", m_stringInfo[listCount].label.str()));
}
else
{
Expand Down Expand Up @@ -1168,7 +1168,7 @@ Bool GameTextManager::parseMapStringFile( const char *filename )
{
if ( stricmp ( m_mapStringInfo[i].label.str(), m_buffer ) == 0)
{
DEBUG_ASSERTCRASH ( FALSE, ("String label '%s' multiply defined!", m_buffer ));
DEBUG_CRASH ( ("String label '%s' multiply defined!", m_buffer ));
}
}

Expand All @@ -1186,7 +1186,7 @@ Bool GameTextManager::parseMapStringFile( const char *filename )
{
if (!readLine ( m_buffer, sizeof(m_buffer)-1, file ))
{
DEBUG_ASSERTCRASH (FALSE, ("Unexpected end of string file"));
DEBUG_CRASH (("Unexpected end of string file"));
ok = FALSE;
goto quit;
}
Expand All @@ -1204,7 +1204,7 @@ Bool GameTextManager::parseMapStringFile( const char *filename )
if ( readString )
{
// only one string per label allowed
DEBUG_ASSERTCRASH ( FALSE, ("String label '%s' has more than one string defined!", m_stringInfo[listCount].label.str()));
DEBUG_CRASH ( ("String label '%s' has more than one string defined!", m_stringInfo[listCount].label.str()));
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/GameClient/GlobalLanguage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void GlobalLanguage::init()
AsciiString font = *it;
if(AddFontResource(font.str()) == 0)
{
DEBUG_ASSERTCRASH(FALSE,("GlobalLanguage::init Failed to add font %s", font.str()));
DEBUG_CRASH(("GlobalLanguage::init Failed to add font %s", font.str()));
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/GameClient/MapUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ Image *getMapPreviewImage( AsciiString mapName )
// Read the waypoints.
file.registerParser( "MapPreview", AsciiString::TheEmptyString, parseMapPreviewChunk );
if (!file.parse(nullptr)) {
DEBUG_ASSERTCRASH(false,("Unable to read MapPreview info."));
DEBUG_CRASH(("Unable to read MapPreview info."));
deleteInstance(mapPreviewImage);
return nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/GameNetwork/GameInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ AsciiString GameInfoToAsciiString( const GameInfo *game )
}
else
{
DEBUG_ASSERTCRASH(false, ("Bad slot type"));
DEBUG_CRASH(("Bad slot type"));
str = "X:";
}
optionsString.concat(str);
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Source/GameNetwork/LANAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ AsciiString LANAPI::createSlotString( void )
}
else
{
DEBUG_ASSERTCRASH(false, ("Bad slot type"));
DEBUG_CRASH(("Bad slot type"));
str = "X,";
}

Expand Down Expand Up @@ -1153,7 +1153,7 @@ void LANAPI::removeGame( LANGameInfo *game )
else
{
// Odd. We went the whole way without finding it in the list.
DEBUG_ASSERTCRASH(false, ("LANGameInfo wasn't in the list"));
DEBUG_CRASH(("LANGameInfo wasn't in the list"));
}
}
}
Expand Down Expand Up @@ -1194,7 +1194,7 @@ void LANAPI::removePlayer( LANPlayer *player )
else
{
// Odd. We went the whole way without finding it in the list.
DEBUG_ASSERTCRASH(false, ("LANPlayer wasn't in the list"));
DEBUG_CRASH(("LANPlayer wasn't in the list"));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/GameNetwork/LANAPICallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ void LANAPI::OnPlayerLeave( UnicodeString player )
if (m_name.compare(player) == 0)
{
// We're leaving. Save options and Pop the shell up a screen.
//DEBUG_ASSERTCRASH(false, ("Slot is %d", m_currentGame->getLocalSlotNum()));
//DEBUG_CRASH(("Slot is %d", m_currentGame->getLocalSlotNum()));
if (m_currentGame && m_currentGame->isInGame() && m_currentGame->getLocalSlotNum() >= 0)
{
LANPreferences pref;
Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ void LANAPI::handleJoinAccept( LANMessage *msg, UnsignedInt senderIP )

if (!m_currentGame)
{
DEBUG_ASSERTCRASH(false, ("Could not find game to join!"));
DEBUG_CRASH(("Could not find game to join!"));
OnGameJoin(RET_UNKNOWN, nullptr);
}
else
Expand Down Expand Up @@ -463,7 +463,7 @@ void LANAPI::handleJoinAccept( LANMessage *msg, UnsignedInt senderIP )
prefs.write();

OnGameJoin(RET_OK, m_currentGame);
//DEBUG_ASSERTCRASH(false, ("setting host to %ls@%ls", m_currentGame->getLANSlot(0)->getUser()->getLogin().str(),
//DEBUG_CRASH(("setting host to %ls@%ls", m_currentGame->getLANSlot(0)->getUser()->getLogin().str(),
// m_currentGame->getLANSlot(0)->getUser()->getHost().str()));
}
m_pendingAction = ACT_NONE;
Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Source/GameNetwork/NetMessageStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Bool AddCommandToPacket(const GameMessage *msg)
commandBuf[0] = MSGTYPE_PARTIALCOMMAND;
if (!TheNetwork->queueSend(BROADCAST_CON, commandBuf, bytesUsed + sizeof(CommandPacketHeader) + 1, MSG_NEEDACK | MSG_SEQUENCED))
{
//DEBUG_ASSERTCRASH(false, ("Too many commands in one frame! Some will be dropped."));
//DEBUG_CRASH(("Too many commands in one frame! Some will be dropped."));
DEBUG_LOG(("Too many commands in one frame! Some will be dropped."));
return false;
}
Expand All @@ -192,7 +192,7 @@ Bool AddCommandToPacket(const GameMessage *msg)

if (bytesUsed + sizeof(CommandPacketHeader) + messageSize >= MAX_MESSAGE_LEN)
{
//DEBUG_ASSERTCRASH(false, ("Too many commands in one frame! Some will be dropped."));
//DEBUG_CRASH(("Too many commands in one frame! Some will be dropped."));
DEBUG_LOG(("Too many commands in one frame! Some will be dropped."));
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void W3DLaserDraw::doDrawModule(const Matrix3D* transformMtx)
LaserUpdate *update = (LaserUpdate*)draw->findClientUpdateModule( key_LaserUpdate );
if( !update )
{
DEBUG_ASSERTCRASH( 0, ("W3DLaserDraw::doDrawModule() expects its owner drawable %s to have a ClientUpdate = LaserUpdate module.", draw->getTemplate()->getName().str() ));
DEBUG_CRASH( ("W3DLaserDraw::doDrawModule() expects its owner drawable %s to have a ClientUpdate = LaserUpdate module.", draw->getTemplate()->getName().str() ));
return;
}

Expand Down
2 changes: 1 addition & 1 deletion Core/Tools/ImagePacker/Source/ImagePacker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ Bool ImagePacker::packImages( void )
char buffer[ _MAX_PATH ];

sprintf( buffer, "Unable to add image '%s' to a brand new page!\n", image->m_path );
DEBUG_ASSERTCRASH( 0, (buffer) );
DEBUG_CRASH( (buffer) );
MessageBox( nullptr, buffer, "Internal Error", MB_OK | MB_ICONERROR );
return FALSE;

Expand Down
2 changes: 1 addition & 1 deletion Core/Tools/ImagePacker/Source/TexturePage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ Bool TexturePage::addImageData( Byte *destBuffer,
char buffer[ _MAX_PATH + 32 ];

sprintf( buffer, "Error loading source file '%s'\n", image->m_path );
DEBUG_ASSERTCRASH( 0, (buffer) );
DEBUG_CRASH( (buffer) );
MessageBox( nullptr, buffer, "Cannot Load Source File", MB_OK | MB_ICONERROR );
return FALSE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void INI::parseMultiplayerSettingsDefinition( INI* ini )
//
if( ini->getLoadType() == INI_LOAD_CREATE_OVERRIDES )
{
DEBUG_ASSERTCRASH(false, ("Creating an override of MultiplayerSettings!"));
DEBUG_CRASH(("Creating an override of MultiplayerSettings!"));
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Source/Common/RTS/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3361,7 +3361,7 @@ void Player::removeKindOfProductionCostChange( KindOfMaskType kindOf, Real perce
}
++it;
}
DEBUG_ASSERTCRASH(FALSE, ("removeKindOfProductionCostChange was called with kindOf=%d and percent=%f. We could not find the entry in the list with these variables. CLH.",kindOf, percent));
DEBUG_CRASH(("removeKindOfProductionCostChange was called with kindOf=%d and percent=%f. We could not find the entry in the list with these variables. CLH.",kindOf, percent));
}

//-------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ void BuildAssistant::iterateFootprint( const ThingTemplate *build,
else
{

DEBUG_ASSERTCRASH( 0, ("iterateFootprint: Undefined geometry '%d' for '%s'",
DEBUG_CRASH( ("iterateFootprint: Undefined geometry '%d' for '%s'",
build->getTemplateGeometryInfo().getGeomType(), build->getName().str()) );
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2354,7 +2354,7 @@ void ControlBar::switchToContext( ControlBarContext context, Drawable *draw )
default:
{

DEBUG_ASSERTCRASH( 0, ("ControlBar::switchToContext, unknown context '%d'", context) );
DEBUG_CRASH( ("ControlBar::switchToContext, unknown context '%d'", context) );
break;

}
Expand Down Expand Up @@ -2415,7 +2415,7 @@ void ControlBar::setControlCommand( GameWindow *button, const CommandButton *com
if( button->winGetInputFunc() != GadgetPushButtonInput )
{

DEBUG_ASSERTCRASH( 0, ("setControlCommand: Window is not a button") );
DEBUG_CRASH( ("setControlCommand: Window is not a button") );
return;

}
Expand All @@ -2424,7 +2424,7 @@ void ControlBar::setControlCommand( GameWindow *button, const CommandButton *com
if( commandButton == nullptr )
{

DEBUG_ASSERTCRASH( 0, ("setControlCommand: null commandButton passed in") );
DEBUG_CRASH( ("setControlCommand: null commandButton passed in") );
return;

}
Expand Down Expand Up @@ -2526,7 +2526,7 @@ void ControlBar::setControlCommand( const AsciiString& buttonWindowName, GameWin
if( win == nullptr )
{

DEBUG_ASSERTCRASH( 0, ("setControlCommand: Unable to find window '%s'", buttonWindowName.str()) );
DEBUG_CRASH( ("setControlCommand: Unable to find window '%s'", buttonWindowName.str()) );
return;

}
Expand Down Expand Up @@ -2995,7 +2995,7 @@ void ControlBar::switchControlBarStage( ControlBarStages stage )
setHiddenControlBar();
break;
default:
DEBUG_ASSERTCRASH(FALSE,("ControlBar::switchControlBarStage we were passed in a stage that's not supported %d", stage));
DEBUG_CRASH(("ControlBar::switchControlBarStage we were passed in a stage that's not supported %d", stage));
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void ControlBar::populateInvDataCallback( Object *obj, void *userData )
if( data->currIndex > data->maxIndex )
{

DEBUG_ASSERTCRASH( 0, ("There is not enough GUI slots to hold the # of items inside a '%s'",
DEBUG_CRASH( ("There is not enough GUI slots to hold the # of items inside a '%s'",
data->transport->getTemplate()->getName().str()) );
return;

Expand Down
Loading
Loading