mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-01-18 04:33:00 +00:00
Starting to be able to apply Nox attributes to new char
This commit is contained in:
parent
d5ec398f92
commit
866292eb0f
@ -37,8 +37,9 @@ predef newOrLoadGame(ask)#1
|
||||
predef pressAnyKey()#1
|
||||
predef gameExists()#1
|
||||
predef loadInternal()#1
|
||||
predef newGame(pImportFunc)#1
|
||||
//AUTOMAP_CHECK// predef checkAutomap()#1
|
||||
word[] funcTbl = @startup, @loadGame, @newOrLoadGame, @pressAnyKey, @gameExists, @loadInternal
|
||||
word[] funcTbl = @startup, @loadGame, @newOrLoadGame, @pressAnyKey, @gameExists, @loadInternal, @newGame
|
||||
//AUTOMAP_CHECK// word = @_checkAutomap
|
||||
|
||||
word pImportModule
|
||||
@ -561,10 +562,9 @@ def clearDiskMarks()#0
|
||||
end
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
def newGame()#0
|
||||
def newGame(pImportFunc)#1
|
||||
word playersModule, newGameModule, partyModule
|
||||
clearDiskMarks()
|
||||
initHeap(0) // initially empty heap
|
||||
global->b_curAvatar = BASE_AVATAR
|
||||
global=>w_combatPauseCt = DEFAULT_COMBAT_PAUSE_CT
|
||||
global->b_hour = 12 // start at high noon
|
||||
@ -583,12 +583,17 @@ def newGame()#0
|
||||
setWindow2()
|
||||
newGameModule()()
|
||||
clearWindow()
|
||||
getCharacterName()
|
||||
getCharacterGender()
|
||||
if pImportFunc
|
||||
pImportFunc()
|
||||
else
|
||||
getCharacterName()
|
||||
getCharacterGender()
|
||||
fin
|
||||
if global=>p_players->b_skillPoints
|
||||
partyModule()=>party_showPlayerSheet(0)
|
||||
fin
|
||||
heapCollect()
|
||||
return 0
|
||||
end
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -669,6 +674,9 @@ def newOrLoadGame(ask)#1
|
||||
^$23 = 24 // Full text window until we're done
|
||||
displayMenu(existing)
|
||||
|
||||
// Import functions need a working heap, initially empty
|
||||
initHeap(0)
|
||||
|
||||
ret = -1
|
||||
while ret < 0
|
||||
|
||||
@ -678,7 +686,7 @@ def newOrLoadGame(ask)#1
|
||||
is 'N'
|
||||
clearWindow
|
||||
rawDisplayStr("\n^YStarting new game...^N")
|
||||
newGame()
|
||||
newGame(NULL)
|
||||
ret = 1
|
||||
break
|
||||
is 'L'
|
||||
|
@ -15,4 +15,5 @@ const diskops_newOrLoadGame = 4
|
||||
const diskops_pressAnyKey = 6
|
||||
const diskops_gameExists = 8
|
||||
const diskops_loadInternal = 10
|
||||
const diskops_newGame = 12
|
||||
//AUTOMAP_CHECK// const diskops_checkAutomap = 8
|
||||
|
@ -25,6 +25,8 @@ byte[] legendos_filename = "LEGENDOS.SYSTEM"
|
||||
word origChksum_0, origChksum_1
|
||||
word curChksum_0, curChksum_1
|
||||
|
||||
word noxName
|
||||
|
||||
byte[] S_NOX_FILENAME = "DATA.SAVE.GAME1"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -223,10 +225,18 @@ def printNox()#0
|
||||
len++
|
||||
loop
|
||||
^$200 = len
|
||||
printf1("name=%s\n", $200)
|
||||
noxName=mmgr(HEAP_INTERN, $200)
|
||||
printf1("name=%s\n", noxName)
|
||||
rdkey
|
||||
end
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
def noxMod()#1
|
||||
displayStr("Noxmod")
|
||||
rdkey
|
||||
return 0
|
||||
end
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
def importNox()#1
|
||||
|
||||
@ -250,6 +260,23 @@ def importNox()#1
|
||||
|
||||
printNox
|
||||
^$c050
|
||||
|
||||
// Make sure the user wants to import this game
|
||||
while True
|
||||
textHome()
|
||||
^$25 = 19
|
||||
printf1("\nNox Archaist character imported:\n ==> %s <==\n", noxName)
|
||||
puts("Re-insert disk 1 and press a key,\nor hit [Esc] to cancel import.")
|
||||
if rdkey == $9B // esc
|
||||
// To cancel, we need the original disk back in the drive
|
||||
if reinserted; return FALSE; fin
|
||||
else
|
||||
if reinserted(); break; fin
|
||||
fin
|
||||
loop
|
||||
|
||||
^$c052 // all graphics now
|
||||
pDiskOps=>diskops_newGame(@noxMod)
|
||||
return TRUE
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user