From 08eca96e71d96ad1f8e9b888875ab5570f208d19 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Wed, 17 Feb 2021 14:05:02 -0500 Subject: Get all the games compiling for iOS --- tetris/scores.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tetris/scores.c') diff --git a/tetris/scores.c b/tetris/scores.c index 1335df7b..dc791612 100644 --- a/tetris/scores.c +++ b/tetris/scores.c @@ -58,6 +58,8 @@ #include "scores.h" #include "tetris.h" +#include + /* * Allow updating the high scores unless we're built as part of /rescue. */ @@ -220,9 +222,9 @@ scorefile_probe(int sd) } /* None was a valid level; try opposite endian */ - offset64 = bswap32(offset64); - offset60 = bswap32(offset60); - offset56 = bswap32(offset56); + offset64 = OSSwapInt32(offset64); + offset60 = OSSwapInt32(offset60); + offset56 = OSSwapInt32(offset56); if (offset64 >= MINLEVEL && offset64 <= MAXLEVEL) { /* 40-byte structure */ @@ -267,7 +269,7 @@ static int32_t read32(int32_t val, int doflip) { if (doflip) { - val = bswap32(val); + val = OSSwapInt32(val); } return val; } @@ -276,7 +278,7 @@ static int64_t read64(int64_t val, int doflip) { if (doflip) { - val = bswap64(val); + val = OSSwapInt64(val); } return val; } -- cgit v1.2.3-56-ge451