Compare commits
No commits in common. "d144a1c805064bacfc9efc08ee622d200280310a" and "4abe815220055a04d4bb3c8ba124c1f49b487b84" have entirely different histories.
d144a1c805
...
4abe815220
|
@ -4,15 +4,9 @@
|
||||||
|
|
||||||
// TODO: All these types should be enums lol
|
// TODO: All these types should be enums lol
|
||||||
|
|
||||||
enum ObjectType : u8 {
|
|
||||||
Static,
|
|
||||||
Rotating,
|
|
||||||
Sliding,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Object {
|
struct Object {
|
||||||
char name[8];
|
char name[8];
|
||||||
ObjectType type;
|
u8 type;
|
||||||
s32 parameter;
|
s32 parameter;
|
||||||
float min_range;
|
float min_range;
|
||||||
float max_range;
|
float max_range;
|
||||||
|
@ -47,19 +41,8 @@ struct AuxMaterialInfo {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
enum VHotId : u32 {
|
|
||||||
LightPosition = 1,
|
|
||||||
LightDirection = 8,
|
|
||||||
Anchor = 2,
|
|
||||||
Particle1 = 3,
|
|
||||||
Particle2 = 4,
|
|
||||||
Particle3 = 5,
|
|
||||||
Particle4 = 6,
|
|
||||||
Particle5 = 7,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct VHot {
|
struct VHot {
|
||||||
VHotId id;
|
u32 id;
|
||||||
Vec3<float> location;
|
Vec3<float> location;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#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/LD$_.hexpat"
|
||||||
#include "db_files/chunks/LM_PARAM.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"
|
||||||
|
|
|
@ -66,7 +66,6 @@ struct TOCEntry {
|
||||||
("FOGZONEVAR"): Chunk<FogZoneVar> fog_zone_var @ offset;
|
("FOGZONEVAR"): Chunk<FogZoneVar> fog_zone_var @ offset;
|
||||||
("GameSysEAX"): Chunk<AccousticsProperty> gamesys_eax @ offset;
|
("GameSysEAX"): Chunk<AccousticsProperty> gamesys_eax @ offset;
|
||||||
("HotRegions"): Chunk<HotRegions> hot_regions @ offset;
|
("HotRegions"): Chunk<HotRegions> hot_regions @ offset;
|
||||||
("LM_PARAM"): Chunk<LmParams> lm_params @ offset;
|
|
||||||
("MAPISRC"): Chunk<MapISrc> map_i_src @ offset;
|
("MAPISRC"): Chunk<MapISrc> map_i_src @ offset;
|
||||||
("MissionEAX"): Chunk<AccousticsProperty> mission_eax @ offset;
|
("MissionEAX"): Chunk<AccousticsProperty> mission_eax @ offset;
|
||||||
("MultiBrush"): Chunk<MultiBrush> multibrush @ offset;
|
("MultiBrush"): Chunk<MultiBrush> multibrush @ offset;
|
||||||
|
@ -93,9 +92,11 @@ struct TOCEntry {
|
||||||
}
|
}
|
||||||
else if (std::string::starts_with(name, "LD$")) {
|
else if (std::string::starts_with(name, "LD$")) {
|
||||||
Chunk<LinkDataChunk> link_data @ offset [[name(name)]];
|
Chunk<LinkDataChunk> link_data @ offset [[name(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);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
std::print("Didn't load chunk: {}", name);
|
std::print("Didn't load chunk: {}", name);
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Common.hexpat"
|
|
||||||
|
|
||||||
struct LmParams {
|
|
||||||
u32 unknown1; // I think this is struct size (seemingly always 36)
|
|
||||||
float attenuation;
|
|
||||||
float saturation;
|
|
||||||
u32 shadow_type; // TODO: Enum
|
|
||||||
u32 softness; // TODO: Enum
|
|
||||||
float center_weight;
|
|
||||||
u32 depth_mode; // TODO: Enum (16, 32, 32-2x)
|
|
||||||
bool lightmapped_water;
|
|
||||||
padding[3];
|
|
||||||
s32 lightmap_scale;
|
|
||||||
u32 animlight_cutoff;
|
|
||||||
};
|
|
|
@ -19,7 +19,6 @@ using WrLightMapDataPixel;
|
||||||
using WrBspTree;
|
using WrBspTree;
|
||||||
using WrBspTreeNode;
|
using WrBspTreeNode;
|
||||||
using WrBspTreeCellPlane;
|
using WrBspTreeCellPlane;
|
||||||
using WrCellWeather;
|
|
||||||
using WrLightTable;
|
using WrLightTable;
|
||||||
using WrLightTableData;
|
using WrLightTableData;
|
||||||
using WrLightTableAnimLight;
|
using WrLightTableAnimLight;
|
||||||
|
@ -33,7 +32,7 @@ struct WrExt {
|
||||||
WrHeader header;
|
WrHeader header;
|
||||||
WrCell cells[header.cell_count];
|
WrCell cells[header.cell_count];
|
||||||
WrBspTree bsp_tree;
|
WrBspTree bsp_tree;
|
||||||
WrCellWeather weather[header.cell_count];
|
padding[header.cell_count]; // This is suspicious. Fog? SEE VFIGS MISSDEEDS!!
|
||||||
WrLightTable lights;
|
WrLightTable lights;
|
||||||
WrCsgCellTable csg_cell_table;
|
WrCsgCellTable csg_cell_table;
|
||||||
};
|
};
|
||||||
|
@ -148,9 +147,7 @@ struct WrLightMap {
|
||||||
|
|
||||||
u32 count = 1 + std::bit::popcount(parent.p_light_list[i].anim_light_bitmask);
|
u32 count = 1 + std::bit::popcount(parent.p_light_list[i].anim_light_bitmask);
|
||||||
u32 bytes_per_pixel = parent.parent.header.bytes_per_pixel;
|
u32 bytes_per_pixel = parent.parent.header.bytes_per_pixel;
|
||||||
// WrLightMapLayer layers[count];
|
WrLightMapLayer layers[count];
|
||||||
// u8 pixels[count * width * height * bytes_per_pixel];
|
|
||||||
padding[count * width * height * bytes_per_pixel];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct WrLightMapLayer {
|
struct WrLightMapLayer {
|
||||||
|
@ -181,11 +178,6 @@ struct WrBspTreeCellPlane {
|
||||||
s32 plane_id;
|
s32 plane_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
bitfield WrCellWeather {
|
|
||||||
fog_zone : 4; // No fog and fog zone 0 share a value. Cells have flags & 64 if they're foggy
|
|
||||||
ambient_zone : 4;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct WrLightTable {
|
struct WrLightTable {
|
||||||
s32 light_count;
|
s32 light_count;
|
||||||
s32 dynamic_light_count;
|
s32 dynamic_light_count;
|
||||||
|
|
Loading…
Reference in New Issue