Merge pull request #647 from Fire-Head/miami

miami CParticleObject
This commit is contained in:
aap 2020-07-04 21:24:17 +02:00 committed by GitHub
commit 0acade08ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 444 additions and 458 deletions

View file

@ -590,7 +590,8 @@ void CGame::ShutDownForRestart(void)
CStreaming::ms_disableStreaming = false; CStreaming::ms_disableStreaming = false;
CRadar::RemoveRadarSections(); CRadar::RemoveRadarSections();
FrontEndMenuManager.UnloadTextures(); FrontEndMenuManager.UnloadTextures();
CParticleObject::RemoveAllParticleObjects(); CParticleObject::RemoveAllExpireableParticleObjects();
//CWaterCreatures::RemoveAll(); //TODO VC
CSetPieces::Init(); CSetPieces::Init();
CPedType::Shutdown(); CPedType::Shutdown();
CSpecialFX::Shutdown(); CSpecialFX::Shutdown();

View file

@ -686,15 +686,12 @@ CEntity::AddSteamsFromGround(CVector *unused)
case 4: case 4:
CParticleObject::AddObject(POBJECT_DARK_SMOKE, pos, effect->particle.dir, effect->particle.scale, false); CParticleObject::AddObject(POBJECT_DARK_SMOKE, pos, effect->particle.dir, effect->particle.scale, false);
break; break;
// TODO(MIAMI): enable this once we have the particle objects
/*
case 5: case 5:
CParticleObject::AddObject(POBJECT_WATER_FOUNTAIN_VERT, pos, effect->particle.dir, effect->particle.scale, false); CParticleObject::AddObject(POBJECT_WATER_FOUNTAIN_VERT, pos, effect->particle.dir, effect->particle.scale, false);
break; break;
case 6: case 6:
CParticleObject::AddObject(POBJECT_WATER_FOUNTAIN_HORIZ, pos, effect->particle.dir, effect->particle.scale, false); CParticleObject::AddObject(POBJECT_WATER_FOUNTAIN_HORIZ, pos, effect->particle.dir, effect->particle.scale, false);
break; break;
*/
} }
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -4,12 +4,12 @@
#include "ParticleType.h" #include "ParticleType.h"
#include "Placeable.h" #include "Placeable.h"
#define MAX_PARTICLEOBJECTS 100 #define MAX_PARTICLEOBJECTS 70
#define MAX_AUDIOHYDRANTS 8 #define MAX_AUDIOHYDRANTS 8
enum eParticleObjectType enum eParticleObjectType
{ {
POBJECT_PAVEMENT_STEAM, POBJECT_PAVEMENT_STEAM = 0,
POBJECT_PAVEMENT_STEAM_SLOWMOTION, POBJECT_PAVEMENT_STEAM_SLOWMOTION,
POBJECT_WALL_STEAM, POBJECT_WALL_STEAM,
POBJECT_WALL_STEAM_SLOWMOTION, POBJECT_WALL_STEAM_SLOWMOTION,
@ -22,6 +22,8 @@ enum eParticleObjectType
POBJECT_BIG_FIRE, POBJECT_BIG_FIRE,
POBJECT_DRY_ICE, POBJECT_DRY_ICE,
POBJECT_DRY_ICE_SLOWMOTION, POBJECT_DRY_ICE_SLOWMOTION,
POBJECT_WATER_FOUNTAIN_VERT,
POBJECT_WATER_FOUNTAIN_HORIZ,
POBJECT_FIRE_TRAIL, POBJECT_FIRE_TRAIL,
POBJECT_SMOKE_TRAIL, POBJECT_SMOKE_TRAIL,
POBJECT_FIREBALL_AND_SMOKE, POBJECT_FIREBALL_AND_SMOKE,
@ -69,12 +71,13 @@ public:
~CParticleObject(); ~CParticleObject();
static void Initialise(void); static void Initialise(void);
static CParticleObject *AddObject(uint16 type, CVector const &pos, uint8 remove); static CParticleObject *AddObject(uint16 type, CVector const &pos, uint8 remove);
static CParticleObject *AddObject(uint16 type, CVector const &pos, float size, uint8 remove); static CParticleObject *AddObject(uint16 type, CVector const &pos, float size, uint8 remove);
static CParticleObject *AddObject(uint16 type, CVector const &pos, CVector const &target, float size, uint8 remove); static CParticleObject *AddObject(uint16 type, CVector const &pos, CVector const &target, float size, uint8 remove);
static CParticleObject *AddObject(uint16 type, CVector const &pos, CVector const &target, float size, uint32 lifeTime, RwRGBA const &color, uint8 remove); static CParticleObject *AddObject(uint16 type, CVector const &pos, CVector const &target, float size, uint32 lifeTime, RwRGBA const &color, uint8 remove);
static CParticleObject *AddObject(tParticleType type, CVector const &pos, CVector const &target, float size, uint32 lifeTime, uint8 numEffectCycles, uint8 skipFrames, uint16 creationChance, uint8 remove);
void RemoveObject(void); void RemoveObject(void);
static void UpdateAll(void); static void UpdateAll(void);
@ -84,6 +87,7 @@ public:
static bool SaveParticle(uint8 *buffer, uint32 *length); static bool SaveParticle(uint8 *buffer, uint32 *length);
static bool LoadParticle(uint8 *buffer, uint32 length); static bool LoadParticle(uint8 *buffer, uint32 length);
static void RemoveAllExpireableParticleObjects(void);
static void RemoveAllParticleObjects(void); static void RemoveAllParticleObjects(void);
static void MoveToList(CParticleObject **from, CParticleObject **to, CParticleObject *obj); static void MoveToList(CParticleObject **from, CParticleObject **to, CParticleObject *obj);
}; };
@ -98,7 +102,7 @@ public:
CAudioHydrant() : CAudioHydrant() :
AudioEntity(AEHANDLE_NONE), AudioEntity(AEHANDLE_NONE),
pParticleObject(NULL) pParticleObject(nil)
{ } { }
static bool Add (CParticleObject *particleobject); static bool Add (CParticleObject *particleobject);