shithub: pokecrystal

Download patch

ref: 999c804f6f8de0be13d312af9165c99e005a25d1
parent: 88f1b8165b4e0ce0e416e26d7cb7b3105b8f8c31
author: pfero <[email protected]>
date: Thu Nov 2 21:09:27 EDT 2017

Label some functions in gfx/load_pics.asm

A few projects I looked around in used these same labels for these
functions, and it looks like they describe these functions properly.
Also fixed usage of BANK() in a few places.

--- a/engine/stats_screen.asm
+++ b/engine/stats_screen.asm
@@ -869,7 +869,7 @@
 	predef FrontpicPredef
 	hlcoord 0, 0
 	ld d, $0
-	ld e, $2
+	ld e, ANIM_MON_MENU
 	predef LoadMonAnimation
 	ld hl, wcf64
 	set 6, [hl]
--- a/gfx/load_pics.asm
+++ b/gfx/load_pics.asm
@@ -70,7 +70,7 @@
 	xor a
 	ld [hBGMapMode], a
 	call _GetFrontpic
-	call Function51103
+	call GetAnimatedFrontpic
 	pop af
 	ld [rSVBK], a
 	ret
@@ -83,7 +83,7 @@
 	ld b, a
 	push bc
 	call GetFrontpicPointer
-	ld a, $6
+	ld a, BANK(wDecompressScratch)
 	ld [rSVBK], a
 	ld a, b
 	ld de, wDecompressScratch + $800
@@ -91,7 +91,7 @@
 	pop bc
 	ld hl, wDecompressScratch
 	ld de, wDecompressScratch + $800
-	call Function512ab
+	call PadFrontpic
 	pop hl
 	push hl
 	ld de, wDecompressScratch
@@ -131,8 +131,8 @@
 	pop bc
 	ret
 
-Function51103: ; 51103
-	ld a, $1
+GetAnimatedFrontpic: ; 51103
+	ld a, BANK(VTiles3)
 	ld [rVBK], a
 	push hl
 	ld de, wDecompressScratch
@@ -144,7 +144,7 @@
 	ld de, 7 * 7 tiles
 	add hl, de
 	push hl
-	ld a, $1
+	ld a, BANK(BasePicSize)
 	ld hl, BasePicSize
 	call GetFarWRAMByte
 	pop hl
@@ -163,7 +163,7 @@
 
 	push hl
 	push bc
-	call Function5114f
+	call LoadFrontpicTiles
 	pop bc
 	pop hl
 	ld de, wDecompressScratch
@@ -174,7 +174,7 @@
 	ld [rVBK], a
 	ret
 
-Function5114f: ; 5114f
+LoadFrontpicTiles: ; 5114f
 	ld hl, wDecompressScratch
 	swap c
 	ld a, c
@@ -186,13 +186,13 @@
 	push bc
 	call LoadFrontpic
 	pop bc
-.asm_51161
+.loop
 	push bc
 	ld c, $0
 	call LoadFrontpic
 	pop bc
 	dec b
-	jr nz, .asm_51161
+	jr nz, .loop
 	ret
 
 GetBackpic: ; 5116c
@@ -413,7 +413,7 @@
 	pop de
 	ret
 
-Function512ab: ; 512ab
+PadFrontpic: ; 512ab
 	ld a, b
 	cp 6
 	jr z, .six
--- a/gfx/pics/animation.asm
+++ b/gfx/pics/animation.asm
@@ -123,7 +123,7 @@
 SetUpPokeAnim: ; d00b4
 	ld a, [rSVBK]
 	push af
-	ld a, $2
+	ld a, BANK(wPokeAnimSceneIndex)
 	ld [rSVBK], a
 	ld a, [wPokeAnimSceneIndex]
 	ld c, a
@@ -313,7 +313,7 @@
 PokeAnim_InitPicAttributes: ; d01d6
 	ld a, [rSVBK]
 	push af
-	ld a, $2
+	ld a, BANK(wPokeAnimSceneIndex)
 	ld [rSVBK], a
 
 	push bc
@@ -366,7 +366,7 @@
 PokeAnim_InitAnim: ; d0228
 	ld a, [rSVBK]
 	push af
-	ld a, $2
+	ld a, BANK(wPokeAnimExtraFlag)
 	ld [rSVBK], a
 	push bc
 	ld hl, wPokeAnimExtraFlag
@@ -1007,7 +1007,7 @@
 PokeAnim_GetFrontpicDims: ; d05b4
 	ld a, [rSVBK]
 	push af
-	ld a, $1
+	ld a, BANK(CurPartySpecies)
 	ld [rSVBK], a
 	ld a, [CurPartySpecies]
 	ld [CurSpecies], a