Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

FACK Class Reference

#include <fack.hpp>

Inheritance diagram for FACK:

my_game List of all members.

Public Member Functions

void start ()

Protected Member Functions

 FACK (int argc, char **argv)
virtual void execute_action_verb_object (const pt< verb > v, const pt< obj_or_concept > obj_for_which_no_verb_was_chosen, const pt< obj_or_concept > obj_for_which_the_verb_was_chosen)=0
virtual void execute_action_object_object (const pt< obj_or_concept > o1, const pt< obj_or_concept > o2)=0
virtual void execute_action_double_none_of_the_above (const pt< phys_obj > o1, const pt< phys_obj > o2)=0
void execute_commands (pt< PC > player, const list< pt< script_cmd > > &commands)
void define_dialog_aux (const dialog_t &dialog, pt< PC > first_player, pt< PC > second_player, script_cmds_t &commands_first, script_cmds_t &commands_second) const
virtual void active_player_changed (pt< PC > new_act_pl)

Static Protected Member Functions

static bool contains_recursively (pt< container > cont, pt< obj_or_concept > o, pt< container > &real_cont, int_pair &pos)
static bool contains_not_recursively (pt< container > cont, pt< obj_or_concept > o, int_pair &pos)

Protected Attributes

SDL_Surface * special_buttons_icon
int_pair special_buttons_icon_pos
SDL_Rect zone_save_load_game
SDL_Rect zone_cycle_active_player
SDL_Rect zone_toggle_stay_follow
surf_of_letter_t surf_of_letter
pt< PCact_pl
seq_list< pt< PC > > players
set< pt< location > > locations
pt< phys_objhand
pt< phys_objeye
pt< phys_objmouth
pt< phys_objfoot
pt< phys_objear
pt< phys_objbody
pt< concepttopic_hello
pt< concepttopic_yes
pt< concepttopic_no
pt< concepttopic_bye
set< pt< light_across_loc > > lights_across_loc
SDL_Surface * screen
pt< quick_messagequick_msg
list< pt< transition_of_fixed_light > > transitions_of_fixed_light

Private Member Functions

void action (const string &eventId)
void recompute_on_lights (set< pt< light > > &on_lights) const
special_button_pick_result special_button_at_pos (int_pair pos) const
pt< layer_litlit_layer_of_unlit_layer (const layer_unlit_after_anim &unlit, const set< pt< light > > &on_lights, float time, SDL_Rect visible_rect) const
pt< circle_tcircle_of_light (pt< light > l) const
update_AI_result update_AI_state (pt< PC > player, float dt, int_pair top_left_of_obj_in_cont_coords)
void update_light_transitions (float dt)
SDL_Rect find_scrolling_rect (int_pair size_of_bg_surf)
result_exec_next_scr_cmd exec_next_scr_cmd (const vector< pt< script_cmd > > commands, int cur_cmd_it, const pt< PC > pl, pt< anim_frame > last_frame, bool increm_cmd_at_start, bool must_set_player_left_or_right)
void close_all_open_popups (const pt< PC > pl)
void render_command_bar (int_pair mouse_screen, int_pair mouse_bg, const map< pt< PC >, pt< anim_frame > > &cur_frame_of_player) const
void manage_button_up (list< SDL_Event >::const_iterator ev)
int calc_command_bar_ht () const
pt< container_pick_resultitem_in_popup_at_screen_pos (int_pair screen_pos) const
void the_obj_was_clicked (pt< obj_or_concept > o, int_pair mouse)
void drop_item (pt< dragging_state_maybe_dragging_obj > st, int_pair mouse)
void cycle_active_player ()
void stand_up_if_sitting (pt< PC > pl)

Private Attributes

