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
Overworld_DrawMap16_Persist = $1BC97C
Overworld_DrawMap16_Anywhere = $1BC983
@@ -18,7 +17,7 @@ Overworld_UseEntranceEntry:
{
PHB : PHK : PLB
JSL Overworld_UseEntrance
PLB
PLB
RTL
}
@@ -44,7 +43,7 @@ Overworld_UseEntrance:
LDA.b $2F : AND.w #$00FF : BNE .not_facing_up
LDA.l Map16Definitions+2, X
LDA.l Map16Definitions+2, X
AND.w #$41FF : CMP.w #$00E9 : BEQ .open_door
CMP.w #$0149 : BEQ .left_side_castle_door
CMP.w #$0169 : BEQ .left_side_castle_door
@@ -224,9 +223,9 @@ FindEntrance:
ValidDoorTypesExpanded_low:
dw $00FE, $00C5, $00FE, $0114 ; 00: ???, House Door, ???, ???
dw $0115, $0175, $0156, $00F5 ; 01:
dw $0115, $0175, $0156, $00F5 ; 01:
dw $00E2, $01EF, $0119, $00FE ; 02: ???, ???, ???, Desert Door
dw $0172, $0177, $013F, $0172 ; 03:
dw $0172, $0177, $013F, $0172 ; 03:
dw $0112, $0161, $0172, $014C ; 04: ???, ???, Dam Door, ???
dw $0156, $01EF, $00FE, $00FE ; 05:
dw $00FE, $010B, $0173, $0143 ; 06: ???, ???, ???, Tower of Hera
@@ -259,9 +258,9 @@ pushpc
org $1BB8BF
ValidDoorTypes_low:
dw $00FE, $00C5, $00FE, $0114 ; 00: ???, House Door, ???, ???
dw $0115, $0175, $0156, $00F5 ; 01:
dw $0115, $0175, $0156, $00F5 ; 01:
dw $00E2, $01EF, $0119, $00FE ; 02: ???, ???, ???, Desert Door
dw $0172, $0177, $013F, $0172 ; 03:
dw $0172, $0177, $013F, $0172 ; 03:
dw $0112, $0161, $0172, $014C ; 04: ???, ???, Dam Door, ???
dw $0156, $01EF, $00FE, $00FE ; 05:
dw $00FE, $010B, $0173, $0143 ; 06: ???, ???, ???, Tower of Hera
@@ -287,23 +286,23 @@ ValidDoorTypes_high:
; 0x00 - OW
; 0x00 - OW
; 0x01 - OW 32 - Link's House
; 0x02 - OW 0E - Hall of Secrets
; 0x03 - OW 4B - Shrine of Power
; 0x04 - OW
; 0x04 - OW
; 0x05 - OW 4B - Shrine of Power
; 0x06 - OW 15 - Mountain to Witch Shop Cave Start
; 0x07 - OW 0D - Mountain to Witch Shop Cave End
; 0x08 - OW XX - Available
; 0x08 - OW XX - Available
; 0x09 - OW 4B - Shrine of Power
; 0x0A - OW 0B - Kalyxo Castle Secret Courtyard
; 0x0B - OW 4B - Shrine of Power
; 0x0C - OW 50 - Shrine of Courage
; 0x0C - OW 50 - Shrine of Courage
; 0x0D - OW 18 - Mushroom House
; 0x0E - OW 18 - Old Woman House
; 0x0F - OW
; 0x10 - OW
; 0x0F - OW
; 0x10 - OW
; 0x11 - OW 0B - 1/2 Magic Cave
; 0x12 - OW 02 - Hall of Secrets Pyramid Route
; 0x13 - OW 15 - Deluxe Fairy Fountain Pond
@@ -316,7 +315,7 @@ ValidDoorTypes_high:
; 0x1A - OW 32 - Beach Cave Route
; 0x1B - OW - Beach Cave End
; 0x1C - OW 33 - Beach Cave Intro
; 0x1D - OW
; 0x1D - OW
; 0x1E - OW 0D - Snow Mountain Cave Start
; 0x1F - OW 05 - Snow Mountain Cave Portal
; 0x20 - OW 0D - Snow Mountain Cave End
@@ -341,78 +340,78 @@ ValidDoorTypes_high:
; 0x33 - OW 63 - Shrine of Wisdom
; 0x34 - OW 06 - Glacia Estate
; 0x35 - OW 30 - Dragon Ship
; 0x36 - OW
; 0x36 - OW
; 0x37 - OW 5E - Fortress of Secrets
; 0x38 - OW 11 - Healing Fairy Cave (Exit)
; 0x39 - OW
; 0x39 - OW
; 0x3A - OW 1D - Deluxe Fairy Fountain East
; 0x3B - OW 1D - Deluxe Fairy Fountain South
; 0x3C - OW
; 0x3D - OW
; 0x3C - OW
; 0x3D - OW
; 0x3E - OW 00 - Ranch Shed
; 0x3F - OW 00 - Ocarina Girls House
; 0x40 - OW 23 - Sick Boys House
; 0x41 - OW
; 0x41 - OW
; 0x42 - OW 23 - Village Tavern
; 0x43 - OW
; 0x43 - OW
; 0x44 - OW 23 - Village House
; 0x45 - OW 1E - Zora Princess House
; 0x46 - OW 23 - Village Shop
; 0x47 - OW
; 0x48 - OW
; 0x47 - OW
; 0x48 - OW
; 0x49 - OW 23 - Village Library
; 0x4A - OW
; 0x4A - OW
; 0x4B - OW 00 - Chicken House
; 0x4C - OW 0D - Witch Shop
; 0x4D - OW
; 0x4D - OW
; 0x4E - OW 1E - Zora Temple Waterfall
; 0x4F - OW 43 - Lava Cave Start
; 0x50 - OW 0E - Cave of Secrets
; 0x51 - OW 15 - Rock Heart Piece Cave
; 0x52 - OW 43 - Lava Cave End
; 0x53 - OW
; 0x54 - OW
; 0x55 - OW
; 0x56 - OW
; 0x57 - OW
; 0x58 - OW
; 0x53 - OW
; 0x54 - OW
; 0x55 - OW
; 0x56 - OW
; 0x57 - OW
; 0x58 - OW
; 0x59 - OW 1A - Archery Minigame
; 0x5A - OW
; 0x5A - OW
; 0x5B - OW 0F - Hidden Grave
; 0x5C - OW 0F - Graveyard Waterfall
; 0x5D - OW
; 0x5E - OW
; 0x5D - OW
; 0x5E - OW
; 0x5F - OW 36 - Mines Shed
; 0x60 - OW 0A - West Hotel
; 0x61 - OW 23 - Village Mayors House
; 0x62 - OW
; 0x63 - OW
; 0x62 - OW
; 0x63 - OW
; 0x64 - OW 22 - Smiths House
; 0x65 - OW Fortune Teller
; 0x66 - OW Fortune Teller
; 0x65 - OW Fortune Teller
; 0x66 - OW Fortune Teller
; 0x67 - OW 18 - Chest Minigame
; 0x68 - OW 18 - Bonzai House
; 0x69 - OW
; 0x6A - OW
; 0x69 - OW
; 0x6A - OW
; 0x6B - OW 2D - Happy Mask Salesman Shop
; 0x6C - OW
; 0x6D - OW
; 0x6E - OW
; 0x6F - OW
; 0x70 - OW
; 0x71 - OW
; 0x72 - OW
; 0x73 - OW
; 0x74 - OW
; 0x75 - OW
; 0x76 - OW
; 0x77 - OW
; 0x78 - OW
; 0x79 - OW
; 0x7A - OW
; 0x7B - OW
; 0x7C - OW
; 0x7D - OW
; 0x7E - OW
; 0x7F - OW
; 0x80 - OW
; 0x6C - OW
; 0x6D - OW
; 0x6E - OW
; 0x6F - OW
; 0x70 - OW
; 0x71 - OW
; 0x72 - OW
; 0x73 - OW
; 0x74 - OW
; 0x75 - OW
; 0x76 - OW
; 0x77 - OW
; 0x78 - OW
; 0x79 - OW
; 0x7A - OW
; 0x7B - OW
; 0x7C - OW
; 0x7D - OW
; 0x7E - OW
; 0x7F - OW
; 0x80 - OW

