annotate Render.h @ 71:8453114181af

intermediate
author Nomad
date Sat, 27 Oct 2012 21:44:29 +0200
parents fdacbc653945
children
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #pragma once
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2 #include <stdio.h>
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4 #include "lib\legacy_dx\d3d.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5 #include "OSAPI.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7 #include "Sprites.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8 #include "VectorTypes.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10 struct stru148;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11 struct Texture;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12 struct RGBTexture;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13 struct RenderBillboardTransform_local0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14 struct ODMFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17 /* 119 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 struct RenderVertexSoft
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
21 inline RenderVertexSoft():
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
22 flt_2C(0.0f)
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
23 {}
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
24
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
25 Vec3_float_ vWorldPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26 Vec3_float_ vWorldViewPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27 float vWorldViewProjX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28 float vWorldViewProjY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29 float flt_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30 float u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
31 float v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 float flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38 /* 112 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 struct RenderVertexD3D3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42 Vec3_float_ pos;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43 float rhw;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 unsigned int diffuse;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 unsigned int specular;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46 Vec2_float_ texcoord;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 /* 161 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53 struct RenderBillboard
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 int field_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 int field_4;
59
5159d2e6f559 BLV render
Nomad
parents: 52
diff changeset
57 float fov_x;
5159d2e6f559 BLV render
Nomad
parents: 52
diff changeset
58 float fov_y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59 int sZValue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 int field_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 unsigned __int16 uHwSpriteID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 __int16 uPalette;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63 __int16 uIndoorSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 __int16 field_1E;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
65 __int16 some_x;
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
66 __int16 some_y;
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
67 __int16 some_z;
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
68 __int16 uScreenSpaceX;
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
69 __int16 uScreenSpaceY;
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
70 unsigned __int16 uPaletteSubindex;
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
71 unsigned int uTintColor;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 SpriteFrame *pSpriteFrame;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 struct RenderD3D__DevInfo
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80 unsigned int bIsDeviceCompatible;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 char *pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 char *pDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 GUID *pGUID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 unsigned int uCaps;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 char *pDriverName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 char *pDeviceDesc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 char *pDDraw4DevDesc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 GUID *pDirectDrawGUID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 int uVideoMem;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 struct RenderD3D_D3DDevDesc
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 int field_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 int field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 int field_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 int field_C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 int field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103 char *pDriverName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 char *pDeviceDesc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 char *pDDraw4DevDesc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 GUID *pGUID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 unsigned int uVideoMem;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 /* 280 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 struct HWLTexture
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 1
diff changeset
123 inline HWLTexture():
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 1
diff changeset
124 field_0(0), field_4(0), field_8(0),
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 1
diff changeset
125 field_C(0), field_10(0), field_14(0)
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 1
diff changeset
126 {}
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 1
diff changeset
127
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 int field_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 int field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 int field_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 int field_C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 int field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133 int field_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134 int field_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135 int field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136 int field_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 int field_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 unsigned int uWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 unsigned int uHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 int field_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 int field_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 unsigned __int16 *pPixels;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 /* 185 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 struct RenderHWLContainer
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151 RenderHWLContainer();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 bool Load(const wchar_t *pFilename);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 bool Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 HWLTexture *LoadTexture(const char *pName, int bMipMaps);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 FILE *pFile;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 uint uSignature;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159 unsigned int uDataOffset;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 unsigned int uNumItems;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 char *pSpriteNames[50000];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 int pSpriteOffsets[50000];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 int bDumpDebug;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 int field_61A94_scale_hwls_to_half;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 /* 242 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172 struct RenderBillboardD3D
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
174 enum OpacityType: unsigned __int32
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
175 {
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
176 Transparent = 0,
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
177 Opaque_1 = 1,
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
178 Opaque_2 = 2,
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
179 Opaque_3 = 3,
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
180 InvalidOpacity = 0xFFFFFFFF
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
181 };
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
182
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183 IDirect3DTexture2 *pTexture;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184 unsigned int uNumVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 RenderVertexD3D3 pQuards[4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 float flt_88;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
187 OpacityType uOpacity;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188 int field_90;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
189 int sZValue;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190 unsigned int uParentBillboardID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
198 struct RenderD3D_aux
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
199 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
200 RenderD3D__DevInfo *pInfo;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
201 RenderD3D_D3DDevDesc *ptr_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
202 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
203 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
204
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
205
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
206
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
207 /* 183 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
208 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
209 struct RenderD3D
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
210 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
211 RenderD3D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
212
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
213 static bool DoesRaiseExceptions();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
215 void GetAvailableDevices(RenderD3D__DevInfo **pOutDevices);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
216 void Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
217 bool CreateDevice(unsigned int uDeviceID, int bWindowed, HWND hWnd);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
218 unsigned int GetDeviceCaps();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
219 void ClearTarget(unsigned int bClearColor, unsigned int uClearColor, unsigned int bClearDepth, float z_clear);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
220 void Present(bool bForceBlit);
1
ac0fb48cd27a Texture, hwl loading, video player
Nomad
parents: 0
diff changeset
221 bool CreateTexture(unsigned int uTextureWidth, unsigned int uTextureHeight, IDirectDrawSurface4 **pOutSurface, IDirect3DTexture2 **pOutTexture, bool bAlphaChannel, bool bMipmaps, unsigned int uMinDeviceTexDim);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
222 void HandleLostResources();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
223
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
224
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
225 unsigned int bWindowed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
226 int field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
227 int field_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
228 HWND hWindow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
229 int field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
230 int field_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
231 int field_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
232 RenderD3D__DevInfo *pAvailableDevices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
233 IDirectDraw4 *pHost;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
234 IDirect3D3 *pDirect3D;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
235 IUnknown *pUnk;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
236 IDirectDrawSurface4 *pBackBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
237 IDirectDrawSurface4 *pFrontBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
238 IDirectDrawSurface4 *pZBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
239 IDirect3DDevice3 *pDevice;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
240 IDirect3DViewport3 *pViewport;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
241 int field_40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
242 int field_44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
243 char pErrorMessage[48];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
244 char field_78[208];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
245 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
246 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
247
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
248
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
249 /* 182 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
250 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
251 struct Render
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
252 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
253 Render();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
254 ~Render();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
255
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
256 static Render *Create() {return new Render;}
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
257
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
258 bool Initialize(bool bWindowed, uint uDefaultDevice,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
259 bool bColoredLights, uint uDetailLevel, uint bTinting);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
261 static void __fastcall SetPixel(struct Vec2_int_ *pTargetXY, unsigned __int16 uColor);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
262
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
263 bool IsColorKeySupported(IDirectDraw4 *);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
264 void _49EBF1();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
265 void ClearBlack();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
266 void PresentBlackScreen();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
267 void SavePCXScreenshot();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
268 void _49F1BC(const char *a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
269 int _49F5A2(int a2, int a3, int a4, void *Dst, int a6, int a7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
270 FILE *SavePCXImage(const char *Filename, char *a3, int a4, int a5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
271 void ClearTarget(unsigned int uColor);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
272 void Release2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
273 void Present();
27
be2066176d89 On level initialization
Nomad
parents: 3
diff changeset
274 void _49FD3A();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
275 void CreateZBuffer();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
276 void Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
277 void CreateSomeTexture();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
278 bool InitializeFullscreen(HWND hWnd);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
279 bool SwitchToWindow(HWND hWnd);
52
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 47
diff changeset
280 char Line2D(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned __int16 uColor);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
281 void ClearZBuffer(int a2, int a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
282 void Clip_v2(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
283 void ParseTargetPixelFormat();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
284 bool LockSurface_DDraw4(IDirectDrawSurface4 *pSurface, DDSURFACEDESC2 *pDesc, unsigned int uLockFlags);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
285 bool LockSurface_DDraw2(IDirectDrawSurface2 *pSurface, DDSURFACEDESC *pDesc, unsigned int uLockFlags);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
286 void CreateDirectDraw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
287 void SetDirectDrawCooperationMode(HWND hWnd, bool bFullscreen);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
288 void SetDirectDrawDisplayMode(unsigned int uWidth, unsigned int uHeight, unsigned int uBPP);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
289 void CreateFrontBuffer();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
290 void CreateBackBuffer();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
291 void CreateDirectDrawPrimarySurface();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
292 void CreateClipper(HWND a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
293 void GetTargetPixelFormat(DDPIXELFORMAT *pOut);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
294 void LockRenderSurface(void **pOutSurfacePtr, unsigned int *pOutPixelsPerRow);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
295 bool UsingDirect3D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
296 void UnlockBackBuffer();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
297 void LockFrontBuffer(void **pOutSurface, unsigned int *pOutPixelsPerRow);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
298 void UnlockFrontBuffer();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
299 void RestoreFrontBuffer();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
300 HRESULT _4A184C();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
301 void PresentRect(RECT *a2, RECT *a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
302 void BltToFront(RECT *pDstRect, IDirectDrawSurface *pSrcSurface, RECT *pSrcRect, unsigned int uBltFlags);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
303 void BltBackToFontFast(int a2, int a3, RECT *a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
304 unsigned int Billboard_ProbablyAddToListAndSortByZOrder(unsigned int a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
305 unsigned int GetBillboardDrawListSize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
306 unsigned int GetParentBillboardID(unsigned int uBillboardID);
47
8a8dd0164b12 BLV render
Nomad
parents: 45
diff changeset
307 void BeginSceneD3D();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
308 void DrawBillboards_And_MaybeRenderSpecialEffects_And_EndScene();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
309 unsigned int GetActorTintColor(float a2, int a3, int a4, int a5, RenderBillboard *a6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
310 void DrawPolygon(unsigned int uNumVertices, stru148 *a3, ODMFace *a4, IDirect3DTexture2 *pTexture);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
311 void DrawTerrainPolygon(unsigned int uNumVertices, stru148 *a4, IDirect3DTexture2 *a5, int a6, int a7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
312 void DrawFan(unsigned int uNumVertices, stru148 *a3, IDirect3DTexture2 *a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
313 void _4A2ED5(signed int a2, stru148 *a3, IDirect3DTexture2 *pHwTex);
68
fdacbc653945 BLV render: first image
Nomad
parents: 59
diff changeset
314 void DrawIndoorPolygon(unsigned int uNumVertices, struct BLVFace *a3, IDirect3DTexture2 *pHwTex, Texture *pTex, int uPackedID, unsigned int uColor, int a8);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
315 void MakeParticleBillboardAndPush_BLV(RenderBillboardTransform_local0 *a2, IDirect3DTexture2 *a3, unsigned int uDiffuse, int angle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
316 void MakeParticleBillboardAndPush_ODM(RenderBillboardTransform_local0 *a2, IDirect3DTexture2 *a3, unsigned int uDiffuse, int angle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
317 void TransformBillboard(RenderBillboardTransform_local0 *a2, Sprite *pSprite, int a1a, RenderBillboard *pBillboard);
45
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
318 void DrawBillboard_Indoor(RenderBillboardTransform_local0 *pSoftBillboard, Sprite *a3, int uPaletteSubindex);
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
319 int MakeParticleBillboardAndPush_BLV_Software(int screenSpaceX, int screenSpaceY, int z, int lightColor, int a6);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
320 void DrawProjectile(float srcX, float srcY, float a3, float a4, float dstX, float dstY, float a7, float a8, IDirect3DTexture2 *a9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
321 void _4A4CC9(struct stru6_stru1_indoor_sw_billboard *a1, int a2);
1
ac0fb48cd27a Texture, hwl loading, video player
Nomad
parents: 0
diff changeset
322 bool LoadTexture(const char *pName, unsigned int bMipMaps, IDirectDrawSurface4 **pOutSurface, IDirect3DTexture2 **pOutTexture);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
323 HWLTexture *MoveSpriteToDevice(Sprite *pSprite);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
324 void BeginScene();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
325 void EndScene();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
326 unsigned int _4A52F1(unsigned int this_, float a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
327 void Clip(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
328 void ResetClip();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
329 void DrawTextureRGB(unsigned int uOutX, unsigned int uOutY, RGBTexture *a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
330 void _4A5D33(unsigned int a2, unsigned int a3, int a4, int a5, RGBTexture *pTexture);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
331 void DrawTextureIndexed(unsigned int uX, unsigned int uY, Texture *a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
332 void _4A601E(signed int a2, signed int a3, Texture *pTexture, int a5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
333 void _4A612A(signed int uOutX, unsigned int uOutY, Texture *pTexture, int zVal);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
334 void DrawTextureTransparent(unsigned int uX, unsigned int uY, Texture *pTexture);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
335 void _4A63E6(unsigned int a2, unsigned int a3, Texture *a4, Texture *a5, int a6, int a7, int a8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
336 void _4A65CC(unsigned int x, unsigned int y, Texture *a4, Texture *a5, int a6, int a7, int a8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
337 void _4A6776(unsigned int a2, unsigned int a3, Texture *a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
338 void DrawTransparentGreenShade(signed int a2, signed int a3, Texture *pTexture);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
339 void _4A6A68(unsigned int a2, unsigned int a3, Texture *a4, __int16 height);
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
340 void DrawTextPalette(int x, int y, int a4, int a5, unsigned int uFontHeight, unsigned __int16 *pPalette, int a8);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
341 void DrawText(signed int uOutX, signed int uOutY, unsigned __int8 *pFontPixels, unsigned int uCharWidth, unsigned int uCharHeight, unsigned __int16 *pFontPalette, unsigned __int16 uFaceColor, unsigned __int16 uShadowColor);
52
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 47
diff changeset
342 void FillRectFast(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, unsigned int uColor16);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
343 int _4A6DF5(unsigned __int16 *pBitmap, unsigned int uBitmapPitch, struct Vec2_int_ *pBitmapXY, unsigned __int16 *pTarget, unsigned int uTargetPitch, Vec4_int_ *a7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
344 void _4A6E7E(unsigned int a2, unsigned int a3, Texture *a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
345 char DrawBuildingsD3D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
346 struct BSPModel *DrawBuildingsSW();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
347 int OnOutdoorRedrawSW();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
348 void DrawSkyD3D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
349 int DrawSkySW(struct Span *a1, stru148 *a2, int a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
350 void DrawDecorations();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
351 void DrawLayingItems_Shooting_Magic_ODM();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
352 void TransformBillboardsAndSetPalettesODM();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
353 float DrawBezierTerrain();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
354 void DrawTerrainD3D(int a1, int edx0, int a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
355 void DrawTerrainSW(int a1, int a2, int a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
356 __int16 ExecOutdoorDrawSW();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
357 void ChangeBetweenWinFullscreenModes();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
358 void DrawBillboardList_BLV();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
360
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
361 unsigned int bUserDirect3D;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
362 unsigned int bStartInWindow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
363 unsigned int uDesiredDirect3DDevice;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
364 unsigned int uAcquiredDirect3DDevice;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
365 int field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
366 int field_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
367 int field_18_locked_pitch;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
368 int field_1C_clipx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
369 int field_20_clipy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
370 int field_24_clipz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
371 int field_28_clipw;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
372 __int16 field_2C[65536];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
373 __int16 field_2002C[65536];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
374 int field_4002C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
375 int field_40030;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
376 int *pActiveZBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
377 int *pDefaultZBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
378 int field_4003C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
379 int field_40040;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
380 int field_40044;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
381 int field_40048;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
382 int field_4004C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
383 HWND hWnd;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
384 int field_40054;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
385 unsigned int bWindowMode;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
386 int field_4005C[11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
387 RenderD3D *pRenderD3D;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
388 IDirectDraw4 *pDirectDraw4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
389 IDirectDrawSurface4 *pFrontBuffer4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
390 IDirectDrawSurface4 *pBackBuffer4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
391 IDirectDrawSurface4 *pColorKeySurface4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
392 IDirectDraw2 *pDirectDraw2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
393 IDirectDrawSurface2 *pFrontBuffer2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
394 IDirectDrawSurface2 *pBackBuffer2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
395 IDirectDrawSurface2 *pSomeSurface2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
396 DDPIXELFORMAT ddpfPrimareSuface;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
397 unsigned int uTargetRBits;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
398 unsigned int uTargetGBits;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
399 unsigned int uTargetBBits;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
400 unsigned int uTargetRMask;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
401 unsigned int uTargetGMask;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
402 unsigned int uTargetBMask;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
403 unsigned int uNumSceneBegins;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
404 int *ptr_400E8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
405 unsigned __int16 *pTargetSurface;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
406 unsigned int uTargetSurfacePitch;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
407 unsigned int uClipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
408 unsigned int uClipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
409 unsigned int uClipW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
410 unsigned int uClipZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
411 unsigned int bClip;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
412 unsigned int bColorKeySupported;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
413 unsigned int uNumD3DSceneBegins;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
414 int field_40110;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
415 RenderHWLContainer pD3DBitmaps;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
416 RenderHWLContainer pD3DSprites;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
417 unsigned int bUseColoredLights;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
418 unsigned int bRequiredTextureStagesAvailable;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
419 unsigned int bTinting;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
420 unsigned int uLevelOfDetail;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
421 unsigned int uMaxDeviceTextureDim;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
422 unsigned int uMinDeviceTextureDim;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
423 int field_10365C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
424 unsigned int bUsingSpecular;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
425 uint uFogColor;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
426 int field_103668;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
427 unsigned int pHDWaterBitmapIDs[7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
428 char field_103688[32];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
429 int field_1036A8_bitmapid;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
430 int field_1036AC_bitmapid;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
431 IDirectDrawSurface4 *pSurface;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
432 IDirect3DTexture2 *pTexture;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
433 int field_1036B8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
434 int _gpu_memory_used;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
435 void (__cdecl *pBeforePresentFunction)();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
436 int field_1036C4;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
437 uint bFogEnabled;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
438 int field_1036CC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
439 RenderBillboardD3D pBillboardRenderListD3D[1000];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
440 unsigned int uNumBillboardsToDraw;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
441 int field_129834;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
442 unsigned int uCurrentlyLockedSurfacePitch;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
443 unsigned __int16 *pCurrentlyLockedSurfaceDataPtr;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
444 unsigned __int16 *pCurrentlyLockedSoftSurface;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
445 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
446 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
447
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
448 extern struct IDirectDrawClipper *pDDrawClipper;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
449 extern struct Render *pRenderer; // idb
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
450
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
451
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
452
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
453
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
454 /* 248 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
455 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
456 struct RenderBillboardTransform_local0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
457 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
458 unsigned __int16 *pTarget;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
459 int *pTargetZ;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
460 int uScreenSpaceX;
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
461 int uScreenSpaceY;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
462 int field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
463 int field_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
464 char field_18[8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
465 unsigned __int16 *pPalette;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
466 unsigned __int16 *pPalette2;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 27
diff changeset
467 int sZValue;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
468 unsigned int uFlags;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
469 unsigned int uTargetPitch;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
470 unsigned int uViewportX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
471 unsigned int uViewportY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
472 unsigned int uViewportZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
473 unsigned int uViewportW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
474 int field_44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
475 int uParentBillboardID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
476 int uTintColor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
477 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
478 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
479
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
480
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
481
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
482
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
483 extern int uNumDecorationsDrawnThisFrame; // weak
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
484 extern RenderBillboard pBillboardRenderList[500];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
485 extern unsigned int uNumBillboardsToDraw;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
486 extern int uNumSpritesDrawnThisFrame; // weak
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
487
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
488
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
489
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
490
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
491 extern RenderVertexSoft array_507D30[50];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
492 extern RenderVertexSoft array_508690[50];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
493 extern RenderVertexSoft array_508FF0[50];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
494 extern RenderVertexSoft array_509950[50];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
495 extern RenderVertexSoft array_50A2B0[50];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
496 extern RenderVertexSoft array_50AC10[50];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
497
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
498 extern RenderVertexSoft array_73D150[20];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
499
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
500 extern RenderVertexD3D3 arary_77E5C8[50];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
501
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
502 extern RenderVertexSoft *ptr_801A04;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
503 extern RenderVertexSoft *ptr_801A08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
504
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
505 extern RenderVertexSoft pVerticesSR_801A10[384];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
506 extern RenderVertexSoft pVerticesSR_806210[384];