summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkipcode66 <egamer1010@gmail.com>2021-05-17 19:44:33 -0400
committerkipcode66 <egamer1010@gmail.com>2021-05-17 19:56:26 -0400
commit1d3365e64a67d82b16231df36eda469dd0b32bb9 (patch)
treef9ca163d20db0a9e109ca30ad679ca2adb3a24c4
parentb00815edfecf4db501ad2b8ac559f5f4b484d7fa (diff)
added unstaged edits
-rw-r--r--src/card.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/card.c b/src/card.c
index 616e433..9c0b4ff 100644
--- a/src/card.c
+++ b/src/card.c
@@ -6,6 +6,7 @@
// the linker link them against the ones already in the game's code.
int32_t memcmp(const void* str1, const void* str2, size_t n);
int32_t strcmp(const char* str1, const char* str2);
+int32_t strncmp(const char* str1, const char* str2, size_t n);
void* memset(void* dst, int val, size_t n);
// +=-=-=-=-=-=-=-=-=-=-=+
@@ -64,11 +65,6 @@ int32_t __CARDGetFileNo(void* card, const char* fileName, int32_t* fileNo) {
return NoCard;
}
- uint8_t* cardDiskGameCode = *(uint8_t**)(((uint32_t)card) + 0x10C);
- if (!cardDiskGameCode) {
- return FatalError;
- }
-
uint32_t dirBlock = (uint32_t)(__CARDGetDirBlock(card));
int32_t i;
@@ -78,7 +74,7 @@ int32_t __CARDGetFileNo(void* card, const char* fileName, int32_t* fileNo) {
const char* currentFileName = (const char*)(&currentDirBlock[0x8]);
if (strncmp(fileName, currentFileName, 32) == 0) {
- if (__CARDAccess(card, currentDirBlock) >= CARD_RESULT_READY) {
+ if (__CARDAccess(card, currentDirBlock) >= Ready) {
*fileNo = i;
break;
}