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