Add property chunk pattern

This commit is contained in:
Jarrod Doyle 2024-08-23 12:09:42 +01:00
parent b17ecb3f3d
commit 7fa4db7f4f
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
3 changed files with 19 additions and 1 deletions

View File

@ -30,6 +30,7 @@
#include "db_files/chunks/Mission_GameSysEAX.hexpat" #include "db_files/chunks/Mission_GameSysEAX.hexpat"
#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/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

@ -59,4 +59,7 @@ Chunk<TxList> texture_list @ get_offset(toc, "TXLIST");
Chunk<TexturePatchDatabase> texture_patch_database @ get_offset(toc, "TXTPAT_DB"); Chunk<TexturePatchDatabase> texture_patch_database @ get_offset(toc, "TXTPAT_DB");
Chunk<WaterBanks> water_banks @ get_offset(toc, "WATERBANKS"); Chunk<WaterBanks> water_banks @ get_offset(toc, "WATERBANKS");
Chunk<WeatherVar> weather_var @ get_offset(toc, "WEATHERVAR"); Chunk<WeatherVar> weather_var @ get_offset(toc, "WEATHERVAR");
Chunk<WrExt> world_rep @ get_offset(toc, "WREXT"); Chunk<WrExt> world_rep @ get_offset(toc, "WREXT");
// TODO: Have a nice function for doing all of these?
Chunk<PropertyMap> p_model_name @ get_offset(toc, "P$ModelName");

View File

@ -0,0 +1,14 @@
#pragma once
#include "Common.hexpat"
struct ObjectProperty {
s32 obj_id;
u32 data_size;
u8 data[data_size];
};
struct PropertyMap {
u32 max = get_end(toc, parent.header.name);
ObjectProperty props[while($ < max)];
};