mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 20:19:38 +00:00
Level editor and resource loader fixups and refactors
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "PLSound.h"
|
||||
#include "PLPasStr.h"
|
||||
#include "PLSysCalls.h"
|
||||
#include "PLTimeTaggedVOSEvent.h"
|
||||
#include "PLWidgets.h"
|
||||
#include "About.h"
|
||||
#include "DialogManager.h"
|
||||
@@ -19,8 +20,8 @@
|
||||
#include "Environ.h"
|
||||
#include "Externs.h"
|
||||
#include "HostSystemServices.h"
|
||||
#include "ResourceManager.h"
|
||||
#include "ScanlineMask.h"
|
||||
#include "PLTimeTaggedVOSEvent.h"
|
||||
|
||||
|
||||
static void HiLiteOkayButton (DrawSurface *surface);
|
||||
@@ -49,16 +50,13 @@ void DoAbout (void)
|
||||
StringPtr messagePtr;
|
||||
VersRecHndl version;
|
||||
ControlHandle itemHandle;
|
||||
short hit, wasResFile;
|
||||
|
||||
wasResFile = CurResFile();
|
||||
UseResFile(thisMac.thisResFile);
|
||||
short hit;
|
||||
|
||||
aboutDialog = PortabilityLayer::DialogManager::GetInstance()->LoadDialog(kAboutDialogID, PL_GetPutInFrontWindowPtr());
|
||||
// if (aboutDialog == nil)
|
||||
// RedAlert(kErrDialogDidntLoad);
|
||||
|
||||
version = GetResource('vers', 1).StaticCast<VersionRecord>();
|
||||
version = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('vers', 1).StaticCast<VersionRecord>();
|
||||
if (version != nil)
|
||||
{
|
||||
messagePtr = (**version).shortVersion + 1 + (**version).shortVersion[0];
|
||||
@@ -86,8 +84,6 @@ void DoAbout (void)
|
||||
while (hit != kOkayButton);
|
||||
|
||||
aboutDialog->Destroy();
|
||||
|
||||
UseResFile(wasResFile);
|
||||
}
|
||||
|
||||
//============================================================== Static Functions
|
||||
@@ -101,7 +97,7 @@ static void HiLiteOkayButton (DrawSurface *surface)
|
||||
|
||||
if (!okayButtIsHiLit)
|
||||
{
|
||||
thePict = GetPicture(kOkayButtPICTHiLit);
|
||||
thePict = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('PICT', kOkayButtPICTHiLit).StaticCast<BitmapImage>();
|
||||
if (thePict != nil)
|
||||
{
|
||||
surface->DrawPicture(thePict, okayButtonBounds);
|
||||
@@ -123,7 +119,7 @@ static void UnHiLiteOkayButton (DrawSurface *surface)
|
||||
|
||||
if (okayButtIsHiLit)
|
||||
{
|
||||
thePict = GetPicture(kOkayButtPICTNotHiLit);
|
||||
thePict = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('PICT', kOkayButtPICTNotHiLit).StaticCast<BitmapImage>();
|
||||
if (thePict != nil)
|
||||
{
|
||||
surface->DrawPicture(thePict, okayButtonBounds);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "HostDisplayDriver.h"
|
||||
#include "IGpColorCursor.h"
|
||||
#include "IGpDisplayDriver.h"
|
||||
#include "ResourceManager.h"
|
||||
|
||||
|
||||
#define rAcurID 128
|
||||
@@ -97,7 +98,7 @@ void InitAnimatedCursor (acurHandle ballCursH)
|
||||
compiledAcurHandle compiledBallCursorH;
|
||||
|
||||
if (ballCursH == nil)
|
||||
ballCursH = GetResource('acur', 128).StaticCast<acurRec>();
|
||||
ballCursH = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('acur', 128).StaticCast<acurRec>();
|
||||
if (ballCursH && ballCursH != animCursorH)
|
||||
{
|
||||
compiledBallCursorH = NewHandle(sizeof(compiledAcurRec) * (*ballCursH)->n).StaticCast<compiledAcurRec>();
|
||||
@@ -122,7 +123,7 @@ void InitAnimatedCursor (acurHandle ballCursH)
|
||||
|
||||
void LoadCursors (void)
|
||||
{
|
||||
InitAnimatedCursor(GetResource('acur', rAcurID).StaticCast<acurRec>());
|
||||
InitAnimatedCursor(PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('acur', rAcurID).StaticCast<acurRec>());
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- DisposCursors
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "Marquee.h"
|
||||
#include "ObjectEdit.h"
|
||||
#include "RectUtils.h"
|
||||
#include "WindowDef.h"
|
||||
#include "WindowManager.h"
|
||||
|
||||
|
||||
@@ -126,13 +127,15 @@ void OpenCoordWindow (void)
|
||||
|
||||
if (coordWindow == nil)
|
||||
{
|
||||
const uint16_t windowStyle = PortabilityLayer::WindowStyleFlags::kTitleBar | PortabilityLayer::WindowStyleFlags::kMiniBar;
|
||||
|
||||
QSetRect(&coordWindowRect, 0, 0, 50, 38);
|
||||
if (thisMac.hasColor)
|
||||
coordWindow = NewCWindow(nil, &coordWindowRect,
|
||||
PSTR("Tools"), false, kWindoidWDEF, kPutInFront, true, 0L);
|
||||
PSTR("Tools"), false, windowStyle, kPutInFront, true, 0L);
|
||||
else
|
||||
coordWindow = NewWindow(nil, &coordWindowRect,
|
||||
PSTR("Tools"), false, kWindoidWDEF, kPutInFront, true, 0L);
|
||||
PSTR("Tools"), false, windowStyle, kPutInFront, true, 0L);
|
||||
|
||||
if (coordWindow == nil)
|
||||
RedAlert(kErrNoMemory);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "DialogUtils.h"
|
||||
#include "Externs.h"
|
||||
#include "FontFamily.h"
|
||||
|
||||
#include "ResourceManager.h"
|
||||
|
||||
#define kActive 0
|
||||
#define kInactive 255
|
||||
@@ -144,7 +144,7 @@ void GetDialogRect (Rect *bounds, short dialogID)
|
||||
{
|
||||
Byte wasState;
|
||||
|
||||
Handle dlogHandle = GetResource('DLOG', dialogID).StaticCast<void>();
|
||||
Handle dlogHandle = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('DLOG', dialogID).StaticCast<void>();
|
||||
if (dlogHandle != nil)
|
||||
{
|
||||
BERect dataRect = **dlogHandle.StaticCast<BERect>();
|
||||
@@ -693,7 +693,7 @@ void LoadDialogPICT (Dialog *theDialog, short item, short theID)
|
||||
|
||||
Rect iRect = theDialog->GetItems()[item - 1].GetWidget()->GetRect();;
|
||||
|
||||
thePict = GetPicture(theID);
|
||||
thePict = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('PICT', theID).StaticCast<BitmapImage>();
|
||||
if (thePict)
|
||||
theDialog->GetWindow()->GetDrawSurface()->DrawPicture(thePict, iRect);
|
||||
}
|
||||
|
||||
@@ -279,7 +279,6 @@ short HowManyUsableScreens (Boolean use1Bit, Boolean use4Bit, Boolean use8Bit)
|
||||
|
||||
void CheckOurEnvirons (void)
|
||||
{
|
||||
thisMac.thisResFile = CurResFile();
|
||||
thisMac.vRefNum = 0; // TEMP
|
||||
thisMac.dirID = 0; // TEMP
|
||||
thisMac.hasGestalt = true; // TEMP
|
||||
|
||||
@@ -13,7 +13,6 @@ typedef struct
|
||||
Rect screen, gray;
|
||||
long dirID;
|
||||
short wasDepth, isDepth;
|
||||
short thisResFile;
|
||||
short numScreens;
|
||||
short vRefNum;
|
||||
Boolean can1Bit;
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace PortabilityLayer
|
||||
{
|
||||
class ResourceArchive;
|
||||
class ScanlineMask;
|
||||
class ResTypeID;
|
||||
}
|
||||
|
||||
#define kPreferredDepth 8
|
||||
@@ -174,6 +175,8 @@ void SetAppMemorySize (long);
|
||||
|
||||
Boolean CheckFileError (short, const PLPasStr &); // --- File Error.c
|
||||
|
||||
THandle<void> LoadHouseResource(const PortabilityLayer::ResTypeID &resTypeID, int16_t resID); // --- HouseIO.c
|
||||
|
||||
Boolean SavePrefs (prefsInfo *, short); // --- Prefs.c
|
||||
Boolean LoadPrefs (prefsInfo *, short);
|
||||
|
||||
@@ -193,8 +196,10 @@ void FindOurDevice (void);
|
||||
short RandomInt (short);
|
||||
long RandomLong (long);
|
||||
void RedAlert (short);
|
||||
void LoadGraphic (DrawSurface *, short);
|
||||
void LoadScaledGraphic (DrawSurface *, short, Rect *);
|
||||
void LoadGraphic (DrawSurface *surface, short resID); // Only loads from app resources
|
||||
void LoadGraphicCustom (DrawSurface *surface, short resID); // Supports custom graphics
|
||||
void LoadScaledGraphic (DrawSurface *, short, Rect *); // Only loads from app resources
|
||||
void LoadScaledGraphicCustom (DrawSurface *, short, Rect *); // Supports custom graphics
|
||||
bool LargeIconPlot (DrawSurface *, PortabilityLayer::ResourceArchive *, short, const Rect &);
|
||||
void DrawCIcon (DrawSurface *surface, short, short, short);
|
||||
char KeyMapOffsetFromRawKey (char);
|
||||
@@ -226,6 +231,7 @@ void CloseThisWindow (WindowPtr *);
|
||||
// THREEWORDINLINE(0x4218, 0x10B8, 0x0260);
|
||||
#endif
|
||||
|
||||
|
||||
#include "GliderDefines.h"
|
||||
#include "GliderStructs.h"
|
||||
#include "GliderVars.h"
|
||||
|
||||
@@ -528,8 +528,6 @@
|
||||
#define kInitialGliderSelected -2
|
||||
#define kLeftGliderSelected -3
|
||||
#define kRightGliderSelected -4
|
||||
#define kWindoidWDEF 2048
|
||||
#define kWindoidGrowWDEF 2064
|
||||
#define kTicksPerFrame 2
|
||||
#define kStarPictID 1995
|
||||
#define kNumUndergroundFloors 8
|
||||
|
||||
@@ -242,8 +242,9 @@ void WhereDoesGliderBegin (Rect *theRect, short mode)
|
||||
Boolean HouseHasOriginalPicts (void)
|
||||
{
|
||||
short nPicts;
|
||||
|
||||
nPicts = Count1Resources('PICT');
|
||||
|
||||
PL_NotYetImplemented(); nPicts = 0;
|
||||
//nPicts = Count1Resources('PICT');
|
||||
return (nPicts > 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "Environ.h"
|
||||
#include "FileManager.h"
|
||||
#include "HostFileSystem.h"
|
||||
#include "HostSystemServices.h"
|
||||
#include "House.h"
|
||||
#include "IOStream.h"
|
||||
#include "ObjectEdit.h"
|
||||
@@ -34,12 +35,14 @@ Boolean IsFileReadOnly (const VFileSpec &);
|
||||
|
||||
Movie theMovie;
|
||||
Rect movieRect;
|
||||
short houseResFork, wasHouseVersion;
|
||||
PortabilityLayer::ResourceArchive *houseResFork;
|
||||
short wasHouseVersion;
|
||||
PortabilityLayer::IOStream *houseStream;
|
||||
Boolean houseOpen, fileDirty, gameDirty;
|
||||
Boolean changeLockStateOfHouse, saveHouseLocked, houseIsReadOnly;
|
||||
Boolean hasMovie, tvInRoom;
|
||||
|
||||
|
||||
extern VFileSpec *theHousesSpecs;
|
||||
extern short thisHouseIndex, tvWithMovieNumber;
|
||||
extern short numberRooms, housesFound;
|
||||
@@ -324,8 +327,28 @@ void ByteSwapRect(Rect *rect)
|
||||
PortabilityLayer::ByteSwap::BigInt16(rect->right);
|
||||
}
|
||||
|
||||
template<size_t TSize>
|
||||
void SanitizePascalStr(uint8_t(&chars)[TSize])
|
||||
{
|
||||
const size_t maxLength = TSize - 1;
|
||||
size_t strLength = chars[0];
|
||||
if (strLength > maxLength)
|
||||
{
|
||||
strLength = maxLength;
|
||||
chars[0] = static_cast<uint8_t>(maxLength);
|
||||
}
|
||||
|
||||
for (size_t i = 1 + strLength; i < TSize; i++)
|
||||
chars[i] = 0;
|
||||
}
|
||||
|
||||
void ByteSwapScores(scoresType *scores)
|
||||
{
|
||||
SanitizePascalStr(scores->banner);
|
||||
|
||||
for (int i = 0; i < kMaxScores; i++)
|
||||
SanitizePascalStr(scores->names[i]);
|
||||
|
||||
for (int i = 0; i < kMaxScores; i++)
|
||||
PortabilityLayer::ByteSwap::BigInt32(scores->scores[i]);
|
||||
|
||||
@@ -568,6 +591,8 @@ void ByteSwapObject(objectType *obj)
|
||||
|
||||
void ByteSwapRoom(roomType *room)
|
||||
{
|
||||
SanitizePascalStr(room->name);
|
||||
|
||||
PortabilityLayer::ByteSwap::BigInt16(room->bounds);
|
||||
|
||||
PortabilityLayer::ByteSwap::BigInt16(room->background);
|
||||
@@ -590,19 +615,23 @@ bool ByteSwapHouse(housePtr house, size_t sizeInBytes)
|
||||
PortabilityLayer::ByteSwap::BigInt32(house->timeStamp);
|
||||
PortabilityLayer::ByteSwap::BigInt32(house->flags);
|
||||
ByteSwapPoint(&house->initial);
|
||||
SanitizePascalStr(house->banner);
|
||||
SanitizePascalStr(house->trailer);
|
||||
ByteSwapScores(&house->highScores);
|
||||
ByteSwapSavedGame(&house->savedGame);
|
||||
PortabilityLayer::ByteSwap::BigInt16(house->firstRoom);
|
||||
PortabilityLayer::ByteSwap::BigInt16(house->nRooms);
|
||||
|
||||
const size_t roomDataSize = sizeInBytes - houseType::kBinaryDataSize;
|
||||
if (house->nRooms < 1 || roomDataSize / sizeof(roomType) < static_cast<size_t>(house->nRooms))
|
||||
if (house->nRooms < 0 || roomDataSize / sizeof(roomType) < static_cast<size_t>(house->nRooms))
|
||||
return false;
|
||||
|
||||
const size_t nRooms = static_cast<size_t>(house->nRooms);
|
||||
for (size_t i = 0; i < nRooms; i++)
|
||||
ByteSwapRoom(house->rooms + i);
|
||||
|
||||
house->padding = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -748,8 +777,6 @@ Boolean WriteHouse (Boolean checkIt)
|
||||
UInt32 timeStamp;
|
||||
long byteCount;
|
||||
PLError_t theErr;
|
||||
|
||||
PL_NotYetImplemented();
|
||||
|
||||
if (!houseOpen)
|
||||
{
|
||||
@@ -772,9 +799,10 @@ Boolean WriteHouse (Boolean checkIt)
|
||||
|
||||
if (fileDirty)
|
||||
{
|
||||
GetDateTime(&timeStamp);
|
||||
timeStamp &= 0x7FFFFFFF;
|
||||
|
||||
int64_t currentTime = PortabilityLayer::HostSystemServices::GetInstance()->GetTime();
|
||||
if (currentTime > 0x7fffffff)
|
||||
currentTime = 0x7fffffff;
|
||||
|
||||
if (changeLockStateOfHouse)
|
||||
houseUnlocked = !saveHouseLocked;
|
||||
|
||||
@@ -869,13 +897,11 @@ Boolean CloseHouse (void)
|
||||
void OpenHouseResFork (void)
|
||||
{
|
||||
PortabilityLayer::ResourceManager *rm = PortabilityLayer::ResourceManager::GetInstance();
|
||||
if (houseResFork == -1)
|
||||
if (houseResFork == nullptr)
|
||||
{
|
||||
houseResFork = rm->OpenResFork(theHousesSpecs[thisHouseIndex].m_dir, theHousesSpecs[thisHouseIndex].m_name);
|
||||
if (houseResFork < 0)
|
||||
houseResFork = rm->LoadResFile(theHousesSpecs[thisHouseIndex].m_dir, theHousesSpecs[thisHouseIndex].m_name);
|
||||
if (!houseResFork)
|
||||
YellowAlert(kYellowFailedResOpen, PLErrors::kResourceError);
|
||||
else
|
||||
UseResFile(houseResFork);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -884,12 +910,12 @@ void OpenHouseResFork (void)
|
||||
|
||||
void CloseHouseResFork (void)
|
||||
{
|
||||
if (houseResFork != -1)
|
||||
if (houseResFork)
|
||||
{
|
||||
PortabilityLayer::ResourceManager *rm = PortabilityLayer::ResourceManager::GetInstance();
|
||||
|
||||
rm->CloseResFile(houseResFork);
|
||||
houseResFork = -1;
|
||||
houseResFork->Destroy();
|
||||
houseResFork = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -965,3 +991,14 @@ Boolean IsFileReadOnly (const VFileSpec &spec)
|
||||
{
|
||||
return PortabilityLayer::FileManager::GetInstance()->FileLocked(spec.m_dir, spec.m_name);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- LoadHousePicture
|
||||
|
||||
THandle<void> LoadHouseResource(const PortabilityLayer::ResTypeID &resTypeID, int16_t resID)
|
||||
{
|
||||
THandle<void> hdl = houseResFork->LoadResource(resTypeID, resID);
|
||||
if (hdl != nullptr)
|
||||
return hdl;
|
||||
|
||||
return PortabilityLayer::ResourceManager::GetInstance()->GetAppResource(resTypeID, resID);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ extern long incrementModeTime;
|
||||
extern UInt32 doubleTime;
|
||||
extern short fadeInSequence[], idleMode;
|
||||
extern short toolSelected, lastBackground, wasFlower, numExtraHouses;
|
||||
extern short houseResFork, lastHighScore, maxFiles, willMaxFiles;
|
||||
extern short lastHighScore, maxFiles, willMaxFiles;
|
||||
extern Boolean quitting, playing, fadeGraysOut;
|
||||
extern Boolean houseOpen, newRoomNow, evenFrame, menusUp, demoGoing;
|
||||
extern Boolean twoPlayerGame, paused, hasMirror, splashDrawn;
|
||||
@@ -151,7 +151,6 @@ void VariableInit (void)
|
||||
thisRoomNumber = 0;
|
||||
previousRoom = -1;
|
||||
toolSelected = kSelectTool;
|
||||
houseResFork = -1;
|
||||
lastBackground = kBaseBackgroundID;
|
||||
wasFlower = RandomInt(kNumFlowers);
|
||||
lastHighScore = -1;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "RectUtils.h"
|
||||
#include "PLButtonWidget.h"
|
||||
#include "PLWidgets.h"
|
||||
#include "WindowDef.h"
|
||||
#include "WindowManager.h"
|
||||
|
||||
#define kLinkControlID 130
|
||||
@@ -220,13 +221,15 @@ void OpenLinkWindow (void)
|
||||
|
||||
if (linkWindow == nil)
|
||||
{
|
||||
const uint16_t windowStyle = PortabilityLayer::WindowStyleFlags::kTitleBar | PortabilityLayer::WindowStyleFlags::kMiniBar;
|
||||
|
||||
QSetRect(&linkWindowRect, 0, 0, 129, 30);
|
||||
if (thisMac.hasColor)
|
||||
linkWindow = NewCWindow(nil, &linkWindowRect,
|
||||
PSTR("Link"), false, kWindoidWDEF, kPutInFront, true, 0L);
|
||||
PSTR("Link"), false, windowStyle, kPutInFront, true, 0L);
|
||||
else
|
||||
linkWindow = NewWindow(nil, &linkWindowRect,
|
||||
PSTR("Link"), false, kWindoidWDEF, kPutInFront, true, 0L);
|
||||
PSTR("Link"), false, windowStyle, kPutInFront, true, 0L);
|
||||
|
||||
MoveWindow(linkWindow, isLinkH, isLinkV, true);
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@ void OpenMainWindow (void)
|
||||
Rect scorebarRect = thisMac.screen;
|
||||
scorebarRect.bottom = scorebarRect.top + kScoreboardTall;
|
||||
|
||||
PortabilityLayer::WindowDef windowDef = PortabilityLayer::WindowDef::Create(scorebarRect, 0, true, false, 0, 0, PSTR("Scoreboard"));
|
||||
PortabilityLayer::WindowDef windowDef = PortabilityLayer::WindowDef::Create(scorebarRect, PortabilityLayer::WindowStyleFlags::kBorderless, true, false, 0, 0, PSTR("Scoreboard"));
|
||||
boardWindow = windowManager->CreateWindow(windowDef);
|
||||
if (boardWindow != nil)
|
||||
windowManager->PutWindowBehind(boardWindow, PL_GetPutInFrontWindowPtr());
|
||||
|
||||
@@ -167,10 +167,10 @@ void LoadGraphicPlus (DrawSurface *surface, short resID, const Rect &theRect)
|
||||
{
|
||||
THandle<BitmapImage> thePicture;
|
||||
|
||||
thePicture = GetPicture(resID);
|
||||
thePicture = LoadHouseResource('PICT', resID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
{
|
||||
thePicture = GetResource('Date', resID).StaticCast<BitmapImage>();
|
||||
thePicture = LoadHouseResource('Date', resID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
{
|
||||
return;
|
||||
@@ -361,7 +361,9 @@ void OpenMapWindow (void)
|
||||
mapRoomsWide * kMapRoomWidth + kMapScrollBarWidth - 2,
|
||||
mapRoomsHigh * kMapRoomHeight + kMapScrollBarWidth - 2);
|
||||
|
||||
PortabilityLayer::WindowDef wdef = PortabilityLayer::WindowDef::Create(mapWindowRect, kWindoidGrowWDEF, false, true, 0, 0, PSTR("Map"));
|
||||
const uint16_t windowStyle = PortabilityLayer::WindowStyleFlags::kTitleBar | PortabilityLayer::WindowStyleFlags::kResizable | PortabilityLayer::WindowStyleFlags::kMiniBar;
|
||||
|
||||
PortabilityLayer::WindowDef wdef = PortabilityLayer::WindowDef::Create(mapWindowRect, windowStyle, false, true, 0, 0, PSTR("Map"));
|
||||
|
||||
mapWindow = PortabilityLayer::WindowManager::GetInstance()->CreateWindow(wdef);
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "HostMutex.h"
|
||||
#include "HostSystemServices.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "ResourceManager.h"
|
||||
|
||||
|
||||
#define kBaseBufferMusicID 2000
|
||||
@@ -212,7 +213,7 @@ PLError_t LoadMusicSounds (void)
|
||||
|
||||
for (i = 0; i < kMaxMusic; i++)
|
||||
{
|
||||
theSound = ParseAndConvertSound(GetResource('snd ', i + kBaseBufferMusicID));
|
||||
theSound = ParseAndConvertSound(PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('snd ', i + kBaseBufferMusicID));
|
||||
if (theSound == nil)
|
||||
return PLErrors::kOutOfMemory;
|
||||
|
||||
@@ -364,24 +365,18 @@ void KillMusic (void)
|
||||
|
||||
long MusicBytesNeeded (void)
|
||||
{
|
||||
Handle theSound;
|
||||
long totalBytes;
|
||||
size_t totalBytes;
|
||||
short i;
|
||||
|
||||
totalBytes = 0L;
|
||||
SetResLoad(false);
|
||||
for (i = 0; i < kMaxMusic; i++)
|
||||
{
|
||||
theSound = GetResource('snd ', i + kBaseBufferMusicID);
|
||||
if (theSound == nil)
|
||||
{
|
||||
SetResLoad(true);
|
||||
size_t resSize = 0;
|
||||
if (!PortabilityLayer::ResourceManager::GetInstance()->GetAppResourceArchive()->GetResourceSize('snd ', i + kBaseBufferMusicID, resSize))
|
||||
return -1;
|
||||
}
|
||||
totalBytes += GetMaxResourceSize(theSound);
|
||||
// ReleaseResource(theSound);
|
||||
|
||||
totalBytes += static_cast<long>(resSize);
|
||||
}
|
||||
SetResLoad(true);
|
||||
return totalBytes;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "Environ.h"
|
||||
#include "Objects.h"
|
||||
#include "RectUtils.h"
|
||||
#include "ResourceManager.h"
|
||||
#include "Room.h"
|
||||
#include "Utilities.h"
|
||||
#include "PLHacks.h"
|
||||
@@ -1052,7 +1053,7 @@ void DrawCalendar (Rect *theRect)
|
||||
wasCPort = GetGraphicsPort();
|
||||
SetGraphicsPort(backSrcMap);
|
||||
|
||||
thePicture = GetPicture(kCalendarPictID);
|
||||
thePicture = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('PICT', kCalendarPictID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
RedAlert(kErrFailedGraphicLoad);
|
||||
|
||||
@@ -1078,7 +1079,7 @@ void DrawBulletin (Rect *theRect)
|
||||
Rect bounds;
|
||||
THandle<BitmapImage> thePicture;
|
||||
|
||||
thePicture = GetPicture(kBulletinPictID);
|
||||
thePicture = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('PICT', kBulletinPictID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
RedAlert(kErrFailedGraphicLoad);
|
||||
|
||||
@@ -1128,7 +1129,7 @@ void DrawPictObject (short what, Rect *theRect)
|
||||
break;
|
||||
}
|
||||
|
||||
thePicture = GetPicture(pictID);
|
||||
thePicture = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('PICT', pictID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
RedAlert(kErrFailedGraphicLoad);
|
||||
|
||||
@@ -1295,7 +1296,7 @@ void DrawCustPictSansWhite (short pictID, Rect *theRect)
|
||||
bounds = *theRect;
|
||||
ZeroRectCorner(&bounds);
|
||||
theErr = CreateOffScreenGWorld(&tempMap, &bounds, kPreferredPixelFormat);
|
||||
LoadGraphic(tempMap, pictID);
|
||||
LoadGraphicCustom(tempMap, pictID);
|
||||
|
||||
CopyBits((BitMap *)*GetGWorldPixMap(tempMap),
|
||||
(BitMap *)*GetGWorldPixMap(backSrcMap),
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "Objects.h"
|
||||
#include "Play.h"
|
||||
#include "RectUtils.h"
|
||||
#include "ResourceManager.h"
|
||||
#include "Room.h"
|
||||
|
||||
|
||||
@@ -2237,7 +2238,7 @@ void GetThisRoomsObjRects (void)
|
||||
break;
|
||||
|
||||
case kCustomPict:
|
||||
thePict = GetPicture(thisRoom->objects[i].data.g.height);
|
||||
thePict = LoadHouseResource('PICT', thisRoom->objects[i].data.g.height).StaticCast<BitmapImage>();
|
||||
if (thePict == nil)
|
||||
{
|
||||
thisRoom->objects[i].data.g.height = 10000;
|
||||
|
||||
@@ -218,7 +218,7 @@ void GetObjectRect (objectPtr who, Rect *itsRect)
|
||||
break;
|
||||
|
||||
case kCustomPict:
|
||||
thePict = GetPicture(who->data.g.height);
|
||||
thePict = LoadHouseResource('PICT', who->data.g.height).StaticCast<BitmapImage>();
|
||||
if (thePict == nil)
|
||||
{
|
||||
who->data.g.height = 10000;
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -134,13 +134,13 @@ void LoadGraphicSpecial (DrawSurface *surface, short resID)
|
||||
Rect bounds;
|
||||
THandle<BitmapImage> thePicture;
|
||||
|
||||
thePicture = GetPicture(resID);
|
||||
thePicture = LoadHouseResource('PICT', resID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
{
|
||||
thePicture = GetResource('Date', resID).StaticCast<BitmapImage>();
|
||||
thePicture = LoadHouseResource('Date', resID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
{
|
||||
thePicture = GetPicture(2000);
|
||||
thePicture = LoadHouseResource('PICT', 2000).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
RedAlert(kErrFailedGraphicLoad);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ Boolean originalLeftOpen, originalTopOpen, originalRightOpen, originalBottomOpe
|
||||
Boolean originalFloor;
|
||||
|
||||
extern Cursor handCursor;
|
||||
extern short houseResFork, lastBackground;
|
||||
extern short lastBackground;
|
||||
|
||||
|
||||
//============================================================== Functions
|
||||
@@ -459,9 +459,9 @@ void DoRoomInfo (void)
|
||||
}
|
||||
if ((tempBack == 2002) || (tempBack == 2011) ||
|
||||
(tempBack == 2016) || (tempBack == 2017))
|
||||
LoadScaledGraphic(tileSrcMap, tempBack - 800, &tileSrcRect);
|
||||
LoadScaledGraphicCustom(tileSrcMap, tempBack - 800, &tileSrcRect);
|
||||
else
|
||||
LoadScaledGraphic(tileSrcMap, tempBack, &tileSrcRect);
|
||||
LoadScaledGraphicCustom(tileSrcMap, tempBack, &tileSrcRect);
|
||||
|
||||
for (i = 0; i < kNumTiles; i++)
|
||||
tempTiles[i] = thisRoom->tiles[i];
|
||||
@@ -547,7 +547,7 @@ void DoRoomInfo (void)
|
||||
if ((tempBack != newBack) || (forceDraw))
|
||||
{
|
||||
tempBack = newBack;
|
||||
LoadScaledGraphic(tileSrcMap, tempBack, &tileSrcRect);
|
||||
LoadScaledGraphicCustom(tileSrcMap, tempBack, &tileSrcRect);
|
||||
InvalWindowRect(roomInfoDialog->GetWindow(), &tileSrc);
|
||||
InvalWindowRect(roomInfoDialog->GetWindow(), &tileDest);
|
||||
}
|
||||
@@ -573,9 +573,9 @@ void DoRoomInfo (void)
|
||||
tempBack = newBack;
|
||||
if ((tempBack == 2002) || (tempBack == 2011) ||
|
||||
(tempBack == 2016) || (tempBack == 2017))
|
||||
LoadScaledGraphic(tileSrcMap, tempBack - 800, &tileSrcRect);
|
||||
LoadScaledGraphicCustom(tileSrcMap, tempBack - 800, &tileSrcRect);
|
||||
else
|
||||
LoadScaledGraphic(tileSrcMap, tempBack, &tileSrcRect);
|
||||
LoadScaledGraphicCustom(tileSrcMap, tempBack, &tileSrcRect);
|
||||
InvalWindowRect(roomInfoDialog->GetWindow(), &tileSrc);
|
||||
InvalWindowRect(roomInfoDialog->GetWindow(), &tileDest);
|
||||
}
|
||||
@@ -586,7 +586,7 @@ void DoRoomInfo (void)
|
||||
if (tempBack != newBack)
|
||||
{
|
||||
tempBack = newBack;
|
||||
LoadScaledGraphic(tileSrcMap, tempBack, &tileSrcRect);
|
||||
LoadScaledGraphicCustom(tileSrcMap, tempBack, &tileSrcRect);
|
||||
InvalWindowRect(roomInfoDialog->GetWindow(), &tileSrc);
|
||||
InvalWindowRect(roomInfoDialog->GetWindow(), &tileDest);
|
||||
}
|
||||
@@ -857,7 +857,7 @@ short ChooseOriginalArt (short was)
|
||||
|
||||
Boolean PictIDExists (short theID)
|
||||
{
|
||||
THandle<BitmapImage> thePicture;
|
||||
THandle<void> thePicture;
|
||||
// Handle resHandle;
|
||||
// Str255 resName;
|
||||
// ResType resType;
|
||||
@@ -867,10 +867,10 @@ Boolean PictIDExists (short theID)
|
||||
|
||||
foundIt = true;
|
||||
|
||||
thePicture = GetPicture(theID);
|
||||
thePicture = LoadHouseResource('PICT', theID);
|
||||
if (thePicture == nil)
|
||||
{
|
||||
thePicture = GetResource('Date', theID).StaticCast<BitmapImage>();
|
||||
thePicture = LoadHouseResource('Date', theID);
|
||||
if (thePicture == nil)
|
||||
{
|
||||
foundIt = false;
|
||||
@@ -907,8 +907,11 @@ short GetFirstPICT (void)
|
||||
{
|
||||
Handle resHandle;
|
||||
Str255 resName;
|
||||
|
||||
resHandle = Get1IndResource('PICT', 1);
|
||||
|
||||
PL_NotYetImplemented();
|
||||
|
||||
//resHandle = Get1IndResource('PICT', 1);
|
||||
resHandle = Handle();
|
||||
if (resHandle != nil)
|
||||
{
|
||||
const PortabilityLayer::ResourceArchiveRef *resRef = PortabilityLayer::ResourceManager::GetInstance()->ResourceForHandle(resHandle.MMBlock());
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "PLSound.h"
|
||||
#include "Externs.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "ResourceManager.h"
|
||||
#include "SoundSync.h"
|
||||
#include "VirtualDirectory.h"
|
||||
#include "WaveFormat.h"
|
||||
@@ -187,7 +188,7 @@ PLError_t LoadTriggerSound (short soundID)
|
||||
|
||||
theErr = PLErrors::kNone;
|
||||
|
||||
theSound = ParseAndConvertSound(GetResource('snd ', soundID));
|
||||
theSound = ParseAndConvertSound(LoadHouseResource('snd ', soundID));
|
||||
if (theSound == nil)
|
||||
{
|
||||
theErr = PLErrors::kFileNotFound;
|
||||
@@ -234,7 +235,7 @@ PLError_t LoadBufferSounds (void)
|
||||
|
||||
for (i = 0; i < kMaxSounds - 1; i++)
|
||||
{
|
||||
theSound = ParseAndConvertSound(GetResource('snd ', i + kBaseBufferSoundID));
|
||||
theSound = ParseAndConvertSound(PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('snd ', i + kBaseBufferSoundID));
|
||||
if (theSound == nil)
|
||||
return (PLErrors::kOutOfMemory);
|
||||
|
||||
@@ -369,24 +370,20 @@ void KillSound (void)
|
||||
|
||||
long SoundBytesNeeded (void)
|
||||
{
|
||||
Handle theSound;
|
||||
long totalBytes;
|
||||
short i;
|
||||
|
||||
totalBytes = 0L;
|
||||
SetResLoad(false);
|
||||
for (i = 0; i < kMaxSounds - 1; i++)
|
||||
{
|
||||
theSound = GetResource('snd ', i + kBaseBufferSoundID);
|
||||
if (theSound == nil)
|
||||
{
|
||||
SetResLoad(true);
|
||||
size_t resSize = 0;
|
||||
if (!PortabilityLayer::ResourceManager::GetInstance()->GetAppResourceArchive()->GetResourceSize('snd ', i + kBaseBufferSoundID, resSize))
|
||||
return -1;
|
||||
}
|
||||
totalBytes += GetMaxResourceSize(theSound);
|
||||
|
||||
totalBytes += static_cast<long>(resSize);
|
||||
// ReleaseResource(theSound);
|
||||
}
|
||||
SetResLoad(true);
|
||||
|
||||
return totalBytes;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "Play.h"
|
||||
#include "Player.h"
|
||||
#include "RectUtils.h"
|
||||
#include "ResourceManager.h"
|
||||
#include "RubberBands.h"
|
||||
#include "Scoreboard.h"
|
||||
#include "Utilities.h"
|
||||
@@ -77,7 +78,7 @@ void InitScoreboardMap (void)
|
||||
hOffset = (RectWide(&boardSrcRect) - kMaxViewWidth) / 2;
|
||||
else
|
||||
hOffset = -576;
|
||||
thePicture = GetPicture(kScoreboardPictID);
|
||||
thePicture = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('PICT', kScoreboardPictID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
RedAlert(kErrFailedGraphicLoad);
|
||||
bounds = (*thePicture)->GetRect();
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "MainWindow.h"
|
||||
#include "Objects.h"
|
||||
#include "RectUtils.h"
|
||||
#include "ResourceManager.h"
|
||||
#include "Room.h"
|
||||
#include "RoomGraphics.h"
|
||||
#include "Utilities.h"
|
||||
@@ -260,7 +261,7 @@ void CreatePointers (void)
|
||||
demoData = (demoPtr)NewPtr(kDemoLength);
|
||||
if (demoData == nil)
|
||||
RedAlert(kErrNoMemory);
|
||||
tempHandle = GetResource('demo', 128);
|
||||
tempHandle = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('demo', 128);
|
||||
if (tempHandle == nil)
|
||||
RedAlert(kErrNoMemory);
|
||||
else
|
||||
|
||||
@@ -300,7 +300,9 @@ void OpenToolsWindow (void)
|
||||
QOffsetRect(&toolTextRect, 0, 157 - 15);
|
||||
|
||||
{
|
||||
PortabilityLayer::WindowDef wdef = PortabilityLayer::WindowDef::Create(toolsWindowRect, kWindoidWDEF, false, true, 0, 0, PSTR("Tools"));
|
||||
const uint16_t windowStyle = PortabilityLayer::WindowStyleFlags::kTitleBar | PortabilityLayer::WindowStyleFlags::kMiniBar;
|
||||
|
||||
PortabilityLayer::WindowDef wdef = PortabilityLayer::WindowDef::Create(toolsWindowRect, windowStyle, false, true, 0, 0, PSTR("Tools"));
|
||||
toolsWindow = wm->CreateWindow(wdef);
|
||||
}
|
||||
|
||||
|
||||
@@ -213,7 +213,6 @@ PLError_t CreateOffScreenGWorld (DrawSurface **theGWorld, Rect *bounds, GpPixelF
|
||||
return theErr;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------- KillOffScreenPixMap
|
||||
// Destroys memory allocated by an offscreen pix map.
|
||||
/*
|
||||
@@ -255,7 +254,7 @@ void LoadGraphic (DrawSurface *surface, short resID)
|
||||
Rect bounds;
|
||||
THandle<BitmapImage> thePicture;
|
||||
|
||||
thePicture = GetPicture(resID);
|
||||
thePicture = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('PICT', resID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
RedAlert(kErrFailedGraphicLoad);
|
||||
|
||||
@@ -266,6 +265,24 @@ void LoadGraphic (DrawSurface *surface, short resID)
|
||||
thePicture.Dispose();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- LoadGraphicCustom
|
||||
// Same as LoadGraphic but supports custom graphics
|
||||
void LoadGraphicCustom(DrawSurface *surface, short resID)
|
||||
{
|
||||
Rect bounds;
|
||||
THandle<BitmapImage> thePicture;
|
||||
|
||||
thePicture = LoadHouseResource('PICT', resID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
RedAlert(kErrFailedGraphicLoad);
|
||||
|
||||
bounds = (*thePicture)->GetRect();
|
||||
OffsetRect(&bounds, -bounds.left, -bounds.top);
|
||||
surface->DrawPicture(thePicture, bounds);
|
||||
|
||||
thePicture.Dispose();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- LoadScaledGraphic
|
||||
// Loads the specified 'PICT' and draws it mapped to the rectangle<6C>
|
||||
// specified. If this rect isn't the same size of the 'PICT', scaling<6E>
|
||||
@@ -275,7 +292,23 @@ void LoadScaledGraphic (DrawSurface *surface, short resID, Rect *theRect)
|
||||
{
|
||||
THandle<BitmapImage> thePicture;
|
||||
|
||||
thePicture = GetPicture(resID);
|
||||
thePicture = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('PICT', resID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
RedAlert(kErrFailedGraphicLoad);
|
||||
surface->DrawPicture(thePicture, *theRect);
|
||||
thePicture.Dispose();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- LoadScaledGraphic
|
||||
// Loads the specified 'PICT' and draws it mapped to the rectangle<6C>
|
||||
// specified. If this rect isn't the same size of the 'PICT', scaling<6E>
|
||||
// will occur.
|
||||
|
||||
void LoadScaledGraphicCustom(DrawSurface *surface, short resID, Rect *theRect)
|
||||
{
|
||||
THandle<BitmapImage> thePicture;
|
||||
|
||||
thePicture = LoadHouseResource('PICT', resID).StaticCast<BitmapImage>();
|
||||
if (thePicture == nil)
|
||||
RedAlert(kErrFailedGraphicLoad);
|
||||
surface->DrawPicture(thePicture, *theRect);
|
||||
@@ -287,7 +320,7 @@ void LoadScaledGraphic (DrawSurface *surface, short resID, Rect *theRect)
|
||||
|
||||
bool LargeIconPlot (DrawSurface *surface, PortabilityLayer::ResourceArchive *resFile, short resID, const Rect &theRect)
|
||||
{
|
||||
Handle hdl = resFile->GetResource('icl8', resID, true);
|
||||
Handle hdl = resFile->LoadResource('icl8', resID);
|
||||
if (hdl)
|
||||
{
|
||||
THandle<PortabilityLayer::PixMapImpl> img = PortabilityLayer::IconLoader::GetInstance()->LoadSimpleColorIcon(hdl);
|
||||
@@ -302,7 +335,7 @@ bool LargeIconPlot (DrawSurface *surface, PortabilityLayer::ResourceArchive *res
|
||||
return true;
|
||||
}
|
||||
|
||||
hdl = resFile->GetResource('ICN#', resID, true);
|
||||
hdl = resFile->LoadResource('ICN#', resID);
|
||||
if (hdl)
|
||||
{
|
||||
THandle<PortabilityLayer::PixMapImpl> img = PortabilityLayer::IconLoader::GetInstance()->LoadBWIcon(hdl);
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
#include "Environ.h"
|
||||
#include "PLStandardColors.h"
|
||||
#include "RectUtils.h"
|
||||
|
||||
#include "WindowDef.h"
|
||||
#include "WindowManager.h"
|
||||
|
||||
#define kFloatingKind 2048
|
||||
#define kMessageWindowTall 48
|
||||
@@ -101,16 +102,16 @@ Boolean IsWindowFloating (WindowPtr theWindow)
|
||||
|
||||
void OpenMessageWindow (const PLPasStr &title)
|
||||
{
|
||||
const uint16_t windowStyle = PortabilityLayer::WindowStyleFlags::kTitleBar;
|
||||
|
||||
Rect mssgWindowRect;
|
||||
|
||||
SetRect(&mssgWindowRect, 0, 0, 256, kMessageWindowTall);
|
||||
if (thisMac.hasColor)
|
||||
mssgWindow = NewCWindow(nil, &mssgWindowRect,
|
||||
title, false, noGrowDocProc, kPutInFront, false, 0L);
|
||||
else
|
||||
mssgWindow = NewWindow(nil, &mssgWindowRect,
|
||||
title, false, noGrowDocProc, kPutInFront, false, 0L);
|
||||
|
||||
|
||||
const PortabilityLayer::WindowDef wdef = PortabilityLayer::WindowDef::Create(mssgWindowRect, windowStyle, false, false, 0, 0, title);
|
||||
|
||||
mssgWindow = PortabilityLayer::WindowManager::GetInstance()->CreateWindow(wdef);
|
||||
|
||||
if (mssgWindow != nil)
|
||||
{
|
||||
ShowWindow(mssgWindow);
|
||||
@@ -155,9 +156,7 @@ void SetMessageWindowMessage (StringPtr message)
|
||||
|
||||
void CloseMessageWindow (void)
|
||||
{
|
||||
if (mssgWindow != nil)
|
||||
DisposeWindow(mssgWindow);
|
||||
mssgWindow = nil;
|
||||
CloseThisWindow(&mssgWindow);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- CloseThisWindow
|
||||
@@ -168,7 +167,7 @@ void CloseMessageWindow (void)
|
||||
void CloseThisWindow (WindowPtr *theWindow)
|
||||
{
|
||||
if (*theWindow != nil)
|
||||
DisposeWindow(*theWindow);
|
||||
PortabilityLayer::WindowManager::GetInstance()->DestroyWindow(*theWindow);
|
||||
*theWindow = nil;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user