mirror of
https://github.com/zeldaret/ss
synced 2026-08-12 20:02:26 -04:00
9c3c480b24
* g3d_calcvtx GetData seems to have changed -> dwarf says r is a local and using ofs_to_ptr didnt work * g3d_light and g3d_fog sdata2 splits and func ordering * g3d_scnproc * g3d_init * g3d_scnmdl * g3d_scnmdlsmpl * g3d_scnroot * g3d_scnobj * g3d_res* progress * g3d_resmdl OK * g3d_restev OK * g3d_resmat OK * g3d_resvtx and g3d_restex OK * g3d_resnode OK * g3d_resanm OK * g3d_resanmchr Progress * the rest of g3d_res* OK * g3d_anmvis OK * g3d_anmclr OK * Some Splitting * more OK, Inline Issue in g3d_anmtexsrt * g3d_obj, g3d_anmobj, g3d_gpu, g3d_tmem, g3d_cpu OK * g3d_state OK * g3d/dcc OK * Include fixup * More Fixups * g3d_camera OK * g3d_draw OK * g3d_calcworld OK * g3d_calcworld actually OK * g3d_workmem, g3d_dcc OK * g3d_calcview OK * g3d_anmtexsrt OK with DONT_INLINE * g3d_transform OK (Feels Cheaty) * g3d_resanmchr OK * g3d_draw1mat1shp Close * g3d_draw1mat1shp OK (Thanks Lago!). Ran symbol applying script
86 lines
2.1 KiB
C++
86 lines
2.1 KiB
C++
#ifndef NW4R_G3D_RES_RES_ANM_VIS_H
|
|
#define NW4R_G3D_RES_RES_ANM_VIS_H
|
|
|
|
/** NOTICE: Revision change from 3->4. Structures, Enums, and/or Functions may have changed and not yet done so
|
|
* (Zeldex72, Feb 1, 2025) */
|
|
|
|
#include <nw4r/types_nw4r.h>
|
|
|
|
#include "nw4r/g3d/res/g3d_resanm.h"
|
|
#include "nw4r/g3d/res/g3d_rescommon.h"
|
|
#include "nw4r/g3d/res/g3d_resdict.h"
|
|
|
|
namespace nw4r {
|
|
namespace g3d {
|
|
|
|
struct ResAnmVisAnmData {
|
|
enum Flag {
|
|
FLAG_ENABLE = (1 << 0),
|
|
FLAG_CONST = (1 << 1)
|
|
};
|
|
|
|
s32 name; // at 0x0
|
|
u32 flags; // at 0x4
|
|
ResBoolAnmFramesData visibility; // at 0x8
|
|
};
|
|
|
|
struct ResAnmVisInfoData {
|
|
u16 numFrame; // at 0x0
|
|
u16 numNode; // at 0x2
|
|
AnmPolicy policy; // at 0x4
|
|
};
|
|
|
|
struct ResAnmVisData {
|
|
ResBlockHeaderData header; // at 0x0
|
|
u32 revision; // at 0x8
|
|
s32 toResFileData; // at 0xC
|
|
s32 toVisDataDic; // at 0x10
|
|
s32 toResUserData; // at 0x14
|
|
s32 name; // at 0x18
|
|
s32 original_path; // at 0x1C
|
|
ResAnmVisInfoData info; // at 0x20
|
|
};
|
|
|
|
class ResAnmVis : public ResCommon<ResAnmVisData> {
|
|
public:
|
|
static const u32 SIGNATURE = 'VIS0';
|
|
static const int REVISION = 3;
|
|
|
|
public:
|
|
NW4R_G3D_RESOURCE_FUNC_DEF(ResAnmVis);
|
|
|
|
u32 GetRevision() const {
|
|
return ref().revision;
|
|
}
|
|
|
|
bool CheckRevision() const {
|
|
return GetRevision() == REVISION;
|
|
}
|
|
|
|
bool GetAnmResult(u32 idx, f32 frame) const;
|
|
|
|
const ResAnmVisAnmData *GetNodeAnm(int idx) const {
|
|
return static_cast<ResAnmVisAnmData *>(ofs_to_obj<ResDic>(ref().toVisDataDic)[idx]);
|
|
}
|
|
const ResAnmVisAnmData *GetNodeAnm(u32 idx) const {
|
|
return static_cast<ResAnmVisAnmData *>(ofs_to_obj<ResDic>(ref().toVisDataDic)[idx]);
|
|
}
|
|
|
|
int GetNumFrame() const {
|
|
return ref().info.numFrame;
|
|
}
|
|
|
|
int GetNumNode() const {
|
|
return ref().info.numNode;
|
|
}
|
|
|
|
AnmPolicy GetAnmPolicy() const {
|
|
return ref().info.policy;
|
|
}
|
|
};
|
|
|
|
} // namespace g3d
|
|
} // namespace nw4r
|
|
|
|
#endif
|