DXGL r320 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r319
|
r320
|
r321
>
Date:
17:06, 8 February 2013
Author:
admin
Status:
new
Tags:
Comment:
Implement IDirect3DTexture::Load
Modified paths:
/ddraw/glDirect3DTexture.cpp
(modified) (
history
)
/ddraw/glDirectDrawSurface.cpp
(modified) (
history
)
/ddraw/glDirectDrawSurface.h
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirect3DTexture.cpp
—
—
@@ -76,8 +76,8 @@
77
77
HRESULT WINAPI glDirect3DTexture2::Load(LPDIRECT3DTEXTURE2 lpD3DTexture2)
78
78
{
79
79
if(!this) return DDERR_INVALIDOBJECT;
80
- FIXME("glDirect3DTexture2::Load: stub");
81
- return DDERR_GENERIC;
80
+ if(!lpD3DTexture2) return DDERR_INVALIDPARAMS;
81
+ return glDDS7->Load(((glDirect3DTexture2*)lpD3DTexture2)->GetDDS7());
82
82
}
83
83
HRESULT WINAPI glDirect3DTexture2::PaletteChanged(DWORD dwStart, DWORD dwCount)
84
84
{
—
—
@@ -140,8 +140,8 @@
141
141
HRESULT WINAPI glDirect3DTexture1::Load(LPDIRECT3DTEXTURE lpD3DTexture)
142
142
{
143
143
if(!this) return DDERR_INVALIDOBJECT;
144
- FIXME("glDirect3DTexture1::Load: stub");
145
- return DDERR_GENERIC;
144
+ if(!lpD3DTexture) return DDERR_INVALIDPARAMS;
145
+ return glDDS7->Load(((glDirect3DTexture1*)lpD3DTexture)->GetDDS7());
146
146
}
147
147
HRESULT WINAPI glDirect3DTexture1::PaletteChanged(DWORD dwStart, DWORD dwCount)
148
148
{
—
—
@@ -152,6 +152,5 @@
153
153
HRESULT WINAPI glDirect3DTexture1::Unload()
154
154
{
155
155
if(!this) return DDERR_INVALIDOBJECT;
156
- FIXME("glDirect3DTexture1::Unload: stub");
157
- return DDERR_GENERIC;
156
+ return DDERR_UNSUPPORTED;
158
157
}
Index: ddraw/glDirectDrawSurface.cpp
—
—
@@ -1234,6 +1234,16 @@
1235
1235
return D3D_OK;
1236
1236
}
1237
1237
1238
+HRESULT glDirectDrawSurface7::Load(glDirectDrawSurface7 *src)
1239
+{
1240
+ if(!this) return DDERR_INVALIDOBJECT;
1241
+ if(!src) return DDERR_INVALIDPARAMS;
1242
+ this->Blt(NULL,src,NULL,DDBLT_WAIT,NULL);
1243
+ ddsd.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD;
1244
+ return D3D_OK;
1245
+}
1246
+
1247
+
1238
1248
// DDRAW1 wrapper
1239
1249
glDirectDrawSurface1::glDirectDrawSurface1(glDirectDrawSurface7 *gl_DDS7)
1240
1250
{
Index: ddraw/glDirectDrawSurface.h
—
—
@@ -108,6 +108,7 @@
109
109
// Special ddraw2->ddraw7 api
110
110
HRESULT WINAPI Unlock2(LPVOID lpSurfaceData);
111
111
HRESULT GetHandle(glDirect3DDevice7 *glD3DDev7, LPD3DTEXTUREHANDLE lpHandle);
112
+ HRESULT Load(glDirectDrawSurface7 *src);
112
113
glDirectDrawSurface1 *dds1;
113
114
glDirectDrawSurface2 *dds2;
114
115
glDirectDrawSurface3 *dds3;
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version