diff --git a/doorrando/overrides.asm b/doorrando/overrides.asm index 9284ba6..be394e8 100644 --- a/doorrando/overrides.asm +++ b/doorrando/overrides.asm @@ -70,7 +70,7 @@ CutoffEntranceRug: CMP.w #$000C : BNE .norm + LDX.w #$0000 : LDA.l CutoffRooms, x - CMP.b RoomIndex : BEQ .check - INX #2 : LDA.l CutoffRooms, x : CMP.w #$FFFF : BNE - + INX #2 : LDA.l CutoffRooms, x : CMP.w #$FFFF : BNE - .norm PLX : PLA : LDA.w $9B52, Y : STA.l TileMapA, X ; what we wrote over RTL diff --git a/dungeonmap.asm b/dungeonmap.asm index 8e53bbd..3eaa1aa 100644 --- a/dungeonmap.asm +++ b/dungeonmap.asm @@ -18,7 +18,7 @@ DoDungeonMapBossIcon: TAX ; get sprite pointer for room - LDA.l RoomData_SpritePointers,X + LDA.l UWSpritesPointers,X STA.b Scrap00 ; pointer in $00 LDA.w #$0028 : STA.b Scrap02 ; set the bank to 28 for now LDY.w #$0001 ; to skip the "sort" diff --git a/enemizer/blindboss.asm b/enemizer/blindboss.asm index 6978536..b21ce60 100644 --- a/enemizer/blindboss.asm +++ b/enemizer/blindboss.asm @@ -2,7 +2,17 @@ ; Blind Boss fight ;-------------------------------------------------------------------------------- -print "Blind Spawn Code Check: ", pc +pushpc + +org $9DA081 ; Original Code + JML check_blind_boss_room +Check_for_Blind_Fight: + +org $9DA090 +Initialize_Blind_Fight: + +pullpc + check_blind_boss_room: LDA.b RoomIndex ; load room index (low byte) CMP.b #172 : BNE + ; Is is Thieves Town Boss Room diff --git a/enemizer/enemizerflags.asm b/enemizer/enemizerflags.asm index e406db7..5e3808c 100644 --- a/enemizer/enemizerflags.asm +++ b/enemizer/enemizerflags.asm @@ -6,7 +6,7 @@ db #$00 ;368100 ; Enable random enemy under bushes db #$00 ;408101 : 200101 ; Enable blind's door closing for other bosses .moldorm_eye_count db #$01 ;408102 : 200102 ; Moldorm eye count, default to 2 eyes (1) -.randomize_sprites +EnemizerFlag_Randomize_Sprites: db #$00 ;408103 : 200103 ; Randomize Sprites. .agahnim_fun_balls db #$00 ;408104 : 200104 ; make Agahnim balls deflect back diff --git a/enemizer/hooks.asm b/enemizer/hooks.asm index 31ec286..189b01e 100644 --- a/enemizer/hooks.asm +++ b/enemizer/hooks.asm @@ -14,6 +14,4 @@ incsrc hooks/damage_hooks.asm incsrc hooks/overworld_sprite_hooks.asm -incsrc hooks/underworld_sprite_hooks.asm - -incsrc hooks/blindboss_hooks.asm \ No newline at end of file +incsrc hooks/underworld_sprite_hooks.asm \ No newline at end of file diff --git a/enemizer/hooks/blindboss_hooks.asm b/enemizer/hooks/blindboss_hooks.asm deleted file mode 100644 index 2d67736..0000000 --- a/enemizer/hooks/blindboss_hooks.asm +++ /dev/null @@ -1,11 +0,0 @@ - -;================================================================================ -; Blind Boss fight -;-------------------------------------------------------------------------------- - -org $9DA081 ; Original Code - JML check_blind_boss_room -Check_for_Blind_Fight: - -org $9DA090 -Initialize_Blind_Fight: \ No newline at end of file diff --git a/enemizer/main.asm b/enemizer/main.asm index c49e179..3d3e429 100644 --- a/enemizer/main.asm +++ b/enemizer/main.asm @@ -47,6 +47,7 @@ incsrc bossdrop.asm incsrc moldorm.asm incsrc kodongo_fixes.asm incsrc mimic_fixes.asm +incsrc swamola_fix.asm ; vitreous key fix for boss shuffle - uses FixPrizeOnTheEyes flag incsrc overworld_sprites.asm diff --git a/enemizer/swamola_fix.asm b/enemizer/swamola_fix.asm new file mode 100644 index 0000000..4b4a3ff --- /dev/null +++ b/enemizer/swamola_fix.asm @@ -0,0 +1,18 @@ +pushpc + +org $8683B5 +JSL MaybeDoCachedSprites ; JSL ExecuteCachedSprites + +org $9DE9DA +ExecuteCachedSprites: + +pullpc + +MaybeDoCachedSprites: + LDA.l EnemizerFlag_Randomize_Sprites + BNE .enemizer + + JML ExecuteCachedSprites ; what we copied over + +.enemizer + RTL \ No newline at end of file diff --git a/enemizer/underworld_sprites.asm b/enemizer/underworld_sprites.asm index e802b78..237137a 100644 --- a/enemizer/underworld_sprites.asm +++ b/enemizer/underworld_sprites.asm @@ -1,6 +1,6 @@ LoadUnderworldSprites: STA.b Scrap00 ; part one of what we replaced - LDA.w #$0028 : STA.b Scrap02 ; set the bank to 28 for now + LDA.w #UWSpritesData>>16 : STA.b Scrap02 ; set the bank to 28 for now LDA.w $048E RTL diff --git a/heartpieces.asm b/heartpieces.asm index 434ccd0..d9c793b 100644 --- a/heartpieces.asm +++ b/heartpieces.asm @@ -84,8 +84,8 @@ HeartContainerSound: LDA.b #$2E SEC RTL - + - CLC + + + CLC RTL ;-------------------------------------------------------------------------------- NormalItemSkipSound: diff --git a/hooks.asm b/hooks.asm index 31e1031..3cdc146 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2349,7 +2349,7 @@ Overworld_Entrance_BRANCH_RHO: ; branch here to continue into door ;================================================================================ ; Paradox Cave Shopkeeper Fixes ;-------------------------------------------------------------------------------- -;org $808C19 ; Bank00.asm 1633 (LDA.b #$01 : STA MDMAEN) +org $808C19 ; Bank00.asm 1633 (LDA.b #$01 : STA MDMAEN) JSL ParadoxCaveGfxFix : NOP ;================================================================================ @@ -2430,7 +2430,7 @@ org $80D17E+178 : db ExpandedTrinexx>>0 ; Use above sheet in Hyrule castle courtyard after rain state. org $80DB9E ; Hyrule Castle GFX Sprite Sheet 4 on [LW1] db $3F -db $80DBA2 ; Hyrule Castle GFX Sprite Sheet 4 on [RainState] +org $80DBA2 ; Hyrule Castle GFX Sprite Sheet 4 on [RainState] db $3F org $80DC0A ; Hyrule Castle GFX Sprite Sheet 4 on [LW2] db $3F diff --git a/inventory.asm b/inventory.asm index 5ed357a..8f0642e 100644 --- a/inventory.asm +++ b/inventory.asm @@ -608,7 +608,6 @@ RTL LoadMushroom: LDA.b #$00 : STA.w SpriteGFXControl, X ; thing we wrote over .justGFX - PHA LDA.l MushroomItem_Player : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID @@ -651,7 +650,7 @@ CollectPowder: ; if for any reason the item value is 0 reload it, just in case %GetPossiblyEncryptedItem(WitchItem, SpriteItemValues) : TAY + PHA - LDA WitchItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID + LDA.l WitchItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID LDA.b #$01 : STA.l ShopEnableCount PLA STZ.w ItemReceiptMethod ; item from NPC diff --git a/keydrop/dynamic_si_vram.asm b/keydrop/dynamic_si_vram.asm index c63cdf4..92666c5 100644 --- a/keydrop/dynamic_si_vram.asm +++ b/keydrop/dynamic_si_vram.asm @@ -241,14 +241,14 @@ DrawPotItem: .draw ; special handling - LDY.b Scrap07 : CPY.b #$B2 : BNE + ; fairy + LDY.b Scrap07 : CPY.b #$D2 : BNE + ; fairy LDA.b FrameCounter : AND.w #$0020 : BEQ ++ ; alternate every 32 frames LDA.w SpriteDynamicOAM+4 : CLC : ADC.w #$02 ; use other fairy GFX STA.w SpriteDynamicOAM+4 ++ LDA.b FrameCounter : SEC : SBC.w #$10 : AND.w #$0020 : BEQ + ; alternate every 32 frames LDA.w SpriteDynamicOAM+2 : SEC : SBC.w #$02 ; move fairy up 2 pixels STA.w SpriteDynamicOAM+2 - + CPY.b #$B5 : BNE + ; good bee + + CPY.b #$D6 : BNE + ; good bee LDA.b FrameCounter : AND.w #$0020 : BEQ ++ ; alternate every 32 frames LDA.w SpriteDynamicOAM+12 : SEC : SBC.w #$10 ; use other fairy GFX STA.w SpriteDynamicOAM+12 diff --git a/keydrop/standing_items.asm b/keydrop/standing_items.asm index 857173d..a2a4192 100644 --- a/keydrop/standing_items.asm +++ b/keydrop/standing_items.asm @@ -540,10 +540,12 @@ db $36, $DB ; RED RUPEE ($36) db $42, $D8 ; HEART ($42) db $44, $E2 ; ARROW REFILL 10 ($44) db $45, $DF ; SMALL MAGIC DECANTER ($45) +db $D1, $AC ; APPLES ($D1) db $D2, $E3 ; FAERIE ($D2) db $D3, $0B ; CUCCO ($D3) db $D4, $E0 ; LARGE MAGIC DECANTER ($D4) -db $D5, $E1 ; ARROW REFILL 5 (x$D5) +db $D5, $E1 ; ARROW REFILL 5 ($D5) +db $D6, $79 ; GOOD BEE ($D6) IncrementCountForMinor: @@ -628,7 +630,7 @@ SpriteKeyPrep: BRA + .continue LDA.w SpawnedItemIndex : STA.w SprItemIndex, X - LDA.w SpawnedItemMWPlayer : STA.w SprItemMWPlayer, X : STA.w !MULTIWORLD_SPRITEITEM_PLAYER_ID + LDA.w SpawnedItemMWPlayer : STA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID LDA.w SpawnedItemFlag : STA.w SprItemFlags, X : BEQ + LDA.w SpawnedItemID : STA.w SpriteItemType, X PHA : PHY : PHX @@ -646,7 +648,7 @@ SpriteKeyPrep: SpriteKeyDrawGFX: JSL Sprite_DrawRippleIfInWater PHA - LDA.l SprItemMWPlayer, X : STA.w !MULTIWORLD_SPRITEITEM_PLAYER_ID + LDA.l SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID LDA.w SprRedrawFlag, X : BEQ + LDA.w SpriteItemType, X JSL RequestStandingItemVRAMSlot @@ -685,7 +687,8 @@ KeyGet: JSL CountChestKeyLong ++ PLA : RTL + STY.b Scrap00 - LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .receive + LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID + STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID : BNE .receive PHX LDA.w DungeonID : CMP.b #$FF : BNE + LDA.b Scrap00 : CMP.b #$AF : BNE .skip @@ -702,7 +705,7 @@ KeyGet: .skip PLX .receive JSL Player_HaltDashAttackLong - TYA : JSL.l AttemptItemSubstitution : JSL.l ResolveLootIDLong : TAY + TYA : JSL AttemptItemSubstitution : JSL ResolveLootIDLong : TAY JSL Link_ReceiveItem PLA : DEC : RTL diff --git a/multiworld.asm b/multiworld.asm index 1b51038..8c455ed 100644 --- a/multiworld.asm +++ b/multiworld.asm @@ -241,10 +241,8 @@ Multiworld_MasterSword_GrantToPlayer: PLP : PLA CPY.b #$6A : BEQ + - JSL Link_ReceiveItem ; thing we wrote over - RTL - + JSL ActivateGoal -RTL + JML Link_ReceiveItem ; thing we wrote over + + JML ActivateGoal } Multiworld_AddReceivedItem_notCrystal: diff --git a/newitems.asm b/newitems.asm index 4eb605e..1fa1e4a 100755 --- a/newitems.asm +++ b/newitems.asm @@ -132,7 +132,7 @@ RTS ;-------------------------------------------------------------------------------- AddReceivedItemExpanded: PHA : PHX - LDA.l RemoteItems : BEQ + : LDA !MULTIWORLD_ITEM_PLAYER_ID : BEQ + + LDA.l RemoteItems : BEQ + : LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BEQ + LDA.w ItemReceiptMethod : BEQ ++ : CMP.b #$03 : BNE +++ : ++ ; fromTextOrObject LDA.w $0345 : BEQ ++ : LDA.b #$04 : ++ : STA.b LinkState ; Restore Link to his swimming state @@ -731,20 +731,15 @@ ResolveReceipt: PHA : PHX PHK : PLB JSL PreItemGet - LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE + - LDA.w ItemReceiptID - .get_item + LDA.l !MULTIWORLD_ITEM_PLAYER_ID : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID + LDA.w ItemReceiptID : STA.l !MULTIWORLD_ITEM_ID JSL AttemptItemSubstitution JSR HandleBowTracking - + - LDA.w ItemReceiptID - STA.l !MULTIWORLD_ITEM_ID JSR ResolveLootID - .have_item STA.w ItemReceiptID LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE + - LDA.w ItemReceiptID - JSR IncrementItemCounters + LDA.w ItemReceiptID + JSR IncrementItemCounters + PLX : PLA RTS @@ -811,7 +806,7 @@ ResolveLootID: .shields SEP #$20 - LDA !MULTIWORLD_SPRITEITEM_PLAYER_ID : BNE ++ + LDA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID : BNE ++ LDA.b #$01 : STA.l ProgressiveFlag LDA.l HighestShield CMP.l ProgressiveShieldLimit : BCC + diff --git a/npcitems.asm b/npcitems.asm index cfd7052..c73e8c8 100644 --- a/npcitems.asm +++ b/npcitems.asm @@ -98,7 +98,7 @@ ItemSet_MagicBat: RTL ItemSet_OldMan: - PHA : LDA OldManItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID : PLA + PHA : LDA.l OldManItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA JSL Link_ReceiveItem ; thing we wrote over PHA : LDA.l NpcFlags : ORA.b #$01 : STA.l NpcFlags : PLA RTL @@ -108,19 +108,19 @@ ItemSet_ZoraKing: RTL ItemSet_SickKid: - PHA : LDA SickKidItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID : PLA + PHA : LDA.l SickKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA JSL Link_ReceiveItem ; thing we wrote over PHA : LDA.l NpcFlags : ORA.b #$04 : STA.l NpcFlags : PLA RTL ItemSet_TreeKid: - PHA : LDA TreeKidItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID : PLA + PHA : LDA.l TreeKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA JSL Link_ReceiveItem ; thing we wrote over PHA : LDA.l NpcFlags : ORA.b #$08 : STA.l NpcFlags : PLA RTL ItemSet_Sahasrala: - PHA : LDA SahasralaItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID : PLA + PHA : LDA.l SahasralaItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA JSL Link_ReceiveItem ; thing we wrote over PHA : LDA.l NpcFlags : ORA.b #$10 : STA.l NpcFlags : PLA RTL @@ -130,7 +130,7 @@ ItemSet_Catfish: RTL ItemSet_Library: - PHA : LDA LibraryItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID : PLA + PHA : LDA.l LibraryItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA JSL Link_ReceiveItem ; thing we wrote over PHA : LDA.l NpcFlags : ORA.b #$80 : STA.l NpcFlags : PLA RTL @@ -143,7 +143,7 @@ ItemSet_Mushroom: ; if for any reason the item value is 0 reload it, just in case %GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues) : TAY + - LDA MushroomItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID + LDA.l MushroomItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID PLA STZ.w ItemReceiptMethod ; thing we wrote over - the mushroom is an npc for item purposes apparently RTL @@ -165,19 +165,19 @@ Set300RupeeNPCItem: CMP.w #291 : BNE + %GetPossiblyEncryptedItem(RupeeNPC_MoldormCave, SpriteItemValues) TAY ; load moldorm cave value into Y - LDA RupeeNPC_MoldormCave_Player + LDA.l RupeeNPC_MoldormCave_Player BRA .done + CMP.w #286 : BNE + %GetPossiblyEncryptedItem(RupeeNPC_NortheastDarkSwampCave, SpriteItemValues) TAY ; load northeast dark swamp cave value into Y - LDA RupeeNPC_NortheastDarkSwampCave_Player + LDA.l RupeeNPC_NortheastDarkSwampCave_Player BRA .done + - LDA #$0000 + LDA.w #$0000 LDY.b #$46 ; default to a normal 300 rupees .done SEP #$20 - STA !MULTIWORLD_ITEM_PLAYER_ID + STA.l !MULTIWORLD_ITEM_PLAYER_ID PLP : PLA RTL @@ -185,7 +185,7 @@ RTL ; Randomize Zora King ;-------------------------------------------------------------------------------- LoadZoraKingItemGFX: - LDA.l ZoraItem_Player : : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID + LDA.l ZoraItem_Player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID LDA.l $1DE1C3 ; location randomizer writes zora item to JSL AttemptItemSubstitution JSL ResolveLootIDLong @@ -202,7 +202,7 @@ JumpToSplashItemTarget: ; Randomize Catfish ;-------------------------------------------------------------------------------- LoadCatfishItemGFX: - LDA.l CatfishItem_Player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID + LDA.l CatfishItem_Player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID LDA.l $1DE185 ; location randomizer writes catfish item to JSL AttemptItemSubstitution JSL ResolveLootIDLong diff --git a/ram.asm b/ram.asm index 68adcff..e36350a 100644 --- a/ram.asm +++ b/ram.asm @@ -726,8 +726,8 @@ endmacro %assertRAM(LinkRecoilY, $7E0027) %assertRAM(LinkRecoilX, $7E0028) %assertRAM(LinkRecoilZ, $7E0029) -%assertRAM(LinkDirection, $7E002F) %assertRAM(LinkAnimationStep, $7E002E) +%assertRAM(LinkDirection, $7E002F) %assertRAM(OAMOffsetY, $7E0044) %assertRAM(OAMOffsetX, $7E0045) %assertRAM(LinkIncapacitatedTimer, $7E0046) @@ -770,8 +770,8 @@ endmacro %assertRAM(SubSubModule, $7E00B0) %assertRAM(ObjPtr, $7E00B7) %assertRAM(ObjPtrOffset, $7E00BA) -%assertRAM(ScrapBufferBD, $7E00BD) %assertRAM(PlayerSpriteBank, $7E00BC) +%assertRAM(ScrapBufferBD, $7E00BD) %assertRAM(FileSelectPosition, $7E00C8) %assertRAM(PasswordCodePosition, $7E00C8) %assertRAM(PasswordSelectPosition, $7E00C9) @@ -794,7 +794,6 @@ endmacro %assertRAM(BG1ShakeH, $7E011C) %assertRAM(CurrentVolume, $7E0127) %assertRAM(TargetVolume, $7E0129) -%assertRAM(CurrentControlRequest, $7E0133) %assertRAM(MusicControl, $7E012B) %assertRAM(MusicControlRequest, $7E012C) %assertRAM(SFX1, $7E012D) @@ -883,12 +882,11 @@ endmacro %assertRAM(SprItemFlags, $7E0770) %assertRAM(SprItemGFX, $7E0780) %assertRAM(SprRedrawFlag, $7E0790) +%assertRAM(DynamicDropGFXIndex, $7E07F0) %assertRAM(OAMBuffer, $7E0800) %assertRAM(OAMBuffer2, $7E0A00) %assertRAM(TransparencyFlag, $7E0ABD) %assertRAM(OWTransitionFlag, $7E0ABF) -%assertRAM(TreePullKills, $7E0CFB) -%assertRAM(TreePullHits, $7E0CFC) %assertRAM(ArcVariable, $7E0B08) %assertRAM(OverlordXLow, $7E0B08) %assertRAM(OverlordXHigh, $7E0B10) @@ -906,6 +904,8 @@ endmacro %assertRAM(AncillaLayer, $7E0C7C) %assertRAM(SpriteForceDrop, $7E0CBA) %assertRAM(SpriteBump, $7E0CD2) +%assertRAM(TreePullKills, $7E0CFB) +%assertRAM(TreePullHits, $7E0CFC) %assertRAM(SpritePosYLow, $7E0D00) %assertRAM(SpritePosXLow, $7E0D10) %assertRAM(SpritePosYHigh, $7E0D20) @@ -927,12 +927,56 @@ endmacro %assertRAM(SpriteHitPoints, $7E0E50) %assertRAM(SpriteControl, $7E0E60) %assertRAM(SpriteItemType, $7E0E80) -%assertRAM(SpriteSpawnStep, $7E0ED0) %assertRAM(SpriteDirectionTable, $7E0EB0) +%assertRAM(SpriteSpawnStep, $7E0ED0) %assertRAM(SpriteHalt, $7E0F00) %assertRAM(SpriteTimerE, $7E0F10) %assertRAM(SpriteLayer, $7E0F20) %assertRAM(SpriteOAMProp, $7E0F50) +%assertRAM(SpriteZCoord, $7E0F70) +%assertRAM(SpriteVelocityZ, $7E0F80) +%assertRAM(SpriteSubPixelZ, $7E0F90) +%assertRAM(CurrentSpriteSlot, $7E0FA0) +%assertRAM(FreezeSprites, $7E0FC1) +%assertRAM(PrizePackIndexes, $7E0FC7) +%assertRAM(SpriteCoordCacheX, $7E0FD8) +%assertRAM(SpriteCoordCacheY, $7E0FDA) +%assertRAM(NoMenu, $7E0FFC) +%assertRAM(GFXStripes, $7E1000) +%assertRAM(RoomStripes, $7E1100) +%assertRAM(MirrorPortalPosXH, $7E1ACF) +%assertRAM(IrisPtr, $7E1B00) +%assertRAM(MessageSubModule, $7E1CD8) +%assertRAM(MessageCursor, $7E1CE8) +%assertRAM(DelayTimer, $7E1CE9) +%assertRAM(TextID, $7E1CF0) +%assertRAM(ToastBuffer, $7E1E0E) +%assertRAM(MSUResumeTime, $7E1E6B) +%assertRAM(MSUResumeControl, $7E1E6F) +%assertRAM(MSUFallbackTable, $7E1E70) +%assertRAM(MSUDelayedCommand, $7E1E79) +%assertRAM(MSUPackCount, $7E1E7A) +%assertRAM(MSUPackCurrent, $7E1E7B) +%assertRAM(MSUPackRequest, $7E1E7C) +%assertRAM(MSULoadedTrack, $7E1E7D) +%assertRAM(MSUResumeTrack, $7E1E7F) +%assertRAM(ClockHours, $7E1E90) +%assertRAM(ClockMinutes, $7E1E94) +%assertRAM(ClockSeconds, $7E1E98) +%assertRAM(ClockBuffer, $7E1E9C) +%assertRAM(ScratchBufferNV, $7E1EA0) +%assertRAM(ScratchBufferV, $7E1EB0) +%assertRAM(TileMapA, $7E2000) +%assertRAM(TileMapB, $7E4000) +%assertRAM(TileUploadBuffer, $7EA180) +%assertRAM(RoomFade, $7EC005) +%assertRAM(FadeTimer, $7EC007) +%assertRAM(FadeDirection, $7EC009) +%assertRAM(FadeLevel, $7EC00B) +%assertRAM(MosaicLevel, $7EC011) +%assertRAM(RoomDarkness, $7EC017) +%assertRAM(SpriteOAM, $7EC025) +%assertRAM(SpriteDynamicOAM, $7EC035) %assertRAM(EN_OWSCR2, $7EC140) %assertRAM(EN_MAINDESQ, $7EC142) %assertRAM(EN_SUBDESQ, $7EC143) @@ -960,51 +1004,6 @@ endmacro %assertRAM(EN_SCRMODYB, $7EC16C) %assertRAM(EN_SCRMODXA, $7EC16E) %assertRAM(EN_SCRMODXB, $7EC170) -%assertRAM(SpriteZCoord, $7E0F70) -%assertRAM(SpriteVelocityZ, $7E0F80) -%assertRAM(SpriteSubPixelZ, $7E0F90) -%assertRAM(CurrentSpriteSlot, $7E0FA0) -%assertRAM(FreezeSprites, $7E0FC1) -%assertRAM(PrizePackIndexes, $7E0FC7) -%assertRAM(SpriteCoordCacheX, $7E0FD8) -%assertRAM(SpriteCoordCacheY, $7E0FDA) -%assertRAM(NoMenu, $7E0FFC) -%assertRAM(GFXStripes, $7E1000) -%assertRAM(RoomStripes, $7E1100) -%assertRAM(MirrorPortalPosXH, $7E1ACF) -%assertRAM(IrisPtr, $7E1B00) -%assertRAM(MessageSubModule, $7E1CD8) -%assertRAM(MessageCursor, $7E1CE8) -%assertRAM(DelayTimer, $7E1CE9) -%assertRAM(TextID, $7E1CF0) -%assertRAM(ToastBuffer, $7E1E0E) -%assertRAM(MSUResumeTime, $7E1E6B) -%assertRAM(MSUResumeControl, $7E1E6F) -%assertRAM(MSUFallbackTable, $7E1E70) -%assertRAM(DynamicDropGFXIndex, $7E1E73) -%assertRAM(MSUDelayedCommand, $7E1E79) -%assertRAM(MSUPackCount, $7E1E7A) -%assertRAM(MSUPackCurrent, $7E1E7B) -%assertRAM(MSUPackRequest, $7E1E7C) -%assertRAM(MSULoadedTrack, $7E1E7D) -%assertRAM(MSUResumeTrack, $7E1E7F) -%assertRAM(ClockHours, $7E1E90) -%assertRAM(ClockMinutes, $7E1E94) -%assertRAM(ClockSeconds, $7E1E98) -%assertRAM(ClockBuffer, $7E1E9C) -%assertRAM(ScratchBufferNV, $7E1EA0) -%assertRAM(ScratchBufferV, $7E1EB0) -%assertRAM(TileMapA, $7E2000) -%assertRAM(TileMapB, $7E4000) -%assertRAM(TileUploadBuffer, $7EA180) -%assertRAM(RoomFade, $7EC005) -%assertRAM(FadeTimer, $7EC007) -%assertRAM(FadeDirection, $7EC009) -%assertRAM(FadeLevel, $7EC00B) -%assertRAM(MosaicLevel, $7EC011) -%assertRAM(RoomDarkness, $7EC017) -%assertRAM(SpriteOAM, $7EC025) -%assertRAM(SpriteDynamicOAM, $7EC035) %assertRAM(PegColor, $7EC172) %assertRAM(GameOverSongCache, $7EC227) %assertRAM(LastBGSet, $7EC2F8) diff --git a/rngfixes.asm b/rngfixes.asm index 92c76d2..c326e00 100644 --- a/rngfixes.asm +++ b/rngfixes.asm @@ -22,7 +22,7 @@ RTL .forceHeart LDA.b #$33 : STA.b ScrapBufferBD+$0B ; assure the correct state if player talked to shopkeeper LDA.w RoomItemsTaken : AND.b #$40 : BNE .notHeart - LDA ChestGameItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID + LDA.l ChestGameItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID LDA.b #$07 ; give prize item RTL .notHeart diff --git a/shopkeeper.asm b/shopkeeper.asm index 69cc8e7..b278388 100644 --- a/shopkeeper.asm +++ b/shopkeeper.asm @@ -425,80 +425,78 @@ Shopkeeper_SetupHitboxes: RTS Shopkeeper_BuyItem: - PHX : PHY - TYX + PHX : PHY + TYX - LDA.l ShopInventory, X - CMP.b #$0E : BEQ .refill ; Bee Refill - CMP.b #$2E : BEQ .refill ; Red Potion Refill - CMP.b #$2F : BEQ .refill ; Green Potion Refill - CMP.b #$30 : BEQ .refill ; Blue Potion Refill - BRA + - .refill - JSL Sprite_GetEmptyBottleIndex : BMI .full_bottles - LDA.b #$1 : STA.l ShopkeeperRefill ; If this is on, don't toggle bit to remove from shop - + + LDA.l ShopInventory, X + CMP.b #$0E : BEQ .refill ; Bee Refill + CMP.b #$2E : BEQ .refill ; Red Potion Refill + CMP.b #$2F : BEQ .refill ; Green Potion Refill + CMP.b #$30 : BEQ .refill ; Blue Potion Refill + BRA + + .refill + JSL Sprite_GetEmptyBottleIndex : BMI .full_bottles + LDA.b #$1 : STA.l ShopkeeperRefill ; If this is on, don't toggle bit to remove from shop + + - LDA.l ShopType : AND.b #$80 : BNE .buy ; don't charge if this is a take-any - REP #$20 : LDA.l CurrentRupees : CMP.l ShopInventory+1, X : SEP #$20 : !BGE .buy + LDA.l ShopType : AND.b #$80 : BNE .buy ; don't charge if this is a take-any + REP #$20 : LDA.l CurrentRupees : CMP.l ShopInventory+1, X : SEP #$20 : !BGE .buy - .cant_afford - LDA.b #$7A - LDY.b #$01 - JSL Sprite_ShowMessageUnconditional - LDA.b #$3C : STA.w SFX2 ; error sound - JMP .done - .full_bottles - LDA.b #$6B : LDY.b #$01 - JSL Sprite_ShowMessageUnconditional - LDA.b #$3C : STA.w SFX2 ; error sound - JMP .done - .buy - LDA.l ShopType : AND.b #$80 : BNE ++ ; don't charge if this is a take-any - REP #$20 : LDA.l CurrentRupees : !SUB ShopInventory+1, X : STA.l CurrentRupees : SEP #$20 ; Take price away - ++ + .cant_afford + LDA.b #$7A + LDY.b #$01 + BRA .message + .full_bottles + LDA.b #$6B : LDY.b #$01 + .message + JSL Sprite_ShowMessageUnconditional + LDA.b #$3C : STA.w SFX2 ; error sound + JMP .done + .buy + LDA.l ShopType : AND.b #$80 : BNE ++ ; don't charge if this is a take-any + REP #$20 : LDA.l CurrentRupees : !SUB ShopInventory+1, X : STA.l CurrentRupees : SEP #$20 ; Take price away + ++ + PHX + LDA.b #0 : XBA : TXA : LSR #2 : TAX : LDA.l ShopInventoryPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID + TXA : !ADD ShopSRAMIndex : TAX + LDA.l PurchaseCounts, X : BNE +++ ;Is this the first time buying this slot? + LDA.l EnableShopItemCount, X : STA.l ShopEnableCount ; If so, store the permission to count the item here. + +++ + PLX + LDA.l ShopInventory, X + JSL AttemptItemSubstitution + JSL ResolveLootIDLong + TAY : JSL Link_ReceiveItem + LDA.l ShopInventory+3, X : INC : STA.l ShopInventory+3, X + LDA.b #0 : STA.l ShopEnableCount + TXA : LSR #2 : TAX + LDA.l ShopType : BIT.b #$80 : BNE + + LDA ShopkeeperRefill : BNE +++ + LDA.l ShopState : ORA.w Shopkeeper_ItemMasks, X : STA.l ShopState + +++ PHX + TXA : !ADD ShopSRAMIndex : TAX + LDA.l PurchaseCounts, X : INC : BEQ +++ : STA.l PurchaseCounts, X : +++ + PLX + BRA ++ + + ; Take-any + BIT.b #$20 : BNE .takeAll + .takeAny + LDA.l ShopState : ORA.b #$07 : STA.l ShopState PHX - LDA.b #0 : XBA : TXA : LSR #2 : TAX : LDA.l ShopInventoryPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID - TXA : !ADD ShopSRAMIndex : TAX - LDA.l PurchaseCounts, X : BNE +++ ;Is this the first time buying this slot? - LDA.l EnableShopItemCount, X : STA.l ShopEnableCount ; If so, store the permission to count the item here. - +++ - PLX - LDA.l ShopInventory, X - JSL.l AttemptItemSubstitution - JSL.l ResolveLootIDLong - TAY : JSL Link_ReceiveItem - LDA.l ShopInventory+3, X : INC : STA.l ShopInventory+3, X - LDA.b #0 : STA.l ShopEnableCount - - TXA : LSR #2 : TAX - LDA.l ShopType : BIT.b #$80 : BNE + - LDA ShopkeeperRefill : BNE +++ - LDA.l ShopState : ORA.w Shopkeeper_ItemMasks, X : STA.l ShopState - +++ PHX - TXA : !ADD ShopSRAMIndex : TAX - LDA.l PurchaseCounts, X : INC : BEQ +++ : STA.l PurchaseCounts, X : +++ - PLX - BRA ++ - + ; Take-any - BIT.b #$20 : BNE .takeAll - .takeAny - LDA.l ShopState : ORA.b #$07 : STA.l ShopState - PHX - LDA.l ShopSRAMIndex : TAX : LDA.b #$01 : STA.l PurchaseCounts, X - LDA.l EnableShopItemCount, X : STA.l ShopEnableCount - PLX - BRA ++ - .takeAll - LDA.l ShopState : ORA.w Shopkeeper_ItemMasks, X : STA.l ShopState - PHX - LDA.l ShopSRAMIndex : TAX : LDA.l ShopState : STA.l PurchaseCounts, X - LDA.l EnableShopItemCount, X : STA.l ShopEnableCount - PLX - ++ - .done - LDA #$0 : STA ShopkeeperRefill - PLY : PLX + LDA.l ShopSRAMIndex : TAX : LDA.b #$01 : STA.l PurchaseCounts, X + LDA.l EnableShopItemCount, X : STA.l ShopEnableCount + PLX + BRA ++ + .takeAll + LDA.l ShopState : ORA.w Shopkeeper_ItemMasks, X : STA.l ShopState + PHX + LDA.l ShopSRAMIndex : TAX : LDA.l ShopState : STA.l PurchaseCounts, X + LDA.l EnableShopItemCount, X : STA.l ShopEnableCount + PLX + ++ + .done + LDA.b #$0 : STA.l ShopkeeperRefill + PLY : PLX RTS Shopkeeper_ItemMasks: db #$01, #$02, #$04, #$08 diff --git a/swordswap.asm b/swordswap.asm index 1a10488..44d3797 100644 --- a/swordswap.asm +++ b/swordswap.asm @@ -121,7 +121,7 @@ GetSmithSword: BRA .done .buy - LDA SmithItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID + LDA.l SmithItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID LDA.l SmithItem : TAY STZ.w ItemReceiptMethod ; Item from NPC PHX : JSL Link_ReceiveItem : PLX diff --git a/utilities.asm b/utilities.asm index 9753695..092cd80 100644 --- a/utilities.asm +++ b/utilities.asm @@ -67,7 +67,7 @@ PrepDynamicTile: CMP.b #$34 : BCC + : CMP.b #$36+1 : BCS + : BRA ++ ; if rupees, don't draw to OAM + JSL TransferItemReceiptToBuffer_using_ReceiptID SEP #$30 - ++ LDA.b #$00 : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID ; clear player id + ++ LDA.b #$00 : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID ; clear player id PLB : PLY : PLX RTL .loot_resolved @@ -229,7 +229,7 @@ PrepDrawRemoteItemSprite: RTS ++ STA.l !MULTIWORLD_SCOUT_LOCATION - LDA.b #$00 : STA.b !MULTIWORLD_SPRITEITEM_PLAYER_ID + LDA.b #$00 : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID LDA.b #$6B RTS + diff --git a/vanillalabels.asm b/vanillalabels.asm index dca3c3d..e7ec3f0 100644 --- a/vanillalabels.asm +++ b/vanillalabels.asm @@ -254,7 +254,6 @@ EntranceData_song = $82D592 SpawnPointData_room_id = $82D8D2 Overworld_CheckForSpecialOverworldTrigger_Direction = $84E879 Sprite_ShowSolicitedMessage_Direction = $85E1A3 -RoomData_SpritePointers = $89D62E WorldMap_RedXChars = $8ABF70 WorldMap_CalculateOAMCoordinates = $8AC3B1 WorldMap_HandleSpriteBlink = $8AC52E