00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #if !defined(_XRB_SDLPAL_HPP_)
00012 #define _XRB_SDLPAL_HPP_
00013
00014 #include "xrb.hpp"
00015
00016 #if XRB_PLATFORM == XRB_PLATFORM_SDL
00017
00018
00019
00020
00021 #include "SDL.h"
00022 #include "xrb_pal.hpp"
00023
00024 struct FT_LibraryRec_;
00025
00026 class SDLPal : public Xrb::Pal
00027 {
00028 public:
00029
00030
00031 static Xrb::Pal *Create ();
00032
00033 virtual ~SDLPal ();
00034
00035 virtual Status Initialize ();
00036 virtual void Shutdown ();
00037
00038 virtual Status InitializeVideo (Xrb::Uint16 width, Xrb::Uint16 height, Xrb::Uint8 bit_depth, bool fullscreen);
00039 virtual void ShutdownVideo ();
00040
00041 virtual void SetWindowCaption (char const *window_caption);
00042
00043 virtual Xrb::Uint32 CurrentTime ();
00044
00045 virtual void Sleep (Xrb::Uint32 milliseconds_to_sleep);
00046
00047 virtual void FinishFrame ();
00048
00049 virtual Xrb::Event *PollEvent (Xrb::Screen const *screen, Xrb::Float time);
00050
00051 virtual Xrb::Texture *LoadImage (char const *image_path);
00052 virtual Status SaveImage (char const *image_path, Xrb::Texture const &texture);
00053
00054 virtual Xrb::Font *LoadFont (char const *font_path, Xrb::ScreenCoord pixel_height);
00055
00056 private:
00057
00058
00059
00060
00061
00062 SDLPal (FT_LibraryRec_ *ft_library) : m_ft_library(ft_library) { }
00063
00064 FT_LibraryRec_ *m_ft_library;
00065 };
00066
00067 #endif // XRB_PLATFORM == XRB_PLATFORM_SDL
00068
00069 #endif // !defined(_XRB_SDLPAL_HPP_)
00070