From: Ketmar Dark Date: Mon, 28 Aug 2017 07:45:07 +0000 (+0300) Subject: fixed bug with Holmes font rendering X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=b3b3def6089809491a38cc03717683c011298032;p=d2df-sdl.git fixed bug with Holmes font rendering --- diff --git a/src/game/g_holmes.inc b/src/game/g_holmes.inc index a6d38f4..27138aa 100644 --- a/src/game/g_holmes.inc +++ b/src/game/g_holmes.inc @@ -404,8 +404,8 @@ var procedure createFonts (); begin if (font6texid = 0) then font6texid := createFontTexture(kgiFont6, kgiFont6PropWidth, false); - if (font8texid = 0) then font8texid := createFontTexture(kgiFont8, kgiFont8PropWidth, true); - if (prfont6texid = 0) then prfont6texid := createFontTexture(kgiFont6, kgiFont6PropWidth, false); + if (font8texid = 0) then font8texid := createFontTexture(kgiFont8, kgiFont8PropWidth, false); + if (prfont6texid = 0) then prfont6texid := createFontTexture(kgiFont6, kgiFont6PropWidth, true); if (prfont8texid = 0) then prfont8texid := createFontTexture(kgiFont8, kgiFont8PropWidth, true); end; @@ -666,14 +666,14 @@ end; function drawText6Prop (x, y: Integer; const s: AnsiString; r, g, b: Integer; a: Integer=255): Integer; begin - if (font6texid = 0) then createFonts(); - result := drawTextInternal(6, x, y, s, r, g, b, a, font6texid, kgiFont6PropWidth, true); + if (prfont6texid = 0) then createFonts(); + result := drawTextInternal(6, x, y, s, r, g, b, a, prfont6texid, kgiFont6PropWidth, true); end; function drawText8Prop (x, y: Integer; const s: AnsiString; r, g, b: Integer; a: Integer=255): Integer; begin - if (font8texid = 0) then createFonts(); - result := drawTextInternal(8, x, y, s, r, g, b, a, font8texid, kgiFont8PropWidth, true); + if (prfont8texid = 0) then createFonts(); + result := drawTextInternal(8, x, y, s, r, g, b, a, prfont8texid, kgiFont8PropWidth, true); end; @@ -697,16 +697,16 @@ end; function drawText6PropXC (x, y: Integer; const s: AnsiString; r, g, b: Integer; a: Integer=255): Integer; begin - if (font6texid = 0) then createFonts(); + if (prfont6texid = 0) then createFonts(); x -= textWidth6(s) div 2; - result := drawTextInternal(6, x, y, s, r, g, b, a, font6texid, kgiFont6PropWidth, true); + result := drawTextInternal(6, x, y, s, r, g, b, a, prfont6texid, kgiFont6PropWidth, true); end; function drawText8PropXC (x, y: Integer; const s: AnsiString; r, g, b: Integer; a: Integer=255): Integer; begin - if (font8texid = 0) then createFonts(); + if (prfont8texid = 0) then createFonts(); x -= textWidth8(s) div 2; - result := drawTextInternal(8, x, y, s, r, g, b, a, font8texid, kgiFont8PropWidth, true); + result := drawTextInternal(8, x, y, s, r, g, b, a, prfont8texid, kgiFont8PropWidth, true); end; diff --git a/src/game/g_holmes_ui.inc b/src/game/g_holmes_ui.inc index 029b280..5684ab2 100644 --- a/src/game/g_holmes_ui.inc +++ b/src/game/g_holmes_ui.inc @@ -861,8 +861,9 @@ begin if (mCurIndex = f) then fillRect(sx-2, sy, mWidth, 8, 0, 128, 0); if (mChecks[f] <> nil) then begin - drawText8(sx, sy, '[ ]', 255, 255, 255); - if mChecks[f]^ then drawText8(sx+6, sy, 'x', 255, 255, 255); + //drawText8(sx, sy, '[ ]', 255, 255, 255); + //if mChecks[f]^ then drawText8(sx+6, sy, 'x', 255, 255, 255); + if mChecks[f]^ then drawText8(sx, sy, '[x]', 255, 255, 255) else drawText8(sx, sy, '[ ]', 255, 255, 255); drawText8(sx+3*8+2, sy, mItems[f], 255, 255, 0); end; Inc(sy, 8);