annotate Outdoor_stuff.h @ 2154:9bd7522cdbbb

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