2 // Copyright (C) 2006 Matthias Braun <matze@braunis.de>
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef HEADER_SUPERTUX_VIDEO_DRAWING_REQUEST_HPP
18 #define HEADER_SUPERTUX_VIDEO_DRAWING_REQUEST_HPP
26 #include "math/vector.hpp"
27 #include "video/color.hpp"
28 #include "video/font.hpp"
29 #include "video/glutil.hpp"
33 // some constants for predefined layer values
35 // Image/gradient backgrounds (should cover entire screen)
36 LAYER_BACKGROUND0 = -300,
37 // Particle backgrounds
38 LAYER_BACKGROUND1 = -200,
39 // Tilemap backgrounds
40 LAYER_BACKGROUNDTILES = -100,
45 // Objects that pass through walls
46 LAYER_FLOATINGOBJECTS = 150,
48 LAYER_FOREGROUNDTILES = 200,
50 LAYER_FOREGROUND0 = 300,
52 LAYER_FOREGROUND1 = 400,
53 // Hitpoints, time, coins, etc.
55 // Menus, mouse, console etc.
66 : sfactor(GL_SRC_ALPHA), dfactor(GL_ONE_MINUS_SRC_ALPHA)
69 Blend(GLenum s, GLenum d)
70 : sfactor(s), dfactor(d)
80 SURFACE, SURFACE_PART, TEXT, GRADIENT, FILLRECT, INVERSEELLIPSE, DRAW_LIGHTMAP, GETLIGHT
83 struct SurfacePartRequest
85 SurfacePartRequest() :
91 const Surface* surface;
106 FontAlignment alignment;
109 TextRequest(const TextRequest&);
110 TextRequest& operator=(const TextRequest&);
113 struct GradientRequest
126 struct FillRectRequest
139 struct InverseEllipseRequest
141 InverseEllipseRequest() :
150 struct DrawingRequest
157 DrawingEffect drawing_effect;
174 color(1.0f, 1.0f, 1.0f, 1.0f),
178 bool operator<(const DrawingRequest& other) const
180 return layer < other.layer;
184 struct GetLightRequest