Merge in beta changes to pikit mode #4

Open
karafruit wants to merge 36 commits from pikit_mode_merge into pikit_mode
8 changed files with 199 additions and 154 deletions
Showing only changes of commit e749b6d6bc - Show all commits
+28 -14
View File
@@ -74,60 +74,71 @@ FreeDungeonItemNotice:
LDA.l ScratchBufferNV+1 : PHA LDA.l ScratchBufferNV+1 : PHA
;-------------------------------- ;--------------------------------
LDA.l FreeItemText : BNE + : JMP .skip : + LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BEQ +
LDA.b #$2F ; if not from our world, show all dungeon item and crystal notices
+ ORA.l FreeItemText : BNE + : JMP .skip : +
STA.b Scrap00
LDA.b #$00 : STA.l ScratchBufferNV ; initialize scratch LDA.b #$00 : STA.l ScratchBufferNV ; initialize scratch
LDA.l FreeItemText : AND.b #$01 : BEQ + ; show message for general small key
LDA.b Scrap00 : AND.b #$01 : BEQ + ; show message for general small key
LDA.l ScratchBufferV : CMP.b #$24 : BNE + ; general small key LDA.l ScratchBufferV : CMP.b #$24 : BNE + ; general small key
%CopyDialog(Notice_SmallKeyOf) %CopyDialog(Notice_SmallKeyOf)
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
%CopyDialog(Notice_Self) %CopyDialog(Notice_Self)
JMP .done JMP .done
+ : LDA.l FreeItemText : AND.b #$02 : BEQ + ; show message for general compass
+ LDA.b Scrap00 : AND.b #$02 : BEQ + ; show message for general compass
LDA.l ScratchBufferV : CMP.b #$25 : BNE + ; general compass LDA.l ScratchBufferV : CMP.b #$25 : BNE + ; general compass
%CopyDialog(Notice_CompassOf) %CopyDialog(Notice_CompassOf)
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
%CopyDialog(Notice_Self) %CopyDialog(Notice_Self)
JMP .done JMP .done
+ : LDA.l FreeItemText : AND.b #$04 : BEQ + ; show message for general map
+ LDA.b Scrap00 : AND.b #$04 : BEQ + ; show message for general map
LDA.l ScratchBufferV : CMP.b #$33 : BNE + ; general map LDA.l ScratchBufferV : CMP.b #$33 : BNE + ; general map
%CopyDialog(Notice_MapOf) %CopyDialog(Notice_MapOf)
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
%CopyDialog(Notice_Self) %CopyDialog(Notice_Self)
JMP .done JMP .done
+ : LDA.l FreeItemText : AND.b #$08 : BEQ + ; show message for general big key
+ LDA.b Scrap00 : AND.b #$08 : BEQ + ; show message for general big key
LDA.l ScratchBufferV : CMP.b #$32 : BNE + ; general big key LDA.l ScratchBufferV : CMP.b #$32 : BNE + ; general big key
%CopyDialog(Notice_BigKeyOf) %CopyDialog(Notice_BigKeyOf)
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
%CopyDialog(Notice_Self) %CopyDialog(Notice_Self)
JMP .done JMP .done
+
LDA.l FreeItemText : AND.b #$04 : BEQ + ; show message for dungeon map + LDA.b Scrap00 : AND.b #$04 : BEQ + ; show message for dungeon map
LDA.l ScratchBufferV : AND.b #$F0 ; looking at high bits only LDA.l ScratchBufferV : AND.b #$F0 ; looking at high bits only
CMP.b #$70 : BNE + ; map of... CMP.b #$70 : BNE + ; map of...
%CopyDialog(Notice_MapOf) %CopyDialog(Notice_MapOf)
JMP .dungeon JMP .dungeon
+ : LDA.l FreeItemText : AND.b #$02 : BEQ + ; show message for dungeon compass
+ LDA.b Scrap00 : AND.b #$02 : BEQ + ; show message for dungeon compass
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$80 : BNE + ; compass of... LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$80 : BNE + ; compass of...
%CopyDialog(Notice_CompassOf) %CopyDialog(Notice_CompassOf)
JMP .dungeon JMP .dungeon
+ : LDA.l FreeItemText : AND.b #$08 : BEQ + ; show message for dungeon big key
+ LDA.b Scrap00 : AND.b #$08 : BEQ + ; show message for dungeon big key
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$90 : BNE + ; big key of... LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$90 : BNE + ; big key of...
%CopyDialog(Notice_BigKeyOf) %CopyDialog(Notice_BigKeyOf)
JMP .dungeon JMP .dungeon
+ : LDA.l FreeItemText : AND.b #$01 : BEQ + ; show message for dungeon small key
+ LDA.b Scrap00 : AND.b #$01 : BEQ + ; show message for dungeon small key
LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$A0 : BNE + ; small key of... LDA.l ScratchBufferV : AND.b #$F0 : CMP.b #$A0 : BNE + ; small key of...
LDA.l ScratchBufferV : CMP.b #$AF : BNE ++ : JMP .skip : ++ LDA.l ScratchBufferV : CMP.b #$AF : BNE ++ : JMP .skip : ++
%CopyDialog(Notice_SmallKeyOf) %CopyDialog(Notice_SmallKeyOf)
LDA.b #$01 : STA.l ScratchBufferNV ; set up a flip for small keys LDA.b #$01 : STA.l ScratchBufferNV ; set up a flip for small keys
BRA .dungeon BRA .dungeon
+ : LDA.l FreeItemText : AND.b #$20 : BEQ + ; show message for crystal
+ LDA.b Scrap00 : AND.b #$20 : BEQ + ; show message for crystal
LDA.l ScratchBufferV : CMP.b #$B0 : !BLT + ; crystal # LDA.l ScratchBufferV : CMP.b #$B0 : !BLT + ; crystal #
CMP.b #$B7 : !BGE + CMP.b #$B7 : !BGE +
%CopyDialog(Notice_Crystal) %CopyDialog(Notice_Crystal)
JMP .crystal JMP .crystal
+
JMP .skip ; it's not something we are going to give a notice for + JMP .skip ; it's not something we are going to give a notice for
.dungeon .dungeon
LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer LDA.l DialogReturnPointer : DEC #2 : STA.l DialogOffsetPointer
@@ -141,7 +152,10 @@ FreeDungeonItemNotice:
LDA.l ScratchBufferNV+1 LDA.l ScratchBufferNV+1
ASL : TAX ASL : TAX
REP #$20 REP #$20
LDA.l DungeonItemIDMap,X : CMP.w #$0003 : BCC .hc_sewers
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : AND.w #$00FF : BNE +
LDA.l DungeonItemIDMap, X : CMP.w #$0003 : BCC .hc_sewers
CMP.w DungeonID : BNE + CMP.w DungeonID : BNE +
BRA .self_notice BRA .self_notice
.hc_sewers .hc_sewers
+13 -4
View File
@@ -21,14 +21,19 @@ SpiralWarp: {
lda.w $045e : cmp.b #$5e : beq .gtg ; abort if not spiral - intended room is in A! lda.w $045e : cmp.b #$5e : beq .gtg ; abort if not spiral - intended room is in A!
cmp.b #$5f : beq .gtg cmp.b #$5f : beq .gtg
cmp.b #$26 : beq .inroom cmp.b #$26 : beq .inroom
.abort .abort
SEP #$30 : stz.w $045e : lda.b PreviousRoom : and.b #$0f : rtl ; clear,run hijacked code and get out SEP #$30
.inroom stz.w $045e
JSL UpdateLootHUD
lda.b PreviousRoom : and.b #$0f
rtl ; clear,run hijacked code and get out
.inroom
jsr InroomStairsWarp jsr InroomStairsWarp
lda.b PreviousRoom : and.b #$0f ; this is the code we are hijacking lda.b PreviousRoom : and.b #$0f ; this is the code we are hijacking
rtl rtl
.gtg .gtg
phb : phk : plb : phx : phy ; push stuff phb : phk : plb : phx : phy ; push stuff
jsr LookupSpiralOffset jsr LookupSpiralOffset
rep #$30 : and.w #$00FF : asl #2 : tax rep #$30 : and.w #$00FF : asl #2 : tax
@@ -81,6 +86,8 @@ SpiralWarp: {
ldy.b #$01 : jsr SetCamera ldy.b #$01 : jsr SetCamera
jsr StairCleanup jsr StairCleanup
JSL UpdateLootHUD
ply : plx : plb ; pull the stuff we pushed ply : plx : plb ; pull the stuff we pushed
lda.b PreviousRoom : and.b #$0f ; this is the code we are hijacking lda.b PreviousRoom : and.b #$0f ; this is the code we are hijacking
rtl rtl
@@ -261,6 +268,8 @@ InroomStairsWarp: {
.skipCamera .skipCamera
jsr StairCleanup jsr StairCleanup
JSL UpdateLootHUD
ply : plx : plb ; pull the stuff we pushed ply : plx : plb ; pull the stuff we pushed
rts rts
} }
+17
View File
@@ -2,8 +2,25 @@ pushpc
org $82C0C3 org $82C0C3
JSL TransitionLinkOutOfDoorEnding JSL TransitionLinkOutOfDoorEnding
NOP NOP
org $87956F
JSL UpdateHUDAndLandLink
org $829611
JSL UpdateHUDAndUpdateQuadrants
pullpc pullpc
UpdateHUDAndLandLink:
JSL UpdateLootHUD
LDA.b $51
STA.b LinkPosY
RTL
UpdateHUDAndUpdateQuadrants:
JSL UpdateLootHUD
JSL $82B803
RTL
ClearLootHUD: ClearLootHUD:
LDA.b GameMode LDA.b GameMode
CMP.b #$07 CMP.b #$07
+2 -2
View File
@@ -46,7 +46,7 @@ dw $7F7F
; Ganons Tower ; Ganons Tower
Notice_GTower: Notice_GTower:
db $76 : dw "Ganons Tower" db $76 : dw "Ganon's Tower"
dw $7F7F dw $7F7F
; Turtle Rock ; Turtle Rock
@@ -81,7 +81,7 @@ dw $7F7F
; Dark Palace ; Dark Palace
Notice_PoD: Notice_PoD:
db $76 : dw "Dark Palace" db $76 : dw "Palace of Darkness"
dw $7F7F dw $7F7F
; Swamp Palace ; Swamp Palace
Binary file not shown.
Binary file not shown.
+5
View File
@@ -123,6 +123,11 @@ GetMultiworldItem:
BRL .return BRL .return
+ +
LDA.b LinkPushDirection
BEQ +
BRL .return
+
LDA.l !MULTIWORLD_ITEM : BNE + LDA.l !MULTIWORLD_ITEM : BNE +
BRL .return BRL .return
+ +