From a24e23154c67549a0cb05e161ad0f3dc050a2cf2 Mon Sep 17 00:00:00 2001 From: neauoire Date: Tue, 2 Mar 2021 16:35:11 -0800 Subject: [PATCH] Inverted controls --- examples/app.pattern.usm | 48 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/examples/app.pattern.usm b/examples/app.pattern.usm index abf725b..25dae80 100644 --- a/examples/app.pattern.usm +++ b/examples/app.pattern.usm @@ -39,13 +39,13 @@ BRK ,no-ctrl ~dev/ctrl.buttons #00 EQU JMP? POP2 ,no-ctrl-up ~dev/ctrl.buttons #10 EQU JMP? POP2 - ~editor.addr #0001 SUB2 =editor.addr + ~editor.addr #0001 ADD2 =editor.addr ,draw-window JSR ,redraw JSR @no-ctrl-up ,no-ctrl-down ~dev/ctrl.buttons #20 EQU JMP? POP2 - ~editor.addr #0001 ADD2 =editor.addr + ~editor.addr #0001 SUB2 =editor.addr ,draw-window JSR ,redraw JSR @no-ctrl-down @@ -68,19 +68,6 @@ BRK BRK -@draw-label-left ( x y color addr ) - - ( load ) =label.addr =label.color =dev/sprite.y =dev/sprite.x - ~label.addr - @draw-label-left-loop - ( draw ) DUP2 LDR #00 SWP #0008 MUL2 ,font ADD2 =dev/sprite.addr ~label.color =dev/sprite.color - ( incr ) #0001 ADD2 - ( incr ) ~dev/sprite.x #0008 ADD2 =dev/sprite.x - DUP2 #0001 ADD2 LDR #00 NEQ ,draw-label-left-loop ROT JMP? POP2 - POP2 - -RTS - @draw-window #0000 #0000 ~dev/screen.width ~dev/screen.height #03 ~editor.addr ,tile-rect JSR @@ -99,15 +86,6 @@ RTS RTS -@draw-byte ( x y color addr ) - - ( load ) =addr =color =dev/sprite.y =dev/sprite.x - ,font_hex #00 ~addr LDR #f0 AND #04 ROR #08 MUL ADD2 =dev/sprite.addr ~color =dev/sprite.color - ~dev/sprite.x #0008 ADD2 =dev/sprite.x - ,font_hex #00 ~addr LDR #0f AND #08 MUL ADD2 =dev/sprite.addr ~color =dev/sprite.color - -RTS - @redraw ~editor.x1 =dev/sprite.x @@ -151,6 +129,28 @@ RTS RTS +@draw-label-left ( x y color addr ) + + ( load ) =label.addr =label.color =dev/sprite.y =dev/sprite.x + ~label.addr + @draw-label-left-loop + ( draw ) DUP2 LDR #00 SWP #0008 MUL2 ,font ADD2 =dev/sprite.addr ~label.color =dev/sprite.color + ( incr ) #0001 ADD2 + ( incr ) ~dev/sprite.x #0008 ADD2 =dev/sprite.x + DUP2 #0001 ADD2 LDR #00 NEQ ,draw-label-left-loop ROT JMP? POP2 + POP2 + +RTS + +@draw-byte ( x y color addr ) + + ( load ) =addr =color =dev/sprite.y =dev/sprite.x + ,font_hex #00 ~addr LDR #f0 AND #04 ROR #08 MUL ADD2 =dev/sprite.addr ~color =dev/sprite.color + ~dev/sprite.x #0008 ADD2 =dev/sprite.x + ,font_hex #00 ~addr LDR #0f AND #08 MUL ADD2 =dev/sprite.addr ~color =dev/sprite.color + +RTS + @fill-rect ( x1 y1 x2 y2 color ) ( load ) =color =rect.y2 =rect.x2 DUP2 =dev/screen.y =rect.y1 DUP2 =dev/screen.x =rect.x1