Changeset 399
- Timestamp:
- 07/28/07 16:28:09 (1 year ago)
- Files:
-
- trunk/configure.ac (modified) (7 diffs)
- trunk/lib/edit/Makefile (modified) (2 diffs)
- trunk/lib/edit/object.txt (modified) (2 diffs)
- trunk/lib/file/news.txt (modified) (1 diff)
- trunk/lib/help/Makefile (modified) (1 diff)
- trunk/lib/help/option.txt (modified) (1 diff)
- trunk/lib/pref/pref-x11.prf (modified) (1 diff)
- trunk/mk/objective.mk (modified) (2 diffs)
- trunk/readme.txt (modified) (1 diff)
- trunk/scripts/pkg_win (modified) (1 diff)
- trunk/src/Makefile (modified) (1 diff)
- trunk/src/Makefile.osx (modified) (1 diff)
- trunk/src/Makefile.src (modified) (1 diff)
- trunk/src/birth.c (modified) (3 diffs)
- trunk/src/cmd0.c (modified) (6 diffs)
- trunk/src/cmd1.c (modified) (2 diffs)
- trunk/src/cmd2.c (modified) (2 diffs)
- trunk/src/cmd3.c (modified) (2 diffs)
- trunk/src/cmd4.c (modified) (28 diffs)
- trunk/src/cmds.h (modified) (1 diff)
- trunk/src/defines.h (modified) (3 diffs)
- trunk/src/dungeon.c (modified) (1 diff)
- trunk/src/externs.h (modified) (2 diffs)
- trunk/src/h-basic.h (modified) (2 diffs)
- trunk/src/main-gcu.c (modified) (1 diff)
- trunk/src/main-win.c (modified) (1 diff)
- trunk/src/melee1.c (modified) (1 diff)
- trunk/src/monster2.c (modified) (6 diffs)
- trunk/src/obj-info.c (modified) (1 diff)
- trunk/src/object1.c (modified) (4 diffs)
- trunk/src/object2.c (modified) (4 diffs)
- trunk/src/randart.c (modified) (1 diff)
- trunk/src/spells1.c (modified) (2 diffs)
- trunk/src/spells2.c (modified) (9 diffs)
- trunk/src/squelch.c (modified) (5 diffs)
- trunk/src/store.c (modified) (7 diffs)
- trunk/src/tables.c (modified) (6 diffs)
- trunk/src/util.c (modified) (9 diffs)
- trunk/src/wizard2.c (modified) (2 diffs)
- trunk/src/xtra1.c (modified) (5 diffs)
- trunk/src/xtra2.c (modified) (5 diffs)
- trunk/src/z-util.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/configure.ac
r299 r399 1 1 dnl Process this file with autoconf to produce a configure script. 2 AC_INIT([Angband], [3.0. 8], [bugs@rephial.org], [angband])2 AC_INIT([Angband], [3.0.9], [bugs@rephial.org], [angband]) 3 3 AC_PREREQ([2.50]) 4 4 … … 13 13 14 14 dnl Check for C compiler 15 AC_LANG([C]) 15 16 AC_PROG_CC 16 17 … … 26 27 AC_PATH_PROG(CP, cp) 27 28 28 AC_ARG_WITH(setgid, 29 [ --with-setgid=NAME install angband as group NAME], 30 [case "${withval}" in 31 no) SETEGID="";; 32 yes) AC_MSG_ERROR(missing argument for --with-setgid);; 33 *) SETEGID="$withval";; 34 esac]) 35 AC_SUBST(SETEGID) 36 37 AC_LANG([C]) 38 39 dnl generate the installation path for the ./lib/ folder 40 if test "$SETEGID" != ""; then 41 MY_EXPAND_DIR(game_datadir, "$datadir/$PACKAGE/") 42 else 43 MY_EXPAND_DIR(game_datadir, "./lib/") 44 bindir=".." 45 fi 46 47 dnl overwrite the path with an user-specified value 48 AC_ARG_WITH(libpath, 49 [ --with-libpath=path specify the path to the Angband lib folder], 50 51 [case "/$withval" in 52 */) game_datadir="$withval" ;; 53 *) game_datadir="$withval/" ;; 54 esac]) 55 56 AC_DEFINE_UNQUOTED([DEFAULT_PATH], "$game_datadir", 57 [Path to the game's lib directory]) 58 DATA_PATH="$game_datadir" 59 AC_SUBST(DATA_PATH) 29 dnl Work around an autoconf bugs. 30 if test "$prefix" = "NONE"; then 31 prefix="${ac_default_prefix}" 32 fi 33 34 35 AC_ARG_WITH(setgid, [ --with-setgid=NAME install angband as group NAME]) 36 AC_ARG_WITH(libpath, [ --with-libpath=PATH use PATH as the path to the Angband lib folder]) 37 38 if test "$with_libpath" != ""; then 39 libpath="${with_libpath}" 40 elif test "$with_setgid" != ""; then 41 libpath="${prefix}/share/${PACKAGE}/" 42 else 43 libpath="./lib/" 44 bindir=".." 45 fi 46 47 case "/$libpath" in 48 */) MY_EXPAND_DIR(game_datadir, "$libpath") ;; 49 *) MY_EXPAND_DIR(game_datadir, "$libpath/") ;; 50 esac 51 52 AC_DEFINE_UNQUOTED([DEFAULT_PATH], "${game_datadir}", [Path to the game's lib directory]) 53 54 SETEGID="$with_setgid"; AC_SUBST(SETEGID) 55 DATA_PATH="$game_datadir"; AC_SUBST(DATA_PATH) 56 60 57 61 58 dnl Frontends … … 130 127 AC_DEFINE(USE_X11, 1, [Define to 1 if using the X11 frontend and X11 libraries are found.]) 131 128 CFLAGS="$CFLAGS $X_CFLAGS" 132 LDFLAGS="$LDFLAGS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"129 LDFLAGS="$LDFLAGS $X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" 133 130 with_x11=yes 134 131 fi … … 183 180 184 181 if test "$found_sdl_mixer" = "yes"; then 185 AC_DEFINE(SDL_SOUND, 1, [Define to 1 if using SDL_mixer sound support and it's found.]) 182 AC_DEFINE(SOUND_SDL, 1, [Define to 1 if using SDL_mixer sound support and it's found.]) 183 SDL_CFLAGS=`sdl-config --cflags` 184 CFLAGS="${CFLAGS} ${SDL_CFLAGS}" 186 185 LDFLAGS="${LDFLAGS} -lSDL_mixer" 187 186 fi … … 199 198 200 199 201 dnl XXX: Work around some autoconf bugs.202 if test "$prefix" = "NONE"; then203 prefix="${ac_default_prefix}"204 fi205 if test -z "$datadir"; then206 datadir="${prefix}/share"207 fi208 209 210 200 AC_CONFIG_FILES([mk/rules.mk]) 211 212 201 AC_OUTPUT 213 202 … … 217 206 echo 218 207 echo " Install path: ${prefix}" 208 echo " lib/ path: ${game_datadir}" 219 209 echo 220 210 echo "-- Frontends --" trunk/lib/edit/Makefile
r74 r399 4 4 5 5 OBJECTIVE_DATA = \ 6 artifact.txt:$(DATA_PATH)/edit \6 artifact.txt:$(DATA_PATH)/edit \ 7 7 cost_adj.txt:${DATA_PATH}/edit \ 8 8 ego_item.txt:${DATA_PATH}/edit \ … … 10 10 limits.txt:${DATA_PATH}/edit \ 11 11 monster.txt:${DATA_PATH}/edit \ 12 object.txt:${DATA_PATH}/edit \ 12 13 p_class.txt:${DATA_PATH}/edit \ 13 14 p_hist.txt:${DATA_PATH}/edit \ trunk/lib/edit/object.txt
r325 r399 2904 2904 P:0:1d1:0:0:0 2905 2905 F:EASY_KNOW 2906 D:It is equippable as a light source with a radius of 1 square. 2907 D: It may also be used to fuel another torch, up to a maximum of 5000 2906 D:It may be used to fuel another torch, up to a maximum of 6000 2908 2907 D: turns of light. 2909 2908 … … 2915 2914 P:0:1d1:0:0:0 2916 2915 F:EASY_KNOW | IGNORE_FIRE 2917 D:It is equippable as a light source with a radius of 2 squares. 2918 D: It may also be used to fuel another lantern. 2916 D:It may be used to fuel another lantern. 2919 2917 2920 2918 N:348:& Flask~ of oil trunk/lib/file/news.txt
r162 r399 7 7 |___/ 8 8 9 Version 3.0.8 by Andrew Sidwell and Pete Mack9 Version 3.0.9 10 10 Bug reports to <bugs@rephial.org> 11 11 trunk/lib/help/Makefile
r74 r399 11 11 option.txt:${DATA_PATH}/help \ 12 12 playing.txt:${DATA_PATH}/help \ 13 version.txt:${DATA_PATH}/help 13 version.txt:${DATA_PATH}/help \ 14 help.hlp:${DATA_PATH}/help \ 15 308.txt:${DATA_PATH}/help 14 16 17 trunk/lib/help/option.txt
r282 r399 297 297 ***** <birth_no_preserve> 298 298 Don't preserve artifacts on leaving level [birth_no_preserve] 299 With preserve mode off, no artifact can be generated more than once in 300 the game. If it's on a level and you miss it, it's gone forever. 299 Normally artifacts can be generated more than once in the game - so 300 if you leave a level with an unidentified artifact on it you may 301 still find it later. With this option on, they can only be created 302 once - if you leave a level with an artifact on it's gone for the 303 rest of the game whether you knew it was there or not. 301 304 302 305 ***** <birth_no_stacking> trunk/lib/pref/pref-x11.prf
r54 r399 158 158 T:,:2C:3C 159 159 T:<:2C:3C 160 T:-:2D:3D161 T:=:2D:3D162 160 T:.:2E:3E 163 161 T:>:2E:3E trunk/mk/objective.mk
r281 r399 1 default: all 2 all: build 3 4 .SUFFIXES: .cxx .cc 1 default: build 5 2 6 3 install: build … … 265 262 am--refresh: 266 263 267 include .depend264 -include .depend trunk/readme.txt
r295 r399 1 Angband 3.0. 81 Angband 3.0.9 2 2 ============= 3 3 trunk/scripts/pkg_win
r296 r399 58 58 59 59 cp ../lib/xtra/font/*.fon lib/xtra/font 60 cp_unix2dos ../lib/xtra/font/copying.txt lib/xtra/font 60 cp_unix2dos ../lib/xtra/font/copying.txt lib/xtra/font/copying.txt 61 61 62 62 cp ../lib/xtra/graf/8x8.bmp lib/xtra/graf trunk/src/Makefile
r281 r399 17 17 18 18 angband: $(OBJECTS) 19 $(CC) $( LDFLAGS) $(OBJECTS) $(LDADD) -o $@19 $(CC) $(OBJECTS) $(LDFLAGS) $(LDADD) -o $@ 20 20 @printf "%10s %-20s\n" LINK $@ 21 22 install-posthook: 23 @if [ "x$(SETEGID)" != "x" ]; then \ 24 printf "%10s $(DESTDIR)$(BINDIR)/angband\n" CHOWN; \ 25 if [ "x$(DRY)" = "x" ]; then \ 26 chown root:${SETEGID} $(DESTDIR)$(BINDIR)/angband; \ 27 fi; \ 28 fi trunk/src/Makefile.osx
r185 r399 23 23 APPNAME =$(NAME).app 24 24 EXE =angband 25 COPYRIGHT =1995-200 6Contributors25 COPYRIGHT =1995-2007 Contributors 26 26 27 27 # Some Developer CD tools we need - the standard installation location trunk/src/Makefile.src
r325 r399 6 6 # 7 7 8 VERSION = 3.0. 88 VERSION = 3.0.9 9 9 10 10 HDRS = h-basic.h trunk/src/birth.c
r333 r399 631 631 object_known(i_ptr); 632 632 (void)inven_carry(i_ptr); 633 k_info[k_idx].everseen = TRUE; 633 634 } 634 635 } … … 645 646 object_aware(i_ptr); 646 647 object_known(i_ptr); 648 k_info[i_ptr->k_idx].everseen = TRUE; 647 649 (void)inven_carry(i_ptr); 648 650 … … 657 659 object_aware(i_ptr); 658 660 object_known(i_ptr); 661 k_info[i_ptr->k_idx].everseen = TRUE; 659 662 (void)inven_carry(i_ptr); 660 663 trunk/src/cmd0.c
r264 r399 108 108 { "Drop an item", 'd', do_cmd_drop }, 109 109 { "Destroy an item", 'k', do_cmd_destroy }, 110 { "Mark an item as squelch", 'K', do_cmd_mark_squelch }, 110 111 { "Examine an item", 'I', do_cmd_observe }, 111 112 { "Inscribe an object", '{', do_cmd_inscribe }, … … 154 155 { "Alter a grid", '+', do_cmd_alter }, 155 156 { "Walk", ';', do_cmd_walk }, 157 { "Jump into a trap", '-', do_cmd_jump }, 156 158 { "Start running", '.', do_cmd_run }, 157 159 { "Stand still", ',', do_cmd_hold }, … … 472 474 menu_type menu; 473 475 menu_iter commands_menu = { 0, 0, 0, cmd_sub_entry, cmd_sub_action }; 474 region area = { 2 4, 4, 37, 13 };476 region area = { 23, 4, 37, 13 }; 475 477 476 478 event_type evt; … … 487 489 /* Set up the screen */ 488 490 screen_save(); 489 window_make(2 2, 3, 62, 17);491 window_make(21, 3, 62, 17); 490 492 491 493 /* Select an entry */ … … 537 539 menu_type menu; 538 540 menu_iter commands_menu = { 0, 0, 0, cmd_list_entry, cmd_list_action }; 539 region area = { 2 0, 5, 37, 6 };541 region area = { 21, 5, 37, 6 }; 540 542 541 543 event_type evt; … … 552 554 /* Set up the screen */ 553 555 screen_save(); 554 window_make(1 8, 4, 58, 11);556 window_make(19, 4, 58, 11); 555 557 556 558 /* Select an entry */ trunk/src/cmd1.c
r346 r399 756 756 bool msg = TRUE; 757 757 758 bool auto_okay = p_ptr->auto_pickup_okay; 759 760 761 /* Reset auto_pickup_okay */ 762 p_ptr->auto_pickup_okay = TRUE; 763 758 764 759 765 /* Nothing to pick up -- return */ … … 780 786 781 787 /* Automatically pick up items into the backpack */ 782 if ( p_ptr->auto_pickup_okay && auto_pickup_okay(o_ptr))788 if (auto_okay && auto_pickup_okay(o_ptr)) 783 789 { 784 790 /* Pick up the object with message */ trunk/src/cmd2.c
r292 r399 2095 2095 /* Move the player */ 2096 2096 move_player(dir); 2097 } 2098 2099 /* 2100 * Jump into a trap, turn off pickup. 2101 * 2102 * What a horrible function. 2103 */ 2104 void do_cmd_jump(void) 2105 { 2106 bool old_easy_alter; 2107 2108 /* Picking up NOT okay, so whatever you heard is obviously wrong */ 2109 p_ptr->auto_pickup_okay = FALSE; 2110 2111 /* easy_alter can be turned off (don't disarm traps) */ 2112 old_easy_alter = easy_alter; 2113 easy_alter = FALSE; 2114 2115 /* Now actually do this silly walk */ 2116 do_cmd_walk(); 2117 2118 /* Restore easy_alter */ 2119 easy_alter = old_easy_alter; 2097 2120 } 2098 2121 … … 2956 2979 drop_near(i_ptr, j, y, x); 2957 2980 } 2981 2982 2983 /* 2984 * See if one can squelch a given kind of item. 2985 */ 2986 static bool squelchable_hook(const object_type *o_ptr) 2987 { 2988 object_kind *k_ptr = &k_info[o_ptr->k_idx]; 2989 2990 /* No point in double-squelching things */ 2991 if (k_ptr->squelch) return FALSE; 2992 2993 /* Don't squelch bad tvals */ 2994 if (!squelch_tval(o_ptr->tval)) return FALSE; 2995 2996 /* Only allow if aware */ 2997 return object_aware_p(o_ptr); 2998 } 2999 3000 3001 3002 /* 3003 * Mark item as "squelch". 3004 */ 3005 void do_cmd_mark_squelch() 3006 { 3007 const char *q = "Squelch which item kind? "; 3008 const char *s = "You have nothing you can squelch."; 3009 3010 object_type *o_ptr; 3011 object_kind *k_ptr; 3012 int item; 3013 3014 /* Get an item */ 3015 item_tester_hook = squelchable_hook; 3016 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return; 3017 3018 /* Get the object */ 3019 if (item >= 0) 3020 o_ptr = &inventory[item]; 3021 else 3022 o_ptr = &o_list[0 - item]; 3023 3024 /* Get object kind */ 3025 k_ptr = &k_info[o_ptr->k_idx]; 3026 3027 /* Set squelch flag */ 3028 k_ptr->squelch = TRUE; 3029 } trunk/src/cmd3.c
r346 r399 637 637 o_ptr->note = 0; 638 638 639 /* Combine the pack */640 p_ptr->notice |= (PN_COMBINE );639 /* Combine the pack, check for squelchables */ 640 p_ptr->notice |= (PN_COMBINE | PN_SQUELCH); 641 641 642 642 /* Window stuff */ … … 701 701 o_ptr->note = quark_add(tmp); 702 702 703 /* Combine the pack */704 p_ptr->notice |= (PN_COMBINE );703 /* Combine the pack, check for squelchables */ 704 p_ptr->notice |= (PN_COMBINE | PN_SQUELCH); 705 705 706 706 /* Window stuff */ trunk/src/cmd4.c
r346 r399 128 128 static struct 129 129 { 130 cptr chars;131 cptr name;130 cptr chars; 131 cptr name; 132 132 } monster_group[] = 133 133 { … … 149 149 { "H", "Harpies/Hybrids" }, 150 150 { "h", "Hominids (Elves, Dwarves)" }, 151 { " H", "Hydras" },151 { "M", "Hydras" }, 152 152 { "i", "Icky Things" }, 153 { " FI","Insects" },153 { "lFI", "Insects" }, 154 154 { "j", "Jellies" }, 155 155 { "K", "Killer Beetles" }, … … 157 157 { "L", "Lichs" }, 158 158 { "tp", "Men" }, 159 { " $?!_", "Mimics" },159 { ".$?!_", "Mimics" }, 160 160 { "m", "Molds" }, 161 161 { ",", "Mushroom Patches" }, … … 239 239 default: 240 240 { 241 if (isdigit(f_ptr->d_char)) return 7;242 241 return 8; 243 242 } … … 343 342 } 344 343 344 static const char *recall_prompt(int oid) 345 { 346 return ", 'r' to recall"; 347 } 345 348 346 349 #define swap(a, b) (swapspace = (void*)(a)), ((a) = (b)), ((b) = swapspace) … … 548 551 else if (o_funcs.xattr) pvs = ", 'v' for visuals"; 549 552 550 prt(format("<dir>, 'r' to recall%s%s%s, ESC", pvs, pedit, xtra), hgt - 1, 0); 553 554 555 prt(format("<dir>%s%s%s, ESC", pvs, pedit, xtra), hgt - 1, 0); 551 556 } 552 557 … … 1035 1040 static byte *m_xattr(int oid) { return &r_info[default_join[oid].oid].x_attr; } 1036 1041 static const char *race_name(int gid) { return monster_group[gid].name; } 1037 static void mon_lore(int oid) { screen_roff(default_join[oid].oid); inkey_ex(); } 1042 1043 static void mon_lore(int oid) 1044 { 1045 /* Save the screen */ 1046 screen_save(); 1047 1048 /* Describe */ 1049 text_out_hook = text_out_to_screen; 1050 1051 /* Recall monster */ 1052 roff_top(default_join[oid].oid); 1053 Term_gotoxy(0, 2); 1054 describe_monster(default_join[oid].oid, FALSE); 1055 1056 text_out_c(TERM_L_BLUE, "\n[Press any key to continue]\n"); 1057 (void)anykey(); 1058 1059 /* Load the screen */ 1060 screen_load(); 1061 } 1038 1062 1039 1063 static void mon_summary(int gid, const int *object_list, int n, int top, int row, int col) … … 1099 1123 m_cmp_race, default_group, mon_summary}; 1100 1124 1101 member_funcs m_funcs = {display_monster, mon_lore, m_xchar, m_xattr, 0, 0, 0};1125 member_funcs m_funcs = {display_monster, mon_lore, m_xchar, m_xattr, recall_prompt, 0, 0}; 1102 1126 1103 1127 … … 1155 1179 /* Many-to-one grouping */ 1156 1180 1157 /* 1158 * Display an artifact label 1159 */ 1160 static void display_artifact(int col, int row, bool cursor, int oid) 1161 { 1162 char o_name[80]; 1181 static void get_artifact_display_name(char *o_name, size_t namelen, int a_idx) 1182 { 1163 1183 object_type object_type_body; 1164 1184 object_type *o_ptr = &object_type_body; 1165 1185 1186 /* Make fake artifact */ 1187 o_ptr = &object_type_body; 1188 object_wipe(o_ptr); 1189 make_fake_artifact(o_ptr, a_idx); 1190 1191 /* Get its name */ 1192 object_desc_spoil(o_name, namelen, o_ptr, TRUE, 0); 1193 } 1194 1195 /* 1196 * Display an artifact label 1197 */ 1198 static void display_artifact(int col, int row, bool cursor, int oid) 1199 { 1200 char o_name[80]; 1201 1166 1202 /* Choose a color */ 1167 1203 byte attr = curs_attrs[CURS_KNOWN][(int)cursor]; 1168 1204 1169 /* Get local object */ 1170 o_ptr = &object_type_body; 1171 1172 /* Wipe the object */ 1173 object_wipe(o_ptr); 1174 1175 /* Make fake artifact */ 1176 make_fake_artifact(o_ptr, oid); 1177 1178 /* Get its name */ 1179 object_desc_spoil(o_name, sizeof(o_name), o_ptr, TRUE, 0); 1205 get_artifact_display_name(o_name, sizeof o_name, oid); 1180 1206 1181 1207 /* Display the name */ … … 1208 1234 screen_save(); 1209 1235 1236 Term_gotoxy(0, 0); 1210 1237 object_info_screen(o_ptr); 1211 1238 … … 1233 1260 static int art2gid(int oid) { return obj_group_order[a_info[oid].tval]; } 1234 1261 1262 /* Check if the given artifact idx is something we should "Know" about */ 1263 static bool artifact_is_known(int a_idx) 1264 { 1265 int i; 1266 1267 /* Artifact doesn't exist at all, or not created yet */ 1268 if (!a_info[a_idx].name || a_info[a_idx].cur_num == 0) return FALSE; 1269 1270 /* Check all objects to see if it exists but hasn't been IDed */ 1271 for (i = 0; i < z_info->o_max; i++) 1272 { 1273 int a = o_list[i].name1; 1274 1275 /* If we haven't actually identified the artifact yet */ 1276 if (a && a == a_idx && !object_known_p(&o_list[i])) 1277 { 1278 return FALSE; 1279 } 1280 } 1281 1282 /* Check inventory for the same */ 1283 for (i = 0; i < INVEN_TOTAL; i++) 1284 { 1285 object_type *o_ptr = &inventory[i]; 1286 1287 /* Ignore non-objects */ 1288 if (!o_ptr->k_idx) continue; 1289 1290 1291 if (o_ptr->name1 && o_ptr->name1 == a_idx && 1292 !object_known_p(o_ptr)) 1293 { 1294 return FALSE; 1295 } 1296 } 1297 1298 return TRUE; 1299 } 1300 1235 1301 1236 1302 /* If 'artifacts' is NULL, it counts the number of known artifacts, otherwise … … 1239 1305 { 1240 1306 int a_count = 0; 1241 int i,j;1307 int j; 1242 1308 1243 1309 if (artifacts) … … 1246 1312 for (j = 0; j < z_info->a_max; j++) 1247 1313 { 1248 /* If the artifact has been created (or we're cheating) */ 1249 if ((cheat_xtra || a_info[j].cur_num) && a_info[j].name) 1250 { 1251 bool valid = TRUE; 1252 1253 for (i = 0; !cheat_xtra && i < z_info->o_max; i++) 1254 { 1255 int a = o_list[i].name1; 1256 1257 /* If we haven't actually identified the artifact yet */ 1258 if (a && a == j && !object_known_p(&o_list[i])) 1259 { 1260 valid = FALSE; 1261 } 1262 } 1263 1264 if (valid) 1265 { 1266 if (artifacts) 1267 artifacts[a_count++] = j; 1268 else 1269 a_count++; 1270 } 1314 /* Artifact doesn't exist */ 1315 if (!a_info[j].name) continue; 1316 1317 if (cheat_xtra || artifact_is_known(j)) 1318 { 1319 if (artifacts) 1320 artifacts[a_count++] = j; 1321 else 1322 a_count++; 1271 1323 } 1272 1324 } … … 1282 1334 /* HACK -- should be TV_MAX */ 1283 1335 group_funcs obj_f = {TV_GOLD, FALSE, kind_name, a_cmp_tval, art2gid, 0}; 1284 member_funcs art_f = {display_artifact, desc_art_fake, 0, 0, 0, 0, 0};1336 member_funcs art_f = {display_artifact, desc_art_fake, 0, 0, recall_prompt, 0, 0}; 1285 1337 1286 1338 int *artifacts; … … 1342 1394 /* Begin recall */ 1343 1395 Term_gotoxy(0, 1); 1396 text_out("\n"); 1397 1344 1398 if (e_ptr->text) 1345 1399 { … … 1367 1421 } 1368 1422 1369 Term_flush(); 1370 1371 (void)inkey_ex(); 1423 text_out_c(TERM_L_BLUE, "\n\n[Press any key to continue]\n"); 1424 (void)anykey(); 1372 1425 1373 1426 screen_load(); … … 1396 1449 {TV_GOLD, FALSE, ego_grp_name, e_cmp_tval, default_group, 0}; 1397 1450 1398 member_funcs ego_f = {display_ego_item, desc_ego_fake, 0, 0, 0, 0, 0};1451 member_funcs ego_f = {display_ego_item, desc_ego_fake, 0, 0, recall_prompt, 0, 0}; 1399 1452 1400 1453 int *egoitems; … … 1434 1487 1435 1488 /* 1489 * Looks up an artifact idx given an object_kind *that's already known 1490 * to be an artifact*. Behaviour is distinctly unfriendly if passed 1491 * flavours which don't correspond to an artifact. 1492 */ 1493 static int get_artifact_from_kind(object_kind *k_ptr) 1494 { 1495 int i; 1496 1497 assert(k_ptr->flags3 & TR3_INSTA_ART); 1498 1499 /* Look for the corresponding artifact */ 1500 for (i = 0; i < z_info->a_max; i++) 1501 { 1502 if (k_ptr->tval == a_info[i].tval && 1503 k_ptr->sval == a_info[i].sval) 1504 { 1505 break; 1506 } 1507 } 1508 1509 assert(i < z_info->a_max); 1510 return i; 1511 } 1512 1513 /* 1436 1514 * Display the objects in a group. 1437 1515 */ … … 1446 1524 1447 1525 /* Choose a color */ 1448 bool aware = (k_ptr->flavor == 0) || (k_ptr->aware); 1449 byte a = (aware && k_ptr->x_attr) ? 1450 k_ptr->x_attr : flavor_info[k_ptr->flavor].x_attr; 1451 byte c = aware ? k_ptr->x_char : flavor_info[k_ptr->flavor].x_char; 1452 byte attr = curs_attrs[(int)k_ptr->flavor == 0 || k_ptr->aware][(int)cursor]; 1453 1454 /* Symbol is unknown. This should never happen.*/ 1455 if (!k_ptr->aware && !k_ptr->flavor && !p_ptr->wizard) 1456 { 1457 assert(0); 1458 c = ' '; 1459 a = TERM_DARK; 1460 } 1461 1462 /* Tidy name */ 1463 object_kind_name(o_name, sizeof o_name, k_idx, cheat_know); 1526 bool aware = (!k_ptr->flavor || k_ptr->aware); 1527 byte attr = curs_attrs[(int)aware][(int)cursor]; 1528 1529 /* Find graphics bits -- versions of the object_char and object_attr defines */ 1530 bool use_flavour = (k_ptr->flavor) && !(aware && k_ptr->tval == TV_SCROLL); 1531 1532 byte a = use_flavour ? flavor_info[k_ptr->flavor].x_attr : k_ptr->x_attr; 1533 byte c = use_flavour ? flavor_info[k_ptr->flavor].x_char : k_ptr->x_char; 1534 1535 /* Display known artifacts differently */ 1536 if ((k_ptr->flags3 & TR3_INSTA_ART) && artifact_is_known(get_artifact_from_kind(k_ptr))) 1537 { 1538 get_artifact_display_name(o_name, sizeof(o_name), get_artifact_from_kind(k_ptr)); 1539 } 1540 else 1541 { 1542 /* Tidy name */ 1543 object_kind_name(o_name, sizeof(o_name), k_idx, cheat_know); 1544 } 1464 1545 1465 1546 /* Display the name */ … … 1485 1566 static void desc_obj_fake(int k_idx) 1486 1567 { 1568 object_kind *k_ptr = &k_info[k_idx]; 1487 1569 object_type object_type_body; 1488 1570 object_type *o_ptr = &object_type_body; 1571 1572 /* Check for known artifacts, display them as artifacts */ 1573 if ((k_ptr->flags3 & TR3_INSTA_ART) && artifact_is_known(get_artifact_from_kind(k_ptr))) 1574 { 1575 desc_art_fake(get_artifact_from_kind(k_ptr)); 1576 return; 1577 } 1489 1578 1490 1579 /* Wipe the object */ … … 1568 1657 object_kind *k_ptr = &k_info[oid]; 1569 1658 s16b idx = get_autoinscription_index(oid); 1570 1571 const char *no_insc = ", ' {'";1572 const char *with_insc = ", ' {', '}'";1659 1660 const char *no_insc = ", 'r' to recall, '{'"; 1661 const char *with_insc = ", 'r' to recall, '{', '}'"; 1573 1662 1574 1663 … … 1599 1688 if (ch == '}') 1600 1689 { 1601 if (idx ) remove_autoinscription(oid);1690 if (idx != -1) remove_autoinscription(oid); 1602 1691 return; 1603 1692 } … … 2253 2342 else if (cx.type == EVT_MOVE) 2254 2343 cursor_pos = cx.index; 2255 else if (cx.type == EVT_SELECT && strchr("YN", toupper( cx.key)))2344 else if (cx.type == EVT_SELECT && strchr("YN", toupper((unsigned char) cx.key))) 2256 2345 cursor_pos++; 2257 2346 … … 2836 2925 2837 2926 int n = 0; 2838 2839 char tmp[1024]; 2840 2927 int curs_x, curs_y; 2928 2929 char tmp[1024] = ""; 2930 2931 /* Get cursor position */ 2932 Term_locate(&curs_x, &curs_y); 2841 2933 2842 2934 /* Flush */ … … 2850 2942 ch = inkey(); 2851 2943 2852 text_out_hook = text_out_to_screen;2853 2944 2854 2945 /* Read the pattern */ … … 2859 2950 buf[n] = 0; 2860 2951 2861 /* echo */ 2862 ascii_to_text(tmp, sizeof(tmp), buf+n-1); 2863 text_out(tmp); 2864 2952 /* Get representation of the sequence so far */ 2953 ascii_to_text(tmp, sizeof(tmp), buf); 2954 2955 /* Echo it after the prompt */ 2956 Term_erase(curs_x, curs_y, 80); 2957 Term_gotoxy(curs_x, curs_y); 2958 Term_addstr(-1, TERM_WHITE, tmp); 2959 2865 2960 /* Do not process macros */ 2866 2961 inkey_base = TRUE; … … 4053 4148 } 4054 4149 4150 static void do_cmd_knowledge_scores(void *obj, const char *name) 4151 { 4152 show_scores(); 4153 } 4154 4055 4155 /* 4056 4156 * Definition of the "player knowledge" menu. … … 4064 4164 {{0, "Display feature knowledge", do_cmd_knowledge_features, 0}, '5'}, 4065 4165 {{0, "Display self-knowledge", do_cmd_self_knowledge, 0}, '6'}, 4166 {{0, "Display hall of fame", do_cmd_knowledge_scores, 0}, '7'}, 4066 4167 }; 4067 4168 trunk/src/cmds.h
r293 r399 27 27 extern void do_cmd_fire(void); 28 28 extern void do_cmd_throw(void); 29 extern void do_cmd_mark_squelch(void); 29 30 30 31 /* cmd3.c */ trunk/src/defines.h
r332 r399 37 37 */ 38 38 #define VERSION_NAME "Angband" 39 #define VERSION_STRING "3.0. 8"39 #define VERSION_STRING "3.0.9" 40 40 41 41 … … <
