DO/LIT

From Dark Omen Wiki

< DO
Revision as of 17:13, 13 August 2008 by 86.157.243.227 (Talk)
Jump to: navigation, search

The LIT file seems to contain information about the lighting of the map. A quick attempt at breaking this file down follows:

struct Header
{
    int version;  (=1)
    int numberOfLightsInFile;
}
struct Light
{
    signed int X, Y, Z;
    int unknown1, unknown2;
    int color1, color2, color3;
}


The LIT file consists of a number of light entries

The first four bytes is the file version

The next four bytes is the number of light records


So now we need to compare the maps against the text output to determine what the "unknown1"

and "unknown2" values really represent

Each light record has first 16 bytes (3x4 bytes) with positional data, ignore these

The next two DWORD entries (a DWORD == four bytes) are the unknown1 and unknown2 values

we're talking about

Then there is an additional 12 bytes (4x3) that seems to be colour info

that's a colour entry

Examing B1_01.LIT

0: pos = [-4.04,11.00,-9.93]; data1 = 38; data2 = 0; colour = (256,256,256) 1: pos = [27.57,60.00,22.21]; data1 = 33; data2 = 34; colour = (1280,1280,1280) 2: pos = [-6.41,35.00,-9.86]; data1 = 22; data2 = 0; colour = (166,166,166)


This shows B1_01.LIT in WinHex to show all data values

[URL=my.php?image=b101litvk0.jpg][IMG]b101litvk0.th.jpg[/IMG][/URL]

my.php?image=b101litvk0.jpg

Looking at the picture, in it offset 0 - 3 is a DWORD specifying the file version (in this case "1")

Offset 4--7 is a dword with the # of lights in the scene

"3" here

Then offset 8 - 19 is the 3D position of the light (encoded in Dark Omen position format)

20 -- 23 is the "unknown1" value

24 -- 27 is the "unknown2" value

These two are the most interesting

28 -- 31 is a dword with the red colour component (here 0x00010000 == dec 256 )

Then 32 -- 39 are the green and blue colour values dwords

Then at offset 40 then next light entry starts

it is formatted exactly the same as the first

and at offs 72 the last entry starts


Every map has one light with unknown1 set to 38 and unknown2 set to 0

It is always the first light in the LIT file (light #0)

EXCEPT for B4_10, B5_01, B5_01B and SPARE9

All maps have at least 2 lights, there is none with only one

Some maps have lights of unknown1==38 with unknown2 != 0



Altering Data Value 26 to 00

Had the result of making Mission 1 Dark

my.php?image=b101data100is2.jpg

and for Comparison, the Original

my.php?image=b101data126origvz0.jpg

I have been working under the assumption that there will be direcitonal light in Dark Omen,

and that one light entry will be the source and one the target (==direction), but perhaps

there are only omnilights?



Further testing suggests that this could be a kind of id

So the game looks for the first value and loads a grafical light effect with the id 26


The next check would be, what happens in a dark game if we change the original id to 26

Personal tools
communication