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
fix(data): bigger mine leds, a contained emp flash, darker blast column
Olcay Seygana22141d0ba6a
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 7d309f5ce..b5fb3e9ec 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1374,7 +1374,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same- A bright cloud no longer shows what is behind it as a line drawing. Inside a nuke's white cloud, or a falling War Factory's fireball, every tree and wreck under it used to come out as a thin grey outline, and the picture's sharpening ringed each dark piece in white. Both stop where the frame is bright.- Smoke and fire no longer end on a straight line where they meet the ground or a building. A puff that sinks into a hillside or drifts against a wall thins out over its last few metres, softly enough that a nuke's haze and a Scud's grey smoke no longer come out as stacked, stair-stepped terraces, and a toxin cloud lying low over the ground keeps its body instead of breaking into hard-edged green islands. A China mine field blinks where you can see it again: its lights hang just off the ground, and the fade had eaten all but a thirtieth of their bright middle. No effect fades over more than its own size now, so a small spark close to the ground keeps its light. This is the default renderer; Classic and the old renderer keep the hard edge they had in 2003.- Gunfire shows at the zoom you play at. A rifle's tracer was a third of a unit wide, about one pixel from the default camera, and a bullet hit nothing you could see. Tracers from rifles, Gattlings, Humvees, Technicals and Quad Cannons are now twice as wide and half again as long, the muzzle flash is half as big again, and every hit kicks up sparks and a puff of dirt where it lands. A tank shell burns a short hot streak behind it all the way to the target, where it used to be a grey sliver you could not pick out between the flash and the blast. A Crusader's, Battlemaster's, Scorpion's, Paladin's or Overlord's shot used to be a soft white glow drifting out in front of the gun, wider than the tank; it is now a short orange blast at the barrel tip, with a bigger flame and smoke puff behind it. A shell landing throws dirt and sparks around its blast. The colours are the ones the game always used, and no weapon does anything different.-- A China mine field has mines in it. EA's field had no model at all, only a white glint blinking on each of its eight spots, so your own minefield looked like a patch of fireflies. Each spot is now a round steel mine pressed into a ring of dug earth, at a random turn, with an arming LED over its fuse that flicks on for a quarter of a second every second and a half, red on standard and cluster mines and a cold blue on EMP mines. You and your allies see them a little see-through, the way you see your own stealthed units. The enemy still sees nothing until he detects the field, and then he sees the same mines. A mine going off under a tank now throws a column of dark earth twice the tank's height, scatters clods round it and leaves a low black smoke and a scorch, with a short jolt of the screen; it used to puff a pale spray of specks that looked like dust kicked up. An EMP mine adds a blue ring across the ground and a crackle of blue sparks. What a mine does is unchanged.+- A China mine field has mines in it. EA's field had no model at all, only a white glint blinking on each of its eight spots, so your own minefield looked like a patch of fireflies. Each spot is now a round steel mine pressed into a ring of dug earth, at a random turn, with an arming LED over its fuse that flicks on for a quarter of a second every second and a half, red on standard and cluster mines and a cold blue on EMP mines. You and your allies see them a little see-through, the way you see your own stealthed units. The enemy still sees nothing until he detects the field, and then he sees the same mines. A mine going off under a tank now throws a column of dark earth twice the tank's height, scatters clods round it and leaves a low black smoke and a scorch, with a short jolt of the screen; it used to puff a pale spray of specks that looked like dust kicked up. An EMP mine adds a blue ring across the ground, a crackle of blue sparks and a short blue flash at the spot; EA's flash grew until it washed the whole screen white for a fifth of a second. What a mine does is unchanged.- A base out of power looks out of power. A building short of power, or one a hacker shut down, drains to a cold grey and sags darker, and its windows and lamps go out. Every few seconds it blinks dark for an instant or its lights catch again for a moment, and blue sparks jump on its walls where something shorts. A tank or building hit by an EMP crawls with thin blue arcs for as long as it stays dead, where it used to just turn dark grey.- Your own stealthed units look cloaked instead of faded. What stands behind a Pathfinder, Colonel Burton or a stealthed GLA unit bends through its body in a slow ripple, under a cold edge you can still read the unit by. When an enemy detector has found him, that edge pulses amber. An enemy stealth unit your detector finds used to turn into a flat orange shape with no paint; now it keeps its own paint, drained of colour, under a burning red-orange outline with scan lines running up it, and all of it flares on every sweep of the detector. This is the default renderer; Classic and the old renderer keep the 2003 look for all of these.- Effects fade out instead of blinking off. The rings a nuke sends across the ground, and any spark, flash or puff whose own colours never reached nothing, used to vanish at full strength on their last frame. Each one now dims away over its last quarter of a second, or over a quarter of its life when it lives shorter than that. One that was already fading looks the way it always did.diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedBlue.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedBlue.tgaindex 11ead2ae1..a881ec0a1 100644Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedBlue.tga and b/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedBlue.tga differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedRed.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedRed.tgaindex 67afa2f37..343556033 100644Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedRed.tga and b/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedRed.tga differdiff --git a/GeneralsMD/Code/Data/INI/FXListReforged.ini b/GeneralsMD/Code/Data/INI/FXListReforged.iniindex 1e51986eb..398f12b17 100644--- a/GeneralsMD/Code/Data/INI/FXListReforged.ini+++ b/GeneralsMD/Code/Data/INI/FXListReforged.ini@@ -1246,7 +1246,7 @@ FXList Neutron_WeaponFX_MineOffset = X:0.0 Y:0.0 Z:1.0EndParticleSystem- Name = NeutronFlare+ Name = MineEMPFlareEndParticleSystemName = MineBlastColumndiff --git a/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini b/GeneralsMD/Code/Data/INI/ParticleSystemReforged.iniindex d7af861d7..b76c976ad 100644--- a/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini+++ b/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini@@ -3402,9 +3402,10 @@ End; white lens flare blinking on each bone every second and a half and nothing else. MineFX and; MineFXPurple are the mines themselves now: ReforgedMine.tga (Tools/mine_marks.py), a steel plate; in a ring of dug earth five across, laid flat on the bone at a random turn, with an arming LED-; above its middle, red on the standard and cluster mines and cold blue-violet on the EMP mines.-; The LED is ReforgedMineLedRed.tga or ReforgedMineLedBlue.tga, a hard pale core inside a small glow,-; nine across with the core under two (the slave's Size scales the plate's). It comes on at full+; above its middle, red on the standard and cluster mines and cold sky blue on the EMP mines.+; The LED is ReforgedMineLedRed.tga or ReforgedMineLedBlue.tga, a hard pale core inside a glow,+; 15 across on the red and 16 on the blue, the core about a quarter of that (the slave's Size scales+; the plate's); nine across was still lost at the player's camera. It comes on at full; strength, holds for eight frames and is out two frames later, then stays dark until the next plate; a second and a half on: the lens flare it replaced was a soft blob that swelled and faded over 24; frames. Three across was three or four pixels from the player's own camera and lost.@@ -3428,7 +3429,7 @@ ParticleSystem MineFXLightGravity = 0.00Lifetime = 11.00 11.00SystemLifetime = 0- Size = 1.80 1.80+ Size = 3.00 3.00StartSizeRate = 0.00 0.00SizeRate = 0.00 0.00SizeRateDamping = 1.00 1.00@@ -3483,7 +3484,7 @@ ParticleSystem MineFXLightPurpleGravity = 0.00Lifetime = 11.00 11.00SystemLifetime = 0- Size = 1.80 1.80+ Size = 3.20 3.20StartSizeRate = 0.00 0.00SizeRate = 0.00 0.00SizeRateDamping = 1.00 1.00@@ -3641,10 +3642,13 @@ End; A mine going off under a vehicle (WeaponFX_MineDetonation and Neutron_WeaponFX_Mine in; FXListReforged.ini). EA's blast was a pale spray of 100 specks and one thin puff, which read as-; dust kicked up rather than a charge. These throw a column of dark earth about 30 high that falls-; back inside two seconds, a spray of clods out to about 25 either side, and a low dark smoke that-; hangs for five seconds. The EMP mine adds a blue ring across the ground and a crackle of blue-; sparks for most of a second.+; dust kicked up rather than a charge. These throw a column of near-black earth about 40 high that+; falls back inside two seconds, wider and darker than the orange fireball of the vehicle dying on+; top of it, a spray of clods out to about 30 either side, and a low dark smoke that hangs for five+; seconds. The EMP mine adds a blue ring across the ground, a crackle of blue sparks for most of a+; second and a short blue flash about 100 across. EA's EMP mine used NeutronFlare there, a white+; flare growing 75 a frame for ten frames that lit the whole screen; NeutronFlare itself is left+; alone for the neutron weapons that still use it.ParticleSystem MineBlastColumnPriority = WEAPON_EXPLOSION@@ -3659,7 +3663,7 @@ ParticleSystem MineBlastColumnGravity = -0.12Lifetime = 40.00 55.00SystemLifetime = 1- Size = 6.00 10.00+ Size = 9.00 14.00StartSizeRate = 0.00 0.00SizeRate = 0.25 0.25SizeRateDamping = 0.97 0.97@@ -3671,7 +3675,7 @@ ParticleSystem MineBlastColumnAlpha6 = 0.00 0.00 0Alpha7 = 0.00 0.00 0Alpha8 = 0.00 0.00 0- Color1 = R:70 G:55 B:35 0+ Color1 = R:42 G:33 B:22 0Color2 = R:0 G:0 B:0 0Color3 = R:0 G:0 B:0 0Color4 = R:0 G:0 B:0 0@@ -3681,13 +3685,13 @@ ParticleSystem MineBlastColumnColor8 = R:0 G:0 B:0 0ColorScale = 0.00 0.00BurstDelay = 0.00 0.00- BurstCount = 14.00 18.00+ BurstCount = 22.00 28.00InitialDelay = 0.00 0.00DriftVelocity = X:0.00 Y:0.00 Z:0.00VelocityType = ORTHO- VelOrthoX = -0.35 0.35- VelOrthoY = -0.35 0.35- VelOrthoZ = 2.00 3.00+ VelOrthoX = -0.45 0.45+ VelOrthoY = -0.45 0.45+ VelOrthoZ = 2.50 3.80VolumeType = CYLINDERVolCylinderRadius = 1.50VolCylinderLength = 0.00@@ -3717,7 +3721,7 @@ ParticleSystem MineBlastClodsGravity = -0.35Lifetime = 30.00 40.00SystemLifetime = 1- Size = 0.60 1.40+ Size = 1.20 2.40StartSizeRate = 0.00 0.00SizeRate = 0.00 0.00SizeRateDamping = 1.00 1.00@@ -3729,7 +3733,7 @@ ParticleSystem MineBlastClodsAlpha6 = 0.00 0.00 0Alpha7 = 0.00 0.00 0Alpha8 = 0.00 0.00 0- Color1 = R:55 G:45 B:30 0+ Color1 = R:38 G:30 B:20 0Color2 = R:0 G:0 B:0 0Color3 = R:0 G:0 B:0 0Color4 = R:0 G:0 B:0 0@@ -3739,12 +3743,12 @@ ParticleSystem MineBlastClodsColor8 = R:0 G:0 B:0 0ColorScale = 0.00 0.00BurstDelay = 0.00 0.00- BurstCount = 24.00 32.00+ BurstCount = 40.00 50.00InitialDelay = 0.00 0.00DriftVelocity = X:0.00 Y:0.00 Z:0.00VelocityType = ORTHO- VelOrthoX = -1.20 1.20- VelOrthoY = -1.20 1.20+ VelOrthoX = -1.40 1.40+ VelOrthoY = -1.40 1.40VelOrthoZ = 2.00 4.00VolumeType = CYLINDERVolCylinderRadius = 1.50@@ -3820,6 +3824,61 @@ ParticleSystem MineBlastSmokeWindPingPongEndAngleMax = 6.283185End+ParticleSystem MineEMPFlare+ Priority = CRITICAL+ IsOneShot = No+ Shader = ADDITIVE+ Type = PARTICLE+ ParticleName = EXLnzFlar2.tga+ AngleZ = 0.00 0.00+ AngularRateZ = 0.00 0.00+ AngularDamping = 1.00 1.00+ VelocityDamping = 1.00 1.00+ Gravity = 0.00+ Lifetime = 8.00 8.00+ SystemLifetime = 1+ Size = 20.00 20.00+ StartSizeRate = 0.00 0.00+ SizeRate = 14.00 14.00+ SizeRateDamping = 0.82 0.82+ Alpha1 = 0.00 0.00 0+ Alpha2 = 0.00 0.00 0+ Alpha3 = 0.00 0.00 0+ Alpha4 = 0.00 0.00 0+ Alpha5 = 0.00 0.00 0+ Alpha6 = 0.00 0.00 0+ Alpha7 = 0.00 0.00 0+ Alpha8 = 0.00 0.00 0+ Color1 = R:150 G:180 B:255 0+ Color2 = R:0 G:0 B:0 8+ Color3 = R:0 G:0 B:0 0+ Color4 = R:0 G:0 B:0 0+ Color5 = R:0 G:0 B:0 0+ Color6 = R:0 G:0 B:0 0+ Color7 = R:0 G:0 B:0 0+ Color8 = R:0 G:0 B:0 0+ ColorScale = 0.00 0.00+ BurstDelay = 1.00 1.00+ BurstCount = 1.00 1.00+ InitialDelay = 0.00 0.00+ DriftVelocity = X:0.00 Y:0.00 Z:0.00+ VelocityType = OUTWARD+ VelOutward = 0.00 0.00+ VelOutwardOther = 0.00 0.00+ VolumeType = POINT+ IsHollow = No+ IsGroundAligned = Yes+ IsEmitAboveGroundOnly = No+ IsParticleUpTowardsEmitter = No+ WindMotion = Unused+ WindAngleChangeMin = 0.149924+ WindAngleChangeMax = 0.449946+ WindPingPongStartAngleMin = 0.000000+ WindPingPongStartAngleMax = 0.785398+ WindPingPongEndAngleMin = 5.497787+ WindPingPongEndAngleMax = 6.283185+End+ParticleSystem MineEMPRingPriority = CRITICALIsOneShot = No@@ -3833,7 +3892,7 @@ ParticleSystem MineEMPRingGravity = 0.00Lifetime = 18.00 18.00SystemLifetime = 3- Size = 3.50 3.50+ Size = 6.00 6.00StartSizeRate = 0.00 0.00SizeRate = 1.60 1.60SizeRateDamping = 1.00 1.00@@ -3845,7 +3904,7 @@ ParticleSystem MineEMPRingAlpha6 = 0.00 0.00 0Alpha7 = 0.00 0.00 0Alpha8 = 0.00 0.00 0- Color1 = R:90 G:110 B:255 0+ Color1 = R:100 G:150 B:255 0Color2 = R:0 G:0 B:0 18Color3 = R:0 G:0 B:0 0Color4 = R:0 G:0 B:0 0@@ -3888,7 +3947,7 @@ ParticleSystem MineEMPSparksGravity = 0.00Lifetime = 6.00 6.00SystemLifetime = 24- Size = 2.00 5.00+ Size = 3.00 7.00StartSizeRate = 0.00 0.00SizeRate = 1.00 4.00SizeRateDamping = 1.00 1.00@@ -3900,7 +3959,7 @@ ParticleSystem MineEMPSparksAlpha6 = 0.00 0.00 0Alpha7 = 0.00 0.00 0Alpha8 = 0.00 0.00 0- Color1 = R:150 G:180 B:255 0+ Color1 = R:180 G:210 B:255 0Color2 = R:0 G:0 B:0 6Color3 = R:0 G:0 B:0 0Color4 = R:0 G:0 B:0 0@@ -3910,7 +3969,7 @@ ParticleSystem MineEMPSparksColor8 = R:0 G:0 B:0 0ColorScale = 0.00 0.00BurstDelay = 1.00 3.00- BurstCount = 2.00 5.00+ BurstCount = 4.00 8.00InitialDelay = 0.00 0.00DriftVelocity = X:0.00 Y:0.00 Z:0.00VelocityType = OUTWARDdiff --git a/GeneralsMD/Code/Tools/mine_marks.py b/GeneralsMD/Code/Tools/mine_marks.pyindex dbb3ea430..f3b821736 100644--- a/GeneralsMD/Code/Tools/mine_marks.py+++ b/GeneralsMD/Code/Tools/mine_marks.py@@ -5,7 +5,7 @@ left, and the soil ring fades out into whatever ground it lands on.The arming light over each mine is an LED seen from above: a hard, nearly white core a fifth of thepicture across inside a small glow in the light's colour, red for the standard and cluster mines and-a cold blue-violet for the EMP mines. It is drawn additively, so black is nothing.+a cold sky blue for the EMP mines. It is drawn additively, so black is nothing.python Tools/mine_marks.py # writes Data/Art/Textures/ReforgedMine.tga and ReforgedMineLed*.tga@@ -28,10 +28,10 @@ OUTLINE = 0.035 # a near-black edge round the steel, as a share of the half wiPLATE = 0.70 # radius of the steel, as a share of the half widthSOIL_OUT = 0.98BOLTS = 0.55-LED_CORE = 0.18 # radius of the hard core, as a share of the half width-LED_GLOW = 0.17 # the glow falls off as exp(-(r - core) / this)-LED_GLOW_PEAK = 0.7 # the glow's strength just outside the core, against the core's 1-LEDS = (("Red", (255, 18, 8), (255, 190, 170)), ("Blue", (80, 100, 255), (200, 215, 255)))+LED_CORE = 0.22 # radius of the hard core, as a share of the half width+LED_GLOW = 0.22 # the glow falls off as exp(-(r - core) / this)+LED_GLOW_PEAK = 0.85 # the glow's strength just outside the core, against the core's 1+LEDS = (("Red", (255, 30, 12), (255, 215, 200)), ("Blue", (150, 190, 255), (225, 235, 255)))OUT_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "Data", "Art", "Textures")