]> granicus.if.org Git - nethack/commitdiff
rename explosion symbols
authornhmall <nhmall@nethack.org>
Sat, 18 Sep 2021 14:04:25 +0000 (10:04 -0400)
committernhmall <nhmall@nethack.org>
Sat, 18 Sep 2021 14:04:25 +0000 (10:04 -0400)
Use a slightly more meaningful name for each one rather than
a sequential numerical name.

S_explode1 to S_expl_tl
S_explode2 to S_expl_tc
S_explode3 to S_expl_tr
S_explode4 to S_expl_ml
S_explode5 to S_expl_mc
S_explode6 to S_expl_mr
S_explode7 to S_expl_bl
S_explode8 to S_expl_bc
S_explode9 to S_expl_br

dat/symbols
doc/Guidebook.mn
doc/Guidebook.tex
include/defsym.h
include/display.h
include/sym.h
src/display.c
src/explode.c
src/options.c

index 05cea7087f7a0b352d05a8aa5daec49cc6f22f6b..2852a7b0ff1531f8264c11b69590ea17814f9c7d 100644 (file)
@@ -127,15 +127,15 @@ start: NHAccess
        S_sw_bl: \092
        S_sw_bc: \045
        S_sw_br: \047
-       S_explode1: \047
-       S_explode2: \045
-       S_explode3: \092
-       S_explode4: \058
-       S_explode5: \032
-       S_explode6: \058
-       S_explode7: \092
-       S_explode8: \045
-       S_explode9: \047
+       S_expl_tl: \047
+       S_expl_tc: \045
+       S_expl_tr: \092
+       S_expl_ml: \058
+       S_expl_mc: \032
+       S_expl_mr: \058
+       S_expl_bl: \092
+       S_expl_bc: \045
+       S_expl_br: \047
 finish
 
 # All symbols are spaces
@@ -180,15 +180,15 @@ start: Blank
         S_dragon: \032
         S_eel: \032
         S_elemental: \032
-        S_explode1: \032
-        S_explode2: \032
-        S_explode3: \032
-        S_explode4: \032
-        S_explode5: \032
-        S_explode6: \032
-        S_explode7: \032
-        S_explode8: \032
-        S_explode9: \032
+        S_expl_tl: \032
+        S_expl_tc: \032
+        S_expl_tr: \032
+        S_expl_ml: \032
+        S_expl_mc: \032
+        S_expl_mr: \032
+        S_expl_bl: \032
+        S_expl_bc: \032
+        S_expl_br: \032
         S_eye: \032
         S_falling_rock_trap: \032
         S_feline: \032
@@ -355,8 +355,8 @@ start: IBMgraphics
        S_hbeam: \xc4                   # meta-D, horizontal rule
        S_sw_ml: \xb3                   # meta-3, vertical rule
        S_sw_mr: \xb3                   # meta-3, vertical rule
-       S_explode4: \xb3                # meta-3, vertical rule
-       S_explode6: \xb3                # meta-3, vertical rule
+       S_expl_ml: \xb3         # meta-3, vertical rule
+       S_expl_mr: \xb3         # meta-3, vertical rule
 finish
 
 start: IBMGraphics_1
@@ -377,8 +377,8 @@ start: IBMGraphics_1
        S_hbeam: \xc4                   # meta-D, horizontal rule
        S_sw_ml: \xb3                   # meta-3, vertical rule
        S_sw_mr: \xb3                   # meta-3, vertical rule
-       S_explode4: \xb3                # meta-3, vertical rule
-       S_explode6: \xb3                # meta-3, vertical rule
+       S_expl_ml: \xb3         # meta-3, vertical rule
+       S_expl_mr: \xb3         # meta-3, vertical rule
 finish
 
 start: IBMGraphics_2
@@ -403,8 +403,8 @@ start: IBMGraphics_2
        S_hbeam: \xc4                   # meta-D, horizontal rule
        S_sw_ml: \xb3                   # meta-3, vertical rule
        S_sw_mr: \xb3                   # meta-3, vertical rule
