Add cell weather

This commit is contained in:
Jarrod Doyle 2025-03-09 20:27:06 +00:00
parent 96bca0fac7
commit c01502f218
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 10 additions and 2 deletions

View File

@ -19,6 +19,7 @@ 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;
@ -32,7 +33,7 @@ struct WrExt {
WrHeader header; WrHeader header;
WrCell cells[header.cell_count]; WrCell cells[header.cell_count];
WrBspTree bsp_tree; WrBspTree bsp_tree;
padding[header.cell_count]; // This is suspicious. Fog? SEE VFIGS MISSDEEDS!! WrCellWeather weather[header.cell_count];
WrLightTable lights; WrLightTable lights;
WrCsgCellTable csg_cell_table; WrCsgCellTable csg_cell_table;
}; };
@ -147,7 +148,9 @@ 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 {
@ -178,6 +181,11 @@ 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;