Disable experiment overworld entrance, area, cleanup lost woods cam

This commit is contained in:
scawful
2024-11-10 18:48:28 -05:00
parent 526ed5b20a
commit 6044a92a3a
5 changed files with 141 additions and 218 deletions

View File

@@ -1,4 +1,3 @@
Map16Definitions = $0F8000 Map16Definitions = $0F8000
Overworld_DrawMap16_Persist = $1BC97C Overworld_DrawMap16_Persist = $1BC97C
Overworld_DrawMap16_Anywhere = $1BC983 Overworld_DrawMap16_Anywhere = $1BC983

View File

@@ -15,6 +15,7 @@
!SouthArea = #$31 !SouthArea = #$31
!EastArea = #$2A !EastArea = #$2A
!ComboCounter = $1CF7 ; ram address to store combo counter !ComboCounter = $1CF7 ; ram address to store combo counter
!RestoreCam = $1CF8
; ========================================================== ; ==========================================================
@@ -22,77 +23,57 @@
org $02AA7D org $02AA7D
JSL LOST_WOOD_HOOK JSL LOST_WOOD_HOOK
; Gets the small/large map true ID of the current screen
Overworld_ActualScreenID = $02A5EC
; At this stage the accumulator contains area currently in ; At this stage the accumulator contains area currently in
; X contains the area you're moving to. ; X contains the area you're moving to.
org $A0F000 org $A0F000
LOST_WOOD_HOOK: LOST_WOOD_HOOK:
{ {
CMP #$29 ; are we in the right area? ; are we in the right area?
BEQ begincode CMP #$29 : BEQ begincode
; not right area so return.
normalfinish: normalfinish:
{ LDA !RestoreCam : BEQ +
; Overworld_ActualScreenID +
; Gets the small/large map true ID of the current screen LDA Overworld_ActualScreenID, X
LDA $02A5EC, x ; not right area so return.
STZ !ComboCounter STZ !ComboCounter
RTL RTL
} ; label normalfinish
begincode: begincode:
{ ; Return from where we came from
CPX !EastArea CPX !EastArea : BEQ normalfinish
BEQ normalfinish
; from here onwards, use the ram address to determine which combo you're up to ; from here onwards, use the ram address to determine which combo you're up to
; this code is pretty repeatable ; this code is pretty repeatable
LDA !ComboCounter LDA !ComboCounter : CMP #$00 : BNE combo1
; did you get it right?
CMP #$00 CPX !NorthArea : BEQ UP_CORRECT
BNE combo1
CPX !NorthArea ; did you get it right?
BEQ UP_CORRECT
STZ !ComboCounter STZ !ComboCounter
BRA RESOLVE_INCORRECT BRA RESOLVE_INCORRECT
} ; label begincode
combo1: combo1:
{ CMP #$01 : BNE combo2
CMP #$01 CPX !WestArea : BEQ LEFT_CORRECT
BNE combo2
CPX !WestArea ; did you get it right?
BEQ LEFT_CORRECT
STZ !ComboCounter STZ !ComboCounter
BRA RESOLVE_INCORRECT BRA RESOLVE_INCORRECT
} ; label comb1
combo2: combo2:
{ CMP #$02 : BNE combo3
CMP #$02 CPX !SouthArea : BEQ DOWN_CORRECT
BNE combo3
CPX !SouthArea ; did you get it right?
BEQ DOWN_CORRECT
STZ !ComboCounter STZ !ComboCounter
BRA RESOLVE_INCORRECT BRA RESOLVE_INCORRECT
} ; label comb2
combo3: combo3:
{ ; we want to load the down area, since we complete the combos
CPX !WestArea ; did you get it right? CPX !WestArea : BNE RESOLVE_INCORRECT
BNE RESOLVE_INCORRECT ; we want to load the down area, since we complete the combos LDA #$1B : STA $012F ; play fanfare
LDA #$1B
STA $012F ; play fanfare
BRA normalfinish BRA normalfinish
RESOLVE_INCORRECT: RESOLVE_INCORRECT:
CPX !NorthArea CPX !NorthArea : BEQ CASE_UP
BEQ CASE_UP CPX !WestArea : BEQ CASE_LEFT
CPX !WestArea
BEQ CASE_LEFT
BRA CASE_DOWN BRA CASE_DOWN
} ; label combo3
DOWN_CORRECT: DOWN_CORRECT:
{ {
@@ -134,6 +115,7 @@ LOST_WOOD_HOOK:
CLC CLC
ADC #$10 ADC #$10
STA $700 STA $700
LDA.b #$01 : STA !RestoreCam
BRA all BRA all
} ; label UP_CORRECT } ; label UP_CORRECT
@@ -161,38 +143,4 @@ LOST_WOOD_HOOK:
LDA #$29 ; load the same area. LDA #$29 ; load the same area.
RTL RTL
} }
; TODO: Restore camera values on invalid combinations.
RestoreCameraNorth:
{
LDA $700
SEC
SBC #$10
STA $700
RTS
}
RestoreCameraSouth:
{
LDA $700
CLC
ADC #$10
STA $700
RTS
}
RestoreCameraWest:
{
DEC $700
DEC $700
RTS
}
RestoreCameraEast:
{
INC $700
INC $700
RTS
}
} ; label LOST_WOOD_HOOK } ; label LOST_WOOD_HOOK

