implement remote item checks

This commit is contained in:
Bonta-kun
2020-01-18 06:38:47 +01:00
committed by caitsith2
parent c3c5ba9d53
commit 2a5e305fc6
6 changed files with 70 additions and 15 deletions

View File

@@ -389,6 +389,19 @@ RTL
;-------------------------------------------------------------------------------- 20/8477
PrepDynamicTile:
PHA : PHX : PHY
TAX : LDA RemoteItems : BEQ +
TXA
CMP !MULTIWORLD_SCOUTREPLY_LOCATION : BNE ++
LDA !MULTIWORLD_SCOUTREPLY_PLAYER : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID
LDA !MULTIWORLD_SCOUTREPLY_ITEM
TAX
BRA +
++
STA !MULTIWORLD_SCOUT_LOCATION
LDA #$00 : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID
LDX #$6B
+
TXA
JSR.w LoadDynamicTileOAMTable
JSL.l GetSpriteID ; convert loot id to sprite id
JSL.l GetAnimatedSpriteTile_variable
@@ -446,6 +459,8 @@ RTS
!SKIP_EOR = "$7F5008"
;--------------------------------------------------------------------------------
DrawDynamicTile:
JSR PrepDrawRemoteItemSprite
JSL.l IsNarrowSprite : BCS .narrow
.full
@@ -475,6 +490,8 @@ DrawDynamicTile:
RTL
;--------------------------------------------------------------------------------
DrawDynamicTileNoShadow:
JSR PrepDrawRemoteItemSprite
JSL.l IsNarrowSprite : BCS .narrow
.full
@@ -501,6 +518,31 @@ DrawDynamicTileNoShadow:
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
PrepDrawRemoteItemSprite:
PHA
LDA RemoteItems : BEQ +
PLA
CMP !MULTIWORLD_SCOUTREPLY_LOCATION : BNE ++
LDA !MULTIWORLD_SCOUT_LOCATION : BEQ +++
LDA !MULTIWORLD_SCOUTREPLY_LOCATION
JSL PrepDynamicTile
LDA #$00
BRA ++
+++
LDA !MULTIWORLD_SCOUTREPLY_PLAYER : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID
LDA !MULTIWORLD_SCOUTREPLY_ITEM
RTS
++
STA !MULTIWORLD_SCOUT_LOCATION
LDA #$00 : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID
LDA #$6B
RTS
+
PLA
RTS
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
!TILE_UPLOAD_OFFSET_OVERRIDE = "$7F5042"
LoadModifiedTileBufferAddress: