mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-29 02:18:09 +03:00
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:
+3
-3
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user