Standard + Crossed bug with Hyrule Castle
Big Key logic for standard Some generation issues with ER Redesigned Map/Compass section of Keysanity menu
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
!add = "clc : adc"
|
||||
!addl = "clc : adc.l"
|
||||
!sub = "sec : sbc"
|
||||
!bge = "bcs"
|
||||
!blt = "bcc"
|
||||
|
||||
@@ -13,11 +13,6 @@ HudAdditions:
|
||||
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 $07 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+14 ; draw 1's digit
|
||||
|
||||
lda $7ef29b : and #$0020 : beq +
|
||||
lda #$207f : bra .drawthing
|
||||
+ lda #$345e
|
||||
.drawthing STA !GOAL_DRAW_ADDRESS+16 ; castle gate indicator
|
||||
++
|
||||
|
||||
ldx $040c : cpx #$ff : bne + : rts : +
|
||||
@@ -35,35 +30,30 @@ HudAdditions:
|
||||
.reminder sta $7ec702
|
||||
+ lda.w DRFlags : and #$0004 : beq .restore
|
||||
lda $7ef368 : and.l $0098c0, x : beq .restore
|
||||
|
||||
; lda #$2811 : sta $7ec740
|
||||
; lda $7ef366 : and.l $0098c0, x : bne .check
|
||||
; lda.w BigKeyStatus, x : bne + ; change this, if bk status changes to one byte
|
||||
; lda #$2574 : bra ++
|
||||
; + cmp #$0002 : bne +
|
||||
; lda #$2420 : bra ++
|
||||
; + lda #$207f : bra ++
|
||||
; .check lda #$2826
|
||||
; ++ sta $7ec742
|
||||
txa : lsr : tax
|
||||
|
||||
lda $7ef4e0, x : jsr ConvertToDisplay : sta $7ec7a2
|
||||
lda #$2830 : sta $7ec7a4
|
||||
lda.w ChestKeys, x : jsr ConvertToDisplay : sta $7ec7a6
|
||||
|
||||
; lda #$2871 : sta $7ec780
|
||||
; lda.w TotalKeys, x
|
||||
; sep #$20 : !sub $7ef4b0, x : rep #$20 ; todo 4b0 no longer in use
|
||||
; jsr ConvertToDisplay : sta $7ec782
|
||||
; todo 4b0 no longer in use
|
||||
|
||||
.restore
|
||||
plb : rts
|
||||
}
|
||||
|
||||
;column distance for BK/Smalls
|
||||
HudOffsets:
|
||||
; none hc east desert aga swamp pod mire skull ice hera tt tr gt
|
||||
dw $fffe, $0000, $0006, $0008, $0002, $0010, $000e, $0018, $0012, $0016, $000a, $0014, $001a, $001e
|
||||
|
||||
; offset from 1644
|
||||
RowOffsets:
|
||||
dw $0000, $0000, $0040, $0080, $0000, $0080, $0040, $0080, $00c0, $0040, $00c0, $0000, $00c0, $0000
|
||||
|
||||
ColumnOffsets:
|
||||
dw $0000, $0000, $0000, $0000, $000a, $000a, $000a, $0014, $000a, $0014, $0000, $0014, $0014, $001e
|
||||
|
||||
|
||||
DrHudDungeonItemsAdditions:
|
||||
{
|
||||
jsl DrawHUDDungeonItems
|
||||
@@ -75,11 +65,16 @@ DrHudDungeonItemsAdditions:
|
||||
|
||||
lda !HUD_FLAG : and.w #$0020 : beq + : bra ++ : +
|
||||
lda HUDDungeonItems : and.w #$0003 : bne + : bra ++ : +
|
||||
; blank out stuff
|
||||
lda.w #$24f5 : sta $1606 : sta $1610 : sta $161a : sta $1624 : sta $1644
|
||||
sta $164a : sta $1652 : sta $1662
|
||||
ldy #$0000
|
||||
- sta $1706, y : iny #2 : cpy #$001c : bcc -
|
||||
lda.w #$2810 : sta $1684 ; small keys icon
|
||||
lda.w #$2811 : sta $16c4 ; big key icon
|
||||
lda.w #$2810 : sta $1704 ; small keys icon
|
||||
ldx #$0002
|
||||
- lda $7ef364 : and.l $0098c0, x : beq + ; must have compass
|
||||
- lda $7ef368 : and.l $0098c0, x : beq + ; must have map
|
||||
lda.l HudOffsets, x : tay
|
||||
jsr BkStatus : sta $16C6, y ; big key status
|
||||
phx
|
||||
@@ -88,18 +83,34 @@ DrHudDungeonItemsAdditions:
|
||||
plx
|
||||
+ inx #2 : cpx #$001b : bcc -
|
||||
++
|
||||
lda !HUD_FLAG : and.w #$0020 : bne + : bra ++ : +
|
||||
lda HUDDungeonItems : and.w #$000c : bne + : bra ++ : +
|
||||
lda.w #$24f5 : sta $1704 ; blank
|
||||
lda !HUD_FLAG : and.w #$0020 : bne + : brl ++ : +
|
||||
lda HUDDungeonItems : and.w #$000f : bne + : brl ++ : +
|
||||
; map symbols (do I want these) ; note compass symbol is 2c20
|
||||
lda.w #$2821 : sta $1606 : sta $1610 : sta $161a : sta $1624
|
||||
; blank out a couple thing from old hud
|
||||
lda.w #$24f5 : sta $16e4 : sta $1724
|
||||
ldx #$0002
|
||||
- lda $7ef364 : and.l $0098c0, x : beq + ; must have compass
|
||||
lda.l HudOffsets, x : tay
|
||||
- lda #$0000 ; start of hud area
|
||||
!addl RowOffsets, x : !addl ColumnOffsets, x : tay
|
||||
lda.l DungeonReminderTable, x : sta $1644, y
|
||||
iny #2
|
||||
lda.w #$24f5 : sta $1644, y ; blank out map spot
|
||||
lda $7ef368 : and.l $0098c0, x : beq + ; must have map
|
||||
lda #$2826 : sta $1644, y ; check mark
|
||||
+ iny #2
|
||||
cpx #$001a : bne +
|
||||
tya : !add #$003c : tay
|
||||
+ lda $7ef364 : and.l $0098c0, x : beq + ; must have compass
|
||||
phx ; total chest counts
|
||||
txa : lsr : tax
|
||||
lda.l TotalLocationsLow, x : jsr ConvertToDisplay2 : sta $1706, y
|
||||
lda.l TotalLocationsHigh, x : jsr ConvertToDisplay2 : sta $16c6, y
|
||||
lda.l TotalLocationsHigh, x : jsr ConvertToDisplay2 : sta $1644, y : iny #2
|
||||
lda.l TotalLocationsLow, x : jsr ConvertToDisplay2 : sta $1644, y
|
||||
plx
|
||||
+
|
||||
bra .skipBlanks
|
||||
+ lda.w #$24f5 : sta $1644, y : iny #2 : sta $1644, y
|
||||
.skipBlanks iny #2
|
||||
cpx #$001a : beq +
|
||||
lda.w #$24f5 : sta $1644, y ; blank out spot
|
||||
+ inx #2 : cpx #$001b : bcc -
|
||||
++
|
||||
plp : ply : plx : rtl
|
||||
@@ -108,7 +119,7 @@ DrHudDungeonItemsAdditions:
|
||||
BkStatus:
|
||||
lda $7ef366 : and.l $0098c0, x : bne +++ ; has the bk already
|
||||
lda.l BigKeyStatus, x : bne ++
|
||||
lda #$2482 : rts ; 0/O for no BK
|
||||
lda #$2827 : rts ; 0/O for no BK
|
||||
++ cmp #$0002 : bne +
|
||||
lda #$2420 : rts ; symbol for BnC
|
||||
+ lda #$24f5 : rts ; black otherwise
|
||||
@@ -124,29 +135,7 @@ ConvertToDisplay2:
|
||||
cmp #$000a : !blt +
|
||||
!add #$2553 : rts
|
||||
+ !add #$2816 : rts
|
||||
++ lda #$2483 : rts ; 0/O for 0 or placeholder digit
|
||||
|
||||
;CountChestKeys:
|
||||
; jsl ItemDowngradeFix
|
||||
; jsr CountChest
|
||||
; rtl
|
||||
|
||||
;CountChest:
|
||||
; lda !MULTIWORLD_ITEM_PLAYER_ID : bne .end
|
||||
; cpy #$24 : beq +
|
||||
; cpy #$a0 : !blt .end
|
||||
; cpy #$ae : !bge .end
|
||||
; pha : phx
|
||||
; tya : and #$0f : bne ++
|
||||
; inc a
|
||||
; ++ tax : bra .count
|
||||
; + pha : phx
|
||||
; lda $040c : lsr : tax
|
||||
; .count
|
||||
; lda $7ef4b0, x : inc : sta $7ef4b0, x
|
||||
; lda $7ef4e0, x : inc : sta $7ef4e0, x
|
||||
; .restore plx : pla
|
||||
; .end rts
|
||||
++ lda #$2827 : rts ; 0/O for 0 or placeholder digit ;2483
|
||||
|
||||
CountAbsorbedKeys:
|
||||
jsl IncrementSmallKeysNoPrimary : phx
|
||||
@@ -155,20 +144,6 @@ CountAbsorbedKeys:
|
||||
lda $7ef4b0, x : inc : sta $7ef4b0, x
|
||||
+ plx : rtl
|
||||
|
||||
;CountBonkItem:
|
||||
; jsl GiveBonkItem
|
||||
; lda $a0 ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
|
||||
; cmp #115 : bne + ; Desert Bonk Key
|
||||
; lda.l BonkKey_Desert
|
||||
; bra ++
|
||||
; + : cmp #140 : bne + ; GTower Bonk Key
|
||||
; lda.l BonkKey_GTower
|
||||
; bra ++
|
||||
; + lda.b #$24 ; default to small key
|
||||
; ++ cmp #$24 : bne +
|
||||
; phy : tay : jsr CountChest : ply
|
||||
; + rtl
|
||||
|
||||
;================================================================================
|
||||
; 16-bit A, 8-bit X
|
||||
; in: A(b) - Byte to Convert
|
||||
|
||||
Reference in New Issue
Block a user