mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-16 20:10:28 +00:00
* git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "769f5702a" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "769f5702a" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Add `libpng` to readme * Remove `-ifp` since it doesn't exists anymore in ZAPD * Remove extra print I added * Add UNK_09 macro and other minor fixes * Simplify PNG rules * simplify gitignore * Update README.md Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update dockerfile * basic instructions for cygwin and mac * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "86160be69" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "86160be69" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Change nanoseconds to seconds in extract_assets.py Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
98 lines
2 KiB
C++
98 lines
2 KiB
C++
#pragma once
|
|
|
|
#include "ZFile.h"
|
|
#include "ZResource.h"
|
|
#include "ZRoom/ZRoom.h"
|
|
|
|
class PolygonEntry
|
|
{
|
|
public:
|
|
uint16_t type;
|
|
uint16_t vtxA, vtxB, vtxC;
|
|
uint16_t a, b, c, d;
|
|
|
|
PolygonEntry(const std::vector<uint8_t>& rawData, uint32_t rawDataIndex);
|
|
};
|
|
|
|
class VertexEntry
|
|
{
|
|
public:
|
|
int16_t x, y, z;
|
|
|
|
VertexEntry(const std::vector<uint8_t>& rawData, uint32_t rawDataIndex);
|
|
};
|
|
|
|
class WaterBoxHeader
|
|
{
|
|
public:
|
|
int16_t xMin;
|
|
int16_t ySurface;
|
|
int16_t zMin;
|
|
int16_t xLength;
|
|
int16_t zLength;
|
|
int16_t pad;
|
|
int32_t properties;
|
|
|
|
WaterBoxHeader(const std::vector<uint8_t>& rawData, uint32_t rawDataIndex);
|
|
};
|
|
|
|
class CameraPositionData
|
|
{
|
|
public:
|
|
int16_t x, y, z;
|
|
|
|
CameraPositionData(const std::vector<uint8_t>& rawData, uint32_t rawDataIndex);
|
|
};
|
|
|
|
class CameraDataEntry
|
|
{
|
|
public:
|
|
int16_t cameraSType;
|
|
int16_t numData;
|
|
int32_t cameraPosDataSeg;
|
|
};
|
|
|
|
class CameraDataList
|
|
{
|
|
public:
|
|
std::vector<CameraDataEntry*> entries;
|
|
std::vector<CameraPositionData*> cameraPositionData;
|
|
|
|
CameraDataList(ZFile* parent, const std::string& prefix, const std::vector<uint8_t>& rawData,
|
|
uint32_t rawDataIndex, uint32_t polyTypeDefSegmentOffset,
|
|
uint32_t polygonTypesCnt);
|
|
};
|
|
|
|
class ZCollisionHeader : public ZResource
|
|
{
|
|
public:
|
|
int16_t absMinX, absMinY, absMinZ;
|
|
int16_t absMaxX, absMaxY, absMaxZ;
|
|
uint16_t numVerts;
|
|
segptr_t vtxAddress;
|
|
uint16_t numPolygons;
|
|
segptr_t polyAddress;
|
|
segptr_t polyTypeDefAddress;
|
|
segptr_t camDataAddress;
|
|
|
|
int32_t numWaterBoxes;
|
|
segptr_t waterBoxAddress;
|
|
|
|
uint32_t vtxSegmentOffset, polySegmentOffset, polyTypeDefSegmentOffset, camDataSegmentOffset,
|
|
waterBoxSegmentOffset;
|
|
|
|
std::vector<VertexEntry> vertices;
|
|
std::vector<PolygonEntry> polygons;
|
|
std::vector<uint64_t> polygonTypes;
|
|
std::vector<WaterBoxHeader*> waterBoxes;
|
|
CameraDataList* camData;
|
|
|
|
ZCollisionHeader(ZFile* nParent);
|
|
~ZCollisionHeader();
|
|
|
|
void ParseRawData() override;
|
|
|
|
ZResourceType GetResourceType() const override;
|
|
|
|
size_t GetRawDataSize() const override;
|
|
};
|