shithub: pokecrystal

Download patch

ref: 406ac7afbbf93161db1ade9706fc802a3bf97e5f
parent: 80f7504f495134dd346b13bae9aa732968365db1
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Wed Oct 14 14:32:41 EDT 2020

Identify some values as relative struct offsets in MoveScreenLoop

--- a/engine/pokemon/mon_menu.asm
+++ b/engine/pokemon/mon_menu.asm
@@ -1016,19 +1016,19 @@
 	push hl
 	call .copy_move
 	pop hl
-	ld bc, $15
+	ld bc, wPartyMon1PP - wPartyMon1Moves
 	add hl, bc
 	call .copy_move
 	ld a, [wBattleMode]
 	jr z, .swap_moves
 	ld hl, wBattleMonMoves
-	ld bc, $20
+	ld bc, wBattleMonStructEnd - wBattleMon
 	ld a, [wCurPartyMon]
 	call AddNTimes
 	push hl
 	call .copy_move
 	pop hl
-	ld bc, 6
+	ld bc, wBattleMonPP - wBattleMonMoves
 	add hl, bc
 	call .copy_move