From 40273bdba148069963be2717d0a53e89f3bf872c Mon Sep 17 00:00:00 2001 From: Raf <> Date: Sun, 4 Aug 2024 18:37:01 +0800 Subject: [PATCH] portx64: romdata: check for PLATFORM_64BIT inside romdataGetEstimatedFileSize() --- port/src/romdata.c | 4 +++- src/game/file.c | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/port/src/romdata.c b/port/src/romdata.c index b17c6f54b..92cda2416 100644 --- a/port/src/romdata.c +++ b/port/src/romdata.c @@ -548,6 +548,7 @@ u32 romdataSegGetSize(const char *segName) u32 romdataGetEstimatedFileSize(u32 size, FileType filetype) { +#ifdef PLATFORM_64BIT switch (filetype) { case FT_BG: return (u32)(size * 1.1); case FT_TILES: return (u32)(size * 1.1); @@ -557,7 +558,8 @@ u32 romdataGetEstimatedFileSize(u32 size, FileType filetype) case FT_MODEL: return (u32)(size * 1.7); default: sysLogPrintf(LOG_WARNING, "wrong file type in romdataGetEstimatedFileSize: %d", filetype); - return size; } +#endif + return size; } diff --git a/src/game/file.c b/src/game/file.c index 35cec4df3..79ebd40ce 100644 --- a/src/game/file.c +++ b/src/game/file.c @@ -4283,11 +4283,7 @@ u32 fileGetInflatedSize(s32 filenum, FileType filetype) } if (rzipIs1173(ptr)) { -#ifdef PLATFORM_N64 - return (ptr[2] << 16) | (ptr[3] << 8) | ptr[4]; -#else return romdataGetEstimatedFileSize((ptr[2] << 16) | (ptr[3] << 8) | ptr[4], filetype); -#endif } #if VERSION < VERSION_NTSC_1_0