mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-23 16:21:15 +00:00
Minor improvements all related to SetupCopyRect
This commit is contained in:
parent
85fe4ad07a
commit
2c04af3c77
@ -25,6 +25,8 @@ struct MxBITMAPINFO {
|
|||||||
#define LOWCOLOR 0 // 256 color
|
#define LOWCOLOR 0 // 256 color
|
||||||
#define HIGHCOLOR 1 // High Color (16-bit)
|
#define HIGHCOLOR 1 // High Color (16-bit)
|
||||||
|
|
||||||
|
// SIZE 0x20
|
||||||
|
// VTABLE 0x100dc7b0
|
||||||
class MxBitmap : public MxCore
|
class MxBitmap : public MxCore
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -44,6 +46,8 @@ class MxBitmap : public MxCore
|
|||||||
virtual MxResult SetBitDepth(MxBool); // vtable+3c
|
virtual MxResult SetBitDepth(MxBool); // vtable+3c
|
||||||
virtual MxResult StretchBits(HDC p_hdc, int p_xSrc, int p_ySrc, int p_xDest, int p_yDest, int p_destWidth, int p_destHeight); // vtable+40
|
virtual MxResult StretchBits(HDC p_hdc, int p_xSrc, int p_ySrc, int p_xDest, int p_yDest, int p_destWidth, int p_destHeight); // vtable+40
|
||||||
|
|
||||||
|
inline BITMAPINFOHEADER *GetBmiHeader() const { return m_bmiHeader; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxResult ImportColorsToPalette(RGBQUAD*, MxPalette*);
|
MxResult ImportColorsToPalette(RGBQUAD*, MxPalette*);
|
||||||
|
|
||||||
|
|||||||
@ -174,7 +174,7 @@ void MxDisplaySurface::SetPalette(MxPalette *p_palette)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100bc200 STUB
|
// OFFSET: LEGO1 0x100bc200 STUB
|
||||||
void MxDisplaySurface::vtable24(LPDDSURFACEDESC, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4)
|
void MxDisplaySurface::vtable24(LPDDSURFACEDESC, MxBitmap*, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ MxBool MxDisplaySurface::vtable28(undefined4, undefined4, undefined4, undefined4
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100bc630 STUB
|
// OFFSET: LEGO1 0x100bc630 STUB
|
||||||
MxBool MxDisplaySurface::vtable2c(LPDDSURFACEDESC, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, MxBool)
|
MxBool MxDisplaySurface::vtable2c(LPDDSURFACEDESC, MxBitmap*, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, MxBool)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <ddraw.h>
|
#include <ddraw.h>
|
||||||
|
|
||||||
|
#include "mxbitmap.h"
|
||||||
#include "mxcore.h"
|
#include "mxcore.h"
|
||||||
#include "mxpalette.h"
|
#include "mxpalette.h"
|
||||||
#include "mxvideoparam.h"
|
#include "mxvideoparam.h"
|
||||||
@ -25,9 +26,9 @@ class MxDisplaySurface : public MxCore
|
|||||||
virtual MxResult Create(MxVideoParam &p_videoParam);
|
virtual MxResult Create(MxVideoParam &p_videoParam);
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
virtual void SetPalette(MxPalette *p_palette);
|
virtual void SetPalette(MxPalette *p_palette);
|
||||||
virtual void vtable24(LPDDSURFACEDESC, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4);
|
virtual void vtable24(LPDDSURFACEDESC, MxBitmap*, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4);
|
||||||
virtual MxBool vtable28(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4);
|
virtual MxBool vtable28(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4);
|
||||||
virtual MxBool vtable2c(LPDDSURFACEDESC, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, MxBool);
|
virtual MxBool vtable2c(LPDDSURFACEDESC, MxBitmap*, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, MxBool);
|
||||||
virtual MxBool vtable30(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, MxBool);
|
virtual MxBool vtable30(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, MxBool);
|
||||||
virtual undefined4 vtable34(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4);
|
virtual undefined4 vtable34(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4);
|
||||||
virtual void Display(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4);
|
virtual void Display(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4);
|
||||||
|
|||||||
@ -68,17 +68,19 @@ class MxPresenter : public MxCore
|
|||||||
|
|
||||||
MxBool IsEnabled();
|
MxBool IsEnabled();
|
||||||
|
|
||||||
inline MxS32 GetCurrentTickleState() { return this->m_currentTickleState; }
|
inline MxS32 GetCurrentTickleState() const { return this->m_currentTickleState; }
|
||||||
inline MxPoint32 GetLocation() { return this->m_location; }
|
inline MxPoint32 GetLocation() const { return this->m_location; }
|
||||||
inline MxS32 GetDisplayZ() { return this->m_displayZ; }
|
inline MxS32 GetDisplayX() const { return this->m_location.m_x; }
|
||||||
inline MxDSAction *GetAction() { return this->m_action; }
|
inline MxS32 GetDisplayY() const { return this->m_location.m_y; }
|
||||||
|
inline MxS32 GetDisplayZ() const { return this->m_displayZ; }
|
||||||
|
inline MxDSAction *GetAction() const { return this->m_action; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
__declspec(dllexport) void Init();
|
__declspec(dllexport) void Init();
|
||||||
void SendTo_unkPresenter(MxOmni *);
|
void SendTo_unkPresenter(MxOmni *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxS32 m_currentTickleState; // 0x8
|
TickleState m_currentTickleState; // 0x8
|
||||||
MxU32 m_previousTickleStates;
|
MxU32 m_previousTickleStates;
|
||||||
MxPoint32 m_location;
|
MxPoint32 m_location;
|
||||||
MxS32 m_displayZ;
|
MxS32 m_displayZ;
|
||||||
|
|||||||
@ -15,3 +15,14 @@ void MxSmkPresenter::Init()
|
|||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100b3960
|
||||||
|
void MxSmkPresenter::VTable0x60()
|
||||||
|
{
|
||||||
|
if (m_bitmap) {
|
||||||
|
delete m_bitmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_bitmap = new MxBitmap();
|
||||||
|
m_bitmap->SetSize(m_smkWidth, m_smkHeight, NULL, NULL);
|
||||||
|
}
|
||||||
|
|||||||
@ -12,7 +12,12 @@ class MxSmkPresenter : public MxVideoPresenter
|
|||||||
public:
|
public:
|
||||||
MxSmkPresenter();
|
MxSmkPresenter();
|
||||||
|
|
||||||
undefined4 m_unk64[430];
|
virtual void VTable0x60() override;
|
||||||
|
|
||||||
|
undefined4 m_unk64;
|
||||||
|
MxS32 m_smkWidth; // 0x68
|
||||||
|
MxS32 m_smkHeight; // 0x6c
|
||||||
|
undefined4 m_unk70[427];
|
||||||
undefined4 m_unk71c;
|
undefined4 m_unk71c;
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
|
|||||||
@ -358,8 +358,8 @@ void MxTransitionManager::SetupCopyRect(LPDDSURFACEDESC ddsc)
|
|||||||
DWORD copyPitch = (ddsc->ddpfPixelFormat.dwRGBBitCount / 8) * (m_copyRect.right - m_copyRect.left + 1); // This uses m_copyRect, seemingly erroneously
|
DWORD copyPitch = (ddsc->ddpfPixelFormat.dwRGBBitCount / 8) * (m_copyRect.right - m_copyRect.left + 1); // This uses m_copyRect, seemingly erroneously
|
||||||
DWORD bytesPerPixel = ddsc->ddpfPixelFormat.dwRGBBitCount / 8;
|
DWORD bytesPerPixel = ddsc->ddpfPixelFormat.dwRGBBitCount / 8;
|
||||||
|
|
||||||
m_copyRect.left = m_waitIndicator->GetLocation().m_x;
|
m_copyRect.left = m_waitIndicator->GetDisplayX();
|
||||||
m_copyRect.top = m_waitIndicator->GetLocation().m_y;
|
m_copyRect.top = m_waitIndicator->GetDisplayY();
|
||||||
|
|
||||||
MxS32 height = m_waitIndicator->GetHeight();
|
MxS32 height = m_waitIndicator->GetHeight();
|
||||||
MxS32 width = m_waitIndicator->GetWidth();
|
MxS32 width = m_waitIndicator->GetWidth();
|
||||||
@ -390,11 +390,11 @@ void MxTransitionManager::SetupCopyRect(LPDDSURFACEDESC ddsc)
|
|||||||
{
|
{
|
||||||
MxDisplaySurface *displaySurface = VideoManager()->GetDisplaySurface();
|
MxDisplaySurface *displaySurface = VideoManager()->GetDisplaySurface();
|
||||||
MxBool unkbool = FALSE;
|
MxBool unkbool = FALSE;
|
||||||
displaySurface->vtable2c(ddsc, m_waitIndicator->m_unk50, 0, 0, m_waitIndicator->GetLocation().m_x, m_waitIndicator->GetLocation().m_y, m_waitIndicator->GetWidth(), m_waitIndicator->GetHeight(), unkbool);
|
displaySurface->vtable2c(ddsc, m_waitIndicator->m_bitmap, 0, 0, m_waitIndicator->GetDisplayX(), m_waitIndicator->GetDisplayY(), m_waitIndicator->GetWidth(), m_waitIndicator->GetHeight(), unkbool);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MxDisplaySurface *displaySurface = VideoManager()->GetDisplaySurface();
|
MxDisplaySurface *displaySurface = VideoManager()->GetDisplaySurface();
|
||||||
displaySurface->vtable24(ddsc, m_waitIndicator->m_unk50, 0, 0, m_waitIndicator->GetLocation().m_x, m_waitIndicator->GetLocation().m_y, m_waitIndicator->GetWidth(), m_waitIndicator->GetHeight());
|
displaySurface->vtable24(ddsc, m_waitIndicator->m_bitmap, 0, 0, m_waitIndicator->GetDisplayX(), m_waitIndicator->GetDisplayY(), m_waitIndicator->GetWidth(), m_waitIndicator->GetHeight());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,10 +8,10 @@ void MxVideoPresenter::VTable0x5c()
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1000c710 STUB
|
// OFFSET: LEGO1 0x1000c710
|
||||||
void MxVideoPresenter::VTable0x60()
|
void MxVideoPresenter::VTable0x60()
|
||||||
{
|
{
|
||||||
// TODO
|
// Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1000c720 STUB
|
// OFFSET: LEGO1 0x1000c720 STUB
|
||||||
@ -44,24 +44,24 @@ void MxVideoPresenter::VTable0x78()
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1000c7c0 STUB
|
// OFFSET: LEGO1 0x1000c7c0
|
||||||
void MxVideoPresenter::VTable0x7c()
|
MxBool MxVideoPresenter::VTable0x7c()
|
||||||
{
|
{
|
||||||
// TODO
|
return (m_bitmap != NULL) || (m_unk54 != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1000c7e0 STUB
|
// OFFSET: LEGO1 0x1000c7e0
|
||||||
MxS32 MxVideoPresenter::GetWidth()
|
MxS32 MxVideoPresenter::GetWidth()
|
||||||
{
|
{
|
||||||
// TODO
|
return m_unk54 ? m_unk54->width
|
||||||
return 0;
|
: m_bitmap->GetBmiHeader()->biWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1000c800 STUB
|
// OFFSET: LEGO1 0x1000c800 STUB
|
||||||
MxS32 MxVideoPresenter::GetHeight()
|
MxS32 MxVideoPresenter::GetHeight()
|
||||||
{
|
{
|
||||||
// TODO
|
return m_unk54 ? m_unk54->height
|
||||||
return 0;
|
: m_bitmap->GetBmiHeader()->biHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b2760 STUB
|
// OFFSET: LEGO1 0x100b2760 STUB
|
||||||
|
|||||||
@ -2,9 +2,11 @@
|
|||||||
#define MXVIDEOPRESENTER_H
|
#define MXVIDEOPRESENTER_H
|
||||||
|
|
||||||
#include "mxmediapresenter.h"
|
#include "mxmediapresenter.h"
|
||||||
|
#include "mxbitmap.h"
|
||||||
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
|
|
||||||
|
// VTABLE 0x100d4be8
|
||||||
class MxVideoPresenter : public MxMediaPresenter
|
class MxVideoPresenter : public MxMediaPresenter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -41,12 +43,20 @@ class MxVideoPresenter : public MxMediaPresenter
|
|||||||
virtual void VTable0x70(); // vtable+0x70
|
virtual void VTable0x70(); // vtable+0x70
|
||||||
virtual void VTable0x74(); // vtable+0x74
|
virtual void VTable0x74(); // vtable+0x74
|
||||||
virtual void VTable0x78(); // vtable+0x78
|
virtual void VTable0x78(); // vtable+0x78
|
||||||
virtual void VTable0x7c(); // vtable+0x7c
|
virtual MxBool VTable0x7c(); // vtable+0x7c
|
||||||
virtual MxS32 GetWidth(); // vtable+0x80
|
virtual MxS32 GetWidth(); // vtable+0x80
|
||||||
virtual MxS32 GetHeight(); // vtable+0x84
|
virtual MxS32 GetHeight(); // vtable+0x84
|
||||||
|
|
||||||
undefined4 m_unk50;
|
// TODO: Not sure what this is. Seems to have size of 12 bytes
|
||||||
undefined4 m_unk54;
|
// based on 0x100b9e9a. Values are copied from the bitmap header.
|
||||||
|
typedef struct {
|
||||||
|
undefined unk0[8];
|
||||||
|
MxU16 width;
|
||||||
|
MxU16 height;
|
||||||
|
} unknown_meta_struct;
|
||||||
|
|
||||||
|
MxBitmap *m_bitmap;
|
||||||
|
unknown_meta_struct *m_unk54;
|
||||||
undefined4 m_unk58;
|
undefined4 m_unk58;
|
||||||
undefined2 m_unk5c;
|
undefined2 m_unk5c;
|
||||||
unsigned char m_flags; // 0x5e
|
unsigned char m_flags; // 0x5e
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user