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 -2
View File
@@ -5,8 +5,9 @@
*/
#include "ags.h"
#include "../fileio.h"
void AGS::load_bmp(const char *file_path)
void AGS::load_bmp(const char* file_name)
{
// ヘッダ取得
int sx = 0, sy = 0;
@@ -23,7 +24,7 @@ void AGS::load_bmp(const char *file_path)
#if 0
// BMP読み込み
WCHAR wszFilePath[_MAX_PATH];
MultiByteToWideChar(CP_ACP, 0, file_path, -1, wszFilePath, _MAX_PATH);
MultiByteToWideChar(CP_ACP, 0, FILEIO::GetFilePath(file_name), -1, wszFilePath, _MAX_PATH);
Gdiplus::Bitmap *pBitmap = Gdiplus::Bitmap::FromFile(wszFilePath);
for(unsigned int y = 0; y < pBitmap->GetHeight(); y++) {
for(unsigned int x = 0; x < pBitmap->GetWidth(); x++) {