Initial total item count HUD

Initial 100% item collection Ganon vulnerability
This commit is contained in:
cassidoxa
2023-06-05 15:05:31 -04:00
parent 23ecf41b33
commit 878536903e
3 changed files with 59 additions and 1 deletions

View File

@@ -39,6 +39,8 @@ CheckGanonVulnerability:
dw .crystals_and_bosses
dw .bosses_only
dw .all_dungeons_no_agahnim
dw .all_items
dw .all_items_all_dungeons
; 00 = always vulnerable
.vulnerable
@@ -92,6 +94,21 @@ CheckGanonVulnerability:
.bosses_only
JMP CheckForCrystalBossesDefeated
; 09 = 100% item collection rate
.all_items
REP #$20
LDA.l TotalItemCounter : CMP.l TotalItemCount
SEP #$20
RTS
; 0A = 100% item collection rate and all dungeons
.all_items_all_dungeons
REP #$20
LDA.l TotalItemCounter : CMP.l TotalItemCount
SEP #$20
BCC .fail
BRA .all_dungeons
;--------------------------------------------------------------------------------
GetRequiredCrystalsForTower:
BEQ + : JSL.l BreakTowerSeal_ExecuteSparkles : + ; thing we wrote over

View File

@@ -162,6 +162,38 @@ NewDrawHud:
.doneprize
STA.l HUDPrizeIcon
;--------------------------------------------------------------------------------
; Draw pendant/crystal icon
;--------------------------------------------------------------------------------
LDA.l ItemCounterHUD : AND.w #$00FF : BNE + : JMP.w .item_counter_done : +
LDA.w #$2830 : STA.l HUDGoalIndicator+8 ; draw slash
LDA.l TotalItemCount : CMP.w #1000 : BCC .item_three_digits
JSR.w HudHexToDec4Digit
LDX.b Scrap04 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+10 ; 1000's digit
LDX.b Scrap05 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+12 ; 100's digit
LDX.b Scrap06 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+14 ; 10's digit
LDX.b Scrap07 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+16 ; 1's digit
LDA.l TotalItemCounter
JSR.w HudHexToDec4Digit
LDX.b Scrap04 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+0 ; 1000's digit
LDX.b Scrap05 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+2 ; 100's digit
LDX.b Scrap06 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+4 ; 10's digit
LDX.b Scrap07 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+6 ; 1's digit
BRA .item_counter_done
.item_three_digits
JSR.w HudHexToDec4Digit
LDX.b Scrap05 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+10 ; 100's digit
LDX.b Scrap06 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+12 ; 10's digit
LDX.b Scrap07 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+14 ; 1's digit
LDA.l TotalItemCounter
JSR.w HudHexToDec4Digit
LDX.b Scrap05 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+2 ; 100's digit
LDX.b Scrap06 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+4 ; 10's digit
LDX.b Scrap07 : TXA : ORA.w #$2400 : STA.l HUDGoalIndicator+6 ; 1's digit
.item_counter_done
;--------------------------------------------------------------------------------
; Draw Magic Meter
DrawMagicMeter_mp_tilemap = $0DFE0F

View File

@@ -118,7 +118,9 @@ org $308038 ; PC 0x180038
LampConeSewers:
db #$01 ; #$00 = Off - #$01 = On (default)
;--------------------------------------------------------------------------------
; 0x180039 (Unused)
org $308039 ; PC 0x180039
ItemCounterHUD:
db $00 ; $00 = Off | $01 = Display TotalItemCounter / TotalItemCount display on HUD
;--------------------------------------------------------------------------------
org $30803A ; PC 0x18003A-0x18003C
MapHUDMode:
@@ -144,6 +146,9 @@ db #$00
; #$06 = Light Speed
; #$07 = Require All Crystals and Crystal Bosses
; #$08 = Require All Crystal Bosses only
; #$09 = Require All Dungeons No Agahnim
; #$0A = Require 100% Item Collection
; #$0B = Require 100% Item Collection and All Dungeons
;--------------------------------------------------------------------------------
org $30803F ; PC 0x18003F
HammerableGanon:
@@ -928,6 +933,10 @@ org $308195 ; PC 0x180195
ByrnaCaveSpikeDamage:
db #$08 ; #$08 = 1 Heart (default) - #$02 = 1/4 Heart
;--------------------------------------------------------------------------------
org $308196 ; PC 0x180196-0x180197
TotalItemCount: ; Total item count for HUD. Only counts items that use "item get" animation.
dw $00D8 ; 216
;--------------------------------------------------------------------------------
; 0x180196 - 0x1801FF (unused)
;================================================================================
org $308200 ; PC 0x180200 - 0x18020B