Animations now run during combat pauses.

This commit is contained in:
Martin Haye 2016-04-28 08:20:28 -07:00
parent 8ab5e66078
commit 0f2f2fa4ab
3 changed files with 19 additions and 5 deletions

View File

@ -135,10 +135,7 @@ end
///////////////////////////////////////////////////////////////////////////////////////////////////
def combatPause()
word n
for n = 1 to 3000
next
pause(800)
end
///////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -106,7 +106,7 @@ const getStringResponse = gameLibVecs + 3*45
const strcmpi = gameLibVecs + 3*46
const addEncounterZone = gameLibVecs + 3*47
const fatal = gameLibVecs + 3*48
const FUNCN49 = gameLibVecs + 3*49
const pause = gameLibVecs + 3*49
const FUNCN50 = gameLibVecs + 3*50
const FUNCN51 = gameLibVecs + 3*51
const FUNCN52 = gameLibVecs + 3*52

View File

@ -108,6 +108,7 @@ predef _countList, _countListFiltered, _randomFromListFiltered, _addToList, _bee
predef _showParty, _mmgr, _setWindow1, _setWindow2, _setWindow3
predef _reboot, _brk, _encodeDice, _rollDice
predef _setPlural, _makeEnemy, _getStringResponse, _strcmpi, _addEncounterZone, _fatal
predef _pause
word gameLib_addrs = @_setScriptInfo, @_scriptDisplayStr, @_scriptDisplayStrNL, @_getYN
word = @_queue_setMap, @_setSky, @_setGround, @_queue_teleport, @_setPortrait, @_clearPortrait
@ -121,6 +122,7 @@ word = @_countList, @_countListFiltered, @_randomFromListFiltered, @_addToList,
word = @_showParty, @_mmgr, @_setWindow1, @_setWindow2, @_setWindow3
word = @_reboot, @_brk, @_encodeDice, @_rollDice
word = @_setPlural, @_makeEnemy, @_getStringResponse, @_strcmpi, @_addEncounterZone, @_fatal
word = @_pause
word = 0 // end of library functions
@ -972,6 +974,21 @@ def _getUpperKey()
return charToUpper(key & $7F)
end
///////////////////////////////////////////////////////////////////////////////////////////////////
// Pause for a specified count period, advancing the animation periodically.
def _pause(count)
while count >= 0
animPauseCt = animPauseCt - 1
if animPauseCt < 0
if curPortrait and animNumFrames > 1
nextAnimFrame()
fin
animPauseCt = ANIM_PAUSE_MAX
fin
count--
loop
end
///////////////////////////////////////////////////////////////////////////////////////////////////
def _encodeDice(nDice, dieSize, add) // ndice=0..15, dieSize=0..15, add=0..255
return (nDice << 12) | (dieSize << 8) | add