bool must_exit
pt< gcn::SDLGraphics > gcn_graphics
pt< gcn::Gui > gcn_gui
pt< gcn::Container > gcn_top_container
pt< gcn::Window > gcn_save_window
pt< gcn::Container > gcn_save_cont
pt< gcn::Button > gcn_cancel_save_button
pt< gcn::Button > gcn_save_button
pt< gcn::TextField > gcn_save_text_field
pt< gcn::Window > gcn_options_window
pt< gcn::Container > gcn_options_cont
pt< dir_watcher_list_modellist_model
pt< gcn::Window > gcn_load_window
pt< gcn::Container > gcn_load_cont
pt< gcn::Button > gcn_cancel_load_button
pt< gcn::ListBox > gcn_load_listbox
pt< gcn::ScrollArea > gcn_load_scroll_area
pt< gcn::SDLInput > gcn_input
pt< gcn::SDLImageLoader > gcn_image_loader
pt< gcn::ImageFont > gcn_font
pt< gcn::Button > gcn_options_save_button
pt< gcn::Button > gcn_options_cancel_button
pt< gcn::Button > gcn_options_fullscreen_button
pt< gcn::Button > gcn_options_load_button
pt< gcn::Button > gcn_options_quit_button
pt< game_state_tgame_state

Detailed Description

The FACK library is implemented as a virtual pure class. It must be inherited to be used.

Definition at line 2328 of file fack.hpp.


Constructor & Destructor Documentation

FACK::FACK int  argc,
char **  argv
[protected]
 

Definition at line 4219 of file fack.cc.

References choose_some_video_flags(), foreach, game_state, gcn_cancel_load_button, gcn_cancel_save_button, gcn_font, gcn_graphics, gcn_gui, gcn_image_loader, gcn_input, gcn_load_cont, gcn_load_listbox, gcn_load_scroll_area, gcn_load_window, gcn_options_cancel_button, gcn_options_cont, gcn_options_fullscreen_button, gcn_options_load_button, gcn_options_quit_button, gcn_options_save_button, gcn_options_window, gcn_save_button, gcn_save_cont, gcn_save_text_field, gcn_save_window, gcn_top_container, list_model, max(), NEW, raise_exception(), screen, and setof_.


Member Function Documentation

void FACK::action const string &  eventId  )  [private]
 

Definition at line 5258 of file fack.cc.

References gcn_load_window, gcn_options_window, gcn_save_window, gcn_top_container, list_model, must_exit, and screen.

virtual void FACK::active_player_changed pt< PC new_act_pl  )  [inline, protected, virtual]
 

Reimplemented in my_game.

Definition at line 2397 of file fack.hpp.

Referenced by cycle_active_player().

int FACK::calc_command_bar_ht  )  const [inline, private]
 

Definition at line 2531 of file fack.hpp.

References map_get(), and surf_of_letter.

Referenced by find_scrolling_rect(), render_command_bar(), and start().

pt< circle_t > FACK::circle_of_light pt< light l  )  const [private]
 

Todo:
pointer eq

Todo:
use scaling

Definition at line 5212 of file fack.cc.

References contains_not_recursively(), foreach, NEW, players, and pt_cast().

Referenced by lit_layer_of_unlit_layer().

void FACK::close_all_open_popups const pt< PC pl  )  [private]
 

Definition at line 2582 of file fack.cc.

Referenced by exec_next_scr_cmd().

bool FACK::contains_not_recursively pt< container cont,
pt< obj_or_concept o,
int_pair pos
[static, protected]
 

Todo:
pointer equality
Parameters:
pos  out

Definition at line 5047 of file fack.cc.

References foreach.

Referenced by circle_of_light(), contains_recursively(), and my_game::execute_action_verb_object().

bool FACK::contains_recursively pt< container cont,
pt< obj_or_concept o,
pt< container > &  real_cont,
int_pair pos
[static, protected]
 

Parameters:
real_cont  out
pos  out

Definition at line 5005 of file fack.cc.

References contains_not_recursively(), foreach, and pt_cast().

Referenced by drop_item(), exec_next_scr_cmd(), my_game::execute_action_object_object(), and my_game::execute_action_verb_object().

void FACK::cycle_active_player  )  [private]
 

