mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-12 18:01:16 +00:00
* git subrepo pull (merge) tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "945e6ca1a" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "50242eca9" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Fix extract_assets.py multithreading * Update binutils doc a bit * Remove * import, add multiprocessing option and way to pass arguments to ZAPD * Update format.sh to be more platform-independent * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "fd5a7f434" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "fd5a7f434" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Remove ; * Update formatting script to not just use 11 * Add Python requirements, move the Mac stuff in the README into its own doc * Fix readme link * Minor format thing * . * Move ZAPDArgs into its own function * Update readme and remove requirements.txt * Dragorn-inspired rewrite of processZAPDArgs * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "a0d3f7b68" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "a0d3f7b68" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Fix function definition * Building docs overhaul * Add Python packages to Mac and Cygwin * Heading number * format format.sh (!) * Replace "currently" * Remove Debian * git subrepo pull (merge) --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "0ba781304" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "0ba781304" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596"
99 lines
2.1 KiB
C++
99 lines
2.1 KiB
C++
#pragma once
|
|
|
|
#include "ZFile.h"
|
|
#include "ZResource.h"
|
|
#include "ZRoom/ZRoom.h"
|
|
#include "ZVector.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 WaterBoxHeader
|
|
{
|
|
public:
|
|
WaterBoxHeader(const std::vector<uint8_t>& rawData, uint32_t rawDataIndex);
|
|
|
|
std::string GetBodySourceCode() const;
|
|
|
|
protected:
|
|
int16_t xMin;
|
|
int16_t ySurface;
|
|
int16_t zMin;
|
|
int16_t xLength;
|
|
int16_t zLength;
|
|
int16_t pad;
|
|
int32_t properties;
|
|
};
|
|
|
|
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,
|
|
offset_t rawDataIndex, offset_t upperCameraBoundary);
|
|
~CameraDataList();
|
|
};
|
|
|
|
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<ZVector> vertices;
|
|
std::vector<PolygonEntry> polygons;
|
|
std::vector<uint64_t> polygonTypes;
|
|
std::vector<WaterBoxHeader> waterBoxes;
|
|
CameraDataList* camData = nullptr;
|
|
|
|
ZCollisionHeader(ZFile* nParent);
|
|
~ZCollisionHeader();
|
|
|
|
void ParseRawData() override;
|
|
void DeclareReferences(const std::string& prefix) override;
|
|
|
|
std::string GetBodySourceCode() const override;
|
|
std::string GetDefaultName(const std::string& prefix) const override;
|
|
|
|
std::string GetSourceTypeName() const override;
|
|
ZResourceType GetResourceType() const override;
|
|
|
|
size_t GetRawDataSize() const override;
|
|
};
|