From a16c6249307ca1c65b3adb2daca224c054a6bbec Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 30 Mar 2008 10:27:17 +0000 Subject: fixed realigning of text when chaning row --- src/engine/client/ec_gfx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/engine/client') diff --git a/src/engine/client/ec_gfx.c b/src/engine/client/ec_gfx.c index 661820ea..516e68a3 100644 --- a/src/engine/client/ec_gfx.c +++ b/src/engine/client/ec_gfx.c @@ -1039,7 +1039,9 @@ void gfx_text_ex(TEXT_CURSOR *cursor, const char *text, int length) if(compare.x-cursor->start_x > cursor->line_width) { draw_x = cursor->start_x; - draw_y += size; /* is this correct? -kma */ + draw_y += size; + draw_x = (int)(draw_x * fake_to_screen_x) / fake_to_screen_x; /* realign */ + draw_y = (int)(draw_y * fake_to_screen_y) / fake_to_screen_y; } this_batch = wlen; @@ -1060,7 +1062,9 @@ void gfx_text_ex(TEXT_CURSOR *cursor, const char *text, int length) if(*current == '\n') { draw_x = cursor->start_x; - draw_y += size; /* is this correct? -kma */ + draw_y += size; + draw_x = (int)(draw_x * fake_to_screen_x) / fake_to_screen_x; /* realign */ + draw_y = (int)(draw_y * fake_to_screen_y) / fake_to_screen_y; current++; continue; } -- cgit 1.4.1