projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix all cases of not-optimal UV-coordinates
[supertux.git]
/
src
/
video
/
drawing_context.hpp
diff --git
a/src/video/drawing_context.hpp
b/src/video/drawing_context.hpp
index
df31225
..
4839239
100644
(file)
--- a/
src/video/drawing_context.hpp
+++ b/
src/video/drawing_context.hpp
@@
-49,7
+49,8
@@
enum {
LAYER_FOREGROUNDTILES = 200,
LAYER_FOREGROUND0 = 300,
LAYER_FOREGROUND1 = 400,
LAYER_FOREGROUNDTILES = 200,
LAYER_FOREGROUND0 = 300,
LAYER_FOREGROUND1 = 400,
- LAYER_GUI = 500
+ LAYER_HUD = 500,
+ LAYER_GUI = 600
};
class Blend
};
class Blend
@@
-124,6
+125,9
@@
public:
/// return currently set alpha
float get_alpha() const;
/// return currently set alpha
float get_alpha() const;
+ /// on next update, set color to lightmap's color at position
+ void get_light(const Vector& position, Color* color );
+
enum Target {
NORMAL, LIGHTMAP
};
enum Target {
NORMAL, LIGHTMAP
};
@@
-131,6
+135,8
@@
public:
void pop_target();
void set_target(Target target);
void pop_target();
void set_target(Target target);
+ void set_ambient_color( Color new_color );
+
private:
class Transform
{
private:
class Transform
{
@@
-159,7
+165,7
@@
private:
enum RequestType
{
enum RequestType
{
- SURFACE, SURFACE_PART, TEXT, GRADIENT, FILLRECT
+ SURFACE, SURFACE_PART, TEXT, GRADIENT, FILLRECT
, LIGHTMAPREQUEST, GETLIGHT
};
struct SurfacePartRequest
};
struct SurfacePartRequest
@@
-212,6
+218,11
@@
private:
}
};
}
};
+ struct GetLightRequest
+ {
+ Color* color_ptr;
+ };
+
typedef std::vector<DrawingRequest> DrawingRequests;
void handle_drawing_requests(DrawingRequests& requests);
typedef std::vector<DrawingRequest> DrawingRequests;
void handle_drawing_requests(DrawingRequests& requests);
@@
-220,11
+231,14
@@
private:
void draw_text_center(DrawingRequest& request);
void draw_gradient(DrawingRequest& request);
void draw_filled_rect(DrawingRequest& request);
void draw_text_center(DrawingRequest& request);
void draw_gradient(DrawingRequest& request);
void draw_filled_rect(DrawingRequest& request);
+ void draw_lightmap(DrawingRequest& request);
+ void get_light(DrawingRequest& request);
DrawingRequests drawing_requests;
DrawingRequests lightmap_requests;
DrawingRequests* requests;
DrawingRequests drawing_requests;
DrawingRequests lightmap_requests;
DrawingRequests* requests;
+ Color ambient_color;
SDL_Surface* screen;
Target target;
SDL_Surface* screen;
Target target;