Changeset 520

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

Remove the DRS_SMART_OPTIONS, MONSTER_FLOW, CHECK_MODIFICATION_TIME, and FIXED_PATHS ifdefs. Make them all permanently on.

Files:

Legend:

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

    r507 r520  
    31033103 
    31043104 
    3105 #ifdef MONSTER_FLOW 
    3106  
    31073105/* 
    31083106 * Size of the circular queue used by "update_flow()" 
     
    31263124static int flow_save = 0; 
    31273125 
    3128 #endif /* MONSTER_FLOW */ 
    3129  
    31303126 
    31313127 
     
    31353131void forget_flow(void) 
    31363132{ 
    3137  
    3138 #ifdef MONSTER_FLOW 
    3139  
    31403133        int x, y; 
    31413134 
     
    31563149        /* Start over */ 
    31573150        flow_save = 0; 
    3158  
    3159 #endif 
    3160  
    31613151} 
    31623152 
     
    31783168void update_flow(void) 
    31793169{ 
    3180  
    3181 #ifdef MONSTER_FLOW 
    3182  
    31833170        int py = p_ptr->py; 
    31843171        int px = p_ptr->px; 
     
    32923279                } 
    32933280        } 
    3294  
    3295 #endif 
    3296  
    32973281} 
    32983282 
  • trunk/src/config.h

    r519 r520  
    108108 
    109109 
    110 /* 
    111  * OPTION: Allow use of the "adult_ai_smell" and "adult_ai_sound" 
    112  * software options, which enable "monster flowing". 
    113  */ 
    114 #define MONSTER_FLOW 
    115  
    116  
    117110 
    118111/* 
     
    126119 */ 
    127120#define SUPPORT_GAMMA 
    128  
    129  
    130 /* 
    131  * OPTION: Check the modification time of *_info.raw files 
    132  */ 
    133 #define CHECK_MODIFICATION_TIME 
    134  
    135  
    136 /* 
    137  * OPTION: Enable the "adult_ai_learn" and "adult_ai_cheat" options. 
    138  * 
    139  * They let monsters make more "intelligent" choices about attacks (including 
    140  * spell attacks) based on their observations of the player's reactions to 
    141  * previous attacks.  The "cheat" option lets the monster know how the player 
    142  * would react to an attack without actually needing to make the attack.  The 
    143  * "learn" option requires that a monster make a "failed" attack before 
    144  * learning that the player is not harmed by that attack. 
    145  */ 
    146 #define DRS_SMART_OPTIONS 
    147  
    148121 
    149122/* 
     
    204177/* # define USE_PRIVATE_PATHS */ 
    205178#endif /* PRIVATE_USER_PATH */ 
    206  
    207  
    208  
    209 /* 
    210  * OPTION: Prevent usage of the "ANGBAND_PATH" environment variable and 
    211  * the '-d<what>=<path>' command line option (except for '-du=<path>'). 
    212  * 
    213  * This prevents cheating in multi-user installs as well as possible 
    214  * security problems when running setgid. 
    215  */ 
    216 #ifdef SET_UID 
    217 #define FIXED_PATHS 
    218 #endif /* SET_UID */ 
    219179 
    220180 
  • trunk/src/generate.c

    r507 r520  
    50855085                                cave_info2[y][x] = 0; 
    50865086 
    5087 #ifdef MONSTER_FLOW 
    50885087                                /* No flow */ 
    50895088                                cave_cost[y][x] = 0; 
    50905089                                cave_when[y][x] = 0; 
    5091 #endif /* MONSTER_FLOW */ 
    5092  
    50935090                        } 
    50945091                } 
  • trunk/src/init2.c

    r505 r520  
    10451045        cave_m_idx = C_ZNEW(DUNGEON_HGT, s16b_wid); 
    10461046 
    1047 #ifdef MONSTER_FLOW 
    1048  
    10491047        /* Flow arrays */ 
    10501048        cave_cost = C_ZNEW(DUNGEON_HGT, byte_wid); 
    10511049        cave_when = C_ZNEW(DUNGEON_HGT, byte_wid); 
    10521050 
    1053 #endif /* MONSTER_FLOW */ 
    10541051 
    10551052        /*** Prepare "vinfo" array ***/ 
     
    16061603        FREE(o_list); 
    16071604 
    1608 #ifdef MONSTER_FLOW 
    1609  
    16101605        /* Flow arrays */ 
    16111606        FREE(cave_when); 
    16121607        FREE(cave_cost); 
    1613  
    1614 #endif /* MONSTER_FLOW */ 
    16151608 
    16161609        /* Free the cave */ 
  • trunk/src/main.c

    r507 r520  
    136136        cptr tail = NULL; 
    137137 
    138 #ifndef FIXED_PATHS 
    139  
    140         /* Get the environment variable */ 
    141         tail = getenv("ANGBAND_PATH"); 
    142  
    143 #endif /* FIXED_PATHS */ 
    144138 
    145139        /* Use the angband_path, or a default */ 
     
    169163static void change_path(cptr info) 
    170164{ 
    171         cptr s; 
    172  
    173         /* Find equal sign */ 
    174         s = strchr(info, '='); 
    175  
    176         /* Verify equal sign */ 
    177         if (!s) quit_fmt("Try '-d<what>=<path>' not '-d%s'", info); 
    178  
    179         /* Analyze */ 
    180         switch (tolower((unsigned char)info[0])) 
    181         { 
    182 #ifndef FIXED_PATHS 
    183                 case 'a': 
    184                 { 
    185                         string_free(ANGBAND_DIR_APEX); 
    186                         ANGBAND_DIR_APEX = string_make(s+1); 
    187                         break; 
    188                 } 
    189  
    190                 case 'f': 
    191                 { 
    192                         string_free(ANGBAND_DIR_FILE); 
    193                         ANGBAND_DIR_FILE = string_make(s+1); 
    194                         break; 
    195                 } 
    196  
    197                 case 'h': 
    198                 { 
    199                         string_free(ANGBAND_DIR_HELP); 
    200                         ANGBAND_DIR_HELP = string_make(s+1); 
    201                         break; 
    202                 } 
    203  
    204                 case 'i': 
    205                 { 
    206                         string_free(ANGBAND_DIR_INFO); 
    207                         ANGBAND_DIR_INFO = string_make(s+1); 
    208                         break; 
    209                 } 
    210  
    211                 case 'x': 
    212                 { 
    213                         string_free(ANGBAND_DIR_XTRA); 
    214                         ANGBAND_DIR_XTRA = string_make(s+1); 
    215                         break; 
    216                 } 
    217  
    218                 case 'b': 
    219                 { 
    220                         string_free(ANGBAND_DIR_BONE); 
    221                         ANGBAND_DIR_BONE = string_make(s+1); 
    222                         break; 
    223                 } 
    224  
    225                 case 'd': 
    226                 { 
    227                         string_free(ANGBAND_DIR_DATA); 
    228                         ANGBAND_DIR_DATA = string_make(s+1); 
    229                         break; 
    230                 } 
    231  
    232                 case 'e': 
    233                 { 
    234                         string_free(ANGBAND_DIR_EDIT); 
    235                         ANGBAND_DIR_EDIT = string_make(s+1); 
    236                         break; 
    237                 } 
    238  
    239                 case 's': 
    240                 { 
    241                         string_free(ANGBAND_DIR_SAVE); 
    242                         ANGBAND_DIR_SAVE = string_make(s+1); 
    243                         break; 
    244                 } 
    245  
    246 #endif /* FIXED_PATHS */ 
    247  
    248                 case 'u': 
    249                 { 
    250                         string_free(ANGBAND_DIR_USER); 
    251                         ANGBAND_DIR_USER = string_make(s+1); 
    252                         break; 
    253                 } 
    254  
    255                 default: 
    256                 { 
    257                         quit_fmt("Bad semantics in '-d%s'", info); 
    258                 } 
    259         } 
     165        if (!info || !info[0]) 
     166                quit_fmt("Try '-d<path>'.", info); 
     167 
     168        string_free(ANGBAND_DIR_USER); 
     169        ANGBAND_DIR_USER = string_make(info); 
    260170} 
    261171 
     
    461371                                puts("  -s<num>        Show <num> high scores (default: 10)"); 
    462372                                puts("  -u<who>        Use your <who> savefile"); 
    463                                 puts("  -d<def>=<path> Instead of lib/<def>, use <path>"); 
     373                                puts("  -d<path>       Store pref files and screendumps in <path>"); 
    464374                                puts("  -m<sys>        Use module <sys>, where <sys> can be:"); 
    465375 
  • trunk/src/melee2.c

    r518 r520  
    1717 */ 
    1818#include "angband.h" 
    19  
    20  
    21 #ifdef DRS_SMART_OPTIONS 
    2219 
    2320 
     
    320317        (*f6p) = f6; 
    321318} 
    322  
    323  
    324 #endif /* DRS_SMART_OPTIONS */ 
    325319 
    326320 
     
    762756 
    763757 
    764 #ifdef DRS_SMART_OPTIONS 
    765  
    766758        /* Remove the "ineffective" spells */ 
    767759        remove_bad_spells(m_idx, &f4, &f5, &f6); 
     
    769761        /* No spells left */ 
    770762        if (!f4 && !f5 && !f6) return (FALSE); 
    771  
    772 #endif /* DRS_SMART_OPTIONS */ 
    773763 
    774764        /* Check whether summons and bolts are worth it. */ 
     
    23682358 
    23692359 
    2370 #ifdef MONSTER_FLOW 
    2371  
    23722360/* 
    23732361 * Choose the "best" direction for "flowing" 
     
    25542542} 
    25552543 
    2556 #endif /* MONSTER_FLOW */ 
    2557  
    25582544 
    25592545 
     
    27082694static bool find_safety(int m_idx, int *yp, int *xp) 
    27092695{ 
    2710  
    2711 #ifdef MONSTER_FLOW 
    2712  
    27132696        monster_type *m_ptr = &mon_list[m_idx]; 
    27142697 
     
    27842767        } 
    27852768 
    2786 #endif /* MONSTER_FLOW */ 
    2787  
    27882769        /* No safe place */ 
    27892770        return (FALSE); 
     
    28952876        bool done = FALSE; 
    28962877 
    2897 #ifdef MONSTER_FLOW 
    2898  
    28992878        /* Flow towards the player */ 
    29002879        if (adult_ai_sound) 
     
    29032882                (void)get_moves_aux(m_idx, &y2, &x2); 
    29042883        } 
    2905  
    2906 #endif /* MONSTER_FLOW */ 
    29072884 
    29082885        /* Extract the "pseudo-direction" */ 
     
    29522929                } 
    29532930 
    2954 #ifdef MONSTER_FLOW 
    2955  
    29562931                else 
    29572932                { 
     
    29632938                        } 
    29642939                } 
    2965  
    2966 #endif /* MONSTER_FLOW */ 
    29672940 
    29682941                done = TRUE; 
     
    40864059 
    40874060 
    4088 #ifdef MONSTER_FLOW 
    4089  
    40904061static bool monster_can_flow(int m_idx) 
    40914062{ 
     
    41114082        return FALSE; 
    41124083} 
    4113  
    4114 #else /* MONSTER_FLOW */ 
    4115  
    4116 static bool monster_can_flow(int m_idx) 
    4117 { 
    4118         /* Unused parameter */ 
    4119         (void)m_idx; 
    4120  
    4121         return FALSE; 
    4122 } 
    4123  
    4124 #endif /* MONSTER_FLOW */ 
    41254084 
    41264085 
  • trunk/src/monster2.c

    r507 r520  
    23912391void update_smart_learn(int m_idx, int what) 
    23922392{ 
    2393  
    2394 #ifdef DRS_SMART_OPTIONS 
    2395  
    23962393        monster_type *m_ptr = &mon_list[m_idx]; 
    23972394 
     
    25312528                } 
    25322529        } 
    2533  
    2534 #endif /* DRS_SMART_OPTIONS */ 
    2535  
    2536 
    2537  
    2538  
     2530
     2531 
     2532 
  • trunk/src/types.h

    r489 r520  
    552552        s16b hold_o_idx;        /* Object being held (if any) */ 
    553553 
    554 #ifdef DRS_SMART_OPTIONS 
    555  
    556554        u32b smart;                     /* Field for "adult_ai_learn" */ 
    557  
    558 #endif /* DRS_SMART_OPTIONS */ 
    559  
    560555}; 
    561556 
  • trunk/src/variable.c

    r500 r520  
    423423 
    424424 
    425 #ifdef MONSTER_FLOW 
    426  
    427425/* 
    428426 * Array[DUNGEON_HGT][DUNGEON_WID] of cave grid flow "cost" values 
     
    434432 */ 
    435433byte (*cave_when)[DUNGEON_WID]; 
    436  
    437 #endif  /* MONSTER_FLOW */ 
    438434 
    439435 
  • trunk/src/wizard2.c

    r507 r520  
    2828static void do_cmd_wiz_hack_ben(void) 
    2929{ 
    30  
    31 #ifdef MONSTER_FLOW 
    32  
    3330        int py = p_ptr->py; 
    3431        int px = p_ptr->px; 
     
    8885        /* Redraw map */ 
    8986        prt_map(); 
    90  
    91 #else /* MONSTER_FLOW */ 
    92  
    93         /* Oops */ 
    94         msg_print("Oops"); 
    95  
    96 #endif /* MONSTER_FLOW */ 
    97  
    9887} 
    9988