Fully label home/map_objects.asm

This commit is contained in:
PikalaxALT 2016-01-11 02:36:39 -05:00
parent 1637d915d4
commit 35f687b536
4 changed files with 11 additions and 33 deletions

View File

@ -318,7 +318,7 @@ InitializeNPCNames: ; 5ce9
InitializeWorld: ; 5d23
call ShrinkPlayer
callba GetSpawnCoord
callba SpawnPlayer
callba _InitializeStartDay
ret
; 5d33

View File

@ -272,7 +272,7 @@ MapSetupCommands: ; 15440
dba GetCoordOfUpperLeftCorner ; 1f
dba RestoreFacingAfterWarp ; 20
dba SpawnInFacingDown ; 21
dba GetSpawnCoord ; 22
dba SpawnPlayer ; 22
dba RefreshPlayerCoords ; 23
dba DelayClearingOldSprites ; 24
dba DelayLoadingNewSprites ; 25

View File

@ -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

View File

@ -734,13 +734,13 @@ BlankScreen: ; 8000
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