summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/FileMgr.cpp4
-rw-r--r--src/FileMgr.h2
-rw-r--r--src/main.cpp5
-rw-r--r--src/re3.cpp2
4 files changed, 5 insertions, 8 deletions
diff --git a/src/FileMgr.cpp b/src/FileMgr.cpp
index d4e0b89b..954fcdef 100644
--- a/src/FileMgr.cpp
+++ b/src/FileMgr.cpp
@@ -265,10 +265,10 @@ CFileMgr::Seek(int fd, int offset, int whence)
return !!myfseek(fd, offset, whence);
}
-char*
+bool
CFileMgr::ReadLine(int fd, char *buf, int len)
{
- return myfgets(buf, len, fd);
+ return myfgets(buf, len, fd) != nil;
}
int
diff --git a/src/FileMgr.h b/src/FileMgr.h
index f67056f1..bab86e38 100644
--- a/src/FileMgr.h
+++ b/src/FileMgr.h
@@ -15,7 +15,7 @@ public:
static int Read(int fd, char *buf, int len);
static int Write(int fd, char *buf, int len);
static bool Seek(int fd, int offset, int whence);
- static char *ReadLine(int fd, char *buf, int len);
+ static bool ReadLine(int fd, char *buf, int len);
static int CloseFile(int fd);
static int GetErrorReadWrite(int fd);
};
diff --git a/src/main.cpp b/src/main.cpp
index 7b7c28e4..8835bee9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -90,17 +90,12 @@ void PrintGameVersion();
RwRGBA gColourTop;
-#ifndef DEBUG
-// This is the weirdest shit. In Debug this causes my game to crash in CPed::IsPedInControl shortly after level change
void
InitialiseGame(void)
{
LoadingScreen(nil, nil, "loadsc0");
CGame::Initialise("DATA\\GTA3.DAT");
}
-#else
-WRAPPER void InitialiseGame(void) { EAXJMP(0x48E7E0); }
-#endif
void
Idle(void *arg)
diff --git a/src/re3.cpp b/src/re3.cpp
index ec4f4439..4bdb5469 100644
--- a/src/re3.cpp
+++ b/src/re3.cpp
@@ -344,6 +344,8 @@ patch()
Patch<float>(0x46BC61+6, 1.0f); // car distance
InjectHook(0x59E460, printf, PATCH_JUMP);
+ InjectHook(0x475E00, printf, PATCH_JUMP); // _Error
+
// stolen from silentpatch (sorry)
Patch<WORD>(0x5382BF, 0x0EEB);