annotate Lights.h @ 2328:04efed9483ff

EventCastSpell removing unused vars
author Grumpy7
date Tue, 01 Apr 2014 23:32:14 +0200
parents c1c74df0a33e
children d04017f3d2fa
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2 #include "OSAPI.h" // messagebox
Ritor1
parents:
diff changeset
3
Ritor1
parents:
diff changeset
4 #include "VectorTypes.h"
Ritor1
parents:
diff changeset
5
Ritor1
parents:
diff changeset
6
Ritor1
parents:
diff changeset
7 /* 257 */
Ritor1
parents:
diff changeset
8 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
9 struct StationaryLight
Ritor1
parents:
diff changeset
10 {
Ritor1
parents:
diff changeset
11 Vec3_short_ vPosition;
Ritor1
parents:
diff changeset
12 __int16 uRadius;
Ritor1
parents:
diff changeset
13 unsigned __int8 uLightColorR;
Ritor1
parents:
diff changeset
14 unsigned __int8 uLightColorG;
Ritor1
parents:
diff changeset
15 unsigned __int8 uLightColorB;
Ritor1
parents:
diff changeset
16 char uLightType;
Ritor1
parents:
diff changeset
17 };
Ritor1
parents:
diff changeset
18 #pragma pack(pop)
Ritor1
parents:
diff changeset
19
Ritor1
parents:
diff changeset
20
Ritor1
parents:
diff changeset
21
Ritor1
parents:
diff changeset
22
Ritor1
parents:
diff changeset
23 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
24 struct MobileLight
Ritor1
parents:
diff changeset
25 {
Ritor1
parents:
diff changeset
26 Vec3_short_ vPosition;
Ritor1
parents:
diff changeset
27 __int16 uRadius;
Ritor1
parents:
diff changeset
28 unsigned __int8 uLightColorR;
Ritor1
parents:
diff changeset
29 unsigned __int8 uLightColorG;
Ritor1
parents:
diff changeset
30 unsigned __int8 uLightColorB;
Ritor1
parents:
diff changeset
31 char uLightType;
Ritor1
parents:
diff changeset
32 __int16 field_C;
Ritor1
parents:
diff changeset
33 __int16 uSectorID;
Ritor1
parents:
diff changeset
34 __int16 field_10;
Ritor1
parents:
diff changeset
35 };
Ritor1
parents:
diff changeset
36 #pragma pack(pop)
Ritor1
parents:
diff changeset
37
Ritor1
parents:
diff changeset
38
Ritor1
parents:
diff changeset
39
Ritor1
parents:
diff changeset
40 /*
Ritor1
parents:
diff changeset
41 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
42 struct LightStack<T>
Ritor1
parents:
diff changeset
43 {
Ritor1
parents:
diff changeset
44 int field_0;
Ritor1
parents:
diff changeset
45 char T[400];
Ritor1
parents:
diff changeset
46 unsigned int uNumLightsActive;
Ritor1
parents:
diff changeset
47 };
Ritor1
parents:
diff changeset
48 #pragma pack(pop)*/
Ritor1
parents:
diff changeset
49
Ritor1
parents:
diff changeset
50
Ritor1
parents:
diff changeset
51
Ritor1
parents:
diff changeset
52 /* 260 */
Ritor1
parents:
diff changeset
53 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
54 struct LightsStack_StationaryLight_
Ritor1
parents:
diff changeset
55 {
Ritor1
parents:
diff changeset
56 //----- (004AD385) --------------------------------------------------------
Ritor1
parents:
diff changeset
57 LightsStack_StationaryLight_()
Ritor1
parents:
diff changeset
58 {
Ritor1
parents:
diff changeset
59 uNumLightsActive = 0;
Ritor1
parents:
diff changeset
60 }
Ritor1
parents:
diff changeset
61
Ritor1
parents:
diff changeset
62 //----- (004AD395) --------------------------------------------------------
Ritor1
parents:
diff changeset
63 virtual ~LightsStack_StationaryLight_()
Ritor1
parents:
diff changeset
64 {
Ritor1
parents:
diff changeset
65 uNumLightsActive = 0;
Ritor1
parents:
diff changeset
66 }
Ritor1
parents:
diff changeset
67
Ritor1
parents:
diff changeset
68 //----- (004AD39D) --------------------------------------------------------
Ritor1
parents:
diff changeset
69 inline unsigned int GetNumLights()
Ritor1
parents:
diff changeset
70 {
Ritor1
parents:
diff changeset
71 return uNumLightsActive;
Ritor1
parents:
diff changeset
72 }
Ritor1
parents:
diff changeset
73
Ritor1
parents:
diff changeset
74 //----- (004AD3C8) --------------------------------------------------------
Ritor1
parents:
diff changeset
75 inline bool AddLight(__int16 x, __int16 y, __int16 z, __int16 a5, unsigned char r, unsigned char g, unsigned char b, char uLightType)
Ritor1
parents:
diff changeset
76 {
Ritor1
parents:
diff changeset
77 unsigned int v9; // eax@1
Ritor1
parents:
diff changeset
78 std::string v11; // [sp-18h] [bp-18h]@3
Ritor1
parents:
diff changeset
79
Ritor1
parents:
diff changeset
80 v9 = this->uNumLightsActive;
Ritor1
parents:
diff changeset
81 if ( (signed int)v9 >= 400 )
Ritor1
parents:
diff changeset
82 {
Ritor1
parents:
diff changeset
83 MessageBoxW(nullptr, L"Too many stationary lights!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\StationaryLightStack.cpp:45", 0);
Ritor1
parents:
diff changeset
84 return false;
Ritor1
parents:
diff changeset
85 }
Ritor1
parents:
diff changeset
86
1980
c1c74df0a33e changing most of auto types to their actual types
Grumpy7
parents: 1458
diff changeset
87 StationaryLight* pLight = &pLights[uNumLightsActive++];
0
Ritor1
parents:
diff changeset
88 pLight->vPosition.x = x;
Ritor1
parents:
diff changeset
89 pLight->vPosition.y = y;
Ritor1
parents:
diff changeset
90 pLight->vPosition.z = z;
Ritor1
parents:
diff changeset
91 pLight->uRadius = a5;
Ritor1
parents:
diff changeset
92 pLight->uLightColorR = (unsigned __int8)r;
Ritor1
parents:
diff changeset
93 pLight->uLightColorG = g;
Ritor1
parents:
diff changeset
94 pLight->uLightColorB = b;
Ritor1
parents:
diff changeset
95 pLight->uLightType = uLightType;
Ritor1
parents:
diff changeset
96 return true;
Ritor1
parents:
diff changeset
97 }
Ritor1
parents:
diff changeset
98
Ritor1
parents:
diff changeset
99
Ritor1
parents:
diff changeset
100
1458
934074e7fcc1 ModalWindow
Nomad
parents: 522
diff changeset
101 //void ( ***vdestructor_ptr)(LightsStack_StationaryLight_ *, bool);
0
Ritor1
parents:
diff changeset
102 StationaryLight pLights[400];
Ritor1
parents:
diff changeset
103 unsigned int uNumLightsActive;
Ritor1
parents:
diff changeset
104 };
Ritor1
parents:
diff changeset
105 #pragma pack(pop)
Ritor1
parents:
diff changeset
106
Ritor1
parents:
diff changeset
107
Ritor1
parents:
diff changeset
108
Ritor1
parents:
diff changeset
109
Ritor1
parents:
diff changeset
110 /* 261 */
Ritor1
parents:
diff changeset
111 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
112 struct LightsStack_MobileLight_
Ritor1
parents:
diff changeset
113 {
Ritor1
parents:
diff changeset
114 //----- (00467D45) --------------------------------------------------------
Ritor1
parents:
diff changeset
115 inline LightsStack_MobileLight_()
Ritor1
parents:
diff changeset
116 {
Ritor1
parents:
diff changeset
117 this->uNumLightsActive = 0;
Ritor1
parents:
diff changeset
118 //this->vdestructor_ptr = &pLightsStack_MobileLight__pvdtor;
Ritor1
parents:
diff changeset
119 }
Ritor1
parents:
diff changeset
120 //----- (00467D55) --------------------------------------------------------
Ritor1
parents:
diff changeset
121 virtual ~LightsStack_MobileLight_()
Ritor1
parents:
diff changeset
122 {
Ritor1
parents:
diff changeset
123 this->uNumLightsActive = 0;
Ritor1
parents:
diff changeset
124 }
Ritor1
parents:
diff changeset
125
Ritor1
parents:
diff changeset
126 bool AddLight(__int16 x, __int16 y, __int16 z, __int16 uSectorID, int uRadius, unsigned __int8 r, unsigned __int8 g, unsigned __int8 b, char a10);
Ritor1
parents:
diff changeset
127
Ritor1
parents:
diff changeset
128
Ritor1
parents:
diff changeset
129
1458
934074e7fcc1 ModalWindow
Nomad
parents: 522
diff changeset
130 //void ( ***vdestructor_ptr)(LightsStack_MobileLight_ *, bool);
0
Ritor1
parents:
diff changeset
131 MobileLight pLights[400];
Ritor1
parents:
diff changeset
132 unsigned int uNumLightsActive;
Ritor1
parents:
diff changeset
133 };
Ritor1
parents:
diff changeset
134 #pragma pack(pop)