[IFxEffectDef] Prepare efx loading
This commit is contained in:
parent
17a5e53586
commit
566cad6784
@ -2,6 +2,23 @@
|
||||
|
||||
namespace Assets
|
||||
{
|
||||
void IFxEffectDef::load(Game::XAssetHeader* /*header*/, std::string /*name*/, Components::ZoneBuilder::Zone* /*builder*/)
|
||||
{
|
||||
// TODO:
|
||||
// - Add the missing Editor-structures (FxEditorEffectDef, FxEditorElemDef, ...)
|
||||
// - Initialize a parse session for the FX
|
||||
// - Correctly load the FX by parsing each token
|
||||
// - Convert the Editor-structures to the native ones
|
||||
|
||||
if (0)
|
||||
{
|
||||
for (int i = 0; i < FX_ELEM_FIELD_COUNT; ++i)
|
||||
{
|
||||
Game::s_elemFields[i].handler(nullptr, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IFxEffectDef::markFxElemVisuals(Game::FxElemVisuals* visuals, char elemType, Components::ZoneBuilder::Zone* builder)
|
||||
{
|
||||
switch (elemType)
|
||||
|
@ -7,6 +7,7 @@ namespace Assets
|
||||
|
||||
virtual void save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder) override;
|
||||
virtual void mark(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder) override;
|
||||
virtual void load(Game::XAssetHeader* header, std::string name, Components::ZoneBuilder::Zone* builder) override;
|
||||
|
||||
private:
|
||||
void markFxElemVisuals(Game::FxElemVisuals* visuals, char elemType, Components::ZoneBuilder::Zone* builder);
|
||||
|
@ -311,6 +311,8 @@ namespace Game
|
||||
Game::MaterialPass** varMaterialPass = (Game::MaterialPass**)0x112A960;
|
||||
snd_alias_list_t*** varsnd_alias_list_name = (snd_alias_list_t***)0x112AF38;
|
||||
|
||||
FxElemField* s_elemFields = (FxElemField*)0x73B848;
|
||||
|
||||
XAssetHeader ReallocateAssetPool(XAssetType type, unsigned int newSize)
|
||||
{
|
||||
int elSize = DB_GetXAssetSizeHandlers[type]();
|
||||
|
@ -628,6 +628,8 @@ namespace Game
|
||||
extern Game::MaterialPass** varMaterialPass;
|
||||
extern snd_alias_list_t*** varsnd_alias_list_name;
|
||||
|
||||
extern FxElemField* s_elemFields;
|
||||
|
||||
XAssetHeader ReallocateAssetPool(XAssetType type, unsigned int newSize);
|
||||
void Menu_FreeItemMemory(Game::itemDef_t* item);
|
||||
const char* TableLookup(StringTable* stringtable, int row, int column);
|
||||
|
@ -1847,7 +1847,6 @@ namespace Game
|
||||
// 88 - 0x58
|
||||
};
|
||||
|
||||
|
||||
/* FxEffectDef::flags */
|
||||
#define FX_ELEM_LOOPING 0x1
|
||||
#define FX_ELEM_USE_RAND_COLOR 0x2
|
||||
@ -1867,8 +1866,8 @@ namespace Game
|
||||
#define FX_ELEM_PLAY_ON_RUN 0x8000
|
||||
#define FX_ELEM_BOUNDING_SPHERE 0x10000
|
||||
#define FX_ELEM_USE_ITEM_CLIP 0x20000
|
||||
#define FX_ELEM_DISABLED 0x80000000
|
||||
#define FX_ELEM_DECAL_FADE_IN 0x40000
|
||||
#define FX_ELEM_DISABLED 0x80000000
|
||||
|
||||
/* FxElemDef::flags */
|
||||
#define FX_ELEM_SPAWN_RELATIVE_TO_EFFECT 0x2
|
||||
@ -1931,6 +1930,19 @@ namespace Game
|
||||
FX_ELEM_TYPE_LAST_DRAWN = 0x9,
|
||||
};
|
||||
|
||||
#define FX_ELEM_FIELD_COUNT 90
|
||||
|
||||
struct FxEditorElemDef
|
||||
{
|
||||
// Uh...
|
||||
};
|
||||
|
||||
struct FxElemField
|
||||
{
|
||||
const char *keyName;
|
||||
bool(__cdecl *handler)(const char**, FxEditorElemDef*);
|
||||
};
|
||||
|
||||
struct FxElemVec3Range
|
||||
{
|
||||
float base[3];
|
||||
|
Loading…
Reference in New Issue
Block a user