mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-20 22:21:15 +00:00
Pass the image data to the textures (#202)
This commit is contained in:
parent
bcd0021bb1
commit
341d06f997
@ -152,16 +152,14 @@ HRESULT Direct3DRMImpl::CreateDeviceFromSurface(
|
|||||||
|
|
||||||
HRESULT Direct3DRMImpl::CreateTexture(D3DRMIMAGE* image, IDirect3DRMTexture2** outTexture)
|
HRESULT Direct3DRMImpl::CreateTexture(D3DRMIMAGE* image, IDirect3DRMTexture2** outTexture)
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
*outTexture = static_cast<IDirect3DRMTexture2*>(new Direct3DRMTextureImpl(image));
|
||||||
*outTexture = static_cast<IDirect3DRMTexture2*>(new Direct3DRMTextureImpl);
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Direct3DRMImpl::CreateTextureFromSurface(LPDIRECTDRAWSURFACE surface, IDirect3DRMTexture2** outTexture)
|
HRESULT Direct3DRMImpl::CreateTextureFromSurface(LPDIRECTDRAWSURFACE surface, IDirect3DRMTexture2** outTexture)
|
||||||
|
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
*outTexture = static_cast<IDirect3DRMTexture2*>(new Direct3DRMTextureImpl(surface));
|
||||||
*outTexture = static_cast<IDirect3DRMTexture2*>(new Direct3DRMTextureImpl);
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,16 @@
|
|||||||
#include "d3drmtexture_impl.h"
|
#include "d3drmtexture_impl.h"
|
||||||
#include "miniwin.h"
|
#include "miniwin.h"
|
||||||
|
|
||||||
|
Direct3DRMTextureImpl::Direct3DRMTextureImpl(D3DRMIMAGE* image)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
Direct3DRMTextureImpl::Direct3DRMTextureImpl(IDirectDrawSurface* surface) : m_surface(surface)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
HRESULT Direct3DRMTextureImpl::QueryInterface(const GUID& riid, void** ppvObject)
|
HRESULT Direct3DRMTextureImpl::QueryInterface(const GUID& riid, void** ppvObject)
|
||||||
{
|
{
|
||||||
if (SDL_memcmp(&riid, &IID_IDirect3DRMTexture2, sizeof(GUID)) == 0) {
|
if (SDL_memcmp(&riid, &IID_IDirect3DRMTexture2, sizeof(GUID)) == 0) {
|
||||||
@ -14,6 +24,9 @@ HRESULT Direct3DRMTextureImpl::QueryInterface(const GUID& riid, void** ppvObject
|
|||||||
|
|
||||||
HRESULT Direct3DRMTextureImpl::Changed(BOOL pixels, BOOL palette)
|
HRESULT Direct3DRMTextureImpl::Changed(BOOL pixels, BOOL palette)
|
||||||
{
|
{
|
||||||
|
if (!m_surface) {
|
||||||
|
return DDERR_GENERIC;
|
||||||
|
}
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,11 @@
|
|||||||
#include "d3drmobject_impl.h"
|
#include "d3drmobject_impl.h"
|
||||||
|
|
||||||
struct Direct3DRMTextureImpl : public Direct3DRMObjectBaseImpl<IDirect3DRMTexture2> {
|
struct Direct3DRMTextureImpl : public Direct3DRMObjectBaseImpl<IDirect3DRMTexture2> {
|
||||||
|
Direct3DRMTextureImpl(D3DRMIMAGE* image);
|
||||||
|
Direct3DRMTextureImpl(IDirectDrawSurface* surface);
|
||||||
HRESULT QueryInterface(const GUID& riid, void** ppvObject) override;
|
HRESULT QueryInterface(const GUID& riid, void** ppvObject) override;
|
||||||
HRESULT Changed(BOOL pixels, BOOL palette) override;
|
HRESULT Changed(BOOL pixels, BOOL palette) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
IDirectDrawSurface* m_surface = nullptr;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user