mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Fully label home/map_objects.asm
This commit is contained in:
parent
1637d915d4
commit
35f687b536
@ -318,7 +318,7 @@ InitializeNPCNames: ; 5ce9
|
|||||||
|
|
||||||
InitializeWorld: ; 5d23
|
InitializeWorld: ; 5d23
|
||||||
call ShrinkPlayer
|
call ShrinkPlayer
|
||||||
callba GetSpawnCoord
|
callba SpawnPlayer
|
||||||
callba _InitializeStartDay
|
callba _InitializeStartDay
|
||||||
ret
|
ret
|
||||||
; 5d33
|
; 5d33
|
||||||
|
@ -272,7 +272,7 @@ MapSetupCommands: ; 15440
|
|||||||
dba GetCoordOfUpperLeftCorner ; 1f
|
dba GetCoordOfUpperLeftCorner ; 1f
|
||||||
dba RestoreFacingAfterWarp ; 20
|
dba RestoreFacingAfterWarp ; 20
|
||||||
dba SpawnInFacingDown ; 21
|
dba SpawnInFacingDown ; 21
|
||||||
dba GetSpawnCoord ; 22
|
dba SpawnPlayer ; 22
|
||||||
dba RefreshPlayerCoords ; 23
|
dba RefreshPlayerCoords ; 23
|
||||||
dba DelayClearingOldSprites ; 24
|
dba DelayClearingOldSprites ; 24
|
||||||
dba DelayLoadingNewSprites ; 25
|
dba DelayLoadingNewSprites ; 25
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
; Functions handling map objects.
|
; Functions handling map objects.
|
||||||
|
|
||||||
|
|
||||||
GetSpritePalette:: ; 17ff
|
GetSpritePalette:: ; 17ff
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
@ -16,7 +15,6 @@ GetSpritePalette:: ; 17ff
|
|||||||
ret
|
ret
|
||||||
; 180e
|
; 180e
|
||||||
|
|
||||||
|
|
||||||
GetSpriteVTile:: ; 180e
|
GetSpriteVTile:: ; 180e
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
@ -77,8 +75,6 @@ DoesSpriteHaveFacings:: ; 1836
|
|||||||
ret
|
ret
|
||||||
; 184a
|
; 184a
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GetPlayerStandingTile:: ; 184a
|
GetPlayerStandingTile:: ; 184a
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerStandingTile]
|
||||||
call GetTileCollision
|
call GetTileCollision
|
||||||
@ -95,7 +91,6 @@ CheckOnWater:: ; 1852
|
|||||||
ret
|
ret
|
||||||
; 185d
|
; 185d
|
||||||
|
|
||||||
|
|
||||||
GetTileCollision:: ; 185d
|
GetTileCollision:: ; 185d
|
||||||
; Get the collision type of tile a.
|
; Get the collision type of tile a.
|
||||||
|
|
||||||
@ -123,7 +118,6 @@ GetTileCollision:: ; 185d
|
|||||||
ret
|
ret
|
||||||
; 1875
|
; 1875
|
||||||
|
|
||||||
|
|
||||||
CheckGrassTile:: ; 1875
|
CheckGrassTile:: ; 1875
|
||||||
ld d, a
|
ld d, a
|
||||||
and $f0
|
and $f0
|
||||||
@ -222,7 +216,6 @@ CheckStandingOnEntrance:: ; 18c3
|
|||||||
ret
|
ret
|
||||||
; 18d2
|
; 18d2
|
||||||
|
|
||||||
|
|
||||||
GetMapObject:: ; 18d2
|
GetMapObject:: ; 18d2
|
||||||
; Return the location of map object a in bc.
|
; Return the location of map object a in bc.
|
||||||
ld hl, MapObjects
|
ld hl, MapObjects
|
||||||
@ -233,7 +226,6 @@ GetMapObject:: ; 18d2
|
|||||||
ret
|
ret
|
||||||
; 18de
|
; 18de
|
||||||
|
|
||||||
|
|
||||||
CheckObjectVisibility:: ; 18de
|
CheckObjectVisibility:: ; 18de
|
||||||
; Sets carry if the object is not visible on the screen.
|
; Sets carry if the object is not visible on the screen.
|
||||||
ld [hMapObjectIndexBuffer], a
|
ld [hMapObjectIndexBuffer], a
|
||||||
@ -327,15 +319,13 @@ CheckObjectTime:: ; 18f5
|
|||||||
ret
|
ret
|
||||||
; 194d
|
; 194d
|
||||||
|
|
||||||
Function194d:: ; 194d
|
; XXX
|
||||||
ld [hMapObjectIndexBuffer], a
|
ld [hMapObjectIndexBuffer], a
|
||||||
call GetMapObject
|
call GetMapObject
|
||||||
call CopyObjectStruct
|
call CopyObjectStruct
|
||||||
ret
|
ret
|
||||||
; 1956
|
; 1956
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_CopyObjectStruct:: ; 1956
|
_CopyObjectStruct:: ; 1956
|
||||||
ld [hMapObjectIndexBuffer], a
|
ld [hMapObjectIndexBuffer], a
|
||||||
call UnmaskObject
|
call UnmaskObject
|
||||||
@ -345,7 +335,7 @@ _CopyObjectStruct:: ; 1956
|
|||||||
ret
|
ret
|
||||||
; 1967
|
; 1967
|
||||||
|
|
||||||
Function1967:: ; 1967
|
ApplyDeletionToMapObject:: ; 1967
|
||||||
ld [hMapObjectIndexBuffer], a
|
ld [hMapObjectIndexBuffer], a
|
||||||
call GetMapObject
|
call GetMapObject
|
||||||
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
|
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
|
||||||
@ -355,21 +345,19 @@ Function1967:: ; 1967
|
|||||||
ret z ; already hidden
|
ret z ; already hidden
|
||||||
ld [hl], -1
|
ld [hl], -1
|
||||||
push af
|
push af
|
||||||
call Function1985
|
call .CheckStopFollow
|
||||||
pop af
|
pop af
|
||||||
call GetObjectStruct
|
call GetObjectStruct
|
||||||
callba DeleteMapObject
|
callba DeleteMapObject
|
||||||
ret
|
ret
|
||||||
; 1985
|
|
||||||
|
|
||||||
Function1985:: ; 1985
|
.CheckStopFollow
|
||||||
ld hl, wObjectFollow_Leader
|
ld hl, wObjectFollow_Leader
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
ld hl, wObjectFollow_Follower
|
ld hl, wObjectFollow_Follower
|
||||||
cp [hl]
|
cp [hl]
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
.ok
|
.ok
|
||||||
callba StopFollow
|
callba StopFollow
|
||||||
ld a, -1
|
ld a, -1
|
||||||
@ -379,12 +367,12 @@ Function1985:: ; 1985
|
|||||||
; 199f
|
; 199f
|
||||||
|
|
||||||
DeleteObjectStruct:: ; 199f
|
DeleteObjectStruct:: ; 199f
|
||||||
call Function1967
|
call ApplyDeletionToMapObject
|
||||||
call MaskObject
|
call MaskObject
|
||||||
ret
|
ret
|
||||||
; 19a6
|
; 19a6
|
||||||
|
|
||||||
Function19a6:: ; 19a6
|
CopyPlayerObjectTemplate:: ; 19a6
|
||||||
push hl
|
push hl
|
||||||
call GetMapObject
|
call GetMapObject
|
||||||
ld d, b
|
ld d, b
|
||||||
@ -398,7 +386,7 @@ Function19a6:: ; 19a6
|
|||||||
ret
|
ret
|
||||||
; 19b8
|
; 19b8
|
||||||
|
|
||||||
Function19b8:: ; 19b8
|
; XXX
|
||||||
call GetMapObject
|
call GetMapObject
|
||||||
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
|
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -428,8 +416,6 @@ Function19b8:: ; 19b8
|
|||||||
ret
|
ret
|
||||||
; 19e9
|
; 19e9
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LoadMovementDataPointer:: ; 19e9
|
LoadMovementDataPointer:: ; 19e9
|
||||||
; Load the movement data pointer for person a.
|
; Load the movement data pointer for person a.
|
||||||
ld [wMovementPerson], a
|
ld [wMovementPerson], a
|
||||||
@ -457,8 +443,6 @@ LoadMovementDataPointer:: ; 19e9
|
|||||||
ret
|
ret
|
||||||
; 1a13
|
; 1a13
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FindFirstEmptyObjectStruct:: ; 1a13
|
FindFirstEmptyObjectStruct:: ; 1a13
|
||||||
; Returns the index of the first empty object struct in A and its address in HL, then sets carry.
|
; 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.
|
; If all object structs are occupied, A = 0 and Z is set.
|
||||||
@ -489,8 +473,6 @@ FindFirstEmptyObjectStruct:: ; 1a13
|
|||||||
ret
|
ret
|
||||||
; 1a2f
|
; 1a2f
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GetSpriteMovementFunction:: ; 1a2f
|
GetSpriteMovementFunction:: ; 1a2f
|
||||||
ld hl, OBJECT_MOVEMENTTYPE
|
ld hl, OBJECT_MOVEMENTTYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -530,7 +512,6 @@ endr
|
|||||||
ret
|
ret
|
||||||
; 1a61
|
; 1a61
|
||||||
|
|
||||||
|
|
||||||
CopySpriteMovementData:: ; 1a61
|
CopySpriteMovementData:: ; 1a61
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
@ -638,7 +619,6 @@ ResetVramState_Bit0:: ; 1acc
|
|||||||
ret
|
ret
|
||||||
; 1ad2
|
; 1ad2
|
||||||
|
|
||||||
|
|
||||||
UpdateSprites:: ; 1ad2
|
UpdateSprites:: ; 1ad2
|
||||||
ld a, [VramState]
|
ld a, [VramState]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
@ -649,7 +629,6 @@ UpdateSprites:: ; 1ad2
|
|||||||
ret
|
ret
|
||||||
; 1ae5
|
; 1ae5
|
||||||
|
|
||||||
|
|
||||||
GetObjectStruct:: ; 1ae5
|
GetObjectStruct:: ; 1ae5
|
||||||
ld bc, OBJECT_STRUCT_LENGTH
|
ld bc, OBJECT_STRUCT_LENGTH
|
||||||
ld hl, ObjectStructs
|
ld hl, ObjectStructs
|
||||||
@ -682,7 +661,6 @@ SetSpriteDirection:: ; 1af8
|
|||||||
ret
|
ret
|
||||||
; 1b07
|
; 1b07
|
||||||
|
|
||||||
|
|
||||||
GetSpriteDirection:: ; 1b07
|
GetSpriteDirection:: ; 1b07
|
||||||
ld hl, OBJECT_FACING
|
ld hl, OBJECT_FACING
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
4
main.asm
4
main.asm
@ -734,13 +734,13 @@ BlankScreen: ; 8000
|
|||||||
call SetPalettes
|
call SetPalettes
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetSpawnCoord: ; 8029
|
SpawnPlayer: ; 8029
|
||||||
ld a, -1
|
ld a, -1
|
||||||
ld [wObjectFollow_Leader], a
|
ld [wObjectFollow_Leader], a
|
||||||
ld [wObjectFollow_Follower], a
|
ld [wObjectFollow_Follower], a
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld hl, PlayerObjectTemplate
|
ld hl, PlayerObjectTemplate
|
||||||
call Function19a6
|
call CopyPlayerObjectTemplate
|
||||||
ld b, $0
|
ld b, $0
|
||||||
call PlayerSpawn_ConvertCoords
|
call PlayerSpawn_ConvertCoords
|
||||||
ld a, $0
|
ld a, $0
|
||||||
|
Loading…
Reference in New Issue
Block a user