From 75b09a819a7dbb51d42aacd31ecc85a5c233d8a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Na=C5=9Bciszewski?= Date: Tue, 15 Dec 2020 02:37:00 +0100 Subject: Finish translating code_800AAA0 to C! --- src/file_system.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src') diff --git a/src/file_system.c b/src/file_system.c index b2aad05..cd1bf83 100644 --- a/src/file_system.c +++ b/src/file_system.c @@ -1632,3 +1632,28 @@ void DecompressAT_Finish(void) { if (gDecompressBufferByteInInt) *gDecompressBufferPtr = gDecompressBufferCurrent; } + +// 800B294 +bool32 IsATxPCompressed_unused(char *data) { + if ((data[0] == 'A' && data[1] == 'T' && data[2] == '4' && data[3] == 'P')) return TRUE; + if ((data[0] == 'A' && data[1] == 'T' && data[2] == '3' && data[3] == 'P')) return TRUE; + return FALSE; +} + +// 800B2D4 +bool32 sub_800B2D4(char *arg0, char *arg1, int length) { + int i; + char a, b; + for (i = 0; i < length; i++) { + a = arg0[i]; + b = arg1[i]; + // convert to lowercase + if ('A' <= a && a <= 'Z') a += 0x20; + if ('A' <= b && b <= 'Z') b += 0x20; + if (a != b) + return TRUE; + if (a == '\0') + break; + } + return FALSE; +} -- cgit v1.2.3