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