more symbol set stuff (trunk only)

- Instead of checking for the Rogue level, check which
  graphics are engaged (PRIMARY or ROGUESET) in the
  SYMHANDLING() macro.

- track which graphics are active through 'currentgraphics'.

- Instead of symset and roguesymset and symhandling and roguehandling
  variables, have symset and symhandling be arrays of two, with the
  following indexes:
	PRIMARY
	ROGUESET
  That reduced the amount of repeated code.
  (Not to be confused with the 'symset' and 'roguesymset' config file options
   both of which still exist)

- the symbol routines were adjusted to pass
the index , rather than 'rogueflag' and coding to roguesymset etc.

Other than fixing bugs that are encountered, this is probably
the last of the symbol stuff, with the exception of
making the symset and roguesymset config file options
accept the keyword value "default".
This commit is contained in:
nethack.allison
2006-09-22 02:00:30 +00:00
parent a3e0bf97b1
commit 719721e017
14 changed files with 251 additions and 314 deletions

View File

@@ -37,7 +37,7 @@ functions:11 _align_gname
functions:12 _altar_wrath _Amonnam _amulet _Amulet_off _Amulet_on _An _an _angry_guards
functions:13 _angry_priest _angry_shk_exists _any_light_source _aobjnam _append_slash _append_str _Armor_gone _Armor_off
functions:14 _Armor_on _armor_to_dragon _armoroff _arti_invoke _artifact_exists _artifact_hit _artifact_name _artiname
functions:15 _artitouch _askchain _assign_graphics _assign_level _assign_rnd_level _assign_rogue_graphics _assign_soundcard _assign_video
functions:15 _artitouch _askchain _assign_level _assign_rnd_level _assign_graphics _assign_soundcard _assign_video
functions:16 _assign_videocolors _assign_videoshades _assigninvlet _at_dgn_entrance _attach_egg_hatch_timeout _attack _attack_checks _attacks
functions:17 _awaken_monsters _awaken_soldiers
functions:18 _backfire _backsp _bad_location _bad_negation _bad_rock _badoption _bail _ballfall
@@ -246,7 +246,7 @@ functions:220 _spoteffects _squadmon _srandom _stackobj _standoutbeg _standouten
functions:221 _start_engulf _start_timer _start_tin _steal _steal_it _stealamulet _stealarm _stealgold
functions:223 _stop_timer _store_version _strange_feeling _strategy _string_for_env_opt _string_for_opt _strncmpi _strprepend
functions:224 _strstri _study_book _stumble_onto_mimic _sub_one_frombill _subfrombill _substitute_tiles _summon_minion _surface
functions:225 _swallow_to_glyph _swapin_file _swapout_oldest _switch_graphics _switchar _t_warn
functions:225 _swallow_to_glyph _swapin_file _swapout_oldest _switch_symbols _switchar _t_warn
functions:226 _tabexpand _tactics _take_gold _take_off _tamedog _target_on _tele _tele_jump_ok
functions:227 _tele_restrict _tele_trap _teleds _teleok _teleport_pet _temple_occupied _tended_shop _term_end_attr
functions:228 _term_end_color

View File

@@ -547,7 +547,7 @@ boolean on;
{
/* vga_HideCursor(); */
if (on) {
/* switch_graphics(DEFAULT_GRAPHICS); */
/* switch_symbols(FALSE); */
iflags.traditional_view = TRUE;
clipx = 0;
clipxmax = CO - 1;

View File

@@ -307,11 +307,11 @@ char *argv[];
#if defined(MSDOS) || defined(WIN32)
/* Player didn't specify any symbol set so use IBM defaults */
if (!symset) {
if (!symset[PRIMARY]) {
load_symset("IBMGraphics_2", PRIMARY);
}
# ifdef REINCARNATION
if (!roguesymset) {
if (!symset[ROGUESET]) {
load_symset("RogueEpyx", ROGUESET);
}
# endif
@@ -551,7 +551,7 @@ char *argv[];
# ifdef ASCIIGRAPH
load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET);
switch_graphics(TRUE);
switch_symbols(TRUE);
# endif
}
break;
@@ -560,7 +560,7 @@ char *argv[];
if (!strncmpi(argv[0]+1, "DEC", 3)) {
# ifdef ASCIIGRAPH
load_symset("DECGraphics", PRIMARY);
switch_graphics(TRUE);
switch_symbols(TRUE);
# endif
}
break;

View File

@@ -368,7 +368,7 @@ init_sco_cons()
# ifdef ASCIIGRAPH
load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET);
switch_graphics(TRUE);
switch_symbols(TRUE);
# endif
# ifdef TEXTCOLOR
if (has_colors())

View File

@@ -373,7 +373,7 @@ char *argv[];
#ifdef ASCIIGRAPH
load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET);
switch_graphics(TRUE);
switch_symbols(TRUE);
#endif
}
break;
@@ -382,7 +382,7 @@ char *argv[];
if (!strncmpi(argv[0]+1, "DEC", 3)) {
#ifdef ASCIIGRAPH
load_symset("DECGraphics", PRIMARY);
switch_graphics(TRUE);
switch_symbols(TRUE);
#endif
}
break;

View File

@@ -272,7 +272,7 @@ char *argv[];
#ifdef ASCIIGRAPH
load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET);
switch_graphics(TRUE);
switch_symbols(TRUE);
#endif
}
break;
@@ -281,7 +281,7 @@ char *argv[];
if (!strncmpi(argv[0]+1, "DEC", 3)) {
#ifdef ASCIIGRAPH
load_symset("DECGraphics", PRIMARY);
switch_graphics(TRUE);
switch_symbols(TRUE);
#endif
}
break;