shithub: pokecrystal

Download patch

ref: 50ea6d6e22804441c028e8bbbdd3e0720b4478c5
parent: c85b32ed8035ce51dd9d3bd52440cebd912ce92c
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Wed May 23 15:10:15 EDT 2018

WALKS_ON_WATER → SWIMMING

--- a/constants/map_object_constants.asm
+++ b/constants/map_object_constants.asm
@@ -64,11 +64,11 @@
 OVERHEAD      EQU 1 << OVERHEAD_F
 
 ; object_struct OBJECT_PALETTE bit flags
-WALK_ON_WATER_F    EQU 5
+SWIMMING_F         EQU 5
 STRENGTH_BOULDER_F EQU 6
 BIG_OBJECT_F       EQU 7
 
-WALK_ON_WATER    EQU 1 << WALK_ON_WATER_F
+SWIMMING         EQU 1 << SWIMMING_F
 STRENGTH_BOULDER EQU 1 << STRENGTH_BOULDER_F
 BIG_OBJECT       EQU 1 << BIG_OBJECT_F
 
--- a/data/sprites/map_objects.asm
+++ b/data/sprites/map_objects.asm
@@ -295,7 +295,7 @@
 	db OBJECT_ACTION_STAND ; action
 	db 0 ; flags1
 	db 0 ; flags2
-	db WALK_ON_WATER ; palette flags
+	db SWIMMING ; palette flags
 
 ; 25
 	db SPRITEMOVEFN_00 ; movement function
--- a/engine/overworld/npc_movement.asm
+++ b/engine/overworld/npc_movement.asm
@@ -2,8 +2,8 @@
 
 	ld hl, OBJECT_PALETTE
 	add hl, bc
-	bit WALK_ON_WATER_F, [hl]
-	jr z, .walks_on_land
+	bit SWIMMING_F, [hl]
+	jr z, .not_swimming
 
 	ld hl, OBJECT_FLAGS1
 	add hl, bc
@@ -17,7 +17,7 @@
 	ret c
 	jr .resume
 
-.walks_on_land
+.not_swimming
 	ld hl, OBJECT_FLAGS1
 	add hl, bc
 	bit 4, [hl]