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