From f271a33518b55285e15bbcf7f445a9b4a169176b Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 29 May 2024 08:58:10 -0700 Subject: [PATCH] Starting pen mode --- gui/notepad/src/assets.tal | 7 +++++-- gui/notepad/src/notepad.tal | 30 +++++++++++++++++++++++++----- gui/notepad/untitled43x24.icn | Bin 0 -> 5376 bytes 3 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 gui/notepad/untitled43x24.icn diff --git a/gui/notepad/src/assets.tal b/gui/notepad/src/assets.tal index 07a4869..fed2067 100644 --- a/gui/notepad/src/assets.tal +++ b/gui/notepad/src/assets.tal @@ -296,6 +296,9 @@ 00ff 0000 0000 0000 0000 ffff ffff ffff ffff ] $1 -@mem ( placeholder ) - "Keep 20 "up 20 "to 20 "eight 20 "pages 20 "of 20 "notes 20 "in 20 "the 20 "Note 20 "Pad. 20 "Click 20 "on 20 "the 20 "dog-ear 20 "to 20 "turn 20 "to 20 "the 20 "next 20 "following 20 "page. 20 "Click 20 "in 20 "the 20 "lower 20 "left 20 "corner 20 "to 20 "turn 20 "to 20 "the 20 "next 20 "previous 20 "page. 20 $1 +@placeholder "Keep 20 "up 20 "to 20 "eight 20 "pages 20 "of 20 "notes 20 "in 20 "the 20 "Note 20 "Pad. 20 "Click 20 "on 20 "the 20 "dog-ear 20 "to 20 "turn 20 "to 20 "the 20 "next 20 "following 20 "page. 20 "Click 20 "in 20 "the 20 "lower 20 "left 20 "corner 20 "to 20 "turn 20 "to 20 "the 20 "next 20 "previous 20 "page. 20 $1 + +@mem $8000 +@sketch + diff --git a/gui/notepad/src/notepad.tal b/gui/notepad/src/notepad.tal index 3d1a9c4..37786f0 100644 --- a/gui/notepad/src/notepad.tal +++ b/gui/notepad/src/notepad.tal @@ -1,6 +1,6 @@ ( A port of the macintosh classic notepad ) -|00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2 +|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1 |10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1 |20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 |80 @Controller &vector $2 &button $1 &key $1 @@ -18,9 +18,9 @@ ( | meta ) ;meta #06 DEO2 ( | theme ) - #f00f .System/r DEO2 - #f00f .System/g DEO2 - #f00f .System/b DEO2 + #f0cf .System/r DEO2 + #f0cf .System/g DEO2 + #f0cf .System/b DEO2 load-theme ( | size ) #00e0 .Screen/width DEO2 @@ -253,12 +253,14 @@ JMP2r @file-new ( -- ) + ( copy placeholder ) ;&mcpy .System/expansion DEO2 #0801 &>l ( -- ) #00 OVR #c0 SFT2 ;mem ADD2 STH2 #20 STH2r STA INC GTHk ?&>l POP2 JMP2r + &mcpy [ 01 0100 0000 =placeholder 0000 =mem ] @file-save ( -- ) ;notepad-path .File/name DEO2 @@ -485,7 +487,7 @@ .Screen/y DEI2 #00c8 NEQ2 ?{ ;etc-icn .Screen/addr DEO2 [ LIT2 01 -Screen/sprite ] DEO - POP2 JMP2r } + POP2 ! } ( | draw char ) DUP2 #0001 SUB2 LDA2 char-addr .Screen/addr DEO2 is-selected STH @@ -499,7 +501,25 @@ [ LIT2 05 -Screen/sprite ] DEO .Screen/x DEI2k #0008 SUB2 ROT DEO2 &block walk-char POP INC2 LDAk ?&>w + POP2 + ( >> ) + +@ ( -- ) + #0000 .Screen/x DEO2 + #0012 .Screen/y DEO2 + ;sketch .Screen/addr DEO2 + [ LIT2 05 -Screen/auto ] DEO + #1800 + &>h ( -- ) + #1c00 + &>w ( -- ) + [ LIT2 0a -Screen/sprite ] DEO + INC GTHk ?&>w + POP2 #0000 .Screen/x DEO2 + .Screen/y DEI2k #0008 ADD2 ROT DEO2 + INC GTHk ?&>h POP2 JMP2r + &patt [ aa55 aa55 aa55 aa55 ] @ ( -- ) [ LIT2 00 -collapsed ] LDZ EQU ?{ JMP2r } diff --git a/gui/notepad/untitled43x24.icn b/gui/notepad/untitled43x24.icn new file mode 100644 index 0000000000000000000000000000000000000000..3a7e50d5dfc1b1a0eab537de902b9bb66e38d9d4 GIT binary patch literal 5376 zcmeHJu};G<5cS!vW1$K%GDO9n(2)TNe@Z@rfq~&hMn0jR;(-t8CoqD9C}+E_LX;?^ zgth{|A&$>?=X-bO#EfO+4CD;_qYMCWF6*a9EhUG)##?G#5)8nO8d_`0)8eUS+jwwn zT*g?7gk-06qljotk{@f79-Q;KYzF2A;<|N=3I-d-uqSXsMJ2AXXZc`a?&Bn+4NG05 z*SAGYuW`PMZ0RU2RNTLCV%Ousz6 literal 0 HcmV?d00001