mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
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:
@@ -319,6 +319,18 @@ void RefreshBoxes( )
|
|||||||
// also halt dialogue if sector inventory is open
|
// also halt dialogue if sector inventory is open
|
||||||
if ( guiCurrentScreen == GAME_SCREEN || guiCurrentScreen == MAP_SCREEN && !fShowMapInventoryPool )
|
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
|
// refresh all boxes, and while you're at it, check wether there are any
|
||||||
BOOLEAN fFound = FALSE;
|
BOOLEAN fFound = FALSE;
|
||||||
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
|
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
|
||||||
@@ -344,7 +356,8 @@ void RefreshBoxes( )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// boxes are active, thus we have to refresh them
|
// boxes are active, thus we have to refresh them
|
||||||
fMapPanelDirty = TRUE;
|
if (guiCurrentScreen == MAP_SCREEN)
|
||||||
|
fMapPanelDirty = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1239,14 +1239,7 @@ void AddOpinionEvent( UINT8 usProfileA, UINT8 usProfileB, UINT8 usEvent, BOOLEAN
|
|||||||
// if this option is turned on, a small message will show us how opinions have changed
|
// if this option is turned on, a small message will show us how opinions have changed
|
||||||
if ( gGameExternalOptions.fDynamicOpinionsShowChange )
|
if ( gGameExternalOptions.fDynamicOpinionsShowChange )
|
||||||
{
|
{
|
||||||
if ( gDynamicOpinionEvent[usEvent].sOpinionModifier >= 0 )
|
ScreenMsg( FONT_MCOLOR_LTGREEN, MSG_INTERFACE, gDynamicOpinionEvent[usEvent].sOpinionModifier >= 0 ? L"%s: %s +%d" : L"%s: %s %d", gMercProfiles[usProfileA].zNickname, gMercProfiles[usProfileB].zNickname, gDynamicOpinionEvent[usEvent].sOpinionModifier );
|
||||||
{
|
|
||||||
ScreenMsg( FONT_MCOLOR_LTGREEN, MSG_INTERFACE, L"%s: %s +%d", gMercProfiles[usProfileA].zNickname, gMercProfiles[usProfileB].zNickname, gDynamicOpinionEvent[usEvent].sOpinionModifier );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ScreenMsg( FONT_MCOLOR_RED, MSG_INTERFACE, L"%s: %s %d", gMercProfiles[usProfileA].zNickname, gMercProfiles[usProfileB].zNickname, gDynamicOpinionEvent[usEvent].sOpinionModifier );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if dialogue is allowed, set up dialogue
|
// if dialogue is allowed, set up dialogue
|
||||||
@@ -1743,7 +1736,7 @@ void HandleDynamicOpinionOnContractExtension( UINT8 ubCode, UINT8 usProfile )
|
|||||||
if ( pSoldierWhoGotPaid->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC )
|
if ( pSoldierWhoGotPaid->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// determine the remaining length of his contract BEFORE it go renewed
|
// determine the remaining length of his contract BEFORE it got renewed
|
||||||
INT32 oldcontract = pSoldierWhoGotPaid->iEndofContractTime;
|
INT32 oldcontract = pSoldierWhoGotPaid->iEndofContractTime;
|
||||||
if ( ubCode == EXTENDED_CONTRACT_BY_1_DAY )
|
if ( ubCode == EXTENDED_CONTRACT_BY_1_DAY )
|
||||||
oldcontract -= 1440;
|
oldcontract -= 1440;
|
||||||
@@ -1752,7 +1745,7 @@ void HandleDynamicOpinionOnContractExtension( UINT8 ubCode, UINT8 usProfile )
|
|||||||
else if ( ubCode == EXTENDED_CONTRACT_BY_2_WEEKS )
|
else if ( ubCode == EXTENDED_CONTRACT_BY_2_WEEKS )
|
||||||
oldcontract -= 14 * 1440;
|
oldcontract -= 14 * 1440;
|
||||||
|
|
||||||
// someones contract got extended. Other mercs who have less time on their contract will be annoyed by this, as they feel they shoul be paid first
|
// someones contract got extended. Other mercs who have less time on their contract will be annoyed by this, as they feel they should have been paid first
|
||||||
SOLDIERTYPE* pSoldier = NULL;
|
SOLDIERTYPE* pSoldier = NULL;
|
||||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||||
@@ -2158,7 +2151,7 @@ void HandleDynamicOpinionChange( SOLDIERTYPE* pSoldier, UINT8 usEvent, BOOLEAN f
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 usEventUsed; // it is possible that the individaul event is switched
|
UINT8 usEventUsed; // it is possible that the individual event is switched
|
||||||
SOLDIERTYPE* pTeamSoldier = NULL;
|
SOLDIERTYPE* pTeamSoldier = NULL;
|
||||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||||
|
|||||||
Reference in New Issue
Block a user