shithub: pokecrystal

Download patch

ref: 17087489c6b2466b1d4b2d22d7760604d3e755f8
parent: 761edc7db37df18a6e7f41e0d3bb9edd1e3cf721
author: mid-kid <esteve.varela@gmail.com>
date: Fri Jun 1 05:04:36 EDT 2018

Miscellaneous fixes in the use of _command constants.

--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -64,7 +64,7 @@
 	inc hl
 	ld [de], a
 	inc de
-	cp -1
+	cp endmove_command
 	jr nz, .GetMoveEffect
 
 ; Start at the first command.
--- a/engine/events/specials.asm
+++ b/engine/events/specials.asm
@@ -95,13 +95,13 @@
 	farcall _NamingScreen
 	; default to "SILVER"
 	ld hl, wRivalName
-	ld de, DefaultRivalName
+	ld de, .default
 	call InitName
 	ret
-; 0xc2b2
 
-DefaultRivalName: ; 0xc2b2
+.default
 	db "SILVER@"
+; 0xc2b9
 
 NameRater: ; c2b9
 	farcall _NameRater
--- a/engine/gfx/pic_animation.asm
+++ b/engine/gfx/pic_animation.asm
@@ -399,11 +399,11 @@
 .RunAnim: ; d0261
 	call PokeAnim_GetPointer
 	ld a, [wPokeAnimCommand]
-	cp -1
+	cp endanim_command
 	jr z, PokeAnim_End
-	cp -2
+	cp setrepeat_command
 	jr z, .SetRepeat
-	cp -3
+	cp dorepeat_command
 	jr z, .DoRepeat
 	call PokeAnim_GetFrame
 	ld a, [wPokeAnimParameter]
--- a/engine/overworld/map_objects.asm
+++ b/engine/overworld/map_objects.asm
@@ -2116,13 +2116,13 @@
 
 ShakeGrass: ; 5556
 	push bc
-	ld de, .data_5562
+	ld de, .GrassObject
 	call CopyTempObjectData
 	call InitTempObject
 	pop bc
 	ret
 
-.data_5562
+.GrassObject
 	db $00, PAL_OW_TREE, SPRITEMOVEDATA_GRASS
 ; 5565
 
@@ -2140,6 +2140,7 @@
 .ScreenShakeObject:
 	db $00, PAL_OW_SILVER, SPRITEMOVEDATA_SCREENSHAKE
 ; 5579
+
 DespawnEmote: ; 5579
 	push bc
 	ld a, [hMapObjectIndexBuffer]