diff --git a/Platform/Apple/virtual/src/plasma/gamelib.plh b/Platform/Apple/virtual/src/plasma/gamelib.plh index cd41d76a..4e1f5459 100644 --- a/Platform/Apple/virtual/src/plasma/gamelib.plh +++ b/Platform/Apple/virtual/src/plasma/gamelib.plh @@ -39,6 +39,7 @@ import gamelib predef countArray(arr)#1 predef countList(p)#1 predef countListFiltered(p, offset, filterFunc)#1 + predef crout()#0 predef displayChar(chr)#0 predef displayf1(fmt, arg1)#0 predef displayf2(fmt, arg1, arg2)#0 diff --git a/Platform/Apple/virtual/src/plasma/gameloop.pla b/Platform/Apple/virtual/src/plasma/gameloop.pla index f817b01a..7cad67ab 100644 --- a/Platform/Apple/virtual/src/plasma/gameloop.pla +++ b/Platform/Apple/virtual/src/plasma/gameloop.pla @@ -730,7 +730,7 @@ end /////////////////////////////////////////////////////////////////////////////////////////////////// // Print a carriage return -asm crout()#0 +export asm crout()#0 +asmPlasmNoRet 0 lda #$8D jmp _safeCout @@ -2568,6 +2568,7 @@ def toggleGodMode()#1 if ^kbd == $84 // ctrl-D ^kbdStrobe global->b_godmode = !global->b_godmode + flipToPage1() clearTextWindow() displayf1("gm:%d\n", global->b_godmode & 1) beep; beep diff --git a/Platform/Apple/virtual/src/plasma/godmode.pla b/Platform/Apple/virtual/src/plasma/godmode.pla index c91a075a..a56de1d7 100644 --- a/Platform/Apple/virtual/src/plasma/godmode.pla +++ b/Platform/Apple/virtual/src/plasma/godmode.pla @@ -24,6 +24,14 @@ predef _addItem(player)#1 predef _addPlayer()#1 word[] funcTbl = @_setCheatCmds, @_addItem, @_addPlayer +/////////////////////////////////////////////////////////////////////////////////////////////////// +def splitScreenMode()#0 + flipToPage1() + textHome() + ^$c053 + ^$25 = 19 + crout() +end /////////////////////////////////////////////////////////////////////////////////////////////////// // Godmode cheats @@ -32,12 +40,10 @@ def kbdTeleport()#1 word x, y byte dir - flipToPage1() - ^$c053 - if ^$25 < 23; ^$25 = 23; fin + splitScreenMode() getPos(@x, @y) dir = getDir() - printf3("\nCurrent: X=%d Y=%d Facing=%d\n", x, y, dir) + printf3("Current: X=%d Y=%d Facing=%d\n", x, y, dir) printf1("3D [%d]: ", mapIs3D) d3 = parseDecWithDefault(readStr(), mapIs3D) @@ -62,11 +68,9 @@ def showPos()#1 word x, y byte dir - flipToPage1() - ^$c053 - if ^$25 < 23; ^$25 = 23; fin + splitScreenMode() getPos(@x, @y) - printf2("\nX=%d Y=%d ", x, y) + printf2("X=%d Y=%d ", x, y) if mapIs3D printf3("Facing=%d Sky=%d Ground=%d", getDir(), skyNum, groundNum) fin