Mercurial > mm7
annotate Outdoor.h @ 1755:77abbabd2a04
m
author | Ritor1 |
---|---|
date | Mon, 30 Sep 2013 18:05:50 +0600 |
parents | 69ab7593e7af |
children | 72af4d93bdfb |
rev | line source |
---|---|
0 | 1 #pragma |
1016 | 2 |
0 | 3 #include "Indoor.h" |
630 | 4 #include "TileFrameTable.h" |
1391
cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents:
1323
diff
changeset
|
5 #include "BSPModel.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 | |
1391
cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents:
1323
diff
changeset
|
85 static bool IsBackfaceCulled(struct ODMFace *a1, struct RenderVertexSoft *a2, struct Polygon *a3); |
0 | 86 |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1052
diff
changeset
|
87 inline bool Invisible() const {return (uAttributes & FACE_INVISIBLE) != 0;} |
0 | 88 inline bool Visible() const {return !Invisible();} |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1052
diff
changeset
|
89 inline bool Portal() const {return (uAttributes & FACE_PORTAL) != 0;} |
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1052
diff
changeset
|
90 inline bool Fluid() const {return (uAttributes & FACE_FLUID) != 0;} |
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1052
diff
changeset
|
91 inline bool Clickable() const {return (uAttributes & FACE_CLICKABLE) != 0;} |
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]; |
1632 | 104 __int16 uTextureID; |
0 | 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 { | |
1323 | 131 OutdoorLocation(); |
132 void subconstuctor(); | |
0 | 133 |
134 void ExecDraw(unsigned int bRedraw); | |
142 | 135 void PrepareActorsDrawList(); |
0 | 136 void CreateDebugLocation(); |
137 void Release(); | |
119 | 138 bool Load(const char *pFilename, ODMFace *File, size_t a4, int thisa); |
764 | 139 int GetTileIdByTileMapId(signed int a2); |
0 | 140 unsigned int DoGetTileTexture(unsigned int uX, unsigned int uZ); |
141 int _47ED83(signed int a2, signed int a3); | |
142 int ActuallyGetSomeOtherTileInfo(unsigned int uX, unsigned int uY); | |
143 int DoGetHeightOnTerrain(unsigned int uX, unsigned int uZ); | |
764 | 144 int GetSoundIdByPosition(signed int X_pos, signed int Y_pos, int a4); |
752 | 145 int UpdateDiscoveredArea(int a2, int a3, int a4); |
0 | 146 bool _47F04C(signed int a2, signed int a3); |
147 bool _47F097(signed int a2, signed int a3); | |
148 bool _47F0E2(); | |
149 bool PrepareDecorations(); | |
150 int _47F223_LooksLikeGenerateMonsterLoot(); | |
151 bool InitalizeActors(int a1); | |
630 | 152 bool LoadRoadTileset(); |
0 | 153 bool LoadTileGroupIds(); |
154 double GetFogDensityByTime(); | |
155 int GetSomeOtherTileInfo(int sX, int sY); | |
156 unsigned int GetTileTexture(int sX, int sZ); | |
157 int GetHeightOnTerrain(int sX, int sZ); | |
158 bool Initialize(const char *pFilename, int File, size_t uRespawnInterval, int thisa); | |
1583 | 159 //bool Release2(); |
0 | 160 bool GetTravelDestination(signed int sPartyX, signed int sPartyZ, char *pOut, signed int a5); |
161 void MessWithLUN(); | |
762 | 162 void UpdateSunlightVectors(); |
0 | 163 void UpdateFog(); |
164 int GetNumFoodRequiredToRestInCurrentPos(int x, signed int y, int z); | |
767 | 165 void SetFog(); |
0 | 166 void Draw(); |
167 | |
168 | |
169 char pLevelFilename[32]; | |
170 char pLocationFileName[32]; | |
171 char pLocationFileDescription[32]; | |
172 char pSkyTextureName[32]; | |
173 char pGroundTileset[32]; | |
630 | 174 OutdoorLocationTileType pTileTypes[4]; // [3] road tileset |
1267 | 175 int uNumBModels; |
0 | 176 struct OutdoorLocationTerrain pTerrain; |
760 | 177 void *pCmap; |
1052 | 178 BSPModel *pBModels; |
0 | 179 unsigned int numFaceIDListElems; |
180 unsigned __int16 *pFaceIDLIST; | |
181 unsigned int *pOMAP; | |
182 unsigned int uSky_TextureID; | |
183 unsigned int uMainTile_BitmapID; | |
184 __int16 field_F0; | |
185 __int16 field_F2; | |
186 int field_F4; | |
187 char field_F8[968]; | |
188 unsigned int uNumSpawnPoints; | |
189 struct SpawnPointMM7 *pSpawnPoints; | |
190 struct DDM_DLV_Header ddm; | |
810 | 191 LocationTime_stru1 loc_time; |
192 //unsigned __int64 uLastVisitDay; | |
193 //char sky_texture_name[12]; | |
194 //int day_attrib; | |
195 //int day_fogrange_1; | |
196 //int day_fogrange_2; | |
197 // char field_510[24]; | |
752 | 198 unsigned char uUndiscoveredArea[88][11];//968 |
199 unsigned char uDicovered_area[88][11];//[968] | |
0 | 200 int field_CB8; |
638 | 201 int max_terrain_dimming_level; |
0 | 202 int field_CC0; |
203 unsigned int pSpriteIDs_LUN[8]; | |
204 unsigned int uSpriteID_LUNFULL; | |
205 int field_CE8; | |
206 unsigned int uSpriteID_LUN3_4_cp; | |
207 int field_CF0; | |
208 unsigned int uSpriteID_LUN1_2_cp; | |
209 int field_CF8; | |
210 unsigned int uSpriteID_LUN1_4_cp; | |
211 int field_D00; | |
212 unsigned __int16 uSpriteID_LUN_SUN; | |
213 __int16 field_D06; | |
214 int field_D08; | |
215 int field_D0C; | |
216 int field_D10; | |
217 int field_D14; | |
638 | 218 int inv_sunlight_x; |
219 int inv_sunlight_y; | |
220 int inv_sunlight_z; | |
0 | 221 int field_D24; |
222 int field_D28; | |
223 int field_D2C; | |
224 Vec3_int_ vSunlight; | |
225 int field_D3C; | |
226 int field_D40; | |
227 int field_D44; | |
228 int field_D48; | |
229 int field_D4C; | |
230 float field_D50; | |
231 int field_D54; | |
232 int field_D58; | |
233 int field_D5C; | |
234 int field_D60; | |
235 int field_D64; | |
236 char field_D68[111900]; | |
237 float fFogDensity; | |
238 int uLastSunlightUpdateMinute; | |
239 }; | |
240 #pragma pack(pop) | |
241 | |
242 | |
243 extern struct OutdoorLocation *pOutdoor; | |
244 | |
245 | |
246 | |
247 | |
248 | |
249 | |
250 | |
251 | |
252 | |
253 | |
254 |