drawing overhaul (trunk only)
This is an overhaul to the NetHack drawing mechanism. - eliminates the need to have separate lists in drawing.c for the things and their associated explanations by grouping those thing together on the same inializer in a struct. - replaces all of these options: IBMgraphics, DECgraphics, MACgraphics, graphics, monsters, objects, boulder, traps, effects - drawing.c contains only the set of NetHack standard symbols for the main game and a set of NetHack standard symbols for the roguelevel. - introduces a symbols file that contains named sets of symbols that can be loaded at run time making it extensible for situations like multinational code pages like those reported by <Someone>, without hardcoding additional sets into the game code. - symbols file uses names for the symbols, so offsets will not break when new things are introduced into the game, the way the older config file uchar load routines did. - symbols file only contains exceptions to the standard NetHack set, not entire sets so they are much less verbose than all of the g_FILLER() entries that were previously in drawing.c - 'symset' and 'roguesymset' config file options for preselecting a symbol set from the file called 'symbols' at startup time. The name of the symbols file is not under the users control, only the symbol set name desired from within the symbols file is. - 'symset' config file option loads a desired symbol set for everything but the rogue level. - 'roguesymset' config file option loads a desired symbol set for the rogue level. - 'SYMBOLS' config file option allows the user to specify replacement symbols on a per symbol basis. You can specify as many or as few symbols as you wish. The symbols are identified by a name:value pair, and line continuation is supported. Multiple symbol assignments can be made on the same line if each name:value pair is separated by a comma. For example: SYMBOLS = S_bars:\xf0, S_tree: \xf1, S_room:\xfa \ S_fountain:\xf4 \ S_boulder:0 - 'symbols' file has the following structure: start: DECgraphics Handling: DEC S_vwall: \xf8 # meta-x, vertical rule S_hwall: \xf1 # meta-q, horizontal rule finish start: IBMgraphics Handling: IBM S_vwall: \xb3 # meta-3, vertical rule S_hwall: \xc4 # meta-D, horizontal rule finish - 'symbols' file added to the source tree in the dat directory - Port Makefiles/scripts will need to be adjusted to move them into HACKDIR destination
This commit is contained in:
@@ -231,9 +231,9 @@ E NEARDATA struct spell spl_book[]; /* sized in decl.c */
|
||||
E const int zapcolors[];
|
||||
#endif
|
||||
|
||||
E const char def_oc_syms[MAXOCLASSES]; /* default class symbols */
|
||||
E const struct class_sym def_oc_syms[MAXOCLASSES]; /* default class symbols */
|
||||
E uchar oc_syms[MAXOCLASSES]; /* current class symbols */
|
||||
E const char def_monsyms[MAXMCLASSES]; /* default class symbols */
|
||||
E const struct class_sym def_monsyms[MAXMCLASSES]; /* default class symbols */
|
||||
E uchar monsyms[MAXMCLASSES]; /* current class symbols */
|
||||
|
||||
#include "obj.h"
|
||||
@@ -269,6 +269,8 @@ E NEARDATA struct mvitals {
|
||||
uchar mvflags;
|
||||
} mvitals[NUMMONS];
|
||||
|
||||
E struct symparse loadsyms[];
|
||||
|
||||
E NEARDATA struct c_color_names {
|
||||
const char *const c_black, *const c_amber, *const c_golden,
|
||||
*const c_light_blue,*const c_red, *const c_green,
|
||||
@@ -347,7 +349,7 @@ E struct tc_gbl_data { /* also declared in tcap.h */
|
||||
#endif
|
||||
|
||||
/* xxxexplain[] is in drawing.c */
|
||||
E const char * const monexplain[], invisexplain[], * const objexplain[], * const oclass_names[];
|
||||
E const char * const monexplain[], invisexplain[], * const oclass_names[];
|
||||
|
||||
/* Some systems want to use full pathnames for some subsets of file names,
|
||||
* rather than assuming that they're all in the current directory. This
|
||||
|
||||
Reference in New Issue
Block a user