From 2231cd8c39b553e1ddf4bf1388083c618b708470 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 22 Jul 2007 12:01:20 +0000 Subject: various small changes --- src/engine/client/gfx.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/engine/client/gfx.cpp') diff --git a/src/engine/client/gfx.cpp b/src/engine/client/gfx.cpp index d8b3041c..db020cef 100644 --- a/src/engine/client/gfx.cpp +++ b/src/engine/client/gfx.cpp @@ -35,7 +35,10 @@ static opengl::vertex_buffer vertex_buffer; //static int screen_height = 600; static float rotation = 0; static int quads_drawing = 0; - +static float screen_x0 = 0; +static float screen_y0 = 0; +static float screen_x1 = 0; +static float screen_y1 = 0; struct texture_holder { @@ -415,11 +418,23 @@ void gfx_clear(float r, float g, float b) void gfx_mapscreen(float tl_x, float tl_y, float br_x, float br_y) { + screen_x0 = tl_x; + screen_y0 = tl_y; + screen_x1 = br_x; + screen_y1 = br_y; mat4 mat; mat.ortho(tl_x, br_x, br_y, tl_y, 1.0f, 10.f); opengl::matrix_projection(&mat); } +void gfx_getscreen(float *tl_x, float *tl_y, float *br_x, float *br_y) +{ + *tl_x = screen_x0; + *tl_y = screen_y0; + *br_x = screen_x1; + *br_y = screen_y1; +} + void gfx_setoffset(float x, float y) { //const float scale = 0.75f; -- cgit 1.4.1