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): mine light offsets on their own systems, darker sunk plate
Olcay Seyganc9ccfeb77647
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedMine.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedMine.tgaindex 8e9b7b976..34d2174e1 100644Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedMine.tga and b/GeneralsMD/Code/Data/Art/Textures/ReforgedMine.tga differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedMineGlowBlue.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedMineGlowBlue.tgaindex fd731b8f6..789763bd4 100644Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedMineGlowBlue.tga and b/GeneralsMD/Code/Data/Art/Textures/ReforgedMineGlowBlue.tga differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedMineGlowRed.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedMineGlowRed.tgaindex 2c8339432..49760ec2f 100644Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedMineGlowRed.tga and b/GeneralsMD/Code/Data/Art/Textures/ReforgedMineGlowRed.tga differdiff --git a/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini b/GeneralsMD/Code/Data/INI/ParticleSystemReforged.iniindex 2fdeee5c2..0b06bc5e7 100644--- a/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini+++ b/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini@@ -3403,23 +3403,26 @@ End; MineFXPurple are the mines themselves now: ReforgedMine.tga (Tools/mine_marks.py), a steel plate; sunk in a ring of dug earth ten across, laid flat on the bone at a random turn, with an arming; light over its cap, red on the standard and cluster mines and blue on the EMP mines. The light is-; two systems. MineFXLight is a dot two and a half across lying flat 1.5 over the plate,+; two systems. MineFXLight is a dot two and a half across lying flat one over the plate,; ReforgedMineLedRed.tga or ReforgedMineLedBlue.tga, a coloured lens with a near-white middle in a; dark bezel, alpha blended so it keeps its colour on grass, sand or snow; a slave's Size scales the; plate's, so 0.25 is a half width of 1.25. MineFXGlow hangs off the dot, a slave of a slave, which-; takes its own Size rather than a scaled one: an additive glow six across facing the camera 3.5 over-; the plate, ReforgedMineGlow*.tga, a white-hot point in a saturated glow. Both sit higher above the-; ground than their own half width, because the soft particle fade thins a sprite over its half width-; wherever the ground is closer behind it than that; the light before this was a 30-across glow 0.6-; over the plate and came out at about a tenth of its colour. The light comes on at full strength,+; takes its own Size rather than a scaled one: an additive glow seven across facing the camera 2.4+; over the plate, ReforgedMineGlow*.tga, a white-hot point in a saturated glow. Each system's own+; SlavePosOffset is where its particles sit over the plate's; the one on the master is never read.+; Both are high enough that the ground behind them along the player's line of sight, which looks down+; at about 39 degrees, is further than their half width, because the soft particle fade thins a+; sprite over its half width wherever the ground is closer behind it than that; the light before+; this was a 30-across glow on the plate and came out at about a tenth of its colour. Higher still+; and the glow parts from the dot on screen. The light comes on at full strength,; holds for eight frames and is gone 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; under it eight frames before it goes, rising while the old one fades out, and the light blinks-; with each new plate. At 85 percent opacity the steel still lets a little ground through, a hint of-; the stealth look a friendly stealthed unit has; three quarters looked pale on rail ballast.+; with each new plate. At 95 percent opacity the steel lets the ground through only faintly; at 85+; it read as a pale translucent disc lying on grass.ParticleSystem MineFXGlowPriority = ALWAYS_RENDER@@ -3427,6 +3430,7 @@ ParticleSystem MineFXGlowShader = ADDITIVEType = PARTICLEParticleName = ReforgedMineGlowRed.tga+ SlavePosOffset = X:0.00 Y:0.00 Z:2.40AngleZ = 0.00 0.00AngularRateZ = 0.00 0.00AngularDamping = 1.00 1.00@@ -3434,7 +3438,7 @@ ParticleSystem MineFXGlowGravity = 0.00Lifetime = 11.00 11.00SystemLifetime = 0- Size = 3.00 3.00+ Size = 3.50 3.50StartSizeRate = 0.00 0.00SizeRate = 0.00 0.00SizeRateDamping = 1.00 1.00@@ -3482,6 +3486,7 @@ ParticleSystem MineFXGlowPurpleShader = ADDITIVEType = PARTICLEParticleName = ReforgedMineGlowBlue.tga+ SlavePosOffset = X:0.00 Y:0.00 Z:2.40AngleZ = 0.00 0.00AngularRateZ = 0.00 0.00AngularDamping = 1.00 1.00@@ -3489,7 +3494,7 @@ ParticleSystem MineFXGlowPurpleGravity = 0.00Lifetime = 11.00 11.00SystemLifetime = 0- Size = 3.00 3.00+ Size = 3.50 3.50StartSizeRate = 0.00 0.00SizeRate = 0.00 0.00SizeRateDamping = 1.00 1.00@@ -3538,7 +3543,7 @@ ParticleSystem MineFXLightType = PARTICLEParticleName = ReforgedMineLedRed.tgaSlaveSystem = MineFXGlow- SlavePosOffset = X:0.00 Y:0.00 Z:3.50+ SlavePosOffset = X:0.00 Y:0.00 Z:1.00AngleZ = 0.00 0.00AngularRateZ = 0.00 0.00AngularDamping = 1.00 1.00@@ -3595,7 +3600,7 @@ ParticleSystem MineFXLightPurpleType = PARTICLEParticleName = ReforgedMineLedBlue.tgaSlaveSystem = MineFXGlowPurple- SlavePosOffset = X:0.00 Y:0.00 Z:3.50+ SlavePosOffset = X:0.00 Y:0.00 Z:1.00AngleZ = 0.00 0.00AngularRateZ = 0.00 0.00AngularDamping = 1.00 1.00@@ -3663,8 +3668,8 @@ ParticleSystem MineFXSizeRate = 0.00 0.00SizeRateDamping = 1.00 1.00Alpha1 = 0.00 0.00 0- Alpha2 = 0.85 0.85 8- Alpha3 = 0.85 0.85 60+ Alpha2 = 0.95 0.95 8+ Alpha3 = 0.95 0.95 60Alpha4 = 0.00 0.00 0Alpha5 = 0.00 0.00 0Alpha6 = 0.00 0.00 0@@ -3699,7 +3704,7 @@ ParticleSystem MineFXWindPingPongEndAngleMin = 5.497787WindPingPongEndAngleMax = 6.283185SlaveSystem = MineFXLight- SlavePosOffset = X:0.00 Y:0.00 Z:1.50+ SlavePosOffset = X:0.00 Y:0.00 Z:0.00EndParticleSystem MineFXPurple@@ -3720,8 +3725,8 @@ ParticleSystem MineFXPurpleSizeRate = 0.00 0.00SizeRateDamping = 1.00 1.00Alpha1 = 0.00 0.00 0- Alpha2 = 0.85 0.85 8- Alpha3 = 0.85 0.85 60+ Alpha2 = 0.95 0.95 8+ Alpha3 = 0.95 0.95 60Alpha4 = 0.00 0.00 0Alpha5 = 0.00 0.00 0Alpha6 = 0.00 0.00 0@@ -3756,7 +3761,7 @@ ParticleSystem MineFXPurpleWindPingPongEndAngleMin = 5.497787WindPingPongEndAngleMax = 6.283185SlaveSystem = MineFXLightPurple- SlavePosOffset = X:0.00 Y:0.00 Z:1.50+ SlavePosOffset = X:0.00 Y:0.00 Z:0.00End; A mine going off under a vehicle (WeaponFX_MineDetonation and Neutron_WeaponFX_Mine indiff --git a/GeneralsMD/Code/Tools/mine_marks.py b/GeneralsMD/Code/Tools/mine_marks.pyindex b1c1466f6..4cfb0c2a3 100644--- a/GeneralsMD/Code/Tools/mine_marks.py+++ b/GeneralsMD/Code/Tools/mine_marks.py@@ -27,11 +27,11 @@ DRAWN = 512SHIPPED = 128CENTRE = (DRAWN - 1) / 2.0LIGHT = (-0.45, -0.55, 0.70) # towards the light: up and to the left in the picture, mostly overhead-STEEL = (64, 68, 54) # olive drab, darker than grey ballast so the plate stands off it+STEEL = (54, 52, 40) # dull olive steel, dark and warm so it does not read as a grey coin on sandSOIL = (26, 20, 14)SOIL_LIT = (70, 58, 42) # dry soil smeared on the steel, before the steel's shadingDIRT = 0.45 # how much of the steel it hides where it is thickest-SOIL_ALPHA = 0.85 # the dark ring is what tells a mine from a stone on grass at the player's camera+SOIL_ALPHA = 0.92 # the dark ring is what tells a mine from a stone on grass at the player's cameraOUTLINE = 0.035 # a near-black edge round the steel, as a share of the half widthPLATE = 0.70 # radius of the steel, as a share of the half widthSOIL_OUT = 0.98@@ -42,7 +42,7 @@ LED_BEZEL_OUT = 0.74 # outer edge of the dark bezel round the lensLED_BEZEL = (10, 8, 8)LED_BEZEL_ALPHA = 0.9GLOW_HOT = 0.12 # the light's white-hot point, as a share of the glow sprite's half width-GLOW_FALL = 0.22 # the glow round it falls off as exp(-(r - hot) / this)+GLOW_FALL = 0.30 # the glow round it falls off as exp(-(r - hot) / this)LEDS = (("Red", (255, 28, 10), (255, 235, 225)), ("Blue", (40, 110, 255), (225, 240, 255)))OUT_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "Data", "Art", "Textures")@@ -57,7 +57,7 @@ def height(x, y):pressure cap in the middle and four bolt heads."""r = math.hypot(x, y)h = 1.0 - ramp(PLATE - 0.08, PLATE, r) # rim bevel down to the soil- h -= 0.25 * (ramp(0.40, 0.42, r) - ramp(0.45, 0.47, r)) # groove round the top+ h -= 0.12 * (ramp(0.40, 0.42, r) - ramp(0.45, 0.47, r)) # groove round the toph += 0.35 * (1.0 - ramp(0.20, 0.25, r)) # pressure capfor k in range(4):angle = math.radians(45 + 90 * k)@@ -112,7 +112,7 @@ def main():pixels[px, py] = colour + (255,)elif r < reach:# darkest in the hollow against the rim, fading out into the ground in clumps- fade = 1.0 - ramp(lip + 0.02, reach, r)+ fade = 1.0 - ramp(lip + 0.10, reach, r)lump = clumps(x, y)alpha = SOIL_ALPHA * fade * min(1.0, 0.75 + 0.35 * lump + 0.1 * noise)hollow = 1.0 - 0.45 * (1.0 - ramp(lip, lip + 0.10, r))