shithub: pokered

Download patch

ref: 53e7a62744360e494ae28d73c924d63347e1ffd5
parent: 0ed46e7a72e6457eb9e469b9b73967d33c7393cb
author: Sanky <gsanky@gmail.com>
date: Tue Dec 18 10:39:21 EST 2012

Disasm LoadMovePPs (a predef)

--- a/main.asm
+++ b/main.asm
@@ -18450,8 +18450,39 @@
 	db $50
 ; 0xef7d + 5 bytes
 
-INCBIN "baserom.gbc",$ef82,$f6a5 - $ef82
+INCBIN "baserom.gbc",$ef82,$f473 - $ef82
 
+LoadMovePPs: ; 0xf473
+	call Load16BitRegisters
+	ld b, $4
+.pploop
+	ld a, [hli]
+	and a
+	jr z, .empty ; 0xf47a $1b
+	dec a
+	push hl
+	push de
+	push bc
+	ld hl, Moves
+	ld bc, $0006
+	call AddNTimes
+	ld de, $cd6d
+	ld a, BANK(Moves)
+	call FarCopyData
+	pop bc
+	pop de
+	pop hl
+	ld a, [$cd72] ; sixth move byte = pp
+.empty
+	inc de
+	ld [de], a
+	dec b
+	jr nz, .pploop ; there are still moves to read
+	ret
+; 0xf49d
+
+INCBIN "baserom.gbc",$f49d,$f6a5 - $f49d
+
 HealParty:
 	ld hl, W_PARTYMON1
 	ld de, W_PARTYMON1_HP
@@ -52670,7 +52701,8 @@
 	dbw $03,$4D99
 	dbw $01,$4DE1
 	dbw $09,$7D98
-	dbw $03,$7473
+LoadMovePPsPredef:
+	dbw BANK(LoadMovePPs),LoadMovePPs ; 5E
 DrawHPBarPredef:
 	dbw $04,$68EF ; 5F draw HP bar
 	dbw $04,$68F6