shithub: pokered

Download patch

ref: 332b7b3090445902d53cd6d424c3c7f7da308136
parent: 1115b4454db645d2ebaa9e9f1fdd9ea86c1c4e44
author: YamaArashi <shadow962@live.com>
date: Fri Mar 13 15:22:55 EDT 2015

relabel and add comment

--- a/engine/menu/naming_screen.asm
+++ b/engine/menu/naming_screen.asm
@@ -92,7 +92,7 @@
 	call GoPAL_SET
 	call LoadHpBarAndStatusTilePatterns
 	call LoadEDTile
-	callba LoadMonPartySpriteTilePatterns
+	callba LoadMonPartySpriteGfx
 	hlCoord 0, 4
 	ld b, $9
 	ld c, $12
--- a/engine/menu/party_menu.asm
+++ b/engine/menu/party_menu.asm
@@ -22,7 +22,7 @@
 	ld [H_AUTOBGTRANSFERENABLED],a
 	call ClearScreen
 	call UpdateSprites ; move sprites
-	callba LoadMonPartySpriteTilePatternsWithLCDDisabled ; load pokemon icon graphics
+	callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
 
 RedrawPartyMenu_: ; 12ce3 (4:6ce3)
 	ld a,[wd07d]
--- a/engine/mon_party_sprites.asm
+++ b/engine/mon_party_sprites.asm
@@ -88,12 +88,12 @@
 PartyMonSpeeds: ; 71769 (1c:5769)
 	db $05,$10,$20
 
-LoadMonPartySpriteTilePatterns: ; 7176c (1c:576c)
+LoadMonPartySpriteGfx: ; 7176c (1c:576c)
 ; Load mon party sprite tile patterns into VRAM during V-blank.
 	ld hl, MonPartySpritePointers
 	ld a, $1c
 
-LoadAnimSpriteTilePatterns: ; 71771 (1c:5771)
+LoadAnimSpriteGfx: ; 71771 (1c:5771)
 ; Load animated sprite tile patterns into VRAM during V-blank. hl is the address
 ; of an array of structures that contain arguments for CopyVideoData and a is
 ; the number of structures in the array.
@@ -125,7 +125,7 @@
 	jr nz, .loop
 	ret
 
-LoadMonPartySpriteTilePatternsWithLCDDisabled: ; 71791 (1c:5791)
+LoadMonPartySpriteGfxWithLCDDisabled: ; 71791 (1c:5791)
 ; Load mon party sprite tile patterns into VRAM immediately by disabling the
 ; LCD.
 	call DisableLCD
@@ -332,6 +332,10 @@
 	jr WriteMonPartySpriteOAM
 
 UnusedPartyMonSpriteFunction: ; 71890 (1c:5890)
+; This function is unused and doesn't appear to do anything useful. It looks
+; like it may have been intended to load the tile patterns and OAM data for
+; the mon party sprite associated with the mon ID in a.
+; However, its calculations are off and it loads garbage data.
 	ld a, [wcf91]
 	call GetPartyMonSpriteID
 	push af
--- a/engine/overworld/player_animations.asm
+++ b/engine/overworld/player_animations.asm
@@ -389,7 +389,7 @@
 	call CopyVideoData
 	ld a, $4
 	ld hl, RedFishingTiles ; $4866
-	call LoadAnimSpriteTilePatterns
+	call LoadAnimSpriteGfx
 	ld a, [wSpriteStateData1 + 2]
 	ld c, a
 	ld b, $0
--- a/engine/trade.asm
+++ b/engine/trade.asm
@@ -146,8 +146,8 @@
 Func_4120b: ; 4120b (10:520b)
 	ld a, %11010000
 	ld [rOBP1], a
-	ld b, BANK(LoadMonPartySpriteTilePatterns)
-	ld hl, LoadMonPartySpriteTilePatterns
+	ld b, BANK(LoadMonPartySpriteGfx)
+	ld hl, LoadMonPartySpriteGfx
 	jp Bankswitch
 
 Trade_SwapNames: ; 41217 (10:5217)