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(dx11): make the glow option light fire and lasers, five levels
Olcay Seygan3c0ba53d6f5f
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 7e775a558..866bc76b0 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -74,7 +74,7 @@ found and fixed — EA's own, not port damage.**- A missile a point defense laser hits now goes up in a proper burst: a bright flash, sparks falling away and a short orange blast on top of EA's red flash and scrap of casing. It is gone in a second and leaves no smoke, so a run of intercepts does not stack a grey column over the tank. This goes for every point defense laser: the Paladin, the Avenger, the Air Force General's planes and Chinooks, and the Superweapon General's drone.- The Paladin and the Avenger keep their point defense lasers, and you can see them again. In 2.4.0 they fired an invisible charge: a puff at the hull and a missile bursting in the air with nothing between them. The beam is back, drawn from the same spot on the tank EA drew it from, and a missile it touches still goes in one shot. What 2.4.0 changed stays. The lasers fire in short bursts: a Paladin gets two shots and four seconds to recharge, each of the Avenger's two lasers gets four and three seconds. Under five Tank Hunters an Avenger stops 8 missiles where EA's endless laser stopped 14 or 16, but it dies on the same frame, because fifteen hits kill it either way. A Paladin under four Rocket Buggies stops 4 rockets of 36, as it always did.- The Paladin's laser also burns any soldier who comes within 65 of the tank, and a soldier it kills burns up again instead of being thrown by a blast. It has a second laser of its own for that, with its own two shots, so firing at a soldier never leaves the tank empty when a missile arrives.-- Lasers glow now. The Paladin's and the Avenger's point defense, the Laser General's Crusader, Paladin, Avenger and turrets, and the point defense drone each draw a white-hot core down the middle of the beam and a soft halo in the beam's own colour along its whole length, so a pink Laser Avenger beam sits in a pink haze from the tank to its target. On the default renderer the core spills into the screen's bloom; on the Direct3D 9 one the halo carries the glow by itself. The Avenger's marking laser, the one that paints a target for the rest of your army, is not a weapon and keeps EA's thin blue line without a halo. Only the picture changed: damage, range and timing are what they were, and replays play back the same.+- Lasers glow now. The Paladin's and the Avenger's point defense, the Laser General's Crusader, Paladin, Avenger and turrets, and the point defense drone each draw a white-hot core down the middle of the beam and a soft halo in the beam's own colour along its whole length, so a pink Laser Avenger beam sits in a pink haze from the tank to its target. On the default renderer the core spills into the screen's bloom; on the Direct3D 9 one the halo carries the glow by itself. The Avenger's marking laser, the one that paints a target for the rest of your army, is not a weapon and keeps EA's thin blue line without a halo. The Glow setting decides how wide the halo burns, and Off gives you EA's plain beam back. Only the picture changed: damage, range and timing are what they were, and replays play back the same.- A replay recorded before this change plays back differently.## Helicopters fly like helicopters@@ -416,6 +416,7 @@ found and fixed — EA's own, not port damage.**- The game draws its picture through Direct3D 11 now, and falls back to the old renderer on a machine that cannot make a Direct3D 11 device. Eight views over five maps come out within one step of one colour channel of the old picture, which is the smallest difference a screen can show.- The Direct3D 11 picture comes with its finishing passes on, no switch needed. Explosions glow past their own edges, because the battlefield is kept brighter than white until the glow is worked out; jagged edges are smoothed; and a light sharpening brings the 2003 textures back up after the smoothing. All three run over the battlefield only, before the health bars and the command bar go on top, so the lettering is untouched. In a screen of thirty inferno cannons firing the frame averaged 11.89ms with them against 11.82ms without. The antialiasing setting on the display page is for the old renderer; `-dx11post off` on the command line gives you the plain picture, and `-dx11post fxaa` picks effects one by one. The old renderer's rolling-wave sea never went missing in a real match either: both of the game's settings files turn it off, so no map ever drew it.+- Glow on the Graphics page lights the fight now. It used to change next to nothing you could see, because the game's paint stops at white and the glow only picked up what was brighter than that. Fire, explosions, muzzle flashes and laser beams now burn past white where they land, and their light spills onto the ground and the tanks around them. Off, Low, Medium, High and Ultra set how hot and how far, and a new install starts on Medium. In one frame of a tank fight the share of the battle burning white went from 6% with the glow off to 19% on Ultra. Buildings, sky, snow and pale sand never glow at any step: a snowed-in American base with nothing firing comes out exactly as bright on Ultra as on Off. Ultra cost nothing we could measure, 4.5 to 4.8ms a frame against 4.8ms off in a screen of thirty Inferno Cannons. The old Direct3D 9 renderer gets a softer version, where only the white-hot middle of a fire or a beam blooms. The second glow box, the brightness the glow started at, is gone, and a level you saved before keeps its name.- Fullscreen gets the Direct3D 11 picture too. The old renderer took the whole display for itself and refused the new one its window, so every fullscreen game quietly ran on Direct3D 9, and the DX9 in the corner readout was the only sign. Fullscreen is now the game's window over the monitor: alt-tab drops you on the desktop at its own brightness, and coming back puts the game's on again. A 1280x720 match on a 1920x1080 screen drew 40.7 million times without one draw refused, before and after an alt-tab.- Moving textures move in the Direct3D 11 picture. Fountain water and tank treads stood still in it, and the fountains came out a dull grey-cyan where the old renderer drew them bright. They match the old renderer now.- The game fits the screen on a PC with Windows display scaling turned up. The game never told Windows it counts real pixels, so at 125% Windows blew the whole window up by a quarter: a 1920x1080 game on a 1920x1080 screen came out 2400x1350 and the right and bottom of it hung off the edge. Now the window is the size you picked.@@ -1138,7 +1139,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same- Every slider shows its value beside it: brightness, the three volumes, scroll speed, texture resolution, particles and anisotropic samples. Every label now starts on the same edge as the box under it; the original drew each one a few pixels to the right.- The tab you are on is lit in the same green as the group headings. The original drew it in dark grey on the black panel, which read as a button you could not press rather than the page you were looking at.- Accept sits in the bottom right corner with Cancel beside it, and Defaults stands alone on the far left, out of reach of a slip off Accept. The window is as tall as its busiest page and centred on the screen, instead of reaching from the top of the screen to the bottom with half of every page empty. The box that asks whether to keep a new resolution opens in the middle of the screen too, where it used to sit jammed in the top left corner.-- Eight settings that used to need a text editor have a control now: window mode on display, antialiasing, the two glow settings, texture filtering and anisotropic samples on graphics, and who wears a health bar and which colours the players wear on gameplay.+- Seven settings that used to need a text editor have a control now: window mode on display, antialiasing, glow, texture filtering and anisotropic samples on graphics, and who wears a health bar and which colours the players wear on gameplay.- More are decided for you instead of asked about. The placement range ring, workers going back to supply, detailed build tooltips, the HUD overlay and archived replays are simply on - every one of them is the version of the game people were choosing anyway, and a page of five checkboxes nobody unticks is a page of five decisions nobody wanted to make. Middle-mouse panning left the screen too, and edge scrolling in a window is still yours by name in `Options.ini` if the default is wrong for your setup.- Grid placement, 45 degree building rotation, snapping to nearby buildings, nudging a blocked building and 45 degree camera steps are checkboxes on the Controls page in both Classic and Reforged, and every one starts unticked, the way 1.04 played. A setting you saved while they were on does not carry over: the boxes start empty once and remember what you pick after that. Snap to Nearby Buildings pulls a building put down a cell or so short of another one flush against its edge. Nudge Blocked Placement slides a building whose spot is taken by a rock or another building's footprint to the nearest place it fits, instead of turning it red under the cursor. With grid placement off a building goes down exactly where the cursor puts it, and the white grid lines under the ghost go with it. The red squares where nothing can be built still show, so you can see the rock before you click on it.- The mouse wheel has its own Zoom Speed slider on the Controls page, in both interfaces, and at 100% a notch moves the camera as far as it always did. The slider above it is now called Camera Scroll Speed and says what it covers: the screen edge, the arrow keys and the right-button drag. That drag never followed it. Only a small minimum under the drag changed with the slider, so moving it from 50 to 100 made a 40 pixel right drag about two percent faster; the whole drag follows it now, and at the default it drags exactly as before.diff --git a/GeneralsMD/Code/Data/German/Generals.str b/GeneralsMD/Code/Data/German/Generals.strindex fabd5c228..36006498a 100644--- a/GeneralsMD/Code/Data/German/Generals.str+++ b/GeneralsMD/Code/Data/German/Generals.str@@ -14590,35 +14590,23 @@ GUI:Bloom0ENDGUI:Bloom1-"Dezent"-END--GUI:Bloom3-"Stark"-END--TOOLTIP:Bloom-"Wie weit helle Flächen Licht in ihre Umgebung abgeben. Das Original hatte nichts davon, also ist Aus das, wofür die Grafiken gemalt wurden."-END--GUI:BloomThreshold-"Was leuchtet"+"Niedrig"END-GUI:BloomThreshold0-"Nur das Hellste"+GUI:Bloom2+"Mittel"END-GUI:BloomThreshold1-"Helle Dinge"+GUI:Bloom3+"Hoch"END-GUI:BloomThreshold2-"Das meiste Bild"+GUI:Bloom4+"Ultra"END-TOOLTIP:BloomThreshold-"Wie viel vom Bildschirm hell genug ist, um zu leuchten. Nur das Hellste beschränkt es auf Mündungsfeuer und Lampen; das meiste Bild legt einen Dunst über das ganze Schlachtfeld."+TOOLTIP:Bloom+"Wie stark Feuer, Explosionen, Mündungsfeuer und Laser leuchten und wie weit ihr Licht auf die Umgebung übergreift. Gebäude, Himmel, Schnee und Sand leuchten nie. Aus ist das, wofür die Grafiken gemalt wurden. Der Direct3D-9-Renderer zeigt eine weichere Fassung."ENDGUI:VSyncdiff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.strindex 9ba1732cb..e891b7a53 100644--- a/GeneralsMD/Code/Data/Patch.str+++ b/GeneralsMD/Code/Data/Patch.str@@ -758,39 +758,23 @@ GUI:Bloom0ENDGUI:Bloom1-"Subtle"+"Low"ENDGUI:Bloom2-"Normal"+"Medium"ENDGUI:Bloom3-"Strong"+"High"END-TOOLTIP:Bloom-"How far bright surfaces bleed light into what is around them. Retail had none of this, so Off is what the artwork was painted for."-END--GUI:BloomThreshold-"What Glows"-END--GUI:BloomThreshold0-"Only the brightest"-END--GUI:BloomThreshold1-"Bright things"-END--GUI:BloomThreshold2-"Most of the picture"+GUI:Bloom4+"Ultra"END-TOOLTIP:BloomThreshold-"How much of the screen is bright enough to glow at all. Only the brightest keeps it to muzzle flashes and lamps; most of the picture puts a haze over the whole battlefield."+TOOLTIP:Bloom+"How hard fire, explosions, muzzle flashes and lasers burn and how far their light spills over what is around them. Buildings, the sky, snow and sand never glow. Off is the look the artwork was painted for. The Direct3D 9 renderer gets a softer version."ENDGUI:VSyncdiff --git a/GeneralsMD/Code/Data/Scenarios/glowbase.txt b/GeneralsMD/Code/Data/Scenarios/glowbase.txtnew file mode 100644index 000000000..3299b3417--- /dev/null+++ b/GeneralsMD/Code/Data/Scenarios/glowbase.txt@@ -0,0 +1,18 @@+# A quiet American base on the open snow in the middle of Winter Wolf, for the Glow option's check+# that nothing painted blooms: white and grey buildings and the brightest ground in the game, nothing+# firing. Draws, so -win:+#+# generals.exe -win -xres 1920 -yres 1080 -msaa 0 -quickstart -noshellmap -observer -multiInstance+# -fps 120 -noFPSLimit -particlecap 2500 -map "Maps\Winter Wolf\Winter Wolf.map"+# -autoskirmish 2 -takeover -side 0 FactionAmerica -side 1 FactionChina -seed 7+# -scenario glowbase -cinema nohud -freecam 800 1120 230 0 -16 -screenshot 120 -maxframes 130+#+# with Bloom = 0 and 4 (Ultra) in the Options.ini of a ZH_USER_DATA_DIR of its own for each run.++20 spawn 0 AmericaCommandCenter 1 1100 1120+20 spawn 0 AmericaParticleCannonUplink 1 1100 940+20 spawn 0 AmericaStrategyCenter 1 1100 1300+20 spawn 0 AmericaWarFactory 1 1320 1000+20 spawn 0 AmericaBarracks 1 1320 1240+20 spawn 0 AmericaPowerPlant 3 950 980 90+20 spawn 0 AmericaSupplyCenter 1 1500 1120diff --git a/GeneralsMD/Code/Data/Scenarios/glowfight.txt b/GeneralsMD/Code/Data/Scenarios/glowfight.txtnew file mode 100644index 000000000..30295a031--- /dev/null+++ b/GeneralsMD/Code/Data/Scenarios/glowfight.txt@@ -0,0 +1,35 @@+# The Glow option's fight: laser beams, flame, muzzle flashes and burning wrecks in one view, for+# Off against High against Ultra pictures of the same frame. laserglow.txt's point defence lasers (a+# Paladin under Rocket Buggies, an Avenger under Tank Hunters), three Laser General Crusaders on the+# Battlemasters, and Dragon Tanks, Battlemasters and Inferno Cannons of seat 1 on a Crusader group+# beside them. Draws, so -win:+#+# generals.exe -win -xres 1920 -yres 1080 -msaa 0 -quickstart -noshellmap -observer -multiInstance+# -fps 120 -noFPSLimit -particlecap 2500 -map "Maps\Twilight Flame\Twilight Flame.map"+# -autoskirmish 2 -takeover -side 0 FactionAmerica -side 1 FactionGLA -seed 7+# -scenario glowfight -cinema nohud -freecam 3150 3660 420 45 -40 -screenshot 172 -maxframes 182+#+# with Bloom = 0 to 4 in the Options.ini of a ZH_USER_DATA_DIR of its own for each run, and -d3d9+# for the old renderer. The particles differ from run to run; the units and the camera do not.++30 spawn 0 AmericaTankPaladin 1 3260 3820+30 spawn 1 GLAVehicleRocketBuggy 4 3260 4100 30+60 attackmove 1 GLAVehicleRocketBuggy 3260 3820++30 spawn 0 AmericaTankAvenger 1 3400 3820+30 spawn 1 ChinaInfantryTankHunter 5 3400 4060 18+60 attack 1 ChinaInfantryTankHunter 0 AmericaTankAvenger++30 spawn 0 Lazr_AmericaTankCrusader 3 3420 3800 30+30 spawn 0 Lazr_AmericaTankAvenger 1 3360 3740+60 attack 0 Lazr_AmericaTankCrusader 1 ChinaTankBattleMaster+60 attack 0 Lazr_AmericaTankAvenger 1 ChinaInfantryTankHunter++30 spawn 0 AmericaTankCrusader 4 3480 3860 30+30 spawn 1 ChinaTankDragon 3 3500 3990 30+30 spawn 1 ChinaTankBattleMaster 3 3560 3960 30+30 spawn 1 ChinaVehicleInfernoCannon 4 3440 4200 40+60 attack 1 ChinaTankDragon 0 AmericaTankCrusader+60 attack 1 ChinaTankBattleMaster 0 AmericaTankCrusader+60 attack 1 ChinaVehicleInfernoCannon 0 AmericaTankCrusader+60 attack 0 AmericaTankCrusader 1 ChinaTankBattleMasterdiff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.strindex c445baa25..def309534 100644--- a/GeneralsMD/Code/Data/Turkish/Generals.str+++ b/GeneralsMD/Code/Data/Turkish/Generals.str@@ -15246,39 +15246,23 @@ GUI:Bloom0ENDGUI:Bloom1-"Hafif"+"Düşük"ENDGUI:Bloom2-"Normal"+"Orta"ENDGUI:Bloom3-"Güçlü"-END--TOOLTIP:Bloom-"Parlak yüzeylerin çevrelerine ne kadar ışık saçtığı. Orijinal oyunda bunların hiçbiri yoktu; çizimler Kapalı ayarına göre yapıldı."-END--GUI:BloomThreshold-"Neler Parlasın"-END--GUI:BloomThreshold0-"Yalnızca en parlaklar"-END--GUI:BloomThreshold1-"Parlak nesneler"+"Yüksek"END-GUI:BloomThreshold2-"Görüntünün çoğu"+GUI:Bloom4+"Ultra"END-TOOLTIP:BloomThreshold-"Ekranın ne kadarının parlayacak kadar aydınlık sayıldığı. Yalnızca en parlaklar, parlamayı namlu alevleri ve lambalarla sınırlar; görüntünün çoğu, bütün savaş alanını bir pusla örter."+TOOLTIP:Bloom+"Ateşin, patlamaların, namlu alevlerinin ve lazerlerin ne kadar parlak yandığı ve ışıklarının çevreye ne kadar taştığı. Binalar, gökyüzü, kar ve kum hiçbir zaman parlamaz. Çizimler Kapalı ayarına göre yapıldı. Direct3D 9 çizicisi bunun daha yumuşak bir sürümünü gösterir."ENDGUI:VSyncdiff --git a/GeneralsMD/Code/Data/Window/Menus/OptionsMenu.wnd b/GeneralsMD/Code/Data/Window/Menus/OptionsMenu.wndindex 961ac4730..894d42e09 100644--- a/GeneralsMD/Code/Data/Window/Menus/OptionsMenu.wnd+++ b/GeneralsMD/Code/Data/Window/Menus/OptionsMenu.wnd@@ -5012,297 +5012,9 @@ WINDOWIMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;ENDCHILD- WINDOW- WINDOWTYPE = STATICTEXT;- SCREENRECT = UPPERLEFT: 530 238, BOTTOMRIGHT: 754 262, CREATIONRESOLUTION: 800 600;- NAME = "OptionsMenu.wnd:LabelBloomThreshold";- TOOLTIPTEXT = "TOOLTIP:BloomThreshold";- STATUS = ENABLED;- STYLE = STATICTEXT+MOUSETRACK;- SYSTEMCALLBACK = "[None]";- INPUTCALLBACK = "[None]";- TOOLTIPCALLBACK = "[None]";- DRAWCALLBACK = "[None]";- FONT = NAME: "Arial", SIZE: 14, BOLD: 0;- HEADERTEMPLATE = "MinorTitle";- TOOLTIPDELAY = -1;- TEXT = "GUI:BloomThreshold";- TEXTCOLOR = ENABLED: 255 255 255 255, ENABLEDBORDER: 0 0 0 255,- DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,- HILITE: 128 128 255 255, HILITEBORDER: 0 0 128 255;- ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 0 0 0 0, BORDERCOLOR: 0 0 0 0,- 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,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 64 64 64 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,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- HILITEDRAWDATA = IMAGE: NoImage, COLOR: 0 128 0 255, BORDERCOLOR: 128 255 128 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,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- STATICTEXTDATA = CENTERED: 0;- END- CHILD- WINDOW- WINDOWTYPE = COMBOBOX;- SCREENRECT = UPPERLEFT: 536 262, BOTTOMRIGHT: 760 286, CREATIONRESOLUTION: 800 600;- NAME = "OptionsMenu.wnd:ComboBoxBloomThreshold";- TOOLTIPTEXT = "TOOLTIP:BloomThreshold";- STATUS = ENABLED+IMAGE;- STYLE = MOUSETRACK+COMBOBOX;- SYSTEMCALLBACK = "[None]";- INPUTCALLBACK = "[None]";- TOOLTIPCALLBACK = "[None]";- DRAWCALLBACK = "[None]";- FONT = NAME: "Arial", SIZE: 10, BOLD: 0;- HEADERTEMPLATE = "ComboBoxEntry";- TOOLTIPDELAY = -1;- TEXTCOLOR = ENABLED: 254 254 254 255, ENABLEDBORDER: 0 0 0 255,- DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,- HILITE: 128 128 255 255, HILITEBORDER: 0 0 128 255;- ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 255 0 0 255, BORDERCOLOR: 255 128 128 255,- IMAGE: NoImage, COLOR: 47 55 168 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;- 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 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 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 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;- 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: 168 255 12 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;- END- CHILDWINDOWWINDOWTYPE = CHECKBOX;- SCREENRECT = UPPERLEFT: 536 294, BOTTOMRIGHT: 760 318, CREATIONRESOLUTION: 800 600;+ SCREENRECT = UPPERLEFT: 536 238, BOTTOMRIGHT: 760 262, CREATIONRESOLUTION: 800 600;NAME = "OptionsMenu.wnd:CheckGroundLighting";STATUS = ENABLED+IMAGE+BORDER;STYLE = CHECKBOX+MOUSETRACK;@@ -5349,7 +5061,7 @@ WINDOWCHILDWINDOWWINDOWTYPE = CHECKBOX;- SCREENRECT = UPPERLEFT: 536 322, BOTTOMRIGHT: 760 346, CREATIONRESOLUTION: 800 600;+ SCREENRECT = UPPERLEFT: 536 266, BOTTOMRIGHT: 760 290, CREATIONRESOLUTION: 800 600;NAME = "OptionsMenu.wnd:CheckHeatEffects";STATUS = ENABLED+IMAGE+BORDER;STYLE = CHECKBOX+MOUSETRACK;diff --git a/GeneralsMD/Code/Data/Window/Menus/OptionsMenuClassic.wnd b/GeneralsMD/Code/Data/Window/Menus/OptionsMenuClassic.wndindex 8879fcd62..af9467108 100644--- a/GeneralsMD/Code/Data/Window/Menus/OptionsMenuClassic.wnd+++ b/GeneralsMD/Code/Data/Window/Menus/OptionsMenuClassic.wnd@@ -4965,297 +4965,9 @@ WINDOWIMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;ENDCHILD- WINDOW- WINDOWTYPE = STATICTEXT;- SCREENRECT = UPPERLEFT: 530 238, BOTTOMRIGHT: 754 262, CREATIONRESOLUTION: 800 600;- NAME = "OptionsMenu.wnd:LabelBloomThreshold";- TOOLTIPTEXT = "TOOLTIP:BloomThreshold";- STATUS = ENABLED;- STYLE = STATICTEXT+MOUSETRACK;- SYSTEMCALLBACK = "[None]";- INPUTCALLBACK = "[None]";- TOOLTIPCALLBACK = "[None]";- DRAWCALLBACK = "[None]";- FONT = NAME: "Arial", SIZE: 14, BOLD: 0;- HEADERTEMPLATE = "MinorTitle";- TOOLTIPDELAY = -1;- TEXT = "GUI:BloomThreshold";- TEXTCOLOR = ENABLED: 255 255 255 255, ENABLEDBORDER: 0 0 0 255,- DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,- HILITE: 128 128 255 255, HILITEBORDER: 0 0 128 255;- ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 0 0 0 0, BORDERCOLOR: 0 0 0 0,- 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,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 64 64 64 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,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- HILITEDRAWDATA = IMAGE: NoImage, COLOR: 0 128 0 255, BORDERCOLOR: 128 255 128 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,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- STATICTEXTDATA = CENTERED: 0;- END- CHILD- WINDOW- WINDOWTYPE = COMBOBOX;- SCREENRECT = UPPERLEFT: 536 262, BOTTOMRIGHT: 760 286, CREATIONRESOLUTION: 800 600;- NAME = "OptionsMenu.wnd:ComboBoxBloomThreshold";- TOOLTIPTEXT = "TOOLTIP:BloomThreshold";- STATUS = ENABLED+IMAGE;- STYLE = MOUSETRACK+COMBOBOX;- SYSTEMCALLBACK = "[None]";- INPUTCALLBACK = "[None]";- TOOLTIPCALLBACK = "[None]";- DRAWCALLBACK = "[None]";- FONT = NAME: "Arial", SIZE: 10, BOLD: 0;- HEADERTEMPLATE = "ComboBoxEntry";- TOOLTIPDELAY = -1;- TEXTCOLOR = ENABLED: 254 254 254 255, ENABLEDBORDER: 0 0 0 255,- DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,- HILITE: 128 128 255 255, HILITEBORDER: 0 0 128 255;- ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 255 0 0 255, BORDERCOLOR: 255 128 128 255,- IMAGE: NoImage, COLOR: 47 55 168 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;- 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 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 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 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;- 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: 168 255 12 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;- END- CHILDWINDOWWINDOWTYPE = CHECKBOX;- SCREENRECT = UPPERLEFT: 536 294, BOTTOMRIGHT: 760 318, CREATIONRESOLUTION: 800 600;+ SCREENRECT = UPPERLEFT: 536 238, BOTTOMRIGHT: 760 262, CREATIONRESOLUTION: 800 600;NAME = "OptionsMenu.wnd:CheckGroundLighting";STATUS = ENABLED+IMAGE+BORDER;STYLE = CHECKBOX+MOUSETRACK;@@ -5302,7 +5014,7 @@ WINDOWCHILDWINDOWWINDOWTYPE = CHECKBOX;- SCREENRECT = UPPERLEFT: 536 322, BOTTOMRIGHT: 760 346, CREATIONRESOLUTION: 800 600;+ SCREENRECT = UPPERLEFT: 536 266, BOTTOMRIGHT: 760 290, CREATIONRESOLUTION: 800 600;NAME = "OptionsMenu.wnd:CheckHeatEffects";STATUS = ENABLED+IMAGE+BORDER;STYLE = CHECKBOX+MOUSETRACK;diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.hindex cceda7eb2..300914b44 100644--- a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h+++ b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h@@ -453,8 +453,7 @@ public:Bool m_workersReturnToSupply; ///< a worker that finishes a build job goes back to the dock it leftBool m_detailedBuildTooltips; ///< put build time, weapon range and damage in the build tooltipBool m_archiveReplays; ///< keep a timestamped copy of every replay, instead of only the last one- Int m_bloomIntensity; ///< bloom strength in percent, 0 = off- Int m_bloomThreshold; ///< brightness in percent below which nothing blooms+ Int m_bloomIntensity; ///< Glow strength in percent, 0 = off; the renderer derives the restBool m_buildMapCache;AsciiString m_initialFile; ///< If this is specified, load a specific map/replay from the command-lineAsciiString m_pendingFile; ///< If this is specified, use this map at the next game startdiff --git a/GeneralsMD/Code/GameEngine/Include/Common/OptionsCatalog.h b/GeneralsMD/Code/GameEngine/Include/Common/OptionsCatalog.hindex 4896148f6..b62b7e527 100644--- a/GeneralsMD/Code/GameEngine/Include/Common/OptionsCatalog.h+++ b/GeneralsMD/Code/GameEngine/Include/Common/OptionsCatalog.h@@ -128,13 +128,12 @@ extern unsigned msaaSamplesForLevel( Int level );extern Int msaaLevelForSamples( unsigned samples );//------------------------------------------------------------------------------// Bloom is two percentages the shader wants and neither of them is a question a player can answer.-// "Bloom = 60" is a strength somebody has to find by experiment, and "BloomThreshold = 65" is worse:-// it is a brightness, it runs backwards - lower means more of the screen glows - and nothing on the-// screen tells you which way to push it. So Options.ini stores a level, the menu offers those-// levels by name, and the percentages the levels stand for are in OptionsCatalog.cpp.-enum { BLOOM_LEVEL_COUNT = 4 }; ///< off, subtle, normal, strong-enum { BLOOM_THRESHOLD_LEVEL_COUNT = 3 }; ///< only the brightest, bright things, most of the picture+// Glow (the Bloom key) is a strength in percent the renderer wants, and "Bloom = 60" is not a+// question a player can answer. So Options.ini stores a level, the menu offers those levels by+// name, and the percentage each level stands for is in OptionsCatalog.cpp. What glows is not a+// setting: fire, explosions, muzzle flashes and lasers do and the painted world does not, at every+// level (W3DShaderManager.cpp, glowTuning).+enum { BLOOM_LEVEL_COUNT = 5 }; ///< off, low, medium, high, ultra// Texture filtering is a mode too - bilinear, trilinear, anisotropic - and the combo box offers it// by those names. The number in Options.ini is the same 0..2 it was when the key had no control.diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cppindex d344f1205..39ac97b83 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp@@ -223,7 +223,6 @@ static void parseIgnoredField( INI *, void *, void *, const void * ){ "DetailedBuildTooltips", INI::parseBool, NULL, offsetof( GlobalData, m_detailedBuildTooltips ) },{ "ArchiveReplays", INI::parseBool, NULL, offsetof( GlobalData, m_archiveReplays ) },{ "Bloom", INI::parseInt, NULL, offsetof( GlobalData, m_bloomIntensity ) },- { "BloomThreshold", INI::parseInt, NULL, offsetof( GlobalData, m_bloomThreshold ) },{ "MinCameraHeight", INI::parseReal, NULL, offsetof( GlobalData, m_minCameraHeight ) },{ "TerrainHeightAtEdgeOfMap", INI::parseReal, NULL, offsetof( GlobalData, m_terrainHeightAtEdgeOfMap ) },{ "UnitDamagedThreshold", INI::parseReal, NULL, offsetof( GlobalData, m_unitDamagedThresh ) },@@ -1201,14 +1200,11 @@ GlobalData::GlobalData()m_detailedBuildTooltips = TRUE;m_archiveReplays = TRUE;- // Bloom defaults to the options screen's Medium: 60 percent, which the Direct3D 11 post chain- // turns into the 1.5 strength it used to apply unconditionally. Both fields are percentages and- // GameData.ini sets them as such - the strength, and the brightness below which nothing glows.- // The options screen offers levels instead and stores one of those in Options.ini;- // OptionsCatalog.cpp holds the percentage each level stands for, and 60 and 65 here are two of- // them.- m_bloomIntensity = 60;- m_bloomThreshold = 65;+ // Glow defaults to the options screen's Medium, 50 percent. GameData.ini sets the field as a+ // percentage; the options screen offers levels and stores one of those in Options.ini, and+ // OptionsCatalog.cpp holds the percentage each level stands for. W3DShaderManager.cpp turns+ // the percentage into the additive gain, the bloom strength and the blur width.+ m_bloomIntensity = 50;m_animateWindows = TRUE;diff --git a/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp b/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cppindex b66ad81ad..883df15d1 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/OptionsCatalog.cpp@@ -92,7 +92,6 @@ OPTION_BOOL_ACCESSORS( m_formationDrag )OPTION_BOOL_ACCESSORS( m_showAllyCursors )OPTION_BOOL_ACCESSORS( m_chromaLighting )OPTION_INT_ACCESSORS( m_bloomIntensity )-OPTION_INT_ACCESSORS( m_bloomThreshold )OPTION_INT_ACCESSORS( m_menuTransitionSpeed )OPTION_INT_ACCESSORS( m_textureFilterMode )OPTION_INT_ACCESSORS( m_anisotropyLevel )@@ -142,16 +141,12 @@ Int msaaLevelForSamples( unsigned samples )}//------------------------------------------------------------------------------// Bloom, as levels. GlobalData keeps the two percentages the shader reads and GameData.ini keeps-// setting them directly, so nothing downstream of here knows the levels exist; what changed is-// Options.ini and the menu, which now hold the index of one of these entries.-//-// The strengths are spread over the useful half of the range: past about 85 the whole picture-// washes out, and below 30 the effect is only visible on the muzzle flashes. The thresholds run-// the other way round on purpose - a low number means more of the picture is bright enough to-// glow - so the entry a player picks reads as "how much glows", which is the thing they can see.-static const Int TheBloomPercents[ BLOOM_LEVEL_COUNT ] = { 0, 35, 60, 85 };-static const Int TheBloomThresholdPercents[ BLOOM_THRESHOLD_LEVEL_COUNT ] = { 85, 65, 45 };+// Glow, as levels. GlobalData keeps the percentage the renderer reads and GameData.ini can still+// set it directly, so nothing downstream of here knows the levels exist; Options.ini and the menu+// hold the index of one of these entries. The index kept its meaning when Ultra was added: an+// Options.ini saved with the four old levels (off, subtle, normal, strong) reads 0 to 3 as Off,+// Low, Medium and High. The renderer scales every one of its numbers off the percentage.+static const Int TheBloomPercents[ BLOOM_LEVEL_COUNT ] = { 0, 25, 50, 75, 100 };static Int clampLevel( Int level, Int count ){@@ -203,18 +198,6 @@ static void set_bloomLevel( Int level )TheWritableGlobalData->m_bloomIntensity = TheBloomPercents[ clampLevel( level, BLOOM_LEVEL_COUNT ) ];}-static Int get_bloomThresholdLevel( void )-{- return nearestLevel( TheBloomThresholdPercents, BLOOM_THRESHOLD_LEVEL_COUNT,- TheGlobalData->m_bloomThreshold );-}--static void set_bloomThresholdLevel( Int level )-{- TheWritableGlobalData->m_bloomThreshold =- TheBloomThresholdPercents[ clampLevel( level, BLOOM_THRESHOLD_LEVEL_COUNT ) ];-}-//-----------------------------------------------------------------------------// The catalog.//@@ -381,20 +364,15 @@ const OptionDef TheOptionCatalog[] =// Grid placement, snap-to-45 building rotation and the nudge left with them and came back to// Options > Controls, above, off until ticked.- // Off, subtle, normal, strong. Normal (60, the menu's Medium) is the default, set in- // GlobalData's constructor: it is the strength the Direct3D 11 frame applied before there was a- // setting at all, so a fresh install looks the way it did. The key is "Bloom", not "BloomLevel" - it predates- // the levels and an Options.ini in the wild already spells it this way.+ // Glow: off, low, medium, high, ultra. Medium (50) is the default, set in GlobalData's+ // constructor. The key is "Bloom", not "Glow" or "BloomLevel" - it predates the levels and an+ // Options.ini in the wild already spells it this way. The "What Glows" threshold row that sat+ // under it is gone: a lower threshold only ever bloomed the buildings and the sand, so the+ // level decides it, and a BloomThreshold line an older Options.ini kept is ignored.{ "Bloom", OPT_WND( "ComboBoxBloom" ), "GUI:Bloom",OPTION_ENUM, APPLY_LIVE, 0, BLOOM_LEVEL_COUNT - 1,get_bloomLevel, set_bloomLevel },- // How much of the picture is bright enough to glow at all. Three answers, because the number- // underneath is a brightness that runs backwards and nobody could be expected to guess that.- { "BloomThreshold", OPT_WND( "ComboBoxBloomThreshold" ), "GUI:BloomThreshold",- OPTION_ENUM, APPLY_LIVE, 0, BLOOM_THRESHOLD_LEVEL_COUNT - 1,- get_bloomThresholdLevel, set_bloomThresholdLevel },-// Fullscreen, borderless or windowed. The old Windowed flag in GameData.ini seeds this and is// then derived back from it, so the device layer keeps reading the boolean it always read.// The window's style at startup is still settled by CreateWindow in WinMain, which runs beforediff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DLaserDraw.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DLaserDraw.cppindex dd09cfd6d..c97e81514 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DLaserDraw.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DLaserDraw.cpp@@ -33,6 +33,7 @@// INCLUDES ///////////////////////////////////////////////////////////////////////////////////////#include <stdlib.h>+#include "Common/GlobalData.h"#include "Common/Thing.h"#include "Common/ThingTemplate.h"#include "Common/Xfer.h"@@ -65,7 +66,8 @@// own hue and a narrow core run toward white. Both draw through one texture made here, a falloff// across the width that reaches zero at the edge, so the halo has no visible border. The core// stacks past white on top of EA's layers, which the Direct3D 11 bloom then picks up; under -d3d9-// the halo alone is the glow. Draw side only: nothing here is read by GameLogic or parsed from INI.+// the halo alone is the glow. Both follow the Glow option (glowStrength). Draw side only: nothing+// here is read by GameLogic or parsed from INI.static const Real GLOW_HALO_WIDTH_SCALE = 2.8f; // halo width over the beam's widest layerstatic const Real GLOW_HALO_MIN_WIDTH = 16.0f;static const Real GLOW_HALO_INTENSITY = 0.75f;@@ -156,6 +158,14 @@ static Vector3 glowHue( Color inner, Color outer )return Vector3( c[best][0] / hi, c[best][1] / hi, c[best][2] / hi );}+// What the Glow option makes of the two glow lines: nothing at Off, which leaves EA's beams alone,+// and the look they were tuned at for Medium, twice it at Ultra. A beam is a few pixels wide, so+// unlike a fireball it needs its own brightness raised to get past white and bloom.+static Real glowStrength()+{+ return TheGlobalData->m_bloomIntensity / 50.0f;+}+// PUBLIC FUNCTIONS /////////////////////////////////////////////////////////////////////////////////-------------------------------------------------------------------------------------------------@@ -319,9 +329,6 @@ W3DLaserDraw::W3DLaserDraw( Thing *thing, const ModuleData* moduleData ) :if( beamGlows( thing ) ){TextureClass *glowTexture = acquireGlowTexture();- Vector3 hue = glowHue( data->m_innerColor, data->m_outerColor );- Vector3 white( 1.0f, 1.0f, 1.0f );- Vector3 colors[ GLOW_LAYERS ] = { hue * GLOW_HALO_INTENSITY, hue * ( 1.0f - GLOW_CORE_WHITEN ) + white * GLOW_CORE_WHITEN };const Int glowCount = (Int)data->m_segments * GLOW_LAYERS;m_glow3D = NEW SegmentedLineClass *[ glowCount ];@@ -331,7 +338,6 @@ W3DLaserDraw::W3DLaserDraw( Thing *thing, const ModuleData* moduleData ) :m_glow3D[ g ] = line;line->Set_Texture( glowTexture );line->Set_Shader( ShaderClass::_PresetAdditiveShader );- line->Set_Color( colors[ g % GLOW_LAYERS ] );line->Set_Texture_Mapping_Mode( SegLineRendererClass::UNIFORM_WIDTH_TEXTURE_MAP ); // u runs across the widthW3DDisplay::m_3DScene->Add_Render_Object( line );line->Set_Visible( 0 );@@ -566,9 +572,20 @@ void W3DLaserDraw::doDrawModule(const Matrix3D* transformMtx)MAX( widest * GLOW_HALO_WIDTH_SCALE, GLOW_HALO_MIN_WIDTH ) * widthScale,MAX( widest * GLOW_CORE_WIDTH_SCALE, GLOW_CORE_MIN_WIDTH ) * widthScale};+ // set with the points rather than once, so a change of the Glow option reaches the+ // next beam drawn+ const Real strength = glowStrength();+ Vector3 hue = glowHue( data->m_innerColor, data->m_outerColor );+ Vector3 white( 1.0f, 1.0f, 1.0f );+ Vector3 colors[ GLOW_LAYERS ] =+ {+ hue * ( GLOW_HALO_INTENSITY * strength ),+ ( hue * ( 1.0f - GLOW_CORE_WHITEN ) + white * GLOW_CORE_WHITEN ) * strength+ };for( Int g = 0; g < GLOW_LAYERS; g++ ){SegmentedLineClass *line = m_glow3D[ segment * GLOW_LAYERS + g ];+ line->Set_Color( colors[ g ] );line->Set_Width( widths[ g ] );line->Set_Points( 2, &laserPoints[0] );}diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DShaderManager.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DShaderManager.cppindex ea9513b0a..3c30756f4 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DShaderManager.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DShaderManager.cpp@@ -194,9 +194,10 @@ W3DFilterInterface *ScreenDefaultFilterList[]=/*========= Bloom =============================================================*//// Retail had no bloom and every texture in the game is LDR, so this is tunable rather than a-/// fixed look: m_bloomIntensity is the strength in percent (0 is off, 60 the default) and-/// m_bloomThreshold the brightness, in percent, below which nothing glows. The-/// options screen sets both from one of a handful of named levels; nothing here knows that.+/// fixed look: m_bloomIntensity is the strength in percent, 0 off, and the options screen's Glow+/// levels set it to 0, 25, 50, 75 or 100 (OptionsCatalog.cpp); nothing here knows the levels.+/// Every number the two renderers use is drawn out of that one percentage, in glowTuning below.+/// On Direct3D 9 the bloom is the fixed function one here./// It rides on ScreenDefaultFilter, which already renders the scene into a full-screen texture/// on the frames the smudge effects need one, so the only new work is a quarter-size bright/// pass, two 4-tap blur passes and one additive composite. All fixed function on purpose - no@@ -209,25 +210,54 @@ static IDirect3DTexture9 *s_bloomTexture[2]; ///< ping-pong render targets for tstatic IDirect3DSurface9 *s_bloomSurface[2];static Int s_bloomWidth, s_bloomHeight;-/** Bloom strength in percent - Options.ini's "Bloom" - 60 when it was never set. Read every- frame rather than cached, so editing the key and reloading the options takes effect. */+/** Glow strength in percent - Options.ini's "Bloom" level, through OptionsCatalog.cpp - 50 when it+ was never set. Read every frame rather than cached, so the options screen shows at once. */static Int bloomIntensity(void){if (TheGlobalData == NULL) return 0;Int intensity = TheGlobalData->m_bloomIntensity;if (intensity < 0) return 0;- if (intensity > 100) return 100; //the composite is a single additive draw, so 100% is all there is+ if (intensity > 100) return 100;return intensity;}-/** Brightness below which nothing blooms, as a 0..255 channel value - Options.ini's- "BloomThreshold", which is in percent. */-static Int bloomThreshold(void)+/** Everything the Glow option sets, out of its one percentage p (0..1). Low, Medium, High and+ Ultra are p = 0.25, 0.5, 0.75 and 1.++ Direct3D 11 works in the half float scene, where 1.0 is white. Nothing the artists painted+ passes white: buildings, the sky and pale sand stop at it, so the bright pass starts at 1.0+ and keeps none of them at any level. What is meant to glow is what the engine adds: fire,+ explosions, muzzle flashes and laser cores are all ONE, ONE blends, and the gain multiplies+ each of them as it lands (DX11BackendClass::Set_Additive_Gain), so a fire passes white and its+ excess blooms. Gain 1.15 to 1.6 and strength 0.55 to 1.6 from Low to Ultra; more gain than+ that turned every fireball into a white disc. Two blur pairs at Low, three at Medium and four+ at High and Ultra, each pair a step wider than the last.++ Direct3D 9 draws the scene in eight bits and has nothing past white to find, so its bloom keeps+ what is over 88% of white, four times over, at 25 to 100% strength: the white centres of fire+ and laser cores, and nothing of a building in daylight. Snow can reach that; it is the price+ of a glow on the old renderer at all. */+struct GlowTuning{- const Int threshold = (TheGlobalData != NULL ? TheGlobalData->m_bloomThreshold : 65) * 255 / 100;- if (threshold < 0) return 0;- if (threshold > 255) return 255;- return threshold;+ Real threshold; ///< D3D11: the bright pass's start, 1.0 is white+ Real intensity; ///< D3D11: what the blurred excess is worth when added back+ Real additiveGain; ///< D3D11: what an additive draw into the scene is multiplied by+ UnsignedInt blurPasses; ///< D3D11: pairs of blur passes, each a step wider+ Int fixedThreshold; ///< D3D9: 0..255 below which nothing blooms+ Int fixedIntensity; ///< D3D9: composite strength in percent+};++static GlowTuning glowTuning(void)+{+ const Real p = (Real)bloomIntensity() / 100.0f;+ GlowTuning tuning;+ tuning.threshold = 1.0f;+ tuning.intensity = (p > 0.0f) ? 0.2f + 1.4f * p : 0.0f;+ tuning.additiveGain = 1.0f + 0.6f * p;+ tuning.blurPasses = (p > 0.5f) ? 4 : (p > 0.25f) ? 3 : 2;+ tuning.fixedThreshold = 224;+ tuning.fixedIntensity = bloomIntensity();+ return tuning;}/** The fixed-function bloom's strength, which is zero on Direct3D 11: there the post chain's own@@ -238,12 +268,9 @@ static Int fixedFunctionBloomIntensity(void)if (Direct3D11_Is_Active()){#if defined(_WIN32)- //The option in the post chain's units, where 1.0 is white. The chain was tuned at a- //threshold of 1.0 and an intensity of 1.5, so the default threshold (65%) lands on 1.0 and- //the middle level (60%) on 1.5; 35% and 85% fall either side, 45% and 85% thresholds at- //0.69 and 1.31. Pushed every frame, so a change on the options screen shows at once.- const Int percent = TheGlobalData != NULL ? TheGlobalData->m_bloomThreshold : 65;- DX11Post_Set_Bloom((Real)percent / 65.0f, (Real)bloomIntensity() * 0.025f);+ //Pushed every frame, so a change on the options screen shows at once.+ const GlowTuning tuning = glowTuning();+ DX11Post_Set_Bloom(tuning.threshold, tuning.intensity, tuning.additiveGain, tuning.blurPasses);#endifreturn 0;}@@ -285,7 +312,7 @@ static Bool createBloomTargets(IDirect3DTexture9 *sceneTexture)}}DEBUG_LOG(("Bloom: %dx%d, intensity %d%%, threshold %d/255\n",- s_bloomWidth, s_bloomHeight, bloomIntensity(), bloomThreshold()));+ s_bloomWidth, s_bloomHeight, glowTuning().fixedIntensity, glowTuning().fixedThreshold));return TRUE;}@@ -329,16 +356,23 @@ static void renderBloom(IDirect3DTexture9 *sceneTexture, Real x, Real y, Real w,//Bright pass. Anything darker than the threshold subtracts away to black and what survives//is how far above it the pixel was - a soft knee rather than a hard cut, which is what stops- //sunlit sand from popping in and out of the effect as the camera moves.- const Int t = bloomThreshold();+ //sunlit sand from popping in and out of the effect as the camera moves. The second stage+ //takes that excess four times over: the threshold sits near white, so the excess is small.+ const GlowTuning tuning = glowTuning();+ const Int t = tuning.fixedThreshold;DX8Wrapper::_Set_DX8_Render_Target(s_bloomSurface[0], NULL); //no depth buffer: none of this is depth testedDX8Wrapper::Set_DX8_Render_State(D3DRS_ALPHABLENDENABLE, FALSE);DX8Wrapper::Set_DX8_Render_State(D3DRS_TEXTUREFACTOR, D3DCOLOR_ARGB(255, t, t, t));DX8Wrapper::Set_DX8_Texture_Stage_State(0, D3DTSS_COLOROP, D3DTOP_SUBTRACT);DX8Wrapper::Set_DX8_Texture_Stage_State(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);DX8Wrapper::Set_DX8_Texture_Stage_State(0, D3DTSS_COLORARG2, D3DTA_TFACTOR);+ DX8Wrapper::Set_DX8_Texture_Stage_State(1, D3DTSS_COLOROP, D3DTOP_MODULATE4X);+ DX8Wrapper::Set_DX8_Texture_Stage_State(1, D3DTSS_COLORARG1, D3DTA_CURRENT);+ DX8Wrapper::Set_DX8_Texture_Stage_State(1, D3DTSS_COLORARG2, D3DTA_DIFFUSE);DX8Wrapper::Set_DX8_Texture(0, sceneTexture);+ DX8Wrapper::Set_DX8_Texture(1, NULL);drawBloomQuad(0.0f, 0.0f, (Real)s_bloomWidth, (Real)s_bloomHeight, u0, v0, u1, v1, 0xffffffff);+ DX8Wrapper::Set_DX8_Texture_Stage_State(1, D3DTSS_COLOROP, D3DTOP_DISABLE);//Blur: two 4-tap box passes ping-ponging between the targets, the second one twice as wide.//Each tap is a quarter weight carried in the diffuse colour, the first writing and the other@@ -366,7 +400,7 @@ static void renderBloom(IDirect3DTexture9 *sceneTexture, Real x, Real y, Real w,}//Composite: add the blurred highlights back over the scene.- const Int i = bloomIntensity() * 255 / 100;+ const Int i = tuning.fixedIntensity * 255 / 100;DX8Wrapper::_Set_DX8_Render_Target(oldTarget, oldDepth);DX8Wrapper::Set_DX8_Texture(0, s_bloomTexture[0]); //the second blur pass wrote target 0DX8Wrapper::Set_DX8_Render_State(D3DRS_ALPHABLENDENABLE, TRUE);diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11backend.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11backend.cppindex ad06a8939..7112044c4 100644--- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11backend.cpp+++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11backend.cpp@@ -244,6 +244,7 @@ DX11BackendClass::DX11BackendClass(), ShadowSkyFill(0.0f), ShadowReceiving(false), SmokeGlow(false)+ , AdditiveGain(1.0f), DrawsMade(0), DrawsRefused(0), RefusedNoBuffer(0)@@ -950,6 +951,30 @@ void DX11BackendClass::Set_Smoke_Glow(bool glow)}}+void DX11BackendClass::Set_Additive_Gain(float gain)+{+ if (AdditiveGain != gain) {+ AdditiveGain = gain;+ // The factor goes with the blend state when it is bound, so the next draw binds again.+ StateObjectsChanged = true;+ Bound.Blend = NULL;+ }+}++/** An additive draw into the scene, the one blend the Glow option boosts. ONE, ONE is what the+ engine's additive presets set (fire and explosion particles, the laser lines, muzzle flash and+ glow meshes); a source alpha blend into ONE is left alone, since the blend factor would replace+ the alpha it weighs by. */+bool DX11BackendClass::Additive_Glow() const+{+ return AdditiveGain != 1.0f && CurrentTarget == NULL && !ShadowMapBound+ && (VertexFormat & D3DFVF_XYZRHW) == 0+ && RenderStates.Get_Render_State(D3DRS_ALPHABLENDENABLE) != FALSE+ && RenderStates.Get_Render_State(D3DRS_SRCBLEND) == D3DBLEND_ONE+ && RenderStates.Get_Render_State(D3DRS_DESTBLEND) == D3DBLEND_ONE+ && RenderStates.Get_Render_State(D3DRS_BLENDOP) == D3DBLENDOP_ADD;+}+bool DX11BackendClass::Smoke_Glow() const{return SmokeGlow && VertexProgram == ENGINE_SHADER_NONE && PixelProgram == ENGINE_SHADER_NONE@@ -2420,6 +2445,7 @@ void DX11BackendClass::Forget_Last_State_Objects()memset(&LastRasterizerDescription, 0, sizeof(LastRasterizerDescription));memset(LastSamplerDescriptions, 0, sizeof(LastSamplerDescriptions));LastBlendState = NULL;+ LastBlendGlow = false;LastDepthStencilState = NULL;LastRasterizerState = NULL;memset(LastSamplerStates, 0, sizeof(LastSamplerStates));@@ -2427,10 +2453,16 @@ void DX11BackendClass::Forget_Last_State_Objects()Forget_Bindings();}-ID3D11BlendState * DX11BackendClass::Blend_State()+ID3D11BlendState * DX11BackendClass::Blend_State(bool glow){D3D11_BLEND_DESC description;RenderStates.Build_Blend_Description(description);+ if (glow) {+ // The source term becomes the blend factor, which Bind_State_Objects passes as the gain.+ // A float target takes a factor past one unclamped; that is the whole of the boost.+ description.RenderTarget[0].SrcBlend = D3D11_BLEND_BLEND_FACTOR;+ description.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_BLEND_FACTOR;+ }if (LastBlendState != NULL&& memcmp(&LastBlendDescription, &description, sizeof(description)) == 0) {return LastBlendState;@@ -2571,15 +2603,21 @@ void DX11BackendClass::Bind_State_Objects()ID3D11BlendState * blend = LastBlendState;ID3D11DepthStencilState * depth_stencil = LastDepthStencilState;ID3D11RasterizerState * rasterizer = LastRasterizerState;- if (StateObjectsChanged || blend == NULL || depth_stencil == NULL || rasterizer == NULL) {- blend = Blend_State();+ // Whether the glow applies hangs on the target and the vertex format as well as the render+ // states, and neither of those raises StateObjectsChanged, so it is asked every draw.+ const bool glow = Additive_Glow();+ if (StateObjectsChanged || glow != LastBlendGlow || blend == NULL || depth_stencil == NULL+ || rasterizer == NULL) {+ blend = Blend_State(glow);+ LastBlendGlow = glow;depth_stencil = Depth_Stencil_State();rasterizer = Rasterizer_State();StateObjectsChanged = blend == NULL || depth_stencil == NULL || rasterizer == NULL;}if (!known || blend != Bound.Blend) {- context->OMSetBlendState(blend, NULL, 0xffffffff);+ const float gain[4] = { AdditiveGain, AdditiveGain, AdditiveGain, 1.0f };+ context->OMSetBlendState(blend, glow ? gain : NULL, 0xffffffff);Bound.Blend = blend;}const UINT stencil_reference = RenderStates.Get_Stencil_Reference();diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11backend.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11backend.hindex 00ef7edd0..dba9fb9d0 100644--- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11backend.h+++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11backend.h@@ -233,6 +233,16 @@ public:// the smoke billboards' runs. An unlit draw with a normal takes it; any other ignores it.void Set_Smoke_Glow(bool glow);+ // What an additive draw (ONE, ONE) into the scene is worth, for the Glow option: the blend+ // takes the draw's colour times this through the blend factor, so fire, muzzle flashes and+ // laser cores pass white in the half float scene and the bloom's bright pass finds them, where+ // LDR art on its own never gets there. One is off. Only the scene target takes it: the+ // runtime sets it while the scene goes into the post chain's float texture and puts it back to+ // one when the frame goes to the screen, and a draw into a render target of its own (the+ // water's reflection), a screen space draw and any other blend keep their colour.+ void Set_Additive_Gain(float gain);+ float Additive_Gain() const { return AdditiveGain; }+// What is in the map, read back through a staging copy: how much of it was drawn into and how// near the nearest thing is. A caster pass that drew nothing leaves a map that is all one// value, and no draw count tells that apart from a pass that drew the world.@@ -403,7 +413,7 @@ private:void Bind_State_Objects();void Release_Cached();- ID3D11BlendState * Blend_State();+ ID3D11BlendState * Blend_State(bool glow);ID3D11DepthStencilState * Depth_Stencil_State();ID3D11RasterizerState * Rasterizer_State();ID3D11SamplerState * Sampler_State(unsigned sampler);@@ -473,6 +483,8 @@ private:bool Camera_Space_Draw() const;bool SmokeGlow;bool Smoke_Glow() const;+ float AdditiveGain;+ bool Additive_Glow() const;// A stage samples the target the draw is going into: the heat haze, which bends a picture that// already took its shadows, and would take them a second time.bool Samples_Current_Target() const;@@ -758,6 +770,7 @@ private:// build would find and the draw skips building and comparing them.D3D11_BLEND_DESC LastBlendDescription;ID3D11BlendState * LastBlendState;+ bool LastBlendGlow;D3D11_DEPTH_STENCIL_DESC LastDepthStencilDescription;ID3D11DepthStencilState * LastDepthStencilState;D3D11_RASTERIZER_DESC LastRasterizerDescription;diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11post.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11post.cppindex 2549bca2a..405ae6113 100644--- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11post.cpp+++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11post.cpp@@ -53,9 +53,17 @@ static const DXGI_FORMAT FLOAT_FORMAT = DXGI_FORMAT_R16G16B16A16_FLOAT;// sixteenth of the samples.static const unsigned BLOOM_DIVISOR = 4;-// Two horizontal and two vertical, which at a quarter resolution reaches about sixteen pixels of-// the finished frame. A third pair was tried and the glow got wider without getting better.+// Pairs of blur passes, one horizontal and one vertical, the n-th pair stepping n texels between+// its taps. Two reach about fifteen pixels of the finished frame; the Glow option's Medium asks+// for three, High and Ultra for four, about twenty five and thirty five. More than four and a+// fire's halo covers the units fighting in it.static const unsigned BLOOM_BLUR_PASSES = 2;+static const unsigned BLOOM_BLUR_PASS_LIMIT = 4;++// How far past the threshold the bright pass takes to reach full strength. A pixel just over it+// keeps the square of its excess, so a flame flickering across the threshold fades its glow in+// and out instead of switching it.+static const float BLOOM_KNEE = 0.5f;// What counts as bright enough to bleed, what the bleed is worth when it is added back, and where// the tone curve starts bending.@@ -72,18 +80,30 @@ static const unsigned BLOOM_BLUR_PASSES = 2;// An intensity of 1.5 against a quiet frame with nothing burning costs half a level a channel,// which is the cost of having this on when there is nothing for it to do.//-// Those two are the defaults. The game replaces them every frame from its Bloom option.+// Those two are the defaults. The game replaces them every frame from its Glow option, which+// also raises what an additive draw is worth (DX11Post_Additive_Gain): that, and not a lower+// threshold, is what gets fire and lasers past white while the art stays under it.static const float BLOOM_THRESHOLD = 1.0f;static const float BLOOM_INTENSITY = 1.5f;static const float TONE_CURVE_KNEE = 0.8f;static float BloomThreshold = BLOOM_THRESHOLD;static float BloomIntensity = BLOOM_INTENSITY;+static float BloomAdditiveGain = 1.0f;+static unsigned BloomBlurPasses = BLOOM_BLUR_PASSES;-void DX11Post_Set_Bloom(float threshold, float intensity)+void DX11Post_Set_Bloom(float threshold, float intensity, float additive_gain, unsigned blur_passes){BloomThreshold = (threshold > 0.0f) ? threshold : 0.0f;BloomIntensity = (intensity > 0.0f) ? intensity : 0.0f;+ BloomAdditiveGain = (additive_gain > 1.0f) ? additive_gain : 1.0f;+ BloomBlurPasses = (blur_passes < 1) ? 1+ : (blur_passes > BLOOM_BLUR_PASS_LIMIT) ? BLOOM_BLUR_PASS_LIMIT : blur_passes;+}++float DX11Post_Additive_Gain()+{+ return (BloomIntensity > 0.0f) ? BloomAdditiveGain : 1.0f;}static DX11PostWarp Warps[DX11_POST_WARP_LIMIT];@@ -331,9 +351,11 @@ static const char * const AO_SHADER_BODY ="}\n";// The bright pass, downsampling as it goes: four taps of the full size frame averaged into one-// quarter size texel, then the threshold taken off what is left. What survives is the amount by-// which something was brighter than white, which is a quantity an eight bit scene target could not-// have held.+// quarter size texel, then the threshold taken off its brightest channel. What survives is the+// amount by which something was brighter than white, which is a quantity an eight bit scene target+// could not have held, carried in the pixel's own hue so an orange fire glows orange. Over the+// first Tuning.w past the threshold it keeps the square of that excess (the soft knee), so it+// starts at nothing with no step and the art, which never passes white, keeps nothing.static const char * const BLOOM_EXTRACT_SHADER_BODY ="float4 main(VertexOutput input) : SV_TARGET\n""{\n"@@ -342,7 +364,12 @@ static const char * const BLOOM_EXTRACT_SHADER_BODY =" + Source.Sample(Sampler, input.Texture + float2(texel.x, -texel.y)).rgb\n"" + Source.Sample(Sampler, input.Texture + float2(-texel.x, texel.y)).rgb\n"" + Source.Sample(Sampler, input.Texture + float2(texel.x, texel.y)).rgb;\n"- " return float4(max(sum * 0.25 - Tuning.x, 0.0), 1.0);\n"+ " float3 colour = sum * 0.25;\n"+ " float bright = max(colour.r, max(colour.g, colour.b));\n"+ " float over = max(bright - Tuning.x, 0.0);\n"+ " float knee = max(Tuning.w, 0.0001);\n"+ " float kept = (over < knee) ? over * over / (2.0 * knee) : over - knee * 0.5;\n"+ " return float4(colour * (kept / max(bright, 0.0001)), 1.0);\n""}\n";// One half of a separable gaussian. The direction comes in as a constant, so the same program is@@ -882,7 +909,7 @@ void DX11PostProcessClass::Draw_Pass(const PassSetup & pass)block.Tuning[0] = BloomThreshold;block.Tuning[1] = BloomIntensity;block.Tuning[2] = TONE_CURVE_KNEE;- block.Tuning[3] = 0.0f;+ block.Tuning[3] = BLOOM_KNEE;if (pass.Occlusion) {block.Tuning[0] = NearPlane;block.Tuning[1] = FarPlane;@@ -966,13 +993,17 @@ ID3D11ShaderResourceView * DX11PostProcessClass::Run_Bloom(ID3D11RenderTargetViepass.SourceWidth = BloomWidth;pass.SourceHeight = BloomHeight;unsigned source = 0;- for (unsigned iteration = 0; iteration < BLOOM_BLUR_PASSES; ++iteration) {+ for (unsigned iteration = 0; iteration < BloomBlurPasses; ++iteration) {+ // Each pair steps a texel wider than the last. What the earlier pairs left is smooth+ // enough by then that the taps landing between texels miss nothing, and the widths add+ // up in squares, which is how four pairs reach twice as far as two.+ const float spread = static_cast<float>(iteration + 1);for (unsigned axis = 0; axis < 2; ++axis) {const unsigned other = 1 - source;pass.Source = BloomTargets[source].Resource;pass.Destination = BloomTargets[other].View;- pass.BlurX = (axis == 0) ? bloom_texel_x : 0.0f;- pass.BlurY = (axis == 0) ? 0.0f : bloom_texel_y;+ pass.BlurX = (axis == 0) ? bloom_texel_x * spread : 0.0f;+ pass.BlurY = (axis == 0) ? 0.0f : bloom_texel_y * spread;Draw_Pass(pass);source = other;}diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11post.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11post.hindex 928d6e2ad..f30686e7d 100644--- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11post.h+++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11post.h@@ -101,12 +101,18 @@ bool DX11Post_Parse_Chain(const char * text, DX11PostEffect effects[DX11_POST_CH// The name a parsed effect goes back to, for the report line.const char * DX11Post_Effect_Name(DX11PostEffect effect);-// Bloom's threshold and strength in the scene's own units, where one is white. The game's Bloom+// Bloom's threshold and strength in the scene's own units, where one is white, what an additive+// draw into the scene is multiplied by (DX11BackendClass::Set_Additive_Gain) and how many pairs+// of blur passes spread the glow, each pair a step wider than the one before. The game's Glow// option sets them every frame through W3DShaderManager, since nothing in this library may read// GlobalData. An intensity of zero skips the bright pass and the blur and leaves only the tone-// curve, so the half float scene still reaches eight bits. Until somebody calls this the chain-// runs at the values it was tuned at, which is what the tests measure.-void DX11Post_Set_Bloom(float threshold, float intensity);+// curve, so the half float scene still reaches eight bits, and it takes the gain back to one.+// Until somebody calls this the chain runs at the values it was tuned at, which is what the tests+// measure.+void DX11Post_Set_Bloom(float threshold, float intensity, float additive_gain, unsigned blur_passes);++// The gain the scene's additive draws take this frame: one whenever the glow is off.+float DX11Post_Additive_Gain();// A blast warping the picture around it: the frame drawn toward a point and then pushed out by a// ring that travels away from it. Not an effect in the chain and not a switch: whatever chain isdiff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11runtime.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11runtime.cppindex 4a1c0a780..bd55a9ca1 100644--- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11runtime.cpp+++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11runtime.cpp@@ -456,6 +456,7 @@ const char * Direct3D11_Post_Diagnostic()static void take_the_frame_to_the_screen(){Device.Set_Scene_View(NULL);+ Backend.Set_Additive_Gain(1.0f); // eight bits from here on: a boosted interface draw would only clipBackend.Begin_Scene();}@@ -483,7 +484,11 @@ void Direct3D11_Begin_Scene()// that asked for a chain and could not have one falls back to the swap chain here rather// than half way through.Post.Begin_Frame();- Device.Set_Scene_View(Post.Scene_View());+ ID3D11RenderTargetView * scene = Post.Scene_View();+ Device.Set_Scene_View(scene);+ // The Glow option's boost needs the half float scene: in eight bits it would only clip.+ Backend.Set_Additive_Gain((scene != NULL && Post.Scene_Is_Float())+ ? DX11Post_Additive_Gain() : 1.0f);Backend.Begin_Scene();}}diff --git a/GeneralsMD/Code/Tests/test_dx11backend.cpp b/GeneralsMD/Code/Tests/test_dx11backend.cppindex 22bfa9ff3..c248fe8d9 100644--- a/GeneralsMD/Code/Tests/test_dx11backend.cpp+++ b/GeneralsMD/Code/Tests/test_dx11backend.cpp@@ -454,6 +454,100 @@ TEST(dx11backend_the_smoke_glow_is_read_from_the_normal)backend.Shutdown();}+static float half_to_float(unsigned short half)+{+ const int exponent = (half >> 10) & 0x1f;+ const float mantissa = static_cast<float>(half & 0x3ff) / 1024.0f;+ const float value = (exponent == 0) ? mantissa / 16384.0f+ : (1.0f + mantissa) * static_cast<float>(1 << exponent) / 32768.0f;+ return (half & 0x8000) ? -value : value;+}++// The Glow option's gain: an additive draw into the half float scene lands at its colour times the+// gain, past white where the colour times the gain is, and every other blend lands as it was. The+// blue channel is the one that tells: 0.2 times four on a 0.25 clear is 1.05, which a factor+// clamped to one (as an eight bit target would clamp it) cannot reach.+TEST(dx11backend_an_additive_draw_takes_the_glow_gain_past_white)+{+ DX11DeviceClass device;+ CHECK(device.Create_Offscreen());+ ID3D11Device * d3d = device.Get_Device();++ DX11BackendClass backend;+ CHECK(backend.Initialise(&device));++ D3D11_TEXTURE2D_DESC target_description;+ memset(&target_description, 0, sizeof(target_description));+ target_description.Width = TARGET_SIZE;+ target_description.Height = TARGET_SIZE;+ target_description.MipLevels = 1;+ target_description.ArraySize = 1;+ target_description.Format = DXGI_FORMAT_R16G16B16A16_FLOAT;+ target_description.SampleDesc.Count = 1;+ target_description.Usage = D3D11_USAGE_DEFAULT;+ target_description.BindFlags = D3D11_BIND_RENDER_TARGET;++ ID3D11Texture2D * target = NULL;+ CHECK(SUCCEEDED(d3d->CreateTexture2D(&target_description, NULL, &target)));+ D3D11_TEXTURE2D_DESC staging_description = target_description;+ staging_description.Usage = D3D11_USAGE_STAGING;+ staging_description.BindFlags = 0;+ staging_description.CPUAccessFlags = D3D11_CPU_ACCESS_READ;+ ID3D11Texture2D * staging = NULL;+ CHECK(SUCCEEDED(d3d->CreateTexture2D(&staging_description, NULL, &staging)));+ ID3D11RenderTargetView * target_view = NULL;+ CHECK(SUCCEEDED(d3d->CreateRenderTargetView(target, NULL, &target_view)));+ device.Get_Context()->OMSetRenderTargets(1, &target_view, NULL);++ backend.Set_Viewport(0, 0, TARGET_SIZE, TARGET_SIZE);+ configure_unlit_pass_through(backend);+ ID3D11Buffer * vertices = NULL;+ CHECK(DX11Resource_Create_Vertex_Buffer(d3d, sizeof(QUAD_VERTICES), D3DPOOL_MANAGED, 0,+ QUAD_VERTICES, &vertices));+ ID3D11Buffer * indices = NULL;+ CHECK(DX11Resource_Create_Index_Buffer(d3d, sizeof(QUAD_INDICES), D3DPOOL_MANAGED, 0,+ QUAD_INDICES, &indices));+ backend.Set_Stream_Source(vertices, sizeof(BackendVertex), 0);+ backend.Set_Indices(indices, DXGI_FORMAT_R16_UINT);+ backend.Set_Render_State(D3DRS_ALPHABLENDENABLE, TRUE);++ // Blue of the centre pixel after one draw over a 0.25 clear, at this gain and this blend.+ struct Case { float Gain; DWORD Source; DWORD Destination; float Blue; };+ const Case cases[] = {+ { 4.0f, D3DBLEND_ONE, D3DBLEND_ONE, 0.25f + 0.2f * 4.0f },+ { 1.0f, D3DBLEND_ONE, D3DBLEND_ONE, 0.25f + 0.2f },+ { 4.0f, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, 0.2f },+ };+ for (unsigned index = 0; index < sizeof(cases) / sizeof(cases[0]); ++index) {+ const float clear_colour[4] = { 0.25f, 0.25f, 0.25f, 1.0f };+ device.Get_Context()->ClearRenderTargetView(target_view, clear_colour);+ backend.Set_Additive_Gain(cases[index].Gain);+ backend.Set_Render_State(D3DRS_SRCBLEND, cases[index].Source);+ backend.Set_Render_State(D3DRS_DESTBLEND, cases[index].Destination);+ CHECK(backend.Draw_Indexed_Triangles(6, 0, 0));++ device.Get_Context()->CopyResource(staging, target);+ D3D11_MAPPED_SUBRESOURCE mapped;+ CHECK(SUCCEEDED(device.Get_Context()->Map(staging, 0, D3D11_MAP_READ, 0, &mapped)));+ const unsigned short * centre = reinterpret_cast<const unsigned short *>(+ static_cast<const unsigned char *>(mapped.pData) + mapped.RowPitch * (TARGET_SIZE / 2))+ + (TARGET_SIZE / 2) * 4;+ const float blue = half_to_float(centre[2]);+ if (blue < cases[index].Blue - 0.01f || blue > cases[index].Blue + 0.01f) {+ printf(" case %u: blue %.4f, wanted %.4f\n", index, blue, cases[index].Blue);+ }+ CHECK_NEAR(blue, cases[index].Blue, 0.01f);+ device.Get_Context()->Unmap(staging, 0);+ }++ indices->Release();+ vertices->Release();+ target_view->Release();+ staging->Release();+ target->Release();+ backend.Shutdown();+}+static const char * const CACHE_FILE_NAME = "dx11backend_test_shaders.cache";static const long LAST_RECORD_CUT_BYTES = 4;diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cppindex ca31e9bb2..16601ffb3 100644--- a/GeneralsMD/Code/Tests/test_gameengine.cpp+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp@@ -13591,18 +13591,20 @@ TEST(option_catalog_clamps_and_leaves_an_absent_key_alone)TheWritableGlobalData = saved;}-/** Bloom is picked as a level and stored as one, and the shader still reads the percentage it- always read. The mapping is the whole setting: get the two directions out of step and the combo- box shows one thing while the screen does another, which nothing at build time would notice. */+/** Glow (the Bloom key) is picked as a level and stored as one, and the renderer still reads the+ percentage it always read. The mapping is the whole setting: get the two directions out of step+ and the combo box shows one thing while the screen does another, which nothing at build time+ would notice. */TEST(bloom_levels_carry_the_percentages_the_shader_reads){const OptionDef *bloom = findOptionDef( "Bloom" );- const OptionDef *threshold = findOptionDef( "BloomThreshold" );- CHECK( bloom != NULL && threshold != NULL );+ CHECK( bloom != NULL );CHECK_EQ( (Int)bloom->kind, (Int)OPTION_ENUM );- CHECK_EQ( (Int)threshold->kind, (Int)OPTION_ENUM );+ CHECK_EQ( BLOOM_LEVEL_COUNT, 5 ); // off, low, medium, high, ultraCHECK_EQ( bloom->hi, BLOOM_LEVEL_COUNT - 1 );- CHECK_EQ( threshold->hi, BLOOM_THRESHOLD_LEVEL_COUNT - 1 );++ // what glows is the level's business now, and a second row deciding it would contradict it+ CHECK( findOptionDef( "BloomThreshold" ) == NULL );GlobalData *saved = TheWritableGlobalData;GlobalData *scratch = NEW GlobalData;@@ -13610,7 +13612,6 @@ TEST(bloom_levels_carry_the_percentages_the_shader_reads)// what GlobalData's constructor put there, before anything below scribbles on itconst Int shippedIntensity = TheGlobalData->m_bloomIntensity;- const Int shippedThreshold = TheGlobalData->m_bloomThreshold;CHECK_EQ( bloom->get(), 2 ); // a fresh install starts on Medium, not Off// off is off, and nothing else is: a level that mapped to 0 would be a silent second Off entry@@ -13632,33 +13633,30 @@ TEST(bloom_levels_carry_the_percentages_the_shader_reads)previous = TheGlobalData->m_bloomIntensity;}- /* The threshold is a brightness, so it runs the other way: later entries mean more of the- picture glows, which is a lower number. This is the pair that was worth a dropdown. */- previous = 101;- for( Int level = 0; level < BLOOM_THRESHOLD_LEVEL_COUNT; ++level )+ /* An Options.ini saved before Ultra was added holds 0 to 3 for off, subtle, normal and strong,+ and has to come back as Off, Low, Medium and High: the index kept its meaning. */+ UserPreferences pref;+ for( Int old = 0; old < 4; ++old ){- threshold->set( level );- CHECK( TheGlobalData->m_bloomThreshold < previous );- previous = TheGlobalData->m_bloomThreshold;- CHECK_EQ( threshold->get(), level );+ AsciiString value;+ value.format( "%d", old );+ pref[ AsciiString( "Bloom" ) ] = value;+ loadOptionsFromPreferences( pref );+ CHECK_EQ( bloom->get(), old );}- /* GameData.ini writes these fields as raw percentages and never learns about levels, so the- combo box has to answer with the nearest entry rather than the first one. */- TheWritableGlobalData->m_bloomIntensity = 62;+ /* GameData.ini writes the field as a raw percentage and never learns about levels, so the+ combo box has to answer with the nearest entry rather than the first one. 60 is the old+ default Medium. */+ TheWritableGlobalData->m_bloomIntensity = 60;CHECK_EQ( bloom->get(), 2 );- TheWritableGlobalData->m_bloomThreshold = 66;- CHECK_EQ( threshold->get(), 1 );/* The shipped default has to be one of the entries, not something between two of them. Openingthe options screen and pressing Accept without touching anything must leave the picture whereit was, and it only does that if the default round trips through a level exactly. */TheWritableGlobalData->m_bloomIntensity = shippedIntensity;- TheWritableGlobalData->m_bloomThreshold = shippedThreshold;bloom->set( bloom->get() );- threshold->set( threshold->get() );CHECK_EQ( TheGlobalData->m_bloomIntensity, shippedIntensity );- CHECK_EQ( TheGlobalData->m_bloomThreshold, shippedThreshold );delete scratch; // while it is the current one: a Debug build's ~GlobalData reads TheWritableGlobalDataTheWritableGlobalData = saved;diff --git a/GeneralsMD/Code/Tools/optionsmenu_layout.py b/GeneralsMD/Code/Tools/optionsmenu_layout.pyindex 24060c7b7..207f4ec44 100644--- a/GeneralsMD/Code/Tools/optionsmenu_layout.py+++ b/GeneralsMD/Code/Tools/optionsmenu_layout.py@@ -147,8 +147,6 @@ NEW_CONTROLS = [(COMBO, "ComboBoxMSAA", None),(LABEL, "LabelBloom", "GUI:Bloom"),(COMBO, "ComboBoxBloom", None),- (LABEL, "LabelBloomThreshold", "GUI:BloomThreshold"),- (COMBO, "ComboBoxBloomThreshold", None),(LABEL, "LabelTextureFilter", "GUI:TextureFilter"),(COMBO, "ComboBoxTextureFilter", None),(LABEL, "LabelAnisotropy", "GUI:Anisotropy"),@@ -294,7 +292,6 @@ GROUP_LAYOUT = [setting("LabelAnisotropy", "SliderAnisotropy", "ValueAnisotropy")]),("GUI:OptionsGroupLighting", [setting("LabelBloom", "ComboBoxBloom"),- setting("LabelBloomThreshold", "ComboBoxBloomThreshold"),("check", "CheckGroundLighting"),("check", "CheckHeatEffects")])]),