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
+6 -8
View File
@@ -8,21 +8,19 @@
#include "dri.h"
#include "crc32.h"
extern char g_root[_MAX_PATH];
void AGS::load_cg(int page, int transparent)
{
if (nact->sys_ver == 3) {
// あゆみちゃん物語 フルカラー実写版
if(strncmp(acg, "CGA000.BMP", 10) == 0) {
char file_path[_MAX_PATH];
sprintf_s(file_path, _MAX_PATH, "%sCGA%03d.BMP", g_root, page);
load_bmp(file_path);
char file_name[_MAX_PATH];
sprintf_s(file_name, _MAX_PATH, "CGA%03d.BMP", page);
load_bmp(file_name);
return;
} else if(strncmp(acg, "CGB000.BMP", 10) == 0) {
char file_path[_MAX_PATH];
sprintf_s(file_path, _MAX_PATH, "%sCGB%03d.BMP", g_root, page);
load_bmp(file_path);
char file_name[_MAX_PATH];
sprintf_s(file_name, _MAX_PATH, "CGB%03d.BMP", page);
load_bmp(file_name);
return;
}
}