-       S_explode4: \xb3                # meta-3, vertical rule
-       S_explode6: \xb3                # meta-3, vertical rule
+       S_expl_ml: \xb3         # meta-3, vertical rule
+       S_expl_mr: \xb3         # meta-3, vertical rule
 finish
 
 start: RogueIBM
@@ -574,8 +574,8 @@ start: curses
        S_hbeam: \xf1                   # meta-D, horizontal rule
        S_sw_ml: \xf8                   # meta-3, vertical rule
        S_sw_mr: \xf8                   # meta-3, vertical rule
-       S_explode4: \xf8                # meta-3, vertical rule
-       S_explode6: \xf8                # meta-3, vertical rule
+       S_expl_ml: \xf8         # meta-3, vertical rule
+       S_expl_mr: \xf8         # meta-3, vertical rule
 finish
 
 start: DECgraphics
@@ -616,10 +616,10 @@ start: DECgraphics
        S_sw_ml: \xf8                   # meta-x, vertical rule
        S_sw_mr: \xf8                   # meta-x, vertical rule
        S_sw_bc: \xf3                   # meta-s, low horizontal line
-       S_explode2: \xef                # meta-o, high horizontal line
-       S_explode4: \xf8                # meta-x, vertical rule
-       S_explode6: \xf8                # meta-x, vertical rule
-       S_explode8: \xf3                # meta-s, low horizontal line
+       S_expl_tc: \xef                 # meta-o, high horizontal line
+       S_expl_ml: \xf8                 # meta-x, vertical rule
+       S_expl_mr: \xf8                 # meta-x, vertical rule
+       S_expl_bc: \xf3         # meta-s, low horizontal line
 finish
 
 start: MACgraphics
index 0a9e81c47de342205ca9b4e5ffacab956e08cce0..587c35a664b2e6133bc1d0d294b11edcbd865f75 100644 (file)
@@ -5301,15 +5301,15 @@ d       S_dog   (dog or other canine)
 D      S_dragon        (dragon)
 ;      S_eel   (sea monster)
 E      S_elemental     (elemental)
