mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-08 11:20:23 -05:00
![Random](/assets/img/avatar_default.png)
* 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>
81 lines
2.4 KiB
C++
81 lines
2.4 KiB
C++
#include "SkeletonLimb.h"
|
|
|
|
namespace Ship
|
|
{
|
|
void SkeletonLimbV0::ParseFileBinary(BinaryReader* reader, Resource* res)
|
|
{
|
|
SkeletonLimb* limb = (SkeletonLimb*)res;
|
|
|
|
ResourceFile::ParseFileBinary(reader, limb);
|
|
|
|
limb->limbType = (LimbType)reader->ReadByte();
|
|
limb->skinSegmentType = (ZLimbSkinType)reader->ReadByte();
|
|
limb->skinDList = reader->ReadString();
|
|
|
|
limb->skinVtxCnt = reader->ReadUInt16();
|
|
uint32_t skinCnt = reader->ReadUInt32();
|
|
|
|
for (size_t i = 0; i < skinCnt; i++)
|
|
{
|
|
Struct_800A598C struc;
|
|
|
|
struc.unk_4 = reader->ReadUInt16();
|
|
|
|
int arrSize = reader->ReadInt32();
|
|
|
|
for (int k = 0; k < arrSize; k++)
|
|
{
|
|
Struct_800A57C0 struc2;
|
|
|
|
struc2.unk_0 = reader->ReadInt16();
|
|
struc2.unk_2 = reader->ReadInt16();
|
|
struc2.unk_4 = reader->ReadInt16();
|
|
struc2.unk_6 = reader->ReadByte();
|
|
struc2.unk_7 = reader->ReadByte();
|
|
struc2.unk_8 = reader->ReadByte();
|
|
struc2.unk_9 = reader->ReadUByte();
|
|
|
|
struc.unk_8_arr.push_back(struc2);
|
|
}
|
|
|
|
int arrSize2 = reader->ReadInt32();
|
|
|
|
for (int k = 0; k < arrSize2; k++)
|
|
{
|
|
Struct_800A598C_2 struc2;
|
|
|
|
struc2.unk_0 = reader->ReadUByte();
|
|
struc2.x = reader->ReadInt16();
|
|
struc2.y = reader->ReadInt16();
|
|
struc2.z = reader->ReadInt16();
|
|
struc2.unk_8 = reader->ReadUByte();
|
|
|
|
struc.unk_C_arr.push_back(struc2);
|
|
}
|
|
|
|
limb->skinData.push_back(struc);
|
|
}
|
|
|
|
limb->skinDList2 = reader->ReadString();
|
|
|
|
limb->legTransX = reader->ReadSingle();
|
|
limb->legTransY = reader->ReadSingle();
|
|
limb->legTransZ = reader->ReadSingle();
|
|
|
|
limb->rotX = reader->ReadUInt16();
|
|
limb->rotY = reader->ReadUInt16();
|
|
limb->rotZ = reader->ReadUInt16();
|
|
|
|
limb->childPtr = reader->ReadString();
|
|
limb->siblingPtr = reader->ReadString();
|
|
limb->dListPtr = reader->ReadString();
|
|
limb->dList2Ptr = reader->ReadString();
|
|
|
|
limb->transX = reader->ReadInt16();
|
|
limb->transY = reader->ReadInt16();
|
|
limb->transZ = reader->ReadInt16();
|
|
|
|
limb->childIndex = reader->ReadUByte();
|
|
limb->siblingIndex = reader->ReadUByte();
|
|
}
|
|
} |