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

Last change on this file since 21483 was 21483, checked in by dmik, 15 years ago

ddraw: Don't define CINTERFACE twice.

File size: 4.1 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 _OS2WIN_H
17#define FAR
18
19#include <odin.h>
20#include <winbase.h>
21
22#ifndef CINTERFACE
23#define CINTERFACE 1
24#endif
25#include "ddraw2d.h"
26#include "clipper.h"
27#include "palette.h"
28#include "surface.h"
29
30#include <misc.h>
31#include <winerror.h>
32#undef THIS
33#define THIS VOID*
34
35//******************************************************************************
36//******************************************************************************
37HRESULT WIN32API D3DQueryInterface(THIS This, REFIID riid, LPVOID FAR * ppvObj)
38{
39 dprintf(("DDRAW: D3DQueryInterface\n"));
40 *ppvObj = NULL;
41
42 if (!IsEqualGUID(riid, &IID_IDirect3D))
43 return E_NOINTERFACE;
44
45 *ppvObj = This;
46
47 D3DAddRef(This);
48 return(D3D_OK);
49}
50//******************************************************************************
51//******************************************************************************
52ULONG WIN32API D3DAddRef(THIS This)
53{
54 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
55
56 dprintf(("DDRAW: OS2IDirectDraw::AddRef %d\n", me->Referenced+1));
57 return ++me->Referenced;
58}
59//******************************************************************************
60//******************************************************************************
61ULONG WIN32API D3DRelease(THIS This)
62{
63 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
64
65 dprintf(("DDRAW: OS2IDirectDraw::Release %d\n", me->Referenced-1));
66 dprintf(("DDRAW: OS2IDirectDraw::%X \n", me));
67 if(me->Referenced)
68 {
69 me->Referenced--;
70 if(me->Referenced == 0)
71 {
72 delete(me);
73 return(0);
74 }
75 else
76 return me->Referenced;
77 }
78 else
79 return(0);
80}
81//******************************************************************************
82//******************************************************************************
83HRESULT WIN32API D3DInitialize(THIS This, REFIID)
84{
85 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
86
87 dprintf(("DDRAW: D3DInitialize\n"));
88 return(D3D_OK);
89}
90//******************************************************************************
91//******************************************************************************
92HRESULT WIN32API D3DEnumDevices(THIS This, LPD3DENUMDEVICESCALLBACK, LPVOID)
93{
94 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
95
96 dprintf(("DDRAW: D3DEnumDevices\n"));
97 return(D3D_OK);
98}
99//******************************************************************************
100//******************************************************************************
101HRESULT WIN32API D3DCreateLight(THIS This, LPDIRECT3DLIGHT*, IUnknown*)
102{
103 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
104
105 dprintf(("DDRAW: D3DCreateLight\n"));
106 return(D3D_OK);
107}
108//******************************************************************************
109//******************************************************************************
110HRESULT WIN32API D3DCreateMaterial(THIS This, LPDIRECT3DMATERIAL*, IUnknown*)
111{
112 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
113
114 dprintf(("DDRAW: D3DCreateMaterial\n"));
115 return(D3D_OK);
116}
117//******************************************************************************
118//******************************************************************************
119HRESULT WIN32API D3DCreateViewport(THIS This, LPDIRECT3DVIEWPORT*, IUnknown*)
120{
121 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
122
123 dprintf(("DDRAW: D3DCreateViewport\n"));
124 return(D3D_OK);
125}
126//******************************************************************************
127//******************************************************************************
128HRESULT WIN32API D3DFindDevice(THIS This, LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT)
129{
130 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
131
132 dprintf(("DDRAW: D3DCreateFindDevice\n"));
133 return(D3D_OK);
134}
135//******************************************************************************
136//******************************************************************************
Note: See TracBrowser for help on using the repository browser.