Shape_frame Class Reference

#include <vgafile.h>

Collaboration diagram for Shape_frame:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Shape_frame ()
 Shape_frame (unsigned char *pixels, int w, int h, int xoff, int yoff, bool setrle)
unsigned char * get_data ()
bool is_rle () const
unsigned char read (DataSource *shapes, uint32 shapeoff, uint32 shapelen, int frnum)
void paint_rle (Image_buffer8 *win, int px, int py)
void paint (Image_buffer8 *win, int px, int py)
void paint_rle_translucent (Image_buffer8 *win, int px, int py, Xform_palette *xforms, int xfcnt)
void paint_rle_transformed (Image_buffer8 *win, int px, int py, Xform_palette &xform)
void paint_rle_outline (Image_buffer8 *win, int px, int py, unsigned char color)
void paint_rle (int px, int py)
void paint (int px, int py)
void paint_rle_translucent (int px, int py, Xform_palette *xforms, int xfcnt)
void paint_rle_transformed (int px, int py, Xform_palette &xform)
void paint_rle_outline (int px, int py, unsigned char color)
int has_point (int x, int y)
int get_width () const
int get_height () const
int get_xleft ()
int get_xright ()
int get_yabove ()
int get_ybelow ()
void set_offset (int new_xright, int new_ybelow)
int get_size ()
int is_empty ()
virtual ~Shape_frame ()

Static Public Member Functions

static void set_to_render (Image_buffer8 *w, GL_manager *gl=0)
static unsigned char * encode_rle (unsigned char *pixels, int w, int h, int xoff, int yoff, int &datalen)

Private Member Functions

Shape_framereflect ()
void create_rle (unsigned char *pixels, int w, int h)
void get_rle_shape (DataSource *shapes, long filepos, long len)

Private Attributes

bool rle
unsigned char * data
int datalen
short xleft
short xright
short yabove
short ybelow

Static Private Attributes

static GL_managerglman
static Image_buffer8scrwin

Friends

class Game_window
class Shape_manager
class Shape
class Shape_file
class GL_texshape
class GL_manager

Detailed Description

Definition at line 55 of file vgafile.h.


Constructor & Destructor Documentation

Shape_frame::Shape_frame (  )  [inline]

Definition at line 83 of file vgafile.h.

Shape_frame::Shape_frame ( unsigned char *  pixels,
int  w,
int  h,
int  xoff,
int  yoff,
bool  setrle 
)

Definition at line 317 of file vgafile.cc.

virtual Shape_frame::~Shape_frame (  )  [inline, virtual]

Definition at line 143 of file vgafile.h.

References data.


Member Function Documentation

Shape_frame * Shape_frame::reflect (  )  [private]

Definition at line 80 of file vgafile.cc.

References Image_buffer8::copy8(), create_rle(), Image_buffer8::fill8(), Image_buffer::get_bits(), Read2(), Ucscript::repeat, rle, xleft, xright, yabove, and ybelow.

Referenced by Shape::reflect().

Here is the call graph for this function:

void Shape_frame::create_rle ( unsigned char *  pixels,
int  w,
int  h 
) [private]

Definition at line 220 of file vgafile.cc.

Referenced by Game_window::create_mini_screenshot(), and reflect().

void Shape_frame::get_rle_shape ( DataSource shapes,
long  filepos,
long  len 
) [private]

Definition at line 405 of file vgafile.cc.

References DataSource::read(), DataSource::read2(), and DataSource::seek().

Here is the call graph for this function:

static void Shape_frame::set_to_render ( Image_buffer8 w,
GL_manager gl = 0 
) [inline, static]

Definition at line 91 of file vgafile.h.

References glman, and scrwin.

Referenced by Set_renderer().

unsigned char* Shape_frame::get_data (  )  [inline]

Definition at line 93 of file vgafile.h.

References data.

Referenced by Chunk_terrain::paint_tile(), and Chunk_terrain::render_all().

bool Shape_frame::is_rle (  )  const [inline]

Definition at line 94 of file vgafile.h.

