New feature: quest & intel map overlay

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23742&goto=353499&#msg_353499

Requires GameDir >= r2424

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8560 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2018-05-14 21:26:37 +00:00
parent 70ad3387a8
commit 100eea196b
28 changed files with 946 additions and 191 deletions
@@ -84,6 +84,9 @@ void AddCommonInfoToBox(void);
void AddItemsInSectorToBox(void);
// Flugente: additional intel/lua-based text
void AddIntelAndQuestTextToBox();
// position town/mine info box on the screen
void PositionTownMineInfoBox( void );
@@ -173,6 +176,9 @@ void CreateDestroyTownInfoBox( void )
AddItemsInSectorToBox();
// Flugente: quests, intel or a modder might add additional info on a sector
AddIntelAndQuestTextToBox();
// set font type
SetBoxFont(ghTownMineBox, BLOCKFONT2);
@@ -951,6 +957,38 @@ void AddItemsInSectorToBox(void)
AddSecondColumnMonoString( &hStringHandle, wString );
}
// Flugente: additional intel/lua-based text
void AddIntelAndQuestTextToBox()
{
CHAR16 wString[128];
UINT32 hStringHandle = 0;
CHAR16 line[1024]; // copy of the input
wcscpy( line, gMapIntelData[SECTOR( bCurrentTownMineSectorX, bCurrentTownMineSectorY )].text );
BOOLEAN first = TRUE;
CHAR16* subString = wcstok ( line, L"\n\0" );
while ( subString != NULL )
{
if ( first )
{
swprintf( wString, L"%s:", pwMiscSectorStrings[8] );
AddMonoString( &hStringHandle, wString );
}
else
AddMonoString( &hStringHandle, L"" );
AddSecondColumnMonoString( &hStringHandle, subString );
subString = wcstok ( NULL, L"\n\0" );
first = FALSE;
}
}
void PositionTownMineInfoBox( void )
{