summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2010-04-18 18:30:34 +0000
committerSimon Howard2010-04-18 18:30:34 +0000
commitfe49cfc004026cdf92c58056079f68a01ba99c7f (patch)
tree80412fca25a6452311b3136f906a2b37dd3cc344
parent38c31575d255e1b2ff71f9de2c4d16664e8fb1e9 (diff)
downloadchocolate-doom-fe49cfc004026cdf92c58056079f68a01ba99c7f.tar.gz
chocolate-doom-fe49cfc004026cdf92c58056079f68a01ba99c7f.tar.bz2
chocolate-doom-fe49cfc004026cdf92c58056079f68a01ba99c7f.zip
Make tables const, minor commenting and formatting fixes.
Subversion-branch: /branches/raven-branch Subversion-revision: 1904
-rw-r--r--src/heretic/deh_frame.c9
-rw-r--r--src/heretic/deh_htext.c16
2 files changed, 17 insertions, 8 deletions
diff --git a/src/heretic/deh_frame.c b/src/heretic/deh_frame.c
index 6d7f6c3b..c576d490 100644
--- a/src/heretic/deh_frame.c
+++ b/src/heretic/deh_frame.c
@@ -44,11 +44,16 @@ typedef struct
void (*func)();
} hhe_action_pointer_t;
-// Offsets of action pointers within the Heretic 1.0 executable.
+// Offsets of action pointers within the Heretic executables.
+// Different versions have different offsets.
// (Seriously Greg, was this really necessary? What was wrong with the
// "copying action pointer from another frame" technique used in dehacked?)
-static hhe_action_pointer_t action_pointers[] = {
+// Offset Action function
+// v1.0 v1.2 v1.3
+
+static const hhe_action_pointer_t action_pointers[] =
+{
{ { 77680, 80144, 80208 }, A_AccTeleGlitter },
{ { 78608, 81104, 81168 }, A_AddPlayerCorpse },
{ { 115808, 118000, 118240 }, A_AddPlayerRain },
diff --git a/src/heretic/deh_htext.c b/src/heretic/deh_htext.c
index 6c506cd8..d39c9fdb 100644
--- a/src/heretic/deh_htext.c
+++ b/src/heretic/deh_htext.c
@@ -52,7 +52,8 @@ typedef struct
// Offsets String
// v1.0 v1.2 v1.3
-static hhe_string_t strings[] = {
+static const hhe_string_t strings[] =
+{
{ { 228, 228, 228 }, "PLAYPAL" },
{ { 1240, 1252, 1252 }, "E1M1: THE DOCKS" },
{ { 1260, 1272, 1272 }, "E1M2: THE DUNGEONS" },
@@ -537,7 +538,8 @@ static hhe_string_t strings[] = {
// String offsets that are valid but we don't support.
-static int unsupported_strings_1_0[] = {
+static const int unsupported_strings_1_0[] =
+{
0, 4, 64, 104, 160, 200, 220, 236,
244, 252, 272, 288, 296, 316, 332, 372,
436, 500, 504, 536, 544, 560, 576, 584,
@@ -583,7 +585,8 @@ static int unsupported_strings_1_0[] = {
-1,
};
-static int unsupported_strings_1_2[] = {
+static const int unsupported_strings_1_2[] =
+{
0, 4, 64, 104, 160, 200, 220, 236,
244, 252, 272, 288, 296, 316, 332, 372,
436, 500, 504, 536, 544, 560, 576, 584,
@@ -625,7 +628,8 @@ static int unsupported_strings_1_2[] = {
15936, -1,
};
-static int unsupported_strings_1_3[] = {
+static const int unsupported_strings_1_3[] =
+{
0, 4, 64, 104, 160, 200, 220, 236,
244, 252, 272, 288, 296, 316, 332, 372,
436, 500, 504, 536, 544, 560, 576, 584,
@@ -667,7 +671,7 @@ static int unsupported_strings_1_3[] = {
15936, -1,
};
-static int *unsupported_strings[] =
+static const int *unsupported_strings[] =
{
unsupported_strings_1_0,
unsupported_strings_1_2,
@@ -676,7 +680,7 @@ static int *unsupported_strings[] =
static boolean StringIsUnsupported(unsigned int offset)
{
- int *string_list;
+ const int *string_list;
int i;
string_list = unsupported_strings[deh_hhe_version];