DO/LIT/List

From Dark Omen Wiki

< DO | LIT
Revision as of 22:47, 28 February 2010 by Mikademus (Talk | contribs)
Jump to: navigation, search

Contents

Notes

  • Almost all maps have a light of type 38 (if data 1 is "type"). The only exceptions are B2_08, which is inside Drakenhof Castle, B4_10 (Black Grail Knights), B5_01 (Dread King) and SPARE9 (tutorial).
  • However, the dialogue indicates that these values are "E and L falloffs". This implies that there are NO directional lights, only point lights. So what are these falloffs? Light attenuation and falloff function (~= range)?
  • Suggestion for a test: remove all of the lights, except one from a battle on the smallest map. Starting from the lowest bits of data1, toggle them on and off and observe the effect.
    • Requirements: someone with genuine 3D accelerated Dark Omen to test.

Bitfield

It is very likely that data1 is a bitfield.

  • All values are lower than 63 (63 corresponds to binary 0b111111)
  • there are only a limited number of values
  • values tend to cluster to "toggle areas"

Listing

Data1 Binary frequency of use --> Bitset
2 0b00000010 1 0 0 0 0 0 0 1 0
17 0b00010001 1 0 0 0 1 0 0 0 1
18 0b00010010 2 0 0 0 1 0 0 1 0
22 0b00010110 23 0 0 0 1 0 1 1 0
23 0b00010111 2 0 0 0 1 0 1 1 1
33 0b00100001 2 0 0 1 0 0 0 0 1
35 0b00100011 1 0 0 1 0 0 0 1 1
38 0b00100110 26 0 0 1 0 0 1 1 0
41 0b00101001 2 0 0 1 0 1 0 0 1
42 0b00101010 3 0 0 1 0 1 0 1 0
43 0b00101011 1 0 0 1 0 1 0 1 1
49 0b00110001 22 0 0 1 1 0 0 0 1
54 0b00110110 1 0 0 1 1 0 0 0 1
57 0b00111001 4 0 0 1 1 1 0 0 1
58 0b00111010 1 0 0 1 1 1 0 1 0
59 0b00111011 5 0 0 1 1 1 0 1 1
97 lights
Num 0b00000001 40
Num 0b00000010 66
Num 0b00000100 52
Num 0b00001000 16
Num 0b00010000 71
Num 0b00100000 68

The big three

22 0b00010110 23
38 0b00100110 26
49 0b00110001 22

DX5 Light Structures

typedef float D3DVALUE, *LPD3DVALUE;
 
 
typedef struct _D3DCOLORVALUE {
    union {
	D3DVALUE r;
	D3DVALUE dvR;
    };
    union {
	D3DVALUE g;
	D3DVALUE dvG;
    };
    union {
	D3DVALUE b;
	D3DVALUE dvB;
    };
    union {
	D3DVALUE a;
	D3DVALUE dvA;
    };
} D3DCOLORVALUE, *LPD3DCOLORVALUE;
 
 
typedef struct _D3DLIGHT {
    DWORD           dwSize;
    D3DLIGHTTYPE    dltType;           	/* Type of light source */
    D3DCOLORVALUE   dcvColor;		/* Color of light */
    D3DVECTOR       dvPosition;		/* Position in world space */
    D3DVECTOR       dvDirection;        /* Direction in world space */
    D3DVALUE        dvRange;            /* Cutoff range */
    D3DVALUE        dvFalloff;          /* Falloff */
    D3DVALUE        dvAttenuation0;     /* Constant attenuation */
    D3DVALUE        dvAttenuation1;     /* Linear attenuation */
    D3DVALUE        dvAttenuation2;     /* Quadratic attenuation */
    D3DVALUE        dvTheta;            /* Inner angle of spotlight cone */
    D3DVALUE        dvPhi;              /* Outer angle of spotlight cone */
} D3DLIGHT, *LPD3DLIGHT;
 
 
typedef struct _D3DLIGHT2 {
    DWORD           dwSize;
    D3DLIGHTTYPE    dltType;		/* Type of light source */
    D3DCOLORVALUE   dcvColor;		/* Color of light */
    D3DVECTOR       dvPosition;		/* Position in world space */
    D3DVECTOR       dvDirection;	/* Direction in world space */
    D3DVALUE        dvRange;		/* Cutoff range */
    D3DVALUE        dvFalloff;		/* Falloff */
    D3DVALUE        dvAttenuation0;	/* Constant attenuation */
    D3DVALUE        dvAttenuation1;	/* Linear attenuation */
    D3DVALUE        dvAttenuation2;	/* Quadratic attenuation */
    D3DVALUE        dvTheta;		/* Inner angle of spotlight cone */
    D3DVALUE        dvPhi;			/* Outer angle of spotlight cone */
	DWORD			dwFlags;
} D3DLIGHT2, *LPD3DLIGHT2;

