Dynamic dialogue boxes cause less issues when scrolling

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8486 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2017-10-01 11:08:38 +00:00
parent 8de2a8601e
commit a57d9455f3
2 changed files with 18 additions and 12 deletions
+14 -1
View File
@@ -319,6 +319,18 @@ void RefreshBoxes( )
// also halt dialogue if sector inventory is open
if ( guiCurrentScreen == GAME_SCREEN || guiCurrentScreen == MAP_SCREEN && !fShowMapInventoryPool )
{
// if we are scrolling, don't redraw the boxes as often
if (gfScrollPending || gfScrollInertia)
{
UINT32 timepassednotdisplaying = max(0, GetJA2Clock() - lasttimenhere);
if (timepassednotdisplaying < 100)
{
lasttimenhere = GetJA2Clock();
return;
}
}
// refresh all boxes, and while you're at it, check wether there are any
BOOLEAN fFound = FALSE;
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
@@ -344,7 +356,8 @@ void RefreshBoxes( )
else
{
// boxes are active, thus we have to refresh them
fMapPanelDirty = TRUE;
if (guiCurrentScreen == MAP_SCREEN)
fMapPanelDirty = TRUE;
}
}
else