Sonic Adventure 2/Level Data Formats
From Sonic Retro
|SCHG: Sonic Adventure 2|
LandTable header format
This struct defines the number of models and animations in the level, the location of the corresponding lists, and the texture list used. The name comes from the label in the DLL Export table of various DLLs in the PC versions of Sonic Adventure DX and Sonic Adventure 2.
|2||Short||Chunk Model Count|
|C||Float||Unknown, usually 3000|
|18||Pointer|| Texture file name. Optional.
If not null, a PVM with this name will be loaded to the address pointed to by the texture list pointer.
The number of models indicated by the Chunk Model Count will be using the Chunk Model, and any models after that will be using the Basic Model. Generally, the visible models are nonsolid chunk models, and collision is solid basic models. In Battle, the main LandTables use a new model format in place of the Chunk Model.
The name COL is an antiquated misnomer, but for lack of a better name, it stuck. This data struct is a reference for loading a level model. It's 0x20 bytes long and works as follows:
|0||Float||Center of collision sphere|
|C||Float||Radius of collision sphere|
|10||Pointer||Model (OBJECT Struct)|
|1C||Int||Surface Flags (see below)|
These flags are not entirely figured out yet, but here's what is known for sure:
0x00000001 = Solid
0x00000002 = Ripple effect Chao Garden (ignores Solid bit?)
0x00000020 = Diggable
0x80000000 = Visible