Removed some gamelib functions that are better being only in the main module.

This commit is contained in:
Martin Haye 2015-12-28 10:52:57 -08:00
parent c4e88d3873
commit 12a1427af6
3 changed files with 8 additions and 17 deletions

View File

@ -394,8 +394,6 @@ def startCombat()
// set everything up so that the map gets redrawn when combat finishes.
setWindow2()
clearWindow()
setTextDrawn(TRUE)
setNeedRender(TRUE)
// Say who we're fighting
when rand16() % 5
@ -440,7 +438,7 @@ def startCombat()
displayStr("\nBattle!\n")
return TRUE
elsif n == 'F'
displayStr("\nCoward.\n")
displayStr("\nCoward.")
return FALSE
fin
beep()
@ -492,7 +490,7 @@ def doCombat()
is 1
displayStr("\nThat was a close call! You see search the ground.\n"); break
otherwise
displayStr("\nLooks like you live to fight another day anyway!\n"); break
displayStr("\nLooks like you live to fight another day!\n"); break
wend
getUpperKey()
return

View File

@ -91,9 +91,9 @@ const reboot = gameLibVecs + 3*32
const brk = gameLibVecs + 3*33
const encodeDice = gameLibVecs + 3*34
const rollDice = gameLibVecs + 3*35
const setNeedRender = gameLibVecs + 3*36
const setPlural = gameLibVecs + 3*37
const setTextDrawn = gameLibVecs + 3*38
const setPlural = gameLibVecs + 3*36
const FUNCN37 = gameLibVecs + 3*37
const FUNCN38 = gameLibVecs + 3*38
const FUNCN39 = gameLibVecs + 3*39
const FUNCN40 = gameLibVecs + 3*40
const FUNCN41 = gameLibVecs + 3*41

View File

@ -97,7 +97,7 @@ predef _puts, _min, _max
predef _countList, _countListFiltered, _randomFromListFiltered, _addToList, _getUpperKey, _beep
predef _showParty, _mmgr, _setPortrait, _setWindow1, _setWindow2, _setWindow3, _clearWindow
predef _getYN, _reboot, _brk, _encodeDice, _rollDice
predef _setNeedRender, _setPlural, _setTextDrawn
predef _setPlural
word gameLib_addrs = @_getGlobals, @_rand16
word = @_printf1, @_printf2, @_printf3, @_printf4
@ -107,7 +107,7 @@ word = @_puts, @_min, @_max
word = @_countList, @_countListFiltered, @_randomFromListFiltered, @_addToList, @_getUpperKey, @_beep
word = @_showParty, @_mmgr, @_setPortrait, @_setWindow1, @_setWindow2, @_setWindow3, @_clearWindow
word = @_getYN, @_reboot, @_brk, @_encodeDice, @_rollDice
word = @_setNeedRender, @_setPlural, @_setTextDrawn
word = @_setPlural
word = 0 // end of library functions
@ -888,18 +888,10 @@ end
///////////////////////////////////////////////////////////////////////////////////////////////////
// Setter functions for library use
def _setNeedRender(flg)
needRender = flg
end
def _setPlural(flg)
isPlural = flg
end
def _setTextDrawn(flg)
textDrawn = flg
end
///////////////////////////////////////////////////////////////////////////////////////////////////
// Convert signed decimal to string in decimalBuf
def convertDec(n)
@ -1878,6 +1870,7 @@ def testCombat()
mmgr(HEAP_COLLECT, 0)
// Resume where we left off
textDrawn = TRUE
clearPortrait()
setWindow2()
restoreMapPos()