summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.h
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-15 23:33:50 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-15 23:33:50 +0000
commitfa763ba1bc7285247a5b1438d59633383a80cf6c (patch)
treef4b632fea66f43dc6c1415fdaa4feead0b6ff90d /crawl-ref/source/misc.h
parent4d88632cb99d368956dec86732f7d275ffb941e8 (diff)
downloadcrawl-ref-fa763ba1bc7285247a5b1438d59633383a80cf6c.tar.gz
crawl-ref-fa763ba1bc7285247a5b1438d59633383a80cf6c.zip
Split off portions of externs.h and enum.h into other files. The
crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.h')
-rw-r--r--crawl-ref/source/misc.h123
1 files changed, 6 insertions, 117 deletions
diff --git a/crawl-ref/source/misc.h b/crawl-ref/source/misc.h
index a0dc140417..48145be182 100644
--- a/crawl-ref/source/misc.h
+++ b/crawl-ref/source/misc.h
@@ -1,5 +1,5 @@
/*
- * File: misc.cc
+ * File: misc.h
* Summary: Misc functions.
* Written by: Linley Henzell
*
@@ -16,16 +16,15 @@
#include "externs.h"
-#include "travel.h"
+
+struct bolt;
+struct dist;
// last updated 08jan2001 {gdl}
/* ***********************************************************************
* called from: ability - decks - fight - it_use2 - spells1
* *********************************************************************** */
bool go_berserk(bool intentional);
-bool trap_item(object_class_type base_type, char sub_type,
- char beam_x, char beam_y);
-
// last updated 12may2000 {dlb}
/* ***********************************************************************
@@ -36,14 +35,6 @@ void search_around( bool only_adjacent = false );
// last updated 12may2000 {dlb}
/* ***********************************************************************
- * called from: acr
- * *********************************************************************** */
-void disarm_trap(struct dist &disa);
-void remove_net_from( monsters *mon );
-void free_self_from_net( bool damage_net = true );
-
-// last updated 12may2000 {dlb}
-/* ***********************************************************************
* called from: acr - effects - spells3
* *********************************************************************** */
void down_stairs(int old_level, dungeon_feature_type force_stair = DNGN_UNSEEN);
@@ -53,24 +44,6 @@ void down_stairs(int old_level, dungeon_feature_type force_stair = DNGN_UNSEEN);
/* ***********************************************************************
* called from: acr
* *********************************************************************** */
-bool fall_into_a_pool( int entry_x, int entry_y, bool allow_shift,
- unsigned char terrain );
-
-
-// last updated 12may2000 {dlb}
-/* ***********************************************************************
- * called from: acr - misc
- * *********************************************************************** */
-void handle_traps(char trt, int i, bool trap_known);
-int get_trapping_net(int x, int y, bool trapped = true);
-void mark_net_trapping(int x, int y);
-void monster_caught_in_net(monsters *mon, bolt &pbolt);
-void player_caught_in_net(void);
-
-// last updated 12may2000 {dlb}
-/* ***********************************************************************
- * called from: acr
- * *********************************************************************** */
void in_a_cloud(void);
// Created Sept 1, 2000 -- bwr
@@ -81,13 +54,6 @@ void merfolk_start_swimming(void);
// last updated 12may2000 {dlb}
/* ***********************************************************************
- * called from: misc - mstuff2
- * *********************************************************************** */
-void itrap(struct bolt &pbolt, int trapped);
-
-
-// last updated 12may2000 {dlb}
-/* ***********************************************************************
* called from: acr - misc - player - stuff
* *********************************************************************** */
void new_level(void);
@@ -103,13 +69,6 @@ void trackers_init_new_level(bool transit);
void turn_corpse_into_chunks( item_def &item );
-// last updated 3jun2000 {dlb}
-/* ***********************************************************************
- * called from: acr - misc - mstuff2 - spells3
- * *********************************************************************** */
-int trap_at_xy(int which_x, int which_y);
-
-
// last updated 12may2000 {dlb}
/* ***********************************************************************
* called from: acr
@@ -130,43 +89,9 @@ std::string weird_colours(unsigned char coll);
std::string weird_writing();
-// last updated 3jun2000 {dlb}
-/* ***********************************************************************
- * called from: acr - misc - mstuff2 - spells2 - spells3
- * *********************************************************************** */
-dungeon_feature_type trap_category(trap_type type);
-
-int trap_at_xy(int x, int y);
-trap_type trap_type_at_xy(int x, int y);
-
-bool grid_is_wall(dungeon_feature_type grid);
-bool grid_is_opaque(dungeon_feature_type grid);
-bool grid_is_solid(dungeon_feature_type grid);
-bool grid_is_stone_stair(dungeon_feature_type grid);
-bool grid_is_rock_stair(dungeon_feature_type grid);
-bool grid_is_solid(int x, int y);
-bool grid_is_solid(const coord_def &c);
-bool grid_is_trap(dungeon_feature_type grid);
-command_type grid_stair_direction(dungeon_feature_type grid);
-bool grid_sealable_portal(dungeon_feature_type grid);
-bool grid_is_portal(dungeon_feature_type grid);
-
-bool grid_is_water(dungeon_feature_type grid);
-bool grid_is_watery(dungeon_feature_type grid);
-god_type grid_altar_god( dungeon_feature_type grid );
-dungeon_feature_type altar_for_god( god_type god );
-bool grid_is_branch_stairs( dungeon_feature_type grid );
-int grid_secret_door_appearance( int gx, int gy );
-bool grid_destroys_items( dungeon_feature_type grid );
-
-bool level_type_exits_up(level_area_type type);
-bool level_type_exits_down(level_area_type type);
-
std::string cloud_name(cloud_type type);
bool is_damaging_cloud(cloud_type type);
-const char *grid_item_destruction_message( dungeon_feature_type grid );
-
void curare_hits_player(int agent, int degree);
bool mons_is_safe(const struct monsters *mon, bool want_move = false);
@@ -177,44 +102,6 @@ void setup_environment_effects();
// Lava smokes, swamp water mists.
void run_environment_effects();
-// Terrain changed under 'pos', perform necessary effects.
-void dungeon_terrain_changed(const coord_def &pos,
- dungeon_feature_type feat = DNGN_UNSEEN,
- bool affect_player = true,
- bool preserve_features = false,
- bool preserve_items = false);
-
-//////////////////////////////////////////////////////////////////////
-// Places and names
-//
-unsigned short get_packed_place();
-
-unsigned short get_packed_place( branch_type branch, int subdepth,
- level_area_type level_type );
-
-int place_branch(unsigned short place);
-int place_depth(unsigned short place);
-std::string short_place_name(unsigned short place);
-std::string short_place_name(level_id id);
-std::string place_name( unsigned short place, bool long_name = false,
- bool include_number = true );
-
-// Prepositional form of branch level name. For example, "in the
-// Abyss" or "on level 3 of the Main Dungeon".
-std::string prep_branch_level_name(unsigned short packed_place);
-std::string prep_branch_level_name();
-
-// Get displayable depth in the current branch, given the absolute
-// depth.
-int subdungeon_depth(branch_type branch, int depth);
-
-// Get absolute depth given the displayable depth in the branch.
-int absdungeon_depth(branch_type branch, int subdepth);
-
-// Get displayable depth in the current branch.
-int player_branch_depth();
-
-bool single_level_branch(branch_type branch);
//////////////////////////////////////////////////////////////////////
int str_to_shoptype(const std::string &s);
@@ -227,4 +114,6 @@ coord_def pick_adjacent_free_square(int x, int y);
int speed_to_duration(int speed);
+bool scramble(void);
+
#endif