Dump

# Pos Data 1 Data 2 Colour
B1_01.prj
0 [-4.04,11.00,-9.93] 38 0 (256,256,256)
1 [27.57,60.00,22.21] 33 34 (1280,1280,1280)
2 [-6.41,35.00,-9.86] 22 0 (166,166,166)
B1_02.prj
0 [-26.20,25.00,-16.15] 38 0 (307,307,307)
1 [-20.51,90.00,-30.43] 33 0 (256,256,256)
2 [-2.25,60.00,-59.15] 22 0 (204,204,204)
B1_03.prj
0 [50.00,24.00,50.00] 38 0 (281,281,281)
1 [234.93,59.00,210.31] 59 1 (127,127,127)
2 [40.39,24.00,45.33] 22 0 (113,113,113)
3 [231.33,13.00,39.42] 43 42 (1113,1113,1113)
B1_04.prj
0 [-63.05,38.00,81.82] 38 0 (459,459,459)
1 [4.18,108.00,176.22] 57 0 (256,256,256)
2 [-17.25,89.00,45.82] 22 0 (165,165,165)
B1_05.prj
0 [-21.31,8.00,-21.36] 38 0 (256,256,256)
1 [79.65,6.00,66.82] 59 96 (1280,1280,1280)
2 [139.10,7.00,139.92] 59 72 (358,358,358)
3 [59.27,32.00,62.37] 49 1269 (256,256,256)
4 [87.43,4.00,151.45] 59 37 (1280,1280,1280)
5 [156.54,7.00,68.57] 59 36 (1280,1280,1280)
B1_06.prj
0 [8.16,20.00,47.68] 38 2 (499,499,499)
1 [110.18,38.00,219.17] 49 716 (256,256,256)
2 [89.77,68.00,236.25] 23 0 (639,639,639)
3 [96.60,47.00,78.37] 17 716 (256,256,256)
B1_07.prj
0 [8.16,20.00,47.68] 38 2 (499,499,499)
1 [110.18,38.00,219.17] 49 716 (256,256,256)
2 [89.77,68.00,236.25] 23 0 (639,639,639)
3 [96.60,47.00,78.37] 17 716 (256,256,256)
B1_08.prj
0 [-17.13,24.00,22.03] 38 0 (256,256,256)
1 [-10.30,25.00,-4.33] 22 0 (179,179,179)
2 [-7.47,78.00,-13.14] 49 0 (256,256,256)
3 [-4.57,65.00,205.32] 49 0 (256,256,256)
B2_01.prj
0 [-10.55,34.00,66.43] 38 0 (383,383,383)
1 [-2.89,38.00,47.88] 22 0 (256,256,256)
2 [68.35,71.00,226.19] 57 0 (256,256,256)
3 [1.69,17.00,-17.64] 22 0 (76,76,76)
B2_02.prj
0 [28.31,30.00,49.47] 38 0 (331,331,331)
1 [64.41,71.00,120.01] 22 0 (1280,1280,1280)
2 [50.00,40.00,50.00] 49 0 (256,256,256)
B2_04.prj
0 [135.99,126.00,177.33] 38 0 (371,371,371)
1 [43.37,8.00,7.24] 22 0 (729,729,729)
2 [143.24,95.00,156.43] 49 0 (256,256,256)
B2_05.prj
0 [-11.74,195.00,58.77] 38 0 (216,216,216)
1 [25.13,22.00,20.94] 22 0 (256,256,256)
2 [-1.80,79.00,287.40] 49 0 (256,256,256)
3 [101.38,39.00,154.61] 35 311 (1280,1280,1280)
4 [183.97,25.00,132.49] 42 502 (1280,1280,1280)
B2_07.prj
0 [126.88,85.00,79.02] 38 0 (243,243,243)
1 [114.31,33.00,47.32] 22 0 (422,422,422)
2 [261.70,64.00,178.88] 49 0 (256,256,256)
3 [269.59,16.00,11.26] 18 135 (1280,1280,1280)
B2_08.prj
0 [126.17,19.00,227.54] 59 31 (1036,1036,1036)
1 [120.36,17.00,63.12] 2 99 (256,256,256)
B3_01.prj
0 [-20.68,25.00,103.87] 38 0 (256,256,256)
1 [-12.46,25.00,121.18] 22 0 (256,256,256)
2 [113.23,34.00,245.86] 49 0 (256,256,256)
B3_02.prj
0 [-3.57,15.00,-8.78] 38 0 (217,217,217)
1 [-8.86,25.00,-15.88] 22 0 (204,204,204)
2 [-3.92,58.00,-6.53] 49 0 (256,256,256)
B3_06.prj
0 [19.54,124.00,161.95] 38 0 (294,294,294)
1 [216.31,117.00,165.68] 49 0 (256,256,256)
2 [19.29,14.00,159.71] 18 0 (115,115,115)
B3_07.prj
0 [20.08,59.00,-14.56] 38 0 (256,256,256)
1 [18.23,57.00,-0.70] 22 0 (1100,1100,1100)
2 [16.20,41.00,-4.57] 49 0 (256,256,256)
B3_08.prj
0 [58.20,39.00,21.27] 38 0 (256,256,256)
1 [59.24,14.00,20.16] 22 0 (256,256,256)
2 [350.68,108.00,337.75] 49 0 (256,256,256)
B3_09.prj
0 [15.57,26.00,-30.71] 38 0 (256,256,256)
1 [20.44,25.00,-29.49] 22 0 (256,256,256)
2 [15.82,50.00,-23.97] 49 0 (256,256,256)
B4_01.prj
0 [-14.65,78.00,-26.40] 38 0 (256,256,256)
1 [8.28,95.00,-24.82] 18 0 (256,256,256)
2 [-5.96,72.00,169.91] 49 0 (256,256,256)
B4_02.prj
0 [13.07,14.00,21.37] 38 0 (256,256,256)
1 [29.59,25.00,20.49] 22 0 (256,256,256)
2 [314.44,87.00,243.09] 49 0 (256,256,256)
B4_03.prj
0 [70.88,80.00,83.25] 38 0 (256,256,256)
1 [88.27,66.00,87.81] 22 0 (179,179,179)
2 [164.06,51.00,171.56] 57 0 (256,256,256)
B4_05.prj
0 [36.85,36.00,-11.38] 38 0 (166,166,166)
1 [48.28,41.00,-8.56] 22 0 (256,256,256)
2 [47.21,67.00,-7.27] 49 0 (256,256,256)
B4_06.prj
0 [3.76,48.00,-49.06] 38 0 (256,256,256)
1 [10.64,75.00,-30.93] 22 0 (256,256,256)
2 [114.85,61.00,6.07] 49 0 (256,256,256)
B4_08.prj
0 [85.20,92.00,75.01] 38 0 (256,256,256)
1 [84.70,62.00,78.60] 22 0 (243,243,243)
2 [297.70,120.00,260.66] 49 0 (256,256,256)
B4_09.prj
0 [72.62,53.00,-67.96] 38 0 (256,256,256)
1 [64.28,21.00,-74.19] 22 0 (1280,1280,1280)
2 [63.66,131.00,-41.64] 49 0 (256,256,256)
B4_10.prj
0 [-26.85,130.00,191.00] 58 0 (256,256,256)
1 [-24.21,124.00,192.58] 57 0 (256,256,256)
B5_01.prj
0 [178.24,43.00,221.59] 42 0 (319,319,319)
1 [178.40,25.00,217.54] 41 0 (256,256,256)
B5_01B.prj
0 [159.62,81.00,86.38] 42 0 (179,179,179)
1 [160.12,25.00,89.22] 41 0 (256,256,256)
SPARE9.prj
0 [12.06,9.00,16.06] 54 0 (383,383,383)
1 [7.44,-3.00,13.50] 22 0 (268,268,268)
2 [5.97,74.00,28.02] 49 0 (256,256,256)
Personal tools
communication