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