isle/LEGO1/mxvideomanager.h

53 lines
1.5 KiB
C
Raw Normal View History

#ifndef MXVIDEOMANAGER_H
#define MXVIDEOMANAGER_H
#include "mxdisplaysurface.h"
#include "mxregion.h"
2023-08-28 06:01:45 -04:00
#include "mxmediamanager.h"
#include "mxvideoparam.h"
// VTABLE 0x100dc810
// SIZE 0x64
2023-08-28 06:01:45 -04:00
class MxVideoManager : public MxMediaManager
{
public:
virtual ~MxVideoManager() override;
virtual MxResult Tickle() override; // vtable+0x8
virtual void Destroy() override; // vtable+0x18
virtual MxResult vtable0x28(
MxVideoParam& p_videoParam,
LPDIRECTDRAW p_pDirectDraw,
LPDIRECTDRAWSURFACE p_pDDSurface,
LPDIRECTDRAWSURFACE p_ddSurface1,
LPDIRECTDRAWSURFACE p_ddSurface2,
LPDIRECTDRAWCLIPPER p_ddClipper,
MxU32 p_frequencyMS,
MxBool p_createThread
); // vtable+0x28
virtual MxResult Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, MxBool p_createThread); // vtable+0x2c
__declspec(dllexport) void InvalidateRect(MxRect32 &);
2023-10-14 15:31:30 -04:00
__declspec(dllexport) virtual MxResult RealizePalette(MxPalette *); // vtable+0x30
MxVideoManager();
MxResult Init();
void Destroy(MxBool p_fromDestructor);
void SortPresenterList();
void UpdateRegion();
inline MxVideoParam& GetVideoParam() { return this->m_videoParam; }
LEGO1: MxPalette (#56) * MxPalette - add missing member variables, Detach function * mb * MxPalette: give bob the builder his constructor * push progress, gn * avoid hexadecimal Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> * fix MxPalette::GetDefaultPalette Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> * aaaaaaaaaaaaaa * Revert "fix MxPalette::GetDefaultPalette" This reverts commit 63f2215737d3bcd286f67dcf1a04fdf8a234d41b. * Implement MxPalette::Clone (doesn't match) * fix MxPalette structure and match ctor/dtor * Matching progress for MxPalette::GetDefaultPalette * Implement ApplySystemEntriesToPalette except the memcpy calls * implement SetSkyColor (doesn't match) * Use MxTypes instead of generics * prefer decimal values than hex for m_entries * Update mxpalette.cpp * Push MxPalette progress - read comments in code. * improved MxPalette::operator==, will be 100% when MSVC feels like making it so * improved MxPalette::SetSkyColor, will be 100% when MSVC feels like making it so * improved MxPalette::Clone, will be 100% when MSVC feels like making it so * Fixes - reordered the functions in order of where they are in the hex because recmp.py sometimes kept saying it couldn't find the symbol (??) - clone returns a pointer, not a ref - worked a bit on setpalette/applysysentriestopalette * Match GetDefaultPalette a bit more * fix: MxPalette::GetDefaultPalette is now 100% matching * fix: MxPalette::ApplySystemEntriesToPalette is now 100% matching * tidy: rename `DC` var in GetDefaultPalette to `hdc` * fix: MxPalette::SetPalette is now functionally matching Not assembly matching yet because of MSVC weirdness. At some point it will probably start matching, because the structure seems to be accurate. * fix: MxPalette rgbquad ctor functionally matches Not quite ASM matching yet because of weird register allocation mismatches. * fix: I forgot to commit mxpalette.h... * tidy: use Mx* primitives instead of builtins * refactor: remove MxPalette::FromBitmapPalette * fix: call ApplySystemEntriesToPalette from MxPalette(const RGBQUAD *) * rename MxPalette::SetPalette to MxPalette::SetEntries * fix: I once again forgot to commit mxpalette.h... * feat: add/match MxPalette::Reset [0x100BF490] * fix: add MVideoManager() to mxomni header * refactor: change unk50 in MxVideoManager to LPDIRECTDRAW * feat: add/match MxPalette::CreateNativePalette [0x100BF000] * fix: MxPalette::SetSkyColor is 100% matching * Annotate MxPalette members' offsets * Annotate the global default aplette * use hex size * remove unnecessary variable offset listing * Update LEGO1/mxpalette.cpp --------- Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> Co-authored-by: Christian Semmler <mail@csemmler.com> Co-authored-by: ktkaufman03 <ktkaufman@wpi.edu> Co-authored-by: MattKC <34096995+itsmattkc@users.noreply.github.com>
2023-07-16 01:51:24 -04:00
inline LPDIRECTDRAW GetDirectDraw() { return this->m_pDirectDraw; }
inline MxDisplaySurface *GetDisplaySurface() { return this->m_displaySurface; }
protected:
MxVideoParam m_videoParam;
LEGO1: MxPalette (#56) * MxPalette - add missing member variables, Detach function * mb * MxPalette: give bob the builder his constructor * push progress, gn * avoid hexadecimal Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> * fix MxPalette::GetDefaultPalette Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> * aaaaaaaaaaaaaa * Revert "fix MxPalette::GetDefaultPalette" This reverts commit 63f2215737d3bcd286f67dcf1a04fdf8a234d41b. * Implement MxPalette::Clone (doesn't match) * fix MxPalette structure and match ctor/dtor * Matching progress for MxPalette::GetDefaultPalette * Implement ApplySystemEntriesToPalette except the memcpy calls * implement SetSkyColor (doesn't match) * Use MxTypes instead of generics * prefer decimal values than hex for m_entries * Update mxpalette.cpp * Push MxPalette progress - read comments in code. * improved MxPalette::operator==, will be 100% when MSVC feels like making it so * improved MxPalette::SetSkyColor, will be 100% when MSVC feels like making it so * improved MxPalette::Clone, will be 100% when MSVC feels like making it so * Fixes - reordered the functions in order of where they are in the hex because recmp.py sometimes kept saying it couldn't find the symbol (??) - clone returns a pointer, not a ref - worked a bit on setpalette/applysysentriestopalette * Match GetDefaultPalette a bit more * fix: MxPalette::GetDefaultPalette is now 100% matching * fix: MxPalette::ApplySystemEntriesToPalette is now 100% matching * tidy: rename `DC` var in GetDefaultPalette to `hdc` * fix: MxPalette::SetPalette is now functionally matching Not assembly matching yet because of MSVC weirdness. At some point it will probably start matching, because the structure seems to be accurate. * fix: MxPalette rgbquad ctor functionally matches Not quite ASM matching yet because of weird register allocation mismatches. * fix: I forgot to commit mxpalette.h... * tidy: use Mx* primitives instead of builtins * refactor: remove MxPalette::FromBitmapPalette * fix: call ApplySystemEntriesToPalette from MxPalette(const RGBQUAD *) * rename MxPalette::SetPalette to MxPalette::SetEntries * fix: I once again forgot to commit mxpalette.h... * feat: add/match MxPalette::Reset [0x100BF490] * fix: add MVideoManager() to mxomni header * refactor: change unk50 in MxVideoManager to LPDIRECTDRAW * feat: add/match MxPalette::CreateNativePalette [0x100BF000] * fix: MxPalette::SetSkyColor is 100% matching * Annotate MxPalette members' offsets * Annotate the global default aplette * use hex size * remove unnecessary variable offset listing * Update LEGO1/mxpalette.cpp --------- Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> Co-authored-by: Christian Semmler <mail@csemmler.com> Co-authored-by: ktkaufman03 <ktkaufman@wpi.edu> Co-authored-by: MattKC <34096995+itsmattkc@users.noreply.github.com>
2023-07-16 01:51:24 -04:00
LPDIRECTDRAW m_pDirectDraw;
LPDIRECTDRAWSURFACE m_pDDSurface;
MxDisplaySurface *m_displaySurface;
MxRegion *m_region;
MxBool m_unk60;
};
#endif // MXVIDEOMANAGER_H