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(controlbar): classic 16:9 command bar, centred hud frame on wider screens
Olcay Seygan2e71536be2c4
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 877a260a3..2a0adab6f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1089,8 +1089,8 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same- Display, graphics, effects, audio, controls, interface and network, behind seven buttons across the top. The original screen was one panel with everything on it at once, and it was already full the day it shipped: the language filter, the keyboard button and four camera checkboxes are all still in there, parked off the right edge where nobody can reach them, because there was nowhere left to put them.- Every setting sits with the ones that do the same kind of job. Display is the screen and its brightness. Graphics is what the picture costs and how sharp it is, with the glow and the lighting in a group of their own instead of mixed in with the anti-aliasing. Effects is what stands in the world: all seven shadow boxes together, cloud shadows included, then the scenery, then smoke. Controls splits the camera, the orders, building placement and the mouse into four groups, and Interface holds the command bar size, the income readout, the health bars, the colours, the order lines and the language. In Classic the screen leaves out the twelve boxes Classic ignores anyway, from zoom to cursor and grid placement to the HUD size and the health bar choice, and closes the gaps they leave, so a box on that screen always does something.- Classic Graphics, on the Graphics page, puts the game back the way it looked in 2003 in one click: its own textures and ground in place of the upscaled ones, the old hard shadows, the round dark patch under every tree where Reforged lays the tree's own outline on the ground, and no glow or sharpening over the picture. Leave it off and you have Reforged. The rest of the options stay yours either way, and the box takes effect the next time the game starts.-- Interface, in the launcher, picks between Classic and Reforged. Classic is the command bar, mouse and hotkeys of Zero Hour 1.04 that your hands still remember; Reforged is the console in the middle, right-click orders and the key grid this version built. Every player starts on Classic, and a game started without the launcher is Classic too. The choice is yours alone: two players on different styles still play the same match and the same replay. It takes effect the next time the game starts. Classic's screen is EA's again: the one-piece command bar in each side's own painting, the radar with its flashing under-attack lamp, the beacon button, six lines of messages in the top left that fade as they did, superweapon countdowns written out by name, the old chat line and quit menu, lettering at the old sizes, and Tab opening diplomacy. What it does not do is stretch. On a 16:9 or 21:9 screen the bar, the menus and every dialog sit in a 4:3 frame in the middle at their drawn shape, and the battlefield runs out to both edges past them; at 2560x1080 that is 560 pixels of ground on either side of the bar. The mouse and keys are 1.04's as well. The left button selects and gives the order, so an enemy under it is an attack and a bunker under your infantry is a way in; the right button drops your selection or takes back a half-given order, and a right drag scrolls the map. Ctrl held is force fire. Alt held lays waypoints, and the white path joining them is drawn again. A guard order holds the range it always held, Shift and a number adds that group to what you have selected, and a build button is one unit a click. The keys are your language's own key map from the game's files, with nothing of Reforged's grid laid over it, and a build button's key is the letter 1.04 gave it, taken from the English name in every language, so a Turkish or German player presses the same key an English one does. The letter sits in the button's corner on the dark badge Reforged puts its grid keys on, in the middle of a square plate the same size for every letter, larger than Reforged's and in gold while the button can be pressed; the tooltip's name is plain white with no letter picked out. A structure is selected on its own, as it always was. The radar shows no money piles or tech buildings, and the clock plate, the frame counter and the experience bar under the portrait stay off the screen. So does the peace time plate, though a host's truce still holds. The money readout is the money alone, with no income figure beside it. Health bars and garrison squares look and behave as they do in Reforged, and the Health Bars and empty garrison squares settings are back on Classic's options page. The build buttons are the pictures alone, without the seconds, price and power figures. Those seconds were measured against the wall clock, so on a match running just under full speed a 120 second build read 125. An upgrade bought for a group of buildings goes to the one whose buttons you see. In a network game a Classic player's camera is not sent to observers, as it never was in 1.04. The camera zooms on the middle of the screen ten units a notch, as near and as far as Reforged's camera goes, turns without snapping, and scrolls from the last three pixels of a full screen and not at all in a window, whatever the options say. A move order puts 1.04's animated ring on the ground where it lands, and no marker or line stays behind it. None of it reaches the battle itself: Classic sends the game only the orders 1.04 sent, so a Classic player and a Reforged one share a match, and a replay plays back the same in either.-- Classic shows what a factory is building again. Select one with anything queued and its queue takes the portrait's place, the unit in production wearing its build clock, and a click on any entry cancels it; the portrait comes back when the queue runs dry. Until now a Classic factory could queue a hundred units with nothing on screen to count them by. The queue stops at nine, the number of slots that show it, and the build buttons grey out at nine as they did in 1.04. Your general's powers sit in one row over the bar, growing to the left, each tray's right edge tucked under the next one with the picture left whole, where they used to climb the right edge of the screen three to a row. They carry how many are ready, with no key letter and no recharge seconds, and the promotion screen carries no number keys either, since Classic's number keys pick teams. Every button on that screen takes its click again: the right half used to sit under the powers bar's empty frame and the bottom row under the command bar's top edge, and a click there went nowhere.+- Interface, in the launcher, picks between Classic and Reforged. Classic is the command bar, mouse and hotkeys of Zero Hour 1.04 that your hands still remember; Reforged is the console in the middle, right-click orders and the key grid this version built. Every player starts on Classic, and a game started without the launcher is Classic too. The choice is yours alone: two players on different styles still play the same match and the same replay. It takes effect the next time the game starts. Classic's screen is EA's again: the one-piece command bar in each side's own painting, the radar with its flashing under-attack lamp, the beacon button, six lines of messages in the top left that fade as they did, superweapon countdowns written out by name, the old chat line and quit menu, lettering at the old sizes, and Tab opening diplomacy. On a 16:9 or 21:9 screen the menus and every dialog sit in a 4:3 frame in the middle at their drawn shape, and the battlefield runs out to both edges past them. The command bar runs edge to edge up to 16:9, as it always did. Past that, on 21:9 or 32:9, the match's own furniture keeps the 16:9 layout in the middle of the screen: the bar, your general's powers beside it, the promotion screen, the superweapon countdowns and the messages sit where a 16:9 screen has them, and the battlefield runs on past both ends, 320 pixels either side at 2560x1080. On 16:10 and anything wider the bar is one painted for 16:9, so it is not pulled out of shape the way EA's 4:3 one was: the radar and your selection sit at its two ends, the build grid has a longer field, the money box is in the middle and the power bar is nearly twice as long. A 4:3 or 5:4 screen keeps EA's bar as it was. The wide bar is the work of moddb_dev, from the "C&C Generals HD User Interface" mod on ModDB, itself built on pWn3d_1337's Operation Firestorm interface, and it is here with its author's permission. The mouse and keys are 1.04's as well. The left button selects and gives the order, so an enemy under it is an attack and a bunker under your infantry is a way in; the right button drops your selection or takes back a half-given order, and a right drag scrolls the map. Ctrl held is force fire. Alt held lays waypoints, and the white path joining them is drawn again. A guard order holds the range it always held, Shift and a number adds that group to what you have selected, and a build button is one unit a click. The keys are your language's own key map from the game's files, with nothing of Reforged's grid laid over it, and a build button's key is the letter 1.04 gave it, taken from the English name in every language, so a Turkish or German player presses the same key an English one does. The letter sits in the button's corner on the dark badge Reforged puts its grid keys on, in the middle of a square plate the same size for every letter, larger than Reforged's and in gold while the button can be pressed; the tooltip's name is plain white with no letter picked out. A structure is selected on its own, as it always was. The radar shows no money piles or tech buildings, and the clock plate, the frame counter and the experience bar under the portrait stay off the screen. So does the peace time plate, though a host's truce still holds. The money readout is the money alone, with no income figure beside it. Health bars and garrison squares look and behave as they do in Reforged, and the Health Bars and empty garrison squares settings are back on Classic's options page. The build buttons are the pictures alone, without the seconds, price and power figures. Those seconds were measured against the wall clock, so on a match running just under full speed a 120 second build read 125. An upgrade bought for a group of buildings goes to the one whose buttons you see. In a network game a Classic player's camera is not sent to observers, as it never was in 1.04. The camera zooms on the middle of the screen ten units a notch, as near and as far as Reforged's camera goes, turns without snapping, and scrolls from the last three pixels of a full screen and not at all in a window, whatever the options say. A move order puts 1.04's animated ring on the ground where it lands, and no marker or line stays behind it. None of it reaches the battle itself: Classic sends the game only the orders 1.04 sent, so a Classic player and a Reforged one share a match, and a replay plays back the same in either.+- Classic shows what a factory is building again. Select one with anything queued and its queue takes the portrait's place, the unit in production wearing its build clock, and a click on any entry cancels it; the portrait comes back when the queue runs dry. Until now a Classic factory could queue a hundred units with nothing on screen to count them by. The queue stops at nine, the number of slots that show it, and the build buttons grey out at nine as they did in 1.04. Your general's powers climb the right edge of the screen from the top of the bar, one over the other, as they did in 1.04, and the empty strip above them no longer swallows clicks on the battlefield. They carry how many are ready, with no key letter and no recharge seconds, and the promotion screen carries no number keys either, since Classic's number keys pick teams. Every button on that screen takes its click again: the right half used to sit under the powers bar's empty frame and the bottom row under the command bar's top edge, and a click there went nowhere.- Supply piles stop shouting their cash over the whole map. A small pile shows its amount only while your cursor is on it or close by, in a smaller font; a big supply dock keeps its label all the time. Classic has the same labels now, with the radar still leaving the piles off.- The Esc menu and the general's promotion screen close the way they open, in both interfaces. Both used to vanish in a single frame, and Classic's Esc menu had lost its opening flash as well. Classic plays 1.04's flash and fade, forwards to open and backwards to close; Reforged fades its pages out over a little more than a tenth of a second, as fast as they fade in.- Every graphics setting is on the Graphics and Effects pages. Shadows, clouds, ground lighting, soft water edges, trees, extra animations, heat haze, texture resolution and the particle limit used to hide in a popup that only opened if you picked Custom from the detail box on another page, so choosing High never showed you what High turns on. Pick a preset now and its settings change in front of you; touch any one of them and the box reads Custom. Texture filtering and the number of anisotropic samples, which needed a text editor, sit there too.@@ -1279,7 +1279,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same- A big smoke cloud darkens the ground under it and fades as it does.- Smoke and dust stand in the sunlight. A column off a burning building throws a soft shadow as thick as the smoke is: a puff of dust barely tints the sand, a black plume darkens the ground, the tanks and the houses under it and the smoke behind it. The column itself is bright on the side facing the sun and goes dark on the far side, and a cloud drifting through a building's shadow greys over with everything else in there. A cloud used to cast a round patch straight down whichever way the sun stood, and took no shade from anything. Fire casts nothing, it is light. A machine that cannot run the newer picture keeps the round patch.- Fire lights its own smoke. The bottom of a column over a burning tank glows orange from the flames under it and flickers with them, then goes grey as it climbs out of their reach; an explosion's flash warms the smoke drifting past it. Smoke used to keep the same flat grey right down into the fire. Both renderers draw it. On the newer picture the glow stays lit where the column's own shadow falls, so a fire burning on the far side of a plume still shows orange through it instead of going dark with the smoke around it.-- Rockets leave smoke. A Tank Hunter's or a Missile Defender's rocket, a Comanche's pods, a Raptor's missiles and a Patriot's used to fly on a thin bright line of fire and nothing else. Now a grey trail hangs behind each one for under two seconds and thins away before it gets wider than a tank, and on the newer picture it shades the ground under it like any other smoke. The fire line and the flash at the nose are still there. Scuds, Tomahawks and TOW missiles had their smoke already and keep it.+- Rockets leave smoke. A Tank Hunter's or a Missile Defender's rocket, a Comanche's pods, a Raptor's missiles and a Patriot's used to fly on a thin bright line of fire and nothing else. Now a thin white vapour line hangs behind each one for just over a second, the width of the rocket where it leaves and never wider than a third of a tank, and on the newer picture it shades the ground under it like any other smoke. The fire line and the flash at the nose are still there. Scuds, Tomahawks and TOW missiles get the same treatment: EA let their exhaust swell into an orange-grey column 40 to 55 across, wider than the launcher that fired it, and now it opens on a short warm flash at the nozzle and runs out as a white line 10 to 14 across.- The soft blob shadow for trees and scenery had never been drawn at all.- Every one of the 128 tree types casts now, plus the bushes and palms.- A tree's shadow is the tree. Trunk, crown, and the gaps between the leaves, lying along the@@ -1302,6 +1302,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same- An explosion lights everything around it, smoothly. On the default renderer the light of a blast reaches every tank, soldier, building and patch of ground it can see, fading out with distance, where the ground used to brighten in blocky squares and a model took only four lights at once, so in a big fight half the tanks next to a burning wreck stayed dark. The 32 blasts nearest the camera light at the same time, and a wall with its back to the fire stays in shadow. The light brightens what it falls on by three quarters at most: a nuke's took the ground to white within a few frames until it was held there.- A bright cloud no longer shows what is behind it as a line drawing. Inside a nuke's white cloud, or a falling War Factory's fireball, every tree and wreck under it used to come out as a thin grey outline, and the picture's sharpening ringed each dark piece in white. Both stop where the frame is bright.- Smoke and fire no longer end on a straight line where they meet the ground or a building. A puff that sinks into a hillside or drifts against a wall thins out over its last few metres, softly enough that a nuke's haze and a Scud's grey smoke no longer come out as stacked, stair-stepped terraces, and a toxin cloud lying low over the ground keeps its body instead of breaking into hard-edged green islands. This is the default renderer; Classic and the old renderer keep the hard edge they had in 2003.+- Toxin, anthrax and radiation pools lie on the ground. A pool is a carpet of puddle pictures spread up to 140 paces from where the shell or the spray came down, and every one of them was drawn dead flat at the height of that one spot: on a hillside the uphill half of the pool disappeared into the slope and the downhill half hung in the air above it. Each puddle now bends over the ground underneath it, on both renderers, and a pool on a bridge stays on the deck. The pool also stains the ground it covers, darker and tinted toward its own colour, green for toxin and the anthrax colours for anthrax, so it looks spilled rather than shone onto the grass.- A Scud Storm or a carpet bomb shakes the screen as hard as it should. The game cut a pile of heavy shakes back to a mild one, so a run of missiles or bombs landing together shook less than one of them alone. Each now shakes a step lighter and the run builds up. Demo traps and Aurora bombs shake now, and a falling building shakes harder the bigger it was.- The shake knows how close you are. A shell landing in the middle of the screen kicks the camera half as hard again as it used to, one at the edge of the range barely moves it, and a heavy hit settles over about a second instead of stopping dead after half of one. The cut that put a pile of shakes back to a mild one is gone too: past the limit the camera holds at full shake.- A damaged building's fires burn bigger, and its smoke runs darker and longer, the closer it gets to falling.diff --git a/GeneralsMD/Code/BuildFingerprint.manifest b/GeneralsMD/Code/BuildFingerprint.manifestindex 61aacfe89..4f0a8e778 100644--- a/GeneralsMD/Code/BuildFingerprint.manifest+++ b/GeneralsMD/Code/BuildFingerprint.manifest@@ -1,4 +1,7 @@CMakeLists.txt+Data/Art/Textures/ClassicWideBarAmerica.tga+Data/Art/Textures/ClassicWideBarChina.tga+Data/Art/Textures/ClassicWideBarGLA.tgaData/Art/Textures/ReforgedBarAmericaCenter.tgaData/Art/Textures/ReforgedBarAmericaLeft.tgaData/Art/Textures/ReforgedBarAmericaRight.tga@@ -76,8 +79,10 @@ Data/German/Generals.strData/INI/BalanceReforged.iniData/INI/CommandMapReforged.iniData/INI/CommandSetReforged.ini+Data/INI/ControlBarSchemeClassicWide.iniData/INI/FXListReforged.iniData/INI/FixesReforged.ini+Data/INI/MappedImages/HandCreated/ClassicWideBar.iniData/INI/MappedImages/HandCreated/ReforgedOrders.iniData/INI/ObjectCreationListReforged.iniData/INI/ParticleSystemReforged.inidiff --git a/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarAmerica.tga b/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarAmerica.tganew file mode 100644index 000000000..28f3a761dBinary files /dev/null and b/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarAmerica.tga differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarChina.tga b/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarChina.tganew file mode 100644index 000000000..2174aeadbBinary files /dev/null and b/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarChina.tga differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarGLA.tga b/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarGLA.tganew file mode 100644index 000000000..0b975a42bBinary files /dev/null and b/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarGLA.tga differdiff --git a/GeneralsMD/Code/Data/INI/ControlBarSchemeClassicWide.ini b/GeneralsMD/Code/Data/INI/ControlBarSchemeClassicWide.ininew file mode 100644index 000000000..9b24a0ebb--- /dev/null+++ b/GeneralsMD/Code/Data/INI/ControlBarSchemeClassicWide.ini@@ -0,0 +1,1249 @@+; The Classic interface's 16:9 command bar. Every scheme in EA's ControlBarScheme.ini has a twin+; here for the same side. Classic stretches the bar as the game shipped it, across the screen up to+; 16:9 and across a centred 16:9 frame on anything wider (HudRectForScreen), and wears whichever+; twin's shape is nearer the screen's (ControlBarSchemeManager,+; findSchemeForSide): this one on 16:10 and wider, EA's 800x600 on 4:3 and 5:4. The Reforged+; interface never uses these.+;+; Each block is EA's scheme with its painting swapped for MappedImages/HandCreated/ClassicWideBar.ini+; and its window corners (the ...UL/...LR pairs) taken from "C&C Generals HD User Interface" by+; moddb_dev (ModDB), built on pWn3d_1337's Operation Firestorm interface and used with its author's+; permission, for the side whose painting it wears. Coordinates are the mod's 1066x600: EA's 800 sits+; in the middle, so x 133 here is EA's 0. Not in the multiplayer INI checksum.+;+; Each painting's ImagePart runs down to y 600. The mod's own sizes stopped a unit or two short of+; it, and the battlefield showed through along the bottom edge of the screen.++ControlBarScheme AmericaClassicWide+ ScreenCreationRes X:1066 Y:600+ Side America+ QueueButtonImage SCBigButton+ RightHUDImage SALogo+ CommandBarBorderColor R:0 G:21 B:126 A:255 ;blue+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow++ GenBarButtonIn SABarButtonGen2IN+ GenBarButtonOn SABarButtonGen2ON++ ToggleButtonUpIn SAMinMaxUH+ ToggleButtonUpOn SAMinMaxU+ ToggleButtonUpPushed SAMinMaxUP++ ToggleButtonDownIn SAMinMaxH+ ToggleButtonDownOn SAMinMax+ ToggleButtonDownPushed SAMinMaxP++ OptionsButtonEnable SAOptions+ OptionsButtonHightlited SAOptionsH+ OptionsButtonPushed SAOptionsP++ IdleWorkerButtonEnable SAWorker+ IdleWorkerButtonHightlited SAWorkerH+ IdleWorkerButtonPushed SAWorkerP+ IdleWorkerButtonDisabled SAWorkerI+ BuddyButtonEnable SAChat+ BuddyButtonHightlited SAChatH+ BuddyButtonPushed SAChatP++ BeaconButtonEnable SABeacon+ BeaconButtonHightlited SABeaconH+ BeaconButtonPushed SABeaconP+OptionsButtonDisabled SAOptionsI+BuddyButtonDisabled SAChatI+BeaconButtonDisabled SABeaconI++ GeneralButtonEnable SAGeneral+ GeneralButtonHightlited SAGeneralH+ GeneralButtonPushed SAGeneralP+ GeneralButtonDisabled SAGeneralI++ UAttackButtonEnable SAUAttackI+ UAttackButtonHightlited SAUAttackH+ UAttackButtonPushed SAUAttackP++ MinMaxButtonEnable SAMinMax+ MinMaxButtonHightlited SAMinMaxH+ MinMaxButtonPushed SAMinMaxP++ MinMaxUL X:912 Y:432+ MinMaxLR X:984 Y:463+ GeneralUL X:985 Y:432+ GeneralLR X:1065 Y:463+ UAttackUL X:140 Y:412+ UAttackLR X:175 Y:430++ OptionsUL X:188 Y:492+ OptionsLR X:224 Y:516+ WorkerUL X:188 Y:518+ WorkerLR X:224 Y:542+ ChatUL X:188 Y:570+ ChatLR X:224 Y:594+ BeaconUL X:188 Y:544+ BeaconLR X:224 Y:568++ PowerBarUL X:260 Y:470+ PowerBarLR X:796 Y:476+ ExpBarForegroundImage SAExpBar+ MoneyUL X:480 Y:438+ MoneyLR X:581 Y:457++ GenArrow USLevelUP+ CommandMarkerImage SAEmptyFrame+ ImagePart+ Position X:0 Y:408+ Size X:1066 Y:192+ ImageName ClassicWideBarAmerica+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerWindow_American+End++ControlBarScheme GLAClassicWide+ ScreenCreationRes X:1066 Y:600+ Side GLA+ QueueButtonImage SCBigButton+ RightHUDImage SULogo+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow+ CommandBarBorderColor R:124 G:62 B:0 A:255 ;blue++ GenBarButtonIn SUBarButtonGen2IN+ GenBarButtonOn SUBarButtonGen2ON+ CommandMarkerImage SUEmptyFrame++ ToggleButtonUpIn SUMaxMinHU+ ToggleButtonUpOn SUMaxMinU+ ToggleButtonUpPushed SUMaxMinPU++ ToggleButtonDownIn SUMaxMinH+ ToggleButtonDownOn SUMaxMin+ ToggleButtonDownPushed SUMaxMinP++OptionsButtonDisabled SUOptionsI+BuddyButtonDisabled SUChatI+BeaconButtonDisabled SUBeaconI++ OptionsButtonEnable SUOptions+ OptionsButtonHightlited SUOptionsH+ OptionsButtonPushed SUOptionsP+ IdleWorkerButtonEnable SUWorkerE+ IdleWorkerButtonHightlited SUWorkerH+ IdleWorkerButtonPushed SUWorkerP+ IdleWorkerButtonDisabled SUWorkerI+ BuddyButtonEnable SUChat+ BuddyButtonHightlited SUChatH+ BuddyButtonPushed SUChatP++ BeaconButtonEnable SUBeacon+ BeaconButtonHightlited SUBeaconH+ BeaconButtonPushed SUBeaconP++ GeneralButtonEnable SUGeneral+ GeneralButtonHightlited SUGeneralH+ GeneralButtonPushed SUGeneralP+ GeneralButtonDisabled SUGeneralI++ UAttackButtonEnable SUUAttackI+ UAttackButtonHightlited SUUAttackH+ UAttackButtonPushed SUUAttackP++ MinMaxButtonEnable SUMinMax+ MinMaxButtonHightlited SUMinMaxH+ MinMaxButtonPushed SUMinMaxP++ MinMaxUL X:905 Y:433+ MinMaxLR X:964 Y:459+ GeneralUL X:988 Y:429+ GeneralLR X:1052 Y:458+ UAttackUL X:184 Y:426+ UAttackLR X:206 Y:450++ OptionsUL X:191 Y:492+ OptionsLR X:225 Y:516+ WorkerUL X:191 Y:518+ WorkerLR X:225 Y:542+ ChatUL X:191 Y:570+ ChatLR X:225 Y:594+ BeaconUL X:191 Y:544+ BeaconLR X:225 Y:568+ PowerBarUL X:259 Y:470+ PowerBarLR X:795 Y:476++ GenArrow GLALevelUP++ MoneyUL X:480 Y:443+ MoneyLR X:581 Y:462+ ExpBarForegroundImage SUExpBar+ ImagePart+ Position X:0 Y:399+ Size X:1066 Y:201+ ImageName ClassicWideBarGLA+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerWindow_GLA+End++ControlBarScheme ChinaClassicWide+ ScreenCreationRes X:1066 Y:600+ Side China+ QueueButtonImage SCBigButton+ RightHUDImage SNLogo+ CommandBarBorderColor R:90 G:125 B:2 A:255 ;blue+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow++ GenBarButtonIn SNBarButtonGen2IN+ GenBarButtonOn SNBarButtonGen2ON+ CommandMarkerImage SNEmptyFrame+ ToggleButtonUpIn SNMaxMinUH+ ToggleButtonUpOn SNMaxMinU+ ToggleButtonUpPushed SNMaxMinUP++ ToggleButtonDownIn SNMaxMinH+ ToggleButtonDownOn SNMaxMin+ ToggleButtonDownPushed SNMaxMinP++ OptionsButtonEnable SNOptions+ OptionsButtonHightlited SNOptionsH+ OptionsButtonPushed SNOptionsP+ IdleWorkerButtonEnable SNWorker+ IdleWorkerButtonHightlited SNWorkerH+ IdleWorkerButtonPushed SNWorkerP+ IdleWorkerButtonDisabled SNWorkerI+ BuddyButtonEnable SNChat+ BuddyButtonHightlited SNChatH+ BuddyButtonPushed SNChatP++OptionsButtonDisabled SNOptionsI+BuddyButtonDisabled SNChatI+BeaconButtonDisabled SNBeaconI++ BeaconButtonEnable SNBeacon+ BeaconButtonHightlited SNBeaconH+ BeaconButtonPushed SNBeaconP++ GeneralButtonEnable SNGeneral+ GeneralButtonHightlited SNGeneralH+ GeneralButtonPushed SNGeneralP+ GeneralButtonDisabled SNGeneralI++ UAttackButtonEnable SNUAttackI+ UAttackButtonHightlited SNUAttackH+ UAttackButtonPushed SNUAttackP++ MinMaxButtonEnable SNMaxMin+ MinMaxButtonHightlited SNMaxMinH+ MinMaxButtonPushed SNMaxMinP++ MinMaxUL X:906 Y:433+ MinMaxLR X:953 Y:464+ GeneralUL X:978 Y:433+ GeneralLR X:1036 Y:464+ UAttackUL X:97 Y:420+ UAttackLR X:132 Y:437++ OptionsUL X:189 Y:490+ OptionsLR X:225 Y:514+ WorkerUL X:189 Y:516+ WorkerLR X:225 Y:540+ ChatUL X:189 Y:568+ ChatLR X:225 Y:592+ BeaconUL X:189 Y:545+ BeaconLR X:225 Y:566+ PowerBarUL X:260 Y:469+ PowerBarLR X:796 Y:475++ MoneyUL X:480 Y:437+ MoneyLR X:581 Y:456++ GenArrow CHINALevelUP++ ExpBarForegroundImage SNExpBar+ ImagePart+ Position X:0 Y:414+ Size X:1066 Y:186+ ImageName ClassicWideBarChina+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerMenu_China+End++ControlBarScheme ObserverClassicWide+ ScreenCreationRes X:1066 Y:600+ Side Observer+ QueueButtonImage SCBigButton+ RightHUDImage SALogo+ CommandBarBorderColor R:0 G:21 B:126 A:255 ;blue+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow++ GenBarButtonIn SABarButtonGen2IN+ GenBarButtonOn SABarButtonGen2ON++ ToggleButtonUpIn SAMinMaxUH+ ToggleButtonUpOn SAMinMaxU+ ToggleButtonUpPushed SAMinMaxUP++ ToggleButtonDownIn SAMinMaxH+ ToggleButtonDownOn SAMinMax+ ToggleButtonDownPushed SAMinMaxP++ OptionsButtonEnable SAOptions+ OptionsButtonHightlited SAOptionsH+ OptionsButtonPushed SAOptionsP+ IdleWorkerButtonEnable SAWorker+ IdleWorkerButtonHightlited SAWorkerH+ IdleWorkerButtonPushed SAWorkerP+ IdleWorkerButtonDisabled SAWorkerI+ BuddyButtonEnable SAChat+ BuddyButtonHightlited SAChatH+ BuddyButtonPushed SAChatP++ BeaconButtonEnable SABeacon+ BeaconButtonHightlited SABeaconH+ BeaconButtonPushed SABeaconP++ GeneralButtonEnable SAGeneral+ GeneralButtonHightlited SAGeneralH+ GeneralButtonPushed SAGeneralP+ GeneralButtonDisabled SAGeneralI+OptionsButtonDisabled SAOptionsI+BuddyButtonDisabled SAChatI+BeaconButtonDisabled SABeaconI+ UAttackButtonEnable SAUAttackI+ UAttackButtonHightlited SAUAttackH+ UAttackButtonPushed SAUAttackP++ MinMaxButtonEnable SAMinMax+ MinMaxButtonHightlited SAMinMaxH+ MinMaxButtonPushed SAMinMaxP+ MinMaxUL X:912 Y:432+ MinMaxLR X:984 Y:463+ GeneralUL X:985 Y:432+ GeneralLR X:1065 Y:463+ UAttackUL X:140 Y:412+ UAttackLR X:175 Y:430++ OptionsUL X:188 Y:492+ OptionsLR X:224 Y:516+ WorkerUL X:188 Y:518+ WorkerLR X:224 Y:542+ ChatUL X:188 Y:570+ ChatLR X:224 Y:594+ BeaconUL X:188 Y:544+ BeaconLR X:224 Y:568++ PowerBarUL X:260 Y:470+ PowerBarLR X:796 Y:476+ ExpBarForegroundImage SAExpBar+ MoneyUL X:480 Y:438+ MoneyLR X:581 Y:457++ CommandMarkerImage SAEmptyFrame+ ImagePart+ Position X:0 Y:408+ Size X:1066 Y:192+ ImageName ClassicWideBarAmerica+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerMenu_China+End++ControlBarScheme AmericaSuperWeaponGeneralClassicWide+ ScreenCreationRes X:1066 Y:600+ Side AmericaSuperWeaponGeneral+ QueueButtonImage SCBigButton+ RightHUDImage SALogo+ CommandBarBorderColor R:0 G:21 B:126 A:255 ;blue+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow++ GenBarButtonIn SABarButtonGen2IN+ GenBarButtonOn SABarButtonGen2ON++ ToggleButtonUpIn SAMinMaxUH+ ToggleButtonUpOn SAMinMaxU+ ToggleButtonUpPushed SAMinMaxUP++ ToggleButtonDownIn SAMinMaxH+ ToggleButtonDownOn SAMinMax+ ToggleButtonDownPushed SAMinMaxP++ OptionsButtonEnable SAOptions+ OptionsButtonHightlited SAOptionsH+ OptionsButtonPushed SAOptionsP++ IdleWorkerButtonEnable SAWorker+ IdleWorkerButtonHightlited SAWorkerH+ IdleWorkerButtonPushed SAWorkerP+ IdleWorkerButtonDisabled SAWorkerI+ BuddyButtonEnable SAChat+ BuddyButtonHightlited SAChatH+ BuddyButtonPushed SAChatP++ BeaconButtonEnable SABeacon+ BeaconButtonHightlited SABeaconH+ BeaconButtonPushed SABeaconP+OptionsButtonDisabled SAOptionsI+BuddyButtonDisabled SAChatI+BeaconButtonDisabled SABeaconI++ GeneralButtonEnable SAGeneral+ GeneralButtonHightlited SAGeneralH+ GeneralButtonPushed SAGeneralP+ GeneralButtonDisabled SAGeneralI++ UAttackButtonEnable SAUAttackI+ UAttackButtonHightlited SAUAttackH+ UAttackButtonPushed SAUAttackP++ MinMaxButtonEnable SAMinMax+ MinMaxButtonHightlited SAMinMaxH+ MinMaxButtonPushed SAMinMaxP++ MinMaxUL X:912 Y:432+ MinMaxLR X:984 Y:463+ GeneralUL X:985 Y:432+ GeneralLR X:1065 Y:463+ UAttackUL X:140 Y:412+ UAttackLR X:175 Y:430++ OptionsUL X:188 Y:492+ OptionsLR X:224 Y:516+ WorkerUL X:188 Y:518+ WorkerLR X:224 Y:542+ ChatUL X:188 Y:570+ ChatLR X:224 Y:594+ BeaconUL X:188 Y:544+ BeaconLR X:224 Y:568++ PowerBarUL X:260 Y:470+ PowerBarLR X:796 Y:476+ ExpBarForegroundImage SAExpBar+ MoneyUL X:480 Y:438+ MoneyLR X:581 Y:457++ GenArrow USLevelUP+ CommandMarkerImage SAEmptyFrame+ ImagePart+ Position X:0 Y:408+ Size X:1066 Y:192+ ImageName ClassicWideBarAmerica+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerWindow_American+End++ControlBarScheme AmericaLaserGeneralClassicWide+ ScreenCreationRes X:1066 Y:600+ Side AmericaLaserGeneral+ QueueButtonImage SCBigButton+ RightHUDImage SALogo+ CommandBarBorderColor R:0 G:21 B:126 A:255 ;blue+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow++ GenBarButtonIn SABarButtonGen2IN+ GenBarButtonOn SABarButtonGen2ON++ ToggleButtonUpIn SAMinMaxUH+ ToggleButtonUpOn SAMinMaxU+ ToggleButtonUpPushed SAMinMaxUP++ ToggleButtonDownIn SAMinMaxH+ ToggleButtonDownOn SAMinMax+ ToggleButtonDownPushed SAMinMaxP++ OptionsButtonEnable SAOptions+ OptionsButtonHightlited SAOptionsH+ OptionsButtonPushed SAOptionsP++ IdleWorkerButtonEnable SAWorker+ IdleWorkerButtonHightlited SAWorkerH+ IdleWorkerButtonPushed SAWorkerP+ IdleWorkerButtonDisabled SAWorkerI+ BuddyButtonEnable SAChat+ BuddyButtonHightlited SAChatH+ BuddyButtonPushed SAChatP++ BeaconButtonEnable SABeacon+ BeaconButtonHightlited SABeaconH+ BeaconButtonPushed SABeaconP+OptionsButtonDisabled SAOptionsI+BuddyButtonDisabled SAChatI+BeaconButtonDisabled SABeaconI++ GeneralButtonEnable SAGeneral+ GeneralButtonHightlited SAGeneralH+ GeneralButtonPushed SAGeneralP+ GeneralButtonDisabled SAGeneralI++ UAttackButtonEnable SAUAttackI+ UAttackButtonHightlited SAUAttackH+ UAttackButtonPushed SAUAttackP++ MinMaxButtonEnable SAMinMax+ MinMaxButtonHightlited SAMinMaxH+ MinMaxButtonPushed SAMinMaxP++ MinMaxUL X:912 Y:432+ MinMaxLR X:984 Y:463+ GeneralUL X:985 Y:432+ GeneralLR X:1065 Y:463+ UAttackUL X:140 Y:412+ UAttackLR X:175 Y:430++ OptionsUL X:188 Y:492+ OptionsLR X:224 Y:516+ WorkerUL X:188 Y:518+ WorkerLR X:224 Y:542+ ChatUL X:188 Y:570+ ChatLR X:224 Y:594+ BeaconUL X:188 Y:544+ BeaconLR X:224 Y:568++ PowerBarUL X:260 Y:470+ PowerBarLR X:796 Y:476+ ExpBarForegroundImage SAExpBar+ MoneyUL X:480 Y:438+ MoneyLR X:581 Y:457++ GenArrow USLevelUP+ CommandMarkerImage SAEmptyFrame+ ImagePart+ Position X:0 Y:408+ Size X:1066 Y:192+ ImageName ClassicWideBarAmerica+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerWindow_American+End++ControlBarScheme AmericaAirForceGeneralClassicWide+ ScreenCreationRes X:1066 Y:600+ Side AmericaAirForceGeneral+ QueueButtonImage SCBigButton+ RightHUDImage SALogo+ CommandBarBorderColor R:0 G:21 B:126 A:255 ;blue+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow++ GenBarButtonIn SABarButtonGen2IN+ GenBarButtonOn SABarButtonGen2ON++ ToggleButtonUpIn SAMinMaxUH+ ToggleButtonUpOn SAMinMaxU+ ToggleButtonUpPushed SAMinMaxUP++ ToggleButtonDownIn SAMinMaxH+ ToggleButtonDownOn SAMinMax+ ToggleButtonDownPushed SAMinMaxP++ OptionsButtonEnable SAOptions+ OptionsButtonHightlited SAOptionsH+ OptionsButtonPushed SAOptionsP++ IdleWorkerButtonEnable SAWorker+ IdleWorkerButtonHightlited SAWorkerH+ IdleWorkerButtonPushed SAWorkerP+ IdleWorkerButtonDisabled SAWorkerI+ BuddyButtonEnable SAChat+ BuddyButtonHightlited SAChatH+ BuddyButtonPushed SAChatP++ BeaconButtonEnable SABeacon+ BeaconButtonHightlited SABeaconH+ BeaconButtonPushed SABeaconP+OptionsButtonDisabled SAOptionsI+BuddyButtonDisabled SAChatI+BeaconButtonDisabled SABeaconI++ GeneralButtonEnable SAGeneral+ GeneralButtonHightlited SAGeneralH+ GeneralButtonPushed SAGeneralP+ GeneralButtonDisabled SAGeneralI++ UAttackButtonEnable SAUAttackI+ UAttackButtonHightlited SAUAttackH+ UAttackButtonPushed SAUAttackP++ MinMaxButtonEnable SAMinMax+ MinMaxButtonHightlited SAMinMaxH+ MinMaxButtonPushed SAMinMaxP++ MinMaxUL X:912 Y:432+ MinMaxLR X:984 Y:463+ GeneralUL X:985 Y:432+ GeneralLR X:1065 Y:463+ UAttackUL X:140 Y:412+ UAttackLR X:175 Y:430++ OptionsUL X:188 Y:492+ OptionsLR X:224 Y:516+ WorkerUL X:188 Y:518+ WorkerLR X:224 Y:542+ ChatUL X:188 Y:570+ ChatLR X:224 Y:594+ BeaconUL X:188 Y:544+ BeaconLR X:224 Y:568++ PowerBarUL X:260 Y:470+ PowerBarLR X:796 Y:476+ ExpBarForegroundImage SAExpBar+ MoneyUL X:480 Y:438+ MoneyLR X:581 Y:457++ GenArrow USLevelUP+ CommandMarkerImage SAEmptyFrame+ ImagePart+ Position X:0 Y:408+ Size X:1066 Y:192+ ImageName ClassicWideBarAmerica+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerWindow_American+End++ControlBarScheme ChinaTankGeneralClassicWide+ ScreenCreationRes X:1066 Y:600+ Side ChinaTankGeneral+ QueueButtonImage SCBigButton+ RightHUDImage SNLogo+ CommandBarBorderColor R:90 G:125 B:2 A:255 ;blue+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow++ GenBarButtonIn SNBarButtonGen2IN+ GenBarButtonOn SNBarButtonGen2ON+ CommandMarkerImage SNEmptyFrame+ ToggleButtonUpIn SNMaxMinUH+ ToggleButtonUpOn SNMaxMinU+ ToggleButtonUpPushed SNMaxMinUP++ ToggleButtonDownIn SNMaxMinH+ ToggleButtonDownOn SNMaxMin+ ToggleButtonDownPushed SNMaxMinP++ OptionsButtonEnable SNOptions+ OptionsButtonHightlited SNOptionsH+ OptionsButtonPushed SNOptionsP+ IdleWorkerButtonEnable SNWorker+ IdleWorkerButtonHightlited SNWorkerH+ IdleWorkerButtonPushed SNWorkerP+ IdleWorkerButtonDisabled SNWorkerI+ BuddyButtonEnable SNChat+ BuddyButtonHightlited SNChatH+ BuddyButtonPushed SNChatP++OptionsButtonDisabled SNOptionsI+BuddyButtonDisabled SNChatI+BeaconButtonDisabled SNBeaconI++ BeaconButtonEnable SNBeacon+ BeaconButtonHightlited SNBeaconH+ BeaconButtonPushed SNBeaconP++ GeneralButtonEnable SNGeneral+ GeneralButtonHightlited SNGeneralH+ GeneralButtonPushed SNGeneralP+ GeneralButtonDisabled SNGeneralI++ UAttackButtonEnable SNUAttackI+ UAttackButtonHightlited SNUAttackH+ UAttackButtonPushed SNUAttackP++ MinMaxButtonEnable SNMaxMin+ MinMaxButtonHightlited SNMaxMinH+ MinMaxButtonPushed SNMaxMinP++ MinMaxUL X:906 Y:433+ MinMaxLR X:953 Y:464+ GeneralUL X:978 Y:433+ GeneralLR X:1036 Y:464+ UAttackUL X:97 Y:420+ UAttackLR X:132 Y:437++ OptionsUL X:189 Y:490+ OptionsLR X:225 Y:514+ WorkerUL X:189 Y:516+ WorkerLR X:225 Y:540+ ChatUL X:189 Y:568+ ChatLR X:225 Y:592+ BeaconUL X:189 Y:545+ BeaconLR X:225 Y:566+ PowerBarUL X:260 Y:469+ PowerBarLR X:796 Y:475++ MoneyUL X:480 Y:437+ MoneyLR X:581 Y:456++ GenArrow CHINALevelUP++ ExpBarForegroundImage SNExpBar+ ImagePart+ Position X:0 Y:414+ Size X:1066 Y:186+ ImageName ClassicWideBarChina+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerMenu_China+End++ControlBarScheme ChinaInfantryGeneralClassicWide+ ScreenCreationRes X:1066 Y:600+ Side ChinaInfantryGeneral+ QueueButtonImage SCBigButton+ RightHUDImage SNLogo+ CommandBarBorderColor R:90 G:125 B:2 A:255 ;blue+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow++ GenBarButtonIn SNBarButtonGen2IN+ GenBarButtonOn SNBarButtonGen2ON+ CommandMarkerImage SNEmptyFrame+ ToggleButtonUpIn SNMaxMinUH+ ToggleButtonUpOn SNMaxMinU+ ToggleButtonUpPushed SNMaxMinUP++ ToggleButtonDownIn SNMaxMinH+ ToggleButtonDownOn SNMaxMin+ ToggleButtonDownPushed SNMaxMinP++ OptionsButtonEnable SNOptions+ OptionsButtonHightlited SNOptionsH+ OptionsButtonPushed SNOptionsP+ IdleWorkerButtonEnable SNWorker+ IdleWorkerButtonHightlited SNWorkerH+ IdleWorkerButtonPushed SNWorkerP+ IdleWorkerButtonDisabled SNWorkerI+ BuddyButtonEnable SNChat+ BuddyButtonHightlited SNChatH+ BuddyButtonPushed SNChatP++OptionsButtonDisabled SNOptionsI+BuddyButtonDisabled SNChatI+BeaconButtonDisabled SNBeaconI++ BeaconButtonEnable SNBeacon+ BeaconButtonHightlited SNBeaconH+ BeaconButtonPushed SNBeaconP++ GeneralButtonEnable SNGeneral+ GeneralButtonHightlited SNGeneralH+ GeneralButtonPushed SNGeneralP+ GeneralButtonDisabled SNGeneralI++ UAttackButtonEnable SNUAttackI+ UAttackButtonHightlited SNUAttackH+ UAttackButtonPushed SNUAttackP++ MinMaxButtonEnable SNMaxMin+ MinMaxButtonHightlited SNMaxMinH+ MinMaxButtonPushed SNMaxMinP++ MinMaxUL X:906 Y:433+ MinMaxLR X:953 Y:464+ GeneralUL X:978 Y:433+ GeneralLR X:1036 Y:464+ UAttackUL X:97 Y:420+ UAttackLR X:132 Y:437++ OptionsUL X:189 Y:490+ OptionsLR X:225 Y:514+ WorkerUL X:189 Y:516+ WorkerLR X:225 Y:540+ ChatUL X:189 Y:568+ ChatLR X:225 Y:592+ BeaconUL X:189 Y:545+ BeaconLR X:225 Y:566+ PowerBarUL X:260 Y:469+ PowerBarLR X:796 Y:475++ MoneyUL X:480 Y:437+ MoneyLR X:581 Y:456++ GenArrow CHINALevelUP++ ExpBarForegroundImage SNExpBar+ ImagePart+ Position X:0 Y:414+ Size X:1066 Y:186+ ImageName ClassicWideBarChina+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerMenu_China++End++ControlBarScheme ChinaNukeGeneralClassicWide+ ScreenCreationRes X:1066 Y:600+ Side ChinaNukeGeneral+ QueueButtonImage SCBigButton+ RightHUDImage SNLogo+ CommandBarBorderColor R:90 G:125 B:2 A:255 ;blue+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow++ GenBarButtonIn SNBarButtonGen2IN+ GenBarButtonOn SNBarButtonGen2ON+ CommandMarkerImage SNEmptyFrame+ ToggleButtonUpIn SNMaxMinUH+ ToggleButtonUpOn SNMaxMinU+ ToggleButtonUpPushed SNMaxMinUP++ ToggleButtonDownIn SNMaxMinH+ ToggleButtonDownOn SNMaxMin+ ToggleButtonDownPushed SNMaxMinP++ OptionsButtonEnable SNOptions+ OptionsButtonHightlited SNOptionsH+ OptionsButtonPushed SNOptionsP+ IdleWorkerButtonEnable SNWorker+ IdleWorkerButtonHightlited SNWorkerH+ IdleWorkerButtonPushed SNWorkerP+ IdleWorkerButtonDisabled SNWorkerI+ BuddyButtonEnable SNChat+ BuddyButtonHightlited SNChatH+ BuddyButtonPushed SNChatP++OptionsButtonDisabled SNOptionsI+BuddyButtonDisabled SNChatI+BeaconButtonDisabled SNBeaconI++ BeaconButtonEnable SNBeacon+ BeaconButtonHightlited SNBeaconH+ BeaconButtonPushed SNBeaconP++ GeneralButtonEnable SNGeneral+ GeneralButtonHightlited SNGeneralH+ GeneralButtonPushed SNGeneralP+ GeneralButtonDisabled SNGeneralI++ UAttackButtonEnable SNUAttackI+ UAttackButtonHightlited SNUAttackH+ UAttackButtonPushed SNUAttackP++ MinMaxButtonEnable SNMaxMin+ MinMaxButtonHightlited SNMaxMinH+ MinMaxButtonPushed SNMaxMinP++ MinMaxUL X:906 Y:433+ MinMaxLR X:953 Y:464+ GeneralUL X:978 Y:433+ GeneralLR X:1036 Y:464+ UAttackUL X:97 Y:420+ UAttackLR X:132 Y:437++ OptionsUL X:189 Y:490+ OptionsLR X:225 Y:514+ WorkerUL X:189 Y:516+ WorkerLR X:225 Y:540+ ChatUL X:189 Y:568+ ChatLR X:225 Y:592+ BeaconUL X:189 Y:545+ BeaconLR X:225 Y:566+ PowerBarUL X:260 Y:469+ PowerBarLR X:796 Y:475++ MoneyUL X:480 Y:437+ MoneyLR X:581 Y:456++ GenArrow CHINALevelUP++ ExpBarForegroundImage SNExpBar+ ImagePart+ Position X:0 Y:414+ Size X:1066 Y:186+ ImageName ClassicWideBarChina+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerMenu_China++End++ControlBarScheme GLAToxinGeneralClassicWide+ ScreenCreationRes X:1066 Y:600+ Side GLAToxinGeneral+ QueueButtonImage SCBigButton+ RightHUDImage SULogo+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow+ CommandBarBorderColor R:124 G:62 B:0 A:255 ;blue++ GenBarButtonIn SUBarButtonGen2IN+ GenBarButtonOn SUBarButtonGen2ON+ CommandMarkerImage SUEmptyFrame++ ToggleButtonUpIn SUMaxMinHU+ ToggleButtonUpOn SUMaxMinU+ ToggleButtonUpPushed SUMaxMinPU++ ToggleButtonDownIn SUMaxMinH+ ToggleButtonDownOn SUMaxMin+ ToggleButtonDownPushed SUMaxMinP++OptionsButtonDisabled SUOptionsI+BuddyButtonDisabled SUChatI+BeaconButtonDisabled SUBeaconI++ OptionsButtonEnable SUOptions+ OptionsButtonHightlited SUOptionsH+ OptionsButtonPushed SUOptionsP+ IdleWorkerButtonEnable SUWorkerE+ IdleWorkerButtonHightlited SUWorkerH+ IdleWorkerButtonPushed SUWorkerP+ IdleWorkerButtonDisabled SUWorkerI+ BuddyButtonEnable SUChat+ BuddyButtonHightlited SUChatH+ BuddyButtonPushed SUChatP++ BeaconButtonEnable SUBeacon+ BeaconButtonHightlited SUBeaconH+ BeaconButtonPushed SUBeaconP++ GeneralButtonEnable SUGeneral+ GeneralButtonHightlited SUGeneralH+ GeneralButtonPushed SUGeneralP+ GeneralButtonDisabled SUGeneralI++ UAttackButtonEnable SUUAttackI+ UAttackButtonHightlited SUUAttackH+ UAttackButtonPushed SUUAttackP++ MinMaxButtonEnable SUMinMax+ MinMaxButtonHightlited SUMinMaxH+ MinMaxButtonPushed SUMinMaxP++ MinMaxUL X:905 Y:433+ MinMaxLR X:964 Y:459+ GeneralUL X:988 Y:429+ GeneralLR X:1052 Y:458+ UAttackUL X:184 Y:426+ UAttackLR X:206 Y:450++ OptionsUL X:191 Y:492+ OptionsLR X:225 Y:516+ WorkerUL X:191 Y:518+ WorkerLR X:225 Y:542+ ChatUL X:191 Y:570+ ChatLR X:225 Y:594+ BeaconUL X:191 Y:544+ BeaconLR X:225 Y:568+ PowerBarUL X:259 Y:470+ PowerBarLR X:795 Y:476++ GenArrow GLALevelUP++ MoneyUL X:480 Y:443+ MoneyLR X:581 Y:462+ ExpBarForegroundImage SUExpBar+ ImagePart+ Position X:0 Y:399+ Size X:1066 Y:201+ ImageName ClassicWideBarGLA+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerWindow_GLA++End++ControlBarScheme GLADemolitionGeneralClassicWide+ ScreenCreationRes X:1066 Y:600+ Side GLADemolitionGeneral+ QueueButtonImage SCBigButton+ RightHUDImage SULogo+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow+ CommandBarBorderColor R:124 G:62 B:0 A:255 ;blue++ GenBarButtonIn SUBarButtonGen2IN+ GenBarButtonOn SUBarButtonGen2ON+ CommandMarkerImage SUEmptyFrame++ ToggleButtonUpIn SUMaxMinHU+ ToggleButtonUpOn SUMaxMinU+ ToggleButtonUpPushed SUMaxMinPU++ ToggleButtonDownIn SUMaxMinH+ ToggleButtonDownOn SUMaxMin+ ToggleButtonDownPushed SUMaxMinP++OptionsButtonDisabled SUOptionsI+BuddyButtonDisabled SUChatI+BeaconButtonDisabled SUBeaconI++ OptionsButtonEnable SUOptions+ OptionsButtonHightlited SUOptionsH+ OptionsButtonPushed SUOptionsP+ IdleWorkerButtonEnable SUWorkerE+ IdleWorkerButtonHightlited SUWorkerH+ IdleWorkerButtonPushed SUWorkerP+ IdleWorkerButtonDisabled SUWorkerI+ BuddyButtonEnable SUChat+ BuddyButtonHightlited SUChatH+ BuddyButtonPushed SUChatP++ BeaconButtonEnable SUBeacon+ BeaconButtonHightlited SUBeaconH+ BeaconButtonPushed SUBeaconP++ GeneralButtonEnable SUGeneral+ GeneralButtonHightlited SUGeneralH+ GeneralButtonPushed SUGeneralP+ GeneralButtonDisabled SUGeneralI++ UAttackButtonEnable SUUAttackI+ UAttackButtonHightlited SUUAttackH+ UAttackButtonPushed SUUAttackP++ MinMaxButtonEnable SUMinMax+ MinMaxButtonHightlited SUMinMaxH+ MinMaxButtonPushed SUMinMaxP++ MinMaxUL X:905 Y:433+ MinMaxLR X:964 Y:459+ GeneralUL X:988 Y:429+ GeneralLR X:1052 Y:458+ UAttackUL X:184 Y:426+ UAttackLR X:206 Y:450++ OptionsUL X:191 Y:492+ OptionsLR X:225 Y:516+ WorkerUL X:191 Y:518+ WorkerLR X:225 Y:542+ ChatUL X:191 Y:570+ ChatLR X:225 Y:594+ BeaconUL X:191 Y:544+ BeaconLR X:225 Y:568+ PowerBarUL X:259 Y:470+ PowerBarLR X:795 Y:476++ GenArrow GLALevelUP++ MoneyUL X:480 Y:443+ MoneyLR X:581 Y:462+ ExpBarForegroundImage SUExpBar+ ImagePart+ Position X:0 Y:399+ Size X:1066 Y:201+ ImageName ClassicWideBarGLA+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerWindow_GLA++End++ControlBarScheme GLAStealthGeneralClassicWide+ ScreenCreationRes X:1066 Y:600+ Side GLAStealthGeneral+ QueueButtonImage SCBigButton+ RightHUDImage SULogo+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow+ CommandBarBorderColor R:124 G:62 B:0 A:255 ;blue++ GenBarButtonIn SUBarButtonGen2IN+ GenBarButtonOn SUBarButtonGen2ON+ CommandMarkerImage SUEmptyFrame++ ToggleButtonUpIn SUMaxMinHU+ ToggleButtonUpOn SUMaxMinU+ ToggleButtonUpPushed SUMaxMinPU++ ToggleButtonDownIn SUMaxMinH+ ToggleButtonDownOn SUMaxMin+ ToggleButtonDownPushed SUMaxMinP++OptionsButtonDisabled SUOptionsI+BuddyButtonDisabled SUChatI+BeaconButtonDisabled SUBeaconI++ OptionsButtonEnable SUOptions+ OptionsButtonHightlited SUOptionsH+ OptionsButtonPushed SUOptionsP+ IdleWorkerButtonEnable SUWorkerE+ IdleWorkerButtonHightlited SUWorkerH+ IdleWorkerButtonPushed SUWorkerP+ IdleWorkerButtonDisabled SUWorkerI+ BuddyButtonEnable SUChat+ BuddyButtonHightlited SUChatH+ BuddyButtonPushed SUChatP++ BeaconButtonEnable SUBeacon+ BeaconButtonHightlited SUBeaconH+ BeaconButtonPushed SUBeaconP++ GeneralButtonEnable SUGeneral+ GeneralButtonHightlited SUGeneralH+ GeneralButtonPushed SUGeneralP+ GeneralButtonDisabled SUGeneralI++ UAttackButtonEnable SUUAttackI+ UAttackButtonHightlited SUUAttackH+ UAttackButtonPushed SUUAttackP++ MinMaxButtonEnable SUMinMax+ MinMaxButtonHightlited SUMinMaxH+ MinMaxButtonPushed SUMinMaxP++ MinMaxUL X:905 Y:433+ MinMaxLR X:964 Y:459+ GeneralUL X:988 Y:429+ GeneralLR X:1052 Y:458+ UAttackUL X:184 Y:426+ UAttackLR X:206 Y:450++ OptionsUL X:191 Y:492+ OptionsLR X:225 Y:516+ WorkerUL X:191 Y:518+ WorkerLR X:225 Y:542+ ChatUL X:191 Y:570+ ChatLR X:225 Y:594+ BeaconUL X:191 Y:544+ BeaconLR X:225 Y:568+ PowerBarUL X:259 Y:470+ PowerBarLR X:795 Y:476++ GenArrow GLALevelUP++ MoneyUL X:480 Y:443+ MoneyLR X:581 Y:462+ ExpBarForegroundImage SUExpBar+ ImagePart+ Position X:0 Y:399+ Size X:1066 Y:201+ ImageName ClassicWideBarGLA+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerWindow_GLA++End++ControlBarScheme ChinaBossGeneralClassicWide+ ScreenCreationRes X:1066 Y:600+ Side Boss+ QueueButtonImage SCBigButton+ RightHUDImage SNLogo+ CommandBarBorderColor R:90 G:125 B:2 A:255 ;blue+ BuildUpClockColor R:0 G:0 B:0 A:160+ ButtonBorderBuildColor R:67 G:108 B:190 A:255 ;blue+ ButtonBorderActionColor R:1 G:175 B:2 A:255 ;Green+ ButtonBorderUpgradeColor R:208 G:108 B:0 A:255 ;Orange+ ButtonBorderSystemColor R:207 G:195 B:2 A:255 ;yellow++ GenBarButtonIn SNBarButtonGen2IN+ GenBarButtonOn SNBarButtonGen2ON+ CommandMarkerImage SNEmptyFrame+ ToggleButtonUpIn SNMaxMinUH+ ToggleButtonUpOn SNMaxMinU+ ToggleButtonUpPushed SNMaxMinUP++ ToggleButtonDownIn SNMaxMinH+ ToggleButtonDownOn SNMaxMin+ ToggleButtonDownPushed SNMaxMinP++ OptionsButtonEnable SNOptions+ OptionsButtonHightlited SNOptionsH+ OptionsButtonPushed SNOptionsP+ IdleWorkerButtonEnable SNWorker+ IdleWorkerButtonHightlited SNWorkerH+ IdleWorkerButtonPushed SNWorkerP+ IdleWorkerButtonDisabled SNWorkerI+ BuddyButtonEnable SNChat+ BuddyButtonHightlited SNChatH+ BuddyButtonPushed SNChatP++OptionsButtonDisabled SNOptionsI+BuddyButtonDisabled SNChatI+BeaconButtonDisabled SNBeaconI++ BeaconButtonEnable SNBeacon+ BeaconButtonHightlited SNBeaconH+ BeaconButtonPushed SNBeaconP++ GeneralButtonEnable SNGeneral+ GeneralButtonHightlited SNGeneralH+ GeneralButtonPushed SNGeneralP+ GeneralButtonDisabled SNGeneralI++ UAttackButtonEnable SNUAttackI+ UAttackButtonHightlited SNUAttackH+ UAttackButtonPushed SNUAttackP++ MinMaxButtonEnable SNMaxMin+ MinMaxButtonHightlited SNMaxMinH+ MinMaxButtonPushed SNMaxMinP++ MinMaxUL X:906 Y:433+ MinMaxLR X:953 Y:464+ GeneralUL X:978 Y:433+ GeneralLR X:1036 Y:464+ UAttackUL X:97 Y:420+ UAttackLR X:132 Y:437++ OptionsUL X:189 Y:490+ OptionsLR X:225 Y:514+ WorkerUL X:189 Y:516+ WorkerLR X:225 Y:540+ ChatUL X:189 Y:568+ ChatLR X:225 Y:592+ BeaconUL X:189 Y:545+ BeaconLR X:225 Y:566+ PowerBarUL X:260 Y:469+ PowerBarLR X:796 Y:475++ MoneyUL X:480 Y:437+ MoneyLR X:581 Y:456++ GenArrow CHINALevelUP++ ExpBarForegroundImage SNExpBar+ ImagePart+ Position X:0 Y:414+ Size X:1066 Y:186+ ImageName ClassicWideBarChina+ Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top+ End+ PowerPurchaseImage GeneralsPowerMenu_China++Enddiff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ClassicWideBar.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ClassicWideBar.ininew file mode 100644index 000000000..f6e6450b9--- /dev/null+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ClassicWideBar.ini@@ -0,0 +1,36 @@+; The Classic interface's 16:9 command bar, one painting per side, from "C&C Generals HD User+; Interface" by moddb_dev (ModDB), itself built on pWn3d_1337's Operation Firestorm interface, and+; used here with its author's permission. ControlBarSchemeClassicWide.ini draws them. The art is+; 1066 design units across at two texels to the unit; mapped images are not in the multiplayer INI checksum.+;+; Each painting is cut one texel in from its left and right edges. The 2D draw wraps its texture, so+; on a screen that enlarges the art (1440p up) the outermost pixel blended in the far side of the+; 4096 texel sheet, which is empty, and the bar's left edge came out faint. One texel is half a+; design unit. On the right each painting's own edge fades out over its last two or three columns,+; and drawn to the screen's edge those let five columns of battlefield through at 1920x1080, so the+; cut there stops a column short of the last fully opaque one, where the filter cannot reach the+; fade: 2128 for America, 2129 for China, 2131 for the GLA. At the bottom the cut keeps the last opaque row but one, 510, for the same wrap.++MappedImage ClassicWideBarAmerica+ Texture = ClassicWideBarAmerica.tga+ TextureWidth = 4096+ TextureHeight = 512+ Coords = Left:1 Top:128 Right:2128 Bottom:511+ Status = NONE+End++MappedImage ClassicWideBarChina+ Texture = ClassicWideBarChina.tga+ TextureWidth = 4096+ TextureHeight = 512+ Coords = Left:1 Top:142 Right:2129 Bottom:511+ Status = NONE+End++MappedImage ClassicWideBarGLA+ Texture = ClassicWideBarGLA.tga+ TextureWidth = 4096+ TextureHeight = 512+ Coords = Left:1 Top:110 Right:2131 Bottom:511+ Status = NONE+Enddiff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.hindex 1c681cf12..7d18e7f67 100644--- a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h@@ -1702,7 +1702,9 @@ extern Real ControlBarHudPageScale( void );* at the given fraction of the screen (0 = left/top edge, 1 = right/bottom, 0.5 = centred) with* the matching fraction of the design space as its fixed point. This is layoutPanels for a* layout that is one piece rather than three: the generals' power bar hangs off the right edge- * with (1,1) and the science screen is centred at the top with (0.5,0).+ * with (1,1) and the science screen is centred at the top with (0.5,0). The Classic interface+ * keeps the loader's stretch, as the game shipped, but moves it into the HUD's 16:9 frame+ * (TheHudRect), which is the screen itself up to 16:9.** Call it once, on a layout straight out of winCreateLayout. It reads the authored rectangle* back out of where the loader put each window, so a second call would divide a scale out thatdiff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.hindex 37b756f0c..dd5333e93 100644--- a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h@@ -132,6 +132,9 @@ public:~ControlBarScheme( void );void validate( void ) const;+ /** How far this scheme reaches past a 4:3 box of its own height on either side, in its own units.+ * EA's schemes are 800x600 and say 0; the Classic interface's 16:9 bar is 1066x600 and says 133. */+ Int getOverhangX( void ) const;void init( void );void update( void );void drawForeground( Coord2D multi, ICoord2D offset ); ///< draw function to be called within a w3d draw procedure for the foreground@@ -276,6 +279,10 @@ public:* is really showing. Empty when nothing else shares it. */AsciiString getCurrentArtTwinSide( void ) const;+ /// the scheme on screen's ControlBarScheme::getOverhangX, 0 with none up+ Int getCurrentOverhangX( void ) const+ { return m_currentScheme ? m_currentScheme->getOverhangX() : 0; }+// parse Functions for the INI fileconst FieldParse *getFieldParse() const { return m_controlBarSchemeFieldParseTable; } ///< returns the parsing fields@@ -290,6 +297,8 @@ public:void preloadAssets( TimeOfDay timeOfDay ); ///< preload the assetsprivate:+ ControlBarScheme *findSchemeForSide( const AsciiString& side ) const; ///< the widest of that side's schemes the screen can wear+ControlBarScheme *m_currentScheme; ///< the current scheme that everythign usesCoord2D m_multiplyer;diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Display.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Display.hindex e397d5f28..36628c722 100644--- a/GeneralsMD/Code/GameEngine/Include/GameClient/Display.h+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Display.h@@ -185,6 +185,8 @@ public:#endifvirtual void preloadModelAssets( AsciiString model ) = 0; ///< preload model assetvirtual void preloadTextureAssets( AsciiString texture ) = 0; ///< preload texture asset+ /// preload a texture drawImage draws: one level, never reduced, the way drawImage asks for it+ virtual void preloadImageTexture( AsciiString texture ) {}virtual void takeScreenShot(void) = 0; ///< saves screenshot to a filevirtual void toggleMovieCapture(void) = 0; ///< starts saving frames to an avi or frame sequence@@ -291,6 +293,26 @@ inline UIRect UIRectForScreen( Int screenWidth, Int screenHeight )/// Where the 2D interface lives: the 4:3 box in the Classic interface, the whole screen in Reforged.UIRect TheUIRect( void );+//-------------------------------------------------------------------------------------------------+/** The Classic interface's in-match HUD frame: the command bar, the powers beside it, the promotion+ * screen, the superweapon clocks and the messages are laid out for 16:9. On anything wider the+ * 16:9 frame stands in the middle at full height; on anything narrower it is the whole screen. */+//-------------------------------------------------------------------------------------------------+inline UIRect HudRectForScreen( Int screenWidth, Int screenHeight )+{+ UIRect r = { 0, 0, screenWidth, screenHeight };+ const Int wide = (Int)( screenHeight * 16.0f / 9.0f + 0.5f );+ if( screenWidth > wide )+ {+ r.w = wide;+ r.x = ( screenWidth - wide ) / 2;+ }+ return r;+}++/// The HUD frame: HudRectForScreen in the Classic interface, the whole screen in Reforged.+UIRect TheHudRect( void );+//-------------------------------------------------------------------------------------------------inline Real TheUIScale( void ){diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/Display.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/Display.cppindex c809d00ee..b5ea3701f 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/Display.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Display.cpp@@ -57,6 +57,19 @@ UIRect TheUIRect( void )return screen;}+UIRect TheHudRect( void )+{+ if( TheDisplay == NULL )+ {+ UIRect none = { 0, 0, 800, 600 };+ return none;+ }+ if( TheGlobalData && TheGlobalData->isClassicUI() )+ return HudRectForScreen( TheDisplay->getWidth(), TheDisplay->getHeight() );+ UIRect screen = { 0, 0, (Int)TheDisplay->getWidth(), (Int)TheDisplay->getHeight() };+ return screen;+}+Display::Display(){diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cppindex a17922091..97365f074 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp@@ -1649,19 +1649,40 @@ static const IRegion2D thePanelDesignRect[ ControlBar::CB_PANEL_COUNT ] ={ { 609, 421 }, { 800, 600 } }, // CB_PANEL_RIGHT - selection portrait and the general's tabs};+//+// The Classic interface's 16:9 bar paints its command grid field at 94..595 of EA's design units,+// centred 68 left of where EA's seven columns stand, with a terminal panel of its own to the right.+// The grid and every pane sharing its field (beacon, observer, construction, timer) move over with it.+//+static const Real CLASSIC_WIDE_GRID_SHIFT_X = -68.0f;+/// where each panel is pinned: the fraction of the screen its anchor lands on...static const Real thePanelAnchorFraction[ ControlBar::CB_PANEL_COUNT ] = { 0.0f, 0.5f, 1.0f };/// ...and which authored x that anchor is, so at 4:3 the three plates reassemble the shipped barstatic const Real thePanelAnchorDesignX[ ControlBar::CB_PANEL_COUNT ] = { 0.0f, 400.0f, 800.0f };-/// The Classic interface: EA's bar in one piece, all three panels pinned on the screen's centre at-/// the design's centre, which is the shipped layout at one scale inside the 4:3 box (UIRectForScreen).+/// The Classic interface: EA's bar in one piece, all three panels sharing one origin and stretched+/// across the HUD's 16:9 frame (HudRectForScreen) as the game shipped it stretched (classicScales).static Bool barIsClassic( void ){return TheGlobalData != NULL && TheGlobalData->isClassicUI();}-/// Where a panel's design x 0 lands on screen.+/** Classic draws the bar EA's way, stretched: the scheme's own width across the HUD frame and its 600+ * down the screen. The frame is the screen up to 16:9 and a centred 16:9 beyond it. The scheme is+ * EA's 800, or the 16:9 bar's 1066, which hangs its overhang of 133 off either side of EA's 800+ * (ControlBarScheme::getOverhangX). Reforged keeps its one uniform scale. */+static void classicScales( Real dispW, Real dispH, Real *sx, Real *sy )+{+ const ControlBarSchemeManager *man = TheControlBar ? TheControlBar->getControlBarSchemeManager() : NULL;+ const Int overhang = man ? man->getCurrentOverhangX() : 0;+ *sx = HudRectForScreen( REAL_TO_INT( dispW ), REAL_TO_INT( dispH ) ).w / ( CONTROL_BAR_DESIGN_W + 2 * overhang );+ *sy = dispH / CONTROL_BAR_DESIGN_H;+}++/// Where a panel's design x 0 lands on screen. In Classic, with s the stretch across, that is the+/// overhang in from the HUD frame's left edge, since the scheme's width is the frame's, and the frame+/// is centred.static Real panelOriginX( Int panel, Real dispW, Real s ){if( barIsClassic() )@@ -1734,7 +1755,7 @@ Real ControlBarHudScaleFit( Real scale, Int displayWidth )* Positions are relative to the parent, so both the parent's old and its new screen origin travel* down the recursion - the same walk placeInPanel does, without the panels and the plate art. *///--------------------------------------------------------------------------------------------------static void layoutUniformWindow( GameWindow *win, Real originX, Real originY, Real s,+static void layoutUniformWindow( GameWindow *win, Real originX, Real originY, Real s, Real sy,Real loadScaleX, Real loadScaleY,Int oldParentX, Int oldParentY,Int newParentX, Int newParentY )@@ -1753,13 +1774,13 @@ static void layoutUniformWindow( GameWindow *win, Real originX, Real originY, Reconst Real designH = size.y / loadScaleY;const Int newX = REAL_TO_INT_FLOOR( originX + designX * s );- const Int newY = REAL_TO_INT_FLOOR( originY + designY * s );+ const Int newY = REAL_TO_INT_FLOOR( originY + designY * sy );win->winSetPosition( newX - newParentX, newY - newParentY );- win->winSetSize( REAL_TO_INT_CEIL( designW * s ), REAL_TO_INT_CEIL( designH * s ) );+ win->winSetSize( REAL_TO_INT_CEIL( designW * s ), REAL_TO_INT_CEIL( designH * sy ) );for( GameWindow *child = win->winGetChild(); child; child = child->winGetNext() )- layoutUniformWindow( child, originX, originY, s, loadScaleX, loadScaleY,+ layoutUniformWindow( child, originX, originY, s, sy, loadScaleX, loadScaleY,oldX, oldY, newX, newY );}@@ -1777,17 +1798,29 @@ void ControlBarLayoutUniform( GameWindow *root, Real anchorFracX, Real anchorFra// what the loader already multiplied every coordinate by, so it can be divided back outconst Real loadScaleX = dispW / CONTROL_BAR_DESIGN_W;const Real loadScaleY = dispH / CONTROL_BAR_DESIGN_H;- const Real s = ControlBarUniformScale();+ Real s = ControlBarUniformScale();+ Real sy = s;//- // The anchor is a point that does not move: the same fraction of the interface's rectangle and- // of the design space. (1,1) keeps the bottom right corner where it was however wide the- // screen is, which is what a bar hanging off the right edge above the command bar wants. In- // the Classic interface the rectangle is the 4:3 box, so every anchor lands on the box itself.+ // The anchor is a point that does not move: the same fraction of the screen and of the design+ // space. (1,1) keeps the bottom right corner where it was however wide the screen is, which is+ // what a bar hanging off the right edge above the command bar wants.//- const UIRect box = TheUIRect();- const Real originX = box.x + box.w * anchorFracX - CONTROL_BAR_DESIGN_W * anchorFracX * s;- const Real originY = box.y + box.h * anchorFracY - CONTROL_BAR_DESIGN_H * anchorFracY * s;+ Real originX = dispW * anchorFracX - CONTROL_BAR_DESIGN_W * anchorFracX * s;+ Real originY = dispH * anchorFracY - CONTROL_BAR_DESIGN_H * anchorFracY * s;++ //+ // Classic keeps the loader's stretch, as the game shipped, inside the HUD's 16:9 frame: the powers'+ // column down the frame's right edge beside the bar, the promotion screen over the frame+ //+ if( barIsClassic() )+ {+ const UIRect hud = TheHudRect();+ originX = (Real)hud.x;+ originY = 0.0f;+ s = hud.w / CONTROL_BAR_DESIGN_W;+ sy = loadScaleY;+ }ICoord2D rootOrigin;root->winGetScreenPosition( &rootOrigin.x, &rootOrigin.y );@@ -1802,7 +1835,7 @@ void ControlBarLayoutUniform( GameWindow *root, Real anchorFracX, Real anchorFraif( parent )parent->winGetScreenPosition( &parentPos.x, &parentPos.y );- layoutUniformWindow( root, originX, originY, s, loadScaleX, loadScaleY,+ layoutUniformWindow( root, originX, originY, s, sy, loadScaleX, loadScaleY,parentPos.x, parentPos.y, parentPos.x, parentPos.y );}@@ -1827,16 +1860,19 @@ Bool ControlBarPanelDesignToScreen( Int panel, const IRegion2D *design,//const Real loadScaleX = dispW / CONTROL_BAR_DESIGN_W;const Real loadScaleY = dispH / CONTROL_BAR_DESIGN_H;- const Real s = loadScaleX < loadScaleY ? loadScaleX : loadScaleY;+ Real s = loadScaleX < loadScaleY ? loadScaleX : loadScaleY;+ Real sy = s;+ if( barIsClassic() )+ classicScales( dispW, dispH, &s, &sy );const Real originX = panelOriginX( panel, dispW, s );rectOut->lo.x = REAL_TO_INT_FLOOR( originX + design->lo.x * s );rectOut->hi.x = REAL_TO_INT_CEIL ( originX + design->hi.x * s );- rectOut->lo.y = REAL_TO_INT_FLOOR( dispH - ( CONTROL_BAR_DESIGN_H - design->lo.y ) * s );- rectOut->hi.y = REAL_TO_INT_CEIL ( dispH - ( CONTROL_BAR_DESIGN_H - design->hi.y ) * s );+ rectOut->lo.y = REAL_TO_INT_FLOOR( dispH - ( CONTROL_BAR_DESIGN_H - design->lo.y ) * sy );+ rectOut->hi.y = REAL_TO_INT_CEIL ( dispH - ( CONTROL_BAR_DESIGN_H - design->hi.y ) * sy );- // the Classic bar is EA's one piece, centred in the 4:3 box, and touches no screen edge but the bottom+ // the Classic bar is EA's one piece, stretched as it shipped, and its rectangles are the arithmetic'sif( barIsClassic() )return TRUE;@@ -1930,6 +1966,23 @@ static Int panelForWindow( const char *shortName, Real designCenterX )return ControlBar::CB_PANEL_CENTER;}+//-------------------------------------------------------------------------------------------------+/** The windows ControlBarScheme::init places itself from its UL/LR pairs. A scheme authored for the+ * Classic 16:9 bar already puts them in the wide bar, so layoutPanels must not move them again. */+//-------------------------------------------------------------------------------------------------+static Bool isSchemePlaced( const char *shortName )+{+ static const char *names[] =+ {+ "PopupCommunicator", "ButtonIdleWorker", "ButtonOptions", "ButtonPlaceBeacon", "MoneyDisplay",+ "PowerWindow", "ButtonGeneral", "ButtonLarge", "WinUAttack", NULL+ };+ for( const char **n = names; *n; n++ )+ if( strcmp( shortName, *n ) == 0 )+ return TRUE;+ return FALSE;+}+//-------------------------------------------------------------------------------------------------// The plates -------------------------------------------------------------------------------------//-------------------------------------------------------------------------------------------------@@ -2260,7 +2313,10 @@ void ControlBar::placeInPanel( GameWindow *win, Int panel,const Real dispH = (Real)TheDisplay->getHeight();const Real loadScaleX = dispW / CONTROL_BAR_DESIGN_W;const Real loadScaleY = dispH / CONTROL_BAR_DESIGN_H;- const Real s = ControlBarUniformScale();+ Real s = ControlBarUniformScale(); // across; sy down+ Real sy = s;+ if( barIsClassic() )+ classicScales( dispW, dispH, &s, &sy );const Real originX = panelOriginX( panel, dispW, s );ICoord2D rel, size;@@ -2282,9 +2338,9 @@ void ControlBar::placeInPanel( GameWindow *win, Int panel,}Int newX = REAL_TO_INT_FLOOR( originX + place.designX * s );- Int newY = REAL_TO_INT_FLOOR( dispH - ( CONTROL_BAR_DESIGN_H - place.designY ) * s );+ Int newY = REAL_TO_INT_FLOOR( dispH - ( CONTROL_BAR_DESIGN_H - place.designY ) * sy );Int newW = REAL_TO_INT_CEIL( place.designW * s );- Int newH = REAL_TO_INT_CEIL( place.designH * s );+ Int newH = REAL_TO_INT_CEIL( place.designH * sy );const char *shortName = shortWindowName( win );@@ -2313,7 +2369,11 @@ void ControlBar::placeInPanel( GameWindow *win, Int panel,// the grid shift starts at CenterBackground and is inherited by everything under itInt childShiftX = shiftX;if( strcmp( shortName, "CenterBackground" ) == 0 )- childShiftX = plate ? REAL_TO_INT_FLOOR( plate->gridShiftX * s ) : 0;+ {+ const Bool classicWide = m_controlBarSchemeManager && m_controlBarSchemeManager->getCurrentOverhangX() > 0;+ const Real gridShiftX = plate ? plate->gridShiftX : ( classicWide ? CLASSIC_WIDE_GRID_SHIFT_X : 0.0f );+ childShiftX = REAL_TO_INT_FLOOR( gridShiftX * s );+ }//// The unnamed children are the GameWinBlockInput panes: their only job is to keep clicks on the@@ -2764,14 +2824,30 @@ void ControlBar::layoutPanels( void )// One scale for both axes, the smaller of the two so the three panels always fit side by side.// At 4:3 that is exactly the old scale and the panels still meet; at anything wider they shrink// together and leave the middle of the screen bottom open instead of stretching to fill it.+ // Classic stretches as EA's did, s across and sy down (classicScales).+ //+ Real s = ControlBarUniformScale();+ Real sy = s;+ if( barIsClassic() )+ classicScales( dispW, dispH, &s, &sy );+//- const Real s = ControlBarUniformScale();+ // The Classic interface's 16:9 bar is EA's with 133 design units more on either side: the radar+ // moves out by that much, the selection panel too, and the centre grows by both (see+ // ControlBarSchemeClassicWide.ini). EA's 4:3 bar has none.+ //+ const Int overhang = m_controlBarSchemeManager ? m_controlBarSchemeManager->getCurrentOverhangX() : 0;+ static const Int panelSide[ CB_PANEL_COUNT ] = { -1, 0, 1 };Int p;for( p = 0; p < CB_PANEL_COUNT; p++ )- ControlBarPanelDesignToScreen( p, &thePanelDesignRect[ p ],- TheDisplay->getWidth(), TheDisplay->getHeight(),+ {+ IRegion2D design = thePanelDesignRect[ p ];+ design.lo.x += panelSide[ p ] ? panelSide[ p ] * overhang : -overhang;+ design.hi.x += panelSide[ p ] ? panelSide[ p ] * overhang : overhang;+ ControlBarPanelDesignToScreen( p, &design, TheDisplay->getWidth(), TheDisplay->getHeight(),&m_panelRect[ p ] );+ }// the children's positions are relative to the frame, so grab where it is before moving itICoord2D barOrigin;@@ -2779,7 +2855,7 @@ void ControlBar::layoutPanels( void )// the frame itself stays full width - it draws nothing and passes input throughconst Int parentTop =- REAL_TO_INT_FLOOR( dispH - ( CONTROL_BAR_DESIGN_H - CONTROL_BAR_DESIGN_TOP ) * s );+ REAL_TO_INT_FLOOR( dispH - ( CONTROL_BAR_DESIGN_H - CONTROL_BAR_DESIGN_TOP ) * sy );parent->winSetPosition( 0, parentTop );parent->winSetSize( REAL_TO_INT_CEIL( dispW ), REAL_TO_INT_CEIL( dispH ) - parentTop );@@ -2827,8 +2903,11 @@ void ControlBar::layoutPanels( void )designCenterX = ( barOrigin.x + rel.x + size.x * 0.5f ) / loadScaleX;}- placeInPanel( child, panelForWindow( shortWindowName( child ), designCenterX ),- barOrigin.x, barOrigin.y, 0, parentTop );+ // the scheme already put its own windows in the wide bar, so only the .wnd's travel out with their panel+ const char *shortName = shortWindowName( child );+ const Int panel = panelForWindow( shortName, designCenterX );+ const Int shiftX = isSchemePlaced( shortName ) ? 0 : REAL_TO_INT_FLOOR( panelSide[ panel ] * overhang * s );+ placeInPanel( child, panel, barOrigin.x, barOrigin.y, 0, parentTop, shiftX );}// whatever was away before is away again, without being watched leaving a second time@@ -6458,7 +6537,21 @@ void ControlBar::initSpecialPowershortcutBar( Player *player)//-------------------------------------------------------------------------------------------------void ControlBar::arrangeSpecialPowerShortcutGrid( void ){- if( m_specialPowerShortcutParent == NULL || m_currentlyUsedSpecialPowersButtons < 2 )+ if( m_specialPowerShortcutParent == NULL )+ return;++ //+ // Classic keeps the shipped column, stretched with the bar, on the right edge of the screen and+ // climbing from the top of the bar as 1.04's did. Its frame runs most of the screen's height and+ // took every click over the battlefield and the promotion screen beside the powers; the frame+ // takes none now, its slots and buttons still do+ //+ if( barIsClassic() )+ {+ m_specialPowerShortcutParent->winSetStatus( WIN_STATUS_NO_INPUT );+ return;+ }+ if( m_currentlyUsedSpecialPowersButtons < 2 )return;//@@ -6479,26 +6572,7 @@ void ControlBar::arrangeSpecialPowerShortcutGrid( void )if( getSpecialPowerTrayLayout( NULL, &cameoSize, &cameoOffset, &columnStep ) == FALSE )return;- //- // Classic keeps every power on the one row the first stands on, growing to the left, each slot- // tucked under the one to its right. Only the tray's frame right of the cameo is covered: the- // cameo's hole ends 49 pixels into the 60 pixel art, so the next tray starts there and every- // picture stays whole- //- const Bool classic = barIsClassic();- if( classic )- columnStep = ( columnStep * 49 + 30 ) / 60;-- //- // Classic's bar keeps the authored height, 3..420 of the 800x600 screen, and widened for the- // row it stood over the right half of the promotion screen and the battlefield beside the- // powers. An empty stretch of it took every click there and did nothing with it. The bar- // itself takes none now; its slots and buttons still do- //- if( classic )- m_specialPowerShortcutParent->winSetStatus( WIN_STATUS_NO_INPUT );- const Int columns = classic ? m_currentlyUsedSpecialPowersButtons- : MIN( m_currentlyUsedSpecialPowersButtons, (Int)SPECIAL_POWER_SHORTCUT_COLS );+ const Int columns = MIN( m_currentlyUsedSpecialPowersButtons, (Int)SPECIAL_POWER_SHORTCUT_COLS );const Int widen = ( columns - 1 ) * columnStep;//@@ -6523,8 +6597,8 @@ void ControlBar::arrangeSpecialPowerShortcutGrid( void )if( slot == NULL || button == NULL )continue;- const Int column = classic ? i : i % SPECIAL_POWER_SHORTCUT_COLS;- const Int row = classic ? 0 : i / SPECIAL_POWER_SHORTCUT_COLS;+ const Int column = i % SPECIAL_POWER_SHORTCUT_COLS;+ const Int row = i / SPECIAL_POWER_SHORTCUT_COLS;slot->winSetPosition( firstX + widen - column * columnStep, firstY - row * rowStep );diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cppindex da86eb02f..bc468658c 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp@@ -440,6 +440,28 @@ void ControlBarScheme::validate(void) const}}+Int ControlBarScheme::getOverhangX( void ) const+{+ return ( m_ScreenCreationRes.x - m_ScreenCreationRes.y * 4 / 3 ) / 2;+}++//+// Put one of the windows the scheme owns at its UL/LR, in the .wnd loader's own stretched space.+//+static void placeSchemeWindow( GameWindow *win, const ICoord2D& ul, const ICoord2D& lr,+ const Coord2D& resMultiplier, Int overhangX )+{+ Int parX = 0, parY = 0;+ GameWindow *parent = win->winGetParent();+ if( parent )+ parent->winGetScreenPosition( &parX, &parY );+ const Int x = ( ul.x - overhangX ) * resMultiplier.x - parX;+ const Int y = ul.y * resMultiplier.y - parY;+ win->winSetPosition( x, y );+ win->winSetSize( ( lr.x - ul.x ) * resMultiplier.x + COMMAND_BAR_SIZE_OFFSET,+ ( lr.y - ul.y ) * resMultiplier.y + COMMAND_BAR_SIZE_OFFSET );+}+void ControlBarScheme::init(void){if(TheControlBar)@@ -464,8 +486,15 @@ void ControlBarScheme::init(void)TheControlBar->setArrowImage( m_genArrow);}GameWindow *win = NULL;++ //+ // A scheme wider than 4:3 - the Classic interface's 16:9 bar, 1066x600 - is EA's 800x600 with+ // 133 more on either side, so its x 133 is EA's 0. Its windows go where the .wnd loader would+ // have stretched EA's 800x600 to, which is the space layoutPanels reads them back out of.+ //+ const Int overhangX = getOverhangX();Coord2D resMultiplier;- resMultiplier.x = TheDisplay->getWidth()/INT_TO_REAL(m_ScreenCreationRes.x) ;+ resMultiplier.x = TheDisplay->getWidth()/INT_TO_REAL(m_ScreenCreationRes.x - 2 * overhangX) ;resMultiplier.y = TheDisplay->getHeight()/INT_TO_REAL(m_ScreenCreationRes.y);win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:PopupCommunicator" ) );@@ -478,23 +507,7 @@ void ControlBarScheme::init(void)GadgetButtonSetHiliteImage(win, m_buddyButtonHightlited);GadgetButtonSetHiliteSelectedImage(win, m_buddyButtonPushed);GadgetButtonSetDisabledImage(win, m_buddyButtonDisabled);-- Int x, y;- GameWindow* parent =win->winGetParent();- if(parent)- {- Int parX, parY;- parent->winGetScreenPosition(&parX, &parY);- x = m_chatUL.x * resMultiplier.x - parX;- y = m_chatUL.y * resMultiplier.y - parY;- }- else- {- x = m_chatUL.x * resMultiplier.x;- y = m_chatUL.y * resMultiplier.y;- }- win->winSetPosition(x,y );- win->winSetSize((m_chatLR.x - m_chatUL.x)*resMultiplier.x + COMMAND_BAR_SIZE_OFFSET,(m_chatLR.y - m_chatUL.y)*resMultiplier.y+ COMMAND_BAR_SIZE_OFFSET);+ placeSchemeWindow( win, m_chatUL, m_chatLR, resMultiplier, overhangX );}win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ButtonIdleWorker" ) );if(win)@@ -503,25 +516,7 @@ void ControlBarScheme::init(void)GadgetButtonSetHiliteImage(win, m_idleWorkerButtonHightlited);GadgetButtonSetHiliteSelectedImage(win, m_idleWorkerButtonPushed);GadgetButtonSetDisabledImage(win, m_idleWorkerButtonDisabled);-- Int x, y;- GameWindow* parent =win->winGetParent();- if(parent)- {- Int parX, parY;- parent->winGetScreenPosition(&parX, &parY);- x = m_workerUL.x * resMultiplier.x - parX;- y = m_workerUL.y * resMultiplier.y - parY;- }- else- {- x = m_workerUL.x * resMultiplier.x;- y = m_workerUL.y * resMultiplier.y;- }- win->winSetPosition(x,y );-- win->winSetSize((m_workerLR.x - m_workerUL.x)*resMultiplier.x+ COMMAND_BAR_SIZE_OFFSET,(m_workerLR.y - m_workerUL.y)*resMultiplier.y+ COMMAND_BAR_SIZE_OFFSET);-+ placeSchemeWindow( win, m_workerUL, m_workerLR, resMultiplier, overhangX );}win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ExpBarForeground" ) );if(win)@@ -535,22 +530,7 @@ void ControlBarScheme::init(void)GadgetButtonSetHiliteImage(win, m_optionsButtonHightlited);GadgetButtonSetHiliteSelectedImage(win, m_optionsButtonPushed);GadgetButtonSetDisabledImage(win, m_optionsButtonDisabled);- Int x, y;- GameWindow* parent =win->winGetParent();- if(parent)- {- Int parX, parY;- parent->winGetScreenPosition(&parX, &parY);- x = m_optionsUL.x * resMultiplier.x - parX;- y = m_optionsUL.y * resMultiplier.y - parY;- }- else- {- x = m_optionsUL.x * resMultiplier.x;- y = m_optionsUL.y * resMultiplier.y;- }- win->winSetPosition(x,y );- win->winSetSize((m_optionsLR.x - m_optionsUL.x)*resMultiplier.x+ COMMAND_BAR_SIZE_OFFSET,(m_optionsLR.y - m_optionsUL.y)*resMultiplier.y+ COMMAND_BAR_SIZE_OFFSET);+ placeSchemeWindow( win, m_optionsUL, m_optionsLR, resMultiplier, overhangX );}win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ButtonPlaceBeacon" ) );if(win)@@ -559,69 +539,16 @@ void ControlBarScheme::init(void)GadgetButtonSetHiliteImage(win, m_beaconButtonHightlited);GadgetButtonSetHiliteSelectedImage(win, m_beaconButtonPushed);GadgetButtonSetDisabledImage(win, m_beaconButtonDisabled);-- Int x, y;- GameWindow* parent =win->winGetParent();- if(parent)- {- Int parX, parY;- parent->winGetScreenPosition(&parX, &parY);- x = m_beaconUL.x * resMultiplier.x - parX;- y = m_beaconUL.y * resMultiplier.y - parY;- }- else- {- x = m_beaconUL.x * resMultiplier.x;- y = m_beaconUL.y * resMultiplier.y;- }- win->winSetPosition(x,y );- win->winSetSize((m_beaconLR.x - m_beaconUL.x)*resMultiplier.x+ COMMAND_BAR_SIZE_OFFSET,(m_beaconLR.y - m_beaconUL.y)*resMultiplier.y+ COMMAND_BAR_SIZE_OFFSET);+ placeSchemeWindow( win, m_beaconUL, m_beaconLR, resMultiplier, overhangX );}-- win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:MoneyDisplay" ) );- if(win)- {- Int x, y;- GameWindow* parent =win->winGetParent();- if(parent)- {- Int parX, parY;- parent->winGetScreenPosition(&parX, &parY);- x = m_moneyUL.x * resMultiplier.x - parX;- y = m_moneyUL.y * resMultiplier.y - parY;- }- else- {- x = m_moneyUL.x * resMultiplier.x;- y = m_moneyUL.y * resMultiplier.y;- }- win->winSetPosition(x,y );- win->winSetSize((m_moneyLR.x - m_moneyUL.x)*resMultiplier.x+ COMMAND_BAR_SIZE_OFFSET,(m_moneyLR.y - m_moneyUL.y)*resMultiplier.y+ COMMAND_BAR_SIZE_OFFSET);- }+ win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:MoneyDisplay" ) );+ if(win)+ placeSchemeWindow( win, m_moneyUL, m_moneyLR, resMultiplier, overhangX );win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:PowerWindow" ) );- if(win)- {-- Int x, y;- GameWindow* parent =win->winGetParent();- if(parent)- {- Int parX, parY;- parent->winGetScreenPosition(&parX, &parY);- x = m_powerBarUL.x * resMultiplier.x - parX;- y = m_powerBarUL.y * resMultiplier.y - parY;- }- else- {- x = m_powerBarUL.x * resMultiplier.x;- y = m_powerBarUL.y * resMultiplier.y;- }- win->winSetPosition(x,y );- win->winSetSize((m_powerBarLR.x - m_powerBarUL.x)*resMultiplier.x+ COMMAND_BAR_SIZE_OFFSET,(m_powerBarLR.y - m_powerBarUL.y)*resMultiplier.y+ COMMAND_BAR_SIZE_OFFSET);- DEBUG_LOG(("Power Bar UL X:%d Y:%d LR X:%d Y:%d size X:%d Y:%d\n",m_powerBarUL.x, m_powerBarUL.y,m_powerBarLR.x, m_powerBarLR.y, (m_powerBarLR.x - m_powerBarUL.x)*resMultiplier.x+ COMMAND_BAR_SIZE_OFFSET,(m_powerBarLR.y - m_powerBarUL.y)*resMultiplier.y+ COMMAND_BAR_SIZE_OFFSET ));- }+ if(win)+ placeSchemeWindow( win, m_powerBarUL, m_powerBarLR, resMultiplier, overhangX );win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ButtonGeneral" ) );if(win)@@ -631,23 +558,7 @@ void ControlBarScheme::init(void)GadgetButtonSetHiliteImage(win, m_generalButtonHightlited);GadgetButtonSetHiliteSelectedImage(win, m_generalButtonPushed);GadgetButtonSetDisabledImage(win, m_generalButtonDisabled);-- Int x, y;- GameWindow* parent =win->winGetParent();- if(parent)- {- Int parX, parY;- parent->winGetScreenPosition(&parX, &parY);- x = m_generalUL.x * resMultiplier.x - parX;- y = m_generalUL.y * resMultiplier.y - parY;- }- else- {- x = m_generalUL.x * resMultiplier.x;- y = m_generalUL.y * resMultiplier.y;- }- win->winSetPosition(x,y );- win->winSetSize((m_generalLR.x - m_generalUL.x)*resMultiplier.x+ COMMAND_BAR_SIZE_OFFSET,(m_generalLR.y - m_generalUL.y)*resMultiplier.y+ COMMAND_BAR_SIZE_OFFSET);+ placeSchemeWindow( win, m_generalUL, m_generalLR, resMultiplier, overhangX );}win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ButtonLarge" ) );@@ -657,23 +568,7 @@ void ControlBarScheme::init(void)// GadgetButtonSetEnabledImage(win, m_minMaxButtonEnable);// GadgetButtonSetHiliteImage(win, m_minMaxButtonHightlited);// GadgetButtonSetHiliteSelectedImage(win, m_minMaxButtonPushed);-- Int x, y;- GameWindow* parent =win->winGetParent();- if(parent)- {- Int parX, parY;- parent->winGetScreenPosition(&parX, &parY);- x = m_minMaxUL.x * resMultiplier.x - parX;- y = m_minMaxUL.y * resMultiplier.y - parY;- }- else- {- x = m_minMaxUL.x * resMultiplier.x;- y = m_minMaxUL.y * resMultiplier.y;- }- win->winSetPosition(x,y );- win->winSetSize((m_minMaxLR.x - m_minMaxUL.x)*resMultiplier.x + COMMAND_BAR_SIZE_OFFSET,(m_minMaxLR.y - m_minMaxUL.y)*resMultiplier.y + COMMAND_BAR_SIZE_OFFSET);+ placeSchemeWindow( win, m_minMaxUL, m_minMaxLR, resMultiplier, overhangX );}win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:WinUAttack" ) );@@ -681,30 +576,15 @@ void ControlBarScheme::init(void){win->winSetEnabledImage(0,m_uAttackButtonEnable);win->winSetDisabledImage(0,m_uAttackButtonHightlited);-- Int x, y;- GameWindow* parent =win->winGetParent();- if(parent)- {- Int parX, parY;- parent->winGetScreenPosition(&parX, &parY);- x = m_uAttackUL.x * resMultiplier.x - parX;- y = m_uAttackUL.y * resMultiplier.y - parY;- }- else- {- x = m_uAttackUL.x * resMultiplier.x;- y = m_uAttackUL.y * resMultiplier.y;- }- win->winSetPosition(x,y );- win->winSetSize((m_uAttackLR.x - m_uAttackUL.x)*resMultiplier.x+ COMMAND_BAR_SIZE_OFFSET,(m_uAttackLR.y - m_uAttackUL.y)*resMultiplier.y+ COMMAND_BAR_SIZE_OFFSET);+ placeSchemeWindow( win, m_uAttackUL, m_uAttackLR, resMultiplier, overhangX );}win = TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "GeneralsExpPoints.wnd:GenExpParent" ) );if(win){win->winSetEnabledImage(0,m_powerPurchaseImage);- if( m_powerPurchaseImage )+ // Classic keeps the loader's stretch, as the game shipped, over the HUD frame (ControlBarLayoutUniform)+ if( m_powerPurchaseImage && !TheGlobalData->isClassicUI() ){//// The rank screen is one painting, and this line is what decides how big it is drawn -@@ -836,11 +716,13 @@ void ControlBarScheme::drawForeground( Coord2D multi, ICoord2D offset )continue;}- // draw the image- TheDisplay->drawImage(schemeImage->m_image, schemeImage->m_position.x * multi.x + offset.x,- schemeImage->m_position.y * multi.y + offset.y,- (schemeImage->m_position.x + schemeImage->m_size.x) * multi.x + offset.x,- (schemeImage->m_position.y + schemeImage->m_size.y) * multi.y + offset.y);+ // draw the image, its far edges rounded out: 1066 * (1920 / 1066.0f) truncated to 1919 and left+ // the screen's last column of battlefield showing past the bar+ TheDisplay->drawImage(schemeImage->m_image,+ REAL_TO_INT_FLOOR( schemeImage->m_position.x * multi.x ) + offset.x,+ REAL_TO_INT_FLOOR( schemeImage->m_position.y * multi.y ) + offset.y,+ REAL_TO_INT_CEIL( ( schemeImage->m_position.x + schemeImage->m_size.x ) * multi.x - 0.01f ) + offset.x,+ REAL_TO_INT_CEIL( ( schemeImage->m_position.y + schemeImage->m_size.y ) * multi.y - 0.01f ) + offset.y);it ++;}@@ -873,11 +755,12 @@ void ControlBarScheme::drawBackground( Coord2D multi, ICoord2D offset )continue;}- // draw it- TheDisplay->drawImage(schemeImage->m_image, schemeImage->m_position.x * multi.x + offset.x,- schemeImage->m_position.y * multi.y + offset.y,- (schemeImage->m_position.x + schemeImage->m_size.x) * multi.x + offset.x,- (schemeImage->m_position.y + schemeImage->m_size.y) * multi.y + offset.y);+ // draw it, rounded out as drawForeground does+ TheDisplay->drawImage(schemeImage->m_image,+ REAL_TO_INT_FLOOR( schemeImage->m_position.x * multi.x ) + offset.x,+ REAL_TO_INT_FLOOR( schemeImage->m_position.y * multi.y ) + offset.y,+ REAL_TO_INT_CEIL( ( schemeImage->m_position.x + schemeImage->m_size.x ) * multi.x - 0.01f ) + offset.x,+ REAL_TO_INT_CEIL( ( schemeImage->m_position.y + schemeImage->m_size.y ) * multi.y - 0.01f ) + offset.y);it ++;}@@ -1047,6 +930,10 @@ void ControlBarSchemeManager::preloadAssets( TimeOfDay timeOfDay )DEBUG_ASSERTCRASH(FALSE,("There's no ControlBarScheme in the ControlBarSchemeList:m_schemeList"));continue;}+ // a 16:9 painting is 4096 texels across, and only Classic ever wears it. Classic loads it on a+ // narrow screen too, so a change to a wide resolution mid-match does not stop to read it+ if( CBScheme->getOverhangX() > 0 && !TheGlobalData->isClassicUI() )+ continue;if (CBScheme->m_buttonQueueImage){@@ -1070,7 +957,7 @@ void ControlBarSchemeManager::preloadAssets( TimeOfDay timeOfDay )const Image *image = TheMappedImageCollection->findImageByName( cbImage->m_name );if (image){- TheDisplay->preloadTextureAssets(image->getFilename());+ TheDisplay->preloadImageTexture(image->getFilename());}}}@@ -1088,6 +975,8 @@ void ControlBarSchemeManager::init( void )// Read from INI all the ControlBarSchemesini.load( AsciiString( "Data\\INI\\Default\\ControlBarScheme.ini" ), INI_LOAD_OVERWRITE, NULL );ini.load( AsciiString( "Data\\INI\\ControlBarScheme.ini" ), INI_LOAD_OVERWRITE, NULL );+ // the Classic interface's 16:9 bar, one scheme per side beside EA's; see findSchemeForSide+ ini.load( AsciiString( "Data\\INI\\ControlBarSchemeClassicWide.ini" ), INI_LOAD_OVERWRITE, NULL );// //Load the user modified control bar schemes// WIN32_FIND_DATA findData;@@ -1118,7 +1007,7 @@ void ControlBarSchemeManager::setControlBarScheme(AsciiString schemeName)// setup the multiplyer value// (cast like the sibling below: this was an Int/Int divide, so any resolution that is not// an exact multiple of the scheme's authoring resolution scaled by 1.0 or 0.)- m_multiplyer.x = TheDisplay->getWidth() / (Real)tempScheme->m_ScreenCreationRes.x;+ m_multiplyer.x = TheHudRect().w / (Real)tempScheme->m_ScreenCreationRes.x;m_multiplyer.y = TheDisplay->getHeight() / (Real)tempScheme->m_ScreenCreationRes.y;m_currentScheme = tempScheme;}@@ -1153,36 +1042,22 @@ void ControlBarSchemeManager::update( void )}//------------------------------------------------------------------------------/** The Classic interface lays EA's bar out at one scale, centred and standing on the bottom of the- * screen (layoutPanels, ControlBarPanelDesignToScreen), so its painting goes through that same- * transform instead of the loader's two-way stretch. */+/** The painting is stretched the way the game shipped it, the scheme's width across the HUD's 16:9+ * frame (TheHudRect, the whole screen in Reforged and up to 16:9) and its height down the screen,+ * which is also how Classic lays the bar's windows out (layoutPanels). *///------------------------------------------------------------------------------static Coord2D paintTransform( Coord2D stretch, ICoord2D *offset )-{- if( TheGlobalData == NULL || !TheGlobalData->isClassicUI() || TheDisplay == NULL )- return stretch;-- const Real s = ControlBarUniformScale();- offset->x += REAL_TO_INT_FLOOR( TheDisplay->getWidth() * 0.5f - 400.0f * s );- offset->y += REAL_TO_INT_FLOOR( TheDisplay->getHeight() - 600.0f * s );- Coord2D uniform;- uniform.x = uniform.y = s;- return uniform;-}-void ControlBarSchemeManager::drawForeground( ICoord2D offset ){- // two statements: paintTransform moves `offset`, and argument order is the compiler's choice- const Coord2D multi = paintTransform( m_multiplyer, &offset );+ offset.x += TheHudRect().x;if(m_currentScheme)- m_currentScheme->drawForeground( multi, offset );+ m_currentScheme->drawForeground( m_multiplyer, offset );}//-----------------------------------------------------------------------------void ControlBarSchemeManager::drawBackground( ICoord2D offset ){- const Coord2D multi = paintTransform( m_multiplyer, &offset );+ offset.x += TheHudRect().x;if(m_currentScheme)- m_currentScheme->drawBackground( multi, offset );+ m_currentScheme->drawBackground( m_multiplyer, offset );}//-----------------------------------------------------------------------------@@ -1212,6 +1087,33 @@ AsciiString ControlBarSchemeManager::getCurrentArtTwinSide( void ) const}+//-----------------------------------------------------------------------------+/** Classic stretches its bar over the whole screen, so it wears the side's scheme whose shape is+ * nearest the screen's: EA's 800x600 on 4:3 and 5:4, the 16:9 bar's 1066x600 on 16:10 and anything+ * wider. Reforged never draws a scheme's painting and keeps EA's, the widest of them as EA picked. */+//-----------------------------------------------------------------------------+ControlBarScheme *ControlBarSchemeManager::findSchemeForSide( const AsciiString& side ) const+{+ const Bool classic = TheGlobalData->isClassicUI();+ const Real screenAspect = (Real)TheDisplay->getWidth() / (Real)TheDisplay->getHeight();+ ControlBarScheme *best = NULL;+ Real bestScore = 0.0f;+ for( ControlBarSchemeList::const_iterator it = m_schemeList.begin(); it != m_schemeList.end(); ++it )+ {+ ControlBarScheme *scheme = *it;+ if( scheme->m_side.compareNoCase( side ) != 0 || ( scheme->getOverhangX() > 0 && !classic ) )+ continue;+ const Real aspectMiss = (Real)scheme->m_ScreenCreationRes.x / scheme->m_ScreenCreationRes.y - screenAspect;+ const Real score = classic ? aspectMiss * aspectMiss : -(Real)scheme->m_ScreenCreationRes.x;+ if( best == NULL || score < bestScore )+ {+ best = scheme;+ bestScore = score;+ }+ }+ return best;+}+//-----------------------------------------------------------------------------void ControlBarSchemeManager::setControlBarSchemeByPlayerTemplate( const PlayerTemplate *pt, Bool useSmall){@@ -1220,46 +1122,19 @@ void ControlBarSchemeManager::setControlBarSchemeByPlayerTemplate( const PlayerTAsciiString side = pt->getSide();if(useSmall)side.concat("Small");- if(m_currentScheme && (m_currentScheme->m_side.compare(side) == 0))- {- m_currentScheme->init();-- DEBUG_LOG(("setControlBarSchemeByPlayer already is using %s as its side\n", side.str()));- return;- }// if we don't have a side, set it to Observer shellif(side.isEmpty())side.set("Observer");+ // picked again every time, even for the side on screen: a new resolution can want a different+ // scheme for it (findSchemeForSide), and the multiplier below is the screen's+ ControlBarScheme *tempScheme = findSchemeForSide( side );DEBUG_LOG(("setControlBarSchemeByPlayer used %s as its side\n", side.str()));- ControlBarScheme *tempScheme = NULL;- ControlBarSchemeList::iterator it = m_schemeList.begin();-- // iterate through the list and return the scheme that we're looking for- while (it != m_schemeList.end())- {- ControlBarScheme *CBScheme = *it;- if( !CBScheme )- {- DEBUG_ASSERTCRASH(FALSE,("There's no ControlBarScheme in the ControlBarSchemeList:m_schemeList"));- it++;- continue;- }- // find the scheme that best matches our resolution- if(CBScheme->m_side.compareNoCase( side ) == 0)- {-- if((!tempScheme || tempScheme->m_ScreenCreationRes.x < CBScheme->m_ScreenCreationRes.x) )//&& TheDisplay->getWidth() >= CBScheme->m_ScreenCreationRes.x )- tempScheme = CBScheme;- }- it ++;- }-if(tempScheme){// setup the multiplyer value- m_multiplyer.x = TheDisplay->getWidth() / (Real)tempScheme->m_ScreenCreationRes.x;+ m_multiplyer.x = TheHudRect().w / (Real)tempScheme->m_ScreenCreationRes.x;m_multiplyer.y = TheDisplay->getHeight() / (Real)tempScheme->m_ScreenCreationRes.y;m_currentScheme = tempScheme;}@@ -1288,46 +1163,19 @@ void ControlBarSchemeManager::setControlBarSchemeByPlayer(Player *p)if(!p)return;AsciiString side = p->getSide();- if(m_currentScheme && (m_currentScheme->m_side.compare(side) == 0))- {- m_currentScheme->init();-- DEBUG_LOG(("setControlBarSchemeByPlayer already is using %s as its side\n", side.str()));- return;- }// if we don't have a side, set it to Observer shellif(side.isEmpty())side.set("Observer");+ // picked again every time, even for the side on screen: a new resolution can want a different+ // scheme for it (findSchemeForSide), and the multiplier below is the screen's+ ControlBarScheme *tempScheme = findSchemeForSide( side );DEBUG_LOG(("setControlBarSchemeByPlayer used %s as its side\n", side.str()));- ControlBarScheme *tempScheme = NULL;- ControlBarSchemeList::iterator it = m_schemeList.begin();-- // iterate through the list and return the scheme that we're looking for- while (it != m_schemeList.end())- {- ControlBarScheme *CBScheme = *it;- if( !CBScheme )- {- DEBUG_ASSERTCRASH(FALSE,("There's no ControlBarScheme in the ControlBarSchemeList:m_schemeList"));- it++;- continue;- }- // find the scheme that best matches our resolution- if(CBScheme->m_side.compareNoCase( side ) == 0)- {-- if((!tempScheme || tempScheme->m_ScreenCreationRes.x < CBScheme->m_ScreenCreationRes.x) )//&& TheDisplay->getWidth() >= CBScheme->m_ScreenCreationRes.x )- tempScheme = CBScheme;- }- it ++;- }-if(tempScheme){// setup the multiplyer value- m_multiplyer.x = TheDisplay->getWidth() / (Real)tempScheme->m_ScreenCreationRes.x;+ m_multiplyer.x = TheHudRect().w / (Real)tempScheme->m_ScreenCreationRes.x;m_multiplyer.y = TheDisplay->getHeight() / (Real)tempScheme->m_ScreenCreationRes.y;m_currentScheme = tempScheme;}diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManagerScript.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManagerScript.cppindex 1d56b7341..e0939d018 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManagerScript.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManagerScript.cpp@@ -525,8 +525,9 @@ static Bool startsWithFolder( const char *path, const char *folder )}// The Classic interface puts everything in the 4:3 box (UIRectForScreen), battlefield furniture and-// all, except the layouts the command bar takes back out of the loader's stretch itself-// (layoutPanels, ControlBarLayoutUniform): they divide the stretch back out, so they must be given it.+// all, except the command bar's own layouts. Classic stretches those as the game shipped them, over+// the HUD's 16:9 frame (TheHudRect), and layoutPanels and ControlBarLayoutUniform divide the loader's+// stretch back out, so they must be given it.static Bool barLaysOutItself( const char *filename ){static const char *const own[] = { "controlbar.wnd", "generalsexppoints.wnd", "genpowersshortcutbar" };diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cppindex 2f0bb8cce..3f1e10a70 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp@@ -4460,7 +4460,8 @@ void InGameUI::drawClassicMessages( void )if( !m_messagesOn )return;- const UIRect box = TheUIRect();+ // in the HUD's 16:9 frame with the bar, not the menus' 4:3 box+ const UIRect box = TheHudRect();const Int x = box.x + m_messagePosition.x;Int y = box.y + m_messagePosition.y;for( Int i = CLASSIC_MESSAGES - 1; i >= 0; i-- )@@ -8532,9 +8533,10 @@ void InGameUI::postDraw( void )m_superweaponIconCount = 0;m_spectatorSuperweapons.clear();- // the Classic interface writes EA's column of names and clocks instead, inside the 4:3 box+ // the Classic interface writes EA's column of names and clocks instead, inside the HUD's+ // 16:9 frame beside the barconst Bool classic = TheGlobalData->isClassicUI();- const UIRect box = TheUIRect();+ const UIRect box = TheHudRect();const Int classicX = box.x + REAL_TO_INT( m_superweaponPosition.x * box.w );Int classicY = box.y + REAL_TO_INT( m_superweaponPosition.y * box.h );const Int classicBottom = box.y + REAL_TO_INT( box.h * 0.8f * 0.82f ); // EA's: the view above its bar@@ -8703,7 +8705,7 @@ void InGameUI::postDraw( void ){// Int namedTimerCount = 0;Bool reverseXDir = (m_namedTimerPosition.x >= 0.5f);- const UIRect box = TheUIRect();+ const UIRect box = TheHudRect();Int startX = box.x + (Int)(m_namedTimerPosition.x * box.w);Int startY = box.y + (Int)(m_namedTimerPosition.y * box.h);Color bgColor = GameMakeColor( 0, 0, 0, 255 );diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DDisplay.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DDisplay.hindex 9a14c7f38..91004ff46 100644--- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DDisplay.h+++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DDisplay.h@@ -144,6 +144,7 @@ public:#endifvirtual void preloadModelAssets( AsciiString model ); ///< preload model assetvirtual void preloadTextureAssets( AsciiString texture ); ///< preload texture asset+ virtual void preloadImageTexture( AsciiString texture );/// @todo Need a scene abstractionstatic RTS3DScene *m_3DScene; ///< our 3d scene representationdiff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cppindex 2f090f5de..a278dcf86 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cpp@@ -690,7 +690,7 @@ static const Image *plateImage( const ControlBarPlate *plate )//-------------------------------------------------------------------------------------------------/** The Classic interface's bar wears EA's one-piece painting, the scheme's own layers, offset by* however far the bar's frame has travelled from where layoutPanels put it (the minimised bar drops- * it), the same measure the plates use. ControlBarSchemeManager::drawBackground puts the painting where the windows are, in the 4:3 box. */+ * it), the same measure the plates use. ControlBarSchemeManager::drawBackground puts the painting where the windows are, in the HUD's 16:9 frame. *///-------------------------------------------------------------------------------------------------static void drawSchemeLayers( GameWindow *window, ControlBarSchemeManager *man, Bool foreground ){diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cppindex 1d897486f..9b2a80a90 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp@@ -4390,6 +4390,21 @@ void W3DDisplay::preloadTextureAssets( AsciiString texture )} // end preloadModelAssets+//-------------------------------------------------------------------------------------------------+/** The asset manager keeps the first TextureClass made under a name, and Render2D's Set_Texture+ * reuses it. Preloaded with Get_Texture's defaults it had every mip level and went through the+ * Texture Quality reduction, so a 4096 wide bar painting was drawn at 2048 below the top setting.+ * Asked for the way Render2D asks, one level, which the loader never reduces. */+//-------------------------------------------------------------------------------------------------+void W3DDisplay::preloadImageTexture( AsciiString texture )+{+ if( m_assetManager )+ {+ TextureClass *theTexture = m_assetManager->Get_Texture( texture.str(), MIP_LEVELS_1 );+ theTexture->Release_Ref();+ }+}+//-------------------------------------------------------------------------------------------------//-------------------------------------------------------------------------------------------------void W3DDisplay::doSmartAssetPurgeAndPreload(const char* usageFileName)diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cppindex 72337490b..6bce62f24 100644--- a/GeneralsMD/Code/Tests/test_gameengine.cpp+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp@@ -11925,10 +11925,20 @@ TEST(the_three_panels_are_one_bar_at_4x3_and_pull_apart_on_a_wide_screen)CHECK( ControlBarPanelDesignToScreen( ControlBar::CB_PANEL_LEFT, &whole, 0, 0, &left ) == FALSE );}-TEST(the_classic_bar_is_one_piece_centred_in_the_4x3_box)-{- /* The Classic interface puts EA's bar back together, and on a wide screen it stands in the- middle of the 4:3 box with the world showing down both sides, not pulled apart to the edges. */+TEST(the_classic_bar_is_one_piece_across_the_16x9_hud_frame)+{+ /* The menus keep the 4:3 box. The Classic bar is EA's in one piece stretched across the HUD's+ 16:9 frame: the whole screen up to 16:9, a centred 16:9 with the world down both sides past it. */+ CHECK_EQ( HudRectForScreen( 1920, 1080 ).x, 0 );+ CHECK_EQ( HudRectForScreen( 1920, 1080 ).w, 1920 );+ CHECK_EQ( HudRectForScreen( 2560, 1080 ).x, 320 );+ CHECK_EQ( HudRectForScreen( 2560, 1080 ).w, 1920 );+ CHECK_EQ( HudRectForScreen( 5120, 1440 ).x, 1280 );+ CHECK_EQ( HudRectForScreen( 5120, 1440 ).w, 2560 );+ CHECK_EQ( HudRectForScreen( 1680, 1050 ).x, 0 ); // 16:10 is narrower: the whole screen+ CHECK_EQ( HudRectForScreen( 1680, 1050 ).w, 1680 );+ CHECK_EQ( HudRectForScreen( 1024, 768 ).w, 1024 );+CHECK_EQ( UIRectForScreen( 1920, 1080 ).x, 240 );CHECK_EQ( UIRectForScreen( 1920, 1080 ).w, 1440 );CHECK_EQ( UIRectForScreen( 1920, 1080 ).h, 1080 );@@ -11949,7 +11959,7 @@ TEST(the_classic_bar_is_one_piece_centred_in_the_4x3_box)for( Int screen = 0; screen < 2; screen++ ){const Int w = screen ? 2560 : 1920;- const UIRect box = UIRectForScreen( w, 1080 );+ const UIRect box = HudRectForScreen( w, 1080 );for( Int p = 0; p < ControlBar::CB_PANEL_COUNT; p++ ){IRegion2D rect;diff --git a/NOTICE.md b/NOTICE.mdindex 69cd6399c..4c5e38aae 100644--- a/NOTICE.md+++ b/NOTICE.md@@ -43,6 +43,10 @@ right to use them (LICENSE.md, additional terms). They appear here only to say wtheir added lines are marked, and hunks backported from upstream SDL are named in each patch's header.- **FreeType** is used under the GNU GPL (version 2 or later) option of its dual licence.- **FFmpeg** is built under LGPL-2.1-or-later only: its build scripts refuse GPL or non-free configurations.+- **The Classic interface's 16:9 command bar** (`GeneralsMD/Code/Data/Art/Textures/ClassicWideBar*.tga`, and the+ window positions in `GeneralsMD/Code/Data/INI/ControlBarSchemeClassicWide.ini`) comes from "C&C Generals HD User+ Interface" by moddb_dev on ModDB, which builds on pWn3d_1337's Operation Firestorm interface. It is included with+ its author's permission.## Game datadiff --git a/README.md b/README.mdindex 6651e8196..fbdd612a8 100644--- a/README.md+++ b/README.md@@ -391,7 +391,8 @@ is open for anything that is not an issue yet.Electronic Arts released the source in 2025. İlyas Akın (ilyasakin) wrote the macOS, Linux and WindowsARM64 port. Fixes taken from [TheSuperHackers/GeneralsGameCode](https://github.com/TheSuperHackers/GeneralsGameCode),the community's CMake port of the same source, are credited where they landed, in the code and in the-commits. Third-party libraries are fetched at pinned versions and keep their own licences;+commits. The Classic interface's 16:9 command bar is moddb_dev's, from the "C&C Generals HD User Interface"+mod on ModDB, which builds on pWn3d_1337's Operation Firestorm interface, and is here with its author's permission. Third-party libraries are fetched at pinned versions and keep their own licences;[NOTICE.md](NOTICE.md) lists who wrote what and under which licence.---