Definition at line 3437 of file fack.cc.

References act_pl, active_player_changed(), players, and setof_.

Referenced by start().

void FACK::define_dialog_aux const dialog_t dialog,
pt< PC first_player,
pt< PC second_player,
script_cmds_t commands_first,
script_cmds_t commands_second
const [protected]
 

Definition at line 4548 of file fack.cc.

References close_any_open_container, foreach, and NEW.

Referenced by my_game::execute_action_object_object().

void FACK::drop_item pt< dragging_state_maybe_dragging_obj st,
int_pair  mouse
[private]
 

Bug:
pointer equality

Definition at line 617 of file fack.cc.

References act_pl, contains_recursively(), NEW, point_in_rect(), pt_cast(), and quick_msg.

Referenced by start().

result_exec_next_scr_cmd FACK::exec_next_scr_cmd const vector< pt< script_cmd > >  commands,
int  cur_cmd_it,
const pt< PC pl,
pt< anim_frame last_frame,
bool  increm_cmd_at_start,
bool  must_set_player_left_or_right
[private]
 

Todo:
give clearer msg

Definition at line 2595 of file fack.cc.

References act_pl, path_finding::best_route(), close_all_open_popups(), close_any_open_container, compute_dir(), compute_feet_positions(), contains_recursively(), d_left, d_right, end_commands(), game_state, hd_left, hd_right, HIDE, in(), map_get(), NEW, pt_cast(), quick_msg, raise_exception(), setof_, stand_up_if_sitting(), transitions_of_fixed_light, var_cast(), and vector_of().

Referenced by execute_commands(), and update_AI_state().

virtual void FACK::execute_action_double_none_of_the_above const pt< phys_obj o1,
const pt< phys_obj o2
[protected, pure virtual]
 

Implemented in my_game.

Referenced by start().

virtual void FACK::execute_action_object_object const pt< obj_or_concept o1,
const pt< obj_or_concept o2
[protected, pure virtual]
 

Implemented in my_game.

Referenced by the_obj_was_clicked().

virtual void FACK::execute_action_verb_object const pt< verb v,
const pt< obj_or_concept obj_for_which_no_verb_was_chosen,
const pt< obj_or_concept obj_for_which_the_verb_was_chosen
[protected, pure virtual]
 

Implemented in my_game.

Referenced by start(), and the_obj_was_clicked().

void FACK::execute_commands pt< PC player,
const list< pt< script_cmd > > &  commands
[protected]
 

Definition at line 2158 of file fack.cc.

References exec_next_scr_cmd(), result_exec_next_scr_cmd::new_pl_dir, result_exec_next_scr_cmd::new_pl_pos, result_exec_next_scr_cmd::new_pl_state, pt_cast(), and vector_of().

Referenced by my_game::execute_action_double_none_of_the_above(), my_game::execute_action_object_object(), my_game::execute_action_verb_object(), and start().

SDL_Rect FACK::find_scrolling_rect int_pair  size_of_bg_surf  )  [private]
 

Definition at line 3464 of file fack.cc.

References act_pl, calc_command_bar_ht(), create_rect(), min(), screen, int_pair::x, and int_pair::y.

Referenced by start().

pt< container_pick_result > FACK::item_in_popup_at_screen_pos int_pair  screen_pos  )  const [private]
 

Definition at line 844 of file fack.cc.

References act_pl, NEW, and pt_cast().

Referenced by render_command_bar(), and start().

pt< layer_lit > FACK::lit_layer_of_unlit_layer const layer_unlit_after_anim unlit,
const set< pt< light > > &  on_lights,
float  time,
SDL_Rect  visible_rect
const [private]
 

Todo:
pointer eq

Todo:
move this outside

Definition at line 296 of file time-critical-procs.cc.

References circle_of_light(), foreach, in(), map_get(), NEW, setof_, and sum_each_pixel().

Referenced by start().

void FACK::manage_button_up list< SDL_Event >::const_iterator  ev  )  [private]
 

