mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-22 23:18:01 +03:00
VSFile: Support relative paths from the game directory
Relative paths are used in Pastel Chime 3.
This commit is contained in:
+1
-11
@@ -80,19 +80,9 @@ static bool vsf_write_type(enum vsf_valuetype type)
|
||||
return vsf_write(&b, 1);
|
||||
}
|
||||
|
||||
static char *process_filename(struct string *filename)
|
||||
{
|
||||
char *u = sjis2utf(filename->text, filename->size);
|
||||
for (int i = 0; u[i]; i++) {
|
||||
if (u[i] == '\\')
|
||||
u[i] = '/';
|
||||
}
|
||||
return u;
|
||||
}
|
||||
|
||||
static bool vsfile_open(struct string *filename, bool read)
|
||||
{
|
||||
char *u = process_filename(filename);
|
||||
char *u = gamedir_path(filename->text);
|
||||
if (vs_file) {
|
||||
WARNING("VSFile is already opened");
|
||||
fclose(vs_file);
|
||||
|
||||
Reference in New Issue
Block a user