Path: blob/main/RSDKv4/Animation.hpp
817 views
#ifndef ANIMATION_H1#define ANIMATION_H23#define ANIFILE_COUNT (0x100)4#define ANIMATION_COUNT (0x400)5#define SPRITEFRAME_COUNT (0x1000)67#define HITBOX_COUNT (0x20)8#define HITBOX_DIR_COUNT (0x8)910enum AnimRotationFlags { ROTSTYLE_NONE, ROTSTYLE_FULL, ROTSTYLE_45DEG, ROTSTYLE_STATICFRAMES };1112struct AnimationFile {13char fileName[0x20];14int animCount;15int aniListOffset;16int hitboxListOffset;17};1819struct SpriteAnimation {20char name[16];21byte frameCount;22byte speed;23byte loopPoint;24byte rotationStyle;25int frameListOffset;26};2728struct SpriteFrame {29int sprX;30int sprY;31int width;32int height;33int pivotX;34int pivotY;35byte sheetID;36byte hitboxID;37};3839struct Hitbox {40sbyte left[HITBOX_DIR_COUNT];41sbyte top[HITBOX_DIR_COUNT];42sbyte right[HITBOX_DIR_COUNT];43sbyte bottom[HITBOX_DIR_COUNT];44};4546extern AnimationFile animationFileList[ANIFILE_COUNT];47extern int animationFileCount;4849extern SpriteFrame scriptFrames[SPRITEFRAME_COUNT];50extern int scriptFrameCount;5152extern SpriteFrame animFrames[SPRITEFRAME_COUNT];53extern int animFrameCount;54extern SpriteAnimation animationList[ANIMATION_COUNT];55extern int animationCount;56extern Hitbox hitboxList[HITBOX_COUNT];57extern int hitboxCount;5859void LoadAnimationFile(char *filePath);60void ClearAnimationData();6162AnimationFile *AddAnimationFile(char *filePath);6364inline AnimationFile *GetDefaultAnimationRef() { return &animationFileList[0]; }6566void ProcessObjectAnimation(void *objScr, void *ent);6768#endif // !ANIMATION_H697071