2023-07-21 21:28:13 -04:00
|
|
|
#ifndef MXDISPLAYSURFACE_H
|
|
|
|
#define MXDISPLAYSURFACE_H
|
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
#include "decomp.h"
|
2023-10-07 12:48:36 -04:00
|
|
|
#include "mxbitmap.h"
|
2023-07-21 21:28:13 -04:00
|
|
|
#include "mxcore.h"
|
|
|
|
#include "mxpalette.h"
|
|
|
|
#include "mxvideoparam.h"
|
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
#include <ddraw.h>
|
2023-07-21 21:28:13 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// VTABLE: LEGO1 0x100dc768
|
2023-08-03 14:13:27 -04:00
|
|
|
// SIZE 0xac
|
2023-10-24 19:38:27 -04:00
|
|
|
class MxDisplaySurface : public MxCore {
|
2023-07-21 21:28:13 -04:00
|
|
|
public:
|
2023-10-24 19:38:27 -04:00
|
|
|
MxDisplaySurface();
|
|
|
|
virtual ~MxDisplaySurface() override;
|
|
|
|
|
|
|
|
virtual MxResult Init(
|
|
|
|
MxVideoParam& p_videoParam,
|
|
|
|
LPDIRECTDRAWSURFACE p_ddSurface1,
|
|
|
|
LPDIRECTDRAWSURFACE p_ddSurface2,
|
|
|
|
LPDIRECTDRAWCLIPPER p_ddClipper
|
2023-12-29 17:59:09 -05:00
|
|
|
); // vtable+0x14
|
|
|
|
virtual MxResult Create(MxVideoParam& p_videoParam); // vtable+0x18
|
2023-12-29 18:01:24 -05:00
|
|
|
virtual void Destroy(); // vtable+0x1c
|
2023-12-29 17:59:09 -05:00
|
|
|
virtual void SetPalette(MxPalette* p_palette); // vtable+0x20
|
2023-12-13 05:48:14 -05:00
|
|
|
virtual void VTable0x24(
|
2023-10-24 19:38:27 -04:00
|
|
|
LPDDSURFACEDESC,
|
|
|
|
MxBitmap*,
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
undefined4
|
2023-12-29 17:59:09 -05:00
|
|
|
); // vtable+0x24
|
2023-12-31 15:29:05 -05:00
|
|
|
virtual void VTable0x28(
|
2023-12-29 16:30:17 -05:00
|
|
|
MxBitmap* p_bitmap,
|
|
|
|
MxS32 p_left,
|
|
|
|
MxS32 p_top,
|
|
|
|
MxS32 p_right,
|
|
|
|
MxS32 p_bottom,
|
|
|
|
MxS32 p_width,
|
|
|
|
MxS32 p_height
|
2023-12-29 17:59:09 -05:00
|
|
|
); // vtable+0x28
|
2023-12-13 05:48:14 -05:00
|
|
|
virtual MxBool VTable0x2c(
|
2023-10-24 19:38:27 -04:00
|
|
|
LPDDSURFACEDESC,
|
|
|
|
MxBitmap*,
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
MxBool
|
2023-12-29 17:59:09 -05:00
|
|
|
); // vtable+0x2c
|
2023-12-13 05:48:14 -05:00
|
|
|
virtual MxBool VTable0x30(
|
2023-12-29 16:30:17 -05:00
|
|
|
MxBitmap* p_bitmap,
|
|
|
|
MxS32 p_left,
|
|
|
|
MxS32 p_top,
|
|
|
|
MxS32 p_right,
|
|
|
|
MxS32 p_bottom,
|
|
|
|
MxS32 p_width,
|
|
|
|
MxS32 p_height,
|
2023-12-13 05:48:14 -05:00
|
|
|
MxBool
|
2023-12-29 17:59:09 -05:00
|
|
|
); // vtable+0x30
|
|
|
|
virtual undefined4 VTable0x34(
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
undefined4,
|
|
|
|
undefined4
|
|
|
|
); // vtable+0x34
|
|
|
|
virtual void Display(
|
|
|
|
MxS32 p_left,
|
|
|
|
MxS32 p_top,
|
|
|
|
MxS32 p_left2,
|
|
|
|
MxS32 p_top2,
|
|
|
|
MxS32 p_width,
|
|
|
|
MxS32 p_height
|
|
|
|
); // vtable+0x38
|
|
|
|
virtual void GetDC(HDC* p_hdc); // vtable+0x3c
|
|
|
|
virtual void ReleaseDC(HDC p_hdc); // vtable+0x40
|
|
|
|
virtual LPDIRECTDRAWSURFACE VTable0x44(MxBitmap*, undefined4*, undefined4, undefined4); // vtable+0x44
|
|
|
|
|
|
|
|
void FUN_100ba640();
|
2024-01-06 12:06:50 -05:00
|
|
|
static LPDIRECTDRAWSURFACE FUN_100bc070();
|
2023-10-24 19:38:27 -04:00
|
|
|
|
|
|
|
inline LPDIRECTDRAWSURFACE GetDirectDrawSurface1() { return this->m_ddSurface1; }
|
|
|
|
inline LPDIRECTDRAWSURFACE GetDirectDrawSurface2() { return this->m_ddSurface2; }
|
2023-12-21 10:44:54 -05:00
|
|
|
inline MxVideoParam& GetVideoParam() { return this->m_videoParam; }
|
2023-09-29 12:09:46 -04:00
|
|
|
|
2023-08-03 14:13:27 -04:00
|
|
|
private:
|
2023-12-30 16:47:07 -05:00
|
|
|
MxU8 CountTotalBitsSetTo1(MxU32 p_param);
|
|
|
|
MxU8 CountContiguousBitsSetTo1(MxU32 p_param);
|
|
|
|
|
2023-12-29 18:01:24 -05:00
|
|
|
void Init();
|
2023-12-29 17:59:09 -05:00
|
|
|
|
|
|
|
MxVideoParam m_videoParam; // 0x08
|
|
|
|
LPDIRECTDRAWSURFACE m_ddSurface1; // 0x2c
|
|
|
|
LPDIRECTDRAWSURFACE m_ddSurface2; // 0x30
|
|
|
|
LPDIRECTDRAWCLIPPER m_ddClipper; // 0x34
|
|
|
|
MxBool m_initialized; // 0x38
|
|
|
|
DDSURFACEDESC m_surfaceDesc; // 0x3c
|
|
|
|
MxU16* m_16bitPal; // 0xa8
|
2023-07-21 21:28:13 -04:00
|
|
|
};
|
|
|
|
|
2023-12-29 18:01:24 -05:00
|
|
|
// SYNTHETIC: LEGO1 0x100ba580
|
|
|
|
// MxDisplaySurface::`scalar deleting destructor'
|
|
|
|
|
2023-07-21 21:28:13 -04:00
|
|
|
#endif // MXDISPLAYSURFACE_H
|