X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fvideo%2Fvideo_systems.hpp;h=f65d7bfd6b4846d8c9a3d4d7957467d66794eaef;hb=e85c039cd8cea18876cc52fe718296c640ec1b36;hp=4f3a991c20cd91cc0d7a59571c03171e2d9c29e6;hpb=e7a12ed844f040d270e50ce25f74de5f017c1157;p=supertux.git diff --git a/src/video/video_systems.hpp b/src/video/video_systems.hpp index 4f3a991c2..f65d7bfd6 100644 --- a/src/video/video_systems.hpp +++ b/src/video/video_systems.hpp @@ -1,12 +1,10 @@ -// $Id: video_systems.hpp 5138 2007-08-15 01:02:22Z tuxdev $ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,34 +12,49 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. -#ifndef __RENDER_SYTSTEMS_HPP__ -#define __RENDER_SYTSTEMS_HPP__ +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_VIDEO_VIDEO_SYSTEMS_HPP +#define HEADER_SUPERTUX_VIDEO_VIDEO_SYSTEMS_HPP #include -#include #include +#include + +#include "video/texture_ptr.hpp" class Renderer; class Lightmap; -class Texture; class Surface; +class SurfaceData; -enum VideoSystem { - OPENGL, - PURE_SDL, - NUM_SYSTEMS -}; +class VideoSystem +{ +public: + enum Enum { + AUTO_VIDEO, + OPENGL, + PURE_SDL, + NUM_SYSTEMS + }; + +public: + static std::unique_ptr new_renderer(); + static std::unique_ptr new_lightmap(); + static TexturePtr new_texture(SDL_Surface *image); + static SurfaceData* new_surface_data(const Surface &surface); + static void free_surface_data(SurfaceData* surface_data); -Renderer *new_renderer(); -Lightmap *new_lightmap(); -Texture *new_texture(SDL_Surface *image); -void *new_surface_data(const Surface &surface); -void free_surface_data(void *surface_data); -VideoSystem get_video_system(const std::string &video); -std::string get_video_string(VideoSystem video); + static Enum get_video_system(const std::string &video); + static std::string get_video_string(Enum video); + +private: + VideoSystem(); + VideoSystem(const VideoSystem&); + VideoSystem& operator=(const VideoSystem&); +}; #endif + +/* EOF */