From 86952bbbc367e3c4e3432189edc2a98909258948 Mon Sep 17 00:00:00 2001 From: rez Date: Thu, 12 Jul 2012 14:36:43 +0000 Subject: [PATCH] text resize fix --- neercs/neercs.cpp | 6 +++--- neercs/video/render.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/neercs/neercs.cpp b/neercs/neercs.cpp index 572343e..7cad1a0 100644 --- a/neercs/neercs.cpp +++ b/neercs/neercs.cpp @@ -112,8 +112,8 @@ void Neercs::TickGame(float seconds) caca_draw_thin_line(m_caca, x2, y2, x3, y3); caca_draw_thin_line(m_caca, x3, y3, x1, y1); - int logo_x = 1; - int logo_y = h / 2 - 3; + int logo_x = (w - 46) / 2; + int logo_y = h / 2 - 2; /* .___ __ ______ ______ ______ ______ ______, @@ -136,7 +136,7 @@ void Neercs::TickGame(float seconds) caca_set_color_ansi(m_caca, 0x666, bg_color); caca_printf(m_caca, 1, h - 2, "W=%i H=%i", w, h); //caca_printf(m_caca, 1, h - 2, "2d ratio=%i*%i", ratio_2d.x, ratio_2d.y); - caca_put_str(m_caca, w - 13, h - 2, "CACA RULEZ"); + caca_put_str(m_caca, w - 11, h - 2, "CACA RULEZ"); } diff --git a/neercs/video/render.cpp b/neercs/video/render.cpp index e8fde07..30d7592 100644 --- a/neercs/video/render.cpp +++ b/neercs/video/render.cpp @@ -83,7 +83,7 @@ float beat_speed = 2.0f; // speed /* window variable */ ivec2 border; // border width /* text variable */ -ivec2 ratio_2d(2,2); // 2d ratio +ivec2 ratio_2d(2,4); // 2d ratio ivec2 map_size(256,256); // texture map size ivec2 font_size(8,8); // font size ivec2 canvas_char(0,0); // canvas char number @@ -231,7 +231,7 @@ int Render::CreateGLWindow() screen_size = Video::GetSize(); border = 12 * ratio_2d; canvas_char = (screen_size - border * 2) / (font_size * ratio_2d); - canvas_size = canvas_char * font_size * ratio_2d; + canvas_size = canvas_char * font_size * ratio_2d.x; border = (screen_size - canvas_size) / 2;