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 bar in three anchored plates at every size
Olcay Seygan7ad8fb985238
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 680c7ff8e..de91bfb63 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1089,9 +1089,9 @@ 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 few boxes Classic ignores anyway, from smooth motion to the HUD size and the order lines, 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. On a 16:9 or 21:9 screen every menu outside a match sits in a 4:3 frame in the middle at its drawn shape, backdrop and border included, with black down both sides the way a 4:3 game looks on a wide monitor; in a match the options and save screens keep that 4:3 frame over the battlefield. 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 build tooltip over it, the promotion screen, the superweapon countdowns, the messages, the chat line, the quit menu and diplomacy 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 as fast as Reforged's, about fourteen notches from the ground to the whole map where 1.04 took eighty, on the middle of the screen unless you tick Zoom to Cursor, as near and as far as Reforged's camera goes, turns without snapping unless you tick Snap Camera Rotation, and scrolls from the last three pixels of a full screen and not at all in a window, whatever the options say. It runs past the edge of the map as far as Reforged's camera does, 200 units unless `CameraBoundaryMargin` says otherwise, so a base in a corner comes to the middle of the screen in either interface. 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.+- 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 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 every menu outside a match sits in a 4:3 frame in the middle at its drawn shape, backdrop and border included, with black down both sides the way a 4:3 game looks on a wide monitor; in a match the options and save screens keep that 4:3 frame over the battlefield. In a match nothing is pulled out of shape and nothing waits in a frame in the middle. The command bar comes in three pieces at every resolution: the radar stands on the left edge of the screen, the build grid in the middle and your selection on the right edge, each at the size a 4:3 screen of the same height gives it, with battlefield between them on anything wider. At 1920x1080 a build button is 90 by 79 pixels, the shape it was drawn, where EA's stretched bar made it 120 by 79, and on a 5120x1440 screen the radar is still in the corner your eye goes to, not 1280 pixels in from it. Your general's powers climb the right edge, the build tooltip and the chat line sit over the radar, diplomacy opens in the top left, the messages run from the top left corner and the superweapon countdowns from the top right, all at that same size, as they stood on a 4:3 screen. 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 as fast as Reforged's, about fourteen notches from the ground to the whole map where 1.04 took eighty, on the middle of the screen unless you tick Zoom to Cursor, as near and as far as Reforged's camera goes, turns without snapping unless you tick Snap Camera Rotation, and scrolls from the last three pixels of a full screen and not at all in a window, whatever the options say. It runs past the edge of the map as far as Reforged's camera does, 200 units unless `CameraBoundaryMargin` says otherwise, so a base in a corner comes to the middle of the screen in either interface. 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.-- Classic's wide command bar lets the battlefield have the ground it shows. Over the build grid's two shoulders the painting starts lower than the bar's old click area did, and a strip of battlefield about 80 pixels deep at 1920x1080 could be seen but not clicked; a unit standing there could not be selected or sent anywhere. A click now goes wherever the painting is see-through. Your general's powers beside that bar are square again too: they were drawn a third wider than tall, stretched to fit EA's 4:3 bar while the wide bar next to them kept its shape. The promotion screen keeps its shape on that bar as well, in the middle of the screen.+- Classic's command bar lets the battlefield have the ground it shows. A click on the battlefield between its three pieces, or over the sloped shoulders of the build grid's plate, reaches the unit standing there; only the painted metal keeps it. Change the resolution with the bar minimised and the build tooltip used to come back 245 pixels too high at 1920x1080, as far as the bar had dropped; it stays over the radar now.- 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.diff --git a/GeneralsMD/Code/BuildFingerprint.manifest b/GeneralsMD/Code/BuildFingerprint.manifestindex 02a6bbb2e..8fa63647e 100644--- a/GeneralsMD/Code/BuildFingerprint.manifest+++ b/GeneralsMD/Code/BuildFingerprint.manifest@@ -1,7 +1,4 @@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@@ -20,6 +17,17 @@ Data/Cinema/blastcheck.txtData/Cinema/demo.txtData/Cinema/explreel.txtData/Cinema/headlights.txt+Data/Cinema/hero_loop.txt+Data/Cinema/hero_loop_01.txt+Data/Cinema/hero_loop_02.txt+Data/Cinema/hero_loop_03.txt+Data/Cinema/hero_loop_04.txt+Data/Cinema/hero_loop_05.txt+Data/Cinema/hero_loop_06.txt+Data/Cinema/hero_loop_07.txt+Data/Cinema/hero_loop_08.txt+Data/Cinema/hero_loop_09.txt+Data/Cinema/hero_loop_10.txtData/Cinema/inf_jam.txtData/Cinema/inf_walk.txtData/Cinema/lsv_burst.txt@@ -79,10 +87,8 @@ 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.ini@@ -110,6 +116,17 @@ Data/Scenarios/headlights.txtData/Scenarios/helislide.txtData/Scenarios/helitypes.txtData/Scenarios/helixturret.txt+Data/Scenarios/hero_loop.txt+Data/Scenarios/hero_loop_01.txt+Data/Scenarios/hero_loop_02.txt+Data/Scenarios/hero_loop_03.txt+Data/Scenarios/hero_loop_04.txt+Data/Scenarios/hero_loop_05.txt+Data/Scenarios/hero_loop_06.txt+Data/Scenarios/hero_loop_07.txt+Data/Scenarios/hero_loop_08.txt+Data/Scenarios/hero_loop_09.txt+Data/Scenarios/hero_loop_10.txtData/Scenarios/hitrun.txtData/Scenarios/infantrywalk.txtData/Scenarios/infconvoy.txtdiff --git a/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarAmerica.tga b/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarAmerica.tgadeleted file mode 100644index 28f3a761d..000000000Binary files a/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarAmerica.tga and /dev/null differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarChina.tga b/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarChina.tgadeleted file mode 100644index 2174aeadb..000000000Binary files a/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarChina.tga and /dev/null differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarGLA.tga b/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarGLA.tgadeleted file mode 100644index 0b975a42b..000000000Binary files a/GeneralsMD/Code/Data/Art/Textures/ClassicWideBarGLA.tga and /dev/null differdiff --git a/GeneralsMD/Code/Data/INI/ControlBarSchemeClassicWide.ini b/GeneralsMD/Code/Data/INI/ControlBarSchemeClassicWide.inideleted file mode 100644index 9b24a0ebb..000000000--- a/GeneralsMD/Code/Data/INI/ControlBarSchemeClassicWide.ini+++ /dev/null@@ -1,1249 +0,0 @@-; 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.inideleted file mode 100644index f6e6450b9..000000000--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ClassicWideBar.ini+++ /dev/null@@ -1,36 +0,0 @@-; 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 7d18e7f67..95c4e7234 100644--- a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h@@ -1702,9 +1702,7 @@ 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). 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.+ * with (1,1) and the science screen is centred at the top with (0.5,0). Both interfaces.** 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 721202607..194839bc4 100644--- a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h@@ -132,9 +132,6 @@ 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@@ -279,15 +276,6 @@ 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; }-- /** Whether the painting on screen is solid at this screen point, its layers placed the way- * drawBackground and drawForeground put them with the same offset. A texture that is not a- * 32-bit targa counts as solid all over its part. */- Bool isPaintedAt( Int x, Int y, ICoord2D offset ) const;-// parse Functions for the INI fileconst FieldParse *getFieldParse() const { return m_controlBarSchemeFieldParseTable; } ///< returns the parsing fieldsdiff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Display.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Display.hindex 36628c722..db8b1904e 100644--- a/GeneralsMD/Code/GameEngine/Include/GameClient/Display.h+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Display.h@@ -293,26 +293,6 @@ 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 b5ea3701f..c809d00ee 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/Display.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Display.cpp@@ -57,19 +57,6 @@ 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 6dc42f374..90430d678 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp@@ -1611,6 +1611,7 @@ ControlBar::~ControlBar( void )} // end ~ControlBarvoid ControlBarPopupDescriptionUpdateFunc( WindowLayout *layout, void *param );+void ControlBarPopupDescription_forgetOffset( void );//-------------------------------------------------------------------------------------------------// Three-panel control bar layout -----------------------------------------------------------------@@ -1649,44 +1650,21 @@ 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 sharing one origin and stretched-/// across the HUD's 16:9 frame (HudRectForScreen) as the game shipped it stretched (classicScales).+/// The Classic interface. Its bar is laid out as Reforged's is, three plates at one scale, and keeps+/// EA's habits on top: the beacon button, the under-attack lamp, and minimising as one piece.static Bool barIsClassic( void ){return TheGlobalData != NULL && TheGlobalData->isClassicUI();}-/** 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.+/// Where a panel's design x 0 lands on screen.static Real panelOriginX( Int panel, Real dispW, Real s ){- if( barIsClassic() )- return dispW * 0.5f - CONTROL_BAR_DESIGN_W * 0.5f * s;return dispW * thePanelAnchorFraction[ panel ] - thePanelAnchorDesignX[ panel ] * s;}@@ -1755,7 +1733,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, Real sy,+static void layoutUniformWindow( GameWindow *win, Real originX, Real originY, Real s,Real loadScaleX, Real loadScaleY,Int oldParentX, Int oldParentY,Int newParentX, Int newParentY )@@ -1774,13 +1752,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 * sy );+ const Int newY = REAL_TO_INT_FLOOR( originY + designY * s );win->winSetPosition( newX - newParentX, newY - newParentY );- win->winSetSize( REAL_TO_INT_CEIL( designW * s ), REAL_TO_INT_CEIL( designH * sy ) );+ win->winSetSize( REAL_TO_INT_CEIL( designW * s ), REAL_TO_INT_CEIL( designH * s ) );for( GameWindow *child = win->winGetChild(); child; child = child->winGetNext() )- layoutUniformWindow( child, originX, originY, s, sy, loadScaleX, loadScaleY,+ layoutUniformWindow( child, originX, originY, s, loadScaleX, loadScaleY,oldX, oldY, newX, newY );}@@ -1798,31 +1776,15 @@ 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;- Real s = ControlBarUniformScale();- Real sy = s;+ const Real s = ControlBarUniformScale();//// 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.//- Real originX = dispW * anchorFracX - CONTROL_BAR_DESIGN_W * anchorFracX * s;- Real originY = dispH * anchorFracY - CONTROL_BAR_DESIGN_H * anchorFracY * s;-- //- // Classic keeps the bar's own stretch inside the HUD's 16:9 frame (classicScales): the powers'- // column down the frame's right edge beside the bar, the promotion screen over the frame. Under- // EA's 4:3 bar that is the loader's stretch, as the game shipped it. Under the 16:9 bar it is the- // wide painting's, which is nearly square at 16:9; stretching EA's 800 across the frame drew the- // general's powers a third wider than tall beside a bar that is not stretched at all.- //- if( barIsClassic() )- {- const UIRect hud = TheHudRect();- classicScales( dispW, dispH, &s, &sy );- originX = hud.x + hud.w * anchorFracX - CONTROL_BAR_DESIGN_W * anchorFracX * s;- originY = 0.0f;- }+ const Real originX = dispW * anchorFracX - CONTROL_BAR_DESIGN_W * anchorFracX * s;+ const Real originY = dispH * anchorFracY - CONTROL_BAR_DESIGN_H * anchorFracY * s;ICoord2D rootOrigin;root->winGetScreenPosition( &rootOrigin.x, &rootOrigin.y );@@ -1837,7 +1799,7 @@ void ControlBarLayoutUniform( GameWindow *root, Real anchorFracX, Real anchorFraif( parent )parent->winGetScreenPosition( &parentPos.x, &parentPos.y );- layoutUniformWindow( root, originX, originY, s, sy, loadScaleX, loadScaleY,+ layoutUniformWindow( root, originX, originY, s, loadScaleX, loadScaleY,parentPos.x, parentPos.y, parentPos.x, parentPos.y );}@@ -1862,21 +1824,14 @@ Bool ControlBarPanelDesignToScreen( Int panel, const IRegion2D *design,//const Real loadScaleX = dispW / CONTROL_BAR_DESIGN_W;const Real loadScaleY = dispH / CONTROL_BAR_DESIGN_H;- Real s = loadScaleX < loadScaleY ? loadScaleX : loadScaleY;- Real sy = s;- if( barIsClassic() )- classicScales( dispW, dispH, &s, &sy );+ const Real s = loadScaleX < loadScaleY ? loadScaleX : loadScaleY;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 ) * 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, stretched as it shipped, and its rectangles are the arithmetic's- if( barIsClassic() )- return TRUE;+ 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 );//// The screen has three edges the bar touches and each belongs to one panel: the left panel owns@@ -1968,23 +1923,6 @@ 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 -------------------------------------------------------------------------------------//-------------------------------------------------------------------------------------------------@@ -2229,10 +2167,6 @@ Bool ControlBar::letsClickThrough( GameWindow *window, Int x, Int y )GameWindow *frame = window->winGetParent();if( frame == NULL || m_controlBarSchemeManager == NULL || TheDisplay == NULL )return FALSE;-- // EA's 4:3 bar: its input-blocking panes are the shape of the bar, and they keep their clicks- if( barIsClassic() && m_controlBarSchemeManager->getCurrentOverhangX() == 0 )- return FALSE;if( frame->winGetWindowId() != (Int)TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ControlBarParent" ) )return FALSE;@@ -2240,23 +2174,6 @@ Bool ControlBar::letsClickThrough( GameWindow *window, Int x, Int y )if( shortName[ 0 ] != 0 && strcmp( shortName, "CenterBackground" ) != 0 )return FALSE;- //- // The Classic 16:9 bar's panes are EA's panel rectangles widened by the overhang, and its painting- // starts up to 46 design units below their tops over the command grid's shoulders, so the painting- // itself decides: transparent there is battlefield.- //- if( barIsClassic() )- {- if( window->winPointInChild( x, y, TRUE ) != window )- return FALSE;-- ICoord2D now, offset;- frame->winGetScreenPosition( &now.x, &now.y );- offset.x = now.x - m_panelOrigin.x;- offset.y = now.y - m_panelOrigin.y;- return m_controlBarSchemeManager->isPaintedAt( x, y, offset ) == FALSE;- }-// the CSS page is what is drawn, so what it drew solid is what is solid. Asked before the// children, because a see-through child the page does not draw - the observer's info window// spans the whole centre - would otherwise keep a click on bare battlefield@@ -2332,10 +2249,7 @@ 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;- Real s = ControlBarUniformScale(); // across; sy down- Real sy = s;- if( barIsClassic() )- classicScales( dispW, dispH, &s, &sy );+ const Real s = ControlBarUniformScale();const Real originX = panelOriginX( panel, dispW, s );ICoord2D rel, size;@@ -2357,9 +2271,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 ) * sy );+ Int newY = REAL_TO_INT_FLOOR( dispH - ( CONTROL_BAR_DESIGN_H - place.designY ) * s );Int newW = REAL_TO_INT_CEIL( place.designW * s );- Int newH = REAL_TO_INT_CEIL( place.designH * sy );+ Int newH = REAL_TO_INT_CEIL( place.designH * s );const char *shortName = shortWindowName( win );@@ -2371,8 +2285,7 @@ void ControlBar::placeInPanel( GameWindow *win, Int panel,// observer panes - slides across into the field. See ControlBarPlate.//const ControlBarPlate *plate = NULL;- // the Classic bar wears the scheme's own painting, which ControlBarScheme.ini's windows match- if( m_controlBarSchemeManager && !barIsClassic() )+ if( m_controlBarSchemeManager ){plate = ControlBarPlateForSide( m_controlBarSchemeManager->getCurrentSide(), panel );if( plate == NULL )@@ -2388,11 +2301,7 @@ 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 )- {- 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 );- }+ childShiftX = plate ? REAL_TO_INT_FLOOR( plate->gridShiftX * s ) : 0;//// The unnamed children are the GameWinBlockInput panes: their only job is to keep clicks on the@@ -2843,30 +2752,14 @@ 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 );-- //- // 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 };+ const Real s = ControlBarUniformScale();Int p;for( p = 0; p < CB_PANEL_COUNT; p++ )- {- 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(),+ ControlBarPanelDesignToScreen( p, &thePanelDesignRect[ p ],+ 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;@@ -2874,7 +2767,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 ) * sy );+ REAL_TO_INT_FLOOR( dispH - ( CONTROL_BAR_DESIGN_H - CONTROL_BAR_DESIGN_TOP ) * s );parent->winSetPosition( 0, parentTop );parent->winSetSize( REAL_TO_INT_CEIL( dispW ), REAL_TO_INT_CEIL( dispH ) - parentTop );@@ -2922,11 +2815,8 @@ void ControlBar::layoutPanels( void )designCenterX = ( barOrigin.x + rel.x + size.x * 0.5f ) / loadScaleX;}- // 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 );+ placeInPanel( child, panelForWindow( shortWindowName( child ), designCenterX ),+ barOrigin.x, barOrigin.y, 0, parentTop );}// whatever was away before is away again, without being watched leaving a second time@@ -3292,6 +3182,7 @@ void ControlBar::initWindows( void )if(!m_animateWindowManagerForGenShortcuts)m_animateWindowManagerForGenShortcuts = NEW AnimateWindowManager;m_buildToolTipLayout = TheWindowManager->winCreateLayout( "ControlBarPopupDescription.wnd" );+ ControlBarPopupDescription_forgetOffset();if(m_buildToolTipLayout){m_buildToolTipLayout->hide(TRUE);diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cppindex d4f30bf0d..02bfe312d 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp@@ -56,10 +56,6 @@#include "PreRTS.h" // This must go first in EVERY cpp file int the GameEngine#include "Lib/Clock.h"-#include <map>--#include "Common/file.h"-#include "Common/FileSystem.h"#include "Common/Player.h"#include "Common/PlayerTemplate.h"#include "Common/Recorder.h"@@ -444,22 +440,17 @@ 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 )+ const Coord2D& resMultiplier ){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 x = ul.x * 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,@@ -491,14 +482,8 @@ void ControlBarScheme::init(void)}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 - 2 * overhangX) ;+ resMultiplier.x = TheDisplay->getWidth()/INT_TO_REAL(m_ScreenCreationRes.x) ;resMultiplier.y = TheDisplay->getHeight()/INT_TO_REAL(m_ScreenCreationRes.y);win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:PopupCommunicator" ) );@@ -511,7 +496,7 @@ void ControlBarScheme::init(void)GadgetButtonSetHiliteImage(win, m_buddyButtonHightlited);GadgetButtonSetHiliteSelectedImage(win, m_buddyButtonPushed);GadgetButtonSetDisabledImage(win, m_buddyButtonDisabled);- placeSchemeWindow( win, m_chatUL, m_chatLR, resMultiplier, overhangX );+ placeSchemeWindow( win, m_chatUL, m_chatLR, resMultiplier );}win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ButtonIdleWorker" ) );if(win)@@ -520,7 +505,7 @@ void ControlBarScheme::init(void)GadgetButtonSetHiliteImage(win, m_idleWorkerButtonHightlited);GadgetButtonSetHiliteSelectedImage(win, m_idleWorkerButtonPushed);GadgetButtonSetDisabledImage(win, m_idleWorkerButtonDisabled);- placeSchemeWindow( win, m_workerUL, m_workerLR, resMultiplier, overhangX );+ placeSchemeWindow( win, m_workerUL, m_workerLR, resMultiplier );}win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ExpBarForeground" ) );if(win)@@ -534,7 +519,7 @@ void ControlBarScheme::init(void)GadgetButtonSetHiliteImage(win, m_optionsButtonHightlited);GadgetButtonSetHiliteSelectedImage(win, m_optionsButtonPushed);GadgetButtonSetDisabledImage(win, m_optionsButtonDisabled);- placeSchemeWindow( win, m_optionsUL, m_optionsLR, resMultiplier, overhangX );+ placeSchemeWindow( win, m_optionsUL, m_optionsLR, resMultiplier );}win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ButtonPlaceBeacon" ) );if(win)@@ -543,16 +528,16 @@ void ControlBarScheme::init(void)GadgetButtonSetHiliteImage(win, m_beaconButtonHightlited);GadgetButtonSetHiliteSelectedImage(win, m_beaconButtonPushed);GadgetButtonSetDisabledImage(win, m_beaconButtonDisabled);- placeSchemeWindow( win, m_beaconUL, m_beaconLR, resMultiplier, overhangX );+ placeSchemeWindow( win, m_beaconUL, m_beaconLR, resMultiplier );}win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:MoneyDisplay" ) );if(win)- placeSchemeWindow( win, m_moneyUL, m_moneyLR, resMultiplier, overhangX );+ placeSchemeWindow( win, m_moneyUL, m_moneyLR, resMultiplier );win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:PowerWindow" ) );if(win)- placeSchemeWindow( win, m_powerBarUL, m_powerBarLR, resMultiplier, overhangX );+ placeSchemeWindow( win, m_powerBarUL, m_powerBarLR, resMultiplier );win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ButtonGeneral" ) );if(win)@@ -562,7 +547,7 @@ void ControlBarScheme::init(void)GadgetButtonSetHiliteImage(win, m_generalButtonHightlited);GadgetButtonSetHiliteSelectedImage(win, m_generalButtonPushed);GadgetButtonSetDisabledImage(win, m_generalButtonDisabled);- placeSchemeWindow( win, m_generalUL, m_generalLR, resMultiplier, overhangX );+ placeSchemeWindow( win, m_generalUL, m_generalLR, resMultiplier );}win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ButtonLarge" ) );@@ -572,7 +557,7 @@ void ControlBarScheme::init(void)// GadgetButtonSetEnabledImage(win, m_minMaxButtonEnable);// GadgetButtonSetHiliteImage(win, m_minMaxButtonHightlited);// GadgetButtonSetHiliteSelectedImage(win, m_minMaxButtonPushed);- placeSchemeWindow( win, m_minMaxUL, m_minMaxLR, resMultiplier, overhangX );+ placeSchemeWindow( win, m_minMaxUL, m_minMaxLR, resMultiplier );}win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:WinUAttack" ) );@@ -580,7 +565,7 @@ void ControlBarScheme::init(void){win->winSetEnabledImage(0,m_uAttackButtonEnable);win->winSetDisabledImage(0,m_uAttackButtonHightlited);- placeSchemeWindow( win, m_uAttackUL, m_uAttackLR, resMultiplier, overhangX );+ placeSchemeWindow( win, m_uAttackUL, m_uAttackLR, resMultiplier );}win = TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "GeneralsExpPoints.wnd:GenExpParent" ) );@@ -934,11 +919,6 @@ 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){TheDisplay->preloadTextureAssets(CBScheme->m_buttonQueueImage->getFilename());@@ -979,8 +959,6 @@ 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;@@ -1011,7 +989,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 = TheHudRect().w / (Real)tempScheme->m_ScreenCreationRes.x;+ m_multiplyer.x = TheDisplay->getWidth() / (Real)tempScheme->m_ScreenCreationRes.x;m_multiplyer.y = TheDisplay->getHeight() / (Real)tempScheme->m_ScreenCreationRes.y;m_currentScheme = tempScheme;}@@ -1045,103 +1023,19 @@ void ControlBarSchemeManager::update( void )m_currentScheme->update();}-//------------------------------------------------------------------------------/** 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). *///-----------------------------------------------------------------------------void ControlBarSchemeManager::drawForeground( ICoord2D offset ){- offset.x += TheHudRect().x;if(m_currentScheme)m_currentScheme->drawForeground( m_multiplyer, offset );}//-----------------------------------------------------------------------------void ControlBarSchemeManager::drawBackground( ICoord2D offset ){- offset.x += TheHudRect().x;if(m_currentScheme)m_currentScheme->drawBackground( m_multiplyer, offset );}-//-// A painting's mask is read off its whole texture the first time a click lands over it, and kept for-// the session; ControlBarPlateMaskFromTarga is the reader the Reforged plates use. A texture that-// does not read leaves the mask empty, and an empty mask is solid everywhere.-//-typedef std::map< const Image *, std::vector<UnsignedByte> > SchemeImageMaskMap;-static SchemeImageMaskMap theSchemeImageMasks;--static const std::vector<UnsignedByte> &schemeImageMask( const Image *image )-{- SchemeImageMaskMap::iterator it = theSchemeImageMasks.find( image );- if( it != theSchemeImageMasks.end() )- return it->second;-- std::vector<UnsignedByte> &mask = theSchemeImageMasks[ image ];- AsciiString path;- path.format( "Art\\Textures\\%s", image->getFilename().str() );- File *file = TheFileSystem->openFile( path.str(), File::READ | File::BINARY );- if( file == NULL )- {- DEBUG_LOG(( "CONTROLBAR SCHEME MASK %s did not open, its part catches every click\n", path.str() ));- return mask;- }-- const Int length = file->size();- char *bytes = file->readEntireAndClose();- const ICoord2D *texture = image->getTextureSize();- if( ControlBarPlateMaskFromTarga( (const UnsignedByte *)bytes, length, texture->x, texture->y, mask ) == FALSE )- {- DEBUG_LOG(( "CONTROLBAR SCHEME MASK %s is not a 32-bit targa of %dx%d, its part catches every click\n",- path.str(), texture->x, texture->y ));- mask.clear();- }- delete [] bytes;- return mask;-}--//------------------------------------------------------------------------------Bool ControlBarSchemeManager::isPaintedAt( Int x, Int y, ICoord2D offset ) const-{- if( m_currentScheme == NULL )- return FALSE;-- offset.x += TheHudRect().x;- for( Int i = 0; i < MAX_CONTROL_BAR_SCHEME_IMAGE_LAYERS; i++ )- {- for( ControlBarScheme::ControlBarSchemeImageList::const_iterator it = m_currentScheme->m_layer[ i ].begin();- it != m_currentScheme->m_layer[ i ].end(); ++it )- {- const ControlBarSchemeImage *part = *it;- if( part->m_image == NULL )- continue;-- // the rectangle drawForeground and drawBackground draw it into- const Int left = REAL_TO_INT_FLOOR( part->m_position.x * m_multiplyer.x ) + offset.x;- const Int top = REAL_TO_INT_FLOOR( part->m_position.y * m_multiplyer.y ) + offset.y;- const Int right = REAL_TO_INT_CEIL( ( part->m_position.x + part->m_size.x ) * m_multiplyer.x - 0.01f ) + offset.x;- const Int bottom = REAL_TO_INT_CEIL( ( part->m_position.y + part->m_size.y ) * m_multiplyer.y - 0.01f ) + offset.y;- if( x < left || y < top || x >= right || y >= bottom )- continue;-- const std::vector<UnsignedByte> &mask = schemeImageMask( part->m_image );- if( mask.empty() )- return TRUE;-- const Region2D *uv = part->m_image->getUV();- const ICoord2D *texture = part->m_image->getTextureSize();- const Real u = uv->lo.x + ( uv->hi.x - uv->lo.x ) * ( x - left + 0.5f ) / ( right - left );- const Real v = uv->lo.y + ( uv->hi.y - uv->lo.y ) * ( y - top + 0.5f ) / ( bottom - top );- const Int texelX = REAL_TO_INT_FLOOR( u * texture->x );- const Int texelY = REAL_TO_INT_FLOOR( v * texture->y );- if( mask[ texelY * texture->x + texelX ] )- return TRUE;- }- }- return FALSE;-}-//-----------------------------------------------------------------------------/** Which side's artwork the bar on screen is wearing, when the scheme's own name is not a side* anything else knows - "Observer". ControlBar.ini builds that bar entirely out of one faction's@@ -1170,28 +1064,19 @@ 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. */+/** The side's widest scheme, as EA picked. Neither interface draws a scheme's painting; the plates+ * stand in for it (ControlBarPlateForSide), and the scheme only places the bar's own windows. *///-----------------------------------------------------------------------------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 ) )+ if( scheme->m_side.compareNoCase( side ) != 0 )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 )- {+ if( best == NULL || scheme->m_ScreenCreationRes.x > best->m_ScreenCreationRes.x )best = scheme;- bestScore = score;- }}return best;}@@ -1216,7 +1101,7 @@ void ControlBarSchemeManager::setControlBarSchemeByPlayerTemplate( const PlayerTif(tempScheme){// setup the multiplyer value- m_multiplyer.x = TheHudRect().w / (Real)tempScheme->m_ScreenCreationRes.x;+ m_multiplyer.x = TheDisplay->getWidth() / (Real)tempScheme->m_ScreenCreationRes.x;m_multiplyer.y = TheDisplay->getHeight() / (Real)tempScheme->m_ScreenCreationRes.y;m_currentScheme = tempScheme;}@@ -1257,7 +1142,7 @@ void ControlBarSchemeManager::setControlBarSchemeByPlayer(Player *p)if(tempScheme){// setup the multiplyer value- m_multiplyer.x = TheHudRect().w / (Real)tempScheme->m_ScreenCreationRes.x;+ m_multiplyer.x = TheDisplay->getWidth() / (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/GUICallbacks/ControlBarPopupDescription.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cppindex 5489f5ac7..e84ac3490 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp@@ -467,7 +467,19 @@ void ControlBarPopupDescriptionUpdateFunc( WindowLayout *layout, void *param )TheControlBar->deleteBuildTooltipLayout();}}-++}++//+// How far the bar had travelled (minimised, or sliding in) the last time the tooltip was moved with+// it. It belongs to one tooltip layout: a new layout, made when the resolution changes, stands where+// the loader put it, and carrying the old one's offset over lifted it by the whole minimised drop.+//+static ICoord2D theTooltipLastOffset = { 0, 0 };++void ControlBarPopupDescription_forgetOffset( void )+{+ theTooltipLastOffset.x = theTooltipLastOffset.y = 0;}// ---------------------------------------------------------------------------------------@@ -1070,7 +1082,7 @@ void ControlBar::populateBuildTooltipLayout( const CommandButton *commandButton,{static NameKeyType winNamekey = TheNameKeyGenerator->nameToKey( AsciiString( "ControlBar.wnd:BackgroundMarker" ) );- static ICoord2D lastOffset = { 0, 0 };+ ICoord2D &lastOffset = theTooltipLastOffset;ICoord2D size, newSize, pos;Int diffSize;diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManagerScript.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManagerScript.cppindex 9c5d18a67..e05288176 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManagerScript.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManagerScript.cpp@@ -509,10 +509,11 @@ static Bool parseTooltip( char *token, WinInstanceData *instData,enum LayoutPlacement{LAYOUT_STRETCH, ///< stretched to the whole screen, x and y apart, as EA shipped every layout- LAYOUT_FIT, ///< one scale, centred in the 4:3 box- LAYOUT_HUD ///< stretched as EA shipped it, over the Classic HUD's 16:9 frame (TheHudRect)+ LAYOUT_FIT ///< one scale, the smaller, its 800x600 standing at theLayoutAnchor};static LayoutPlacement theLayoutPlacement = LAYOUT_STRETCH;+/// where a fitted layout stands: the same fraction of the screen and of the layout, (0.5,0.5) centred+static Coord2D theLayoutAnchor = { 0.5f, 0.5f };// The menus are fitted in both interfaces: the shell's screens and the dialogs a match opens over the// battlefield, all centred on a 4:3 panel of their own. The stretch EA shipped drew every panel, logo@@ -530,10 +531,9 @@ static Bool startsWithFolder( const char *path, const char *folder )return *path == '/' || *path == '\\';}-// The Classic interface puts everything in the 4:3 box (UIRectForScreen), battlefield furniture and-// 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.+// The Classic interface fits everything at one scale, battlefield furniture and all, except the+// command bar's own layouts: layoutPanels and ControlBarLayoutUniform divide the loader's stretch+// back out of those, so they must be given it.static Bool barLaysOutItself( const char *filename ){static const char *const own[] = { "controlbar.wnd", "generalsexppoints.wnd", "genpowersshortcutbar" };@@ -543,27 +543,37 @@ static Bool barLaysOutItself( const char *filename )return FALSE;}-// The Classic interface's in-match furniture that stands with the command bar, in its 16:9 frame:-// the build tooltip over the bar, the chat line, the quit menu and diplomacy. Matched on the file's-// own name, whatever folder it was asked for under.-static Bool classicHudLayout( const char *filename )+// Where a fitted Classic layout stands. The match's own furniture keeps the corner EA drew it in, as+// the bar's radar and selection keep theirs: the build tooltip and the chat line over the radar in the+// bottom left, diplomacy in the top left, the replay controls over the middle of the bar. Every other+// layout, the shell's and the dialogs a match opens, is centred. Matched on the file's own name,+// whatever folder it was asked for under.+static Coord2D classicLayoutAnchor( const char *filename ){const char *name = filename;for( const char *c = filename; *c; c++ )if( *c == '/' || *c == '\\' )name = c + 1;- static const char *const hud[] =+ static const struct { const char *name; Real x, y; } anchors[] ={- "controlbarpopupdescription.wnd", "ingamechat.wnd", "quitmenu.wnd", "quitnosave.wnd", "diplomacy.wnd"+ { "controlbarpopupdescription.wnd", 0.0f, 1.0f },+ { "ingamechat.wnd", 0.0f, 1.0f },+ { "diplomacy.wnd", 0.0f, 0.0f },+ { "replaycontrol.wnd", 0.5f, 1.0f },};- for( Int i = 0; i < (Int)ARRAY_SIZE( hud ); i++ )- if( stricmp( name, hud[ i ] ) == 0 )- return TRUE;- return FALSE;+ Coord2D anchor = { 0.5f, 0.5f };+ for( Int i = 0; i < (Int)ARRAY_SIZE( anchors ); i++ )+ if( stricmp( name, anchors[ i ].name ) == 0 )+ {+ anchor.x = anchors[ i ].x;+ anchor.y = anchors[ i ].y;+ }+ return anchor;}static LayoutPlacement layoutPlacement( const char *filename ){+ theLayoutAnchor.x = theLayoutAnchor.y = 0.5f;if( TheGlobalData == NULL || filename == NULL )return LAYOUT_STRETCH;// "Menus/X.wnd" as the shell names them, or the whole "Window\\Menus\\X.wnd"@@ -573,7 +583,8 @@ static LayoutPlacement layoutPlacement( const char *filename ){if( barLaysOutItself( filename ) )return LAYOUT_STRETCH;- return classicHudLayout( filename ) ? LAYOUT_HUD : LAYOUT_FIT;+ theLayoutAnchor = classicLayoutAnchor( filename );+ return LAYOUT_FIT;}return startsWithFolder( filename, "menus" ) ? LAYOUT_FIT : LAYOUT_STRETCH;}@@ -622,20 +633,11 @@ static Bool parseScreenRect( char *token, char *buffer,//const Bool fullScreen = screenRegion.lo.x <= 2 && screenRegion.lo.y <= 2 &&screenRegion.hi.x >= createRes.x - 2 && screenRegion.hi.y >= createRes.y - 2;- if( theLayoutPlacement == LAYOUT_HUD )- {- const UIRect hud = TheHudRect();- const Real hudScaleX = (Real)hud.w / (Real)createRes.x;- screenRegion.lo.x = (Int)((Real)screenRegion.lo.x * hudScaleX) + hud.x;- screenRegion.lo.y = (Int)((Real)screenRegion.lo.y * yScale);- screenRegion.hi.x = (Int)((Real)screenRegion.hi.x * hudScaleX) + hud.x;- screenRegion.hi.y = (Int)((Real)screenRegion.hi.y * yScale);- }- else if( theLayoutPlacement == LAYOUT_FIT && ( !fullScreen || TheGlobalData->isClassicUI() ) )+ if( theLayoutPlacement == LAYOUT_FIT && ( !fullScreen || TheGlobalData->isClassicUI() ) ){const Real scale = min( xScale, yScale );- const Real left = ((Real)TheDisplay->getWidth() - (Real)createRes.x * scale) / 2.0f;- const Real top = ((Real)TheDisplay->getHeight() - (Real)createRes.y * scale) / 2.0f;+ const Real left = ((Real)TheDisplay->getWidth() - (Real)createRes.x * scale) * theLayoutAnchor.x;+ const Real top = ((Real)TheDisplay->getHeight() - (Real)createRes.y * scale) * theLayoutAnchor.y;screenRegion.lo.x = (Int)((Real)screenRegion.lo.x * scale + left);screenRegion.lo.y = (Int)((Real)screenRegion.lo.y * scale + top);screenRegion.hi.x = (Int)((Real)screenRegion.hi.x * scale + left);diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cppindex c67007711..04f812e16 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp@@ -4453,6 +4453,19 @@ void InGameUI::fadeClassicMessages( void )}}+//-------------------------------------------------------------------------------------------------+/** Where an x EA gave as a fraction of its 800 wide screen lands at the HUD's one scale: as far from+ * the nearer side edge as EA's was, so a column EA put on the right stays on the right of a 32:9+ * screen. At 4:3 this is EA's own position. */+//-------------------------------------------------------------------------------------------------+static Int hudEdgeX( Real fraction )+{+ const Real s = ControlBarUniformScale();+ if( fraction < 0.5f )+ return REAL_TO_INT( fraction * 800.0f * s );+ return TheDisplay->getWidth() - REAL_TO_INT( ( 1.0f - fraction ) * 800.0f * s );+}+//-------------------------------------------------------------------------------------------------void InGameUI::drawClassicMessages( void ){@@ -4460,10 +4473,9 @@ void InGameUI::drawClassicMessages( void )if( !m_messagesOn )return;- // 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;+ // the screen's own top left corner, not the menus' 4:3 box+ const Int x = m_messagePosition.x;+ Int y = m_messagePosition.y;for( Int i = CLASSIC_MESSAGES - 1; i >= 0; i-- ){ClassicMessage &line = m_classicMessages[ i ];@@ -8533,13 +8545,12 @@ void InGameUI::postDraw( void )m_superweaponIconCount = 0;m_spectatorSuperweapons.clear();- // the Classic interface writes EA's column of names and clocks instead, inside the HUD's- // 16:9 frame beside the bar+ // the Classic interface writes EA's column of names and clocks instead, in the top rightconst Bool classic = TheGlobalData->isClassicUI();- 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+ const Int screenH = TheDisplay->getHeight();+ const Int classicX = hudEdgeX( m_superweaponPosition.x );+ Int classicY = REAL_TO_INT( m_superweaponPosition.y * screenH );+ const Int classicBottom = REAL_TO_INT( screenH * 0.8f * 0.82f ); // EA's: the view above its barfor (Int i=0; i<MAX_PLAYER_COUNT; ++i){@@ -8705,9 +8716,10 @@ void InGameUI::postDraw( void ){// Int namedTimerCount = 0;Bool reverseXDir = (m_namedTimerPosition.x >= 0.5f);- const UIRect box = TheHudRect();- Int startX = box.x + (Int)(m_namedTimerPosition.x * box.w);- Int startY = box.y + (Int)(m_namedTimerPosition.y * box.h);+ // Classic keeps EA's column as far in from the right edge as EA had it, at the HUD's scale+ Int startX = TheGlobalData->isClassicUI() ? hudEdgeX( m_namedTimerPosition.x )+ : (Int)(m_namedTimerPosition.x * TheDisplay->getWidth());+ Int startY = (Int)(m_namedTimerPosition.y * TheDisplay->getHeight());Color bgColor = GameMakeColor( 0, 0, 0, 255 );for (NamedTimerMapIt mapIt = m_namedTimers.begin(); mapIt != m_namedTimers.end(); ++mapIt){@@ -9048,10 +9060,13 @@ void InGameUI::militarySubtitle( const AsciiString& label, Int duration )TheInGameUI->disableTooltipsUntil(messageTimeout);// calculate where this screen position should be since the position being passed in is based off 8x6+ // Classic: at the HUD's one scale from the screen's top left, as the messages areCoord2D multiplier;- const UIRect box = TheUIRect();+ const UIRect box = { 0, 0, (Int)TheDisplay->getWidth(), (Int)TheDisplay->getHeight() };multiplier.x = (float)box.w / 800.0f;multiplier.y = (float)box.h / 600.0f;+ if( TheGlobalData->isClassicUI() )+ multiplier.x = multiplier.y = ControlBarUniformScale();// lets bring out the data structure!m_militarySubtitle = NEW MilitarySubtitleData;diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cppindex a278dcf86..522661ece 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cpp@@ -687,40 +687,12 @@ static const Image *plateImage( const ControlBarPlate *plate )/** Each panel wears a plate of its own now - see ControlBarPlateForSide in ControlBar.cpp for what* a plate is and why the scheme's one-piece painting is not drawn at all. *///--------------------------------------------------------------------------------------------------//--------------------------------------------------------------------------------------------------/** 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 HUD's 16:9 frame. */-//--------------------------------------------------------------------------------------------------static void drawSchemeLayers( GameWindow *window, ControlBarSchemeManager *man, Bool foreground )-{- GameWindow *frame = window ? window->winGetParent() : NULL;- if( frame == NULL )- return;-- ICoord2D now, offset;- frame->winGetScreenPosition( &now.x, &now.y );- offset.x = now.x - TheControlBar->getPanelOrigin()->x;- offset.y = now.y - TheControlBar->getPanelOrigin()->y;-- if( foreground )- man->drawForeground( offset );- else- man->drawBackground( offset );-}-void W3DCommandBarBackgroundDraw( GameWindow *window, WinInstanceData *instData ){ControlBarSchemeManager *man = TheControlBar ? TheControlBar->getControlBarSchemeManager() : NULL;if( man == NULL || TheDisplay == NULL )return;- if( TheGlobalData->isClassicUI() )- {- drawSchemeLayers( window, man, FALSE );- return;- }-//// The plates are drawn from the design rectangles rather than from a window, so on their own// they stand still while the bar moves: minimising it drops the frame a tenth of the screen and@@ -785,12 +757,7 @@ void W3DCommandBarBackgroundDraw( GameWindow *window, WinInstanceData *instDatavoid W3DCommandBarForegroundDraw( GameWindow *window, WinInstanceData *instData ){- // nothing sits on top of the plates - see W3DCommandBarBackgroundDraw - but EA's painting has- // a foreground layer- ControlBarSchemeManager *man = TheControlBar ? TheControlBar->getControlBarSchemeManager() : NULL;- if( man && TheGlobalData->isClassicUI() )- drawSchemeLayers( window, man, TRUE );-+ // nothing sits on top of the plates - see W3DCommandBarBackgroundDraw}void W3DNoDraw( GameWindow *window, WinInstanceData *instData )diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cppindex 6f72b8f71..5bf06a9b0 100644--- a/GeneralsMD/Code/Tests/test_gameengine.cpp+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp@@ -11925,20 +11925,11 @@ 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_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 );-+TEST(the_classic_bar_is_three_plates_on_the_screen_edges_at_one_scale)+{+ /* The menus keep the 4:3 box. The Classic bar is the three plates Reforged's arithmetic puts on+ the screen's edges, at every shape of screen: radar on the left edge, grid centred, selection+ on the right edge, every one of them the same scale across as down. */CHECK_EQ( UIRectForScreen( 1920, 1080 ).x, 240 );CHECK_EQ( UIRectForScreen( 1920, 1080 ).w, 1440 );CHECK_EQ( UIRectForScreen( 1920, 1080 ).h, 1080 );@@ -11951,23 +11942,40 @@ TEST(the_classic_bar_is_one_piece_across_the_16x9_hud_frame)TheWritableGlobalData = NEW GlobalData;TheWritableGlobalData->m_interfaceStyle = INTERFACE_STYLE_CLASSIC;- IRegion2D whole;- whole.lo.x = 0;- whole.lo.y = 408;- whole.hi.x = 800;- whole.hi.y = 600;- for( Int screen = 0; screen < 2; screen++ )+ static const Int screens[][ 2 ] ={- const Int w = screen ? 2560 : 1920;- const UIRect box = HudRectForScreen( w, 1080 );- for( Int p = 0; p < ControlBar::CB_PANEL_COUNT; p++ )- {- IRegion2D rect;- CHECK( ControlBarPanelDesignToScreen( p, &whole, w, 1080, &rect ) );- CHECK_NEAR( (Real)rect.lo.x, (Real)box.x, 1.5f );- CHECK_NEAR( (Real)rect.hi.x, (Real)( box.x + box.w ), 1.5f );- CHECK_EQ( rect.hi.y, 1080 );- }+ { 1024, 768 }, { 1280, 1024 }, { 1680, 1050 }, { 1920, 1080 }, { 2560, 1440 },+ { 3840, 2160 }, { 2560, 1080 }, { 3440, 1440 }, { 5120, 1440 }+ };+ const IRegion2D *radar = &ControlBarPlateForSide( "America", ControlBar::CB_PANEL_LEFT )->design;+ const IRegion2D *grid = &ControlBarPlateForSide( "America", ControlBar::CB_PANEL_CENTER )->design;+ const IRegion2D *selection = &ControlBarPlateForSide( "America", ControlBar::CB_PANEL_RIGHT )->design;+ for( Int i = 0; i < (Int)( sizeof( screens ) / sizeof( screens[ 0 ] ) ); i++ )+ {+ const Int w = screens[ i ][ 0 ];+ const Int h = screens[ i ][ 1 ];+ const Real s = ControlBarUniformScaleFor( w, h );+ IRegion2D left, centre, right;+ CHECK( ControlBarPanelDesignToScreen( ControlBar::CB_PANEL_LEFT, radar, w, h, &left ) );+ CHECK( ControlBarPanelDesignToScreen( ControlBar::CB_PANEL_CENTER, grid, w, h, ¢re ) );+ CHECK( ControlBarPanelDesignToScreen( ControlBar::CB_PANEL_RIGHT, selection, w, h, &right ) );++ // the radar on the left edge, the selection on the right, the grid in the middle+ CHECK_EQ( left.lo.x, 0 );+ CHECK_EQ( right.hi.x, w );+ CHECK_NEAR( ( centre.lo.x + centre.hi.x ) * 0.5f, w * 0.5f + ( ( grid->lo.x + grid->hi.x ) * 0.5f - 400.0f ) * s, 2.0f );+ CHECK_EQ( left.hi.y, h );+ CHECK_EQ( centre.hi.y, h );+ CHECK_EQ( right.hi.y, h );++ // nothing stretched: the grid plate is as many times its design width across as down, down+ // being to the screen's bottom edge, which the plate is snapped onto+ CHECK_NEAR( (Real)centre.width() / grid->width(), (Real)centre.height() / ( 600 - grid->lo.y ), 0.02f );+ CHECK_NEAR( (Real)centre.width() / grid->width(), s, 0.02f );++ // the three never overlap past the seams the art already shares at 4:3+ CHECK( left.hi.x <= centre.lo.x + REAL_TO_INT_CEIL( 4.0f * s ) );+ CHECK( centre.hi.x <= right.lo.x + REAL_TO_INT_CEIL( 14.0f * s ) );}delete TheWritableGlobalData;diff --git a/NOTICE.md b/NOTICE.mdindex 4c5e38aae..69cd6399c 100644--- a/NOTICE.md+++ b/NOTICE.md@@ -43,10 +43,6 @@ 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 fbdd612a8..6651e8196 100644--- a/README.md+++ b/README.md@@ -391,8 +391,7 @@ 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. 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;+commits. 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.---