Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
feat(gameclient): money readout carries the income a second
Olcay Seygan7eda6353ceda
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex a9e6e5daf..9d3192df5 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -858,6 +858,7 @@ A third pass went through the generals' powers, promotions and unit abilities.- Hold Tab and a scoreboard opens in the top left corner of the screen, beside the menu key; let go and it is gone. All eight seats of a full game fit in the top half of a 720 line screen. It is built from your command bar's steel, grey, red or sand for your side, with the match clock in its corner. Each side sits under a band edged green for yours and red for the enemy, and the band says how many of that side are still in the game, 4/4 down to 0/4. Watching, there is a band for every team. With a group selected, Tab still steps through the units in it as before, so the scoreboard wants one unit or none selected.- Every row on your side opens on a stripe of that player's colour, then the general's flag, the player's name and the general under it. Then rank, money in the bank, income per minute, kills and losses, every promotion bought, once, at the level it has reached, and the unit that player has built the most of. Numbers line up on their last digit, and your own row is lit. The promotions are drawn the size of the favourite unit's picture and the same shape, where they used to be 13 pixel squares you had to squint at. Point at a promotion, the favourite unit, a superweapon or something in a player's queue and the same card opens as over a build button: what it is, what it costs, and for a unit its health, damage, attacks a second and range.- Beside income per minute, in brackets, is what that player earned a second over the last half minute, "1250(24)" on one line under "PER MIN(PER SEC)". The per-minute number is the average of the whole match, and ten minutes in a lost supply line hardly moves it. The small one falls within half a minute of the trucks stopping, and climbs again once a new line starts paying.+- The same figure sits beside your money on the command bar, "$ 16800 +40/s", so you see a supply line die without opening anything. Watching a match, it is the player you are looking at.- Names are written in white and the player's colour goes on the stripe. Dark red on a black panel measured about 2 to 1 and could barely be read. A player who is out goes grey.- An enemy row is a colour, a name and a team and nothing more. What they are playing and what they have in the bank is theirs to know.- Watching a match, everybody gets the full row, with a team column to say who is with whom.diff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.strindex 1516ffc82..349f49c0d 100644--- a/GeneralsMD/Code/Data/Patch.str+++ b/GeneralsMD/Code/Data/Patch.str@@ -1289,6 +1289,14 @@ GUI:ScoreboardPerSecond"PER SEC"END+GUI:ControlBarMoneyEarning+"$ %d +%d/s"+END++CONTROLBAR:MoneyDescription+"The money you have, and what you earned a second over the last half minute"+END+GUI:ScoreboardKills"K"ENDdiff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.strindex a459a36a1..f4ab0ec04 100644--- a/GeneralsMD/Code/Data/Turkish/Generals.str+++ b/GeneralsMD/Code/Data/Turkish/Generals.str@@ -7942,7 +7942,7 @@ CONTROLBAR:MoneyENDCONTROLBAR:MoneyDescription-"Sahip olduğunuz para miktarı"+"Sahip olduğunuz para ve son yarım dakikada saniyede kazandığınız"ENDUPGRADE:AmericaDroneARmor@@ -15797,6 +15797,10 @@ GUI:ScoreboardPerSecond"SANİYEDE"END+GUI:ControlBarMoneyEarning+"$ %d +%d/sn"+END+GUI:ScoreboardKills"K"ENDdiff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.hindex 6ad0c84ff..89eb3be4c 100644--- a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h@@ -1512,6 +1512,7 @@ protected:DisplayString * m_peaceTimeLabelDisplayString; ///< the word written over that clockDisplayString * m_peaceCountdownDisplayString; ///< the big digit of its last ten secondsInt m_lastMoneyDisplayed; ///< so the money gadget is only written when the amount changes+ Int m_lastEarningDisplayed; ///< or the money earned a second beside itUnsignedInt m_hudDrawCount; ///< rendered frames counted by drawHudOverlay itselfUnsignedInt m_hudLastSampleFrame; ///< m_hudDrawCount the fps sample was last refreshed onUnsignedInt m_hudLastSampleMs; ///< wall clock of that samplediff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cppindex dff223264..be72717f8 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp@@ -1187,6 +1187,7 @@ InGameUI::InGameUI()m_peaceTimeLabelDisplayString = NULL;m_peaceCountdownDisplayString = NULL;m_lastMoneyDisplayed = -1;+ m_lastEarningDisplayed = 0;m_hudDrawCount = 0;m_hudLastSampleFrame = 0;m_hudLastSampleMs = 0;@@ -3908,14 +3909,16 @@ void InGameUI::update( void )if( moneyPlayer){Int currentMoney = moneyPlayer->getMoney()->countMoney();+ Int currentEarning = earnedPerSecond( moneyPlayer->getPlayerIndex() );- if( m_lastMoneyDisplayed != currentMoney )+ if( m_lastMoneyDisplayed != currentMoney || m_lastEarningDisplayed != currentEarning ){UnicodeString buffer;- buffer.format( TheGameText->fetch( "GUI:ControlBarMoneyDisplay" ), currentMoney );+ buffer.format( TheGameText->fetch( "GUI:ControlBarMoneyEarning" ), currentMoney, currentEarning );GadgetStaticTextSetText( moneyWin, buffer );m_lastMoneyDisplayed = currentMoney;+ m_lastEarningDisplayed = currentEarning;} // end if