Mercurial > mm7
comparison Render.h @ 1802:633f81bb3ae7
HWND -> class OSWindow
author | Nomad |
---|---|
date | Mon, 07 Oct 2013 11:52:33 +0200 |
parents | f1cdf8c062d4 |
children | 9f93b5700e2d |
comparison
equal
deleted
inserted
replaced
1760:a2ea57410b15 | 1802:633f81bb3ae7 |
---|---|
2 | 2 |
3 #include <cstdint> | 3 #include <cstdint> |
4 #include <cstdio> | 4 #include <cstdio> |
5 | 5 |
6 #include "lib\legacy_dx\d3d.h" | 6 #include "lib\legacy_dx\d3d.h" |
7 #include "OSAPI.h" | 7 #include "OSWindow.h" |
8 | 8 |
9 #include "VectorTypes.h" | 9 #include "VectorTypes.h" |
10 | 10 |
11 struct Polygon; | 11 struct Polygon; |
12 struct Texture; | 12 struct Texture; |
267 Render(); | 267 Render(); |
268 ~Render(); | 268 ~Render(); |
269 | 269 |
270 static Render *Create() {return new Render;} | 270 static Render *Create() {return new Render;} |
271 | 271 |
272 bool Initialize(bool bWindowed, int window_width, int window_height, uint32_t uDefaultDevice, | 272 bool Initialize(bool bWindowed, OSWindow *window, bool bColoredLights, uint32_t uDetailLevel, bool bTinting); |
273 bool bColoredLights, uint32_t uDetailLevel, bool bTinting); | |
274 | 273 |
275 | 274 |
276 bool IsColorKeySupported(IDirectDraw4 *); | 275 bool IsColorKeySupported(IDirectDraw4 *); |
277 void _49EBF1(); | 276 void _49EBF1(); |
278 void ClearBlack(); | 277 void ClearBlack(); |
286 void Present(); | 285 void Present(); |
287 void _49FD3A(); | 286 void _49FD3A(); |
288 void CreateZBuffer(); | 287 void CreateZBuffer(); |
289 void Release(); | 288 void Release(); |
290 void CreateSomeTexture(); | 289 void CreateSomeTexture(); |
291 bool InitializeFullscreen(HWND hWnd); | 290 bool InitializeFullscreen(); |
292 bool SwitchToWindow(HWND hWnd); | 291 bool SwitchToWindow(); |
293 char RasterLine2D(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned __int16 uColor); | 292 char RasterLine2D(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned __int16 uColor); |
294 void ClearZBuffer(int a2, int a3); | 293 void ClearZBuffer(int a2, int a3); |
295 void SetRasterClipRect(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW); | 294 void SetRasterClipRect(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW); |
296 void ParseTargetPixelFormat(); | 295 void ParseTargetPixelFormat(); |
297 bool LockSurface_DDraw4(IDirectDrawSurface4 *pSurface, DDSURFACEDESC2 *pDesc, unsigned int uLockFlags); | 296 bool LockSurface_DDraw4(IDirectDrawSurface4 *pSurface, DDSURFACEDESC2 *pDesc, unsigned int uLockFlags); |
303 void CreateBackBuffer(); | 302 void CreateBackBuffer(); |
304 void CreateDirectDrawPrimarySurface(); | 303 void CreateDirectDrawPrimarySurface(); |
305 void CreateClipper(HWND a2); | 304 void CreateClipper(HWND a2); |
306 void GetTargetPixelFormat(DDPIXELFORMAT *pOut); | 305 void GetTargetPixelFormat(DDPIXELFORMAT *pOut); |
307 void LockRenderSurface(void **pOutSurfacePtr, unsigned int *pOutPixelsPerRow); | 306 void LockRenderSurface(void **pOutSurfacePtr, unsigned int *pOutPixelsPerRow); |
308 bool UsingDirect3D(); | |
309 void UnlockBackBuffer(); | 307 void UnlockBackBuffer(); |
310 void LockFrontBuffer(void **pOutSurface, unsigned int *pOutPixelsPerRow); | 308 void LockFrontBuffer(void **pOutSurface, unsigned int *pOutPixelsPerRow); |
311 void UnlockFrontBuffer(); | 309 void UnlockFrontBuffer(); |
312 void RestoreFrontBuffer(); | 310 void RestoreFrontBuffer(); |
313 HRESULT _4A184C(); | 311 HRESULT _4A184C(); |
371 //void ExecOutdoorDrawSW(); | 369 //void ExecOutdoorDrawSW(); |
372 void ChangeBetweenWinFullscreenModes(); | 370 void ChangeBetweenWinFullscreenModes(); |
373 void DrawBillboardList_BLV(); | 371 void DrawBillboardList_BLV(); |
374 | 372 |
375 | 373 |
376 unsigned int bUserDirect3D; | 374 //unsigned int bUserDirect3D; |
377 unsigned int bStartInWindow; | 375 unsigned int bStartInWindow; |
378 unsigned int uDesiredDirect3DDevice; | 376 unsigned int uDesiredDirect3DDevice; |
379 unsigned int uAcquiredDirect3DDevice; | 377 unsigned int uAcquiredDirect3DDevice; |
380 int field_10; | 378 int field_10; |
381 int field_14; | 379 int field_14; |
393 int field_4003C; | 391 int field_4003C; |
394 int field_40040; | 392 int field_40040; |
395 int field_40044; | 393 int field_40044; |
396 int field_40048; | 394 int field_40048; |
397 int field_4004C; | 395 int field_4004C; |
398 HWND hWnd; | 396 //HWND hWnd; |
397 OSWindow *window; | |
399 int field_40054; | 398 int field_40054; |
400 unsigned int bWindowMode; | 399 unsigned int bWindowMode; |
401 int field_4005C[11]; | 400 int field_4005C[11]; |
402 RenderD3D *pRenderD3D; | 401 RenderD3D *pRenderD3D; |
403 IDirectDraw4 *pDirectDraw4; | 402 IDirectDraw4 *pDirectDraw4; |
457 unsigned int uCurrentlyLockedSurfacePitch; | 456 unsigned int uCurrentlyLockedSurfacePitch; |
458 unsigned __int16 *pCurrentlyLockedSurfaceDataPtr; | 457 unsigned __int16 *pCurrentlyLockedSurfaceDataPtr; |
459 unsigned __int16 *pCurrentlyLockedSoftSurface; | 458 unsigned __int16 *pCurrentlyLockedSoftSurface; |
460 | 459 |
461 | 460 |
462 int windowed_mode_width; | 461 //int windowed_mode_width; |
463 int windowed_mode_height; | 462 //int windowed_mode_height; |
464 }; | 463 }; |
465 #pragma pack(pop) | 464 #pragma pack(pop) |
466 | 465 |
467 extern struct IDirectDrawClipper *pDDrawClipper; | 466 extern struct IDirectDrawClipper *pDDrawClipper; |
468 extern struct Render *pRenderer; // idb | 467 extern struct Render *pRenderer; // idb |