From f5eaa991cf7582adae4b04a3e1469bcd970c1d3a Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 11 Mar 2012 15:19:25 +0100 Subject: [PATCH] Remove arrays with strings from defs.h. These are now put in the .cpp files where they are used. --- code/defs.h | 11 ++--------- code/intermission.cpp | 9 ++++++++- code/resources.cpp | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/defs.h b/code/defs.h index 13a592f..8cc6d12 100644 --- a/code/defs.h +++ b/code/defs.h @@ -300,15 +300,8 @@ enum { PAK_S3M }; -static const char systemNames[][15] = {"Spirit", "Eyananth", "Mordor", "Sol"}; +extern const char *systemNames[]; -static const char faces[][12] = { - "FACE_CHRIS", "FACE_SID", "FACE_KRASS", - "FACE_KLINE", "FACE_PHOEBE", "FACE_URSULA", - "FACE_CREW"}; - -static const char systemBackground[][20] = { - "gfx/spirit.jpg", "gfx/eyananth.jpg", - "gfx/mordor.jpg", "gfx/sol.jpg"}; +extern const char *systemBackground[]; static const signed char rate2reload[6] = {15, 15, 13, 11, 9, 7}; diff --git a/code/intermission.cpp b/code/intermission.cpp index 722c93a..c287b09 100644 --- a/code/intermission.cpp +++ b/code/intermission.cpp @@ -20,6 +20,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "Starfighter.h" +const char *systemNames[] = {"Spirit", "Eyananth", "Mordor", "Sol"}; + +const char *systemBackground[] = { + "gfx/spirit.jpg", "gfx/eyananth.jpg", + "gfx/mordor.jpg", "gfx/sol.jpg" +}; + /* Drives the cursor. Is used by some other screens too */ @@ -485,7 +492,7 @@ int galaxyMap() loadMusic("music/3DParadise.mod"); - loadBackground((char *)systemBackground[currentGame.system]); + loadBackground(systemBackground[currentGame.system]); char string[25]; diff --git a/code/resources.cpp b/code/resources.cpp index cac920b..e964871 100644 --- a/code/resources.cpp +++ b/code/resources.cpp @@ -137,7 +137,7 @@ void loadGameGraphics() fclose(fp); - loadBackground((char *)systemBackground[currentGame.system]); + loadBackground(systemBackground[currentGame.system]); setAlienShapes();