Remove port state, fix background not darkening in room editor

This commit is contained in:
elasota
2020-06-20 02:08:22 -04:00
parent 3bf689664f
commit 9d5adb9bb6
34 changed files with 45 additions and 138 deletions

View File

@@ -15,21 +15,16 @@ namespace PortabilityLayer
QDManagerImpl();
void Init() override;
DrawSurface *GetPort() const override;
void SetPort(DrawSurface *gw) override;
PLError_t NewGWorld(DrawSurface **gw, GpPixelFormat_t pixelFormat, const Rect &bounds, ColorTable **colorTable) override;
void DisposeGWorld(DrawSurface *gw) override;
static QDManagerImpl *GetInstance();
private:
DrawSurface *m_port;
static QDManagerImpl ms_instance;
};
QDManagerImpl::QDManagerImpl()
: m_port(nullptr)
{
}
@@ -37,21 +32,6 @@ namespace PortabilityLayer
{
}
DrawSurface *QDManagerImpl::GetPort() const
{
return m_port;
}
void QDManagerImpl::SetPort(DrawSurface *gw)
{
#if GP_DEBUG_CONFIG
if (gw)
gw->m_port.CheckPortSentinel();
#endif
m_port = gw;
}
PLError_t QDManagerImpl::NewGWorld(DrawSurface **gw, GpPixelFormat_t pixelFormat, const Rect &bounds, ColorTable **colorTable)
{
void *grafStorage = MemoryManager::GetInstance()->Alloc(sizeof(DrawSurface));