mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
Migrate image storage from PICT to BMP
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "PLToolUtils.h"
|
||||
#include "PLPasStr.h"
|
||||
#include "PLStandardColors.h"
|
||||
#include "BitmapImage.h"
|
||||
#include "Externs.h"
|
||||
#include "FontFamily.h"
|
||||
#include "House.h"
|
||||
@@ -237,9 +238,9 @@ Boolean CreateNewRoom (short h, short v)
|
||||
|
||||
void ReadyBackground (short theID, short *theTiles)
|
||||
{
|
||||
Rect src, dest;
|
||||
THandle<Picture> thePicture;
|
||||
short i;
|
||||
Rect src, dest;
|
||||
THandle<BitmapImage> thePicture;
|
||||
short i;
|
||||
|
||||
if ((noRoomAtAll) || (!houseUnlocked))
|
||||
{
|
||||
@@ -263,7 +264,7 @@ void ReadyBackground (short theID, short *theTiles)
|
||||
thePicture = GetPicture(theID);
|
||||
if (thePicture == nil)
|
||||
{
|
||||
thePicture = GetResource('Date', theID).StaticCast<Picture>();
|
||||
thePicture = GetResource('Date', theID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
{
|
||||
YellowAlert(kYellowNoBackground, 0);
|
||||
@@ -271,7 +272,7 @@ void ReadyBackground (short theID, short *theTiles)
|
||||
}
|
||||
}
|
||||
|
||||
dest = (*thePicture)->picFrame.ToRect();
|
||||
dest = (*thePicture)->GetRect();
|
||||
QOffsetRect(&dest, -dest.left, -dest.top);
|
||||
workSrcMap->DrawPicture(thePicture, dest);
|
||||
thePicture.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user