00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __RENDERER_H_
00021 #define __RENDERER_H_
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026
00027 #include "rect.h"
00028
00029 #include <string>
00030 #include <exception>
00031
00032 class palette;
00033
00038 class sound_renderer {
00039 public:
00040 virtual ~sound_renderer() {};
00050 virtual bool init(int frequency, bool stereo) = 0;
00060 virtual bool write(unsigned short * ptr, int size) = 0;
00067 virtual bool stop() = 0;
00068 };
00069
00076 class renderer {
00077 public:
00078 virtual ~renderer() {};
00089 virtual bool start_decode(const std::string & fname, int version, int nbframes) throw(std::exception) = 0;
00098 virtual bool init_frame(const point & size) throw(std::exception) = 0;
00107 virtual bool set_palette(const palette & pal) throw(std::exception) = 0;
00116 virtual char * lock_frame(int frame) throw(std::exception) = 0;
00123 virtual bool unlock_frame() throw(std::exception) = 0;
00130 virtual bool flip_frame() throw(std::exception) = 0;
00139 virtual bool wait(int ms) throw(std::exception) = 0;
00146 virtual sound_renderer * get_sound_renderer() throw(std::exception) = 0;
00151 virtual bool save_current() throw() { return false; };
00152 };
00153
00154 #endif