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:
@@ -109,6 +109,12 @@ struct objclass {
|
||||
unsigned short oc_nutrition; /* food value */
|
||||
};
|
||||
|
||||
struct class_sym {
|
||||
char sym;
|
||||
char *name;
|
||||
char *explain;
|
||||
};
|
||||
|
||||
struct objdescr {
|
||||
const char *oc_name; /* actual name */
|
||||
const char *oc_descr; /* description when name unknown */
|
||||
@@ -149,7 +155,7 @@ extern NEARDATA struct objdescr obj_descr[];
|
||||
#define MON_EXPLODE (MAXOCLASSES+2) /* Exploding monster (e.g. gas spore) */
|
||||
|
||||
#if 0 /* moved to decl.h so that makedefs.c won't see them */
|
||||
extern const char def_oc_syms[MAXOCLASSES]; /* default class symbols */
|
||||
extern const struct class_sym def_oc_syms[MAXOCLASSES]; /* default class symbols */
|
||||
extern uchar oc_syms[MAXOCLASSES]; /* current class symbols */
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user