diff --git a/programs/cmm/lib/font.h b/programs/cmm/lib/font.h index e8b346d2b7..6d95081de9 100644 --- a/programs/cmm/lib/font.h +++ b/programs/cmm/lib/font.h @@ -15,6 +15,7 @@ word width_buffer; dword file_size; dword buffer; + dword buffer_size; word block; dword data; dword begin; @@ -68,13 +69,15 @@ FONT font = 0; return true; } :proc_info Form_SELF_FONTS; + :dword FONT::text(word x,y;dword text1,c;byte size) { dword len=0; - if(size)if(!changeSIZE(size))return 0; + IF(size)IF(!changeSIZE(size))return 0; GetProcessInfo(#Form_SELF_FONTS, SelfInfo); - //tmp_height = height; - //tmp_y = 0; + IF(y>Form_SELF_FONTS.cheight) return 0; + IF(x>Form_SELF_FONTS.cwidth) return 0; + tmp_y = y; AX = c; r = AL; g = AH; @@ -83,7 +86,8 @@ FONT font = 0; b = AL; width_buffer = width; width_buffer *= strlen(text1); - buffer = malloc(width_buffer*height); + IF(!buffer_size)buffer = malloc(width_buffer*height); + ELSE IF(buffer_sizeForm_SELF_FONTS.cwidth) - { - tmp_y+=height; - tmp_height += height; - tmp_x = x; - }*/ IF(iii%32) _ >>= 1; ELSE { @@ -133,8 +130,8 @@ FONT font = 0; IF(_&1) { IF(xi>rw)rw=xi; - //PixelRGB(x+xi-tmp_x,tmp_y+yi); - PixelRGB(x+xi,yi); + ___x = x+xi; + IF(___x