DO/LIT
From Dark Omen Wiki
Bembelimen (Talk | contribs) (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 | + | 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 | This shows B1_01.LIT in WinHex to show all data values | ||
- | + | http://img148.imageshack.us/img148/197/b101zk6.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) | ||
+ | |- | ||
+ | |} | ||
- | + | == 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 | |
- | + | http://img118.imageshack.us/img118/6882/b101data100is2.jpg | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | http://img118.imageshack.us/ | + | |
and for Comparison, the Original | and for Comparison, the Original | ||
- | http://img118.imageshack.us/ | + | http://img118.imageshack.us/img118/5673/b101data126origvz0.jpg |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | Further | + | == 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? | |
- | 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
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
and for Comparison, the Original
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.