Usecode_script Class Reference

#include <ucsched.h>

Inheritance diagram for Usecode_script:

Inheritance graph
[legend]
Collaboration diagram for Usecode_script:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Usecode_script (Game_object *o, Usecode_value *cd=0)
 ~Usecode_script ()
void start (long delay=1)
long get_delay () const
void halt ()
bool is_no_halt () const
int is_activated ()
void add (int v1)
void add (int v1, int v2)
void add (int v1, const char *str)
void add (int *vals, int cnt)
Usecode_scriptoperator<< (int v)
void activate_egg (Usecode_internal *usecode, Game_object *e)
virtual void handle_event (unsigned long curtime, long udata)
int exec (Usecode_internal *usecode, bool finish)
void step (Usecode_internal *usecode, int dir)
int save (unsigned char *buf, int buflen)
void print (std::ostream &out)

Static Public Member Functions

static int get_count ()
static Usecode_scriptfind (Game_object *srch, Usecode_script *last_found=0)
static void terminate (Game_object *obj)
static void clear ()
static void purge (Tile_coord pos, int dist)
static Usecode_scriptrestore (Game_object *item, unsigned char *buf, int buflen)

Private Member Functions

 Usecode_script (Game_object *item, Usecode_value *cd, int findex, int nhalt, int del)

Private Attributes

Usecode_scriptnext
Usecode_scriptprev
Game_objectobj
Usecode_valuecode
int cnt
int i
int frame_index
bool no_halt
bool must_finish
int delay

Static Private Attributes

static int count
static Usecode_scriptfirst

Detailed Description

Definition at line 31 of file ucsched.h.


Constructor & Destructor Documentation

Usecode_script::Usecode_script ( Game_object item,
Usecode_value cd,
int  findex,
int  nhalt,
int  del 
) [private]

Definition at line 55 of file ucsched.cc.

References cnt, code, and Usecode_value::get_array_size().

Referenced by restore().

Here is the call graph for this function:

Usecode_script::Usecode_script ( Game_object o,
Usecode_value cd = 0 
)

Definition at line 72 of file ucsched.cc.

References cnt, code, and Usecode_value::get_array_size().

Here is the call graph for this function:

Usecode_script::~Usecode_script (  ) 

Definition at line 95 of file ucsched.cc.

References code, count, first, next, and prev.


Member Function Documentation

void Usecode_script::start ( long  delay = 1  ) 

Definition at line 113 of file ucsched.cc.

References Time_queue::add(), cnt, code, count, Ucscript::dont_halt, Ucscript::finish, first, Usecode_value::get_array_size(), Usecode_value::get_elem(), Game_window::get_instance(), Usecode_value::get_int_value(), Game_window::get_tqueue(), Game_window::get_usecode(), gwin, i, is_no_halt(), must_finish, next, no_halt, Exult_server::obj, prev, and terminate().

Referenced by Egg_object::activate(), Usecode_internal::create_script(), find(), Patrol_schedule::now_what(), Preach_schedule::now_what(), Read_special_ireg(), Actor::resurrect(), and Usecode_internal::UI_resurrect().

Here is the call graph for this function:

long Usecode_script::get_delay (  )  const [inline]

Definition at line 51 of file ucsched.h.

References delay.

Referenced by Read_special_ireg().

void Usecode_script::halt (  ) 

Definition at line 150 of file ucsched.cc.

References cnt, i, and no_halt.

Referenced by terminate().

bool Usecode_script::is_no_halt (  )  const [inline]

Definition at line 54 of file ucsched.h.

References no_halt.

Referenced by start().

int Usecode_script::is_activated (  )  [inline]

Definition at line 56 of file ucsched.h.

References i.

void Usecode_script::add ( int  v1  ) 

Definition at line 160 of file ucsched.cc.

References Usecode_value::append(), cnt, and code.

Referenced by Egg_object::activate(), Preach_schedule::now_what(), and operator<<().

