Compare commits
10 Commits
2477918df9
...
pikit_mode
| Author | SHA1 | Date | |
|---|---|---|---|
| 0264a85511 | |||
| 0f36eca4ab | |||
| bd722bef33 | |||
| 9208d06f3a | |||
| 2a31b7763b | |||
| 779c9a27ce | |||
| 381868c3ce | |||
| f6c0de88fb | |||
| f609727647 | |||
| 2dcfd8e67a |
@@ -213,7 +213,7 @@ incsrc gk/variable_ganon_vulnerability.asm
|
||||
incsrc gk/pseudoflute.asm
|
||||
incsrc gk/fast_junk.asm
|
||||
incsrc gk/dungeon_maps.asm
|
||||
incsrc gk/dungeon_indicator.asm
|
||||
incsrc pikit.asm
|
||||
print "End of B9: ", pc
|
||||
|
||||
warnpc $B9EE00
|
||||
|
||||
@@ -53,13 +53,24 @@ RTL
|
||||
GiveBonkItem:
|
||||
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
LDA.w SprSourceItemId, X
|
||||
|
||||
PHY : TAY
|
||||
JSL ShieldCheck
|
||||
TYA : PLY
|
||||
BCS +
|
||||
|
||||
STZ.w $0DD0, X
|
||||
PLA : PLA : PLA ; remove the stored return address
|
||||
JML $85FC9D
|
||||
|
||||
+
|
||||
JSR AbsorbKeyCheck : BCC .notKey
|
||||
PHY : LDY.b #$24 : JSL AddInventory : PLY ; do inventory processing for a small key
|
||||
LDA.l CurrentSmallKeys : INC A : STA.l CurrentSmallKeys
|
||||
LDA.b #$2F : JSL Sound_SetSfx3PanLong
|
||||
LDA.b #$01 : STA.l UpdateHUDFlag
|
||||
RTL
|
||||
.notKey
|
||||
.notKey
|
||||
PHY : TAY : JSL Link_ReceiveItem : PLY
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -246,7 +246,7 @@ FixSwimBump:
|
||||
.normal
|
||||
LDA.b LinkJumping : BNE .continue ; what we wrote over
|
||||
.not_diving
|
||||
PLA : PLA : PEA.w $87964D ; skip ahead, not diving
|
||||
PLA : PLA : PEA.w $87964E ; skip ahead, not diving
|
||||
.continue
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -78,10 +78,23 @@ JML Dungeon_OpenKeyedObject_nextChest
|
||||
|
||||
LDA.l ChestData, X : ASL A : BCC .smallChest
|
||||
|
||||
JML Dungeon_OpenKeyedObject_bigChest ;(bank01.asm line #13783)
|
||||
PHY
|
||||
LDY.b Scrap0C
|
||||
JSL ShieldCheck
|
||||
STY.b Scrap0C
|
||||
PLY
|
||||
BCC .couldntFindChest
|
||||
JML Dungeon_OpenKeyedObject_bigChest ;(bank01.asm line #13783)
|
||||
|
||||
.smallChest
|
||||
JML Dungeon_OpenKeyedObject_smallChest
|
||||
PHY
|
||||
LDY.b Scrap0C
|
||||
JSL ShieldCheck
|
||||
STY.b Scrap0C
|
||||
PLY
|
||||
BCC .couldntFindChest
|
||||
JML Dungeon_OpenKeyedObject_smallChest
|
||||
|
||||
.couldntFindChest
|
||||
JML Dungeon_OpenKeyedObject_couldntFindChest
|
||||
JML Dungeon_OpenKeyedObject_couldntFindChest
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -599,7 +599,7 @@ skip $10
|
||||
BigKeyStatus: ;27f040 (status 2 indicate BnC guard)
|
||||
dw $0002, $0002, $0001, $0001, $0000, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0000, $0000
|
||||
DungeonReminderTable: ;27f060
|
||||
dw $2DA4, $2DA4, $2DA5, $2DA6, $2DA8, $2DAA, $2DA9, $2DAE, $2DAB, $2DAD, $2DA7, $2DAC, $2DAF, $2DB0, $0000, $0000
|
||||
dw $2D50, $2D50, $2D51, $2D52, $2D54, $2D56, $2D55, $2D5A, $2D57, $2D59, $2D53, $2D58, $2D5B, $2D5C, $0000, $0000
|
||||
TotalLocationsLow: ;27f080
|
||||
db $08, $08, $06, $06, $02, $00, $04, $08, $08, $08, $06, $08, $02, $07, $00, $00
|
||||
TotalLocationsHigh: ;27f090
|
||||
@@ -696,4 +696,4 @@ dw $ffff
|
||||
OldManDarkWorld:
|
||||
dw $ffff
|
||||
OldManRetrievalWorld:
|
||||
dw $0000
|
||||
dw $0000
|
||||
@@ -1,11 +1,10 @@
|
||||
!BlankTile = $207F
|
||||
!SlashTile = $2830
|
||||
!PlusTile = $2404
|
||||
!HyphenTile = $2405
|
||||
!LTile = $2D68
|
||||
!DTile = $2D60
|
||||
!RedSquare = $345E
|
||||
!BlueSquare = $2C5E
|
||||
!BossIcon = $253C
|
||||
|
||||
DrHudOverride:
|
||||
PHB
|
||||
@@ -47,7 +46,7 @@ DRHUD_BossIndicator:
|
||||
SEP #$20
|
||||
BEQ .draw_indicator
|
||||
LDA.l CompassBossIndicator, x : CMP.b RoomIndex : BNE .draw_indicator
|
||||
LDY.w #!BossIcon
|
||||
LDY.w #!RedSquare
|
||||
.draw_indicator
|
||||
STY.w HUDMultiIndicator
|
||||
BRA DRHUD_DrawCurrentDungeonIndicator
|
||||
@@ -72,12 +71,13 @@ DRHUD_DrawCurrentDungeonIndicator: ; mX
|
||||
CMP.b #$06 : BEQ .draw_indicator
|
||||
|
||||
.get_indicator
|
||||
LDY.w #$2C28
|
||||
REP #$20 : LDA.l DungeonReminderTable,X : TAY
|
||||
SEP #$20
|
||||
.draw_indicator
|
||||
STY.w HUDCurrentDungeonWorld
|
||||
|
||||
DRHUD_DrawKeyCounter:
|
||||
LDA.l DRFlags : AND.b #$04 : BEQ .to_finished
|
||||
LDA.l DRFlags : AND.b #$04 : BEQ DRHUD_Finished
|
||||
LDA.l CompassMode : BIT.b #$03 : BEQ DRHUD_Finished
|
||||
REP #$20
|
||||
BIT.w #$0002 : BNE .skip_map_check
|
||||
@@ -90,17 +90,8 @@ DRHUD_DrawKeyCounter:
|
||||
LDA.l GenericKeys : LSR : BCS .total_only
|
||||
LDA.w DungeonCollectedKeys, X : JSR ConvertToDisplay : STA.w HUDKeysObtained
|
||||
LDA.w #!SlashTile : STA.w HUDKeysSlash
|
||||
|
||||
LDA.l ExtraChestKeys, X : AND.w #$00FF : BEQ .total_only
|
||||
JSR ConvertToDisplay : STA.w HUDKeysExtraCount
|
||||
LDA.w #!PlusTile : STA.w HUDKeysExtraPlus
|
||||
|
||||
.total_only
|
||||
SEP #$20
|
||||
LDA.l ChestKeys, X : SEC : SBC.l ExtraChestKeys, X
|
||||
REP #$20
|
||||
JSR ConvertToDisplay : STA.w HUDKeysTotal
|
||||
.to_finished
|
||||
LDA.l ChestKeys, x : JSR ConvertToDisplay : STA.w HUDKeysTotal
|
||||
JMP DRHUD_Finished
|
||||
|
||||
OWRHUD_DrawWorldIndicator:
|
||||
@@ -301,29 +292,17 @@ BossStatus:
|
||||
; default palette 3 - white
|
||||
LDA.l DungeonReminderTable, X : RTS
|
||||
|
||||
ConvertToDisplay: ; transparent background
|
||||
AND.w #$00FF
|
||||
CMP.w #$000A : BCC .under10
|
||||
CMP.w #$000C : BCC .under12
|
||||
.over11
|
||||
CLC : ADC.w #$2553 : RTS
|
||||
.under12
|
||||
CLC : ADC.w #$2519 : RTS
|
||||
.under10
|
||||
CLC : ADC.w #$2490 : RTS
|
||||
ConvertToDisplay:
|
||||
and.w #$00ff : cmp.w #$000a : !BLT +
|
||||
!ADD.w #$2519 : rts
|
||||
+ !ADD.w #$2490 : rts
|
||||
|
||||
ConvertToDisplay2: ; solid background
|
||||
AND.w #$00FF : BEQ .zero
|
||||
CMP.w #$000A : BCC .under10
|
||||
CMP.w #$000C : BCC .under12
|
||||
.over11
|
||||
CLC : ADC.w #$2580 : RTS
|
||||
.under12
|
||||
CLC : ADC.w #$2517 : RTS
|
||||
.under10
|
||||
CLC : ADC.w #$2816 : RTS
|
||||
.zero
|
||||
LDA.w #$2827 : RTS
|
||||
ConvertToDisplay2:
|
||||
and.w #$00ff : beq ++
|
||||
cmp.w #$000a : !BLT +
|
||||
!ADD.w #$2517 : rts ; 2580 with 258A as "A" for non transparent digits
|
||||
+ !ADD.w #$2816 : rts
|
||||
++ lda.w #$2827 : rts ; 0/O for 0 or placeholder digit ;2483
|
||||
|
||||
CountAbsorbedKeys:
|
||||
JML IncrementSmallKeysNoPrimary
|
||||
|
||||
@@ -88,6 +88,7 @@ RTL
|
||||
|
||||
PrizeReceiveItem:
|
||||
PHA
|
||||
LDA.b #$00 : STA.l BossDropTouched
|
||||
JSL BossPrizeGetPlayer : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
CMP.b #$6A : BNE +
|
||||
@@ -105,7 +106,7 @@ RTL
|
||||
SetItemPose:
|
||||
PHA
|
||||
LDA.w DungeonID : BMI .one_handed
|
||||
LDA.w RoomItemsTaken : BIT.b #$80 : BNE +
|
||||
JSL CheckBossDropTouched : BNE +
|
||||
.one_handed
|
||||
PLA
|
||||
JML Link_ReceiveItem_not_cool_pose
|
||||
@@ -134,7 +135,7 @@ SetCutsceneFlag:
|
||||
PHX
|
||||
LDY.b #$01 ; wrote over
|
||||
LDA.w DungeonID : BMI .no_cutscene
|
||||
LDA.w RoomItemsTaken : BIT.b #$80 : BNE .dungeon_prize
|
||||
JSL CheckBossDropTouched : BNE .dungeon_prize
|
||||
.no_cutscene
|
||||
SEP #$30
|
||||
PLX
|
||||
@@ -155,7 +156,7 @@ AnimatePrizeCutscene:
|
||||
LDA.w ItemReceiptMethod : CMP.b #$03 : BNE +
|
||||
JSR CrystalOrPendantBehavior : BCC +
|
||||
LDA.w DungeonID : BMI +
|
||||
LDA.w RoomItemsTaken : BIT.b #$80 : BEQ +
|
||||
JSL CheckBossDropTouched : BEQ +
|
||||
SEC
|
||||
RTL
|
||||
+
|
||||
@@ -172,13 +173,13 @@ PrizeDropSparkle:
|
||||
RTL
|
||||
|
||||
HandleDropSFX:
|
||||
LDA.w RoomItemsTaken : BIT.b #$80 : BEQ .no_sound
|
||||
JSR CrystalOrPendantBehavior : BCC .no_sound
|
||||
SEC
|
||||
RTL
|
||||
.no_sound
|
||||
CLC
|
||||
RTL
|
||||
JSL CheckBossDropTouched : BEQ .no_sound
|
||||
JSR CrystalOrPendantBehavior : BCC .no_sound
|
||||
SEC
|
||||
RTL
|
||||
.no_sound
|
||||
CLC
|
||||
RTL
|
||||
|
||||
HandleCrystalsField:
|
||||
TAX
|
||||
@@ -192,7 +193,7 @@ RTL
|
||||
MaybeKeepLootID:
|
||||
PHA
|
||||
LDA.w DungeonID : BMI .no_prize
|
||||
LDA.w RoomItemsTaken : BIT.b #$80 : BNE .prize
|
||||
JSL CheckBossDropTouched : BNE .prize
|
||||
.no_prize
|
||||
STZ.w ItemReceiptID
|
||||
STZ.w ItemReceiptPose
|
||||
@@ -216,6 +217,15 @@ CheckSpawnPrize:
|
||||
SEP #$21
|
||||
RTL
|
||||
|
||||
CheckBossDropTouched:
|
||||
; Out: z - boss drop not touched
|
||||
LDA.w RoomItemsTaken
|
||||
AND.b #$80
|
||||
BNE .done
|
||||
LDA.l BossDropTouched
|
||||
.done
|
||||
RTL
|
||||
|
||||
CheckDungeonCompletion:
|
||||
LDX.w DungeonID
|
||||
REP #$20
|
||||
|
||||
@@ -857,7 +857,6 @@ RTL
|
||||
Kiki_DontScareTheMonke:
|
||||
LDA.b LinkJumping : BEQ .return
|
||||
CMP.b #$02 : BEQ .no_spook ; needed for quake usage
|
||||
LDA.b GameMode : CMP.b #$0F : BEQ .no_spook ; needed for entrance transitions
|
||||
LDA.w NoDamage : BNE .no_spook
|
||||
LDA.w LinkThud : BNE .no_spook
|
||||
.spook
|
||||
|
||||
@@ -17,7 +17,7 @@ CheckLoot:
|
||||
STA.b $0E
|
||||
|
||||
LDA.b $CA
|
||||
AND.w #$01FF
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
|
||||
@@ -31,10 +31,6 @@ CheckLoot:
|
||||
STA.b $0E
|
||||
|
||||
+ LDA.w DungeonID
|
||||
AND.w #$00FF
|
||||
CMP.w #$00FF
|
||||
BEQ .skip_dungeon_checks
|
||||
|
||||
TAX
|
||||
|
||||
LDA.l MapField
|
||||
@@ -56,8 +52,6 @@ CheckLoot:
|
||||
STA.b $0E
|
||||
+
|
||||
|
||||
.skip_dungeon_checks
|
||||
|
||||
LDA.l ItemSources : BIT.w #$0001 : BEQ +
|
||||
JSR CheckChests
|
||||
+
|
||||
@@ -88,7 +82,7 @@ CheckLoot:
|
||||
|
||||
CheckChests:
|
||||
LDA.b $CA
|
||||
AND.w #$01FF
|
||||
AND.w #$00FF
|
||||
STA.b $00
|
||||
ASL A
|
||||
TAX
|
||||
@@ -147,7 +141,7 @@ CheckBoss:
|
||||
|
||||
+
|
||||
LDA.b $CA
|
||||
AND.w #$01FF
|
||||
AND.w #$00FF
|
||||
STA.b $04
|
||||
|
||||
LDX.w #$FFFA
|
||||
@@ -202,7 +196,7 @@ CheckBoss:
|
||||
|
||||
CheckPrize:
|
||||
LDA.b $CA
|
||||
AND.w #$01FF
|
||||
AND.w #$00FF
|
||||
STA.b $04
|
||||
|
||||
LDX.w #$FFFD
|
||||
@@ -238,7 +232,7 @@ CheckPrize:
|
||||
|
||||
CheckPots:
|
||||
LDA.b $CA
|
||||
AND.w #$01FF
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
|
||||
@@ -304,7 +298,7 @@ CheckPots:
|
||||
+
|
||||
|
||||
LDA.b $CA
|
||||
AND.w #$01FF
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
if !FEATURE_FIX_BASEROM
|
||||
@@ -342,7 +336,7 @@ CheckJunkPot:
|
||||
+
|
||||
|
||||
LDA.b $CA
|
||||
AND.w #$01FF
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l PotCollectionRateTable, X
|
||||
@@ -370,7 +364,7 @@ endif
|
||||
|
||||
CheckEnemies:
|
||||
LDA.b $CA
|
||||
AND.w #$01FF
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
|
||||
@@ -460,7 +454,7 @@ CheckEnemies:
|
||||
+
|
||||
|
||||
LDA.b $CA
|
||||
AND.w #$01FF
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
|
||||
@@ -490,9 +484,7 @@ GetLootClass:
|
||||
CMP.w #$0080 : BNE .not_compass
|
||||
|
||||
.compass
|
||||
LDA.l AlwaysShowCompass
|
||||
AND.w #$00FF
|
||||
BNE .check_value
|
||||
LDA.l AlwaysShowCompass : BNE .check_value
|
||||
|
||||
.not_compass
|
||||
LDA.b $0E
|
||||
@@ -540,7 +532,7 @@ macro DefineGetFooSection(type, offset)
|
||||
Get<type>Section:
|
||||
PHX
|
||||
LDA.b $CA
|
||||
AND.w #$01FF
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l SplitRooms, X
|
||||
@@ -588,13 +580,13 @@ Check<type>Section:
|
||||
STA.b $CC
|
||||
|
||||
LDA.b $CB
|
||||
AND.w #$00F0
|
||||
AND.w #$00FF
|
||||
BEQ .yes
|
||||
|
||||
JSR Get<type>Section
|
||||
|
||||
LDA.b $CB
|
||||
AND.w #$00F0
|
||||
AND.w #$00FF
|
||||
LSR A : LSR A : LSR A : LSR A
|
||||
DEC A
|
||||
CMP.b $CE
|
||||
|
||||
@@ -61,24 +61,7 @@ SplitRooms:
|
||||
%d(.no) : %d(.d1) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.d6) : %d(.no)
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.db) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||
|
||||
; E0
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||
|
||||
; F0
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||
|
||||
; 100
|
||||
%d(.no) : %d(.101) : %d(.no) : %d(.103) : %d(.no) : %d(.no) : %d(.106) : %d(.107)
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.10c) : %d(.no) : %d(.10e) : %d(.no)
|
||||
|
||||
; 110
|
||||
%d(.no) : %d(.no) : %d(.112) : %d(.no) : %d(.114) : %d(.115) : %d(.no) : %d(.no)
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.11b) : %d(.11c) : %d(.no) : %d(.11e) : %d(.11f)
|
||||
|
||||
; 120
|
||||
%d(.120) : %d(.no) : %d(.122) : %d(.no) : %d(.124) : %d(.125) : %d(.126) : %d(.no)
|
||||
%d(.no)
|
||||
|
||||
.no
|
||||
db $00
|
||||
@@ -452,7 +435,7 @@ db $01
|
||||
%d(..areas) : %d(..doors) : %d(.no_items) : %d(.no_items) : %d(.no_items) : %d(.no_items)
|
||||
..areas
|
||||
db $02, $00, $80, $00, $FF
|
||||
db $01, $34, $44, $B4, $FF
|
||||
db $01, $34, $D4, $B8, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $03, $06
|
||||
@@ -586,326 +569,3 @@ db $FF
|
||||
..chests
|
||||
db $01
|
||||
db $FF
|
||||
|
||||
.101 ; East Snitch House (2) // West Snitch House (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(..pots) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..pots
|
||||
db $00
|
||||
db $FF
|
||||
..enemies
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.103 ; Man With Beds (3) // Front of Tavern (2) // Back of Tavern (1)
|
||||
db $02
|
||||
%sq($00)
|
||||
%d(..areas3) : %d(..doors3) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies3)
|
||||
%sq($00)
|
||||
%d(..areas2) : %d(..doors2) : %d(.no_items)
|
||||
%d(.no_items) : %d(..pots2) : %d(..enemies2)
|
||||
..areas3
|
||||
db $03, $80, $FF, $00, $FF
|
||||
db $FF
|
||||
..doors3
|
||||
db $08
|
||||
db $FF
|
||||
..enemies3
|
||||
db $02
|
||||
db $FF
|
||||
..areas2
|
||||
db $03, $00, $7F, $50, $FF
|
||||
db $FF
|
||||
..doors2
|
||||
db $06
|
||||
db $FF
|
||||
..pots2
|
||||
db $02
|
||||
db $FF
|
||||
..enemies2
|
||||
db $00
|
||||
db $01
|
||||
db $FF
|
||||
|
||||
.106 ; VoO Chest Game (2) // Brewery (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..enemies
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.107 ; Library (2) // Bomb Refill Hut (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(.no_items)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
|
||||
.10c ; Mimic Cave (2) // Hookshot Fairy Pot (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(..chests) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..chests
|
||||
db $00
|
||||
db $FF
|
||||
..enemies
|
||||
db $04
|
||||
db $05
|
||||
db $06
|
||||
db $07
|
||||
db $FF
|
||||
|
||||
.10e ; Storyteller (2) // Storyteller (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..chests
|
||||
db $FF
|
||||
..pots
|
||||
db $FF
|
||||
..enemies
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.112 ; Dark Chapel (2) // Store (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..enemies
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.114 ; Waterfall Fairy (2) // Hint NPC (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(..chests) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..chests
|
||||
db $00
|
||||
db $01
|
||||
db $FF
|
||||
..enemies
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.115 ; Capacity Fairy (1) // Healing Fairy (2)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $80, $FF, $80, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $08
|
||||
db $FF
|
||||
..enemies
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.11b ; Cave 45 (2) // Graveyard Ledge (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(..pots) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..pots
|
||||
db $00
|
||||
db $01
|
||||
db $02
|
||||
db $03
|
||||
db $04
|
||||
db $05
|
||||
db $FF
|
||||
..enemies
|
||||
db $01
|
||||
db $FF
|
||||
|
||||
.11c ; Bomb Shop (2) // C-Shaped House (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..enemies
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.11e ; Long Fairy Cave (2) // Hype Cave (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..enemies
|
||||
db $00
|
||||
db $01
|
||||
db $02
|
||||
db $03
|
||||
db $FF
|
||||
|
||||
.11f ; Lumberjack House (1) // Store (2)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $80, $FF, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $08
|
||||
db $FF
|
||||
..enemies
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.120 ; Ice Rod Cave (1) // Cool Bee Cave (2)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $80, $FF, $00, $FF
|
||||
db $03, $80, $FF, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $08
|
||||
db $FF
|
||||
..enemies
|
||||
db $00
|
||||
db $01
|
||||
db $02
|
||||
db $FF
|
||||
|
||||
.122 ; Fortune Teller (2) // Other Fortune Teller (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..enemies
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.124 ; 50-Rupee Cave (1) // Bonk Rocks (2)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(..chests) : %d(.no_items) : %d(.no_items)
|
||||
..areas
|
||||
db $03, $80, $FF, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $08
|
||||
db $FF
|
||||
..chests
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.125 ; 20-Rupee Cave (2) // Spiky Hint Cave (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(..pots) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..pots
|
||||
db $00
|
||||
db $01
|
||||
db $02
|
||||
db $03
|
||||
db $FF
|
||||
..enemies
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.126 ; Bonk Fairy Pool (2) // Checkerboard Cave (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $7F, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..enemies
|
||||
db $01
|
||||
db $02
|
||||
db $03
|
||||
db $04
|
||||
db $FF
|
||||
|
||||
@@ -172,7 +172,6 @@ DrawSingleRoomLoot:
|
||||
STA.w GFXStripes+$0C, Y
|
||||
|
||||
LDA.b $CA
|
||||
AND.w #$F0FF
|
||||
JSL CheckLoot
|
||||
|
||||
ASL A : ASL A : ASL A
|
||||
@@ -688,13 +687,6 @@ GetSpecificRoomVisibility:
|
||||
STA.b $0A
|
||||
+
|
||||
|
||||
SEP #$20
|
||||
LDA.b $0A
|
||||
CMP.b $0B
|
||||
BCC +
|
||||
STA.b $0B
|
||||
+
|
||||
|
||||
REP #$20
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
@@ -2113,13 +2105,6 @@ DrawDoorsStairs:
|
||||
|
||||
DetectLinksSection:
|
||||
LDA.b RoomIndex
|
||||
CMP.w #$0128
|
||||
BCC +
|
||||
|
||||
LDA.w #$0000
|
||||
RTL
|
||||
+
|
||||
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l SplitRooms, X
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
LoadDungeonIndicator:
|
||||
; what we wrote over
|
||||
JSL InitializeTilesets
|
||||
|
||||
LDA.w DungeonID
|
||||
CMP.b #DungeonIndicatorMap_end-DungeonIndicatorMap : BCS .done
|
||||
TAX
|
||||
LDA.l DungeonIndicatorMap, X
|
||||
TAX
|
||||
|
||||
LDA.b #$80
|
||||
STA.w $2115
|
||||
|
||||
REP #$20
|
||||
LDA.w #$7140
|
||||
STA.w $2116
|
||||
|
||||
LDY.b #$10
|
||||
|
||||
- LDA.l DungeonIndicatorGfx, X
|
||||
STA.w $2118
|
||||
INX #2
|
||||
DEY #2
|
||||
BNE -
|
||||
|
||||
SEP #$20
|
||||
.done
|
||||
RTL
|
||||
|
||||
DungeonIndicatorMap:
|
||||
dw $0000
|
||||
dw $0000
|
||||
dw $0010
|
||||
dw $0020
|
||||
dw $0040
|
||||
dw $0060
|
||||
dw $0050
|
||||
dw $00A0
|
||||
dw $0070
|
||||
dw $0090
|
||||
dw $0030
|
||||
dw $0080
|
||||
dw $00B0
|
||||
dw $00C0
|
||||
.end
|
||||
|
||||
DungeonIndicatorGfx:
|
||||
incbin "menu/dr_dungeon_indicators.2bpp"
|
||||
.end
|
||||
|
||||
@@ -34,7 +34,6 @@ incsrc map_bg3.asm
|
||||
incsrc dungeon_switch.asm
|
||||
incsrc draw_loot.asm
|
||||
incsrc check_loot.asm
|
||||
incsrc loot_hud.asm
|
||||
incsrc blink_loot.asm
|
||||
incsrc data/doors_display.asm
|
||||
incsrc data/spiral_stairs.asm
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
UpdateLootHUD:
|
||||
PHP
|
||||
REP #$30
|
||||
PHX : PHY
|
||||
SEP #$30
|
||||
|
||||
LDA.l ShowLootInHUD : BEQ .setting_off
|
||||
LDA.b IndoorsFlag : BEQ .done
|
||||
|
||||
REP #$30
|
||||
LDA.b $00 : PHA
|
||||
LDA.b $02 : PHA
|
||||
LDA.b $04 : PHA
|
||||
LDA.b $06 : PHA
|
||||
LDA.b $08 : PHA
|
||||
LDA.b $0E : PHA
|
||||
|
||||
; if if door rando, check for section of supertile
|
||||
LDA.l DRMode
|
||||
BNE +
|
||||
|
||||
; if not in door rando, check for section of supertile if we're not in a dungeon
|
||||
LDA.w DungeonID
|
||||
AND.w #$00FF
|
||||
CMP.w #$00FF
|
||||
BEQ +
|
||||
|
||||
; just load the room id, we don't care about sections
|
||||
LDA.b RoomIndex
|
||||
BRA .check
|
||||
|
||||
+ ; figure out section before checking
|
||||
JSL DetectLinksSection
|
||||
INC A
|
||||
XBA
|
||||
ASL A : ASL A : ASL A : ASL A
|
||||
ORA.b RoomIndex
|
||||
.check
|
||||
JSL CheckLoot
|
||||
|
||||
SEP #$30
|
||||
CMP.l ShowItems_hud_cap
|
||||
BCC +
|
||||
LDA.l ShowItems_hud_cap
|
||||
+
|
||||
|
||||
LDX.w DungeonID
|
||||
CPX.b #$FF
|
||||
BNE +
|
||||
CMP.l ShowItems_cave_cap
|
||||
BCC +
|
||||
LDA.l ShowItems_cave_cap
|
||||
+
|
||||
|
||||
REP #$30
|
||||
|
||||
ASL A : TAX
|
||||
LDA.l HUDLootTypeIcons, X
|
||||
STA.w EnemyDropIndicator
|
||||
|
||||
PLA : STA.b $0E
|
||||
PLA : STA.b $08
|
||||
PLA : STA.b $06
|
||||
PLA : STA.b $04
|
||||
PLA : STA.b $02
|
||||
PLA : STA.b $00
|
||||
BRA .done
|
||||
|
||||
.setting_off
|
||||
JSL SetupEnemyDropIndicator
|
||||
|
||||
.done
|
||||
REP #$30
|
||||
PLY : PLX
|
||||
PLP
|
||||
RTL
|
||||
@@ -146,25 +146,6 @@ dw $25A4, $25A4 ; Reserved
|
||||
dw $25A4, $25A4 ; Reserved
|
||||
|
||||
; $B9FB40
|
||||
HUDLootTypeIcons:
|
||||
dw $287F ; 00 - nothing
|
||||
dw $295C ; 01 - unknown - dot
|
||||
dw $2954 ; 02 - junk - pot
|
||||
dw $2950 ; 03 - small key
|
||||
dw $2952 ; 04 - triforce piece
|
||||
dw $2955 ; 05 - safety - plus
|
||||
dw $2953 ; 06 - less important item - small chest
|
||||
dw $2957 ; 07 - map
|
||||
dw $2D56 ; 08 - compass
|
||||
dw $2950 ; 09 - small key
|
||||
dw $2951 ; 0A - big key
|
||||
dw $295A ; 0B - important inventory item - big chest
|
||||
dw $2D58 ; 0C - pendant
|
||||
dw $2D59 ; 0D - crystal
|
||||
dw $2952 ; 0E - triforce piece
|
||||
dw $295B ; 0F - triforce
|
||||
|
||||
; $B9FB60
|
||||
|
||||
warnpc $B9FE00
|
||||
org $B9FE00
|
||||
@@ -209,11 +190,7 @@ ShowItems:
|
||||
.visited_tile
|
||||
db $01
|
||||
.reserved
|
||||
skip 2
|
||||
.hud_cap
|
||||
db $FF
|
||||
.cave_cap
|
||||
db $01
|
||||
skip 4
|
||||
warnpc $B9FF10
|
||||
|
||||
org $B9FF10
|
||||
@@ -229,7 +206,3 @@ ItemSources:
|
||||
; $B9FF11
|
||||
AlwaysShowCompass:
|
||||
db $01
|
||||
|
||||
; $B9FF12
|
||||
ShowLootInHUD:
|
||||
db $01
|
||||
|
||||
@@ -13,8 +13,7 @@ GKRomVersion:
|
||||
; $01 = Dungeon Maps
|
||||
; .., $01 = Dark rooms don't show on map from visition
|
||||
; .., $02 = OW Fog and Grid modes
|
||||
; .., $03 = Loot level of current supertile in HUD
|
||||
db $01, $03, $00
|
||||
db $01, $02, $00
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
;================================================================================
|
||||
|
||||
@@ -70,7 +70,7 @@ GetAgahnimLightning:
|
||||
;1 = Forbid
|
||||
AllowJoypadInput:
|
||||
LDA.l PermitSQFromBosses : BEQ .fullCheck
|
||||
LDA.w RoomItemsTaken : AND.b #$80 : BEQ .fullCheck
|
||||
JSL CheckBossDropTouched : BEQ .fullCheck
|
||||
LDA.w MedallionFlag : ORA.w CutsceneFlag ; we have heart container, do short check
|
||||
RTL
|
||||
.fullCheck
|
||||
|
||||
@@ -2,13 +2,20 @@
|
||||
; Randomize Half Magic Bat
|
||||
;--------------------------------------------------------------------------------
|
||||
GetMagicBatItem:
|
||||
JSL ItemSet_MagicBat
|
||||
%GetPossiblyEncryptedItem(MagicBatItem, SpriteItemValues)
|
||||
CMP.b #$FF : BEQ .normalLogic
|
||||
TAY
|
||||
PHA : LDA.l MagicBatItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .have_shield
|
||||
LDA.l MagicBatItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
JSL ItemSet_MagicBat
|
||||
PLA
|
||||
STZ.b ItemReceiptMethod ; 0 = Receiving item from an NPC or message
|
||||
JML Link_ReceiveItem
|
||||
.have_shield
|
||||
PLA
|
||||
RTL
|
||||
.normalLogic
|
||||
LDA.l HalfMagic
|
||||
STA.l MagicConsumption
|
||||
|
||||
@@ -5,8 +5,17 @@ HeartPieceGet:
|
||||
PHX : PHY
|
||||
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
||||
LDY.w SprSourceItemId, X
|
||||
JSL HeartGet
|
||||
BCC +
|
||||
JSL MaybeMarkDigSpotCollected
|
||||
.skipLoad
|
||||
+
|
||||
PLY : PLX
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
HeartGet:
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
CPY.b #$26 : BNE .not_heart ; don't add a 1/4 heart if it's not a heart piece
|
||||
CMP.b #$00 : BNE .not_heart
|
||||
@@ -16,15 +25,27 @@ HeartPieceGet:
|
||||
STZ.w ItemReceiptMethod ; 0 = Receiving item from an NPC or message
|
||||
JSL Link_ReceiveItem
|
||||
JSL MaybeUnlockTabletAnimation
|
||||
|
||||
PLY : PLX
|
||||
RTL
|
||||
SEC
|
||||
RTL
|
||||
.skip
|
||||
JSL MaybeFreeLinkFromTablet
|
||||
CLC
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
HeartContainerGet:
|
||||
PHX : PHY
|
||||
JSL IncrementBossSword
|
||||
LDY.w SprSourceItemId, X
|
||||
BRA HeartPieceGet_skipLoad
|
||||
JSL HeartGet
|
||||
PLY : PLX
|
||||
BCC +
|
||||
LDA.w RoomItemsTaken
|
||||
ORA.b #$80
|
||||
STA.w RoomItemsTaken
|
||||
+
|
||||
LDA.b #$01
|
||||
STA.l BossDropTouched
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DrawHeartPieceGFX:
|
||||
PHP
|
||||
|
||||
79
hooks.asm
79
hooks.asm
@@ -1053,8 +1053,12 @@ Overworld_Entrance_BRANCH_EPSILON: ; go here to lock doors
|
||||
org $81C50D : JSL CheckDungeonWorld
|
||||
org $81C517 : JSL CheckDungeonCompletion
|
||||
org $81C523 : JSL CheckDungeonCompletion
|
||||
org $81C710 : JSL CheckSpawnPrize
|
||||
BCS RoomTag_GetHeartForPrize_spawn_prize : BRA RoomTag_GetHeartForPrize_delete_tag
|
||||
org $81C709 : JSL CheckBossDropTouched : NOP
|
||||
org $81C710
|
||||
JSL CheckSpawnPrize
|
||||
BCS RoomTag_GetHeartForPrize_spawn_prize
|
||||
BRA RoomTag_GetHeartForPrize_delete_tag
|
||||
warnpc $81C731
|
||||
org $81C742 : JSL SpawnDungeonPrize : PLA : RTS
|
||||
org $8799EA : JML SetItemPose
|
||||
org $88C415 : JSL PendantMusicCheck
|
||||
@@ -1066,6 +1070,7 @@ org $88C622 : BCC ItemReceipt_Animate_continue
|
||||
org $88C6BA : JSL CheckPoseItemCoordinates
|
||||
org $88C6C3 : JSL PrepPrizeVRAMHigh
|
||||
org $88C6F4 : JSL PrepPrizeVRAMLow
|
||||
org $88CAC4 : JSL CheckBossDropTouched : NOP
|
||||
org $88CAD6 : JSL HandleDropSFX : NOP #2
|
||||
org $88CADC : BCC Ancilla29_MilestoneItemReceipt_skip_crystal_sfx
|
||||
org $88CAE9 : JSL PrepPrizeTile
|
||||
@@ -1517,8 +1522,9 @@ JSL DrawHeartPiecesMenu : BRA DrawEquipment_in_a_dungeon
|
||||
;================================================================================
|
||||
; 300 Rupee NPC
|
||||
;--------------------------------------------------------------------------------
|
||||
org $9EF060 ; <- F7060 - sprite_shopkeeper.asm:242 (INC $0D80, X)
|
||||
JSL Set300RupeeNPCItem : NOP
|
||||
org $9EF058 ; <- F7060 - sprite_shopkeeper.asm:242 (INC $0D80, X)
|
||||
JSL Set300RupeeNPCItem
|
||||
BCS + : RTS : NOP #6 : +
|
||||
|
||||
;================================================================================
|
||||
; Tree Kid Fix
|
||||
@@ -2005,7 +2011,7 @@ org $85EE53 ; <- 2EE53 - mushroom.asm : 22
|
||||
JSL ItemCheck_Mushroom : NOP #2
|
||||
;--------------------------------------------------------------------------------
|
||||
org $85EE8C ; <- 2EE8C - mushroom.asm : 69
|
||||
JSL ItemSet_Mushroom : NOP
|
||||
JSL ItemSet_Mushroom : NOP #5
|
||||
;--------------------------------------------------------------------------------
|
||||
org $85F53E ; <- 2F53E - sprite_potion_shop.asm : 40
|
||||
JSL ItemCheck_Powder : CMP.b #$20
|
||||
@@ -2019,8 +2025,15 @@ JSL ItemCheck_MagicBat : BEQ + : RTS : NOP : +
|
||||
;================================================================================
|
||||
org $86BD6C ; <- 33D6C - sprite_middle_aged_man.asm:143 (JSL Link_ReceiveItem)
|
||||
JSL Multiworld_MiddleAgedMan_ReactToSecretKeepingResponse
|
||||
BRA + : NOP #8 : +
|
||||
;--------------------------------------------------------------------------------
|
||||
org $86BE70 ; <- 33E72 - bank_06.asm:11877
|
||||
BRA + : NOP #10 : +
|
||||
|
||||
org $86BE81 ; <- 33E81 - sprite_hobo.asm:150 (JSL Link_ReceiveItem)
|
||||
JSL Multiworld_Hobo_GrantBottle
|
||||
BRA + : NOP #8 : +
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8589B4 ; <- 289B4 ; sprite_master_sword.asm:183 (JSL Link_ReceiveItem)
|
||||
JSL Multiworld_MasterSword_GrantToPlayer
|
||||
;================================================================================
|
||||
@@ -2033,7 +2046,10 @@ org $85EF79 ; <- 2EF79 - sprite_heart_upgrades.asm:128 (JSL Sprite_PrepAndDrawSi
|
||||
JSL DrawHeartContainerGFX
|
||||
;--------------------------------------------------------------------------------
|
||||
org $85EFCE ; <- 2EFCE - sprite_heart_upgrades.asm:176 (JSL Link_ReceiveItem)
|
||||
JSL HeartContainerGet
|
||||
JSL HeartContainerGet ; this also handles setting the boss-killed flag if appropriate
|
||||
PLX
|
||||
RTS
|
||||
warnpc $85EFDC
|
||||
;--------------------------------------------------------------------------------
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8799B1 ; 399B1 - Bank07.asm:4063 (CPY.b #$3E : BNE .notHeartContainer)
|
||||
@@ -2059,10 +2075,13 @@ JSL HeartPieceSpawnDelayFix
|
||||
;--------------------------------------------------------------------------------
|
||||
org $85F08A ; <- 2F08A - sprite_heart_upgrades.asm : 324 - (LDA $7EF36B : INC A : AND.b #$03 : STA $7EF36B : BNE .got_4_piecese) item determination
|
||||
JSL HeartPieceGet
|
||||
PHP
|
||||
JSL DynamicDrawCleanup
|
||||
PLP : BCC +
|
||||
JSL IsMedallion
|
||||
BCS + : BRA Sprite_EB_HeartPiece_handle_flags : + ; Don't change OW flags if we're
|
||||
STZ.w SpriteAITable, X : RTS ; getting a tablet item
|
||||
warnpc $85F0C0
|
||||
;--------------------------------------------------------------------------------
|
||||
org $86C0B0 ; <- 340B0 - sprite prep
|
||||
JSL HeartPieceSpritePrep
|
||||
@@ -2758,13 +2777,6 @@ JSL MimicDirection
|
||||
org $828068
|
||||
JSL AdjustDefaultGraphics
|
||||
|
||||
;================================================================================
|
||||
;--------------------------------------------------------------------------------
|
||||
; Dungeon Indicator VRAM overwrite
|
||||
;--------------------------------------------------------------------------------
|
||||
org $828190
|
||||
JSL LoadDungeonIndicator
|
||||
|
||||
;================================================================================
|
||||
; Special Weapons Modes
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -2835,3 +2847,44 @@ org $8DFB63 ; bank_0D.asm@18092 (LDA.l $7EF33F, X : AND.w #$00FF)
|
||||
JSL CheckFluteInHUD
|
||||
NOP #3
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
;================================================================================
|
||||
; Pikit Nonsense
|
||||
;--------------------------------------------------------------------------------
|
||||
org $81EC39
|
||||
JSL SmallChest_ShieldCheck
|
||||
BCC Dungeon_OpenKeyedObject_couldntFindChest+1
|
||||
|
||||
org $81EC17
|
||||
JSL BigChest_ShieldCheck
|
||||
BCC Dungeon_OpenKeyedObject_couldntFindChest
|
||||
NOP #2
|
||||
|
||||
org $9E8D6F
|
||||
JML PikitSteal
|
||||
|
||||
org $9E8CF2
|
||||
JSL PikitDigest
|
||||
NOP #2
|
||||
|
||||
org $879A52
|
||||
JSL LinkSnoring
|
||||
|
||||
org $879AAD
|
||||
JSL LinkAwaken
|
||||
|
||||
org $879A31
|
||||
JSL TuckLink
|
||||
NOP #2
|
||||
|
||||
org $80F950
|
||||
NOP #2
|
||||
|
||||
org $81EEB3
|
||||
JSL MaybeFlagVoOChestGamePrize
|
||||
BCS ContinueVoOCheck
|
||||
PLB : RTL
|
||||
|
||||
org $81EEC7
|
||||
ContinueVoOCheck:
|
||||
|
||||
@@ -114,14 +114,15 @@ StartingGenericKeys: skip 1 ; PC 0x18338B
|
||||
InitInventoryTracking: skip 2 ; PC 0x18338C \ Need to set bits here for silver arrows,
|
||||
InitBowTracking: skip 2 ; PC 0x18338E / boomerangs, powder/mushroom, etc
|
||||
InitItemLimitCounts: skip 16 ; PC 0x183390
|
||||
skip 34 ;
|
||||
skip 32 ;
|
||||
InitPikitItem: dw $0004 ;
|
||||
InitFluteBitfield: db $00 ;
|
||||
InitSpecialWeaponLevel: db $00 ;
|
||||
InitItemOnB: db $00 ;
|
||||
InitProgressIndicator: db $02 ; PC 0x1833C5 - Set to $80 for instant post-aga with standard
|
||||
InitProgressFlags: db $14 ; PC 0x1833C6 - Set to $00 for standard
|
||||
InitProgressIndicator: db $00 ; PC 0x1833C5 - Set to $80 for instant post-aga with standard
|
||||
InitProgressFlags: db $04 ; PC 0x1833C6 - Set to $00 for standard
|
||||
InitMapIcons: skip 1 ; PC 0x1833C7
|
||||
InitStartingEntrance: db $01 ; PC 0x1833C8 - Set to $00 for standard
|
||||
InitStartingEntrance: db $00 ; PC 0x1833C8 - Set to $00 for standard
|
||||
InitNpcFlagsVanilla: skip 1 ; PC 0x1833C9
|
||||
InitCurrentWorld: skip 1 ; PC 0x1833CA
|
||||
skip 1 ; PC 0x1833CB
|
||||
|
||||
@@ -165,7 +165,6 @@ AddInventory:
|
||||
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .done
|
||||
REP #$30
|
||||
LDA.l TotalItemCounter : INC : TAY
|
||||
JSL UpdateLootHUD
|
||||
LDA.l BootsEquipment : AND.w #$00FF : BNE +
|
||||
TYA : STA.l PreBootsLocations
|
||||
+
|
||||
@@ -649,16 +648,23 @@ RTL
|
||||
CollectPowder:
|
||||
LDY.w SprSourceItemId, X ; Retrieve stored item type
|
||||
BNE +
|
||||
; if for any reason the item value is 0 reload it, just in case
|
||||
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues) : TAY
|
||||
+ PHA
|
||||
LDA.l WitchItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
LDA.b #$01 : STA.l ShopEnableCount
|
||||
; if for any reason the item value is 0 reload it, just in case
|
||||
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues) : TAY
|
||||
+
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
|
||||
LDA.l WitchItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
LDA.b #$01 : STA.l ShopEnableCount
|
||||
PLA
|
||||
STZ.w ItemReceiptMethod ; item from NPC
|
||||
JSL Link_ReceiveItem
|
||||
PHA : LDA.b #$00 : STA.l ShopEnableCount : STA.l PowderFlag : PLA
|
||||
PHA : LDA.b #$00 : STA.l ShopEnableCount : STA.l PowderFlag
|
||||
JSL ItemSet_Powder
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -416,40 +416,40 @@ macro SpriteProps(id, chest_width, standing_width, chest_pal, standing_pal, addr
|
||||
pullpc
|
||||
endmacro
|
||||
|
||||
%SpriteProps($00, 0, 2, $05, $02, PalettesVanilla_blue_ice+$0E) ; 00 - Fighter sword & Shield
|
||||
%SpriteProps($01, 0, 2, $05, $05, PalettesCustom_master_sword) ; 01 - Master sword
|
||||
%SpriteProps($02, 0, 2, $05, $01, PalettesCustom_tempered_sword) ; 02 - Tempered sword
|
||||
%SpriteProps($03, 0, 2, $05, $04, PalettesCustom_golden_sword) ; 03 - Golden sword
|
||||
%SpriteProps($00, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 00 - Fighter sword & Shield
|
||||
%SpriteProps($01, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 01 - Master sword
|
||||
%SpriteProps($02, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 02 - Tempered sword
|
||||
%SpriteProps($03, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 03 - Golden sword
|
||||
%SpriteProps($04, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 04 - Fighter shield
|
||||
%SpriteProps($05, 2, 2, $05, $80, PalettesCustom_red_shield) ; 05 - Fire shield
|
||||
%SpriteProps($06, 2, 2, $05, $80, PalettesCustom_mirror_shield) ; 06 - Mirror shield
|
||||
%SpriteProps($07, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 07 - Fire rod
|
||||
%SpriteProps($08, 0, 0, $02, $02, PalettesVanilla_blue_ice+$0E) ; 08 - Ice rod
|
||||
%SpriteProps($09, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 09 - Hammer
|
||||
%SpriteProps($0A, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 0A - Hookshot
|
||||
%SpriteProps($0B, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 0B - Bow
|
||||
%SpriteProps($0C, 0, 0, $02, $02, PalettesVanilla_blue_ice+$0E) ; 0C - Blue Boomerang
|
||||
%SpriteProps($0D, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 0D - Powder
|
||||
%SpriteProps($07, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 07 - Fire rod
|
||||
%SpriteProps($08, 0, 0, $02, $80, PalettesCustom_fighter_shield) ; 08 - Ice rod
|
||||
%SpriteProps($09, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 09 - Hammer
|
||||
%SpriteProps($0A, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 0A - Hookshot
|
||||
%SpriteProps($0B, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 0B - Bow
|
||||
%SpriteProps($0C, 0, 0, $02, $80, PalettesCustom_fighter_shield) ; 0C - Blue Boomerang
|
||||
%SpriteProps($0D, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 0D - Powder
|
||||
%SpriteProps($0E, 2, 0, $02, $03, PalettesVanilla_blue_ice+$0E) ; 0E - Bottle refill (bee)
|
||||
%SpriteProps($0F, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 0F - Bombos
|
||||
%SpriteProps($10, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 10 - Ether
|
||||
%SpriteProps($11, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 11 - Quake
|
||||
%SpriteProps($12, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 12 - Lamp
|
||||
%SpriteProps($13, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 13 - Shovel
|
||||
%SpriteProps($14, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 14 - Flute
|
||||
%SpriteProps($15, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 15 - Somaria
|
||||
%SpriteProps($16, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 16 - Bottle
|
||||
%SpriteProps($0F, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 0F - Bombos
|
||||
%SpriteProps($10, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 10 - Ether
|
||||
%SpriteProps($11, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 11 - Quake
|
||||
%SpriteProps($12, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 12 - Lamp
|
||||
%SpriteProps($13, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 13 - Shovel
|
||||
%SpriteProps($14, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 14 - Flute
|
||||
%SpriteProps($15, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 15 - Somaria
|
||||
%SpriteProps($16, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 16 - Bottle
|
||||
%SpriteProps($17, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 17 - Heart piece
|
||||
%SpriteProps($18, 0, 0, $02, $02, PalettesVanilla_blue_ice+$0E) ; 18 - Byrna
|
||||
%SpriteProps($19, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 19 - Cape
|
||||
%SpriteProps($1A, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 1A - Mirror
|
||||
%SpriteProps($1B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 1B - Glove
|
||||
%SpriteProps($1C, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 1C - Mitts
|
||||
%SpriteProps($1D, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 1D - Book
|
||||
%SpriteProps($1E, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 1E - Flippers
|
||||
%SpriteProps($1F, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 1F - Pearl
|
||||
%SpriteProps($18, 0, 0, $02, $80, PalettesCustom_fighter_shield) ; 18 - Byrna
|
||||
%SpriteProps($19, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 19 - Cape
|
||||
%SpriteProps($1A, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 1A - Mirror
|
||||
%SpriteProps($1B, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 1B - Glove
|
||||
%SpriteProps($1C, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 1C - Mitts
|
||||
%SpriteProps($1D, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 1D - Book
|
||||
%SpriteProps($1E, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 1E - Flippers
|
||||
%SpriteProps($1F, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 1F - Pearl
|
||||
%SpriteProps($20, 2, 2, $86, $86, PalettesCustom_crystal) ; 20 - Crystal
|
||||
%SpriteProps($21, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 21 - Net
|
||||
%SpriteProps($21, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 21 - Net
|
||||
%SpriteProps($22, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 22 - Blue mail
|
||||
%SpriteProps($23, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 23 - Red mail
|
||||
%SpriteProps($24, 0, 0, $02, $04, PalettesVanilla_blue_ice+$0E) ; 24 - Small key
|
||||
@@ -457,11 +457,11 @@ endmacro
|
||||
%SpriteProps($26, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 26 - Heart container from 4/4
|
||||
%SpriteProps($27, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 27 - Bomb
|
||||
%SpriteProps($28, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 28 - 3 bombs
|
||||
%SpriteProps($29, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 29 - Mushroom
|
||||
%SpriteProps($2A, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 2A - Red boomerang
|
||||
%SpriteProps($2B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 2B - Full bottle (red)
|
||||
%SpriteProps($2C, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 2C - Full bottle (green)
|
||||
%SpriteProps($2D, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 2D - Full bottle (blue)
|
||||
%SpriteProps($29, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 29 - Mushroom
|
||||
%SpriteProps($2A, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 2A - Red boomerang
|
||||
%SpriteProps($2B, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 2B - Full bottle (red)
|
||||
%SpriteProps($2C, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 2C - Full bottle (green)
|
||||
%SpriteProps($2D, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 2D - Full bottle (blue)
|
||||
%SpriteProps($2E, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 2E - Potion refill (red)
|
||||
%SpriteProps($2F, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 2F - Potion refill (green)
|
||||
%SpriteProps($30, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 30 - Potion refill (blue)
|
||||
@@ -474,10 +474,10 @@ endmacro
|
||||
%SpriteProps($37, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 37 - Green pendant
|
||||
%SpriteProps($38, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 38 - Red pendant
|
||||
%SpriteProps($39, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 39 - Blue pendant
|
||||
%SpriteProps($3A, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 3A - Bow And Arrows
|
||||
%SpriteProps($3B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 3B - Silver Bow
|
||||
%SpriteProps($3C, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 3C - Full bottle (bee)
|
||||
%SpriteProps($3D, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 3D - Full bottle (fairy)
|
||||
%SpriteProps($3A, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 3A - Bow And Arrows
|
||||
%SpriteProps($3B, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 3B - Silver Bow
|
||||
%SpriteProps($3C, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 3C - Full bottle (bee)
|
||||
%SpriteProps($3D, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 3D - Full bottle (fairy)
|
||||
%SpriteProps($3E, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 3E - Boss heart
|
||||
%SpriteProps($3F, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 3F - Sanc heart
|
||||
%SpriteProps($40, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 40 - 100 rupees
|
||||
@@ -488,23 +488,23 @@ endmacro
|
||||
%SpriteProps($45, 0, 0, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 45 - Small magic
|
||||
%SpriteProps($46, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 46 - 300 rupees
|
||||
%SpriteProps($47, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 47 - 20 rupees green
|
||||
%SpriteProps($48, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 48 - Full bottle (good bee)
|
||||
%SpriteProps($49, 0, 2, $05, $02, PalettesCustom_fighter_shield) ; 49 - Tossed fighter sword
|
||||
%SpriteProps($4A, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 4A - Active Flute
|
||||
%SpriteProps($4B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 4B - Boots
|
||||
%SpriteProps($48, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 48 - Full bottle (good bee)
|
||||
%SpriteProps($49, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 49 - Tossed fighter sword
|
||||
%SpriteProps($4A, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 4A - Active Flute
|
||||
%SpriteProps($4B, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 4B - Boots
|
||||
%SpriteProps($4C, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 4C - Bomb capacity (50)
|
||||
%SpriteProps($4D, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 4D - Arrow capacity (70)
|
||||
%SpriteProps($4E, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 4E - 1/2 magic
|
||||
%SpriteProps($4F, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 4F - 1/4 magic
|
||||
%SpriteProps($50, 0, 2, $05, $02, PalettesCustom_master_sword) ; 50 - Safe master sword
|
||||
%SpriteProps($4E, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 4E - 1/2 magic
|
||||
%SpriteProps($4F, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 4F - 1/4 magic
|
||||
%SpriteProps($50, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 50 - Safe master sword
|
||||
%SpriteProps($51, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 51 - Bomb capacity (+5)
|
||||
%SpriteProps($52, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 52 - Bomb capacity (+10)
|
||||
%SpriteProps($52, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 52 - Bomb capacity (+10)
|
||||
%SpriteProps($53, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 53 - Arrow capacity (+5)
|
||||
%SpriteProps($54, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 54 - Arrow capacity (+10)
|
||||
%SpriteProps($55, 2, 2, $04, $04, $0000) ; 55 - Programmable item 1
|
||||
%SpriteProps($56, 2, 2, $04, $04, $0000) ; 56 - Programmable item 2
|
||||
%SpriteProps($57, 2, 2, $04, $04, $0000) ; 57 - Programmable item 3
|
||||
%SpriteProps($58, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 58 - Upgrade-only Silver Arrows
|
||||
%SpriteProps($58, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 58 - Upgrade-only Silver Arrows
|
||||
%SpriteProps($59, 0, 0, $03, $03, PalettesCustom_off_black) ; 59 - Rupoor
|
||||
%SpriteProps($5A, 2, 2, $01, $01, $0000) ; 5A - Nothing
|
||||
%SpriteProps($5B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 5B - Red clock
|
||||
@@ -696,7 +696,7 @@ endmacro
|
||||
%InventoryItem($01, $0081, SwordTime, $0000) ; 01 - Master sword
|
||||
%InventoryItem($02, $0001, SwordTime, $0000) ; 02 - Tempered sword
|
||||
%InventoryItem($03, $0081, SwordTime, $0000) ; 03 - Butter sword
|
||||
%InventoryItem($04, $0081, $0000, $0000) ; 04 - Fighter shield
|
||||
%InventoryItem($04, $0080, $0000, $0000) ; 04 - Fighter shield
|
||||
%InventoryItem($05, $0081, $0000, $0000) ; 05 - Fire shield
|
||||
%InventoryItem($06, $0081, $0000, $0000) ; 06 - Mirror shield
|
||||
%InventoryItem($07, $0085, $0000, $0000) ; 07 - Fire rod
|
||||
@@ -1220,40 +1220,40 @@ ItemReceiptGraphicsOffsets:
|
||||
; for receipt and non-receipt drawing.
|
||||
;===================================================================================================
|
||||
StandingItemGraphicsOffsets:
|
||||
dw $0860 ; 00 - Fighter Sword and Shield
|
||||
dw $00E0 ; 01 - Master Sword
|
||||
dw $0120 ; 02 - Tempered Sword
|
||||
dw $0160 ; 03 - Butter Sword
|
||||
dw BigDecompressionBuffer+$09E0 ; 00 - Fighter Sword and Shield
|
||||
dw BigDecompressionBuffer+$09E0 ; 01 - Master Sword
|
||||
dw BigDecompressionBuffer+$09E0 ; 02 - Tempered Sword
|
||||
dw BigDecompressionBuffer+$09E0 ; 03 - Butter Sword
|
||||
dw BigDecompressionBuffer+$09E0 ; 04 - Fighter Shield
|
||||
dw BigDecompressionBuffer+$1940 ; 05 - Fire Shield
|
||||
dw BigDecompressionBuffer+$0C80 ; 06 - Mirror Shield
|
||||
dw BigDecompressionBuffer+$1C80 ; 07 - Fire Rod
|
||||
dw BigDecompressionBuffer+$1C80 ; 08 - Ice Rod
|
||||
dw BigDecompressionBuffer+$1CA0 ; 09 - Hammer
|
||||
dw BigDecompressionBuffer+$1C60 ; 0A - Hookshot
|
||||
dw BigDecompressionBuffer+$1C00 ; 0B - Bow
|
||||
dw BigDecompressionBuffer+$1DE0 ; 0C - Boomerang
|
||||
dw BigDecompressionBuffer+$1CC0 ; 0D - Powder
|
||||
dw BigDecompressionBuffer+$09E0 ; 07 - Fire Rod
|
||||
dw BigDecompressionBuffer+$09E0 ; 08 - Ice Rod
|
||||
dw BigDecompressionBuffer+$09E0 ; 09 - Hammer
|
||||
dw BigDecompressionBuffer+$09E0 ; 0A - Hookshot
|
||||
dw BigDecompressionBuffer+$09E0 ; 0B - Bow
|
||||
dw BigDecompressionBuffer+$09E0 ; 0C - Boomerang
|
||||
dw BigDecompressionBuffer+$09E0 ; 0D - Powder
|
||||
dw 0 ; 0E - Bottle Refill (bee)
|
||||
dw BigDecompressionBuffer+$1440 ; 0F - Bombos
|
||||
dw BigDecompressionBuffer+$1400 ; 10 - Ether
|
||||
dw BigDecompressionBuffer+$1480 ; 11 - Quake
|
||||
dw BigDecompressionBuffer+$10C0 ; 12 - Lamp
|
||||
dw BigDecompressionBuffer+$11E0 ; 13 - Shovel
|
||||
dw BigDecompressionBuffer+$0C40 ; 14 - Flute
|
||||
dw BigDecompressionBuffer+$1C40 ; 15 - Somaria
|
||||
dw BigDecompressionBuffer+$14C0 ; 16 - Bottle
|
||||
dw BigDecompressionBuffer+$09E0 ; 0F - Bombos
|
||||
dw BigDecompressionBuffer+$09E0 ; 10 - Ether
|
||||
dw BigDecompressionBuffer+$09E0 ; 11 - Quake
|
||||
dw BigDecompressionBuffer+$09E0 ; 12 - Lamp
|
||||
dw BigDecompressionBuffer+$09E0 ; 13 - Shovel
|
||||
dw BigDecompressionBuffer+$09E0 ; 14 - Flute
|
||||
dw BigDecompressionBuffer+$09E0 ; 15 - Somaria
|
||||
dw BigDecompressionBuffer+$09E0 ; 16 - Bottle
|
||||
dw BigDecompressionBuffer+$0C00 ; 17 - Heartpiece
|
||||
dw BigDecompressionBuffer+$1C40 ; 18 - Byrna
|
||||
dw BigDecompressionBuffer+$1100 ; 19 - Cape
|
||||
dw BigDecompressionBuffer+$1040 ; 1A - Mirror
|
||||
dw BigDecompressionBuffer+$1D40 ; 1B - Glove
|
||||
dw BigDecompressionBuffer+$1D40 ; 1C - Mitts
|
||||
dw BigDecompressionBuffer+$1D80 ; 1D - Book
|
||||
dw BigDecompressionBuffer+$1000 ; 1E - Flippers
|
||||
dw BigDecompressionBuffer+$1180 ; 1F - Pearl
|
||||
dw BigDecompressionBuffer+$09E0 ; 18 - Byrna
|
||||
dw BigDecompressionBuffer+$09E0 ; 19 - Cape
|
||||
dw BigDecompressionBuffer+$09E0 ; 1A - Mirror
|
||||
dw BigDecompressionBuffer+$09E0 ; 1B - Glove
|
||||
dw BigDecompressionBuffer+$09E0 ; 1C - Mitts
|
||||
dw BigDecompressionBuffer+$09E0 ; 1D - Book
|
||||
dw BigDecompressionBuffer+$09E0 ; 1E - Flippers
|
||||
dw BigDecompressionBuffer+$09E0 ; 1F - Pearl
|
||||
dw BigDecompressionBuffer+$08A0 ; 20 - Crystal
|
||||
dw BigDecompressionBuffer+$0860 ; 21 - Net
|
||||
dw BigDecompressionBuffer+$09E0 ; 21 - Net
|
||||
dw BigDecompressionBuffer+$1900 ; 22 - Blue Mail
|
||||
dw BigDecompressionBuffer+$1900 ; 23 - Red Mail
|
||||
dw BigDecompressionBuffer+$1DC0 ; 24 - Small Key
|
||||
@@ -1261,11 +1261,11 @@ StandingItemGraphicsOffsets:
|
||||
dw BigDecompressionBuffer+$18C0 ; 26 - Heart Container from 4/4
|
||||
dw BigDecompressionBuffer+$1080 ; 27 - Bomb
|
||||
dw BigDecompressionBuffer+$1840 ; 28 - 3 bombs
|
||||
dw BigDecompressionBuffer+$1540 ; 29 - Mushroom
|
||||
dw BigDecompressionBuffer+$1DE0 ; 2A - Red boomerang
|
||||
dw BigDecompressionBuffer+$1500 ; 2B - Full bottle (red)
|
||||
dw BigDecompressionBuffer+$1500 ; 2C - Full bottle (green)
|
||||
dw BigDecompressionBuffer+$1500 ; 2D - Full bottle (blue)
|
||||
dw BigDecompressionBuffer+$09E0 ; 29 - Mushroom
|
||||
dw BigDecompressionBuffer+$09E0 ; 2A - Red boomerang
|
||||
dw BigDecompressionBuffer+$09E0 ; 2B - Full bottle (red)
|
||||
dw BigDecompressionBuffer+$09E0 ; 2C - Full bottle (green)
|
||||
dw BigDecompressionBuffer+$09E0 ; 2D - Full bottle (blue)
|
||||
dw $0920 ; 2E - Potion refill (red)
|
||||
dw $08A0 ; 2F - Potion refill (green)
|
||||
dw $08E0 ; 30 - Potion refill (blue)
|
||||
@@ -1278,10 +1278,10 @@ StandingItemGraphicsOffsets:
|
||||
dw $0820 ; 37 - Green pendant
|
||||
dw BigDecompressionBuffer+$0080 ; 38 - Blue pendant
|
||||
dw BigDecompressionBuffer+$0080 ; 39 - Red pendant
|
||||
dw BigDecompressionBuffer+$0920 ; 3A - Tossed bow
|
||||
dw BigDecompressionBuffer+$08E0 ; 3B - Silvers
|
||||
dw BigDecompressionBuffer+$09A0 ; 3C - Full bottle (bee)
|
||||
dw BigDecompressionBuffer+$0960 ; 3D - Full bottle (fairy)
|
||||
dw BigDecompressionBuffer+$09E0 ; 3A - Tossed bow
|
||||
dw BigDecompressionBuffer+$09E0 ; 3B - Silvers
|
||||
dw BigDecompressionBuffer+$09E0 ; 3C - Full bottle (bee)
|
||||
dw BigDecompressionBuffer+$09E0 ; 3D - Full bottle (fairy)
|
||||
dw BigDecompressionBuffer+$18C0 ; 3E - Boss heart
|
||||
dw BigDecompressionBuffer+$18C0 ; 3F - Sanc heart
|
||||
dw BigDecompressionBuffer+$0D20 ; 40 - 100 rupees
|
||||
@@ -1292,25 +1292,25 @@ StandingItemGraphicsOffsets:
|
||||
dw BigDecompressionBuffer+$0CE0 ; 45 - Small magic
|
||||
dw BigDecompressionBuffer+$0DA0 ; 46 - 300 rupees
|
||||
dw BigDecompressionBuffer+$0000 ; 47 - 20 rupees green
|
||||
dw BigDecompressionBuffer+$09A0 ; 48 - Full bottle (good bee)
|
||||
dw $00A0 ; 49 - Tossed fighter sword
|
||||
dw BigDecompressionBuffer+$0C40 ; 4A - Active Flute
|
||||
dw BigDecompressionBuffer+$0040 ; 4B - Boots
|
||||
dw BigDecompressionBuffer+$09E0 ; 48 - Full bottle (good bee)
|
||||
dw BigDecompressionBuffer+$09E0 ; 49 - Tossed fighter sword
|
||||
dw BigDecompressionBuffer+$09E0 ; 4A - Active Flute
|
||||
dw BigDecompressionBuffer+$09E0 ; 4B - Boots
|
||||
|
||||
; Rando items
|
||||
dw $04A0 ; 4C - Bomb capacity (50)
|
||||
dw $05A0 ; 4D - Arrow capacity (70)
|
||||
dw $01A0 ; 4E - 1/2 magic
|
||||
dw $01E0 ; 4F - 1/4 magic
|
||||
dw $00E0 ; 50 - Safe master sword
|
||||
dw BigDecompressionBuffer+$09E0 ; 4E - 1/2 magic
|
||||
dw BigDecompressionBuffer+$09E0 ; 4F - 1/4 magic
|
||||
dw BigDecompressionBuffer+$09E0 ; 50 - Safe master sword
|
||||
dw $0420 ; 51 - Bomb capacity (+5)
|
||||
dw $0460 ; 52 - Bomb capacity (+10)
|
||||
dw BigDecompressionBuffer+$09E0 ; 52 - Bomb capacity (+10)
|
||||
dw $0520 ; 53 - Arrow capacity (+5)
|
||||
dw $0560 ; 54 - Arrow capacity (+10)
|
||||
dw $0 ; 55 - Programmable item 1
|
||||
dw $0 ; 56 - Programmable item 2
|
||||
dw $0 ; 57 - Programmable item 3
|
||||
dw $05E0 ; 58 - Upgrade-only silver arrows
|
||||
dw BigDecompressionBuffer+$09E0 ; 58 - Upgrade-only silver arrows
|
||||
dw $0 ; 59 - Rupoor
|
||||
dw $0020 ; 5A - Nothing
|
||||
dw $0DE0 ; 5B - Red clock
|
||||
|
||||
@@ -221,8 +221,7 @@ RevealPotItem:
|
||||
STZ.w SpawnedItemIsMultiWorld
|
||||
BIT.b Scrap08
|
||||
BVS LoadMultiWorldPotItem
|
||||
BPL .normal_secret
|
||||
JMP LoadMajorPotItem
|
||||
BMI LoadMajorPotItem
|
||||
|
||||
.normal_secret
|
||||
STA.b Scrap08
|
||||
@@ -243,7 +242,6 @@ RevealPotItem:
|
||||
; Could increment GT Tower Pre Big Key but we aren't showing that stat right now
|
||||
+ REP #$10
|
||||
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter ; Increment Item Total
|
||||
JSL UpdateLootHUD
|
||||
LDA.w #$0001 : STA.l UpdateHUDFlag
|
||||
.obtained
|
||||
PLY : PLX
|
||||
@@ -343,7 +341,6 @@ IncrementCountsForSubstitute:
|
||||
; Could increment GT Tower Pre Big Key but we aren't showing that stat right now
|
||||
+
|
||||
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter ; Increment Item Total
|
||||
JSL UpdateLootHUD
|
||||
LDA.w #$0001 : STA.l UpdateHUDFlag
|
||||
.obtained
|
||||
SEP #$30 : PLX
|
||||
@@ -360,7 +357,7 @@ ClearSpriteData:
|
||||
STZ.w SprSourceItemId, X : STZ.w SprItemReceipt, X : STZ.w SprItemMWPlayer, X
|
||||
STZ.w SprRedrawFlag, X
|
||||
DEX : BPL .loop
|
||||
JSL UpdateLootHUD
|
||||
JSR SetupEnemyDropIndicator
|
||||
PLX
|
||||
RTL
|
||||
|
||||
@@ -407,7 +404,7 @@ SetupEnemyDropIndicator:
|
||||
|
||||
.done
|
||||
SEP #$20
|
||||
RTL
|
||||
RTS
|
||||
|
||||
|
||||
; Runs during sprite load of the room
|
||||
@@ -574,7 +571,7 @@ IncrementCountForMinor:
|
||||
LDA.l SpriteDropData, X : BIT.b Scrap0A : BNE .obtained
|
||||
ORA.b Scrap0A : STA.l SpriteDropData, X
|
||||
SEP #$10
|
||||
JSL UpdateLootHUD
|
||||
JSR SetupEnemyDropIndicator
|
||||
REP #$20
|
||||
LDX.w DungeonID : CPX.b #$FF : BEQ +
|
||||
CPX.b #$00 : BNE ++
|
||||
@@ -630,10 +627,10 @@ MarkSRAMForItem:
|
||||
TYX
|
||||
LDA.w SpawnedItemFlag : CMP.w #$0001 : BEQ +
|
||||
LDA.l SpriteDropData, X : ORA.b Scrap00 : STA.l SpriteDropData, X
|
||||
SEP #$10 : JSR SetupEnemyDropIndicator
|
||||
BRA .end
|
||||
+ LDA.l RoomPotData, X : ORA.b Scrap00 : STA.l RoomPotData, X
|
||||
.end
|
||||
JSL UpdateLootHUD
|
||||
SEP #$30 : PLY : PLX
|
||||
LDA.w RoomItemsTaken
|
||||
RTL
|
||||
@@ -699,6 +696,14 @@ KeyGet:
|
||||
LDA.l StandingItemsOn : BNE +
|
||||
PLA : RTL
|
||||
+ LDY.w SprSourceItemId, X
|
||||
|
||||
JSL ShieldCheck
|
||||
BCS .not_replaced
|
||||
PLA : PLA : PLA ; remove stored address to jump back to
|
||||
PLA ; restore the A value going into KeyGet
|
||||
JML $86D1A8
|
||||
.not_replaced
|
||||
|
||||
LDA.w SprItemIndex, X : STA.w SpawnedItemIndex
|
||||
LDA.w SprItemFlags, X : STA.w SpawnedItemFlag
|
||||
STY.b Scrap00
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
menu/drfont.2bpp
BIN
menu/drfont.2bpp
Binary file not shown.
@@ -9,7 +9,7 @@ UploadMenuOnlyIcons:
|
||||
REP #$20
|
||||
LDA.w #MenuOnlyIcons : STA.w $4342
|
||||
LDA.w #$1801 : STA.w $4340
|
||||
LDA.w #$0310 : STA.w $4345
|
||||
LDA.w #$0240 : STA.w $4345
|
||||
LDA.w #$0F800>>1 : STA.w $2116
|
||||
|
||||
SEP #$20
|
||||
@@ -20,4 +20,4 @@ UploadMenuOnlyIcons:
|
||||
RTL
|
||||
|
||||
MenuOnlyIcons:
|
||||
incbin "drfont.2bpp"
|
||||
incbin "drfont.2bpp"
|
||||
@@ -89,6 +89,9 @@ GetMultiworldItem:
|
||||
PHP
|
||||
LDA.l !MULTIWORLD_ITEM : BNE +
|
||||
LDA.l !MULTIWORLD_HUD_TIMER : BNE +
|
||||
LDA.l ShieldEquipment : BNE ++
|
||||
LDA.l PikitItem : CMP.b #$04 : BNE +
|
||||
++
|
||||
BRL .return
|
||||
+
|
||||
|
||||
@@ -123,6 +126,34 @@ GetMultiworldItem:
|
||||
BRL .return
|
||||
+
|
||||
|
||||
LDA.l ShieldEquipment : BNE +
|
||||
LDA.l PikitItem : CMP.b #$04 : BEQ +
|
||||
|
||||
LDY.b #$10
|
||||
-
|
||||
DEY
|
||||
BMI .restore_shield
|
||||
LDA.w $0E20, Y
|
||||
CMP.b #$AA
|
||||
BNE - ; go to next sprite if this sprite isn't a pikit
|
||||
LDA.w $0DD0, Y
|
||||
BEQ - ; go to next sprite if this sprite is dead/inactive
|
||||
LDA.w $0ED0, Y
|
||||
CMP.b #$04
|
||||
BNE - ; go to next sprite if this pikit isn't grabbing a shield
|
||||
LDA.w $0E90, Y
|
||||
CMP.b #$04
|
||||
BNE - ; go to next sprite if this pikit isn't grabbing a shield
|
||||
|
||||
BRA + ; active pikit has a shield
|
||||
|
||||
.restore_shield
|
||||
; we have a pikit item, but no shield, and there's no pikit actively
|
||||
; eating a shield, so return the shield to prevent a softlock
|
||||
LDA.b #$01
|
||||
STA.l ShieldEquipment
|
||||
+
|
||||
|
||||
LDA.l !MULTIWORLD_ITEM : BNE +
|
||||
BRL .return
|
||||
+
|
||||
@@ -202,35 +233,69 @@ RTL
|
||||
|
||||
Multiworld_BottleVendor_GiveBottle:
|
||||
{
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
PLA
|
||||
BCC .no_take_shield
|
||||
|
||||
PHA : PHP
|
||||
SEP #$20
|
||||
LDA.l BottleMerchant_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLP : PLA
|
||||
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
RTL
|
||||
RTL
|
||||
|
||||
.no_take_shield
|
||||
PLA : PLA : PLA : PLX
|
||||
JML $85EB3A
|
||||
}
|
||||
|
||||
Multiworld_MiddleAgedMan_ReactToSecretKeepingResponse:
|
||||
{
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
PLA
|
||||
BCC .no_take_shield
|
||||
|
||||
PHA : PHP
|
||||
SEP #$20
|
||||
LDA.l PurpleChest_Item_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLP : PLA
|
||||
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
RTL
|
||||
; what we wrote over
|
||||
JSL Link_ReceiveItem
|
||||
LDA.l NpcFlagsVanilla
|
||||
ORA.b #$10
|
||||
STA.l NpcFlagsVanilla
|
||||
|
||||
.no_take_shield
|
||||
RTL
|
||||
}
|
||||
|
||||
Multiworld_Hobo_GrantBottle:
|
||||
{
|
||||
PHA : PHP
|
||||
SEP #$20
|
||||
LDA.l HoboItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLP : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
PLA
|
||||
BCC .no_take_shield
|
||||
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
RTL
|
||||
; first bit we wrote over
|
||||
LDX.b OverworldIndex
|
||||
LDA.l OverworldEventDataWRAM, X
|
||||
ORA.b #$20
|
||||
STA.l OverworldEventDataWRAM, X
|
||||
|
||||
LDA.l HoboItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
|
||||
; second bit we wrote over
|
||||
JSL Link_ReceiveItem
|
||||
LDA.l NpcFlagsVanilla
|
||||
ORA.b #$01
|
||||
STA.l NpcFlagsVanilla
|
||||
|
||||
.no_take_shield
|
||||
RTL
|
||||
}
|
||||
|
||||
Multiworld_MasterSword_GrantToPlayer:
|
||||
|
||||
@@ -386,7 +386,6 @@ RTS
|
||||
;================================================================================
|
||||
DrawMapCounts:
|
||||
LDA.l MapHUDMode : BEQ .done
|
||||
LDA.l GenericKeys : BNE .done ; generator don't have an accurrate count of key doors in this case
|
||||
|
||||
; no map needed if this bit is set
|
||||
BIT.b #$02 : BNE .draw_map_count
|
||||
|
||||
@@ -1159,12 +1159,12 @@ JML StatsFinalPrep
|
||||
;--------------------------------------------------------------------------------
|
||||
ChestPrep:
|
||||
LDA.b #$01 : STA.w ItemReceiptMethod
|
||||
JSL IncrementChestCounter
|
||||
JSL IncrementChestCounter
|
||||
LDA.l ServerRequestMode : BEQ +
|
||||
JSL ChestItemServiceRequest
|
||||
RTL
|
||||
+
|
||||
LDY.b Scrap0C ; get item value
|
||||
LDY.b Scrap0C ; get item value
|
||||
SEC
|
||||
RTL
|
||||
|
||||
|
||||
106
npcitems.asm
106
npcitems.asm
@@ -98,9 +98,17 @@ ItemSet_MagicBat:
|
||||
RTL
|
||||
|
||||
ItemSet_OldMan:
|
||||
PHA : LDA.l OldManItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
LDA.l OldManItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
PHA : LDA.l NpcFlags : ORA.b #$01 : STA.l NpcFlags : PLA
|
||||
PHA
|
||||
LDA.l NpcFlags : ORA.b #$01 : STA.l NpcFlags
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
|
||||
ItemSet_ZoraKing:
|
||||
@@ -108,21 +116,45 @@ ItemSet_ZoraKing:
|
||||
RTL
|
||||
|
||||
ItemSet_SickKid:
|
||||
PHA : LDA.l SickKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
LDA.l SickKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
PHA : LDA.l NpcFlags : ORA.b #$04 : STA.l NpcFlags : PLA
|
||||
PHA
|
||||
LDA.l NpcFlags : ORA.b #$04 : STA.l NpcFlags
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
|
||||
ItemSet_TreeKid:
|
||||
PHA : LDA.l TreeKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
LDA.l TreeKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
PHA : LDA.l NpcFlags : ORA.b #$08 : STA.l NpcFlags : PLA
|
||||
PHA
|
||||
LDA.l NpcFlags : ORA.b #$08 : STA.l NpcFlags
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
|
||||
ItemSet_Sahasrala:
|
||||
PHA : LDA.l SahasralaItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
LDA.l SahasralaItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
PHA : LDA.l NpcFlags : ORA.b #$10 : STA.l NpcFlags : PLA
|
||||
PHA
|
||||
LDA.l NpcFlags : ORA.b #$10 : STA.l NpcFlags
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
|
||||
ItemSet_Catfish:
|
||||
@@ -130,22 +162,38 @@ ItemSet_Catfish:
|
||||
RTL
|
||||
|
||||
ItemSet_Library:
|
||||
PHA : LDA.l LibraryItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
LDA.l LibraryItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
PHA : LDA.l NpcFlags : ORA.b #$80 : STA.l NpcFlags : PLA
|
||||
PHA
|
||||
LDA.l NpcFlags : ORA.b #$80 : STA.l NpcFlags
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
|
||||
ItemSet_Mushroom:
|
||||
PHA
|
||||
LDA.l NpcFlags+1 : ORA.b #$10 : STA.l NpcFlags+1
|
||||
LDY.w SprSourceItemId, X ; Retrieve stored item type
|
||||
BNE +
|
||||
; if for any reason the item value is 0 reload it, just in case
|
||||
%GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues) : TAY
|
||||
+
|
||||
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
LDA.l MushroomItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
STZ.w ItemReceiptMethod ; thing we wrote over - the mushroom is an npc for item purposes apparently
|
||||
PLA
|
||||
|
||||
JSL Link_ReceiveItem
|
||||
PHA
|
||||
LDA.l NpcFlags+1 : ORA.b #$10 : STA.l NpcFlags+1
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
|
||||
ItemSet_Powder:
|
||||
@@ -175,11 +223,25 @@ Set300RupeeNPCItem:
|
||||
+
|
||||
LDA.w #$0000
|
||||
LDY.b #$46 ; default to a normal 300 rupees
|
||||
.done
|
||||
|
||||
.done
|
||||
SEP #$20
|
||||
STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
JSL ShieldCheck
|
||||
BCC .cant_take
|
||||
|
||||
LDA.w RoomItemsTaken
|
||||
ORA.b #$40
|
||||
STA.w RoomItemsTaken
|
||||
|
||||
PLP : PLA
|
||||
RTL
|
||||
SEC
|
||||
RTL
|
||||
|
||||
.cant_take
|
||||
PLP : PLA
|
||||
CLC
|
||||
RTL
|
||||
|
||||
;================================================================================
|
||||
; Randomize Zora King
|
||||
@@ -223,16 +285,26 @@ MarkThrownItem:
|
||||
LDA.b OverworldIndex : CMP.b #$81 : BNE .catfish
|
||||
|
||||
.zora
|
||||
JSL ItemSet_ZoraKing
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
JSL ItemSet_ZoraKing
|
||||
LDA.l ZoraItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
BRA .done
|
||||
|
||||
.catfish
|
||||
JSL ItemSet_Catfish
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
JSL ItemSet_Catfish
|
||||
|
||||
LDA.l CatfishItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
|
||||
.done
|
||||
PLA
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
RTL
|
||||
RTL
|
||||
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -291,10 +291,10 @@ RTL
|
||||
REP #$30
|
||||
;-------------------------------------------------------------------------------
|
||||
; dungeon names
|
||||
LDA.w #$2DA4
|
||||
LDA.w #$2D50
|
||||
LDY.w #00
|
||||
|
||||
.next_dungeon_name
|
||||
.next_dungeon_name
|
||||
LDX.w .dungeon_positions,Y
|
||||
STA.w GFXStripes+$0646,X
|
||||
INC
|
||||
@@ -310,10 +310,10 @@ RTL
|
||||
STA.w GFXStripes+$0706,X
|
||||
|
||||
DEX : DEX
|
||||
BPL --
|
||||
BPL --
|
||||
|
||||
LDA.l HudFlag : AND.w #$0020 : BEQ +
|
||||
JMP .maps_and_compasses
|
||||
JMP .maps_and_compasses
|
||||
;-------------------------------------------------------------------------------
|
||||
+
|
||||
LDA.l HUDDungeonItems : AND.w #$0001 : BNE +
|
||||
|
||||
471
pikit.asm
Normal file
471
pikit.asm
Normal file
@@ -0,0 +1,471 @@
|
||||
pushpc
|
||||
org $89EB78
|
||||
db $18, $1A, $AA ; replace uncle with pikit
|
||||
|
||||
org $80DCCE
|
||||
db $1B ; load sprite sheet for pikit in link's house
|
||||
|
||||
org $80FC74
|
||||
NOP #2 ; do not load rain-state sprites
|
||||
|
||||
org $8A8029
|
||||
; move table slightly to center under pikit
|
||||
db $C9, $C0, $DD
|
||||
db $D0, $B8, $3C
|
||||
pullpc
|
||||
|
||||
TuckLink:
|
||||
; what we wrote over
|
||||
STZ.w $037C
|
||||
STZ.w $037D
|
||||
|
||||
LDA.b #$40 : STA.w $0FC2
|
||||
LDA.b #$09 : STA.w $0FC3
|
||||
|
||||
LDA.b #$5A : STA.w $0FC4
|
||||
LDA.b #$21 : STA.w $0FC5
|
||||
|
||||
RTL
|
||||
|
||||
LinkSnoring:
|
||||
LDA.l ProgressIndicator
|
||||
BNE +
|
||||
|
||||
LDA.b #$02
|
||||
STA.l ProgressIndicator
|
||||
LDA.b #$1D
|
||||
LDY.b #$00
|
||||
JSL Sprite_ShowMessageUnconditional
|
||||
BRA ++
|
||||
|
||||
+
|
||||
LDA.b FrameCounter
|
||||
AND.b #$03
|
||||
BNE ++
|
||||
|
||||
LDA.b $9C
|
||||
CMP.b #$20
|
||||
BEQ .lightened
|
||||
|
||||
DEC.b $9C
|
||||
DEC.b $9D
|
||||
|
||||
++
|
||||
; what we wrote over
|
||||
LDA.b FrameCounter
|
||||
AND.b #$1F
|
||||
RTL
|
||||
|
||||
.lightened
|
||||
INC.w $037C
|
||||
INC.w $037D
|
||||
RTL
|
||||
|
||||
LinkAwaken:
|
||||
; what we wrote over
|
||||
LDA.b #$06
|
||||
STA.b LinkState
|
||||
|
||||
LDA.l ProgressFlags
|
||||
ORA.b #$10
|
||||
STA.l ProgressFlags
|
||||
LDA.b #$01
|
||||
STA.l StartingEntrance
|
||||
RTL
|
||||
|
||||
BigChest_ShieldCheck:
|
||||
PHY
|
||||
LDY.b $0C
|
||||
JSL ShieldCheck
|
||||
STY.b $0C
|
||||
PLY
|
||||
BCC .no_open
|
||||
LDA.l BigKeyField
|
||||
AND.l BitMasks, X
|
||||
.no_open
|
||||
RTL
|
||||
|
||||
SmallChest_ShieldCheck:
|
||||
PHY
|
||||
LDY.b $0C
|
||||
JSL ShieldCheck
|
||||
STY.b $0C
|
||||
PLY
|
||||
BCC .no_open
|
||||
LDA.w $0402
|
||||
ORA.w RoomFlagMask, Y
|
||||
.no_open
|
||||
RTL
|
||||
|
||||
ShieldCheck:
|
||||
PHP
|
||||
REP #$30
|
||||
PHX
|
||||
TYA
|
||||
AND.w #$00FF
|
||||
TAX
|
||||
LDA.l PikitItemList, X
|
||||
AND.w #$00FF
|
||||
BNE .replace
|
||||
PLX
|
||||
PLP
|
||||
SEC
|
||||
RTL
|
||||
|
||||
.replace
|
||||
LDA.l ShieldEquipment
|
||||
AND.w #$00FF
|
||||
BNE .already_have_shield
|
||||
TXA
|
||||
STA.l PikitItem
|
||||
LDY.w #$0004
|
||||
PLX
|
||||
PLP
|
||||
SEC
|
||||
RTL
|
||||
|
||||
.already_have_shield
|
||||
SEP #$30
|
||||
LDA.b #$3C
|
||||
STA.w $012E
|
||||
|
||||
PHY
|
||||
LDA.b #$98
|
||||
LDY.b #$01
|
||||
JSL Sprite_ShowMessageUnconditional
|
||||
PLY
|
||||
|
||||
REP #$30
|
||||
|
||||
PLX
|
||||
PLP
|
||||
CLC
|
||||
RTL
|
||||
|
||||
PikitSteal:
|
||||
LDA.l ShieldEquipment
|
||||
BNE .has_shield
|
||||
JSL GetRandomInt
|
||||
JML $9E8D73
|
||||
|
||||
.has_shield
|
||||
LDA.b #$04
|
||||
STA.w $0ED0, X
|
||||
STA.w $0E90, X
|
||||
LDA.b #$01
|
||||
STA.w $0E30, X
|
||||
|
||||
STZ.w $012E
|
||||
|
||||
JML $9E8DC3
|
||||
|
||||
PikitDigest:
|
||||
LDA.w $0ED0, X
|
||||
CMP.b #$04
|
||||
BNE +
|
||||
|
||||
STZ.w $0E90, X
|
||||
|
||||
LDA.b $6C
|
||||
BNE + ; link is in a doorway; giving him an item could be scary :<
|
||||
|
||||
JSL IncrementPikitCounter
|
||||
|
||||
LDA.l PikitItem
|
||||
CMP.b #$04
|
||||
BEQ +
|
||||
|
||||
TAY
|
||||
STZ.w ItemReceiptMethod
|
||||
JSL Link_ReceiveItem
|
||||
|
||||
LDA.b #$04
|
||||
STA.l PikitItem
|
||||
+
|
||||
|
||||
; what we wrote over
|
||||
STZ.w $0DA0, X
|
||||
STZ.w $0ED0, X
|
||||
|
||||
RTL
|
||||
|
||||
MaybeFlagVoOChestGamePrize:
|
||||
LDA.l $81EDA1, X
|
||||
TAY
|
||||
JSL ShieldCheck
|
||||
BCC .cant_take
|
||||
|
||||
LDA.w RoomItemsTaken
|
||||
ORA.b #$40
|
||||
STA.w RoomItemsTaken
|
||||
|
||||
STX.b $C8
|
||||
STY.b $0C
|
||||
|
||||
SEC
|
||||
|
||||
.cant_take
|
||||
RTL
|
||||
|
||||
PikitItemList:
|
||||
db $01 ; 00 - Fighter Sword and Shield
|
||||
db $01 ; 01 - Master Sword
|
||||
db $01 ; 02 - Tempered Sword
|
||||
db $01 ; 03 - Butter Sword
|
||||
db $00 ; 04 - Fighter Shield
|
||||
db $00 ; 05 - Fire Shield
|
||||
db $00 ; 06 - Mirror Shield
|
||||
db $01 ; 07 - Fire Rod
|
||||
db $01 ; 08 - Ice Rod
|
||||
db $01 ; 09 - Hammer
|
||||
db $01 ; 0A - Hookshot
|
||||
db $01 ; 0B - Bow
|
||||
db $01 ; 0C - Boomerang
|
||||
db $01 ; 0D - Powder
|
||||
db $00 ; 0E - Bottle Refill (bee)
|
||||
db $01 ; 0F - Bombos
|
||||
db $01 ; 10 - Ether
|
||||
db $01 ; 11 - Quake
|
||||
db $01 ; 12 - Lamp
|
||||
db $01 ; 13 - Shovel
|
||||
db $01 ; 14 - Flute
|
||||
db $01 ; 15 - Somaria
|
||||
db $01 ; 16 - Bottle
|
||||
db $00 ; 17 - Heartpiece
|
||||
db $01 ; 18 - Byrna
|
||||
db $01 ; 19 - Cape
|
||||
db $01 ; 1A - Mirror
|
||||
db $01 ; 1B - Glove
|
||||
db $01 ; 1C - Mitts
|
||||
db $01 ; 1D - Book
|
||||
db $01 ; 1E - Flippers
|
||||
db $01 ; 1F - Pearl
|
||||
db $00 ; 20 - Crystal
|
||||
db $01 ; 21 - Net
|
||||
db $00 ; 22 - Blue Mail
|
||||
db $00 ; 23 - Red Mail
|
||||
db $00 ; 24 - Small Key
|
||||
db $00 ; 25 - Compass
|
||||
db $00 ; 26 - Heart Container from 4/4
|
||||
db $00 ; 27 - Bomb
|
||||
db $00 ; 28 - 3 bombs
|
||||
db $01 ; 29 - Mushroom
|
||||
db $01 ; 2A - Red boomerang
|
||||
db $01 ; 2B - Full bottle (red)
|
||||
db $01 ; 2C - Full bottle (green)
|
||||
db $01 ; 2D - Full bottle (blue)
|
||||
db $00 ; 2E - Potion refill (red)
|
||||
db $00 ; 2F - Potion refill (green)
|
||||
db $00 ; 30 - Potion refill (blue)
|
||||
db $00 ; 31 - 10 bombs
|
||||
db $00 ; 32 - Big key
|
||||
db $00 ; 33 - Map
|
||||
db $00 ; 34 - 1 rupee
|
||||
db $00 ; 35 - 5 rupees
|
||||
db $00 ; 36 - 20 rupees
|
||||
db $00 ; 37 - Green pendant
|
||||
db $00 ; 38 - Blue pendant
|
||||
db $00 ; 39 - Red pendant
|
||||
db $01 ; 3A - Tossed bow
|
||||
db $01 ; 3B - Silvers
|
||||
db $01 ; 3C - Full bottle (bee)
|
||||
db $01 ; 3D - Full bottle (fairy)
|
||||
db $00 ; 3E - Boss heart
|
||||
db $00 ; 3F - Sanc heart
|
||||
db $00 ; 40 - 100 rupees
|
||||
db $00 ; 41 - 50 rupees
|
||||
db $00 ; 42 - Heart
|
||||
db $00 ; 43 - Arrow
|
||||
db $00 ; 44 - 10 arrows
|
||||
db $00 ; 45 - Small magic
|
||||
db $00 ; 46 - 300 rupees
|
||||
db $00 ; 47 - 20 rupees green
|
||||
db $01 ; 48 - Full bottle (good bee)
|
||||
db $01 ; 49 - Tossed fighter sword
|
||||
db $01 ; 4A - Active Flute
|
||||
db $01 ; 4B - Boots
|
||||
|
||||
db $00 ; 4C - Bomb capacity (50)
|
||||
db $00 ; 4D - Arrow capacity (70)
|
||||
db $01 ; 4E - 1/2 magic
|
||||
db $01 ; 4F - 1/4 magic
|
||||
db $01 ; 50 - Safe master sword
|
||||
db $00 ; 51 - Bomb capacity (+5)
|
||||
db $01 ; 52 - Bomb capacity (+10)
|
||||
db $00 ; 53 - Arrow capacity (+5)
|
||||
db $00 ; 54 - Arrow capacity (+10)
|
||||
db $00 ; 55 - Programmable item 1
|
||||
db $00 ; 56 - Programmable item 2
|
||||
db $00 ; 57 - Programmable item 3
|
||||
db $01 ; 58 - Upgrade-only silver arrows
|
||||
db $00 ; 59 - Rupoor
|
||||
db $00 ; 5A - Nothing
|
||||
db $00 ; 5B - Red clock
|
||||
db $00 ; 5C - Blue clock
|
||||
db $00 ; 5D - Green clock
|
||||
db $01 ; 5E - Progressive sword
|
||||
db $00 ; 5F - Progressive shield
|
||||
db $00 ; 60 - Progressive armor
|
||||
db $01 ; 61 - Progressive glove
|
||||
db $00 ; 62 - RNG pool item (single)
|
||||
db $00 ; 63 - RNG pool item (multi)
|
||||
db $01 ; 64 - Progressive bow
|
||||
db $01 ; 65 - Progressive bow
|
||||
db $00 ; 66 -
|
||||
db $00 ; 67 -
|
||||
db $00 ; 68 -
|
||||
db $00 ; 69 -
|
||||
db $00 ; 6A - Triforce
|
||||
db $00 ; 6B - Power star
|
||||
db $00 ; 6C - Triforce Piece
|
||||
db $00 ; 6D - Server request item
|
||||
db $00 ; 6E - Server request item (dungeon drop)
|
||||
db $00 ; 6F -
|
||||
|
||||
db $00 ; 70 - Map of Light World
|
||||
db $00 ; 71 - Map of Dark World
|
||||
db $00 ; 72 - Map of Ganon's Tower
|
||||
db $00 ; 73 - Map of Turtle Rock
|
||||
db $00 ; 74 - Map of Thieves' Town
|
||||
db $00 ; 75 - Map of Tower of Hera
|
||||
db $00 ; 76 - Map of Ice Palace
|
||||
db $00 ; 77 - Map of Skull Woods
|
||||
db $00 ; 78 - Map of Misery Mire
|
||||
db $00 ; 79 - Map of Dark Palace
|
||||
db $00 ; 7A - Map of Swamp Palace
|
||||
db $00 ; 7B - Map of Agahnim's Tower
|
||||
db $00 ; 7C - Map of Desert Palace
|
||||
db $00 ; 7D - Map of Eastern Palace
|
||||
db $00 ; 7E - Map of Hyrule Castle
|
||||
db $00 ; 7F - Map of Sewers
|
||||
|
||||
db $00 ; 80 - Compass of Light World
|
||||
db $00 ; 81 - Compass of Dark World
|
||||
db $00 ; 82 - Compass of Ganon's Tower
|
||||
db $00 ; 83 - Compass of Turtle Rock
|
||||
db $00 ; 84 - Compass of Thieves' Town
|
||||
db $00 ; 85 - Compass of Tower of Hera
|
||||
db $00 ; 86 - Compass of Ice Palace
|
||||
db $00 ; 87 - Compass of Skull Woods
|
||||
db $00 ; 88 - Compass of Misery Mire
|
||||
db $00 ; 89 - Compass of Dark Palace
|
||||
db $00 ; 8A - Compass of Swamp Palace
|
||||
db $00 ; 8B - Compass of Agahnim's Tower
|
||||
db $00 ; 8C - Compass of Desert Palace
|
||||
db $00 ; 8D - Compass of Eastern Palace
|
||||
db $00 ; 8E - Compass of Hyrule Castle
|
||||
db $00 ; 8F - Compass of Sewers
|
||||
|
||||
db $00 ; 90 - Skull key
|
||||
db $00 ; 91 - Reserved
|
||||
db $00 ; 92 - Big key of Ganon's Tower
|
||||
db $00 ; 93 - Big key of Turtle Rock
|
||||
db $00 ; 94 - Big key of Thieves' Town
|
||||
db $00 ; 95 - Big key of Tower of Hera
|
||||
db $00 ; 96 - Big key of Ice Palace
|
||||
db $00 ; 97 - Big key of Skull Woods
|
||||
db $00 ; 98 - Big key of Misery Mire
|
||||
db $00 ; 99 - Big key of Dark Palace
|
||||
db $00 ; 9A - Big key of Swamp Palace
|
||||
db $00 ; 9B - Big key of Agahnim's Tower
|
||||
db $00 ; 9C - Big key of Desert Palace
|
||||
db $00 ; 9D - Big key of Eastern Palace
|
||||
db $00 ; 9E - Big key of Hyrule Castle
|
||||
db $00 ; 9F - Big key of Sewers
|
||||
|
||||
db $00 ; A0 - Small key of Sewers
|
||||
db $00 ; A1 - Small key of Hyrule Castle
|
||||
db $00 ; A2 - Small key of Eastern Palace
|
||||
db $00 ; A3 - Small key of Desert Palace
|
||||
db $00 ; A4 - Small key of Agahnim's Tower
|
||||
db $00 ; A5 - Small key of Swamp Palace
|
||||
db $00 ; A6 - Small key of Dark Palace
|
||||
db $00 ; A7 - Small key of Misery Mire
|
||||
db $00 ; A8 - Small key of Skull Woods
|
||||
db $00 ; A9 - Small key of Ice Palace
|
||||
db $00 ; AA - Small key of Tower of Hera
|
||||
db $00 ; AB - Small key of Thieves' Town
|
||||
db $00 ; AC - Small key of Turtle Rock
|
||||
db $00 ; AD - Small key of Ganon's Tower
|
||||
db $00 ; AE - Reserved
|
||||
db $00 ; AF - Generic small key
|
||||
db $00 ; B0 - Crystal 6
|
||||
db $00 ; B1 - Crystal 1
|
||||
db $00 ; B2 - Crystal 5
|
||||
db $00 ; B3 - Crystal 7
|
||||
db $00 ; B4 - Crystal 2
|
||||
db $00 ; B5 - Crystal 4
|
||||
db $00 ; B6 - Crystal 3
|
||||
db $00 ; B7 - Reserved
|
||||
db $00 ; B8 -
|
||||
db $00 ; B9 -
|
||||
db $00 ; BA -
|
||||
db $00 ; BB -
|
||||
db $00 ; BC -
|
||||
db $00 ; BD -
|
||||
db $00 ; BE -
|
||||
db $00 ; BF -
|
||||
db $00 ; C0 -
|
||||
db $00 ; C1 -
|
||||
db $00 ; C2 -
|
||||
db $00 ; C3 -
|
||||
db $00 ; C4 -
|
||||
db $00 ; C5 -
|
||||
db $00 ; C6 -
|
||||
db $00 ; C7 -
|
||||
db $00 ; C8 -
|
||||
db $00 ; C9 -
|
||||
db $00 ; CA -
|
||||
db $00 ; CB -
|
||||
db $00 ; CC -
|
||||
db $00 ; CD -
|
||||
db $00 ; CE -
|
||||
db $00 ; CF -
|
||||
db $00 ; D0 - Bee trap
|
||||
db $00 ; D1 - Apples
|
||||
db $00 ; D2 - Fairy
|
||||
db $00 ; D3 - Chicken
|
||||
db $00 ; D4 - Big Magic
|
||||
db $00 ; D5 - 5 Arrows
|
||||
db $00 ; D6 - Good Bee
|
||||
db $00 ; D7 -
|
||||
db $00 ; D8 -
|
||||
db $00 ; D9 -
|
||||
db $00 ; DA -
|
||||
db $00 ; DB -
|
||||
db $00 ; DC -
|
||||
db $00 ; DD -
|
||||
db $00 ; DE -
|
||||
db $00 ; DF -
|
||||
db $00 ; E0 -
|
||||
db $00 ; E1 -
|
||||
db $00 ; E2 -
|
||||
db $00 ; E3 -
|
||||
db $00 ; E4 -
|
||||
db $00 ; E5 -
|
||||
db $00 ; E6 -
|
||||
db $00 ; E7 -
|
||||
db $00 ; E8 -
|
||||
db $00 ; E9 -
|
||||
db $00 ; EA -
|
||||
db $00 ; EB -
|
||||
db $00 ; EC -
|
||||
db $00 ; ED -
|
||||
db $00 ; EE -
|
||||
db $00 ; EF -
|
||||
db $00 ; F0 -
|
||||
db $00 ; F1 -
|
||||
db $00 ; F2 -
|
||||
db $00 ; F3 -
|
||||
db $00 ; F4 -
|
||||
db $00 ; F5 -
|
||||
db $00 ; F6 -
|
||||
db $00 ; F7 -
|
||||
db $00 ; F8 -
|
||||
db $00 ; F9 -
|
||||
db $00 ; FA -
|
||||
db $00 ; FB -
|
||||
db $00 ; FC -
|
||||
db $00 ; FD -
|
||||
db $00 ; FE - Server request (async)
|
||||
db $00 ; FF -
|
||||
5
ram.asm
5
ram.asm
@@ -597,8 +597,6 @@ HUDMultiIndicator = $7EC790 ;
|
||||
HUDKeysObtained = $7EC7A2 ;
|
||||
HUDKeysSlash = $7EC7A4 ;
|
||||
HUDKeysTotal = $7EC7A6 ;
|
||||
HUDKeysExtraPlus = $7EC7E4 ;
|
||||
HUDKeysExtraCount = $7EC7E6 ;
|
||||
;
|
||||
BigRAM = $7EC900 ; Big buffer of free ram (0x1F00)
|
||||
ItemGFXStack = $7ECB00 ; Pointers to source of decompressed item tiles deferred to NMI loading.
|
||||
@@ -621,7 +619,8 @@ HexToDecDigit3: skip 1 ;
|
||||
HexToDecDigit4: skip 1 ;
|
||||
HexToDecDigit5: skip 1 ;
|
||||
SpriteSkipEOR: skip 2 ; Used in utilities.asm to determine when to skip drawing sprites. Zero-padded
|
||||
skip $2B ; Unused
|
||||
skip $2A ; Unused
|
||||
BossDropTouched: skip 1
|
||||
AltTextFlag: skip 2 ; dialog.asm: Determines whether to load from vanilla decompression buffer
|
||||
; or from a secondary buffer (used for things like free dungeon item text)
|
||||
BossKills: skip 1 ;
|
||||
|
||||
@@ -436,7 +436,7 @@ Shopkeeper_BuyItem:
|
||||
BRA +
|
||||
.refill
|
||||
JSL Sprite_GetEmptyBottleIndex : BMI .full_bottles
|
||||
LDA.b #$1 : STA.l ShopkeeperRefill ; If this is on, don't toggle bit to remove from shop
|
||||
LDA.b #$01 : STA.l ShopkeeperRefill ; If this is on, don't toggle bit to remove from shop
|
||||
+
|
||||
|
||||
LDA.l ShopType : AND.b #$80 : BNE .buy ; don't charge if this is a take-any
|
||||
@@ -453,6 +453,16 @@ Shopkeeper_BuyItem:
|
||||
LDA.b #$3C : STA.w SFX2 ; error sound
|
||||
JMP .done
|
||||
.buy
|
||||
|
||||
LDA.l ShopInventory, X
|
||||
TAY
|
||||
JSL ShieldCheck
|
||||
BCS +
|
||||
JMP .done
|
||||
+
|
||||
; Y now has the (possibly-substituted) item ID
|
||||
|
||||
|
||||
LDA.l ShopType : AND.b #$80 : BNE ++ ; don't charge if this is a take-any
|
||||
REP #$20 : LDA.l CurrentRupees : !SUB.l ShopInventory+1, X : STA.l CurrentRupees : SEP #$20 ; Take price away
|
||||
++
|
||||
@@ -464,9 +474,9 @@ Shopkeeper_BuyItem:
|
||||
LDA.l EnableShopItemCount, X : STA.l ShopEnableCount ; If so, store the permission to count the item here.
|
||||
+++
|
||||
PLX
|
||||
LDA.l ShopInventory, X
|
||||
JSL AttemptItemSubstitution
|
||||
TAY : JSL Link_ReceiveItem
|
||||
|
||||
; Y still has item ID
|
||||
JSL Link_ReceiveItem
|
||||
LDA.l ShopInventory+3, X : INC : STA.l ShopInventory+3, X
|
||||
LDA.b #$00 : STA.l ShopEnableCount
|
||||
TXA : LSR #2 : TAX
|
||||
|
||||
5
sram.asm
5
sram.asm
@@ -190,7 +190,8 @@ ItemLimitCounts: skip 16 ; Keeps track of limited non-progressive items s
|
||||
; See: ItemSubstitutionRules in tables.asm
|
||||
; Right now this is only used for three items but extra space is
|
||||
; reserved
|
||||
skip 34 ; Unused
|
||||
skip 32 ; Unused
|
||||
PikitItem: skip 2 ; Item stored in shield player is carrying
|
||||
FluteBitfield: skip 1 ;
|
||||
SpecialWeaponLevel: skip 1 ; keeps track of level in special weapon modes
|
||||
ItemOnB: skip 1 ; NYI
|
||||
@@ -322,7 +323,7 @@ MagicCounter: skip 2 ; Magic used by player (16-bit integer)
|
||||
HighestMail: skip 1 ; Highest mail level
|
||||
SmallKeyCounter: skip 1 ; Total Number of small keys collected (integer)
|
||||
HeartPieceCounter: skip 1 ; Total Number of heartpieces collected (integer)
|
||||
skip 1 ; Unused
|
||||
PikitFed: skip 1 ; Total Number of shields fed to pikit
|
||||
DungeonsCompleted: skip 2 ; Bitfield indicating whether a dungeon's prize has been collected.
|
||||
; This has the same shape as the dungeon item bitfields.
|
||||
MapCountDisplay: skip 2 ;
|
||||
|
||||
@@ -5,6 +5,13 @@
|
||||
;
|
||||
; See sram.asm for adresses and documentation of stat values
|
||||
;--------------------------------------------------------------------------------
|
||||
IncrementPikitCounter:
|
||||
LDA.l StatsLocked : BNE +
|
||||
LDA.l PikitFed : INC A : BEQ + ; overflow
|
||||
STA.l PikitFed
|
||||
+
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
IncrementBonkCounter:
|
||||
LDA.l StatsLocked : BNE +
|
||||
LDA.l BonkCounter : INC : BEQ + ; overflow
|
||||
|
||||
@@ -504,6 +504,15 @@ CreditsLineBlank:
|
||||
%blankline()
|
||||
%blankline()
|
||||
|
||||
%smallcredits("PIKIT FEEDER", "red")
|
||||
|
||||
%blankline()
|
||||
|
||||
%bigcredits("KARAFRUIT")
|
||||
|
||||
%blankline()
|
||||
%blankline()
|
||||
|
||||
%smallcredits("SPRITE DEVELOPMENT", "yellow")
|
||||
|
||||
%blankline()
|
||||
@@ -623,12 +632,6 @@ endif
|
||||
|
||||
%bigcredits("HTTPS://ALTTPR.COM/DISCORD")
|
||||
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
%emptyline()
|
||||
|
||||
@@ -755,10 +758,9 @@ endif
|
||||
%bigcreditsleft("TOTAL LAG TIME")
|
||||
|
||||
%blankline()
|
||||
%blankline()
|
||||
|
||||
%bigcreditsleft("SHIELDS EATEN")
|
||||
|
||||
%blankline()
|
||||
%blankline()
|
||||
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
!TOTAL_MENU_TIME_Y = 364
|
||||
!TOTAL_LAG_TIME_X = 19
|
||||
!TOTAL_LAG_TIME_Y = 367
|
||||
!PIKIT_FED_X = 26
|
||||
!PIKIT_FED_Y = 370
|
||||
!COLLECTION_RATE_X = 22
|
||||
!COLLECTION_RATE_Y = 380
|
||||
!TOTAL_TIME_X = 19
|
||||
@@ -64,8 +66,9 @@ CreditsStats:
|
||||
%AddStat(FaerieRevivalCounter, 0, 0, 08, 3, !FAERIE_REVIVALS_X, !FAERIE_REVIVALS_Y)
|
||||
%AddStat(MenuFrames, 1, 8, 32, 4, !TOTAL_MENU_TIME_X, !TOTAL_MENU_TIME_Y)
|
||||
%AddStat(LagTime, 1, 0, 32, 4, !TOTAL_LAG_TIME_X, !TOTAL_LAG_TIME_Y)
|
||||
%AddStat(PikitFed, 0, 0, 8, 3, !PIKIT_FED_X, !PIKIT_FED_Y)
|
||||
print "Collection Rate config: ", pc
|
||||
warnpc $A39864
|
||||
; warnpc $A39864
|
||||
%AddStat(TotalItemCounter, 0, 0, 16, 3, !COLLECTION_RATE_X, !COLLECTION_RATE_Y)
|
||||
%AddStat(NMIFrames, 1, 0, 32, 4, !TOTAL_TIME_X, !TOTAL_TIME_Y)
|
||||
|
||||
|
||||
@@ -132,6 +132,12 @@ GetSmithSword:
|
||||
.buy
|
||||
LDA.l SmithItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
LDA.l SmithItem : TAY
|
||||
|
||||
JSL ShieldCheck
|
||||
BCS +
|
||||
JML $86B4A5
|
||||
|
||||
+
|
||||
STZ.w ItemReceiptMethod ; Item from NPC
|
||||
PHX : JSL Link_ReceiveItem : PLX
|
||||
|
||||
|
||||
@@ -1532,7 +1532,7 @@ db $19,$1A,$1B,$1C,$1D,$1E,$1F,$20
|
||||
db $21,$22,$11,$11,$10,$16,$16,$16
|
||||
db $16,$16,$11,$16,$16,$16,$15,$15
|
||||
db $15,$15,$15,$15,$15,$15,$15,$15
|
||||
db $15,$15,$2E,$02,$09,$00,$00,$00
|
||||
db $15,$15,$16,$02,$09,$00,$00,$00
|
||||
|
||||
MusicShuffleTable:
|
||||
db $01,$02,$03,$04,$05,$06,$07,$08
|
||||
@@ -2686,9 +2686,9 @@ org $B0EFFF ; PC 0x186FFF
|
||||
BallNChainDungeon: ; Dungeon ID where ball n chain guard is located. Write
|
||||
db $02 ; $FF to count ball and chain item for collection stats.
|
||||
|
||||
org $B0F000
|
||||
ExtraChestKeys: ; PC 0x187000-0x18700F
|
||||
db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
||||
;--------------------------------------------------------------------------------
|
||||
; 0x187000 - 18700F (unused)
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
org $B0F010
|
||||
ChestKeys: ; PC 0x187010-0x18701F
|
||||
|
||||
22
tablets.asm
22
tablets.asm
@@ -57,7 +57,7 @@ RTL
|
||||
MaybeUnlockTabletAnimation:
|
||||
PHA : PHP
|
||||
JSL IsMedallion : BCC +
|
||||
JSR SetTabletItemFlag
|
||||
JSR SetTabletItemFlag
|
||||
STZ.w MedallionFlag ; disable falling-medallion mode
|
||||
STZ.w ForceSwordUp ; release link from item-up pose
|
||||
LDA.b #$00 : STA.b LinkState ; set link to ground state
|
||||
@@ -73,6 +73,26 @@ MaybeUnlockTabletAnimation:
|
||||
PLP : PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
MaybeFreeLinkFromTablet:
|
||||
PHA : PHP
|
||||
JSL IsMedallion : BCC +
|
||||
STZ.w MedallionFlag ; disable falling-medallion mode
|
||||
STZ.w ForceSwordUp ; release link from item-up pose
|
||||
LDA.b #$00 : STA.b LinkState ; set link to ground state
|
||||
STZ.w CutsceneFlag
|
||||
STZ.w NoDamage
|
||||
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
LDA.b OverworldIndex : CMP.w #$0030 : BNE ++ ; Desert
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
LDA.b #$02 : STA.b LinkDirection ; face link forward
|
||||
LDA.b #$3C : STA.b LinkIncapacitatedTimer ; lock link for 60f
|
||||
++
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
+
|
||||
PLP : PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
IsMedallion:
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
LDA.b OverworldIndex
|
||||
|
||||
@@ -192,6 +192,7 @@ LoadBackgroundGraphics_arbitrary = $80E64D
|
||||
RoomTag_GetHeartForPrize = $81C709
|
||||
RoomTag_GetHeartForPrize_spawn_prize = $81C731
|
||||
RoomTag_GetHeartForPrize_delete_tag = $81C749
|
||||
RoomTag_GetHeartForPrize_exit = $81C74D
|
||||
Underworld_SetBossOrSancMusicUponEntry = $828AD9
|
||||
ResetThenCacheRoomEntryProperties = $828C73
|
||||
RecoverPositionAfterDrowning = $829485
|
||||
@@ -273,6 +274,7 @@ PalettesVanilla_spraux09 = $9BD47E
|
||||
; Misc. Data
|
||||
;===================================================================================================
|
||||
DungeonMask = $8098C0
|
||||
RoomFlagMask = $809900
|
||||
GFXSheetPointers_background_bank = $80CFC0
|
||||
GFXSheetPointers_background_high = $80D09F
|
||||
GFXSheetPointers_background_low = $80D17E
|
||||
|
||||
Reference in New Issue
Block a user