Path: blob/master/RSDKv5/RSDK/Graphics/Legacy/AnimationLegacy.hpp
1168 views
1namespace Legacy2{34#define LEGACY_ANIFILE_COUNT (0x100)5#define LEGACY_ANIMATION_COUNT (0x400)6#define LEGACY_SPRITEFRAME_COUNT (0x1000)78#define LEGACY_HITBOX_COUNT (0x20)9#define LEGACY_HITBOX_DIR_COUNT (0x8)1011enum AnimRotationFlags { ROTSTYLE_NONE, ROTSTYLE_FULL, ROTSTYLE_45DEG, ROTSTYLE_STATICFRAMES };1213struct AnimationFile {14char fileName[0x20];15int32 animCount;16int32 aniListOffset;17int32 hitboxListOffset;18};1920struct SpriteAnimation {21char name[16];22uint8 frameCount;23uint8 speed;24uint8 loopPoint;25uint8 rotationStyle;26int32 frameListOffset;27};2829struct SpriteFrame {30int32 sprX;31int32 sprY;32int32 width;33int32 height;34int32 pivotX;35int32 pivotY;36uint8 sheetID;37uint8 hitboxID;38};3940struct Hitbox {41int8 left[LEGACY_HITBOX_DIR_COUNT];42int8 top[LEGACY_HITBOX_DIR_COUNT];43int8 right[LEGACY_HITBOX_DIR_COUNT];44int8 bottom[LEGACY_HITBOX_DIR_COUNT];45};4647extern AnimationFile animationFileList[LEGACY_ANIFILE_COUNT];48extern int32 animationFileCount;4950extern SpriteFrame scriptFrames[LEGACY_SPRITEFRAME_COUNT];51extern int32 scriptFrameCount;5253extern SpriteFrame animFrames[LEGACY_SPRITEFRAME_COUNT];54extern int32 animFrameCount;55extern SpriteAnimation animationList[LEGACY_ANIMATION_COUNT];56extern int32 animationCount;57extern Hitbox hitboxList[LEGACY_HITBOX_COUNT];58extern int32 hitboxCount;5960void LoadAnimationFile(char *filePath);61void ClearAnimationData();6263AnimationFile *AddAnimationFile(char *filePath);6465inline AnimationFile *GetDefaultAnimationRef() { return &animationFileList[0]; }6667namespace v368{69void ProcessObjectAnimation(void *objScr, void *ent);70}7172namespace v473{74void ProcessObjectAnimation(void *objScr, void *ent);75}7677} // namespace Legacy7879