Merge branch 'OWMain' into overworld_kara
This commit is contained in:
@@ -18,6 +18,14 @@ DoWorldFix:
|
|||||||
LDA #$00
|
LDA #$00
|
||||||
.noMirror
|
.noMirror
|
||||||
STA $7EF3CA ; set flag to light world
|
STA $7EF3CA ; set flag to light world
|
||||||
|
LDA.l SmithDeleteOnSave : BEQ .transform
|
||||||
|
LDA $7EF3CC
|
||||||
|
CMP #$07 : BEQ .clear ; clear frog
|
||||||
|
CMP #$08 : BEQ .clear ; clear dwarf - consider flute implications
|
||||||
|
BRA .done
|
||||||
|
.clear
|
||||||
|
LDA.b #$00 : STA $7EF3CC : BRA .done ; clear follower
|
||||||
|
.transform
|
||||||
LDA $7EF3CC : CMP #$07 : BNE .done : INC : STA $7EF3CC ; convert frog to dwarf
|
LDA $7EF3CC : CMP #$07 : BNE .done : INC : STA $7EF3CC ; convert frog to dwarf
|
||||||
.done
|
.done
|
||||||
RTL
|
RTL
|
||||||
@@ -52,12 +60,15 @@ DoWorldFix_Inverted:
|
|||||||
.noMirror
|
.noMirror
|
||||||
.aga1Alive
|
.aga1Alive
|
||||||
LDA #$40 : STA $7EF3CA ; set flag to dark world
|
LDA #$40 : STA $7EF3CA ; set flag to dark world
|
||||||
LDA $7EF3CC
|
LDA.l SmithDeleteOnSave : BEQ .transform
|
||||||
CMP #$07 : BEQ .clear ; clear frog
|
LDA $7EF3CC
|
||||||
CMP #$08 : BEQ .clear ; clear dwarf - consider flute implications
|
CMP #$07 : BEQ .clear ; clear frog
|
||||||
BRA .done
|
CMP #$08 : BEQ .clear ; clear dwarf - consider flute implications
|
||||||
.clear
|
BRA .done
|
||||||
LDA.b #$00 : STA $7EF3CC ; clear follower
|
.clear
|
||||||
|
LDA.b #$00 : STA $7EF3CC : BRA .done ; clear follower
|
||||||
|
.transform
|
||||||
|
LDA $7EF3CC : CMP #$07 : BNE .done : INC : STA $7EF3CC ; convert frog to dwarf
|
||||||
.done
|
.done
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -125,6 +125,11 @@ org $07a955 ; <- Bank07.asm : around 6564 (JP is a bit different) (STZ $05FC : S
|
|||||||
jsl BlockEraseFix
|
jsl BlockEraseFix
|
||||||
nop #2
|
nop #2
|
||||||
|
|
||||||
|
org $02A0A8
|
||||||
|
Mirror_SaveRoomData:
|
||||||
|
org $07A95B ; < bank_07.asm ; #_07A95B: JSL Mirror_SaveRoomData
|
||||||
|
jsl EGFixOnMirror
|
||||||
|
|
||||||
org $02b82a
|
org $02b82a
|
||||||
jsl FixShopCode
|
jsl FixShopCode
|
||||||
|
|
||||||
|
|||||||
13
events.asm
13
events.asm
@@ -198,8 +198,17 @@ RTL
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnLinkDamagedFromPit:
|
OnLinkDamagedFromPit:
|
||||||
JSL.l OHKOTimer
|
JSL.l OHKOTimer
|
||||||
LDA.b #$14 : STA $11 ; thing we wrote over
|
|
||||||
RTL
|
LDA.l AllowAccidentalMajorGlitch
|
||||||
|
BEQ ++
|
||||||
|
-- LDA.b #$14 : STA $11 ; thing we wrote over
|
||||||
|
|
||||||
|
RTL
|
||||||
|
|
||||||
|
++ LDA.b $10 : CMP.b #$12 : BNE --
|
||||||
|
|
||||||
|
STZ.b $11
|
||||||
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
OnLinkDamagedFromPitOutdoors:
|
OnLinkDamagedFromPitOutdoors:
|
||||||
JML.l OHKOTimer ; make sure this is last
|
JML.l OHKOTimer ; make sure this is last
|
||||||
|
|||||||
@@ -2787,8 +2787,8 @@ org $0AEEF2
|
|||||||
org $008BE5 ; hijack stripes for boss GFX transfer
|
org $008BE5 ; hijack stripes for boss GFX transfer
|
||||||
JSL DoDungeonMapBossIcon
|
JSL DoDungeonMapBossIcon
|
||||||
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
; Terrorpin AI fix
|
; Terrorpin AI fix
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $1EB2B1 ; sprite_terrorpin.asm(57) : AND.b #$03 : STA $0DE0, X ; 5 bytes
|
org $1EB2B1 ; sprite_terrorpin.asm(57) : AND.b #$03 : STA $0DE0, X ; 5 bytes
|
||||||
JSL FixTerrorpin ; 4 bytes
|
JSL FixTerrorpin ; 4 bytes
|
||||||
|
|||||||
@@ -861,7 +861,7 @@ RTS
|
|||||||
|
|
||||||
map051:
|
map051:
|
||||||
{
|
{
|
||||||
LDA #$0034 : STA $22A8
|
LDA #$037D : STA $22A8
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,8 +73,9 @@ TrapDoorFixer:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
Cleanup:
|
Cleanup:
|
||||||
stz $047a
|
lda.l DRFlags : and #$10 : beq +
|
||||||
inc $11
|
stz $047a
|
||||||
|
+ inc $11
|
||||||
lda $ef
|
lda $ef
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,12 @@ MirrorCheckOverride:
|
|||||||
rtl
|
rtl
|
||||||
+ lda.l DRScroll : rtl
|
+ lda.l DRScroll : rtl
|
||||||
|
|
||||||
|
EGFixOnMirror:
|
||||||
|
lda.l DRFlags : and #$10 : beq +
|
||||||
|
stz $047a
|
||||||
|
+ jsl Mirror_SaveRoomData
|
||||||
|
rtl
|
||||||
|
|
||||||
BlockEraseFix:
|
BlockEraseFix:
|
||||||
lda $7ef353 : and #$02 : beq +
|
lda $7ef353 : and #$02 : beq +
|
||||||
stz $05fc : stz $05fd
|
stz $05fc : stz $05fd
|
||||||
|
|||||||
65
owrando.asm
65
owrando.asm
@@ -12,6 +12,10 @@ dw 0
|
|||||||
org $02a999
|
org $02a999
|
||||||
jsl OWEdgeTransition : nop #4 ;LDA $02A4E3,X : ORA $7EF3CA
|
jsl OWEdgeTransition : nop #4 ;LDA $02A4E3,X : ORA $7EF3CA
|
||||||
|
|
||||||
|
; whirlpool shuffle cross world change
|
||||||
|
org $02b3bd
|
||||||
|
jsl OWWhirlpoolUpdate ;JSL $02EA6C
|
||||||
|
|
||||||
; flute menu cancel
|
; flute menu cancel
|
||||||
org $0ab7af ;LDA $F2 : ORA $F0 : AND #$C0
|
org $0ab7af ;LDA $F2 : ORA $F0 : AND #$C0
|
||||||
jml OWFluteCancel2 : nop
|
jml OWFluteCancel2 : nop
|
||||||
@@ -121,6 +125,16 @@ OWWorldCheck16:
|
|||||||
plx : and.w #$00ff : rtl
|
plx : and.w #$00ff : rtl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OWWhirlpoolUpdate:
|
||||||
|
{
|
||||||
|
jsl $02ea6c ; what we wrote over
|
||||||
|
lda.l OWFlags : and #$01 : bne +
|
||||||
|
lda.l OWMode+1 : and #$02 : beq .return
|
||||||
|
+ ldx $8a : jsr OWWorldUpdate
|
||||||
|
.return
|
||||||
|
rtl
|
||||||
|
}
|
||||||
|
|
||||||
OWFluteCancel:
|
OWFluteCancel:
|
||||||
{
|
{
|
||||||
lda.l OWFlags+1 : and #$01 : bne +
|
lda.l OWFlags+1 : and #$01 : bne +
|
||||||
@@ -338,32 +352,39 @@ OWNewDestination:
|
|||||||
sep #$30 : lda OWOppSlotOffset,y : !add $04 : asl : and #$7f : sta $700
|
sep #$30 : lda OWOppSlotOffset,y : !add $04 : asl : and #$7f : sta $700
|
||||||
|
|
||||||
; crossed OW shuffle
|
; crossed OW shuffle
|
||||||
LDA.l OWMode+1 : AND.b #!FLAG_OW_CROSSED : beq .return
|
lda.l OWMode+1 : and.b #!FLAG_OW_CROSSED : beq .return
|
||||||
ldx $05 : lda.l OWTileWorldAssoc,x : cmp.l $7ef3ca : beq .return
|
ldx $05 : jsr OWWorldUpdate
|
||||||
sta.l $7ef3ca ; change world
|
|
||||||
lda #$38 : sta $012f ; play sfx - #$3b is an alternative
|
|
||||||
|
|
||||||
; toggle bunny mode
|
|
||||||
+ lda $7ef357 : bne .nobunny
|
|
||||||
lda.l InvertedMode : bne .inverted
|
|
||||||
lda $7ef3ca : and.b #$40 : bra +
|
|
||||||
.inverted lda $7ef3ca : and.b #$40 : eor #$40
|
|
||||||
+ cmp #$40 : bne .nobunny
|
|
||||||
; turn into bunny
|
|
||||||
lda $5d : cmp #$04 : beq + ; if swimming, continue
|
|
||||||
lda #$17 : sta $5d
|
|
||||||
+ lda #$01 : sta $02e0 : sta $56
|
|
||||||
bra .return
|
|
||||||
|
|
||||||
.nobunny
|
|
||||||
lda $5d : cmp #$17 : bne + ; retain current state unless bunny
|
|
||||||
stz $5d
|
|
||||||
+ stz $02e0 : stz $56
|
|
||||||
|
|
||||||
.return
|
.return
|
||||||
lda $05 : sta $8a
|
lda $05 : sta $8a
|
||||||
rep #$30 : rts
|
rep #$30 : rts
|
||||||
}
|
}
|
||||||
|
OWWorldUpdate: ; x = owid of destination screen
|
||||||
|
{
|
||||||
|
lda.l OWTileWorldAssoc,x : cmp.l $7ef3ca : beq .return
|
||||||
|
sta.l $7ef3ca ; change world
|
||||||
|
lda #$38 : sta $012f ; play sfx - #$3b is an alternative
|
||||||
|
|
||||||
|
; toggle bunny mode
|
||||||
|
+ lda $7ef357 : bne .nobunny
|
||||||
|
lda.l InvertedMode : bne .inverted
|
||||||
|
lda $7ef3ca : and.b #$40 : bra +
|
||||||
|
.inverted lda $7ef3ca : and.b #$40 : eor #$40
|
||||||
|
+ cmp #$40 : bne .nobunny
|
||||||
|
; turn into bunny
|
||||||
|
lda $5d : cmp #$04 : beq + ; if swimming, continue
|
||||||
|
lda #$17 : sta $5d
|
||||||
|
+ lda #$01 : sta $02e0 : sta $56
|
||||||
|
bra .return
|
||||||
|
|
||||||
|
.nobunny
|
||||||
|
lda $5d : cmp #$17 : bne + ; retain current state unless bunny
|
||||||
|
stz $5d
|
||||||
|
+ stz $02e0 : stz $56
|
||||||
|
|
||||||
|
.return
|
||||||
|
rts
|
||||||
|
}
|
||||||
|
|
||||||
;Data
|
;Data
|
||||||
org $aaa000
|
org $aaa000
|
||||||
@@ -523,7 +544,7 @@ OWNorthEdges:
|
|||||||
; Min Max Width Mid OW Slot/OWID VRAM *FREE* Dest Index
|
; Min Max Width Mid OW Slot/OWID VRAM *FREE* Dest Index
|
||||||
dw $00a0, $00a0, $0000, $00a0, $0000, $0000, $0000, $0040 ;Lost Woods
|
dw $00a0, $00a0, $0000, $00a0, $0000, $0000, $0000, $0040 ;Lost Woods
|
||||||
dw $0458, $0540, $00e8, $04cc, $0a0a, $0000, $0000, $0000
|
dw $0458, $0540, $00e8, $04cc, $0a0a, $0000, $0000, $0000
|
||||||
dw $0f70, $0f90, $0020, $0f80, $0f0f, $0000, $0000, $0041
|
dw $0f38, $0f60, $0028, $0f4c, $0f0f, $0000, $0000, $0041
|
||||||
dw $0058, $0058, $0000, $0058, $1010, $0000, $0000, $0001
|
dw $0058, $0058, $0000, $0058, $1010, $0000, $0000, $0001
|
||||||
dw $0178, $0178, $0000, $0178, $1010, $0000, $0000, $0002
|
dw $0178, $0178, $0000, $0178, $1010, $0000, $0000, $0002
|
||||||
dw $0388, $0388, $0000, $0388, $1111, $0000, $0000, $0003
|
dw $0388, $0388, $0000, $0388, $1111, $0000, $0000, $0003
|
||||||
|
|||||||
@@ -270,6 +270,10 @@ CrystalPendantFlags_2:
|
|||||||
;Pendant: $00
|
;Pendant: $00
|
||||||
;Crystal: $40
|
;Crystal: $40
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
org $30805D ; PC 0x18005D
|
||||||
|
SmithDeleteOnSave:
|
||||||
|
db #$00 ; #$00 = Off (default) - #$01 = On (frog/smith gets deleted on S+Q)
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
org $30805E ; PC 0x18005E - Number of crystals required to enter GT
|
org $30805E ; PC 0x18005E - Number of crystals required to enter GT
|
||||||
NumberOfCrystalsRequiredForTower:
|
NumberOfCrystalsRequiredForTower:
|
||||||
db #$07 ; #$07 = 7 Crystals
|
db #$07 ; #$07 = 7 Crystals
|
||||||
|
|||||||
Reference in New Issue
Block a user