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

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

Fixed broken build after r21492 by sorting out a huuuuge wagon of duplicates, wrong include order and other dirty mess.

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