Changeset 810
- Timestamp:
- 03/20/08 17:45:26 (7 months ago)
- Files:
-
- trunk/src/cmd1.c (modified) (8 diffs)
- trunk/src/cmd2.c (modified) (6 diffs)
- trunk/src/dungeon.c (modified) (1 diff)
- trunk/src/externs.h (modified) (1 diff)
- trunk/src/pathfind.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/cmd1.c
r765 r810 299 299 * Called with pickup: 300 300 * 0 to act according to the player's settings 301 * 1 to quickly pickup single objects andpresent a menu for more301 * 1 to quickly pickup single objects or present a menu for more 302 302 * 2 to force a menu for any number of objects 303 303 * 304 * Scan the list of objects in that floor grid. Pick up gold automatically. 305 * Pick up objects automatically until pile or backpack space is full if 306 * auto-pickup option is on, carry_query_floor option is not, and menus are 307 * not forced (which the "get" command does). Otherwise, store objects on 304 * Scan the list of objects in that floor grid. Pick up gold automatically. 305 * Pick up objects automatically until backpack space is full if 306 * auto-pickup option is on, Otherwise, store objects on 308 307 * floor in an array, and tally both how many there are and can be picked up. 309 308 * … … 312 311 * don't have room for anything. 313 312 * 313 * [This paragraph is not true, intentional?] 314 314 * If we are picking up objects automatically, and have room for at least 315 315 * one, allow the "pickup_detail" option to display information about objects … … 329 329 * objects. They are truly "unknown". 330 330 */ 331 byte py_pickup(int pickup , bool pickup_okay)331 byte py_pickup(int pickup) 332 332 { 333 333 int py = p_ptr->py; … … 380 380 381 381 /* Automatically pick up items into the backpack */ 382 if ( pickup_okay &&auto_pickup_okay(o_ptr))382 if (auto_pickup_okay(o_ptr)) 383 383 { 384 384 /* Pick up the object with message */ … … 532 532 * up. Force the display of a menu in all cases. 533 533 */ 534 if (call_function_again) objs_picked_up += py_pickup(2 , pickup_okay);534 if (call_function_again) objs_picked_up += py_pickup(2); 535 535 536 536 /* Indicate how many objects have been picked up. */ … … 541 541 542 542 /* 543 * Move player in the given direction , with the given "pickup" flag.543 * Move player in the given direction. 544 544 * 545 545 * This routine should only be called when energy has been expended. … … 548 548 * and also handles attempting to move into walls/doors/rubble/etc. 549 549 */ 550 void move_player(int dir , bool pickup_okay)550 void move_player(int dir) 551 551 { 552 552 int py = p_ptr->py; … … 709 709 /* Hack -- Enter store */ 710 710 p_ptr->command_new = '_'; 711 712 /* Handle objects now. XXX */713 p_ptr->energy_use = py_pickup(2, pickup_okay) * 10;714 711 } 715 712 trunk/src/cmd2.c
r633 r810 2054 2054 * Helper function for the "walk" command. 2055 2055 */ 2056 static void walk( bool can_pickup)2056 static void walk() 2057 2057 { 2058 2058 int y, x, dir; … … 2100 2100 2101 2101 /* Move the player */ 2102 move_player(dir , can_pickup);2102 move_player(dir); 2103 2103 } 2104 2104 … … 2108 2108 void do_cmd_walk(void) 2109 2109 { 2110 walk( TRUE);2111 } 2112 2113 /* 2114 * Jump into a trap, turn off pickup .2110 walk(); 2111 } 2112 2113 /* 2114 * Jump into a trap, turn off pickup (does not work). 2115 2115 * 2116 2116 * What a horrible concept. … … 2124 2124 easy_alter = FALSE; 2125 2125 2126 /* Walk without pickup */ 2127 walk(FALSE); 2126 walk(); 2128 2127 2129 2128 /* Restore easy_alter */ … … 2229 2228 2230 2229 /* Handle objects now. XXX XXX XXX */ 2231 p_ptr->energy_use += py_pickup(0 , TRUE) * 10;2230 p_ptr->energy_use += py_pickup(0) * 10; 2232 2231 2233 2232 /* Hack -- enter a store if we are on one */ … … 2256 2255 2257 2256 /* Pick up floor objects, forcing a menu for multiple objects. */ 2258 energy_cost = py_pickup(1 , TRUE) * 10;2257 energy_cost = py_pickup(1) * 10; 2259 2258 2260 2259 /* Maximum time expenditure is a full turn. */ trunk/src/dungeon.c
r789 r810 1188 1188 { 1189 1189 /* Recursively call the pickup function, use energy */ 1190 p_ptr->energy_use = py_pickup(0 , TRUE) * 10;1190 p_ptr->energy_use = py_pickup(0) * 10; 1191 1191 p_ptr->notice &= ~(PN_PICKUP); 1192 1192 } trunk/src/externs.h
r755 r810 313 313 /* cmd1.c */ 314 314 extern void search(void); 315 extern byte py_pickup(int pickup , bool pickup_okay);316 extern void move_player(int dir , bool pickup);315 extern byte py_pickup(int pickup); 316 extern void move_player(int dir); 317 317 318 318 /* cmd5.c */ trunk/src/pathfind.c
r589 r810 1101 1101 p_ptr->energy_use = 100; 1102 1102 1103 /* Move the player . Never pick up objects*/1104 move_player(p_ptr->run_cur_dir , FALSE);1103 /* Move the player */ 1104 move_player(p_ptr->run_cur_dir); 1105 1105 } 1106 1106
