Merge branch 'master' into DRMain

# Conflicts:
#	LTTP_RND_GeneralBugfixes.asm
#	catfish.asm
#	compasses.asm
#	darkworldspawn.asm
#	hooks.asm
#	inventory.asm
#	newitems.asm
#	shopkeeper.asm
#	stats.asm
#	tables.asm

Adn some updates from DR
This commit is contained in:
aerinon
2021-05-13 12:11:40 -06:00
61 changed files with 2294 additions and 859 deletions

View File

@@ -320,7 +320,7 @@ IsNarrowSprite:
JSR.w CountBottles : CMP.l BottleLimit : !BLT +
LDA.l BottleLimitReplacement
JSL.l IsNarrowSprite
BRL .done
JMP .done
+ : BRA .continue
.notBottle
CMP.b #$5E : BNE ++ ; Progressive Sword
@@ -686,16 +686,17 @@ RTL
; caller is responsible for setting 8-bit mode and preserving X and Y
;--------------------------------------------------------------------------------
CountBits:
PHB : PHK : PLB
TAX ; Save a copy of value
LSR #4 ; Shift down hi nybble, Leave <3> in C
TAY ; And save <7:4> in Y
TXA ; Recover value
AND.b #$07 ; Put out <2:0> in X
TAX ; And save in X
LDA NybbleBitCounts, Y; Fetch count for Y
ADC.l NybbleBitCounts, X; Add count for X & C
PLB
PHX
TAX ; Save a copy of value
LSR #4 ; Shift down hi nybble, Leave <3> in C
PHA ; And save <7:4> in Stack
TXA ; Recover value
AND.b #$07 ; Put out <2:0> in X
TAX ; And save in X
LDA.l NybbleBitCounts, X ; Fetch count for <2:0>
PLX ; get <7:4>
ADC.l NybbleBitCounts, X ; Add count for S & C
PLX
RTL
; Look up table of bit counts in the values $00-$0F