From e85008a5058dbfc9c8ec6a5636414c4c012d806c Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sun, 21 Jul 2024 17:40:26 +0100 Subject: [PATCH] Move stuff around --- patterns/Common.hexpat | 13 ++++ patterns/FileBase.hexpat | 50 ------------- patterns/db_files/AllChunks.pat | 43 +++++++++++ patterns/db_files/Common.hexpat | 74 +++++++++++++++++++ patterns/{ => db_files}/CowFile.hexpat | 42 +---------- patterns/db_files/Utils.hexpat | 14 ++++ patterns/{ => db_files}/chunks/AIACS.hexpat | 0 .../{ => db_files}/chunks/AICONVERSE.hexpat | 0 patterns/{ => db_files}/chunks/AICRTSZ.hexpat | 0 .../{ => db_files}/chunks/AIGPTHVAR.hexpat | 0 .../{ => db_files}/chunks/AIHearStat.hexpat | 0 .../{ => db_files}/chunks/AIPATHVAR.hexpat | 0 .../{ => db_files}/chunks/AISNDTWK.hexpat | 0 .../{ => db_files}/chunks/AI_ROOM_DB.hexpat | 0 patterns/{ => db_files}/chunks/AMBIENT.hexpat | 0 patterns/{ => db_files}/chunks/BASH.hexpat | 0 patterns/{ => db_files}/chunks/BRHEAD.hexpat | 0 patterns/{ => db_files}/chunks/BRLIST.hexpat | 0 patterns/{ => db_files}/chunks/BRVER.hexpat | 0 .../{ => db_files}/chunks/CELL_MOTION.hexpat | 0 .../{ => db_files}/chunks/CELOBJVAR.hexpat | 0 .../{ => db_files}/chunks/CLOUDOBJVAR.hexpat | 0 .../{ => db_files}/chunks/DARKCOMBAT.hexpat | 0 .../{ => db_files}/chunks/DARKMISS.hexpat | 0 .../{ => db_files}/chunks/DISTOBJVAR.hexpat | 0 patterns/{ => db_files}/chunks/DRKSET.hexpat | 0 .../{ => db_files}/chunks/ENVMAPVAR.hexpat | 0 patterns/{ => db_files}/chunks/FAMILY.hexpat | 0 .../{ => db_files}/chunks/FILE_TYPE.hexpat | 0 .../{ => db_files}/chunks/FLOW_TEX.hexpat | 0 .../{ => db_files}/chunks/FOGZONEVAR.hexpat | 0 patterns/{ => db_files}/chunks/MAPISRC.hexpat | 0 .../chunks/Mission_GameSysEAX.hexpat | 0 .../{ => db_files}/chunks/RENDPARAMS.hexpat | 0 patterns/{ => db_files}/chunks/ROOM_DB.hexpat | 0 .../{ => db_files}/chunks/ROOM_EAX.hexpat | 0 patterns/{ => db_files}/chunks/SKYMODE.hexpat | 0 .../{ => db_files}/chunks/SKYOBJVAR.hexpat | 0 .../{ => db_files}/chunks/SONGPARAMS.hexpat | 0 .../{ => db_files}/chunks/STAROBJVAR.hexpat | 0 .../{ => db_files}/chunks/ScrModules.hexpat | 0 patterns/{ => db_files}/chunks/TILIST.hexpat | 0 patterns/{ => db_files}/chunks/TXLIST.hexpat | 0 .../{ => db_files}/chunks/TXTPAT_DB.hexpat | 0 .../{ => db_files}/chunks/WATERBANKS.hexpat | 0 .../{ => db_files}/chunks/WEATHERVAR.hexpat | 0 patterns/{ => db_files}/chunks/WREXT.hexpat | 0 patterns/lgtypes.hexpat | 55 -------------- 48 files changed, 145 insertions(+), 146 deletions(-) delete mode 100644 patterns/FileBase.hexpat create mode 100644 patterns/db_files/AllChunks.pat create mode 100644 patterns/db_files/Common.hexpat rename patterns/{ => db_files}/CowFile.hexpat (68%) create mode 100644 patterns/db_files/Utils.hexpat rename patterns/{ => db_files}/chunks/AIACS.hexpat (100%) rename patterns/{ => db_files}/chunks/AICONVERSE.hexpat (100%) rename patterns/{ => db_files}/chunks/AICRTSZ.hexpat (100%) rename patterns/{ => db_files}/chunks/AIGPTHVAR.hexpat (100%) rename patterns/{ => db_files}/chunks/AIHearStat.hexpat (100%) rename patterns/{ => db_files}/chunks/AIPATHVAR.hexpat (100%) rename patterns/{ => db_files}/chunks/AISNDTWK.hexpat (100%) rename patterns/{ => db_files}/chunks/AI_ROOM_DB.hexpat (100%) rename patterns/{ => db_files}/chunks/AMBIENT.hexpat (100%) rename patterns/{ => db_files}/chunks/BASH.hexpat (100%) rename patterns/{ => db_files}/chunks/BRHEAD.hexpat (100%) rename patterns/{ => db_files}/chunks/BRLIST.hexpat (100%) rename patterns/{ => db_files}/chunks/BRVER.hexpat (100%) rename patterns/{ => db_files}/chunks/CELL_MOTION.hexpat (100%) rename patterns/{ => db_files}/chunks/CELOBJVAR.hexpat (100%) rename patterns/{ => db_files}/chunks/CLOUDOBJVAR.hexpat (100%) rename patterns/{ => db_files}/chunks/DARKCOMBAT.hexpat (100%) rename patterns/{ => db_files}/chunks/DARKMISS.hexpat (100%) rename patterns/{ => db_files}/chunks/DISTOBJVAR.hexpat (100%) rename patterns/{ => db_files}/chunks/DRKSET.hexpat (100%) rename patterns/{ => db_files}/chunks/ENVMAPVAR.hexpat (100%) rename patterns/{ => db_files}/chunks/FAMILY.hexpat (100%) rename patterns/{ => db_files}/chunks/FILE_TYPE.hexpat (100%) rename patterns/{ => db_files}/chunks/FLOW_TEX.hexpat (100%) rename patterns/{ => db_files}/chunks/FOGZONEVAR.hexpat (100%) rename patterns/{ => db_files}/chunks/MAPISRC.hexpat (100%) rename patterns/{ => db_files}/chunks/Mission_GameSysEAX.hexpat (100%) rename patterns/{ => db_files}/chunks/RENDPARAMS.hexpat (100%) rename patterns/{ => db_files}/chunks/ROOM_DB.hexpat (100%) rename patterns/{ => db_files}/chunks/ROOM_EAX.hexpat (100%) rename patterns/{ => db_files}/chunks/SKYMODE.hexpat (100%) rename patterns/{ => db_files}/chunks/SKYOBJVAR.hexpat (100%) rename patterns/{ => db_files}/chunks/SONGPARAMS.hexpat (100%) rename patterns/{ => db_files}/chunks/STAROBJVAR.hexpat (100%) rename patterns/{ => db_files}/chunks/ScrModules.hexpat (100%) rename patterns/{ => db_files}/chunks/TILIST.hexpat (100%) rename patterns/{ => db_files}/chunks/TXLIST.hexpat (100%) rename patterns/{ => db_files}/chunks/TXTPAT_DB.hexpat (100%) rename patterns/{ => db_files}/chunks/WATERBANKS.hexpat (100%) rename patterns/{ => db_files}/chunks/WEATHERVAR.hexpat (100%) rename patterns/{ => db_files}/chunks/WREXT.hexpat (100%) delete mode 100644 patterns/lgtypes.hexpat diff --git a/patterns/Common.hexpat b/patterns/Common.hexpat index 39be3fd..d8342b2 100644 --- a/patterns/Common.hexpat +++ b/patterns/Common.hexpat @@ -3,4 +3,17 @@ struct Table { s32 size; T data; +}; + +struct Vec3 { + T x; + T y; + T z; +}; + +struct Vec4 { + T x; + T y; + T z; + T w; }; \ No newline at end of file diff --git a/patterns/FileBase.hexpat b/patterns/FileBase.hexpat deleted file mode 100644 index 2aaf173..0000000 --- a/patterns/FileBase.hexpat +++ /dev/null @@ -1,50 +0,0 @@ -#pragma once - -using TOCEntry; - -struct Version { - u32 major; - u32 minor; -}; - -struct FileHeader { - u32 toc_offset; - Version version; - padding[256]; - u32 deadbeef; -}; - -struct TableOfContents { - u32 item_count; - TOCEntry items[item_count]; -}; - -struct TOCEntry { - char name[12]; - u32 offset; - u32 size; -}; - -struct ChunkHeader { - char name[12]; - Version version; - padding[4]; -}; - -struct Chunk { - ChunkHeader header; - T data; -}; - -fn get_toc_entry(TableOfContents toc, str entry_name) { - for (u32 i = 0, i < toc.item_count, i = i + 1) { - if (std::string::starts_with(toc.items[i].name, entry_name)) { - return toc.items[i]; - } - } -}; - -fn get_offset(TableOfContents toc, str entry_name) { - TOCEntry entry = get_toc_entry(toc, entry_name); - return entry.offset; -}; \ No newline at end of file diff --git a/patterns/db_files/AllChunks.pat b/patterns/db_files/AllChunks.pat new file mode 100644 index 0000000..57e654b --- /dev/null +++ b/patterns/db_files/AllChunks.pat @@ -0,0 +1,43 @@ +#pragma once + +#include "db_files/chunks/AI_ROOM_DB.hexpat" +#include "db_files/chunks/AIACS.hexpat" +#include "db_files/chunks/AICONVERSE.hexpat" +#include "db_files/chunks/AICRTSZ.hexpat" +#include "db_files/chunks/AIGPTHVAR.hexpat" +#include "db_files/chunks/AIHearStat.hexpat" +#include "db_files/chunks/AIPATHVAR.hexpat" +#include "db_files/chunks/AISNDTWK.hexpat" +#include "db_files/chunks/AMBIENT.hexpat" +#include "db_files/chunks/BASH.hexpat" +#include "db_files/chunks/BRHEAD.hexpat" +#include "db_files/chunks/BRLIST.hexpat" +#include "db_files/chunks/BRVER.hexpat" +#include "db_files/chunks/CELL_MOTION.hexpat" +#include "db_files/chunks/CELOBJVAR.hexpat" +#include "db_files/chunks/CLOUDOBJVAR.hexpat" +#include "db_files/chunks/DARKCOMBAT.hexpat" +#include "db_files/chunks/DARKMISS.hexpat" +#include "db_files/chunks/DISTOBJVAR.hexpat" +#include "db_files/chunks/DRKSET.hexpat" +#include "db_files/chunks/ENVMAPVAR.hexpat" +#include "db_files/chunks/FAMILY.hexpat" +#include "db_files/chunks/FILE_TYPE.hexpat" +#include "db_files/chunks/FLOW_TEX.hexpat" +#include "db_files/chunks/FOGZONEVAR.hexpat" +#include "db_files/chunks/MAPISRC.hexpat" +#include "db_files/chunks/Mission_GameSysEAX.hexpat" +#include "db_files/chunks/RENDPARAMS.hexpat" +#include "db_files/chunks/ROOM_DB.hexpat" +#include "db_files/chunks/ROOM_EAX.hexpat" +#include "db_files/chunks/ScrModules.hexpat" +#include "db_files/chunks/SKYMODE.hexpat" +#include "db_files/chunks/SKYOBJVAR.hexpat" +#include "db_files/chunks/SONGPARAMS.hexpat" +#include "db_files/chunks/STAROBJVAR.hexpat" +#include "db_files/chunks/TILIST.hexpat" +#include "db_files/chunks/TXLIST.hexpat" +#include "db_files/chunks/TXTPAT_DB.hexpat" +#include "db_files/chunks/WATERBANKS.hexpat" +#include "db_files/chunks/WEATHERVAR.hexpat" +#include "db_files/chunks/WREXT.hexpat" \ No newline at end of file diff --git a/patterns/db_files/Common.hexpat b/patterns/db_files/Common.hexpat new file mode 100644 index 0000000..e7aef9f --- /dev/null +++ b/patterns/db_files/Common.hexpat @@ -0,0 +1,74 @@ +#pragma once + +struct Version { + u32 major; + u32 minor; +}; + +struct FileHeader { + u32 toc_offset; + Version version; + padding[256]; + u32 deadbeef; +}; + +struct TOCEntry { + char name[12]; + u32 offset; + u32 size; +}; + +struct TableOfContents { + u32 item_count; + TOCEntry items[item_count]; +}; + +struct ChunkHeader { + char name[12]; + Version version; + padding[4]; +}; + +struct Chunk { + ChunkHeader header; + T data; +}; + +struct Plane { + float x; + float y; + float z; + float d; +}; + +struct DPlane { + double x; + double y; + double z; + double d; +}; + +namespace NameNum { + struct Tag { + s32 value; + if (value != -1) { + s32 name_len; + if (name_len != -1) { + char name[name_len]; + } + } + }; + + struct Table { + // This header section is actually a tag too, but for namings sake I'll leave it like this + s32 max_names; + s32 sys_name_len; + char sys_name[sys_name_len]; + Tag tags[max_names]; + }; +} + +enum ColorMethod : s32 { + Sum = 0x0, + Interpolate = 0x1, +}; \ No newline at end of file diff --git a/patterns/CowFile.hexpat b/patterns/db_files/CowFile.hexpat similarity index 68% rename from patterns/CowFile.hexpat rename to patterns/db_files/CowFile.hexpat index 858e83e..75961c7 100644 --- a/patterns/CowFile.hexpat +++ b/patterns/db_files/CowFile.hexpat @@ -4,47 +4,7 @@ #include "FileBase.hexpat" #include "lgtypes.hexpat" -#include "chunks/AI_ROOM_DB.hexpat" -#include "chunks/AIACS.hexpat" -#include "chunks/AICONVERSE.hexpat" -#include "chunks/AICRTSZ.hexpat" -#include "chunks/AIGPTHVAR.hexpat" -#include "chunks/AIHearStat.hexpat" -#include "chunks/AIPATHVAR.hexpat" -#include "chunks/AISNDTWK.hexpat" -#include "chunks/AMBIENT.hexpat" -#include "chunks/BASH.hexpat" -#include "chunks/BRHEAD.hexpat" -#include "chunks/BRLIST.hexpat" -#include "chunks/BRVER.hexpat" -#include "chunks/CELL_MOTION.hexpat" -#include "chunks/CELOBJVAR.hexpat" -#include "chunks/CLOUDOBJVAR.hexpat" -#include "chunks/DARKCOMBAT.hexpat" -#include "chunks/DARKMISS.hexpat" -#include "chunks/DISTOBJVAR.hexpat" -#include "chunks/DRKSET.hexpat" -#include "chunks/ENVMAPVAR.hexpat" -#include "chunks/FAMILY.hexpat" -#include "chunks/FILE_TYPE.hexpat" -#include "chunks/FLOW_TEX.hexpat" -#include "chunks/FOGZONEVAR.hexpat" -#include "chunks/MAPISRC.hexpat" -#include "chunks/Mission_GameSysEAX.hexpat" -#include "chunks/RENDPARAMS.hexpat" -#include "chunks/ROOM_DB.hexpat" -#include "chunks/ROOM_EAX.hexpat" -#include "chunks/ScrModules.hexpat" -#include "chunks/SKYMODE.hexpat" -#include "chunks/SKYOBJVAR.hexpat" -#include "chunks/SONGPARAMS.hexpat" -#include "chunks/STAROBJVAR.hexpat" -#include "chunks/TILIST.hexpat" -#include "chunks/TXLIST.hexpat" -#include "chunks/TXTPAT_DB.hexpat" -#include "chunks/WATERBANKS.hexpat" -#include "chunks/WEATHERVAR.hexpat" -#include "chunks/WREXT.hexpat" +#include "db_files/AllChunks.pat" FileHeader file_header @ 0x0; TableOfContents toc @ file_header.toc_offset; diff --git a/patterns/db_files/Utils.hexpat b/patterns/db_files/Utils.hexpat new file mode 100644 index 0000000..5a11456 --- /dev/null +++ b/patterns/db_files/Utils.hexpat @@ -0,0 +1,14 @@ +#pragma once + +fn get_toc_entry(TableOfContents toc, str entry_name) { + for (u32 i = 0, i < toc.item_count, i = i + 1) { + if (std::string::starts_with(toc.items[i].name, entry_name)) { + return toc.items[i]; + } + } +}; + +fn get_offset(TableOfContents toc, str entry_name) { + TOCEntry entry = get_toc_entry(toc, entry_name); + return entry.offset; +}; \ No newline at end of file diff --git a/patterns/chunks/AIACS.hexpat b/patterns/db_files/chunks/AIACS.hexpat similarity index 100% rename from patterns/chunks/AIACS.hexpat rename to patterns/db_files/chunks/AIACS.hexpat diff --git a/patterns/chunks/AICONVERSE.hexpat b/patterns/db_files/chunks/AICONVERSE.hexpat similarity index 100% rename from patterns/chunks/AICONVERSE.hexpat rename to patterns/db_files/chunks/AICONVERSE.hexpat diff --git a/patterns/chunks/AICRTSZ.hexpat b/patterns/db_files/chunks/AICRTSZ.hexpat similarity index 100% rename from patterns/chunks/AICRTSZ.hexpat rename to patterns/db_files/chunks/AICRTSZ.hexpat diff --git a/patterns/chunks/AIGPTHVAR.hexpat b/patterns/db_files/chunks/AIGPTHVAR.hexpat similarity index 100% rename from patterns/chunks/AIGPTHVAR.hexpat rename to patterns/db_files/chunks/AIGPTHVAR.hexpat diff --git a/patterns/chunks/AIHearStat.hexpat b/patterns/db_files/chunks/AIHearStat.hexpat similarity index 100% rename from patterns/chunks/AIHearStat.hexpat rename to patterns/db_files/chunks/AIHearStat.hexpat diff --git a/patterns/chunks/AIPATHVAR.hexpat b/patterns/db_files/chunks/AIPATHVAR.hexpat similarity index 100% rename from patterns/chunks/AIPATHVAR.hexpat rename to patterns/db_files/chunks/AIPATHVAR.hexpat diff --git a/patterns/chunks/AISNDTWK.hexpat b/patterns/db_files/chunks/AISNDTWK.hexpat similarity index 100% rename from patterns/chunks/AISNDTWK.hexpat rename to patterns/db_files/chunks/AISNDTWK.hexpat diff --git a/patterns/chunks/AI_ROOM_DB.hexpat b/patterns/db_files/chunks/AI_ROOM_DB.hexpat similarity index 100% rename from patterns/chunks/AI_ROOM_DB.hexpat rename to patterns/db_files/chunks/AI_ROOM_DB.hexpat diff --git a/patterns/chunks/AMBIENT.hexpat b/patterns/db_files/chunks/AMBIENT.hexpat similarity index 100% rename from patterns/chunks/AMBIENT.hexpat rename to patterns/db_files/chunks/AMBIENT.hexpat diff --git a/patterns/chunks/BASH.hexpat b/patterns/db_files/chunks/BASH.hexpat similarity index 100% rename from patterns/chunks/BASH.hexpat rename to patterns/db_files/chunks/BASH.hexpat diff --git a/patterns/chunks/BRHEAD.hexpat b/patterns/db_files/chunks/BRHEAD.hexpat similarity index 100% rename from patterns/chunks/BRHEAD.hexpat rename to patterns/db_files/chunks/BRHEAD.hexpat diff --git a/patterns/chunks/BRLIST.hexpat b/patterns/db_files/chunks/BRLIST.hexpat similarity index 100% rename from patterns/chunks/BRLIST.hexpat rename to patterns/db_files/chunks/BRLIST.hexpat diff --git a/patterns/chunks/BRVER.hexpat b/patterns/db_files/chunks/BRVER.hexpat similarity index 100% rename from patterns/chunks/BRVER.hexpat rename to patterns/db_files/chunks/BRVER.hexpat diff --git a/patterns/chunks/CELL_MOTION.hexpat b/patterns/db_files/chunks/CELL_MOTION.hexpat similarity index 100% rename from patterns/chunks/CELL_MOTION.hexpat rename to patterns/db_files/chunks/CELL_MOTION.hexpat diff --git a/patterns/chunks/CELOBJVAR.hexpat b/patterns/db_files/chunks/CELOBJVAR.hexpat similarity index 100% rename from patterns/chunks/CELOBJVAR.hexpat rename to patterns/db_files/chunks/CELOBJVAR.hexpat diff --git a/patterns/chunks/CLOUDOBJVAR.hexpat b/patterns/db_files/chunks/CLOUDOBJVAR.hexpat similarity index 100% rename from patterns/chunks/CLOUDOBJVAR.hexpat rename to patterns/db_files/chunks/CLOUDOBJVAR.hexpat diff --git a/patterns/chunks/DARKCOMBAT.hexpat b/patterns/db_files/chunks/DARKCOMBAT.hexpat similarity index 100% rename from patterns/chunks/DARKCOMBAT.hexpat rename to patterns/db_files/chunks/DARKCOMBAT.hexpat diff --git a/patterns/chunks/DARKMISS.hexpat b/patterns/db_files/chunks/DARKMISS.hexpat similarity index 100% rename from patterns/chunks/DARKMISS.hexpat rename to patterns/db_files/chunks/DARKMISS.hexpat diff --git a/patterns/chunks/DISTOBJVAR.hexpat b/patterns/db_files/chunks/DISTOBJVAR.hexpat similarity index 100% rename from patterns/chunks/DISTOBJVAR.hexpat rename to patterns/db_files/chunks/DISTOBJVAR.hexpat diff --git a/patterns/chunks/DRKSET.hexpat b/patterns/db_files/chunks/DRKSET.hexpat similarity index 100% rename from patterns/chunks/DRKSET.hexpat rename to patterns/db_files/chunks/DRKSET.hexpat diff --git a/patterns/chunks/ENVMAPVAR.hexpat b/patterns/db_files/chunks/ENVMAPVAR.hexpat similarity index 100% rename from patterns/chunks/ENVMAPVAR.hexpat rename to patterns/db_files/chunks/ENVMAPVAR.hexpat diff --git a/patterns/chunks/FAMILY.hexpat b/patterns/db_files/chunks/FAMILY.hexpat similarity index 100% rename from patterns/chunks/FAMILY.hexpat rename to patterns/db_files/chunks/FAMILY.hexpat diff --git a/patterns/chunks/FILE_TYPE.hexpat b/patterns/db_files/chunks/FILE_TYPE.hexpat similarity index 100% rename from patterns/chunks/FILE_TYPE.hexpat rename to patterns/db_files/chunks/FILE_TYPE.hexpat diff --git a/patterns/chunks/FLOW_TEX.hexpat b/patterns/db_files/chunks/FLOW_TEX.hexpat similarity index 100% rename from patterns/chunks/FLOW_TEX.hexpat rename to patterns/db_files/chunks/FLOW_TEX.hexpat diff --git a/patterns/chunks/FOGZONEVAR.hexpat b/patterns/db_files/chunks/FOGZONEVAR.hexpat similarity index 100% rename from patterns/chunks/FOGZONEVAR.hexpat rename to patterns/db_files/chunks/FOGZONEVAR.hexpat diff --git a/patterns/chunks/MAPISRC.hexpat b/patterns/db_files/chunks/MAPISRC.hexpat similarity index 100% rename from patterns/chunks/MAPISRC.hexpat rename to patterns/db_files/chunks/MAPISRC.hexpat diff --git a/patterns/chunks/Mission_GameSysEAX.hexpat b/patterns/db_files/chunks/Mission_GameSysEAX.hexpat similarity index 100% rename from patterns/chunks/Mission_GameSysEAX.hexpat rename to patterns/db_files/chunks/Mission_GameSysEAX.hexpat diff --git a/patterns/chunks/RENDPARAMS.hexpat b/patterns/db_files/chunks/RENDPARAMS.hexpat similarity index 100% rename from patterns/chunks/RENDPARAMS.hexpat rename to patterns/db_files/chunks/RENDPARAMS.hexpat diff --git a/patterns/chunks/ROOM_DB.hexpat b/patterns/db_files/chunks/ROOM_DB.hexpat similarity index 100% rename from patterns/chunks/ROOM_DB.hexpat rename to patterns/db_files/chunks/ROOM_DB.hexpat diff --git a/patterns/chunks/ROOM_EAX.hexpat b/patterns/db_files/chunks/ROOM_EAX.hexpat similarity index 100% rename from patterns/chunks/ROOM_EAX.hexpat rename to patterns/db_files/chunks/ROOM_EAX.hexpat diff --git a/patterns/chunks/SKYMODE.hexpat b/patterns/db_files/chunks/SKYMODE.hexpat similarity index 100% rename from patterns/chunks/SKYMODE.hexpat rename to patterns/db_files/chunks/SKYMODE.hexpat diff --git a/patterns/chunks/SKYOBJVAR.hexpat b/patterns/db_files/chunks/SKYOBJVAR.hexpat similarity index 100% rename from patterns/chunks/SKYOBJVAR.hexpat rename to patterns/db_files/chunks/SKYOBJVAR.hexpat diff --git a/patterns/chunks/SONGPARAMS.hexpat b/patterns/db_files/chunks/SONGPARAMS.hexpat similarity index 100% rename from patterns/chunks/SONGPARAMS.hexpat rename to patterns/db_files/chunks/SONGPARAMS.hexpat diff --git a/patterns/chunks/STAROBJVAR.hexpat b/patterns/db_files/chunks/STAROBJVAR.hexpat similarity index 100% rename from patterns/chunks/STAROBJVAR.hexpat rename to patterns/db_files/chunks/STAROBJVAR.hexpat diff --git a/patterns/chunks/ScrModules.hexpat b/patterns/db_files/chunks/ScrModules.hexpat similarity index 100% rename from patterns/chunks/ScrModules.hexpat rename to patterns/db_files/chunks/ScrModules.hexpat diff --git a/patterns/chunks/TILIST.hexpat b/patterns/db_files/chunks/TILIST.hexpat similarity index 100% rename from patterns/chunks/TILIST.hexpat rename to patterns/db_files/chunks/TILIST.hexpat diff --git a/patterns/chunks/TXLIST.hexpat b/patterns/db_files/chunks/TXLIST.hexpat similarity index 100% rename from patterns/chunks/TXLIST.hexpat rename to patterns/db_files/chunks/TXLIST.hexpat diff --git a/patterns/chunks/TXTPAT_DB.hexpat b/patterns/db_files/chunks/TXTPAT_DB.hexpat similarity index 100% rename from patterns/chunks/TXTPAT_DB.hexpat rename to patterns/db_files/chunks/TXTPAT_DB.hexpat diff --git a/patterns/chunks/WATERBANKS.hexpat b/patterns/db_files/chunks/WATERBANKS.hexpat similarity index 100% rename from patterns/chunks/WATERBANKS.hexpat rename to patterns/db_files/chunks/WATERBANKS.hexpat diff --git a/patterns/chunks/WEATHERVAR.hexpat b/patterns/db_files/chunks/WEATHERVAR.hexpat similarity index 100% rename from patterns/chunks/WEATHERVAR.hexpat rename to patterns/db_files/chunks/WEATHERVAR.hexpat diff --git a/patterns/chunks/WREXT.hexpat b/patterns/db_files/chunks/WREXT.hexpat similarity index 100% rename from patterns/chunks/WREXT.hexpat rename to patterns/db_files/chunks/WREXT.hexpat diff --git a/patterns/lgtypes.hexpat b/patterns/lgtypes.hexpat deleted file mode 100644 index 84a2c1b..0000000 --- a/patterns/lgtypes.hexpat +++ /dev/null @@ -1,55 +0,0 @@ -#pragma once - -using Vec3; -using NameNum; -using NameNumTag; - -struct Plane { - float x; - float y; - float z; - float d; -}; - -struct DPlane { - double x; - double y; - double z; - double d; -}; - -struct Vec3 { - T x; - T y; - T z; -}; - -struct Vec4 { - T x; - T y; - T z; - T w; -}; - -struct NameNum { - // This header section is actually a tag too, but for namings sake I'll leave it like this - s32 max_names; - s32 sys_name_len; - char sys_name[sys_name_len]; - NameNumTag tags[max_names]; -}; - -struct NameNumTag { - s32 value; - if (value != -1) { - s32 name_len; - if (name_len != -1) { - char name[name_len]; - } - } -}; - -enum ColorMethod : s32 { - Sum = 0x0, - Interpolate = 0x1, -}; \ No newline at end of file