Refactor QD ports so they no longer need to be the first member of draw surfaces

This commit is contained in:
elasota
2020-05-20 23:33:17 -04:00
parent f53dc21475
commit 66fc278ce9
18 changed files with 29 additions and 154 deletions

View File

@@ -38,13 +38,7 @@ static inline void InvertPixel8(uint8_t &pixel)
pixel = 255 ^ pixel;
}
void GetPort(GrafPtr *graf)
{
PL_NotYetImplemented();
}
void SetPort(GrafPtr graf)
void SetPort(DrawSurface *graf)
{
PortabilityLayer::QDManager::GetInstance()->SetPort(graf);
}
@@ -65,7 +59,7 @@ void SetRect(Rect *rect, short left, short top, short right, short bottom)
void SetPortWindowPort(WindowPtr window)
{
PortabilityLayer::WindowManager *wm = PortabilityLayer::WindowManager::GetInstance();
PortabilityLayer::QDManager::GetInstance()->SetPort(&window->GetDrawSurface()->m_port);
PortabilityLayer::QDManager::GetInstance()->SetPort(window->GetDrawSurface());
}
void SetPortDialogPort(Dialog *dialog)