diff --git a/docs/SR2/formats/chunks/g_chunk_pc.md b/docs/SR2/formats/chunks/g_chunk_pc.md new file mode 100644 index 0000000..dd2f6f9 --- /dev/null +++ b/docs/SR2/formats/chunks/g_chunk_pc.md @@ -0,0 +1,17 @@ +# g_chunk_pc + +The GPU chunk file only contains vertex and index buffers. The file consists of two major parts: + +## Shared buffers section +Massive shared vertex and index buffers for static world geometry. + +Contents: + +- 0..n vertex buffers for each type of vertex. Type means the number of UV's and such in a vertex. +- A single index buffer for the above vertex buffers. + +## Individual models section + +- The CPU chunk header contains a pointer to this section. +- The contents is obviously a bunch of models, but where exactly are the headers is not fully figured out. +- The shared buffer seems to return garbage for all "loose" and destroyable objects, so it's probably safe to assume this section is the one holding them instead. \ No newline at end of file diff --git a/docs/SR2/formats/chunkfiles.md b/docs/SR2/formats/chunks/index.md similarity index 99% rename from docs/SR2/formats/chunkfiles.md rename to docs/SR2/formats/chunks/index.md index 9c07b03..f6c95b8 100644 --- a/docs/SR2/formats/chunkfiles.md +++ b/docs/SR2/formats/chunks/index.md @@ -1,4 +1,4 @@ -# Chunkfiles +# Chunks !!! note "File extensions" `.chunk_pc` `.g_chunk_pc` @@ -105,5 +105,3 @@ char texture_names[num_textures];// // ``` - -## .g_chunk_pc layout \ No newline at end of file diff --git a/docs/SR2/formats/index.md b/docs/SR2/formats/index.md index d6b7a58..2f34c1b 100644 --- a/docs/SR2/formats/index.md +++ b/docs/SR2/formats/index.md @@ -4,7 +4,7 @@ | ------------- | --------------------------------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------- | | Animation | `.anim_pc` `.rig_pc` | | | | Audio | `.xsb` `.xwb` `xgs` | XACT Sound Bank, Wave Bank, Settings | | -| Chunkfile | `.chunk_pc` `.g_chunk_pc` | World data | [`SR2_Chonker`](../../tools/sr2_chonker) [`SR2_ChunksTextureTool`](../../tools/sr2chunkstexturetool) | +| Chunks | `.chunk_pc` `.g_chunk_pc` | World data | [`SR2_Chonker`](../../tools/sr2_chonker) [`SR2_ChunksTextureTool`](../../tools/sr2chunkstexturetool) | | Cityfile | `.city_pc` | Chunk directory | | | Cloth sim | `.sim_pc` | Cloth simulation file | | | Coordinate | `.cts` | | [`SR2_CTS_Mapper`](../../tools/sr2ctsmapper) |