shithub: pokecrystal

Download patch

ref: f2550fc3c208508aaba3a9c2f26dcd12d81c6bc5
parent: f76dabedcc8af56c871e06a4721de4c79bd30908
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Tue Jun 16 15:38:00 EDT 2020

ReplaceKrisSprite -> UpdatePlayerSprite

--- a/data/special_pointers.asm
+++ b/data/special_pointers.asm
@@ -67,7 +67,7 @@
 	add_special UpdateTimePals ; bank 0
 	add_special ClearTilemap ; bank 0
 	add_special UpdateSprites ; bank 0
-	add_special ReplaceKrisSprite ; bank 0
+	add_special UpdatePlayerSprite ; bank 0
 	add_special GameCornerPrizeMonCheckDex
 	add_special UnusedSetSeenMon
 	add_special WaitSFX ; bank 0
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -1766,7 +1766,7 @@
  	readmem wBuffer2
  	writevar VAR_MOVEMENT
 
- 	special ReplaceKrisSprite
+ 	special UpdatePlayerSprite
  	special PlayMapMusic
 -; step into the water (slow_step DIR, step_end)
  	special SurfStartStep
--- a/engine/events/field_moves.asm
+++ b/engine/events/field_moves.asm
@@ -72,7 +72,7 @@
 	ld hl, vTiles1
 	lb bc, BANK(Font), 12
 	call Get1bpp
-	call ReplaceKrisSprite
+	call UpdatePlayerSprite
 	ret
 
 HeadbuttTreeGFX:
--- a/engine/events/overworld.asm
+++ b/engine/events/overworld.asm
@@ -412,7 +412,7 @@
 	readmem wBuffer2
 	writevar VAR_MOVEMENT
 
-	special ReplaceKrisSprite
+	special UpdatePlayerSprite
 	special PlayMapMusic
 ; step into the water (slow_step DIR, step_end)
 	special SurfStartStep
@@ -628,7 +628,7 @@
 .ReturnFromFly:
 	farcall Function561d
 	call DelayFrame
-	call ReplaceKrisSprite
+	call UpdatePlayerSprite
 	farcall LoadOverworldFont
 	ret
 
@@ -1605,7 +1605,7 @@
 	ld a, $1
 	ld [wPlayerAction], a
 	call UpdateSprites
-	call ReplaceKrisSprite
+	call UpdatePlayerSprite
 	ret
 
 RodBiteText:
@@ -1713,13 +1713,13 @@
 	writetext GotOnBikeText
 	waitbutton
 	closetext
-	special ReplaceKrisSprite
+	special UpdatePlayerSprite
 	end
 
 Script_GetOnBike_Register:
 	loadvar VAR_MOVEMENT, PLAYER_BIKE
 	closetext
-	special ReplaceKrisSprite
+	special UpdatePlayerSprite
 	end
 
 ; unused
@@ -1735,7 +1735,7 @@
 
 FinishGettingOffBike:
 	closetext
-	special ReplaceKrisSprite
+	special UpdatePlayerSprite
 	special PlayMapMusic
 	end
 
--- a/engine/overworld/map_setup.asm
+++ b/engine/overworld/map_setup.asm
@@ -142,7 +142,7 @@
 	set PLAYERSPRITESETUP_SKIP_RELOAD_GFX_F, [hl]
 	ret
 
-CheckReplaceKrisSprite:
+CheckUpdatePlayerSprite:
 	nop
 	call .CheckBiking
 	jr c, .ok
@@ -153,7 +153,7 @@
 	ret
 
 .ok
-	call ReplaceKrisSprite
+	call UpdatePlayerSprite
 	ret
 
 .CheckBiking:
--- a/engine/overworld/overworld.asm
+++ b/engine/overworld/overworld.asm
@@ -6,7 +6,7 @@
 	ldh [rVBK], a
 	ret
 
-_ReplaceKrisSprite::
+_UpdatePlayerSprite::
 	call GetPlayerSprite
 	ld a, [wUsedSprites]
 	ldh [hUsedSpriteIndex], a
--- a/engine/overworld/player_movement.asm
+++ b/engine/overworld/player_movement.asm
@@ -784,7 +784,7 @@
 	push bc
 	ld a, PLAYER_NORMAL
 	ld [wPlayerState], a
-	call ReplaceKrisSprite ; UpdateSprites
+	call UpdatePlayerSprite ; UpdateSprites
 	pop bc
 	ret
 
--- a/engine/overworld/warp_connection.asm
+++ b/engine/overworld/warp_connection.asm
@@ -316,7 +316,7 @@
 	farcall InitMapNameSign
 	call GetMovementPermissions
 	farcall RefreshPlayerSprite
-	farcall CheckReplaceKrisSprite
+	farcall CheckUpdatePlayerSprite
 	ld hl, wPlayerSpriteSetupFlags
 	bit PLAYERSPRITESETUP_SKIP_RELOAD_GFX_F, [hl]
 	jr nz, .skip
--- a/home/gfx.asm
+++ b/home/gfx.asm
@@ -94,8 +94,8 @@
 	ldh [hBGMapMode], a
 	ret
 
-ReplaceKrisSprite::
-	farcall _ReplaceKrisSprite
+UpdatePlayerSprite::
+	farcall _UpdatePlayerSprite
 	ret
 
 LoadStandardFont::
--- a/home/window.asm
+++ b/home/window.asm
@@ -38,7 +38,7 @@
 	call SafeUpdateSprites
 	ld a, $90
 	ldh [hWY], a
-	call ReplaceKrisSprite
+	call UpdatePlayerSprite
 	farcall InitMapNameSign
 	farcall LoadOverworldFont
 	ret
--- a/maps/Pokecenter2F.asm
+++ b/maps/Pokecenter2F.asm
@@ -437,7 +437,7 @@
 	special SetPlayerPalette
 	applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
 	setflag ENGINE_KRIS_IN_CABLE_CLUB
-	special ReplaceKrisSprite
+	special UpdatePlayerSprite
 	opentext
 	writetext Text_LikeTheLook
 	waitbutton
@@ -463,7 +463,7 @@
 	setval (PAL_NPC_BLUE << 4)
 	special SetPlayerPalette
 	applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
-	special ReplaceKrisSprite
+	special UpdatePlayerSprite
 	applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsDown_2
 	applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightAndDown
 	end
@@ -485,7 +485,7 @@
 	setval (PAL_NPC_BLUE << 4)
 	special SetPlayerPalette
 	applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
-	special ReplaceKrisSprite
+	special UpdatePlayerSprite
 	applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsDown_2
 	applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightAndDown
 	end
@@ -546,7 +546,7 @@
 	applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingDown
 	faceobject PLAYER, POKECENTER2F_TIME_CAPSULE_RECEPTIONIST
 	setflag ENGINE_KRIS_IN_CABLE_CLUB
-	special ReplaceKrisSprite
+	special UpdatePlayerSprite
 	opentext
 	writetext Text_LikeTheLook
 	waitbutton
@@ -573,7 +573,7 @@
 	setval (PAL_NPC_BLUE << 4)
 	special SetPlayerPalette
 	applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
-	special ReplaceKrisSprite
+	special UpdatePlayerSprite
 	applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepDown
 	applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_2
 .Done: