From 538294220dc58ea77401d4baf3c492a058e20def Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sat, 29 Jul 2023 18:46:25 -0700 Subject: [PATCH] (launcher.tal) Clear screen using Screen/pixel --- projects/library/load-rom.tal | 26 +++----------------------- projects/software/launcher.tal | 26 +++++++++++++++----------- 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/projects/library/load-rom.tal b/projects/library/load-rom.tal index fa21a0a..b345ac9 100644 --- a/projects/library/load-rom.tal +++ b/projects/library/load-rom.tal @@ -25,29 +25,9 @@ .System/rst DEI ,&rst-loop JCN ( clear screen ) - #01 .Screen/auto DEO - #0000 .Screen/y DEO2 - .Screen/width DEI2 #0007 ADD2 #03 SFT2 #ffff MUL2 STH2 - &screen-yloop - #0000 .Screen/x DEO2 - STH2kr - &screen-xloop-bg - #00 .Screen/sprite DEO - INC2 - ORAk ,&screen-xloop-bg JCN - POP2 - #0000 .Screen/x DEO2 - STH2kr - &screen-xloop-fg - #40 .Screen/sprite DEO - INC2 - ORAk ,&screen-xloop-fg JCN - POP2 - .Screen/y DEI2 #0008 ADD2 - DUP2 .Screen/y DEO2 - .Screen/height DEI2 LTH2 ,&screen-yloop JCN - POP2r - #00 .Screen/auto DEO + #0000 DUP2 .Screen/x DEO2 .Screen/y DEO2 + #80 .Screen/pixel DEO + #c0 .Screen/pixel DEO ( reset device vectors ) LIT2r 0000 #00 diff --git a/projects/software/launcher.tal b/projects/software/launcher.tal index 2e7b202..17d2807 100644 --- a/projects/software/launcher.tal +++ b/projects/software/launcher.tal @@ -175,11 +175,11 @@ JMP2r POP JMP2r &valid - #00 ;draw-browser JSR2 + clear-browser DUP .browser/sel STZ DUP .browser/last STZ #30 ADD .Audio0/pitch DEO - #01 ;draw-browser JSR2 + draw-browser ( draw mascot ) #0010 #0010 #0060 #0060 @@ -222,9 +222,9 @@ JMP2r SUB INC STHkr GTH ,&valid-scroll JCN POPr JMP2r &valid-scroll - #00 ;draw-browser JSR2 + clear-browser STHr .browser/scroll STZ - #01 ;draw-browser JSR2 + draw-browser JMP2r @@ -266,18 +266,24 @@ JMP2r JMP2r +@clear-browser ( -- ) + + #0000 + DUP2 .Screen/x DEO2 + .Screen/y DEO2 + #80 .Screen/pixel DEO + +JMP2r + @draw-browser ( mask -- ) ( when empty ) .browser/lines LDZ #01 EQU ;draw-browser-empty JCN2 - STH - ( draw hand ) .browser/x LDZ2 #0018 SUB2 .browser/y LDZ2 .browser/sel LDZ .browser/scroll LDZ SUB #00 SWP #40 SFT2 ADD2 - #0010 #0010 - ;hand-icn STHkr #10 SFT ;draw-icn JSR2 + #0010 #0010 ;hand-icn #02 ;draw-icn JSR2 ( draw files ) .browser/y2 LDZ2 .browser/y LDZ2 SUB2 #04 SFT2 NIP #00 &loop @@ -288,13 +294,11 @@ JMP2r #00 OVR #40 SFT2 .browser/y LDZ2 ADD2 .Screen/y DEO2 DUP .browser/scroll LDZ ADD ;get-entry JSR2 DUP2 ;get-type JSR2 ;draw-type JSR2 - #01 STHkr MUL ;draw-str JSR2 + #01 ;draw-str JSR2 INC GTHk ,&loop JCN &end POP2 - POPr - JMP2r @draw-browser-empty ( mask -- )