Restore the Windows-style path separators
This commit is contained in:
parent
e3eb16af0a
commit
42e1b36fd8
11 changed files with 25 additions and 25 deletions
|
@ -25,7 +25,7 @@ BOOL InitBack(const char *fName, int type)
|
|||
|
||||
// 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)
|
||||
|
|
|
@ -17,7 +17,7 @@ BOOL LoadConfigData(CONFIG *conf)
|
|||
|
||||
// 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");
|
||||
|
|
|
@ -190,7 +190,7 @@ BOOL StartCreditScript()
|
|||
|
||||
// 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)
|
||||
|
|
|
@ -689,7 +689,7 @@ BOOL Game(HWND hWnd)
|
|||
PlaySoundObject(7, -1);
|
||||
|
||||
char path[MAX_PATH];
|
||||
sprintf(path, "%s/npc.tbl", gDataPath);
|
||||
sprintf(path, "%s\\npc.tbl", gDataPath);
|
||||
|
||||
if (!LoadNpcTable(path))
|
||||
{
|
||||
|
|
|
@ -174,9 +174,9 @@ BOOL LoadGenericData()
|
|||
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;
|
||||
|
|
|
@ -30,7 +30,7 @@ BOOL LoadMapData2(const char *path_map)
|
|||
|
||||
// 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 @@ BOOL LoadAttributeData(const char *path_atrb)
|
|||
{
|
||||
// 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)
|
||||
|
|
|
@ -443,7 +443,7 @@ BOOL SaveTimeCounter()
|
|||
|
||||
// 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 @@ int LoadTimeCounter()
|
|||
|
||||
// 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)
|
||||
|
|
|
@ -59,7 +59,7 @@ BOOL LoadEvent(const char *path_event)
|
|||
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)
|
||||
|
|
|
@ -27,7 +27,7 @@ const char *gProfileCode = "Do041220";
|
|||
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 @@ BOOL SaveProfile(const char *name)
|
|||
|
||||
// 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 @@ BOOL LoadProfile(const char *name)
|
|||
if (name)
|
||||
sprintf(path, "%s", name);
|
||||
else
|
||||
sprintf(path, "%s/%s", gModulePath, gDefaultName);
|
||||
sprintf(path, "%s\\%s", gModulePath, gDefaultName);
|
||||
|
||||
// Open file
|
||||
PROFILE profile;
|
||||
|
|
|
@ -139,26 +139,26 @@ BOOL TransferStage(int no, int w, int x, int y)
|
|||
|
||||
//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 @@ BOOL TransferStage(int no, int w, int x, int y)
|
|||
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;
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ BOOL LoadTextScript2(const char *name)
|
|||
{
|
||||
//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 @@ BOOL LoadTextScript_Stage(const char *name)
|
|||
{
|
||||
//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 @@ BOOL LoadTextScript_Stage(const char *name)
|
|||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue