Conversation Class Reference

#include <conversation.h>

Inheritance diagram for Conversation:

Inheritance graph
[legend]
Collaboration diagram for Conversation:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Conversation ()
 ~Conversation ()
int get_num_answers () const
int get_num_faces_on_screen () const
void init_faces ()
void show_face (int shape, int frame, int slot=-1)
void remove_face (int shape)
void remove_slot_face (int slot)
void remove_last_face ()
void show_npc_message (const char *msg)
bool is_npc_text_pending ()
void clear_text_pending ()
void show_avatar_choices ()
void clear_avatar_choices ()
int conversation_choice (int x, int y)
void set_slot (int i)
virtual void paint ()
void paint_faces (bool text=false)
void add_answer (Usecode_value &val)
void remove_answer (Usecode_value &val)
void clear_answers (void)
int locate_answer (const char *str)
const char * get_answer (int num)
void push_answers ()
void pop_answers ()
bool stack_empty () const

Private Member Functions

void show_avatar_choices (int num_choices, char **choices)
void add_answer (const char *str)
void remove_answer (const char *str)

Private Attributes

Npc_face_infoface_info [2]
int num_faces
int last_face_shown
Rectangle avatar_face
Rectangleconv_choices
std::vector< std::string > answers
std::deque< std::vector< std::string > > answer_stack

Detailed Description

Definition at line 33 of file conversation.h.


Constructor & Destructor Documentation

Conversation::Conversation (  ) 

Definition at line 63 of file conversation.cc.

References face_info.

Conversation::~Conversation (  ) 

Definition at line 72 of file conversation.cc.

References conv_choices.


Member Function Documentation

int Conversation::get_num_answers (  )  const [inline]

Definition at line 50 of file conversation.h.

References answers.

Referenced by Usecode_internal::get_user_choice(), and Usecode_internal::get_user_choice_num().

int Conversation::get_num_faces_on_screen (  )  const [inline]

Definition at line 51 of file conversation.h.

References num_faces.

Referenced by Usecode_machine::get_num_faces_on_screen().

void Conversation::init_faces (  ) 

Definition at line 142 of file conversation.cc.

References face_info, last_face_shown, and num_faces.

Referenced by Usecode_machine::init_conversation().

void Conversation::show_face ( int  shape,
int  frame,
int  slot = -1 
)

Definition at line 190 of file conversation.cc.

References Image_window::clear_clip(), Game_window::clip_to_win(), EXULT_BG_FLX_MR_FACES_SHP, face_info, Npc_face_info::face_rect, Palette::get_brightness(), Actor::get_face_shapenum(), Ireg_game_object::get_flag(), Game::get_game_type(), Shape_frame::get_height(), Game_window::get_height(), Game_window::get_main_actor(), Game_window::get_pal(), ShapeID::get_shape(), Actor::get_skin_color(), Shape_manager::get_text_height(), Shape_frame::get_width(), Game_window::get_width(), Game_window::get_win(), Game_singletons::gwin, Rectangle::h, Exult_server::info, last_face_shown, Npc_face_info::last_text_height, num_faces, paint_faces(), Game_singletons::pal, Obj_flags::petra, remove_slot_face(), SERPENT_ISLE, Palette::set(), Image_window::set_clip(), ShapeID::set_file(), ShapeID::set_shape(), SF_FACES_VGA, SF_GAME_FLX, SI_get_frame(), Game_singletons::sman, Obj_flags::tattooed, Npc_face_info::text_rect, Rectangle::w, Rectangle::x, and Rectangle::y.

Here is the call graph for this function:

void Conversation::remove_face ( int  shape  ) 

Definition at line 303 of file conversation.cc.

References face_info, and remove_slot_face().

Here is the call graph for this function:

void Conversation::remove_slot_face ( int  slot  ) 

Definition at line 320 of file conversation.cc.

References Game_window::add_dirty(), gwin, and Exult_server::info.

Referenced by remove_face(), show_avatar_choices(), and show_face().

Here is the call graph for this function:

void Conversation::remove_last_face (  ) 

void Conversation::show_npc_message ( const char *  msg  ) 

Definition at line 350 of file conversation.cc.

References face_info, Get_click(), Game_window::get_text_bg(), Game_singletons::gwin, Rectangle::h, Mouse::hand, height, Exult_server::info, last_face_shown, Game_window::paint(), Shape_manager::paint_text_box(), Game_window::set_painted(), Game_singletons::sman, Rectangle::w, Rectangle::x, and Rectangle::y.

Here is the call graph for this function:

bool Conversation::is_npc_text_pending (  ) 

Definition at line 385 of file conversation.cc.

References face_info.

void Conversation::clear_text_pending (  ) 

Definition at line 398 of file conversation.cc.

References face_info.

Referenced by Usecode_internal::click_to_continue(), and show_avatar_choices().

void Conversation::show_avatar_choices (  ) 

Definition at line 536 of file conversation.cc.

References answers, and size.

Referenced by Usecode_internal::get_user_choice_num().

void Conversation::clear_avatar_choices (  ) 

Definition at line 555 of file conversation.cc.

References Game_window::add_dirty(), avatar_face, Game_singletons::gwin, and Rectangle::w.

Referenced by Usecode_internal::get_user_choice_num().

Here is the call graph for this function:

int Conversation::conversation_choice ( int  x,
int  y 
)

Definition at line 569 of file conversation.cc.

References conv_choices, Rectangle::has_point(), and Rectangle::w.

