Door pairing system initial pass complete
Sucessfully de-coupling of Big Key doors with dumb small key doors behind Added a bit to trap door fixer so that we can hit the 3rd door in the door list Added door list position info
This commit is contained in:
@@ -10,76 +10,12 @@
|
||||
; Hooks into various routines
|
||||
incsrc drhooks.asm
|
||||
|
||||
org $02b5c4 ; -- moving right routine 135c4
|
||||
jsl WarpRight
|
||||
org $02b665 ; -- moving left routine
|
||||
jsl WarpLeft
|
||||
org $02b713 ; -- moving down routine
|
||||
jsl WarpDown
|
||||
org $02b7b4 ; -- moving up routine
|
||||
jsl WarpUp
|
||||
org $02bd80
|
||||
jsl AdjustTransition
|
||||
nop
|
||||
|
||||
;turn off linking doors -- see .notRoomLinkDoor label in Bank02.asm
|
||||
org $02b5a6
|
||||
bra NotLinkDoor1
|
||||
org $02b5b6
|
||||
NotLinkDoor1:
|
||||
org $02b647
|
||||
bra NotLinkDoor2
|
||||
org $02b657
|
||||
NotLinkDoor2:
|
||||
|
||||
|
||||
; Staircase routine
|
||||
org $01c3d4 ;(PC: c3d4)
|
||||
jsl RecordStairType : nop
|
||||
org $02a1e7 ;(PC: 121e7)
|
||||
jsl SpiralWarp
|
||||
|
||||
|
||||
; Graphics fix
|
||||
org $02895d
|
||||
Splicer:
|
||||
jsl GfxFixer
|
||||
lda $b1 : beq .done
|
||||
rts
|
||||
nop #5
|
||||
.done
|
||||
|
||||
org $00fda4
|
||||
Dungeon_InitStarTileCh:
|
||||
org $00d6ae ;(PC: 56ae)
|
||||
LoadTransAuxGfx:
|
||||
org $00df5a ;(PC: 5f5a)
|
||||
PrepTransAuxGfx:
|
||||
;org $0ffd65 ;(PC: 07fd65)
|
||||
;Dungeon_LoadCustomTileAttr:
|
||||
;org $01fec1
|
||||
;Dungeon_ApproachFixedColor_variable:
|
||||
;org $a0f972 ; Rando version
|
||||
;LoadRoomHook:
|
||||
org $1bee74 ;(PC: 0dee74)
|
||||
Palette_DungBgMain:
|
||||
org $1bec77
|
||||
Palette_SpriteAux3:
|
||||
org $1becc5
|
||||
Palette_SpriteAux2:
|
||||
org $1bece4
|
||||
Palette_SpriteAux1:
|
||||
|
||||
incsrc keydoors.asm
|
||||
;Kill big key (1e) check for south doors - not that easy unfortunately
|
||||
;org $1aa90
|
||||
;nop #5
|
||||
|
||||
;Main Code
|
||||
org $278000 ;138000
|
||||
incsrc normal.asm
|
||||
incsrc spiral.asm
|
||||
incsrc gfx.asm
|
||||
incsrc keydoors.asm
|
||||
|
||||
; Data Section
|
||||
org $279000
|
||||
|
||||
@@ -216,6 +216,7 @@ dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000,
|
||||
|
||||
org $27B000
|
||||
SpiralTable:
|
||||
dw $0203, $8080 ;null row
|
||||
dw $0203, $8080 ;HC Backhallway
|
||||
dw $0203, $8080 ;Sewer Pull
|
||||
dw $0203, $8080 ;Crystaroller
|
||||
@@ -367,7 +368,7 @@ dw $0000 ; this is the odd extra room - shouldn't be used
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000
|
||||
dw $0000,$0000,$0000
|
||||
dw $0000,$0000,$2053
|
||||
dw $0000,$0000,$2043
|
||||
dw $0000,$0000,$0000,$0000
|
||||
dw $0000,$0000,$4058,$0000,$0000,$0000
|
||||
dw $0000,$2057,$4068,$0000,$0000,$0000
|
||||
|
||||
@@ -1,3 +1,78 @@
|
||||
org $02b5c4 ; -- moving right routine 135c4
|
||||
jsl WarpRight
|
||||
org $02b665 ; -- moving left routine
|
||||
jsl WarpLeft
|
||||
org $02b713 ; -- moving down routine
|
||||
jsl WarpDown
|
||||
org $02b7b4 ; -- moving up routine
|
||||
jsl WarpUp
|
||||
org $02bd80
|
||||
jsl AdjustTransition
|
||||
nop
|
||||
|
||||
;turn off linking doors -- see .notRoomLinkDoor label in Bank02.asm
|
||||
org $02b5a6
|
||||
bra NotLinkDoor1
|
||||
org $02b5b6
|
||||
NotLinkDoor1:
|
||||
org $02b647
|
||||
bra NotLinkDoor2
|
||||
org $02b657
|
||||
NotLinkDoor2:
|
||||
|
||||
|
||||
; Staircase routine
|
||||
org $01c3d4 ;(PC: c3d4)
|
||||
jsl RecordStairType : nop
|
||||
org $02a1e7 ;(PC: 121e7)
|
||||
jsl SpiralWarp
|
||||
|
||||
|
||||
; Graphics fix
|
||||
org $02895d
|
||||
Splicer:
|
||||
jsl GfxFixer
|
||||
lda $b1 : beq .done
|
||||
rts
|
||||
nop #5
|
||||
.done
|
||||
|
||||
org $00fda4
|
||||
Dungeon_InitStarTileCh:
|
||||
org $00d6ae ;(PC: 56ae)
|
||||
LoadTransAuxGfx:
|
||||
org $00df5a ;(PC: 5f5a)
|
||||
PrepTransAuxGfx:
|
||||
;org $0ffd65 ;(PC: 07fd65)
|
||||
;Dungeon_LoadCustomTileAttr:
|
||||
;org $01fec1
|
||||
;Dungeon_ApproachFixedColor_variable:
|
||||
;org $a0f972 ; Rando version
|
||||
;LoadRoomHook:
|
||||
org $1bee74 ;(PC: 0dee74)
|
||||
Palette_DungBgMain:
|
||||
org $1bec77
|
||||
Palette_SpriteAux3:
|
||||
org $1becc5
|
||||
Palette_SpriteAux2:
|
||||
org $1bece4
|
||||
Palette_SpriteAux1:
|
||||
|
||||
|
||||
; These two, if enabled together, have implications for vanilla BK doors in IP/Hera/Mire
|
||||
; IPBJ is common enough to consider not doing this. Mire is not a concern for vanilla - maybe glitched modes
|
||||
; Hera BK door back can be seen with Pot clipping - likely useful for no logic seeds
|
||||
|
||||
;Kill big key (1e) check for south doors
|
||||
;org $1aa90
|
||||
;DontCheck:
|
||||
;bra .done
|
||||
;nop #3
|
||||
;.done
|
||||
|
||||
;Enable south facing bk graphic
|
||||
;org $4e24
|
||||
;dw $2ac8
|
||||
|
||||
org $01b714 ; PC: b714
|
||||
OpenableDoors:
|
||||
|
||||
@@ -1,20 +1,3 @@
|
||||
; This is the reverse side of various key doors
|
||||
|
||||
org $1ff8cc ;(PC: 0ff8cc) GT 0x5b (Spikes & Switch)
|
||||
dw $0081
|
||||
|
||||
org $0a972a ;(PC: 05172a) Eastern Darkness 0x99
|
||||
dw $2060, $1e71
|
||||
|
||||
org $1fb759 ;(PC: 0fb759) Mire Bridges 0xa2
|
||||
dw $0071
|
||||
|
||||
org $0a9887 ;(PC: 051887) Eastern Compass Area 0xa8
|
||||
dw $3882, $3660, $1e81
|
||||
|
||||
org $1fd974 ;(PC: 0fd974) TT Bossway 0xbc
|
||||
dw $1c82, $0081
|
||||
|
||||
; code to un-pair or re-pair doors
|
||||
|
||||
; doorlist is loaded into 19A0 but no terminator
|
||||
@@ -29,19 +12,20 @@ dw $1c82, $0081
|
||||
CheckIfDoorsOpen: {
|
||||
jsr TrapDoorFixer ; see normal.asm
|
||||
; note we are 16bit mode right now
|
||||
lda $040c : cmp #$00ff ;: bne .gtg
|
||||
lda $040c : cmp #$00ff : bne .gtg
|
||||
lda $a0 : dec : tax : and #$000f ; hijacked code
|
||||
sec : rtl ; set carry to indicate normal behavior
|
||||
|
||||
.gtg
|
||||
phb : phk : plb
|
||||
stx $00 : ldy #$00 : stz $03
|
||||
stx $00 : ldy #$0000
|
||||
.nextDoor
|
||||
lda $a0 : asl : tax
|
||||
lda KeyDoorOffset, x : beq .skipDoor
|
||||
asl : sty $05 : !add $05 : tax
|
||||
lda PairedDoorTable, x : beq .skipDoor
|
||||
sta $02 : and #$00ff : asl a : tax
|
||||
lda $02 : and #$ff00 : sta $03
|
||||
lda $7ef000, x : and #$f000 : and $03 : beq .skipDoor
|
||||
tyx : lda $068c : ora $0098c0,x : sta $068c
|
||||
.skipDoor
|
||||
@@ -53,5 +37,5 @@ CheckIfDoorsOpen: {
|
||||
; how to indicate opening for other (non-first four doors?)
|
||||
; Bank01 Door Register stores the 4 bits in 068c to 400 (depending on type)
|
||||
; Key collision and others depend on F0-F3 attribute not sure if extendable to other numbers
|
||||
; Dungeon_ProcessTorchAndDoorInteractives.isOpenableDoor is the likely culprit fo collision problems
|
||||
; Dungeon_ProcessTorchAndDoorInteractives.isOpenableDoor is the likely culprit for collision problems
|
||||
; Saving open status to other unused rooms is tricky -- Bank 2 13947 (line 8888)
|
||||
@@ -39,8 +39,8 @@ WarpDown:
|
||||
rtl
|
||||
|
||||
TrapDoorFixer:
|
||||
lda $ab : and #$0018 : beq .end
|
||||
xba : asl #3 : sta $00
|
||||
lda $ab : and #$0038 : beq .end
|
||||
xba : asl #2 : sta $00
|
||||
stz $0468 : lda $068c : ora $00 : sta $068c
|
||||
.end
|
||||
stz $ab ; clear our ab here because we don't need it anymore
|
||||
|
||||
Reference in New Issue
Block a user