ref: c8e1e7aa0abd8805536678a9cd520dd6d696b50f
parent: e41d4472ec1dd7b4bd4312982ebddfc78b86f1b2
author: Clownacy <Clownacy@users.noreply.github.com>
date: Mon Aug 10 20:13:35 EDT 2020
Another authentic struct name
--- a/src/Profile.cpp
+++ b/src/Profile.cpp
@@ -40,7 +40,7 @@
BOOL SaveProfile(const char *name)
{
FILE *fp;
- PROFILE profile;
+ PROFILEDATA profile;
const char *FLAG = "FLAG";
char path[MAX_PATH];
@@ -57,7 +57,7 @@
return FALSE;
// Set up profile
- memset(&profile, 0, sizeof(PROFILE));
+ memset(&profile, 0, sizeof(PROFILEDATA));
memcpy(profile.code, gProfileCode, sizeof(profile.code));
memcpy(profile.FLAG, FLAG, sizeof(profile.FLAG));
profile.stage = gStageNo;
@@ -80,7 +80,7 @@
memcpy(profile.flags, gFlagNPC, sizeof(profile.flags));
// Write to file
- fwrite(&profile, sizeof(PROFILE), 1, fp);
+ fwrite(&profile, sizeof(PROFILEDATA), 1, fp);
fclose(fp);
return TRUE;
@@ -89,7 +89,7 @@
BOOL LoadProfile(const char *name)
{
FILE *fp;
- PROFILE profile;
+ PROFILEDATA profile;
char path[MAX_PATH];
// Get path
@@ -115,8 +115,8 @@
// Read data
fseek(fp, 0, SEEK_SET);
- memset(&profile, 0, sizeof(PROFILE));
- fread(&profile, sizeof(PROFILE), 1, fp);
+ memset(&profile, 0, sizeof(PROFILEDATA));
+ fread(&profile, sizeof(PROFILEDATA), 1, fp);
fclose(fp);
// Set things
--- a/src/Profile.h
+++ b/src/Profile.h
@@ -6,7 +6,7 @@
#include "SelStage.h"
#include "Stage.h"
-typedef struct PROFILE
+typedef struct PROFILEDATA
{
char code[8];
int stage;
@@ -29,7 +29,7 @@
signed char permit_mapping[0x80];
char FLAG[4];
unsigned char flags[1000];
-} PROFILE;
+} PROFILEDATA;
extern const char* const gDefaultName;
extern const char* const gProfileCode;