Changeset 210 for trunk/src/ddraw/OS2D3D.CPP
- Timestamp:
- Jun 26, 1999, 1:34:43 PM (26 years ago)
- File:
-
- 1 edited
-
trunk/src/ddraw/OS2D3D.CPP (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/OS2D3D.CPP
r97 r210 1 /* $Id: OS2D3D.CPP,v 1.3 1999-06-10 17:10:56 phaller Exp $ */2 3 //******************************************************************************4 //******************************************************************************5 // Direct3D Main Class6 //7 // Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)8 //******************************************************************************9 //******************************************************************************10 // *11 // * Project Odin Software License can be found in LICENSE.TXT12 // *13 14 /*@Const************************************************************************15 * Defined Constants *16 *******************************************************************************/17 #define WIN32SDK_NOPOSTWRAPPER18 19 /*@Header***********************************************************************20 * Header Files *21 *******************************************************************************/22 #include <os2win.h>23 #include <dive.h>24 25 #include <builtin.h>26 1 #include <memory.h> 27 2 28 #include "no.h" 29 #include <w_windows.h> 30 #include <ddraw.h> 31 #include <d3d.h> 32 #include <Win32SDKPostWrapper.h> 33 3 #define INITGUID 34 4 #include "os2ddraw.h" 35 5 #include "os2clipper.h" 36 6 #include "os2palette.h" 37 7 #include "os2surface.h" 8 #define _OS2WIN_H 9 #define FAR 38 10 #include "misc.h" 39 40 /*** IDirect3D methods ***/ 41 /* KSO Apr 19 1999: Set correct interface. * 42 * (INTERFACE is used in the THIS and THIS_ macros) */ 43 #undef INTERFACE 44 #define INTERFACE IDirect3D 45 11 #include <winerror.h> 12 #include <builtin.h> 13 #undef THIS 14 #define THIS VOID* 46 15 47 16 //****************************************************************************** 48 17 //****************************************************************************** 49 HRESULT __stdcall D3DQueryInterface(THIS , REFIID riid, LPVOID FAR * ppvObj)18 HRESULT __stdcall D3DQueryInterface(THIS This, REFIID riid, LPVOID FAR * ppvObj) 50 19 { 51 20 dprintf(("D3DQueryInterface\n")); … … 53 22 54 23 if(IID_IDirect3D != (GUID &)&riid) 55 return E_NOINTERFACE;24 return E_NOINTERFACE; 56 25 57 26 *ppvObj = This; … … 62 31 //****************************************************************************** 63 32 //****************************************************************************** 64 ULONG __stdcall D3DAddRef(THIS )33 ULONG __stdcall D3DAddRef(THIS This) 65 34 { 66 35 OS2IDirectDraw *me = (OS2IDirectDraw *)This; … … 71 40 //****************************************************************************** 72 41 //****************************************************************************** 73 ULONG __stdcall D3DRelease(THIS )42 ULONG __stdcall D3DRelease(THIS This) 74 43 { 75 44 OS2IDirectDraw *me = (OS2IDirectDraw *)This; … … 78 47 dprintf(("OS2IDirectDraw::%X \n", me)); 79 48 if(me->Referenced) { 80 me->Referenced--;81 if(me->Referenced == 0) {82 delete me;83 return(0);84 }85 else return me->Referenced;49 me->Referenced--; 50 if(me->Referenced == 0) { 51 delete me; 52 return(0); 53 } 54 else return me->Referenced; 86 55 } 87 56 else return(0); … … 89 58 //****************************************************************************** 90 59 //****************************************************************************** 91 HRESULT __stdcall D3DInitialize(THIS _REFIID)60 HRESULT __stdcall D3DInitialize(THIS This, REFIID) 92 61 { 93 62 dprintf(("D3DInitialize\n")); … … 96 65 //****************************************************************************** 97 66 //****************************************************************************** 98 HRESULT __stdcall D3DEnumDevices(THIS _LPD3DENUMDEVICESCALLBACK, LPVOID)67 HRESULT __stdcall D3DEnumDevices(THIS This, LPD3DENUMDEVICESCALLBACK, LPVOID) 99 68 { 100 69 dprintf(("D3DEnumDevices\n")); … … 103 72 //****************************************************************************** 104 73 //****************************************************************************** 105 HRESULT __stdcall D3DCreateLight(THIS _LPDIRECT3DLIGHT*, IUnknown*)74 HRESULT __stdcall D3DCreateLight(THIS This, LPDIRECT3DLIGHT*, IUnknown*) 106 75 { 107 76 dprintf(("D3DCreateLight\n")); … … 110 79 //****************************************************************************** 111 80 //****************************************************************************** 112 HRESULT __stdcall D3DCreateMaterial(THIS _LPDIRECT3DMATERIAL*, IUnknown*)81 HRESULT __stdcall D3DCreateMaterial(THIS This, LPDIRECT3DMATERIAL*, IUnknown*) 113 82 { 114 83 dprintf(("D3DCreateMaterial\n")); … … 117 86 //****************************************************************************** 118 87 //****************************************************************************** 119 HRESULT __stdcall D3DCreateViewport(THIS _LPDIRECT3DVIEWPORT*, IUnknown*)88 HRESULT __stdcall D3DCreateViewport(THIS This, LPDIRECT3DVIEWPORT*, IUnknown*) 120 89 { 121 90 dprintf(("D3DCreateViewport\n")); … … 124 93 //****************************************************************************** 125 94 //****************************************************************************** 126 HRESULT __stdcall D3DFindDevice(THIS _LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT)95 HRESULT __stdcall D3DFindDevice(THIS This, LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT) 127 96 { 128 97 dprintf(("D3DCreateFindDevice\n"));
Note:
See TracChangeset
for help on using the changeset viewer.
