annotate Outdoor_stuff.h @ 1992:1e5f097e1c2d

fixing incorrect item checked when dealing damage to monsters
author Grumpy7
date Sun, 03 Nov 2013 01:25:54 -0800
parents 4359a15360e3
children d28d3c006077
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
1277
1803172dffd9 header stuff
Grumpy7
parents: 1262
diff changeset
2 #include "VectorTypes.h"
1803172dffd9 header stuff
Grumpy7
parents: 1262
diff changeset
3 #include <array>
0
Ritor1
parents:
diff changeset
4
1277
1803172dffd9 header stuff
Grumpy7
parents: 1262
diff changeset
5 struct ODMFace;
0
Ritor1
parents:
diff changeset
6
Ritor1
parents:
diff changeset
7
Ritor1
parents:
diff changeset
8 /* 141 */
1391
cc9a3a24d61d Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents: 1344
diff changeset
9 // stru148
0
Ritor1
parents:
diff changeset
10 #pragma pack(push, 1)
1391
cc9a3a24d61d Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents: 1344
diff changeset
11 struct Polygon
0
Ritor1
parents:
diff changeset
12 {
1391
cc9a3a24d61d Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents: 1344
diff changeset
13 inline Polygon()
265
96bc024a5fed Render overflows
Nomad
parents: 0
diff changeset
14 {
96bc024a5fed Render overflows
Nomad
parents: 0
diff changeset
15 uNumVertices = 0;
96bc024a5fed Render overflows
Nomad
parents: 0
diff changeset
16 }
96bc024a5fed Render overflows
Nomad
parents: 0
diff changeset
17
0
Ritor1
parents:
diff changeset
18 int _479295();
1338
9749edd941c6 shading terrain
Ritor1
parents: 1277
diff changeset
19 void DrawBorderTiles();
1391
cc9a3a24d61d Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents: 1344
diff changeset
20 //void _48276F_sr();
1410
38df78aba732 deleted stru220.h and stru220 (bezier terrain stuff)
Nomad
parents: 1391
diff changeset
21 void _normalize_v_18();
1427
Ritor1
parents: 1410
diff changeset
22 void Create_48607B(struct stru149 *a2);
0
Ritor1
parents:
diff changeset
23
Ritor1
parents:
diff changeset
24 float field_0;
Ritor1
parents:
diff changeset
25 float field_4;
Ritor1
parents:
diff changeset
26 float field_8;
Ritor1
parents:
diff changeset
27 float field_C;
Ritor1
parents:
diff changeset
28 float field_10;
Ritor1
parents:
diff changeset
29 unsigned int uNumVertices;
Ritor1
parents:
diff changeset
30 Vec3_int_ v_18;
Ritor1
parents:
diff changeset
31 int field_24;
Ritor1
parents:
diff changeset
32 int sTextureDeltaU;
Ritor1
parents:
diff changeset
33 int sTextureDeltaV;
Ritor1
parents:
diff changeset
34 __int16 flags;
Ritor1
parents:
diff changeset
35 __int16 field_32;
Ritor1
parents:
diff changeset
36 int field_34;
Ritor1
parents:
diff changeset
37 struct stru149 *ptr_38;
1262
0aeac0b9ca30 included header cleanup
Grumpy7
parents: 1206
diff changeset
38 struct Texture *pTexture;
1644
dbd6f940f26c Fixed Celestia sky a bit.
Nomad
parents: 1642
diff changeset
39 struct Span *_unused_prolly_head;
dbd6f940f26c Fixed Celestia sky a bit.
Nomad
parents: 1642
diff changeset
40 struct Span *_unused_prolly_tail;
0
Ritor1
parents:
diff changeset
41 int **ptr_48;
Ritor1
parents:
diff changeset
42 unsigned __int16 uTileBitmapID;
Ritor1
parents:
diff changeset
43 __int16 field_4E;
Ritor1
parents:
diff changeset
44 __int16 field_50;
Ritor1
parents:
diff changeset
45 __int16 field_52;
Ritor1
parents:
diff changeset
46 ODMFace *pODMFace;
638
ccf8b4815a1f GetActorTintColor fixed
Nomad
parents: 265
diff changeset
47 char dimming_level;
0
Ritor1
parents:
diff changeset
48 char field_59;
Ritor1
parents:
diff changeset
49 char field_5A;
Ritor1
parents:
diff changeset
50 char field_5B;
638
ccf8b4815a1f GetActorTintColor fixed
Nomad
parents: 265
diff changeset
51 char terrain_grid_z;
ccf8b4815a1f GetActorTintColor fixed
Nomad
parents: 265
diff changeset
52 char terrain_grid_x;
0
Ritor1
parents:
diff changeset
53 unsigned __int8 uBModelID;
Ritor1
parents:
diff changeset
54 unsigned __int8 uBModelFaceID;
Ritor1
parents:
diff changeset
55 struct Edge *pEdgeList1[20];
Ritor1
parents:
diff changeset
56 unsigned int uEdgeList1Size;
Ritor1
parents:
diff changeset
57 struct Edge *pEdgeList2[20];
Ritor1
parents:
diff changeset
58 unsigned int uEdgeList2Size;
Ritor1
parents:
diff changeset
59 char field_108;
Ritor1
parents:
diff changeset
60 char field_109;
Ritor1
parents:
diff changeset
61 char field_10A;
Ritor1
parents:
diff changeset
62 char field_10B;
Ritor1
parents:
diff changeset
63 };
Ritor1
parents:
diff changeset
64 #pragma pack(pop)
1391
cc9a3a24d61d Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents: 1344
diff changeset
65 extern std::array<struct Polygon, 2000 + 18000> array_77EC08;
0
Ritor1
parents:
diff changeset
66
Ritor1
parents:
diff changeset
67 /* 142 */
Ritor1
parents:
diff changeset
68 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
69 struct stru149
Ritor1
parents:
diff changeset
70 {
1544
499761153844 stru149
Nomad
parents: 1445
diff changeset
71 void _48616B_frustum_odm(int a2, int a3, int a4, int a5, int a6, int a7);
499761153844 stru149
Nomad
parents: 1445
diff changeset
72 void _48653D_frustum_blv(int a2, int a3, int a4, int a5, int a6, int a7);
499761153844 stru149
Nomad
parents: 1445
diff changeset
73 void _48694B_frustum_sky();
0
Ritor1
parents:
diff changeset
74
755
e0914a9bc424 stru149 decompilation errors on some blv saves.
Nomad
parents: 638
diff changeset
75 int field_0_party_dir_x;
e0914a9bc424 stru149 decompilation errors on some blv saves.
Nomad
parents: 638
diff changeset
76 int field_4_party_dir_y;
1544
499761153844 stru149
Nomad
parents: 1445
diff changeset
77 int field_8_party_dir_z;
1809
8f20f7e1091d original DrawSkyD3D() fix
Ritor1
parents: 1644
diff changeset
78 int angle_from_north;//field_C
8f20f7e1091d original DrawSkyD3D() fix
Ritor1
parents: 1644
diff changeset
79 int angle_from_west;//field_10
1844
Ritor1
parents: 1837
diff changeset
80 int viewing_angle_from_west_east;
1809
8f20f7e1091d original DrawSkyD3D() fix
Ritor1
parents: 1644
diff changeset
81 int angle_from_east;//field_18
8f20f7e1091d original DrawSkyD3D() fix
Ritor1
parents: 1644
diff changeset
82 int angle_from_south;//field_1C
1844
Ritor1
parents: 1837
diff changeset
83 int viewing_angle_from_north_south;//field_20
0
Ritor1
parents:
diff changeset
84 int field_24;
Ritor1
parents:
diff changeset
85 int field_28;
Ritor1
parents:
diff changeset
86 };
Ritor1
parents:
diff changeset
87 #pragma pack(pop)
Ritor1
parents:
diff changeset
88 extern stru149 stru_8019C8;
Ritor1
parents:
diff changeset
89
Ritor1
parents:
diff changeset
90
1637
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
91 /* 88 */
0
Ritor1
parents:
diff changeset
92 #pragma pack(push, 1)
1637
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
93 struct ODMRenderParams
0
Ritor1
parents:
diff changeset
94 {
1637
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
95 //----- (00462684) --------------------------------------------------------
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
96 ODMRenderParams()
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
97 {
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
98 uPickDepth = 0;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
99 this->shading_dist_shade = 2048;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
100 shading_dist_shademist = 4096;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
101 shading_dist_mist = 8192;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
102 int_fov_rad = 0;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
103 this->bNoSky = 0;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
104 this->bDoNotRenderDecorations = 0;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
105 this->field_5C = 0;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
106 this->field_60 = 0;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
107 this->outdoor_no_wavy_water = 0;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
108 this->outdoor_no_mist = 0;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
109 }
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
110
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
111 void Initialize();
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
112
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
113 int uPickDepth;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
114 int shading_dist_shade;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
115 int shading_dist_shademist;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
116 int shading_dist_mist;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
117 unsigned int uCameraFovInDegrees;
1642
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
118 int int_fov_rad; // 157 struct IndoorCamera::fov_rad
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
119 int int_fov_rad_inv; // 157 struct IndoorCamera::fov_rad_inv
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
120 int _unused_camera_rotation_y_int_sine; // merged with BLVRenderParams equivalents
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
121 int _unused_camera_rotation_y_int_cosine; // into IndoorCameraD3D
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
122 int _unused_camera_rotation_x_int_sine; // --//--
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
123 int _unused_camera_rotation_x_int_cosine; // --//--
1637
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
124 int uNumPolygons;
1642
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
125 unsigned int _unused_uNumEdges;
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
126 unsigned int _unused_uNumSurfs;
8971dc85b8fb More camera unifications.
Nomad
parents: 1640
diff changeset
127 unsigned int _unused_uNumSpans;
1637
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
128 unsigned int uNumBillboards;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
129 float field_40;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
130 int field_44;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
131 int outdoor_grid_band_3;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
132 int field_4C;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
133 int field_50;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
134 unsigned int bNoSky;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
135 unsigned int bDoNotRenderDecorations;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
136 int field_5C;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
137 int field_60;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
138 int outdoor_no_wavy_water;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
139 int outdoor_no_mist;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
140 int building_gamme;
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
141 int terrain_gamma;
1640
afc1c3514dd5 Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
Nomad
parents: 1638
diff changeset
142
1638
ccde94f02b75 class IndoorCamera split into BLVRenderParams and ODMRenderParams
Nomad
parents: 1637
diff changeset
143 unsigned int uMapGridCellX; // moved from 157 struct IndoorCamera::0C
ccde94f02b75 class IndoorCamera split into BLVRenderParams and ODMRenderParams
Nomad
parents: 1637
diff changeset
144 unsigned int uMapGridCellZ; // moved from 157 struct IndoorCamera::10
0
Ritor1
parents:
diff changeset
145 };
Ritor1
parents:
diff changeset
146 #pragma pack(pop)
1637
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
147 extern ODMRenderParams *pODMRenderParams;
0
Ritor1
parents:
diff changeset
148
Ritor1
parents:
diff changeset
149
Ritor1
parents:
diff changeset
150
1637
2c71fa8913d2 class OutdoorCamera -> ODMRenderParams
Nomad
parents: 1544
diff changeset
151 void ODM_Project(unsigned int uNumVertices);