-
Notifications
You must be signed in to change notification settings - Fork 706
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in progress commit for treasure chests
- Loading branch information
Showing
17 changed files
with
692 additions
and
591 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
worlds/ff4fe/FreeEnterpriseForAP/FreeEnt/scripts/treasure_ap.f4c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
msfpatch { | ||
.addr $009788 | ||
jml $=TreasureAP__GetDialog | ||
nop | ||
nop | ||
} | ||
|
||
msfpatch { | ||
TreasureAP__GetDialog: | ||
lda $08FC // load treasure index into x | ||
stz $07 | ||
sta $06 | ||
rep #$20 | ||
lda $06 | ||
asl a | ||
adc $06 | ||
tax | ||
sep #$20 | ||
lda $348000,x // load bank into bank byte | ||
sta $06DD | ||
lda $348001,x // load dialog index into event bytes | ||
sta $06B2 | ||
lda $348002,x // load dialog index into event bytes | ||
sta $06B3 | ||
|
||
lda $06B2 | ||
stz $0773 | ||
asl a | ||
rol $0773 | ||
sta $0772 | ||
ldx $0772 | ||
|
||
lda $06DD | ||
cmp #$01 | ||
beq $+Bank1 | ||
lda $13A500, x | ||
sta $063D | ||
lda $13A501, x | ||
sta $063E | ||
bra $+Finish | ||
%Bank1: | ||
lda $06B3 | ||
cmp #$01 | ||
beq $+HiBank | ||
lda $108000, x | ||
sta $063D | ||
lda $108001, x | ||
sta $063E | ||
bra $+Finish | ||
%HiBank: | ||
lda $108080 | ||
sta $063D | ||
lda $108081 | ||
sta $063E | ||
%Finish: | ||
ldx $063D | ||
stx $0772 // might be longcall vars instead | ||
|
||
lda #$0000 | ||
ldy #$B0D1 | ||
jsl $=LongCall // displaced code | ||
|
||
jml $00978C // pray it works | ||
} |
Oops, something went wrong.