rodecomp/Source/Resource/Models/AnimatedModelResource.h
ragnarok-clanker ffbeee0f2a Maintenance: Forced maintainer submission (resubmission of 14678 after td sync to 8deac7a3; replaces 14460 and 14473). Native-run fix
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.
2026-11-07 14:05:21 +00:00

97 lines
3.1 KiB
C++

#ifndef RAGNAROK_SOURCE_RESOURCE_MODELS_ANIMATEDMODELRESOURCE_H
#define RAGNAROK_SOURCE_RESOURCE_MODELS_ANIMATEDMODELRESOURCE_H
#include "Resource/Models/ModelResource.h"
struct AnimatedModelFace {
/* 0000 */ std::uint16_t vertices[3];
/* 0006 */ std::uint16_t textureVertices[3];
/* 000C */ std::uint32_t unknown_000C;
/* 0010 */ std::uint32_t unknown_0010;
/* 0014 */ int smoothGroup;
};
struct AnimatedModelFrame {
AnimatedModelFrame();
~AnimatedModelFrame();
AnimatedModelFrame(const AnimatedModelFrame&) = delete;
AnimatedModelFrame& operator=(const AnimatedModelFrame&) = delete;
/* 0000 */ std::array<float, 3>* vertices;
/* 0004 */ ModelTextureVertex* textureVertices;
};
struct AnimatedModelRecord {
~AnimatedModelRecord();
/* 0000 */ unsigned char unknown_0000[0x84];
/* 0084 */ std::string* unknown_0084;
};
class C3dAnimModelRes;
struct AnimatedModelNode {
AnimatedModelNode();
~AnimatedModelNode();
AnimatedModelNode(const AnimatedModelNode&) = delete;
AnimatedModelNode& operator=(const AnimatedModelNode&) = delete;
void Shade(const float* matrix, int frame, const float* light, const float* diffuse, const float* ambient, int shadeType, int alpha);
/* 0000 */ std::string name;
/* 0018 */ std::string parentName;
/* 0030 */ C3dAnimModelRes* model;
/* 0034 */ AnimatedModelNode* parent;
/* 0038 */ std::list<AnimatedModelNode*> children;
/* 0040 */ int vertexCount;
/* 0044 */ int textureVertexCount;
/* 0048 */ int faceCount;
/* 004C */ int textureCount;
/* 0050 */ std::array<float, 3>* faceNormals;
/* 0054 */ AnimatedModelFrame* frames;
/* 0058 */ AnimatedModelFace* faces;
/* 005C */ CTexture** textures;
/* 0060 */ int sharedTextureVertices;
private:
};
class C3dAnimModelRes : public CRes {
public:
C3dAnimModelRes();
C3dAnimModelRes(const char* extension, const char* prefix);
~C3dAnimModelRes() override;
C3dAnimModelRes* Create() override;
bool Load(const char* name) override;
void Unload() override;
/* 0110 */ int unknown_0110;
/* 0114 */ AnimatedModelRecord* unknown_0114;
/* 0118 */ std::list<AnimatedModelNode*> nodes;
/* 0120 */ std::list<std::string> rootNames;
/* 0128 */ std::string sourceName;
/* 0140 */ int shade;
/* 0144 */ int frameCount;
/* 0148 */ int animationLength;
/* 014C */ float speed;
/* 0150 */ std::uint32_t unknown_0150;
/* 0154 */ float unknown_0154;
/* 0158 */ float unknown_0158;
/* 015C */ float unknown_015C;
/* 0160 */ std::uint32_t alpha;
};
static_assert(sizeof(AnimatedModelFace) == 24);
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(AnimatedModelFrame) == 8);
static_assert(offsetof(AnimatedModelFrame, textureVertices) == 0x04);
static_assert(offsetof(AnimatedModelNode, vertexCount) == 0x40);
static_assert(offsetof(AnimatedModelNode, textureCount) == 0x4C);
static_assert(offsetof(AnimatedModelNode, faceNormals) == 0x50);
static_assert(offsetof(AnimatedModelNode, frames) == 0x54);
static_assert(offsetof(AnimatedModelNode, faces) == 0x58);
static_assert(offsetof(AnimatedModelNode, textures) == 0x5C);
static_assert(offsetof(AnimatedModelNode, sharedTextureVertices) == 0x60);
#endif
#endif