New fix for pot drops when at sprite limit
This commit is contained in:
@@ -2,7 +2,11 @@
|
|||||||
; New bush mob randomization
|
; New bush mob randomization
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $868279
|
org $868279
|
||||||
NOP #$0A
|
BRA +
|
||||||
|
MaybeSkipTerrainDebris:
|
||||||
|
JSL MaybeSkipTerrainDebris_long : RTS ; sticking this here, no other free space in bank 06
|
||||||
|
NOP #3
|
||||||
|
+
|
||||||
JSL sprite_bush_spawn
|
JSL sprite_bush_spawn
|
||||||
NOP ; we keep the branch
|
NOP ; we keep the branch
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
; hooks
|
; hooks
|
||||||
|
org $81DB19
|
||||||
|
JSL MaybeSkipSmashTerrain : BCS $81DB11
|
||||||
|
|
||||||
org $81E6B0
|
org $81E6B0
|
||||||
JSL RevealPotItem
|
JSL RevealPotItem
|
||||||
RTS
|
RTS
|
||||||
@@ -39,6 +42,9 @@ org $86d180
|
|||||||
org $86d18d ; <- 3518D - sprite_absorbable.asm : 274 (LDA $7EF36F : INC A : STA $7EF36F)
|
org $86d18d ; <- 3518D - sprite_absorbable.asm : 274 (LDA $7EF36F : INC A : STA $7EF36F)
|
||||||
JSL KeyGet
|
JSL KeyGet
|
||||||
|
|
||||||
|
org $86E24A
|
||||||
|
JSR MaybeSkipTerrainDebris
|
||||||
|
|
||||||
org $86f9f3 ; bank06.asm : 6732 (JSL SpritePrep_LoadProperties)
|
org $86f9f3 ; bank06.asm : 6732 (JSL SpritePrep_LoadProperties)
|
||||||
JSL LoadProperties_PreserveCertainProps
|
JSL LoadProperties_PreserveCertainProps
|
||||||
|
|
||||||
@@ -46,6 +52,11 @@ org $86828A
|
|||||||
Sprite_SpawnSecret_SpriteSpawnDynamically:
|
Sprite_SpawnSecret_SpriteSpawnDynamically:
|
||||||
JSL CheckSprite_Spawn
|
JSL CheckSprite_Spawn
|
||||||
|
|
||||||
|
org $87B114
|
||||||
|
JSL MaybeUnableToLiftPotSfx
|
||||||
|
NOP #4
|
||||||
|
db $30 ; BMI
|
||||||
|
|
||||||
org $87B169
|
org $87B169
|
||||||
JSL PreventPotSpawn : NOP
|
JSL PreventPotSpawn : NOP
|
||||||
|
|
||||||
@@ -773,7 +784,6 @@ CheckSprite_Spawn:
|
|||||||
RTL
|
RTL
|
||||||
.check
|
.check
|
||||||
LDA.b Scrap0D : CMP.b #$08 : BNE +
|
LDA.b Scrap0D : CMP.b #$08 : BNE +
|
||||||
LDA.w LinkDashing : BNE .error
|
|
||||||
LDX.b #$0F
|
LDX.b #$0F
|
||||||
|
|
||||||
; loop looking for a Sprite with state 0A (carried by the player)
|
; loop looking for a Sprite with state 0A (carried by the player)
|
||||||
@@ -784,7 +794,9 @@ RTL
|
|||||||
LDA.b #$00 : STZ.w SpriteAITable, X
|
LDA.b #$00 : STZ.w SpriteAITable, X
|
||||||
LDA.b #$E4 : JSL Sprite_SpawnDynamically
|
LDA.b #$E4 : JSL Sprite_SpawnDynamically
|
||||||
BMI .error
|
BMI .error
|
||||||
LDA.b #$40 : TSB.w AButtonAct : RTL
|
LDA.w UseY1 : AND.b #$02 : BNE ++
|
||||||
|
LDA.b #$40 : TSB.w AButtonAct
|
||||||
|
++ RTL
|
||||||
|
|
||||||
.error
|
.error
|
||||||
LDA.b #$3C ; SFX2_3C - error beep
|
LDA.b #$3C ; SFX2_3C - error beep
|
||||||
@@ -803,6 +815,44 @@ PreventPotSpawn2:
|
|||||||
LDA.b #$01 : TSB.b LinkStrafe ; what we wrote over
|
LDA.b #$01 : TSB.b LinkStrafe ; what we wrote over
|
||||||
+ RTL
|
+ RTL
|
||||||
|
|
||||||
|
MaybeSkipTerrainDebris_long:
|
||||||
|
STZ.w SecretId ; what we wrote over
|
||||||
|
LDA.w SpriteTypeTable, X : CMP.b #$EC
|
||||||
|
BEQ .return
|
||||||
|
PLA : PLA : PLA : PLA : PLA
|
||||||
|
LDA.b #Sprite_ScheduleForBreakage_exit>>16 : PHA
|
||||||
|
PEA.w Sprite_ScheduleForBreakage_exit-1
|
||||||
|
.return
|
||||||
|
RTL
|
||||||
|
|
||||||
|
MaybeSkipSmashTerrain:
|
||||||
|
STY.w ManipIndex : LDA.w ManipTileMapX, Y ; what we wrote over
|
||||||
|
PHA
|
||||||
|
SEP #$30
|
||||||
|
LDX.b #$0F
|
||||||
|
- LDA.w SpriteAITable, X : BEQ .continue
|
||||||
|
DEX
|
||||||
|
BPL -
|
||||||
|
.skip
|
||||||
|
PLA : PLA
|
||||||
|
LDA.b #$3C : STA.w SFX2 ; error beep
|
||||||
|
SEC
|
||||||
|
RTL
|
||||||
|
.continue
|
||||||
|
REP #$30
|
||||||
|
PLA
|
||||||
|
CLC
|
||||||
|
RTL
|
||||||
|
|
||||||
|
MaybeUnableToLiftPotSfx:
|
||||||
|
- LDA.w SpriteAITable,X : BEQ .return
|
||||||
|
DEX
|
||||||
|
BPL -
|
||||||
|
LDA.b #$3C : STA.w SFX2 ; error beep
|
||||||
|
LDA.b #$FF
|
||||||
|
.return
|
||||||
|
RTL
|
||||||
|
|
||||||
CheckIfPotIsSpecial:
|
CheckIfPotIsSpecial:
|
||||||
TXA ; give index to A so we can do a CMP.l
|
TXA ; give index to A so we can do a CMP.l
|
||||||
CMP.l $018550 ; see if our current index is that of object 230
|
CMP.l $018550 ; see if our current index is that of object 230
|
||||||
|
|||||||
8
ram.asm
8
ram.asm
@@ -272,6 +272,8 @@ DungeonID = $7E040C ; High byte mostly unused but sometimes read.
|
|||||||
;
|
;
|
||||||
TransitionDirection = $7E0418 ; OW: 0=N 1=S 2=W 3=E UW: 0=S 1=N 2=E 3=W
|
TransitionDirection = $7E0418 ; OW: 0=N 1=S 2=W 3=E UW: 0=S 1=N 2=E 3=W
|
||||||
;
|
;
|
||||||
|
ManipIndex = $7E042C ; Index of manipulable tile. Word length.
|
||||||
|
;
|
||||||
TrapDoorFlag = $7E0468 ; Flag that is set when trap doors are down. 2 bytes
|
TrapDoorFlag = $7E0468 ; Flag that is set when trap doors are down. 2 bytes
|
||||||
;
|
;
|
||||||
LayerAdjustment = $7E047A ; Flags layer adjustments. Arms EG.
|
LayerAdjustment = $7E047A ; Flags layer adjustments. Arms EG.
|
||||||
@@ -285,6 +287,8 @@ OWEntranceCutscene = $7E04C6 ;
|
|||||||
;
|
;
|
||||||
HeartBeepTimer = $7E04CA ;
|
HeartBeepTimer = $7E04CA ;
|
||||||
;
|
;
|
||||||
|
ManipTileMapX = $7E0540 ; Tilemap X position of manipulable tile. $10 x 2 bytes
|
||||||
|
;
|
||||||
CameraTargetN = $7E0610 ; Camera scroll target for directions NSEW
|
CameraTargetN = $7E0610 ; Camera scroll target for directions NSEW
|
||||||
CameraTargetS = $7E0612 ;
|
CameraTargetS = $7E0612 ;
|
||||||
CameraTargetW = $7E0614 ;
|
CameraTargetW = $7E0614 ;
|
||||||
@@ -367,6 +371,7 @@ EnemyStunTimer = $7E0B58 ; Auto-decrementing timer for stunned enemies.
|
|||||||
;
|
;
|
||||||
BowDryFire = $7E0B9A ; If set, arrows are deleted immediately
|
BowDryFire = $7E0B9A ; If set, arrows are deleted immediately
|
||||||
;
|
;
|
||||||
|
SecretId = $7E0B9C ; Controls the secret spawned from bushes, pots, rocks, etc.
|
||||||
SaveFileIndex = $7E0B9D ;
|
SaveFileIndex = $7E0B9D ;
|
||||||
;
|
;
|
||||||
SpriteAncillaInteract = $7E0BA0 ; If nonzero, ancillae do not interact with the sprite. $10 bytes.
|
SpriteAncillaInteract = $7E0BA0 ; If nonzero, ancillae do not interact with the sprite. $10 bytes.
|
||||||
@@ -871,6 +876,7 @@ endmacro
|
|||||||
%assertRAM(OverworldIndexMirror, $7E040A)
|
%assertRAM(OverworldIndexMirror, $7E040A)
|
||||||
%assertRAM(DungeonID, $7E040C)
|
%assertRAM(DungeonID, $7E040C)
|
||||||
%assertRAM(TransitionDirection, $7E0418)
|
%assertRAM(TransitionDirection, $7E0418)
|
||||||
|
%assertRAM(ManipIndex, $7E042C)
|
||||||
%assertRAM(TrapDoorFlag, $7E0468)
|
%assertRAM(TrapDoorFlag, $7E0468)
|
||||||
%assertRAM(LayerAdjustment, $7E047A)
|
%assertRAM(LayerAdjustment, $7E047A)
|
||||||
%assertRAM(RoomIndexMirror, $7E048E)
|
%assertRAM(RoomIndexMirror, $7E048E)
|
||||||
@@ -878,6 +884,7 @@ endmacro
|
|||||||
%assertRAM(Map16ChangeIndex, $7E04AC)
|
%assertRAM(Map16ChangeIndex, $7E04AC)
|
||||||
%assertRAM(OWEntranceCutscene, $7E04C6)
|
%assertRAM(OWEntranceCutscene, $7E04C6)
|
||||||
%assertRAM(HeartBeepTimer, $7E04CA)
|
%assertRAM(HeartBeepTimer, $7E04CA)
|
||||||
|
%assertRAM(ManipTileMapX, $7E0540)
|
||||||
%assertRAM(CameraTargetN, $7E0610)
|
%assertRAM(CameraTargetN, $7E0610)
|
||||||
%assertRAM(CameraTargetS, $7E0612)
|
%assertRAM(CameraTargetS, $7E0612)
|
||||||
%assertRAM(CameraTargetW, $7E0614)
|
%assertRAM(CameraTargetW, $7E0614)
|
||||||
@@ -928,6 +935,7 @@ endmacro
|
|||||||
%assertRAM(OverlordYHigh, $7E0B20)
|
%assertRAM(OverlordYHigh, $7E0B20)
|
||||||
%assertRAM(EnemyStunTimer, $7E0B58)
|
%assertRAM(EnemyStunTimer, $7E0B58)
|
||||||
%assertRAM(BowDryFire, $7E0B9A)
|
%assertRAM(BowDryFire, $7E0B9A)
|
||||||
|
%assertRAM(SecretId, $7E0B9C)
|
||||||
%assertRAM(SaveFileIndex, $7E0B9D)
|
%assertRAM(SaveFileIndex, $7E0B9D)
|
||||||
%assertRAM(SpriteAncillaInteract, $7E0BA0)
|
%assertRAM(SpriteAncillaInteract, $7E0BA0)
|
||||||
%assertRAM(AncillaVelocityY, $7E0C22)
|
%assertRAM(AncillaVelocityY, $7E0C22)
|
||||||
|
|||||||
@@ -201,6 +201,7 @@ Sprite_BagOfPowder = $85F644
|
|||||||
MagicShopAssistant_Main = $85F893
|
MagicShopAssistant_Main = $85F893
|
||||||
Sprite_SpawnSecret_SetCoords = $8682A5
|
Sprite_SpawnSecret_SetCoords = $8682A5
|
||||||
Chicken_SpawnAvengerChicken = $86A7DB
|
Chicken_SpawnAvengerChicken = $86A7DB
|
||||||
|
Sprite_ScheduleForBreakage_exit = $86E273
|
||||||
Link_PerformRead = $87B4DB
|
Link_PerformRead = $87B4DB
|
||||||
Link_PerformOpenChest_no_replacement = $87B59F
|
Link_PerformOpenChest_no_replacement = $87B59F
|
||||||
Link_CheckNewAPress = $87B5A9
|
Link_CheckNewAPress = $87B5A9
|
||||||
|
|||||||
Reference in New Issue
Block a user