mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
Level editor and resource loader fixups and refactors
This commit is contained in:
@@ -261,10 +261,10 @@ void ReadyBackground (short theID, short *theTiles)
|
||||
return;
|
||||
}
|
||||
|
||||
thePicture = GetPicture(theID);
|
||||
thePicture = LoadHouseResource('PICT', theID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
{
|
||||
thePicture = GetResource('Date', theID).StaticCast<BitmapImage>();
|
||||
thePicture = LoadHouseResource('Date', theID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
{
|
||||
YellowAlert(kYellowNoBackground, 0);
|
||||
@@ -907,7 +907,10 @@ short GetOriginalBounding (short theID)
|
||||
boundsHand boundsRes;
|
||||
short boundCode;
|
||||
|
||||
boundsRes = GetResource('bnds', theID).StaticCast<boundsType>();
|
||||
boundsRes = LoadHouseResource('bnds', theID).StaticCast<boundsType>();
|
||||
if (boundsRes.MMBlock()->m_size != sizeof(boundsType))
|
||||
return 0; // Corrupted resource
|
||||
|
||||
if (boundsRes == nil)
|
||||
{
|
||||
if (PictIDExists(theID))
|
||||
|
||||
Reference in New Issue
Block a user