Merge branch 'master' into mac

# Conflicts:
#	GpApp/House.cpp
This commit is contained in:
Madthijs
2021-05-14 21:44:39 +02:00
35 changed files with 541 additions and 531 deletions

View File

@@ -214,7 +214,7 @@ Boolean InitializeEmptyHouse (void)
if (thisHouse != nil)
thisHouse.Dispose();
const size_t houseSizeNoRooms = sizeof(sizeof(houseType) - sizeof(roomType));
const size_t houseSizeNoRooms = sizeof(houseType) - sizeof(roomType);
thisHouse = NewHandle(houseSizeNoRooms).StaticCast<houseType>();
if (thisHouse == nil)
@@ -224,6 +224,7 @@ Boolean InitializeEmptyHouse (void)
}
thisHousePtr = *thisHouse;
memset(thisHousePtr, 0, houseSizeNoRooms);
thisHousePtr->version = kHouseVersion;
thisHousePtr->firstRoom = -1;
@@ -264,8 +265,8 @@ Boolean InitializeEmptyHouseInEditor (void)
UpdateMenus(false);
ReflectCurrentRoom(true);
return (true);
return (true);
}
#endif

View File

@@ -171,6 +171,8 @@ Boolean CreateNewRoom (short h, short v)
char wasState;
CopyThisRoomToRoom(); // save off current room
memset(thisRoom, 0, sizeof(roomType));
PasStringCopy(PSTR("Untitled Room"), thisRoom->name);
thisRoom->leftStart = 32; // fill out fields of new room

View File

@@ -182,6 +182,8 @@ void CreatePointers (void)
thisRoom = (roomPtr)NewPtr(sizeof(roomType));
if (thisRoom == nil)
RedAlert(kErrNoMemory);
memset(thisRoom, 0, sizeof(roomType));
hotSpots = nil;
hotSpots = (hotPtr)NewPtr(sizeof(hotObject) * kMaxHotSpots);