Definition at line 3173 of file fack.cc.

void FACK::recompute_on_lights set< pt< light > > &  on_lights  )  const [private]
 

Todo:
pointer eq

Todo:
pointer eq
Parameters:
on_lights  < out

Definition at line 3522 of file fack.cc.

References act_pl, foreach, lights_across_loc, players, and pt_cast().

Referenced by start().

void FACK::render_command_bar int_pair  mouse_screen,
int_pair  mouse_bg,
const map< pt< PC >, pt< anim_frame > > &  cur_frame_of_player
const [private]
 

Definition at line 1744 of file fack.cc.

References act_pl, calc_command_bar_ht(), game_state, item_in_popup_at_screen_pos(), item_in_room_at_position(), players, text::print_x_centered_line_of_text(), pt_cast(), SBPR_CYCLE_PLAYER, SBPR_SAVE_LOAD, SBPR_STAY_FOLLOW, screen, special_button_at_pos(), surf_of_letter, var_cast(), int_pair::x, and int_pair::y.

Referenced by start().

special_button_pick_result FACK::special_button_at_pos int_pair  pos  )  const [private]
 

Definition at line 5132 of file fack.cc.

References point_in_rect(), SBPR_CYCLE_PLAYER, SBPR_NOTHING, SBPR_SAVE_LOAD, and SBPR_STAY_FOLLOW.

Referenced by render_command_bar(), and start().

void FACK::stand_up_if_sitting pt< PC pl  )  [private]
 

Definition at line 2562 of file fack.cc.

References NEW, and pt_cast().

Referenced by exec_next_scr_cmd().

void FACK::start  ) 
 

Definition at line 3565 of file fack.cc.

References act_pl, calc_command_bar_ht(), create_rect(), cycle_active_player(), update_AI_result::dir, text::draw_text_multiline_variable_ht(), draw_verb_dialog(), drop_item(), execute_action_double_none_of_the_above(), execute_action_verb_object(), execute_commands(), find_scrolling_rect(), foreach, update_AI_result::frame, game_state, gcn_gui, gcn_input, gcn_load_window, gcn_options_window, gcn_save_window, gcn_top_container, get_sdl_events(), is_walkable(), item_in_popup_at_screen_pos(), item_in_room_at_position(), list_remove_one(), lit_layer_of_unlit_layer(), map_get(), update_AI_result::maybe_sentence, must_exit, NEW, update_AI_result::new_player_state, players, point_in_rect(), update_AI_result::pos, text::print_x_centered_line_of_text(), pt_cast(), quick_msg, recompute_on_lights(), render_command_bar(), render_layers_and_chars_in_correct_order(), SBPR_CYCLE_PLAYER, SBPR_SAVE_LOAD, SBPR_STAY_FOLLOW, screen, setof, setof_, special_button_at_pos(), special_buttons_icon, special_buttons_icon_pos, surf_of_letter, the_obj_was_clicked(), update_AI_state(), update_light_transitions(), update_still_anim(), var_cast(), int_pair::x, and int_pair::y.

Referenced by main().

void FACK::the_obj_was_clicked pt< obj_or_concept o,
int_pair  mouse
[private]
 

Definition at line 3335 of file fack.cc.

References act_pl, draw_verb_dialog(), execute_action_object_object(), execute_action_verb_object(), in_list(), is_there_only_one_option_overall(), list_remove_one(), NEW, pt_cast(), screen, and surf_of_letter.

Referenced by start().

update_AI_result FACK::update_AI_state pt< PC player,
float  dt,
int_pair  top_left_of_obj_in_cont_coords
[private]
 

Definition at line 2922 of file fack.cc.

References exec_next_scr_cmd(), game_state, map_get(), result_exec_next_scr_cmd::new_pl_dir, result_exec_next_scr_cmd::new_pl_pos, result_exec_next_scr_cmd::new_pl_state, pt_cast(), screen, surf_of_letter, update_speech(), update_walking_animation(), and var_cast().

