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