View File

@@ -2,7 +2,7 @@
; Lost Woods Hack
;
; Area: 29
; East Exit 2A
; East Exit 2A
; North Exit 21
; South is 31
; West is 28
@@ -15,6 +15,7 @@
!SouthArea = #$31
!EastArea = #$2A
!ComboCounter = $1CF7 ; ram address to store combo counter
!RestoreCam = $1CF8
; ==========================================================
@@ -22,79 +23,59 @@
org $02AA7D
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
; X contains the area you're moving to.
org $A0F000
LOST_WOOD_HOOK:
LOST_WOOD_HOOK:
{
CMP #$29 ; are we in the right area?
BEQ begincode
normalfinish:
{
; Overworld_ActualScreenID
; Gets the small/large map true ID of the current screen
LDA $02A5EC, x ; not right area so return.
; are we in the right area?
CMP #$29 : BEQ begincode
; not right area so return.
normalfinish:
LDA !RestoreCam : BEQ +
+
LDA Overworld_ActualScreenID, X
STZ !ComboCounter
RTL
} ; label normalfinish
begincode:
{
CPX !EastArea
BEQ normalfinish
begincode:
; Return from where we came from
CPX !EastArea : BEQ normalfinish
; from here onwards, use the ram address to determine which combo you're up to
; this code is pretty repeatable
LDA !ComboCounter
LDA !ComboCounter : CMP #$00 : BNE combo1
; did you get it right?
CPX !NorthArea : BEQ UP_CORRECT
STZ !ComboCounter
BRA RESOLVE_INCORRECT
CMP #$00
BNE combo1
CPX !NorthArea ; did you get it right?
BEQ UP_CORRECT
STZ !ComboCounter
BRA RESOLVE_INCORRECT
} ; label begincode
combo1:
CMP #$01 : BNE combo2
CPX !WestArea : BEQ LEFT_CORRECT
STZ !ComboCounter
BRA RESOLVE_INCORRECT
combo1:
{
CMP #$01
BNE combo2
CPX !WestArea ; did you get it right?
BEQ LEFT_CORRECT
STZ !ComboCounter
BRA RESOLVE_INCORRECT
} ; label comb1
combo2:
CMP #$02 : BNE combo3
CPX !SouthArea : BEQ DOWN_CORRECT
STZ !ComboCounter
BRA RESOLVE_INCORRECT
combo2:
{
CMP #$02
BNE combo3
CPX !SouthArea ; did you get it right?
BEQ DOWN_CORRECT
STZ !ComboCounter
BRA RESOLVE_INCORRECT
} ; label comb2
combo3:
{
CPX !WestArea ; did you get it right?
BNE RESOLVE_INCORRECT ; we want to load the down area, since we complete the combos
LDA #$1B
STA $012F ; play fanfare
BRA normalfinish
combo3:
; we want to load the down area, since we complete the combos
CPX !WestArea : BNE RESOLVE_INCORRECT
LDA #$1B : STA $012F ; play fanfare
BRA normalfinish
RESOLVE_INCORRECT:
CPX !NorthArea
BEQ CASE_UP
CPX !WestArea
BEQ CASE_LEFT
CPX !NorthArea : BEQ CASE_UP
CPX !WestArea : BEQ CASE_LEFT
BRA CASE_DOWN
} ; label combo3
DOWN_CORRECT:
DOWN_CORRECT:
{
INC !ComboCounter
CASE_DOWN:
@@ -116,7 +97,7 @@ LOST_WOOD_HOOK:
} ; label DOWN_CORRECT
UP_CORRECT:
UP_CORRECT:
{
INC !ComboCounter
CASE_UP:
@@ -134,11 +115,12 @@ LOST_WOOD_HOOK:
CLC
ADC #$10
STA $700
LDA.b #$01 : STA !RestoreCam
BRA all
} ; label UP_CORRECT
LEFT_CORRECT:
LEFT_CORRECT:
{
INC !ComboCounter
CASE_LEFT:
@@ -156,43 +138,9 @@ LOST_WOOD_HOOK:
INC $700
} ; label LEFT_CORRECT
all:
all:
{
LDA #$29 ; load the same area.
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,18 +1,17 @@
org $0EDE29
; $75E29-$75E48 DATA
{
; corresponding warp types that lead to special overworld areas
dw $01EF, $01EF, $00AD, $00B9
; Lost woods, Hyrule Castle Bridge, Entrance to Zora falls, and in Zora Falls...
dw $002A, $0018, $000F, $0081
; Direction Link will face when he enters the special area
dw $0008, $0008, $0008, $0008
; Exit value for the special area. In Hyrule Magic these are those White markers.
dw $0180, $0181, $0182, $0189
; corresponding warp types that lead to special overworld areas
dw $01EF, $01EF, $00AD, $00B9
; Lost woods, Hyrule Castle Bridge, Entrance to Zora falls, and in Zora Falls...
dw $002A, $0018, $000F, $0081
; Direction Link will face when he enters the special area
dw $0008, $0008, $0008, $0008
; Exit value for the special area. In Hyrule Magic these are those White markers.
dw $0180, $0181, $0182, $0189
}

View File

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

View File

@@ -66,9 +66,9 @@ pushpc
incsrc "Overworld/world_map.asm"
print "End of world_map.asm ", pc
pullpc
incsrc "Overworld/entrances.asm"
print "End of Overworld/entrances.asm ", pc
;pullpc
;incsrc "Overworld/entrances.asm"
;print "End of Overworld/entrances.asm ", pc
; =========================================================
; Get Lv2 Sword from chest
@@ -104,7 +104,7 @@ LoadDarkWorldIntro:
.not_dw_spawn
LDA.l $7EF3C5 : CMP.b #$02 : BNE .continue
; Check for maku tree progress flag
LDA.l $7EF3D6 : CMP.b #$02 : BCS .has_pearl
LDA.l $7EF3D6 : CMP.b #$02 : BCS .has_pearl
STZ.w $1B
LDA.b #$40 : STA.l $7EF3CA
RTL
@@ -145,9 +145,9 @@ LoadOverworldPitAreas:
CLC ; allow transition
RTL
}
pushpc
;pushpc
incsrc "Overworld/special_areas.asm"
; incsrc "Overworld/special_areas.asm"
Overworld_GetPitDestination = $1BB860