Skip to content

Commit

Permalink
ClearMemory Adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sha0den committed Aug 14, 2024
1 parent 4c2dbbf commit 6102d39
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/engine/input_name.asm
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ Deck4Data:
textitem 14, 1, DeckText
db $ff

; zeroes b bytes starting from hl.
; zeroes a bytes starting from hl.
; this function is identical to 'ClearNBytesFromHL' in Bank $2,
; as well as ClearMemory_Bank5' and 'ClearMemory_Bank8'.
; preserves all registers
; input:
; b = number of bytes to clear
; a = number of bytes to clear
; hl = where to begin erasing
ClearMemory:
ClearMemory_Bank6:
push af
push bc
push hl
Expand Down Expand Up @@ -174,7 +176,7 @@ InitializeInputName:
; clear the name buffer.
ld a, NAMING_SCREEN_BUFFER_LENGTH
ld hl, wNamingScreenBuffer
call ClearMemory
call ClearMemory_Bank6
ld hl, wNamingScreenBuffer
ld a, [wNamingScreenBufferMaxLength]
ld b, a
Expand Down

0 comments on commit 6102d39

Please sign in to comment.