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(gameengine): open chat shows the feed's history, one column for its words
Olcay Seygan7a286d8b1c29
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4ec1540f8..9435ea63b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -457,7 +457,7 @@ found and fixed — EA's own, not port damage.**- The clock and frame-rate readout is drawn on top of everything.- The superweapon countdowns are pictures now, not a list of names: the same strip treatment, in the top right corner, under that readout. Each one wears its own seconds and a sweeping clock, the next to land sits at the right hand end, and if you are watching more than eighteen of them the rest become a count.- Every button's corner markings - the hotkey, the price, the time, the number queued - sit flush in the corners instead of floating a few pixels inside them, and are set a size smaller than the button's own text: four labels at full size were eating the picture they were meant to annotate.-- The messages that ran down the top left corner, out of money or a structure under attack, are lines of a feed standing on the radar now, the way Dota's kill feed stands on its minimap. Each line sits on a black band that thins out over the battlefield. A line about a player opens on his general's flag with his name in his colour; the rest open on a gold mark. A smoke signal or a beacon goes in, and so does a player beaten or gone, for a player and a watcher alike. Six lines at most, ten seconds each, the newest at the bottom, and the feed steps up over the production queue's row whenever that is out.+- The messages that ran down the top left corner, out of money or a structure under attack, are lines of a feed standing on the radar now, the way Dota's kill feed stands on its minimap. Each line sits on a black band that thins out over the battlefield. A line about a player opens on his general's flag with his name in his colour; the rest open on a gold mark. A smoke signal or a beacon goes in, and so does a player beaten or gone, for a player and a watcher alike. Six lines at most, ten seconds each, the newest at the bottom, and the feed steps up over the production queue's row whenever that is out. Missed something? Press Enter: while the chat is open the last six lines come back, however old they are. Every line's words start in the same column, whether it opens on a flag or on the gold mark.- A superweapon's wait is written in plain seconds - 200, not 3:20 - so it compares with every other countdown on the screen at a glance. Once it is charged the number goes away entirely and the picture itself breathes in your colour, which is the one thing you want to catch out of the corner of your eye.- The countdown inside a strip picture moved down into its bottom left corner and carries the unit with it - 45s, 200s - on a translucent plate. In the middle of the picture it sat on the one thing the picture is there to show, and the plate it lost when it was in the middle earns its place down in the corner, where a pale cameo was swallowing the digits and their shadow together. This applies to the superweapon countdowns in the top right as well.- Every picture in the row stands in a tray - the same tray your general's powers stand in down in the corner, your own side's copy of it, so the American, Chinese and GLA strips each carry their own metal. The tray is turned back to front, because that bar grows out of the right hand corner and the strip grows out of the left, so its heavy rail leads the row instead of standing between every pair of pictures. It is never stretched to fit, and side by side the trays close up behind each other by exactly what that bar closes its own up by, so a row of them reads as one run of metal rather than a line of loose boxes. Stacked they stand clear of each other instead: a picture in a column carries its whole tray, with none of the one above it cutting across its top edge. The strip is flush against the left edge, and a black rectangle laid over the battlefield is gone.diff --git a/GeneralsMD/Code/Data/Window/Html/Feed.html b/GeneralsMD/Code/Data/Window/Html/Feed.htmlindex bc7c756cb..fbac62800 100644--- a/GeneralsMD/Code/Data/Window/Html/Feed.html+++ b/GeneralsMD/Code/Data/Window/Html/Feed.html@@ -5,7 +5,8 @@a superweapon or advanced tech building started or finished, a player beaten, gone or left with nodozer. Chat has its own page, Window/Html/Chat.html. The feed stands on the radar's under-attacktab in the screen's bottom left corner, the newest line at the bottom, the way Dota's kill feed- stands on its minimap. A line is up for ten seconds, six at most, and the oldest goes first. Same+ stands on its minimap. A line is up for ten seconds, six at most, and the oldest goes first;+ while the chat is open the last six are up however old they are. Samematerials as Window/Html/Spectator.html, whose header says what the renderer draws.The game fills in, every frame a line is up (InGameUI::drawFeed):@@ -38,8 +39,9 @@background: linear-gradient(to right, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.6) 65%, rgba(0, 0, 0, 0)); }.flag { width: 20px; height: 12px; margin-right: 4px; vertical-align: middle; }- /* a plain message has no player, so a steel chip with a mark stands where the flag would */- .chip { display: inline-block; width: 11px; height: 11px; line-height: 11px; margin: 0 5px 0 4px; vertical-align: middle;+ /* a plain message has no player, so a steel chip with a mark stands where the flag would, taking+ the flag's 24 pixels with its margin so every line's words start in one column */+ .chip { display: inline-block; width: 11px; height: 11px; line-height: 11px; margin: 0 8px 0 5px; vertical-align: middle;text-align: center; font-size: 8px; font-weight: bold; color: #f2cf4a;background: linear-gradient(to bottom, #6f7782, #3f4650); border-top: 1px solid #aab4bf; border-bottom: 1px solid #0c1114; }.who { font-weight: bold; }diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cppindex 6d9b23965..87702a7dd 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp@@ -4130,23 +4130,27 @@ Int InGameUI::feedFloor( void ) const//-------------------------------------------------------------------------------------------------/** The event feed, Window/Html/Feed.html, for a player and a watcher alike: the newest line at the* bottom, standing on the radar's under-attack tab, or on the production queue's row while that is- * up over the tab. The messages switch (toggleMessages) takes the whole feed away. */+ * up over the tab. A line is up for FEED_LINE_FRAMES, and while the chat is open every line held+ * is, so Enter shows what was missed. The messages switch (toggleMessages) takes the whole feed+ * away. *///-------------------------------------------------------------------------------------------------void InGameUI::drawFeed( void ){const UnsignedInt frame = TheGameLogic->getFrame();+ const Bool history = IsInGameChatActive();HtmlLists lists;std::vector< HtmlValues > &lines = lists[ "feed" ];for( size_t line = 0; line < m_feedLines.size(); ){// a frame going backwards is a loaded save, and the line is not from this game any moreconst FeedLine &shown = m_feedLines[ line ];- if( frame >= shown.until || frame + FEED_LINE_FRAMES < shown.until )+ if( frame + FEED_LINE_FRAMES < shown.until ){m_feedLines.erase( m_feedLines.begin() + line );continue;}- lines.push_back( shown.values );+ if( history || frame < shown.until )+ lines.push_back( shown.values );line++;}if( lines.empty() || !m_messagesOn || !TheGameLogic->isInGame() || TheGameLogic->isInShellGame() )