Made world checks table-based rather than based on OW ID
This commit is contained in:
@@ -49,7 +49,7 @@ DecideIfBunnyByScreenIndex:
|
|||||||
; superbunny work
|
; superbunny work
|
||||||
LDA $1B : BNE .done
|
LDA $1B : BNE .done
|
||||||
LDA $7EF357 : BNE .done
|
LDA $7EF357 : BNE .done
|
||||||
LDA $8A : AND.b #$40 : PHA
|
PHX : LDX $8A : LDA.l OWTileWorldAssoc, X : PLX : PHA
|
||||||
LDA.l InvertedMode : BNE .inverted
|
LDA.l InvertedMode : BNE .inverted
|
||||||
.normal
|
.normal
|
||||||
PLA : EOR #$40
|
PLA : EOR #$40
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ JMP DoWorldFix
|
|||||||
JMP DoWorldFix_Inverted_skip_mirror_check
|
JMP DoWorldFix_Inverted_skip_mirror_check
|
||||||
|
|
||||||
.castle
|
.castle
|
||||||
LDA #$00 : STA $7EF3CA ; set flag to dark world
|
LDA #$00 : STA $7EF3CA ; set flag to light world
|
||||||
LDA $7EF3CC : CMP #$07 : BNE + : LDA.b #$08 : STA $7EF3CC : + ; convert frog to dwarf
|
LDA $7EF3CC : CMP #$07 : BNE + : LDA.b #$08 : STA $7EF3CC : + ; convert frog to dwarf
|
||||||
.done
|
.done
|
||||||
RTL
|
RTL
|
||||||
@@ -84,7 +84,9 @@ RTL
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
FakeWorldFix:
|
FakeWorldFix:
|
||||||
LDA FixFakeWorld : BEQ +
|
LDA FixFakeWorld : BEQ +
|
||||||
LDA $8A : AND.b #$40 : STA $7EF3CA
|
PHX
|
||||||
|
LDX $8A : LDA.l OWTileWorldAssoc, X : STA $7EF3CA
|
||||||
|
PLX
|
||||||
+
|
+
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ PreventEnterOnBonk:
|
|||||||
STA $00 ; part of what we wrote over
|
STA $00 ; part of what we wrote over
|
||||||
LDA.l InvertedMode : AND.w #$00FF : BEQ .done
|
LDA.l InvertedMode : AND.w #$00FF : BEQ .done
|
||||||
LDA.l $5D : AND.w #$00FF : CMP.w #$0014 : BNE .done ;in mirror mode?
|
LDA.l $5D : AND.w #$00FF : CMP.w #$0014 : BNE .done ;in mirror mode?
|
||||||
LDA.b $8A : AND.w #$0040 : CMP $7B : BEQ .done ; Are we bonking, or doing the superbunny glitch?
|
LDA.b $8A : TAX : LDA.l OWTileWorldAssoc, X : AND.w #$00FF : CMP $7B : BEQ .done ; Are we bonking, or doing the superbunny glitch?
|
||||||
|
|
||||||
; If in inverted, are in mirror mode, and are bonking then do not enter
|
; If in inverted, are in mirror mode, and are bonking then do not enter
|
||||||
JML.l PreventEnterOnBonk_BRANCH_IX
|
JML.l PreventEnterOnBonk_BRANCH_IX
|
||||||
@@ -202,15 +202,15 @@ TurtleRockEntranceFix:
|
|||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
AnimatedEntranceFix: ;when an entrance animation tries to start
|
AnimatedEntranceFix: ;when an entrance animation tries to start
|
||||||
PHA
|
PHA : PHX
|
||||||
LDA.l InvertedMode : BEQ + ;If we are in inverted mode
|
LDA.l InvertedMode : BEQ + ;If we are in inverted mode
|
||||||
LDA $8A : AND.b #$40 : BNE + ;and in the light world
|
LDX $8A : LDA.l OWTileWorldAssoc, X : BNE + ;and in the light world
|
||||||
PLA
|
PLX : PLA
|
||||||
STZ $04C6 ; skip it.
|
STZ $04C6 ; skip it.
|
||||||
LDA #$00
|
LDA #$00
|
||||||
RTL
|
RTL
|
||||||
+
|
+
|
||||||
PLA
|
PLX : PLA
|
||||||
STA $02E4 ;what we wrote over
|
STA $02E4 ;what we wrote over
|
||||||
STA $0FC1 ;what we wrote over
|
STA $0FC1 ;what we wrote over
|
||||||
STA $0710 ;what we wrote over
|
STA $0710 ;what we wrote over
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ MirrorBonk:
|
|||||||
; otherwise fall through to .normal
|
; otherwise fall through to .normal
|
||||||
PHX : PHP
|
PHX : PHP
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
LDA $8A : AND.b #$40 : BEQ .endLoop ;World we're in? branch if we are in LW we don't want bonks
|
LDX $8A : LDA.l OWTileWorldAssoc, X : BEQ .endLoop ;World we're in? branch if we are in LW we don't want bonks
|
||||||
REP #$30
|
REP #$30
|
||||||
LDX #$0000
|
LDX #$0000
|
||||||
.loop
|
.loop
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Overworld_LoadNewTiles:
|
|||||||
+
|
+
|
||||||
|
|
||||||
SEP #$30
|
SEP #$30
|
||||||
LDA InvertedMode : BEQ .notInverted
|
LDX $8A : LDA.l OWTileMapAlt, X : BEQ .notInverted
|
||||||
PHB
|
PHB
|
||||||
|
|
||||||
; Set the data bank to $7E.
|
; Set the data bank to $7E.
|
||||||
|
|||||||
@@ -270,7 +270,8 @@ Multiworld_Ancilla_ReceiveItem_stillInMotion:
|
|||||||
|
|
||||||
Multiworld_ConsumingFire_TransmuteToSkullWoodsFire:
|
Multiworld_ConsumingFire_TransmuteToSkullWoodsFire:
|
||||||
{
|
{
|
||||||
LDA $8A : AND.b #$40 : BEQ .failed ; things we wrote over
|
;LDA $8A : AND.b #$40 : BEQ .failed ; things we wrote over
|
||||||
|
PHX : LDX $8A : LDA.l OWTileWorldAssoc, X : PLX : AND.b #$FF : BEQ .failed
|
||||||
LDA $0C4A : CMP #$22 : BEQ .failed
|
LDA $0C4A : CMP #$22 : BEQ .failed
|
||||||
LDA $0C4B : CMP #$22 : BEQ .failed
|
LDA $0C4B : CMP #$22 : BEQ .failed
|
||||||
LDA $0C4C : CMP #$22 : BEQ .failed
|
LDA $0C4C : CMP #$22 : BEQ .failed
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ OnFileLoadOverride:
|
|||||||
MirrorCheckOverride:
|
MirrorCheckOverride:
|
||||||
lda.l DRFlags : and #$02 : beq ++
|
lda.l DRFlags : and #$02 : beq ++
|
||||||
lda $7ef353 : cmp #$01 : beq +
|
lda $7ef353 : cmp #$01 : beq +
|
||||||
++ lda $8A : and #$40 ; what I wrote over
|
;++ lda $8A : and #$40 ; what I wrote over
|
||||||
|
++ phx : ldx $8A : lda.l OWTileWorldAssoc,x : plx : and.b #$ff
|
||||||
rtl
|
rtl
|
||||||
+ lda.l DRScroll : rtl
|
+ lda.l DRScroll : rtl
|
||||||
|
|
||||||
|
|||||||
94
owrando.asm
94
owrando.asm
@@ -12,6 +12,48 @@ dw 0
|
|||||||
org $02a999
|
org $02a999
|
||||||
jsl OWEdgeTransition : nop #4 ;LDA $02A4E3,X : ORA $7EF3CA
|
jsl OWEdgeTransition : nop #4 ;LDA $02A4E3,X : ORA $7EF3CA
|
||||||
|
|
||||||
|
;(replacing -> LDA $8A : AND.b #$40)
|
||||||
|
org $00d8c4 ; < ? - Bank00.asm 4068 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $0283dc ; < ? - Bank02.asm 816 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $02aa36 ; < ? - Bank02.asm 6559 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $02aeca ; < ? - Bank02.asm 7257 ()
|
||||||
|
jsl.l OWWorldCheck16 : nop
|
||||||
|
org $02b349 ; < ? - Bank02.asm 7902 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $02c40a ; < ? - Bank02.asm 10547 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $05afd9 ; < ? - sprite_warp_vortex.asm 60 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $07a3f0 ; < ? - Bank07.asm 5772 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $07a967 ; < ? - Bank07.asm 6578 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $07a9a1 ; < ? - Bank07.asm 6622 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $07a9ed ; < ? - Bank07.asm 6677 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $07aa34 ; < ? - Bank07.asm 6718 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $08d408 ; < ? - ancilla_morph_poof.asm 48 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $0aba6c ; < ? - Bank0a.asm 474 ()
|
||||||
|
jsl.l OWWorldCheck16 : nop
|
||||||
|
org $0aba99 ; < ? - Bank0a.asm 515 ()
|
||||||
|
jsl.l OWWorldCheck
|
||||||
|
org $0bfeab ; < ? - Bank0b.asm 36 ()
|
||||||
|
jsl.l OWWorldCheck16 : nop
|
||||||
|
org $0cffb6 ; < ? - ?.asm ? ()
|
||||||
|
jsl.l OWWorldCheck16 : nop
|
||||||
|
org $0cffe8 ; < ? - ?.asm ? ()
|
||||||
|
jsl.l OWWorldCheck16 : nop
|
||||||
|
org $1beca2 ; < ? - palettes.asm 556 ()
|
||||||
|
jsl.l OWWorldCheck16 : nop
|
||||||
|
org $1bed95 ; < ? - palettes.asm 748 ()
|
||||||
|
jsl.l OWWorldCheck16 : nop
|
||||||
|
|
||||||
;Code
|
;Code
|
||||||
org $aa8800
|
org $aa8800
|
||||||
OWCoordIndex: ; Horizontal 1st
|
OWCoordIndex: ; Horizontal 1st
|
||||||
@@ -35,6 +77,19 @@ db 2, 2, 0, 0 ; For OWCameraRange
|
|||||||
OWCameraRange:
|
OWCameraRange:
|
||||||
dw $011E, $0100 ; Length of the range the camera can move on small screens
|
dw $011E, $0100 ; Length of the range the camera can move on small screens
|
||||||
|
|
||||||
|
OWWorldCheck:
|
||||||
|
{
|
||||||
|
phx
|
||||||
|
ldx $8a : lda.l OWTileWorldAssoc,x
|
||||||
|
plx : and.b #$ff : rtl
|
||||||
|
}
|
||||||
|
OWWorldCheck16:
|
||||||
|
{
|
||||||
|
phx
|
||||||
|
ldx $8a : lda.l OWTileWorldAssoc,x
|
||||||
|
plx : and.w #$00ff : rtl
|
||||||
|
}
|
||||||
|
|
||||||
org $aa9000
|
org $aa9000
|
||||||
OWEdgeTransition:
|
OWEdgeTransition:
|
||||||
{
|
{
|
||||||
@@ -660,3 +715,42 @@ dw $0f78, $0fb8, $0040, $0f98, $7c7c, $0000, $0000, $0048
|
|||||||
dw $0f20, $0f40, $0020, $0f30, $757e, $0000, $0000, $0049
|
dw $0f20, $0f40, $0020, $0f30, $757e, $0000, $0000, $0049
|
||||||
dw $0f70, $0fb8, $0048, $0f94, $757e, $0000, $0000, $004a
|
dw $0f70, $0fb8, $0048, $0f94, $757e, $0000, $0000, $004a
|
||||||
dw $0058, $00c0, $0068, $008c, $8080, $0000, $0000, $0017 ;Hobo
|
dw $0058, $00c0, $0068, $008c, $8080, $0000, $0000, $0017 ;Hobo
|
||||||
|
|
||||||
|
org $aaba00 ;PC 153a00
|
||||||
|
OWTileWorldAssoc:
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db $40, $40, $40, $40, $40, $40, $40, $40
|
||||||
|
db $40, $40, $40, $40, $40, $40, $40, $40
|
||||||
|
db $40, $40, $40, $40, $40, $40, $40, $40
|
||||||
|
db $40, $40, $40, $40, $40, $40, $40, $40
|
||||||
|
db $40, $40, $40, $40, $40, $40, $40, $40
|
||||||
|
db $40, $40, $40, $40, $40, $40, $40, $40
|
||||||
|
db $40, $40, $40, $40, $40, $40, $40, $40
|
||||||
|
db $40, $40, $40, $40, $40, $40, $40, $40
|
||||||
|
|
||||||
|
org $aabb00 ;PC 153b00
|
||||||
|
OWTileMapAlt:
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
db 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
|||||||
Reference in New Issue
Block a user