commit 87d96c2ddf74afe0466e07477f424d6ffacafc9c
Author: Turo Lamminen <turotl@gmail.com>
AuthorDate: Tue Jan 29 20:00:56 2019 +0200
Commit: Turo Lamminen <turotl@gmail.com>
CommitDate: Tue Jan 29 20:00:56 2019 +0200
strife: Make sprnames contents and related function parameters const
---
src/strife/info.c | 2 +-
src/strife/info.h | 2 +-
src/strife/r_things.c | 6 +++---
src/strife/r_things.h | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/strife/info.c b/src/strife/info.c
index 1ed2dfdf..7976299b 100644
--- a/src/strife/info.c
+++ b/src/strife/info.c
@@ -30,7 +30,7 @@
#include "p_mobj.h"
// villsa [STRIFE]
-char *sprnames[NUMSPRITES+1] =
+const char *sprnames[NUMSPRITES+1] =
{
"PLAY", "PNCH", "WAVE", "RBPY", "TRGT", "XBOW", "MMIS", "RIFG",
"RIFF", "FLMT", "FLMF", "BLST", "BLSF", "GREN", "GREF", "SIGH",
diff --git a/src/strife/info.h b/src/strife/info.h
index a2594746..4c8edc7b 100644
--- a/src/strife/info.h
+++ b/src/strife/info.h
@@ -1833,7 +1833,7 @@ typedef struct
} state_t;
extern state_t states[NUMSTATES];
-extern char *sprnames[];
+extern const char *sprnames[];
typedef enum
{
diff --git a/src/strife/r_things.c b/src/strife/r_things.c
index 944dbb58..8b70dc0a 100644
--- a/src/strife/r_things.c
+++ b/src/strife/r_things.c
@@ -171,9 +171,9 @@ R_InstallSpriteLump
// letter/number appended.
// The rotation character can be 0 to signify no rotations.
//
-void R_InitSpriteDefs (char** namelist)
+void R_InitSpriteDefs (const char** namelist)
{
- char** check;
+ const char **check;
int i;
int l;
int frame;
@@ -292,7 +292,7 @@ int sprbotscreen; // villsa [STRIFE]
// R_InitSprites
// Called at program start.
//
-void R_InitSprites (char** namelist)
+void R_InitSprites (const char** namelist)
{
int i;
diff --git a/src/strife/r_things.h b/src/strife/r_things.h
index 84a79610..edb14a54 100644
--- a/src/strife/r_things.h
+++ b/src/strife/r_things.h
@@ -52,7 +52,7 @@ void R_SortVisSprites (void);
void R_AddSprites (sector_t* sec);
void R_AddPSprites (void);
void R_DrawSprites (void);
-void R_InitSprites (char** namelist);
+void R_InitSprites (const char** namelist);
void R_ClearSprites (void);
void R_DrawMasked (void);