summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/externs.h
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/externs.h')
-rw-r--r--crawl-ref/source/externs.h113
1 files changed, 22 insertions, 91 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 43c925197a..f937f71c5f 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -23,7 +23,6 @@
#include <set>
#include <memory>
#include <cstdlib>
-#include <deque>
#include <time.h>
@@ -32,7 +31,6 @@
#include "FixAry.h"
#include "libutil.h"
#include "mpr.h"
-#include "store.h"
#define INFO_SIZE 200 // size of message buffers
#define ITEMNAME_SIZE 200 // size of item names/shop names/etc
@@ -64,7 +62,6 @@ const int kPathLen = 256;
class item_def;
class melee_attack;
class coord_def;
-class level_id;
class actor
{
@@ -83,15 +80,9 @@ public:
virtual bool swimming() const = 0;
virtual bool submerged() const = 0;
virtual bool floundering() const = 0;
-
- virtual bool can_pass_through(const dungeon_feature_type grid) const = 0;
- virtual bool can_pass_through(const int x, const int y) const = 0;
- virtual bool can_pass_through(const coord_def &c) const = 0;
virtual size_type body_size(int psize = PSIZE_TORSO,
bool base = false) const = 0;
- virtual int body_weight() const = 0;
- virtual int total_weight() const = 0;
virtual int damage_type(int which_attack = -1) = 0;
virtual int damage_brand(int which_attack = -1) = 0;
@@ -134,9 +125,7 @@ public:
virtual void confuse(int strength) = 0;
virtual void rot(actor *attacker, int rotlevel, int immediate_rot) = 0;
virtual void expose_to_element(beam_type element, int strength = 0) = 0;
- virtual void drain_stat(int stat, int amount, actor* attacker) { }
- virtual void put_to_sleep(int power = 0) { };
- virtual void check_awaken(int disturbance) = 0;
+ virtual void drain_stat(int stat, int amount) { }
virtual bool wearing_light_armour(bool = false) const { return (true); }
virtual int skill(skill_type sk, bool skill_bump = false) const
@@ -196,10 +185,6 @@ public:
{
return (true);
}
-
- virtual bool will_trigger_shaft() const;
- virtual level_id shaft_dest() const;
- virtual bool do_shaft() = 0;
};
struct coord_def
@@ -341,7 +326,6 @@ struct delay_queue_item
int duration;
int parm1;
int parm2;
- bool started;
};
@@ -366,8 +350,6 @@ struct item_def
std::string inscription;
- CrawlHashTable props;
-
public:
item_def() : base_type(OBJ_UNASSIGNED), sub_type(0), plus(0), plus2(0),
special(0L), colour(0), flags(0L), quantity(0),
@@ -379,14 +361,10 @@ public:
std::string name(description_level_type descrip,
bool terse = false, bool ident = false,
bool with_inscription = true,
- bool quantity_in_words = false,
- unsigned long ignore_flags = 0x0) const;
+ bool quantity_in_words = false) const;
bool has_spells() const;
bool cursed() const;
int book_number() const;
- int zap() const; // what kind of beam it shoots (if wand).
- // XXX should really return zap_type!
-
// Returns index in mitm array. Results are undefined if this item is
// not in the array!
@@ -402,8 +380,7 @@ public:
}
private:
std::string name_aux( description_level_type desc,
- bool terse, bool ident,
- unsigned long ignore_flags ) const;
+ bool terse, bool ident ) const;
};
class runrest
@@ -498,23 +475,18 @@ typedef std::vector<delay_queue_item> delay_queue_type;
class KillMaster;
-
-
class player : public actor
{
public:
bool turn_is_over; // flag signaling that player has performed a timed action
-
+
// If true, player is headed to the Abyss.
bool banished;
std::string banished_by;
- std::vector<int> beheld_by; // monsters beholding player
-
bool just_autoprayed; // autopray just kicked in
- unsigned short prev_targ;
- coord_def prev_grd_targ;
+ unsigned char prev_targ;
char your_name[kNameLen];
species_type species;
@@ -603,7 +575,7 @@ public:
char spell_no;
game_direction_type char_direction;
- unsigned short pet_target;
+ unsigned char pet_target;
int your_level; // offset by one (-1 == 0, 0 == 1, etc.) for display
@@ -647,9 +619,6 @@ public:
level_area_type level_type;
std::string level_type_name;
- entry_cause_type entry_cause;
- god_type entry_cause_god;
-
branch_type where_are_you;
FixedVector<unsigned char, 30> branch_stairs;
@@ -757,16 +726,11 @@ public:
bool swimming() const;
bool submerged() const;
bool floundering() const;
- bool can_pass_through(const dungeon_feature_type grid) const;
- bool can_pass_through(const int x, const int y) const;
- bool can_pass_through(const coord_def &c) const;
size_type body_size(int psize = PSIZE_TORSO, bool base = false) const;
- int body_weight() const;
- int total_weight() const;
int damage_type(int attk = -1);
int damage_brand(int attk = -1);
- int has_claws(bool allow_tran = true) const;
- bool has_usable_claws(bool allow_tran = true) const;
+ bool has_claws() const;
+ bool has_usable_claws() const;
item_def *weapon(int which_attack = -1);
item_def *shield();
@@ -785,7 +749,7 @@ public:
void banish(const std::string &who = "");
void blink();
void teleport(bool right_now = false, bool abyss_shift = false);
- void drain_stat(int stat, int amount, actor* attacker);
+ void drain_stat(int stat, int amount);
void expose_to_element(beam_type element, int strength = 0);
void god_conduct(conduct_type thing_done, int level);
@@ -812,11 +776,8 @@ public:
int res_elec() const;
int res_poison() const;
int res_negative_energy() const;
- bool confusable() const;
- bool slowable() const;
-
- bool omnivorous() const;
+ bool is_levitating() const;
flight_type flight_mode() const;
bool paralysed() const;
@@ -824,13 +785,6 @@ public:
bool caught() const;
bool backlit() const;
- bool asleep() const;
- void put_to_sleep(int power = 0);
- void awake();
- void check_awaken(int disturbance);
-
- bool cannot_act() const;
-
bool can_throw_rocks() const;
int armour_class() const;
@@ -860,8 +814,6 @@ public:
// modify the player object.
std::vector<PlaceInfo> get_all_place_info(bool visited_only = false,
bool dungeon_only = false) const;
-
- bool do_shaft();
};
extern player you;
@@ -889,6 +841,7 @@ public:
};
class ghost_demon;
+class level_id;
class mon_enchant
{
@@ -960,7 +913,6 @@ public:
mon_attitude_type attitude;
beh_type behaviour;
unsigned int foe;
- char ench_countdown;
mon_enchant_list enchantments;
unsigned long flags; // bitfield of boolean flags
@@ -975,9 +927,6 @@ public:
std::auto_ptr<ghost_demon> ghost; // Ghost information.
- std::string seen_context; // Non-standard context for
- // AI_SEE_MONSTER
-
public:
void init_experience();
@@ -1035,12 +984,7 @@ public:
bool submerged() const;
bool can_drown() const;
bool floundering() const;
- bool can_pass_through(const dungeon_feature_type grid) const;
- bool can_pass_through(const int x, const int y) const;
- bool can_pass_through(const coord_def &c) const;
size_type body_size(int psize = PSIZE_TORSO, bool base = false) const;
- int body_weight() const;
- int total_weight() const;
int damage_type(int attk = -1);
int damage_brand(int attk = -1);
@@ -1102,8 +1046,8 @@ public:
int res_poison() const;
int res_negative_energy() const;
- flight_type flight_mode() const;
bool is_levitating() const;
+ flight_type flight_mode() const;
bool invisible() const;
bool can_see_invisible() const;
bool visible_to(const actor *looker) const ;
@@ -1131,9 +1075,6 @@ public:
void blink();
void teleport(bool right_now = false, bool abyss_shift = false);
- void put_to_sleep(int power = 0);
- void check_awaken(int disturbance);
-
int stat_hp() const { return hit_points; }
int stat_maxhp() const { return max_hit_points; }
@@ -1151,8 +1092,6 @@ public:
static int base_speed(int mcls);
- bool do_shaft();
-
private:
void init_with(const monsters &mons);
void swap_slots(mon_inv_type a, mon_inv_type b);
@@ -1184,7 +1123,6 @@ struct cloud_struct
int y;
cloud_type type;
int decay;
- unsigned char spread_rate;
kill_category whose;
killer_type beam_thrower() const;
@@ -1240,8 +1178,6 @@ public:
map_marker *find(map_marker_type type);
void move(const coord_def &from, const coord_def &to);
std::vector<map_marker*> get_all(map_marker_type type = MAT_ANY);
- std::vector<map_marker*> get_all(const std::string &key,
- const std::string &val = "");
std::vector<map_marker*> get_markers_at(const coord_def &c);
std::string property_at(const coord_def &c, map_marker_type type,
const std::string &key);
@@ -1272,9 +1208,9 @@ public:
FixedVector< monsters, MAX_MONSTERS > mons; // monster list
feature_grid grid; // terrain grid
- FixedArray< unsigned short, GXM, GYM > mgrid; // monster grid
+ FixedArray< unsigned char, GXM, GYM > mgrid; // monster grid
FixedArray< int, GXM, GYM > igrid; // item grid
- FixedArray< unsigned short, GXM, GYM > cgrid; // cloud grid
+ FixedArray< unsigned char, GXM, GYM > cgrid; // cloud grid
FixedArray< unsigned short, GXM, GYM > grid_colours; // colour overrides
FixedArray< map_cell, GXM, GYM > map; // discovered terrain
@@ -1284,11 +1220,6 @@ public:
FixedArray<unsigned short, ENV_SHOW_DIAMETER, ENV_SHOW_DIAMETER>
show_col; // view window colour
- // What would be visible, if all of the translucent wall were
- // made opaque.
- FixedArray<unsigned, ENV_SHOW_DIAMETER, ENV_SHOW_DIAMETER>
- no_trans_show;
-
FixedVector< cloud_struct, MAX_CLOUDS > cloud; // cloud list
unsigned char cloud_no;
@@ -1302,10 +1233,6 @@ public:
// Number of turns the player has spent on this level.
int turns_on_level;
-
- // Flags for things like preventing teleport control; see
- // level_flag_type in enum.h
- unsigned long level_flags;
};
extern struct crawl_environment env;
@@ -1367,7 +1294,6 @@ struct sound_mapping
struct colour_mapping
{
- std::string tag;
text_pattern pattern;
int colour;
};
@@ -1475,8 +1401,6 @@ public:
bool messaging; // Check for messages.
#endif
- bool suppress_startup_errors;
-
bool mouse_input;
int view_max_width;
@@ -1511,15 +1435,19 @@ public:
bool colour_map; // add colour to the map
bool clean_map; // remove unseen clouds/monsters
bool show_uncursed; // label known uncursed items as "uncursed"
+ bool always_greet; // display greeting message when reloading
bool easy_open; // open doors with movement
bool easy_unequip; // allow auto-removing of armour / jewelry
bool easy_butcher; // open doors with movement
- bool always_confirm_butcher; // even if only one corpse
+ bool increasing_skill_progress; // skills go from 0-10 or 10-0
+ bool confirm_self_target; // require confirmation before selftarget
bool default_target; // start targeting on a real target
+ bool safe_autopickup; // don't autopickup when monsters visible
bool autopickup_no_burden; // don't autopickup if it changes burden
bool note_all_skill_levels; // take note for all skill levels (1-27)
bool note_skill_max; // take note when skills reach new max
bool note_all_spells; // take note when learning any spell
+ bool use_notes; // take (and dump) notes
std::string user_note_prefix; // Prefix for user notes
int note_hp_percent; // percentage hp for notetaking
int ood_interesting; // how many levels OOD is noteworthy?
@@ -1538,6 +1466,7 @@ public:
int magic_point_warning; // percentage mp for danger warning
char race; // preselected race
char cls; // preselected class
+ bool terse_hand; // use terse description for wielded item
bool delay_message_clear; // avoid clearing messages each turn
unsigned friend_brand; // Attribute for branding friendly monsters
bool no_dark_brand; // Attribute for branding friendly monsters
@@ -1550,6 +1479,7 @@ public:
bool auto_list; // automatically jump to appropriate item lists
bool flush_input[NUM_FLUSH_REASONS]; // when to flush input buff
+ bool lowercase_invocations; // prefer lowercase invocations
char_set_type char_set;
FixedVector<unsigned, NUM_DCHAR_TYPES> char_table;
@@ -1640,6 +1570,7 @@ public:
std::vector<std::string> dump_order;
bool level_map_title; // Show title in level map
+ bool safe_zero_exp; // If true, you feel safe around 0xp monsters
bool target_zero_exp; // If true, targeting targets zero-exp
// monsters.
bool target_wrap; // Wrap around from last to first target