Mercurial > mm7
annotate Render.h @ 1779:50e91a820f6f
Player::SetVariable helper function for award sound
author | Grumpy7 |
---|---|
date | Wed, 02 Oct 2013 08:51:43 +0200 |
parents | f1cdf8c062d4 |
children | 0c4d3c6a9d5a 633f81bb3ae7 |
rev | line source |
---|---|
0 | 1 #pragma once |
1512 | 2 |
3 #include <cstdint> | |
4 #include <cstdio> | |
0 | 5 |
6 #include "lib\legacy_dx\d3d.h" | |
7 #include "OSAPI.h" | |
8 | |
9 #include "VectorTypes.h" | |
10 | |
1391
cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents:
1390
diff
changeset
|
11 struct Polygon; |
0 | 12 struct Texture; |
13 struct RGBTexture; | |
14 struct RenderBillboardTransform_local0; | |
15 struct ODMFace; | |
16 | |
17 | |
18 /* 119 */ | |
19 #pragma pack(push, 1) | |
20 struct RenderVertexSoft | |
21 { | |
22 inline RenderVertexSoft(): | |
23 flt_2C(0.0f) | |
24 {} | |
25 | |
26 Vec3_float_ vWorldPosition; | |
27 Vec3_float_ vWorldViewPosition; | |
28 float vWorldViewProjX; | |
29 float vWorldViewProjY; | |
168 | 30 float _rhw; |
0 | 31 float u; |
32 float v; | |
33 float flt_2C; | |
34 }; | |
35 #pragma pack(pop) | |
36 | |
37 | |
38 | |
39 /* 112 */ | |
40 #pragma pack(push, 1) | |
41 struct RenderVertexD3D3 | |
42 { | |
43 Vec3_float_ pos; | |
44 float rhw; | |
45 unsigned int diffuse; | |
46 unsigned int specular; | |
47 Vec2_float_ texcoord; | |
48 }; | |
1269 | 49 #pragma pack(pop) |
0 | 50 |
1016 | 51 class Sprite; |
52 class SpriteFrame; | |
0 | 53 |
54 /* 161 */ | |
55 #pragma pack(push, 1) | |
56 struct RenderBillboard | |
57 { | |
144
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
58 int _screenspace_x_scaler_packedfloat; |
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
59 int _screenspace_y_scaler_packedfloat; |
0 | 60 float fov_x; |
61 float fov_y; | |
194 | 62 union |
63 { | |
64 int sZValue; | |
65 struct | |
66 { | |
67 unsigned __int16 object_pid; | |
68 signed __int16 actual_z; | |
69 }; | |
70 }; | |
142 | 71 int field_14_actor_id; |
0 | 72 unsigned __int16 uHwSpriteID; |
73 __int16 uPalette; | |
74 __int16 uIndoorSectorID; | |
75 __int16 field_1E; | |
430 | 76 __int16 world_x; |
77 __int16 world_y; | |
78 __int16 world_z; | |
0 | 79 __int16 uScreenSpaceX; |
80 __int16 uScreenSpaceY; | |
657 | 81 unsigned __int16 dimming_level; |
0 | 82 unsigned int uTintColor; |
83 SpriteFrame *pSpriteFrame; | |
159 | 84 |
85 inline float GetFloatZ() const | |
86 { | |
194 | 87 return (float)object_pid / 65535.0f + (float)actual_z; |
159 | 88 } |
0 | 89 }; |
90 #pragma pack(pop) | |
91 | |
92 | |
93 #pragma pack(push, 1) | |
94 struct RenderD3D__DevInfo | |
95 { | |
96 unsigned int bIsDeviceCompatible; | |
97 char *pName; | |
98 char *pDescription; | |
99 GUID *pGUID; | |
100 unsigned int uCaps; | |
101 char *pDriverName; | |
102 char *pDeviceDesc; | |
103 char *pDDraw4DevDesc; | |
104 GUID *pDirectDrawGUID; | |
105 int uVideoMem; | |
106 }; | |
107 #pragma pack(pop) | |
108 | |
109 | |
110 | |
111 #pragma pack(push, 1) | |
112 struct RenderD3D_D3DDevDesc | |
113 { | |
114 int field_0; | |
115 int field_4; | |
116 int field_8; | |
117 int field_C; | |
118 int field_10; | |
119 char *pDriverName; | |
120 char *pDeviceDesc; | |
121 char *pDDraw4DevDesc; | |
122 GUID *pGUID; | |
123 unsigned int uVideoMem; | |
124 }; | |
125 #pragma pack(pop) | |
126 | |
127 | |
128 | |
129 | |
130 | |
131 | |
132 | |
133 | |
134 | |
135 /* 280 */ | |
136 #pragma pack(push, 1) | |
137 struct HWLTexture | |
138 { | |
139 inline HWLTexture(): | |
140 field_0(0), field_4(0), field_8(0), | |
141 field_C(0), field_10(0), field_14(0) | |
142 {} | |
143 | |
144 int field_0; | |
145 int field_4; | |
146 int field_8; | |
147 int field_C; | |
148 int field_10; | |
149 int field_14; | |
670 | 150 int uBufferWidth; |
151 int uBufferHeight; | |
152 int uAreaWidth; | |
153 int uAreaHeigth; | |
0 | 154 unsigned int uWidth; |
155 unsigned int uHeight; | |
670 | 156 int uAreaX; |
157 int uAreaY; | |
0 | 158 unsigned __int16 *pPixels; |
159 }; | |
160 #pragma pack(pop) | |
161 | |
162 | |
163 /* 185 */ | |
164 #pragma pack(push, 1) | |
165 struct RenderHWLContainer | |
166 { | |
167 RenderHWLContainer(); | |
168 bool Load(const wchar_t *pFilename); | |
169 bool Release(); | |
170 | |
171 HWLTexture *LoadTexture(const char *pName, int bMipMaps); | |
172 | |
173 FILE *pFile; | |
1512 | 174 uint32_t uSignature; |
0 | 175 unsigned int uDataOffset; |
176 unsigned int uNumItems; | |
177 char *pSpriteNames[50000]; | |
178 int pSpriteOffsets[50000]; | |
179 int bDumpDebug; | |
1583 | 180 int scale_hwls_to_half; |
0 | 181 }; |
182 #pragma pack(pop) | |
183 | |
184 | |
185 | |
186 /* 242 */ | |
187 #pragma pack(push, 1) | |
188 struct RenderBillboardD3D | |
189 { | |
190 enum OpacityType: unsigned __int32 | |
191 { | |
192 Transparent = 0, | |
193 Opaque_1 = 1, | |
194 Opaque_2 = 2, | |
195 Opaque_3 = 3, | |
144
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
196 NoBlend = 0xFFFFFFFF |
0 | 197 }; |
198 | |
199 IDirect3DTexture2 *pTexture; | |
200 unsigned int uNumVertices; | |
1390 | 201 RenderVertexD3D3 pQuads[4]; |
144
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
202 float z_order; |
0 | 203 OpacityType uOpacity; |
204 int field_90; | |
205 int sZValue; | |
206 unsigned int uParentBillboardID; | |
207 }; | |
208 #pragma pack(pop) | |
209 | |
210 | |
211 | |
212 | |
213 #pragma pack(push, 1) | |
214 struct RenderD3D_aux | |
215 { | |
216 RenderD3D__DevInfo *pInfo; | |
217 RenderD3D_D3DDevDesc *ptr_4; | |
218 }; | |
219 #pragma pack(pop) | |
220 | |
221 | |
222 | |
223 /* 183 */ | |
224 #pragma pack(push, 1) | |
225 struct RenderD3D | |
226 { | |
227 RenderD3D(); | |
228 | |
229 void GetAvailableDevices(RenderD3D__DevInfo **pOutDevices); | |
230 void Release(); | |
231 bool CreateDevice(unsigned int uDeviceID, int bWindowed, HWND hWnd); | |
232 unsigned int GetDeviceCaps(); | |
233 void ClearTarget(unsigned int bClearColor, unsigned int uClearColor, unsigned int bClearDepth, float z_clear); | |
234 void Present(bool bForceBlit); | |
235 bool CreateTexture(unsigned int uTextureWidth, unsigned int uTextureHeight, IDirectDrawSurface4 **pOutSurface, IDirect3DTexture2 **pOutTexture, bool bAlphaChannel, bool bMipmaps, unsigned int uMinDeviceTexDim); | |
236 void HandleLostResources(); | |
237 | |
238 | |
239 unsigned int bWindowed; | |
240 int field_4; | |
241 int field_8; | |
242 HWND hWindow; | |
243 int field_10; | |
244 int field_14; | |
245 int field_18; | |
246 RenderD3D__DevInfo *pAvailableDevices; | |
247 IDirectDraw4 *pHost; | |
248 IDirect3D3 *pDirect3D; | |
249 IUnknown *pUnk; | |
250 IDirectDrawSurface4 *pBackBuffer; | |
251 IDirectDrawSurface4 *pFrontBuffer; | |
252 IDirectDrawSurface4 *pZBuffer; | |
253 IDirect3DDevice3 *pDevice; | |
254 IDirect3DViewport3 *pViewport; | |
255 int field_40; | |
256 int field_44; | |
257 char pErrorMessage[48]; | |
258 char field_78[208]; | |
259 }; | |
260 #pragma pack(pop) | |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
261 extern struct RenderVertexD3D3 pVertices[50]; |
0 | 262 |
263 /* 182 */ | |
264 #pragma pack(push, 1) | |
265 struct Render | |
266 { | |
267 Render(); | |
268 ~Render(); | |
269 | |
270 static Render *Create() {return new Render;} | |
271 | |
1655 | 272 bool Initialize(bool bWindowed, int window_width, int window_height, uint32_t uDefaultDevice, |
1512 | 273 bool bColoredLights, uint32_t uDetailLevel, bool bTinting); |
0 | 274 |
275 | |
276 bool IsColorKeySupported(IDirectDraw4 *); | |
277 void _49EBF1(); | |
278 void ClearBlack(); | |
279 void PresentBlackScreen(); | |
280 void SavePCXScreenshot(); | |
281 void _49F1BC(const char *a1); | |
810 | 282 void PackPCXpicture(unsigned short* picture_data, int wight, int heidth, void *data_buff, int max_buff_size,unsigned int* packed_size); |
0 | 283 FILE *SavePCXImage(const char *Filename, char *a3, int a4, int a5); |
284 void ClearTarget(unsigned int uColor); | |
285 void Release2(); | |
286 void Present(); | |
287 void _49FD3A(); | |
288 void CreateZBuffer(); | |
289 void Release(); | |
290 void CreateSomeTexture(); | |
291 bool InitializeFullscreen(HWND hWnd); | |
292 bool SwitchToWindow(HWND hWnd); | |
709 | 293 char RasterLine2D(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned __int16 uColor); |
0 | 294 void ClearZBuffer(int a2, int a3); |
709 | 295 void SetRasterClipRect(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW); |
0 | 296 void ParseTargetPixelFormat(); |
297 bool LockSurface_DDraw4(IDirectDrawSurface4 *pSurface, DDSURFACEDESC2 *pDesc, unsigned int uLockFlags); | |
298 bool LockSurface_DDraw2(IDirectDrawSurface2 *pSurface, DDSURFACEDESC *pDesc, unsigned int uLockFlags); | |
299 void CreateDirectDraw(); | |
300 void SetDirectDrawCooperationMode(HWND hWnd, bool bFullscreen); | |
301 void SetDirectDrawDisplayMode(unsigned int uWidth, unsigned int uHeight, unsigned int uBPP); | |
302 void CreateFrontBuffer(); | |
303 void CreateBackBuffer(); | |
304 void CreateDirectDrawPrimarySurface(); | |
305 void CreateClipper(HWND a2); | |
306 void GetTargetPixelFormat(DDPIXELFORMAT *pOut); | |
307 void LockRenderSurface(void **pOutSurfacePtr, unsigned int *pOutPixelsPerRow); | |
308 bool UsingDirect3D(); | |
309 void UnlockBackBuffer(); | |
310 void LockFrontBuffer(void **pOutSurface, unsigned int *pOutPixelsPerRow); | |
311 void UnlockFrontBuffer(); | |
312 void RestoreFrontBuffer(); | |
313 HRESULT _4A184C(); | |
314 void PresentRect(RECT *a2, RECT *a3); | |
315 void BltToFront(RECT *pDstRect, IDirectDrawSurface *pSrcSurface, RECT *pSrcRect, unsigned int uBltFlags); | |
316 void BltBackToFontFast(int a2, int a3, RECT *a4); | |
144
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
317 unsigned int Billboard_ProbablyAddToListAndSortByZOrder(float z); |
0 | 318 unsigned int GetBillboardDrawListSize(); |
319 unsigned int GetParentBillboardID(unsigned int uBillboardID); | |
320 void BeginSceneD3D(); | |
321 void DrawBillboards_And_MaybeRenderSpecialEffects_And_EndScene(); | |
349 | 322 unsigned int GetActorTintColor(float a2, int tint, int a4, int a5, RenderBillboard *a6); |
1391
cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents:
1390
diff
changeset
|
323 void DrawPolygon(unsigned int uNumVertices, struct Polygon *a3, ODMFace *a4, IDirect3DTexture2 *pTexture); |
cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents:
1390
diff
changeset
|
324 void DrawTerrainPolygon(unsigned int uNumVertices, struct Polygon *a4, IDirect3DTexture2 *a5, bool transparent, bool clampAtTextureBorders); |
1427 | 325 void DrawSkyPolygon(unsigned int uNumVertices, struct Polygon *pSkyPolygon, IDirect3DTexture2 *pTexture); |
1391
cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents:
1390
diff
changeset
|
326 void _4A2ED5(signed int a2, struct Polygon *a3, IDirect3DTexture2 *pHwTex); |
1262 | 327 void DrawIndoorPolygon(unsigned int uNumVertices, struct BLVFace *a3, IDirect3DTexture2 *pHwTex, struct Texture *pTex, int uPackedID, unsigned int uColor, int a8); |
1390 | 328 void DrawIndoorPolygonNoLight(unsigned int uNumVertices, unsigned int uFaceID); |
0 | 329 void MakeParticleBillboardAndPush_BLV(RenderBillboardTransform_local0 *a2, IDirect3DTexture2 *a3, unsigned int uDiffuse, int angle); |
330 void MakeParticleBillboardAndPush_ODM(RenderBillboardTransform_local0 *a2, IDirect3DTexture2 *a3, unsigned int uDiffuse, int angle); | |
657 | 331 void TransformBillboard(RenderBillboardTransform_local0 *a2, Sprite *pSprite, int dimming_level, RenderBillboard *pBillboard); |
717 | 332 void DrawBillboard_Indoor(RenderBillboardTransform_local0 *pSoftBillboard, Sprite *pSprite, int dimming_level); |
0 | 333 int MakeParticleBillboardAndPush_BLV_Software(int screenSpaceX, int screenSpaceY, int z, int lightColor, int a6); |
334 void DrawProjectile(float srcX, float srcY, float a3, float a4, float dstX, float dstY, float a7, float a8, IDirect3DTexture2 *a9); | |
1390 | 335 void _4A4CC9_AddSomeBillboard(struct stru6_stru1_indoor_sw_billboard *a1, int diffuse); |
0 | 336 bool LoadTexture(const char *pName, unsigned int bMipMaps, IDirectDrawSurface4 **pOutSurface, IDirect3DTexture2 **pOutTexture); |
670 | 337 bool MoveSpriteToDevice(Sprite *pSprite); |
0 | 338 void BeginScene(); |
339 void EndScene(); | |
340 unsigned int _4A52F1(unsigned int this_, float a3); | |
727 | 341 void SetTextureClipRect(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW); |
342 void ResetTextureClipRect(); | |
0 | 343 void DrawTextureRGB(unsigned int uOutX, unsigned int uOutY, RGBTexture *a4); |
1675 | 344 void CreditsTextureScroll(unsigned int pX, unsigned int pY, int move_X, int move_Y, RGBTexture *pTexture); |
1262 | 345 void DrawTextureIndexed(unsigned int uX, unsigned int uY, struct Texture *a4); |
346 void ZBuffer_Fill_2(signed int a2, signed int a3, struct Texture *pTexture, int a5); | |
347 void DrawMaskToZBuffer(signed int uOutX, unsigned int uOutY, struct Texture *pTexture, int zVal); | |
348 void DrawTextureTransparent(unsigned int uX, unsigned int uY, struct Texture *pTexture); | |
1455 | 349 void DrawAura(unsigned int a2, unsigned int a3, struct Texture *a4, struct Texture *a5, int a6, int a7, int a8); |
1262 | 350 void _4A65CC(unsigned int x, unsigned int y, struct Texture *a4, struct Texture *a5, int a6, int a7, int a8); |
351 void DrawTransparentRedShade(unsigned int a2, unsigned int a3, struct Texture *a4); | |
352 void DrawTransparentGreenShade(signed int a2, signed int a3, struct Texture *pTexture); | |
1496 | 353 void GetLeather(unsigned int a2, unsigned int a3, struct Texture *a4, __int16 height); |
1268 | 354 void DrawTextPalette(int x, int y, unsigned char* font_pixels, int a5, unsigned int uFontHeight, unsigned __int16 *pPalette, int a8); |
0 | 355 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); |
356 void FillRectFast(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, unsigned int uColor16); | |
357 int _4A6DF5(unsigned __int16 *pBitmap, unsigned int uBitmapPitch, struct Vec2_int_ *pBitmapXY, unsigned __int16 *pTarget, unsigned int uTargetPitch, Vec4_int_ *a7); | |
1262 | 358 void _4A6E7E(unsigned int a2, unsigned int a3, struct Texture *a4); |
0 | 359 char DrawBuildingsD3D(); |
1391
cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents:
1390
diff
changeset
|
360 //struct BSPModel *DrawBuildingsSW(); |
cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents:
1390
diff
changeset
|
361 //int OnOutdoorRedrawSW(); |
0 | 362 void DrawSkyD3D(); |
1391
cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents:
1390
diff
changeset
|
363 //int DrawSkySW(struct Span *a1, Polygon *a2, int a3); |
144
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
364 void PrepareDecorationsRenderList_ODM(); |
515
cb0ad52d6a26
LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
430
diff
changeset
|
365 void DrawSpriteObjects_ODM(); |
0 | 366 void TransformBillboardsAndSetPalettesODM(); |
1391
cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents:
1390
diff
changeset
|
367 //float DrawBezierTerrain(); |
86 | 368 void RenderTerrainD3D(); |
985 | 369 void DrawTerrainD3D(int a1, int edx0, int a3, int unk4); |
1391
cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents:
1390
diff
changeset
|
370 //void DrawTerrainSW(int a1, int a2, int a3, int a4); |
cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents:
1390
diff
changeset
|
371 //void ExecOutdoorDrawSW(); |
0 | 372 void ChangeBetweenWinFullscreenModes(); |
373 void DrawBillboardList_BLV(); | |
374 | |
375 | |
376 unsigned int bUserDirect3D; | |
377 unsigned int bStartInWindow; | |
378 unsigned int uDesiredDirect3DDevice; | |
379 unsigned int uAcquiredDirect3DDevice; | |
380 int field_10; | |
381 int field_14; | |
382 int field_18_locked_pitch; | |
709 | 383 int raster_clip_x; |
384 int raster_clip_y; // clipping rect for raster ops | |
385 int raster_clip_z; // like RasterLine2D for (mini)map | |
386 int raster_clip_w; | |
0 | 387 __int16 field_2C[65536]; |
388 __int16 field_2002C[65536]; | |
389 int field_4002C; | |
390 int field_40030; | |
391 int *pActiveZBuffer; | |
392 int *pDefaultZBuffer; | |
393 int field_4003C; | |
394 int field_40040; | |
395 int field_40044; | |
396 int field_40048; | |
397 int field_4004C; | |
398 HWND hWnd; | |
399 int field_40054; | |
400 unsigned int bWindowMode; | |
401 int field_4005C[11]; | |
402 RenderD3D *pRenderD3D; | |
403 IDirectDraw4 *pDirectDraw4; | |
404 IDirectDrawSurface4 *pFrontBuffer4; | |
405 IDirectDrawSurface4 *pBackBuffer4; | |
406 IDirectDrawSurface4 *pColorKeySurface4; | |
407 IDirectDraw2 *pDirectDraw2; | |
408 IDirectDrawSurface2 *pFrontBuffer2; | |
409 IDirectDrawSurface2 *pBackBuffer2; | |
410 IDirectDrawSurface2 *pSomeSurface2; | |
411 DDPIXELFORMAT ddpfPrimareSuface; | |
412 unsigned int uTargetRBits; | |
413 unsigned int uTargetGBits; | |
414 unsigned int uTargetBBits; | |
415 unsigned int uTargetRMask; | |
416 unsigned int uTargetGMask; | |
417 unsigned int uTargetBMask; | |
418 unsigned int uNumSceneBegins; | |
419 int *ptr_400E8; | |
420 unsigned __int16 *pTargetSurface; | |
421 unsigned int uTargetSurfacePitch; | |
422 unsigned int uClipY; | |
423 unsigned int uClipX; | |
424 unsigned int uClipW; | |
425 unsigned int uClipZ; | |
426 unsigned int bClip; | |
427 unsigned int bColorKeySupported; | |
428 unsigned int uNumD3DSceneBegins; | |
429 int field_40110; | |
430 RenderHWLContainer pD3DBitmaps; | |
431 RenderHWLContainer pD3DSprites; | |
432 unsigned int bUseColoredLights; | |
433 unsigned int bRequiredTextureStagesAvailable; | |
434 unsigned int bTinting; | |
435 unsigned int uLevelOfDetail; | |
436 unsigned int uMaxDeviceTextureDim; | |
437 unsigned int uMinDeviceTextureDim; | |
438 int field_10365C; | |
439 unsigned int bUsingSpecular; | |
1512 | 440 uint32_t uFogColor; |
0 | 441 int field_103668; |
442 unsigned int pHDWaterBitmapIDs[7]; | |
443 char field_103688[32]; | |
265 | 444 int hd_water_current_frame; |
445 int hd_water_tile_id; | |
0 | 446 IDirectDrawSurface4 *pSurface; |
447 IDirect3DTexture2 *pTexture; | |
448 int field_1036B8; | |
449 int _gpu_memory_used; | |
1458 | 450 void ( *pBeforePresentFunction)(); |
0 | 451 int field_1036C4; |
1512 | 452 uint32_t bFogEnabled; |
0 | 453 int field_1036CC; |
454 RenderBillboardD3D pBillboardRenderListD3D[1000]; | |
455 unsigned int uNumBillboardsToDraw; | |
456 int field_129834; | |
457 unsigned int uCurrentlyLockedSurfacePitch; | |
458 unsigned __int16 *pCurrentlyLockedSurfaceDataPtr; | |
459 unsigned __int16 *pCurrentlyLockedSoftSurface; | |
1655 | 460 |
461 | |
462 int windowed_mode_width; | |
463 int windowed_mode_height; | |
0 | 464 }; |
465 #pragma pack(pop) | |
466 | |
467 extern struct IDirectDrawClipper *pDDrawClipper; | |
468 extern struct Render *pRenderer; // idb | |
67 | 469 extern struct pUnkTerrain *Unks; |
0 | 470 |
471 | |
472 | |
473 /* 248 */ | |
474 #pragma pack(push, 1) | |
475 struct RenderBillboardTransform_local0 | |
476 { | |
477 unsigned __int16 *pTarget; | |
478 int *pTargetZ; | |
479 int uScreenSpaceX; | |
480 int uScreenSpaceY; | |
144
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
481 int _screenspace_x_scaler_packedfloat; |
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
482 int _screenspace_y_scaler_packedfloat; |
0 | 483 char field_18[8]; |
484 unsigned __int16 *pPalette; | |
485 unsigned __int16 *pPalette2; | |
144
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
486 union |
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
487 { |
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
488 int sZValue; |
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
489 struct |
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
490 { |
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
491 unsigned short object_pid; |
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
492 short zbuffer_depth; |
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
493 }; |
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
494 }; |
8ab4484c22e0
Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents:
142
diff
changeset
|
495 unsigned int uFlags; // & 4 - mirror horizontally |
0 | 496 unsigned int uTargetPitch; |
497 unsigned int uViewportX; | |
498 unsigned int uViewportY; | |
499 unsigned int uViewportZ; | |
500 unsigned int uViewportW; | |
501 int field_44; | |
502 int uParentBillboardID; | |
503 int uTintColor; | |
504 }; | |
505 #pragma pack(pop) | |
506 | |
507 | |
508 | |
509 | |
510 extern int uNumDecorationsDrawnThisFrame; // weak | |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
511 extern RenderBillboard pBillboardRenderList[500]; |
0 | 512 extern unsigned int uNumBillboardsToDraw; |
513 extern int uNumSpritesDrawnThisFrame; // weak | |
514 | |
515 | |
516 | |
517 | |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
518 extern RenderVertexSoft array_507D30[50]; |
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
519 extern RenderVertexSoft array_50AC10[50]; |
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
520 extern RenderVertexSoft array_73D150[20]; |
0 | 521 |
1413 | 522 extern RenderVertexD3D3 d3d_vertex_buffer[50]; |