source: trunk/src/ddraw/ddraw3d.cpp@ 9560

Last change on this file since 9560 was 9560, checked in by sandervl, 23 years ago

Cleanup

File size: 4.0 KB
Line 
1/* $Id: ddraw3d.cpp,v 1.2 2002-12-29 14:11:01 sandervl Exp $ */
2
3/*
4 * DX clipper class routines
5 *
6 * Copyright 1998 Sander van Leeuwen
7 *
8 * Note: MUST use DDraw3D_GetThisPtr macro to access DirectDraw object!
9 *
10 * Project Odin Software License can be found in LICENSE.TXT
11 *
12 */
13
14#include <memory.h>
15
16#define INITGUID
17#define _OS2WIN_H
18#define FAR
19
20#include <odin.h>
21#include <winbase.h>
22#include "ddraw2d.h"
23#include "clipper.h"
24#include "palette.h"
25#include "surface.h"
26#include <misc.h>
27#include <winerror.h>
28#undef THIS
29#define THIS VOID*
30
31//******************************************************************************
32//******************************************************************************
33HRESULT WIN32API D3DQueryInterface(THIS This, REFIID riid, LPVOID FAR * ppvObj)
34{
35 dprintf(("DDRAW: D3DQueryInterface\n"));
36 *ppvObj = NULL;
37
38 if (!IsEqualGUID(riid, IID_IDirect3D))
39 return E_NOINTERFACE;
40
41 *ppvObj = This;
42
43 D3DAddRef(This);
44 return(D3D_OK);
45}
46//******************************************************************************
47//******************************************************************************
48ULONG WIN32API D3DAddRef(THIS This)
49{
50 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
51
52 dprintf(("DDRAW: OS2IDirectDraw::AddRef %d\n", me->Referenced+1));
53 return ++me->Referenced;
54}
55//******************************************************************************
56//******************************************************************************
57ULONG WIN32API D3DRelease(THIS This)
58{
59 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
60
61 dprintf(("DDRAW: OS2IDirectDraw::Release %d\n", me->Referenced-1));
62 dprintf(("DDRAW: OS2IDirectDraw::%X \n", me));
63 if(me->Referenced)
64 {
65 me->Referenced--;
66 if(me->Referenced == 0)
67 {
68 delete(me);
69 return(0);
70 }
71 else
72 return me->Referenced;
73 }
74 else
75 return(0);
76}
77//******************************************************************************
78//******************************************************************************
79HRESULT WIN32API D3DInitialize(THIS This, REFIID)
80{
81 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
82
83 dprintf(("DDRAW: D3DInitialize\n"));
84 return(D3D_OK);
85}
86//******************************************************************************
87//******************************************************************************
88HRESULT WIN32API D3DEnumDevices(THIS This, LPD3DENUMDEVICESCALLBACK, LPVOID)
89{
90 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
91
92 dprintf(("DDRAW: D3DEnumDevices\n"));
93 return(D3D_OK);
94}
95//******************************************************************************
96//******************************************************************************
97HRESULT WIN32API D3DCreateLight(THIS This, LPDIRECT3DLIGHT*, IUnknown*)
98{
99 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
100
101 dprintf(("DDRAW: D3DCreateLight\n"));
102 return(D3D_OK);
103}
104//******************************************************************************
105//******************************************************************************
106HRESULT WIN32API D3DCreateMaterial(THIS This, LPDIRECT3DMATERIAL*, IUnknown*)
107{
108 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
109
110 dprintf(("DDRAW: D3DCreateMaterial\n"));
111 return(D3D_OK);
112}
113//******************************************************************************
114//******************************************************************************
115HRESULT WIN32API D3DCreateViewport(THIS This, LPDIRECT3DVIEWPORT*, IUnknown*)
116{
117 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
118
119 dprintf(("DDRAW: D3DCreateViewport\n"));
120 return(D3D_OK);
121}
122//******************************************************************************
123//******************************************************************************
124HRESULT WIN32API D3DFindDevice(THIS This, LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT)
125{
126 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
127
128 dprintf(("DDRAW: D3DCreateFindDevice\n"));
129 return(D3D_OK);
130}
131//******************************************************************************
132//******************************************************************************
Note: See TracBrowser for help on using the repository browser.