diff --git a/compasses.asm b/compasses.asm index 223f5fa..5d25fbb 100644 --- a/compasses.asm +++ b/compasses.asm @@ -7,7 +7,8 @@ DrawDungeonCompassCounts: LDX $040C : CPX.b #$FF : BEQ .done ; Skip if not in a dungeon CMP.w #$0002 : BEQ ++ ; if CompassMode==2, we don't check for the compass - LDA $7EF364 : AND.l DungeonItemMasks, X ; Load compass values to A, mask with dungeon item masks + TXY : TXA : LSR : TAX : LDA.l ExistsTransfer, X : TAX : LDA CompassExists, X : BEQ ++ + TYX : LDA $7EF364 : AND.l DungeonItemMasks, X ; Load compass values to A, mask with dungeon item masks BEQ .done ; skip if we don't have compass ++ @@ -40,6 +41,10 @@ DungeonItemMasks: ; these are dungeon correlations to $7EF364 - $7EF369 so it kn dw $8000, $4000, $2000, $1000, $0800, $0400, $0200, $0100 dw $0080, $0040, $0020, $0010, $0008, $0004 +; maps from $040C to the odd order used in overworld map +ExistsTransfer: +db $0C, $0C, $00, $02, $0B, $09, $03, $07, $04, $08, $01, $06, $05, $0A + ;-------------------------------------------------------------------------------- ; $7EF4C0-7EF4CF - item locations checked indexed by $040C >> 1 ;-------------------------------------------------------------------------------- \ No newline at end of file diff --git a/keydrop/dynamic_si_vram.asm b/keydrop/dynamic_si_vram.asm index c4c6e3c..ad2bb97 100644 --- a/keydrop/dynamic_si_vram.asm +++ b/keydrop/dynamic_si_vram.asm @@ -9,7 +9,6 @@ SprSIChar = $7E07F0 ; standing item character for draw routine ;=================================================================================================== -org somewhere ; todo SpriteDraw_DynamicStandingItem: JSL Sprite_PrepOAMCoord_long ; 06E41C diff --git a/keydrop/potsanity.asm b/keydrop/potsanity.asm index 8000cbc..0c8318c 100644 --- a/keydrop/potsanity.asm +++ b/keydrop/potsanity.asm @@ -49,14 +49,14 @@ SpawnedItemIndex = $7E0722 ; 0x02 SpawnedItemIsMultiWorld = $7E0724 ; 0x02 SpawnedItemFlag = $7E0726 ; 0x02 - one for pot, 2 for sprite drop SpawnedItemMWPlayer = $7E0728 ; 0x02 -; todo : clear these for any sprite that spawns, maybe should clear all of them in a loop during room load +; clear all of them in a loop during room load SprDropsItem = $7E0730 ; 0x16 SprItemReceipt = $7E0740 ; 0x16 SprItemIndex = $7E0750 SprItemMWPlayer = $7E0760 ; 0x16 SprItemFlags = $7E0770 ; 0x16 (used for both pots and drops) (combine with SprDropsItem?) -; 70:0600-70:084F ($250 or 592 bytes) for pots and 70:0850-70:0A9F ($250 or 592 bytes) for sprites +; 7F:6600-7F:684F ($250 or 592 bytes) for pots and 7F:6850-7F:6A9F ($250 or 592 bytes) for sprites PotItemSRAM = $7F6600 SpriteItemSRAM = $7F6850 @@ -94,7 +94,7 @@ UWPotsData: org $A8A800 ;tables: PotMultiWorldTable: -; Reserve $250 296 * 2 +; Reserved $250 296 * 2 org $A8AA50 ShuffleKeyDrops: ; 142A50 # todo : combine these flags? @@ -251,6 +251,7 @@ ShouldSpawnItem: LDA.w SpawnedItemIndex : STA SprItemIndex, X LDA.w SpawnedItemFlag : STA SprItemFlags, X LDA.w SpawnedItemMWPlayer : STA SprItemMWPlayer, X + ; todo: RequestStandingItemVRAMSlot instead? - need to see how often this is called LDA #$00 : RTL .normal LDA.w $0403 @@ -282,7 +283,7 @@ SpriteKeyPrep: LDA $A0 : CMP.b #$80 : BNE + LDA SpawnedItemFlag : BNE + LDA #$24 ; it's the big key drop? - ++ JSL PrepDynamicTile ; todo: RequestStandingItemVRAMSlot instead? + ++ JSL PrepDynamicTile ; todo: remove in favor of RequestStandingItemVRAMSlot + PLA RTL