diff options
author | Cameron Katri <me@cameronkatri.com> | 2021-02-17 14:05:02 -0500 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-02-22 09:20:17 -0500 |
commit | 08eca96e71d96ad1f8e9b888875ab5570f208d19 (patch) | |
tree | 9cace520fa50d9ef5bb77c2d7ebdde40e6b40f7f /tetris/scores.c | |
parent | 3f650c87c6ee6692ad6a558bb03ccf3364fe794a (diff) | |
download | bsdgames-darwin-08eca96e71d96ad1f8e9b888875ab5570f208d19.tar.gz bsdgames-darwin-08eca96e71d96ad1f8e9b888875ab5570f208d19.tar.zst bsdgames-darwin-08eca96e71d96ad1f8e9b888875ab5570f208d19.zip |
Get all the games compiling for iOS
Diffstat (limited to 'tetris/scores.c')
-rw-r--r-- | tetris/scores.c | 12 |
1 files changed, 7 insertions, 5 deletions
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 <libkern/OSByteOrder.h> + /* * 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; } |