mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-15 20:42:44 +00:00
Web file system implementation + fixes
This commit is contained in:
@@ -602,6 +602,7 @@ Boolean ReadHouse (GpIOStream *houseStream)
|
||||
ByteSwapHouse(*thisHouse, static_cast<size_t>(byteCount), false);
|
||||
|
||||
numberRooms = (*thisHouse)->nRooms;
|
||||
|
||||
#ifdef COMPILEDEMO
|
||||
if (numberRooms != 45)
|
||||
return (false);
|
||||
@@ -685,7 +686,7 @@ Boolean WriteHouse (Boolean checkIt)
|
||||
}
|
||||
|
||||
GpIOStream *houseStream = nil;
|
||||
theErr = houseCFile->OpenData(PortabilityLayer::EFilePermission_Write, GpFileCreationDispositions::kCreateOrOpen, houseStream);
|
||||
theErr = houseCFile->OpenData(PortabilityLayer::EFilePermission_Write, GpFileCreationDispositions::kCreateOrOverwrite, houseStream);
|
||||
if (theErr != PLErrors::kNone)
|
||||
return (false);
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "PLNumberFormatting.h"
|
||||
#include "PLStringCompare.h"
|
||||
#include "PLStandardColors.h"
|
||||
#include "PLSysCalls.h"
|
||||
#include "Externs.h"
|
||||
#include "ObjectEdit.h"
|
||||
#include "PLStandardColors.h"
|
||||
@@ -874,6 +875,7 @@ void KeepAllObjectsLegal (void)
|
||||
GetLocalizedString(19, message);
|
||||
SetMessageWindowMessage(message, StdColors::Red());
|
||||
houseErrors++;
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(60);
|
||||
}
|
||||
}
|
||||
@@ -908,6 +910,7 @@ void CheckForStaircasePairs (void)
|
||||
{
|
||||
GetLocalizedString(20, message);
|
||||
SetMessageWindowMessage(message, StdColors::Red());
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(60);
|
||||
}
|
||||
else
|
||||
@@ -923,6 +926,7 @@ void CheckForStaircasePairs (void)
|
||||
{
|
||||
GetLocalizedString(21, message);
|
||||
SetMessageWindowMessage(message, StdColors::Red());
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(60);
|
||||
}
|
||||
}
|
||||
@@ -935,6 +939,7 @@ void CheckForStaircasePairs (void)
|
||||
{
|
||||
GetLocalizedString(22, message);
|
||||
SetMessageWindowMessage(message, StdColors::Red());
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(60);
|
||||
}
|
||||
else
|
||||
@@ -950,6 +955,7 @@ void CheckForStaircasePairs (void)
|
||||
{
|
||||
GetLocalizedString(23, message);
|
||||
SetMessageWindowMessage(message, StdColors::Red());
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(60);
|
||||
}
|
||||
}
|
||||
@@ -992,6 +998,7 @@ void CheckHouseForProblems (void)
|
||||
{
|
||||
GetLocalizedString(27, message);
|
||||
SetMessageWindowMessage(message, StdColors::Black());
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(60);
|
||||
houseErrors = 0;
|
||||
}
|
||||
@@ -1008,6 +1015,7 @@ void CheckHouseForProblems (void)
|
||||
GetLocalizedString(28, message2);
|
||||
PasStringConcat(message, message2);
|
||||
SetMessageWindowMessage(message, StdColors::Red());
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(45);
|
||||
}
|
||||
}
|
||||
@@ -1027,6 +1035,7 @@ void CheckHouseForProblems (void)
|
||||
GetLocalizedString(29, message2);
|
||||
PasStringConcat(message, message2);
|
||||
SetMessageWindowMessage(message, StdColors::Red());
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(60);
|
||||
}
|
||||
}
|
||||
@@ -1042,6 +1051,7 @@ void CheckHouseForProblems (void)
|
||||
GetLocalizedString(30, message2);
|
||||
PasStringConcat(message, message2);
|
||||
SetMessageWindowMessage(message, StdColors::Blue());
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(45);
|
||||
}
|
||||
}
|
||||
@@ -1057,6 +1067,7 @@ void CheckHouseForProblems (void)
|
||||
GetLocalizedString(31, message2);
|
||||
PasStringConcat(message, message2);
|
||||
SetMessageWindowMessage(message, StdColors::Blue());
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(45);
|
||||
}
|
||||
}
|
||||
@@ -1072,6 +1083,7 @@ void CheckHouseForProblems (void)
|
||||
GetLocalizedString(32, message2);
|
||||
PasStringConcat(message, message2);
|
||||
SetMessageWindowMessage(message, StdColors::Red());
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(60);
|
||||
}
|
||||
}
|
||||
@@ -1089,6 +1101,7 @@ void CheckHouseForProblems (void)
|
||||
GetLocalizedString(34, message2);
|
||||
PasStringConcat(message, message2);
|
||||
SetMessageWindowMessage(message, StdColors::Red());
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(60);
|
||||
}
|
||||
}
|
||||
@@ -1107,6 +1120,7 @@ void CheckHouseForProblems (void)
|
||||
{
|
||||
GetLocalizedString(35, message);
|
||||
SetMessageWindowMessage(message, StdColors::Red());
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
DelayTicks(60);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ void DragOutMarqueeRect (Window *window, Point start, Rect *theRect)
|
||||
surface->InvertFrameRect(*theRect, pattern);
|
||||
wasPt = start;
|
||||
|
||||
while (WaitMouseUp())
|
||||
while (WaitMouseUp_DisarmAsyncify())
|
||||
{
|
||||
GetMouse(window, &newPt);
|
||||
if (wasPt != newPt)
|
||||
@@ -238,7 +238,7 @@ void DragMarqueeRect (Window *window, DrawSurface *surface, Point start, Rect *t
|
||||
surface->InvertFrameRect(theMarquee.bounds, pattern);
|
||||
|
||||
wasPt = start;
|
||||
while (WaitMouseUp())
|
||||
while (WaitMouseUp_DisarmAsyncify())
|
||||
{
|
||||
GetMouse(window, &newPt);
|
||||
if (wasPt != newPt)
|
||||
@@ -283,7 +283,7 @@ void DragMarqueeHandle (Window *window, DrawSurface *surface, Point start, short
|
||||
surface->InvertFillRect(theMarquee.handle, pattern);
|
||||
|
||||
wasPt = start;
|
||||
while (WaitMouseUp())
|
||||
while (WaitMouseUp_DisarmAsyncify())
|
||||
{
|
||||
GetMouse(window, &newPt);
|
||||
if (wasPt != newPt)
|
||||
@@ -365,7 +365,7 @@ void DragMarqueeCorner (Window *window, DrawSurface *surface, Point start, short
|
||||
surface->InvertFillRect(theMarquee.handle, pattern);
|
||||
|
||||
wasPt = start;
|
||||
while (WaitMouseUp())
|
||||
while (WaitMouseUp_DisarmAsyncify())
|
||||
{
|
||||
GetMouse(window, &newPt);
|
||||
if (wasPt != newPt)
|
||||
|
||||
@@ -153,9 +153,9 @@ void DragMiniTile (Window *window, DrawSurface *surface, Point mouseIs, short *n
|
||||
surface->InvertFrameRect(dragRect, pattern);
|
||||
|
||||
mouseWas = mouseIs;
|
||||
while (WaitMouseUp()) // loop until mouse button let up
|
||||
while (WaitMouseUp_DisarmAsyncify()) // loop until mouse button let up
|
||||
{
|
||||
GetMouse(window, &mouseIs); // get mouse coords
|
||||
GetMouse(window, &mouseIs); // get mouse coords
|
||||
if (mouseWas != mouseIs) // the mouse has moved
|
||||
{
|
||||
surface->InvertFrameRect(dragRect, pattern);
|
||||
|
||||
Reference in New Issue
Block a user