#include <brenderer.h>
Inheritance diagram for base_renderer:
Public Methods | |
int | get_frame () const throw () |
base_renderer () throw () | |
virtual | ~base_renderer () throw () |
virtual bool | init_frame (const point &size) throw (std::exception) |
start of animation output | |
virtual char * | lock_frame (int frame) throw (std::exception) |
lock a frame buffer | |
virtual bool | unlock_frame () throw () |
unlock a frame buffer | |
virtual bool | flip_frame () throw () |
flip a frame buffer | |
virtual bool | set_palette (const palette &pal) throw () |
set a new palette | |
virtual bool | start_decode (const std::string &fname, int version, int nbframes) throw () |
start of animation output | |
virtual sound_renderer * | get_sound_renderer () throw (std::exception) |
request for a sound_renderer | |
virtual bool | wait (int ms)=0 throw (std::exception) |
wait for some time | |
virtual bool | save_current () throw () |
debugging function : do not use | |
Protected Methods | |
virtual void | save (int frame=-1)=0 |
const std::string & | get_filename () const throw () |
int | get_nbframes () const throw () |
int | get_width () const throw () |
int | get_height () const throw () |
const palette & | pal () const throw () |
const char * | data () const throw () |
void | clean () throw () |
memory cleanup (deletes frame buffer) | |
void | set_frame (int f) throw () |
Private Attributes | |
palette | _pal |
The current palette. | |
char * | _data |
The current frame buffer. | |
int | _frame |
The current frame number. | |
int | _nbframes |
The number of frames in the animation. | |
int | _width |
The current frame's width. | |
int | _height |
The current frame's height. | |
std::string | _fname |
The filename of the animation being played. |
This class implements some function available in the renderer abstract class, so that creation of subclasses of renderer is easier.
Definition at line 36 of file brenderer.h.
|
Definition at line 33 of file brenderer.cpp. |
|
Definition at line 41 of file brenderer.cpp. |
|
memory cleanup (deletes frame buffer)
Reimplemented in window_renderer. Definition at line 25 of file brenderer.cpp. |
|
Definition at line 54 of file brenderer.h. References _data. Referenced by font_renderer::save(). |
|
flip a frame buffer This is called by the animation player when the current frame should be shown.
Implements renderer. Definition at line 65 of file brenderer.cpp. |
|
Definition at line 49 of file brenderer.h. References _fname. |
|
Definition at line 58 of file brenderer.h. References _frame. |
|
Definition at line 52 of file brenderer.h. References _height. Referenced by font_renderer::save(). |
|
Definition at line 50 of file brenderer.h. References _nbframes. |
|
request for a sound_renderer This is called by the animation player when sound output is required by the animation.
Implements renderer. Reimplemented in window_renderer. Definition at line 68 of file brenderer.h. |
|
Definition at line 51 of file brenderer.h. References _width. Referenced by font_renderer::save(). |
|
start of animation output This is called by the animation player when the frame size is changing.
Implements renderer. Reimplemented in bitmap_renderer, bitmap_file_renderer, and window_renderer. Definition at line 45 of file brenderer.cpp. Referenced by bitmap_renderer::init_frame(). |
|
lock a frame buffer This is called by the animation player when a frame is going to be decoded.
Implements renderer. Definition at line 55 of file brenderer.cpp. |
|
Definition at line 53 of file brenderer.h. |
|
Implemented in null_renderer, font_renderer, and bitmap_renderer. |
|
debugging function : do not use
Reimplemented in bitmap_file_renderer. Definition at line 151 of file renderer.h. |
|
Definition at line 56 of file brenderer.h. References _frame. |
|
set a new palette This is called by the animation player when the palette is changing.
Implements renderer. Reimplemented in bitmap_renderer. Definition at line 70 of file brenderer.cpp. Referenced by bitmap_renderer::set_palette(). |
|
start of animation output This is called by the animation player when output is going to start.
Implements renderer. Definition at line 67 of file brenderer.h. |
|
unlock a frame buffer This is called by the animation player when a frame has been decoded.
Implements renderer. Definition at line 61 of file brenderer.cpp. |
|
wait for some time This is called by the animation player when the animation should stay idle.
Implemented in null_renderer, font_renderer, bitmap_file_renderer, and window_renderer. |
|
The current frame buffer.
Definition at line 39 of file brenderer.h. Referenced by data(). |
|
The filename of the animation being played.
Definition at line 44 of file brenderer.h. Referenced by get_filename(), and start_decode(). |
|
The current frame number.
Definition at line 40 of file brenderer.h. |
|
The current frame's height.
Definition at line 43 of file brenderer.h. Referenced by get_height(). |
|
The number of frames in the animation.
Definition at line 41 of file brenderer.h. Referenced by get_nbframes(), and start_decode(). |
|
The current palette.
Definition at line 38 of file brenderer.h. |
|
The current frame's width.
Definition at line 42 of file brenderer.h. Referenced by get_width(). |