Compare commits

...

6 Commits

Author SHA1 Message Date
elasota
2fe1ea2ee7 Fix objects being draggable when there is no room 2021-03-08 21:59:11 -05:00
elasota
0931f25f23 Fix wrong house sort order 2021-03-08 21:58:46 -05:00
elasota
7f4d782c0d Fix room count mismatch 2021-03-08 21:58:34 -05:00
elasota
f2cda23b0f Bump version to 1.0.15 2021-03-08 19:08:12 -05:00
elasota
6292705968 Fix insensitive compare not working properly with strings of different length 2021-03-08 19:07:31 -05:00
elasota
6931b3f505 EOL fix 2021-03-08 19:07:06 -05:00
8 changed files with 26 additions and 20 deletions

View File

@@ -15,8 +15,8 @@ android {
}
minSdkVersion 16
targetSdkVersion 29
versionCode 10
versionName "1.0.14"
versionCode 11
versionName "1.0.15"
externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=android-16"

View File

@@ -117,7 +117,7 @@ Boolean CreateNewHouse (void)
theSpec.m_name[0] = static_cast<uint8_t>(savePathLength);
memcpy(theSpec.m_name + 1, savePath, savePathLength);
// Don't try to overwrite the current house - The GPF will probably be locked anyway
// Don't try to overwrite the current house
if (houseCFile && theSpec.m_dir == houseCFile->GetDirectory() && !StrCmp::CompareCaseInsensitive(theSpec.m_name, houseCFile->GetFileName()))
{
CheckFileError(PLErrors::kFileIsBusy, theSpec.m_name);
@@ -173,7 +173,7 @@ Boolean InitializeEmptyHouse (void)
if (thisHouse != nil)
thisHouse.Dispose();
thisHouse = NewHandle(sizeof(houseType)).StaticCast<houseType>();
thisHouse = NewHandle(sizeof(houseType) - sizeof(roomType)).StaticCast<houseType>();
if (thisHouse == nil)
{

View File

@@ -616,7 +616,7 @@ void ValidateNumberOfRooms (void)
reportsRooms = (long)(*thisHouse)->nRooms;
countedRooms = (GetHandleSize(thisHouse.StaticCast<void>()) -
sizeof(houseType)) / sizeof(roomType);
sizeof(houseType)) / sizeof(roomType) + 1;
if (reportsRooms != countedRooms)
{
(*thisHouse)->nRooms = (short)countedRooms;

View File

@@ -1963,6 +1963,12 @@ void GetThisRoomsObjRects (void)
if ((noRoomAtAll) || (!houseUnlocked))
{
// clear object handles so they're not draggable
QSetRect(&leftStartGliderDest, 0, 0, 0, 0);
QSetRect(&rightStartGliderDest, 0, 0, 0, 0);
for (i = 0; i < kMaxRoomObs; i++)
QSetRect(&roomObjectRects[i], 0, 0, 0, 0);
return;
}
else

View File

@@ -70,9 +70,9 @@ short WhichStringFirst (StringPtr p1, StringPtr p2)
{
if (!foundIt)
{
if (p1[0] < p2[0]) // shortest string wins
if (p1[0] > p2[0]) // shortest string wins
greater = 1;
else if (p1[0] > p2[0])
else if (p1[0] < p2[0])
greater = 2;
}
foundIt = true;

View File

@@ -2,8 +2,8 @@
#define GP_BUILD_VERSION_MAJOR 1
#define GP_BUILD_VERSION_MINOR 0
#define GP_BUILD_VERSION_UPDATE 14
#define GP_BUILD_VERSION_UPDATE 15
#define GP_APPLICATION_VERSION_STRING "1.0.14"
#define GP_APPLICATION_VERSION_STRING "1.0.15"
#define GP_APPLICATION_COPYRIGHT_STRING "2019-2021 Eric Lasota"
#define GP_APPLICATION_WEBSITE_STRING "https://github.com/elasota/Aerofoil"

View File

@@ -47,7 +47,7 @@ namespace StrCmp
const uint8_t *chars2 = string2.UChars();
const size_t len1 = string1.Length();
const size_t len2 = string1.Length();
const size_t len2 = string2.Length();
const size_t shorterLen = std::min(len1, len2);

View File

@@ -1,20 +1,20 @@
#pragma once
#include "PLCore.h"
#include "PLPasStr.h"
#pragma once
#include "PLCore.h"
#include "PLPasStr.h"
namespace StrCmp
{
{
int CompareCaseInsensitive(const PLPasStr &string1, const PLPasStr &string2);
int Compare(const PLPasStr &string1, const PLPasStr &string2);
inline bool EqualCaseInsensitive(const PLPasStr &string1, const PLPasStr &string2)
{
return CompareCaseInsensitive(string1, string2) == 0;
{
return CompareCaseInsensitive(string1, string2) == 0;
}
inline bool Equal(const PLPasStr &string1, const PLPasStr &string2)
{
return Compare(string1, string2) == 0;
}
{
return Compare(string1, string2) == 0;
}
}