Skip to content

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.

feat(gameclient): team plates in the side's steel, no clock on the strip

Olcay Seyganb56b2e980006
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8523a8c94..1fcaf1626 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -507,7 +507,7 @@ found and fixed — EA's own, not port damage.**
- Three buttons sit in a step of the radar's own steel, on its right: the smoke signals Alt+Z, X and C send, placed in the middle of your view for your allies to see. Each is a key sunk into the steel with a sharp white picture on it instead of a word: a crosshair to attack, a shield to defend, an eye to look. Point at one and it comes up out of its well as lit steel with a gold rim, and it sinks in darker while you hold the button down. They rise into place one after another from the bottom of the screen when the match starts. A game with nobody on your side to see the smoke, a skirmish against the computer or a replay, has no signal buttons at all.
- Tooltips wear the bar's steel. Point at a build button and a card opens right above it rather than in a fixed box at the side: the name on a steel header in your side's colour with the price in gold at its end, every "Power Supplied: 5" or "Strong: infantry" line of the description laid out as a label and a bold figure, then the unit's health, damage, attacks a second, damage a second, range and build time in gold, counted with the upgrades you own. Under them every upgrade that touches the unit and what it does to it: a Gattling Tank's card says Chain Guns takes its damage from 15 to 18 and its damage a second from 37 to 46, a Humvee's that TOW adds a 50 damage missile with a range of 317, and an upgrade you already bought turns gold. Point at the upgrade itself and the card lists the units it changes, Composite Armor putting a Crusader from 480 health to 680. At the bottom, "not enough money" or what you still need in a sunk red note at the bottom. Point at something on the battlefield and a small dark box beside the pointer names it, its owner's colour in a stripe down the left edge.
- The readout in the top right corner is a box of its own and always there: the time of day, the match time and the real time beside it, the logic rate and the frame rate, the renderer and the frame number. In a network game it adds how many frames are ready out of the input delay, the room's frame rate and the traffic in and out, and under a unit limit your count against it.
-- Every player in the match hangs from the top edge of the screen, your own team on the left. Each one is their general's flag in a hairline frame with the player's colour along its top, and a band of colour under it for their superweapons: green once one can fire, blue while it is still charging, grey when they have none. A team stands in a steel frame of its own with its name under the flags, Team 1 to Team 4 in a four-team game, and the match clock sits between two teams or after everybody else. A free for all is all eight flags in one row, which fits with room to spare. The column of superweapon countdowns that used to sit in the top right is gone while you play; the full list with the seconds is on Tab.
+- Every player in the match hangs from the top edge of the screen, your own team on the left. Each one is their general's flag in a hairline frame with the player's colour along its top, and a band of colour under it for their superweapons: green once one can fire, blue while it is still charging, grey when they have none. A team hangs in a plate of the command bar's steel, grey, red or sand for your side, with its name under the flags, Team 1 to Team 4 in a four-team game. The match clock is on Tab, so the strip is only flags. A free for all is all eight flags in one row, which fits with room to spare. The column of superweapon countdowns that used to sit in the top right is gone while you play; the full list with the seconds is on Tab.
- The steel between the build buttons, the portrait's grid and the promotion screen's cells is half as wide as it was, so the pictures take the room. The queue's tray has a thinner rim. The portrait and its upgrade icons sit under the portrait's grid, framed the same way as every other picture on the bar.
- The command bar slides up from the bottom of the screen again when a match starts. The new steel frame had been drawn at its final place from the first frame, so the buttons rose into a frame that was already standing.
- The Escape menu is in the bar's steel too: a plate in your side's colour with sunk keys that light gold under the pointer and press in when clicked. Restart reads Surrender or Restart Mission as the game you are in calls for.
diff --git a/GeneralsMD/Code/Data/Window/Html/ControlBar.html b/GeneralsMD/Code/Data/Window/Html/ControlBar.html
index bfd8a9ac7..faeadbb96 100644
--- a/GeneralsMD/Code/Data/Window/Html/ControlBar.html
+++ b/GeneralsMD/Code/Data/Window/Html/ControlBar.html
@@ -55,8 +55,7 @@
{{label}}, "solo" for a player with no ally, or "ffa" for everybody in a
free for all; its players in places s0 to s7, {{sN.image}} {{sN.color}}
and {{sN.weapon}} "ready", "charging" or "none", {{sN.state}} "none" on an
- unused place. Kind "clock" shows {{clock}}, between two teams or after
- the rest; kind "gap" stands between any others
+ unused place. An entry of kind "gap" stands between two others
{{panelN.x}} .y .w .h N 0 to 2, left, centre and right: where the plates would have gone,
moving with the bar when it slides or minimises; .w and .h are 0 and
{{panelN.shown}} is "hidden" when a minimised bar has stood it down
@@ -345,17 +344,18 @@
/* the players hanging from the top edge: each their general's flag filling a hairline frame with
their colour along its top, and under it a band for their superweapons, green once one can
- fire, blue while none can yet, grey when they have none. A team stands in a steel frame of its
- own with its name under the flags; a free for all is everybody side by side. The clock stands
- between two teams, or after everybody else */
+ fire, blue while none can yet, grey when they have none. A team hangs in a plate of the bar's
+ steel, your side's colour, with its name under the flags; a free for all is everybody side by
+ side. The match clock is on the Tab scoreboard */
#seats { left: 180px; right: 180px; top: 0; text-align: center; }
- .steam, .sffa, .ssolo, .sclock, .sgap { display: inline-block; position: relative; vertical-align: top; }
- .steam { padding: 0 2px 1px 2px; background-color: rgba(4, 8, 10, 0.85); border: 1px solid #8a949f; border-top: 0; }
- .china .steam { border-color: #b8604b; }
- .gla .steam { border-color: #a99d62; }
+ .steam, .sffa, .ssolo, .sgap { display: inline-block; position: relative; vertical-align: top; }
+ .steam { padding: 0 2px 1px 2px; border: 1px solid #0c1114; border-top: 0; border-left-color: #b3bbc4;
+ background: linear-gradient(to bottom, #9aa3ad, #5a626c 30%, #353c45); }
+ .china .steam { border-left-color: #d58a70; background: linear-gradient(to bottom, #c06a52, #7a3120 30%, #3f160f); }
+ .gla .steam { border-left-color: #cabe86; background: linear-gradient(to bottom, #b8ab6e, #766a3a 30%, #3c3519); }
.teamname { display: none; }
- .steam .teamname { display: block; line-height: 9px; font-size: 7px; font-weight: bold; color: #e8d27a; }
- .sclock .flags, .sgap .flags, .sclock .teamname, .sgap .teamname, .steam .clocktext, .sffa .clocktext, .ssolo .clocktext, .sgap .clocktext { display: none; }
+ .steam .teamname { display: block; line-height: 9px; font-size: 7px; font-weight: bold; color: #f2cf4a; }
+ .sgap .flags { display: none; }
.flag { display: inline-block; position: relative; vertical-align: top; width: 32px; height: 26px; margin: 0 1px; }
.flag.none { display: none; }
.flag .plate { position: absolute; left: 0; top: 0; width: 30px; height: 21px; border: 1px solid #0c1114; border-top: 0; background-color: #0c1114; }
@@ -365,8 +365,6 @@
.flag .lamp.ready { background-color: #4fd83a; }
.flag .lamp.charging { background-color: #3a8ee8; }
.flag .lamp.none { background-color: #6a737c; }
- .sclock { width: 46px; height: 18px; margin: 0 4px; line-height: 18px; font-size: 10px; font-weight: bold; color: #e8d27a;
- background-color: rgba(4, 8, 10, 0.9); border: 1px solid #06090b; border-top: 0; border-bottom-color: #b4bec8; border-right-color: #b4bec8; }
.sgap { width: 8px; height: 26px; }
</style>
</head>
@@ -468,7 +466,6 @@
<div class="flag {{s7.state}}"><div class="plate"><div class="stripe" style="background-color: {{s7.color}}"></div><img class="emblem" src="{{s7.image}}"></div><div class="lamp {{s7.weapon}}"></div></div>
</div>
<div class="teamname">{{label}}</div>
- <div class="clocktext">{{clock}}</div>
</div>
</div>
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
index 0e513dea6..b5185b1d4 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
@@ -2264,8 +2264,8 @@ static const GameSlot *playerSlot( const Player *player )
* superweapons stand, "ready" once one can fire, "charging" while none can yet and "none" when they
* have none; an unused place has {{sN.state}} "none". A player with no ally is an entry of kind
* "solo", with no frame or name, and a free for all past two players is one entry of kind "ffa",
- * everybody side by side. The match clock, kind "clock", stands between exactly two teams and after
- * the rest otherwise, a "gap" between any other two. */
+ * everybody side by side. Between two entries stands one of kind "gap"; the match clock is on
+ * the Tab scoreboard. */
//-------------------------------------------------------------------------------------------------
static void fillPlayerSeats( const std::vector< SpectatorStats > &seats, Int teams,
const std::vector< SpectatorSuperweapon > &weapons, std::vector< HtmlValues > &entries )
@@ -2311,22 +2311,12 @@ static void fillPlayerSeats( const std::vector< SpectatorStats > &seats, Int tea
if( !entries.empty() )
{
HtmlValues between;
- between[ "kind" ] = teams == TWO_TEAMS ? "clock" : "gap";
+ between[ "kind" ] = "gap";
entries.push_back( between );
}
entries.push_back( group );
first = end;
}
- if( teams != TWO_TEAMS )
- {
- HtmlValues gap;
- gap[ "kind" ] = "gap";
- if( !entries.empty() )
- entries.push_back( gap );
- HtmlValues clock;
- clock[ "kind" ] = "clock";
- entries.push_back( clock );
- }
}
//-------------------------------------------------------------------------------------------------
@@ -11157,7 +11147,6 @@ Bool InGameUI::drawControlBarPage( const IRegion2D *panels, const Bool *shown, I
const std::vector< SpectatorStats > seats = gatherSeats( teams );
fillPlayerSeats( seats, teams, m_spectatorSuperweapons, lists[ "seats" ] );
}
- values[ "clock" ] = spectatorClock( TheGameLogic->getFrame() );
// a well behind each of the fourteen command buttons, shown or not, so the grid reads as a grid
// with the steel between its places, and an empty place is a hole in it rather than bare dark