2016-04-13 06:07:23 +00:00
|
|
|
#ifndef __URDE_CCOLLISIONRESPONSEDATA_HPP__
|
|
|
|
#define __URDE_CCOLLISIONRESPONSEDATA_HPP__
|
2016-02-13 19:05:59 +00:00
|
|
|
|
|
|
|
#include "RetroTypes.hpp"
|
2016-07-25 06:24:57 +00:00
|
|
|
#include "Collision/CMaterialList.hpp"
|
2016-03-31 00:38:03 +00:00
|
|
|
#include "CFactoryMgr.hpp"
|
2016-02-13 19:05:59 +00:00
|
|
|
#include "IObj.hpp"
|
|
|
|
#include "CToken.hpp"
|
|
|
|
#include "IOStreams.hpp"
|
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2016-02-13 19:05:59 +00:00
|
|
|
{
|
|
|
|
class CSimplePool;
|
2016-02-16 07:01:55 +00:00
|
|
|
class CGenDescription;
|
|
|
|
class CDecalDescription;
|
|
|
|
|
|
|
|
enum class EWeaponCollisionResponseTypes
|
|
|
|
{
|
2016-07-25 06:24:57 +00:00
|
|
|
None, Default, Unknown2, Metal,
|
|
|
|
Grass, Ice, Goo, Wood,
|
|
|
|
Water, Mud, Lava, Sand,
|
2018-02-12 05:30:21 +00:00
|
|
|
Projectile,OtherProjectile,Unknown14,Unknown15,
|
2016-07-25 06:24:57 +00:00
|
|
|
EnemyNormal,EnemySpecial,EnemyShielded,Unknown19,
|
2016-04-27 19:59:38 +00:00
|
|
|
Unknown20,Unknown21,Unknown22,Unknown23,
|
|
|
|
Unknown24,Unknown25,Unknown26,Unknown27,
|
|
|
|
Unknown28,Unknown29,Unknown30,Unknown31,
|
|
|
|
Unknown32,Unknown33,Unknown34,Unknown35,
|
|
|
|
Unknown36,Unknown37,Unknown38,Unknown39,
|
|
|
|
Unknown40,Unknown41,Unknown42,Unknown43,
|
|
|
|
Unknown44,Unknown45,Unknown46,Unknown47,
|
|
|
|
Unknown48,Unknown49,Unknown50,Unknown51,
|
|
|
|
Unknown52,Unknown53,Unknown54,Unknown55,
|
|
|
|
Unknown56,Unknown57,Unknown58,Unknown59,
|
|
|
|
Unknown60,Unknown61,Unknown62,Unknown63,
|
|
|
|
Unknown64,Unknown65,Unknown66,Unknown67,
|
|
|
|
Unknown68,Unknown69,Unknown70,Unknown71,
|
|
|
|
Unknown72,Unknown73,Unknown74,Unknown75,
|
|
|
|
Unknown76,Unknown77,Unknown78,Unknown79,
|
|
|
|
Unknown80,Unknown81,Unknown82,Unknown83,
|
|
|
|
Unknown84,Unknown85,Unknown86,Unknown87,
|
|
|
|
Unknown88,Unknown89,Unknown90,Unknown91,
|
2016-07-25 06:24:57 +00:00
|
|
|
Unknown92,Unknown93
|
2016-02-16 07:01:55 +00:00
|
|
|
};
|
2016-02-13 19:05:59 +00:00
|
|
|
|
|
|
|
class CCollisionResponseData
|
|
|
|
{
|
2016-07-25 06:24:57 +00:00
|
|
|
static const EWeaponCollisionResponseTypes skWorldMaterialTable[32];
|
|
|
|
static const s32 kInvalidSFX;
|
|
|
|
std::vector<rstl::optional_object<TLockedToken<CGenDescription>>> x0_generators;
|
|
|
|
std::vector<s32> x10_sfx;
|
|
|
|
std::vector<rstl::optional_object<TLockedToken<CDecalDescription>>> x20_decals;
|
2016-02-16 07:01:55 +00:00
|
|
|
float x30_RNGE;
|
|
|
|
float x34_FOFF;
|
|
|
|
|
|
|
|
void AddParticleSystemToResponse(EWeaponCollisionResponseTypes type, CInputStream& in, CSimplePool* resPool);
|
|
|
|
bool CheckAndAddDecalToResponse(FourCC clsId, CInputStream& in, CSimplePool* resPool);
|
|
|
|
bool CheckAndAddSoundFXToResponse(FourCC clsId, CInputStream& in);
|
|
|
|
bool CheckAndAddParticleSystemToResponse(FourCC clsId, CInputStream& in, CSimplePool* resPool);
|
|
|
|
bool CheckAndAddResourceToResponse(FourCC clsId, CInputStream& in, CSimplePool* resPool);
|
2016-02-13 19:05:59 +00:00
|
|
|
public:
|
|
|
|
CCollisionResponseData(CInputStream& in, CSimplePool* resPool);
|
2016-07-25 06:24:57 +00:00
|
|
|
const rstl::optional_object<TLockedToken<CGenDescription>>& GetParticleDescription(EWeaponCollisionResponseTypes) const;
|
|
|
|
const rstl::optional_object<TLockedToken<CDecalDescription>>& GetDecalDescription(EWeaponCollisionResponseTypes type) const;
|
|
|
|
s32 GetSoundEffectId(EWeaponCollisionResponseTypes) const;
|
2018-02-11 05:27:00 +00:00
|
|
|
static EWeaponCollisionResponseTypes GetWorldCollisionResponseType(s32);
|
2016-07-25 06:24:57 +00:00
|
|
|
static bool ResponseTypeIsEnemyShielded(EWeaponCollisionResponseTypes);
|
|
|
|
static bool ResponseTypeIsEnemyNormal(EWeaponCollisionResponseTypes);
|
|
|
|
static bool ResponseTypeIsEnemySpecial(EWeaponCollisionResponseTypes);
|
|
|
|
float GetAudibleRange() const { return x30_RNGE; }
|
|
|
|
float GetAudibleFallOff() const { return x34_FOFF; }
|
|
|
|
static FourCC UncookedResType();
|
2016-02-13 19:05:59 +00:00
|
|
|
};
|
|
|
|
|
2017-02-13 21:29:00 +00:00
|
|
|
CFactoryFnReturn FCollisionResponseDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms,
|
|
|
|
CObjectReference*);
|
2016-02-13 19:05:59 +00:00
|
|
|
}
|
|
|
|
|
2016-04-13 06:07:23 +00:00
|
|
|
#endif // __URDE_CCOLLISIONRESPONSEDATA_HPP__
|