2019-12-11 00:51:42 -05:00
|
|
|
#include "PLQDOffscreen.h"
|
|
|
|
|
#include "MemoryManager.h"
|
|
|
|
|
#include "MemReaderStream.h"
|
|
|
|
|
#include "ResourceManager.h"
|
|
|
|
|
#include "Rect2i.h"
|
|
|
|
|
#include "ResTypeID.h"
|
|
|
|
|
#include "QDStandardPalette.h"
|
|
|
|
|
#include "QDManager.h"
|
|
|
|
|
#include "QDGraf.h"
|
|
|
|
|
#include "QDPictDecoder.h"
|
|
|
|
|
#include "QDPictEmitContext.h"
|
|
|
|
|
#include "QDPictEmitScanlineParameters.h"
|
|
|
|
|
#include "QDPictHeader.h"
|
|
|
|
|
#include "QDPictOpcodes.h"
|
|
|
|
|
#include "QDPixMap.h"
|
|
|
|
|
#include "Vec2i.h"
|
|
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
2019-12-30 20:53:11 -05:00
|
|
|
PLError_t NewGWorld(DrawSurface **gworld, GpPixelFormat_t pixelFormat, const Rect *bounds, CTabHandle colorTable)
|
2019-11-11 00:11:59 -05:00
|
|
|
{
|
2019-12-29 06:38:18 -05:00
|
|
|
return PortabilityLayer::QDManager::GetInstance()->NewGWorld(gworld, pixelFormat, *bounds, colorTable);
|
2019-11-11 00:11:59 -05:00
|
|
|
}
|
|
|
|
|
|
2019-12-30 20:53:11 -05:00
|
|
|
void DisposeGWorld(DrawSurface *gworld)
|
2019-11-11 00:11:59 -05:00
|
|
|
{
|
2019-12-24 02:35:24 -05:00
|
|
|
return PortabilityLayer::QDManager::GetInstance()->DisposeGWorld(gworld);
|
2019-11-11 00:11:59 -05:00
|
|
|
}
|
|
|
|
|
|
2019-12-30 20:53:11 -05:00
|
|
|
PixMapHandle GetGWorldPixMap(DrawSurface *gworld)
|
2019-11-11 00:11:59 -05:00
|
|
|
{
|
2019-12-11 00:51:42 -05:00
|
|
|
if (!gworld)
|
|
|
|
|
return nullptr;
|
|
|
|
|
|
|
|
|
|
return gworld->m_port.GetPixMap();
|
2019-11-11 00:11:59 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OffsetRect(Rect *rect, int right, int down)
|
|
|
|
|
{
|
2019-12-11 00:51:42 -05:00
|
|
|
rect->left += right;
|
|
|
|
|
rect->right += right;
|
|
|
|
|
rect->top += down;
|
|
|
|
|
rect->bottom += down;
|
2019-11-11 00:11:59 -05:00
|
|
|
}
|