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
6 changes: 3 additions & 3 deletions GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@ class CommandButton : public Overridable
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_PURCHASE_SCIENCE_RANK_1 = 4,
MAX_PURCHASE_SCIENCE_RANK_3 = 15,
MAX_PURCHASE_SCIENCE_RANK_8 = 4,
MAX_PURCHASE_SCIENCE_RANK_1 = 7,
MAX_PURCHASE_SCIENCE_RANK_3 = 21,
MAX_PURCHASE_SCIENCE_RANK_8 = 7,
};
enum { MAX_STRUCTURE_INVENTORY_BUTTONS = 10 }; // there are this many physical buttons in "inventory" windows for structures
enum { MAX_BUILD_QUEUE_BUTTONS = 9 };// physical button count for the build queue
Expand Down
2 changes: 1 addition & 1 deletion GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ GlobalData* GlobalData::m_theOriginal = NULL;
{ "Use3WayTerrainBlends", INI::parseInt, NULL, offsetof( GlobalData, m_use3WayTerrainBlends ) },
{ "StretchTerrain", INI::parseBool, NULL, offsetof( GlobalData, m_stretchTerrain ) },
{ "UseHalfHeightMap", INI::parseBool, NULL, offsetof( GlobalData, m_useHalfHeightMap ) },

{ "ViewportHeightScale", INI::parseReal, NULL, offsetof( GlobalData, m_viewportHeightScale ) },

{ "DrawEntireTerrain", INI::parseBool, NULL, offsetof( GlobalData, m_drawEntireTerrain ) },
{ "TerrainLOD", INI::parseIndexList, TerrainLODNames, offsetof( GlobalData, m_terrainLOD ) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,14 @@ void ControlBar::populatePurchaseScience( Player* player )
commandSet8 = TheControlBar->findCommandSet(player->getPlayerTemplate()->getPurchaseScienceCommandSetRank8()); // TEMP WILL CHANGE TO PROPER WAY ONCE WORKING

for( i = 0; i < MAX_PURCHASE_SCIENCE_RANK_1; i++ )
m_sciencePurchaseWindowsRank1[i]->winHide(TRUE);
if (m_sciencePurchaseWindowsRank1[i]!=nullptr)
m_sciencePurchaseWindowsRank1[i]->winHide(TRUE);
for( i = 0; i < MAX_PURCHASE_SCIENCE_RANK_3; i++ )
m_sciencePurchaseWindowsRank3[i]->winHide(TRUE);
if (m_sciencePurchaseWindowsRank3[i] != nullptr)
m_sciencePurchaseWindowsRank3[i]->winHide(TRUE);
for( i = 0; i < MAX_PURCHASE_SCIENCE_RANK_8; i++ )
m_sciencePurchaseWindowsRank8[i]->winHide(TRUE);
if (m_sciencePurchaseWindowsRank8[i] != nullptr)
m_sciencePurchaseWindowsRank8[i]->winHide(TRUE);


// if no command set match is found hide all the buttons
Expand All @@ -204,7 +207,8 @@ void ControlBar::populatePurchaseScience( Player* player )
if( commandButton == NULL || BitIsSet( commandButton->getOptions(), SCRIPT_ONLY ) )
{
// hide window on interface
m_sciencePurchaseWindowsRank1[ i ]->winHide( TRUE );
if(m_sciencePurchaseWindowsRank1[ i ] != nullptr)
m_sciencePurchaseWindowsRank1[ i ]->winHide( TRUE );
} // end if
else
{
Expand Down Expand Up @@ -264,7 +268,8 @@ void ControlBar::populatePurchaseScience( Player* player )
if( commandButton == NULL || BitIsSet( commandButton->getOptions(), SCRIPT_ONLY ) )
{
// hide window on interface
m_sciencePurchaseWindowsRank3[ i ]->winHide( TRUE );
if (m_sciencePurchaseWindowsRank3[ i ] != nullptr)
m_sciencePurchaseWindowsRank3[ i ]->winHide( TRUE );
} // end if
else
{
Expand Down Expand Up @@ -327,7 +332,8 @@ void ControlBar::populatePurchaseScience( Player* player )
if( commandButton == NULL || BitIsSet( commandButton->getOptions(), SCRIPT_ONLY ) )
{
// hide window on interface
m_sciencePurchaseWindowsRank8[ i ]->winHide( TRUE );
if (m_sciencePurchaseWindowsRank8[ i ] != nullptr)
m_sciencePurchaseWindowsRank8[ i ]->winHide( TRUE );
} // end if
else
{
Expand Down Expand Up @@ -1157,15 +1163,19 @@ void ControlBar::init( void )
id = TheNameKeyGenerator->nameToKey( windowName.str() );
m_sciencePurchaseWindowsRank1[ i ] =
TheWindowManager->winGetWindowFromId( m_contextParent[ CP_PURCHASE_SCIENCE ], id );
m_sciencePurchaseWindowsRank1[ i ]->winSetStatus( WIN_STATUS_USE_OVERLAY_STATES );
if (m_sciencePurchaseWindowsRank1[i] != nullptr) {
m_sciencePurchaseWindowsRank1[i]->winSetStatus(WIN_STATUS_USE_OVERLAY_STATES);
}
} // end for i
for( i = 0; i < MAX_PURCHASE_SCIENCE_RANK_3; i++ )
{
windowName.format( "GeneralsExpPoints.wnd:ButtonRank3Number%d", i );
id = TheNameKeyGenerator->nameToKey( windowName.str() );
m_sciencePurchaseWindowsRank3[ i ] =
TheWindowManager->winGetWindowFromId( m_contextParent[ CP_PURCHASE_SCIENCE ], id );
m_sciencePurchaseWindowsRank3[ i ]->winSetStatus( WIN_STATUS_USE_OVERLAY_STATES );
if (m_sciencePurchaseWindowsRank3[i] != nullptr) {
m_sciencePurchaseWindowsRank3[i]->winSetStatus(WIN_STATUS_USE_OVERLAY_STATES);
}
} // end for i

for( i = 0; i < MAX_PURCHASE_SCIENCE_RANK_8; i++ )
Expand All @@ -1174,7 +1184,9 @@ void ControlBar::init( void )
id = TheNameKeyGenerator->nameToKey( windowName.str() );
m_sciencePurchaseWindowsRank8[ i ] =
TheWindowManager->winGetWindowFromId( m_contextParent[ CP_PURCHASE_SCIENCE ], id );
m_sciencePurchaseWindowsRank8[ i ]->winSetStatus( WIN_STATUS_USE_OVERLAY_STATES );
if (m_sciencePurchaseWindowsRank8[i] != nullptr) {
m_sciencePurchaseWindowsRank8[i]->winSetStatus(WIN_STATUS_USE_OVERLAY_STATES);
}
} // end for i

// keep a pointer to the window making up the right HUD display
Expand Down
2 changes: 1 addition & 1 deletion GeneralsMD/Code/Main/WinMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ Int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
{
Int exitcode = 1;
//#ifdef _DEBUG
// WaitForDebugger(); //in debug build, wait for debugger attachment
// WaitForDebugger(); //in debug build, wait for debugger attachment
//#endif

#ifdef RTS_PROFILE
Expand Down