mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-09-28 20:54:46 +00:00
Added a god-mode command, '&', to print out the allocated memory blocks.
This commit is contained in:
parent
2817f1b25e
commit
70ead12fb1
@ -1496,8 +1496,13 @@ class A2PackPartitions
|
||||
else {
|
||||
codeFile.eachLine { line ->
|
||||
def m = line =~ /^\s*include\s+"([^"]+)"/
|
||||
if (m)
|
||||
if (m) {
|
||||
deps << jitCopy(new File(baseDir, m.group(1)))
|
||||
if (m.group(1) =~ /.*gamelib.plh/ && !(codeFile =~ /.*gameloop.pla/)) {
|
||||
println "Dep for $codeFile: ${m.group(1)} -> gameLoop.pla"
|
||||
deps << jitCopy(new File(baseDir, m.group(1).replace("gamelib.plh", "gameloop.pla")))
|
||||
}
|
||||
}
|
||||
m = line =~ /^\s*!(source|convtab) "([^"]+)"/
|
||||
if (m) {
|
||||
if (codeFile ==~ /.*\.pla$/) {
|
||||
|
@ -1508,11 +1508,9 @@ aux_dispatch:
|
||||
+ cmp #FREE_MEMORY
|
||||
bne +
|
||||
jmp mem_free
|
||||
!if DEBUG {
|
||||
+ cmp #DEBUG_MEM
|
||||
bne +
|
||||
jmp printMem
|
||||
}
|
||||
+ cmp #CALC_FREE
|
||||
bne +
|
||||
jmp mem_calcFree
|
||||
|
@ -2130,6 +2130,15 @@ def addItem()
|
||||
|
||||
^$c052
|
||||
end
|
||||
def printMem
|
||||
flipToPage1
|
||||
^$c051
|
||||
mmgr(DEBUG_MEM, 0)
|
||||
rdkey
|
||||
auxMmgr(DEBUG_MEM, 0)
|
||||
rdkey
|
||||
^$c050
|
||||
end
|
||||
def setCheatCmds
|
||||
// install cheat commands
|
||||
cmdTbl['T'] = @kbdTeleport
|
||||
@ -2140,6 +2149,7 @@ def setCheatCmds
|
||||
cmdTbl['!'] = @testCombat
|
||||
cmdTbl['Y'] = @nextSky
|
||||
cmdTbl['G'] = @nextGround
|
||||
cmdTbl['&'] = @printMem
|
||||
end
|
||||
def enableGodMode()
|
||||
if ^$C061 >= 128 and ^$C062 >= 128
|
||||
|
Loading…
Reference in New Issue
Block a user