EvilEngine/LKIT: Difference between revisions

From Heavy Iron Modding
Content added Content deleted
No edit summary
No edit summary
Line 2: Line 2:
|subtitle=LightKit
|subtitle=LightKit
|type=[[Binary]]
|type=[[Binary]]
|games=Battle for Bikini Bottom<br>The SpongeBob SquarePants Movie<br>The Incredibles<br>Rise of the Underminer}}
|games=Battle for Bikini Bottom<br>The SpongeBob SquarePants Movie<br>The Incredibles<br>Rise of the Underminer
|sourcecode=[https://github.com/bfbbdecomp/bfbb/blob/master/src/Core/x/xLightKit.h xLightKit.h]}}


==Format==
==Format==

Revision as of 20:16, 30 March 2021

LKIT
LightKit
TypeBinary
Games usedThe Incredibles
Source codexLightKit.h

Format

Header:

Offset Type Description
0x00 char[4] "TIKL"
0x04 int null
0x08 int Number of Lights
0x0C int null

Light:

Offset Type Description
0x00 int Type
  • 1 - Ambient light
  • 2 - Directional light
0x04 Vector3 Color (BGR)
0x10 float unknown (always 1)
0x14 Vector3 unknown
0x20 float unknown (always 0)
0x24 Vector3 unknown
0x30 float unknown (always 0)
0x34 Vector3 Direction
0x40 float unknown (always 0)
0x44 Vector3 unknown
0x50 float unknown (always 0 for ambient lights, 1 for directional lights)
0x54 Vector3 unknown

Color values are in BGR order (Blue, Green, Red). In BFBB, these get automatically normalized to values between 0 and 1.

The direction vector determines what direction a directional light will point to. This does not point to a particular spot, but rather at an angle all throughout the map. These values can be positive or negative.

The other vectors serve no apparent purpose.