mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 10:41:15 +00:00
Implement MxDisplaySurface::CopySurface
100% match
This commit is contained in:
parent
03428a2ac2
commit
433a5d2382
@ -92,7 +92,7 @@ class MxDisplaySurface : public MxCore {
|
|||||||
|
|
||||||
void ClearScreen();
|
void ClearScreen();
|
||||||
static LPDIRECTDRAWSURFACE CreateCursorSurface();
|
static LPDIRECTDRAWSURFACE CreateCursorSurface();
|
||||||
static LPDIRECTDRAWSURFACE FUN_100bbfb0(LPDIRECTDRAWSURFACE p_und);
|
static LPDIRECTDRAWSURFACE CopySurface(LPDIRECTDRAWSURFACE p_src);
|
||||||
|
|
||||||
inline LPDIRECTDRAWSURFACE GetDirectDrawSurface1() { return this->m_ddSurface1; }
|
inline LPDIRECTDRAWSURFACE GetDirectDrawSurface1() { return this->m_ddSurface1; }
|
||||||
inline LPDIRECTDRAWSURFACE GetDirectDrawSurface2() { return this->m_ddSurface2; }
|
inline LPDIRECTDRAWSURFACE GetDirectDrawSurface2() { return this->m_ddSurface2; }
|
||||||
|
|||||||
@ -701,11 +701,30 @@ LPDIRECTDRAWSURFACE MxDisplaySurface::VTable0x44(
|
|||||||
return surface;
|
return surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100bbfb0
|
// FUNCTION: LEGO1 0x100bbfb0
|
||||||
LPDIRECTDRAWSURFACE MxDisplaySurface::FUN_100bbfb0(LPDIRECTDRAWSURFACE p_und)
|
LPDIRECTDRAWSURFACE MxDisplaySurface::CopySurface(LPDIRECTDRAWSURFACE p_src)
|
||||||
{
|
{
|
||||||
// TODO
|
LPDIRECTDRAWSURFACE newSurface = NULL;
|
||||||
return NULL;
|
IDirectDraw* draw = MVideoManager()->GetDirectDraw();
|
||||||
|
|
||||||
|
DDSURFACEDESC ddsd;
|
||||||
|
memset(&ddsd, 0, sizeof(ddsd));
|
||||||
|
ddsd.dwSize = sizeof(ddsd);
|
||||||
|
|
||||||
|
p_src->GetSurfaceDesc(&ddsd);
|
||||||
|
|
||||||
|
if (draw->CreateSurface(&ddsd, &newSurface, NULL) != DD_OK) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
RECT rect = {0, 0, ddsd.dwWidth, ddsd.dwHeight};
|
||||||
|
|
||||||
|
if (newSurface->BltFast(0, 0, p_src, &rect, 16) != DD_OK) {
|
||||||
|
newSurface->Release();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return newSurface;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100bc070
|
// FUNCTION: LEGO1 0x100bc070
|
||||||
|
|||||||
@ -249,7 +249,7 @@ MxStillPresenter* MxStillPresenter::Clone()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_unk0x58) {
|
if (m_unk0x58) {
|
||||||
presenter->m_unk0x58 = MxDisplaySurface::FUN_100bbfb0(m_unk0x58);
|
presenter->m_unk0x58 = MxDisplaySurface::CopySurface(m_unk0x58);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_alpha) {
|
if (m_alpha) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user