Handle refactor

This commit is contained in:
elasota
2019-12-29 23:14:37 -05:00
parent 9cf539eb52
commit fb105bd338
37 changed files with 365 additions and 240 deletions

View File

@@ -252,7 +252,7 @@ PixMapHandle GetGWorldPixMap(GWorldPtr gworld)
PicHandle GetPicture(short resID)
{
return reinterpret_cast<PicHandle>(PortabilityLayer::ResourceManager::GetInstance()->GetResource('PICT', resID));
return PortabilityLayer::ResourceManager::GetInstance()->GetResource('PICT', resID).StaticCast<Picture>();
}
void OffsetRect(Rect *rect, int right, int down)
@@ -290,7 +290,7 @@ void DrawPicture(PicHandle pict, Rect *bounds)
PortabilityLayer::PixMapImpl *pixMap = static_cast<PortabilityLayer::PixMapImpl*>(*port->GetPixMap());
long handleSize = GetHandleSize(reinterpret_cast<Handle>(pict));
long handleSize = pict.MMBlock()->m_size;
PortabilityLayer::MemReaderStream stream(picPtr, handleSize);
// Adjust draw origin