Really janky link data pattern
This commit is contained in:
parent
523f94206b
commit
4abe815220
|
@ -27,6 +27,7 @@
|
||||||
#include "db_files/chunks/FOGZONEVAR.hexpat"
|
#include "db_files/chunks/FOGZONEVAR.hexpat"
|
||||||
#include "db_files/chunks/HotRegions.hexpat"
|
#include "db_files/chunks/HotRegions.hexpat"
|
||||||
#include "db_files/chunks/L$_.hexpat"
|
#include "db_files/chunks/L$_.hexpat"
|
||||||
|
#include "db_files/chunks/LD$_.hexpat"
|
||||||
#include "db_files/chunks/MAPISRC.hexpat"
|
#include "db_files/chunks/MAPISRC.hexpat"
|
||||||
#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"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#pragma pattern_limit 262144
|
#pragma pattern_limit 523288
|
||||||
|
|
||||||
#include <std/string.pat>
|
#include <std/string.pat>
|
||||||
#include <std/io.pat>
|
#include <std/io.pat>
|
||||||
|
@ -90,9 +90,10 @@ struct TOCEntry {
|
||||||
if (std::string::starts_with(name, "P$")) {
|
if (std::string::starts_with(name, "P$")) {
|
||||||
Chunk<PropertyMap> property_chunk @ offset [[name(name)]];
|
Chunk<PropertyMap> property_chunk @ offset [[name(name)]];
|
||||||
}
|
}
|
||||||
// if (std::string::starts_with(name, "LD$")) {
|
else if (std::string::starts_with(name, "LD$")) {
|
||||||
|
Chunk<LinkDataChunk> link_data @ offset [[name(name)]];
|
||||||
// std::print("LD: {}", name);
|
// std::print("LD: {}", name);
|
||||||
// }
|
}
|
||||||
else if (std::string::starts_with(name, "L$")) {
|
else if (std::string::starts_with(name, "L$")) {
|
||||||
Chunk<LinkMap> link_chunk @ offset [[name(name)]];
|
Chunk<LinkMap> link_chunk @ offset [[name(name)]];
|
||||||
// std::print("L: {}", name);
|
// std::print("L: {}", name);
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "db_files/chunks/L$_.hexpat"
|
||||||
|
|
||||||
|
struct LinkData {
|
||||||
|
LinkId id;
|
||||||
|
u8 data[parent.real_data_size];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct LinkDataChunk {
|
||||||
|
s32 data_size;
|
||||||
|
// I have no idea why there are these exceptions
|
||||||
|
match (parent.parent.name) {
|
||||||
|
("LD$arSrcDes"): s32 real_data_size = 108;
|
||||||
|
("LD$Receptro"): s32 real_data_size = 88;
|
||||||
|
(_): s32 real_data_size = data_size;
|
||||||
|
}
|
||||||
|
u32 max = parent.parent.data_end;
|
||||||
|
LinkData data[while($ < max)];
|
||||||
|
};
|
Loading…
Reference in New Issue