Ignore:
Timestamp:
Jun 26, 1999, 1:34:43 PM (26 years ago)
Author:
hugh
Message:

DX 6 Version of ddraw rel files

File:
1 edited

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 Class
    6 //
    7 // Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
    8 //******************************************************************************
    9 //******************************************************************************
    10 // *
    11 // * Project Odin Software License can be found in LICENSE.TXT
    12 // *
    13 
    14 /*@Const************************************************************************
    15 *   Defined Constants                                                          *
    16 *******************************************************************************/
    17 #define WIN32SDK_NOPOSTWRAPPER
    18 
    19 /*@Header***********************************************************************
    20 *   Header Files                                                               *
    21 *******************************************************************************/
    22 #include <os2win.h>
    23 #include <dive.h>
    24 
    25 #include <builtin.h>
    261#include <memory.h>
    272
    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
    344#include "os2ddraw.h"
    355#include "os2clipper.h"
    366#include "os2palette.h"
    377#include "os2surface.h"
     8#define _OS2WIN_H
     9#define FAR
    3810#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*
    4615
    4716//******************************************************************************
    4817//******************************************************************************
    49 HRESULT __stdcall D3DQueryInterface(THIS, REFIID riid, LPVOID FAR * ppvObj)
     18HRESULT __stdcall D3DQueryInterface(THIS This, REFIID riid, LPVOID FAR * ppvObj)
    5019{
    5120  dprintf(("D3DQueryInterface\n"));
     
    5322
    5423  if(IID_IDirect3D != (GUID &)&riid)
    55     return E_NOINTERFACE;
     24  return E_NOINTERFACE;
    5625
    5726  *ppvObj = This;
     
    6231//******************************************************************************
    6332//******************************************************************************
    64 ULONG __stdcall D3DAddRef(THIS)
     33ULONG __stdcall D3DAddRef(THIS This)
    6534{
    6635 OS2IDirectDraw *me = (OS2IDirectDraw *)This;
     
    7140//******************************************************************************
    7241//******************************************************************************
    73 ULONG __stdcall D3DRelease(THIS)
     42ULONG __stdcall D3DRelease(THIS This)
    7443{
    7544 OS2IDirectDraw *me = (OS2IDirectDraw *)This;
     
    7847  dprintf(("OS2IDirectDraw::%X \n", me));
    7948  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;
    8655  }
    8756  else  return(0);
     
    8958//******************************************************************************
    9059//******************************************************************************
    91 HRESULT __stdcall D3DInitialize(THIS_ REFIID)
     60HRESULT __stdcall D3DInitialize(THIS This, REFIID)
    9261{
    9362  dprintf(("D3DInitialize\n"));
     
    9665//******************************************************************************
    9766//******************************************************************************
    98 HRESULT __stdcall D3DEnumDevices(THIS_ LPD3DENUMDEVICESCALLBACK, LPVOID)
     67HRESULT __stdcall D3DEnumDevices(THIS This, LPD3DENUMDEVICESCALLBACK, LPVOID)
    9968{
    10069  dprintf(("D3DEnumDevices\n"));
     
    10372//******************************************************************************
    10473//******************************************************************************
    105 HRESULT __stdcall D3DCreateLight(THIS_ LPDIRECT3DLIGHT*, IUnknown*)
     74HRESULT __stdcall D3DCreateLight(THIS This, LPDIRECT3DLIGHT*, IUnknown*)
    10675{
    10776  dprintf(("D3DCreateLight\n"));
     
    11079//******************************************************************************
    11180//******************************************************************************
    112 HRESULT __stdcall D3DCreateMaterial(THIS_ LPDIRECT3DMATERIAL*, IUnknown*)
     81HRESULT __stdcall D3DCreateMaterial(THIS This, LPDIRECT3DMATERIAL*, IUnknown*)
    11382{
    11483  dprintf(("D3DCreateMaterial\n"));
     
    11786//******************************************************************************
    11887//******************************************************************************
    119 HRESULT __stdcall D3DCreateViewport(THIS_ LPDIRECT3DVIEWPORT*, IUnknown*)
     88HRESULT __stdcall D3DCreateViewport(THIS This, LPDIRECT3DVIEWPORT*, IUnknown*)
    12089{
    12190  dprintf(("D3DCreateViewport\n"));
     
    12493//******************************************************************************
    12594//******************************************************************************
    126 HRESULT __stdcall D3DFindDevice(THIS_ LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT)
     95HRESULT __stdcall D3DFindDevice(THIS This, LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT)
    12796{
    12897  dprintf(("D3DCreateFindDevice\n"));
Note: See TracChangeset for help on using the changeset viewer.