let's dev 4/20/18

fixed keysanity textbox crashes (probably)
fixed bow graphic not getting updated after firing last arrow in non-retro
added fighter sword and progressive sword to shop exemption list
fixed (probably didn't) RNG item single
fixed standing keys from not being counted in hera basement
This commit is contained in:
Karkat
2018-04-20 22:49:04 -04:00
parent c679e33011
commit 762b9bc3e7
9 changed files with 60 additions and 45 deletions

View File

@@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF
db #$00 ; expand file to 2mb
org $1FFFF8 ; <- FFFF8 timestamp rom
db #$20, #$18, #$04, #$02 ; year/month/day
db #$20, #$18, #$04, #$20 ; year/month/day
;================================================================================

View File

@@ -117,6 +117,7 @@ macro CopyDialogIndirect()
endmacro
;--------------------------------------------------------------------------------
LoadDialogAddressIndirect:
STZ $1CF0 : STZ $1CF1 ; reset decompression buffer
LDA.b #$01 : STA $7F5035 ; set flag
%CopyDialogIndirect()
;%LoadDialogAddress(UncleText)
@@ -225,6 +226,7 @@ FreeDungeonItemNotice:
+
.done
STZ $1CF0 : STZ $1CF1 ; reset decompression buffer
LDA.b #$01 : STA $7F5035 ; set alternate dialog flag
LDA.b #$01 : STA $7F50A0

View File

@@ -155,6 +155,7 @@ PostItemAnimation:
LDA.b #$00 : STA !ITEM_BUSY ; mark item as finished
LDA $7F50A0 : BEQ +
STZ $1CF0 : STZ $1CF1 ; reset decompression buffer
JSL.l Main_ShowTextMessage
LDA.b #$00 : STA $7F50A0
+

View File

@@ -2126,7 +2126,7 @@ org $07A055 ; <- Bank07.asm:5205 (LDA $0B99 : BEQ BRANCH_DELTA)
JSL.l ArrowGame : NOP #14
org $07A06C ; <- Bank07.asm:5215 (LDA $7EF377 : BEQ BRANCH_EPSILON)
JSL.l DecrementArrows : SKIP #2 : NOP #5
JSL.l DecrementArrows : SKIP #2 : NOP : LDA $7EF377
;================================================================================
;================================================================================

View File

@@ -255,9 +255,11 @@ AddInventory:
CPY.b #$38 : BNE + : BRL .itemCounts : + ; Pendant
CPY.b #$39 : BNE + : BRL .itemCounts : + ; Pendant
CPY.b #$00 : BNE + : BRL .itemCounts : + ; Uncle Sword & Shield
CPY.b #$04 : !BLT .isSword ; Swords - Skip Shop/Fairy Check for Swords
CPY.b #$49 : BEQ .isSword
CPY.b #$50 : BEQ .isSword
CPY.b #$5E : BEQ .isSword
BRA +
.isSword
BRL .dungeonCounts

View File

@@ -908,29 +908,33 @@ RTL
!SINGLE_INDEX_BITMASK_TEMP = "$7F5022"
!LOCK_IN = "$7F5090"
GetRNGItemSingle:
LDA !LOCK_IN : CMP #$FF : BEQ + : TAX : XBA : LDA.l RNGSingleItemTable, X : RTL : +
LDX.b #$00
.single_reroll
JSL.l GetRandomInt : AND.b #$7F ; select random value
INX : CPX #$7F : !BLT + : LDA.b #$00 : BRA +++ : + ; default to 0 if too many attempts
CMP.l RNGSingleTableSize : !BGE .single_reroll
+++
PHY
LDA !LOCK_IN : CMP.b #$FF : BEQ + : TAX : XBA : LDA.l RNGSingleItemTable, X : RTL : +
LDX.b #$00
.single_reroll
JSL.l GetRandomInt : AND.b #$7F ; select random value
INX : CPX #$7F : !BLT + : LDA.b #$00 : BRA +++ : + ; default to 0 if too many attempts
CMP.l RNGSingleTableSize : !BGE .single_reroll
+++
STA !SINGLE_INDEX_TEMP ; put our index value here
LDX #$00
.recheck
JSR.w CheckSingleItem : BEQ .single_unused ; already used
LDA !SINGLE_INDEX_TEMP : INC ; increment index
CMP.l RNGSingleTableSize : !BLT +++ : LDA.b #$00 : +++ ; rollover index if needed
STA !SINGLE_INDEX_TEMP ; store index
INX : CPX.l RNGSingleTableSize : !BLT .recheck
LDA.b #$5A ; everything is gone, default to null item - MAKE THIS AN OPTION FOR THIS AND THE OTHER ONE
BRA .single_done
.single_unused
LDA !SINGLE_INDEX_TEMP
.single_done
TAX : LDA.l RNGSingleItemTable, X
XBA : LDA.l !SINGLE_INDEX_TEMP : STA !LOCK_IN : XBA
STA !SINGLE_INDEX_TEMP ; put our index value here
LDX #$00
TAY
.recheck
TYA
JSR.w CheckSingleItem : BEQ .single_unused ; already used
LDA !SINGLE_INDEX_TEMP : INC ; increment index
CMP.l RNGSingleTableSize : !BLT +++ : LDA.b #$00 : +++ ; rollover index if needed
STA !SINGLE_INDEX_TEMP ; store index
INX : TAY : TXA : CMP.l RNGSingleTableSize : !BLT .recheck
LDA.b #$5A ; everything is gone, default to null item - MAKE THIS AN OPTION FOR THIS AND THE OTHER ONE
BRA .single_done
.single_unused
LDA !SINGLE_INDEX_TEMP
.single_done
TAX : LDA.l RNGSingleItemTable, X
XBA : LDA.l !SINGLE_INDEX_TEMP : STA !LOCK_IN : XBA
PLY
RTL
;--------------------------------------------------------------------------------
CheckSingleItem:

View File

@@ -229,7 +229,6 @@ SpritePrep_ShopKeeper:
;JSR.w QueueItemDMA
.done
STA $FFFFFF
LDA.l !SHOP_TYPE : BIT.b #$20 : BEQ .notTakeAll ; Take-all
.takeAll

View File

@@ -241,6 +241,13 @@ IncrementSmallKeysNoPrimary:
JSL AddInventory_incrementKeyLong
+
JSL.l UpdateKeys
LDA $1B : BEQ + ; skip room check if outdoors
PHP : REP #$20 ; set 16-bit accumulator
LDA $048E : CMP.w #$0087 : BNE ++ ; hera basement
PLP : PHY : LDY.b #24 : JSL.l FullInventoryExternal : PLY : BRA +
++
PLP
+
JSL.l HUD_RebuildLong
PLX
RTL

View File

@@ -1572,28 +1572,28 @@ db $FF, $FF, $FF, $FF
org $30C800 ; PC 0x184800 - 0x1848FF - max 32 shops ; do not exceed 36 tracked items sram_index > ($24)
ShopTable:
;db [id][roomID-low][roomID-high][doorID][zero][shop_config][shopkeeper_config][sram_index]
;db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $01, $FF, $00, $00, $00, $43, $A0, $00
db $02, $0F, $01, $60, $00, $03, $C1, $03
db $FF, $12, $01, $58, $00, $A3, $E3, $06
db $02, $0F, $01, $57, $00, $03, $A0, $09
db $03, $0F, $01, $60, $00, $03, $A0, $0c
db $04, $0F, $01, $6F, $00, $03, $A0, $0f
db $05, $FF, $00, $00, $00, $03, $A0, $12
db $06, $1F, $01, $46, $00, $03, $A0, $15
db $FF, $12, $01, $58, $00, $03, $A0, $18
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
;db $01, $FF, $00, $00, $00, $43, $A0, $00
;db $02, $0F, $01, $60, $00, $03, $C1, $03
;db $FF, $12, $01, $58, $00, $81, $E3, $06
;db $02, $0F, $01, $57, $00, $03, $A0, $09
;db $03, $0F, $01, $60, $00, $03, $A0, $0c
;db $04, $0F, $01, $6F, $00, $03, $A0, $0f
;db $05, $FF, $00, $00, $00, $03, $A0, $12
;db $06, $1F, $01, $46, $00, $03, $A0, $15
;db $FF, $12, $01, $58, $00, $03, $A0, $18
org $30C900 ; PC 0x184900 - 0x184FFF - max 224 entries
ShopContentsTable:
;db [id][item][price-low][price-high][max][repl_id][repl_price-low][repl_price-high]
db $01, $2E, $96, $00, $00, $FF, $00, $00
db $01, $AF, $50, $00, $00, $FF, $00, $00
db $01, $31, $32, $00, $00, $FF, $00, $00
db $02, $2E, $96, $00, $00, $FF, $00, $00
db $02, $AF, $50, $00, $00, $FF, $00, $00
db $02, $31, $32, $00, $00, $FF, $00, $00
db $FF, $2E, $96, $00, $00, $FF, $00, $00
db $FF, $30, $2C, $01, $00, $FF, $00, $00
db $FF, $31, $32, $00, $00, $FF, $00, $00
;db $01, $2E, $96, $00, $00, $FF, $00, $00
;db $01, $AF, $50, $00, $00, $FF, $00, $00
;db $01, $31, $32, $00, $00, $FF, $00, $00
;db $02, $2E, $96, $00, $00, $FF, $00, $00
;db $02, $AF, $50, $00, $00, $FF, $00, $00
;db $02, $31, $32, $00, $00, $FF, $00, $00
;db $FF, $5E, $96, $00, $00, $FF, $00, $00
;db $FF, $30, $2C, $01, $00, $FF, $00, $00
;db $FF, $31, $32, $00, $00, $FF, $00, $00
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
;================================================================================
org $30D000 ; PC 0x185000 - 0x18503F