Referenced by start().

void FACK::update_light_transitions float  dt  )  [private]
 

Definition at line 5162 of file fack.cc.

References foreach, in(), locations, and transitions_of_fixed_light.

Referenced by start().


Member Data Documentation

pt<PC> FACK::act_pl [protected]
 

Definition at line 2410 of file fack.hpp.

Referenced by cycle_active_player(), drop_item(), exec_next_scr_cmd(), find_scrolling_rect(), item_in_popup_at_screen_pos(), recompute_on_lights(), render_command_bar(), start(), and the_obj_was_clicked().

pt<phys_obj> FACK::body [protected]
 

Definition at line 2416 of file fack.hpp.

pt<phys_obj> FACK::ear [protected]
 

Definition at line 2416 of file fack.hpp.

pt<phys_obj> FACK::eye [protected]
 

Definition at line 2416 of file fack.hpp.

pt<phys_obj> FACK::foot [protected]
 

Definition at line 2416 of file fack.hpp.

pt<game_state_t> FACK::game_state [private]
 

Definition at line 2514 of file fack.hpp.

Referenced by exec_next_scr_cmd(), FACK(), render_command_bar(), start(), and update_AI_state().

pt<gcn::Button> FACK::gcn_cancel_load_button [private]
 

Definition at line 2456 of file fack.hpp.

Referenced by FACK().

pt<gcn::Button> FACK::gcn_cancel_save_button [private]
 

Definition at line 2443 of file fack.hpp.

Referenced by FACK().

pt<gcn::ImageFont> FACK::gcn_font [private]
 

Definition at line 2462 of file fack.hpp.

Referenced by FACK().

pt<gcn::SDLGraphics> FACK::gcn_graphics [private]
 

Definition at line 2437 of file fack.hpp.

Referenced by FACK().

pt<gcn::Gui> FACK::gcn_gui [private]
 

Definition at line 2438 of file fack.hpp.

Referenced by FACK(), and start().

pt<gcn::SDLImageLoader> FACK::gcn_image_loader [private]
 

Definition at line 2461 of file fack.hpp.

Referenced by FACK().

pt<gcn::SDLInput> FACK::gcn_input [private]
 

Definition at line 2460 of file fack.hpp.

Referenced by FACK(), and start().

pt<gcn::Container> FACK::gcn_load_cont [private]
 

Definition at line 2455 of file fack.hpp.

Referenced by FACK().

pt<gcn::ListBox> FACK::gcn_load_listbox [private]
 

Definition at line 2457 of file fack.hpp.

Referenced by FACK().

pt<gcn::ScrollArea> FACK::gcn_load_scroll_area [private]
 

Definition at line 2458 of file fack.hpp.

Referenced by FACK().

pt<gcn::Window> FACK::gcn_load_window [private]
 

Definition at line 2454 of file fack.hpp.

Referenced by action(), FACK(), and start().

pt<gcn::Button> FACK::gcn_options_cancel_button [private]
 

Definition at line 2465 of file fack.hpp.

Referenced by FACK().

pt<gcn::Container> FACK::gcn_options_cont [private]
 

Definition at line 2448 of file fack.hpp.

Referenced by FACK().

pt<gcn::Button> FACK::gcn_options_fullscreen_button [private]
 

Definition at line 2466 of file fack.hpp.

Referenced by FACK().

pt<gcn::Button> FACK::gcn_options_load_button [private]
 

Definition at line 2467 of file fack.hpp.

Referenced by FACK().

pt<gcn::Button> FACK::gcn_options_quit_button [private]
 

Definition at line 2468 of file fack.hpp.

Referenced by FACK().

pt<gcn::Button> FACK::gcn_options_save_button [private]
 

Definition at line 2464 of file fack.hpp.

Referenced by FACK().

pt<gcn::Window> FACK::gcn_options_window [private]
 

Definition at line 2447 of file fack.hpp.

Referenced by action(), FACK(), and start().

