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(gameclient): game speed dropdown in the skirmish lobby
Olcay Seygan5e00564115b1
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex faa9b3b9f..6bacd961a 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -653,8 +653,8 @@ found and fixed — EA's own, not port damage.**- Every lobby now has two tabs over the bottom panel, Info and Lobby Settings, and the one you are looking at is lettered green (online, it is the greyed-out one). The host's settings live on the settings page; the map details in skirmish and the chat log in a network game come back the moment you tab away from it.- The skirmish and LAN rooms are laid out again, on one grid. Each column heading sits over its own column instead of up to 18 pixels to the right of it. The seats and the settings page underneath them start and stop at the same two edges, and Play Game stands under the map and your win record on the right-hand pair. The open tab used to be lettered in a grey that measured about 2 to 1 against the panel and read as a button that was switched off. Play Game waits at the bottom right and the button that leaves the room sits at the bottom left, as far from it as the screen allows. With all eight seats taken, "USA Super Weapon General" still fits in its box. The online room keeps its old layout.-- Skirmish keeps starting cash and the game speed slider there. LAN and online keep starting cash next to peace time and the superweapon rule. Before this they were scattered around whatever space each of the three lobby screens happened to have left over.-- The game speed slider stops at 60. Its last notch used to read "--" and started the match at a thousand game frames a second, which no machine can play and every machine tried to. A speed saved on that notch comes back as 60.+- Skirmish keeps starting cash and the game speed there. LAN and online keep starting cash next to peace time and the superweapon rule. Before this they were scattered around whatever space each of the three lobby screens happened to have left over.+- Game speed in the skirmish room is a dropdown now: x0.5, x0.75, x1, x1.5 or x2. The old slider read out a frame rate nobody plays by, and its last notch read "--" and started the match at a thousand game frames a second, which no machine can play and every machine tried to. A speed saved by the old slider comes back as the nearest of the five.- The speed can change during a skirmish or a mission, too. Numpad plus and minus move it a sixth at a time and say where it stands, 50% up to 200% and past it; Ctrl with numpad plus puts it back. The console takes an exact number too: `speed 150` for half again as fast, `speed` alone to ask, `speed reset` for normal. The reset used to land on one and a half times normal speed and the readout gave a number of frames nobody could read as a speed. Network games keep the speed the host picked.- A Unit Limit box on the settings page caps the match at 840 units, shared out evenly: two players get 420 each, four get 210, eight get 105. Units standing and units waiting in a queue both count against your share, buildings do not, and the build buttons grey out when you reach it. A transport that rolls out full is charged for its riders while it is still in the queue, so a Troop Crawler costs nine and cannot slip eight Red Guards past the limit, and a pair of Red Guards costs two. A shift or control batch near the wall queues as many as still fit and stops there, and a button whose next order would not fit greys out. Your own count and your share sit in the top right corner next to the frame rate, so you can see the wall coming. The host ticks it; everybody else sees it ticked.- Allies can pool their income. Share Income on the settings page splits every payment evenly between whoever earned it and each teammate still in the match, so an oil derrick paying 200 to one of two allies pays 100 to each. Oil Derricks shares the derricks you capture and nothing else; All Income adds supply runs, hackers and black markets. In a two-against-two between computer players one pair of partners had earned 4,600 apart after five minutes without it, and 190 apart with it. It works in skirmish too, with a computer ally. No Sharing is the game as it always played.diff --git a/GeneralsMD/Code/Data/Window/Menus/SkirmishGameOptionsMenu.wnd b/GeneralsMD/Code/Data/Window/Menus/SkirmishGameOptionsMenu.wndindex 872c60937..e6bab96fc 100644--- a/GeneralsMD/Code/Data/Window/Menus/SkirmishGameOptionsMenu.wnd+++ b/GeneralsMD/Code/Data/Window/Menus/SkirmishGameOptionsMenu.wnd@@ -9491,24 +9491,24 @@ WINDOWENDCHILDWINDOW- WINDOWTYPE = HORZSLIDER;- SCREENRECT = UPPERLEFT: 424 406, BOTTOMRIGHT: 496 426, CREATIONRESOLUTION: 800 600;- NAME = "SkirmishGameOptionsMenu.wnd:SliderGameSpeed";- STATUS = ENABLED+IMAGE+TABSTOP;- STYLE = HORZSLIDER+MOUSETRACK;+ WINDOWTYPE = COMBOBOX;+ SCREENRECT = UPPERLEFT: 424 404, BOTTOMRIGHT: 536 428, CREATIONRESOLUTION: 800 600;+ NAME = "SkirmishGameOptionsMenu.wnd:ComboBoxGameSpeed";+ STATUS = ENABLED+IMAGE;+ STYLE = MOUSETRACK+COMBOBOX;SYSTEMCALLBACK = "[None]";INPUTCALLBACK = "[None]";TOOLTIPCALLBACK = "[None]";DRAWCALLBACK = "[None]";- FONT = NAME: "Times New Roman", SIZE: 14, BOLD: 0;- HEADERTEMPLATE = "[None]";+ FONT = NAME: "Arial", SIZE: 10, BOLD: 0;+ HEADERTEMPLATE = "ComboBoxEntry";TOOLTIPTEXT = "GUI:AdjustGameSpeed";TOOLTIPDELAY = -1;- TEXTCOLOR = ENABLED: 0 0 0 0, ENABLEDBORDER: 0 0 0 0,- DISABLED: 0 0 0 0, DISABLEDBORDER: 0 0 0 0,- HILITE: 0 0 0 0, HILITEBORDER: 0 0 0 0;+ TEXTCOLOR = ENABLED: 255 254 254 255, ENABLEDBORDER: 0 0 0 255,+ DISABLED: 122 48 1 255, DISABLEDBORDER: 64 64 64 255,+ HILITE: 168 255 12 255, HILITEBORDER: 1 1 1 255;ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 255 0 0 255, BORDERCOLOR: 255 128 128 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,+ IMAGE: NoImage, COLOR: 47 55 168 255, BORDERCOLOR: 254 254 254 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,@@ -9516,8 +9516,8 @@ WINDOWIMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- DISABLEDDRAWDATA = IMAGE: hilightedbox, COLOR: 128 128 128 255, BORDERCOLOR: 64 64 64 255,- IMAGE: dehilightedbox, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,+ DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 128 128 128 255, BORDERCOLOR: 192 192 192 255,+ IMAGE: NoImage, COLOR: 192 192 192 255, BORDERCOLOR: 254 254 254 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,@@ -9525,90 +9525,209 @@ WINDOWIMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- HILITEDRAWDATA = IMAGE: linebox, COLOR: 0 255 0 255, BORDERCOLOR: 0 128 0 255,- IMAGE: arrow, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,+ HILITEDRAWDATA = IMAGE: NoImage, COLOR: 0 255 0 255, BORDERCOLOR: 0 128 0 255,+ IMAGE: ListBoxHiliteSelectedItemLeftEnd, COLOR: 254 254 254 255, BORDERCOLOR: 0 128 0 255,+ IMAGE: ListBoxHiliteSelectedItemRightEnd, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,+ IMAGE: ListBoxHiliteSelectedItemRepeatingCenter, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,+ IMAGE: ListBoxHiliteSelectedItemSmallRepeatingCenter, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- SLIDERDATA = MINVALUE: 15,- MAXVALUE: 60;- SLIDERTHUMBENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 255 128 128 255, BORDERCOLOR: 255 0 0 255,- IMAGE: NoImage, COLOR: 128 128 128 255, BORDERCOLOR: 192 192 192 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- SLIDERTHUMBDISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 64 64 64 255, BORDERCOLOR: 128 128 128 255,- IMAGE: NoImage, COLOR: 0 0 0 255, BORDERCOLOR: 64 64 64 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- SLIDERTHUMBHILITEDRAWDATA = IMAGE: arrow, COLOR: 0 255 0 255, BORDERCOLOR: 128 255 128 255,- IMAGE: arrow, COLOR: 0 0 255 255, BORDERCOLOR: 128 128 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- END- CHILD- WINDOW- WINDOWTYPE = STATICTEXT;- SCREENRECT = UPPERLEFT: 496 404, BOTTOMRIGHT: 536 428, CREATIONRESOLUTION: 800 600;- NAME = "SkirmishGameOptionsMenu.wnd:StaticTextGameSpeed";- STATUS = ENABLED;- STYLE = STATICTEXT+MOUSETRACK;- SYSTEMCALLBACK = "[None]";- INPUTCALLBACK = "[None]";- TOOLTIPCALLBACK = "[None]";- DRAWCALLBACK = "[None]";- FONT = NAME: "Arial", SIZE: 10, BOLD: 0;- HEADERTEMPLATE = "LabelRegular";- TOOLTIPDELAY = -1;- TEXTCOLOR = ENABLED: 255 254 252 255, ENABLEDBORDER: 0 0 0 255,- DISABLED: 255 255 255 231, DISABLEDBORDER: 0 0 0 255,- HILITE: 0 0 0 255, HILITEBORDER: 0 0 4 255;- ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 47 55 168 255,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;- DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 235 233 233 0, BORDERCOLOR: 47 55 168 255,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;- HILITEDRAWDATA = IMAGE: NoImage, COLOR: 0 128 0 255, BORDERCOLOR: 128 255 128 255,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;- STATICTEXTDATA = CENTERED: 1;+ COMBOBOXDATA = ISEDITABLE: 0,+ MAXCHARS: 16,+ MAXDISPLAY: 5,+ ASCIIONLY: 0,+ LETTERSANDNUMBERS: 0;+ COMBOBOXDROPDOWNBUTTONENABLEDDRAWDATA = IMAGE: VSliderDownButtonEnabled, COLOR: 255 0 0 255, BORDERCOLOR: 255 128 128 255,+ IMAGE: VSliderDownButtonHiliteSelected, COLOR: 255 255 0 255, BORDERCOLOR: 254 254 254 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ COMBOBOXDROPDOWNBUTTONDISABLEDDRAWDATA = IMAGE: VSliderDownButtonDisabled, COLOR: 128 128 128 255, BORDERCOLOR: 192 192 192 255,+ IMAGE: NoImage, COLOR: 192 192 192 255, BORDERCOLOR: 128 128 128 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ COMBOBOXDROPDOWNBUTTONHILITEDRAWDATA = IMAGE: VSliderDownButtonHilite, COLOR: 0 255 0 255, BORDERCOLOR: 0 128 0 255,+ IMAGE: VSliderDownButtonHiliteSelected, COLOR: 255 255 0 255, BORDERCOLOR: 254 254 254 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ COMBOBOXEDITBOXENABLEDDRAWDATA = IMAGE: TextEntryEnabledLeftEnd, COLOR: 255 0 0 255, BORDERCOLOR: 255 128 128 255,+ IMAGE: TextEntryEnabledRightEnd, COLOR: 255 255 0 255, BORDERCOLOR: 254 254 254 255,+ IMAGE: TextEntryEnabledRepeatingCenter, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: TextEntryEnabledSmallRepeatingCenter, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ COMBOBOXEDITBOXDISABLEDDRAWDATA = IMAGE: TextEntryDisabledLeftEnd, COLOR: 128 128 128 255, BORDERCOLOR: 0 0 0 255,+ IMAGE: TextEntryDisabledRightEnd, COLOR: 192 192 192 255, BORDERCOLOR: 254 254 254 255,+ IMAGE: TextEntryDisabledRepeatingCenter, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: TextEntryDisabledSmallRepeatingCenter, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ COMBOBOXEDITBOXHILITEDRAWDATA = IMAGE: TextEntryHiliteLeftEnd, COLOR: 0 255 0 255, BORDERCOLOR: 0 128 0 255,+ IMAGE: TextEntryHiliteRightEnd, COLOR: 254 254 254 255, BORDERCOLOR: 0 128 0 255,+ IMAGE: TextEntryHiliteRepeatingCenter, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: TextEntryHiliteSmallRepeatingCenter, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ COMBOBOXLISTBOXENABLEDDRAWDATA = IMAGE: BlackSquare, COLOR: 0 0 0 255, BORDERCOLOR: 49 55 168 255,+ IMAGE: ListBoxHiliteItemLeftEnd, COLOR: 255 255 0 255, BORDERCOLOR: 254 254 254 255,+ IMAGE: ListBoxHiliteItemRightEnd, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: ListBoxHiliteItemRepeatingCenter, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: ListBoxHiliteItemSmallRepeatingCenter, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ COMBOBOXLISTBOXDISABLEDDRAWDATA = IMAGE: BlackSquare, COLOR: 0 0 0 255, BORDERCOLOR: 49 55 168 255,+ IMAGE: NoImage, COLOR: 192 192 192 255, BORDERCOLOR: 254 254 254 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ COMBOBOXLISTBOXHILITEDRAWDATA = IMAGE: BlackSquare, COLOR: 0 0 0 255, BORDERCOLOR: 49 55 168 255,+ IMAGE: ListBoxHiliteSelectedItemLeftEnd, COLOR: 254 254 254 255, BORDERCOLOR: 0 128 0 255,+ IMAGE: ListBoxHiliteSelectedItemRightEnd, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: ListBoxHiliteSelectedItemRepeatingCenter, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: ListBoxHiliteSelectedItemSmallRepeatingCenter, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ LISTBOXENABLEDUPBUTTONDRAWDATA = IMAGE: VSliderUpButtonEnabled, COLOR: 255 0 0 255, BORDERCOLOR: 255 128 128 255,+ IMAGE: VSliderUpButtonHiliteSelected, COLOR: 255 255 0 255, BORDERCOLOR: 254 254 254 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ LISTBOXDISABLEDUPBUTTONDRAWDATA = IMAGE: VSliderUpButtonDisabled, COLOR: 128 128 128 255, BORDERCOLOR: 192 192 192 255,+ IMAGE: NoImage, COLOR: 192 192 192 255, BORDERCOLOR: 254 254 254 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ LISTBOXHILITEUPBUTTONDRAWDATA = IMAGE: VSliderUpButtonHilite, COLOR: 0 255 0 255, BORDERCOLOR: 0 128 0 255,+ IMAGE: VSliderUpButtonHiliteSelected, COLOR: 254 254 254 255, BORDERCOLOR: 0 128 0 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ LISTBOXENABLEDDOWNBUTTONDRAWDATA = IMAGE: VSliderDownButtonEnabled, COLOR: 255 0 0 255, BORDERCOLOR: 255 128 128 255,+ IMAGE: VSliderDownButtonHiliteSelected, COLOR: 255 255 0 255, BORDERCOLOR: 254 254 254 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ LISTBOXDISABLEDDOWNBUTTONDRAWDATA = IMAGE: VSliderDownButtonDisabled, COLOR: 128 128 128 255, BORDERCOLOR: 192 192 192 255,+ IMAGE: NoImage, COLOR: 192 192 192 255, BORDERCOLOR: 254 254 254 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ LISTBOXHILITEDOWNBUTTONDRAWDATA = IMAGE: VSliderDownButtonHilite, COLOR: 0 255 0 255, BORDERCOLOR: 0 128 0 255,+ IMAGE: VSliderDownButtonHiliteSelected, COLOR: 254 254 254 255, BORDERCOLOR: 0 128 0 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ LISTBOXENABLEDSLIDERDRAWDATA = IMAGE: NoImage, COLOR: 255 190 0 0, BORDERCOLOR: 47 55 168 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ LISTBOXDISABLEDSLIDERDRAWDATA = IMAGE: NoImage, COLOR: 128 128 128 0, BORDERCOLOR: 148 112 0 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ LISTBOXHILITESLIDERDRAWDATA = IMAGE: NoImage, COLOR: 0 255 0 0, BORDERCOLOR: 49 55 168 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ SLIDERTHUMBENABLEDDRAWDATA = IMAGE: ScrollBarThumbEnabled, COLOR: 255 4 0 0, BORDERCOLOR: 255 243 28 255,+ IMAGE: ScrollBarThumbHiliteSelected, COLOR: 255 255 0 255, BORDERCOLOR: 254 254 254 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ SLIDERTHUMBDISABLEDDRAWDATA = IMAGE: ScrollBarThumbDisabled, COLOR: 128 128 128 255, BORDERCOLOR: 192 192 192 255,+ IMAGE: NoImage, COLOR: 192 192 192 255, BORDERCOLOR: 254 254 254 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;+ SLIDERTHUMBHILITEDRAWDATA = IMAGE: ScrollBarThumbHilite, COLOR: 0 255 0 255, BORDERCOLOR: 0 128 0 255,+ IMAGE: ScrollBarThumbHiliteSelected, COLOR: 254 254 254 255, BORDERCOLOR: 0 128 0 255,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,+ IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;ENDCHILDWINDOWdiff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cppindex c61128a5b..14c6ea166 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp@@ -52,7 +52,6 @@#include "GameClient/GadgetComboBox.h"#include "GameClient/GadgetTextEntry.h"#include "GameClient/GadgetPushButton.h"-#include "GameClient/GadgetSlider.h"#include "GameClient/GadgetStaticText.h"#include "GameClient/MapUtil.h"#include "GameClient/Mouse.h"@@ -116,15 +115,13 @@ static NameKeyType buttonStartID = NAMEKEY_INVALID;static NameKeyType buttonSelectMapID = NAMEKEY_INVALID;static NameKeyType buttonResetID = NAMEKEY_INVALID;static NameKeyType windowMapID = NAMEKEY_INVALID;-static NameKeyType sliderGameSpeedID = NAMEKEY_INVALID;-static NameKeyType staticTextGameSpeedID = NAMEKEY_INVALID;+static NameKeyType comboBoxGameSpeedID = NAMEKEY_INVALID;static NameKeyType comboBoxSuperweaponsID = NAMEKEY_INVALID;static NameKeyType comboBoxStartingCashID = NAMEKEY_INVALID;static NameKeyType checkBoxUnitLimitID = NAMEKEY_INVALID;static NameKeyType comboBoxIncomeSharingID = NAMEKEY_INVALID;// Window Pointers -------------------------------------------------------------------------static GameWindow *staticTextGameSpeed = NULL;static GameWindow *parentSkirmishGameOptions = NULL;static GameWindow *buttonExit = NULL;static GameWindow *buttonStart = NULL;@@ -164,10 +161,31 @@ static Bool buttonPushed = FALSE;static Bool stillNeedsToSetOptions = FALSE;void skirmishUpdateSlotList( void );static void populateSkirmishBattleHonors( void );-// The slider used to run one notch past 60 to a "--" that started the match at 1000 logic frames a-// second. It is 15 to 60 now, and a preference saved at the old top notch lands on 60.-static const Int SKIRMISH_GAME_SPEED_MIN = 15;-static const Int SKIRMISH_GAME_SPEED_MAX = 60;+// The game speed dropdown, as logic frames a second against the normal 30. Half speed to double.+// x0.75 is 22.5, which a whole frame rate cannot hold, so it runs at 23. The preference keeps the+// frame rate, so one saved by the old 15 to 60 slider lands on the nearest entry.+static const Int SKIRMISH_GAME_SPEEDS[] = { 15, 23, 30, 45, 60 };+static const WideChar *SKIRMISH_GAME_SPEED_CAPTIONS[] = { L"x0.5", L"x0.75", L"x1", L"x1.5", L"x2" };+static const Int SKIRMISH_GAME_SPEED_COUNT = sizeof( SKIRMISH_GAME_SPEEDS ) / sizeof( SKIRMISH_GAME_SPEEDS[ 0 ] );++static Int nearestGameSpeedIndex( Int framesPerSecond )+{+ Int nearest = 0;+ for( Int i = 1; i < SKIRMISH_GAME_SPEED_COUNT; ++i )+ {+ if( abs( SKIRMISH_GAME_SPEEDS[ i ] - framesPerSecond ) < abs( SKIRMISH_GAME_SPEEDS[ nearest ] - framesPerSecond ) )+ nearest = i;+ }+ return nearest;+}++static Int selectedGameSpeed( void )+{+ GameWindow *comboBoxGameSpeed = TheWindowManager->winGetWindowFromId( parentSkirmishGameOptions, comboBoxGameSpeedID );+ Int selected = 0;+ GadgetComboBoxGetSelectedPos( comboBoxGameSpeed, &selected );+ return SKIRMISH_GAME_SPEEDS[ selected ];+}Bool doUpdateSlotList = TRUE;static Int getNextSelectablePlayer(Int start)@@ -372,10 +390,7 @@ Bool SkirmishPreferences::write(void)setSlotList();-// NameKeyType sliderGameSpeedID = TheNameKeyGenerator->nameToKey( AsciiString( "SkirmishGameOptionsMenu.wnd:SliderGameSpeed" ) );- GameWindow *sliderGameSpeed = TheWindowManager->winGetWindowFromId( parentSkirmishGameOptions, sliderGameSpeedID );- Int maxFPS = GadgetSliderGetPosition( sliderGameSpeed );- setInt("FPS", maxFPS);+ setInt("FPS", selectedGameSpeed());return UserPreferences::write();}@@ -404,31 +419,13 @@ static void playerTooltip(GameWindow *window,}*/-void setFPSTextBox( Int sliderPos )-{- if(!staticTextGameSpeed)- return;- UnicodeString text;- staticTextGameSpeed->winEnable(TRUE);- if( sliderPos == TheGlobalData->m_framesPerSecondLimit )- {- // set different color- staticTextGameSpeed->winEnable(FALSE);- }- text.format(L"%2d", sliderPos);- GadgetStaticTextSetText(staticTextGameSpeed, text);-}-void reallyDoStart( void ){if (TheGameLogic->isInGame())TheGameLogic->clearGameData(FALSE);-- //NameKeyType sliderGameSpeedID = TheNameKeyGenerator->nameToKey( AsciiString( "SkirmishGameOptionsMenu.wnd:SliderGameSpeed" ) );- GameWindow *sliderGameSpeed = TheWindowManager->winGetWindowFromId( parentSkirmishGameOptions, sliderGameSpeedID );- Int maxFPS = GadgetSliderGetPosition( sliderGameSpeed );- DEBUG_LOG(("GameSpeedSlider was at %d\n", maxFPS));- maxFPS = max( SKIRMISH_GAME_SPEED_MIN, min( SKIRMISH_GAME_SPEED_MAX, maxFPS ) );++ const Int maxFPS = selectedGameSpeed();+ DEBUG_LOG(("Game speed dropdown is at %d logic frames a second\n", maxFPS));TheWritableGlobalData->m_mapName = TheSkirmishGameInfo->getMap();TheSkirmishGameInfo->startGame(0);@@ -1090,7 +1087,6 @@ void InitSkirmishGameGadgets( void )buttonSelectMapID = TheNameKeyGenerator->nameToKey( AsciiString( "SkirmishGameOptionsMenu.wnd:ButtonSelectMap" ) );buttonResetID = TheNameKeyGenerator->nameToKey( AsciiString( "SkirmishGameOptionsMenu.wnd:ButtonReset" ) );windowMapID = TheNameKeyGenerator->nameToKey( AsciiString( "SkirmishGameOptionsMenu.wnd:MapWindow" ) );- staticTextGameSpeedID = TheNameKeyGenerator->nameToKey( AsciiString( "SkirmishGameOptionsMenu.wnd:StaticTextGameSpeed" ) );comboBoxSuperweaponsID = TheNameKeyGenerator->nameToKey( AsciiString( "SkirmishGameOptionsMenu.wnd:ComboBoxSuperweapons" ) );comboBoxStartingCashID = TheNameKeyGenerator->nameToKey( AsciiString( "SkirmishGameOptionsMenu.wnd:ComboBoxStartingCash" ) );checkBoxUnitLimitID = TheNameKeyGenerator->nameToKey( AsciiString( "SkirmishGameOptionsMenu.wnd:CheckBoxUnitLimit" ) );@@ -1109,8 +1105,6 @@ void InitSkirmishGameGadgets( void )DEBUG_ASSERTCRASH(textEntryMapDisplay, ("Could not find the textEntryMapDisplay"));buttonReset = TheWindowManager->winGetWindowFromId( parentSkirmishGameOptions, buttonResetID );DEBUG_ASSERTCRASH(buttonReset, ("Could not find the buttonReset"));- staticTextGameSpeed = TheWindowManager->winGetWindowFromId( parentSkirmishGameOptions, staticTextGameSpeedID );- DEBUG_ASSERTCRASH(staticTextGameSpeed, ("Could not find the staticTextGameSpeed"));comboBoxSuperweapons = TheWindowManager->winGetWindowFromId( parentSkirmishGameOptions, comboBoxSuperweaponsID );DEBUG_ASSERTCRASH(comboBoxSuperweapons, ("Could not find the comboBoxSuperweapons"));if ( comboBoxSuperweapons )@@ -1327,7 +1321,7 @@ void SkirmishGameOptionsMenuInit( WindowLayout *layout, void *userData )stillNeedsToSetOptions = FALSE;- sliderGameSpeedID = TheNameKeyGenerator->nameToKey( AsciiString( "SkirmishGameOptionsMenu.wnd:SliderGameSpeed" ) );+ comboBoxGameSpeedID = TheNameKeyGenerator->nameToKey( AsciiString( "SkirmishGameOptionsMenu.wnd:ComboBoxGameSpeed" ) );sandboxOk = FALSE;doUpdateSlotList = FALSE;@@ -1416,12 +1410,12 @@ void SkirmishGameOptionsMenuInit( WindowLayout *layout, void *userData )//updateSkirmishGameOptions();//initSkirmishGameOptions();- // set up the game speed slider-// NameKeyType sliderGameSpeedID = TheNameKeyGenerator->nameToKey( AsciiString( "SkirmishGameOptionsMenu.wnd:SliderGameSpeed" ) );- GameWindow *sliderGameSpeed = TheWindowManager->winGetWindowFromId( parentSkirmishGameOptions, sliderGameSpeedID );- Int sliderPos = max(SKIRMISH_GAME_SPEED_MIN,min(SKIRMISH_GAME_SPEED_MAX,prefs.getInt("FPS", TheGlobalData->m_framesPerSecondLimit)));- GadgetSliderSetPosition( sliderGameSpeed, sliderPos );- setFPSTextBox(sliderPos);+ // set up the game speed dropdown+ GameWindow *comboBoxGameSpeed = TheWindowManager->winGetWindowFromId( parentSkirmishGameOptions, comboBoxGameSpeedID );+ GadgetComboBoxReset( comboBoxGameSpeed );+ for( Int i = 0; i < SKIRMISH_GAME_SPEED_COUNT; ++i )+ GadgetComboBoxAddEntry( comboBoxGameSpeed, UnicodeString( SKIRMISH_GAME_SPEED_CAPTIONS[ i ] ), comboBoxGameSpeed->winGetEnabledTextColor() );+ GadgetComboBoxSetSelectedPos( comboBoxGameSpeed, nearestGameSpeedIndex( prefs.getInt( "FPS", LOGICFRAMES_PER_SECOND ) ) );buttonStart->winSetText(TheGameText->fetch("GUI:Start"));/* hey, for now we're also going to disable the map select button until it doesn't crash *///buttonSelectMap->winEnable( FALSE );@@ -1657,17 +1651,6 @@ WindowMsgHandledType SkirmishGameOptionsMenuSystem( GameWindow *window, Unsignedbreak;}// case GCM_SELECTED://-------------------------------------------------------------------------------------------------- case GSM_SLIDER_TRACK:- {- GameWindow *control = (GameWindow *)mData1;- Int sliderPos = (Int)mData2;- Int controlID = control->winGetWindowId();- if(controlID == sliderGameSpeedID)- {- setFPSTextBox(sliderPos);- }- }- //-------------------------------------------------------------------------------------------------case GBM_SELECTED:{diff --git a/GeneralsMD/Code/Tools/lobbyroom_layout.py b/GeneralsMD/Code/Tools/lobbyroom_layout.pyindex c798da81e..f74707697 100644--- a/GeneralsMD/Code/Tools/lobbyroom_layout.py+++ b/GeneralsMD/Code/Tools/lobbyroom_layout.py@@ -90,14 +90,15 @@ LAN_COLUMNS = [# (label width, control width, rows); a row is (label, combo), (label, slider, readout) or (check,).# "Allow Superweapons" needs 152 at 800x600.SKIRMISH_SETTINGS = [- (96, 152, [("StartingCashLabel", "ComboBoxStartingCash"), ("LabelSuperweapons", "ComboBoxSuperweapons")]),- (88, 112, [("LabelGameSpeed", "SliderGameSpeed", "StaticTextGameSpeed"), ("CheckBoxUnitLimit",)]),+ (96, 152, [("StartingCashLabel", "ComboBoxStartingCash"), ("LabelSuperweapons", "ComboBoxSuperweapons"),+ ("LabelIncomeSharing", "ComboBoxIncomeSharing")]),+ (88, 112, [("LabelGameSpeed", "ComboBoxGameSpeed"), ("CheckBoxUnitLimit",)]),]-# The LAN page is 84 high over the chat entry, two rows, so Pro Rules takes a third column instead.+# The LAN page is 84 high over the chat entry, two rows, so the check boxes take a third column.LAN_SETTINGS = [(96, 152, [("StartingCashLabel", "ComboBoxStartingCash"), ("LabelSuperweapons", "ComboBoxSuperweapons")]),- (96, 152, [("LabelPeaceTime", "ComboBoxPeaceTime"), ("CheckBoxUnitLimit",)]),- (0, 128, [("CheckBoxProRules",)]),+ (96, 152, [("LabelPeaceTime", "ComboBoxPeaceTime"), ("LabelIncomeSharing", "ComboBoxIncomeSharing")]),+ (0, 128, [("CheckBoxProRules",), ("CheckBoxUnitLimit",)]),]STAT_ROWS = [diff --git a/GeneralsMD/Code/Tools/lobbysettings_layout.py b/GeneralsMD/Code/Tools/lobbysettings_layout.pyindex 4a66356c8..709bf18d4 100644--- a/GeneralsMD/Code/Tools/lobbysettings_layout.py+++ b/GeneralsMD/Code/Tools/lobbysettings_layout.py@@ -126,6 +126,13 @@ SUPERWEAPON_CHECKBOX = ("CheckboxLimitSuperweapons", "CheckBoxLimitSuperweapons"# menu code names them and a missing control is as silent as the rest.HAND_PLACED_CHECKBOXES = ("CheckBoxUnitLimit", "CheckBoxProRules")+# Income sharing went on all three pages by hand the same way.+HAND_PLACED_COMBOS = ("LabelIncomeSharing", "ComboBoxIncomeSharing")++# What build() moves out of EA's skirmish layout and a later hand edit replaced: the game speed+# slider and its number became one dropdown in the slider's place. None is gone without a successor.+REPLACED_BY_HAND = {"SliderGameSpeed": "ComboBoxGameSpeed", "StaticTextGameSpeed": None}+# Pro Rules are for people playing each other, so the skirmish page lost its box again for v1.0.0 and# the selfcheck wants it gone there rather than present.NO_PRO_RULES_MENU = "SkirmishGameOptionsMenu"@@ -154,6 +161,11 @@ STRINGS = ["TOOLTIP:UnitLimit","GUI:ProRules","TOOLTIP:ProRules",+ "GUI:IncomeSharing",+ "TOOLTIP:IncomeSharing",+ "GUI:IncomeSharingOff",+ "GUI:IncomeSharingTech",+ "GUI:IncomeSharingAll",]@@ -285,7 +297,10 @@ def selfcheck():if layout.find(name) is None:problems.append("%s.wnd has no %s" % (menu, name))- for name, _l, _t, _w, _h in spec["move"]:+ for moved, _l, _t, _w, _h in spec["move"]:+ name = REPLACED_BY_HAND.get(moved, moved)+ if name is None:+ continuecontrol = layout.find(name)if control is None:problems.append("%s.wnd has no %s" % (menu, name))@@ -302,6 +317,13 @@ def selfcheck():elif page is not None and checkbox not in list(page.walk()):problems.append("%s.wnd: %s is not on the settings page" % (menu, name))+ for name in HAND_PLACED_COMBOS:+ control = layout.find(name)+ if control is None:+ problems.append("%s.wnd has no %s" % (menu, name))+ elif page is not None and control not in list(page.walk()):+ problems.append("%s.wnd: %s is not on the settings page" % (menu, name))+for name in SUPERWEAPON_CHECKBOX:if layout.find(name) is not None:problems.append("%s.wnd still carries %s; the combo box replaced it"