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