#include <chunks.h>
Inheritance diagram for Map_chunk:
Public Types | |
enum | Find_spot_where { anywhere = 0, inside, outside } |
Public Member Functions | |
Map_chunk (int chunkx, int chunky) | |
~Map_chunk () | |
Chunk_terrain * | get_terrain () const |
void | set_terrain (Chunk_terrain *ter) |
void | add (Game_object *obj) |
void | add_egg (Egg_object *egg) |
void | remove_egg (Egg_object *egg) |
void | remove (Game_object *obj) |
int | is_roof (int tx, int ty, int lift) |
Object_list & | get_objects () |
Game_object * | get_first_nonflat () const |
int | get_cx () const |
int | get_cy () const |
int | get_dungeon_lights () const |
int | get_non_dungeon_lights () const |
ShapeID | get_flat (int tilex, int tiley) const |
Image_buffer8 * | get_rendered_flats () |
Chunk_cache * | get_cache () const |
Chunk_cache * | need_cache () |
void | setup_cache () |
void | set_blocked (int startx, int starty, int endx, int endy, int lift, int ztiles, bool set) |
int | get_highest_blocked (int lift, int tx, int ty) |
int | get_lowest_blocked (int lift, int tx, int ty) |
int | is_blocked (int height, int lift, int tx, int ty, int &new_lift, const int move_flags, int max_drop=1, int max_rise=-1) |
void | set_egged (Egg_object *egg, Rectangle &tiles, bool add) |
void | activate_eggs (Game_object *obj, int tx, int ty, int tz, int from_tx, int from_ty, bool now=false) |
Game_object * | find_door (Tile_coord t) |
void | setup_dungeon_levels () |
int | has_dungeon () |
int | is_dungeon (int tx, int ty) |
bool | is_ice_dungeon (int tx, int ty) |
void | kill_cache () |
int | get_obj_actors (Game_object_vector &removes, Actor_vector &actors) |
Static Public Member Functions | |
static void | gravity (Rectangle area, int lift) |
static int | is_blocked (int height, int lift, int startx, int starty, int xtiles, int ytiles, int &new_lift, const int move_flags, int max_drop, int max_rise=-1) |
static int | is_blocked (Tile_coord &tile, int height=1, const int move_flags=((1<< 5)|(1<< 6)), int max_drop=1, int max_rise=-1) |
static int | is_blocked (int xtiles, int ytiles, int ztiles, Tile_coord from, Tile_coord &to, const int move_flags, int max_drop=1, int max_rise=-1) |
static Tile_coord | find_spot (Tile_coord pos, int dist, int shapenum, int framenum, int max_drop=0, int dir=-1, Find_spot_where where=anywhere) |
static Tile_coord | find_spot (Tile_coord pos, int dist, Game_object *obj, int max_drop=0, Find_spot_where where=anywhere) |
static int | find_in_area (Game_object_vector &vec, Rectangle area, int shapenum, int framenum) |
static void | try_all_eggs (Game_object *obj, int tx, int ty, int tz, int from_tx, int from_ty) |
Private Member Functions | |
void | add_dungeon_levels (Rectangle &tiles, unsigned int lift) |
void | add_dependencies (Game_object *newobj, class Ordering_info &newinfo) |
Static Private Member Functions | |
static Map_chunk * | add_outside_dependencies (int cx, int cy, Game_object *newobj, class Ordering_info &newinfo) |
Private Attributes | |
Chunk_terrain * | terrain |
Object_list | objects |
Game_object * | first_nonflat |
unsigned char | from_below |
unsigned char | from_right |
unsigned char | from_below_right |
unsigned char | ice_dungeon |
unsigned char * | dungeon_levels |
Chunk_cache * | cache |
unsigned char | roof |
unsigned char | dungeon_lights |
unsigned char | non_dungeon_lights |
unsigned char | cx |
unsigned char | cy |
Friends | |
class | Npc_actor |
Definition at line 132 of file chunks.h.
void Map_chunk::add_dungeon_levels | ( | Rectangle & | tiles, | |
unsigned int | lift | |||
) | [private] |
Definition at line 1299 of file chunks.cc.
References c_tiles_per_chunk, GAME_SI, Rectangle::h, Rectangle::w, Rectangle::x, and Rectangle::y.
Referenced by setup_dungeon_levels().
void Map_chunk::add_dependencies | ( | Game_object * | newobj, | |
class Ordering_info & | newinfo | |||
) | [private] |
Definition at line 688 of file chunks.cc.
References Game_object::compare(), Game_object::dependencies, Game_object::dependors, T_Object_iterator< T >::get_next(), Exult_server::obj, and Exult_vector< T >::put().
Referenced by add_outside_dependencies().
Here is the call graph for this function:
Map_chunk * Map_chunk::add_outside_dependencies | ( | int | cx, | |
int | cy, | |||
Game_object * | newobj, | |||
class Ordering_info & | newinfo | |||
) | [inline, static, private] |
Definition at line 722 of file chunks.cc.
References add_dependencies().
Here is the call graph for this function:
Chunk_terrain* Map_chunk::get_terrain | ( | ) | const [inline] |
Definition at line 157 of file chunks.h.
References terrain.
Referenced by Game_render::paint_chunk_flats(), and Game_render::paint_terrain_only().
void Map_chunk::set_terrain | ( | Chunk_terrain * | ter | ) |
Definition at line 639 of file chunks.cc.
References Chunk_terrain::add_client(), Game_object::as_terrain(), c_tiles_per_chunk, Chunk_terrain::get_flat(), T_Object_iterator< T >::get_next(), ShapeID::get_shape(), Exult_server::info, Shape_frame::is_rle(), and Exult_server::obj.
Referenced by Game_map::get_chunk_objects().
Here is the call graph for this function:
void Map_chunk::add | ( | Game_object * | obj | ) |
Definition at line 740 of file chunks.cc.
References Shape_info::building, Game_object::cx, Game_object::cy, DECR_CHUNK, Shape_info::get_3d_height(), Shape_info::get_shape_class(), gwin, INCR_CHUNK, Ordering_info::info, Shape_info::is_light_source(), Ordering_info::xs, and Ordering_info::ys.
Referenced by Egg_object::activate(), Game_map::get_ifix_chunk_objects(), Game_object::move(), Actor::movef(), Game_map::read_ireg_objects(), and Usecode_internal::set_item_shape().
Here is the call graph for this function:
void Map_chunk::add_egg | ( | Egg_object * | egg | ) |
Definition at line 805 of file chunks.cc.
References Ucscript::egg.
Referenced by Egg_object::activate(), Egg_object::move(), Game_map::read_ireg_objects(), and Egg_object::update_from_studio().
void Map_chunk::remove_egg | ( | Egg_object * | egg | ) |
Definition at line 820 of file chunks.cc.
References Ucscript::egg, and Ucscript::remove.
Referenced by Egg_object::remove_this(), and Egg_object::update_from_studio().
void Map_chunk::remove | ( | Game_object * | obj | ) |
Definition at line 835 of file chunks.cc.
References Ucscript::frame, from_below, from_below_right, Game_map::get_chunk(), Game_window::get_map(), gwin, Exult_server::info, and Ucscript::remove.
Referenced by Game_object::move(), Game_object::remove_this(), Ireg_game_object::remove_this(), and Usecode_internal::set_item_shape().
Here is the call graph for this function:
void Map_chunk::gravity | ( | Rectangle | area, | |
int | lift | |||
) | [static] |
Definition at line 1406 of file chunks.cc.
References T_Object_iterator< T >::get_next(), Chunk_intersect_iterator::get_next(), Rectangle::h, Rectangle::intersects(), MOVE_ALL_TERRAIN, Exult_server::obj, objects, Tile_coord::tx, Tile_coord::ty, Tile_coord::tz, Rectangle::w, Rectangle::x, and Rectangle::y.
Referenced by Dragging_info::drop().
Here is the call graph for this function:
int Map_chunk::is_roof | ( | int | tx, | |
int | ty, | |||
int | lift | |||
) |
Definition at line 1479 of file chunks.cc.
References get_lowest_blocked().
Referenced by Check_spot(), Main_actor::move(), Game_window::set_scrolls(), and Main_actor::step().
Here is the call graph for this function:
Object_list& Map_chunk::get_objects | ( | ) | [inline] |
Definition at line 169 of file chunks.h.
References objects.
Referenced by Game_window::emulate_cache(), Game_object::find_blocking(), get_obj_actors(), Game_map::locate_shape(), Chunk_cache::setup(), and Game_window::show_items().
Game_object* Map_chunk::get_first_nonflat | ( | ) | const [inline] |
int Map_chunk::get_cx | ( | ) | const [inline] |
Definition at line 174 of file chunks.h.
References cx.
Referenced by Main_actor::switched_chunks().
int Map_chunk::get_cy | ( | ) | const [inline] |
Definition at line 176 of file chunks.h.
References cy.
Referenced by Main_actor::switched_chunks().
int Map_chunk::get_dungeon_lights | ( | ) | const [inline] |
Definition at line 178 of file chunks.h.
References dungeon_lights.
Referenced by Game_render::paint_chunk_objects().
int Map_chunk::get_non_dungeon_lights | ( | ) | const [inline] |
Definition at line 180 of file chunks.h.
References non_dungeon_lights.
Referenced by Game_render::paint_chunk_objects().
ShapeID Map_chunk::get_flat | ( | int | tilex, | |
int | tiley | |||
) | const [inline] |
Definition at line 182 of file chunks.h.
References Chunk_terrain::get_flat(), ShapeID::ShapeID(), and terrain.
Referenced by Check_terrain(), Barge_object::gather(), Game_window::get_flat(), Actor_pathfinder_client::get_step_cost(), and Actor::get_tile_info().
Here is the call graph for this function:
Image_buffer8* Map_chunk::get_rendered_flats | ( | ) | [inline] |
Definition at line 185 of file chunks.h.
References Chunk_terrain::get_rendered_flats(), and terrain.
Referenced by Game_render::paint_chunk_flats().
Here is the call graph for this function:
Chunk_cache* Map_chunk::get_cache | ( | ) | const [inline] |
Definition at line 188 of file chunks.h.
References cache.
Referenced by Chunk_cache::activate_eggs().
Chunk_cache* Map_chunk::need_cache | ( | ) | [inline] |
Definition at line 189 of file chunks.h.
References cache, and Chunk_cache::setup().
Referenced by activate_eggs(), find_door(), get_highest_blocked(), get_lowest_blocked(), set_blocked(), set_egged(), and setup_cache().
Here is the call graph for this function:
void Map_chunk::setup_cache | ( | ) | [inline] |
Definition at line 195 of file chunks.h.
References need_cache().
Referenced by Fast_pathfinder_client::get_step_cost(), Actor_pathfinder_client::get_step_cost(), is_blocked(), Actor::is_blocked(), Game_window::set_scrolls(), Game_window::setup_game(), Game_window::start_actor_alt(), Monster_actor::step(), and try_all_eggs().
Here is the call graph for this function:
void Map_chunk::set_blocked | ( | int | startx, | |
int | starty, | |||
int | endx, | |||
int | endy, | |||
int | lift, | |||
int | ztiles, | |||
bool | set | |||
) | [inline] |
Definition at line 198 of file chunks.h.
References need_cache(), and Chunk_cache::set_blocked().
Here is the call graph for this function:
int Map_chunk::get_highest_blocked | ( | int | lift, | |
int | tx, | |||
int | ty | |||
) | [inline] |
Definition at line 203 of file chunks.h.
References Chunk_cache::get_highest_blocked(), and need_cache().
Here is the call graph for this function:
int Map_chunk::get_lowest_blocked | ( | int | lift, | |
int | tx, | |||
int | ty | |||
) | [inline] |
Definition at line 205 of file chunks.h.
References Chunk_cache::get_lowest_blocked(), and need_cache().
Referenced by is_roof().
Here is the call graph for this function:
int Map_chunk::is_blocked | ( | int | height, | |
int | lift, | |||
int | tx, | |||
int | ty, | |||
int & | new_lift, | |||
const int | move_flags, | |||
int | max_drop = 1 , |
|||
int | max_rise = -1 | |||
) | [inline] |
Definition at line 208 of file chunks.h.
References cache, and Chunk_cache::is_blocked().
Referenced by Mirror_object::activate(), Game_window::drop_at_lift(), find_spot(), Find_target(), Monster_pathfinder_client::get_step_cost(), Fast_pathfinder_client::get_step_cost(), is_blocked(), Actor::is_blocked(), Game_object::is_closed_door(), Sit_actor_action::is_occupied(), Fast_pathfinder_client::is_straight_path(), Actor::move_aside(), Barge_object::okay_to_rotate(), Game_window::start_actor_alt(), Barge_object::step(), and Usecode_internal::UI_is_not_blocked().
Here is the call graph for this function:
int Map_chunk::is_blocked | ( | int | height, | |
int | lift, | |||
int | startx, | |||
int | starty, | |||
int | xtiles, | |||
int | ytiles, | |||
int & | new_lift, | |||
const int | move_flags, | |||
int | max_drop, | |||
int | max_rise = -1 | |||
) | [static] |
Definition at line 882 of file chunks.cc.
References c_num_tiles, c_tiles_per_chunk, Game_map::get_chunk(), Game_window::get_map(), gwin, INCR_TILE, is_blocked(), and setup_cache().
Here is the call graph for this function:
int Map_chunk::is_blocked | ( | Tile_coord & | tile, | |
int | height = 1 , |
|||
const int | move_flags = ((1<< 5)|(1<< 6)) , |
|||
int | max_drop = 1 , |
|||
int | max_rise = -1 | |||
) | [static] |
Definition at line 930 of file chunks.cc.
References c_tiles_per_chunk, Game_map::get_chunk_safely(), Game_window::get_map(), gwin, is_blocked(), setup_cache(), Tile_coord::tx, Tile_coord::ty, and Tile_coord::tz.
Here is the call graph for this function:
int Map_chunk::is_blocked | ( | int | xtiles, | |
int | ytiles, | |||
int | ztiles, | |||
Tile_coord | from, | |||
Tile_coord & | to, | |||
const int | move_flags, | |||
int | max_drop = 1 , |
|||
int | max_rise = -1 | |||
) | [static] |
Definition at line 961 of file chunks.cc.
References c_num_tiles, c_tiles_per_chunk, DECR_TILE(), Tile_coord::gte(), INCR_TILE, Tile_coord::tx, Tile_coord::ty, and Tile_coord::tz.
Here is the call graph for this function:
Tile_coord Map_chunk::find_spot | ( | Tile_coord | pos, | |
int | dist, | |||
int | shapenum, | |||
int | framenum, | |||
int | max_drop = 0 , |
|||
int | dir = -1 , |
|||
Find_spot_where | where = anywhere | |||
) | [static] |
Definition at line 1126 of file chunks.cc.
References Check_spot(), ShapeID::get_info(), Get_square(), Exult_server::info, is_blocked(), MOVE_FLY, MOVE_WALK, Tile_coord::tx, Tile_coord::ty, and Tile_coord::tz.
Referenced by Usecode_internal::add_party_items(), Actor::approach_another(), Game_window::call_guards(), Actor::clear_flag(), Actor::clone(), Create_monster(), Actor::die(), Sleep_schedule::ending(), Actor::figure_hit_points(), Actor::follow(), Waiter_schedule::get_customer(), Sew_schedule::now_what(), Waiter_schedule::now_what(), Lab_schedule::now_what(), Wander_schedule::now_what(), Patrol_schedule::now_what(), Follow_avatar_schedule::now_what(), Duel_schedule::now_what(), Path_walking_actor_action::open_door(), Usecode_internal::path_run_usecode(), Combat_schedule::teleport(), Game_window::teleport_party(), and Usecode_internal::UI_summon().
Here is the call graph for this function:
Tile_coord Map_chunk::find_spot | ( | Tile_coord | pos, | |
int | dist, | |||
Game_object * | obj, | |||
int | max_drop = 0 , |
|||
Find_spot_where | where = anywhere | |||
) | [static] |
Definition at line 1188 of file chunks.cc.
References Get_direction(), Exult_server::obj, Tile_coord::tx, and Tile_coord::ty.
Here is the call graph for this function:
void Map_chunk::set_egged | ( | Egg_object * | egg, | |
Rectangle & | tiles, | |||
bool | add | |||
) | [inline] |
Definition at line 239 of file chunks.h.
References Ucscript::egg, need_cache(), and Chunk_cache::set_egged().
Here is the call graph for this function:
void Map_chunk::activate_eggs | ( | Game_object * | obj, | |
int | tx, | |||
int | ty, | |||
int | tz, | |||
int | from_tx, | |||
int | from_ty, | |||
bool | now = false | |||
) | [inline] |
Definition at line 241 of file chunks.h.
References Chunk_cache::activate_eggs(), need_cache(), and Exult_server::obj.
Referenced by Game_window::drop_at_lift(), Game_window::setup_game(), Barge_object::step(), Npc_actor::step(), and Main_actor::step().
Here is the call graph for this function:
Game_object* Map_chunk::find_door | ( | Tile_coord | t | ) | [inline] |
Definition at line 246 of file chunks.h.
References Chunk_cache::find_door(), and need_cache().
Referenced by Game_object::find_door().
Here is the call graph for this function:
int Map_chunk::find_in_area | ( | Game_object_vector & | vec, | |
Rectangle | area, | |||
int | shapenum, | |||
int | framenum | |||
) | [static] |
Definition at line 1211 of file chunks.cc.
References Exult_vector< T >::append(), Game_map::get_chunk_safely(), ShapeID::get_framenum(), Game_window::get_map(), T_Object_iterator< T >::get_next(), Chunk_intersect_iterator::get_next(), ShapeID::get_shapenum(), Game_object::get_tx(), Game_object::get_ty(), gwin, Rectangle::has_point(), and objects.
Referenced by Usecode_internal::UI_remove_from_area().
Here is the call graph for this function:
void Map_chunk::try_all_eggs | ( | Game_object * | obj, | |
int | tx, | |||
int | ty, | |||
int | tz, | |||
int | from_tx, | |||
int | from_ty | |||
) | [static] |
Definition at line 1247 of file chunks.cc.
References Ucscript::egg, Game_map::get_chunk_safely(), Game_window::get_map(), T_Object_iterator< T >::get_next(), Chunk_intersect_iterator::get_next(), gwin, Game_object::is_egg(), Egg_object::jukebox, Exult_server::obj, objects, setup_cache(), Egg_object::teleport, Tile_coord::tx, and Tile_coord::ty.
Referenced by Game_window::teleport_party(), and Usecode_internal::UI_move_object().
Here is the call graph for this function:
void Map_chunk::setup_dungeon_levels | ( | ) |
Definition at line 1335 of file chunks.cc.
References add_dungeon_levels(), c_tiles_per_chunk, Game_map::get_chunk(), Game_object::get_footprint(), ShapeID::get_framenum(), Game::get_game_type(), ShapeID::get_info(), Game_object::get_lift(), Game_window::get_map(), Chunk_intersect_iterator::get_next(), T_Object_iterator< T >::get_next(), ShapeID::get_shapenum(), Game_object::get_tx(), Game_object::get_ty(), gwin, Shape_info::is_light_source(), T_Object_iterator< T >::reset(), and SERPENT_ISLE.
Referenced by Game_map::get_ifix_chunk_objects().
Here is the call graph for this function:
int Map_chunk::has_dungeon | ( | ) | [inline] |
Definition at line 254 of file chunks.h.
References dungeon_levels.
Referenced by Main_actor::move(), Game_render::paint_blackness(), Game_window::set_scrolls(), and Main_actor::step().
int Map_chunk::is_dungeon | ( | int | tx, | |
int | ty | |||
) | [inline] |
Definition at line 259 of file chunks.h.
References c_tiles_per_chunk, and dungeon_levels.
Referenced by Main_actor::move(), Game_render::paint_blackness(), Game_window::set_scrolls(), and Main_actor::step().
bool Map_chunk::is_ice_dungeon | ( | int | tx, | |
int | ty | |||
) | [inline] |
Definition at line 266 of file chunks.h.
References ice_dungeon.
Referenced by Main_actor::move(), Game_window::set_scrolls(), and Main_actor::step().
void Map_chunk::kill_cache | ( | ) |
int Map_chunk::get_obj_actors | ( | Game_object_vector & | removes, | |
Actor_vector & | actors | |||
) |
Definition at line 1505 of file chunks.cc.
References Game_object::as_actor(), Game_object::get_flag(), T_Object_iterator< T >::get_next(), get_objects(), Game_object::is_monster(), and Obj_flags::is_temporary.
Here is the call graph for this function:
Chunk_terrain* Map_chunk::terrain [private] |
Definition at line 134 of file chunks.h.
Referenced by get_flat(), get_rendered_flats(), and get_terrain().
Object_list Map_chunk::objects [private] |
Definition at line 135 of file chunks.h.
Referenced by find_in_area(), get_objects(), gravity(), and try_all_eggs().
Game_object* Map_chunk::first_nonflat [private] |
unsigned char Map_chunk::from_below [private] |
unsigned char Map_chunk::from_right [private] |
unsigned char Map_chunk::from_below_right [private] |
unsigned char Map_chunk::ice_dungeon [private] |
unsigned char* Map_chunk::dungeon_levels [private] |
Definition at line 142 of file chunks.h.
Referenced by has_dungeon(), is_dungeon(), and kill_cache().
Chunk_cache* Map_chunk::cache [private] |
Definition at line 143 of file chunks.h.
Referenced by get_cache(), is_blocked(), kill_cache(), and need_cache().
unsigned char Map_chunk::roof [private] |
unsigned char Map_chunk::dungeon_lights [private] |
unsigned char Map_chunk::non_dungeon_lights [private] |
unsigned char Map_chunk::cx [private] |
unsigned char Map_chunk::cy [private] |