Merge branch 'DRMain2' into DRMain
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
CheckDarkWorldSanc:
|
CheckDarkWorldSanc:
|
||||||
STA $A0 : STA $048E ; what we wrote over
|
STA $A0 : STA $048E ; what we wrote over
|
||||||
|
LDA.l InvertedMode : BNE +
|
||||||
LDA.l SancDarkWorldFlag : BEQ +
|
LDA.l SancDarkWorldFlag : BEQ +
|
||||||
SEP #$30
|
SEP #$30
|
||||||
LDA $A0 : CMP #$12 : BNE ++
|
LDA $A0 : CMP #$12 : BNE ++
|
||||||
|
|||||||
@@ -170,6 +170,9 @@ JSL CheckDarkWorldSanc : NOP
|
|||||||
org $01891e ; <- Bank 01.asm : 991 Dungeon_LoadType2Object (LDA $00 : XBA : AND.w #$00FF)
|
org $01891e ; <- Bank 01.asm : 991 Dungeon_LoadType2Object (LDA $00 : XBA : AND.w #$00FF)
|
||||||
JSL RainPrevention : NOP #2
|
JSL RainPrevention : NOP #2
|
||||||
|
|
||||||
|
org $1edabf ; <- sprite_energy_ball.asm : 86-7 Sprite_EnergyBall (LDA.b #$10 : LDX.b #$00)
|
||||||
|
JSL StandardAgaDmg
|
||||||
|
|
||||||
; These two, if enabled together, have implications for vanilla BK doors in IP/Hera/Mire
|
; 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
|
; 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
|
; Hera BK door back can be seen with Pot clipping - likely useful for no logic seeds
|
||||||
|
|||||||
@@ -8,11 +8,21 @@ DrHudOverride:
|
|||||||
HudAdditions:
|
HudAdditions:
|
||||||
{
|
{
|
||||||
lda.l DRFlags : and #$0008 : beq ++
|
lda.l DRFlags : and #$0008 : beq ++
|
||||||
|
LDA.w #$28A4 : STA !GOAL_DRAW_ADDRESS
|
||||||
lda $7EF423
|
lda $7EF423
|
||||||
|
jsr HudHexToDec4DigitCopy
|
||||||
|
LDX.b $05 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+2 ; draw 100's digit
|
||||||
|
LDX.b $06 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+4 ; draw 10's digit
|
||||||
|
LDX.b $07 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+6 ; draw 1's digit
|
||||||
|
LDA.w #$2830 : STA !GOAL_DRAW_ADDRESS+8 ; draw slash
|
||||||
|
LDA.l DRFlags : AND #$0100 : BNE +
|
||||||
|
lda $7EF33E
|
||||||
jsr HudHexToDec4DigitCopy
|
jsr HudHexToDec4DigitCopy
|
||||||
LDX.b $05 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+10 ; draw 100's digit
|
LDX.b $05 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+10 ; draw 100's digit
|
||||||
LDX.b $06 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+12 ; draw 10's digit
|
LDX.b $06 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+12 ; draw 10's digit
|
||||||
LDX.b $07 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+14 ; draw 1's digit
|
LDX.b $07 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+14 ; draw 1's digit
|
||||||
|
BRA ++
|
||||||
|
+ LDA.w #$2405 : STA !GOAL_DRAW_ADDRESS+10 : STA !GOAL_DRAW_ADDRESS+12 : STA !GOAL_DRAW_ADDRESS+14
|
||||||
++
|
++
|
||||||
|
|
||||||
LDX $1B : BNE + : RTS : + ; Skip if outdoors
|
LDX $1B : BNE + : RTS : + ; Skip if outdoors
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ AddInventory:
|
|||||||
|
|
||||||
CMP.l BallNChainDungeon : BNE +
|
CMP.l BallNChainDungeon : BNE +
|
||||||
CPY.b #$32 : BNE +
|
CPY.b #$32 : BNE +
|
||||||
BRL .fullItemCounts
|
BRL .done
|
||||||
+ LSR : TAX : LDA $7EF4BF, X : INC : STA $7EF4BF, X
|
+ LSR : TAX : LDA $7EF4BF, X : INC : STA $7EF4BF, X
|
||||||
CPX.b #$0D : BNE +
|
CPX.b #$0D : BNE +
|
||||||
LDA $7EF366 : AND #$04 : BNE ++
|
LDA $7EF366 : AND #$04 : BNE ++
|
||||||
|
|||||||
@@ -142,3 +142,10 @@ RainPrevention:
|
|||||||
PLA : LDA #$0008 : RTL
|
PLA : LDA #$0008 : RTL
|
||||||
.done PLA : RTL
|
.done PLA : RTL
|
||||||
|
|
||||||
|
; A should be how much dmg to do to Aga when leaving this function
|
||||||
|
StandardAgaDmg:
|
||||||
|
LDX.b #$00 ; part of what we wrote over
|
||||||
|
LDA.l $7EF3C6 : AND #$04 : BEQ + ; zelda's not been rescued
|
||||||
|
LDA.b #$10 ; hurt him!
|
||||||
|
+ RTL ; A is zero if the AND results in zero and then Agahnim's invincible!
|
||||||
|
|
||||||
|
|||||||
25
spiral.asm
25
spiral.asm
@@ -170,10 +170,10 @@ InroomStairsWarp: {
|
|||||||
; should be the same as lda $0462 : and #$04 : lsr #2 : eor #$01 : sta $07
|
; should be the same as lda $0462 : and #$04 : lsr #2 : eor #$01 : sta $07
|
||||||
lda $01 : and #$80 : beq .notEdge
|
lda $01 : and #$80 : beq .notEdge
|
||||||
lda $07 : sta $03 : beq +
|
lda $07 : sta $03 : beq +
|
||||||
lda $01 : jsr LoadSouthMidpoint : sta $22 : lda #$e0
|
lda $01 : jsr LoadSouthMidpoint : sta $22 : lda #$f4
|
||||||
bra ++
|
bra ++
|
||||||
+
|
+
|
||||||
lda $01 : jsr LoadNorthMidpoint : sta $22 : lda #$1b
|
lda $01 : jsr LoadNorthMidpoint : sta $22 : dec $21 : lda #$f7
|
||||||
++
|
++
|
||||||
sta $20
|
sta $20
|
||||||
lda $01 : and #$20 : beq +
|
lda $01 : and #$20 : beq +
|
||||||
@@ -185,25 +185,35 @@ InroomStairsWarp: {
|
|||||||
brl .layer
|
brl .layer
|
||||||
.notEdge
|
.notEdge
|
||||||
lda $01 : and #$03 : cmp #$03 : bne .normal
|
lda $01 : and #$03 : cmp #$03 : bne .normal
|
||||||
|
txa : and #$06 : sta $07
|
||||||
lda $01 : and #$30 : lsr #3 : tay
|
lda $01 : and #$30 : lsr #3 : tay
|
||||||
lda.w InroomStairsX,y : sta $22
|
|
||||||
lda.w InroomStairsX+1,y : sta $02
|
lda.w InroomStairsX+1,y : sta $02
|
||||||
lda.w InroomStairsY+1,y : sta $03
|
lda.w InroomStairsY+1,y : sta $03
|
||||||
|
cpy $07 : beq .vanillaTransition
|
||||||
|
lda.w InroomStairsX,y : sta $22
|
||||||
lda.w InroomStairsY,y
|
lda.w InroomStairsY,y
|
||||||
ldy $07 : beq +
|
ldy $07 : beq +
|
||||||
!add #$07
|
!add #$07
|
||||||
+
|
+
|
||||||
sta $20
|
sta $20
|
||||||
%StonewallCheck($1b)
|
|
||||||
inc $07
|
inc $07
|
||||||
|
bra ++
|
||||||
|
.vanillaTransition
|
||||||
|
lda #$c0 : sta $07 ; leave camera
|
||||||
|
++
|
||||||
|
%StonewallCheck($1b)
|
||||||
lda $01 : and #$04 : lsr #2
|
lda $01 : and #$04 : lsr #2
|
||||||
bra .layer
|
bra .layer
|
||||||
.normal
|
.normal
|
||||||
lda $01 : sta $fe ; trap door
|
lda $01 : sta $fe ; trap door
|
||||||
lda $07 : sta $03 : beq +
|
lda $07 : sta $03 : beq +
|
||||||
|
ldy $a0 : cpy #$51 : beq .specialFix ; throne room
|
||||||
|
cpy #$02 : beq .specialFix ; sewers pull switch
|
||||||
|
cpy #$71 : beq .specialFix ; castle armory
|
||||||
lda #$e0
|
lda #$e0
|
||||||
ldy $a0 : cpy #$51 : bne ++ ; special fix for throne room
|
bra ++
|
||||||
!sub #$18
|
.specialFix
|
||||||
|
lda #$c8
|
||||||
bra ++
|
bra ++
|
||||||
+
|
+
|
||||||
%StonewallCheck($43)
|
%StonewallCheck($43)
|
||||||
@@ -235,12 +245,15 @@ InroomStairsWarp: {
|
|||||||
ldy #$01 : jsr ShiftQuadSimple
|
ldy #$01 : jsr ShiftQuadSimple
|
||||||
.skipYQuad
|
.skipYQuad
|
||||||
|
|
||||||
|
lda $07 : bmi .skipCamera
|
||||||
ldy #$00 : jsr SetCamera ; horizontal camera
|
ldy #$00 : jsr SetCamera ; horizontal camera
|
||||||
ldy #$01 : sty $07 : jsr SetCamera ; vertical camera
|
ldy #$01 : sty $07 : jsr SetCamera ; vertical camera
|
||||||
lda $20 : cmp #$e0 : bcc +
|
lda $20 : cmp #$e0 : bcc +
|
||||||
lda $e8 : bne +
|
lda $e8 : bne +
|
||||||
lda #$10 : sta $e8 ; adjust vertical camera at bottom
|
lda #$10 : sta $e8 ; adjust vertical camera at bottom
|
||||||
+
|
+
|
||||||
|
.skipCamera
|
||||||
|
|
||||||
jsr StairCleanup
|
jsr StairCleanup
|
||||||
ply : plx : plb ; pull the stuff we pushed
|
ply : plx : plb ; pull the stuff we pushed
|
||||||
rts
|
rts
|
||||||
|
|||||||
@@ -244,7 +244,9 @@ IncrementSmallKeysNoPrimary:
|
|||||||
PHP : REP #$20 ; set 16-bit accumulator
|
PHP : REP #$20 ; set 16-bit accumulator
|
||||||
LDA $048E : CMP.w #$0087 : BNE ++ ; hera basement
|
LDA $048E : CMP.w #$0087 : BNE ++ ; hera basement
|
||||||
PLP : PHY : LDY.b #$24 : JSL.l FullInventoryExternal
|
PLP : PHY : LDY.b #$24 : JSL.l FullInventoryExternal
|
||||||
JSR CountChestKey : PLY : BRA +
|
LDA ShuffleKeyDrops : BNE +++
|
||||||
|
JSR CountChestKey
|
||||||
|
+++ PLY : BRA +
|
||||||
++
|
++
|
||||||
PLP
|
PLP
|
||||||
+
|
+
|
||||||
|
|||||||
Reference in New Issue
Block a user