From 3236876cdb91e748a0d0104ea268dcff86f5f4f1 Mon Sep 17 00:00:00 2001 From: neauoire Date: Fri, 11 Jun 2021 10:15:10 -0700 Subject: [PATCH] Added outlines around tileview and zoomview --- .gitignore | 7 +++---- nasu.tal | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 0ab8e18..5528abb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,7 @@ .DS* -*jpg~ -*png~ -*gif~ -*bmp~ +*jpg +*png +*bmp /bin untitled.chr nasu \ No newline at end of file diff --git a/nasu.tal b/nasu.tal index 008c0dc..b4cdb27 100644 --- a/nasu.tal +++ b/nasu.tal @@ -20,7 +20,6 @@ %LENGTH { HOR TOS VER TOS ** #0010 ** } %RTN { JMP2r } -%STEP8 { #33 SFT2 } %MOD { DUP2 / * - } %MOD2 { OVR2 OVR2 // ** -- } %MOD8 { #07 AND } @@ -28,9 +27,11 @@ %ROR { DUP #70 SFT SWP #01 SFT + } %SFL { #40 SFT SFT } %TOB { SWP POP } %TOS { #00 SWP } +%LTS2 { #8000 ++ SWP2 #8000 ++ >> } %INCR { SWP #01 + SWP } %INCR2 { SWP2 #0001 ++ SWP2 } %DECR2 { SWP2 #0001 -- SWP2 } +%STEP8 { #33 SFT2 } %TOGGLE { DUP LDZ #00 = SWP STZ } %GET-ITERATORS { SWP2k POP SWP POP } @@ -83,6 +84,8 @@ &zoom $1 @frame [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 &width $2 &height $2 ] +@rect [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ] +@color $1 ( interface ) @toolview [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ] @@ -603,6 +606,12 @@ RTN LTHk ,&ver JCN POP2 + .tileview/x1 LDZ2 #0002 -- + .tileview/y1 LDZ2 #0002 -- + .tileview/x2 LDZ2 #0001 ++ + .tileview/y2 LDZ2 #0001 ++ + #03 ;line-rect JSR2 + RTN @draw-tileview-zoom ( -- ) @@ -905,6 +914,12 @@ RTN LTHk ,&ver JCN POP2 + .zoomview/x1 LDZ2 #0002 -- + .zoomview/y1 LDZ2 #0002 -- + .zoomview/x2 LDZ2 #0001 ++ + .zoomview/y2 LDZ2 #0007 -- + #03 ;line-rect JSR2 + ( effects ) .zoomview/y1 LDZ2 #0021 ++ .Screen/y DEO2 .zoomview/x1 LDZ2 .Screen/x DEO2 @@ -964,6 +979,28 @@ RTN RTN +@line-rect ( x1* y1* x2* y2* color -- ) + + ( load ) .color STZ DUP2 STH2 .rect/y2 STZ2 .rect/x2 STZ2 DUP2 STH2 .rect/y1 STZ2 .rect/x1 STZ2 + STH2r STH2r + &ver + ( save ) OVR2 .Screen/y DEO2 + ( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ DUP .Screen/color DEO + ( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .Screen/color DEO + ( incr ) INCR2 + OVR2 OVR2 LTS2 ,&ver JCN + POP2 POP2 + .rect/x1 LDZ2 .rect/x2 LDZ2 + &hor + ( save ) OVR2 .Screen/x DEO2 + ( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ DUP .Screen/color DEO + ( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .Screen/color DEO + ( incr ) INCR2 + OVR2 OVR2 #0001 ++ LTS2 ,&hor JCN + POP2 POP2 + +RTN + @new-file ( default* -- ) BANK LENGTH ;op-clear JSR2