mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-10-19 03:32:41 +00:00
text saves now utilize the save path
This commit is contained in:
parent
f1393a4431
commit
e9f0519bc4
1 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
||||||
#include "course_table.h"
|
#include "course_table.h"
|
||||||
#include "pc/ini.h"
|
#include "pc/ini.h"
|
||||||
|
|
||||||
#define FILENAME_FORMAT "save_file_%d.sav"
|
#define FILENAME_FORMAT "%s/save_file_%d.sav"
|
||||||
#define NUM_COURSES 15
|
#define NUM_COURSES 15
|
||||||
#define NUM_BONUS_COURSES 10
|
#define NUM_BONUS_COURSES 10
|
||||||
#define NUM_FLAGS 21
|
#define NUM_FLAGS 21
|
||||||
|
@ -87,7 +87,7 @@ static s32 write_text_save(s32 fileIndex) {
|
||||||
u32 i, bit, flags, coins, stars, starFlags;
|
u32 i, bit, flags, coins, stars, starFlags;
|
||||||
|
|
||||||
/* Define savefile's name */
|
/* Define savefile's name */
|
||||||
if (sprintf(filename, FILENAME_FORMAT, fileIndex) < 0)
|
if (sprintf(filename, FILENAME_FORMAT, sys_save_path(), fileIndex) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
file = fopen(filename, "wt");
|
file = fopen(filename, "wt");
|
||||||
|
@ -212,7 +212,7 @@ static s32 read_text_save(s32 fileIndex) {
|
||||||
u32 capArea;
|
u32 capArea;
|
||||||
|
|
||||||
/* Define savefile's name */
|
/* Define savefile's name */
|
||||||
if (sprintf(filename, FILENAME_FORMAT, fileIndex) < 0)
|
if (sprintf(filename, FILENAME_FORMAT, sys_save_path(), fileIndex) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* Try to open the file */
|
/* Try to open the file */
|
||||||
|
|
Loading…
Reference in a new issue