Merge upstream changes: Merge FILEIO changes

FILEIO has been updated to resolve relative paths inside FILEIO::Fopen(),
which has been already done in System3-sdl2.

FILEIO::Fgets() now uses a length param.

Callsites for these functions are also updated to reduce the diff from
upstream.
This commit is contained in:
kichikuou
2020-05-22 12:04:36 +09:00
parent 131707f9d8
commit e8d254328a
11 changed files with 73 additions and 71 deletions
+3 -3
View File
@@ -27,16 +27,16 @@ NACT::NACT(int sys_ver, uint32 crc32, const char* font_file, const char* playlis
if(fio->Fopen("AG00.DAT", FILEIO_READ_BINARY)) {
int d0, d1, d2, d3;
char string[MAX_CAPTION];
fio->Fgets(string);
fio->Fgets(string, MAX_CAPTION);
sscanf_s(string, "%d,%d,%d,%d", &d0, &d1, &d2, &d3);
for(int i = 0; i < d1; i++) {
// 動詞の読み込み
fio->Fgets(string);
fio->Fgets(string, MAX_CAPTION);
memcpy(caption_verb[i], string, sizeof(string));
}
for(int i = 0; i < d2; i++) {
// 目的語の読み込み
fio->Fgets(string);
fio->Fgets(string, MAX_CAPTION);
memcpy(caption_obj[i], string, sizeof(string));
}
fio->Fclose();