1 | #include <memory.h>
|
---|
2 |
|
---|
3 | #define INITGUID
|
---|
4 | #include "os2ddraw.h"
|
---|
5 | #include "os2clipper.h"
|
---|
6 | #include "os2palette.h"
|
---|
7 | #include "os2surface.h"
|
---|
8 | #define _OS2WIN_H
|
---|
9 | #define FAR
|
---|
10 | #include "misc.h"
|
---|
11 | #include <winerror.h>
|
---|
12 | #include <builtin.h>
|
---|
13 | #include <odincrt.h>
|
---|
14 | #undef THIS
|
---|
15 | #define THIS VOID*
|
---|
16 |
|
---|
17 | //******************************************************************************
|
---|
18 | //******************************************************************************
|
---|
19 | HRESULT __stdcall D3DQueryInterface(THIS This, REFIID riid, LPVOID FAR * ppvObj)
|
---|
20 | {
|
---|
21 | dprintf(("D3DQueryInterface\n"));
|
---|
22 | *ppvObj = NULL;
|
---|
23 |
|
---|
24 | if(IID_IDirect3D != (GUID &)&riid)
|
---|
25 | return E_NOINTERFACE;
|
---|
26 |
|
---|
27 | *ppvObj = This;
|
---|
28 |
|
---|
29 | D3DAddRef(This);
|
---|
30 | return(D3D_OK);
|
---|
31 | }
|
---|
32 | //******************************************************************************
|
---|
33 | //******************************************************************************
|
---|
34 | ULONG __stdcall D3DAddRef(THIS This)
|
---|
35 | {
|
---|
36 | OS2IDirectDraw *me = (OS2IDirectDraw *)This;
|
---|
37 |
|
---|
38 | dprintf(("OS2IDirectDraw::AddRef %d\n", me->Referenced+1));
|
---|
39 | return ++me->Referenced;
|
---|
40 | }
|
---|
41 | //******************************************************************************
|
---|
42 | //******************************************************************************
|
---|
43 | ULONG __stdcall D3DRelease(THIS This)
|
---|
44 | {
|
---|
45 | OS2IDirectDraw *me = (OS2IDirectDraw *)This;
|
---|
46 |
|
---|
47 | dprintf(("OS2IDirectDraw::Release %d\n", me->Referenced-1));
|
---|
48 | dprintf(("OS2IDirectDraw::%X \n", me));
|
---|
49 | if(me->Referenced)
|
---|
50 | {
|
---|
51 | me->Referenced--;
|
---|
52 | if(me->Referenced == 0)
|
---|
53 | {
|
---|
54 | ODIN_delete(me);
|
---|
55 | return(0);
|
---|
56 | }
|
---|
57 | else
|
---|
58 | return me->Referenced;
|
---|
59 | }
|
---|
60 | else
|
---|
61 | return(0);
|
---|
62 | }
|
---|
63 | //******************************************************************************
|
---|
64 | //******************************************************************************
|
---|
65 | HRESULT __stdcall D3DInitialize(THIS This, REFIID)
|
---|
66 | {
|
---|
67 | dprintf(("D3DInitialize\n"));
|
---|
68 | return(D3D_OK);
|
---|
69 | }
|
---|
70 | //******************************************************************************
|
---|
71 | //******************************************************************************
|
---|
72 | HRESULT __stdcall D3DEnumDevices(THIS This, LPD3DENUMDEVICESCALLBACK, LPVOID)
|
---|
73 | {
|
---|
74 | dprintf(("D3DEnumDevices\n"));
|
---|
75 | return(D3D_OK);
|
---|
76 | }
|
---|
77 | //******************************************************************************
|
---|
78 | //******************************************************************************
|
---|
79 | HRESULT __stdcall D3DCreateLight(THIS This, LPDIRECT3DLIGHT*, IUnknown*)
|
---|
80 | {
|
---|
81 | dprintf(("D3DCreateLight\n"));
|
---|
82 | return(D3D_OK);
|
---|
83 | }
|
---|
84 | //******************************************************************************
|
---|
85 | //******************************************************************************
|
---|
86 | HRESULT __stdcall D3DCreateMaterial(THIS This, LPDIRECT3DMATERIAL*, IUnknown*)
|
---|
87 | {
|
---|
88 | dprintf(("D3DCreateMaterial\n"));
|
---|
89 | return(D3D_OK);
|
---|
90 | }
|
---|
91 | //******************************************************************************
|
---|
92 | //******************************************************************************
|
---|
93 | HRESULT __stdcall D3DCreateViewport(THIS This, LPDIRECT3DVIEWPORT*, IUnknown*)
|
---|
94 | {
|
---|
95 | dprintf(("D3DCreateViewport\n"));
|
---|
96 | return(D3D_OK);
|
---|
97 | }
|
---|
98 | //******************************************************************************
|
---|
99 | //******************************************************************************
|
---|
100 | HRESULT __stdcall D3DFindDevice(THIS This, LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT)
|
---|
101 | {
|
---|
102 | dprintf(("D3DCreateFindDevice\n"));
|
---|
103 | return(D3D_OK);
|
---|
104 | }
|
---|
105 | //******************************************************************************
|
---|
106 | //******************************************************************************
|
---|