Pull in OW Fog and Grid Map #2
40
owrando.asm
40
owrando.asm
@@ -11,13 +11,11 @@ OWVersionInfo:
|
|||||||
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
|
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
|
||||||
|
|
||||||
;Hooks
|
;Hooks
|
||||||
org $82a929
|
org $82a92C
|
||||||
OWDetectTransitionReturn:
|
JSL OWDetectEdgeTransition ; JSL Link_CheckForEdgeScreenTransition
|
||||||
|
|
||||||
org $82a939
|
org $82a936
|
||||||
OverworldHandleTransitions_SpecialTrigger:
|
OverworldHandleTransitions_PerformEdgeTransition:
|
||||||
JSL OWDetectEdgeTransition
|
|
||||||
BCS OWDetectTransitionReturn
|
|
||||||
|
|
||||||
org $82a999
|
org $82a999
|
||||||
jsl OWEdgeTransition : nop #4 ;LDA $02A4E3,X : ORA $7EF3CA
|
jsl OWEdgeTransition : nop #4 ;LDA $02A4E3,X : ORA $7EF3CA
|
||||||
@@ -734,20 +732,29 @@ OWBonkSpritePrep:
|
|||||||
org $aa9000
|
org $aa9000
|
||||||
OWDetectEdgeTransition:
|
OWDetectEdgeTransition:
|
||||||
{
|
{
|
||||||
JSL OWDestroyItemSprites
|
JSL Link_CheckForEdgeScreenTransition ; what we wrote over
|
||||||
|
BCS .return
|
||||||
STZ.w RandoOverworldWalkDist
|
STZ.w RandoOverworldWalkDist
|
||||||
LDA.l OWMode : ORA.l OWMode+1 : BEQ .vanilla
|
LDA.l OWMode : ORA.l OWMode+1 : BEQ .vanilla
|
||||||
|
PHY
|
||||||
JSR OWShuffle
|
JSR OWShuffle
|
||||||
LDA.w RandoOverworldTargetEdge : BMI .special
|
PLY
|
||||||
|
LDA.w RandoOverworldTargetEdge : BMI .specialOrDisabled
|
||||||
.vanilla
|
.vanilla
|
||||||
REP #$31 : LDX.b Scrap02 : LDA.b OverworldMap16Buffer ; what we wrote over
|
CLC ; allow transition
|
||||||
RTL
|
RTL
|
||||||
|
.specialOrDisabled
|
||||||
|
CMP.b #$FF : BNE .special
|
||||||
|
STZ.w RandoOverworldTargetEdge
|
||||||
|
PHB
|
||||||
|
JML Link_CheckForEdgeScreenTransition_prevent_transition
|
||||||
.special
|
.special
|
||||||
REP #$30
|
REP #$30
|
||||||
AND.w #$0003 : TAY : ASL : TAX
|
AND.w #$0003 : TAY : ASL : TAX
|
||||||
LDA.w #$007F : STA.w RandoOverworldTargetEdge
|
LDA.w #$007F : STA.w RandoOverworldTargetEdge
|
||||||
JSR OWLoadSpecialArea
|
JSR OWLoadSpecialArea
|
||||||
SEC
|
SEC
|
||||||
|
.return
|
||||||
RTL
|
RTL
|
||||||
}
|
}
|
||||||
OWDetectSpecialTransition:
|
OWDetectSpecialTransition:
|
||||||
@@ -757,17 +764,23 @@ OWDetectSpecialTransition:
|
|||||||
TXA : AND.w #$0002 : LSR
|
TXA : AND.w #$0002 : LSR
|
||||||
STA.w RandoOverworldTerrain
|
STA.w RandoOverworldTerrain
|
||||||
LDA.l OWSpecialDestIndex,X : BIT.w #$0080 : BEQ .switch_to_edge
|
LDA.l OWSpecialDestIndex,X : BIT.w #$0080 : BEQ .switch_to_edge
|
||||||
|
AND.w #$00FF : CMP.w #$00FF : BEQ .disabled
|
||||||
AND.w #$0003 : TAY : ASL : TAX
|
AND.w #$0003 : TAY : ASL : TAX
|
||||||
.normal
|
.normal
|
||||||
JSR OWLoadSpecialArea
|
JSR OWLoadSpecialArea
|
||||||
.return
|
.return
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
|
.disabled
|
||||||
|
SEP #$30
|
||||||
|
STZ.w RandoOverworldTargetEdge
|
||||||
|
RTL
|
||||||
|
|
||||||
.switch_to_edge
|
.switch_to_edge
|
||||||
STA.w RandoOverworldTargetEdge
|
STA.w RandoOverworldTargetEdge
|
||||||
LDA.l OWEdgeDataOffset,X : STA.w RandoOverworldEdgeAddr
|
LDA.l OWEdgeDataOffset,X : STA.w RandoOverworldEdgeAddr
|
||||||
PLA : SEP #$30 : PLA ; delete 3 bytes from stack
|
PLA : SEP #$30 : PLA ; delete 3 bytes from stack
|
||||||
JSL Link_CheckForEdgeScreenTransition : BCS .return ; Link_CheckForEdgeScreenTransition
|
JSL Link_CheckForEdgeScreenTransition : BCS .return
|
||||||
LDA.l Overworld_CheckForSpecialOverworldTrigger_Direction,X : STA.b Scrap00 : CMP.b #$08 : BNE .hobo
|
LDA.l Overworld_CheckForSpecialOverworldTrigger_Direction,X : STA.b Scrap00 : CMP.b #$08 : BNE .hobo
|
||||||
LSR : STA.b LinkPosY : STZ.b BG2V ; move Link and camera to edge
|
LSR : STA.b LinkPosY : STZ.b BG2V ; move Link and camera to edge
|
||||||
LDA.b #$06 : STA.b Scrap02
|
LDA.b #$06 : STA.b Scrap02
|
||||||
@@ -786,16 +799,15 @@ OWDetectSpecialTransition:
|
|||||||
LDA.b #$FF : STA.b LinkRecoilZ : STA.b $C7
|
LDA.b #$FF : STA.b LinkRecoilZ : STA.b $C7
|
||||||
STZ.b $3D : STZ.b LinkSpeed : STZ.w $032B : STZ.w LinkDashing : STZ.b LinkState
|
STZ.b $3D : STZ.b LinkSpeed : STZ.w $032B : STZ.w LinkDashing : STZ.b LinkState
|
||||||
.not_dashing
|
.not_dashing
|
||||||
PLA : REP #$31 : PLA ; delete 3 bytes from stack
|
PLA : PLA : PLA ; delete 3 bytes from stack
|
||||||
LDX.b Scrap02
|
JML OverworldHandleTransitions_PerformEdgeTransition
|
||||||
LDA.b OverworldMap16Buffer
|
|
||||||
JML OverworldHandleTransitions_SpecialTrigger+6
|
|
||||||
}
|
}
|
||||||
OWEdgeTransition:
|
OWEdgeTransition:
|
||||||
{
|
{
|
||||||
LDA.l OWMode : ORA.l OWMode+1 : BEQ .unshuffled
|
LDA.l OWMode : ORA.l OWMode+1 : BEQ .unshuffled
|
||||||
LDY.w RandoOverworldTargetEdge : STZ.w RandoOverworldTargetEdge
|
LDY.w RandoOverworldTargetEdge : STZ.w RandoOverworldTargetEdge
|
||||||
CPY.b #$7F : BEQ .unshuffled
|
CPY.b #$7F : BEQ .unshuffled
|
||||||
|
JSL OWDestroyItemSprites
|
||||||
REP #$10
|
REP #$10
|
||||||
LDX.w RandoOverworldEdgeAddr
|
LDX.w RandoOverworldEdgeAddr
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ HandleFollowersAfterMirroring = $87AA8B
|
|||||||
LinkHop_FindArbitraryLandingSpot = $87E359
|
LinkHop_FindArbitraryLandingSpot = $87E359
|
||||||
Link_HandleMovingAnimation_FullLongEntry = $87E68F
|
Link_HandleMovingAnimation_FullLongEntry = $87E68F
|
||||||
Link_CheckForEdgeScreenTransition = $87F413
|
Link_CheckForEdgeScreenTransition = $87F413
|
||||||
|
Link_CheckForEdgeScreenTransition_prevent_transition = $87F42C
|
||||||
Sprite_CheckIfPlayerPreoccupied = $87F4AA
|
Sprite_CheckIfPlayerPreoccupied = $87F4AA
|
||||||
FlashGanonTowerPalette_next_thunder = $87FA81
|
FlashGanonTowerPalette_next_thunder = $87FA81
|
||||||
FlashGanonTowerPalette_bright_white = $87FAAC
|
FlashGanonTowerPalette_bright_white = $87FAAC
|
||||||
|
|||||||
Reference in New Issue
Block a user