Referenced by Usecode_internal::get_user_choice_num().

Here is the call graph for this function:

void Conversation::set_slot ( int  i  )  [inline]

Definition at line 63 of file conversation.h.

References last_face_shown.

void Conversation::paint (  )  [virtual]

Implements Paintable.

Definition at line 586 of file conversation.cc.

void Conversation::paint_faces ( bool  text = false  ) 

Definition at line 599 of file conversation.cc.

References Game_window::get_text_bg(), Shape_frame::get_xleft(), Shape_frame::get_yabove(), gwin, Rectangle::h, Rectangle::w, Rectangle::x, and Rectangle::y.

Referenced by show_face().

Here is the call graph for this function:

void Conversation::add_answer ( Usecode_value val  ) 

Definition at line 94 of file conversation.cc.

References Usecode_value::get_array_size(), Usecode_value::get_elem(), Usecode_value::get_str_value(), and size.

Here is the call graph for this function:

void Conversation::remove_answer ( Usecode_value val  ) 

Definition at line 123 of file conversation.cc.

References Usecode_value::get_array_size(), Usecode_value::get_elem(), Usecode_value::get_str_value(), Usecode_value::is_array(), and size.

Referenced by add_answer().

Here is the call graph for this function:

void Conversation::clear_answers ( void   ) 

Definition at line 78 of file conversation.cc.

References answers.

int Conversation::locate_answer ( const char *  str  ) 

Definition at line 638 of file conversation.cc.

References answers.

Referenced by Usecode_internal::get_user_choice_num().

const char* Conversation::get_answer ( int  num  )  [inline]

Definition at line 71 of file conversation.h.

References answers.

Referenced by Usecode_internal::get_user_choice_num().

void Conversation::push_answers (  ) 

Definition at line 652 of file conversation.cc.

References answer_stack, and answers.

void Conversation::pop_answers (  ) 

Definition at line 658 of file conversation.cc.

References answer_stack, answers, Game_singletons::gwin, and Game_window::paint().

Here is the call graph for this function:

bool Conversation::stack_empty (  )  const [inline]

Definition at line 75 of file conversation.h.

References answer_stack.

void Conversation::show_avatar_choices ( int  num_choices,
char **  choices 
) [private]

Definition at line 410 of file conversation.cc.

References Rectangle::add(), avatar_face, clear_text_pending(), conv_choices, Rectangle::enlarge(), EXULT_BG_FLX_MR_FACES_SHP, face_info, Npc_face_info::face_rect, Ucscript::frame, GAME_BG, Actor::get_face_shapenum(), Ireg_game_object::get_flag(), Game::get_game_type(), Shape_frame::get_height(), Game_window::get_main_actor(), ShapeID::get_shape(), Actor::get_skin_color(), Game_window::get_text_bg(), Shape_manager::get_text_height(), Shape_manager::get_text_width(), Actor::get_type_flag(), Shape_frame::get_width(), Game_window::get_win_rect(), Shape_frame::get_xleft(), Shape_frame::get_yabove(), Game_singletons::gwin, Rectangle::h, height, Rectangle::intersect(), Npc_face_info::last_text_height, num_faces, Shape_manager::paint_shape(), Shape_manager::paint_text_box(), Obj_flags::petra, remove_slot_face(), SERPENT_ISLE, ShapeID::set_file(), ShapeID::set_frame(), Game_window::set_painted(), ShapeID::set_shape(), SF_FACES_VGA, SF_GAME_FLX, SI_get_frame(), Game_singletons::sman, Obj_flags::tattooed, Npc_face_info::text_rect, Actor::tf_sex, Rectangle::w, width, Rectangle::x, and Rectangle::y.

Here is the call graph for this function:

void Conversation::add_answer ( const char *  str  )  [private]

Definition at line 83 of file conversation.cc.

References answers, remove_answer(), and s.

Here is the call graph for this function:

void Conversation::remove_answer ( const char *  str  )  [private]

Definition at line 107 of file conversation.cc.

References answers.


Member Data Documentation

Npc_face_info* Conversation::face_info[2] [private]

Definition at line 40 of file conversation.h.

Referenced by clear_text_pending(), Conversation(), init_faces(), is_npc_text_pending(), remove_face(), show_avatar_choices(), show_face(), and show_npc_message().

int Conversation::num_faces [private]

Definition at line 41 of file conversation.h.

Referenced by get_num_faces_on_screen(), init_faces(), show_avatar_choices(), and show_face().

int Conversation::last_face_shown [private]

Definition at line 42 of file conversation.h.

Referenced by init_faces(), set_slot(), show_face(), and show_npc_message().

Rectangle Conversation::avatar_face [private]

Definition at line 43 of file conversation.h.

Referenced by clear_avatar_choices(), and show_avatar_choices().

Rectangle* Conversation::conv_choices [private]

Definition at line 44 of file conversation.h.

Referenced by conversation_choice(), show_avatar_choices(), and ~Conversation().

std::vector<std::string> Conversation::answers [private]

Definition at line 46 of file conversation.h.

Referenced by add_answer(), clear_answers(), get_answer(), get_num_answers(), locate_answer(), pop_answers(), push_answers(), remove_answer(), and show_avatar_choices().

std::deque< std::vector<std::string> > Conversation::answer_stack [private]

Definition at line 47 of file conversation.h.

Referenced by pop_answers(), push_answers(), and stack_empty().


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 14:49:29 2007 for ExultEngine by  doxygen 1.5.1