References rle.

Referenced by Shape_draw::draw_shape_outline(), Chunk_terrain::paint_tile(), Chunk_terrain::render_all(), and Map_chunk::set_terrain().

unsigned char * Shape_frame::encode_rle ( unsigned char *  pixels,
int  w,
int  h,
int  xoff,
int  yoff,
int &  datalen 
) [static]

Definition at line 236 of file vgafile.cc.

References Find_runs(), len, Skip_transparent(), and Write2().

Here is the call graph for this function:

unsigned char Shape_frame::read ( DataSource shapes,
uint32  shapeoff,
uint32  shapelen,
int  frnum 
)

Definition at line 346 of file vgafile.cc.

References DataSource::read(), DataSource::read4(), DataSource::seek(), and DataSource::skip().

Here is the call graph for this function:

void Shape_frame::paint_rle ( Image_buffer8 win,
int  px,
int  py 
)

Definition at line 430 of file vgafile.cc.

References Image_buffer::is_visible(), and Image_buffer8::paint_rle().

Referenced by paint_rle(), Shape_manager::paint_shape(), Font::paint_text(), and Font::paint_text_fixedwidth().

Here is the call graph for this function:

void Shape_frame::paint ( Image_buffer8 win,
int  px,
int  py 
)

Definition at line 451 of file vgafile.cc.

Referenced by Shape_draw::draw_shape(), paint(), Shape_manager::paint_shape(), Shape_chooser::render(), and Shape_draw::set_drag_icon().

void Shape_frame::paint_rle_translucent ( Image_buffer8 win,
int  px,
int  py,
Xform_palette xforms,
int  xfcnt 
)

Definition at line 467 of file vgafile.cc.

References Image_buffer8::copy_line_translucent8(), Image_buffer8::fill_line8(), Image_buffer8::fill_line_translucent8(), Image_buffer::is_visible(), Read2(), and Ucscript::repeat.

Referenced by paint_rle_translucent(), and Shape_manager::paint_shape().

Here is the call graph for this function:

void Shape_frame::paint_rle_transformed ( Image_buffer8 win,
int  px,
int  py,
Xform_palette xform 
)

Definition at line 535 of file vgafile.cc.

References Image_buffer8::fill_line_translucent8(), Image_buffer::is_visible(), Read2(), and Ucscript::repeat.

Referenced by Shape_manager::paint_invisible(), and paint_rle_transformed().

Here is the call graph for this function:

void Shape_frame::paint_rle_outline ( Image_buffer8 win,
int  px,
int  py,
unsigned char  color 
)

Definition at line 583 of file vgafile.cc.

References Image_buffer8::fill_line8(), Image_buffer::is_visible(), Image_buffer8::put_pixel8(), Read2(), and Ucscript::repeat.

Referenced by Shape_draw::draw_shape_outline(), Shape_manager::paint_outline(), and paint_rle_outline().

Here is the call graph for this function:

void Shape_frame::paint_rle ( int  px,
int  py 
) [inline]

Definition at line 111 of file vgafile.h.

References GLRENDER, paint_rle(), and scrwin.

Here is the call graph for this function:

void Shape_frame::paint ( int  px,
int  py 
) [inline]

Definition at line 113 of file vgafile.h.

References GLRENDER, paint(), and scrwin.

Here is the call graph for this function:

void Shape_frame::paint_rle_translucent ( int  px,
int  py,
Xform_palette xforms,
int  xfcnt 
) [inline]

Definition at line 116 of file vgafile.h.

References GLRENDERTRANS, paint_rle_translucent(), and scrwin.

Here is the call graph for this function:

void Shape_frame::paint_rle_transformed ( int  px,
int  py,
Xform_palette xform 
) [inline]

Definition at line 120 of file vgafile.h.

References GLRENDER, paint_rle_transformed(), and scrwin.

Here is the call graph for this function:

void Shape_frame::paint_rle_outline ( int  px,
int  py,
unsigned char  color 
) [inline]

Definition at line 122 of file vgafile.h.

