1 // $Id: drawing_request.hpp 4986 2007-04-16 17:48:28Z matzeb $
4 // Copyright (C) 2006 Matthias Braun <matze@braunis.de>
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #ifndef SUPERTUX_DRAWINGREQUEST_H
20 #define SUPERTUX_DRAWINGREQUEST_H
28 #include <SDL_video.h>
31 #include "math/vector.hpp"
37 // some constants for predefined layer values
39 LAYER_BACKGROUND0 = -300,
40 LAYER_BACKGROUND1 = -200,
41 LAYER_BACKGROUNDTILES = -100,
44 LAYER_FLOATINGOBJECTS = 150,
45 LAYER_FOREGROUNDTILES = 200,
46 LAYER_FOREGROUND0 = 300,
47 LAYER_FOREGROUND1 = 400,
59 : sfactor(GL_SRC_ALPHA), dfactor(GL_ONE_MINUS_SRC_ALPHA)
62 Blend(GLenum s, GLenum d)
63 : sfactor(s), dfactor(d)
73 SURFACE, SURFACE_PART, TEXT, GRADIENT, FILLRECT, INVERSEELLIPSE, GETLIGHT
76 struct SurfacePartRequest
78 const Surface* surface;
86 FontAlignment alignment;
89 struct GradientRequest
95 struct FillRectRequest
102 struct InverseEllipseRequest
108 struct DrawingRequest
115 DrawingEffect drawing_effect;
125 color(1.0f, 1.0f, 1.0f, 1.0f)
128 bool operator<(const DrawingRequest& other) const
130 return layer < other.layer;
134 struct GetLightRequest