Mercurial > mm7
annotate Outdoor.h @ 1388:60d4885eb107
sACModifier zeroed in player constructor so AC is not always 0(or -some value) ingame
author | Grumpy7 |
---|---|
date | Wed, 17 Jul 2013 00:39:37 +0200 |
parents | bfde0563ecdc |
children | cc9a3a24d61d |
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 { | |
1323 | 130 OutdoorLocation(); |
131 void subconstuctor(); | |
0 | 132 |
133 void ExecDraw(unsigned int bRedraw); | |
142 | 134 void PrepareActorsDrawList(); |
0 | 135 void CreateDebugLocation(); |
136 void Release(); | |
119 | 137 bool Load(const char *pFilename, ODMFace *File, size_t a4, int thisa); |
764 | 138 int GetTileIdByTileMapId(signed int a2); |
0 | 139 unsigned int DoGetTileTexture(unsigned int uX, unsigned int uZ); |
140 int _47ED83(signed int a2, signed int a3); | |
141 int ActuallyGetSomeOtherTileInfo(unsigned int uX, unsigned int uY); | |
142 int DoGetHeightOnTerrain(unsigned int uX, unsigned int uZ); | |
764 | 143 int GetSoundIdByPosition(signed int X_pos, signed int Y_pos, int a4); |
752 | 144 int UpdateDiscoveredArea(int a2, int a3, int a4); |
0 | 145 bool _47F04C(signed int a2, signed int a3); |
146 bool _47F097(signed int a2, signed int a3); | |
147 bool _47F0E2(); | |
148 bool PrepareDecorations(); | |
149 int _47F223_LooksLikeGenerateMonsterLoot(); | |
150 bool InitalizeActors(int a1); | |
630 | 151 bool LoadRoadTileset(); |
0 | 152 bool LoadTileGroupIds(); |
153 double GetFogDensityByTime(); | |
154 int GetSomeOtherTileInfo(int sX, int sY); | |
155 unsigned int GetTileTexture(int sX, int sZ); | |
156 int GetHeightOnTerrain(int sX, int sZ); | |
157 bool Initialize(const char *pFilename, int File, size_t uRespawnInterval, int thisa); | |
158 bool Release2(); | |
159 bool GetTravelDestination(signed int sPartyX, signed int sPartyZ, char *pOut, signed int a5); | |
160 void MessWithLUN(); | |
762 | 161 void UpdateSunlightVectors(); |
0 | 162 void UpdateFog(); |
163 int GetNumFoodRequiredToRestInCurrentPos(int x, signed int y, int z); | |
767 | 164 void SetFog(); |
0 | 165 void Draw(); |
166 | |
167 | |
168 char pLevelFilename[32]; | |
169 char pLocationFileName[32]; | |
170 char pLocationFileDescription[32]; | |
171 char pSkyTextureName[32]; | |
172 char pGroundTileset[32]; | |
630 | 173 OutdoorLocationTileType pTileTypes[4]; // [3] road tileset |
1267 | 174 int uNumBModels; |
0 | 175 struct OutdoorLocationTerrain pTerrain; |
760 | 176 void *pCmap; |
1052 | 177 BSPModel *pBModels; |
0 | 178 unsigned int numFaceIDListElems; |
179 unsigned __int16 *pFaceIDLIST; | |
180 unsigned int *pOMAP; | |
181 unsigned int uSky_TextureID; | |
182 unsigned int uMainTile_BitmapID; | |
183 __int16 field_F0; | |
184 __int16 field_F2; | |
185 int field_F4; | |
186 char field_F8[968]; | |
187 unsigned int uNumSpawnPoints; | |
188 struct SpawnPointMM7 *pSpawnPoints; | |
189 struct DDM_DLV_Header ddm; | |
810 | 190 LocationTime_stru1 loc_time; |
191 //unsigned __int64 uLastVisitDay; | |
192 //char sky_texture_name[12]; | |
193 //int day_attrib; | |
194 //int day_fogrange_1; | |
195 //int day_fogrange_2; | |
196 // char field_510[24]; | |
752 | 197 unsigned char uUndiscoveredArea[88][11];//968 |
198 unsigned char uDicovered_area[88][11];//[968] | |
0 | 199 int field_CB8; |
638 | 200 int max_terrain_dimming_level; |
0 | 201 int field_CC0; |
202 unsigned int pSpriteIDs_LUN[8]; | |
203 unsigned int uSpriteID_LUNFULL; | |
204 int field_CE8; | |
205 unsigned int uSpriteID_LUN3_4_cp; | |
206 int field_CF0; | |
207 unsigned int uSpriteID_LUN1_2_cp; | |
208 int field_CF8; | |
209 unsigned int uSpriteID_LUN1_4_cp; | |
210 int field_D00; | |
211 unsigned __int16 uSpriteID_LUN_SUN; | |
212 __int16 field_D06; | |
213 int field_D08; | |
214 int field_D0C; | |
215 int field_D10; | |
216 int field_D14; | |
638 | 217 int inv_sunlight_x; |
218 int inv_sunlight_y; | |
219 int inv_sunlight_z; | |
0 | 220 int field_D24; |
221 int field_D28; | |
222 int field_D2C; | |
223 Vec3_int_ vSunlight; | |
224 int field_D3C; | |
225 int field_D40; | |
226 int field_D44; | |
227 int field_D48; | |
228 int field_D4C; | |
229 float field_D50; | |
230 int field_D54; | |
231 int field_D58; | |
232 int field_D5C; | |
233 int field_D60; | |
234 int field_D64; | |
235 char field_D68[111900]; | |
236 float fFogDensity; | |
237 int uLastSunlightUpdateMinute; | |
238 }; | |
239 #pragma pack(pop) | |
240 | |
241 | |
242 extern struct OutdoorLocation *pOutdoor; | |
243 | |
244 | |
245 | |
246 | |
247 | |
248 | |
249 | |
250 | |
251 | |
252 | |
253 |