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.

fix(gameclient): queue of four inside the radar box, clean mount glyphs

Olcay Seygan1cdc938f1bc2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d5d31ccd4..83ee07494 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,7 +32,7 @@ found and fixed, EA's own, not port damage.**
## Your queue in pictures again
-- What your base is building stands over the radar as pictures again, not lines of text: one row of five, the next to arrive on the left, together in one steel tray hard against the left edge of the screen, built like the tray that holds the general's powers, each picture in its cell with the coloured edge a power button wears. The seconds left sit in its corner on a dark plate, an x4 marks four of the same thing queued back to back, and a dark sweep comes off the picture as it builds. Past five, a tag sticking up from the tray says how many more are coming. Click one and the camera goes to the building making it; right-click it, or click with Ctrl held, and the newest of it comes off that building's queue, the picture turning red under Ctrl first so you see what you are about to cancel.
+- What your base is building stands over the radar as pictures again, not lines of text: one row of four, no wider than the radar's box, the next to arrive on the left, together in one steel tray hard against the left edge of the screen, built like the tray that holds the general's powers, each picture in its cell with the coloured edge a power button wears. The seconds left sit in its corner on a dark plate, an x4 marks four of the same thing queued back to back, and a dark sweep comes off the picture as it builds. Past four, a tag sticking up from the tray says how many more are coming. Click one and the camera goes to the building making it; right-click it, or click with Ctrl held, and the newest of it comes off that building's queue, the picture turning red under Ctrl first so you see what you are about to cancel.
- Superweapon countdowns in the top right are pictures too, yours first and then everyone else's, each soonest first, six to a row and two rows at most in a tray of their own against the right edge of the screen, a little under the info strip, with a tag hanging below it for the rest. A line under each one is its owner's colour, a dark sweep shows how far the charge has come, and once one is charged that line's colour rises up over the picture like light off a lamp, brightest at the line, breathing slowly so a ready superweapon reads at a glance. Clicking one of your own takes the camera to it.
## EA's four ranks are back
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaPowers.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaPowers.dds
index 1de05d8de..70a27be95 100644
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaPowers.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaPowers.dds differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaPowers.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaPowers.dds
index b320b4adb..85b5e001b 100644
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaPowers.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaPowers.dds differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaPowers.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaPowers.dds
index cc20a0f3a..f36236a7e 100644
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaPowers.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaPowers.dds differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyePowers.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyePowers.dds
index caa2a63a7..84d72c61c 100644
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyePowers.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyePowers.dds differ
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
index 7c6af1967..9902c5998 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
@@ -1020,7 +1020,9 @@ public: // ********************************************************************
// tab sticking up from the tray says "+N" for the rest. The superweapon cameos in the top right,
// SUPERWEAPON_LIST_COLUMNS to a row, stop at SUPERWEAPON_LIST_CELLS with a tab hanging below.
//
- enum { PRODUCTION_LIST_COLUMNS = 5, PRODUCTION_LIST_CELLS = 5 }; ///< one row, over the radar's piece of the bar
+ /// one row, over the radar's piece of the bar: four cells and the tray's edge are 316 wide at 1080,
+ /// inside the side bars' 345 wide radar box
+ enum { PRODUCTION_LIST_COLUMNS = 4, PRODUCTION_LIST_CELLS = 4 };
enum { SUPERWEAPON_LIST_COLUMNS = 6, SUPERWEAPON_LIST_CELLS = 12 }; ///< two rows at most
struct ProductionListSlot
{
diff --git a/GeneralsMD/Code/Tools/hud_command_bar.py b/GeneralsMD/Code/Tools/hud_command_bar.py
index c0a362d34..db6dfeaa8 100644
--- a/GeneralsMD/Code/Tools/hud_command_bar.py
+++ b/GeneralsMD/Code/Tools/hud_command_bar.py
@@ -1586,9 +1586,11 @@ def put(sheet_img, img, box):
# Minimise and promotion stand on the bar's mount (round 18) and wear the bar's colour: a raised face
-# in the side's second accent of BAR_LOOKS with the glyph engraved in it, as the prototypes drew them.
+# in the side's second accent of BAR_LOOKS and a flat glyph on it, as the prototypes drew them. The
+# glyph is laid on after the light, antialiased: engraved and lit at this size it came out mottled.
MOUNT_KINDS = ("General", "Minimize", "Maximize")
-MOUNT_GLYPH = {"America": INK, "China": (60, 190, 70), "Gla": INK, "Turkiye": (64, 226, 214)}
+MOUNT_GLYPH = {"America": INK, "China": INK, "Gla": INK, "Turkiye": (64, 226, 214)}
+MOUNT_GLYPH_BUILD = {"terraced": "machined"} # China's minimise is the chevron and its bezel plain
MOUNT_STATE = {"": 1.0, "H": 1.3, "P": 0.85, "I": 0.45} # the face's brightness in each state
@@ -1597,17 +1599,26 @@ def mount_button(side_name, kind, state, w, h):
build = look["build"]
k = MOUNT_STATE[state]
look["accent"] = tuple(min(255, int(c * k)) for c in look["accent2"])
- look["accent2"] = (96, 100, 104) if state == "I" else MOUNT_GLYPH[side_name]
o = 32 # drawn on a wider canvas: shade's noise
p = Painter(w + 2 * o, h + 2 * o) # fields go bad on one 31 texels high
- p.frame([shape(build, o, o, o + w, o + h, 5)], 3.5, build, DARK, BEZEL_SCALE)
+ # China's terraces would draw a ridge across the face; its notched corners stay
+ p.frame([shape(build, o, o, o + w, o + h, 5)], 3.5, MOUNT_GLYPH_BUILD.get(build, build), DARK, BEZEL_SCALE)
p.bump([shape(build, o + 3, o + 3, o + w - 3, o + h - 3, 3)], 1.0 if state == "P" else 2.2, 1.4, ACCENT)
- off = o + (1 if state == "P" else 0)
- raised, ink, *again = icon(kind, w / 2 + off, h / 2 + off, build)
- p.inlay(raised + [q for polys in again for q in polys], ACCENT2, 0.8)
- if ink:
- p.inlay(ink, ACCENT, 0.0) # an outline glyph keeps its middle the face's
- return shade(p, look, shadow=False, falloff=False).crop((o, o, o + w, o + h))
+ img = shade(p, look, shadow=False, falloff=False).crop((o, o, o + w, o + h))
+ off = 1 if state == "P" else 0
+ raised, ink, *again = icon(kind, w / 2 + off, h / 2 + off, MOUNT_GLYPH_BUILD.get(build, build))
+ big = 4
+ mask = Image.new("L", (w * big, h * big), 0)
+ d = ImageDraw.Draw(mask)
+ for polys, fill in ((raised, 255), (ink, 0), ([q for polys in again for q in polys], 255)):
+ for q in polys:
+ d.polygon([(x * big, y * big) for x, y in q], fill=fill)
+ mask = mask.resize((w, h), Image.BOX)
+ colour = (96, 100, 104) if state == "I" else MOUNT_GLYPH[side_name]
+ glyph = Image.new("RGBA", (w, h), colour + (255,))
+ glyph.putalpha(mask)
+ img.alpha_composite(glyph)
+ return img
def paint_powers(side_name="America", svg_path=EMBLEM_SVG, frame=None, glow="B"):
@@ -1726,7 +1737,7 @@ def tip_card(side, head=False):
vents(p, W - 38, W - 18, 9, 21)
if full:
p.inlay([plate(8, 58.6, W - 44, 59.4)], ACCENT, 0.2)
- p.inlay(chevrons(W - 9, 33, 8, n=2), ACCENT2, 0.7)
+ p.inlay(chevrons(W - 9, 33, 8, n=2), ACCENT, 0.7) # blue: red there read as stray texels
p.stud(W - 9, 54, 3.0)
p.stud(W - 9, H - 9, 2.6)
elif build == "terraced": # cast in square terraces, a heavy rim round each well
@@ -1768,9 +1779,10 @@ def tip_card(side, head=False):
tip_soften(p, W, H, 1.5, head)
# no tiles: on the narrow right corners their grooves read as stray crosses and broke the
# 30 degree cut into steps (round 18's in-game shots)
+ # the rule and the marker in dark steel: no red on Turkiye's card
if full:
- p.inlay([plate(8, 58.6, W - 44, 59.4)], ACCENT, 0.2)
- p.inlay([triangle(W - 28, 15, 9, 10, "left")], ACCENT, 0.6)
+ p.inlay([plate(8, 58.6, W - 44, 59.4)], ACCENT2, 0.2)
+ p.inlay([triangle(W - 28, 15, 9, 10, "left")], ACCENT2, 0.6)
for x, y in ((W - 10, 42), (W - 10, H - 8)) if full else ((W - 10, H - 8),):
p.bump([regular(x, y, 3.0, 6, np.pi / 6)], 0.8, 1.2, BRIGHT)
else: # the console: radii, a bullnose, a grille, screws, the tally