View File

@@ -1,4 +1,3 @@
org $0EDE29 org $0EDE29
; $75E29-$75E48 DATA ; $75E29-$75E48 DATA
{ {

View File

@@ -25,7 +25,7 @@ org $07866D
; 01 - Zora Temple (OW 1E) ; 01 - Zora Temple (OW 1E)
; 02 - Castle Bridge (OW 1B) ; 02 - Castle Bridge (OW 1B)
; 03 - Tail Palace (OW 2F) ; 03 - Tail Palace (OW 2F)
; 04 - TODO: Goron Mines Entrance ; 04 - Goron Mines Entrance (OW 36)
; 05 - TODO: Fortress of Secrets (OW 5E) ; 05 - TODO: Fortress of Secrets (OW 5E)
CameraCache = $0632 CameraCache = $0632
@@ -89,23 +89,13 @@ pullpc
ShakeScreen: ShakeScreen:
{ {
REP #$20 REP #$20
LDA.b $1A LDA.b $1A : AND.w #$0001 : ASL A : TAX
AND.w #$0001 LDA.l $01C961, X : STA.w $011A
ASL A LDA.l $01C965, X : STA.w $011C
TAX
LDA.l $01C961, X
STA.w $011A
LDA.l $01C965, X
STA.w $011C
.exit
SEP #$20 SEP #$20
RTS RTS
} }
; ========================================================= ; =========================================================
; Zora Temple Hidden Waterfall ; Zora Temple Hidden Waterfall
@@ -129,10 +119,8 @@ ZoraTemple_EntranceAnimation:
SEP #$20 SEP #$20
.do_anim .do_anim
LDA.b $B0 ; Get animation state ; Get animation state
ASL A LDA.b $B0 : ASL A : TAX ; x2
TAX ; x2
JSR.w (.AnimationFrames, X) JSR.w (.AnimationFrames, X)
RTL RTL
@@ -662,13 +650,9 @@ Castle_EntranceAnimation:
+ +
SEP #$20 SEP #$20
.last_frame .last_frame
; Get animation state
LDA.b $B0 ; Get animation state LDA.b $B0 : ASL A : TAX ; x2
ASL A
TAX ; x2
JSR.w (.AnimationFrames, X) JSR.w (.AnimationFrames, X)
RTL RTL
.AnimationFrames .AnimationFrames
@@ -778,8 +762,8 @@ Castle_Frame0:
Castle_Frame1: Castle_Frame1:
{ {
#_1BCC21: LDA.b #$16 ; SFX3.16 LDA.b #$16 ; SFX3.16
#_1BCC23: STA.w $012F STA.w $012F
LDA.b $C8 : BEQ .doInit ; Load the timer LDA.b $C8 : BEQ .doInit ; Load the timer
JMP .notfirstframe JMP .notfirstframe
.doInit .doInit
@@ -935,13 +919,8 @@ Castle_Frame3:
TailPalace_EntranceAnimation: TailPalace_EntranceAnimation:
{ {
LDA.b $B0 : ASL A : TAX ; x2
LDA.b $B0 ; Get animation state
ASL A
TAX ; x2
JSR.w (.AnimationFrames, X) JSR.w (.AnimationFrames, X)
RTL RTL
.AnimationFrames .AnimationFrames
@@ -1033,12 +1012,10 @@ TailPalace_EntranceAnimation:
Goron_EntranceAnimation: Goron_EntranceAnimation:
{ {
LDA.b $B0 ; Get animation state LDA.b $B0 : ASL A : TAX ; x2
ASL A
TAX ; x2
JSR.w (.AnimationFrames, X) JSR.w (.AnimationFrames, X)
RTL RTL
.AnimationFrames .AnimationFrames
dw Goron_Frame0 dw Goron_Frame0
dw Goron_Frame1 dw Goron_Frame1

View File

@@ -66,9 +66,9 @@ pushpc
incsrc "Overworld/world_map.asm" incsrc "Overworld/world_map.asm"
print "End of world_map.asm ", pc print "End of world_map.asm ", pc
pullpc ;pullpc
incsrc "Overworld/entrances.asm" ;incsrc "Overworld/entrances.asm"
print "End of Overworld/entrances.asm ", pc ;print "End of Overworld/entrances.asm ", pc
; ========================================================= ; =========================================================
; Get Lv2 Sword from chest ; Get Lv2 Sword from chest
@@ -145,9 +145,9 @@ LoadOverworldPitAreas:
CLC ; allow transition CLC ; allow transition
RTL RTL
} }
pushpc ;pushpc
incsrc "Overworld/special_areas.asm" ; incsrc "Overworld/special_areas.asm"
Overworld_GetPitDestination = $1BB860 Overworld_GetPitDestination = $1BB860