Here is the call graph for this function:

void Usecode_script::add ( int  v1,
int  v2 
)

Definition at line 165 of file ucsched.cc.

References Usecode_value::append(), cnt, and code.

Here is the call graph for this function:

void Usecode_script::add ( int  v1,
const char *  str 
)

Definition at line 173 of file ucsched.cc.

References cnt, code, Usecode_value::get_array_size(), and Usecode_value::resize().

Here is the call graph for this function:

void Usecode_script::add ( int *  vals,
int  cnt 
)

Definition at line 181 of file ucsched.cc.

References Usecode_value::append(), cnt, and code.

Here is the call graph for this function:

Usecode_script& Usecode_script::operator<< ( int  v  )  [inline]

Definition at line 62 of file ucsched.h.

References add().

Here is the call graph for this function:

void Usecode_script::activate_egg ( Usecode_internal usecode,
Game_object e 
) [inline]

Definition at line 271 of file ucsched.cc.

References Egg_object::button, Game_object::is_egg(), Egg_object::missile, Egg_object::monster, and Ucscript::usecode.

Referenced by exec().

Here is the call graph for this function:

static int Usecode_script::get_count (  )  [inline, static]

Definition at line 66 of file ucsched.h.

References count.

Referenced by Game_window::double_clicked().

Usecode_script * Usecode_script::find ( Game_object srch,
Usecode_script last_found = 0 
) [static]

Definition at line 194 of file ucsched.cc.

References first, next, and start().

Referenced by Virtue_stone_object::get_ireg_size(), Spellbook_object::get_ireg_size(), Ireg_game_object::get_ireg_size(), Egg_object::get_ireg_size(), Container_game_object::get_ireg_size(), Barge_object::get_ireg_size(), Usecode_internal::UI_in_usecode(), and Game_map::write_scheduled().

Here is the call graph for this function:

void Usecode_script::terminate ( Game_object obj  )  [static]

Definition at line 211 of file ucsched.cc.

References first, halt(), next, and Exult_server::obj.

Referenced by start(), and Usecode_internal::UI_halt_scheduled().

Here is the call graph for this function:

void Usecode_script::clear (  )  [static]

Definition at line 230 of file ucsched.cc.

References first.

Referenced by Game_window::clear_world().

void Usecode_script::purge ( Tile_coord  pos,
int  dist 
) [static]

Definition at line 243 of file ucsched.cc.

References first, Game_window::get_instance(), Game_window::get_usecode(), gwin, next, no_halt, and Ucscript::usecode.

Referenced by Game_window::emulate_cache().

Here is the call graph for this function:

void Usecode_script::handle_event ( unsigned long  curtime,
long  udata 
) [virtual]

Implements Time_sensitive.

Definition at line 290 of file ucsched.cc.

References cnt, count, delay, exec(), i, and Ucscript::usecode.

Here is the call graph for this function:

int Usecode_script::exec ( Usecode_internal usecode,
bool  finish 
)

Definition at line 319 of file ucsched.cc.

References activate_egg(), cnt, code, Ucscript::cont, delay, Ucscript::delay_hours, Ucscript::delay_ticks, Ucscript::descend, Ucscript::dont_halt, Usecode_machine::double_click, Ucscript::egg, Usecode_machine::egg_proximity, Ucscript::face_dir, Ucscript::finish, Ucscript::frame, frame_index, Usecode_value::get_elem(), Usecode_value::get_int_value(), Dead_body::get_live_npc_num(), Game_window::get_npc(), Audio::get_ptr(), Game_window::get_std_delay(), gwin, Ucscript::hit, i, Usecode_machine::internal_exec, Ucscript::music, must_finish, Ucscript::next_frame, Ucscript::next_frame_max, no_halt, Ucscript::nop, Exult_server::npc, Exult_server::obj, Audio::play_sound_effect(), Ucscript::prev_frame, Ucscript::prev_frame_min, Actor::reduce_health(), Ucscript::remove, Ucscript::repeat, Ucscript::repeat2, Actor::resurrect(), Ucscript::resurrect, Ucscript::rise, Ucscript::say, Game_window::set_painted(), Ucscript::sfx, Ucscript::speech, Audio::start_music(), Audio::start_speech(), Ucscript::step, time_factor, Tile_coord::tz, Egg_object::usecode, Ucscript::usecode, and Ucscript::usecode2.

