mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05:00
lego1: match MxVideoManager::RealizePalette (#92)
* Match MxVideoManager::RealizePalette * Rename class * Name some functions
This commit is contained in:
parent
9fa08b1017
commit
fa5417f58a
3 changed files with 40 additions and 5 deletions
34
LEGO1/mxdisplaysurface.h
Normal file
34
LEGO1/mxdisplaysurface.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#ifndef MXDISPLAYSURFACE_H
|
||||
#define MXDISPLAYSURFACE_H
|
||||
|
||||
#include <ddraw.h>
|
||||
|
||||
#include "mxcore.h"
|
||||
#include "mxpalette.h"
|
||||
#include "mxvideoparam.h"
|
||||
|
||||
#include "decomp.h"
|
||||
|
||||
// VTABLE 0x100dc768
|
||||
class MxDisplaySurface : public MxCore
|
||||
{
|
||||
public:
|
||||
MxDisplaySurface();
|
||||
virtual ~MxDisplaySurface() override;
|
||||
|
||||
virtual MxResult Init(MxVideoParam *p_videoParam, LPDIRECTDRAWSURFACE p_surface1, LPDIRECTDRAWSURFACE p_surface2, LPDIRECTDRAWCLIPPER p_clipper);
|
||||
virtual MxResult Create(MxVideoParam *p_videoParam);
|
||||
virtual void Clear();
|
||||
virtual void SetPalette(MxPalette *p_palette);
|
||||
virtual void vtable24(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4);
|
||||
virtual MxBool vtable28(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4);
|
||||
virtual MxBool vtable2c(undefined4, 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 void Display(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4);
|
||||
virtual undefined4 vtable3c(undefined4*);
|
||||
virtual undefined4 vtable40(undefined4);
|
||||
virtual undefined4 vtable44(undefined4, undefined4*, undefined4, undefined4);
|
||||
};
|
||||
|
||||
#endif // MXDISPLAYSURFACE_H
|
|
@ -25,7 +25,7 @@ int MxVideoManager::Init()
|
|||
{
|
||||
this->m_pDirectDraw = NULL;
|
||||
this->m_unk54 = NULL;
|
||||
this->m_unk58 = NULL;
|
||||
this->m_displaySurface = NULL;
|
||||
this->m_unk5c = 0;
|
||||
this->m_videoParam.SetPalette(NULL);
|
||||
this->m_unk60 = FALSE;
|
||||
|
@ -45,10 +45,10 @@ MxLong MxVideoManager::RealizePalette(MxPalette *p_palette)
|
|||
|
||||
this->m_criticalSection.Enter();
|
||||
|
||||
if (p_palette && this->m_videoParam.GetPalette())
|
||||
{
|
||||
if (p_palette && this->m_videoParam.GetPalette()) {
|
||||
p_palette->GetEntries(paletteEntries);
|
||||
// TODO
|
||||
this->m_videoParam.GetPalette()->SetEntries(paletteEntries);
|
||||
this->m_displaySurface->SetPalette(this->m_videoParam.GetPalette());
|
||||
}
|
||||
|
||||
this->m_criticalSection.Leave();
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define MXVIDEOMANAGER_H
|
||||
|
||||
#include "mxunknown100dc6b0.h"
|
||||
#include "mxdisplaysurface.h"
|
||||
#include "mxvideoparam.h"
|
||||
|
||||
// VTABLE 0x100dc810
|
||||
|
@ -26,7 +27,7 @@ class MxVideoManager : public MxUnknown100dc6b0
|
|||
MxVideoParam m_videoParam;
|
||||
LPDIRECTDRAW m_pDirectDraw;
|
||||
LPDIRECTDRAWSURFACE m_unk54;
|
||||
void* m_unk58;
|
||||
MxDisplaySurface *m_displaySurface;
|
||||
int m_unk5c;
|
||||
MxBool m_unk60;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue