Skip to content

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.

feat(data): china mines get an arming led and an earth-column blast

Olcay Seygan8cee9c7a1803
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d0cf83940..3d320e8e8 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. Tank guns fire a hot streak that flies with the shell, a Crusader's, Battlemaster's, Scorpion's, Paladin's or Overlord's muzzle flame and flash are about half as big again, and 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 a small red light blinking over its fuse, violet 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. 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 fifth 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.
- 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.
- Toxin, anthrax and radiation pools lie on the ground. A pool is a carpet of puddle pictures spread up to 140 paces from where the shell or the spray came down, and every one of them was drawn dead flat at the height of that one spot: on a hillside the uphill half of the pool disappeared into the slope and the downhill half hung in the air above it. Each puddle now bends over the ground underneath it, on both renderers, and a pool on a bridge stays on the deck. The pool also holds still. It used to throb twice a second, because every half second the pool's poison fired a fresh batch of puddles that swelled out of black to full green and back to black in two seconds, each batch somewhere new. Now it comes up in half a second, stays one pool at full colour for as long as it does damage, and fades over its last three seconds, or over three seconds from the moment the fog of war closes over it. It is not frozen, though: each puddle fades down and back up on its own beat, so the surface shimmers like something liquid while the pool as a whole never pulses. Four Scud warheads landing on one spot used to stack into a white-hot blotch in the middle; overlapping pools now share their light and the middle stays toxin green. The ground under it takes on its colour, green for toxin and the anthrax colours for anthrax, so it looks spilled rather than shone onto the grass. China's radiation keeps its orange but glows instead of browning the grass, which made it look like a scorch mark, and small bubbles swell out of it and pop. A nuke's radiation lies on the hillside as a pool from three seconds after the blast, where its first ten seconds used to be flat squares cutting into the slope.
- A Scud Storm or a carpet bomb shakes the screen as hard as it should. The game cut a pile of heavy shakes back to a mild one, so a run of missiles or bombs landing together shook less than one of them alone. Each now shakes a step lighter and the run builds up. Demo traps and Aurora bombs shake now, and a falling building shakes harder the bigger it was.
diff --git a/GeneralsMD/Code/BuildFingerprint.manifest b/GeneralsMD/Code/BuildFingerprint.manifest
index c01057f67..240302c62 100644
--- a/GeneralsMD/Code/BuildFingerprint.manifest
+++ b/GeneralsMD/Code/BuildFingerprint.manifest
@@ -11,6 +11,8 @@ Data/Art/Textures/ReforgedBarGLALeft.tga
Data/Art/Textures/ReforgedBarGLARight.tga
Data/Art/Textures/ReforgedLaserPink.tga
Data/Art/Textures/ReforgedMine.tga
+Data/Art/Textures/ReforgedMineLedBlue.tga
+Data/Art/Textures/ReforgedMineLedRed.tga
Data/Art/Textures/ReforgedOrders.tga
Data/Art/Textures/ReforgedSignalAttack.tga
Data/Art/Textures/ReforgedSignalDefend.tga
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedBlue.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedBlue.tga
new file mode 100644
index 000000000..11ead2ae1
Binary files /dev/null and b/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedBlue.tga differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedRed.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedRed.tga
new file mode 100644
index 000000000..67afa2f37
Binary files /dev/null and b/GeneralsMD/Code/Data/Art/Textures/ReforgedMineLedRed.tga differ
diff --git a/GeneralsMD/Code/Data/INI/FXListReforged.ini b/GeneralsMD/Code/Data/INI/FXListReforged.ini
index 81a3b5b8a..41fd21dc0 100644
--- a/GeneralsMD/Code/Data/INI/FXListReforged.ini
+++ b/GeneralsMD/Code/Data/INI/FXListReforged.ini
@@ -1200,29 +1200,80 @@ FXList WeaponFX_StingerMissileDetonation
End
; ----------------------------------------------
+; The standard and cluster mines' blast, and the EMP mine's (NeutronMineWeapon's FireFX). EA's was a
+; pale spray of specks and one thin puff; the column of earth, the clods and the low dark smoke are
+; in ParticleSystemReforged.ini beside the mines themselves. The EMP mine keeps its white flare and
+; adds a blue ring and a crackle of blue sparks, with a blue light where the others light orange.
FXList WeaponFX_MineDetonation
Sound
Name = MineExplosion
End
ParticleSystem
- Name = MineDebris
+ Name = MineFlash
+ Offset = X:0.0 Y:0.0 Z:1.0
End
ParticleSystem
- Name = MineSmoke
+ Name = MineBlastColumn
+ End
+ ParticleSystem
+ Name = MineBlastClods
+ End
+ ParticleSystem
+ Name = MineBlastSmoke
+ End
+ TerrainScorch
+ Type = RANDOM
+ Radius = 15
+ End
+ ViewShake
+ Type = SUBTLE
+ End
+ LightPulse
+ Color = R:255 G:150 B:70
+ Radius = 85
+ IncreaseTime = 0
+ DecreaseTime = 450
+ End
+End
+
+; ----------------------------------------------
+FXList Neutron_WeaponFX_Mine
+ Sound
+ Name = MineExplosion
End
ParticleSystem
Name = MineFlash
Offset = X:0.0 Y:0.0 Z:1.0
End
- ; ParticleSystem
- ;Name = SparksSmall
- ;End
+ ParticleSystem
+ Name = NeutronFlare
+ End
+ ParticleSystem
+ Name = MineBlastColumn
+ End
+ ParticleSystem
+ Name = MineBlastClods
+ End
+ ParticleSystem
+ Name = MineBlastSmoke
+ End
+ ParticleSystem
+ Name = MineEMPRing
+ Offset = X:0.0 Y:0.0 Z:0.5
+ End
+ ParticleSystem
+ Name = MineEMPSparks
+ Offset = X:0.0 Y:0.0 Z:1.0
+ End
TerrainScorch
- Type = RANDOM
+ Type = RANDOM
Radius = 15
End
+ ViewShake
+ Type = SUBTLE
+ End
LightPulse
- Color = R:255 G:150 B:70
+ Color = R:110 G:130 B:255
Radius = 85
IncreaseTime = 0
DecreaseTime = 450
diff --git a/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini b/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini
index e5cc577b0..8650a2df1 100644
--- a/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini
+++ b/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini
@@ -3401,10 +3401,12 @@ End
; China's mine fields. EXAMineGroup has eight mine bones and no mesh at all, so EA's field was a
; 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 six and a half across, laid flat on the bone at a random turn, with a light
-; about five across (the slave's Size scales the plate's) that blinks above its middle,
-; red on the standard and cluster mines and blue-violet on the EMP mines. At five across with a light
-; under two, the plate was a grey speck among the ballast at play zoom and the blink was lost.
+; 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,
+; three across (the slave's Size scales the plate's). It comes on at full strength, holds for five
+; 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.
;
; The systems hang off the field's model, so they keep its stealth: the owner and his allies see
; them, an enemy only while the field is detected. A plate lives two seconds and the next is laid
@@ -3417,15 +3419,15 @@ ParticleSystem MineFXLight
IsOneShot = No
Shader = ADDITIVE
Type = PARTICLE
- ParticleName = EXLnzFlar6.tga
+ ParticleName = ReforgedMineLedRed.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 = 24.00 24.00
+ Lifetime = 8.00 8.00
SystemLifetime = 0
- Size = 0.80 0.80
+ Size = 0.60 0.60
StartSizeRate = 0.00 0.00
SizeRate = 0.00 0.00
SizeRateDamping = 1.00 1.00
@@ -3437,9 +3439,9 @@ ParticleSystem MineFXLight
Alpha6 = 0.00 0.00 0
Alpha7 = 0.00 0.00 0
Alpha8 = 0.00 0.00 0
- Color1 = R:255 G:40 B:20 0
- Color2 = R:255 G:40 B:20 12
- Color3 = R:0 G:0 B:0 24
+ Color1 = R:255 G:255 B:255 0
+ Color2 = R:255 G:255 B:255 5
+ Color3 = R:0 G:0 B:0 7
Color4 = R:0 G:0 B:0 0
Color5 = R:0 G:0 B:0 0
Color6 = R:0 G:0 B:0 0
@@ -3472,15 +3474,15 @@ ParticleSystem MineFXLightPurple
IsOneShot = No
Shader = ADDITIVE
Type = PARTICLE
- ParticleName = EXLnzFlar6.tga
+ ParticleName = ReforgedMineLedBlue.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 = 24.00 24.00
+ Lifetime = 8.00 8.00
SystemLifetime = 0
- Size = 0.80 0.80
+ Size = 0.60 0.60
StartSizeRate = 0.00 0.00
SizeRate = 0.00 0.00
SizeRateDamping = 1.00 1.00
@@ -3492,9 +3494,9 @@ ParticleSystem MineFXLightPurple
Alpha6 = 0.00 0.00 0
Alpha7 = 0.00 0.00 0
Alpha8 = 0.00 0.00 0
- Color1 = R:140 G:90 B:255 0
- Color2 = R:140 G:90 B:255 12
- Color3 = R:0 G:0 B:0 24
+ Color1 = R:255 G:255 B:255 0
+ Color2 = R:255 G:255 B:255 5
+ Color3 = R:0 G:0 B:0 7
Color4 = R:0 G:0 B:0 0
Color5 = R:0 G:0 B:0 0
Color6 = R:0 G:0 B:0 0
@@ -3535,7 +3537,7 @@ ParticleSystem MineFX
Gravity = 0.00
Lifetime = 60.00 60.00
SystemLifetime = 0
- Size = 6.50 6.50
+ Size = 5.00 5.00
StartSizeRate = 0.00 0.00
SizeRate = 0.00 0.00
SizeRateDamping = 1.00 1.00
@@ -3592,7 +3594,7 @@ ParticleSystem MineFXPurple
Gravity = 0.00
Lifetime = 60.00 60.00
SystemLifetime = 0
- Size = 6.50 6.50
+ Size = 5.00 5.00
StartSizeRate = 0.00 0.00
SizeRate = 0.00 0.00
SizeRateDamping = 1.00 1.00
@@ -3636,6 +3638,299 @@ ParticleSystem MineFXPurple
SlavePosOffset = X:0.00 Y:0.00 Z:0.60
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.
+
+ParticleSystem MineBlastColumn
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ALPHA
+ Type = PARTICLE
+ ParticleName = EXDirtDebrisBig.tga
+ AngleZ = 0.00 6.28
+ AngularRateZ = -0.02 0.02
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 0.97 0.97
+ Gravity = -0.12
+ Lifetime = 40.00 55.00
+ SystemLifetime = 1
+ Size = 4.00 7.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 0.25 0.25
+ SizeRateDamping = 0.97 0.97
+ Alpha1 = 1.00 1.00 0
+ Alpha2 = 0.90 0.90 20
+ Alpha3 = 0.00 0.00 55
+ 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:70 G:55 B:35 0
+ Color2 = R:0 G:0 B:0 0
+ 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 = 0.00 0.00
+ BurstCount = 14.00 18.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.00
+ VelocityType = ORTHO
+ VelOrthoX = -0.35 0.35
+ VelOrthoY = -0.35 0.35
+ VelOrthoZ = 2.00 3.00
+ VolumeType = CYLINDER
+ VolCylinderRadius = 1.50
+ VolCylinderLength = 0.00
+ IsHollow = No
+ IsGroundAligned = No
+ 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 MineBlastClods
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ALPHA
+ Type = PARTICLE
+ ParticleName = EXDrtExp01.tga
+ AngleZ = 0.00 6.28
+ AngularRateZ = -0.30 0.30
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 0.99 0.99
+ Gravity = -0.35
+ Lifetime = 30.00 40.00
+ SystemLifetime = 1
+ Size = 0.60 1.40
+ StartSizeRate = 0.00 0.00
+ SizeRate = 0.00 0.00
+ SizeRateDamping = 1.00 1.00
+ Alpha1 = 1.00 1.00 0
+ Alpha2 = 1.00 1.00 30
+ Alpha3 = 0.00 0.00 40
+ 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:55 G:45 B:30 0
+ Color2 = R:0 G:0 B:0 0
+ 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 = 0.00 0.00
+ BurstCount = 24.00 32.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.00
+ VelocityType = ORTHO
+ VelOrthoX = -1.20 1.20
+ VelOrthoY = -1.20 1.20
+ VelOrthoZ = 2.00 4.00
+ VolumeType = CYLINDER
+ VolCylinderRadius = 1.50
+ VolCylinderLength = 0.00
+ IsHollow = No
+ IsGroundAligned = No
+ 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 MineBlastSmoke
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ALPHA
+ Type = PARTICLE
+ ParticleName = EXSmokePuff.tga
+ AngleZ = 0.00 6.28
+ AngularRateZ = -0.01 0.01
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 0.97 0.97
+ Gravity = 0.00
+ Lifetime = 110.00 140.00
+ SystemLifetime = 20
+ Size = 5.00 8.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 0.18 0.18
+ SizeRateDamping = 0.98 0.98
+ Alpha1 = 0.00 0.00 0
+ Alpha2 = 0.60 0.60 8
+ Alpha3 = 0.00 0.00 140
+ 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:45 G:40 B:36 0
+ Color2 = R:0 G:0 B:0 0
+ 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 = 3.00 3.00
+ BurstCount = 1.00 2.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.30
+ VelocityType = ORTHO
+ VelOrthoX = -0.15 0.15
+ VelOrthoY = -0.15 0.15
+ VelOrthoZ = 0.20 0.50
+ VolumeType = CYLINDER
+ VolCylinderRadius = 2.00
+ VolCylinderLength = 0.00
+ IsHollow = No
+ IsGroundAligned = No
+ 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 MineEMPRing
+ Priority = CRITICAL
+ IsOneShot = No
+ Shader = ADDITIVE
+ Type = PARTICLE
+ ParticleName = EXEMPRing.tga
+ AngleZ = 0.00 6.28
+ AngularRateZ = 0.00 0.00
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 1.00 1.00
+ Gravity = 0.00
+ Lifetime = 18.00 18.00
+ SystemLifetime = 3
+ Size = 2.00 2.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 1.60 1.60
+ SizeRateDamping = 1.00 1.00
+ Alpha1 = 1.00 1.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:90 G:110 B:255 0
+ Color2 = R:0 G:0 B:0 18
+ 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 = 2.00 2.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 MineEMPSparks
+ Priority = WEAPON_EXPLOSION
+ IsOneShot = No
+ Shader = ADDITIVE
+ Type = PARTICLE
+ ParticleName = EXSpark01.tga
+ AngleZ = 0.00 6.28
+ AngularRateZ = 0.00 0.00
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 1.00 1.00
+ Gravity = 0.00
+ Lifetime = 6.00 6.00
+ SystemLifetime = 24
+ Size = 2.00 5.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = 1.00 4.00
+ SizeRateDamping = 1.00 1.00
+ Alpha1 = 1.00 1.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 6
+ 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 3.00
+ BurstCount = 2.00 5.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 = CYLINDER
+ VolCylinderRadius = 6.00
+ VolCylinderLength = 3.00
+ IsHollow = No
+ IsGroundAligned = No
+ 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
+
; Gunfire that reads at play zoom. EA's machine gun flash was a 10-unit flare gone in two frames,
; and the tank's flame started half a unit across; at the default camera both were a few pixels.
; These are EA's muzzle systems at about one and a half times the size, the machine gun flare held
diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cpp
index a308b72ef..47e267599 100644
--- a/GeneralsMD/Code/Tests/test_gameengine.cpp
+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp
@@ -883,7 +883,7 @@ TEST(fxlist_reforged_ini_parses_and_keeps_its_light)
}
fclose( fp );
- CHECK_EQ( blocks, 126 );
+ CHECK_EQ( blocks, 127 );
CHECK_EQ( lit, blocks );
}
diff --git a/GeneralsMD/Code/Tools/mine_marks.py b/GeneralsMD/Code/Tools/mine_marks.py
index 26d2a623c..cf6429c95 100644
--- a/GeneralsMD/Code/Tools/mine_marks.py
+++ b/GeneralsMD/Code/Tools/mine_marks.py
@@ -3,7 +3,11 @@ of disturbed earth. The game lays it flat on the ground at each of a mine field
(ParticleSystemReforged.ini, MineFX and MineFXPurple), so it is shaded here once, lit from the top
left, and the soil ring fades out into whatever ground it lands on.
- python Tools/mine_marks.py # writes Data/Art/Textures/ReforgedMine.tga
+The arming light over each mine is an LED seen from above: a hard, nearly white core a fifth of the
+picture 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.
+
+ python Tools/mine_marks.py # writes Data/Art/Textures/ReforgedMine.tga and ReforgedMineLed*.tga
Drawn four times too big and brought down, which is the antialiasing."""
import math
@@ -23,6 +27,10 @@ SOIL_ALPHA = 0.7
PLATE = 0.70 # radius of the steel, as a share of the half width
SOIL_OUT = 0.98
BOLTS = 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)))
OUT_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "Data", "Art", "Textures")
@@ -79,6 +87,27 @@ def main():
path = os.path.join(out_folder, "ReforgedMine.tga")
image.resize((SHIPPED, SHIPPED), Image.LANCZOS).save(path)
print(path)
+ for name, glow, core in LEDS:
+ path = os.path.join(out_folder, "ReforgedMineLed%s.tga" % name)
+ led(glow, core).resize((SHIPPED, SHIPPED), Image.LANCZOS).save(path)
+ print(path)
+
+
+def led(glow, core):
+ image = Image.new("RGBA", (DRAWN, DRAWN))
+ pixels = image.load()
+ for py in range(DRAWN):
+ y = (py - CENTRE) / CENTRE
+ for px in range(DRAWN):
+ x = (px - CENTRE) / CENTRE
+ r = math.hypot(x, y)
+ if r < LED_CORE:
+ colour = core
+ else:
+ strength = LED_GLOW_PEAK * math.exp(-(r - LED_CORE) / LED_GLOW) * (1.0 - ramp(0.8, 1.0, r))
+ colour = tuple(int(c * strength) for c in glow)
+ pixels[px, py] = colour + (max(colour),)
+ return image
if __name__ == "__main__":