From ed2a8c45871afe082528185fc4568061a984a22b Mon Sep 17 00:00:00 2001 From: Wanne Date: Mon, 1 Aug 2011 20:44:26 +0000 Subject: [PATCH] - Added possibility to use a new FONT\BLOCKFONT3.sti file in the code, which can be used for the 1024x768 map graphic texts o Currently the variable used the FONT\BLOCKFONT2.sti, but we can change that later (once we have the STI file ready) easily in Font Control.cpp (Line 197) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4596 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- MainMenuScreen.cpp | 1 + Utils/Font Control.cpp | 12 ++++++++++-- Utils/Font Control.h | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/MainMenuScreen.cpp b/MainMenuScreen.cpp index f711075b..c1967b72 100644 --- a/MainMenuScreen.cpp +++ b/MainMenuScreen.cpp @@ -804,6 +804,7 @@ void RenderMainMenu() DrawTextToScreen( L"FONT10ARIALBOLD: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 345, 640, FONT10ARIALBOLD, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen( L"BLOCKFONT: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 365, 640, BLOCKFONT, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen( L"BLOCKFONT2: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 385, 640, BLOCKFONT2, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); + DrawTextToScreen( L"BLOCKFONT3: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 385, 640, BLOCKFONT3, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen( L"FONT12ARIALFIXEDWIDTH: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 405, 640, FONT12ARIALFIXEDWIDTH, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen( L"FONT16ARIAL: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 425, 640, FONT16ARIAL, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen( L"BLOCKFONTNARROW: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 445, 640, BLOCKFONTNARROW, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); diff --git a/Utils/Font Control.cpp b/Utils/Font Control.cpp index f9ff2d38..f7965953 100644 --- a/Utils/Font Control.cpp +++ b/Utils/Font Control.cpp @@ -70,6 +70,9 @@ HVOBJECT gvoBlockyFont; INT32 gpBlockyFont2; HVOBJECT gvoBlockyFont2; +INT32 gpBlockyFont3; +HVOBJECT gvoBlockyFont3; + INT32 gp12PointArialFixedFont; HVOBJECT gvo12PointArialFixedFont; @@ -188,8 +191,13 @@ BOOLEAN InitializeFonts( ) // gpBlockyFont2 = LoadFontFile( "FONTS\\interface_font.sti" ); gpBlockyFont2 = LoadFontFile( "FONTS\\BLOCKFONT2.sti" ); - gvoBlockyFont2 = GetFontObject( gpBlockyFont2); - CHECKF( CreateFontPaletteTables( gvoBlockyFont2) ); + gvoBlockyFont2 = GetFontObject( gpBlockyFont2); + CHECKF( CreateFontPaletteTables( gvoBlockyFont2) ); + + gpBlockyFont3 = LoadFontFile( "FONTS\\BLOCKFONT2.sti" ); + gvoBlockyFont3 = GetFontObject( gpBlockyFont3); + CHECKF( CreateFontPaletteTables( gvoBlockyFont3) ); + // gp12PointArialFixedFont = LoadFontFile( "FONTS\\Arial12FixedWidth.sti" ); gp12PointArialFixedFont = LoadFontFile( "FONTS\\FONT12ARIALFIXEDWIDTH.sti" ); diff --git a/Utils/Font Control.h b/Utils/Font Control.h index 6e65be94..11fb7d06 100644 --- a/Utils/Font Control.h +++ b/Utils/Font Control.h @@ -71,6 +71,9 @@ extern HVOBJECT gvoBlockyFont; extern INT32 gpBlockyFont2; extern HVOBJECT gvoBlockyFont2; +extern INT32 gpBlockyFont3; +extern HVOBJECT gvoBlockyFont3; + extern INT32 gp10PointArialBold; extern HVOBJECT gvo10PointArialBold; @@ -114,6 +117,7 @@ extern BOOLEAN gfFontsInit; #define FONT10ARIALBOLD gp10PointArialBold #define BLOCKFONT gpBlockyFont #define BLOCKFONT2 gpBlockyFont2 +#define BLOCKFONT3 gpBlockyFont3 #define FONT12ARIALFIXEDWIDTH gp12PointArialFixedFont #define FONT16ARIAL gp16PointArial #define BLOCKFONTNARROW gpBlockFontNarrow