-/      S_explode1      (explosion top left)
-\-     S_explode2      (explosion top center)
-\\     S_explode3      (explosion top right)
-|      S_explode4      (explosion middle left)
-\      S_explode5      (explosion middle center)
-|      S_explode6      (explosion middle right)
-\\     S_explode7      (explosion bottom left)
-\-     S_explode8      (explosion bottom center)
-/      S_explode9      (explosion bottom right)
+/      S_expl_tl       (explosion top left)
+\-     S_expl_tc       (explosion top center)
+\\     S_expl_tr       (explosion top right)
+|      S_expl_ml       (explosion middle left)
+\      S_expl_mc       (explosion middle center)
+|      S_expl_mr       (explosion middle right)
+\\     S_expl_bl       (explosion bottom left)
+\-     S_expl_bc       (explosion bottom center)
+/      S_expl_br       (explosion bottom right)
 e      S_eye   (eye or sphere)
 \(ha   S_falling_rock_trap     (falling rock trap)
 f      S_feline        (cat or other feline)
index c30e7001632225626963d1c963f02de699f5246b..2df0b11f453be4d6e4d07454845969582422e9d1 100644 (file)
@@ -5801,15 +5801,15 @@ Default                      & Symbol Name                & Description\\
 \verb@D@ & S\verb+_+dragon                  &  (dragon)\\
 \verb@;@ & S\verb+_+eel                     &  (sea monster)\\
 \verb@E@ & S\verb+_+elemental               &  (elemental)\\
-\verb@/@ & S\verb+_+explode1                &  (explosion top left)\\
-\verb@-@ & S\verb+_+explode2                &  (explosion top center)\\
-\verb@\@ & S\verb+_+explode3                &  (explosion top right)\\
-\verb@|@ & S\verb+_+explode4                &  (explosion middle left)\\
-\verb@ @ & S\verb+_+explode5                &  (explosion middle center)\\
-\verb@|@ & S\verb+_+explode6                &  (explosion middle right)\\
-\verb@\@ & S\verb+_+explode7                &  (explosion bottom left)\\
-\verb@-@ & S\verb+_+explode8                &  (explosion bottom center)\\
-\verb@/@ & S\verb+_+explode9                &  (explosion bottom right)\\
+\verb@/@ & S\verb+_+expl\verb+_+tl          &  (explosion top left)\\
+\verb@-@ & S\verb+_+expl\verb+_+tc          &  (explosion top center)\\
+\verb@\@ & S\verb+_+expl\verb+_+tr          &  (explosion top right)\\
+\verb@|@ & S\verb+_+expl\verb+_+ml          &  (explosion middle left)\\
+\verb@ @ & S\verb+_+expl\verb+_+mc          &  (explosion middle center)\\
+\verb@|@ & S\verb+_+expl\verb+_+mr          &  (explosion middle right)\\
+\verb@\@ & S\verb+_+expl\verb+_+bl          &  (explosion bottom left)\\
+\verb@-@ & S\verb+_+expl\verb+_+bc          &  (explosion bottom center)\\
+\verb@/@ & S\verb+_+expl\verb+_+br          &  (explosion bottom right)\\
 \verb@e@ & S\verb+_+eye                     &  (eye or sphere)\\
 \verb@^@ & S\verb+_+falling\verb+_+rock\verb+_+trap     &      (falling rock trap)\\
 \verb@f@ & S\verb+_+feline                  &  (cat or other feline)\\
index a694586110ebc3a36ae0def28f1ba947ac09b375..5076e2260efe966b48966856d4ea39d632d1545f 100644 (file)
     /*      |@|                                                    */
     /*      \-/                                                    */
     /*                                                             */
-    PCHAR2(91, '/',  S_explode1, "explosion top left", "", CLR(CLR_ORANGE))
-    PCHAR2(92, '-',  S_explode2, "explosion top center", "", CLR(CLR_ORANGE))
-    PCHAR2(93, '\\', S_explode3, "explosion top right", "", CLR(CLR_ORANGE))
-    PCHAR2(94, '|',  S_explode4, "explosion middle left", "", CLR(CLR_ORANGE))
-    PCHAR2(95, ' ',  S_explode5, "explosion middle center", "", CLR(CLR_ORANGE))
-    PCHAR2(96, '|',  S_explode6, "explosion middle right", "", CLR(CLR_ORANGE))
-    PCHAR2(97, '\\', S_explode7, "explosion bottom left", "", CLR(CLR_ORANGE))
-    PCHAR2(98, '-',  S_explode8, "explosion bottom center", "", CLR(CLR_ORANGE))
-    PCHAR2(99, '/',  S_explode9, "explosion bottom right", "", CLR(CLR_ORANGE))
+    PCHAR2(91, '/',  S_expl_tl, "explosion top left", "", CLR(CLR_ORANGE))
+    PCHAR2(92, '-',  S_expl_tc, "explosion top center", "", CLR(CLR_ORANGE))
+    PCHAR2(93, '\\', S_expl_tr, "explosion top right", "", CLR(CLR_ORANGE))
+    PCHAR2(94, '|',  S_expl_ml, "explosion middle left", "", CLR(CLR_ORANGE))
+    PCHAR2(95, ' ',  S_expl_mc, "explosion middle center", "", CLR(CLR_ORANGE))
+    PCHAR2(96, '|',  S_expl_mr, "explosion middle right", "", CLR(CLR_ORANGE))
+    PCHAR2(97, '\\', S_expl_bl, "explosion bottom left", "", CLR(CLR_ORANGE))
+    PCHAR2(98, '-',  S_expl_bc, "explosion bottom center", "", CLR(CLR_ORANGE))
+    PCHAR2(99, '/',  S_expl_br, "explosion bottom right", "", CLR(CLR_ORANGE))
 #undef PCHAR
 #undef PCHAR2
 #endif /* PCHAR_S_ENUM || PCHAR_PARSE || PCHAR_DRAWING || PCHAR_TILES */
index a32469c89a791784b783a1936a3d84f75ff3059f..cde1499b1c47eb59d531eab0ea7bd14d543f43f0 100644 (file)
@@ -379,7 +379,7 @@ enum explosion_types {
 
 #define cmap_to_glyph(cmap_idx) ((int) (cmap_idx) + GLYPH_CMAP_OFF)
 #define explosion_to_glyph(expltype, idx) \
-    ((((expltype) * MAXEXPCHARS) + ((idx) - S_explode1)) + GLYPH_EXPLODE_OFF)
+    ((((expltype) * MAXEXPCHARS) + ((idx) - S_expl_tl)) + GLYPH_EXPLODE_OFF)
 
 #define trap_to_glyph(trap)                                \
     cmap_to_glyph(trap_to_defsym((trap)->ttyp))
index 3e6d7e821320105b3b1e26bfc605c771b256a792..6d8aa1f46d46a4369337f44d30d536f301fd2b14 100644 (file)
@@ -76,7 +76,7 @@ struct symsetentry {
 
 #define MAXDCHARS (S_water - S_stone + 1) /* mapped dungeon characters */
 #define MAXTCHARS (S_vibrating_square - S_arrow_trap + 1) /* trap chars */
-#define MAXECHARS (S_explode9 - S_vbeam + 1) /* mapped effects characters */
+#define MAXECHARS (S_expl_br - S_vbeam + 1) /* mapped effects characters */
 #define MAXEXPCHARS 9 /* number of explosion characters */
 
 #define DARKROOMSYM (Is_rogue_level(&u.uz) ? S_stone : S_darkroom)
index a9555d0c49f0fb8bb04ff3408d9a77f2fe5130c9..5dae7111853d632c3a601cc93eba5bbb9322d432 100644 (file)
@@ -2217,7 +2217,7 @@ map_glyphinfo(xchar x, xchar y, int glyph,
         else
             zap_color((offset >> 2));
     } else if ((offset = (glyph - GLYPH_EXPLODE_OFF)) >= 0) { /* explosion */
-        idx = ((offset % MAXEXPCHARS) + S_explode1) + SYM_OFF_P;
+        idx = ((offset % MAXEXPCHARS) + S_expl_tl) + SYM_OFF_P;
         explode_color(offset / MAXEXPCHARS);
     } else if ((offset = (glyph - GLYPH_CMAP_OFF)) >= 0) { /* cmap */
         idx = offset + SYM_OFF_P;
index f1a5e89ae78901a74fbfe1f2eed1c108fab55132..73ae23cd84e0e14f7bb7777da07d11b30d4277fb 100644 (file)
@@ -5,9 +5,10 @@
 #include "hack.h"
 
 /* Note: Arrays are column first, while the screen is row first */
-static const int explosion[3][3] = { { S_explode1, S_explode4, S_explode7 },
-                               { S_explode2, S_explode5, S_explode8 },
-                               { S_explode3, S_explode6, S_explode9 } };
+static const int explosion[3][3] = {
+        { S_expl_tl, S_expl_ml, S_expl_bl },
+        { S_expl_tc, S_expl_mc, S_expl_bc },
+        { S_expl_tr, S_expl_mr, S_expl_br } };
 
 /* Note: I had to choose one of three possible kinds of "type" when writing
  * this function: a wand type (like in zap.c), an adtyp, or an object type.
index b2841bd371f579230d996348312b74636042b03f..913494e6d175d957d59aed7bf524b24a6b4ed89d 100644 (file)
@@ -7827,9 +7827,17 @@ match_sym(char *buf)
         const char *altnm;
         const char *nm;
     } alternates[] = {
-        { "S_armour" , "S_armor"},
+        { "S_armour" , "S_armor" },
+        { "S_explode1" , "S_expl_tl" },
+        { "S_explode2" , "S_expl_tc" },
+        { "S_explode3" , "S_expl_tr" },
+        { "S_explode4" , "S_expl_ml" },
+        { "S_explode5" , "S_expl_mc" },
+        { "S_explode6" , "S_expl_mr" },
+        { "S_explode7" , "S_expl_bl" },
+        { "S_explode8" , "S_expl_bc" },
+        { "S_explode9" , "S_expl_br" },
     };
-
     size_t len = strlen(buf);
     const char *p = index(buf, ':'), *q = index(buf, '=');
     struct symparse *sp = loadsyms;