shithub: pokecrystal

Download patch

ref: 35f687b5365cb5e4b607e180646e6062d59a357a
parent: 1637d915d422d633a883788774a893ce6fa78849
author: PikalaxALT <PikalaxALT@gmail.com>
date: Sun Jan 10 21:36:39 EST 2016

Fully label home/map_objects.asm

--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -318,7 +318,7 @@
 
 InitializeWorld: ; 5d23
 	call ShrinkPlayer
-	callba GetSpawnCoord
+	callba SpawnPlayer
 	callba _InitializeStartDay
 	ret
 ; 5d33
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -272,7 +272,7 @@
 	dba GetCoordOfUpperLeftCorner ; 1f
 	dba RestoreFacingAfterWarp ; 20
 	dba SpawnInFacingDown ; 21
-	dba GetSpawnCoord ; 22
+	dba SpawnPlayer ; 22
 	dba RefreshPlayerCoords ; 23
 	dba DelayClearingOldSprites ; 24
 	dba DelayLoadingNewSprites ; 25
--- a/home/map_objects.asm
+++ b/home/map_objects.asm
@@ -1,6 +1,5 @@
 ; Functions handling map objects.
 
-
 GetSpritePalette:: ; 17ff
 	push hl
 	push de
@@ -16,7 +15,6 @@
 	ret
 ; 180e
 
-
 GetSpriteVTile:: ; 180e
 	push hl
 	push bc
@@ -77,8 +75,6 @@
 	ret
 ; 184a
 
-
-
 GetPlayerStandingTile:: ; 184a
 	ld a, [PlayerStandingTile]
 	call GetTileCollision
@@ -95,7 +91,6 @@
 	ret
 ; 185d
 
-
 GetTileCollision:: ; 185d
 ; Get the collision type of tile a.
 
@@ -123,7 +118,6 @@
 	ret
 ; 1875
 
-
 CheckGrassTile:: ; 1875
 	ld d, a
 	and $f0
@@ -222,7 +216,6 @@
 	ret
 ; 18d2
 
-
 GetMapObject:: ; 18d2
 ; Return the location of map object a in bc.
 	ld hl, MapObjects
@@ -233,7 +226,6 @@
 	ret
 ; 18de
 
-
 CheckObjectVisibility:: ; 18de
 ; Sets carry if the object is not visible on the screen.
 	ld [hMapObjectIndexBuffer], a
@@ -327,7 +319,7 @@
 	ret
 ; 194d
 
-Function194d:: ; 194d
+; XXX
 	ld [hMapObjectIndexBuffer], a
 	call GetMapObject
 	call CopyObjectStruct
@@ -334,8 +326,6 @@
 	ret
 ; 1956
 
-
-
 _CopyObjectStruct:: ; 1956
 	ld [hMapObjectIndexBuffer], a
 	call UnmaskObject
@@ -345,7 +335,7 @@
 	ret
 ; 1967
 
-Function1967:: ; 1967
+ApplyDeletionToMapObject:: ; 1967
 	ld [hMapObjectIndexBuffer], a
 	call GetMapObject
 	ld hl, MAPOBJECT_OBJECT_STRUCT_ID
@@ -355,14 +345,13 @@
 	ret z ; already hidden
 	ld [hl], -1
 	push af
-	call Function1985
+	call .CheckStopFollow
 	pop af
 	call GetObjectStruct
 	callba DeleteMapObject
 	ret
-; 1985
 
-Function1985:: ; 1985
+.CheckStopFollow
 	ld hl, wObjectFollow_Leader
 	cp [hl]
 	jr z, .ok
@@ -369,7 +358,6 @@
 	ld hl, wObjectFollow_Follower
 	cp [hl]
 	ret nz
-
 .ok
 	callba StopFollow
 	ld a, -1
@@ -379,12 +367,12 @@
 ; 199f
 
 DeleteObjectStruct:: ; 199f
-	call Function1967
+	call ApplyDeletionToMapObject
 	call MaskObject
 	ret
 ; 19a6
 
-Function19a6:: ; 19a6
+CopyPlayerObjectTemplate:: ; 19a6
 	push hl
 	call GetMapObject
 	ld d, b
@@ -398,7 +386,7 @@
 	ret
 ; 19b8
 
-Function19b8:: ; 19b8
+; XXX
 	call GetMapObject
 	ld hl, MAPOBJECT_OBJECT_STRUCT_ID
 	add hl, bc
@@ -428,8 +416,6 @@
 	ret
 ; 19e9
 
-
-
 LoadMovementDataPointer:: ; 19e9
 ; Load the movement data pointer for person a.
 	ld [wMovementPerson], a
@@ -457,8 +443,6 @@
 	ret
 ; 1a13
 
-
-
 FindFirstEmptyObjectStruct:: ; 1a13
 ; Returns the index of the first empty object struct in A and its address in HL, then sets carry.
 ; If all object structs are occupied, A = 0 and Z is set.
@@ -489,8 +473,6 @@
 	ret
 ; 1a2f
 
-
-
 GetSpriteMovementFunction:: ; 1a2f
 	ld hl, OBJECT_MOVEMENTTYPE
 	add hl, bc
@@ -530,7 +512,6 @@
 	ret
 ; 1a61
 
-
 CopySpriteMovementData:: ; 1a61
 	ld l, a
 	ld a, [hROMBank]
@@ -638,7 +619,6 @@
 	ret
 ; 1ad2
 
-
 UpdateSprites:: ; 1ad2
 	ld a, [VramState]
 	bit 0, a
@@ -649,7 +629,6 @@
 	ret
 ; 1ae5
 
-
 GetObjectStruct:: ; 1ae5
 	ld bc, OBJECT_STRUCT_LENGTH
 	ld hl, ObjectStructs
@@ -681,7 +660,6 @@
 	ld [hl], a
 	ret
 ; 1b07
-
 
 GetSpriteDirection:: ; 1b07
 	ld hl, OBJECT_FACING
--- a/main.asm
+++ b/main.asm
@@ -734,13 +734,13 @@
 	call SetPalettes
 	ret
 
-GetSpawnCoord: ; 8029
+SpawnPlayer: ; 8029
 	ld a, -1
 	ld [wObjectFollow_Leader], a
 	ld [wObjectFollow_Follower], a
 	ld a, $0
 	ld hl, PlayerObjectTemplate
-	call Function19a6
+	call CopyPlayerObjectTemplate
 	ld b, $0
 	call PlayerSpawn_ConvertCoords
 	ld a, $0