Index: ddraw/glDirect3DTexture.cpp |
— | — | @@ -25,134 +25,170 @@ |
26 | 26 |
|
27 | 27 | glDirect3DTexture2::glDirect3DTexture2(glDirectDrawSurface7 *glDDS7)
|
28 | 28 | {
|
| 29 | + TRACE_ENTER(2,14,this,14,glDDS7);
|
29 | 30 | this->glDDS7 = glDDS7;
|
30 | 31 | refcount = 1;
|
| 32 | + TRACE_EXIT(-1,0);
|
31 | 33 | }
|
32 | 34 |
|
33 | 35 | glDirect3DTexture2::~glDirect3DTexture2()
|
34 | 36 | {
|
| 37 | + TRACE_ENTER(1,14,this);
|
35 | 38 | glDDS7->d3dt2 = NULL;
|
36 | 39 | glDDS7->Release();
|
| 40 | + TRACE_EXIT(-1,0);
|
37 | 41 | }
|
38 | 42 |
|
39 | 43 | HRESULT WINAPI glDirect3DTexture2::QueryInterface(REFIID riid, void** ppvObj)
|
40 | 44 | {
|
41 | | - if(!this) return DDERR_INVALIDPARAMS;
|
| 45 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 46 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
42 | 47 | if(riid == IID_IUnknown)
|
43 | 48 | {
|
44 | 49 | this->AddRef();
|
45 | 50 | *ppvObj = this;
|
| 51 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 52 | + TRACE_EXIT(23,DD_OK);
|
46 | 53 | return DD_OK;
|
47 | 54 | }
|
48 | | - return glDDS7->QueryInterface(riid,ppvObj);
|
| 55 | + TRACE_RET(23,glDDS7->QueryInterface(riid,ppvObj));
|
49 | 56 | }
|
50 | 57 |
|
51 | 58 | ULONG WINAPI glDirect3DTexture2::AddRef()
|
52 | 59 | {
|
53 | | - if(!this) return 0;
|
| 60 | + TRACE_ENTER(1,14,this);
|
| 61 | + if(!this) TRACE_RET(8,0);
|
54 | 62 | refcount++;
|
| 63 | + TRACE_EXIT(8,refcount);
|
55 | 64 | return refcount;
|
56 | 65 | }
|
57 | 66 |
|
58 | 67 | ULONG WINAPI glDirect3DTexture2::Release()
|
59 | 68 | {
|
60 | | - if(!this) return 0;
|
| 69 | + TRACE_ENTER(1,14,this);
|
| 70 | + if(!this) TRACE_RET(8,0);
|
61 | 71 | ULONG ret;
|
62 | 72 | refcount--;
|
63 | 73 | ret = refcount;
|
64 | 74 | if(refcount == 0) delete this;
|
| 75 | + TRACE_EXIT(8,ret);
|
65 | 76 | return ret;
|
66 | 77 | }
|
67 | 78 |
|
68 | 79 | HRESULT WINAPI glDirect3DTexture2::GetHandle(LPDIRECT3DDEVICE2 lpDirect3DDevice2, LPD3DTEXTUREHANDLE lpHandle)
|
69 | 80 | {
|
70 | | - if(!this) return DDERR_INVALIDOBJECT;
|
71 | | - if(!lpDirect3DDevice2) return DDERR_INVALIDPARAMS;
|
| 81 | + TRACE_ENTER(3,14,this,14,lpDirect3DDevice2,14,lpHandle);
|
| 82 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 83 | + if(!lpDirect3DDevice2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
72 | 84 | glDirect3DDevice7 *glD3DDev7;
|
73 | 85 | lpDirect3DDevice2->QueryInterface(IID_IDirect3DDevice7,(void**)&glD3DDev7);
|
74 | 86 | HRESULT ret = glDDS7->GetHandle(glD3DDev7,lpHandle);
|
75 | 87 | glD3DDev7->Release();
|
| 88 | + TRACE_EXIT(23,ret);
|
76 | 89 | return ret;
|
77 | 90 | }
|
78 | 91 | HRESULT WINAPI glDirect3DTexture2::Load(LPDIRECT3DTEXTURE2 lpD3DTexture2)
|
79 | 92 | {
|
80 | | - if(!this) return DDERR_INVALIDOBJECT;
|
81 | | - if(!lpD3DTexture2) return DDERR_INVALIDPARAMS;
|
82 | | - return glDDS7->Load(((glDirect3DTexture2*)lpD3DTexture2)->GetDDS7());
|
| 93 | + TRACE_ENTER(2,14,this,14,lpD3DTexture2);
|
| 94 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 95 | + if(!lpD3DTexture2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 96 | + TRACE_RET(23,glDDS7->Load(((glDirect3DTexture2*)lpD3DTexture2)->GetDDS7()));
|
83 | 97 | }
|
84 | 98 | HRESULT WINAPI glDirect3DTexture2::PaletteChanged(DWORD dwStart, DWORD dwCount)
|
85 | 99 | {
|
86 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 100 | + TRACE_ENTER(3,14,this,8,dwStart,8,dwCount);
|
| 101 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
87 | 102 | FIXME("glDirect3DTexture2::PaletteChanged: stub");
|
| 103 | + TRACE_EXIT(23,DDERR_GENERIC);
|
88 | 104 | return DDERR_GENERIC;
|
89 | 105 | }
|
90 | 106 |
|
91 | 107 | glDirect3DTexture1::glDirect3DTexture1(glDirectDrawSurface7 *glDDS7)
|
92 | 108 | {
|
| 109 | + TRACE_ENTER(2,14,this,14,glDDS7);
|
93 | 110 | this->glDDS7 = glDDS7;
|
94 | 111 | refcount = 1;
|
| 112 | + TRACE_EXIT(-1,0);
|
95 | 113 | }
|
96 | 114 | glDirect3DTexture1::~glDirect3DTexture1()
|
97 | 115 | {
|
| 116 | + TRACE_ENTER(1,14,this);
|
98 | 117 | glDDS7->d3dt1 = NULL;
|
99 | 118 | glDDS7->Release();
|
| 119 | + TRACE_EXIT(-1,0);
|
100 | 120 | }
|
101 | 121 | HRESULT WINAPI glDirect3DTexture1::QueryInterface(REFIID riid, void** ppvObj)
|
102 | 122 | {
|
103 | | - if(!this) return DDERR_INVALIDPARAMS;
|
| 123 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 124 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
104 | 125 | if(riid == IID_IUnknown)
|
105 | 126 | {
|
106 | 127 | this->AddRef();
|
107 | 128 | *ppvObj = this;
|
| 129 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 130 | + TRACE_EXIT(23,DD_OK);
|
108 | 131 | return DD_OK;
|
109 | 132 | }
|
110 | | - return glDDS7->QueryInterface(riid,ppvObj);
|
| 133 | + TRACE_RET(23,glDDS7->QueryInterface(riid,ppvObj));
|
111 | 134 | }
|
112 | 135 | ULONG WINAPI glDirect3DTexture1::AddRef()
|
113 | 136 | {
|
114 | | - if(!this) return 0;
|
| 137 | + TRACE_ENTER(1,14,this);
|
| 138 | + if(!this) TRACE_RET(8,0);
|
115 | 139 | refcount++;
|
| 140 | + TRACE_EXIT(8,refcount);
|
116 | 141 | return refcount;
|
117 | 142 | }
|
118 | 143 | ULONG WINAPI glDirect3DTexture1::Release()
|
119 | 144 | {
|
120 | | - if(!this) return 0;
|
| 145 | + TRACE_ENTER(1,14,this);
|
| 146 | + if(!this) TRACE_RET(8,0);
|
121 | 147 | ULONG ret;
|
122 | 148 | refcount--;
|
123 | 149 | ret = refcount;
|
124 | 150 | if(refcount == 0) delete this;
|
| 151 | + TRACE_EXIT(8,ret);
|
125 | 152 | return ret;
|
126 | 153 | }
|
127 | 154 |
|
128 | 155 | HRESULT WINAPI glDirect3DTexture1::GetHandle(LPDIRECT3DDEVICE lpDirect3DDevice, LPD3DTEXTUREHANDLE lpHandle)
|
129 | 156 | {
|
130 | | - if(!this) return DDERR_INVALIDOBJECT;
|
131 | | - if(!lpDirect3DDevice) return DDERR_INVALIDPARAMS;
|
| 157 | + TRACE_ENTER(3,14,this,14,lpDirect3DDevice,14,lpHandle);
|
| 158 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 159 | + if(!lpDirect3DDevice) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
132 | 160 | glDirect3DDevice7 *glD3DDev7;
|
133 | 161 | lpDirect3DDevice->QueryInterface(IID_IDirect3DDevice7,(void**)&glD3DDev7);
|
134 | 162 | HRESULT ret = glDDS7->GetHandle(glD3DDev7,lpHandle);
|
135 | 163 | glD3DDev7->Release();
|
| 164 | + TRACE_EXIT(23,ret);
|
136 | 165 | return ret;
|
137 | 166 | }
|
138 | 167 | HRESULT WINAPI glDirect3DTexture1::Initialize(LPDIRECT3DDEVICE lpD3DDevice, LPDIRECTDRAWSURFACE lpDDSurface)
|
139 | 168 | {
|
140 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 169 | + TRACE_ENTER(3,14,this,14,lpD3DDevice,14,lpDDSurface);
|
| 170 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 171 | + TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
141 | 172 | return DDERR_ALREADYINITIALIZED;
|
142 | 173 | }
|
143 | 174 | HRESULT WINAPI glDirect3DTexture1::Load(LPDIRECT3DTEXTURE lpD3DTexture)
|
144 | 175 | {
|
145 | | - if(!this) return DDERR_INVALIDOBJECT;
|
146 | | - if(!lpD3DTexture) return DDERR_INVALIDPARAMS;
|
147 | | - return glDDS7->Load(((glDirect3DTexture1*)lpD3DTexture)->GetDDS7());
|
| 176 | + TRACE_ENTER(2,14,this,14,lpD3DTexture);
|
| 177 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 178 | + if(!lpD3DTexture) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 179 | + TRACE_RET(23,glDDS7->Load(((glDirect3DTexture1*)lpD3DTexture)->GetDDS7()));
|
148 | 180 | }
|
149 | 181 | HRESULT WINAPI glDirect3DTexture1::PaletteChanged(DWORD dwStart, DWORD dwCount)
|
150 | 182 | {
|
151 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 183 | + TRACE_ENTER(3,14,this,8,dwStart,8,dwCount);
|
| 184 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
152 | 185 | FIXME("glDirect3DTexture1::PaletteChanged: stub");
|
| 186 | + TRACE_EXIT(23,DDERR_GENERIC);
|
153 | 187 | return DDERR_GENERIC;
|
154 | 188 | }
|
155 | 189 | HRESULT WINAPI glDirect3DTexture1::Unload()
|
156 | 190 | {
|
157 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 191 | + TRACE_ENTER(1,14,this);
|
| 192 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 193 | + TRACE_EXIT(23,DDERR_UNSUPPORTED);
|
158 | 194 | return DDERR_UNSUPPORTED;
|
159 | 195 | }
|