annotate IndoorCameraD3D.h @ 2473:98eda972505f

backing out of previous commit for Indoor.cpp
author zipi
date Tue, 19 Aug 2014 22:33:23 +0100
parents 8817c398b792
children
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
1640
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
2 #include "VectorTypes.h"
0
Ritor1
parents:
diff changeset
3
Ritor1
parents:
diff changeset
4
Ritor1
parents:
diff changeset
5
Ritor1
parents:
diff changeset
6 /* 124 */
Ritor1
parents:
diff changeset
7 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
8 struct IndoorCameraD3D_Vec3
Ritor1
parents:
diff changeset
9 {
Ritor1
parents:
diff changeset
10 //----- (004C0376) --------------------------------------------------------
Ritor1
parents:
diff changeset
11 inline IndoorCameraD3D_Vec3() {}
Ritor1
parents:
diff changeset
12 //----- (004C037F) --------------------------------------------------------
Ritor1
parents:
diff changeset
13 virtual ~IndoorCameraD3D_Vec3() {}
Ritor1
parents:
diff changeset
14 //----- (004C039C) --------------------------------------------------------
Ritor1
parents:
diff changeset
15 //void ~IndoorCameraD3D_Vec3() {}
Ritor1
parents:
diff changeset
16
1458
934074e7fcc1 ModalWindow
Nomad
parents: 1391
diff changeset
17 //void ( ***vdestructor_ptr)(IndoorCameraD3D_Vec3 *, bool);
0
Ritor1
parents:
diff changeset
18
Ritor1
parents:
diff changeset
19 union
Ritor1
parents:
diff changeset
20 {
Ritor1
parents:
diff changeset
21 struct
Ritor1
parents:
diff changeset
22 {
Ritor1
parents:
diff changeset
23 float x;
Ritor1
parents:
diff changeset
24 float y;
Ritor1
parents:
diff changeset
25 float z;
Ritor1
parents:
diff changeset
26 };
Ritor1
parents:
diff changeset
27 float v[3];
Ritor1
parents:
diff changeset
28 };
Ritor1
parents:
diff changeset
29 };
Ritor1
parents:
diff changeset
30 #pragma pack(pop)
Ritor1
parents:
diff changeset
31
Ritor1
parents:
diff changeset
32 /* 125 */
Ritor1
parents:
diff changeset
33 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
34 struct IndoorCameraD3D_Vec4: public IndoorCameraD3D_Vec3
Ritor1
parents:
diff changeset
35 {
Ritor1
parents:
diff changeset
36 //----- (00498038) --------------------------------------------------------
Ritor1
parents:
diff changeset
37 inline IndoorCameraD3D_Vec4():
Ritor1
parents:
diff changeset
38 IndoorCameraD3D_Vec3()
Ritor1
parents:
diff changeset
39 {}
Ritor1
parents:
diff changeset
40
Ritor1
parents:
diff changeset
41 //----- (00498069) --------------------------------------------------------
Ritor1
parents:
diff changeset
42 virtual ~IndoorCameraD3D_Vec4()
Ritor1
parents:
diff changeset
43 {}
Ritor1
parents:
diff changeset
44
Ritor1
parents:
diff changeset
45 float dot;
522
61343380715b Origianl structures integrity test added
Nomad
parents: 0
diff changeset
46 int _wtf; // sizeof vec4 is 18 and first member is vdtor, but vdtor is already included in vec3 so very weird
0
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 /* 199 */
Ritor1
parents:
diff changeset
53 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
54 struct IndoorCameraD3D_stru3
Ritor1
parents:
diff changeset
55 {
Ritor1
parents:
diff changeset
56 int field_0;
Ritor1
parents:
diff changeset
57 int field_4;
Ritor1
parents:
diff changeset
58 int field_8;
Ritor1
parents:
diff changeset
59 int field_C;
Ritor1
parents:
diff changeset
60 int field_10;
Ritor1
parents:
diff changeset
61 int field_14;
Ritor1
parents:
diff changeset
62 int field_18;
Ritor1
parents:
diff changeset
63 int field_1C;
Ritor1
parents:
diff changeset
64 int field_20;
Ritor1
parents:
diff changeset
65 int field_24;
Ritor1
parents:
diff changeset
66 int field_28;
Ritor1
parents:
diff changeset
67 int field_2C;
Ritor1
parents:
diff changeset
68 float flt_30;
Ritor1
parents:
diff changeset
69 int field_34;
Ritor1
parents:
diff changeset
70 };
Ritor1
parents:
diff changeset
71 #pragma pack(pop)
Ritor1
parents:
diff changeset
72
Ritor1
parents:
diff changeset
73
Ritor1
parents:
diff changeset
74
Ritor1
parents:
diff changeset
75 /* 197 */
Ritor1
parents:
diff changeset
76 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
77 struct IndoorCameraD3D_stru1
Ritor1
parents:
diff changeset
78 {
Ritor1
parents:
diff changeset
79 //----- (004363A2) --------------------------------------------------------
Ritor1
parents:
diff changeset
80 IndoorCameraD3D_stru1()
Ritor1
parents:
diff changeset
81 {
Ritor1
parents:
diff changeset
82 this->flt_2C = 0.0;
Ritor1
parents:
diff changeset
83 }
Ritor1
parents:
diff changeset
84
Ritor1
parents:
diff changeset
85
Ritor1
parents:
diff changeset
86 int field_0;
Ritor1
parents:
diff changeset
87 int field_4;
Ritor1
parents:
diff changeset
88 int field_8;
Ritor1
parents:
diff changeset
89 int field_C;
Ritor1
parents:
diff changeset
90 int field_10;
Ritor1
parents:
diff changeset
91 int field_14;
Ritor1
parents:
diff changeset
92 int field_18;
Ritor1
parents:
diff changeset
93 int field_1C;
Ritor1
parents:
diff changeset
94 int field_20;
Ritor1
parents:
diff changeset
95 int field_24;
Ritor1
parents:
diff changeset
96 int field_28;
Ritor1
parents:
diff changeset
97 float flt_2C;
Ritor1
parents:
diff changeset
98 };
Ritor1
parents:
diff changeset
99 #pragma pack(pop)
Ritor1
parents:
diff changeset
100
Ritor1
parents:
diff changeset
101 /* 198 */
Ritor1
parents:
diff changeset
102 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
103 struct IndoorCameraD3D_stru2
Ritor1
parents:
diff changeset
104 {
Ritor1
parents:
diff changeset
105 unsigned int mm7__vector_000004_size;
Ritor1
parents:
diff changeset
106 IndoorCameraD3D_stru1 mm7__vector_000004[64];
Ritor1
parents:
diff changeset
107 int field_C04;
Ritor1
parents:
diff changeset
108 int field_C08;
Ritor1
parents:
diff changeset
109 int field_C0C;
Ritor1
parents:
diff changeset
110 };
Ritor1
parents:
diff changeset
111 #pragma pack(pop)
Ritor1
parents:
diff changeset
112
1642
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
113
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
114
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
115 #define BLV_RENDER_DRAW_SW_OUTLINES (1 << 0) // 1
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
116 #define BLV_RENDER_DRAW_D3D_OUTLINES (1 << 1) // 2
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
117 #define ODM_RENDER_DRAW_D3D_OUTLINES (1 << 2) // 4
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
118 #define ODM_RENDER_DRAW_TERRAIN_OUTLINES (1 << 3) // 8
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
119
0
Ritor1
parents:
diff changeset
120 /* 123 */
Ritor1
parents:
diff changeset
121 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
122 struct IndoorCameraD3D
Ritor1
parents:
diff changeset
123 {
Ritor1
parents:
diff changeset
124 IndoorCameraD3D();
Ritor1
parents:
diff changeset
125
Ritor1
parents:
diff changeset
126 //----- (004363C6) --------------------------------------------------------
Ritor1
parents:
diff changeset
127 virtual ~IndoorCameraD3D()
Ritor1
parents:
diff changeset
128 {
Ritor1
parents:
diff changeset
129 //this->vdestructor_ptr = &stru8_pvdtor;
Ritor1
parents:
diff changeset
130 //_eh_vector_destructor_iterator_(this->std__vector_000034_prolly_frustrum, 24, 6, IndoorCameraD3D_Vec4::dtor);
Ritor1
parents:
diff changeset
131 //IndoorCameraD3D_Vec3::dtor(&v1->field_24);
Ritor1
parents:
diff changeset
132 //IndoorCameraD3D_Vec3::dtor(&v1->field_14);
Ritor1
parents:
diff changeset
133 //IndoorCameraD3D_Vec3::dtor(&v1->field_4);
Ritor1
parents:
diff changeset
134 }
Ritor1
parents:
diff changeset
135
Ritor1
parents:
diff changeset
136 double GetPolygonMaxZ(struct RenderVertexSoft *pVertex, unsigned int uStripType);
Ritor1
parents:
diff changeset
137 double GetPolygonMinZ(struct RenderVertexSoft *pVertices, unsigned int uStripType);
Ritor1
parents:
diff changeset
138 struct IDirect3DTexture2 *LoadTextureAndGetHardwarePtr(char *Str1);
Ritor1
parents:
diff changeset
139 void Project(signed int x, signed int y, signed int z, int *a5, int *a6);
Ritor1
parents:
diff changeset
140 void Project(struct RenderVertexSoft *pVertices, unsigned int uNumVertices, char a4);
Ritor1
parents:
diff changeset
141 void _436CDC_mess_with_lightmap__clipflag_2(struct RenderVertexSoft *pInVertices, int uNumInVertices, struct RenderVertexSoft *pOutVertices, unsigned int *pOutNumVertices);
Ritor1
parents:
diff changeset
142 void _436F09_mess_with_lightmap__clipflag_4(struct RenderVertexSoft *pInVertices, int uNumInVertices, struct RenderVertexSoft *pOutVertices, unsigned int *pOutNumVertices);
2245
8817c398b792 for RasterLine2D
Ritor1
parents: 2155
diff changeset
143 void _437143(unsigned int uNumInVertices, struct RenderVertexSoft *pOutVertices, struct RenderVertexSoft *pInVertices, unsigned int *pOutNumVertices);
0
Ritor1
parents:
diff changeset
144 bool _4371C3(struct RenderVertexSoft *pVertices, unsigned int *pOutNumVertices, int _unused);
795
472ca68386d4 more stru10 & stru9
Nomad
parents: 791
diff changeset
145 bool CalcPortalShape(struct RenderVertexSoft *a1, unsigned int *pOutNumVertices, struct RenderVertexSoft *pVertices, IndoorCameraD3D_Vec4 *a4, signed int uNumVertices, char a6, int _unused);
0
Ritor1
parents:
diff changeset
146 char _437376(struct stru154 *thisa, struct RenderVertexSoft *a2, unsigned int *pOutNumVertices);
Ritor1
parents:
diff changeset
147 void _4374E8_ProllyBuildFrustrum();
Ritor1
parents:
diff changeset
148 void _437607(IndoorCameraD3D_Vec3 *a1, IndoorCameraD3D_Vec4 *a2);
Ritor1
parents:
diff changeset
149 void Vec3Transform(const IndoorCameraD3D_Vec3 *pVector, IndoorCameraD3D_Vec3 *pOut);
Ritor1
parents:
diff changeset
150 void CreateWorldMatrixAndSomeStuff();
Ritor1
parents:
diff changeset
151 void MatrixMultiply(struct Matrix3x3_float_ *a1, struct Matrix3x3_float_ *a2, struct Matrix3x3_float_ *a3);
Ritor1
parents:
diff changeset
152 void PrepareAndDrawDebugOutline(struct BLVFace *pFace, unsigned int uDiffuse);
Ritor1
parents:
diff changeset
153 void debug_outline_sw(struct RenderVertexSoft *a2, unsigned int uNumVertices, unsigned int uDiffuse, float a5);
Ritor1
parents:
diff changeset
154 void debug_outline_d3d(const struct RenderVertexD3D3 *pLineVertices, unsigned int uNumLines, int uDiffuse, float z_stuff);
2006
30c2b575d25c signed fixes
zipi
parents: 1642
diff changeset
155 void do_draw_debug_line_sw(struct RenderVertexSoft *pLineBegin, signed int sStartDiffuse, struct RenderVertexSoft *pLineEnd, signed int sEndDiffuse, unsigned int uOutNumVertices, float z_stuff);
1391
cc9a3a24d61d Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents: 871
diff changeset
156 //void sr_437D4A_draw_some_vertices(float x, float y, float z, unsigned int a5, char a6, float a7);
cc9a3a24d61d Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents: 871
diff changeset
157 //void sr_438141_draw_list_0037C();
cc9a3a24d61d Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents: 871
diff changeset
158 //void sr_438240_draw_lits();
cc9a3a24d61d Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents: 871
diff changeset
159 //void sr_Reset_list_0037C();
0
Ritor1
parents:
diff changeset
160 bool is_face_faced_to_camera(struct BLVFace *pFace, struct RenderVertexSoft *a2);
Ritor1
parents:
diff changeset
161 bool GetFacetOrientation(char polyType, struct Vec3_float_ *a2, struct Vec3_float_ *a3, struct Vec3_float_ *a4);
Ritor1
parents:
diff changeset
162 void ViewTransform(struct RenderVertexSoft *a1a, unsigned int uNumVertices);
Ritor1
parents:
diff changeset
163 bool IsCulled(struct BLVFace *pFace);
Ritor1
parents:
diff changeset
164 void ViewTransfrom_OffsetUV(struct RenderVertexSoft *pVertices, unsigned int uNumVertices, struct RenderVertexSoft *pOutVertices, struct stru320 *a5);
1640
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
165 bool ApplyViewTransform_TrueIfStillVisible_BLV(int x, int y, int z, signed int *pOutX, int *pOutZ, int *pOutY, char bDoNotShow);
871
710cf848ad24 Particle engine made working.
Nomad
parents: 795
diff changeset
166 float GetPickDepth();
1637
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1458
diff changeset
167 float GetShadingDistMist();
0
Ritor1
parents:
diff changeset
168
791
346f7069676a Indoor::GetSector and various stuff
Nomad
parents: 735
diff changeset
169 void DebugDrawPortal(struct BLVFace *pFace);
346f7069676a Indoor::GetSector and various stuff
Nomad
parents: 735
diff changeset
170
1458
934074e7fcc1 ModalWindow
Nomad
parents: 1391
diff changeset
171 //void ( ***vdestructor_ptr)(IndoorCameraD3D *, bool);
0
Ritor1
parents:
diff changeset
172 IndoorCameraD3D_Vec3 field_4[3];
Ritor1
parents:
diff changeset
173 //IndoorCameraD3D_Vec3 field_14;
Ritor1
parents:
diff changeset
174 //IndoorCameraD3D_Vec3 field_24;
Ritor1
parents:
diff changeset
175 IndoorCameraD3D_Vec4 std__vector_000034_prolly_frustrum[6];
Ritor1
parents:
diff changeset
176 float fov;
Ritor1
parents:
diff changeset
177 float screenCenterX;
Ritor1
parents:
diff changeset
178 float screenCenterY;
Ritor1
parents:
diff changeset
179 float fov_x;
Ritor1
parents:
diff changeset
180 float fov_y;
Ritor1
parents:
diff changeset
181 float inv_fov;
1640
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
182 float _unused_blv_party_x;
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
183 float _unused_blv_party_y;
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
184 float _unused_blv_party_z;
0
Ritor1
parents:
diff changeset
185 char field_E8[32];
Ritor1
parents:
diff changeset
186 float field_108;
1640
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
187 float _unused_blv_party_x_2;
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
188 float _unused_blv_party_y_2;
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
189 float _unused_blv_party_z_2;
0
Ritor1
parents:
diff changeset
190 char field_118[32];
Ritor1
parents:
diff changeset
191 float field_138;
Ritor1
parents:
diff changeset
192 char field_13C[44];
Ritor1
parents:
diff changeset
193 float field_168;
Ritor1
parents:
diff changeset
194 char field_16C[44];
Ritor1
parents:
diff changeset
195 float field_198;
Ritor1
parents:
diff changeset
196 char field_19C[44];
Ritor1
parents:
diff changeset
197 float field_1C8;
Ritor1
parents:
diff changeset
198 char field_1CC[44];
Ritor1
parents:
diff changeset
199 float field_1F8;
Ritor1
parents:
diff changeset
200 char field_1FC[44];
Ritor1
parents:
diff changeset
201 float field_228;
Ritor1
parents:
diff changeset
202 char field_22C[44];
Ritor1
parents:
diff changeset
203 float field_258;
Ritor1
parents:
diff changeset
204 char field_25C[44];
Ritor1
parents:
diff changeset
205 float field_288;
Ritor1
parents:
diff changeset
206 char field_28C[44];
Ritor1
parents:
diff changeset
207 float field_2B8;
Ritor1
parents:
diff changeset
208 float field_2BC;
Ritor1
parents:
diff changeset
209 float field_2C0;
Ritor1
parents:
diff changeset
210 float field_2C4;
Ritor1
parents:
diff changeset
211 char field_2C8[32];
Ritor1
parents:
diff changeset
212 float field_2E8;
Ritor1
parents:
diff changeset
213 float field_2EC;
Ritor1
parents:
diff changeset
214 float field_2F0;
Ritor1
parents:
diff changeset
215 float field_2F4;
Ritor1
parents:
diff changeset
216 char field_2F8[32];
Ritor1
parents:
diff changeset
217 float field_318;
Ritor1
parents:
diff changeset
218 float field_31C;
Ritor1
parents:
diff changeset
219 float field_320;
Ritor1
parents:
diff changeset
220 float field_324;
Ritor1
parents:
diff changeset
221 char field_328[32];
Ritor1
parents:
diff changeset
222 float field_348;
Ritor1
parents:
diff changeset
223 float field_34C;
Ritor1
parents:
diff changeset
224 float field_350;
Ritor1
parents:
diff changeset
225 float field_354;
Ritor1
parents:
diff changeset
226 char field_358[32];
Ritor1
parents:
diff changeset
227 float field_378;
Ritor1
parents:
diff changeset
228 IndoorCameraD3D_stru3 list_0037C[16384];
Ritor1
parents:
diff changeset
229 unsigned int list_0037C_size;
Ritor1
parents:
diff changeset
230 IndoorCameraD3D_stru2 list_E0380[256];
Ritor1
parents:
diff changeset
231 int list_E0380_size;
1642
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
232
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
233
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
234 void CalculateRotations(int camera_rot_x, int camera_rot_y);
1640
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
235 int sRotationY; // moved from 157 struct IndoorCamera::18
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
236 int sRotationX; // moved from 157 struct IndoorCamera::14
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
237 float fRotationYSine; // moved from 157 struct IndoorCamera::2C
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
238 float fRotationYCosine; // moved from 157 struct IndoorCamera::30
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
239 float fRotationXSine; // moved from 157 struct IndoorCamera::34
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
240 float fRotationXCosine; // moved from 157 struct IndoorCamera::38
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
241 Vec3<int> vPartyPos; // moved from 157 struct IndoorCamera::00
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1637
diff changeset
242 // merged from 162 struct BLVRenderParams::08
1642
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
243 int debug_flags; // moved from 157 struct IndoorCamera::4C
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
244 // merged from 162 struct BLVRenderParams::04
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
245 int int_sine_y; // moved from 157 struct ODMRenderParams::1C
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
246 // merged from 162 struct BLVRenderParams::24
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
247 int int_cosine_y; // moved from 157 struct ODMRenderParams::20
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
248 // merged from 162 struct BLVRenderParams::20
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
249 int int_sine_x; // moved from 157 struct ODMRenderParams::24
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
250 // merged from 162 struct BLVRenderParams::2C
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
251 int int_cosine_x; // moved from 157 struct ODMRenderParams::28
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
252 // merged from 162 struct BLVRenderParams::28
0
Ritor1
parents:
diff changeset
253 };
Ritor1
parents:
diff changeset
254 #pragma pack(pop)