diff --git a/ray/src/ray.tal b/ray/src/ray.tal index 55eb8e1..bee7d40 100644 --- a/ray/src/ray.tal +++ b/ray/src/ray.tal @@ -34,6 +34,7 @@ ( vectors ) ;on-frame .Screen/vector DEO2 ;on-mouse .Mouse/vector DEO2 + ;on-button .Controller/vector DEO2 #0060 .player/x STZ2 #0070 .player/y STZ2 @@ -48,6 +49,29 @@ BRK @on-frame ( -> ) + .Controller/button DEI + DUP #10 NEQ ,&no-u JCN + .player/y LDZ2k #0001 SUB2 ROT STZ2 + &no-u + DUP #20 NEQ ,&no-d JCN + .player/y LDZ2k #0001 ADD2 ROT STZ2 + &no-d + DUP #40 NEQ ,&no-l JCN + .player/x LDZ2k #0001 SUB2 ROT STZ2 + &no-l + DUP #80 NEQ ,&no-r JCN + .player/x LDZ2k #0001 ADD2 ROT STZ2 + &no-r + POP + ;draw-viewport JSR2 + ;draw-minimap JSR2 + +BRK + +@on-button ( -> ) + + + BRK @on-mouse ( -> )