Add Relations chunk pattern

This commit is contained in:
Jarrod Doyle 2024-08-23 15:25:08 +01:00
parent f0de440e06
commit bcf7013cdb
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
3 changed files with 15 additions and 0 deletions

View File

@ -32,6 +32,7 @@
#include "db_files/chunks/MultiBrush.hexpat" #include "db_files/chunks/MultiBrush.hexpat"
#include "db_files/chunks/OBJ_MAP.hexpat" #include "db_files/chunks/OBJ_MAP.hexpat"
#include "db_files/chunks/P$_.hexpat" #include "db_files/chunks/P$_.hexpat"
#include "db_files/chunks/Relations.hexpat"
#include "db_files/chunks/RENDPARAMS.hexpat" #include "db_files/chunks/RENDPARAMS.hexpat"
#include "db_files/chunks/ROOM_DB.hexpat" #include "db_files/chunks/ROOM_DB.hexpat"
#include "db_files/chunks/ROOM_EAX.hexpat" #include "db_files/chunks/ROOM_EAX.hexpat"

View File

@ -70,6 +70,7 @@ struct TOCEntry {
("MissionEAX"): Chunk<AccousticsProperty> mission_eax @ offset; ("MissionEAX"): Chunk<AccousticsProperty> mission_eax @ offset;
("MultiBrush"): Chunk<MultiBrush> multibrush @ offset; ("MultiBrush"): Chunk<MultiBrush> multibrush @ offset;
("OBJ_MAP"): Chunk<ObjMap> obj_map @ offset; ("OBJ_MAP"): Chunk<ObjMap> obj_map @ offset;
("Relations"): Chunk<Relations> relations @ offset;
("RENDPARAMS"): Chunk<RendParams> rend_params @ offset; ("RENDPARAMS"): Chunk<RendParams> rend_params @ offset;
("ROOM_DB"): Chunk<RoomDb> room_db @ offset; ("ROOM_DB"): Chunk<RoomDb> room_db @ offset;
("ROOM_EAX"): Chunk<RoomEax> room_eax @ offset; ("ROOM_EAX"): Chunk<RoomEax> room_eax @ offset;

View File

@ -0,0 +1,13 @@
#pragma once
#include <std/io.pat>
struct RelationString {
char name[];
$ = $ + 32 - std::string::length(name);
};
struct Relations {
u32 max = parent.parent.data_end;
RelationString relations[while($ < max)];
};