Referenced by handle_event().

Here is the call graph for this function:

void Usecode_script::step ( Usecode_internal usecode,
int  dir 
)

Definition at line 608 of file ucsched.cc.

References Ucscript::frame, frame_index, Actor::get_frames(), Frames_sequence::get_next(), i, Exult_server::obj, and Ucscript::usecode.

Here is the call graph for this function:

int Usecode_script::save ( unsigned char *  buf,
int  buflen 
)

Definition at line 642 of file ucsched.cc.

References cnt, code, Time_queue::find_delay(), frame_index, Usecode_value::get_elem(), Game_window::get_instance(), Game_window::get_tqueue(), i, len, no_halt, Write2(), and Write4().

Here is the call graph for this function:

Usecode_script * Usecode_script::restore ( Game_object item,
unsigned char *  buf,
int  buflen 
) [static]

Definition at line 679 of file ucsched.cc.

References cnt, code, delay, frame_index, Usecode_value::get_elem(), i, no_halt, Read2(), Read4(), and Usecode_script().

Referenced by Read_special_ireg().

Here is the call graph for this function:

void Usecode_script::print ( std::ostream &  out  ) 

Definition at line 718 of file ucsched.cc.

References cnt, code, Usecode_value::get_elem(), i, Exult_server::obj, and Usecode_value::print().

Referenced by Read_special_ireg().

Here is the call graph for this function:


Member Data Documentation

int Usecode_script::count [static, private]

Definition at line 33 of file ucsched.h.

Referenced by get_count(), handle_event(), start(), and ~Usecode_script().

Usecode_script * Usecode_script::first [static, private]

Definition at line 34 of file ucsched.h.

Referenced by clear(), find(), purge(), start(), terminate(), and ~Usecode_script().

Usecode_script* Usecode_script::next [private]

Definition at line 35 of file ucsched.h.

Referenced by find(), purge(), start(), terminate(), and ~Usecode_script().

Usecode_script * Usecode_script::prev [private]

Definition at line 35 of file ucsched.h.

Referenced by start(), and ~Usecode_script().

Game_object* Usecode_script::obj [private]

Definition at line 36 of file ucsched.h.

Usecode_value* Usecode_script::code [private]

Definition at line 37 of file ucsched.h.

Referenced by add(), exec(), print(), restore(), save(), start(), Usecode_script(), and ~Usecode_script().

int Usecode_script::cnt [private]

Definition at line 38 of file ucsched.h.

Referenced by add(), exec(), halt(), handle_event(), print(), restore(), save(), start(), and Usecode_script().

int Usecode_script::i [private]

Definition at line 39 of file ucsched.h.

Referenced by exec(), halt(), handle_event(), is_activated(), print(), restore(), save(), start(), and step().

int Usecode_script::frame_index [private]

Definition at line 40 of file ucsched.h.

Referenced by exec(), restore(), save(), and step().

bool Usecode_script::no_halt [private]

Definition at line 41 of file ucsched.h.

Referenced by exec(), halt(), is_no_halt(), purge(), restore(), save(), and start().

bool Usecode_script::must_finish [private]

Definition at line 42 of file ucsched.h.

Referenced by exec(), and start().

int Usecode_script::delay [private]

Definition at line 43 of file ucsched.h.

Referenced by exec(), get_delay(), handle_event(), and restore().


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 15:05:36 2007 for ExultEngine by  doxygen 1.5.1