You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
copy in StringCmp from pokered
This commit is contained in:
22
main.asm
22
main.asm
@@ -234,15 +234,29 @@ AddNTimes: ; 0x30fe
|
|||||||
|
|
||||||
INCBIN "baserom.gbc",$3105,$313d-$3105
|
INCBIN "baserom.gbc",$3105,$313d-$3105
|
||||||
|
|
||||||
|
PrintLetterDelay: ; 313d
|
||||||
; This function is used to wait a short period after printing a letter to the
|
; This function is used to wait a short period after printing a letter to the
|
||||||
; screen unless the player presses the A/B button or the delay is turned off
|
; screen unless the player presses the A/B button or the delay is turned off
|
||||||
; through the [$cfcc] or [$cfcf] flags. In pokered, these were [$d730] and
|
; through the [$cfcc] or [$cfcf] flags.
|
||||||
; [$d358].
|
|
||||||
PrintLetterDelay: ; 313d
|
|
||||||
INCBIN "baserom.gbc",$313d,$318c - $313d
|
INCBIN "baserom.gbc",$313d,$318c - $313d
|
||||||
; 0x318c
|
; 0x318c
|
||||||
|
|
||||||
INCBIN "baserom.gbc",$318c,$4000 - $318c
|
INCBIN "baserom.gbc",$318c,$31db - $318c
|
||||||
|
|
||||||
|
StringCmp: ; 31db
|
||||||
|
; Compare strings, c bytes in length, at de and hl.
|
||||||
|
; Often used to compare big endian numbers in battle calculations.
|
||||||
|
ld a, [de]
|
||||||
|
cp [hl]
|
||||||
|
ret nz
|
||||||
|
inc de
|
||||||
|
inc hl
|
||||||
|
dec c
|
||||||
|
jr nz, StringCmp
|
||||||
|
ret
|
||||||
|
; 0x31e4
|
||||||
|
|
||||||
|
INCBIN "baserom.gbc",$31e4,$4000 - $31e4
|
||||||
|
|
||||||
SECTION "bank1",DATA,BANK[$1]
|
SECTION "bank1",DATA,BANK[$1]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user