Batch #14681 by ragnarok-clanker: forced by an admin (6 lower score(s), 70 changed function(s)); checked with 555 compiled unit(s), including every includer of Source/Client/Mode/CLoginMode.h, Source/Client/Session.h, Source/Contents/Actors/GameActor.h, Source/Contents/Actors/GrannyGameActor.h, Source/Contents/Actors/Pc.h, Source/Contents/Actors/RenderObject.h, Source/Contents/EffectResourceSwitcher.h, Source/Contents/Effects/CartCannon.h, Source/Contents/Effects/EZ2STREffectEx.h, Source/Contents/Effects/EffectActor.h, Source/Contents/Effects/MonsterSkillEffects.h, Source/Contents/Effects/RagEffect.h, Source/Contents/Effects/RectUpEffect.h, Source/Contents/Ground/GroundGeometry.h, Source/Network/Connection/Connection.h, Source/Resource/Audio/WaveResource.h, Source/Resource/Bitmap/BitmapResource.h, Source/Resource/EZeffectResource.h, Source/Resource/EmblemResource.h, Source/Resource/GifResource.h, Source/Resource/ImfResource.h, Source/Resource/Models/AnimatedModelResource.h, Source/Resource/Models/GrannyModelResource.h, Source/Resource/Models/ModelResource.h, Source/Resource/PaletteResource.h, Source/Resource/RmaResource.h, Source/Resource/Sprites/ActionResource.h, Source/Resource/Sprites/SpriteResource.h, Source/Resource/World/GroundResource.h, Source/Resource/World/TerrainResource.h, Source/Resource/World/WorldResource.h, Source/UI/Buttons/UIBmpRadioBtn.h, Source/UI/Buttons/UITextButton.h, Source/UI/Item/UIItemPurchaseWnd.h, Source/UI/Item/UIItemSellWnd.h, Source/UI/Item/UIItemSellWnd2.h, Source/UI/Item/UIItemStoreWnd.h, Source/UI/Item/UIItemWnd.h, Source/UI/Item/UIParaItemShopWnd.h, Source/UI/Items/UIItemRepairWnd.h, Source/UI/Items/UIMakeTargetListWnd.h, Source/UI/Items/UIMakeTargetProcessWnd.h, Source/UI/Items/UIWeaponRefineWnd.h, Source/UI/Rodex/UIRodexInboxWnd.h, Source/UI/Shop/UIMerchantItemShopWnd.h, Source/UI/Shop/UIMerchantMirrorItemWnd.h, Source/UI/Shop/UIMerchantShopMakeWnd.h, Source/UI/StylingShop/UIStylingShopWnd.h, Source/UI/UIChangeMaterialWnd.h, Source/UI/UIIngredientInfoWnd.h, Source/UI/UIItemReformWnd.h, Source/UI/UILapineScrollBar.h, Source/UI/Window/UIHotKeyWnd.h, Source/UI/Window/UINewSelectCharWnd.h.
71 lines
2.2 KiB
C++
71 lines
2.2 KiB
C++
#ifndef RAGNAROK_SOURCE_RESOURCE_SPRITES_ACTIONRESOURCE_H
|
|
#define RAGNAROK_SOURCE_RESOURCE_SPRITES_ACTIONRESOURCE_H
|
|
|
|
#include "Render/Textures/SpritePixels.h"
|
|
#include "Resource/Resource.h"
|
|
|
|
#include <cstddef>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class ResourceBytes;
|
|
class ResourceMgr;
|
|
|
|
struct ActionAnchor {
|
|
/* 0000 */ std::int32_t x;
|
|
/* 0004 */ std::int32_t y;
|
|
/* 0008 */ std::int32_t unknown_0008;
|
|
};
|
|
|
|
struct ActionFrame {
|
|
/* 0000 */ std::int32_t unknown_0000[8];
|
|
/* 0020 */ std::vector<SpriteFrameCell> cells;
|
|
/* 002C */ int cellCount;
|
|
/* 0030 */ int sound;
|
|
/* 0034 */ std::vector<ActionAnchor> anchors;
|
|
/* 0040 */ int anchorCount;
|
|
|
|
// INLINED
|
|
ActionFrame() {}
|
|
const SpriteFrameCell& Cell(unsigned index) const;
|
|
};
|
|
|
|
class CActRes : public CRes {
|
|
public:
|
|
CActRes();
|
|
CActRes(const char* extension, const char* prefix);
|
|
~CActRes() override;
|
|
CActRes* Create() override;
|
|
bool Load(const char* name) override;
|
|
void Unload() override;
|
|
const std::vector<ActionFrame>& Animation(unsigned index) const;
|
|
const ActionFrame& Frame(unsigned animation, unsigned frame) const;
|
|
unsigned FrameCount(unsigned animation) const;
|
|
float Speed(unsigned index) const;
|
|
const char* Sound(unsigned index) const;
|
|
|
|
/* 0110 */ std::vector<std::vector<ActionFrame>> animations;
|
|
/* 011C */ int maximumCells;
|
|
/* 0120 */ std::vector<std::string> sounds;
|
|
/* 012C */ std::vector<float> speeds;
|
|
|
|
};
|
|
|
|
static_assert(sizeof(ActionAnchor) == 12);
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(ActionFrame) == 68);
|
|
static_assert(sizeof(CActRes) == 312);
|
|
static_assert(offsetof(ActionAnchor, y) == 0x0004);
|
|
static_assert(offsetof(ActionAnchor, unknown_0008) == 0x0008);
|
|
static_assert(offsetof(ActionFrame, cells) == 0x0020);
|
|
static_assert(offsetof(ActionFrame, cellCount) == 0x002C);
|
|
static_assert(offsetof(ActionFrame, sound) == 0x0030);
|
|
static_assert(offsetof(ActionFrame, anchors) == 0x0034);
|
|
static_assert(offsetof(ActionFrame, anchorCount) == 0x0040);
|
|
static_assert(offsetof(CActRes, animations) == 0x0110);
|
|
static_assert(offsetof(CActRes, maximumCells) == 0x011C);
|
|
static_assert(offsetof(CActRes, sounds) == 0x0120);
|
|
static_assert(offsetof(CActRes, speeds) == 0x012C);
|
|
#endif
|
|
|
|
#endif
|