diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-07-22 12:01:20 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-07-22 12:01:20 +0000 |
| commit | 2231cd8c39b553e1ddf4bf1388083c618b708470 (patch) | |
| tree | 819646eef860ee3215d411c33da8214620c19536 /src/engine | |
| parent | bcb97cfdf631edec486e8f56349a275ddb706392 (diff) | |
| download | zcatch-2231cd8c39b553e1ddf4bf1388083c618b708470.tar.gz zcatch-2231cd8c39b553e1ddf4bf1388083c618b708470.zip | |
various small changes
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/client/client.h | 2 | ||||
| -rw-r--r-- | src/engine/client/gfx.cpp | 17 | ||||
| -rw-r--r-- | src/engine/interface.h | 2 |
3 files changed, 19 insertions, 2 deletions
diff --git a/src/engine/client/client.h b/src/engine/client/client.h index db9d142d..f433a376 100644 --- a/src/engine/client/client.h +++ b/src/engine/client/client.h @@ -45,4 +45,4 @@ public: void pump_network(); }; -#endif \ No newline at end of file +#endif 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; diff --git a/src/engine/interface.h b/src/engine/interface.h index 295528b0..05c1b961 100644 --- a/src/engine/interface.h +++ b/src/engine/interface.h @@ -750,6 +750,8 @@ int client_tickspeed(); void gfx_pretty_text(float x, float y, float size, const char *text); float gfx_pretty_text_width(float size, const char *text); +void gfx_getscreen(float *tl_x, float *tl_y, float *br_x, float *br_y); + void mods_message(int msg, int client_id); void modc_message(int msg); |