rename explosion symbols

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
This commit is contained in:
nhmall
2021-09-18 10:04:25 -04:00
parent 22b2ef8f2b
commit 9b57784348
9 changed files with 74 additions and 65 deletions
+30 -30
View File
@@ -127,15 +127,15 @@ start: NHAccess
S_sw_bl: \092 S_sw_bl: \092
S_sw_bc: \045 S_sw_bc: \045
S_sw_br: \047 S_sw_br: \047
S_explode1: \047 S_expl_tl: \047
S_explode2: \045 S_expl_tc: \045
S_explode3: \092 S_expl_tr: \092
S_explode4: \058 S_expl_ml: \058
S_explode5: \032 S_expl_mc: \032
S_explode6: \058 S_expl_mr: \058
S_explode7: \092 S_expl_bl: \092
S_explode8: \045 S_expl_bc: \045
S_explode9: \047 S_expl_br: \047
finish finish
# All symbols are spaces # All symbols are spaces
@@ -180,15 +180,15 @@ start: Blank
S_dragon: \032 S_dragon: \032
S_eel: \032 S_eel: \032
S_elemental: \032 S_elemental: \032
S_explode1: \032 S_expl_tl: \032
S_explode2: \032 S_expl_tc: \032
S_explode3: \032 S_expl_tr: \032
S_explode4: \032 S_expl_ml: \032
S_explode5: \032 S_expl_mc: \032
S_explode6: \032 S_expl_mr: \032
S_explode7: \032 S_expl_bl: \032
S_explode8: \032 S_expl_bc: \032
S_explode9: \032 S_expl_br: \032
S_eye: \032 S_eye: \032
S_falling_rock_trap: \032 S_falling_rock_trap: \032
S_feline: \032 S_feline: \032
@@ -355,8 +355,8 @@ start: IBMgraphics
S_hbeam: \xc4 # meta-D, horizontal rule S_hbeam: \xc4 # meta-D, horizontal rule
S_sw_ml: \xb3 # meta-3, vertical rule S_sw_ml: \xb3 # meta-3, vertical rule
S_sw_mr: \xb3 # meta-3, vertical rule S_sw_mr: \xb3 # meta-3, vertical rule
S_explode4: \xb3 # meta-3, vertical rule S_expl_ml: \xb3 # meta-3, vertical rule
S_explode6: \xb3 # meta-3, vertical rule S_expl_mr: \xb3 # meta-3, vertical rule
finish finish
start: IBMGraphics_1 start: IBMGraphics_1
@@ -377,8 +377,8 @@ start: IBMGraphics_1
S_hbeam: \xc4 # meta-D, horizontal rule S_hbeam: \xc4 # meta-D, horizontal rule
S_sw_ml: \xb3 # meta-3, vertical rule S_sw_ml: \xb3 # meta-3, vertical rule
S_sw_mr: \xb3 # meta-3, vertical rule S_sw_mr: \xb3 # meta-3, vertical rule
S_explode4: \xb3 # meta-3, vertical rule S_expl_ml: \xb3 # meta-3, vertical rule
S_explode6: \xb3 # meta-3, vertical rule S_expl_mr: \xb3 # meta-3, vertical rule
finish finish
start: IBMGraphics_2 start: IBMGraphics_2
@@ -403,8 +403,8 @@ start: IBMGraphics_2
S_hbeam: \xc4 # meta-D, horizontal rule S_hbeam: \xc4 # meta-D, horizontal rule
S_sw_ml: \xb3 # meta-3, vertical rule S_sw_ml: \xb3 # meta-3, vertical rule
S_sw_mr: \xb3 # meta-3, vertical rule S_sw_mr: \xb3 # meta-3, vertical rule
S_explode4: \xb3 # meta-3, vertical rule S_expl_ml: \xb3 # meta-3, vertical rule
S_explode6: \xb3 # meta-3, vertical rule S_expl_mr: \xb3 # meta-3, vertical rule
finish finish
start: RogueIBM start: RogueIBM
@@ -574,8 +574,8 @@ start: curses
S_hbeam: \xf1 # meta-D, horizontal rule S_hbeam: \xf1 # meta-D, horizontal rule
S_sw_ml: \xf8 # meta-3, vertical rule S_sw_ml: \xf8 # meta-3, vertical rule
S_sw_mr: \xf8 # meta-3, vertical rule S_sw_mr: \xf8 # meta-3, vertical rule
S_explode4: \xf8 # meta-3, vertical rule S_expl_ml: \xf8 # meta-3, vertical rule
S_explode6: \xf8 # meta-3, vertical rule S_expl_mr: \xf8 # meta-3, vertical rule
finish finish
start: DECgraphics start: DECgraphics
@@ -616,10 +616,10 @@ start: DECgraphics
S_sw_ml: \xf8 # meta-x, vertical rule S_sw_ml: \xf8 # meta-x, vertical rule
S_sw_mr: \xf8 # meta-x, vertical rule S_sw_mr: \xf8 # meta-x, vertical rule
S_sw_bc: \xf3 # meta-s, low horizontal line S_sw_bc: \xf3 # meta-s, low horizontal line
S_explode2: \xef # meta-o, high horizontal line S_expl_tc: \xef # meta-o, high horizontal line
S_explode4: \xf8 # meta-x, vertical rule S_expl_ml: \xf8 # meta-x, vertical rule
S_explode6: \xf8 # meta-x, vertical rule S_expl_mr: \xf8 # meta-x, vertical rule
S_explode8: \xf3 # meta-s, low horizontal line S_expl_bc: \xf3 # meta-s, low horizontal line
finish finish
start: MACgraphics start: MACgraphics
+9 -9
View File
@@ -5301,15 +5301,15 @@ d S_dog (dog or other canine)
D S_dragon (dragon) D S_dragon (dragon)
; S_eel (sea monster) ; S_eel (sea monster)
E S_elemental (elemental) E S_elemental (elemental)
/ S_explode1 (explosion top left) / S_expl_tl (explosion top left)
\- S_explode2 (explosion top center) \- S_expl_tc (explosion top center)
\\ S_explode3 (explosion top right) \\ S_expl_tr (explosion top right)
| S_explode4 (explosion middle left) | S_expl_ml (explosion middle left)
\ S_explode5 (explosion middle center) \ S_expl_mc (explosion middle center)
| S_explode6 (explosion middle right) | S_expl_mr (explosion middle right)
\\ S_explode7 (explosion bottom left) \\ S_expl_bl (explosion bottom left)
\- S_explode8 (explosion bottom center) \- S_expl_bc (explosion bottom center)
/ S_explode9 (explosion bottom right) / S_expl_br (explosion bottom right)
e S_eye (eye or sphere) e S_eye (eye or sphere)
\(ha S_falling_rock_trap (falling rock trap) \(ha S_falling_rock_trap (falling rock trap)
f S_feline (cat or other feline) f S_feline (cat or other feline)
+9 -9
View File
@@ -5801,15 +5801,15 @@ Default & Symbol Name & Description\\
\verb@D@ & S\verb+_+dragon & (dragon)\\ \verb@D@ & S\verb+_+dragon & (dragon)\\
\verb@;@ & S\verb+_+eel & (sea monster)\\ \verb@;@ & S\verb+_+eel & (sea monster)\\
\verb@E@ & S\verb+_+elemental & (elemental)\\ \verb@E@ & S\verb+_+elemental & (elemental)\\
\verb@/@ & S\verb+_+explode1 & (explosion top left)\\ \verb@/@ & S\verb+_+expl\verb+_+tl & (explosion top left)\\
\verb@-@ & S\verb+_+explode2 & (explosion top center)\\ \verb@-@ & S\verb+_+expl\verb+_+tc & (explosion top center)\\
\verb@\@ & S\verb+_+explode3 & (explosion top right)\\ \verb@\@ & S\verb+_+expl\verb+_+tr & (explosion top right)\\
\verb@|@ & S\verb+_+explode4 & (explosion middle left)\\ \verb@|@ & S\verb+_+expl\verb+_+ml & (explosion middle left)\\
\verb@ @ & S\verb+_+explode5 & (explosion middle center)\\ \verb@ @ & S\verb+_+expl\verb+_+mc & (explosion middle center)\\
\verb@|@ & S\verb+_+explode6 & (explosion middle right)\\ \verb@|@ & S\verb+_+expl\verb+_+mr & (explosion middle right)\\
\verb@\@ & S\verb+_+explode7 & (explosion bottom left)\\ \verb@\@ & S\verb+_+expl\verb+_+bl & (explosion bottom left)\\
\verb@-@ & S\verb+_+explode8 & (explosion bottom center)\\ \verb@-@ & S\verb+_+expl\verb+_+bc & (explosion bottom center)\\
\verb@/@ & S\verb+_+explode9 & (explosion bottom right)\\ \verb@/@ & S\verb+_+expl\verb+_+br & (explosion bottom right)\\
\verb@e@ & S\verb+_+eye & (eye or sphere)\\ \verb@e@ & S\verb+_+eye & (eye or sphere)\\
\verb@^@ & S\verb+_+falling\verb+_+rock\verb+_+trap & (falling rock trap)\\ \verb@^@ & S\verb+_+falling\verb+_+rock\verb+_+trap & (falling rock trap)\\
\verb@f@ & S\verb+_+feline & (cat or other feline)\\ \verb@f@ & S\verb+_+feline & (cat or other feline)\\
+9 -9
View File
@@ -221,15 +221,15 @@
/* |@| */ /* |@| */
/* \-/ */ /* \-/ */
/* */ /* */
PCHAR2(91, '/', S_explode1, "explosion top left", "", CLR(CLR_ORANGE)) PCHAR2(91, '/', S_expl_tl, "explosion top left", "", CLR(CLR_ORANGE))
PCHAR2(92, '-', S_explode2, "explosion top center", "", CLR(CLR_ORANGE)) PCHAR2(92, '-', S_expl_tc, "explosion top center", "", CLR(CLR_ORANGE))
PCHAR2(93, '\\', S_explode3, "explosion top right", "", CLR(CLR_ORANGE)) PCHAR2(93, '\\', S_expl_tr, "explosion top right", "", CLR(CLR_ORANGE))
PCHAR2(94, '|', S_explode4, "explosion middle left", "", CLR(CLR_ORANGE)) PCHAR2(94, '|', S_expl_ml, "explosion middle left", "", CLR(CLR_ORANGE))
PCHAR2(95, ' ', S_explode5, "explosion middle center", "", CLR(CLR_ORANGE)) PCHAR2(95, ' ', S_expl_mc, "explosion middle center", "", CLR(CLR_ORANGE))
PCHAR2(96, '|', S_explode6, "explosion middle right", "", CLR(CLR_ORANGE)) PCHAR2(96, '|', S_expl_mr, "explosion middle right", "", CLR(CLR_ORANGE))
PCHAR2(97, '\\', S_explode7, "explosion bottom left", "", CLR(CLR_ORANGE)) PCHAR2(97, '\\', S_expl_bl, "explosion bottom left", "", CLR(CLR_ORANGE))
PCHAR2(98, '-', S_explode8, "explosion bottom center", "", CLR(CLR_ORANGE)) PCHAR2(98, '-', S_expl_bc, "explosion bottom center", "", CLR(CLR_ORANGE))
PCHAR2(99, '/', S_explode9, "explosion bottom right", "", CLR(CLR_ORANGE)) PCHAR2(99, '/', S_expl_br, "explosion bottom right", "", CLR(CLR_ORANGE))
#undef PCHAR #undef PCHAR
#undef PCHAR2 #undef PCHAR2
#endif /* PCHAR_S_ENUM || PCHAR_PARSE || PCHAR_DRAWING || PCHAR_TILES */ #endif /* PCHAR_S_ENUM || PCHAR_PARSE || PCHAR_DRAWING || PCHAR_TILES */
+1 -1
View File
@@ -379,7 +379,7 @@ enum explosion_types {
#define cmap_to_glyph(cmap_idx) ((int) (cmap_idx) + GLYPH_CMAP_OFF) #define cmap_to_glyph(cmap_idx) ((int) (cmap_idx) + GLYPH_CMAP_OFF)
#define explosion_to_glyph(expltype, idx) \ #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) \ #define trap_to_glyph(trap) \
cmap_to_glyph(trap_to_defsym((trap)->ttyp)) cmap_to_glyph(trap_to_defsym((trap)->ttyp))
+1 -1
View File
@@ -76,7 +76,7 @@ struct symsetentry {
#define MAXDCHARS (S_water - S_stone + 1) /* mapped dungeon characters */ #define MAXDCHARS (S_water - S_stone + 1) /* mapped dungeon characters */
#define MAXTCHARS (S_vibrating_square - S_arrow_trap + 1) /* trap chars */ #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 MAXEXPCHARS 9 /* number of explosion characters */
#define DARKROOMSYM (Is_rogue_level(&u.uz) ? S_stone : S_darkroom) #define DARKROOMSYM (Is_rogue_level(&u.uz) ? S_stone : S_darkroom)
+1 -1
View File
@@ -2217,7 +2217,7 @@ map_glyphinfo(xchar x, xchar y, int glyph,
else else
zap_color((offset >> 2)); zap_color((offset >> 2));
} else if ((offset = (glyph - GLYPH_EXPLODE_OFF)) >= 0) { /* explosion */ } 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); explode_color(offset / MAXEXPCHARS);
} else if ((offset = (glyph - GLYPH_CMAP_OFF)) >= 0) { /* cmap */ } else if ((offset = (glyph - GLYPH_CMAP_OFF)) >= 0) { /* cmap */
idx = offset + SYM_OFF_P; idx = offset + SYM_OFF_P;
+4 -3
View File
@@ -5,9 +5,10 @@
#include "hack.h" #include "hack.h"
/* Note: Arrays are column first, while the screen is row first */ /* Note: Arrays are column first, while the screen is row first */
static const int explosion[3][3] = { { S_explode1, S_explode4, S_explode7 }, static const int explosion[3][3] = {
{ S_explode2, S_explode5, S_explode8 }, { S_expl_tl, S_expl_ml, S_expl_bl },
{ S_explode3, S_explode6, S_explode9 } }; { 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 /* 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. * this function: a wand type (like in zap.c), an adtyp, or an object type.
+10 -2
View File
@@ -7827,9 +7827,17 @@ match_sym(char *buf)
const char *altnm; const char *altnm;
const char *nm; const char *nm;
} alternates[] = { } 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); size_t len = strlen(buf);
const char *p = index(buf, ':'), *q = index(buf, '='); const char *p = index(buf, ':'), *q = index(buf, '=');
struct symparse *sp = loadsyms; struct symparse *sp = loadsyms;