References GLOUTLINE, paint_rle_outline(), and scrwin.

Here is the call graph for this function:

int Shape_frame::has_point ( int  x,
int  y 
)

Definition at line 650 of file vgafile.cc.

References Read2(), and Ucscript::repeat.

Referenced by Slider_gump::mouse_down(), and Gump_widget::on_widget().

Here is the call graph for this function:

int Shape_frame::get_width (  )  const [inline]

Definition at line 126 of file vgafile.h.

References xleft, and xright.

Referenced by Death_vortex::add_dirty(), Paperdoll_gump::check_object(), Shape_draw::draw_shape_centered(), Shape_draw::draw_shape_outline(), Font::get_text_width(), Get_x_offset(), Gump::Gump(), MenuChoice::MenuChoice(), MenuEntry::MenuEntry(), Shape_chooser::new_frame(), BG_Game::new_game(), Shape_chooser::next_row(), ExultStudio::open_shape_window(), MenuChoice::paint(), MenuEntry::paint(), Gump::paint(), Font::paint_text(), Font::paint_text_fixedwidth(), Shape_chooser::render(), BG_Game::scene_butterfly(), BG_Game::scene_guardian(), Shape_chooser::scroll_to_frame(), Shape_draw::set_drag_icon(), Gump::set_pos(), Paperdoll_gump::set_to_spot(), Jawbone_gump::set_to_spot(), Actor_gump::set_to_spot(), Conversation::show_avatar_choices(), Conversation::show_face(), Spellbook_gump::Spellbook_gump(), Spellscroll_gump::Spellscroll_gump(), Usecode_internal::UI_display_area(), and Wizard_eye().

int Shape_frame::get_height (  )  const [inline]

Definition at line 128 of file vgafile.h.

References yabove, and ybelow.

Referenced by Paperdoll_gump::check_object(), Shape_draw::draw_shape_centered(), Shape_draw::draw_shape_outline(), Get_max_height(), Gump::Gump(), MenuChoice::MenuChoice(), MenuEntry::MenuEntry(), Slider_gump::mouse_down(), Shape_chooser::new_frame(), ExultStudio::open_shape_window(), Gump::paint(), Shape_chooser::render(), ExultMenu::run(), BG_Game::scene_butterfly(), BG_Game::scene_guardian(), Shape_draw::set_drag_icon(), Gump::set_pos(), Paperdoll_gump::set_to_spot(), Jawbone_gump::set_to_spot(), Actor_gump::set_to_spot(), Conversation::show_avatar_choices(), Conversation::show_face(), Spellbook_gump::Spellbook_gump(), Spellscroll_gump::Spellscroll_gump(), Usecode_internal::UI_display_area(), and Wizard_eye().

int Shape_frame::get_xleft (  )  [inline]

Definition at line 130 of file vgafile.h.

References xleft.

Referenced by Gump::add(), Paperdoll_gump::check_object(), Combo::draw(), Shape_draw::draw_shape(), Shape_draw::draw_shape_outline(), Gump_text::Gump_text(), Cheat::map_teleport(), Spellbook_gump::paint(), Gump::paint(), Conversation::paint_faces(), Shape_chooser::render(), BG_Game::scene_guardian(), Bookmark_button::set(), Cloud::set_start_pos(), Paperdoll_gump::set_to_spot(), Jawbone_gump::set_to_spot(), Actor_gump::set_to_spot(), Conversation::show_avatar_choices(), Spellbook_gump::Spellbook_gump(), Spellscroll_gump::Spellscroll_gump(), Usecode_internal::UI_display_area(), and Wizard_eye().

int Shape_frame::get_xright (  )  [inline]

Definition at line 132 of file vgafile.h.

References xright.

Referenced by Gump::add(), Gump_manager::add_gump(), CheatScreen::NPCDisplay(), ExultStudio::open_shape_window(), Gump::paint(), ExultStudio::save_shape_window(), Shape_draw::set_drag_icon(), Cloud::set_start_pos(), and Spellbook_gump::Spellbook_gump().

