ref: fe49cfc004026cdf92c58056079f68a01ba99c7f
parent: 38c31575d255e1b2ff71f9de2c4d16664e8fb1e9
author: Simon Howard <fraggle@gmail.com>
date: Sun Apr 18 14:30:34 EDT 2010
Make tables const, minor commenting and formatting fixes. Subversion-branch: /branches/raven-branch Subversion-revision: 1904
--- a/src/heretic/deh_frame.c
+++ b/src/heretic/deh_frame.c
@@ -44,11 +44,16 @@
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 },
--- a/src/heretic/deh_htext.c
+++ b/src/heretic/deh_htext.c
@@ -52,7 +52,8 @@
// 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 @@
// 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 @@
-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 @@
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 @@
15936, -1,
};
-static int *unsupported_strings[] =
+static const int *unsupported_strings[] =
{
unsupported_strings_1_0,
unsupported_strings_1_2,
@@ -676,7 +680,7 @@
static boolean StringIsUnsupported(unsigned int offset)
{
- int *string_list;
+ const int *string_list;
int i;
string_list = unsupported_strings[deh_hhe_version];