ref: 42e1b36fd8da124d245d7a2ab644984fb5c88832
parent: e3eb16af0a53094ab44f8d403316e40f94b5477f
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Sep 5 10:05:27 EDT 2019
Restore the Windows-style path separators
--- a/src/Back.cpp
+++ b/src/Back.cpp
@@ -25,7 +25,7 @@
// Get width and height
char path[MAX_PATH];
- sprintf(path, "%s/%s.pbm", gDataPath, fName);
+ sprintf(path, "%s\\%s.pbm", gDataPath, fName);
FILE *fp = fopen(path, "rb");
if (fp == NULL)
--- a/src/Config.cpp
+++ b/src/Config.cpp
@@ -17,7 +17,7 @@
// Get path
char path[MAX_PATH];
- sprintf(path, "%s/%s", gModulePath, config_filename);
+ sprintf(path, "%s\\%s", gModulePath, config_filename);
// Open file
FILE *fp = fopen(path, "rb");
--- a/src/Ending.cpp
+++ b/src/Ending.cpp
@@ -190,7 +190,7 @@
// Open file
char path[MAX_PATH];
- sprintf(path, "%s/%s", gDataPath, credit_script);
+ sprintf(path, "%s\\%s", gDataPath, credit_script);
Credit.size = GetFileSizeLong(path);
if (Credit.size == -1)
--- a/src/Game.cpp
+++ b/src/Game.cpp
@@ -689,7 +689,7 @@
PlaySoundObject(7, -1);
char path[MAX_PATH];
- sprintf(path, "%s/npc.tbl", gDataPath);
+ sprintf(path, "%s\\npc.tbl", gDataPath);
if (!LoadNpcTable(path))
{
--- a/src/GenericLoad.cpp
+++ b/src/GenericLoad.cpp
@@ -174,9 +174,9 @@
bError = TRUE;
if (!MakeSurface_File("StageImage", SURFACE_ID_STAGE_ITEM))
bError = TRUE;
- if (!MakeSurface_File("Npc/NpcSym", SURFACE_ID_NPC_SYM))
+ if (!MakeSurface_File("Npc\\NpcSym", SURFACE_ID_NPC_SYM))
bError = TRUE;
- if (!MakeSurface_File("Npc/NpcRegu", SURFACE_ID_NPC_REGU))
+ if (!MakeSurface_File("Npc\\NpcRegu", SURFACE_ID_NPC_REGU))
bError = TRUE;
if (!MakeSurface_File("TextBox", SURFACE_ID_TEXT_BOX))
bError = TRUE;
--- a/src/Map.cpp
+++ b/src/Map.cpp
@@ -30,7 +30,7 @@
// Get path
char path[MAX_PATH];
- sprintf(path, "%s/%s", gDataPath, path_map);
+ sprintf(path, "%s\\%s", gDataPath, path_map);
// Open file
FILE *fp = fopen(path, "rb");
@@ -75,7 +75,7 @@
{
// Open file
char path[MAX_PATH];
- sprintf(path, "%s/%s", gDataPath, path_atrb);
+ sprintf(path, "%s\\%s", gDataPath, path_atrb);
FILE *fp = fopen(path, "rb");
if (fp == NULL)
--- a/src/MycParam.cpp
+++ b/src/MycParam.cpp
@@ -443,7 +443,7 @@
// Get last time
char path[MAX_PATH];
- sprintf(path, "%s/290.rec", gModulePath);
+ sprintf(path, "%s\\290.rec", gModulePath);
FILE *fp = fopen(path, "rb");
if (fp)
@@ -492,7 +492,7 @@
// Open file
char path[MAX_PATH];
- sprintf(path, "%s/290.rec", gModulePath);
+ sprintf(path, "%s\\290.rec", gModulePath);
FILE *fp = fopen(path, "rb");
if (!fp)
--- a/src/NpChar.cpp
+++ b/src/NpChar.cpp
@@ -59,7 +59,7 @@
EVENT eve;
char path[MAX_PATH];
- sprintf(path, "%s/%s", gDataPath, path_event);
+ sprintf(path, "%s\\%s", gDataPath, path_event);
fp = fopen(path, "rb");
if (fp == NULL)
--- a/src/Profile.cpp
+++ b/src/Profile.cpp
@@ -27,7 +27,7 @@
BOOL IsProfile()
{
char path[MAX_PATH];
- sprintf(path, "%s/%s", gModulePath, gDefaultName);
+ sprintf(path, "%s\\%s", gModulePath, gDefaultName);
FILE *fp = fopen(path, "rb");
if (fp == NULL)
@@ -46,9 +46,9 @@
// Get path
if (name)
- sprintf(path, "%s/%s", gModulePath, name);
+ sprintf(path, "%s\\%s", gModulePath, name);
else
- sprintf(path, "%s/%s", gModulePath, gDefaultName);
+ sprintf(path, "%s\\%s", gModulePath, gDefaultName);
// Open file
fp = fopen(path, "wb");
@@ -93,7 +93,7 @@
if (name)
sprintf(path, "%s", name);
else
- sprintf(path, "%s/%s", gModulePath, gDefaultName);
+ sprintf(path, "%s\\%s", gModulePath, gDefaultName);
// Open file
PROFILE profile;
--- a/src/Stage.cpp
+++ b/src/Stage.cpp
@@ -139,26 +139,26 @@
//Load tileset
char path[MAX_PATH];
- sprintf(path, "%s/Prt%s", path_dir, gTMT[no].parts);
+ sprintf(path, "%s\\Prt%s", path_dir, gTMT[no].parts);
if (!ReloadBitmap_File(path, SURFACE_ID_LEVEL_TILESET))
bError = TRUE;
- sprintf(path, "%s/%s.pxa", path_dir, gTMT[no].parts);
+ sprintf(path, "%s\\%s.pxa", path_dir, gTMT[no].parts);
if (!LoadAttributeData(path))
bError = TRUE;
//Load tilemap
- sprintf(path, "%s/%s.pxm", path_dir, gTMT[no].map);
+ sprintf(path, "%s\\%s.pxm", path_dir, gTMT[no].map);
if (!LoadMapData2(path))
bError = TRUE;
//Load NPCs
- sprintf(path, "%s/%s.pxe", path_dir, gTMT[no].map);
+ sprintf(path, "%s\\%s.pxe", path_dir, gTMT[no].map);
if (!LoadEvent(path))
bError = TRUE;
//Load script
- sprintf(path, "%s/%s.tsc", path_dir, gTMT[no].map);
+ sprintf(path, "%s\\%s.tsc", path_dir, gTMT[no].map);
if (!LoadTextScript_Stage(path))
bError = TRUE;
@@ -171,11 +171,11 @@
strcpy(path_dir, "Npc");
//Load NPC sprite sheets
- sprintf(path, "%s/Npc%s", path_dir, gTMT[no].npc);
+ sprintf(path, "%s\\Npc%s", path_dir, gTMT[no].npc);
if (!ReloadBitmap_File(path, SURFACE_ID_LEVEL_SPRITESET_1))
bError = TRUE;
- sprintf(path, "%s/Npc%s", path_dir, gTMT[no].boss);
+ sprintf(path, "%s\\Npc%s", path_dir, gTMT[no].boss);
if (!ReloadBitmap_File(path, SURFACE_ID_LEVEL_SPRITESET_2))
bError = TRUE;
--- a/src/TextScr.cpp
+++ b/src/TextScr.cpp
@@ -116,7 +116,7 @@
{
//Get path
char path[260];
- sprintf(path, "%s/%s", gDataPath, name);
+ sprintf(path, "%s\\%s", gDataPath, name);
gTS.size = GetFileSizeLong(path);
if (gTS.size == -1)
@@ -145,7 +145,7 @@
{
//Open Head.tsc
char path[MAX_PATH];
- sprintf(path, "%s/%s", gDataPath, "Head.tsc");
+ sprintf(path, "%s\\%s", gDataPath, "Head.tsc");
long head_size = GetFileSizeLong(path);
if (head_size == -1)
@@ -162,7 +162,7 @@
fclose(fp);
//Open stage's .tsc
- sprintf(path, "%s/%s", gDataPath, name);
+ sprintf(path, "%s\\%s", gDataPath, name);
long body_size = GetFileSizeLong(path);
if (body_size == -1)