ResetTextRank on backspace

This commit is contained in:
Peter Ferrie 2019-06-18 13:52:35 -07:00
parent 1c7d40de87
commit 046b5dc804
3 changed files with 20 additions and 4 deletions

View File

@ -37,6 +37,20 @@ BestMatchScore
BestMatchIndex
!byte 0
;------------------------------------------------------------------------------
; ResetTextRank
; reset the Match variables to allow re-scanning (e.g. because of backspace)
; in: nothing
; out: X, MatchCount, BestMatchScore, BestMatchIndex zeroed
;------------------------------------------------------------------------------
ResetTextRank
ldx #0
stx MatchCount
stx BestMatchScore
stx BestMatchIndex
rts
;------------------------------------------------------------------------------
; TextRankCallback
; callback called by okvs_iter_values on gGamesListStore
@ -132,6 +146,7 @@ TextRankCallback
pha
ldy #1
lda (zpstring),y
+LOW_ASCII_TO_LOWER
sta firstletter
pla
ldx InputBuffer

View File

@ -39,7 +39,8 @@ InputLoop
cmp #$7F ; delete key
bne +
- ldx #kInputBackspace
- jsr ResetTextRank
ldx #kInputBackspace
bne InputDispatch ; always branches
+ cmp #$08 ; left arrow = delete

View File

@ -121,9 +121,9 @@ cscript /nologo bin\rsync.js res\demo\* build\DEMO >>build\log
cscript /nologo bin\rsync.js res\fx\* build\FX >>build\log
%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/FX" "build\FX" >>build\log
%CADIUS% CREATEFOLDER "build\%DISK%" "/%VOLUME%/X/" >>build\log
cscript /nologo bin\do2po.js res\dsk build\po
cscript /nologo bin\rsync.js res\dsk\*.po build\po
cscript /nologo bin\extract.js build\po >>build\log
rem cscript /nologo bin\do2po.js res\dsk build\po
rem cscript /nologo bin\rsync.js res\dsk\*.po build\po
rem cscript /nologo bin\extract.js build\po >>build\log
echo y|1>nul 2>nul del /s build\X\.DS_Store
echo y|1>nul 2>nul del /s build\X\PRODOS
echo y|1>nul 2>nul del /s build\X\LOADER.SYSTEM