shithub: choc

Download patch

ref: 1f5a1e43d44676e692a0513a02ff1d690ae86ca9
parent: a058f719120af93a740d1a9186646f0564d193ca
author: Turo Lamminen <turol@iki.fi>
date: Tue Oct 11 08:01:13 EDT 2022

heretic: Rename NUMKEYS to NUM_KEY_TYPES

--- a/src/heretic/am_map.c
+++ b/src/heretic/am_map.c
@@ -30,7 +30,7 @@
 #include "doomkeys.h"
 #include "v_video.h"
 
-vertex_t KeyPoints[NUMKEYS];
+vertex_t KeyPoints[NUM_KEY_TYPES];
 
 #define NUMALIAS 3              // Number of antialiased lines.
 
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -302,7 +302,7 @@
     key_yellow,
     key_green,
     key_blue,
-    NUMKEYS
+    NUM_KEY_TYPES
 } keytype_t;
 
 typedef enum
@@ -439,7 +439,7 @@
     int artifactCount;
     int inventorySlotNum;
     int powers[NUMPOWERS];
-    boolean keys[NUMKEYS];
+    boolean keys[NUM_KEY_TYPES];
     boolean backpack;
     signed int frags[MAXPLAYERS];       // kills of other players
     weapontype_t readyweapon;
--- a/src/heretic/p_mobj.c
+++ b/src/heretic/p_mobj.c
@@ -1004,7 +1004,7 @@
     P_SetupPsprites(p);         // setup gun psprite        
     if (deathmatch)
     {                           // Give all keys in death match mode
-        for (i = 0; i < NUMKEYS; i++)
+        for (i = 0; i < NUM_KEY_TYPES; i++)
         {
             p->keys[i] = true;
             if (p == &players[consoleplayer])
--- a/src/heretic/p_saveg.c
+++ b/src/heretic/p_saveg.c
@@ -409,8 +409,8 @@
         str->powers[i] = SV_ReadLong();
     }
 
-    // boolean keys[NUMKEYS];
-    for (i=0; i<NUMKEYS; ++i)
+    // boolean keys[NUM_KEY_TYPES];
+    for (i = 0; i < NUM_KEY_TYPES; ++i)
     {
         str->keys[i] = SV_ReadLong();
     }
@@ -579,7 +579,7 @@
     }
 
     // boolean keys[NUMKEYS];
-    for (i=0; i<NUMKEYS; ++i)
+    for (i = 0; i < NUM_KEY_TYPES; ++i)
     {
         SV_WriteLong(str->keys[i]);
     }