video_driver.hpp
00001
00002
00003 #ifndef VIDEO_VIDEO_DRIVER_HPP
00004 #define VIDEO_VIDEO_DRIVER_HPP
00005
00006 #include "../driver.h"
00007
00008 class VideoDriver: public Driver {
00009 public:
00010 virtual void MakeDirty(int left, int top, int width, int height) = 0;
00011
00012 virtual void MainLoop() = 0;
00013
00014 virtual bool ChangeResolution(int w, int h) = 0;
00015
00016 virtual bool ToggleFullscreen(bool fullscreen) = 0;
00017 };
00018
00019 class VideoDriverFactoryBase: public DriverFactoryBase {
00020 };
00021
00022 template <class T>
00023 class VideoDriverFactory: public VideoDriverFactoryBase {
00024 public:
00025 VideoDriverFactory() { this->RegisterDriver(((T *)this)->GetName(), Driver::DT_VIDEO, ((T *)this)->priority); }
00026
00030 const char *GetName();
00031 };
00032
00033 extern VideoDriver *_video_driver;
00034 extern char _ini_videodriver[32];
00035 extern int _num_resolutions;
00036 extern uint16 _resolutions[32][2];
00037 extern uint16 _cur_resolution[2];
00038
00039 #endif