Browse Source

text resize fix

master
parent
commit
86952bbbc3
2 changed files with 5 additions and 5 deletions
  1. +3
    -3
      neercs/neercs.cpp
  2. +2
    -2
      neercs/video/render.cpp

+ 3
- 3
neercs/neercs.cpp View File

@@ -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");
}




+ 2
- 2
neercs/video/render.cpp View File

@@ -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;



Loading…
Cancel
Save