foxygit / doom Log in
commit 17e8d8ef225de1fb80f1c574d7402f03425e3f2e
Author:     Turo Lamminen <turotl@gmail.com>
AuthorDate: Sat Dec 8 16:37:08 2018 +0200
Commit:     Turo Lamminen <turotl@gmail.com>
CommitDate: Sat Dec 8 16:40:41 2018 +0200

    heretic: Make sprnames contents and related function parameters const
---
 src/heretic/info.c     | 2 +-
 src/heretic/info.h     | 2 +-
 src/heretic/r_local.h  | 2 +-
 src/heretic/r_things.c | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/heretic/info.c b/src/heretic/info.c
index 9d7c8572..d736325b 100644
--- a/src/heretic/info.c
+++ b/src/heretic/info.c
@@ -16,7 +16,7 @@
 #include "doomdef.h"
 #include "p_action.h"

-char *sprnames[] = {
+const char *sprnames[] = {
     "IMPX","ACLO","PTN1","SHLD","SHD2","BAGH","SPMP","INVS","PTN2","SOAR",
     "INVU","PWBK","EGGC","EGGM","FX01","SPHL","TRCH","FBMB","XPL1","ATLP",
     "PPOD","AMG1","SPSH","LVAS","SLDG","SKH1","SKH2","SKH3","SKH4","CHDL",
diff --git a/src/heretic/info.h b/src/heretic/info.h
index 9f827b67..1975aebe 100644
--- a/src/heretic/info.h
+++ b/src/heretic/info.h
@@ -1374,7 +1374,7 @@ typedef struct
 } state_t;

 extern state_t states[NUMSTATES];
-extern char *sprnames[];
+extern const char *sprnames[];



diff --git a/src/heretic/r_local.h b/src/heretic/r_local.h
index e6c47e27..7cccda14 100644
--- a/src/heretic/r_local.h
+++ b/src/heretic/r_local.h
@@ -427,7 +427,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);
 void R_ClipVisSprite(vissprite_t * vis, int xl, int xh);
diff --git a/src/heretic/r_things.c b/src/heretic/r_things.c
index fa1b982c..c598034e 100644
--- a/src/heretic/r_things.c
+++ b/src/heretic/r_things.c
@@ -141,9 +141,9 @@ void R_InstallSpriteLump(int lump, unsigned frame, unsigned rotation,
 =================
 */

-void R_InitSpriteDefs(char **namelist)
+void R_InitSpriteDefs(const char **namelist)
 {
-    char **check;
+    const char **check;
     int i, l, frame, rotation;
     int start, end;

@@ -255,7 +255,7 @@ int newvissprite;
 ===================
 */

-void R_InitSprites(char **namelist)
+void R_InitSprites(const char **namelist)
 {
     int i;