Skip to content

Commit 69e3d6a

Browse files
committed
unify(particlesys): Merge addition of SMUDGE particle type from Zero Hour (TheSuperHackers#2153)
1 parent f832a5d commit 69e3d6a

4 files changed

Lines changed: 23 additions & 3 deletions

File tree

Generals/Code/GameEngine/Include/GameClient/ParticleSys.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ class ParticleSystemInfo : public Snapshot
279279

280280
enum ParticleType
281281
{
282-
INVALID_TYPE=0, PARTICLE, DRAWABLE, STREAK, VOLUME_PARTICLE, ///< is a particle a 2D-screen-facing particle, or a Drawable, or a Segment in a streak?
282+
INVALID_TYPE=0, PARTICLE, DRAWABLE, STREAK, VOLUME_PARTICLE, SMUDGE, ///< is a particle a 2D-screen-facing particle, or a Drawable, or a Segment in a streak?
283283
PARTICLE_TYPE_COUNT
284284
}
285285
m_particleType;
@@ -471,7 +471,7 @@ static_assert(ARRAY_SIZE(ParticleShaderTypeNames) == ParticleSystemInfo::PARTICL
471471

472472
static const char *const ParticleTypeNames[] =
473473
{
474-
"NONE", "PARTICLE", "DRAWABLE", "STREAK", "VOLUME_PARTICLE", nullptr
474+
"NONE", "PARTICLE", "DRAWABLE", "STREAK", "VOLUME_PARTICLE", "SMUDGE", nullptr
475475
};
476476
static_assert(ARRAY_SIZE(ParticleTypeNames) == ParticleSystemInfo::PARTICLE_TYPE_COUNT + 1, "Incorrect array size");
477477

@@ -605,6 +605,7 @@ class ParticleSystem : public MemoryPoolObject,
605605
AsciiString getParticleTypeName( void ) { return m_particleTypeName; } ///< return the name of the particles
606606
Bool isUsingDrawables( void ) { return (m_particleType == DRAWABLE) ? true : false; }
607607
Bool isUsingStreak( void ) { return (m_particleType == STREAK) ? true : false; }
608+
Bool isUsingSmudge( void ) { return (m_particleType == SMUDGE) ? true : false; }
608609
UnsignedInt getVolumeParticleDepth( void ) { return ( m_particleType == VOLUME_PARTICLE ) ? OPTIMUM_VOLUME_PARTICLE_DEPTH : 0; }
609610

610611
Bool shouldBillboard( void ) { return !m_isGroundAligned; }

Generals/Code/Tools/ParticleEditor/ParticleTypePanels.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ void ParticlePanelParticle::InitPanel( void )
7070
bWorkin = finder.FindNextFile();
7171
pWnd->AddString(finder.GetFileName());
7272
}
73+
pWnd->AddString("SMUDGE RESERVED"); //smudges don't use textures so we're hardcoding one to tell them apart.
7374
}
7475

7576
void ParticlePanelParticle::performUpdate( IN Bool toUI )

Generals/Code/Tools/ParticleEditor/Resource.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
** Command & Conquer Generals(tm)
3+
** Copyright 2025 Electronic Arts Inc.
4+
**
5+
** This program is free software: you can redistribute it and/or modify
6+
** it under the terms of the GNU General Public License as published by
7+
** the Free Software Foundation, either version 3 of the License, or
8+
** (at your option) any later version.
9+
**
10+
** This program is distributed in the hope that it will be useful,
11+
** but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
** GNU General Public License for more details.
14+
**
15+
** You should have received a copy of the GNU General Public License
16+
** along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
119
//{{NO_DEPENDENCIES}}
220
// Microsoft Developer Studio generated include file.
321
// Used by ParticleEditor.rc

GeneralsMD/Code/GameEngine/Include/GameClient/ParticleSys.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ static_assert(ARRAY_SIZE(ParticleShaderTypeNames) == ParticleSystemInfo::PARTICL
471471

472472
static const char *const ParticleTypeNames[] =
473473
{
474-
"NONE", "PARTICLE", "DRAWABLE", "STREAK", "VOLUME_PARTICLE","SMUDGE", nullptr
474+
"NONE", "PARTICLE", "DRAWABLE", "STREAK", "VOLUME_PARTICLE", "SMUDGE", nullptr
475475
};
476476
static_assert(ARRAY_SIZE(ParticleTypeNames) == ParticleSystemInfo::PARTICLE_TYPE_COUNT + 1, "Incorrect array size");
477477

0 commit comments

Comments
 (0)