rodecomp/Source/Resource/Models/ModelMesh.h
ragnarok-clanker fdbebbba25 Maintenance: Second pass on unknown_XXXX members: 140 more renamed (61 files), named from the original binary (accesses at this+offse
Batch #14947 by ragnarok-clanker: no function's compiled code changes; checked with 596 compiled unit(s), including every includer of Source/Client/Input/Language.h, Source/Client/Input/LanguageTC.h, Source/Client/Mode/CGameMode.h, Source/Client/Mode/CLoginMode.h, Source/Client/Mode/EquipWindowLook.h, Source/Client/Session.h, Source/Contents/Actors/GameActor.h, Source/Contents/Actors/GraffiSkill.h, Source/Contents/Actors/GrannyGameActor.h, Source/Contents/Actors/Pc.h, Source/Contents/Camera/Camera.h, Source/Contents/Effects/EffectEmitter.h, Source/Contents/Effects/EffectPrimitiveState.h, Source/Contents/FlyingShipRouteInfo.h, Source/Contents/Ground/GroundGeometry.h, Source/Contents/Ground/GroundSpatial.h, Source/Contents/Items/ItemInfo.h, Source/Render/SpriteQuad.h, Source/Resource/EZeffectResource.h, Source/Resource/Models/AnimatedModelResource.h, Source/Resource/Models/GrannyModelResource.h, Source/Resource/Models/ModelMesh.h, Source/Resource/World/WorldResource.h, Source/UI/Dialogs/UIChooseWnd.h, Source/UI/Items/UISpellListWnd.h, Source/UI/Lists/UIListBoxTemplate.h, Source/UI/MiniPartyGrid.h, Source/UI/Quest/UIOngoingQuestInfo.h, Source/UI/Text/UIAchWnd.h, Source/UI/Window/UIMonsterInfoWnd.h, Source/UI/Window/UINavigationWnd.h, Source/UI/Window/UINewMakeCharWnd.h, Source/UI/Window/UITalkboxTrapInputWnd.h, Source/UI/Window/UIWindowMgr.h.
2026-11-08 18:16:10 +00:00

70 lines
2.2 KiB
C++

#ifndef RAGNAROK_SOURCE_RESOURCE_MODELS_MODELMESH_H
#define RAGNAROK_SOURCE_RESOURCE_MODELS_MODELMESH_H
#include <array>
#include <cstddef>
#include <cstdint>
#include <vector>
struct ModelFace {
ModelFace();
~ModelFace();
/* 0000 */ std::uint16_t vertices[3];
/* 0006 */ std::uint16_t textureVertices[3];
/* 000C */ std::uint16_t texture;
/* 000E */ std::uint16_t unknown_000E;
/* 0010 */ std::uint32_t twoSided;
/* 0014 */ std::vector<std::uint32_t> smoothing;
};
struct ModelTextureVertex {
/* 0000 */ std::uint32_t shaded;
/* 0004 */ float u;
/* 0008 */ float v;
};
static_assert(sizeof(ModelTextureVertex) == 12);
struct ModelMesh {
ModelMesh();
~ModelMesh();
ModelMesh(const ModelMesh&) = delete;
ModelMesh& operator=(const ModelMesh&) = delete;
/* 0000 */ int vertexCount;
/* 0004 */ std::array<float, 3>* vertices;
/* 0008 */ int faceCount;
/* 000C */ ModelFace* faces;
/* 0010 */ int textureVertexCount;
/* 0014 */ ModelTextureVertex* textureVertices;
/* 0018 */ std::array<float, 3>* faceNormals;
/* 001C */ std::array<float, 3>* vertexNormals;
/* 0020 */ unsigned char parentMesh[4];
/* 0024 */ std::array<std::vector<std::uint32_t>, 32> indices;
/* 01A4 */ unsigned char unknown_01A4[48];
void CalculateNormals();
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(ModelFace) == 32);
static_assert(offsetof(ModelFace, vertices) == 0x00);
static_assert(offsetof(ModelFace, textureVertices) == 0x06);
static_assert(offsetof(ModelFace, texture) == 0x0C);
static_assert(offsetof(ModelFace, unknown_000E) == 0x0E);
static_assert(offsetof(ModelFace, twoSided) == 0x10);
static_assert(offsetof(ModelFace, smoothing) == 0x14);
static_assert(sizeof(ModelMesh) == 0x1D4);
static_assert(offsetof(ModelMesh, vertices) == 0x04);
static_assert(offsetof(ModelMesh, faceCount) == 0x08);
static_assert(offsetof(ModelMesh, faces) == 0x0C);
static_assert(offsetof(ModelMesh, textureVertexCount) == 0x10);
static_assert(offsetof(ModelMesh, textureVertices) == 0x14);
static_assert(offsetof(ModelMesh, faceNormals) == 0x18);
static_assert(offsetof(ModelMesh, vertexNormals) == 0x1C);
static_assert(offsetof(ModelMesh, indices) == 0x24);
static_assert(offsetof(ModelMesh, unknown_01A4) == 0x1A4);
#endif
#endif