Refactoring, clean up shutdown path

This commit is contained in:
elasota
2019-12-31 05:20:07 -05:00
parent 62438ab4f3
commit d9b5dd20d6
16 changed files with 123 additions and 86 deletions

View File

@@ -178,7 +178,7 @@ Boolean OpenHouse (void)
return(false);
#ifdef COMPILEDEMO
if (!EqualString(theHousesSpecs[thisHouseIndex].name, "\pDemo House", false, true))
if (!StrCmp::EqualCaseInsensitive(theHousesSpecs[thisHouseIndex].name, "\pDemo House"))
return (false);
#endif
@@ -216,7 +216,7 @@ Boolean OpenSpecificHouse (const VFileSpec &specs)
for (i = 0; i < housesFound; i++)
{
if ((theHousesSpecs[i].m_dir == specs.m_dir) &&
(EqualString(theHousesSpecs[i].m_name, specs.m_name, false, true)))
(StrCmp::EqualCaseInsensitive(theHousesSpecs[i].m_name, specs.m_name)))
{
thisHouseIndex = i;
PasStringCopy(theHousesSpecs[thisHouseIndex].m_name, thisHouseName);

View File

@@ -805,7 +805,7 @@ void CountUntitledRooms (void)
for (i = 0; i < numRooms; i++)
{
if (((*thisHouse)->rooms[i].suite != kRoomIsEmpty) &&
(EqualString((*thisHouse)->rooms[i].name, PSTR("Untitled Room"), false, true)))
(StrCmp::EqualCaseInsensitive((*thisHouse)->rooms[i].name, PSTR("Untitled Room"))))
houseErrors++;
}
}

View File

@@ -226,7 +226,7 @@ return false; // TEMP fix this iwth NavServices
HLock((Handle)thisHouse);
thisHousePtr = *thisHouse;
if (!EqualString(savedGame->house.name, thisHouseName, true, true))
if (!StrCmp::Equal(savedGame->house.name, thisHouseName))
{
SavedGameMismatchError(savedGame->house.name);
HSetState((Handle)thisHouse, wasState);

View File

@@ -533,7 +533,7 @@ void SortHouseList (void)
h = i + 1;
while (h < housesFound)
{
if ((EqualString(theHousesSpecs[i].m_name, theHousesSpecs[h].m_name, true, true)) &&
if ((StrCmp::Equal(theHousesSpecs[i].m_name, theHousesSpecs[h].m_name)) &&
(theHousesSpecs[i].m_dir == theHousesSpecs[i].m_dir))
{
theHousesSpecs[h] = theHousesSpecs[housesFound - 1];
@@ -616,7 +616,7 @@ void DoDirSearch (void)
thisHouseIndex = 0;
for (i = 0; i < housesFound; i++)
{
if (EqualString(theHousesSpecs[i].m_name, thisHouseName, false, true))
if (StrCmp::Equal(theHousesSpecs[i].m_name, thisHouseName))
{
thisHouseIndex = i;
break;
@@ -627,7 +627,7 @@ void DoDirSearch (void)
demoHouseIndex = -1;
for (i = 0; i < housesFound; i++)
{
if (EqualString(theHousesSpecs[i].m_name, PSTR("Demo House"), false, true))
if (StrCmp::Equal(theHousesSpecs[i].m_name, PSTR("Demo House")))
{
demoHouseIndex = i;
break;