Mark string pointers as const

This commit is contained in:
Clownacy 2019-05-06 20:18:24 +01:00
parent 421a3c46cd
commit 25e68bfb9d
8 changed files with 10 additions and 10 deletions

View file

@ -59,7 +59,7 @@ void PutStripper()
}
//Create a cast object
void SetStripper(int x, int y, char *text, int cast)
void SetStripper(int x, int y, const char *text, int cast)
{
for (int s = 0; s < MAX_STRIP; s++)
{

View file

@ -37,7 +37,7 @@ struct ISLAND_SPRITE
void ActionStripper();
void PutStripper();
void SetStripper(int x, int y, char *text, int cast);
void SetStripper(int x, int y, const char *text, int cast);
void RestoreStripper();
void ActionIllust();
void PutIllust();

View file

@ -53,7 +53,7 @@ void SetUniqueParameter(NPCHAR *npc)
npc->view.bottom = gNpcTable[code].view.bottom << 9;
}
bool LoadEvent(char *path_event)
bool LoadEvent(const char *path_event)
{
char path[PATH_LENGTH];
sprintf(path, "%s/%s", gDataPath, path_event);

View file

@ -83,7 +83,7 @@ extern int gSuperXpos;
extern int gSuperYpos;
void InitNpChar();
bool LoadEvent(char *path_event);
bool LoadEvent(const char *path_event);
void SetNpChar(int code_char, int x, int y, int xm, int ym, int dir, NPCHAR *npc, int start_index);
void SetDestroyNpChar(int x, int y, int w, int num);
void SetDestroyNpCharUp(int x, int y, int w, int num);

View file

@ -40,7 +40,7 @@ bool IsProfile()
return true;
}
bool SaveProfile(char *name)
bool SaveProfile(const char *name)
{
//Get path
char path[PATH_LENGTH];
@ -119,7 +119,7 @@ bool SaveProfile(char *name)
return true;
}
bool LoadProfile(char *name)
bool LoadProfile(const char *name)
{
//Get path
char path[PATH_LENGTH];

View file

@ -31,6 +31,6 @@ struct PROFILE
};
bool IsProfile();
bool SaveProfile(char *name);
bool LoadProfile(char *name);
bool SaveProfile(const char *name);
bool LoadProfile(const char *name);
bool InitializeGame();

View file

@ -141,7 +141,7 @@ bool LoadTextScript2(const char *name)
}
//Load stage .tsc
bool LoadTextScript_Stage(char *name)
bool LoadTextScript_Stage(const char *name)
{
//Open Head.tsc
char path[PATH_LENGTH];

View file

@ -61,7 +61,7 @@ BOOL InitTextScript2();
void EndTextScript();
void EncryptionBinaryData2(uint8_t *pData, int size);
bool LoadTextScript2(const char *name);
bool LoadTextScript_Stage(char *name);
bool LoadTextScript_Stage(const char *name);
void GetTextScriptPath(char *path);
BOOL StartTextScript(int no);
void StopTextScript();