Changeset 630

Show
Ignore:
Timestamp:
12/22/07 16:04:15 (9 months ago)
Author:
takkaria
Message:

Make the death code use a scrollable menu. (#416)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/file/dead.txt

    r1 r630  
    1                                                                                 
    2                _______________________                                          
    3               /                       \         ___                             
    4              /                         \ ___   /   \      ___                   
    5             /            RIP            \   \  :   :     /   \                  
    6            /                             \  : _;,,,;_    :   :                  
    7           /                               \,;_          _;,,,;_                 
    8          |                                 |   ___                              
    9          |                                 |  /   \                             
    10          |                                 |  :   :                             
    11          |                                 | _;,,,;_   ____                     
    12          |                                 |          /    \                    
    13          |                                 |          :    :                    
    14          |                                 |          :    :                    
    15          |                                 |         _;,,,,;_                   
    16          |                                 |                                    
    17          |                                 |                                    
    18          |                                 |                                    
    19         *|   *     *     *    *   *     *  | *                                  
    20 ________)/\\_)_/___(\/___(//_\)/_\//__\\(/_|_)_______                           
    211 
     2                                                                               
     3            _______________________                                          
     4           /                       \         ___                             
     5          /                         \ ___   /   \                     
     6         /            RIP            \   \  :   :                   
     7        /                             \  : _;,,,;_                 
     8       /                               \,;_          
     9      |                                 |   ___                              
     10      |                                 |  /   \                             
     11      |                                 |  :   :                             
     12      |                                 | _;,,,;_   ____                     
     13      |                                 |          /    \                    
     14      |                                 |          :    :                    
     15      |                                 |          :    :                    
     16      |                                 |         _;,,,,;_                   
     17      |                                 |                                    
     18      |                                 |                                    
     19      |                                 |                                    
     20     *|   *     *     *    *   *     *  | *                                  
     21_____)/\\_)_/___(\/___(//_\)/_\//__\\(/_|_)__________________________ 
  • trunk/src/files.c

    r628 r630  
    1717 */ 
    1818#include "angband.h" 
     19#include "ui-menu.h" 
    1920#include "cmds.h" 
    2021#include "option.h" 
     
    26412642 
    26422643 
    2643 #if 0 
    2644  
    2645 /* 
    2646  * Save a "bones" file for a dead character 
    2647  * 
    2648  * Note that we will not use these files until a later version, and 
    2649  * then we will only use the name and level on which death occured. 
    2650  * 
    2651  * Should probably attempt some form of locking... 
    2652  */ 
    2653 static void make_bones(void) 
    2654 { 
    2655         ang_file *fp; 
    2656         char str[1024]; 
    2657         char tmp[128]; 
    2658  
    2659         /* Ignore wizards and borgs */ 
    2660         if (p_ptr->noscore & (NOSCORE_WIZARD | NOSCORE_BORG)) 
    2661                 return; 
    2662  
    2663         /* Ignore people who die in town */ 
    2664         if (!p_ptr->depth) return; 
    2665  
    2666  
    2667         /* XXX XXX XXX "Bones" name */ 
    2668         strnfmt(tmp, sizeof(tmp), "bone.%03d", p_ptr->depth); 
    2669  
    2670         /* Build the filename */ 
    2671         path_build(str, sizeof(str), ANGBAND_DIR_BONE, tmp); 
    2672  
    2673         /* Do not over-write a previous ghost */ 
    2674         if (file_exists(str)) return; 
    2675  
    2676         /* Try to write a new "Bones File" */ 
    2677         safe_setuid_grab(); 
    2678         fp = file_open(str, MODE_WRITE, FTYPE_TEXT); 
    2679         safe_setuid_drop(); 
    2680  
    2681         /* Not allowed to write it?  Weird. */ 
    2682         if (!fp) return; 
    2683  
    2684         /* Save the info */ 
    2685         file_putf(fp, "%s\n", op_ptr->full_name); 
    2686         file_putf(fp, "%d\n", p_ptr->mhp); 
    2687         file_putf(fp, "%d\n", p_ptr->prace); 
    2688         file_putf(fp, "%d\n", p_ptr->pclass); 
    2689  
    2690         /* Close and save the Bones file */ 
    2691         file_close(fp); 
    2692 } 
    2693  
    2694 #endif /* 0 */ 
    26952644 
    26962645 
     
    27092658 
    27102659        char tmp[160]; 
    2711  
    27122660        char buf[1024]; 
    27132661 
    27142662        ang_file *fp; 
     2663 
     2664        int line = 7; 
    27152665 
    27162666 
     
    27352685 
    27362686 
    2737         /* King or Queen */ 
    2738         if (p_ptr->total_winner || (p_ptr->lev > PY_MAX_LEVEL)) 
    2739         { 
     2687        /* Get the right total */ 
     2688        if (p_ptr->total_winner) 
    27402689                p = "Magnificent"; 
    2741         } 
    2742  
    2743         /* Normal */ 
    27442690        else 
    2745         { 
    27462691                p = c_text + cp_ptr->title[(p_ptr->lev - 1) / 5]; 
    2747         } 
    27482692 
    27492693        center_string(buf, sizeof(buf), op_ptr->full_name); 
    2750         put_str(buf, 6, 11); 
     2694        put_str(buf, line++, 8); 
    27512695 
    27522696        center_string(buf, sizeof(buf), "the"); 
    2753         put_str(buf, 7, 11); 
     2697        put_str(buf, line++, 8); 
    27542698 
    27552699        center_string(buf, sizeof(buf), p); 
    2756         put_str(buf, 8, 11); 
    2757  
     2700        put_str(buf, line++, 8); 
     2701 
     2702        line++; 
    27582703 
    27592704        center_string(buf, sizeof(buf), c_name + cp_ptr->name); 
    2760         put_str(buf, 10, 11); 
     2705        put_str(buf, line++, 8); 
    27612706 
    27622707        strnfmt(tmp, sizeof(tmp), "Level: %d", (int)p_ptr->lev); 
    27632708        center_string(buf, sizeof(buf), tmp); 
    2764         put_str(buf, 11, 11); 
     2709        put_str(buf, line++, 8); 
    27652710 
    27662711        strnfmt(tmp, sizeof(tmp), "Exp: %ld", (long)p_ptr->exp); 
    27672712        center_string(buf, sizeof(buf), tmp); 
    2768         put_str(buf, 12, 11); 
     2713        put_str(buf, line++, 8); 
    27692714 
    27702715        strnfmt(tmp, sizeof(tmp), "AU: %ld", (long)p_ptr->au); 
    27712716        center_string(buf, sizeof(buf), tmp); 
    2772         put_str(buf, 13, 11); 
     2717        put_str(buf, line++, 8); 
    27732718 
    27742719        strnfmt(tmp, sizeof(tmp), "Killed on Level %d", p_ptr->depth); 
    27752720        center_string(buf, sizeof(buf), tmp); 
    2776         put_str(buf, 14, 11); 
     2721        put_str(buf, line++, 8); 
    27772722 
    27782723        strnfmt(tmp, sizeof(tmp), "by %s.", p_ptr->died_from); 
    27792724        center_string(buf, sizeof(buf), tmp); 
    2780         put_str(buf, 15, 11); 
    2781  
     2725        put_str(buf, line++, 8); 
     2726 
     2727        line++; 
    27822728 
    27832729        strnfmt(tmp, sizeof(tmp), "%-.24s", ctime(&death_time)); 
    27842730        center_string(buf, sizeof(buf), tmp); 
    2785         put_str(buf, 17, 11); 
     2731        put_str(buf, line++, 8); 
    27862732} 
    27872733 
     
    28372783        handle_stuff(); 
    28382784} 
    2839  
    2840  
    2841 /* 
    2842  * Display some character info 
    2843  */ 
    2844 static void show_info(void) 
    2845 { 
    2846         int i, j, k; 
    2847  
    2848         object_type *o_ptr; 
    2849  
    2850         store_type *st_ptr = &store[STORE_HOME]; 
    2851  
    2852  
    2853         /* Display player */ 
    2854         display_player(0); 
    2855  
    2856         /* Prompt for inventory */ 
    2857         prt("Hit any key to see more information (ESC to abort): ", 23, 0); 
    2858  
    2859         /* Allow abort at this point */ 
    2860         if (inkey() == ESCAPE) return; 
    2861  
    2862  
    2863         /* Show equipment and inventory */ 
    2864  
    2865         /* Equipment -- if any */ 
    2866         if (p_ptr->equip_cnt) 
    2867         { 
    2868                 Term_clear(); 
    2869                 item_tester_full = TRUE; 
    2870                 show_equip(); 
    2871                 prt("You are using: -more-", 0, 0); 
    2872                 if (inkey() == ESCAPE) return; 
    2873         } 
    2874  
    2875         /* Inventory -- if any */ 
    2876         if (p_ptr->inven_cnt) 
    2877         { 
    2878                 Term_clear(); 
    2879                 item_tester_full = TRUE; 
    2880                 show_inven(); 
    2881                 prt("You are carrying: -more-", 0, 0); 
    2882                 if (inkey() == ESCAPE) return; 
    2883         } 
    2884  
    2885  
    2886  
    2887         /* Home -- if anything there */ 
    2888         if (st_ptr->stock_num) 
    2889         { 
    2890                 /* Display contents of the home */ 
    2891                 for (k = 0, i = 0; i < st_ptr->stock_num; k++) 
    2892                 { 
    2893                         /* Clear screen */ 
    2894                         Term_clear(); 
    2895  
    2896                         /* Show 12 items */ 
    2897                         for (j = 0; (j < 12) && (i < st_ptr->stock_num); j++, i++) 
    2898                         { 
    2899                                 byte attr; 
    2900  
    2901                                 char o_name[80]; 
    2902                                 char tmp_val[80]; 
    2903  
    2904                                 /* Get the object */ 
    2905                                 o_ptr = &st_ptr->stock[i]; 
    2906  
    2907                                 /* Print header, clear line */ 
    2908                                 strnfmt(tmp_val, sizeof(tmp_val), "%c) ", I2A(j)); 
    2909                                 prt(tmp_val, j+2, 4); 
    2910  
    2911                                 /* Get the object description */ 
    2912                                 object_desc(o_name, sizeof(o_name), o_ptr, TRUE, 3); 
    2913  
    2914                                 /* Get the inventory color */ 
    2915                                 attr = tval_to_attr[o_ptr->tval % N_ELEMENTS(tval_to_attr)]; 
    2916  
    2917                                 /* Display the object */ 
    2918                                 c_put_str(attr, o_name, j+2, 7); 
    2919                         } 
    2920  
    2921                         /* Caption */ 
    2922                         prt(format("Your home contains (page %d): -more-", k+1), 0, 0); 
    2923  
    2924                         /* Wait for it */ 
    2925                         if (inkey() == ESCAPE) return; 
    2926                 } 
    2927         } 
    2928 } 
    2929  
    2930  
    2931 /* 
    2932  * Special version of 'do_cmd_examine' 
    2933  */ 
    2934 static void death_examine(void) 
    2935 { 
    2936         int item; 
    2937         cptr q, s; 
    2938  
    2939  
    2940         /* Start out in "display" mode */ 
    2941         p_ptr->command_see = TRUE; 
    2942  
    2943         /* Get an item */ 
    2944         q = "Examine which item? "; 
    2945         s = "You have nothing to examine."; 
    2946  
    2947         while (get_item(&item, q, s, (USE_INVEN | USE_EQUIP))) 
    2948         { 
    2949                 object_type *o_ptr = &inventory[item]; 
    2950  
    2951                 /* "Know" */ 
    2952                 o_ptr->ident |= IDENT_KNOWN; 
    2953  
    2954                 /* Describe */ 
    2955                 text_out_hook = text_out_to_screen; 
    2956                 screen_save(); 
    2957                 Term_gotoxy(0, 0); 
    2958  
    2959                 object_info_header(o_ptr); 
    2960                 if (!object_info_known(o_ptr)) 
    2961                         text_out("This item does not possess any special abilities."); 
    2962  
    2963                 text_out_c(TERM_L_BLUE, "\n\n[Press any key to continue]\n"); 
    2964                 (void)anykey(); 
    2965        
    2966                 screen_load(); 
    2967         } 
    2968 } 
    2969  
    2970  
    2971  
    2972  
    29732785 
    29742786 
     
    30242836 
    30252837 
     2838 
     2839 
     2840 
     2841 
     2842 
     2843static void death_file(void *unused, const char *title) 
     2844{ 
     2845        char ftmp[80]; 
     2846        strnfmt(ftmp, sizeof(ftmp), "%s.txt", op_ptr->base_name); 
     2847 
     2848        if (!get_string("File name: ", ftmp, sizeof(ftmp))) 
     2849                return; 
     2850 
     2851        if (ftmp[0] && (ftmp[0] != ' ')) 
     2852        { 
     2853                errr err; 
     2854 
     2855                /* Dump a character file */ 
     2856                screen_save(); 
     2857                err = file_character(ftmp, FALSE); 
     2858                screen_load(); 
     2859 
     2860                /* Check result */ 
     2861                if (err) 
     2862                        msg_print("Character dump failed!"); 
     2863                else 
     2864                        msg_print("Character dump successful."); 
     2865 
     2866                /* Flush messages */ 
     2867                message_flush(); 
     2868        } 
     2869} 
     2870 
     2871static void death_info(void *unused, const char *title) 
     2872{ 
     2873        int i, j, k; 
     2874        object_type *o_ptr; 
     2875        store_type *st_ptr = &store[STORE_HOME]; 
     2876 
     2877 
     2878        screen_save(); 
     2879 
     2880        /* Display player */ 
     2881        display_player(0); 
     2882 
     2883        /* Prompt for inventory */ 
     2884        prt("Hit any key to see more information (ESC to abort): ", 23, 0); 
     2885 
     2886        /* Allow abort at this point */ 
     2887        if (inkey() == ESCAPE) return; 
     2888 
     2889 
     2890        /* Show equipment and inventory */ 
     2891 
     2892        /* Equipment -- if any */ 
     2893        if (p_ptr->equip_cnt) 
     2894        { 
     2895                Term_clear(); 
     2896                item_tester_full = TRUE; 
     2897                show_equip(); 
     2898                prt("You are using: -more-", 0, 0); 
     2899                if (inkey() == ESCAPE) return; 
     2900        } 
     2901 
     2902        /* Inventory -- if any */ 
     2903        if (p_ptr->inven_cnt) 
     2904        { 
     2905                Term_clear(); 
     2906                item_tester_full = TRUE; 
     2907                show_inven(); 
     2908                prt("You are carrying: -more-", 0, 0); 
     2909                if (inkey() == ESCAPE) return; 
     2910        } 
     2911 
     2912 
     2913 
     2914        /* Home -- if anything there */ 
     2915        if (st_ptr->stock_num) 
     2916        { 
     2917                /* Display contents of the home */ 
     2918                for (k = 0, i = 0; i < st_ptr->stock_num; k++) 
     2919                { 
     2920                        /* Clear screen */ 
     2921                        Term_clear(); 
     2922 
     2923                        /* Show 12 items */ 
     2924                        for (j = 0; (j < 12) && (i < st_ptr->stock_num); j++, i++) 
     2925                        { 
     2926                                byte attr; 
     2927 
     2928                                char o_name[80]; 
     2929                                char tmp_val[80]; 
     2930 
     2931                                /* Get the object */ 
     2932                                o_ptr = &st_ptr->stock[i]; 
     2933 
     2934                                /* Print header, clear line */ 
     2935                                strnfmt(tmp_val, sizeof(tmp_val), "%c) ", I2A(j)); 
     2936                                prt(tmp_val, j+2, 4); 
     2937 
     2938                                /* Get the object description */ 
     2939                                object_desc(o_name, sizeof(o_name), o_ptr, TRUE, 3); 
     2940 
     2941                                /* Get the inventory color */ 
     2942                                attr = tval_to_attr[o_ptr->tval % N_ELEMENTS(tval_to_attr)]; 
     2943 
     2944                                /* Display the object */ 
     2945                                c_put_str(attr, o_name, j+2, 7); 
     2946                        } 
     2947 
     2948                        /* Caption */ 
     2949                        prt(format("Your home contains (page %d): -more-", k+1), 0, 0); 
     2950 
     2951                        /* Wait for it */ 
     2952                        if (inkey() == ESCAPE) return; 
     2953                } 
     2954        } 
     2955 
     2956        screen_load(); 
     2957} 
     2958 
     2959static void death_messages(void *unused, const char *title) 
     2960{ 
     2961        screen_save(); 
     2962        do_cmd_messages(); 
     2963        screen_load(); 
     2964} 
     2965 
     2966static void death_scores(void *unused, const char *title) 
     2967{ 
     2968        screen_save(); 
     2969        top_twenty(); 
     2970        screen_load(); 
     2971} 
     2972 
     2973static void death_examine(void *unused, const char *title) 
     2974{ 
     2975        int item; 
     2976        cptr q, s; 
     2977 
     2978 
     2979        screen_save(); 
     2980        Term_clear(); 
     2981 
     2982        /* Start out in "display" mode */ 
     2983        p_ptr->command_see = TRUE; 
     2984 
     2985        /* Get an item */ 
     2986        q = "Examine which item? "; 
     2987        s = "You have nothing to examine."; 
     2988 
     2989        while (get_item(&item, q, s, (USE_INVEN | USE_EQUIP))) 
     2990        { 
     2991                object_type *o_ptr = &inventory[item]; 
     2992 
     2993                /* "Know" */ 
     2994                o_ptr->ident |= IDENT_KNOWN; 
     2995 
     2996                /* Describe */ 
     2997                text_out_hook = text_out_to_screen; 
     2998                screen_save(); 
     2999                Term_gotoxy(0, 0); 
     3000 
     3001                object_info_header(o_ptr); 
     3002                if (!object_info_known(o_ptr)) 
     3003                        text_out("This item does not possess any special abilities."); 
     3004 
     3005                text_out_c(TERM_L_BLUE, "\n\n[Press any key to continue]\n"); 
     3006                (void)anykey(); 
     3007 
     3008                screen_load(); 
     3009        } 
     3010 
     3011        screen_load(); 
     3012} 
     3013 
     3014menu_type death_menu; 
     3015 
     3016static const menu_action death_actions[] = 
     3017{ 
     3018        { 'i', "Information",   death_info,     NULL }, 
     3019        { 'm', "Messages",      death_messages, NULL }, 
     3020        { 'f', "File dump",     death_file,     NULL }, 
     3021        { 'v', "View scores",   death_scores,   NULL }, 
     3022        { 'x', "Examine items", death_examine,  NULL }, 
     3023        { 'q', "Quit",          death_examine,  NULL }, 
     3024}; 
     3025 
     3026 
     3027 
     3028 
     3029static char tag_death_main(menu_type *menu, int oid) 
     3030{ 
     3031        if (death_actions[oid].id) 
     3032                return death_actions[oid].id; 
     3033 
     3034        return 0; 
     3035} 
     3036 
     3037static int valid_death_main(menu_type *menu, int oid) 
     3038{ 
     3039        if (death_actions[oid].name) 
     3040                return 1; 
     3041 
     3042        return 0; 
     3043} 
     3044 
     3045static void display_death_main(menu_type *menu, int oid, bool cursor, int row, int col, int width) 
     3046{ 
     3047        byte attr = curs_attrs[CURS_KNOWN][(int)cursor]; 
     3048 
     3049        if (death_actions[oid].name) 
     3050                c_prt(attr, death_actions[oid].name, row, col); 
     3051} 
     3052 
     3053 
     3054static const menu_iter death_iter = 
     3055{ 
     3056        0, 
     3057        tag_death_main, 
     3058        valid_death_main, 
     3059        display_death_main, 
     3060        NULL 
     3061}; 
     3062 
     3063 
     3064 
     3065 
    30263066/* 
    30273067 * Handle character death 
     
    30293069static void close_game_aux(void) 
    30303070{ 
    3031         int ch; 
    30323071        bool wants_to_quit = FALSE; 
    3033         cptr p = "[(i)nformation, (m)essages, (f)ile dump, (v)iew scores, e(x)amine item, ESC]"; 
    30343072 
    30353073 
     
    30623100        message_flush(); 
    30633101 
    3064         /* Loop */ 
    3065         while (!wants_to_quit) 
    3066         { 
    3067                 /* Describe options */ 
    3068                 Term_putstr(1, 23, -1, TERM_WHITE, p); 
    3069  
    3070                 /* Query */ 
    3071                 ch = inkey(); 
    3072  
    3073                 switch (ch) 
    3074                 { 
    3075                         /* Exit */ 
    3076                         case ESCAPE: 
    3077                         { 
    3078                                 if (get_check("Do you want to quit? ")) 
    3079                                         wants_to_quit = TRUE; 
    3080  
     3102 
     3103        /* Initialize the menus */ 
     3104        menu_type *menu; 
     3105   const char cmd_keys[] = { ARROW_LEFT, ARROW_RIGHT, '\0' }; 
     3106        const region area = { 51, 2, 0, 6 }; 
     3107 
     3108        int cursor = 0; 
     3109        ui_event_data c = EVENT_EMPTY; 
     3110 
     3111 
     3112        /* options screen selection menu */ 
     3113        menu = &death_menu; 
     3114        WIPE(menu, menu_type); 
     3115        menu_set_id(menu, 1); 
     3116        menu->menu_data = death_actions; 
     3117        menu->flags = MN_CASELESS_TAGS; 
     3118        menu->cmd_keys = cmd_keys; 
     3119        menu->count = N_ELEMENTS(death_actions); 
     3120 
     3121        menu_init2(menu, find_menu_skin(MN_SCROLL), &death_iter, &area); 
     3122 
     3123        while (TRUE) 
     3124        { 
     3125                c = menu_select(&death_menu, &cursor, 0); 
     3126 
     3127                if (c.key == ESCAPE || cursor == 5) 
     3128                { 
     3129                        if (get_check("Do you want to quit? ")) 
    30813130                                break; 
    3082                         } 
    3083  
    3084                         /* File dump */ 
    3085                         case 'f': 
    3086                         case 'F': 
    3087                         { 
    3088                                 char ftmp[80]; 
    3089  
    3090                                 strnfmt(ftmp, sizeof(ftmp), "%s.txt", op_ptr->base_name); 
    3091  
    3092                                 if (get_string("File name: ", ftmp, sizeof(ftmp))) 
    3093                                 { 
    3094                                         if (ftmp[0] && (ftmp[0] != ' ')) 
    3095                                         { 
    3096                                                 errr err; 
    3097  
    3098                                                 /* Save screen */ 
    3099                                                 screen_save(); 
    3100  
    3101                                                 /* Dump a character file */ 
    3102                                                 err = file_character(ftmp, FALSE); 
    3103  
    3104                                                 /* Load screen */ 
    3105                                                 screen_load(); 
    3106  
    3107                                                 /* Check result */ 
    3108                                                 if (err) 
    3109                                                 { 
    3110                                                         msg_print("Character dump failed!"); 
    3111                                                 } 
    3112                                                 else 
    3113                                                 { 
    3114                                                         msg_print("Character dump successful."); 
    3115                                                 } 
    3116  
    3117                                                 /* Flush messages */ 
    3118                                                 message_flush(); 
    3119                                         } 
    3120                                 } 
    3121  
    3122                                 break; 
    3123                         } 
    3124  
    3125                         /* Show more info */ 
    3126                         case 'i': 
    3127                         case 'I': 
    3128                         { 
    3129                                 /* Save screen */ 
    3130                                 screen_save(); 
    3131  
    3132                                 /* Show the character */ 
    3133                                 show_info(); 
    3134  
    3135                                 /* Load screen */ 
    3136                                 screen_load(); 
    3137  
    3138                                 break; 
    3139                         } 
    3140  
    3141                         /* Show last messages */ 
    3142                         case 'm': 
    3143                         case 'M': 
    3144                         { 
    3145                                 /* Save screen */ 
    3146                                 screen_save(); 
    3147  
    3148                                 /* Display messages */ 
    3149                                 do_cmd_messages(); 
    3150  
    3151                                 /* Load screen */ 
    3152                                 screen_load(); 
    3153  
    3154                                 break; 
    3155                         } 
    3156  
    3157                         /* Show top scores */ 
    3158                         case 'v': 
    3159                         case 'V': 
    3160                         { 
    3161                                 /* Save screen */ 
    3162                                 screen_save(); 
    3163  
    3164                                 /* Show the scores */ 
    3165                                 top_twenty(); 
    3166  
    3167                                 /* Load screen */ 
    3168                                 screen_load(); 
    3169  
    3170                                 break; 
    3171                         } 
    3172  
    3173                         /* Examine an item */ 
    3174                         case 'x': 
    3175                         case 'X': 
    3176                         { 
    3177                                 /* Save screen */ 
    3178                                 screen_save(); 
    3179  
    3180                                 /* Clear the screen */ 
    3181                                 Term_clear(); 
    3182  
    3183                                 /* Examine items */ 
    3184                                 death_examine(); 
    3185  
    3186                                 /* Load screen */ 
    3187                                 screen_load(); 
    3188  
    3189                                 break; 
    3190                         } 
    3191                 } 
    3192         } 
    3193  
    3194 #if 0 
    3195         /* Dump bones file */ 
    3196         make_bones(); 
    3197 #endif 
     3131                } 
     3132                else if (c.type == EVT_SELECT && death_actions[cursor].action) 
     3133                { 
     3134                        death_actions[cursor].action(death_actions[cursor].data, NULL); 
     3135                } 
     3136        } 
    31983137} 
    31993138