Changeset 715
- Timestamp:
- 02/26/08 04:21:07 (6 months ago)
- Files:
-
- trunk/src/cmd1.c (modified) (2 diffs)
- trunk/src/cmd3.c (modified) (2 diffs)
- trunk/src/death.c (modified) (3 diffs)
- trunk/src/dungeon.c (modified) (1 diff)
- trunk/src/obj-ui.c (modified) (23 diffs)
- trunk/src/store.c (modified) (1 diff)
- trunk/src/types.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/cmd1.c
r653 r715 504 504 item_tester_hook = inven_carry_okay; 505 505 506 /* Request a list */507 p_ptr->command_see = TRUE;508 509 506 /* Get an object or exit. */ 510 507 q = "Get which item?"; … … 512 509 if (!get_item(&item, q, s, USE_FLOOR)) 513 510 return (objs_picked_up); 514 511 515 512 this_o_idx = 0 - item; 516 513 call_function_again = TRUE; trunk/src/cmd3.c
r698 r715 61 61 p_ptr->command_new = 0; 62 62 } 63 64 /* Hack -- Process normal keys */65 else66 {67 /* Hack -- Use "display" mode */68 p_ptr->command_see = TRUE;69 }70 63 } 71 64 … … 106 99 /* Reset stuff */ 107 100 p_ptr->command_new = 0; 108 }109 110 /* Hack -- Process normal keys */111 else112 {113 /* Enter "display" mode */114 p_ptr->command_see = TRUE;115 101 } 116 102 } trunk/src/death.c
r653 r715 227 227 228 228 /* Prompt for inventory */ 229 prt("Hit any key to see more information (ESC to abort): ", 23, 0);229 prt("Hit any key to see more information (ESC to abort): ", 0, 0); 230 230 231 231 /* Allow abort at this point */ … … 339 339 (void)title; 340 340 341 342 screen_save();343 Term_clear();344 345 /* Start out in "display" mode */346 p_ptr->command_see = TRUE;347 348 341 /* Get an item */ 349 342 q = "Examine which item? "; … … 368 361 screen_load(); 369 362 } 370 371 screen_load();372 363 } 373 364 trunk/src/dungeon.c
r698 r715 1185 1185 1186 1186 1187 /* Hack -- cancel "lurking browse mode"*/1188 if (!p_ptr->command_new) p_ptr->command_ see = FALSE;1187 /* Hack -- reset to inventory display */ 1188 if (!p_ptr->command_new) p_ptr->command_wrk = USE_INVEN; 1189 1189 1190 1190 trunk/src/obj-ui.c
r698 r715 731 731 * also to induce "auto-enter" of stores, and other such stuff. 732 732 * 733 * Global "p_ptr->command_see" may be set before calling this function to start734 * out in "browse" mode. It is cleared before this function returns.735 *736 733 * Global "p_ptr->command_wrk" is used to choose between equip/inven/floor 737 734 * listings. It is equal to USE_INVEN or USE_EQUIP or USE_FLOOR, except … … 779 776 int floor_num; 780 777 781 782 /* Always show lists */ 783 if (OPT(show_lists)) p_ptr->command_see = TRUE; 778 bool show_list = OPT(show_lists) ? TRUE : FALSE; 784 779 785 780 … … 869 864 if (!allow_inven && !allow_equip && !allow_floor) 870 865 { 871 /* Cancel p_ptr->command_see */872 if (!OPT(show_lists)) p_ptr->command_see = FALSE;873 874 866 /* Oops */ 875 867 oops = TRUE; 876 877 /* Done */878 868 done = TRUE; 879 869 } … … 883 873 { 884 874 /* Hack -- Start on equipment if requested */ 885 if (p_ptr->command_see && 886 (p_ptr->command_wrk == (USE_EQUIP)) && 887 use_equip) 888 { 889 p_ptr->command_wrk = (USE_EQUIP); 890 } 875 if ((p_ptr->command_wrk == USE_EQUIP) && use_equip) 876 p_ptr->command_wrk = USE_EQUIP; 891 877 892 878 /* Use inventory if allowed */ 893 879 else if (use_inven) 894 { 895 p_ptr->command_wrk = (USE_INVEN); 896 } 880 p_ptr->command_wrk = USE_INVEN; 897 881 898 882 /* Use equipment if allowed */ 899 883 else if (use_equip) 900 { 901 p_ptr->command_wrk = (USE_EQUIP); 902 } 884 p_ptr->command_wrk = USE_EQUIP; 903 885 904 886 /* Use floor if allowed */ 905 887 else if (use_floor) 906 { 907 p_ptr->command_wrk = (USE_FLOOR); 908 } 888 p_ptr->command_wrk = USE_FLOOR; 909 889 910 890 /* Hack -- Use (empty) inventory */ 911 891 else 912 { 913 p_ptr->command_wrk = (USE_INVEN); 914 } 892 p_ptr->command_wrk = USE_INVEN; 915 893 } 916 894 917 895 918 896 /* Start out in "display" mode */ 919 if ( p_ptr->command_see)897 if (show_list) 920 898 { 921 899 /* Save screen */ … … 944 922 945 923 /* Toggle if needed */ 946 if (((p_ptr->command_wrk == (USE_EQUIP)) && ni && !ne) ||947 ((p_ptr->command_wrk == (USE_INVEN)) && !ni && ne))924 if (((p_ptr->command_wrk == USE_EQUIP) && ni && !ne) || 925 ((p_ptr->command_wrk == USE_INVEN) && !ni && ne)) 948 926 { 949 927 /* Toggle */ … … 961 939 962 940 /* Viewing inventory */ 963 if (p_ptr->command_wrk == (USE_INVEN))941 if (p_ptr->command_wrk == USE_INVEN) 964 942 { 965 943 /* Redraw if needed */ 966 if ( p_ptr->command_see) show_inven();944 if (show_list) show_inven(); 967 945 968 946 /* Begin the prompt */ … … 981 959 982 960 /* Indicate ability to "view" */ 983 if (! p_ptr->command_see)961 if (!show_list) 984 962 { 985 963 my_strcat(out_val, " * to see,", sizeof(out_val)); … … 1010 988 1011 989 /* Viewing equipment */ 1012 else if (p_ptr->command_wrk == (USE_EQUIP))990 else if (p_ptr->command_wrk == USE_EQUIP) 1013 991 { 1014 992 /* Redraw if needed */ 1015 if ( p_ptr->command_see) show_equip();993 if (show_list) show_equip(); 1016 994 1017 995 /* Begin the prompt */ … … 1030 1008 1031 1009 /* Indicate ability to "view" */ 1032 if (! p_ptr->command_see)1010 if (!show_list) 1033 1011 { 1034 1012 my_strcat(out_val, " * to see,", sizeof(out_val)); … … 1055 1033 { 1056 1034 /* Redraw if needed */ 1057 if ( p_ptr->command_see) show_floor(floor_list, floor_num, FALSE);1035 if (show_list) show_floor(floor_list, floor_num, FALSE); 1058 1036 1059 1037 /* Begin the prompt */ … … 1071 1049 1072 1050 /* Indicate ability to "view" */ 1073 if (! p_ptr->command_see)1051 if (!show_list) 1074 1052 { 1075 1053 my_strcat(out_val, " * to see,", sizeof(out_val)); … … 1130 1108 { 1131 1109 /* Hide the list */ 1132 if ( p_ptr->command_see)1110 if (show_list) 1133 1111 { 1134 1112 /* Flip flag */ 1135 p_ptr->command_see= FALSE;1113 show_list = FALSE; 1136 1114 1137 1115 /* Load screen */ … … 1146 1124 1147 1125 /* Flip flag */ 1148 p_ptr->command_see= TRUE;1126 show_list = TRUE; 1149 1127 } 1150 1128 } … … 1156 1134 { 1157 1135 /* Toggle to inventory */ 1158 if (use_inven && (p_ptr->command_wrk != (USE_INVEN)))1159 { 1160 p_ptr->command_wrk = (USE_INVEN);1136 if (use_inven && (p_ptr->command_wrk != USE_INVEN)) 1137 { 1138 p_ptr->command_wrk = USE_INVEN; 1161 1139 } 1162 1140 1163 1141 /* Toggle to equipment */ 1164 else if (use_equip && (p_ptr->command_wrk != (USE_EQUIP)))1165 { 1166 p_ptr->command_wrk = (USE_EQUIP);1142 else if (use_equip && (p_ptr->command_wrk != USE_EQUIP)) 1143 { 1144 p_ptr->command_wrk = USE_EQUIP; 1167 1145 } 1168 1146 … … 1174 1152 } 1175 1153 1154 1176 1155 /* Hack -- Fix screen */ 1177 if ( p_ptr->command_see)1156 if (show_list) 1178 1157 { 1179 1158 /* Load screen */ … … 1223 1202 1224 1203 /* Hack -- Fix screen */ 1225 if ( p_ptr->command_see)1204 if (show_list) 1226 1205 { 1227 1206 /* Load screen */ … … 1302 1281 { 1303 1282 /* Choose "default" inventory item */ 1304 if (p_ptr->command_wrk == (USE_INVEN))1283 if (p_ptr->command_wrk == USE_INVEN) 1305 1284 { 1306 1285 if (i1 != i2) … … 1314 1293 1315 1294 /* Choose "default" equipment item */ 1316 else if (p_ptr->command_wrk == (USE_EQUIP))1295 else if (p_ptr->command_wrk == USE_EQUIP) 1317 1296 { 1318 1297 if (e1 != e2) … … 1383 1362 1384 1363 /* Convert letter to inventory index */ 1385 if (p_ptr->command_wrk == (USE_INVEN))1364 if (p_ptr->command_wrk == USE_INVEN) 1386 1365 { 1387 1366 k = label_to_inven(which.key); … … 1395 1374 1396 1375 /* Convert letter to equipment index */ 1397 else if (p_ptr->command_wrk == (USE_EQUIP))1376 else if (p_ptr->command_wrk == USE_EQUIP) 1398 1377 { 1399 1378 k = label_to_equip(which.key); … … 1453 1432 1454 1433 /* Fix the screen if necessary */ 1455 if ( p_ptr->command_see)1434 if (show_list) 1456 1435 { 1457 1436 /* Load screen */ … … 1459 1438 1460 1439 /* Hack -- Cancel "display" */ 1461 p_ptr->command_see= FALSE;1440 show_list = FALSE; 1462 1441 } 1463 1442 … … 1469 1448 button_kill('!'); 1470 1449 redraw_stuff(); 1471 1450 1472 1451 /* Forget the item_tester_tval restriction */ 1473 1452 item_tester_tval = 0; trunk/src/store.c
r707 r715 2802 2802 p_ptr->command_new = 0; 2803 2803 2804 /* Hack -- Cancel "see" mode */2805 p_ptr->command_see = FALSE;2806 2807 2804 2808 2805 /* Flush messages XXX XXX XXX */ trunk/src/types.h
r698 r715 939 939 ui_event_data command_cmd_ex; /* Gives additional information of current command */ 940 940 941 s16b command_see; /* See "cmd1.c" */942 941 s16b command_wrk; /* See "cmd1.c" */ 943 944 942 s16b command_new; /* Hack -- command chaining XXX XXX */ 945 943
