Fixing crashes

This commit is contained in:
aerinon
2023-08-31 14:22:46 -06:00
parent b635126e81
commit 5ccdebe09d
3 changed files with 4 additions and 3 deletions

View File

@@ -185,7 +185,8 @@ DrHudDungeonItemsAdditions:
tya : !add #$003c : tay
+ lda CompassField : and.l $0098c0, x : beq + ; must have compass
phx ; total chest counts
lda.l CompassTotalsWRAM, x : !sub DungeonLocationsChecked, x : JSR HudHexToDec2DigitCopy
LDA.l CompassTotalsWRAM, x : !sub DungeonLocationsChecked, x
SEP #$30 : JSR HudHexToDec2DigitCopy : REP #$30
lda $06 : jsr ConvertToDisplay2 : sta $1644, y : iny #2
lda $07 : jsr ConvertToDisplay2 : sta $1644, y
plx

View File

@@ -324,7 +324,7 @@ IncrementCountsForSubstitute:
LDA TotalItemCounter : INC : STA TotalItemCounter ; Increment Item Total
INC.w UpdateHUD
.obtained
SEP #$20 : PLX
SEP #$30 : PLX
RTS
ClearSpriteData:

View File

@@ -319,7 +319,7 @@ DrawCompassCounts:
CMP.w #100 : BCS .three_digits
CMP.w #10 : BCS .two_digits
LDA.l CompassTotalsOneDigit, X : STA.w HUDTileMapBuffer+$9C
LDA.l CompassTotalsOneDigit, X : STA.w HUDTileMapBuffer+$9A
PLA
JSR HUDHex2Digit
STX.w HUDTileMapBuffer+$96