int Shape_frame::get_yabove (  )  [inline]

Definition at line 134 of file vgafile.h.

References yabove.

Referenced by Gump::add(), Paperdoll_gump::check_object(), Combo::draw(), Shape_draw::draw_shape(), Shape_draw::draw_shape_outline(), Gump_text::Gump_text(), Cheat::map_teleport(), CheatScreen::NPCDisplay(), Spellbook_gump::paint(), Gump::paint(), Conversation::paint_faces(), Shape_chooser::render(), BG_Game::scene_guardian(), Bookmark_button::set(), Cloud::set_start_pos(), Paperdoll_gump::set_to_spot(), Jawbone_gump::set_to_spot(), Actor_gump::set_to_spot(), Conversation::show_avatar_choices(), Spellbook_gump::Spellbook_gump(), Spellscroll_gump::Spellscroll_gump(), Usecode_internal::UI_display_area(), and Wizard_eye().

int Shape_frame::get_ybelow (  )  [inline]

Definition at line 136 of file vgafile.h.

References ybelow.

Referenced by Gump::add(), Gump_manager::add_gump(), ExultStudio::open_shape_window(), Gump::paint(), ExultStudio::save_shape_window(), Shape_draw::set_drag_icon(), Cloud::set_start_pos(), and Game::show_menu().

void Shape_frame::set_offset ( int  new_xright,
int  new_ybelow 
)

Definition at line 697 of file vgafile.cc.

References Read2(), Ucscript::repeat, and Write2().

Referenced by ExultStudio::save_shape_window().

Here is the call graph for this function:

int Shape_frame::get_size (  )  [inline]

Definition at line 139 of file vgafile.h.

References datalen.

Referenced by Shape_file::save().

int Shape_frame::is_empty (  )  [inline]

Definition at line 141 of file vgafile.h.

References data.

Referenced by Actor::get_attack_frames().


Friends And Related Function Documentation

friend class Game_window [friend]

Definition at line 77 of file vgafile.h.

friend class Shape_manager [friend]

Definition at line 78 of file vgafile.h.

friend class Shape [friend]

Definition at line 79 of file vgafile.h.

friend class Shape_file [friend]

Definition at line 80 of file vgafile.h.

friend class GL_texshape [friend]

Definition at line 81 of file vgafile.h.

friend class GL_manager [friend]

Definition at line 82 of file vgafile.h.


Member Data Documentation

bool Shape_frame::rle [private]

Definition at line 57 of file vgafile.h.

Referenced by Game_window::create_mini_screenshot(), is_rle(), Shape_manager::paint_shape(), and reflect().

unsigned char* Shape_frame::data [private]

Definition at line 58 of file vgafile.h.

Referenced by get_data(), is_empty(), Shape_manager::paint_shape(), and ~Shape_frame().

int Shape_frame::datalen [private]

Definition at line 59 of file vgafile.h.

Referenced by get_size().

short Shape_frame::xleft [private]

Definition at line 60 of file vgafile.h.

Referenced by Game_window::create_mini_screenshot(), get_width(), get_xleft(), and reflect().

short Shape_frame::xright [private]

Definition at line 61 of file vgafile.h.

Referenced by Game_window::create_mini_screenshot(), get_width(), get_xright(), reflect(), and Shape_file::save().

short Shape_frame::yabove [private]

Definition at line 62 of file vgafile.h.

Referenced by Game_window::create_mini_screenshot(), get_height(), get_yabove(), and reflect().

short Shape_frame::ybelow [private]

Definition at line 63 of file vgafile.h.

Referenced by Game_window::create_mini_screenshot(), get_height(), get_ybelow(), and reflect().

GL_manager * Shape_frame::glman [static, private]

Definition at line 67 of file vgafile.h.

Referenced by set_to_render().

Image_buffer8 * Shape_frame::scrwin [static, private]

Definition at line 68 of file vgafile.h.

Referenced by paint(), paint_rle(), paint_rle_outline(), paint_rle_transformed(), paint_rle_translucent(), and set_to_render().


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