pt<gcn::Button> FACK::gcn_save_button [private]
 

Definition at line 2444 of file fack.hpp.

Referenced by FACK().

pt<gcn::Container> FACK::gcn_save_cont [private]
 

Definition at line 2442 of file fack.hpp.

Referenced by FACK().

pt<gcn::TextField> FACK::gcn_save_text_field [private]
 

Definition at line 2445 of file fack.hpp.

Referenced by FACK().

pt<gcn::Window> FACK::gcn_save_window [private]
 

Definition at line 2441 of file fack.hpp.

Referenced by action(), FACK(), and start().

pt<gcn::Container> FACK::gcn_top_container [private]
 

Definition at line 2439 of file fack.hpp.

Referenced by action(), FACK(), and start().

pt<phys_obj> FACK::hand [protected]
 

Definition at line 2416 of file fack.hpp.

set<pt<light_across_loc> > FACK::lights_across_loc [protected]
 

Definition at line 2420 of file fack.hpp.

Referenced by recompute_on_lights().

pt<dir_watcher_list_model> FACK::list_model [private]
 

Definition at line 2450 of file fack.hpp.

Referenced by action(), and FACK().

set<pt<location> > FACK::locations [protected]
 

Definition at line 2414 of file fack.hpp.

Referenced by update_light_transitions().

pt<phys_obj> FACK::mouth [protected]
 

Definition at line 2416 of file fack.hpp.

bool FACK::must_exit [private]
 

Definition at line 2435 of file fack.hpp.

Referenced by action(), and start().

seq_list<pt<PC> > FACK::players [protected]
 

Definition at line 2412 of file fack.hpp.

Referenced by circle_of_light(), cycle_active_player(), recompute_on_lights(), render_command_bar(), and start().

pt<quick_message> FACK::quick_msg [protected]
 

Definition at line 2428 of file fack.hpp.

Referenced by drop_item(), exec_next_scr_cmd(), and start().

SDL_Surface* FACK::screen [protected]
 

Definition at line 2426 of file fack.hpp.

Referenced by action(), FACK(), find_scrolling_rect(), render_command_bar(), start(), the_obj_was_clicked(), and update_AI_state().

SDL_Surface* FACK::special_buttons_icon [protected]
 

Definition at line 2404 of file fack.hpp.

Referenced by start().

int_pair FACK::special_buttons_icon_pos [protected]
 

Definition at line 2405 of file fack.hpp.

Referenced by start().

surf_of_letter_t FACK::surf_of_letter [protected]
 

Definition at line 2408 of file fack.hpp.

Referenced by calc_command_bar_ht(), render_command_bar(), start(), the_obj_was_clicked(), and update_AI_state().

pt<concept> FACK::topic_bye [protected]
 

Todo:
why here? move to my_game

Definition at line 2418 of file fack.hpp.

pt<concept> FACK::topic_hello [protected]
 

Todo:
why here? move to my_game

Definition at line 2418 of file fack.hpp.

pt<concept> FACK::topic_no [protected]
 

Todo:
why here? move to my_game

Definition at line 2418 of file fack.hpp.

pt<concept> FACK::topic_yes [protected]
 

Todo:
why here? move to my_game

Definition at line 2418 of file fack.hpp.

list<pt<transition_of_fixed_light> > FACK::transitions_of_fixed_light [protected]
 

Definition at line 2430 of file fack.hpp.

Referenced by exec_next_scr_cmd(), and update_light_transitions().

SDL_Rect FACK::zone_cycle_active_player [protected]
 

Definition at line 2406 of file fack.hpp.

SDL_Rect FACK::zone_save_load_game [protected]
 

Definition at line 2406 of file fack.hpp.

SDL_Rect FACK::zone_toggle_stay_follow [protected]
 

Definition at line 2406 of file fack.hpp.


The documentation for this class was generated from the following files:
Generated on Wed May 25 15:36:09 2005 for FACK by  doxygen 1.4.0