mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-01-30 21:31:28 +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 pressAnyKey()#1
|
||||||
predef gameExists()#1
|
predef gameExists()#1
|
||||||
predef loadInternal()#1
|
predef loadInternal()#1
|
||||||
|
predef newGame(pImportFunc)#1
|
||||||
//AUTOMAP_CHECK// predef checkAutomap()#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
|
//AUTOMAP_CHECK// word = @_checkAutomap
|
||||||
|
|
||||||
word pImportModule
|
word pImportModule
|
||||||
@ -561,10 +562,9 @@ def clearDiskMarks()#0
|
|||||||
end
|
end
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
def newGame()#0
|
def newGame(pImportFunc)#1
|
||||||
word playersModule, newGameModule, partyModule
|
word playersModule, newGameModule, partyModule
|
||||||
clearDiskMarks()
|
clearDiskMarks()
|
||||||
initHeap(0) // initially empty heap
|
|
||||||
global->b_curAvatar = BASE_AVATAR
|
global->b_curAvatar = BASE_AVATAR
|
||||||
global=>w_combatPauseCt = DEFAULT_COMBAT_PAUSE_CT
|
global=>w_combatPauseCt = DEFAULT_COMBAT_PAUSE_CT
|
||||||
global->b_hour = 12 // start at high noon
|
global->b_hour = 12 // start at high noon
|
||||||
@ -583,12 +583,17 @@ def newGame()#0
|
|||||||
setWindow2()
|
setWindow2()
|
||||||
newGameModule()()
|
newGameModule()()
|
||||||
clearWindow()
|
clearWindow()
|
||||||
getCharacterName()
|
if pImportFunc
|
||||||
getCharacterGender()
|
pImportFunc()
|
||||||
|
else
|
||||||
|
getCharacterName()
|
||||||
|
getCharacterGender()
|
||||||
|
fin
|
||||||
if global=>p_players->b_skillPoints
|
if global=>p_players->b_skillPoints
|
||||||
partyModule()=>party_showPlayerSheet(0)
|
partyModule()=>party_showPlayerSheet(0)
|
||||||
fin
|
fin
|
||||||
heapCollect()
|
heapCollect()
|
||||||
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -669,6 +674,9 @@ def newOrLoadGame(ask)#1
|
|||||||
^$23 = 24 // Full text window until we're done
|
^$23 = 24 // Full text window until we're done
|
||||||
displayMenu(existing)
|
displayMenu(existing)
|
||||||
|
|
||||||
|
// Import functions need a working heap, initially empty
|
||||||
|
initHeap(0)
|
||||||
|
|
||||||
ret = -1
|
ret = -1
|
||||||
while ret < 0
|
while ret < 0
|
||||||
|
|
||||||
@ -678,7 +686,7 @@ def newOrLoadGame(ask)#1
|
|||||||
is 'N'
|
is 'N'
|
||||||
clearWindow
|
clearWindow
|
||||||
rawDisplayStr("\n^YStarting new game...^N")
|
rawDisplayStr("\n^YStarting new game...^N")
|
||||||
newGame()
|
newGame(NULL)
|
||||||
ret = 1
|
ret = 1
|
||||||
break
|
break
|
||||||
is 'L'
|
is 'L'
|
||||||
|
@ -15,4 +15,5 @@ const diskops_newOrLoadGame = 4
|
|||||||
const diskops_pressAnyKey = 6
|
const diskops_pressAnyKey = 6
|
||||||
const diskops_gameExists = 8
|
const diskops_gameExists = 8
|
||||||
const diskops_loadInternal = 10
|
const diskops_loadInternal = 10
|
||||||
|
const diskops_newGame = 12
|
||||||
//AUTOMAP_CHECK// const diskops_checkAutomap = 8
|
//AUTOMAP_CHECK// const diskops_checkAutomap = 8
|
||||||
|
@ -25,6 +25,8 @@ byte[] legendos_filename = "LEGENDOS.SYSTEM"
|
|||||||
word origChksum_0, origChksum_1
|
word origChksum_0, origChksum_1
|
||||||
word curChksum_0, curChksum_1
|
word curChksum_0, curChksum_1
|
||||||
|
|
||||||
|
word noxName
|
||||||
|
|
||||||
byte[] S_NOX_FILENAME = "DATA.SAVE.GAME1"
|
byte[] S_NOX_FILENAME = "DATA.SAVE.GAME1"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -223,10 +225,18 @@ def printNox()#0
|
|||||||
len++
|
len++
|
||||||
loop
|
loop
|
||||||
^$200 = len
|
^$200 = len
|
||||||
printf1("name=%s\n", $200)
|
noxName=mmgr(HEAP_INTERN, $200)
|
||||||
|
printf1("name=%s\n", noxName)
|
||||||
rdkey
|
rdkey
|
||||||
end
|
end
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
def noxMod()#1
|
||||||
|
displayStr("Noxmod")
|
||||||
|
rdkey
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
def importNox()#1
|
def importNox()#1
|
||||||
|
|
||||||
@ -250,6 +260,23 @@ def importNox()#1
|
|||||||
|
|
||||||
printNox
|
printNox
|
||||||
^$c050
|
^$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
|
return TRUE
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user