diff options
author | Bardur Arantsson <bardur@scientician.net> | 2010-01-12 00:01:04 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2010-01-12 00:06:45 +0100 |
commit | 380a7102efd4233fabfca8a9a0184408bd597ded (patch) | |
tree | d2790c34e6f7ecf2559f6473b52df74e3ab3972c /src | |
parent | fc2e719c1efc058ed900f363838a4def87e68cbc (diff) |
Remove ANGBAND_LITE option.
Diffstat (limited to 'src')
-rw-r--r-- | src/cave.c | 16 | ||||
-rw-r--r-- | src/cmd4.c | 23 | ||||
-rw-r--r-- | src/config.h | 115 | ||||
-rw-r--r-- | src/defines.h | 14 | ||||
-rw-r--r-- | src/generate.c | 9 | ||||
-rw-r--r-- | src/init2.c | 27 | ||||
-rw-r--r-- | src/melee2.c | 101 | ||||
-rw-r--r-- | src/monster1.c | 67 | ||||
-rw-r--r-- | src/types.h | 16 |
9 files changed, 2 insertions, 386 deletions
@@ -4449,9 +4449,6 @@ static int flow_n = 0; */ void forget_flow(void) { - -#ifdef MONSTER_FLOW - int x, y; /* Nothing to forget */ @@ -4470,14 +4467,9 @@ void forget_flow(void) /* Start over */ flow_n = 0; - -#endif - } -#ifdef MONSTER_FLOW - /* * Hack -- Allow us to treat the "seen" array as a queue */ @@ -4524,8 +4516,6 @@ static void update_flow_aux(int y, int x, int n) if (flow_head == flow_tail) flow_head = old_head; } -#endif - /* * Hack -- fill in the "cost" field of every grid that the player @@ -4542,9 +4532,6 @@ static void update_flow_aux(int y, int x, int n) */ void update_flow(void) { - -#ifdef MONSTER_FLOW - int x, y, d; /* Hack -- disabled */ @@ -4600,9 +4587,6 @@ void update_flow(void) /* Forget the flow info */ flow_head = flow_tail = 0; - -#endif - } @@ -1481,8 +1481,6 @@ void do_cmd_pref(void) } -#ifdef ALLOW_MACROS - /* * Hack -- append all current macros to the given file */ @@ -1604,9 +1602,6 @@ static void do_cmd_macro_aux(char *buf, bool macro_screen) } } -#endif - - /* * Hack -- ask for a keymap "trigger" (see below) * @@ -1786,7 +1781,6 @@ void do_cmd_macros(void) /* Selections */ prt("(1) Load a user pref file", 4, 5); -#ifdef ALLOW_MACROS prt("(2) Append macros to a file", 5, 5); prt("(3) Query a macro", 6, 5); prt("(4) Create a macro", 7, 5); @@ -1796,7 +1790,6 @@ void do_cmd_macros(void) prt("(8) Create a keymap", 11, 5); prt("(9) Remove a keymap", 12, 5); prt("(0) Enter a new action", 13, 5); -#endif /* ALLOW_MACROS */ /* Prompt */ prt("Command: ", 16, 0); @@ -1830,8 +1823,6 @@ void do_cmd_macros(void) } } -#ifdef ALLOW_MACROS - /* Save macros */ else if (i == '2') { @@ -2091,8 +2082,6 @@ void do_cmd_macros(void) text_to_ascii(macro__buf, buf); } -#endif /* ALLOW_MACROS */ - /* Oops */ else { @@ -2148,7 +2137,6 @@ void do_cmd_visuals(void) /* Give some choices */ prt("(1) Load a user pref file", 4, 5); -#ifdef ALLOW_VISUALS prt("(2) Dump monster attr/chars", 5, 5); prt("(3) Dump object attr/chars", 6, 5); prt("(4) Dump feature attr/chars", 7, 5); @@ -2157,7 +2145,6 @@ void do_cmd_visuals(void) prt("(7) Change object attr/chars", 10, 5); prt("(8) Change feature attr/chars", 11, 5); prt("(9) (unused)", 12, 5); -#endif prt("(0) Reset visuals", 13, 5); /* Prompt */ @@ -2188,8 +2175,6 @@ void do_cmd_visuals(void) (void)process_pref_file(tmp); } -#ifdef ALLOW_VISUALS - /* Dump monster attr/chars */ else if (i == '2') { @@ -2564,8 +2549,6 @@ void do_cmd_visuals(void) } } -#endif - /* Reset visuals */ else if (i == '0') { @@ -2631,13 +2614,11 @@ void do_cmd_colors(void) /* Give some choices */ prt("(1) Load a user pref file", 4, 5); -#ifdef ALLOW_COLORS prt("(2) Dump colors", 5, 5); prt("(3) Modify colors", 6, 5); # ifdef SUPPORT_GAMMA prt("(4) Gamma correction", 7, 5); # endif /* SUPPORT_GAMMA */ -#endif /* Prompt */ prt("Command: ", 8, 0); @@ -2673,8 +2654,6 @@ void do_cmd_colors(void) Term_redraw(); } -#ifdef ALLOW_COLORS - /* Dump colors */ else if (i == '2') { @@ -2875,8 +2854,6 @@ void do_cmd_colors(void) # endif /* SUPPORT_GAMMA */ -#endif - /* Unknown option */ else { diff --git a/src/config.h b/src/config.h index 4b91ed0b..4366a6bf 100644 --- a/src/config.h +++ b/src/config.h @@ -163,21 +163,6 @@ #define ALLOW_SPOILERS /* - * OPTION: Allow "do_cmd_colors" at run-time - */ -#define ALLOW_COLORS - -/* - * OPTION: Allow "do_cmd_visuals" at run-time - */ -#define ALLOW_VISUALS - -/* - * OPTION: Allow "do_cmd_macros" at run-time - */ -#define ALLOW_MACROS - -/* * OPTION: Allow characteres to be "auto-rolled" */ #define ALLOW_AUTOROLLER @@ -201,50 +186,6 @@ */ #define ALLOW_TEMPLATES -/* - * OPTION: Allow loading of pre-2.7.0 savefiles. Note that it takes - * about 15K of code in "save-old.c" to parse the old savefile format. - * Angband 2.8.0 will ignore a lot of info from pre-2.7.0 savefiles. - */ -#define ALLOW_OLD_SAVEFILES - - -/* - * OPTION: Delay the loading of the "f_text" array until it is actually - * needed, saving ~1K, since "feature" descriptions are unused. - */ -/* #define DELAY_LOAD_F_TEXT */ - -/* - * OPTION: Delay the loading of the "k_text" array until it is actually - * needed, saving ~1K, since "object" descriptions are unused. - */ -/* #define DELAY_LOAD_K_TEXT */ - -/* - * OPTION: Delay the loading of the "a_text" array until it is actually - * needed, saving ~1K, since "artifact" descriptions are unused. - */ -/* #define DELAY_LOAD_A_TEXT */ - -/* - * OPTION: Delay the loading of the "e_text" array until it is actually - * needed, saving ~1K, since "ego-item" descriptions are unused. - */ -#define DELAY_LOAD_E_TEXT - -/* - * OPTION: Delay the loading of the "r_text" array until it is actually - * needed, saving ~60K, but "simplifying" the "monster" descriptions. - */ -/* #define DELAY_LOAD_R_TEXT */ - -/* - * OPTION: Delay the loading of the "v_text" array until it is actually - * needed, saving ~1K, but "destroying" the "vault" generation. - */ -/* #define DELAY_LOAD_V_TEXT */ - /* * OPTION: Handle signals @@ -270,14 +211,7 @@ /* - * OPTION: Allow use of the "flow_by_smell" and "flow_by_sound" - * software options, which enable "monster flowing". - */ -#define MONSTER_FLOW - - -/* - * OPTION: Maximum flow depth when using "MONSTER_FLOW" + * OPTION: Maximum flow depth */ #define MONSTER_FLOW_DEPTH 32 @@ -296,17 +230,6 @@ /* - * OPTION: Enable the "track_follow" and "track_target" options. - * They let monsters follow the player's foot-prints, or remember - * the player's recent locations. This code has been removed from - * the current version because it is being rewritten by Billy, and - * until it is ready, it will not work. Do not define this option. - */ -/* #define WDT_TRACK_OPTIONS */ - - - -/* * OPTION: Allow the use of "sound" in various places. */ #define USE_SOUND @@ -460,42 +383,6 @@ /* - * Hack -- Special "ancient machine" versions - */ -#if defined(ANGBAND_LITE_MAC) -# ifndef ANGBAND_LITE -# define ANGBAND_LITE -# endif -#endif - -/* - * OPTION: Attempt to minimize the size of the game - */ -#ifndef ANGBAND_LITE -/* #define ANGBAND_LITE */ -#endif - -/* - * Hack -- React to the "ANGBAND_LITE" flag - */ -#ifdef ANGBAND_LITE -# undef ALLOW_COLORS -# undef ALLOW_VISUALS -# undef ALLOW_MACROS -# undef MONSTER_FLOW -# undef WDT_TRACK_OPTIONS -# undef ALLOW_OLD_SAVEFILES -# undef ALLOW_BORG -# undef ALLOW_WIZARD -# undef ALLOW_SPOILERS -# undef ALLOW_TEMPLATES -# undef DELAY_LOAD_R_TEXT -# define DELAY_LOAD_R_TEXT -#endif - - - -/* * OPTION: Attempt to prevent all "cheating" */ /* #define VERIFY_HONOR */ diff --git a/src/defines.h b/src/defines.h index 95678853..2c32431e 100644 --- a/src/defines.h +++ b/src/defines.h @@ -3988,20 +3988,6 @@ extern int PlayerUID; /* - * Hack -- attempt to reduce various values - */ -#ifdef ANGBAND_LITE -# undef MACRO_MAX -# define MACRO_MAX 128 -# undef QUARK_MAX -# define QUARK_MAX 128 -# undef MESSAGE_MAX -# define MESSAGE_MAX 128 -# undef MESSAGE_BUF -# define MESSAGE_BUF 4096 -#endif - -/* * Road flags */ #define ROAD_NORTH 1 diff --git a/src/generate.c b/src/generate.c index af6405c5..dc1450ad 100644 --- a/src/generate.c +++ b/src/generate.c @@ -8595,14 +8595,9 @@ void generate_cave(void) /* No inscription */ cave[y][x].inscription = 0; -#ifdef MONSTER_FLOW - /* No flow */ cave[y][x].cost = 0; cave[y][x].when = 0; - -#endif /* MONSTER_FLOW */ - } } @@ -8660,13 +8655,9 @@ void generate_cave(void) /* No inscription */ cave[y][x].inscription = 0; -#ifdef MONSTER_FLOW - /* No flow */ cave[y][x].cost = 0; cave[y][x].when = 0; - -#endif /* MONSTER_FLOW */ } } diff --git a/src/init2.c b/src/init2.c index 7a66d09a..12f3a3d2 100644 --- a/src/init2.c +++ b/src/init2.c @@ -413,16 +413,12 @@ static errr init_f_info_raw(int fd) fd_read(fd, (char*)(f_name), f_head->name_size); -#ifndef DELAY_LOAD_F_TEXT - /* Allocate the "f_text" array */ C_MAKE(f_text, f_head->text_size, char); /* Read the "f_text" array */ fd_read(fd, (char*)(f_text), f_head->text_size); -#endif /* DELAY_LOAD_F_TEXT */ - /* Success */ return (0); @@ -696,16 +692,12 @@ static errr init_k_info_raw(int fd) fd_read(fd, (char*)(k_name), k_head->name_size); -#ifndef DELAY_LOAD_K_TEXT - /* Allocate the "k_text" array */ C_MAKE(k_text, k_head->text_size, char); /* Read the "k_text" array */ fd_read(fd, (char*)(k_text), k_head->text_size); -#endif /* DELAY_LOAD_K_TEXT */ - /* Success */ return (0); @@ -979,16 +971,12 @@ static errr init_a_info_raw(int fd) fd_read(fd, (char*)(a_name), a_head->name_size); -#ifndef DELAY_LOAD_A_TEXT - /* Allocate the "a_text" array */ C_MAKE(a_text, a_head->text_size, char); /* Read the "a_text" array */ fd_read(fd, (char*)(a_text), a_head->text_size); -#endif /* DELAY_LOAD_A_TEXT */ - /* Success */ return (0); @@ -2087,16 +2075,12 @@ static errr init_e_info_raw(int fd) fd_read(fd, (char*)(e_name), e_head->name_size); -#ifndef DELAY_LOAD_E_TEXT - /* Allocate the "e_text" array */ C_MAKE(e_text, e_head->text_size, char); /* Read the "e_text" array */ fd_read(fd, (char*)(e_text), e_head->text_size); -#endif /* DELAY_LOAD_E_TEXT */ - /* Success */ return (0); @@ -2624,16 +2608,12 @@ static errr init_r_info_raw(int fd) fd_read(fd, (char*)(r_name), r_head->name_size); -#ifndef DELAY_LOAD_R_TEXT - /* Allocate the "r_text" array */ C_MAKE(r_text, r_head->text_size, char); /* Read the "r_text" array */ fd_read(fd, (char*)(r_text), r_head->text_size); -#endif /* DELAY_LOAD_R_TEXT */ - /* Success */ return (0); @@ -5014,16 +4994,12 @@ static errr init_t_info_raw(int fd) fd_read(fd, (char*)(t_name), t_head->name_size); -#ifndef DELAY_LOAD_T_TEXT - /* Allocate the "t_text" array */ C_MAKE(t_text, t_head->text_size, char); /* Read the "t_text" array */ fd_read(fd, (char*)(t_text), t_head->text_size); -#endif /* DELAY_LOAD_T_TEXT */ - /* Success */ return (0); @@ -5576,15 +5552,12 @@ static errr init_v_info_raw(int fd) fd_read(fd, (char*)(v_name), v_head->name_size); -#ifndef DELAY_LOAD_V_TEXT - /* Allocate the "v_text" array */ C_MAKE(v_text, v_head->text_size, char); /* Read the "v_text" array */ fd_read(fd, (char*)(v_text), v_head->text_size); -#endif /* DELAY_LOAD_V_TEXT */ /* Success */ return (0); diff --git a/src/melee2.c b/src/melee2.c index b5e40635..804b8f12 100644 --- a/src/melee2.c +++ b/src/melee2.c @@ -4753,8 +4753,6 @@ static int mon_will_run(int m_idx) -#ifdef MONSTER_FLOW - /* * Choose the "best" direction for "flowing" * @@ -4778,80 +4776,6 @@ static int mon_will_run(int m_idx) * happen if you combine "smell" with low "aaf" values. */ -#if 0 -static bool get_moves_aux(int m_idx, int *yp, int *xp) -{ - int i, y, x, y1, x1, when = 0, cost = 999; - - cave_type *c_ptr; - - monster_type *m_ptr = &m_list[m_idx]; - monster_race *r_ptr = race_inf(m_ptr); - - /* Monster flowing disabled */ - if (!flow_by_sound) return (FALSE); - - /* Monster can go through rocks */ - if (r_ptr->flags2 & (RF2_PASS_WALL)) return (FALSE); - if (r_ptr->flags2 & (RF2_KILL_WALL)) return (FALSE); - - /* Monster location */ - y1 = m_ptr->fy; - x1 = m_ptr->fx; - - /* Monster grid */ - c_ptr = &cave[y1][x1]; - - /* The player is not currently near the monster grid */ - if (c_ptr->when < cave[p_ptr->py][p_ptr->px].when) - { - /* The player has never been near the monster grid */ - if (!c_ptr->when) return (FALSE); - - /* The monster is not allowed to track the player */ - if (!flow_by_smell) return (FALSE); - } - - /* Monster is too far away to notice the player */ - if (c_ptr->cost > MONSTER_FLOW_DEPTH) return (FALSE); - if (c_ptr->cost > r_ptr->aaf) return (FALSE); - - /* Hack -- Player can see us, run towards him */ - if (player_has_los_bold(y1, x1)) return (FALSE); - - /* Check nearby grids, diagonals first */ - for (i = 7; i >= 0; i--) - { - /* Get the location */ - y = y1 + ddy_ddd[i]; - x = x1 + ddx_ddd[i]; - - /* Ignore illegal locations */ - if (!cave[y][x].when) continue; - - /* Ignore ancient locations */ - if (cave[y][x].when < when) continue; - - /* Ignore distant locations */ - if (cave[y][x].cost > cost) continue; - - /* Save the cost and time */ - when = cave[y][x].when; - cost = cave[y][x].cost; - - /* Hack -- Save the "twiddled" location */ - (*yp) = p_ptr->py + 16 * ddy_ddd[i]; - (*xp) = p_ptr->px + 16 * ddx_ddd[i]; - } - - /* No legal move (?) */ - if (!when) return (FALSE); - - /* Success */ - return (TRUE); -} -#endif - /* * Provide a location to flee to, but give the player a wide berth. * @@ -4937,8 +4861,6 @@ static bool get_fear_moves_aux(int m_idx, int *yp, int *xp) return (TRUE); } -#endif /* MONSTER_FLOW */ - /* * Choose a "safe" location near a monster for it to run toward. @@ -5193,25 +5115,6 @@ static bool get_moves(int m_idx, int *mm) int x2 = p_ptr->px; bool done = FALSE; -#if 0 - -#ifdef MONSTER_FLOW - /* Flow towards the player */ - if (flow_by_sound) - { - /* Flow towards the player */ - (void)get_moves_aux(m_idx, &y2, &x2); - } -#endif - - /* Extract the "pseudo-direction" */ - y = m_ptr->fy - y2; - x = m_ptr->fx - x2; - - - -#else - /* Oups get nearer */ if ((is_friend(m_ptr) > 0) && (m_ptr->cdis > p_ptr->pet_follow_distance)) { @@ -5401,7 +5304,7 @@ static bool get_moves(int m_idx, int *mm) /* Check for no move */ if (!x && !y) return (FALSE); } -#endif + /* Extract the "absolute distances" */ ax = ABS(x); ay = ABS(y); @@ -7769,7 +7672,6 @@ void process_monsters(void) test = TRUE; } -#ifdef MONSTER_FLOW /* Hack -- Monsters can "smell" the player from far away */ /* Note that most monsters have "aaf" of "20" or so */ else if (flow_by_sound && @@ -7780,7 +7682,6 @@ void process_monsters(void) /* We can "smell" the player */ test = TRUE; } -#endif /* MONSTER_FLOW */ /* Running away wont save them ! */ if (m_ptr->poisoned || m_ptr->bleeding) test = TRUE; diff --git a/src/monster1.c b/src/monster1.c index 790453bc..5da7d478 100644 --- a/src/monster1.c +++ b/src/monster1.c @@ -362,76 +362,9 @@ static void roff_aux(int r_idx, int ego, int remem) { char buf[2048]; -#ifdef DELAY_LOAD_R_TEXT - - int fd; - - /* Build the filename */ - path_build(buf, 1024, ANGBAND_DIR_DATA, "r_info.raw"); - - /* Grab permission */ - safe_setuid_grab(); - - /* Open the "raw" file */ - fd = fd_open(buf, O_RDONLY); - - /* Drop permission */ - safe_setuid_drop(); - - /* Use file */ - if (fd >= 0) - { - huge pos; - - /* Starting position */ - pos = r_ptr->text; - - /* Additional offsets */ - pos += r_head->head_size; - pos += r_head->info_size; - pos += r_head->name_size; - -#if 0 - - /* Maximal length */ - len = r_head->text_size - r_ptr->text; - - /* Actual length */ - for (i = r_idx + 1; i < max_r_idx; i++) - { - /* Actual length */ - if (r_info[i].text > r_ptr->text) - { - /* Extract length */ - len = r_info[i].text - r_ptr->text; - - /* Done */ - break; - } - } - - /* Maximal length */ - if (len > 2048) len = 2048; - -#endif - - /* Seek */ - (void)fd_seek(fd, pos); - - /* Read a chunk of data */ - (void)fd_read(fd, buf, 2048); - - /* Close it */ - (void)fd_close(fd); - } - -#else - /* Simple method */ strcpy(buf, r_text + r_ptr->text); -#endif - /* Dump it */ text_out(buf); text_out(" "); diff --git a/src/types.h b/src/types.h index 01b5a8e8..d895b1a7 100644 --- a/src/types.h +++ b/src/types.h @@ -698,8 +698,6 @@ struct trap_type * objects, using the "next_o_idx" field of objects (see below) to * create the singly linked list of objects. If "o_idx" is zero * then there are no objects in the grid. - * - * Note the special fields for the "MONSTER_FLOW" code. */ typedef struct cave_type cave_type; @@ -724,12 +722,9 @@ struct cave_type byte mimic; /* Feature to mimic */ -#ifdef MONSTER_FLOW - byte cost; /* Hack -- cost of flowing */ byte when; /* Hack -- when cost was computed */ -#endif s16b effect; /* The lasting effects */ }; @@ -919,17 +914,6 @@ struct monster_type s16b hold_o_idx; /* Object being held (if any) */ -#ifdef WDT_TRACK_OPTIONS - - byte ty; /* Y location of target */ - byte tx; /* X location of target */ - - byte t_dur; /* How long are we tracking */ - - byte t_bit; /* Up to eight bit flags */ - -#endif - u32b smart; /* Field for "smart_learn" */ s16b status; /* Status(friendly, pet, companion, ..) */ |