Changeset 810

Show
Ignore:
Timestamp:
03/20/08 17:45:26 (7 months ago)
Author:
mikon
Message:

* removed some unused pickup parameters; fixed comments

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/cmd1.c

    r765 r810  
    299299 * Called with pickup: 
    300300 * 0 to act according to the player's settings 
    301  * 1 to quickly pickup single objects and present a menu for more 
     301 * 1 to quickly pickup single objects or present a menu for more 
    302302 * 2 to force a menu for any number of objects 
    303303 * 
    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 
    308307 * floor in an array, and tally both how many there are and can be picked up. 
    309308 * 
     
    312311 * don't have room for anything. 
    313312 * 
     313 * [This paragraph is not true, intentional?] 
    314314 * If we are picking up objects automatically, and have room for at least 
    315315 * one, allow the "pickup_detail" option to display information about objects 
     
    329329 * objects.  They are truly "unknown". 
    330330 */ 
    331 byte py_pickup(int pickup, bool pickup_okay
     331byte py_pickup(int pickup
    332332{ 
    333333        int py = p_ptr->py; 
     
    380380 
    381381                /* Automatically pick up items into the backpack */ 
    382                 if (pickup_okay && auto_pickup_okay(o_ptr)) 
     382                if (auto_pickup_okay(o_ptr)) 
    383383                { 
    384384                        /* Pick up the object with message */ 
     
    532532         * up.  Force the display of a menu in all cases. 
    533533         */ 
    534         if (call_function_again) objs_picked_up += py_pickup(2, pickup_okay); 
     534        if (call_function_again) objs_picked_up += py_pickup(2); 
    535535 
    536536        /* Indicate how many objects have been picked up. */ 
     
    541541 
    542542/* 
    543  * Move player in the given direction, with the given "pickup" flag
     543 * Move player in the given direction
    544544 * 
    545545 * This routine should only be called when energy has been expended. 
     
    548548 * and also handles attempting to move into walls/doors/rubble/etc. 
    549549 */ 
    550 void move_player(int dir, bool pickup_okay
     550void move_player(int dir
    551551{ 
    552552        int py = p_ptr->py; 
     
    709709                        /* Hack -- Enter store */ 
    710710                        p_ptr->command_new = '_'; 
    711  
    712                         /* Handle objects now.  XXX */ 
    713                         p_ptr->energy_use = py_pickup(2, pickup_okay) * 10; 
    714711                } 
    715712 
  • trunk/src/cmd2.c

    r633 r810  
    20542054 * Helper function for the "walk" command. 
    20552055 */ 
    2056 static void walk(bool can_pickup
     2056static void walk(
    20572057{ 
    20582058        int y, x, dir; 
     
    21002100 
    21012101        /* Move the player */ 
    2102         move_player(dir, can_pickup); 
     2102        move_player(dir); 
    21032103} 
    21042104 
     
    21082108void do_cmd_walk(void) 
    21092109{ 
    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)
    21152115 * 
    21162116 * What a horrible concept. 
     
    21242124        easy_alter = FALSE; 
    21252125 
    2126         /* Walk without pickup */ 
    2127         walk(FALSE); 
     2126        walk(); 
    21282127 
    21292128        /* Restore easy_alter */ 
     
    22292228 
    22302229        /* 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; 
    22322231 
    22332232        /* Hack -- enter a store if we are on one */ 
     
    22562255 
    22572256        /* 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; 
    22592258 
    22602259        /* Maximum time expenditure is a full turn. */ 
  • trunk/src/dungeon.c

    r789 r810  
    11881188                { 
    11891189                        /* 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; 
    11911191                        p_ptr->notice &= ~(PN_PICKUP); 
    11921192                } 
  • trunk/src/externs.h

    r755 r810  
    313313/* cmd1.c */ 
    314314extern void search(void); 
    315 extern byte py_pickup(int pickup, bool pickup_okay); 
    316 extern void move_player(int dir, bool pickup); 
     315extern byte py_pickup(int pickup); 
     316extern void move_player(int dir); 
    317317 
    318318/* cmd5.c */ 
  • trunk/src/pathfind.c

    r589 r810  
    11011101        p_ptr->energy_use = 100; 
    11021102 
    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); 
    11051105} 
    11061106