mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-10 11:35:19 -05:00
09432ee7f4
* Initial Linux/GCC support commit * Add instructins for linux in the README * apply suggestions by @Erotemic and @Emill * Fix python 3.10 symlink line * Fix func_80041E80 type mismatch (#3) Type mismatch functions.h:664 * Makefile: clean OTRExporter/libultraship/ZAPDTR with distclean and fix CXX_FILES * Makefile: find C/CXX_FILES automatically * Makefile: remove ugly conditions in find commands * cleanup _MSC_VER usage * fix Windows build * cleanup extraction scripts * fix Windows build * Fix Windows path separator issue * fix rumble support for linux * use glew-cmake in dockerfile * add pulseaudio backend * fix ZAPDTR linkage * Check for "soh.elf" in directory (#6) hide second button if `soh.exe` or `soh.elf` is present * Fix hardcoded segment addresses (#5) * fix condition * hack lus -> soh dep for ZAPDTR Co-authored-by: sholdee <102821812+sholdee@users.noreply.github.com> Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Co-authored-by: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com>
66 lines
1.8 KiB
C++
66 lines
1.8 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "OtherStructs/SkinLimbStructs.h"
|
|
#include "ZDisplayList.h"
|
|
#include "ZFile.h"
|
|
|
|
enum class ZLimbType
|
|
{
|
|
Invalid,
|
|
Standard,
|
|
LOD,
|
|
Skin,
|
|
Curve,
|
|
Legacy,
|
|
};
|
|
|
|
class ZLimb : public ZResource
|
|
{
|
|
public:
|
|
ZLimbType type = ZLimbType::Standard;
|
|
|
|
ZLimbSkinType skinSegmentType = ZLimbSkinType::SkinType_0; // Skin only
|
|
segptr_t skinSegment = 0; // Skin only
|
|
Struct_800A5E28 segmentStruct = {0}; // Skin only
|
|
|
|
// Legacy only
|
|
float legTransX = 0, legTransY = 0, legTransZ = 0; // Vec3f
|
|
uint16_t rotX = 0, rotY = 0, rotZ = 0; // Vec3s
|
|
segptr_t childPtr = 0; // LegacyLimb*
|
|
segptr_t siblingPtr = 0; // LegacyLimb*
|
|
|
|
segptr_t dListPtr = 0;
|
|
segptr_t dList2Ptr = 0; // LOD and Curve Only
|
|
|
|
int16_t transX = 0, transY = 0, transZ = 0;
|
|
uint8_t childIndex = 0, siblingIndex = 0;
|
|
|
|
ZLimb(ZFile* nParent);
|
|
|
|
void ExtractFromBinary(uint32_t nRawDataIndex, ZLimbType nType);
|
|
|
|
void ParseXML(tinyxml2::XMLElement* reader) override;
|
|
void ParseRawData() override;
|
|
void DeclareReferences(const std::string& prefix) override;
|
|
|
|
std::string GetBodySourceCode() const override;
|
|
std::string GetDefaultName(const std::string& prefix) const override;
|
|
|
|
size_t GetRawDataSize() const override;
|
|
std::string GetSourceTypeName() const override;
|
|
ZResourceType GetResourceType() const override;
|
|
|
|
ZLimbType GetLimbType();
|
|
void SetLimbType(ZLimbType value);
|
|
static const char* GetSourceTypeName(ZLimbType limbType);
|
|
static ZLimbType GetTypeByAttributeName(const std::string& attrName);
|
|
|
|
protected:
|
|
void DeclareDList(segptr_t dListSegmentedPtr, const std::string& prefix,
|
|
const std::string& limbSuffix);
|
|
};
|