annotate Outdoor.h @ 161:49e74dee4eab

13.02.13
author Ritor1
date Wed, 13 Feb 2013 09:52:33 +0600
parents 8b8fd4d83fdc
children bcd55744c2f4
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma
Ritor1
parents:
diff changeset
2 #include "BSPModel.h"
Ritor1
parents:
diff changeset
3 #include "OutdoorCamera.h"
Ritor1
parents:
diff changeset
4 #include "Indoor.h"
Ritor1
parents:
diff changeset
5
Ritor1
parents:
diff changeset
6
Ritor1
parents:
diff changeset
7
Ritor1
parents:
diff changeset
8 /* 256 */
Ritor1
parents:
diff changeset
9 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
10 struct ODMHeader
Ritor1
parents:
diff changeset
11 {
Ritor1
parents:
diff changeset
12 int uVersion;
Ritor1
parents:
diff changeset
13 char pMagic[4];
Ritor1
parents:
diff changeset
14 unsigned int uCompressedSize;
Ritor1
parents:
diff changeset
15 unsigned int uDecompressedSize;
Ritor1
parents:
diff changeset
16 };
Ritor1
parents:
diff changeset
17 #pragma pack(pop)
Ritor1
parents:
diff changeset
18
Ritor1
parents:
diff changeset
19
Ritor1
parents:
diff changeset
20
Ritor1
parents:
diff changeset
21 /* 78 */
Ritor1
parents:
diff changeset
22 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
23 struct OutdoorLocationTileType
Ritor1
parents:
diff changeset
24 {
Ritor1
parents:
diff changeset
25 unsigned __int16 uTileGroup;
Ritor1
parents:
diff changeset
26 unsigned __int16 uTileID;
Ritor1
parents:
diff changeset
27 };
Ritor1
parents:
diff changeset
28 #pragma pack(pop)
Ritor1
parents:
diff changeset
29
Ritor1
parents:
diff changeset
30
Ritor1
parents:
diff changeset
31
Ritor1
parents:
diff changeset
32
Ritor1
parents:
diff changeset
33 /* 79 */
Ritor1
parents:
diff changeset
34 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
35 struct OutdoorLocationTerrain
Ritor1
parents:
diff changeset
36 {
Ritor1
parents:
diff changeset
37 //----- (0047C794) --------------------------------------------------------
Ritor1
parents:
diff changeset
38 inline OutdoorLocationTerrain()
Ritor1
parents:
diff changeset
39 {
Ritor1
parents:
diff changeset
40 this->pHeightmap = 0;
Ritor1
parents:
diff changeset
41 this->pTilemap = 0;
Ritor1
parents:
diff changeset
42 this->ptr_C = 0;
Ritor1
parents:
diff changeset
43 this->field_10 = 0;
Ritor1
parents:
diff changeset
44 this->field_12 = 0;
Ritor1
parents:
diff changeset
45
Ritor1
parents:
diff changeset
46 pAttributemap = nullptr;
Ritor1
parents:
diff changeset
47 }
Ritor1
parents:
diff changeset
48
Ritor1
parents:
diff changeset
49 void _47C7A9();
Ritor1
parents:
diff changeset
50 void Release();
Ritor1
parents:
diff changeset
51 int _47C80A(int a2, int a3, int a4, int a5);
Ritor1
parents:
diff changeset
52 int _47CB57(int a1, int a2, int a3);
Ritor1
parents:
diff changeset
53 bool ZeroLandscape();
Ritor1
parents:
diff changeset
54 bool Initialize();
Ritor1
parents:
diff changeset
55
Ritor1
parents:
diff changeset
56
Ritor1
parents:
diff changeset
57 unsigned __int8 *pHeightmap;
Ritor1
parents:
diff changeset
58 unsigned __int8 *pTilemap;
Ritor1
parents:
diff changeset
59 unsigned __int8 *pAttributemap;
Ritor1
parents:
diff changeset
60 void *ptr_C;
Ritor1
parents:
diff changeset
61 __int16 field_10;
Ritor1
parents:
diff changeset
62 __int16 field_12;
Ritor1
parents:
diff changeset
63 __int16 field_14;
Ritor1
parents:
diff changeset
64 __int16 field_16;
Ritor1
parents:
diff changeset
65 int field_18;
Ritor1
parents:
diff changeset
66 int field_1C;
Ritor1
parents:
diff changeset
67 };
Ritor1
parents:
diff changeset
68 #pragma pack(pop)
Ritor1
parents:
diff changeset
69
Ritor1
parents:
diff changeset
70
Ritor1
parents:
diff changeset
71 /* 81 */
Ritor1
parents:
diff changeset
72 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
73 struct ODMFace
Ritor1
parents:
diff changeset
74 {
Ritor1
parents:
diff changeset
75 bool HasEventHint();
Ritor1
parents:
diff changeset
76
Ritor1
parents:
diff changeset
77
Ritor1
parents:
diff changeset
78 static bool IsBackfaceCulled(struct ODMFace *a1, struct RenderVertexSoft *a2, struct stru148 *a3);
Ritor1
parents:
diff changeset
79
Ritor1
parents:
diff changeset
80 inline bool Invisible() const {return uAttributes & FACE_INVISIBLE;}
Ritor1
parents:
diff changeset
81 inline bool Visible() const {return !Invisible();}
Ritor1
parents:
diff changeset
82 inline bool TwoSided() const {return uAttributes & FACE_TWO_SIDED;}
Ritor1
parents:
diff changeset
83
Ritor1
parents:
diff changeset
84 struct Plane_int_ pFacePlane;
Ritor1
parents:
diff changeset
85 int zCalc1;
Ritor1
parents:
diff changeset
86 int zCalc2;
Ritor1
parents:
diff changeset
87 int zCalc3;
Ritor1
parents:
diff changeset
88 unsigned int uAttributes;
Ritor1
parents:
diff changeset
89 unsigned __int16 pVertexIDs[20];
Ritor1
parents:
diff changeset
90 unsigned __int16 pTextureUIDs[20];
Ritor1
parents:
diff changeset
91 unsigned __int16 pTextureVIDs[20];
Ritor1
parents:
diff changeset
92 unsigned __int16 pXInterceptDisplacements[20];
Ritor1
parents:
diff changeset
93 unsigned __int16 pYInterceptDisplacements[20];
Ritor1
parents:
diff changeset
94 unsigned __int16 pZInterceptDisplacements[20];
Ritor1
parents:
diff changeset
95 unsigned __int16 uTextureID;
Ritor1
parents:
diff changeset
96 __int16 sTextureDeltaU;
Ritor1
parents:
diff changeset
97 __int16 sTextureDeltaV;
Ritor1
parents:
diff changeset
98 struct BBox_short_ pBoundingBox;
Ritor1
parents:
diff changeset
99 __int16 sCogNumber;
Ritor1
parents:
diff changeset
100 __int16 sCogTriggeredID;
Ritor1
parents:
diff changeset
101 __int16 sCogTriggerType;
Ritor1
parents:
diff changeset
102 char field_128;
Ritor1
parents:
diff changeset
103 char field_129;
Ritor1
parents:
diff changeset
104 unsigned __int8 uGradientVertex1;
Ritor1
parents:
diff changeset
105 unsigned __int8 uGradientVertex2;
Ritor1
parents:
diff changeset
106 unsigned __int8 uGradientVertex3;
Ritor1
parents:
diff changeset
107 unsigned __int8 uGradientVertex4;
Ritor1
parents:
diff changeset
108 unsigned __int8 uNumVertices;
Ritor1
parents:
diff changeset
109 unsigned __int8 uPolygonType;
Ritor1
parents:
diff changeset
110 unsigned __int8 uShadeType;
Ritor1
parents:
diff changeset
111 unsigned __int8 bVisible;
Ritor1
parents:
diff changeset
112 char field_132;
Ritor1
parents:
diff changeset
113 char field_133;
Ritor1
parents:
diff changeset
114 };
Ritor1
parents:
diff changeset
115 #pragma pack(pop)
Ritor1
parents:
diff changeset
116
Ritor1
parents:
diff changeset
117
Ritor1
parents:
diff changeset
118
Ritor1
parents:
diff changeset
119 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
120 struct OutdoorLocation
Ritor1
parents:
diff changeset
121 {
Ritor1
parents:
diff changeset
122 //----- (004626BA) --------------------------------------------------------
Ritor1
parents:
diff changeset
123 OutdoorLocation()
Ritor1
parents:
diff changeset
124 {
Ritor1
parents:
diff changeset
125 subconstuctor();
Ritor1
parents:
diff changeset
126 uLastSunlightUpdateMinute = 0;
Ritor1
parents:
diff changeset
127 }
Ritor1
parents:
diff changeset
128 //----- (004626CD) --------------------------------------------------------
Ritor1
parents:
diff changeset
129 void subconstuctor()
Ritor1
parents:
diff changeset
130 {
Ritor1
parents:
diff changeset
131 //OutdoorLocationTerrain::OutdoorLocationTerrain(&this->pTerrain);
Ritor1
parents:
diff changeset
132 field_F0 = 0;
Ritor1
parents:
diff changeset
133 field_F4 = 0x40000000u;
Ritor1
parents:
diff changeset
134 //DLVHeader::DLVHeader(&v1->ddm);
Ritor1
parents:
diff changeset
135 pSpawnPoints = 0;
Ritor1
parents:
diff changeset
136 pBModels = 0;
Ritor1
parents:
diff changeset
137 ptr_D4 = 0;
Ritor1
parents:
diff changeset
138 pFaceIDLIST = 0;
Ritor1
parents:
diff changeset
139 pOMAP = 0;
Ritor1
parents:
diff changeset
140 }
Ritor1
parents:
diff changeset
141
Ritor1
parents:
diff changeset
142 void ExecDraw(unsigned int bRedraw);
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 119
diff changeset
143 void PrepareActorsDrawList();
0
Ritor1
parents:
diff changeset
144 void CreateDebugLocation();
Ritor1
parents:
diff changeset
145 void Release();
119
be3c07c98861 Outdoor minimap fixed (didn't test wizard eye thou)
Nomad
parents: 0
diff changeset
146 bool Load(const char *pFilename, ODMFace *File, size_t a4, int thisa);
0
Ritor1
parents:
diff changeset
147 int _47ECC1(signed int a2);
Ritor1
parents:
diff changeset
148 unsigned int DoGetTileTexture(unsigned int uX, unsigned int uZ);
Ritor1
parents:
diff changeset
149 int _47ED83(signed int a2, signed int a3);
Ritor1
parents:
diff changeset
150 int ActuallyGetSomeOtherTileInfo(unsigned int uX, unsigned int uY);
Ritor1
parents:
diff changeset
151 int DoGetHeightOnTerrain(unsigned int uX, unsigned int uZ);
Ritor1
parents:
diff changeset
152 int _47EE49(signed int a2, signed int a3, int a4);
Ritor1
parents:
diff changeset
153 int _47EF60(int a2, int a3, int a4);
Ritor1
parents:
diff changeset
154 bool _47F04C(signed int a2, signed int a3);
Ritor1
parents:
diff changeset
155 bool _47F097(signed int a2, signed int a3);
Ritor1
parents:
diff changeset
156 bool _47F0E2();
Ritor1
parents:
diff changeset
157 bool PrepareDecorations();
Ritor1
parents:
diff changeset
158 int _47F223_LooksLikeGenerateMonsterLoot();
Ritor1
parents:
diff changeset
159 bool InitalizeActors(int a1);
Ritor1
parents:
diff changeset
160 bool _47F3EA();
Ritor1
parents:
diff changeset
161 bool LoadTileGroupIds();
Ritor1
parents:
diff changeset
162 double GetFogDensityByTime();
Ritor1
parents:
diff changeset
163 int GetSomeOtherTileInfo(int sX, int sY);
Ritor1
parents:
diff changeset
164 unsigned int GetTileTexture(int sX, int sZ);
Ritor1
parents:
diff changeset
165 int GetHeightOnTerrain(int sX, int sZ);
Ritor1
parents:
diff changeset
166 bool Initialize(const char *pFilename, int File, size_t uRespawnInterval, int thisa);
Ritor1
parents:
diff changeset
167 bool Release2();
Ritor1
parents:
diff changeset
168 bool GetTravelDestination(signed int sPartyX, signed int sPartyZ, char *pOut, signed int a5);
Ritor1
parents:
diff changeset
169 void MessWithLUN();
Ritor1
parents:
diff changeset
170 unsigned int UpdateSunlightVectors();
Ritor1
parents:
diff changeset
171 void UpdateFog();
Ritor1
parents:
diff changeset
172 int GetNumFoodRequiredToRestInCurrentPos(int x, signed int y, int z);
Ritor1
parents:
diff changeset
173 int SetFog();
Ritor1
parents:
diff changeset
174 void Draw();
Ritor1
parents:
diff changeset
175
Ritor1
parents:
diff changeset
176
Ritor1
parents:
diff changeset
177 char pLevelFilename[32];
Ritor1
parents:
diff changeset
178 char pLocationFileName[32];
Ritor1
parents:
diff changeset
179 char pLocationFileDescription[32];
Ritor1
parents:
diff changeset
180 char pSkyTextureName[32];
Ritor1
parents:
diff changeset
181 char pGroundTileset[32];
Ritor1
parents:
diff changeset
182 OutdoorLocationTileType pTileTypes[4];
Ritor1
parents:
diff changeset
183 unsigned int uNumBModels;
Ritor1
parents:
diff changeset
184 struct OutdoorLocationTerrain pTerrain;
Ritor1
parents:
diff changeset
185 void *ptr_D4;
Ritor1
parents:
diff changeset
186 struct BSPModel *pBModels;
Ritor1
parents:
diff changeset
187 unsigned int numFaceIDListElems;
Ritor1
parents:
diff changeset
188 unsigned __int16 *pFaceIDLIST;
Ritor1
parents:
diff changeset
189 unsigned int *pOMAP;
Ritor1
parents:
diff changeset
190 unsigned int uSky_TextureID;
Ritor1
parents:
diff changeset
191 unsigned int uMainTile_BitmapID;
Ritor1
parents:
diff changeset
192 __int16 field_F0;
Ritor1
parents:
diff changeset
193 __int16 field_F2;
Ritor1
parents:
diff changeset
194 int field_F4;
Ritor1
parents:
diff changeset
195 char field_F8[968];
Ritor1
parents:
diff changeset
196 unsigned int uNumSpawnPoints;
Ritor1
parents:
diff changeset
197 struct SpawnPointMM7 *pSpawnPoints;
Ritor1
parents:
diff changeset
198 struct DDM_DLV_Header ddm;
Ritor1
parents:
diff changeset
199 unsigned __int64 uLastVisitDay;
Ritor1
parents:
diff changeset
200 char field_4F8[12];
Ritor1
parents:
diff changeset
201 int day_attrib;
Ritor1
parents:
diff changeset
202 int day_fogrange_1;
Ritor1
parents:
diff changeset
203 int day_fogrange_2;
Ritor1
parents:
diff changeset
204 char field_510[24];
Ritor1
parents:
diff changeset
205 char array_528[968];
Ritor1
parents:
diff changeset
206 char array_8F0[968];
Ritor1
parents:
diff changeset
207 int field_CB8;
Ritor1
parents:
diff changeset
208 int field_CBC_terrain_triangles_shade_type;
Ritor1
parents:
diff changeset
209 int field_CC0;
Ritor1
parents:
diff changeset
210 unsigned int pSpriteIDs_LUN[8];
Ritor1
parents:
diff changeset
211 unsigned int uSpriteID_LUNFULL;
Ritor1
parents:
diff changeset
212 int field_CE8;
Ritor1
parents:
diff changeset
213 unsigned int uSpriteID_LUN3_4_cp;
Ritor1
parents:
diff changeset
214 int field_CF0;
Ritor1
parents:
diff changeset
215 unsigned int uSpriteID_LUN1_2_cp;
Ritor1
parents:
diff changeset
216 int field_CF8;
Ritor1
parents:
diff changeset
217 unsigned int uSpriteID_LUN1_4_cp;
Ritor1
parents:
diff changeset
218 int field_D00;
Ritor1
parents:
diff changeset
219 unsigned __int16 uSpriteID_LUN_SUN;
Ritor1
parents:
diff changeset
220 __int16 field_D06;
Ritor1
parents:
diff changeset
221 int field_D08;
Ritor1
parents:
diff changeset
222 int field_D0C;
Ritor1
parents:
diff changeset
223 int field_D10;
Ritor1
parents:
diff changeset
224 int field_D14;
Ritor1
parents:
diff changeset
225 int field_D18;
Ritor1
parents:
diff changeset
226 int field_D1C;
Ritor1
parents:
diff changeset
227 int field_D20;
Ritor1
parents:
diff changeset
228 int field_D24;
Ritor1
parents:
diff changeset
229 int field_D28;
Ritor1
parents:
diff changeset
230 int field_D2C;
Ritor1
parents:
diff changeset
231 Vec3_int_ vSunlight;
Ritor1
parents:
diff changeset
232 int field_D3C;
Ritor1
parents:
diff changeset
233 int field_D40;
Ritor1
parents:
diff changeset
234 int field_D44;
Ritor1
parents:
diff changeset
235 int field_D48;
Ritor1
parents:
diff changeset
236 int field_D4C;
Ritor1
parents:
diff changeset
237 float field_D50;
Ritor1
parents:
diff changeset
238 int field_D54;
Ritor1
parents:
diff changeset
239 int field_D58;
Ritor1
parents:
diff changeset
240 int field_D5C;
Ritor1
parents:
diff changeset
241 int field_D60;
Ritor1
parents:
diff changeset
242 int field_D64;
Ritor1
parents:
diff changeset
243 char field_D68[111900];
Ritor1
parents:
diff changeset
244 float fFogDensity;
Ritor1
parents:
diff changeset
245 int uLastSunlightUpdateMinute;
Ritor1
parents:
diff changeset
246 };
Ritor1
parents:
diff changeset
247 #pragma pack(pop)
Ritor1
parents:
diff changeset
248
Ritor1
parents:
diff changeset
249
Ritor1
parents:
diff changeset
250 extern struct OutdoorLocation *pOutdoor;
Ritor1
parents:
diff changeset
251
Ritor1
parents:
diff changeset
252
Ritor1
parents:
diff changeset
253
Ritor1
parents:
diff changeset
254
Ritor1
parents:
diff changeset
255
Ritor1
parents:
diff changeset
256
Ritor1
parents:
diff changeset
257
Ritor1
parents:
diff changeset
258
Ritor1
parents:
diff changeset
259
Ritor1
parents:
diff changeset
260
Ritor1
parents:
diff changeset
261
Ritor1
parents:
diff changeset
262
Ritor1
parents:
diff changeset
263
Ritor1
parents:
diff changeset
264 #include "Outdoor_stuff.h"