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
merge: hotkeys.ini switch for the keys as shipped
Olcay Seygand1971fc96ee3
diff --cc CHANGELOG.mdindex 821d43d5c,6697e82f0..3c10cc2ec--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -196,10 -57,8 +196,10 @@@ found and fixed — EA's own, not- The dark plate behind Exit, Restart and the options screen in a match covers the whole picture. It used to sit in a 4:3 frame in the middle, so a widescreen left the battlefield bright down both sides. The box itself keeps the shape it was drawn in.- Buildings select together again, which the one interface had taken away. Shift-click them, drag a box over them, or double-click one for every building of its kind on the screen; select four War Factories and each tank you click goes to whichever has the shortest queue. Double-click a unit and every one of that kind whose feet sit in the picture is taken, including the ones sitting past the camera's far clip that used to be skipped. A building and a unit still never share a selection.- Formation lines are back for everyone. With move, attack move or guard armed, a left drag spreads the selection along the line you draw again; since the one interface it drew a selection box instead, because the line was switched off for the Classic mouse that every player now runs. A drag with no order armed is still the selection box.-- Every key is yours to move. The launcher's Hotkeys page draws the command bar of every building and unit each general can field, cameos and letters as the game shows them, and a click and a keypress gives any button a new letter or none. Two buttons on one bar that would share a letter are marked before you play. The keyboard commands are there too, from bookmarks and team keys to the camera, along with the ones Zero Hour never bound: select every fighting unit, vehicle or aircraft, every barracks, war factory or airfield, the next idle worker or unit, pause, the general's promotions, the three signals to your allies and the general's powers. Your keys are yours alone; the other players in a match keep theirs, and a match never refuses you for them. Every mod you install brings its own generals to the page, ShockWave's fifteen next to Zero Hour's thirteen, and a key you give a ShockWave button stays with ShockWave.+- A box round your soldiers leaves the worker among them behind again. The rule that a box holding anything military drops the dozers, workers, supply trucks, Chinooks and hackers from it was switched off for the Classic mouse, which is the one every player now runs, so the dozer came along with the tanks. It holds for every box now, a Shift box added to a selection included. A box of workers alone still takes the workers, and a click or a double click on one still takes it.+- Every key is yours to move. The launcher's Hotkeys page draws the command bar of every building and unit each general can field, cameos and letters as the game shows them, and a click and a keypress gives any button a new letter or none. Two buttons on one bar that would share a letter are marked before you play. The keyboard commands are there too, from bookmarks and team keys to the camera, along with the ones Zero Hour never bound: select all your infantry, vehicles or aircraft, every barracks, war factory or airfield, the next idle worker or unit, pause, the general's promotions, the three signals to your allies and the general's powers. Your keys are yours alone; the other players in a match keep theirs, and a match never refuses you for them. Every mod you install brings its own generals to the page, ShockWave's fifteen next to Zero Hour's thirteen, and a key you give a ShockWave button stays with ShockWave.- - Some keys now mean one thing on every bar: A attack move, S stop, G guard, Y rally point, V evacuate, N sell, C combat drop, and H for land mines, camo netting and the GLA worker's switch to fake buildings. Sell sits on its own key, so emptying a bunker can never sell it. The 188 buttons Zero Hour had put on one of those letters take another, kept off the 18 letters under your left hand where the bar leaves room (the Avenger is J now), and no bar gained a clash doing it. Those letters are still yours to hand out: the Hotkeys page gives A or H to any other button you pick, and marks the clash. On a bar that has the order as well, the order keeps its key: a Barracks button on A fires from A, and a tank's A is still attack move.+ - Some keys now mean one thing on every bar: A attack move, S stop, G guard, Y rally point, V evacuate, N sell, C combat drop, and H for land mines, camo netting and the GLA worker's switch to fake buildings. Sell sits on its own key, so emptying a bunker can never sell it. The 188 buttons Zero Hour had put on one of those letters take another, kept off the 18 letters under your left hand where the bar leaves room (the Avenger is J now), and no bar gained a clash doing it. Those letters are still yours to hand out: the Hotkeys page gives A or H to any other button you pick, and marks the clash. On a bar that has the order as well, the order keeps its key: a Barracks button on A fires from A, and a tank's A is still attack move. A `FixedOrderKeys` block with `Enabled = No` in Hotkeys.ini turns the fixed keys off and gives every button the letter the game's own text gives it, the orders included, as the game shipped: in the German game guard is W and the rally point U again, and the 179 German buttons on one of those letters, the Humvee on V and the supply center on N among them, have their keys back.+- Those orders move too. Sell, attack move, stop, guard, rally point, evacuate, combat drop, the mines, camo netting and the fake building switch were locked to their letters: the Hotkeys tab refused to wait for a key on them, and a letter given to one in the file was ignored in the match. Each one now takes the letter you give it, or none, on the Hotkeys tab like any other button, and keeps it after a restart; the letters above are only where they start. A letter you set also beats the one a button had from the game: Sell moved to K on the GLA Command Center used to lose K to the Worker button, and now sells. The launcher's Hotkeys page lets them go as well; it used to show the fixed letter whatever you had set and refuse to change it. Two holds Zero Hour put on a modifier alone are on the list of commands now, in the game and the launcher: Alt queues orders and Shift adds to the selection, and either can move to a key or another modifier. With nothing selected and a worker lending you his bar, only his buildings answer a key. H used to throw a GLA worker over to his fake buildings, and S stopped him, though nobody had picked him. The launcher also stops shifting keyboard commands off those letters: it had put View command center on P because H belonged to the mines, and the next time it starts it hands H back. A key you chose yourself stays where you put it.- The Hotkeys page is in the game as well, as the last tab of the options screen, so a key can move without quitting to the launcher: from the main menu, or from Esc in the middle of a match. Every command sits on the left with its key. On the right you pick a general and one of his buildings or units, and its command bar is listed button by button, each with its cameo and its letter. Double-click a line, or press Enter or Change, and then the key; Esc lets go. Two buttons of one bar on one letter, or two commands on one key, turn red, and the line under the lists names them. Accept writes the file the launcher writes, so a key set in either place is there in the other, and a key changed in a match works from the next press.- Export and Import on the Hotkeys page take your keys to a file and back, for another PC or a fresh install. Before an import the page tells you how many keys it changes and how many would clash; a file with a line it cannot read changes nothing and quotes that line. Keys for a mod you have not installed come along and wait for it.- Grid keys are gone. The switch that made a button's key its place on the bar, Q for the first button of every building, is off the Hotkeys page, and the game no longer moves buttons around to give them a place's letter. Each button wears the letter you gave it or the game's own, and the fixed keys above still hold. A hotkeys file saved with grid keys on loads as before, with the switch ignored, so a player who had them on finds the letters of their own buttons back on the bar.diff --cc GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/HotKey.cppindex 616e1f8a6,0c3dcddff..13471676c--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/HotKey.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/HotKey.cpp@@@ -334,12 -334,15 +334,16 @@@ static std::map< std::string, WideChar/** The owner's fixed keys, 2026-10-12, on every bar: A attack move, S stop, G guard, Y rally* point, V evacuate, N sell, C combat drop, and H for land mines, camo netting and the GLA's fake- * and real switches, which go by button name. No button keeps one of these letters from its- * label; the player may give one to any button on the launcher's Hotkeys page, and on a bar where- * the fixed order stands too, the order gets the key (addHotKey). The launcher holds the same- * table (hotkeys.js, FIXED_KEYS). */+ * and real switches, which go by button name. They are defaults: the player may move any of these+ * orders to another letter, or none, like every other button. No button keeps one of these+ * letters from its label; the player may give one to any button, and on a bar where the fixed order+ * stands too, the order gets the key (addHotKey). The launcher holds the same table (hotkeys.js,+ * FIXED_KEYS). */static const WideChar FIXED_KEYS[] = { 'A', 'S', 'G', 'Y', 'V', 'N', 'C', 'H' };+ /** FixedOrderKeys in Hotkeys.ini: with Enabled = No none of the above holds, and every button, the+ * orders included, wears its label's letter or the player's, as in the game as shipped. Read with+ * the button keys, back to on before each read. */+ static Bool s_fixedOrderKeys = TRUE;static const char *const FIXED_H_BUTTONS[] ={"command_upgradechinamines", "command_upgradeempmines", "command_upgradecamonetting", "command_upgradeglacamonetting",