mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-14 02:49:16 +00:00
* remove fake match * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "3e9ed72e2" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "3e9ed72e2" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * new extraction script and a hack to make clear tag work * fix clear tag again * remove static from clear tag DLists * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "e7a8a48cf" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "e7a8a48cf" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "e243634e5" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "e243634e5" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "d0cd6b397" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "d0cd6b397" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Update ovl_En_Clear_Tag.xml
68 lines
1.3 KiB
C++
68 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <string>
|
|
#include <vector>
|
|
#include "ZResource.h"
|
|
#include "tinyxml2.h"
|
|
|
|
enum class ZScalarType
|
|
{
|
|
ZSCALAR_NONE,
|
|
ZSCALAR_S8,
|
|
ZSCALAR_U8,
|
|
ZSCALAR_X8,
|
|
ZSCALAR_S16,
|
|
ZSCALAR_U16,
|
|
ZSCALAR_X16,
|
|
ZSCALAR_S32,
|
|
ZSCALAR_U32,
|
|
ZSCALAR_X32,
|
|
ZSCALAR_S64,
|
|
ZSCALAR_U64,
|
|
ZSCALAR_X64,
|
|
ZSCALAR_F32,
|
|
ZSCALAR_F64
|
|
};
|
|
|
|
typedef union ZScalarData
|
|
{
|
|
uint8_t u8;
|
|
int8_t s8;
|
|
uint16_t u16;
|
|
int16_t s16;
|
|
uint32_t u32;
|
|
int32_t s32;
|
|
uint64_t u64;
|
|
int64_t s64;
|
|
float f32;
|
|
double f64;
|
|
} ZScalarData;
|
|
|
|
class ZScalar : public ZResource
|
|
{
|
|
friend class ZVector;
|
|
|
|
public:
|
|
ZScalarData scalarData;
|
|
ZScalarType scalarType;
|
|
|
|
ZScalar(ZFile* nParent);
|
|
|
|
void ExtractFromBinary(uint32_t nRawDataIndex, ZScalarType nScalarType);
|
|
|
|
void ParseRawData() override;
|
|
void ParseXML(tinyxml2::XMLElement* reader) override;
|
|
std::string GetBodySourceCode() const override;
|
|
|
|
bool DoesSupportArray() const override;
|
|
std::string GetSourceTypeName() const override;
|
|
ZResourceType GetResourceType() const override;
|
|
|
|
size_t GetRawDataSize() const override;
|
|
DeclarationAlignment GetDeclarationAlignment() const override;
|
|
|
|
static size_t MapTypeToSize(const ZScalarType scalarType);
|
|
static ZScalarType MapOutputTypeToScalarType(const std::string& type);
|
|
static std::string MapScalarTypeToOutputType(const ZScalarType scalarType);
|
|
};
|