diff --git a/programs/cmm/lib/draw_buf.h b/programs/cmm/lib/draw_buf.h index de5151709..47abb5fb8 100644 --- a/programs/cmm/lib/draw_buf.h +++ b/programs/cmm/lib/draw_buf.h @@ -6,11 +6,11 @@ #include "../lib/kolibri.h" #endif -dword buf_data; +unsigned buf_data; struct DrawBufer { - int bufx, bufy, bufw, bufh; + unsigned bufx, bufy, bufw, bufh; byte zoom; void Init(); @@ -25,6 +25,7 @@ struct DrawBufer { void DrawBufer::Init(int i_bufx, i_bufy, i_bufw, i_bufh) { + if (!zoom) zoom = 1; bufx = i_bufx; bufy = i_bufy; bufw = i_bufw * zoom; @@ -35,14 +36,14 @@ void DrawBufer::Init(int i_bufx, i_bufy, i_bufw, i_bufh) ESDWORD[buf_data+4] = bufh; } -void DrawBufer::Fill(dword fill_color) +void DrawBufer::Fill(unsigned fill_color) { - int i; - int max_i = bufw * bufh * 4 + buf_data + 8; + unsigned i; + unsigned max_i = bufw * bufh * 4 + buf_data + 8; for (i=buf_data+8; i