mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Remove "Buffer" suffix from two HRAM labels
This commit is contained in:
parent
99e66c2557
commit
5db892782a
@ -3063,7 +3063,7 @@ MonFaintedAnimation:
|
|||||||
db " @"
|
db " @"
|
||||||
|
|
||||||
SlideBattlePicOut:
|
SlideBattlePicOut:
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ld c, a
|
ld c, a
|
||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
@ -3086,7 +3086,7 @@ SlideBattlePicOut:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.DoFrame:
|
.DoFrame:
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld c, a
|
ld c, a
|
||||||
cp $8
|
cp $8
|
||||||
jr nz, .back
|
jr nz, .back
|
||||||
@ -9034,7 +9034,7 @@ CopyBackpic:
|
|||||||
.LoadTrainerBackpicAsOAM:
|
.LoadTrainerBackpicAsOAM:
|
||||||
ld hl, wVirtualOAMSprite00
|
ld hl, wVirtualOAMSprite00
|
||||||
xor a
|
xor a
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ld b, 6
|
ld b, 6
|
||||||
ld e, (SCREEN_WIDTH + 1) * TILE_WIDTH
|
ld e, (SCREEN_WIDTH + 1) * TILE_WIDTH
|
||||||
.outer_loop
|
.outer_loop
|
||||||
@ -9045,10 +9045,10 @@ CopyBackpic:
|
|||||||
inc hl
|
inc hl
|
||||||
ld [hl], e ; x
|
ld [hl], e ; x
|
||||||
inc hl
|
inc hl
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld [hli], a ; tile id
|
ld [hli], a ; tile id
|
||||||
inc a
|
inc a
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ld a, PAL_BATTLE_OB_PLAYER
|
ld a, PAL_BATTLE_OB_PLAYER
|
||||||
ld [hli], a ; attributes
|
ld [hli], a ; attributes
|
||||||
ld a, d
|
ld a, d
|
||||||
@ -9056,9 +9056,9 @@ CopyBackpic:
|
|||||||
ld d, a
|
ld d, a
|
||||||
dec c
|
dec c
|
||||||
jr nz, .inner_loop
|
jr nz, .inner_loop
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
add $3
|
add $3
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ld a, e
|
ld a, e
|
||||||
add 1 * TILE_WIDTH
|
add 1 * TILE_WIDTH
|
||||||
ld e, a
|
ld e, a
|
||||||
|
@ -1339,7 +1339,7 @@ GetFacingObject:
|
|||||||
farcall CheckFacingObject
|
farcall CheckFacingObject
|
||||||
jr nc, .fail
|
jr nc, .fail
|
||||||
|
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
call GetObjectStruct
|
call GetObjectStruct
|
||||||
ld hl, OBJECT_MAP_OBJECT_INDEX
|
ld hl, OBJECT_MAP_OBJECT_INDEX
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
@ -415,11 +415,11 @@ PadAttrmapForHDMATransfer:
|
|||||||
|
|
||||||
PadMapForHDMATransfer:
|
PadMapForHDMATransfer:
|
||||||
; pad a 20x18 map to 32x18 for HDMA transfer
|
; pad a 20x18 map to 32x18 for HDMA transfer
|
||||||
; back up the padding value in c to hMapObjectIndexBuffer
|
; back up the padding value in c to hMapObjectIndex
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
push af
|
push af
|
||||||
ld a, c
|
ld a, c
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
|
|
||||||
; for each row on the screen
|
; for each row on the screen
|
||||||
ld c, SCREEN_HEIGHT
|
ld c, SCREEN_HEIGHT
|
||||||
@ -435,7 +435,7 @@ PadMapForHDMATransfer:
|
|||||||
jr nz, .loop2
|
jr nz, .loop2
|
||||||
|
|
||||||
; load the original padding value of c into hl for 32 - 20 = 12 rows
|
; load the original padding value of c into hl for 32 - 20 = 12 rows
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld b, BG_MAP_WIDTH - SCREEN_WIDTH
|
ld b, BG_MAP_WIDTH - SCREEN_WIDTH
|
||||||
.loop3
|
.loop3
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -445,9 +445,9 @@ PadMapForHDMATransfer:
|
|||||||
dec c
|
dec c
|
||||||
jr nz, .loop1
|
jr nz, .loop1
|
||||||
|
|
||||||
; restore the original value of hMapObjectIndexBuffer
|
; restore the original value of hMapObjectIndex
|
||||||
pop af
|
pop af
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
HDMATransfer2bpp::
|
HDMATransfer2bpp::
|
||||||
|
@ -51,7 +51,7 @@ Unused_GetPartyMenuMonIcon:
|
|||||||
|
|
||||||
.GetPartyMonItemGFX:
|
.GetPartyMonItemGFX:
|
||||||
push bc
|
push bc
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
ld hl, wPartyMon1Item
|
ld hl, wPartyMon1Item
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
@ -125,7 +125,7 @@ PartyMenu_InitAnimatedMonIcon:
|
|||||||
|
|
||||||
.SpawnItemIcon:
|
.SpawnItemIcon:
|
||||||
push bc
|
push bc
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
ld hl, wPartyMon1Item
|
ld hl, wPartyMon1Item
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
@ -154,7 +154,7 @@ PartyMenu_InitAnimatedMonIcon:
|
|||||||
InitPartyMenuIcon:
|
InitPartyMenuIcon:
|
||||||
ld a, [wCurIconTile]
|
ld a, [wCurIconTile]
|
||||||
push af
|
push af
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
ld hl, wPartySpecies
|
ld hl, wPartySpecies
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
@ -163,7 +163,7 @@ InitPartyMenuIcon:
|
|||||||
call ReadMonMenuIcon
|
call ReadMonMenuIcon
|
||||||
ld [wCurIcon], a
|
ld [wCurIcon], a
|
||||||
call GetMemIconGFX
|
call GetMemIconGFX
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
; y coord
|
; y coord
|
||||||
add a
|
add a
|
||||||
add a
|
add a
|
||||||
@ -184,7 +184,7 @@ InitPartyMenuIcon:
|
|||||||
|
|
||||||
SetPartyMonIconAnimSpeed:
|
SetPartyMonIconAnimSpeed:
|
||||||
push bc
|
push bc
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
ld b, a
|
ld b, a
|
||||||
call .getspeed
|
call .getspeed
|
||||||
ld a, b
|
ld a, b
|
||||||
|
@ -14,7 +14,7 @@ HandleCmdQueue::
|
|||||||
ld hl, wCmdQueue
|
ld hl, wCmdQueue
|
||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .skip
|
jr z, .skip
|
||||||
@ -27,7 +27,7 @@ HandleCmdQueue::
|
|||||||
.skip
|
.skip
|
||||||
ld de, CMDQUEUE_ENTRY_SIZE
|
ld de, CMDQUEUE_ENTRY_SIZE
|
||||||
add hl, de
|
add hl, de
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
inc a
|
inc a
|
||||||
cp CMDQUEUE_CAPACITY
|
cp CMDQUEUE_CAPACITY
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
@ -540,7 +540,7 @@ TryObjectEvent:
|
|||||||
|
|
||||||
.IsObject:
|
.IsObject:
|
||||||
call PlayTalkObject
|
call PlayTalkObject
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
call GetObjectStruct
|
call GetObjectStruct
|
||||||
ld hl, OBJECT_MAP_OBJECT_INDEX
|
ld hl, OBJECT_MAP_OBJECT_INDEX
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
@ -1040,7 +1040,7 @@ _RandomWalkContinue:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_ACTION_STEP
|
ld [hl], OBJECT_ACTION_STEP
|
||||||
ld hl, wCenteredObject
|
ld hl, wCenteredObject
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .centered
|
jr z, .centered
|
||||||
ld hl, OBJECT_STEP_TYPE
|
ld hl, OBJECT_STEP_TYPE
|
||||||
@ -1945,7 +1945,7 @@ ApplyMovementToFollower:
|
|||||||
ret z
|
ret z
|
||||||
ld a, [wObjectFollow_Leader]
|
ld a, [wObjectFollow_Leader]
|
||||||
ld d, a
|
ld d, a
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
cp d
|
cp d
|
||||||
ret nz
|
ret nz
|
||||||
ld a, e
|
ld a, e
|
||||||
@ -2085,7 +2085,7 @@ ShakeScreen:
|
|||||||
|
|
||||||
DespawnEmote:
|
DespawnEmote:
|
||||||
push bc
|
push bc
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld c, a
|
ld c, a
|
||||||
call .DeleteEmote
|
call .DeleteEmote
|
||||||
pop bc
|
pop bc
|
||||||
@ -2130,7 +2130,7 @@ InitTempObject:
|
|||||||
|
|
||||||
CopyTempObjectData:
|
CopyTempObjectData:
|
||||||
; load into wTempObjectCopy:
|
; load into wTempObjectCopy:
|
||||||
; -1, -1, [de], [de + 1], [de + 2], [hMapObjectIndexBuffer], [NextMapX], [NextMapY], -1
|
; -1, -1, [de], [de + 1], [de + 2], [hMapObjectIndex], [NextMapX], [NextMapY], -1
|
||||||
; This spawns the object at the same place as whichever object is loaded into bc.
|
; This spawns the object at the same place as whichever object is loaded into bc.
|
||||||
ld hl, wTempObjectCopyMapObjectIndex
|
ld hl, wTempObjectCopyMapObjectIndex
|
||||||
ld [hl], -1
|
ld [hl], -1
|
||||||
@ -2145,7 +2145,7 @@ CopyTempObjectData:
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
push hl
|
push hl
|
||||||
ld hl, OBJECT_NEXT_MAP_X
|
ld hl, OBJECT_NEXT_MAP_X
|
||||||
@ -2169,7 +2169,7 @@ UpdateAllObjectsFrozen::
|
|||||||
ld bc, wObjectStructs
|
ld bc, wObjectStructs
|
||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
call DoesObjectHaveASprite
|
call DoesObjectHaveASprite
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
call UpdateObjectFrozen
|
call UpdateObjectFrozen
|
||||||
@ -2178,7 +2178,7 @@ UpdateAllObjectsFrozen::
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
inc a
|
inc a
|
||||||
cp NUM_OBJECT_STRUCTS
|
cp NUM_OBJECT_STRUCTS
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
@ -2228,13 +2228,13 @@ HideAllObjects:
|
|||||||
xor a
|
xor a
|
||||||
ld bc, wObjectStructs
|
ld bc, wObjectStructs
|
||||||
.loop
|
.loop
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
call SetFacing_Standing
|
call SetFacing_Standing
|
||||||
ld hl, OBJECT_LENGTH
|
ld hl, OBJECT_LENGTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
inc a
|
inc a
|
||||||
cp NUM_OBJECT_STRUCTS
|
cp NUM_OBJECT_STRUCTS
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
@ -2452,7 +2452,7 @@ DoStepsForAllObjects:
|
|||||||
ld bc, wObjectStructs
|
ld bc, wObjectStructs
|
||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
call DoesObjectHaveASprite
|
call DoesObjectHaveASprite
|
||||||
jr z, .next
|
jr z, .next
|
||||||
call HandleObjectStep
|
call HandleObjectStep
|
||||||
@ -2461,7 +2461,7 @@ DoStepsForAllObjects:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
inc a
|
inc a
|
||||||
cp NUM_OBJECT_STRUCTS
|
cp NUM_OBJECT_STRUCTS
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
@ -2545,7 +2545,7 @@ StartFollow::
|
|||||||
SetLeaderIfVisible:
|
SetLeaderIfVisible:
|
||||||
call CheckObjectVisibility
|
call CheckObjectVisibility
|
||||||
ret c
|
ret c
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
ld [wObjectFollow_Leader], a
|
ld [wObjectFollow_Leader], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2571,7 +2571,7 @@ SetFollowerIfVisible:
|
|||||||
ld hl, OBJECT_STEP_TYPE
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], STEP_TYPE_RESET
|
ld [hl], STEP_TYPE_RESET
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
ld [wObjectFollow_Follower], a
|
ld [wObjectFollow_Follower], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ Movement_48:
|
|||||||
Movement_remove_object:
|
Movement_remove_object:
|
||||||
call DeleteMapObject
|
call DeleteMapObject
|
||||||
ld hl, wObjectFollow_Leader
|
ld hl, wObjectFollow_Leader
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr nz, .not_leading
|
jr nz, .not_leading
|
||||||
ld [hl], -1
|
ld [hl], -1
|
||||||
@ -680,7 +680,7 @@ NormalStep:
|
|||||||
|
|
||||||
.skip_grass
|
.skip_grass
|
||||||
ld hl, wCenteredObject
|
ld hl, wCenteredObject
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
@ -704,7 +704,7 @@ TurningStep:
|
|||||||
ld [hl], OBJECT_ACTION_SPIN
|
ld [hl], OBJECT_ACTION_SPIN
|
||||||
|
|
||||||
ld hl, wCenteredObject
|
ld hl, wCenteredObject
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
@ -728,7 +728,7 @@ SlideStep:
|
|||||||
ld [hl], OBJECT_ACTION_STAND
|
ld [hl], OBJECT_ACTION_STAND
|
||||||
|
|
||||||
ld hl, wCenteredObject
|
ld hl, wCenteredObject
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
@ -760,7 +760,7 @@ JumpStep:
|
|||||||
call SpawnShadow
|
call SpawnShadow
|
||||||
|
|
||||||
ld hl, wCenteredObject
|
ld hl, wCenteredObject
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ CheckFacingObject::
|
|||||||
.not_counter
|
.not_counter
|
||||||
ld bc, wObjectStructs ; redundant
|
ld bc, wObjectStructs ; redundant
|
||||||
ld a, 0
|
ld a, 0
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
call IsNPCAtCoord
|
call IsNPCAtCoord
|
||||||
ret nc
|
ret nc
|
||||||
ld hl, OBJECT_DIRECTION_WALKING
|
ld hl, OBJECT_DIRECTION_WALKING
|
||||||
@ -275,7 +275,7 @@ WillObjectBumpIntoSomeoneElse:
|
|||||||
jr IsNPCAtCoord
|
jr IsNPCAtCoord
|
||||||
|
|
||||||
IsObjectFacingSomeoneElse: ; unreferenced
|
IsObjectFacingSomeoneElse: ; unreferenced
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
call GetObjectStruct
|
call GetObjectStruct
|
||||||
call .GetFacingCoords
|
call .GetFacingCoords
|
||||||
call IsNPCAtCoord
|
call IsNPCAtCoord
|
||||||
@ -315,7 +315,7 @@ IsNPCAtCoord:
|
|||||||
ld bc, wObjectStructs
|
ld bc, wObjectStructs
|
||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
call DoesObjectHaveASprite
|
call DoesObjectHaveASprite
|
||||||
jr z, .next
|
jr z, .next
|
||||||
|
|
||||||
@ -345,9 +345,9 @@ IsNPCAtCoord:
|
|||||||
jr nz, .check_current_coords
|
jr nz, .check_current_coords
|
||||||
|
|
||||||
.continue
|
.continue
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld l, a
|
ld l, a
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
cp l
|
cp l
|
||||||
jr nz, .yes
|
jr nz, .yes
|
||||||
|
|
||||||
@ -362,9 +362,9 @@ IsNPCAtCoord:
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp e
|
cp e
|
||||||
jr nz, .next
|
jr nz, .next
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld l, a
|
ld l, a
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
cp l
|
cp l
|
||||||
jr nz, .yes
|
jr nz, .yes
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ IsNPCAtCoord:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
inc a
|
inc a
|
||||||
cp NUM_OBJECT_STRUCTS
|
cp NUM_OBJECT_STRUCTS
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
@ -481,7 +481,7 @@ IsNPCAtPlayerCoord: ; unreferenced
|
|||||||
ld bc, wObjectStructs
|
ld bc, wObjectStructs
|
||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
call DoesObjectHaveASprite
|
call DoesObjectHaveASprite
|
||||||
jr z, .next
|
jr z, .next
|
||||||
|
|
||||||
@ -505,7 +505,7 @@ IsNPCAtPlayerCoord: ; unreferenced
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp d
|
cp d
|
||||||
jr nz, .check_current_coords
|
jr nz, .check_current_coords
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
cp PLAYER_OBJECT
|
cp PLAYER_OBJECT
|
||||||
jr z, .next
|
jr z, .next
|
||||||
jr .yes
|
jr .yes
|
||||||
@ -528,7 +528,7 @@ IsNPCAtPlayerCoord: ; unreferenced
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
inc a
|
inc a
|
||||||
cp NUM_OBJECT_STRUCTS
|
cp NUM_OBJECT_STRUCTS
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
@ -621,7 +621,7 @@ ENDM
|
|||||||
; Returns 1 if there is no NPC in front
|
; Returns 1 if there is no NPC in front
|
||||||
; Returns 2 if there is a movable NPC in front
|
; Returns 2 if there is a movable NPC in front
|
||||||
ld a, 0
|
ld a, 0
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
; Load the next X coordinate into d
|
; Load the next X coordinate into d
|
||||||
ld a, [wPlayerStandingMapX]
|
ld a, [wPlayerStandingMapX]
|
||||||
ld d, a
|
ld d, a
|
||||||
|
@ -41,10 +41,10 @@ SpawnPlayer:
|
|||||||
.ok
|
.ok
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
ld a, PLAYER_OBJECT
|
ld a, PLAYER_OBJECT
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ld bc, wMapObjects
|
ld bc, wMapObjects
|
||||||
ld a, PLAYER_OBJECT
|
ld a, PLAYER_OBJECT
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
ld de, wObjectStructs
|
ld de, wObjectStructs
|
||||||
call CopyMapObjectToObjectStruct
|
call CopyMapObjectToObjectStruct
|
||||||
ld a, PLAYER
|
ld a, PLAYER
|
||||||
@ -94,7 +94,7 @@ WriteObjectXY::
|
|||||||
ld hl, OBJECT_NEXT_MAP_Y
|
ld hl, OBJECT_NEXT_MAP_Y
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld b, a
|
ld b, a
|
||||||
call CopyDECoordsToMapObject
|
call CopyDECoordsToMapObject
|
||||||
and a
|
and a
|
||||||
@ -138,12 +138,12 @@ CopyObjectStruct::
|
|||||||
ld a, 1
|
ld a, 1
|
||||||
ld de, OBJECT_LENGTH
|
ld de, OBJECT_LENGTH
|
||||||
.loop
|
.loop
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .done
|
jr z, .done
|
||||||
add hl, de
|
add hl, de
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
inc a
|
inc a
|
||||||
cp NUM_OBJECT_STRUCTS
|
cp NUM_OBJECT_STRUCTS
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
@ -169,12 +169,12 @@ CopyMapObjectToObjectStruct:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.CopyMapObjectToTempObject:
|
.CopyMapObjectToTempObject:
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
|
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld [wTempObjectCopyMapObjectIndex], a
|
ld [wTempObjectCopyMapObjectIndex], a
|
||||||
|
|
||||||
ld hl, MAPOBJECT_SPRITE
|
ld hl, MAPOBJECT_SPRITE
|
||||||
@ -229,7 +229,7 @@ InitializeVisibleSprites:
|
|||||||
ld bc, wMap1Object
|
ld bc, wMap1Object
|
||||||
ld a, 1
|
ld a, 1
|
||||||
.loop
|
.loop
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ld hl, MAPOBJECT_SPRITE
|
ld hl, MAPOBJECT_SPRITE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -277,7 +277,7 @@ InitializeVisibleSprites:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
inc a
|
inc a
|
||||||
cp NUM_OBJECTS
|
cp NUM_OBJECTS
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
@ -316,7 +316,7 @@ CheckObjectEnteringVisibleRange::
|
|||||||
ld bc, wMap1Object
|
ld bc, wMap1Object
|
||||||
ld a, 1
|
ld a, 1
|
||||||
.loop_v
|
.loop_v
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ld hl, MAPOBJECT_SPRITE
|
ld hl, MAPOBJECT_SPRITE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -351,7 +351,7 @@ CheckObjectEnteringVisibleRange::
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
inc a
|
inc a
|
||||||
cp NUM_OBJECTS
|
cp NUM_OBJECTS
|
||||||
jr nz, .loop_v
|
jr nz, .loop_v
|
||||||
@ -372,7 +372,7 @@ CheckObjectEnteringVisibleRange::
|
|||||||
ld bc, wMap1Object
|
ld bc, wMap1Object
|
||||||
ld a, 1
|
ld a, 1
|
||||||
.loop_h
|
.loop_h
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ld hl, MAPOBJECT_SPRITE
|
ld hl, MAPOBJECT_SPRITE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -407,7 +407,7 @@ CheckObjectEnteringVisibleRange::
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
inc a
|
inc a
|
||||||
cp NUM_OBJECTS
|
cp NUM_OBJECTS
|
||||||
jr nz, .loop_h
|
jr nz, .loop_h
|
||||||
@ -680,7 +680,7 @@ FollowNotExact::
|
|||||||
ld hl, OBJECT_SPRITE_Y
|
ld hl, OBJECT_SPRITE_Y
|
||||||
add hl, de
|
add hl, de
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
ld hl, OBJECT_RANGE
|
ld hl, OBJECT_RANGE
|
||||||
add hl, de
|
add hl, de
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
@ -962,7 +962,7 @@ Script_appear:
|
|||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
call GetScriptObject
|
call GetScriptObject
|
||||||
call UnmaskCopyMapObjectStruct
|
call UnmaskCopyMapObjectStruct
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld b, 0 ; clear
|
ld b, 0 ; clear
|
||||||
call ApplyEventActionAppearDisappear
|
call ApplyEventActionAppearDisappear
|
||||||
ret
|
ret
|
||||||
@ -975,7 +975,7 @@ Script_disappear:
|
|||||||
ldh a, [hLastTalked]
|
ldh a, [hLastTalked]
|
||||||
.ok
|
.ok
|
||||||
call DeleteObjectStruct
|
call DeleteObjectStruct
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld b, 1 ; set
|
ld b, 1 ; set
|
||||||
call ApplyEventActionAppearDisappear
|
call ApplyEventActionAppearDisappear
|
||||||
farcall _UpdateSprites
|
farcall _UpdateSprites
|
||||||
|
@ -590,7 +590,7 @@ InitPartyMenuGFX:
|
|||||||
ret z
|
ret z
|
||||||
ld c, a
|
ld c, a
|
||||||
xor a
|
xor a
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
@ -598,9 +598,9 @@ InitPartyMenuGFX:
|
|||||||
ld a, BANK(LoadMenuMonIcon)
|
ld a, BANK(LoadMenuMonIcon)
|
||||||
ld e, MONICON_PARTYMENU
|
ld e, MONICON_PARTYMENU
|
||||||
rst FarCall
|
rst FarCall
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
inc a
|
inc a
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
dec c
|
dec c
|
||||||
|
@ -346,14 +346,14 @@ WaitPressAorB_BlinkCursor::
|
|||||||
;
|
;
|
||||||
; NOTE: The cursor has to be shown before calling
|
; NOTE: The cursor has to be shown before calling
|
||||||
; this function or no cursor will be shown at all.
|
; this function or no cursor will be shown at all.
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
push af
|
push af
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ld a, 6
|
ld a, 6
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
push hl
|
push hl
|
||||||
@ -367,9 +367,9 @@ WaitPressAorB_BlinkCursor::
|
|||||||
jr z, .loop
|
jr z, .loop
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
pop af
|
pop af
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SimpleWaitPressAorB::
|
SimpleWaitPressAorB::
|
||||||
@ -447,37 +447,37 @@ BlinkCursor::
|
|||||||
cp b
|
cp b
|
||||||
pop bc
|
pop bc
|
||||||
jr nz, .place_arrow
|
jr nz, .place_arrow
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
dec a
|
dec a
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ret nz
|
ret nz
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
dec a
|
dec a
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, "─"
|
ld a, "─"
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld a, -1
|
ld a, -1
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ld a, 6
|
ld a, 6
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.place_arrow
|
.place_arrow
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
dec a
|
dec a
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ret nz
|
ret nz
|
||||||
dec a
|
dec a
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
dec a
|
dec a
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, 6
|
ld a, 6
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
ld a, "▼"
|
ld a, "▼"
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
|
10
home/map.asm
10
home/map.asm
@ -1124,7 +1124,7 @@ CoordinatesEventText::
|
|||||||
text_end
|
text_end
|
||||||
|
|
||||||
CheckObjectMask::
|
CheckObjectMask::
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, wObjectMasks
|
ld hl, wObjectMasks
|
||||||
@ -1133,7 +1133,7 @@ CheckObjectMask::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
MaskObject::
|
MaskObject::
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, wObjectMasks
|
ld hl, wObjectMasks
|
||||||
@ -1142,7 +1142,7 @@ MaskObject::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
UnmaskObject::
|
UnmaskObject::
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, wObjectMasks
|
ld hl, wObjectMasks
|
||||||
@ -1433,7 +1433,7 @@ SaveScreen::
|
|||||||
ld de, wScreenSave
|
ld de, wScreenSave
|
||||||
ld a, [wMapWidth]
|
ld a, [wMapWidth]
|
||||||
add 6
|
add 6
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
ld a, [wPlayerStepDirection]
|
ld a, [wPlayerStepDirection]
|
||||||
and a
|
and a
|
||||||
jr z, .down
|
jr z, .down
|
||||||
@ -1447,7 +1447,7 @@ SaveScreen::
|
|||||||
|
|
||||||
.up
|
.up
|
||||||
ld de, wScreenSave + SCREEN_META_WIDTH
|
ld de, wScreenSave + SCREEN_META_WIDTH
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
@ -20,7 +20,7 @@ GetSpriteVTile::
|
|||||||
ld hl, wUsedSprites + 2
|
ld hl, wUsedSprites + 2
|
||||||
ld c, SPRITE_GFX_LIST_CAPACITY - 1
|
ld c, SPRITE_GFX_LIST_CAPACITY - 1
|
||||||
ld b, a
|
ld b, a
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
cp 0
|
cp 0
|
||||||
jr z, .nope
|
jr z, .nope
|
||||||
ld a, b
|
ld a, b
|
||||||
@ -210,14 +210,14 @@ GetMapObject::
|
|||||||
|
|
||||||
CheckObjectVisibility::
|
CheckObjectVisibility::
|
||||||
; Sets carry if the object is not visible on the screen.
|
; Sets carry if the object is not visible on the screen.
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
call GetMapObject
|
call GetMapObject
|
||||||
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
|
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp -1
|
cp -1
|
||||||
jr z, .not_visible
|
jr z, .not_visible
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
call GetObjectStruct
|
call GetObjectStruct
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
@ -301,21 +301,21 @@ CheckObjectTime::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
CopyMapObjectStruct:: ; unreferenced
|
CopyMapObjectStruct:: ; unreferenced
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
call GetMapObject
|
call GetMapObject
|
||||||
call CopyObjectStruct
|
call CopyObjectStruct
|
||||||
ret
|
ret
|
||||||
|
|
||||||
UnmaskCopyMapObjectStruct::
|
UnmaskCopyMapObjectStruct::
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
call UnmaskObject
|
call UnmaskObject
|
||||||
ldh a, [hMapObjectIndexBuffer]
|
ldh a, [hMapObjectIndex]
|
||||||
call GetMapObject
|
call GetMapObject
|
||||||
farcall CopyObjectStruct
|
farcall CopyObjectStruct
|
||||||
ret
|
ret
|
||||||
|
|
||||||
ApplyDeletionToMapObject::
|
ApplyDeletionToMapObject::
|
||||||
ldh [hMapObjectIndexBuffer], a
|
ldh [hMapObjectIndex], a
|
||||||
call GetMapObject
|
call GetMapObject
|
||||||
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
|
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
4
hram.asm
4
hram.asm
@ -51,8 +51,8 @@ hGraphicStartTile:: db
|
|||||||
hMoveMon:: db
|
hMoveMon:: db
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
hMapObjectIndexBuffer:: db
|
hMapObjectIndex:: db
|
||||||
hObjectStructIndexBuffer:: db
|
hObjectStructIndex:: db
|
||||||
NEXTU
|
NEXTU
|
||||||
hConnectionStripLength:: db
|
hConnectionStripLength:: db
|
||||||
hConnectedMapWidth:: db
|
hConnectedMapWidth:: db
|
||||||
|
@ -422,15 +422,15 @@ Function4aad3:
|
|||||||
|
|
||||||
ld c, a
|
ld c, a
|
||||||
xor a
|
xor a
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
ld e, MONICON_PARTYMENU
|
ld e, MONICON_PARTYMENU
|
||||||
farcall LoadMenuMonIcon
|
farcall LoadMenuMonIcon
|
||||||
ldh a, [hObjectStructIndexBuffer]
|
ldh a, [hObjectStructIndex]
|
||||||
inc a
|
inc a
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
dec c
|
dec c
|
||||||
|
@ -5636,7 +5636,7 @@ Function11ad1b:
|
|||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
ld [wcd82], a
|
ld [wcd82], a
|
||||||
dec a
|
dec a
|
||||||
ldh [hObjectStructIndexBuffer], a
|
ldh [hObjectStructIndex], a
|
||||||
ld a, $10
|
ld a, $10
|
||||||
ld [wCurIconTile], a
|
ld [wCurIconTile], a
|
||||||
ld hl, LoadMenuMonIcon
|
ld hl, LoadMenuMonIcon
|
||||||
|
Loading…
Reference in New Issue
Block a user