DO/LIT

From Dark Omen Wiki

(Difference between revisions)
Jump to: navigation, search
(Added some Styles)
Line 1: Line 1:
 +
== Structure ==
 +
The LIT file seems to contain information about the lighting of the map.  A quick attempt at breaking this file down follows:
The LIT file seems to contain information about the lighting of the map.  A quick attempt at breaking this file down follows:
Line 17: Line 19:
See Discussion for Full Listing.
See Discussion for Full Listing.
 +
== Values ==
 +
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.
-
The LIT file consists of a number of light entries
+
Each light record has 32 bytes. The first 12 bytes stand for the positional datas. The next two DWORD (a DWORD == four bytes) are the unknown values(called ''unknown1'' and ''unknown2'' in the following). Then there is an additional 12 bytes (4x3) that seems to be colour info (Red, Green, Blue). So now we need to compare the maps against the text output to determine what the "unknown1" and "unknown2" values really represent. Perhaps ''unknown1'' is an ID to start any light effects in the game (not sure).
-
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)
 
 +
=== Examing B1_01.LIT ===
This shows B1_01.LIT in WinHex to show all data values
This shows B1_01.LIT in WinHex to show all data values
-
[URL=http://img361.imageshack.us/my.php?image=b101litvk0.jpg][IMG]http://img361.imageshack.us/img361/4561/b101litvk0.th.jpg[/IMG][/URL]
+
http://img148.imageshack.us/img148/197/b101zk6.jpg
-
http://img361.imageshack.us/my.php?image=b101litvk0.jpg
+
{| class="prettytable"
 +
|'''Offset'''
 +
|'''HEX Value'''
 +
|'''Information'''
 +
|-
 +
| 0 || 01 00 00 00 || Fileversion = 1;
 +
|-
 +
| 4 || 03 00 00 00 || Number of light records = 3
 +
|-
 +
| colspan="3" style="text-align:center;" | '''First Light Record'''
 +
|-
 +
| 8 || D9 EF FF FF 00 2C 00 00 43 D8 FF FF || 3D pos = [-4.04,11.00,-9.93]
 +
|-
 +
| 20 || 26 00 00 00 || unknown1 = 38
 +
|-
 +
| 24 || 00 00 00 00 || unknown2 = 0
 +
|-
 +
| 28 || 00 01 00 00 00 01 00 00 00 01 00 00 || colour = (256,256,256)
 +
|-
 +
| colspan="3" style="text-align:center;" | '''Second Light Record'''
 +
|-
 +
| 40 || 4C 6E 00 00 00 F0 00 00 DA 58 00 00 || 3D pos = [27.57,60.00,22.21]
 +
|-
 +
| 52 || 21 00 00 00 || unknown1 = 33
 +
|-
 +
| 56 || 22 00 00 00 || unknown2 = 34
 +
|-
 +
| 60 || 00 05 00 00 00 05 00 00 00 05 00 00 || colour = (256,256,256)
 +
|-
 +
| colspan="3" style="text-align:center;" | '''Third Light Record'''
 +
|-
 +
| 72 || 5F E6 FF FF 00 8C 00 00 91 D8 FF FF || 3D pos = [-6.41,35.00,-9.86]
 +
|-
 +
| 84 || 16 00 00 00 || unknown1 = 22
 +
|-
 +
| 88 | 00 00 00 00 || unknown2 = 0
 +
|-
 +
| 92 || A6 00 00 00 A6 00 00 00 A6 00 00 00 || colour = (166,166,166)
 +
|-
 +
|}
-
Looking at the picture, in it offset 0 - 3 is a DWORD specifying the file version (in this case "1")
+
== Additional Informations ==
-
Offset 4--7 is a dword with the # of lights in the scene
+
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
-
"3" here
+
Altering Data Value '''26''' to '''00''', '''02''', '''59''', '''FF''' had the result of making Mission 1 dark
-
Then offset 8 - 19 is the 3D position of the light (encoded in Dark Omen position format)
+
http://img118.imageshack.us/img118/6882/b101data100is2.jpg  
-
 
+
-
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
+
-
 
+
-
http://img118.imageshack.us/my.php?image=b101data100is2.jpg  
+
and for Comparison, the Original
and for Comparison, the Original
-
http://img118.imageshack.us/my.php?image=b101data126origvz0.jpg  
+
http://img118.imageshack.us/img118/5673/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
+
== Further Actions ==
-
So the game looks for the first value and loads a grafical light effect with the id 26
+
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?
-
The next check would be, what happens in a dark game if we change the original id to 26  
+
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.

Revision as of 19:03, 13 August 2008

Contents

Structure

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;
}


See Discussion for Full Listing.

Values

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.

Each light record has 32 bytes. The first 12 bytes stand for the positional datas. The next two DWORD (a DWORD == four bytes) are the unknown values(called unknown1 and unknown2 in the following). Then there is an additional 12 bytes (4x3) that seems to be colour info (Red, Green, Blue). So now we need to compare the maps against the text output to determine what the "unknown1" and "unknown2" values really represent. Perhaps unknown1 is an ID to start any light effects in the game (not sure).


Examing B1_01.LIT

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

b101zk6.jpg

Offset HEX Value Information
0 01 00 00 00 Fileversion = 1;
4 03 00 00 00 Number of light records = 3
First Light Record
8 D9 EF FF FF 00 2C 00 00 43 D8 FF FF 3D pos = [-4.04,11.00,-9.93]
20 26 00 00 00 unknown1 = 38
24 00 00 00 00 unknown2 = 0
28 00 01 00 00 00 01 00 00 00 01 00 00 colour = (256,256,256)
Second Light Record
40 4C 6E 00 00 00 F0 00 00 DA 58 00 00 3D pos = [27.57,60.00,22.21]
52 21 00 00 00 unknown1 = 33
56 22 00 00 00 unknown2 = 34
60 00 05 00 00 00 05 00 00 00 05 00 00 colour = (256,256,256)
Third Light Record
72 5F E6 FF FF 00 8C 00 00 91 D8 FF FF 3D pos = [-6.41,35.00,-9.86]
84 16 00 00 00 unknown1 = 22
00 00 00 00 unknown2 = 0
92 A6 00 00 00 A6 00 00 00 A6 00 00 00 colour = (166,166,166)

Additional Informations

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, 02, 59, FF had the result of making Mission 1 dark

b101data100is2.jpg

and for Comparison, the Original

b101data126origvz0.jpg

Further Actions

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