Level editor and resource loader fixups and refactors

This commit is contained in:
elasota
2020-01-23 01:19:12 -05:00
parent 27a1f89c15
commit 5a3cedaa95
43 changed files with 310 additions and 367 deletions

View File

@@ -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))