Sonic Heroes/Light Editing
From Sonic Retro
|SCHG: Sonic Heroes|
Light layouts are stored in big endian sLL_light.bin (or stgLL_light.bin) files, where LL is the level number. On PC and Xbox, they are located in the /dvdroot folder. For Shadow the Hedgehog, the same format is used in little endian.
Each light entry is 0x34 bytes long, and there are 19 entries in each Heroes file, 16 for a Shadow file. Some entries may be blank for some stages, though they can be utilized by objects. The 0x34 bytes of each entry are divided into variables which occupy 4 bytes of space, for a total of 15 variables. They are either float32s, float16s, or U16s.
Float values should be between 0 and 1.0f although negative values and values over 1 will behave as logic would dictate. There's a hard limit on those, but I don't know what at this time. Rotations are zeroed out at -Z. Vertical rotation rotates up from this vector while horizontal rotation rotates right from it.
|0x20||Float||Unknown 0-1.0F Value|
|0x24||Float||Unknown 0-1.0F Value|
|0x28||Float||Unknown 0-1.0F Value|
|0x2C||Float16?||Unknown for 3rd set of floats?|
|0x2E||Uint16||Vertical Rotation 0-360 Euler Angle. Will accept angles beyond 360.|
|0x30||Float16?||Unknown for 3rd set of floats?|
|0x32||Uint16||Horizontal Rotation 0-360 Euler Angle. Will accept angles beyond 360.|