Browse Source

Starting flipping sprites

main
neauoire 2 years ago
parent
commit
8fa3ef3097
  1. 29
      src/nasu.tal

29
src/nasu.tal

@ -87,7 +87,7 @@ BRK
00 00 =file-save-mono "SaveMono $1
01 "p =save-theme "SaveTheme $1
01 "q =exit "Exit $1
07 "Edit $1
09 "Edit $1
01 "c =edit-copy-chr "Copy $1
05 "C =edit-copy-icn "CopyMono $1
01 "v =edit-paste "Paste $1
@ -95,6 +95,8 @@ BRK
00 08 =edit-erase "Erase $1
00 "i =edit-invert "Invert $1
00 "c =edit-colorize "Colorize $1
00 00 =edit-flipx "Horizontal $1
00 00 =edit-flipy "Veritcal $1
01 "View $1
02 00 =toggle-zoom "Zoom $1
0a "Move $1
@ -534,6 +536,18 @@ JMP2r
@filter-colorize ( x* y* -- )
OVR2 OVR2 get-pixel INC #03 AND !put-pixel
@filter-flipx ( x* y* -- )
OVR2
( ) [ LIT2 00 -selection/x1 ] LDZ #30 SFT2
( ) [ LIT2 00 -selection/x2 ] LDZ INC #30 SFT2 OVR2 SUB2 #01 SFT2
( ) ADD2 LTH2 ?{ POP2 POP2 JMP2r }
#02 !put-pixel
@filter-flipy ( x* y* -- )
POP2 POP2
JMP2r
(
@|map )
@ -1371,6 +1385,19 @@ JMP2r
!redraw
@edit-flipx ( -- )
;filter-flipx filter
#01 .state/changed STZ draw-state
!redraw
@edit-flipy ( -- )
;filter-flipy filter
#01 .state/changed STZ draw-state
!redraw
@<phex> ( short* -- )
SWP <phex>/b
&b ( -- )

Loading…
Cancel
Save