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
2 changes: 1 addition & 1 deletion GeneralsMD/Code/GameEngine/Include/Common/ThingTemplate.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ typedef std::map<AsciiString, const FXList*> PerUnitFXMap;
//-------------------------------------------------------------------------------------------------
enum
{
MAX_UPGRADE_CAMEO_UPGRADES = 5
MAX_UPGRADE_CAMEO_UPGRADES = 9
};

//-------------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ class CommandButton : public Overridable
* command context sensitive window in the battle user interface */
//-------------------------------------------------------------------------------------------------
enum { MAX_COMMANDS_PER_SET = 32 }; // user interface max is 14 (but internally it's 18 for script only buttons!)
enum { MAX_RIGHT_HUD_UPGRADE_CAMEOS = 5};
enum { MAX_RIGHT_HUD_UPGRADE_CAMEOS = 9};
enum {
MAX_PURCHASE_SCIENCE_RANK_1 = 7,
MAX_PURCHASE_SCIENCE_RANK_3 = 21,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ const FieldParse ThingTemplate::s_objectFieldParseTable[] =
{ "UpgradeCameo3", INI::parseAsciiString, NULL, offsetof( ThingTemplate, m_upgradeCameoUpgradeNames[ 2 ] ) },
{ "UpgradeCameo4", INI::parseAsciiString, NULL, offsetof( ThingTemplate, m_upgradeCameoUpgradeNames[ 3 ] ) },
{ "UpgradeCameo5", INI::parseAsciiString, NULL, offsetof( ThingTemplate, m_upgradeCameoUpgradeNames[ 4 ] ) },
{ "UpgradeCameo6", INI::parseAsciiString, NULL, offsetof( ThingTemplate, m_upgradeCameoUpgradeNames[ 5 ] ) },
{ "UpgradeCameo7", INI::parseAsciiString, NULL, offsetof( ThingTemplate, m_upgradeCameoUpgradeNames[ 6 ] ) },
{ "UpgradeCameo8", INI::parseAsciiString, NULL, offsetof( ThingTemplate, m_upgradeCameoUpgradeNames[ 7 ] ) },
{ "UpgradeCameo9", INI::parseAsciiString, NULL, offsetof( ThingTemplate, m_upgradeCameoUpgradeNames[ 8 ] ) },

// NOTE NOTE NOTE -- s_objectFieldParseTable and s_objectReskinFieldParseTable must be updated in tandem -- see comment above

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,9 @@ void ControlBar::init( void )
id = TheNameKeyGenerator->nameToKey( windowName.str() );
m_rightHUDUpgradeCameos[ i ] =
TheWindowManager->winGetWindowFromId( m_rightHUDWindow, id );
m_rightHUDUpgradeCameos[ i ]->winSetStatus( WIN_STATUS_USE_OVERLAY_STATES );
if (m_rightHUDUpgradeCameos[i] != nullptr) {
m_rightHUDUpgradeCameos[i]->winSetStatus(WIN_STATUS_USE_OVERLAY_STATES);
}
}

// m_transitionHandler = NEW GameWindowTransitionsHandler;
Expand Down Expand Up @@ -2664,6 +2666,9 @@ void ControlBar::setPortraitByObject( Object *obj )

for(Int i = 0; i < MAX_UPGRADE_CAMEO_UPGRADES; ++i)
{
if (m_rightHUDUpgradeCameos[i] == nullptr)
continue;

AsciiString upgradeName = thing->getUpgradeCameoName(i);
if(upgradeName.isEmpty())
{
Expand Down Expand Up @@ -2704,7 +2709,8 @@ void ControlBar::setPortraitByObject( Object *obj )
m_rightHUDWindow->winSetStatus( WIN_STATUS_IMAGE );
m_rightHUDCameoWindow->winClearStatus( WIN_STATUS_IMAGE );
for(Int i = 0; i < MAX_UPGRADE_CAMEO_UPGRADES; ++i)
m_rightHUDUpgradeCameos[i]->winHide(TRUE);
if (m_rightHUDUpgradeCameos[i] != nullptr)
m_rightHUDUpgradeCameos[i]->winHide(TRUE);

//Clear any overlay the portrait had on it.
GadgetButtonDrawOverlayImage( m_rightHUDCameoWindow, NULL );
Expand Down
6 changes: 3 additions & 3 deletions GeneralsMD/Code/Main/WinMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -803,9 +803,9 @@ Int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, Int nCmdShow )
{
Int exitcode = 1;
//#ifdef _DEBUG
// WaitForDebugger(); //in debug build, wait for debugger attachment
//#endif
#ifdef _DEBUG
//WaitForDebugger(); //in debug build, wait for debugger attachment
#endif

#ifdef RTS_PROFILE
Profile::StartRange("init");
Expand Down