summaryrefslogtreecommitdiff
path: root/home/map_objects.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/map_objects.asm')
-rw-r--r--home/map_objects.asm36
1 files changed, 7 insertions, 29 deletions
diff --git a/home/map_objects.asm b/home/map_objects.asm
index cf2d0aea4..f4a4d6d5b 100644
--- 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 @@ GetSpritePalette:: ; 17ff
ret
; 180e
-
GetSpriteVTile:: ; 180e
push hl
push bc
@@ -77,8 +75,6 @@ DoesSpriteHaveFacings:: ; 1836
ret
; 184a
-
-
GetPlayerStandingTile:: ; 184a
ld a, [PlayerStandingTile]
call GetTileCollision
@@ -95,7 +91,6 @@ CheckOnWater:: ; 1852
ret
; 185d
-
GetTileCollision:: ; 185d
; Get the collision type of tile a.
@@ -123,7 +118,6 @@ GetTileCollision:: ; 185d
ret
; 1875
-
CheckGrassTile:: ; 1875
ld d, a
and $f0
@@ -222,7 +216,6 @@ CheckStandingOnEntrance:: ; 18c3
ret
; 18d2
-
GetMapObject:: ; 18d2
; Return the location of map object a in bc.
ld hl, MapObjects
@@ -233,7 +226,6 @@ GetMapObject:: ; 18d2
ret
; 18de
-
CheckObjectVisibility:: ; 18de
; Sets carry if the object is not visible on the screen.
ld [hMapObjectIndexBuffer], a
@@ -327,15 +319,13 @@ CheckObjectTime:: ; 18f5
ret
; 194d
-Function194d:: ; 194d
+; XXX
ld [hMapObjectIndexBuffer], a
call GetMapObject
call CopyObjectStruct
ret
; 1956
-
-
_CopyObjectStruct:: ; 1956
ld [hMapObjectIndexBuffer], a
call UnmaskObject
@@ -345,7 +335,7 @@ _CopyObjectStruct:: ; 1956
ret
; 1967
-Function1967:: ; 1967
+ApplyDeletionToMapObject:: ; 1967
ld [hMapObjectIndexBuffer], a
call GetMapObject
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
@@ -355,21 +345,19 @@ Function1967:: ; 1967
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
ld hl, wObjectFollow_Follower
cp [hl]
ret nz
-
.ok
callba StopFollow
ld a, -1
@@ -379,12 +367,12 @@ Function1985:: ; 1985
; 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 @@ Function19a6:: ; 19a6
ret
; 19b8
-Function19b8:: ; 19b8
+; XXX
call GetMapObject
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
add hl, bc
@@ -428,8 +416,6 @@ Function19b8:: ; 19b8
ret
; 19e9
-
-
LoadMovementDataPointer:: ; 19e9
; Load the movement data pointer for person a.
ld [wMovementPerson], a
@@ -457,8 +443,6 @@ LoadMovementDataPointer:: ; 19e9
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 @@ FindFirstEmptyObjectStruct:: ; 1a13
ret
; 1a2f
-
-
GetSpriteMovementFunction:: ; 1a2f
ld hl, OBJECT_MOVEMENTTYPE
add hl, bc
@@ -530,7 +512,6 @@ endr
ret
; 1a61
-
CopySpriteMovementData:: ; 1a61
ld l, a
ld a, [hROMBank]
@@ -638,7 +619,6 @@ ResetVramState_Bit0:: ; 1acc
ret
; 1ad2
-
UpdateSprites:: ; 1ad2
ld a, [VramState]
bit 0, a
@@ -649,7 +629,6 @@ UpdateSprites:: ; 1ad2
ret
; 1ae5
-
GetObjectStruct:: ; 1ae5
ld bc, OBJECT_STRUCT_LENGTH
ld hl, ObjectStructs
@@ -682,7 +661,6 @@ SetSpriteDirection:: ; 1af8
ret
; 1b07
-
GetSpriteDirection:: ; 1b07
ld hl, OBJECT_FACING
add hl, bc