Changeset 399

Show
Ignore:
Timestamp:
07/28/07 16:28:09 (1 year ago)
Author:
takkaria
Message:

Merge changes [324]-[396] from the angband-3.0.8 branch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/configure.ac

    r299 r399  
    11dnl Process this file with autoconf to produce a configure script. 
    2 AC_INIT([Angband], [3.0.8], [bugs@rephial.org], [angband]) 
     2AC_INIT([Angband], [3.0.9], [bugs@rephial.org], [angband]) 
    33AC_PREREQ([2.50]) 
    44 
     
    1313 
    1414dnl Check for C compiler 
     15AC_LANG([C]) 
    1516AC_PROG_CC 
    1617 
     
    2627AC_PATH_PROG(CP, cp) 
    2728 
    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) 
     29dnl Work around an autoconf bugs. 
     30if test "$prefix" = "NONE"; then 
     31        prefix="${ac_default_prefix}" 
     32fi 
     33 
     34 
     35AC_ARG_WITH(setgid,  [  --with-setgid=NAME      install angband as group NAME]) 
     36AC_ARG_WITH(libpath, [  --with-libpath=PATH     use PATH as the path to the Angband lib folder]) 
     37 
     38if test "$with_libpath" != ""; then 
     39        libpath="${with_libpath}" 
     40elif test "$with_setgid" != ""; then 
     41        libpath="${prefix}/share/${PACKAGE}/" 
     42else 
     43        libpath="./lib/" 
     44        bindir=".." 
     45fi 
     46 
     47case "/$libpath" in 
     48        */) MY_EXPAND_DIR(game_datadir, "$libpath")  ;; 
     49        *)  MY_EXPAND_DIR(game_datadir, "$libpath/") ;; 
     50esac 
     51 
     52AC_DEFINE_UNQUOTED([DEFAULT_PATH], "${game_datadir}", [Path to the game's lib directory]) 
     53 
     54SETEGID="$with_setgid";    AC_SUBST(SETEGID) 
     55DATA_PATH="$game_datadir"; AC_SUBST(DATA_PATH) 
     56 
    6057 
    6158dnl Frontends 
     
    130127                AC_DEFINE(USE_X11, 1, [Define to 1 if using the X11 frontend and X11 libraries are found.]) 
    131128                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" 
    133130                with_x11=yes 
    134131        fi 
     
    183180 
    184181        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}" 
    186185                LDFLAGS="${LDFLAGS} -lSDL_mixer" 
    187186        fi 
     
    199198 
    200199 
    201 dnl XXX: Work around some autoconf bugs. 
    202 if test "$prefix" = "NONE"; then 
    203         prefix="${ac_default_prefix}" 
    204 fi 
    205 if test -z "$datadir"; then 
    206         datadir="${prefix}/share" 
    207 fi 
    208  
    209  
    210200AC_CONFIG_FILES([mk/rules.mk]) 
    211  
    212201AC_OUTPUT 
    213202 
     
    217206echo 
    218207echo "  Install path:                           ${prefix}" 
     208echo "  lib/ path:                              ${game_datadir}" 
    219209echo 
    220210echo "-- Frontends --" 
  • trunk/lib/edit/Makefile

    r74 r399  
    44 
    55OBJECTIVE_DATA =                        \ 
    6         artifact.txt:$(DATA_PATH)/edit
     6        artifact.txt:$(DATA_PATH)/edit
    77        cost_adj.txt:${DATA_PATH}/edit  \ 
    88        ego_item.txt:${DATA_PATH}/edit  \ 
     
    1010        limits.txt:${DATA_PATH}/edit    \ 
    1111        monster.txt:${DATA_PATH}/edit   \ 
     12        object.txt:${DATA_PATH}/edit    \ 
    1213        p_class.txt:${DATA_PATH}/edit   \ 
    1314        p_hist.txt:${DATA_PATH}/edit    \ 
  • trunk/lib/edit/object.txt

    r325 r399  
    29042904P:0:1d1:0:0:0 
    29052905F: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 
     2906D:It may be used to fuel another torch, up to a maximum of 6000 
    29082907D: turns of light. 
    29092908 
     
    29152914P:0:1d1:0:0:0 
    29162915F: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. 
     2916D:It may be used to fuel another lantern. 
    29192917 
    29202918N:348:& Flask~ of oil 
  • trunk/lib/file/news.txt

    r162 r399  
    77                                |___/ 
    88 
    9                  Version 3.0.8 by Andrew Sidwell and Pete Mack 
     9                                Version 3.0.9 
    1010                       Bug reports to <bugs@rephial.org> 
    1111 
  • trunk/lib/help/Makefile

    r74 r399  
    1111        option.txt:${DATA_PATH}/help  \ 
    1212        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 
    1416 
     17 
  • trunk/lib/help/option.txt

    r282 r399  
    297297***** <birth_no_preserve> 
    298298Don'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. 
    301304 
    302305***** <birth_no_stacking> 
  • trunk/lib/pref/pref-x11.prf

    r54 r399  
    158158T:,:2C:3C 
    159159T:<:2C:3C 
    160 T:-:2D:3D 
    161 T:=:2D:3D 
    162160T:.:2E:3E 
    163161T:>:2E:3E 
  • trunk/mk/objective.mk

    r281 r399  
    1 default: all 
    2 all: build 
    3  
    4 .SUFFIXES: .cxx .cc 
     1default: build 
    52 
    63install: build 
     
    265262am--refresh: 
    266263 
    267 include .depend 
     264-include .depend 
  • trunk/readme.txt

    r295 r399  
    1 Angband 3.0.8 
     1Angband 3.0.9 
    22============= 
    33 
  • trunk/scripts/pkg_win

    r296 r399  
    5858 
    5959cp ../lib/xtra/font/*.fon lib/xtra/font 
    60 cp_unix2dos ../lib/xtra/font/copying.txt lib/xtra/font 
     60cp_unix2dos ../lib/xtra/font/copying.txt lib/xtra/font/copying.txt 
    6161 
    6262cp ../lib/xtra/graf/8x8.bmp lib/xtra/graf 
  • trunk/src/Makefile

    r281 r399  
    1717 
    1818angband: $(OBJECTS) 
    19         $(CC) $(LDFLAGS) $(OBJECTS) $(LDADD) -o $@  
     19        $(CC) $(OBJECTS) $(LDFLAGS) $(LDADD) -o $@  
    2020        @printf "%10s     %-20s\n" LINK $@ 
     21 
     22install-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  
    2323APPNAME =$(NAME).app 
    2424EXE =angband 
    25 COPYRIGHT =1995-2006 Contributors 
     25COPYRIGHT =1995-2007 Contributors 
    2626 
    2727# Some Developer CD tools we need - the standard installation location 
  • trunk/src/Makefile.src

    r325 r399  
    66# 
    77 
    8 VERSION = 3.0.8 
     8VERSION = 3.0.9 
    99 
    1010HDRS = h-basic.h 
  • trunk/src/birth.c

    r333 r399  
    631631                        object_known(i_ptr); 
    632632                        (void)inven_carry(i_ptr); 
     633                        k_info[k_idx].everseen = TRUE; 
    633634                } 
    634635        } 
     
    645646        object_aware(i_ptr); 
    646647        object_known(i_ptr); 
     648        k_info[i_ptr->k_idx].everseen = TRUE; 
    647649        (void)inven_carry(i_ptr); 
    648650 
     
    657659        object_aware(i_ptr); 
    658660        object_known(i_ptr); 
     661        k_info[i_ptr->k_idx].everseen = TRUE; 
    659662        (void)inven_carry(i_ptr); 
    660663 
  • trunk/src/cmd0.c

    r264 r399  
    108108        { "Drop an item",              'd', do_cmd_drop }, 
    109109        { "Destroy an item",           'k', do_cmd_destroy }, 
     110        { "Mark an item as squelch",   'K', do_cmd_mark_squelch }, 
    110111        { "Examine an item",           'I', do_cmd_observe }, 
    111112        { "Inscribe an object",        '{', do_cmd_inscribe }, 
     
    154155        { "Alter a grid",             '+', do_cmd_alter }, 
    155156        { "Walk",                     ';', do_cmd_walk }, 
     157        { "Jump into a trap",         '-', do_cmd_jump }, 
    156158        { "Start running",            '.', do_cmd_run }, 
    157159        { "Stand still",              ',', do_cmd_hold }, 
     
    472474        menu_type menu; 
    473475        menu_iter commands_menu = { 0, 0, 0, cmd_sub_entry, cmd_sub_action }; 
    474         region area = { 24, 4, 37, 13 }; 
     476        region area = { 23, 4, 37, 13 }; 
    475477 
    476478        event_type evt; 
     
    487489        /* Set up the screen */ 
    488490        screen_save(); 
    489         window_make(22, 3, 62, 17); 
     491        window_make(21, 3, 62, 17); 
    490492 
    491493        /* Select an entry */ 
     
    537539        menu_type menu; 
    538540        menu_iter commands_menu = { 0, 0, 0, cmd_list_entry, cmd_list_action }; 
    539         region area = { 20, 5, 37, 6 }; 
     541        region area = { 21, 5, 37, 6 }; 
    540542 
    541543        event_type evt; 
     
    552554        /* Set up the screen */ 
    553555        screen_save(); 
    554         window_make(18, 4, 58, 11); 
     556        window_make(19, 4, 58, 11); 
    555557 
    556558        /* Select an entry */ 
  • trunk/src/cmd1.c

    r346 r399  
    756756        bool msg = TRUE; 
    757757 
     758        bool auto_okay = p_ptr->auto_pickup_okay; 
     759 
     760 
     761        /* Reset auto_pickup_okay */ 
     762        p_ptr->auto_pickup_okay = TRUE; 
     763 
    758764 
    759765        /* Nothing to pick up -- return */ 
     
    780786 
    781787                /* 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)) 
    783789                { 
    784790                        /* Pick up the object with message */ 
  • trunk/src/cmd2.c

    r292 r399  
    20952095        /* Move the player */ 
    20962096        move_player(dir); 
     2097} 
     2098 
     2099/* 
     2100 * Jump into a trap, turn off pickup. 
     2101 * 
     2102 * What a horrible function. 
     2103 */ 
     2104void 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; 
    20972120} 
    20982121 
     
    29562979        drop_near(i_ptr, j, y, x); 
    29572980} 
     2981 
     2982 
     2983/* 
     2984 * See if one can squelch a given kind of item. 
     2985 */ 
     2986static 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 */ 
     3005void 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  
    637637        o_ptr->note = 0; 
    638638 
    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); 
    641641 
    642642        /* Window stuff */ 
     
    701701                o_ptr->note = quark_add(tmp); 
    702702 
    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); 
    705705 
    706706                /* Window stuff */ 
  • trunk/src/cmd4.c

    r346 r399  
    128128static struct 
    129129{ 
    130                cptr chars; 
    131                cptr name; 
     130        cptr chars; 
     131        cptr name; 
    132132} monster_group[] = 
    133133{ 
     
    149149        { "H",          "Harpies/Hybrids" }, 
    150150        { "h",          "Hominids (Elves, Dwarves)" }, 
    151         { "H",                "Hydras" }, 
     151        { "M",                "Hydras" }, 
    152152        { "i",          "Icky Things" }, 
    153         { "FI",               "Insects" }, 
     153        { "lFI",      "Insects" }, 
    154154        { "j",          "Jellies" }, 
    155155        { "K",          "Killer Beetles" }, 
     
    157157        { "L",          "Lichs" }, 
    158158        { "tp",         "Men" }, 
    159         { "$?!_",     "Mimics" }, 
     159        { ".$?!_",    "Mimics" }, 
    160160        { "m",          "Molds" }, 
    161161        { ",",          "Mushroom Patches" }, 
     
    239239                default: 
    240240                { 
    241                         if (isdigit(f_ptr->d_char)) return 7; 
    242241                        return 8; 
    243242                } 
     
    343342} 
    344343 
     344static const char *recall_prompt(int oid) 
     345{ 
     346        return ", 'r' to recall"; 
     347} 
    345348 
    346349#define swap(a, b) (swapspace = (void*)(a)), ((a) = (b)), ((b) = swapspace) 
     
    548551                        else if (o_funcs.xattr) pvs = ", 'v' for visuals"; 
    549552 
    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); 
    551556                } 
    552557 
     
    10351040static byte *m_xattr(int oid) { return &r_info[default_join[oid].oid].x_attr; } 
    10361041static 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 
     1043static 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
    10381062 
    10391063static void mon_summary(int gid, const int *object_list, int n, int top, int row, int col) 
     
    10991123                                                        m_cmp_race, default_group, mon_summary}; 
    11001124 
    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}; 
    11021126 
    11031127         
     
    11551179/* Many-to-one grouping */ 
    11561180 
    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]; 
     1181static void get_artifact_display_name(char *o_name, size_t namelen, int a_idx) 
     1182
    11631183        object_type object_type_body; 
    11641184        object_type *o_ptr = &object_type_body; 
    11651185 
     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 */ 
     1198static void display_artifact(int col, int row, bool cursor, int oid) 
     1199{ 
     1200        char o_name[80]; 
     1201 
    11661202        /* Choose a color */ 
    11671203        byte attr = curs_attrs[CURS_KNOWN][(int)cursor]; 
    11681204 
    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); 
    11801206 
    11811207        /* Display the name */ 
     
    12081234        screen_save(); 
    12091235 
     1236        Term_gotoxy(0, 0); 
    12101237        object_info_screen(o_ptr); 
    12111238 
     
    12331260static int art2gid(int oid) { return obj_group_order[a_info[oid].tval]; } 
    12341261 
     1262/* Check if the given artifact idx is something we should "Know" about */ 
     1263static 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  
    12351301 
    12361302/* If 'artifacts' is NULL, it counts the number of known artifacts, otherwise 
     
    12391305{ 
    12401306        int a_count = 0; 
    1241         int i, j; 
     1307        int j; 
    12421308 
    12431309        if (artifacts) 
     
    12461312        for (j = 0; j < z_info->a_max; j++) 
    12471313        { 
    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++; 
    12711323                } 
    12721324        } 
     
    12821334        /* HACK -- should be TV_MAX */ 
    12831335        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}; 
    12851337 
    12861338        int *artifacts; 
     
    13421394        /* Begin recall */ 
    13431395        Term_gotoxy(0, 1); 
     1396        text_out("\n"); 
     1397 
    13441398        if (e_ptr->text) 
    13451399        { 
     
    13671421        } 
    13681422 
    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(); 
    13721425 
    13731426        screen_load(); 
     
    13961449                {TV_GOLD, FALSE, ego_grp_name, e_cmp_tval, default_group, 0}; 
    13971450 
    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}; 
    13991452 
    14001453        int *egoitems; 
     
    14341487 
    14351488/* 
     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 */ 
     1493static 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/* 
    14361514 * Display the objects in a group. 
    14371515 */ 
     
    14461524 
    14471525        /* 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        } 
    14641545 
    14651546        /* Display the name */ 
     
    14851566static void desc_obj_fake(int k_idx) 
    14861567{ 
     1568        object_kind *k_ptr = &k_info[k_idx]; 
    14871569        object_type object_type_body; 
    14881570        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        } 
    14891578 
    14901579        /* Wipe the object */ 
     
    15681657        object_kind *k_ptr = &k_info[oid]; 
    15691658        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, '{', '}'"; 
    15731662 
    15741663 
     
    15991688        if (ch == '}') 
    16001689        { 
    1601                 if (idx) remove_autoinscription(oid); 
     1690                if (idx != -1) remove_autoinscription(oid); 
    16021691                return; 
    16031692        } 
     
    22532342                else if (cx.type == EVT_MOVE) 
    22542343                        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))) 
    22562345                        cursor_pos++; 
    22572346 
     
    28362925 
    28372926        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); 
    28412933 
    28422934        /* Flush */ 
     
    28502942        ch = inkey(); 
    28512943 
    2852         text_out_hook = text_out_to_screen; 
    28532944 
    28542945        /* Read the pattern */ 
     
    28592950                buf[n] = 0; 
    28602951 
    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                 
    28652960                /* Do not process macros */ 
    28662961                inkey_base = TRUE; 
     
    40534148} 
    40544149 
     4150static void do_cmd_knowledge_scores(void *obj, const char *name) 
     4151{ 
     4152        show_scores(); 
     4153} 
     4154 
    40554155/* 
    40564156 * Definition of the "player knowledge" menu. 
     
    40644164        {{0, "Display feature knowledge", do_cmd_knowledge_features, 0}, '5'}, 
    40654165        {{0, "Display self-knowledge", do_cmd_self_knowledge, 0}, '6'}, 
     4166        {{0, "Display hall of fame", do_cmd_knowledge_scores, 0}, '7'}, 
    40664167}; 
    40674168 
  • trunk/src/cmds.h

    r293 r399  
    2727extern void do_cmd_fire(void); 
    2828extern void do_cmd_throw(void); 
     29extern void do_cmd_mark_squelch(void); 
    2930 
    3031/* cmd3.c */ 
  • trunk/src/defines.h

    <
    r332 r399  
    3737 */ 
    3838#define VERSION_NAME   "Angband" 
    39 #define VERSION_STRING "3.0.8
     39#define VERSION_STRING "3.0.9
    4040 
    4141