mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-02-07 11:31:23 +00:00
Fixed memory corruption issue when party screen updated during combat.
This commit is contained in:
parent
c6e46398c1
commit
831c0cd822
0
Platform/Apple/virtual/extractText.sh
Normal file → Executable file
0
Platform/Apple/virtual/extractText.sh
Normal file → Executable file
@ -316,7 +316,7 @@ end
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
def enemyCombatTurn(pe)
|
||||
word pl
|
||||
byte roll, dam
|
||||
byte roll, dam, needShow
|
||||
|
||||
// Choose a target
|
||||
pl = randomFromListFiltered(global=>p_players, p_nextObj, @canFight)
|
||||
@ -330,6 +330,7 @@ def enemyCombatTurn(pe)
|
||||
// TODO: consider player dodge
|
||||
// TODO: consider player agility
|
||||
// TODO: consider player skills
|
||||
needShow = FALSE
|
||||
if roll <= pe->b_chanceToHit
|
||||
dam = rollDice(pe=>r_enemyDmg)
|
||||
printf1("and hits for %d damage!", dam)
|
||||
@ -337,13 +338,14 @@ def enemyCombatTurn(pe)
|
||||
if pl=>w_health == 0
|
||||
printf1(" %s is killed!", pl=>s_name)
|
||||
fin
|
||||
showParty()
|
||||
needShow = TRUE
|
||||
else
|
||||
puts("and misses.")
|
||||
fin
|
||||
puts("\n")
|
||||
|
||||
displayStr(finishString(0))
|
||||
if needShow; showParty(); fin
|
||||
return TRUE
|
||||
end
|
||||
|
||||
|
@ -1199,7 +1199,9 @@ export def showParty()
|
||||
loop
|
||||
|
||||
// Finish up
|
||||
if mapIs3D; copyWindow(); fin
|
||||
if mapIs3D and texturesLoaded
|
||||
copyWindow()
|
||||
fin
|
||||
setWindow2()
|
||||
restoreCursor()
|
||||
needShowParty = FALSE
|
||||
@ -1404,7 +1406,7 @@ def doRender()
|
||||
fin
|
||||
texturesLoaded = TRUE
|
||||
fin
|
||||
if textDrawn and mapIs3D; copyWindow(); fin
|
||||
if textDrawn and mapIs3D and texturesLoaded; copyWindow(); fin
|
||||
render()
|
||||
needRender = FALSE
|
||||
end
|
||||
@ -1431,7 +1433,7 @@ def moveForward()
|
||||
if val >= 2
|
||||
if textDrawn
|
||||
clearWindow()
|
||||
if mapIs3D; copyWindow(); fin
|
||||
if mapIs3D and texturesLoaded; copyWindow(); fin
|
||||
textDrawn = FALSE
|
||||
fin
|
||||
scriptEvent(@S_LEAVE, NULL)
|
||||
@ -1637,7 +1639,7 @@ export def showMapName(mapName)
|
||||
displayChar('Y'-$40) // center mode
|
||||
displayStr(mapName)
|
||||
displayChar('N'-$40) // normal mode
|
||||
if mapIs3D; copyWindow(); fin
|
||||
if mapIs3D and texturesLoaded; copyWindow(); fin
|
||||
mapNameHash = newNameHash
|
||||
fin
|
||||
end
|
||||
@ -1719,7 +1721,7 @@ def showAnimFrame()
|
||||
blit(curFullscreenImg + 2, $2000, 192, 40) // the +2 is to skip anim hdr offset
|
||||
needRender = FALSE // suppress display of map for this frame
|
||||
elsif mapIs3D
|
||||
if textDrawn and mapIs3D; copyWindow(); fin
|
||||
if textDrawn and mapIs3D and texturesLoaded; copyWindow(); fin
|
||||
render()
|
||||
fin
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user