Compare commits
2 Commits
MappableDo
...
GKNew_soul
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ef95d4873 | |||
| 295b6a229b |
@@ -50,7 +50,6 @@ dw !ROM_VERSION_HIGH
|
||||
function hexto555(h) = ((((h&$FF)/8)<<10)|(((h>>8&$FF)/8)<<5)|(((h>>16&$FF)/8)<<0))
|
||||
|
||||
; Feature flags, run asar with -DFEATURE_X=1 to enable
|
||||
!FEATURE_FIX_BASEROM ?= 0
|
||||
|
||||
;================================================================================
|
||||
|
||||
@@ -119,7 +118,6 @@ incsrc doorframefixes.asm
|
||||
incsrc music.asm
|
||||
incsrc roomloading.asm
|
||||
incsrc icepalacegraphics.asm
|
||||
incsrc follower.asm
|
||||
warnpc $A18000
|
||||
|
||||
org $9C8000 ; text tables for translation
|
||||
@@ -179,10 +177,13 @@ incsrc toast.asm
|
||||
incsrc fastcredits.asm
|
||||
incsrc msu.asm
|
||||
incsrc menu/overworldmap.asm ; Overwrites some code in bank $8A
|
||||
incsrc bossicons.asm
|
||||
incsrc dungeonmap.asm
|
||||
incsrc hextodec.asm
|
||||
incsrc multiworld.asm
|
||||
incsrc textrenderer.asm
|
||||
incsrc crystalswitchbook.asm
|
||||
incsrc mimicdash.asm
|
||||
incsrc souls.asm
|
||||
warnpc $A58000
|
||||
|
||||
org $A28000
|
||||
@@ -192,6 +193,7 @@ fillbyte $00 : fill 32
|
||||
incbin "data/customitems.4bpp"
|
||||
PreloadedGraphicsROM:
|
||||
incbin "data/preloadedgfx.4bpp"
|
||||
incbin "data/bossicons.souls.4bpp"
|
||||
warnpc $A2B000
|
||||
org $A2B000
|
||||
incsrc itemdatatables.asm ; Statically mapped
|
||||
@@ -202,21 +204,6 @@ incsrc inventory.asm
|
||||
incsrc menu/hudalpha.asm
|
||||
warnpc $A38000
|
||||
|
||||
org $B98000
|
||||
incsrc crystalswitchbook.asm
|
||||
incsrc mimicdash.asm
|
||||
incsrc gloom.asm
|
||||
incsrc special_weapons.asm
|
||||
incsrc variable_ganon_vulnerability.asm
|
||||
incsrc pseudoflute.asm
|
||||
incsrc dungeon_map/main.asm
|
||||
print "End of B9: ", pc
|
||||
|
||||
warnpc $B9E000 ; $E000 - EFFF reserved for custom door rando map data
|
||||
|
||||
org $B9F000
|
||||
incsrc dungeon_map/settings.asm
|
||||
|
||||
org $A38000
|
||||
incsrc stats/credits.asm ; Statically mapped
|
||||
incsrc stats/main.asm
|
||||
@@ -259,7 +246,7 @@ warnpc $B1A000
|
||||
|
||||
org $B1A000
|
||||
GFX_HUD_Items:
|
||||
incbin "menu/dr_sheet_dc.2bppc"
|
||||
incbin "menu/drsheetdc.2bppc"
|
||||
warnpc $B1A800
|
||||
|
||||
org $B1A800
|
||||
@@ -312,24 +299,6 @@ NewFontInverted:
|
||||
incbin "data/newfont_inverted.bin"
|
||||
SmallCharacters:
|
||||
incbin "data/smallchars.2bpp"
|
||||
|
||||
DungeonMapIcons1:
|
||||
incbin "menu/map_icons_1.3bppc"
|
||||
DungeonMapIcons2:
|
||||
incbin "menu/map_icons_2.3bppc"
|
||||
DungeonMapIcons3:
|
||||
incbin "menu/map_icons_3.3bppc"
|
||||
DungeonMapIcons4:
|
||||
incbin "menu/map_icons_4.3bppc"
|
||||
DungeonMapIcons5:
|
||||
incbin "menu/map_icons_5.3bppc"
|
||||
DungeonMapIcons6:
|
||||
incbin "menu/map_icons_6.3bppc"
|
||||
DungeonMapDoorConnectors:
|
||||
incbin "menu/door_connectors.3bppc"
|
||||
MapSheetD4:
|
||||
incbin "menu/map_sheet_d4.3bppc"
|
||||
|
||||
org $8CD7DF
|
||||
incsrc data/playernamecharmap.asm
|
||||
org $8CE73D
|
||||
@@ -387,7 +356,6 @@ warnpc $B08000
|
||||
;$33 Graphics Bank
|
||||
;$36 reserved for Enemizer
|
||||
;$37 Room data if needed for DR/Pottery/Enemizer
|
||||
;$39 GwaaKiwi Code Bank
|
||||
;$3A reserved for downstream use
|
||||
;$3B reserved for downstream use
|
||||
;$3F reserved for internal debugging
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,249 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
const int MAXLENGTH = 0x300;
|
||||
|
||||
struct section {
|
||||
int mode;
|
||||
int length;
|
||||
unsigned char data[2];
|
||||
int datalength;
|
||||
};
|
||||
|
||||
int find_duplicate(off_t loc, off_t size, unsigned char buf[], struct section *out) {
|
||||
int i, j;
|
||||
struct section result;
|
||||
result.mode = 4;
|
||||
result.length = 0;
|
||||
for (i = 0; i < loc && i < 0x10000; i++) {
|
||||
if (buf[i] != buf[loc]) {
|
||||
continue;
|
||||
}
|
||||
for (j = 0; j < MAXLENGTH; j++) {
|
||||
if (buf[i + j] != buf[loc + j]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (j > result.length) {
|
||||
result.length = j;
|
||||
result.data[0] = i & 0xFF;
|
||||
result.data[1] = (i >> 8) & 0xFF;
|
||||
result.datalength = 2;
|
||||
}
|
||||
}
|
||||
if (result.length < 4) {
|
||||
return -1;
|
||||
}
|
||||
*out = result;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int find_repeat_byte(off_t loc, off_t size, unsigned char buf[], struct section *out) {
|
||||
int i;
|
||||
for (i = 0; i < MAXLENGTH && loc + i < size; i++) {
|
||||
if (buf[loc + i] != buf[loc]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i > 2) {
|
||||
struct section result;
|
||||
result.mode = 1;
|
||||
result.length = i;
|
||||
result.data[0] = buf[loc];
|
||||
result.datalength = 1;
|
||||
*out = result;
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int find_repeat_word(off_t loc, off_t size, unsigned char buf[], struct section *out) {
|
||||
int i;
|
||||
for (i = 0; i < MAXLENGTH && loc + i + 1 < size; i += 1) {
|
||||
if (buf[loc + i] != buf[loc + (i & 1)]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i > 3) {
|
||||
struct section result;
|
||||
result.mode = 2;
|
||||
result.length = i;
|
||||
result.data[0] = buf[loc];
|
||||
result.data[1] = buf[loc + 1];
|
||||
result.datalength = 2;
|
||||
*out = result;
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int find_incrementing_byte(off_t loc, off_t size, unsigned char buf[], struct section *out) {
|
||||
int i;
|
||||
for (i = 0; i < MAXLENGTH && loc + i < size; i++) {
|
||||
if (buf[loc] + i < i) {
|
||||
break;
|
||||
}
|
||||
if (buf[loc + i] != buf[loc] + i) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i > 2) {
|
||||
struct section result;
|
||||
result.mode = 3;
|
||||
result.length = i;
|
||||
result.data[0] = buf[loc];
|
||||
result.datalength = 1;
|
||||
*out = result;
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int get_section(off_t loc, off_t size, unsigned char buf[], struct section *out) {
|
||||
struct section best, current;
|
||||
best.length = 0;
|
||||
if (!find_repeat_byte(loc, size, buf, ¤t)) {
|
||||
if (current.length > best.length) {
|
||||
best = current;
|
||||
}
|
||||
}
|
||||
if (!find_repeat_word(loc, size, buf, ¤t)) {
|
||||
if (current.length > best.length) {
|
||||
best = current;
|
||||
}
|
||||
}
|
||||
if (!find_incrementing_byte(loc, size, buf, ¤t)) {
|
||||
if (current.length > best.length) {
|
||||
best = current;
|
||||
}
|
||||
}
|
||||
if (!find_duplicate(loc, size, buf, ¤t)) {
|
||||
if (current.length > best.length) {
|
||||
best = current;
|
||||
}
|
||||
}
|
||||
if (best.length > 0) {
|
||||
// printf("byte %06X: mode %d length %02X\n", loc, best.mode, best.length);
|
||||
*out = best;
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int write_section(struct section section, unsigned char data[], unsigned char buf[], int loc) {
|
||||
int nloc = loc;
|
||||
int len = section.length - 1;
|
||||
if (len > 0x1F) {
|
||||
buf[nloc++] = 0xE0 | (section.mode << 2) | (len >> 8);
|
||||
buf[nloc++] = len & 0xFF;
|
||||
} else {
|
||||
buf[nloc++] = (section.mode << 5) | len;
|
||||
}
|
||||
for (int i = 0; i < section.datalength; i++) {
|
||||
buf[nloc++] = data[i];
|
||||
}
|
||||
return nloc;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc < 3) {
|
||||
printf("Usage: %s infile outfile [start [length]]\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
off_t seek = 0;
|
||||
if (argc > 3) {
|
||||
seek = strtol(argv[3], NULL, 0);
|
||||
}
|
||||
|
||||
FILE *inptr;
|
||||
if ((inptr = fopen(argv[1], "rb")) == NULL) {
|
||||
printf("%s does not exist.\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int fd = fileno(inptr);
|
||||
if (fd < 0) {
|
||||
printf("Error stating file: %s\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct stat buf;
|
||||
if (fstat(fd, &buf) != 0) {
|
||||
printf("Error stating file: %s\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
off_t size = buf.st_size - seek;
|
||||
|
||||
if (argc > 4) {
|
||||
size = strtol(argv[4], NULL, 0);
|
||||
}
|
||||
unsigned char inbuf[size];
|
||||
|
||||
fseek(inptr, seek, SEEK_SET);
|
||||
|
||||
if (fread(inbuf, 1, size, inptr) < size) {
|
||||
printf("Error reading file: %s\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
fclose(inptr);
|
||||
|
||||
unsigned char outbuf[size * 2];
|
||||
unsigned char m0data[MAXLENGTH];
|
||||
|
||||
int oloc = 0;
|
||||
struct section m0;
|
||||
m0.mode = 0;
|
||||
m0.length = 0;
|
||||
int i;
|
||||
|
||||
off_t loc = 0;
|
||||
while (loc < size) {
|
||||
struct section section;
|
||||
if (!get_section(loc, size, inbuf, §ion)) {
|
||||
if (m0.length > 0) {
|
||||
m0.datalength = m0.length;
|
||||
oloc = write_section(m0, m0data, outbuf, oloc);
|
||||
m0.length = 0;
|
||||
}
|
||||
oloc = write_section(section, section.data, outbuf, oloc);
|
||||
loc += section.length;
|
||||
} else {
|
||||
if (m0.length == MAXLENGTH) {
|
||||
m0.datalength = m0.length;
|
||||
oloc = write_section(m0, m0data, outbuf, oloc);
|
||||
m0.length = 0;
|
||||
}
|
||||
m0data[m0.length++] = inbuf[loc];
|
||||
loc += 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (m0.length > 0) {
|
||||
m0.datalength = m0.length;
|
||||
oloc = write_section(m0, m0data, outbuf, oloc);
|
||||
m0.length = 0;
|
||||
}
|
||||
|
||||
outbuf[oloc++] = 0xFF;
|
||||
|
||||
FILE *outptr;
|
||||
if ((outptr = fopen(argv[2], "wb")) == NULL) {
|
||||
printf("Error opening file: %s\n", argv[2]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fwrite(outbuf, 1, oloc, outptr) < oloc) {
|
||||
printf("Error writing to file: %s\n", argv[2]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
fclose(outptr);
|
||||
printf("Input file: %lX bytes. Compressed: %X bytes.\n", size, oloc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
struct section {
|
||||
int mode;
|
||||
int length;
|
||||
unsigned char data[2];
|
||||
int datalength;
|
||||
};
|
||||
|
||||
int read_section(unsigned char buf[], int loc, struct section *out) {
|
||||
int nloc = loc;
|
||||
unsigned char header = buf[nloc++];
|
||||
|
||||
if (header == 0xFF) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct section result;
|
||||
result.data[0] = buf[loc];
|
||||
result.datalength = 1;
|
||||
|
||||
if ((header & 0xE0) == 0xE0) {
|
||||
result.mode = (header & 0x1C) >> 2;
|
||||
result.length = (((header & 0x03) << 8) | buf[nloc++]) + 1;
|
||||
} else {
|
||||
result.mode = (header & 0xE0) >> 5;
|
||||
result.length = (header & 0x1F) + 1;
|
||||
}
|
||||
|
||||
switch (result.mode) {
|
||||
case 0:
|
||||
result.datalength = 0;
|
||||
break;
|
||||
case 1:
|
||||
result.datalength = 1;
|
||||
break;
|
||||
case 2:
|
||||
result.datalength = 2;
|
||||
break;
|
||||
case 3:
|
||||
result.datalength = 1;
|
||||
break;
|
||||
case 4:
|
||||
result.datalength = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
for (int i = 0; i < result.datalength; i++) {
|
||||
result.data[i] = buf[nloc++];
|
||||
}
|
||||
|
||||
*out = result;
|
||||
return nloc;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc < 3) {
|
||||
printf("Usage: %s infile outfile [start [length]]\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
off_t seek = 0;
|
||||
if (argc > 3) {
|
||||
seek = strtol(argv[3], NULL, 0);
|
||||
}
|
||||
|
||||
FILE *inptr;
|
||||
if ((inptr = fopen(argv[1], "rb")) == NULL) {
|
||||
printf("%s does not exist.\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int fd = fileno(inptr);
|
||||
if (fd < 0) {
|
||||
printf("Error stating file: %s\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct stat buf;
|
||||
if (fstat(fd, &buf) != 0) {
|
||||
printf("Error stating file: %s\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
off_t size = buf.st_size - seek;
|
||||
|
||||
if (argc > 4) {
|
||||
size = strtol(argv[4], NULL, 0);
|
||||
}
|
||||
|
||||
fseek(inptr, seek, SEEK_SET);
|
||||
unsigned char inbuf[size];
|
||||
|
||||
if (fread(inbuf, 1, size, inptr) < size) {
|
||||
printf("Error reading file: %s\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
fclose(inptr);
|
||||
|
||||
unsigned char outbuf[size * 256];
|
||||
|
||||
int oloc = 0;
|
||||
struct section section;
|
||||
int i;
|
||||
|
||||
off_t loc = 0;
|
||||
|
||||
while ((loc = read_section(inbuf, loc, §ion)) >= 0) {
|
||||
if (section.mode == 0) {
|
||||
for (i = 0; i < section.length; i++) {
|
||||
outbuf[oloc++] = inbuf[loc++];
|
||||
}
|
||||
} else if (section.mode == 1) {
|
||||
for (i = 0; i < section.length; i++) {
|
||||
outbuf[oloc++] = section.data[0];
|
||||
}
|
||||
} else if (section.mode == 2) {
|
||||
for (i = 0; i < section.length; i++) {
|
||||
outbuf[oloc++] = section.data[0];
|
||||
if (++i < section.length) {
|
||||
outbuf[oloc++] = section.data[1];
|
||||
}
|
||||
}
|
||||
} else if (section.mode == 3) {
|
||||
for (i = 0; i < section.length; i++) {
|
||||
outbuf[oloc++] = (section.data[0] + i) & 0xff;
|
||||
}
|
||||
} else if (section.mode == 4) {
|
||||
int offset = section.data[0] | (section.data[1] << 8);
|
||||
for (i = 0; i < section.length; i++) {
|
||||
outbuf[oloc++] = outbuf[offset + i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FILE *outptr;
|
||||
if ((outptr = fopen(argv[2], "wb")) == NULL) {
|
||||
printf("Error opening file: %s\n", argv[2]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fwrite(outbuf, 1, oloc, outptr) < oloc) {
|
||||
printf("Error writing to file: %s\n", argv[2]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
fclose(outptr);
|
||||
printf("Input file: %lX bytes. Decompressed: %X bytes.\n", size, oloc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -16,7 +16,7 @@ DrawLibraryItemGFX:
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
SetLibraryItem:
|
||||
LDY.w SprSourceItemId, X
|
||||
LDY.w SprItemReceipt, X
|
||||
JSL ItemSet_Library ; contains thing we wrote over
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -52,7 +52,7 @@ RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
GiveBonkItem:
|
||||
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
LDA.w SprSourceItemId, X
|
||||
LDA.w SprItemReceipt, X
|
||||
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
|
||||
|
||||
56
bugfixes.asm
56
bugfixes.asm
@@ -1,5 +1,12 @@
|
||||
;================================================================================
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
AssignKiki:
|
||||
LDA.b #$00 : STA.l FollowerDropped ; defuse bomb
|
||||
LDA.b #$0A : STA.l FollowerIndicator ; assign kiki as follower
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
; Name: AllowSQ
|
||||
; Returns: Accumulator = 0 if S&Q is disallowed, 1 if allowed
|
||||
@@ -180,25 +187,6 @@ LDA.b IndoorsFlag : BNE +
|
||||
+
|
||||
RTL
|
||||
|
||||
PostFixMirrorGfxPrep:
|
||||
LDA.b #$01 : STA.w OWTransitionFlag
|
||||
JML HandleFollowersAfterMirroring ; what we wrote over
|
||||
|
||||
; warning, this is called on frames after PostFixMirrorGfxPrep but for
|
||||
; several frames after, so we use OWTransitionFlag to run something once
|
||||
PostFixMirrorGfx:
|
||||
STA.w SubModuleInterface ; what we wrote over
|
||||
LDA.w OWTransitionFlag : CMP.b #$01 : BNE .done
|
||||
LDA.b #$08 : STA.w OWTransitionFlag
|
||||
JML FollowerGfxRedraw
|
||||
.done
|
||||
RTL
|
||||
|
||||
PostFixOAMGfx:
|
||||
JSL FollowerGfxRedraw
|
||||
REP #$30 : LDA.w #$2000 ; what we wrote over
|
||||
RTL
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
; Fix losing VRAM gfx when using quake
|
||||
PostNMIUpdateBGCharHalf:
|
||||
@@ -271,7 +259,7 @@ ParadoxCaveGfxFix:
|
||||
LDA.b #$01 : STA.w DMAENABLE
|
||||
|
||||
.skipLine
|
||||
JML FollowerGfxRedraw
|
||||
RTL
|
||||
|
||||
.skipMostOfLine
|
||||
; Set line length to 192 bytes (the first 6 8x8 tiles in the line)
|
||||
@@ -284,11 +272,18 @@ SetItemRiseTimer:
|
||||
RTL
|
||||
|
||||
.not_from_chest
|
||||
LDA.l MultiworldJunkItemTimer : BEQ .default
|
||||
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .multiworld
|
||||
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .multiworld
|
||||
BRA .default
|
||||
|
||||
.multiworld
|
||||
LDA.l !MULTIWORLD_ITEM_ID
|
||||
JSL.l ItemIsJunk
|
||||
BEQ .default
|
||||
|
||||
.junk
|
||||
LDA.l JunkItemTimer : AND.b #$3F : STA.w AncillaTimer, X
|
||||
LDA.l MultiworldJunkItemTimer : STA.w AncillaTimer, X
|
||||
RTL
|
||||
|
||||
.default
|
||||
@@ -297,24 +292,10 @@ SetItemRiseTimer:
|
||||
;--------------------------------------------------------------------------------
|
||||
ItemIsJunk:
|
||||
PHX
|
||||
LDA.l JunkItemTimer : BIT.b #$3F : BEQ .not_junk
|
||||
BIT.b #$80 : BNE .check
|
||||
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .check
|
||||
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .check
|
||||
BRA .not_junk
|
||||
|
||||
.check
|
||||
LDA.l JunkItemTimer : AND.b #$40
|
||||
BEQ +
|
||||
LDA.b #JunkItems_triforce_end-JunkItems_end
|
||||
+
|
||||
CLC : ADC.b #JunkItems_end-JunkItems-1
|
||||
LDA.w AncillaGet, X
|
||||
TAX
|
||||
LDX.b #JunkItems_end-JunkItems-1
|
||||
-
|
||||
CMP.l JunkItems, X : BEQ .junk
|
||||
DEX : BPL -
|
||||
.not_junk
|
||||
PLX
|
||||
LDA.b #$00
|
||||
RTL
|
||||
@@ -347,7 +328,4 @@ JunkItems:
|
||||
db $D5 ; 5 Arrows
|
||||
db $D6 ; Good Bee
|
||||
.end
|
||||
db $6B ; Power Star
|
||||
db $6C ; Triforce Piece
|
||||
.triforce_end
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
!INERT = $00
|
||||
!INIT = $08
|
||||
!ALIVE = $09
|
||||
!OAMPROPS = $09
|
||||
!CUCCO_ENRAGED = $23
|
||||
|
||||
CuccoStorm:
|
||||
@@ -13,7 +12,6 @@ CuccoStorm:
|
||||
LDA.b GameMode : CMP.b #$09 : BNE + ; only if outdoors
|
||||
LDA.l LoopFrames : AND.b #$7F : BNE + ; check every 128 frames
|
||||
|
||||
.activate
|
||||
-
|
||||
;==== Find a Cucco
|
||||
|
||||
@@ -42,11 +40,7 @@ CuccoStorm:
|
||||
PLY
|
||||
CPY.b #$FF : BEQ + ; fail if no slots found
|
||||
LDA.b #!CUCCO : STA.w SpriteTypeTable, Y
|
||||
LDA.b #!ALIVE : STA.w SpriteAITable, Y
|
||||
PHX
|
||||
TYX : JSL ResetSpriteProperties
|
||||
PLX
|
||||
LDA.b #!OAMPROPS : STA.w SpriteOAMProp, Y
|
||||
LDA.b #!INIT : STA.w SpriteAITable, Y
|
||||
LDA.b LinkPosY : STA.w SpritePosYLow, Y
|
||||
LDA.b LinkPosY+1 : STA.w SpritePosYHigh, Y
|
||||
LDA.b LinkPosX : STA.w SpritePosXLow, Y
|
||||
|
||||
@@ -15,3 +15,27 @@ dw $0000, $7E4E, $6F44, $1CF5, $7399, $1CE7, $02F9, $0233
|
||||
dw $7FFF, $7FFF, $0000, $5907, $6E0E, $0000, $7FBB, $7672
|
||||
.off_black
|
||||
dw $0000, $14A5, $14A5, $14A5, $14A5, $14A5, $14A5, $14A5
|
||||
.armos
|
||||
dw hexto555($000000), hexto555($F8F8F8), hexto555($D86060), hexto555($5070C8), hexto555($B090F8), hexto555($282828), hexto555($F0A068), hexto555($B06028)
|
||||
.lanmolas
|
||||
dw hexto555($787040), hexto555($585030), hexto555($484018), hexto555($50C090), hexto555($408858), hexto555($305830), hexto555($D8A800), hexto555($E06018)
|
||||
.moldorm
|
||||
dw hexto555($F8D018), hexto555($C8B818), hexto555($A89818), hexto555($806818), hexto555($503818), hexto555($903818), hexto555($D85800), hexto555($F8A828)
|
||||
.agahnim
|
||||
dw hexto555($000000), hexto555($F8F8F8), hexto555($C04080), hexto555($B08828), hexto555($E8C070), hexto555($282828), hexto555($90D038), hexto555($688020)
|
||||
.helmasaur
|
||||
dw hexto555($A00028), hexto555($D03828), hexto555($E88820), hexto555($4848B0), hexto555($7870E8), hexto555($A8A8F8), hexto555($F8F8F8), hexto555($181818)
|
||||
.arrghus
|
||||
dw hexto555($000000), hexto555($F8F8F8), hexto555($903018), hexto555($D85800), hexto555($F8A828), hexto555($282828), hexto555($E88068), hexto555($B04038)
|
||||
.mothula
|
||||
dw hexto555($000000), hexto555($F8F8F8), hexto555($4848B0), hexto555($7870E8), hexto555($A8A8F8), hexto555($282828), hexto555($F8A840), hexto555($D85820)
|
||||
.blind
|
||||
dw hexto555($88D0F8), hexto555($7890F8), hexto555($903018), hexto555($D85800), hexto555($F8A828), hexto555($282828), hexto555($E88068), hexto555($B04038)
|
||||
.kholdstare
|
||||
dw hexto555($7098C0), hexto555($58B0E8), hexto555($D0F8F8), hexto555($4828C8), hexto555($4828F0), hexto555($8070F8), hexto555($F8C8F8), hexto555($E088B0)
|
||||
.vitreous
|
||||
dw hexto555($000000), hexto555($F8F8F8), hexto555($50C090), hexto555($408858), hexto555($305830), hexto555($282828), hexto555($D8A800), hexto555($E06018)
|
||||
.trinexx
|
||||
dw hexto555($A00028), hexto555($A8A8F8), hexto555($7870E8), hexto555($4848B0), hexto555($505060), hexto555($788890), hexto555($78C0A8), hexto555($707068)
|
||||
.ganon
|
||||
dw hexto555($385088), hexto555($5088A8), hexto555($88C8A0), hexto555($B090F8), hexto555($C0A028), hexto555($886008), hexto555($B83010), hexto555($E86040)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
; Dark World Spawn Location Fix & Master Sword Grove Fix
|
||||
;--------------------------------------------------------------------------------
|
||||
DarkWorldSaveFix:
|
||||
LDA.b #$70 : PHA : PLB ; thing we wrote over - data bank change
|
||||
JSL MasterSwordFollowerClear
|
||||
JML StatSaveCounter
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -11,7 +12,6 @@ DoWorldFix:
|
||||
+
|
||||
LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check
|
||||
LDA.l FollowerIndicator : CMP.b #$04 : BNE + ; if old man following, skip mirror/aga check
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BEQ +
|
||||
LDA.l OldManRetrievalWorld
|
||||
BRA .noMirror
|
||||
+ LDA.l MirrorEquipment : AND.b #$02 : BEQ .noMirror ; check if we have the mirror
|
||||
@@ -60,7 +60,6 @@ RTL
|
||||
DoWorldFix_Inverted:
|
||||
LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check
|
||||
LDA.l FollowerIndicator : CMP.b #$04 : BNE + ; if old man following, skip mirror/aga check
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BEQ +
|
||||
LDA.l OldManRetrievalWorld
|
||||
BRA .setWorld
|
||||
+ LDA.l MirrorEquipment : AND.b #$02 : BEQ .noMirror ; check if we have the mirror
|
||||
@@ -116,13 +115,12 @@ FakeWorldFix:
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
GetCurrentWorldForLoad:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BEQ .default
|
||||
LDA.l FollowerIndicator : CMP.b #$04 : BNE .default
|
||||
LDA.l InvertedMode : BEQ +
|
||||
LDA.b #$40
|
||||
+ RTL
|
||||
LDA FollowerIndicator : CMP #$04 : BNE .default
|
||||
LDA InvertedMode : BEQ +
|
||||
LDA #$40
|
||||
+ RTL
|
||||
.default
|
||||
LDA.l CurrentWorld
|
||||
LDA CurrentWorld
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
MasterSwordFollowerClear:
|
||||
@@ -133,9 +131,7 @@ MasterSwordFollowerClear:
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
FixAgahnimFollowers:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BEQ +
|
||||
LDA.b #$00 : STA.l FollowerIndicator ; clear follower
|
||||
+
|
||||
LDA.b #$00 : STA.l FollowerIndicator ; clear follower
|
||||
JML PrepDungeonExit ; thing we wrote over
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
BIN
data/bossicons.souls.4bpp
Normal file
BIN
data/bossicons.souls.4bpp
Normal file
Binary file not shown.
BIN
data/c2e3e.bin
BIN
data/c2e3e.bin
Binary file not shown.
BIN
data/c2e3e.gfx
BIN
data/c2e3e.gfx
Binary file not shown.
BIN
data/skull.bin
BIN
data/skull.bin
Binary file not shown.
@@ -202,8 +202,6 @@ DecompressAllItemGraphics:
|
||||
LDX.b #$5C+$73 : JSR AddGfxSheetToBigBuffer
|
||||
LDX.b #$5B+$73 : JSR AddGfxSheetToBigBuffer
|
||||
LDX.b #$5A+$73 : JSR AddGfxSheetToBigBuffer
|
||||
JSR AddCherryPickGfxToBigBuffer
|
||||
LDX.b #$01 : STX.w $06FA
|
||||
LDX.b #$06+$73 : JSR AddGfxSheetToBigBuffer
|
||||
LDX.b #$07+$73 : JSR AddGfxSheetToBigBuffer
|
||||
|
||||
@@ -499,11 +497,6 @@ macro DoPlanesA(offset)
|
||||
|
||||
XBA
|
||||
ORA.b Decomp3BPPScratch
|
||||
PHY
|
||||
LDY.w $06FA : BEQ +
|
||||
AND.w #$00FF ; idk why this line works but some sheets we pull in aren't correct without it
|
||||
+
|
||||
PLY
|
||||
STA.w BigDecompressionBuffer+$10+<offset>+<offset>,X
|
||||
|
||||
endmacro
|
||||
@@ -527,11 +520,7 @@ macro DoIndirectPlanesA(offset)
|
||||
|
||||
XBA
|
||||
ORA.b Decomp3BPPScratch
|
||||
PHY
|
||||
LDY.w $06FA : BEQ +
|
||||
AND.w #$00FF ; idk why this line works but some sheets we pull in aren't correct without it
|
||||
+
|
||||
PLY
|
||||
AND.w #$00FF ; idk why this line works but the 2 sheets we pull in aren't correct without it
|
||||
STA.l BigDecompressionBuffer+$10+<offset>+<offset>,X
|
||||
|
||||
endmacro
|
||||
@@ -623,57 +612,4 @@ Unrolled3BPPConvert:
|
||||
|
||||
;===================================================================================================
|
||||
|
||||
macro CherryPickGfx(source,dest,length)
|
||||
LDX.w #BigDecompressionBuffer+<source>
|
||||
LDY.w #BigDecompressionBuffer+<dest>
|
||||
LDA.w #<length>-1
|
||||
MVN BigDecompressionBuffer>>16,BigDecompressionBuffer>>16
|
||||
|
||||
LDX.w #BigDecompressionBuffer+<source>+$200
|
||||
LDY.w #BigDecompressionBuffer+<dest>+$200
|
||||
LDA.w #<length>-1
|
||||
MVN BigDecompressionBuffer>>16,BigDecompressionBuffer>>16
|
||||
endmacro
|
||||
|
||||
;===================================================================================================
|
||||
|
||||
AddCherryPickGfxToBigBuffer:
|
||||
; this is mostly to load and rearrange follower gfx to save on space
|
||||
; assumes DecompBufferOffset left off at $A000 (#BigDecompressionBuffer+$2000)
|
||||
; adjustments will be needed if anything prior to this changes
|
||||
LDX.b #$01 : STX.w $06FA
|
||||
LDX.b #$35+$73 : JSR AddGfxSheetToBigBuffer
|
||||
LDX.b #$55+$73 : JSR AddGfxSheetToBigBuffer
|
||||
REP #$30
|
||||
%CherryPickGfx($2400,$2140,$40) ; move old man head
|
||||
%CherryPickGfx($2D40,$20C0,$40) ; move zelda body
|
||||
LDA.b DecompBufferOffset : SEC : SBC.w #$0C00 : STA.b DecompBufferOffset
|
||||
SEP #$30
|
||||
LDX.b #$11+$73 : JSR AddGfxSheetToBigBuffer
|
||||
LDX.b #$15+$73 : JSR AddGfxSheetToBigBuffer
|
||||
REP #$30
|
||||
%CherryPickGfx($2940,$2180,$80) ; move locksmith head/body
|
||||
%CherryPickGfx($2D00,$0440,$40) ; move frog
|
||||
%CherryPickGfx($31C0,$0500,$40) ; move purple chest
|
||||
LDA.b DecompBufferOffset : SEC : SBC.w #$1000 : STA.b DecompBufferOffset
|
||||
SEP #$30
|
||||
LDX.b #$59+$73 : JSR AddGfxSheetToBigBuffer
|
||||
LDX.b #$58+$73 : JSR AddGfxSheetToBigBuffer
|
||||
REP #$30
|
||||
%CherryPickGfx($2880,$0480,$40) ; move kiki head
|
||||
%CherryPickGfx($2900,$04C0,$40) ; move kiki body
|
||||
%CherryPickGfx($30C0,$0540,$40) ; move big bomb
|
||||
%CherryPickGfx($2C40,$0180,$40) ; move duck
|
||||
LDA.b DecompBufferOffset : SEC : SBC.w #$1000 : STA.b DecompBufferOffset
|
||||
SEP #$30
|
||||
LDX.b #$4D+$73 : JSR AddGfxSheetToBigBuffer
|
||||
LDX.b #$50+$73 : JSR AddGfxSheetToBigBuffer
|
||||
REP #$30
|
||||
%CherryPickGfx($2880,$0580,$40) ; move smith
|
||||
%CherryPickGfx($3140,$0140,$40) ; move chicken
|
||||
LDA.b DecompBufferOffset : SEC : SBC.w #$1000 : STA.b DecompBufferOffset
|
||||
SEP #$30
|
||||
|
||||
STZ.w $06FA
|
||||
RTS
|
||||
|
||||
|
||||
86
dialog.asm
86
dialog.asm
@@ -265,7 +265,7 @@ RTL
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DialogGanon1:
|
||||
LDA.b #$01 : JSL CheckConditionPass
|
||||
JSL CheckGanonVulnerability
|
||||
REP #$20
|
||||
LDA.w #$018C
|
||||
BCC +
|
||||
@@ -284,68 +284,28 @@ RTL
|
||||
; s = silver arrow bow
|
||||
; p = 2nd progressive bow
|
||||
DialogGanon2:
|
||||
LDA.b #$01 : JSL CheckConditionPass
|
||||
JSL CheckGanonVulnerability
|
||||
|
||||
REP #$20
|
||||
BCS +
|
||||
LDA.w #$018D : JMP .done
|
||||
+
|
||||
LDA.l GanonVulnerabilityItem : AND.w #$00FF
|
||||
BEQ .silver_arrows
|
||||
CMP.w #$0001 : BEQ .silver_arrows
|
||||
CMP.w #$0004 : BEQ .bombs
|
||||
CMP.w #$0005 : BEQ .powder
|
||||
CMP.w #$0010 : BEQ .bee
|
||||
REP #$20
|
||||
BCS +
|
||||
LDA.w #$018D : BRA ++
|
||||
+
|
||||
LDA.l BowTracking
|
||||
|
||||
PHX : TAX
|
||||
LDA.l EquipmentWRAM-1, X
|
||||
PLX
|
||||
AND.w #$00FF : BNE .have
|
||||
BRA .dont_have
|
||||
|
||||
.silver_arrows
|
||||
LDA.l BowTracking
|
||||
|
||||
BIT.w #$0080 : BEQ .dont_have ; no bow
|
||||
BIT.w #$0040 : BNE .have ; have silvers
|
||||
|
||||
BIT.w #$0020 : BNE +
|
||||
LDA.w #$0194 : BRA .done ; have p bow
|
||||
+ LDA.w #$0193 : BRA .done ; don't have p bow
|
||||
|
||||
.dont_have
|
||||
LDA.w #$0192 : BRA .done
|
||||
.have
|
||||
LDA.w #$0195 : BRA .done
|
||||
|
||||
.bombs
|
||||
LDA.l BombsEquipment : AND.w #$00FF : BNE .have
|
||||
LDA.l InfiniteBombs : AND.w #$00FF : BNE .have
|
||||
BRA .dont_have
|
||||
|
||||
.powder
|
||||
LDA.l InventoryTracking : BIT.w #$0010 : BNE .have
|
||||
BRA .dont_have
|
||||
|
||||
.bee
|
||||
LDA.l BottleContentsOne : AND.w #$00FF
|
||||
CMP.w #$0007 : BEQ .have
|
||||
CMP.w #$0008 : BEQ .have
|
||||
LDA.l BottleContentsTwo : AND.w #$00FF
|
||||
CMP.w #$0007 : BEQ .have
|
||||
CMP.w #$0008 : BEQ .have
|
||||
LDA.l BottleContentsThree : AND.w #$00FF
|
||||
CMP.w #$0007 : BEQ .have
|
||||
CMP.w #$0008 : BEQ .have
|
||||
LDA.l BottleContentsFour : AND.w #$00FF
|
||||
CMP.w #$0007 : BEQ .have
|
||||
CMP.w #$0008 : BEQ .have
|
||||
BRA .dont_have
|
||||
|
||||
.done
|
||||
STA.w TextID
|
||||
SEP #$20
|
||||
JSL Sprite_ShowMessageMinimal_Alt
|
||||
BIT.w #$0080 : BNE + ; branch if bow
|
||||
LDA.w #$0192 : BRA ++
|
||||
+
|
||||
BIT.w #$0040 : BEQ + ; branch if no silvers
|
||||
LDA.w #$0195 : BRA ++
|
||||
+
|
||||
BIT.w #$0020 : BNE + ; branch if p bow
|
||||
LDA.w #$0194 : BRA ++
|
||||
+
|
||||
LDA.w #$0193 : BRA ++
|
||||
++
|
||||
STA.w TextID
|
||||
SEP #$20
|
||||
JSL Sprite_ShowMessageMinimal_Alt
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DialogEtherTablet:
|
||||
@@ -412,8 +372,8 @@ RTL
|
||||
|
||||
;---------------------------------------------------------------------------------------------------
|
||||
AgahnimAsksAboutPed:
|
||||
; seems light_speed option to change some aga text is unused for now
|
||||
BRA .vanilla
|
||||
LDA.l GanonVulnerableMode
|
||||
CMP.b #$06 : BNE .vanilla
|
||||
|
||||
LDA.l OverworldEventDataWRAM+$80 ; check ped flag
|
||||
AND.b #$40
|
||||
|
||||
@@ -13,7 +13,6 @@ PHP
|
||||
|
||||
SetDefaultWorld:
|
||||
PHP : SEP #$20
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BEQ .default
|
||||
LDA.l FollowerIndicator : CMP.b #$04 : BNE .default
|
||||
LDA.l OldManRetrievalWorld : BRA +
|
||||
.default
|
||||
|
||||
@@ -45,49 +45,35 @@ DRHUD_BossIndicator:
|
||||
LDA.w CompassField : AND.l DungeonMask, x
|
||||
SEP #$20
|
||||
BEQ .draw_indicator
|
||||
LDA.l CompassBossIndicator, x : CMP.b RoomIndex : BNE .draw_indicator
|
||||
LDY.w #!RedSquare
|
||||
LDA.l CompassBossIndicator, x : CMP.b RoomIndex : BNE .draw_indicator
|
||||
LDY.w #!RedSquare
|
||||
.draw_indicator
|
||||
STY.w HUDMultiIndicator
|
||||
STY.w HUDMultiIndicator
|
||||
BRA DRHUD_DrawCurrentDungeonIndicator
|
||||
|
||||
DRHUD_EnemyDropIndicator:
|
||||
REP #$30
|
||||
LDA.w EnemyDropIndicator : STA.w HUDMultiIndicator
|
||||
SEP #$20
|
||||
LDA.w DungeonID : CMP.b #$1B : BCC + : JMP DRHUD_Finished : +
|
||||
LDA.w DungeonID : CMP.b #$1B : BCS DRHUD_Finished
|
||||
SEP #$10 : TAX : REP #$10
|
||||
|
||||
DRHUD_DrawCurrentDungeonIndicator: ; mX
|
||||
LDA.l DRMode : BIT.b #$02 : BNE + : JMP DRHUD_Finished : +
|
||||
LDY.w #!BlankTile
|
||||
LDA.w CurrentHealth : BEQ .draw_indicator
|
||||
LDA.l DRMode : BIT.b #$02 : BEQ DRHUD_Finished
|
||||
LDY.w #!BlankTile
|
||||
LDA.w CurrentHealth : BEQ .draw_indicator
|
||||
|
||||
LDA.b GameMode
|
||||
CMP.b #$0E : BNE .get_indicator
|
||||
LDA.b GameSubMode
|
||||
CMP.b #$03 : BNE .get_indicator
|
||||
LDA.w SubModuleInterface
|
||||
CMP.b #$06 : BEQ .draw_indicator
|
||||
|
||||
.get_indicator
|
||||
REP #$20 : LDA.l DungeonReminderTable,X : TAY
|
||||
SEP #$20
|
||||
REP #$20 : LDA.l DungeonReminderTable,X : TAY
|
||||
SEP #$20
|
||||
.draw_indicator
|
||||
STY.w HUDCurrentDungeonWorld
|
||||
|
||||
DRHUD_DrawKeyCounter:
|
||||
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
|
||||
LDA.w MapField : AND.l DungeonMask, X : BEQ DRHUD_Finished
|
||||
.skip_map_check
|
||||
TXA : LSR : BNE .dungeon_id
|
||||
INC
|
||||
.dungeon_id
|
||||
TAX
|
||||
LDA.l GenericKeys : LSR : BCS .total_only
|
||||
LDA.l DRFlags : AND.b #$04 : BEQ DRHUD_Finished
|
||||
REP #$20
|
||||
LDA.w MapField : AND.l DungeonMask, X : BEQ DRHUD_Finished
|
||||
TXA : LSR : TAX
|
||||
LDA.l GenericKeys : AND.w #$00FF : BNE .total_only
|
||||
LDA.w DungeonCollectedKeys, X : JSR ConvertToDisplay : STA.w HUDKeysObtained
|
||||
LDA.w #!SlashTile : STA.w HUDKeysSlash
|
||||
.total_only
|
||||
@@ -166,19 +152,16 @@ DrHudDungeonItemsAdditions:
|
||||
jsr ConvertToDisplay2 : sta.w $1644, y
|
||||
+ iny #2 : lda.w #$24f5 : sta.w $1644, y
|
||||
phx : ldx.b Scrap00
|
||||
LDA.l CompassMode : BIT.w #$0002 : BNE .skip_map_check
|
||||
LDA.l MapField : AND.l DungeonMask, x : BEQ .key_info_done ; must have map
|
||||
.skip_map_check
|
||||
plx : sep #$30 : lda.l ChestKeys, x : sta.b Scrap02
|
||||
lda.l GenericKeys : bne +++
|
||||
lda.b Scrap02 : !SUB.l DungeonCollectedKeys, x : sta.b Scrap02
|
||||
+++ lda.b Scrap02
|
||||
rep #$30
|
||||
jsr ConvertToDisplay2 : sta.w $1644, y ; small key totals
|
||||
bra .skipStack
|
||||
.key_info_done
|
||||
plx
|
||||
.skipStack iny #2
|
||||
lda.l MapField : and.l DungeonMask, x : beq + ; must have map
|
||||
plx : sep #$30 : lda.l ChestKeys, x : sta.b Scrap02
|
||||
lda.l GenericKeys : bne +++
|
||||
lda.b Scrap02 : !SUB.l DungeonCollectedKeys, x : sta.b Scrap02
|
||||
+++ lda.b Scrap02
|
||||
rep #$30
|
||||
jsr ConvertToDisplay2 : sta.w $1644, y ; small key totals
|
||||
bra .skipStack
|
||||
+ plx
|
||||
.skipStack iny #2
|
||||
cpx.w #$000d : beq +
|
||||
lda.w #$24f5 : sta.w $1644, y
|
||||
+
|
||||
@@ -186,26 +169,23 @@ DrHudDungeonItemsAdditions:
|
||||
+ inx #2 : cpx.w #$001b : bcs ++ : JMP -
|
||||
++
|
||||
lda.l HudFlag : and.w #$0020 : bne + : JMP ++ : +
|
||||
; map symbols
|
||||
lda.w #$2821 : sta.w $1606 : sta.w $1610 : sta.w $161a
|
||||
; compass symbols
|
||||
lda.w #$2c20 : sta.w $160a : sta.w $1614 : sta.w $161e : sta.w $16e4
|
||||
; map symbols (do I want these) ; note compass symbol is 2c20
|
||||
lda.w #$2821 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624
|
||||
; blank out a couple thing from old hud
|
||||
lda.w #$24f5 : sta.w $1624 : sta.w $1724
|
||||
lda.w #$24f5 : sta.w $16e4 : sta.w $1724
|
||||
sta.w $160a : sta.w $1614 : sta.w $161e ; blank out sm key indicators
|
||||
ldx.w #$0002
|
||||
- lda.w #$0000 ; start of hud area
|
||||
!ADD.l RowOffsets, x : !ADD.l ColumnOffsets, x : tay
|
||||
lda.l DungeonReminderTable, x : sta.w $1644, y
|
||||
iny #2
|
||||
lda.w #$24f5 : sta.w $1644, y ; blank out map spot
|
||||
lda.l MapField : ora.l MapCountDisplay : ora.l MapOverlay
|
||||
and.l DungeonMask, x : beq + ; must have map
|
||||
lda.l MapField : and.l DungeonMask, x : beq + ; must have map
|
||||
JSR MapIndicatorShort : STA.w $1644, Y
|
||||
+ iny #2
|
||||
cpx.w #$001a : bne +
|
||||
tya : !ADD.w #$003c : tay
|
||||
+ lda.l CompassField : ora.l CompassCountDisplay
|
||||
and.l DungeonMask, x : beq + ; must have compass
|
||||
+ lda.l CompassField : and.l DungeonMask, x : beq + ; must have compass
|
||||
phx ; total chest counts
|
||||
LDA.l CompassTotalsWRAM, x : !SUB.l DungeonLocationsChecked, x
|
||||
SEP #$30 : JSR HudHexToDec2DigitCopy : REP #$30
|
||||
@@ -261,36 +241,18 @@ BkStatus:
|
||||
|
||||
ConvertToDisplay:
|
||||
and.w #$00ff : cmp.w #$000a : !BLT +
|
||||
!ADD.w #$2519 : rts
|
||||
!ADD.w #$2553 : rts
|
||||
+ !ADD.w #$2490 : 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 #$2553 : 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
|
||||
|
||||
; This function apporach doesn't currently work
|
||||
CountAbsorbedKeysViaCountAllKey:
|
||||
PHA : PHX
|
||||
LDA.l StandingItemsOn : BEQ .count_it
|
||||
; LDA.w SpawnedItemKeyCounted : BNE .done ; this was added because pot keys were being double counted when they weren't shuffled
|
||||
CPY.b #$24 : BEQ .count_it ; small key for this dungeon
|
||||
LDA.w DungeonID : LSR : TAX
|
||||
TYA : CMP.l KeyTable, X : BNE .done
|
||||
.count_it
|
||||
STY.b Scrap02 : LDY.b #$24 ; for non-24 items (w/o standing_items a small key is just $C), fake it
|
||||
LDX.b #$84 ; pretend this isn't a smallkey, but an absorbed object (small heart)
|
||||
REP #$10 : JSL CountAllKey : SEP #$10
|
||||
LDY.b Scrap02
|
||||
.done
|
||||
; STZ.w SpawnedItemKeyCounted ; reset to zero for next time
|
||||
PLX : PLA
|
||||
JML IncrementSmallKeysNoPrimary
|
||||
JML IncrementSmallKeysNoPrimary
|
||||
|
||||
;================================================================================
|
||||
; 8-bit registers
|
||||
|
||||
@@ -11,7 +11,6 @@ rtl
|
||||
|
||||
OnFileLoadOverride:
|
||||
jsl OnFileLoad ; what I wrote over
|
||||
jsl StartingFollower
|
||||
+ lda.l DRFlags : and.b #$02 : beq + ; Mirror Scroll
|
||||
lda.l MirrorEquipment : bne +
|
||||
lda.b #$01 : sta.l MirrorEquipment
|
||||
@@ -53,9 +52,8 @@ GuruguruFix:
|
||||
|
||||
BlindAtticFix:
|
||||
lda.l DRMode : beq +
|
||||
- lda.b #$01 : rtl
|
||||
+ lda.l FollowerTravelAllowed : cmp.b #$02 : beq -
|
||||
lda.l FollowerIndicator : cmp.b #$06
|
||||
lda.b #$01 : rtl
|
||||
+ lda.l FollowerIndicator : cmp.b #$06
|
||||
rtl
|
||||
|
||||
SuctionOverworldFix:
|
||||
@@ -121,6 +119,12 @@ BlindsAtticHint:
|
||||
SEP #$20 : RTL ; skip the dialog box if the hole is already open
|
||||
+ SEP #$20 : JML Main_ShowTextMessage
|
||||
|
||||
BlindZeldaDespawnFix:
|
||||
CMP.b #06 : BEQ +
|
||||
LDA.w SpritePosYLow,X : BEQ + ; don't despawn follower if maiden isn't "present"
|
||||
PLA : PLA : PEA.w SpritePrep_BlindMaiden_despawn_follower-1 : RTL
|
||||
+ PLA : PLA : PEA.w SpritePrep_BlindMaiden_kill_the_girl-1 : RTL
|
||||
|
||||
BigKeyDoorCheck:
|
||||
CPY.w #$001E : BNE + ; skip if it isn't a BK door
|
||||
LDA.l DRFlags : AND.w #$0400 : BNE + ; skip if the flag is set - bk doors can be double-sided
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
; we want the icons indicating what is left in a room to blink
|
||||
; but we don't want to redraw to BG1 every few frames
|
||||
; so we duplicate the left side of BG1 to a lower portion and just toggle vertical scroll
|
||||
|
||||
BlinkLoot:
|
||||
; do not show icons if we're scrolling
|
||||
LDA.w $0210
|
||||
BNE .hide
|
||||
|
||||
LDA.b FrameCounter
|
||||
AND.b #$20
|
||||
BEQ .show
|
||||
.hide
|
||||
LDA.b #$01
|
||||
.show
|
||||
STZ.b $E6
|
||||
STA.w $E7
|
||||
JSL $8AE96B
|
||||
RTL
|
||||
|
||||
StartDoubleWrite:
|
||||
; what we wrote over
|
||||
LDA.l DRMode
|
||||
BEQ .draw
|
||||
LDA.l DungeonMapMode
|
||||
BNE .draw
|
||||
|
||||
INC.w $020D ; next subsubmode
|
||||
PLA : PLA : PLA ; pull our jump to here off the stack
|
||||
PLB
|
||||
RTL
|
||||
|
||||
.draw
|
||||
REP #$30
|
||||
STZ.w GFXStripes
|
||||
|
||||
STZ.w $021B
|
||||
RTL
|
||||
|
||||
CheckDoubleWrite:
|
||||
LDA.w $021C
|
||||
BNE .done
|
||||
|
||||
LDA.b #$08
|
||||
STA.w $021C
|
||||
REP #$30
|
||||
JML $8AE20B
|
||||
|
||||
.done
|
||||
; what we wrote over
|
||||
REP #$10
|
||||
LDY.w GFXStripes
|
||||
LDA.b #$FF
|
||||
JML $8AE2E7
|
||||
|
||||
DrawMountain:
|
||||
LDX.w GFXStripes
|
||||
PHX
|
||||
LDY.w #$0000
|
||||
.next_word
|
||||
LDA.w $8AEFEF, Y
|
||||
STA.w GFXStripes+2, X
|
||||
INX : INX
|
||||
INY : INY
|
||||
CPY.w #$002A
|
||||
BCC .next_word
|
||||
|
||||
PLY
|
||||
LDA.w $021B
|
||||
BEQ .done
|
||||
|
||||
; if second copy of mountain, adjust VRAM addresses
|
||||
SEP #$20
|
||||
LDA.w GFXStripes+$02, Y
|
||||
ORA.w $021C
|
||||
STA.w GFXStripes+$02, Y
|
||||
|
||||
LDA.w GFXStripes+$08, Y
|
||||
ORA.w $021C
|
||||
STA.w GFXStripes+$08, Y
|
||||
|
||||
LDA.w GFXStripes+$10, Y
|
||||
ORA.w $021C
|
||||
STA.w GFXStripes+$10, Y
|
||||
|
||||
LDA.w GFXStripes+$20, Y
|
||||
ORA.w $021C
|
||||
STA.w GFXStripes+$20, Y
|
||||
|
||||
LDA.w GFXStripes+$26, Y
|
||||
ORA.w $021C
|
||||
STA.w GFXStripes+$26, Y
|
||||
REP #$20
|
||||
|
||||
.done
|
||||
RTL
|
||||
|
||||
WriteBigEndianAddressX:
|
||||
ORA.w $021B
|
||||
XBA
|
||||
STA.w GFXStripes+2, X
|
||||
AND.w #$FFF7
|
||||
RTL
|
||||
|
||||
WriteBigEndianAddressY:
|
||||
ORA.w $021B
|
||||
XBA
|
||||
STA.w GFXStripes+2, Y
|
||||
AND.w #$FFF7
|
||||
RTL
|
||||
@@ -1,633 +0,0 @@
|
||||
; A = room_id
|
||||
; out A = level of loot
|
||||
CheckLoot:
|
||||
PHP
|
||||
REP #$30
|
||||
PHB : PHX : PHY
|
||||
|
||||
STA.b $CA
|
||||
|
||||
LDA.b $06 : PHA
|
||||
LDA.b $0E : PHA
|
||||
|
||||
STZ.b $02 ; best item class found
|
||||
|
||||
LDA.l ShowItems_default
|
||||
AND.w #$00FF
|
||||
STA.b $0E
|
||||
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
|
||||
LDA.l SaveDataWRAM, X
|
||||
AND.w #$000F
|
||||
BEQ +
|
||||
LDA.l ShowItems_visited_tile
|
||||
AND.w #$00FF
|
||||
CMP.b $0E
|
||||
BCC +
|
||||
STA.b $0E
|
||||
|
||||
+ LDA.w DungeonID
|
||||
TAX
|
||||
|
||||
LDA.l MapField
|
||||
AND.l DungeonMask, X
|
||||
BEQ +
|
||||
LDA.l ShowItems_have_map
|
||||
AND.w #$00FF
|
||||
CMP.b $0E
|
||||
BCC +
|
||||
STA.b $0E
|
||||
|
||||
+ LDA.l CompassField
|
||||
AND.l DungeonMask, X
|
||||
BEQ +
|
||||
LDA.l ShowItems_have_compass
|
||||
AND.w #$00FF
|
||||
CMP.b $0E
|
||||
BCC +
|
||||
STA.b $0E
|
||||
+
|
||||
|
||||
LDA.l ItemSources : BIT.w #$0001 : BEQ +
|
||||
JSR CheckChests
|
||||
+
|
||||
|
||||
LDA.l ItemSources : BIT.w #$0002 : BEQ +
|
||||
JSR CheckPots
|
||||
+
|
||||
|
||||
LDA.l ItemSources : BIT.w #$0004 : BEQ +
|
||||
JSR CheckEnemies
|
||||
+
|
||||
|
||||
LDA.l ItemSources : BIT.w #$0008 : BEQ +
|
||||
JSR CheckBoss
|
||||
+
|
||||
|
||||
LDA.l ItemSources : BIT.w #$0010 : BEQ +
|
||||
JSR CheckPrize
|
||||
+
|
||||
|
||||
.done
|
||||
PLA : STA.b $0E
|
||||
PLA : STA.b $06
|
||||
PLY : PLX : PLB
|
||||
PLP
|
||||
LDA.b $02
|
||||
RTL
|
||||
|
||||
CheckChests:
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
STA.b $00
|
||||
ASL A
|
||||
TAX
|
||||
|
||||
LDA.w #($81<<8)
|
||||
PHA
|
||||
PLB : PLB
|
||||
|
||||
LDA.w #$0008
|
||||
STA.b $04
|
||||
STZ.b $06
|
||||
|
||||
LDY.w #$FFFD
|
||||
.increment_mask
|
||||
LDA.b $04
|
||||
ASL A
|
||||
STA.b $04
|
||||
.next_chest
|
||||
INY #3
|
||||
CPY.w #$01F8
|
||||
BCS .done
|
||||
|
||||
LDA.w RoomData_ChestItems, Y
|
||||
AND.w #$7FFF
|
||||
CMP.b $00
|
||||
BNE .next_chest
|
||||
|
||||
LDA.b $06
|
||||
JSR CheckChestSection
|
||||
INC.b $06
|
||||
BCC .increment_mask
|
||||
|
||||
LDA.l SaveDataWRAM, X
|
||||
AND.b $04
|
||||
BNE .increment_mask ; already got item
|
||||
|
||||
LDA.w RoomData_ChestItems+2, Y
|
||||
AND.w #$00FF
|
||||
JSR GetLootClass
|
||||
BRA .increment_mask
|
||||
|
||||
.done
|
||||
RTS
|
||||
|
||||
CheckBoss:
|
||||
; we assume all bosses are in section 1 of split sections
|
||||
; mainly to simplify hera cage key and GT torch
|
||||
; which use the same flow
|
||||
; and bosses are always in their own section anyway
|
||||
LDA.b $CA
|
||||
AND.w #$F000
|
||||
XBA
|
||||
CMP.w #$0020
|
||||
BCC +
|
||||
RTS
|
||||
|
||||
+
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
STA.b $04
|
||||
|
||||
LDX.w #$FFFA
|
||||
.next_boss
|
||||
INX #6
|
||||
LDA.l MiscLocations, X
|
||||
BPL .check
|
||||
RTS
|
||||
|
||||
.check
|
||||
CMP.b $04
|
||||
BNE .next_boss
|
||||
|
||||
TXY
|
||||
CMP.b RoomIndex
|
||||
BEQ .current_room
|
||||
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l SaveDataWRAM, X
|
||||
BRA .continue
|
||||
|
||||
.current_room
|
||||
LDA.w RoomItemsTaken ; if checking our current room, $0403 has fresher flags
|
||||
ASL #4
|
||||
|
||||
.continue
|
||||
STA.b $04
|
||||
|
||||
TYX
|
||||
LDA.l MiscLocations+2, X ; get bit of room data to check
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l DungeonMask, X
|
||||
|
||||
TYX
|
||||
BIT.b $04
|
||||
BNE .next_boss ; continue checking if we already got the item
|
||||
|
||||
LDA.l MiscLocations+4, X
|
||||
STA.b $05
|
||||
|
||||
LDA.l MiscLocations+3, X
|
||||
STA.b $04
|
||||
|
||||
LDA.b [$04]
|
||||
AND.w #$00FF
|
||||
JSR GetLootClass
|
||||
|
||||
BRA .next_boss
|
||||
|
||||
CheckPrize:
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
STA.b $04
|
||||
|
||||
LDX.w #$FFFD
|
||||
.next_prize
|
||||
INX #3
|
||||
LDA.l PrizeLocations, X
|
||||
BPL .check
|
||||
RTS
|
||||
|
||||
.check
|
||||
CMP.b $04
|
||||
BNE .next_prize
|
||||
|
||||
TXY
|
||||
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l SaveDataWRAM, X
|
||||
TYX
|
||||
BIT.w #$0800
|
||||
BNE .next_prize
|
||||
|
||||
LDA.l PrizeLocations+2, X ; get which prize to look at
|
||||
AND.w #$00FF
|
||||
TAX
|
||||
LDA.l DungeonPrizeReceiptID, X
|
||||
TYX
|
||||
|
||||
AND.w #$00FF
|
||||
JSR GetLootClass
|
||||
|
||||
BRA .next_prize
|
||||
|
||||
CheckPots:
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
|
||||
LDA.l UWPotsPointers, X
|
||||
STA.b $04
|
||||
LDA.w #bank(UWPotsData)
|
||||
STA.b $06
|
||||
|
||||
LDY.w #$0000
|
||||
LDX.w #$FFFF
|
||||
.next_pot
|
||||
LDA.b [$04], Y
|
||||
CMP.w #$FFFF : BEQ .done
|
||||
INX : INY : INY
|
||||
BIT.w #$8000 : BNE .major_item ; marked as major item
|
||||
LDA.b [$04], Y
|
||||
AND.w #$00FF
|
||||
CMP.w #$0008 : BEQ .small_key
|
||||
LDA.l PotCountMode
|
||||
BEQ +
|
||||
JSR CheckJunkPot
|
||||
+
|
||||
INY
|
||||
BRA .next_pot
|
||||
|
||||
.small_key
|
||||
LDA.w #$8000 : STA.b $08
|
||||
LDA.w #$0024
|
||||
PHA
|
||||
PHX
|
||||
INY
|
||||
BRA .mask_set
|
||||
|
||||
.major_item
|
||||
LDA.b [$04], Y
|
||||
PHA
|
||||
PHX
|
||||
INY
|
||||
TXA : ASL A
|
||||
TAX
|
||||
LDA.l DungeonMask, X : STA.b $08
|
||||
TXA : LSR A : TAX
|
||||
|
||||
.mask_set
|
||||
TXA
|
||||
JSR CheckPotSection
|
||||
BCS +
|
||||
PLX
|
||||
PLA
|
||||
BRA .next_pot
|
||||
+
|
||||
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
if !FEATURE_FIX_BASEROM
|
||||
LDA.l SpriteDropData, X
|
||||
else
|
||||
LDA.l RoomPotData, X
|
||||
endif
|
||||
PLX
|
||||
AND.b $08
|
||||
BEQ .not_obtained
|
||||
PLA
|
||||
BRA .next_pot
|
||||
|
||||
.not_obtained
|
||||
PLA
|
||||
AND.w #$00FF
|
||||
JSR GetLootClass
|
||||
BRA .next_pot
|
||||
|
||||
.done
|
||||
RTS
|
||||
|
||||
CheckJunkPot:
|
||||
LDA.b [$04], Y
|
||||
PHA
|
||||
PHX
|
||||
TXA : ASL A : TAX
|
||||
LDA.l DungeonMask, X : STA.b $08
|
||||
TXA : LSR A
|
||||
JSR CheckPotSection
|
||||
BCS +
|
||||
PLX
|
||||
PLA
|
||||
RTS
|
||||
+
|
||||
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l PotCollectionRateTable, X
|
||||
AND.b $08
|
||||
BEQ .not_important
|
||||
|
||||
if !FEATURE_FIX_BASEROM
|
||||
LDA.l SpriteDropData, X
|
||||
else
|
||||
LDA.l RoomPotData, X
|
||||
endif
|
||||
AND.b $08
|
||||
BNE .not_important
|
||||
|
||||
PLX
|
||||
PLA
|
||||
AND.w #$00FF
|
||||
JSR GetPotJunkClass
|
||||
RTS
|
||||
|
||||
.not_important
|
||||
PLX
|
||||
PLA
|
||||
RTS
|
||||
|
||||
CheckEnemies:
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
|
||||
LDA.l UWSpritesPointers, X
|
||||
INC A ; skip the layered/unlayered indicator
|
||||
STA.b $04
|
||||
LDA.w #bank(UWSpritesData)
|
||||
STA.b $06
|
||||
|
||||
LDY.w #$0000
|
||||
LDX.w #$FFFF
|
||||
.next_enemy
|
||||
LDA.b [$04], Y
|
||||
AND.w #$00FF
|
||||
CMP.w #$00FF
|
||||
BNE +
|
||||
JMP .done
|
||||
+
|
||||
LDA.b [$04], Y
|
||||
AND.w #$E000
|
||||
CMP.w #$E000
|
||||
BEQ .overlord
|
||||
INY : INY
|
||||
LDA.b [$04], Y
|
||||
AND.w #$00FF
|
||||
CMP.w #$00F8 : BEQ .major ; major item
|
||||
CMP.w #$00F9 : BEQ .major ; major item in other world
|
||||
CMP.w #$00E4 : BEQ .vanilla_key
|
||||
INY
|
||||
INX
|
||||
BRA .next_enemy
|
||||
|
||||
.overlord
|
||||
INY : INY : INY
|
||||
BRA .next_enemy
|
||||
|
||||
.vanilla_key
|
||||
DEY : DEY
|
||||
LDA.w #$8000 : STA.b $08
|
||||
LDA.b [$04], Y
|
||||
INY #3
|
||||
AND.w #$00FF
|
||||
CMP.w #$00FD ; big key
|
||||
BEQ .big_key
|
||||
CMP.w #$00FE ; small key
|
||||
BEQ .small_key
|
||||
; false alarm -- probably hera basement key
|
||||
INX ; since it's an actual sprite it advances the counter
|
||||
BRA .next_enemy
|
||||
.small_key
|
||||
LDA.w #$0024
|
||||
PHA : PHX
|
||||
BRA .mask_set
|
||||
.big_key
|
||||
LDA.w #$0032
|
||||
PHA : PHX
|
||||
BRA .mask_set
|
||||
|
||||
.major
|
||||
DEY : DEY
|
||||
LDA.b [$04], Y
|
||||
AND.w #$00FF
|
||||
|
||||
.proceed
|
||||
INY : INY : INY
|
||||
|
||||
PHA
|
||||
PHX
|
||||
TXA : ASL A
|
||||
TAX
|
||||
LDA.l DungeonMask, X : STA.b $08
|
||||
TXA : LSR A : TAX
|
||||
|
||||
.mask_set
|
||||
TXA
|
||||
JSR CheckEnemySection
|
||||
BCS +
|
||||
PLX
|
||||
PLA
|
||||
JMP .next_enemy
|
||||
+
|
||||
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
|
||||
LDA.l SpriteDropData, X
|
||||
PLX
|
||||
AND.b $08
|
||||
BEQ .not_obtained
|
||||
PLA
|
||||
JMP .next_enemy
|
||||
|
||||
.not_obtained
|
||||
PLA
|
||||
AND.w #$00FF
|
||||
JSR GetLootClass
|
||||
JMP .next_enemy
|
||||
|
||||
.done
|
||||
RTS
|
||||
|
||||
; A = item id
|
||||
; updates "best loot" value if better
|
||||
GetLootClass:
|
||||
PHX
|
||||
TAX
|
||||
CMP.w #$0025 : BEQ .compass
|
||||
AND.w #$00F0
|
||||
CMP.w #$0080 : BNE .not_compass
|
||||
|
||||
.compass
|
||||
LDA.l AlwaysShowCompass : BNE .check_value
|
||||
|
||||
.not_compass
|
||||
LDA.b $0E
|
||||
BEQ .done
|
||||
CMP.w #$0001
|
||||
BEQ .value_set
|
||||
|
||||
.check_value
|
||||
LDA.l LootTypeMapping, X
|
||||
AND.w #$00FF
|
||||
|
||||
.value_set
|
||||
CMP.b $02
|
||||
BCC .done
|
||||
STA.b $02
|
||||
|
||||
.done
|
||||
PLX
|
||||
RTS
|
||||
|
||||
; A = item id
|
||||
; updates "best loot" value if better
|
||||
GetPotJunkClass:
|
||||
PHX
|
||||
TAX
|
||||
|
||||
LDA.b $0E
|
||||
BEQ .done
|
||||
CMP.w #$0001
|
||||
BEQ .value_set
|
||||
|
||||
; hardcode as junk for now
|
||||
LDA.w #$0002
|
||||
|
||||
.value_set
|
||||
CMP.b $02
|
||||
BCC .done
|
||||
STA.b $02
|
||||
|
||||
.done
|
||||
PLX
|
||||
RTS
|
||||
|
||||
macro DefineGetFooSection(type, offset)
|
||||
Get<type>Section:
|
||||
PHX
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l SplitRooms, X
|
||||
TAX
|
||||
|
||||
LDA.l SplitRooms, X
|
||||
AND.w #$00FF
|
||||
STA.b $CE
|
||||
BEQ .found
|
||||
|
||||
INX
|
||||
.check_next_section
|
||||
PHX
|
||||
LDA.l SplitRooms+<offset>, X
|
||||
TAX
|
||||
-
|
||||
LDA.l SplitRooms, X
|
||||
AND.w #$00FF
|
||||
CMP.w #$00FF
|
||||
BEQ .not_this_section
|
||||
CMP.b $CC
|
||||
BEQ .plx_found
|
||||
|
||||
INX
|
||||
BRA -
|
||||
|
||||
.not_this_section
|
||||
PLX
|
||||
TXA : CLC : ADC.w #$000D : TAX
|
||||
DEC.b $CE
|
||||
BNE .check_next_section
|
||||
BRA .found
|
||||
|
||||
.plx_found
|
||||
PLX
|
||||
|
||||
.found
|
||||
PLX
|
||||
LDA.b $CE
|
||||
RTS
|
||||
endmacro
|
||||
|
||||
macro DefineCheckFooSection(type)
|
||||
Check<type>Section:
|
||||
STA.b $CC
|
||||
|
||||
LDA.b $CB
|
||||
AND.w #$00FF
|
||||
BEQ .yes
|
||||
|
||||
JSR Get<type>Section
|
||||
|
||||
LDA.b $CB
|
||||
AND.w #$00FF
|
||||
LSR A : LSR A : LSR A : LSR A
|
||||
DEC A
|
||||
CMP.b $CE
|
||||
BEQ .yes
|
||||
|
||||
.no
|
||||
CLC
|
||||
RTS
|
||||
|
||||
.yes
|
||||
SEC
|
||||
RTS
|
||||
endmacro
|
||||
|
||||
%DefineGetFooSection(Door, 3)
|
||||
%DefineGetFooSection(Stair, 5)
|
||||
%DefineGetFooSection(Chest, 7)
|
||||
%DefineGetFooSection(Pot, 9)
|
||||
%DefineGetFooSection(Enemy, 11)
|
||||
|
||||
%DefineCheckFooSection(Door)
|
||||
%DefineCheckFooSection(Stair)
|
||||
%DefineCheckFooSection(Chest)
|
||||
%DefineCheckFooSection(Pot)
|
||||
%DefineCheckFooSection(Enemy)
|
||||
|
||||
GetIncomingStairSection:
|
||||
PHX
|
||||
AND.w #$0300
|
||||
XBA
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l $8098D8, X
|
||||
STA.b $CC
|
||||
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l SplitRooms, X
|
||||
TAX
|
||||
|
||||
LDA.l SplitRooms, X
|
||||
AND.w #$00FF
|
||||
STA.b $CE
|
||||
BEQ .found
|
||||
|
||||
INX
|
||||
.check_next_section
|
||||
LDA.l SplitRooms+0, X
|
||||
AND.w #$00FF
|
||||
AND.b $CC
|
||||
BNE .found
|
||||
TXA : CLC : ADC.w #$000D : TAX
|
||||
DEC.b $CE
|
||||
BNE .check_next_section
|
||||
BRA .found
|
||||
|
||||
.found
|
||||
PLX
|
||||
LDA.b $CE
|
||||
RTS
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,39 +0,0 @@
|
||||
File.open("supertile_shapes.asm", "r") do |file|
|
||||
bytes = []
|
||||
while line = file.gets
|
||||
m = line.match(/dw \$(\h+), \$(\h+), \$(\h+), \$(\h+)/)
|
||||
bytes += m.captures if m
|
||||
break if bytes.length >= 4 * 0xE0
|
||||
end
|
||||
|
||||
counts = []
|
||||
for byte in bytes do
|
||||
value = byte.to_i(16)
|
||||
next if value == 0xFFFF
|
||||
value = (value & 0x03FF) - 0x340
|
||||
if not counts[value]
|
||||
counts[value] = 0
|
||||
end
|
||||
counts[value] += 1
|
||||
end
|
||||
|
||||
print(" ")
|
||||
for col in 0...16
|
||||
printf(" x%X", col)
|
||||
end
|
||||
puts
|
||||
|
||||
for row in 0...0xC
|
||||
printf("%Xx", row + 4)
|
||||
for col in 0...16
|
||||
printf("%4d", counts[row * 16 + col] || 0)
|
||||
end
|
||||
puts
|
||||
end
|
||||
|
||||
printf("Unused:")
|
||||
for i in 0...0x80
|
||||
printf(" %2X", i) unless counts[i]
|
||||
end
|
||||
puts
|
||||
end
|
||||
@@ -1,43 +0,0 @@
|
||||
DoorConnectionTiles:
|
||||
.vertical
|
||||
dw $0000, $0000 ; $00
|
||||
dw $01C0, $0000 ; $01 left -> left
|
||||
dw $01D0, $01D1 ; $02 left -> middle
|
||||
dw $81C3, $41C3 ; $03 left -> right
|
||||
dw $81D0, $81D1 ; $04 middle -> left
|
||||
dw $01C1, $41C1 ; $05 middle -> middle
|
||||
dw $C1D1, $C1D0 ; $06 middle -> right
|
||||
dw $01C3, $C1C3 ; $07 right -> left
|
||||
dw $41D1, $41D0 ; $08 right -> middle
|
||||
dw $0000, $01C0 ; $09 right -> right
|
||||
dw $41C2, $41C1 ; $0A left-middle -> left-middle
|
||||
dw $81D2, $C1D0 ; $0B left-middle -> left-right
|
||||
dw $41D3, $81D3 ; $0C left-middle -> middle-right
|
||||
dw $01D2, $41D0 ; $0D left-right -> left-middle
|
||||
dw $01C0, $01C0 ; $0E left-right -> left-right
|
||||
dw $01D0, $41D2 ; $0F left-right -> middle-right
|
||||
dw $C1D3, $01D3 ; $10 middle-right -> left-middle
|
||||
dw $81D0, $C1D2 ; $11 middle-right -> left-right
|
||||
dw $01C1, $01C2 ; $12 middle-right -> middle-right
|
||||
dw $41C2, $01C2 ; $13 triple -> triple
|
||||
.horizontal
|
||||
dw $0300, $0300 ; $00
|
||||
dw $01C4, $0300 ; $01 top -> top
|
||||
dw $C1D4, $C1D5 ; $02 top -> middle
|
||||
dw $81C7, $41C7 ; $03 top -> bottom
|
||||
dw $81D4, $81D5 ; $04 middle -> top
|
||||
dw $01C5, $81C5 ; $05 middle -> middle
|
||||
dw $01D5, $01D4 ; $06 middle -> bottom
|
||||
dw $C1C7, $01C7 ; $07 bottom -> top
|
||||
dw $41D5, $41D4 ; $08 bottom -> middle
|
||||
dw $0300, $01C4 ; $09 bottom -> bottom
|
||||
dw $41C6, $41C5 ; $0A top-middle -> top-middle
|
||||
dw $41D6, $01D4 ; $0B top-middle -> top-bottom
|
||||
dw $41D7, $81D7 ; $0C top-middle -> middle-bottom
|
||||
dw $01D6, $41D4 ; $0D top-bottom -> top-middle
|
||||
dw $01C4, $01C4 ; $0E top-bottom -> top-bottom
|
||||
dw $C1D4, $81D6 ; $0F top-bottom -> middle-bottom
|
||||
dw $C1D7, $01D7 ; $10 middle-bottom -> top-middle
|
||||
dw $81D4, $C1D6 ; $11 middle-bottom -> top-bottom
|
||||
dw $01C5, $01C6 ; $12 middle-bottom -> middle-bottom
|
||||
dw $81C6, $01C6 ; $13 triple -> triple
|
||||
@@ -1,309 +0,0 @@
|
||||
DoorSlotsSprites:
|
||||
; center
|
||||
dw $48A8
|
||||
; north
|
||||
dw $2090, $20A8, $20C0
|
||||
dw $2098, $20B8
|
||||
; west
|
||||
dw $3080, $4880, $6080
|
||||
dw $3880, $5880
|
||||
; south
|
||||
dw $7090, $70A8, $70C0
|
||||
dw $7098, $70B8
|
||||
; east
|
||||
dw $30D0, $48D0, $60D0
|
||||
dw $38D0, $58D0
|
||||
; stairs
|
||||
dw $B080, $B098, $B0B0
|
||||
; drop/warp
|
||||
dw $B0D0
|
||||
|
||||
DoorSlotsBG1:
|
||||
; center
|
||||
dw $1135
|
||||
; north
|
||||
dw $1092, $1095, $1098
|
||||
dw $1093, $1097
|
||||
; west
|
||||
dw $10D0, $1130, $1190
|
||||
dw $10F0, $1170
|
||||
; south
|
||||
dw $11D2, $11D5, $11D8
|
||||
dw $11D3, $11D7
|
||||
; east
|
||||
dw $10DA, $113A, $119A
|
||||
dw $10FA, $117A
|
||||
; stairs
|
||||
dw $12D0, $12D3, $12D6
|
||||
; drop/warp
|
||||
dw $12DA
|
||||
|
||||
DoorSlotsBG2:
|
||||
; center
|
||||
dw $0000
|
||||
; north
|
||||
dw $FEBA, $FEC0, $FEC6
|
||||
dw $FEBC, $FEC4
|
||||
; west
|
||||
dw $FF36, $FFF6, $00B6
|
||||
dw $FF76, $0076
|
||||
; south
|
||||
dw $013A, $0140, $0146
|
||||
dw $013C, $0144
|
||||
; east
|
||||
dw $FF4A, $000A, $00CA
|
||||
dw $FF8A, $008A
|
||||
; stairs
|
||||
dw $0336, $033C, $0342
|
||||
; drop/warp
|
||||
dw $034A
|
||||
|
||||
DoorSlotSides:
|
||||
db $02, $0C, $16, $20
|
||||
|
||||
DoorSlotOffsets:
|
||||
db $02, $02, $06, $00
|
||||
|
||||
; up, left, down, right
|
||||
NextCursorSlot:
|
||||
db $80, $81, $82, $83
|
||||
; top
|
||||
db $FF, $C1, $00, $04
|
||||
db $FF, $04, $00, $05
|
||||
db $FF, $05, $00, $C3
|
||||
db $FF, $01, $00, $02
|
||||
db $FF, $02, $00, $03
|
||||
; left
|
||||
db $C0, $FF, $09, $00
|
||||
db $09, $FF, $0A, $00
|
||||
db $0A, $FF, $C2, $00
|
||||
db $06, $FF, $07, $00
|
||||
db $07, $FF, $08, $00
|
||||
; bottom
|
||||
db $00, $E1, $85, $0E
|
||||
db $00, $0E, $85, $0F
|
||||
db $00, $0F, $85, $E3
|
||||
db $00, $0B, $85, $0C
|
||||
db $00, $0C, $85, $0D
|
||||
; right
|
||||
db $E0, $00, $13, $FF
|
||||
db $13, $00, $14, $FF
|
||||
db $14, $00, $E2, $FF
|
||||
db $10, $00, $11, $FF
|
||||
db $11, $00, $12, $FF
|
||||
; stairs
|
||||
db $84, $18, $FF, $16
|
||||
db $84, $15, $FF, $17
|
||||
db $84, $16, $FF, $18
|
||||
; drop/warp
|
||||
db $84, $17, $FF, $15
|
||||
|
||||
NextCursorSpecial:
|
||||
.center
|
||||
db $02, $04, $05, $01, $03, $FF
|
||||
db $07, $09, $0A, $06, $08, $FF
|
||||
db $0C, $0E, $0F, $0B, $0D, $15, $16, $17, $18, $FF
|
||||
db $11, $13, $14, $10, $12, $FF
|
||||
db $0C, $0E, $0F, $0B, $0D, $00, $FF
|
||||
db $17, $16, $15, $18, $FF
|
||||
.center_offset
|
||||
db $00, $06, $0C, $16, $1C, $23
|
||||
.start_index
|
||||
db $01, $06, $0B, $10, $15
|
||||
.start_direction
|
||||
db $03, $02, $03, $02, $03
|
||||
.end_index
|
||||
db $03, $08, $0D, $12, $18
|
||||
.end_direction
|
||||
db $01, $00, $01, $00, $01
|
||||
|
||||
SingleEdgeCurrentRoomConnectors:
|
||||
.north
|
||||
dw $01C0, $0300, $01C0, $0300, $01C0, $0300 ; left -> left
|
||||
dw $01C1, $41C1, $81D0, $81D1, $01C0, $0300 ; left -> middle
|
||||
dw $41D1, $41D0, $01C1, $41C1, $81D0, $81D1 ; left -> right
|
||||
dw $01C0, $0300, $01D0, $01D1, $01C1, $41C1 ; middle -> left
|
||||
dw $01C1, $41C1, $01C1, $41C1, $01C1, $41C1 ; middle -> middle
|
||||
dw $0300, $01C0, $41D1, $41D0, $01C1, $41C1 ; middle -> right
|
||||
dw $01D0, $01D1, $01C1, $41C1, $C1D1, $C1D0 ; right -> left
|
||||
dw $01C1, $41C1, $C1D1, $C1D0, $0300, $01C0 ; right -> middle
|
||||
dw $0300, $01C0, $0300, $01C0, $0300, $01C0 ; right -> right
|
||||
.west
|
||||
dw $01C4, $01C4, $01C4, $0300, $0300, $0300 ; top -> top
|
||||
dw $01C5, $81D4, $01C4, $C1C5, $81D5, $0300 ; top -> middle
|
||||
dw $41D5, $01C5, $81D4, $41D4, $C1C5, $81D5 ; top -> bottom
|
||||
dw $01C4, $C1D4, $01C5, $0300, $C1D5, $C1C5 ; middle -> top
|
||||
dw $01C5, $01C5, $01C5, $C1C5, $C1C5, $C1C5 ; middle -> middle
|
||||
dw $0300, $41D5, $01C5, $01C4, $41D4, $C1C5 ; middle -> bottom
|
||||
dw $C1D4, $01C5, $01D5, $C1D5, $C1C5, $01D4 ; bottom -> top
|
||||
dw $01C5, $01D5, $0300, $C1C5, $01D4, $01C4 ; bottom -> middle
|
||||
dw $0300, $0300, $0300, $01C4, $01C4, $01C4 ; bottom -> bottom
|
||||
.south
|
||||
dw $01C0, $0300, $01C0, $0300, $01C0, $0300 ; left -> left
|
||||
dw $01C0, $0300, $01D0, $01D1, $01C1, $41C1 ; left -> middle
|
||||
dw $01D0, $01D1, $01C1, $41C1, $C1D1, $C1D0 ; left -> right
|
||||
dw $01C1, $41C1, $81D0, $81D1, $01C0, $0300 ; middle -> left
|
||||
dw $01C1, $41C1, $01C1, $41C1, $01C1, $41C1 ; middle -> middle
|
||||
dw $01C1, $41C1, $C1D1, $C1D0, $0300, $01C0 ; middle -> right
|
||||
dw $41D1, $41D0, $01C1, $41C1, $81D0, $81D1 ; right -> left
|
||||
dw $0300, $01C0, $41D1, $41D0, $01C1, $41C1 ; right -> middle
|
||||
dw $0300, $01C0, $0300, $01C0, $0300, $01C0 ; right -> right
|
||||
.east
|
||||
dw $01C4, $01C4, $01C4, $0300, $0300, $0300 ; top -> top
|
||||
dw $01C4, $C1D4, $01C5, $0300, $C1D5, $81C5 ; top -> middle
|
||||
dw $C1D4, $01C5, $01D5, $C1D5, $81C5, $01D4 ; top -> bottom
|
||||
dw $01C5, $81D4, $01C4, $81C5, $81D5, $0300 ; middle -> top
|
||||
dw $01C5, $01C5, $01C5, $81C5, $81C5, $81C5 ; middle -> middle
|
||||
dw $01C5, $01D5, $0300, $81C5, $01D4, $01C4 ; middle -> bottom
|
||||
dw $41D5, $01C5, $81D4, $41D4, $81C5, $81D5 ; bottom -> top
|
||||
dw $0300, $41D5, $01C5, $01C4, $41D4, $81C5 ; bottom -> middle
|
||||
dw $0300, $0300, $0300, $01C4, $01C4, $01C4 ; bottom -> bottom
|
||||
|
||||
QuadrantMasks:
|
||||
; north
|
||||
dw $0008, $000C, $0004
|
||||
; west
|
||||
dw $0008, $000A, $0002
|
||||
; south
|
||||
dw $0002, $0003, $0001
|
||||
; east
|
||||
dw $0004, $0005, $0001
|
||||
|
||||
EntranceQuadrantMasks:
|
||||
dw $0002
|
||||
dw $0003
|
||||
dw $0001
|
||||
|
||||
DropdownQuadrantMasks:
|
||||
dw $0008
|
||||
dw $000C
|
||||
dw $0004
|
||||
|
||||
MultiConnectorMapping:
|
||||
.two
|
||||
db $02, $00
|
||||
.three
|
||||
db $02, $01, $00
|
||||
|
||||
MultiConnectorTiles:
|
||||
.north
|
||||
..two
|
||||
dw $41C7, $81C7, $C1C7, $01C7
|
||||
..three
|
||||
dw $41C7, $01C4, $81F7, $C1F7, $01C4, $01C7
|
||||
.west
|
||||
..two
|
||||
dw $81C7, $41C7, $C1C7, $01C7
|
||||
..three
|
||||
dw $81C7, $01C0, $41E7, $C1E7, $01C0, $01C7
|
||||
.south
|
||||
..two
|
||||
dw $C1C7, $01C7, $41C7, $81C7
|
||||
..three
|
||||
dw $C1C7, $01C4, $01F7, $41F7, $01C4, $81C7
|
||||
.east
|
||||
..two
|
||||
dw $C1C7, $01C7, $81C7, $41C7
|
||||
..three
|
||||
dw $C1C7, $01C0, $01E7, $81E7, $01C0, $41C7
|
||||
.direction_index
|
||||
db $00, $14, $28, $3C
|
||||
.start_offset
|
||||
..two
|
||||
dw $FF7E, $FFBC, $00BE, $FFC6
|
||||
..three
|
||||
dw $FF7C, $FF7C, $00BC, $FF86
|
||||
.increment
|
||||
db $02, $40
|
||||
|
||||
EdgePositions:
|
||||
.north
|
||||
db $01, $00 ; HC Basement
|
||||
db $02 ; Desert West Wing
|
||||
db $00, $01, $02 ; Desert Lobby
|
||||
db $00 ; Desert East Wing
|
||||
db $01, $02 ; TT
|
||||
db $00, $01 ; different TT
|
||||
.west
|
||||
db $02 ; TT Attic
|
||||
db $02, $02 ; Desert North Hall
|
||||
db $00, $02 ; HC Basement
|
||||
db $00 ; Desert East Wing
|
||||
db $02, $00 ; TT Triple
|
||||
db $02 ; TT Big Key Chest
|
||||
.south
|
||||
db $01, $00 ; HC Basement
|
||||
db $02 ; Desert West Wing
|
||||
db $00, $01, $02 ; Desert Lobby
|
||||
db $00 ; Desert East Wing
|
||||
db $01, $02 ; TT
|
||||
db $00, $01 ; different TT
|
||||
.east
|
||||
db $02 ; TT Attic
|
||||
db $02, $02 ; Desert North Hall
|
||||
db $02, $00 ; HC Basement
|
||||
db $00 ; Desert East Wing
|
||||
db $02, $00 ; TT Triple
|
||||
db $02 ; TT Big Key Chest
|
||||
|
||||
EdgeConnectionIndices:
|
||||
; North
|
||||
dw $0182, $0000
|
||||
dw $0082, $0003
|
||||
dw $0283, $0006
|
||||
dw $0084, $0009
|
||||
dw $0184, $000C
|
||||
dw $0284, $000F
|
||||
dw $0085, $0012
|
||||
dw $01DB, $0015
|
||||
dw $02DB, $0018
|
||||
dw $00DC, $001B
|
||||
dw $01DC, $001E
|
||||
|
||||
; South
|
||||
dw $0772, $0021
|
||||
dw $0672, $0024
|
||||
dw $0873, $0027
|
||||
dw $0674, $002A
|
||||
dw $0774, $002D
|
||||
dw $0874, $0030
|
||||
dw $0675, $0033
|
||||
dw $07CB, $0036
|
||||
dw $08CB, $0039
|
||||
dw $06CC, $003C
|
||||
dw $07CC, $003F
|
||||
|
||||
; West
|
||||
dw $0565, $0042
|
||||
dw $0574, $0045
|
||||
dw $0575, $0048
|
||||
dw $0582, $004B
|
||||
dw $0382, $004E
|
||||
dw $0385, $0051
|
||||
dw $05CC, $0054
|
||||
dw $03CC, $0057
|
||||
dw $05DC, $005A
|
||||
|
||||
; East
|
||||
dw $0B64, $005D
|
||||
dw $0B73, $0060
|
||||
dw $0B74, $0063
|
||||
dw $0981, $0066
|
||||
dw $0B81, $0069
|
||||
dw $0984, $006C
|
||||
dw $0BCB, $006F
|
||||
dw $09CB, $0072
|
||||
dw $0BDB, $0075
|
||||
|
||||
dw $FFFF
|
||||
|
||||
InRoomConnectionIndices:
|
||||
dw $020B, $0000
|
||||
dw $081B, $0002
|
||||
dw $023F, $0004
|
||||
dw $081F, $0006
|
||||
dw $007E, $0008
|
||||
dw $065E, $000A
|
||||
dw $0296, $000C
|
||||
dw $083D, $000E
|
||||
dw $FFFF
|
||||
@@ -1,26 +0,0 @@
|
||||
dw $200C
|
||||
dw $100E
|
||||
dw $2012
|
||||
dw $1023
|
||||
dw $1024
|
||||
dw $2028
|
||||
dw $204A
|
||||
dw $4056
|
||||
dw $4057
|
||||
dw $4058
|
||||
dw $4059
|
||||
dw $1060
|
||||
dw $2061
|
||||
dw $4062
|
||||
dw $4063
|
||||
dw $2077
|
||||
dw $4083
|
||||
dw $2084
|
||||
dw $1085
|
||||
dw $4098
|
||||
dw $20C9
|
||||
dw $40D5
|
||||
dw $10D6
|
||||
dw $20DB
|
||||
dw $40E0
|
||||
dw $FFFF
|
||||
@@ -1,38 +0,0 @@
|
||||
FallTable:
|
||||
dw $1007, $1017 ; Moldorm Arena
|
||||
dw $1017, $1027 ; Below Moldorm drop to Big Chest
|
||||
dw $101E, $103E ; IP first drop
|
||||
dw $1027, $1031 ; ToH Big Chest drop
|
||||
dw $1031, $1077 ; Second Floor ToH
|
||||
dw $1039, $1029 ; Mothula drop
|
||||
dw $103A, $100A ; Pod front drop
|
||||
dw $103D, $1096 ; GT Torches drop
|
||||
dw $104D, $10A6 ; Moldorm 2 drop
|
||||
dw $1054, $1034 ; Left side Swamp
|
||||
dw $105E, $107E ; IP drop to tall icy room
|
||||
dw $107E, $109E ; Freezors drop (to big chest)
|
||||
dw $208C, $101C ; Ice Armos drop
|
||||
dw $1097, $10D1 ; Mire Cutscene
|
||||
dw $109E, $10BE ; IP Big Chest tile (push blocks)
|
||||
dw $10CE, $10DE ; Kholdstare drop
|
||||
; db $65, $AC ; TT Attic
|
||||
; db $77, $A7 ; ToH drop to fairy room (Herapot)
|
||||
; db $A9, $89 ; EP drop to fairy room
|
||||
; db $BE, $4F ; IP drop to fairy room
|
||||
dw $FFFF
|
||||
|
||||
WarpTable:
|
||||
dw $2009, $104B ; PoD Basement (start)
|
||||
dw $100A, $1009 ; PoD Stalfos Basement
|
||||
dw $100B, $206A ; PoD Turtle Room to Boss
|
||||
dw $104B, $2009 ; PoD Basement (mimics)
|
||||
dw $207B, $209D ; GT post-compass island hardhat
|
||||
dw $207D, $109B ; GT warp maze
|
||||
dw $109D, $307B ; GT compass room
|
||||
dw $109B, $207D ; GT warp maze
|
||||
dw $10B1, $20B2 ; South of Fishbone warp
|
||||
dw $10D1, $10B1 ; Mire Big Key Chest warp
|
||||
; db $89, $A9 ; EP Fairy Room
|
||||
; db $A7, $17 ; ToH Fairy Room
|
||||
; db $4F, $BE ; IP Fairy Room
|
||||
dw $FFFF
|
||||
@@ -1,276 +0,0 @@
|
||||
!TIER_UNKNOWN = $01
|
||||
!TIER_JUNK = $02
|
||||
!TIER_LOW_KEY = $03
|
||||
!TIER_HEALTH = $05
|
||||
!TIER_MINOR = $06
|
||||
!TIER_MAP = $07
|
||||
!TIER_COMPASS = $08
|
||||
!TIER_SM_KEY = $09
|
||||
!TIER_BIG_KEY = $0A
|
||||
!TIER_MAJOR = $0B
|
||||
!TIER_PENDANT = $0C
|
||||
!TIER_CRYSTAL = $0D
|
||||
!TIER_TFP = $0E
|
||||
!TIER_TFORCE = $0F
|
||||
|
||||
db !TIER_MAJOR ; 00 - Fighter Sword and Shield
|
||||
db !TIER_MAJOR ; 01 - Master Sword
|
||||
db !TIER_MAJOR ; 02 - Tempered Sword
|
||||
db !TIER_MAJOR ; 03 - Butter Sword
|
||||
db !TIER_JUNK ; 04 - Fighter Shield
|
||||
db !TIER_MINOR ; 05 - Fire Shield
|
||||
db !TIER_MINOR ; 06 - Mirror Shield
|
||||
db !TIER_MAJOR ; 07 - Fire Rod
|
||||
db !TIER_MAJOR ; 08 - Ice Rod
|
||||
db !TIER_MAJOR ; 09 - Hammer
|
||||
db !TIER_MAJOR ; 0A - Hookshot
|
||||
db !TIER_MAJOR ; 0B - Bow
|
||||
db !TIER_MINOR ; 0C - Boomerang
|
||||
db !TIER_MINOR ; 0D - Powder
|
||||
db !TIER_JUNK ; 0E - Bottle Refill (bee)
|
||||
db !TIER_MAJOR ; 0F - Bombos
|
||||
db !TIER_MAJOR ; 10 - Ether
|
||||
db !TIER_MAJOR ; 11 - Quake
|
||||
db !TIER_MAJOR ; 12 - Lamp
|
||||
db !TIER_MINOR ; 13 - Shovel
|
||||
db !TIER_MAJOR ; 14 - Flute
|
||||
db !TIER_MAJOR ; 15 - Somaria
|
||||
db !TIER_MINOR ; 16 - Bottle
|
||||
db !TIER_HEALTH ; 17 - Heartpiece
|
||||
db !TIER_MINOR ; 18 - Byrna
|
||||
db !TIER_MINOR ; 19 - Cape
|
||||
db !TIER_MAJOR ; 1A - Mirror
|
||||
db !TIER_MAJOR ; 1B - Glove
|
||||
db !TIER_MAJOR ; 1C - Mitts
|
||||
db !TIER_MAJOR ; 1D - Book
|
||||
db !TIER_MAJOR ; 1E - Flippers
|
||||
db !TIER_MAJOR ; 1F - Pearl
|
||||
db !TIER_CRYSTAL ; 20 - Crystal
|
||||
db !TIER_MINOR ; 21 - Net
|
||||
db !TIER_MINOR ; 22 - Blue Mail
|
||||
db !TIER_MINOR ; 23 - Red Mail
|
||||
db !TIER_LOW_KEY ; 24 - Small Key
|
||||
db !TIER_COMPASS ; 25 - Compass
|
||||
db !TIER_HEALTH ; 26 - Heart Container from 4/4
|
||||
db !TIER_JUNK ; 27 - Bomb
|
||||
db !TIER_JUNK ; 28 - 3 bombs
|
||||
db !TIER_MINOR ; 29 - Mushroom
|
||||
db !TIER_MINOR ; 2A - Red boomerang
|
||||
db !TIER_MINOR ; 2B - Full bottle (red)
|
||||
db !TIER_MINOR ; 2C - Full bottle (green)
|
||||
db !TIER_MINOR ; 2D - Full bottle (blue)
|
||||
db !TIER_HEALTH ; 2E - Potion refill (red)
|
||||
db !TIER_HEALTH ; 2F - Potion refill (green)
|
||||
db !TIER_HEALTH ; 30 - Potion refill (blue)
|
||||
db !TIER_JUNK ; 31 - 10 bombs
|
||||
db !TIER_BIG_KEY ; 32 - Big key
|
||||
db !TIER_MAP ; 33 - Map
|
||||
db !TIER_JUNK ; 34 - 1 rupee
|
||||
db !TIER_JUNK ; 35 - 5 rupees
|
||||
db !TIER_JUNK ; 36 - 20 rupees
|
||||
db !TIER_PENDANT ; 37 - Green pendant
|
||||
db !TIER_PENDANT ; 38 - Blue pendant
|
||||
db !TIER_PENDANT ; 39 - Red pendant
|
||||
db !TIER_MAJOR ; 3A - Tossed bow
|
||||
db !TIER_MAJOR ; 3B - Silvers
|
||||
db !TIER_MINOR ; 3C - Full bottle (bee)
|
||||
db !TIER_MINOR ; 3D - Full bottle (fairy)
|
||||
db !TIER_HEALTH ; 3E - Boss heart
|
||||
db !TIER_HEALTH ; 3F - Sanc heart
|
||||
db !TIER_JUNK ; 40 - 100 rupees
|
||||
db !TIER_JUNK ; 41 - 50 rupees
|
||||
db !TIER_JUNK ; 42 - Heart
|
||||
db !TIER_JUNK ; 43 - Arrow
|
||||
db !TIER_JUNK ; 44 - 10 arrows
|
||||
db !TIER_JUNK ; 45 - Small magic
|
||||
db !TIER_JUNK ; 46 - 300 rupees
|
||||
db !TIER_JUNK ; 47 - 20 rupees green
|
||||
db !TIER_MINOR ; 48 - Full bottle (good bee)
|
||||
db !TIER_MAJOR ; 49 - Tossed fighter sword
|
||||
db !TIER_MAJOR ; 4A - Active Flute
|
||||
db !TIER_MAJOR ; 4B - Boots
|
||||
|
||||
db !TIER_MINOR ; 4C - Bomb capacity (50)
|
||||
db !TIER_MINOR ; 4D - Arrow capacity (70)
|
||||
db !TIER_MINOR ; 4E - 1/2 magic
|
||||
db !TIER_MINOR ; 4F - 1/4 magic
|
||||
db !TIER_MAJOR ; 50 - Safe master sword
|
||||
db !TIER_MINOR ; 51 - Bomb capacity (+5)
|
||||
db !TIER_MINOR ; 52 - Bomb capacity (+10)
|
||||
db !TIER_MINOR ; 53 - Arrow capacity (+5)
|
||||
db !TIER_MINOR ; 54 - Arrow capacity (+10)
|
||||
db !TIER_JUNK ; 55 - Programmable item 1
|
||||
db !TIER_JUNK ; 56 - Programmable item 2
|
||||
db !TIER_JUNK ; 57 - Programmable item 3
|
||||
db !TIER_MAJOR ; 58 - Upgrade-only silver arrows
|
||||
db !TIER_JUNK ; 59 - Rupoor
|
||||
db !TIER_JUNK ; 5A - Nothing
|
||||
db !TIER_JUNK ; 5B - Red clock
|
||||
db !TIER_JUNK ; 5C - Blue clock
|
||||
db !TIER_JUNK ; 5D - Green clock
|
||||
db !TIER_MAJOR ; 5E - Progressive sword
|
||||
db !TIER_MINOR ; 5F - Progressive shield
|
||||
db !TIER_MINOR ; 60 - Progressive armor
|
||||
db !TIER_MAJOR ; 61 - Progressive glove
|
||||
db !TIER_JUNK ; 62 - RNG pool item (single)
|
||||
db !TIER_JUNK ; 63 - RNG pool item (multi)
|
||||
db !TIER_MAJOR ; 64 - Progressive bow
|
||||
db !TIER_MAJOR ; 65 - Progressive bow
|
||||
db !TIER_JUNK ; 66 -
|
||||
db !TIER_JUNK ; 67 -
|
||||
db !TIER_JUNK ; 68 -
|
||||
db !TIER_JUNK ; 69 -
|
||||
db !TIER_TFORCE ; 6A - Triforce
|
||||
db !TIER_TFP ; 6B - Power star
|
||||
db !TIER_TFP ; 6C - Triforce Piece
|
||||
db !TIER_JUNK ; 6D - Server request item
|
||||
db !TIER_JUNK ; 6E - Server request item (dungeon drop)
|
||||
db !TIER_JUNK ; 6F -
|
||||
|
||||
db !TIER_MAP ; 70 - Map of Light World
|
||||
db !TIER_MAP ; 71 - Map of Dark World
|
||||
db !TIER_MAP ; 72 - Map of Ganon's Tower
|
||||
db !TIER_MAP ; 73 - Map of Turtle Rock
|
||||
db !TIER_MAP ; 74 - Map of Thieves' Town
|
||||
db !TIER_MAP ; 75 - Map of Tower of Hera
|
||||
db !TIER_MAP ; 76 - Map of Ice Palace
|
||||
db !TIER_MAP ; 77 - Map of Skull Woods
|
||||
db !TIER_MAP ; 78 - Map of Misery Mire
|
||||
db !TIER_MAP ; 79 - Map of Dark Palace
|
||||
db !TIER_MAP ; 7A - Map of Swamp Palace
|
||||
db !TIER_MAP ; 7B - Map of Agahnim's Tower
|
||||
db !TIER_MAP ; 7C - Map of Desert Palace
|
||||
db !TIER_MAP ; 7D - Map of Eastern Palace
|
||||
db !TIER_MAP ; 7E - Map of Hyrule Castle
|
||||
db !TIER_MAP ; 7F - Map of Sewers
|
||||
|
||||
db !TIER_COMPASS ; 80 - Compass of Light World
|
||||
db !TIER_COMPASS ; 81 - Compass of Dark World
|
||||
db !TIER_COMPASS ; 82 - Compass of Ganon's Tower
|
||||
db !TIER_COMPASS ; 83 - Compass of Turtle Rock
|
||||
db !TIER_COMPASS ; 84 - Compass of Thieves' Town
|
||||
db !TIER_COMPASS ; 85 - Compass of Tower of Hera
|
||||
db !TIER_COMPASS ; 86 - Compass of Ice Palace
|
||||
db !TIER_COMPASS ; 87 - Compass of Skull Woods
|
||||
db !TIER_COMPASS ; 88 - Compass of Misery Mire
|
||||
db !TIER_COMPASS ; 89 - Compass of Dark Palace
|
||||
db !TIER_COMPASS ; 8A - Compass of Swamp Palace
|
||||
db !TIER_COMPASS ; 8B - Compass of Agahnim's Tower
|
||||
db !TIER_COMPASS ; 8C - Compass of Desert Palace
|
||||
db !TIER_COMPASS ; 8D - Compass of Eastern Palace
|
||||
db !TIER_COMPASS ; 8E - Compass of Hyrule Castle
|
||||
db !TIER_COMPASS ; 8F - Compass of Sewers
|
||||
|
||||
db !TIER_BIG_KEY ; 90 - Skull key
|
||||
db !TIER_BIG_KEY ; 91 - Reserved
|
||||
db !TIER_BIG_KEY ; 92 - Big key of Ganon's Tower
|
||||
db !TIER_BIG_KEY ; 93 - Big key of Turtle Rock
|
||||
db !TIER_BIG_KEY ; 94 - Big key of Thieves' Town
|
||||
db !TIER_BIG_KEY ; 95 - Big key of Tower of Hera
|
||||
db !TIER_BIG_KEY ; 96 - Big key of Ice Palace
|
||||
db !TIER_BIG_KEY ; 97 - Big key of Skull Woods
|
||||
db !TIER_BIG_KEY ; 98 - Big key of Misery Mire
|
||||
db !TIER_BIG_KEY ; 99 - Big key of Dark Palace
|
||||
db !TIER_BIG_KEY ; 9A - Big key of Swamp Palace
|
||||
db !TIER_BIG_KEY ; 9B - Big key of Agahnim's Tower
|
||||
db !TIER_BIG_KEY ; 9C - Big key of Desert Palace
|
||||
db !TIER_BIG_KEY ; 9D - Big key of Eastern Palace
|
||||
db !TIER_BIG_KEY ; 9E - Big key of Hyrule Castle
|
||||
db !TIER_BIG_KEY ; 9F - Big key of Sewers
|
||||
|
||||
db !TIER_SM_KEY ; A0 - Small key of Sewers
|
||||
db !TIER_SM_KEY ; A1 - Small key of Hyrule Castle
|
||||
db !TIER_SM_KEY ; A2 - Small key of Eastern Palace
|
||||
db !TIER_SM_KEY ; A3 - Small key of Desert Palace
|
||||
db !TIER_SM_KEY ; A4 - Small key of Agahnim's Tower
|
||||
db !TIER_SM_KEY ; A5 - Small key of Swamp Palace
|
||||
db !TIER_SM_KEY ; A6 - Small key of Dark Palace
|
||||
db !TIER_SM_KEY ; A7 - Small key of Misery Mire
|
||||
db !TIER_SM_KEY ; A8 - Small key of Skull Woods
|
||||
db !TIER_SM_KEY ; A9 - Small key of Ice Palace
|
||||
db !TIER_SM_KEY ; AA - Small key of Tower of Hera
|
||||
db !TIER_SM_KEY ; AB - Small key of Thieves' Town
|
||||
db !TIER_SM_KEY ; AC - Small key of Turtle Rock
|
||||
db !TIER_SM_KEY ; AD - Small key of Ganon's Tower
|
||||
db !TIER_JUNK ; AE - Reserved
|
||||
db !TIER_LOW_KEY ; AF - Generic small key
|
||||
db !TIER_CRYSTAL ; B0 - Crystal 6
|
||||
db !TIER_CRYSTAL ; B1 - Crystal 1
|
||||
db !TIER_CRYSTAL ; B2 - Crystal 5
|
||||
db !TIER_CRYSTAL ; B3 - Crystal 7
|
||||
db !TIER_CRYSTAL ; B4 - Crystal 2
|
||||
db !TIER_CRYSTAL ; B5 - Crystal 4
|
||||
db !TIER_CRYSTAL ; B6 - Crystal 3
|
||||
db !TIER_JUNK ; B7 - Reserved
|
||||
db !TIER_JUNK ; B8 -
|
||||
db !TIER_JUNK ; B9 -
|
||||
db !TIER_JUNK ; BA -
|
||||
db !TIER_JUNK ; BB -
|
||||
db !TIER_JUNK ; BC -
|
||||
db !TIER_JUNK ; BD -
|
||||
db !TIER_JUNK ; BE -
|
||||
db !TIER_JUNK ; BF -
|
||||
db !TIER_JUNK ; C0 -
|
||||
db !TIER_JUNK ; C1 -
|
||||
db !TIER_JUNK ; C2 -
|
||||
db !TIER_JUNK ; C3 -
|
||||
db !TIER_JUNK ; C4 -
|
||||
db !TIER_JUNK ; C5 -
|
||||
db !TIER_JUNK ; C6 -
|
||||
db !TIER_JUNK ; C7 -
|
||||
db !TIER_JUNK ; C8 -
|
||||
db !TIER_JUNK ; C9 -
|
||||
db !TIER_JUNK ; CA -
|
||||
db !TIER_JUNK ; CB -
|
||||
db !TIER_JUNK ; CC -
|
||||
db !TIER_JUNK ; CD -
|
||||
db !TIER_JUNK ; CE -
|
||||
db !TIER_JUNK ; CF -
|
||||
db !TIER_JUNK ; D0 - Bee trap
|
||||
db !TIER_JUNK ; D1 - Apples
|
||||
db !TIER_JUNK ; D2 - Fairy
|
||||
db !TIER_JUNK ; D3 - Chicken
|
||||
db !TIER_JUNK ; D4 - Big Magic
|
||||
db !TIER_JUNK ; D5 - 5 Arrows
|
||||
db !TIER_JUNK ; D6 - Good Bee
|
||||
db !TIER_JUNK ; D7 -
|
||||
db !TIER_JUNK ; D8 -
|
||||
db !TIER_JUNK ; D9 -
|
||||
db !TIER_JUNK ; DA -
|
||||
db !TIER_JUNK ; DB -
|
||||
db !TIER_JUNK ; DC -
|
||||
db !TIER_JUNK ; DD -
|
||||
db !TIER_JUNK ; DE -
|
||||
db !TIER_JUNK ; DF -
|
||||
db !TIER_JUNK ; E0 -
|
||||
db !TIER_JUNK ; E1 -
|
||||
db !TIER_JUNK ; E2 -
|
||||
db !TIER_JUNK ; E3 -
|
||||
db !TIER_JUNK ; E4 -
|
||||
db !TIER_JUNK ; E5 -
|
||||
db !TIER_JUNK ; E6 -
|
||||
db !TIER_JUNK ; E7 -
|
||||
db !TIER_JUNK ; E8 -
|
||||
db !TIER_JUNK ; E9 -
|
||||
db !TIER_JUNK ; EA -
|
||||
db !TIER_JUNK ; EB -
|
||||
db !TIER_JUNK ; EC -
|
||||
db !TIER_JUNK ; ED -
|
||||
db !TIER_JUNK ; EE -
|
||||
db !TIER_JUNK ; EF -
|
||||
db !TIER_JUNK ; F0 -
|
||||
db !TIER_JUNK ; F1 -
|
||||
db !TIER_JUNK ; F2 -
|
||||
db !TIER_JUNK ; F3 -
|
||||
db !TIER_JUNK ; F4 -
|
||||
db !TIER_JUNK ; F5 -
|
||||
db !TIER_JUNK ; F6 -
|
||||
db !TIER_JUNK ; F7 -
|
||||
db !TIER_JUNK ; F8 -
|
||||
db !TIER_JUNK ; F9 -
|
||||
db !TIER_JUNK ; FA -
|
||||
db !TIER_JUNK ; FB -
|
||||
db !TIER_JUNK ; FC -
|
||||
db !TIER_JUNK ; FD -
|
||||
db !TIER_JUNK ; FE - Server request (async)
|
||||
db !TIER_JUNK ; FF -
|
||||
@@ -1,87 +0,0 @@
|
||||
SpiralPropsIndex:
|
||||
db $00, $04, $07, $00, $01, $00, $00, $0D, $00, $10, $04, $00, $15, $00, $0A, $00
|
||||
db $00, $07, $00, $00, $00, $01, $07, $1C, $00, $00, $21, $00, $26, $07, $0A, $00
|
||||
db $00, $00, $00, $00, $00, $00, $29, $30, $01, $00, $00, $00, $00, $00, $00, $00
|
||||
db $00, $35, $00, $00, $3A, $00, $00, $00, $01, $00, $04, $00, $00, $00, $00, $3D
|
||||
db $40, $07, $07, $00, $00, $01, $00, $00, $00, $00, $43, $00, $07, $07, $07, $00
|
||||
db $00, $00, $00, $01, $48, $00, $00, $00, $00, $00, $00, $00, $07, $07, $00, $4B
|
||||
db $00, $00, $00, $01, $50, $00, $07, $00, $00, $00, $53, $01, $01, $00, $58, $00
|
||||
; 0 1 2 3 4 5 6 7 8 9 a b c d e f
|
||||
db $5B, $01, $04, $00, $00, $00, $60, $67, $00, $00, $00, $00, $00, $00, $00, $6E
|
||||
db $01, $00, $00, $00, $00, $00, $00, $71, $00, $00, $00, $00, $76, $00, $04, $00
|
||||
db $00, $07, $00, $04, $00, $00, $00, $01, $7D, $0A, $00, $00, $00, $00, $04, $00
|
||||
db $01, $00, $04, $00, $00, $01, $07, $00, $00, $00, $00, $0A, $00, $00, $07, $00
|
||||
db $80, $00, $00, $00, $00, $01, $01, $00, $00, $00, $00, $00, $01, $00, $07, $00
|
||||
db $85, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
||||
db $8A, $92, $8F, $00, $00, $00, $00, $00, $00, $00, $0A, $00, $00, $00, $00, $00
|
||||
db $04
|
||||
|
||||
SpiralProps:
|
||||
db $00 ;null row
|
||||
db $01, $00, $00 ; ($01) Single Top-Left Staircase
|
||||
db $01, $00, $01 ; ($04) Single Top-Middle Staircase
|
||||
db $01, $00, $02 ; ($07) Single Top-Right Staircase
|
||||
db $01, $00, $05 ; ($0A) Single Staircase at Top of Bottom Left Quadrant
|
||||
|
||||
db $01, $00, $04 ; ($0D) Moldorm
|
||||
db $02, $01, $00, $00, $02 ; ($10) Pod Basement
|
||||
db $03, $01, $0A, $02, $01, $00, $0B ; ($15) GT Entrance
|
||||
db $02, $00, $03, $01, $04 ; ($1C) Hera Below Moldorm
|
||||
db $02, $00, $01, $01, $0B ; ($21) PoD Bridge
|
||||
db $01, $00, $08 ; ($26) GT Ice Armos
|
||||
db $03, $00, $01, $01, $0B, $02, $09 ; ($29) Swamp Statue
|
||||
db $02, $01, $03, $00, $04 ; ($30) Hera Big Chest
|
||||
db $02, $00, $04, $02, $09 ; ($35) Hera Startiles (middle value unused)
|
||||
db $01, $00, $08 ; ($3A) West Swamp
|
||||
db $01, $00, $05 ; ($3D) Ice Hamlift
|
||||
db $01, $00, $07 ; ($40) Aga Guards
|
||||
db $02, $01, $00, $00, $02 ; ($43) Pod Entrance
|
||||
db $01, $00, $08 ; ($48) Swamp Attic
|
||||
db $02, $03, $0C, $04, $06 ; ($4B) Ice U (1st three values unused)
|
||||
db $01, $00, $05 ; ($50) TT Attic Left
|
||||
db $02, $00, $01, $01, $0B ; ($53) Pod Rupees
|
||||
db $01, $00, $04 ; ($58) Ice Gators
|
||||
db $02, $01, $0A, $02, $01 ; ($5B) HC Tiny (first value placeholder)
|
||||
db $03, $00, $01, $01, $0B, $02, $09 ; ($60) Swamp Sunken
|
||||
db $03, $01, $00, $03, $08, $02, $09 ; ($67) Hera Entrance (first value unused)
|
||||
db $01, $00, $08 ; ($6E) Ice Hookshot
|
||||
db $02, $01, $00, $03, $08 ; ($71) Hera Basement (first and third values unused)
|
||||
db $03, $01, $00, $00, $02, $03, $08 ; ($76) GT Circle (third value unused)
|
||||
db $01, $00, $07 ; ($7D) Mire Entrance
|
||||
db $02, $00, $02, $02, $09 ; ($80) Tower Usains (2nd value unused)
|
||||
db $02, $00, $02, $02, $09 ; ($85) Tower Dark2 (2nd value unused)
|
||||
db $02, $00, $02, $02, $09 ; ($8A) Tower Dark1 (2nd value unused)
|
||||
db $01, $00, $09 ; ($8F) Mire2
|
||||
db $01, $00, $0A ; ($92) Mire south of Torch Room
|
||||
|
||||
SpiralLabelOffsets:
|
||||
db 1, -9
|
||||
db 5, -9
|
||||
db 9, -9
|
||||
db -6, -1
|
||||
db 15, -1
|
||||
db 1, -1
|
||||
db 5, -1
|
||||
db 9, -1
|
||||
db -6, 7
|
||||
db 15, 7
|
||||
db -3, -9
|
||||
db 13, -9
|
||||
db -3, -1
|
||||
db 13, -1
|
||||
|
||||
SpiralLabelQuadrantMasks:
|
||||
dw $0008
|
||||
dw $000C
|
||||
dw $0004
|
||||
dw $0008
|
||||
dw $0004
|
||||
dw $0002
|
||||
dw $0003
|
||||
dw $0001
|
||||
dw $0002
|
||||
dw $0001
|
||||
dw $0008
|
||||
dw $0004
|
||||
dw $0002
|
||||
dw $0001
|
||||
@@ -1,571 +0,0 @@
|
||||
IncomingDoorMap:
|
||||
; north
|
||||
db $06, $07, $08
|
||||
; west
|
||||
db $09, $0A, $0B
|
||||
; south
|
||||
db $00, $01, $02
|
||||
; east
|
||||
db $03, $04, $05
|
||||
|
||||
macro d(label)
|
||||
dw <label>-SplitRooms
|
||||
endmacro
|
||||
|
||||
macro sq(byte)
|
||||
db <byte>
|
||||
endmacro
|
||||
|
||||
SplitRooms:
|
||||
; 0/8 1/9 2/A 3/B 4/C 5/D 6/E 7/F
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||
%d(.no) : %d(.09) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.14) : %d(.no) : %d(.no) : %d(.no)
|
||||
%d(.no) : %d(.no) : %d(.1a) : %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(.2a) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.35) : %d(.36) : %d(.37)
|
||||
%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)
|
||||
%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(.57)
|
||||
%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)
|
||||
%d(.no) : %d(.no) : %d(.6a) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.75) : %d(.no) : %d(.no)
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.7b) : %d(.7c) : %d(.7d) : %d(.no) : %d(.no)
|
||||
|
||||
; 0/8 1/9 2/A 3/B 4/C 5/D 6/E 7/F
|
||||
%d(.no) : %d(.no) : %d(.82) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.87)
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.8c) : %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) : %d(.9d) : %d(.no) : %d(.no)
|
||||
|
||||
%d(.no) : %d(.no) : %d(.a2) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||
%d(.no) : %d(.a9) : %d(.aa) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||
|
||||
%d(.no) : %d(.no) : %d(.b2) : %d(.no) : %d(.no) : %d(.no) : %d(.b6) : %d(.no)
|
||||
%d(.no) : %d(.b9) : %d(.no) : %d(.no) : %d(.bc) : %d(.no) : %d(.no) : %d(.no)
|
||||
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.c7)
|
||||
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
|
||||
|
||||
%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)
|
||||
|
||||
%d(.no)
|
||||
|
||||
.no
|
||||
db $00
|
||||
|
||||
.no_items
|
||||
db $FF
|
||||
|
||||
.09
|
||||
db $01
|
||||
%sq($04)
|
||||
%d(..areas) : %d(.no_items) : %d(..stairs)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $80, $FF, $00, $80
|
||||
db $FF
|
||||
..stairs
|
||||
db $01
|
||||
db $FF
|
||||
..enemies
|
||||
db $02
|
||||
db $FF
|
||||
|
||||
.14
|
||||
db $02
|
||||
%sq($00)
|
||||
%d(..areas3) : %d(..doors3) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(.no_items)
|
||||
%sq($00)
|
||||
%d(..areas2) : %d(..doors2) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(.no_items)
|
||||
..areas3
|
||||
db $03, $C0, $FF, $00, $50
|
||||
db $03, $00, $28, $30, $50
|
||||
db $03, $30, $50, $D0, $FF
|
||||
db $FF
|
||||
..doors3
|
||||
db $03, $06, $09
|
||||
db $FF
|
||||
..areas2
|
||||
db $03, $B0, $D0, $D0, $FF
|
||||
db $03, $30, $50, $00, $28
|
||||
db $FF
|
||||
..doors2
|
||||
db $00, $08
|
||||
db $FF
|
||||
|
||||
.1a ; PoD Big Chest (2) // Falling bridge and such (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(..chests) : %d(.no_items) : %d(.no_items)
|
||||
..areas
|
||||
db $03, $00, $2C, $70, $98
|
||||
db $FF
|
||||
..doors
|
||||
db $04
|
||||
db $FF
|
||||
..chests
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.2a ; PoD Arena Right-Side Chest (2) // Arena (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(..chests) : %d(.no_items) : %d(.no_items)
|
||||
..areas
|
||||
db $03, $D8, $FF, $A8, $C8
|
||||
db $FF
|
||||
..doors
|
||||
db $0B
|
||||
db $FF
|
||||
..chests
|
||||
db $00
|
||||
db $FF
|
||||
|
||||
.35 ; Swamp BK Chest (2) // Swamp second trench (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(..chests) : %d(..pots) : %d(.no_items)
|
||||
..areas
|
||||
db $03, $00, $70, $00, $80
|
||||
db $FF
|
||||
..doors
|
||||
db $03
|
||||
db $FF
|
||||
..chests
|
||||
db $00
|
||||
db $FF
|
||||
..pots
|
||||
db $01, $02, $03, $04, $05
|
||||
db $FF
|
||||
|
||||
.36 ; Swamp Big Lobby (1) // Tiny Top-Right Blocked Corner (2)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(..pots) : %d(.no_items)
|
||||
..areas
|
||||
db $03, $D4, $FF, $00, $48
|
||||
db $FF
|
||||
..doors
|
||||
db $09
|
||||
db $FF
|
||||
..pots
|
||||
db $00, $01
|
||||
db $FF
|
||||
|
||||
.37 ; Swamp Second Chest (2) // Swamp first trench (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(..chests) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $90, $FF, $00, $80
|
||||
db $FF
|
||||
..doors
|
||||
db $09
|
||||
db $FF
|
||||
..chests
|
||||
db $00
|
||||
db $FF
|
||||
..enemies
|
||||
db $02, $03
|
||||
db $FF
|
||||
|
||||
.57 ; SW pot cage (2) // middle section (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(..chests) : %d(..pots) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $80, $FF, $80, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $08, $0B
|
||||
db $FF
|
||||
..chests
|
||||
db $01
|
||||
db $FF
|
||||
..pots
|
||||
db $02, $03, $04, $05
|
||||
db $FF
|
||||
..enemies
|
||||
db $08, $09, $0A, $0B
|
||||
db $FF
|
||||
|
||||
.6a ; pre-helmasaur-king (2) // PoD rupee basement (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $B4, $C4, $00, $B4
|
||||
db $03, $A8, $D0, $B0, $D0
|
||||
db $FF
|
||||
..doors
|
||||
db $02
|
||||
db $FF
|
||||
..enemies
|
||||
db $00, $01, $04, $05
|
||||
db $FF
|
||||
|
||||
.74 ; desert north -- trapped area (2) // everything else (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $4C, $C4, $CC, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $07
|
||||
db $FF
|
||||
..enemies
|
||||
db $06, $07
|
||||
db $FF
|
||||
|
||||
.75 ; desert cannonball (2) // desert northeast + trap room (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items) : %d(..chests) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $80, $FF, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $08
|
||||
db $FF
|
||||
..chests
|
||||
db $00
|
||||
db $FF
|
||||
..enemies
|
||||
db $06, $07
|
||||
db $FF
|
||||
|
||||
.7b ; GT post-compass (3) // island hardhat (2) // DMs room (1)
|
||||
db $02
|
||||
%sq($00)
|
||||
%d(..areas3) : %d(..doors3) : %d(.no_items)
|
||||
%d(.no_items) : %d(..pots3) : %d(..enemies3)
|
||||
%sq($00)
|
||||
%d(..areas2) : %d(..doors2) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies2)
|
||||
|
||||
..areas3
|
||||
db $03, $00, $FF, $00, $80
|
||||
db $FF
|
||||
..doors3
|
||||
db $09
|
||||
db $FF
|
||||
..pots3
|
||||
db $00, $01, $02, $03, $04
|
||||
db $FF
|
||||
..enemies3
|
||||
db $00, $01
|
||||
db $FF
|
||||
|
||||
..areas2
|
||||
db $03, $80, $FF, $80, $FF
|
||||
db $FF
|
||||
..doors2
|
||||
db $0B
|
||||
db $FF
|
||||
..enemies2
|
||||
db $06, $07
|
||||
db $FF
|
||||
|
||||
.7c ; GT falling bridge // rando room
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(..pots) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $80, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $03, $05
|
||||
db $FF
|
||||
..pots
|
||||
db $00, $01, $02, $03
|
||||
db $FF
|
||||
..enemies
|
||||
db $01, $02, $03, $04
|
||||
db $FF
|
||||
|
||||
.7d ; GT warp maze (section next to rando room)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(..chests) : %d(..pots) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $FF, $00, $80
|
||||
db $03, $00, $80, $80, $FF
|
||||
db $03, $CA, $DA, $9A, $A6
|
||||
db $FF
|
||||
..doors
|
||||
db $05
|
||||
db $FF
|
||||
..chests
|
||||
db $00
|
||||
db $FF
|
||||
..pots
|
||||
db $00, $01, $02, $03
|
||||
db $FF
|
||||
..enemies
|
||||
db $00, $01, $02, $03, $09
|
||||
db $FF
|
||||
|
||||
.82 ; HC Basement (1) + catwalk (2)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(.no_items)
|
||||
..areas
|
||||
db $03, $00, $20, $00, $50
|
||||
db $FF
|
||||
..doors
|
||||
db $00, $03
|
||||
db $FF
|
||||
|
||||
.87 ; Hera basement: cage (0) // torches (1)
|
||||
db $01
|
||||
%sq($08)
|
||||
%d(..areas) : %d(.no_items) : %d(..stairs)
|
||||
%d(..chests) : %d(..pots) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $FF, $00, $80
|
||||
db $03, $80, $FF, $80, $FF
|
||||
db $FF
|
||||
..stairs
|
||||
db $00
|
||||
db $FF
|
||||
..chests
|
||||
db $00
|
||||
db $FF
|
||||
..pots
|
||||
db $00, $01, $02, $03, $04, $05, $06, $07
|
||||
db $FF
|
||||
..enemies
|
||||
db $00, $01, $02, $05, $06, $09, $0C
|
||||
db $FF
|
||||
|
||||
.8c
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(..chests) : %d(..pots) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $80, $FF, $80, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $08
|
||||
db $FF
|
||||
..chests
|
||||
db $03
|
||||
db $FF
|
||||
..pots
|
||||
db $02, $03, $04, $05, $06
|
||||
db $FF
|
||||
..enemies
|
||||
db $06, $07, $09
|
||||
db $FF
|
||||
|
||||
.9d
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $FF, $80, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $05
|
||||
db $FF
|
||||
..enemies
|
||||
db $06, $07, $08
|
||||
db $FF
|
||||
|
||||
.a2 ; Mire abyss -- EW bridge (2), stairs to basement + hookable chest (1)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(.no_items) : %d(.no_items)
|
||||
..areas
|
||||
db $01, $00, $FF, $70, $84
|
||||
db $FF
|
||||
..doors
|
||||
db $04, $0A
|
||||
db $FF
|
||||
|
||||
.a9
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items) : %d(.no_items) : %d(..pots) : %d(.no_items)
|
||||
..areas
|
||||
db $03, $00, $40, $70, $FF
|
||||
db $03, $00, $FF, $A0, $FF
|
||||
db $03, $C0, $FF, $70, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $04, $07, $0A
|
||||
db $FF
|
||||
..pots
|
||||
db $04, $05, $06, $07
|
||||
db $FF
|
||||
|
||||
.aa
|
||||
db $01
|
||||
%sq($00)
|
||||
%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, $D4, $B8, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $03, $06
|
||||
db $FF
|
||||
|
||||
.b2
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items) : %d(.no_items) : %d(..pots) : %d(..enemies)
|
||||
..areas
|
||||
db $02, $00, $FF, $00, $80
|
||||
db $03, $60, $A0, $00, $40
|
||||
db $FF
|
||||
..doors
|
||||
db $01, $09
|
||||
db $FF
|
||||
..pots
|
||||
db $00, $01, $02, $03, $04, $05, $06
|
||||
db $FF
|
||||
..enemies
|
||||
db $00, $01, $02, $03, $04
|
||||
db $FF
|
||||
|
||||
.b6
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(..pots) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $80, $FF, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $08
|
||||
db $FF
|
||||
..pots
|
||||
db $00
|
||||
db $FF
|
||||
..enemies
|
||||
db $04
|
||||
db $FF
|
||||
|
||||
.b9
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items) : %d(.no_items) : %d(.no_items) : %d(.no_items)
|
||||
..areas
|
||||
db $01, $00, $20, $28, $60
|
||||
db $01, $E0, $FF, $28, $60
|
||||
db $01, $00, $FF, $58, $60
|
||||
db $FF
|
||||
..doors
|
||||
db $03, $09
|
||||
db $FF
|
||||
|
||||
.bc
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items) : %d(.no_items) : %d(..pots) : %d(.no_items)
|
||||
..areas
|
||||
db $03, $2C, $4C, $CA, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $06
|
||||
db $FF
|
||||
..pots
|
||||
db $0C, $0D
|
||||
db $FF
|
||||
|
||||
.c7 ; TR Torch Maze (1) // Tiny Bottom-Left Blocked Corner (2)
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(..pots) : %d(.no_items)
|
||||
..areas
|
||||
db $03, $00, $1C, $A8, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $05
|
||||
db $FF
|
||||
..pots
|
||||
db $02, $03
|
||||
db $FF
|
||||
|
||||
.d1
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(.no_items) : %d(..pots) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $80, $FF, $00, $A8
|
||||
db $FF
|
||||
..doors
|
||||
db $02
|
||||
db $FF
|
||||
..pots
|
||||
db $02, $03, $04, $05
|
||||
db $FF
|
||||
..enemies
|
||||
db $00, $01, $07
|
||||
db $FF
|
||||
|
||||
.d6
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(..chests) : %d(.no_items) : %d(..enemies)
|
||||
..areas
|
||||
db $03, $00, $80, $00, $FF
|
||||
db $FF
|
||||
..doors
|
||||
db $00
|
||||
db $FF
|
||||
..chests
|
||||
db $00
|
||||
db $FF
|
||||
..enemies
|
||||
db $00, $01, $02
|
||||
db $FF
|
||||
|
||||
.db
|
||||
db $01
|
||||
%sq($00)
|
||||
%d(..areas) : %d(..doors) : %d(.no_items)
|
||||
%d(..chests) : %d(.no_items) : %d(.no_items)
|
||||
..areas
|
||||
db $02, $B0, $FF, $90, $C0
|
||||
db $FF
|
||||
..doors
|
||||
db $0B
|
||||
db $FF
|
||||
..chests
|
||||
db $01
|
||||
db $FF
|
||||
@@ -1,258 +0,0 @@
|
||||
dw $FFFF, $83A5, $FFFF, $FFFF ; 00
|
||||
dw $C388, $8388, $FFFF, $FFFF ; 01
|
||||
dw $4348, $034A, $4342, $0342 ; 02
|
||||
dw $FFFF, $FFFF, $438F, $FFFF ; 03 - Houlihan
|
||||
dw $039A, $038F, $4365, $C39B ; 04
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 05 - unused
|
||||
dw $FFFF, $FFFF, $438F, $FFFF ; 06 - Arrghus
|
||||
dw $0100, $0101, $4111, $0111 ; 07 - Moldorm
|
||||
dw $FFFF, $FFFF, $43B2, $03B2 ; 08 - useless fairy entrance
|
||||
dw $C3A6, $837B, $FFFF, $FFFF ; 09
|
||||
dw $C398, $835F, $FFFF, $FFFF ; 0A
|
||||
dw $039B, $439C, $839B, $0381 ; 0B
|
||||
dw $C371, $8371, $4354, $0354 ; 0C
|
||||
dw $FFFF, $FFFF, $438F, $FFFF ; 0D - Aga 2
|
||||
dw $FFFF, $FFFF, $8399, $439B ; 0E
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 0F - unused and should never be used, treated as non-id
|
||||
dw $C340, $8340, $4350, $0340 ; 10
|
||||
dw $83B7, $C3AC, $03B7, $438A ; 11
|
||||
dw $C354, $8354, $4354, $0354 ; 12
|
||||
dw $FFFF, $83B7, $FFFF, $03B7 ; 13
|
||||
dw $012E, $012F, $013E, $013F ; 14
|
||||
dw $C374, $8340, $4341, $0340 ; 15
|
||||
dw $0108, $0109, $436B, $036B ; 16
|
||||
dw $4104, $0104, $4114, $0114 ; 17
|
||||
dw $C3B5, $FFFF, $43B4, $FFFF ; 18 - useless fairy drop
|
||||
dw $FFFF, $8369, $FFFF, $035A ; 19
|
||||
dw $03E7, $03E8, $03F7, $0361 ; 1A
|
||||
dw $039B, $439C, $4361, $FFFF ; 1B
|
||||
dw $038F, $038F, $037E, $C39B ; 1C
|
||||
dw $C3B2, $83A7, $FFFF, $FFFF ; 1D
|
||||
dw $FFFF, $4391, $0122, $0123 ; 1E
|
||||
dw $FFFF, $FFFF, $4360, $C399 ; 1F
|
||||
dw $FFFF, $FFFF, $438F, $FFFF ; 20
|
||||
dw $4348, $0363, $C348, $8368 ; 21
|
||||
dw $FFFF, $FFFF, $4368, $0348 ; 22
|
||||
dw $FFFF, $FFFF, $FFFF, $039B ; 23
|
||||
dw $4365, $0365, $0132, $0133 ; 24
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 25 - unused
|
||||
dw $039B, $03E4, $4363, $0382 ; 26
|
||||
dw $4104, $0104, $4114, $0114 ; 27
|
||||
dw $C3A5, $FFFF, $4358, $0348 ; 28
|
||||
dw $FFFF, $FFFF, $FFFF, $0396 ; 29 - Mothula
|
||||
dw $C350, $8352, $4350, $03F8 ; 2A
|
||||
dw $C36A, $FFFF, $03F9, $C38D ; 2B
|
||||
dw $C340, $8340, $4350, $0350 ; 2C - hookshot cave back
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 2D - unused
|
||||
dw $FFFF, $838F, $FFFF, $FFFF ; 2E
|
||||
dw $C3B4, $FFFF, $436E, $03B2 ; 2F - Kakariko well
|
||||
dw $C361, $FFFF, $839A, $FFFF ; 30 - inset stairs if possible
|
||||
dw $0124, $0125, $0134, $0135 ; 31
|
||||
dw $43C4, $03C4, $43D4, $03D4 ; 32
|
||||
dw $FFFF, $FFFF, $438F, $FFFF ; 33
|
||||
dw $0129, $012A, $0139, $013A ; 34
|
||||
dw $C38D, $039B, $43B1, $037D ; 35
|
||||
dw $0118, $0119, $0128, $4128 ; 36
|
||||
dw $439B, $838D, $437D, $03B1 ; 37
|
||||
dw $C3AC, $FFFF, $43B7, $FFFF ; 38
|
||||
dw $FFFF, $FFFF, $039B, $0381 ; 39
|
||||
dw $03C2, $03C3, $43D3, $03D3 ; 3A - make bespoke if feasible
|
||||
dw $C3A5, $FFFF, $43B5, $FFFF ; 3B - inset stairs if feasible
|
||||
dw $C340, $8350, $4340, $0350 ; 3C - hookshot cave front
|
||||
dw $039B, $439B, $0361, $838E ; 3D
|
||||
dw $FFFF, $438F, $43B2, $0373 ; 3E
|
||||
dw $FFFF, $FFFF, $0130, $C399 ; 3F
|
||||
dw $C3A5, $FFFF, $4372, $C399 ; 40 - inset stairs if feasible
|
||||
dw $03C5, $03C6, $03D5, $03D6 ; 41
|
||||
dw $03E9, $03EA, $FFFF, $FFFF ; 42
|
||||
dw $C3B2, $03B2, $FFFF, $0361 ; 43
|
||||
dw $038D, $839F, $838D, $039F ; 44
|
||||
dw $C3AB, $83B4, $4364, $43B7 ; 45
|
||||
dw $C375, $8375, $4373, $0373 ; 46
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 47 - unused
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 48 - unused
|
||||
dw $839B, $8372, $039B, $0372 ; 49
|
||||
dw $03E2, $03E3, $0386, $4386 ; 4A
|
||||
dw $C361, $4391, $4373, $0373 ; 4B
|
||||
dw $FFFF, $83A5, $FFFF, $03B7 ; 4C
|
||||
dw $0102, $0103, $0112, $0113 ; 4D
|
||||
dw $839B, $439C, $FFFF, $FFFF ; 4E
|
||||
dw $FFFF, $8396, $838D, $FFFF ; 4F
|
||||
dw $FFFF, $83B7, $FFFF, $03B5 ; 50
|
||||
dw $C354, $8354, $4384, $0384 ; 51
|
||||
dw $C3B7, $FFFF, $4359, $0348 ; 52
|
||||
dw $039A, $83B5, $839B, $43B7 ; 53
|
||||
dw $C390, $8390, $4380, $0340 ; 54
|
||||
dw $C340, $8340, $4350, $0340 ; 55 - secret passage
|
||||
dw $038F, $83B4, $4365, $039F ; 56
|
||||
dw $039B, $438D, $0365, $039B ; 57
|
||||
dw $C372, $439B, $0383, $0365 ; 58 - split
|
||||
dw $838A, $8372, $03D1, $0372 ; 59
|
||||
dw $FFFF, $FFFF, $FFFF, $038F ; 5A - Helmasaur King
|
||||
dw $FFFF, $83B7, $FFFF, $03B5 ; 5B
|
||||
dw $C3B1, $83AA, $FFFF, $838F ; 5C
|
||||
dw $039B, $C399, $0361, $FFFF ; 5D
|
||||
dw $FFFF, $0110, $839C, $0123 ; 5E
|
||||
dw $FFFF, $FFFF, $43BB, $FFFF ; 5F
|
||||
dw $FFFF, $8379, $FFFF, $036A ; 60
|
||||
dw $C387, $8385, $4356, $0356 ; 61
|
||||
dw $C346, $8354, $4352, $0340 ; 62
|
||||
dw $039A, $FFFF, $0361, $FFFF ; 63
|
||||
dw $FFFF, $FFFF, $8399, $0367 ; 64
|
||||
dw $FFFF, $FFFF, $0367, $0381 ; 65
|
||||
dw $038F, $039A, $0362, $83B2 ; 66
|
||||
dw $83B4, $83B5, $03B7, $039F ; 67
|
||||
dw $C340, $8350, $4341, $0340 ; 68
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 69 - unused
|
||||
dw $FFFF, $03E1, $FFFF, $03F1 ; 6A
|
||||
dw $039A, $0361, $839B, $C39B ; 6B
|
||||
dw $039A, $FFFF, $839B, $0360 ; 6C - Lanmolas 2
|
||||
dw $0361, $FFFF, $C39B, $FFFF ; 6D
|
||||
dw $FFFF, $838E, $FFFF, $FFFF ; 6E
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 6F - unused
|
||||
dw $43BA, $FFFF, $FFFF, $FFFF ; 70
|
||||
dw $039A, $FFFF, $4365, $438D ; 71
|
||||
dw $437A, $037A, $8386, $0342 ; 72 - slight cheating I guess...
|
||||
dw $038F, $038F, $839B, $0366 ; 73
|
||||
dw $43B2, $03B2, $43A8, $03A8 ; 74
|
||||
dw $038F, $83B4, $0365, $03B5 ; 75
|
||||
dw $010D, $010E, $011D, $011E ; 76
|
||||
dw $0126, $0127, $4137, $0137 ; 77
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 78 - unused
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 79 - unused
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 7A - unused
|
||||
dw $0106, $0107, $438F, $4381 ; 7B
|
||||
dw $C3B7, $83B4, $43B7, $03B7 ; 7C
|
||||
dw $43B2, $835E, $034C, $0391 ; 7D
|
||||
dw $FFFF, $83B7, $4393, $438A ; 7E
|
||||
dw $439B, $FFFF, $838E, $FFFF ; 7F
|
||||
dw $C3A7, $83B0, $FFFF, $FFFF ; 80
|
||||
dw $C350, $8341, $4340, $0341 ; 81
|
||||
dw $C39D, $8354, $4341, $0340 ; 82
|
||||
dw $038F, $83B5, $4365, $43B7 ; 83
|
||||
dw $C344, $8345, $4354, $0354 ; 84
|
||||
dw $C38B, $C39B, $03B7, $439B ; 85
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 86 - unused
|
||||
dw $0136, $0117, $4394, $838F ; 87
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 88 - unused
|
||||
dw $C3B0, $83B0, $FFFF, $FFFF ; 89
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 8A - unused
|
||||
dw $838A, $0360, $038A, $438D ; 8B
|
||||
dw $83BE, $83BF, $03BD, $0391 ; 8C
|
||||
dw $0360, $C38A, $038D, $438A ; 8D
|
||||
dw $FFFF, $838E, $FFFF, $FFFF ; 8E
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 8F - unused
|
||||
dw $FFFF, $FFFF, $438F, $FFFF ; 90
|
||||
dw $FFFF, $83A5, $FFFF, $03B7 ; 91
|
||||
dw $03D2, $C3B7, $0364, $039F ; 92
|
||||
dw $C36C, $836C, $C39B, $838F ; 93
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 94 - unused
|
||||
dw $FFFF, $83B7, $FFFF, $03B5 ; 95
|
||||
dw $010F, $FFFF, $011F, $C39C ; 96
|
||||
dw $039A, $83B4, $839B, $036F ; 97
|
||||
dw $FFFF, $FFFF, $43B2, $0397 ; 98
|
||||
dw $FFFF, $038F, $434A, $0363 ; 99
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; 9A - unused
|
||||
dw $839B, $0381, $435E, $0378 ; 9B
|
||||
dw $C350, $8350, $4341, $0341 ; 9C
|
||||
dw $0116, $83B2, $43B1, $035E ; 9D
|
||||
dw $FFFF, $439A, $838D, $03B9 ; 9E
|
||||
dw $FFFF, $FFFF, $439B, $FFFF ; 9F
|
||||
dw $839B, $C39C, $FFFF, $FFFF ; A0
|
||||
dw $C3B0, $835D, $FFFF, $036A ; A1
|
||||
dw $03EE, $03EF, $03FE, $03FF ; A2
|
||||
dw $C35A, $FFFF, $436A, $FFFF ; A3
|
||||
dw $FFFF, $FFFF, $438F, $FFFF ; A4
|
||||
dw $039A, $0361, $C3B2, $83B2 ; A5
|
||||
dw $C340, $8370, $4340, $0340 ; A6
|
||||
dw $C396, $FFFF, $FFFF, $FFFF ; A7 - ToH fairy basement room
|
||||
dw $039B, $03E5, $839B, $03F5 ; A8
|
||||
dw $C357, $8357, $4356, $0356 ; A9
|
||||
dw $03E6, $439B, $03F6, $C39B ; AA
|
||||
dw $FFFF, $FFFF, $439A, $FFFF ; AB
|
||||
dw $FFFF, $FFFF, $FFFF, $038F ; AC - Blind
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; AD - unused
|
||||
dw $FFFF, $8399, $FFFF, $FFFF ; AE
|
||||
dw $C39B, $FFFF, $FFFF, $FFFF ; AF
|
||||
dw $039B, $C399, $839B, $C399 ; B0
|
||||
dw $0391, $83B5, $434C, $438A ; B1
|
||||
dw $C35C, $83A2, $039B, $0366 ; B2
|
||||
dw $0365, $FFFF, $0365, $FFFF ; B3
|
||||
dw $03FA, $83FD, $03EC, $03ED ; B4
|
||||
dw $03EB, $83FD, $83FA, $03FD ; B5
|
||||
dw $039A, $038F, $0361, $0361 ; B6
|
||||
dw $C3B4, $FFFF, $43B5, $FFFF ; B7
|
||||
dw $FFFF, $838A, $FFFF, $03B4 ; B8
|
||||
dw $43F3, $03F3, $4354, $0354 ; B9
|
||||
dw $0364, $438D, $FFFF, $FFFF ; BA
|
||||
dw $838A, $8364, $4372, $0364 ; BB
|
||||
dw $83BE, $C38A, $03D0, $438A ; BC
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; BD - unused
|
||||
dw $FFFF, $439A, $FFFF, $C365 ; BE
|
||||
dw $FFFF, $FFFF, $438D, $FFFF ; BF
|
||||
dw $C372, $C399, $4372, $C399 ; C0
|
||||
dw $039B, $0364, $4365, $8364 ; C1
|
||||
dw $C351, $8353, $4341, $0353 ; C2
|
||||
dw $03E0, $C369, $03F0, $4369 ; C3 - show layers
|
||||
dw $43C0, $03C0, $4340, $0341 ; C4
|
||||
dw $C3B5, $FFFF, $438A, $FFFF ; C5
|
||||
dw $03FA, $03FB, $83FA, $83FB ; C6
|
||||
dw $43FB, $83FD, $03FC, $03FD ; C7
|
||||
dw $FFFF, $FFFF, $FFFF, $038F ; C8 - Armos Knights
|
||||
dw $03F2, $43F2, $0386, $4386 ; C9
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; CA - unused
|
||||
dw $C340, $8343, $4354, $0347 ; CB
|
||||
dw $C353, $8350, $4347, $0354 ; CC
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; CD - unused
|
||||
dw $FFFF, $8391, $FFFF, $FFFF ; CE - Kholdstare drop
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; CF - unused
|
||||
dw $C372, $C399, $4372, $C399 ; D0
|
||||
dw $C38E, $838F, $4381, $C38D ; D1
|
||||
dw $FFFF, $83B5, $FFFF, $0395 ; D2
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; D3 - unused
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; D4 - unused
|
||||
dw $C3B5, $FFFF, $43B5, $FFFF ; D5
|
||||
dw $C3B5, $010A, $43B4, $011A ; D6
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; D7 - unused
|
||||
dw $FFFF, $8361, $FFFF, $839B ; D8
|
||||
dw $FFFF, $FFFF, $4360, $0360 ; D9
|
||||
dw $FFFF, $FFFF, $439C, $FFFF ; DA
|
||||
dw $C354, $8346, $4354, $037F ; DB
|
||||
dw $C346, $8354, $4343, $0340 ; DC
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; DD - unused
|
||||
dw $FFFF, $8396, $FFFF, $FFFF ; DE - Kholdstare
|
||||
dw $FFFF, $FFFF, $43A0, $0354 ; DF - paradox top
|
||||
dw $039B, $C399, $0361, $FFFF ; E0
|
||||
|
||||
; no more dungeon
|
||||
dw $C340, $8340, $4350, $0340 ; E1 - lost woods thieves hideout
|
||||
dw $C340, $8340, $4340, $0350 ; E2 - lumberjack cave
|
||||
dw $FFFF, $83B4, $43B2, $036E ; E3 - magic bat
|
||||
dw $C340, $8342, $4350, $0342 ; E4 - old man's house front
|
||||
dw $C342, $8340, $4356, $0354 ; E5 - old man's house back
|
||||
dw $C340, $8341, $4350, $0340 ; E6 - death mountain descent left
|
||||
dw $C341, $8340, $4340, $0350 ; E7 - death mountain descent right
|
||||
dw $C370, $8370, $4380, $0350 ; E8 - superbunny top
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; E9 - unused
|
||||
dw $C3A5, $FFFF, $43B5, $FFFF ; EA - spectacle top
|
||||
dw $FFFF, $83A6, $FFFF, $03B5 ; EB - bumper top
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; EC - unused
|
||||
dw $C370, $8370, $4340, $0350 ; ED - fairy ascension top
|
||||
dw $C340, $8390, $4340, $0350 ; EE - spiral top
|
||||
dw $FFFF, $8340, $43A0, $0354 ; EF - paradox top
|
||||
dw $C340, $8342, $4350, $0342 ; F0 - old man rescue left
|
||||
dw $C342, $8342, $4340, $0350 ; F1 - old man rescue right
|
||||
dw $FFFF, $FFFF, $FFFF, $03B2 ; F2 - Sahasrahla's Kakariko house left
|
||||
dw $FFFF, $FFFF, $43B2, $FFFF ; F3 - Sahasrahla's Kakariko house right
|
||||
dw $FFFF, $FFFF, $FFFF, $03B2 ; F4 - quarreling brothers left
|
||||
dw $FFFF, $FFFF, $43B2, $FFFF ; F5 - quarreling brothers right
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; F6 - unused
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; F7 - unused
|
||||
dw $C370, $8370, $43A0, $0354 ; F8 - superbunny bottom
|
||||
dw $C340, $8341, $4350, $0340 ; F9 - spectacle left
|
||||
dw $C374, $8340, $4350, $0340 ; FA - spectacle bottom
|
||||
dw $FFFF, $83A5, $4348, $0358 ; FB - bumper bottom
|
||||
dw $FFFF, $FFFF, $FFFF, $FFFF ; FC - unused
|
||||
dw $C370, $8370, $4354, $0354 ; FD - fairy ascension bottom
|
||||
dw $FFFF, $FFFF, $43B4, $03B5 ; FE - spiral bottom
|
||||
dw $C3B4, $83B4, $436E, $036D ; FF - paradox bottom
|
||||
@@ -1,204 +0,0 @@
|
||||
RedrawLoot:
|
||||
JSL DrawLoot
|
||||
|
||||
; what we wrote over
|
||||
SEP #$20
|
||||
STZ.w $0210
|
||||
RTL
|
||||
|
||||
FirstDrawLoot:
|
||||
LDA.b #$FF
|
||||
STA.w $0215
|
||||
LDA.b #$80
|
||||
STA.w $0216
|
||||
STA.w $0218
|
||||
LDA.l DRMode
|
||||
BEQ +
|
||||
LDA.w DungeonID
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l DungeonMapData.floor, X
|
||||
STA.b $A4
|
||||
+
|
||||
|
||||
; what we wrote over
|
||||
LDA.b #$08
|
||||
STA.b $17
|
||||
|
||||
DrawLoot:
|
||||
LDA.b $07
|
||||
STA.w $021B
|
||||
|
||||
LDA.l DRMode
|
||||
BEQ +
|
||||
LDA.l DungeonMapMode
|
||||
BNE +
|
||||
BRA .skip
|
||||
+
|
||||
REP #$30
|
||||
PHX : PHY
|
||||
|
||||
STZ.b $0E
|
||||
|
||||
LDX.w DungeonID
|
||||
JSL LoadDungeonMapRoomPointer
|
||||
STA.b $72
|
||||
|
||||
SEP #$20
|
||||
LDA.l DungeonMapFloorCountData, X
|
||||
AND.b #$0F
|
||||
CLC : ADC.w DungeonMapCurrentFloor
|
||||
PHA
|
||||
|
||||
JSR DrawSingleFloorLoot
|
||||
|
||||
INC.b $0F
|
||||
LDA.b #$80
|
||||
STA.b $0E
|
||||
PLA : DEC A
|
||||
JSR DrawSingleFloorLoot
|
||||
|
||||
LDX.w GFXStripes
|
||||
LDA.b #$FF
|
||||
STA.w GFXStripes+$02, X
|
||||
|
||||
LDA.b #$01
|
||||
STA.b NMISTRIPES
|
||||
|
||||
PLY : PLX
|
||||
.skip
|
||||
LDA.b #$00
|
||||
RTL
|
||||
|
||||
DrawSingleFloorLoot:
|
||||
REP #$20
|
||||
AND.w #$00FF
|
||||
INC A
|
||||
ASL A
|
||||
%ADD_MapMode()
|
||||
|
||||
LDA.l MapDrawingData_floor_data_offset, X
|
||||
DEC A
|
||||
TAY
|
||||
|
||||
%LDX_MapMode()
|
||||
|
||||
SEP #$20
|
||||
LDA.l MapDrawingData_column_count, X
|
||||
DEC A
|
||||
STA.b $06
|
||||
|
||||
LDA.l MapDrawingData_row_count, X
|
||||
DEC A
|
||||
STA.b $07
|
||||
|
||||
.next_row
|
||||
REP #$20
|
||||
LDA.w GFXStripes
|
||||
TAX
|
||||
CLC : ADC.w #$0034
|
||||
STA.w GFXStripes
|
||||
|
||||
PHX
|
||||
%LDX_MapMode()
|
||||
|
||||
SEP #$20
|
||||
LDA.b $07
|
||||
CPX.w #$0002
|
||||
BNE +
|
||||
ASL A
|
||||
+
|
||||
CLC : ADC.b $07
|
||||
REP #$20
|
||||
AND.w #$00FF
|
||||
ASL #5
|
||||
|
||||
CLC : ADC.l MapDrawingData_bg1_grid_start, X
|
||||
ADC.b $0E
|
||||
XBA
|
||||
PLX
|
||||
STA.w GFXStripes+$02, X
|
||||
CLC : ADC.w #$2000
|
||||
STA.w GFXStripes+$1C, X
|
||||
|
||||
LDA.w #$1500
|
||||
STA.w GFXStripes+$04, X
|
||||
STA.w GFXStripes+$1E, X
|
||||
|
||||
TXA
|
||||
CLC : ADC.w #$0018
|
||||
TAX
|
||||
|
||||
.next_room
|
||||
REP #$20
|
||||
LDA.b [$72], Y ; get room id
|
||||
PHY
|
||||
|
||||
AND.w #$00FF
|
||||
CMP.w #$000F ; $0F = empty room
|
||||
|
||||
BNE .valid_room
|
||||
LDA.w #$0000
|
||||
BRA +
|
||||
.valid_room
|
||||
JSL CheckLoot
|
||||
+
|
||||
ASL A : ASL A : ASL A
|
||||
|
||||
TXY
|
||||
TAX
|
||||
|
||||
LDA.l LootTypeIcons+0, X
|
||||
STA.w GFXStripes+$00, Y
|
||||
LDA.l LootTypeIcons+2, X
|
||||
STA.w GFXStripes+$02, Y
|
||||
LDA.l LootTypeIcons+4, X
|
||||
STA.w GFXStripes+$1A, Y
|
||||
LDA.l LootTypeIcons+6, X
|
||||
STA.w GFXStripes+$1C, Y
|
||||
|
||||
TYX
|
||||
PLY
|
||||
DEY : DEX #4
|
||||
|
||||
LDA.l DungeonMapMode
|
||||
BEQ +
|
||||
LDA.b $06
|
||||
AND.w #$00FF
|
||||
BEQ +
|
||||
|
||||
; skip a column if in 4x3 mode and it's not the last column
|
||||
LDA.w #$0300
|
||||
STA.w GFXStripes+$02, X
|
||||
STA.w GFXStripes+$1C, X
|
||||
DEX : DEX
|
||||
+
|
||||
|
||||
SEP #$20
|
||||
DEC.b $06
|
||||
BPL .next_room
|
||||
|
||||
LDA.l DungeonMapMode
|
||||
BNE +
|
||||
; draw an extra empty tile at the end to make up for width differences between modes
|
||||
LDA.b #$03
|
||||
STZ.w GFXStripes+$02, X
|
||||
STA.w GFXStripes+$03, X
|
||||
STZ.w GFXStripes+$1C, X
|
||||
STA.w GFXStripes+$1D, X
|
||||
+
|
||||
|
||||
DEC.b $07
|
||||
BMI .done
|
||||
|
||||
LDA.b #$00
|
||||
XBA
|
||||
%LDX_MapMode()
|
||||
LDA.l MapDrawingData_column_count, X
|
||||
DEC A
|
||||
STA.b $06
|
||||
|
||||
JMP .next_row
|
||||
|
||||
.done
|
||||
RTS
|
||||
@@ -1,315 +0,0 @@
|
||||
DrawNonexistentRoom:
|
||||
REP #$20
|
||||
LDA.w #$0F00
|
||||
STA.l $7F0000, X
|
||||
STA.l $7F0002, X
|
||||
STA.l $7F0040, X
|
||||
STA.l $7F0042, X
|
||||
|
||||
FinishRoom:
|
||||
PHX
|
||||
%LDX_MapMode()
|
||||
PLA
|
||||
CLC : ADC.l MapDrawingData_column_spacing, X
|
||||
TAX
|
||||
JML $8AE7F6
|
||||
|
||||
NormalDrawDungeonMapRoom:
|
||||
JSL DrawDungeonMapRoom
|
||||
JMP FinishRoom
|
||||
|
||||
; $CA has room_id
|
||||
; $0E has quadrant flags
|
||||
; X has address to draw at
|
||||
DrawDungeonMapRoom:
|
||||
REP #$20
|
||||
PHB : PHK : PLB ; need to keep this in same bank as data, or else specify bank
|
||||
LDA.b $0A : PHA
|
||||
|
||||
LDA.l ShowRooms_default
|
||||
AND.w #$00FF
|
||||
STA.b $0A
|
||||
|
||||
PHX
|
||||
|
||||
LDX.w DungeonID
|
||||
LDA.l MapField
|
||||
AND.l DungeonMask, X
|
||||
BEQ +
|
||||
LDA.l ShowRooms_have_map
|
||||
AND.w #$00FF
|
||||
CMP.b $0A
|
||||
BCC +
|
||||
STA.b $0A
|
||||
+
|
||||
|
||||
LDX.w DungeonID
|
||||
LDA.l CompassField
|
||||
AND.l DungeonMask, X
|
||||
BEQ +
|
||||
LDA.l ShowRooms_have_compass
|
||||
AND.w #$00FF
|
||||
CMP.b $0A
|
||||
BCC +
|
||||
STA.b $0A
|
||||
+
|
||||
|
||||
LDA.b $0E
|
||||
AND.w #$000F
|
||||
BEQ +
|
||||
LDA.l ShowRooms_visited_tile
|
||||
AND.w #$00FF
|
||||
CMP.b $0A
|
||||
BCC +
|
||||
STA.b $0A
|
||||
+
|
||||
|
||||
PLX
|
||||
|
||||
LDA.l DungeonMapMode
|
||||
BEQ +
|
||||
LDA.b $0A
|
||||
CMP.w #$0003
|
||||
BCS +
|
||||
JSL ClearAdjacentConnections
|
||||
+
|
||||
|
||||
LDA.b $0A : BNE + : LDA.w #$0F00 : BRA ++
|
||||
+ DEC A : BNE + : LDA.w #$174F : BRA ++
|
||||
+ DEC A : BNE + : LDA.w #$174F : BRA ++
|
||||
+ DEC A : BNE + : LDA.w #$1400 : BRA ++
|
||||
+ DEC A : BNE + : LDA.w #$1000 : BRA ++
|
||||
+ DEC A : BNE + : LDA.w #$0C00 : BRA ++
|
||||
+ LDA.w #$0800
|
||||
++ STA.b $0C
|
||||
|
||||
LDA.b $CA
|
||||
AND.w #$00FF
|
||||
ASL A : ASL A : ASL A
|
||||
TAY
|
||||
|
||||
macro DrawQuadrant(quadrant, writeOffset)
|
||||
?DrawQuadrant:
|
||||
LDA.w SupertileRoomShapes+(2*<quadrant>), Y
|
||||
CMP.w #$FFFF : BEQ ?.empty
|
||||
PHA
|
||||
LDA.b $0E
|
||||
AND.w #1<<(3-<quadrant>)
|
||||
BNE ?.visited
|
||||
|
||||
?.unvisited
|
||||
LDA.b $0A
|
||||
CMP.w #$0003
|
||||
BCS ?.shape
|
||||
|
||||
?.square
|
||||
PLA
|
||||
LDA.b $0C
|
||||
EOR.w #(3-<quadrant>)<<14
|
||||
BRA ?.write
|
||||
|
||||
?.shape
|
||||
PLA
|
||||
ORA.b $0C
|
||||
BRA ?.write
|
||||
|
||||
?.visited
|
||||
PLA
|
||||
ORA.w #$0800
|
||||
BRA ?.write
|
||||
|
||||
?.empty
|
||||
LDA.b $0A
|
||||
CMP.w #$0001
|
||||
BEQ ?.full_square
|
||||
LDA.w #$0F00
|
||||
BRA ?.write
|
||||
|
||||
?.full_square
|
||||
LDA.w #$174F
|
||||
EOR.w #(3-<quadrant>)<<14
|
||||
|
||||
?.write
|
||||
STA.l $7F0000+<writeOffset>, X
|
||||
?.done
|
||||
endmacro
|
||||
|
||||
%DrawQuadrant(0, $00)
|
||||
%DrawQuadrant(1, $02)
|
||||
%DrawQuadrant(2, $40)
|
||||
%DrawQuadrant(3, $42)
|
||||
|
||||
.done
|
||||
PLA : STA.b $0A
|
||||
PLB
|
||||
RTL
|
||||
|
||||
DrawEntrances:
|
||||
REP #$30
|
||||
PHX : PHY
|
||||
LDA.b $06 : PHA
|
||||
|
||||
LDX.w DungeonID
|
||||
JSL LoadDungeonMapRoomPointer
|
||||
STA.b $72
|
||||
|
||||
SEP #$20
|
||||
LDA.l DungeonMapFloorCountData, X
|
||||
AND.b #$0F
|
||||
CLC : ADC.w DungeonMapCurrentFloor
|
||||
REP #$20
|
||||
AND.w #$00FF
|
||||
|
||||
STZ.b $02
|
||||
PHA
|
||||
JSR DrawSingleFloorEntrances
|
||||
|
||||
INC.b $02
|
||||
INC.b $02
|
||||
PLA
|
||||
DEC A
|
||||
JSR DrawSingleFloorEntrances
|
||||
|
||||
.done
|
||||
REP #$20
|
||||
PLA : STA.b $06
|
||||
PLY : PLX
|
||||
SEP #$30
|
||||
RTL
|
||||
|
||||
DrawSingleFloorEntrances:
|
||||
ASL A
|
||||
TAX
|
||||
|
||||
%ADD_MapMode()
|
||||
LDA.l MapDrawingData_floor_data_offset, X
|
||||
TAY
|
||||
STZ.b $06
|
||||
|
||||
%LDX_MapMode()
|
||||
|
||||
.next_room
|
||||
REP #$20
|
||||
LDA.b [$72], Y ; get room id
|
||||
AND.w #$00FF
|
||||
CMP.w #$000F ; $0F = empty room
|
||||
|
||||
BEQ +
|
||||
PHX
|
||||
JSR DrawSingleRoomEntrances
|
||||
PLX
|
||||
+
|
||||
|
||||
INY
|
||||
|
||||
SEP #$20
|
||||
INC.b $06
|
||||
LDA.b $06
|
||||
CMP.l MapDrawingData_column_count, X
|
||||
BCC .next_room
|
||||
|
||||
STZ.b $06
|
||||
- INC.b $07
|
||||
LDA.b $07
|
||||
CMP.l MapDrawingData_row_count, X
|
||||
BCC .next_room
|
||||
|
||||
.done
|
||||
REP #$20
|
||||
RTS
|
||||
|
||||
macro DrawSingleEntrance(offset)
|
||||
LDY.b $00
|
||||
LDA.b #$00
|
||||
STA.w OAMBufferAux, Y ; high x-bit and size bit
|
||||
TYA
|
||||
ASL #2
|
||||
TAY
|
||||
|
||||
LDA.b $06
|
||||
CPX.b #$02
|
||||
BNE ?+
|
||||
ASL A
|
||||
?+
|
||||
CLC : ADC.b $06
|
||||
ASL #3
|
||||
CLC : ADC.b #<offset>
|
||||
CLC : ADC.l MapDrawingData_sprite_offset_x_base, X
|
||||
STA.w OAMBuffer+0, Y
|
||||
|
||||
PHX
|
||||
LDA.b $07
|
||||
CPX.b #$02
|
||||
BNE ?+
|
||||
ASL A
|
||||
?+
|
||||
CLC : ADC.b $07
|
||||
ASL #3
|
||||
PHA
|
||||
|
||||
LDA.b $02
|
||||
%ADD_MapMode()
|
||||
|
||||
PLA
|
||||
CLC : ADC.l MapDrawingData_sprite_offset_y_base, X
|
||||
PLX
|
||||
CLC : ADC.b #$08
|
||||
CLC : ADC.w $0213
|
||||
SEC : SBC.b $E8
|
||||
STA.w OAMBuffer+1, Y
|
||||
|
||||
LDA.b #$33
|
||||
STA.w OAMBuffer+2, Y
|
||||
|
||||
LDA.b #$23
|
||||
STA.w OAMBuffer+3, Y
|
||||
|
||||
INC.b $00
|
||||
endmacro
|
||||
|
||||
DrawSingleRoomEntrances:
|
||||
STA.b $0E
|
||||
PHY
|
||||
|
||||
%LDY_MapMode()
|
||||
|
||||
SEP #$10
|
||||
|
||||
LDX.b #$FE
|
||||
.next_entry
|
||||
INX : INX
|
||||
LDA.l SupertileEntrances, X
|
||||
BPL +
|
||||
JMP .done
|
||||
+
|
||||
|
||||
AND.w #$0FFF
|
||||
CMP.b $0E
|
||||
BNE .next_entry
|
||||
|
||||
SEP #$20
|
||||
LDA.l SupertileEntrances+1, X
|
||||
TYX
|
||||
PHA : PHA
|
||||
|
||||
BIT.b #$40
|
||||
BEQ +
|
||||
%DrawSingleEntrance(0)
|
||||
+
|
||||
|
||||
PLA
|
||||
BIT.b #$20
|
||||
BEQ +
|
||||
%DrawSingleEntrance(4)
|
||||
+
|
||||
|
||||
PLA
|
||||
BIT.b #$10
|
||||
BEQ +
|
||||
%DrawSingleEntrance(8)
|
||||
+
|
||||
|
||||
.done
|
||||
REP #$30
|
||||
PLY
|
||||
RTS
|
||||
@@ -1,410 +0,0 @@
|
||||
CheckSwitchMap:
|
||||
LDA.l DRMode
|
||||
BEQ .not_fancy_door_map
|
||||
LDA.l DungeonMapMode
|
||||
BNE .not_fancy_door_map
|
||||
|
||||
; fancy door map
|
||||
SEP #$20
|
||||
LDA.b $F6
|
||||
BIT.b #$30
|
||||
BNE .change_dungeon
|
||||
|
||||
BIT.b #$80
|
||||
BNE .select_new_room
|
||||
|
||||
LDA.b $F4
|
||||
BIT.b #$80
|
||||
BNE .select_new_room
|
||||
|
||||
BIT.b #$20
|
||||
BNE .next_entrance
|
||||
|
||||
BIT.b #$40
|
||||
BNE .current_room
|
||||
|
||||
AND.b #$0F
|
||||
BEQ .doors_done
|
||||
BIT.b #$08 : BEQ + : LDA.b #$00 : BRA .doors_move_cursor : +
|
||||
BIT.b #$04 : BEQ + : LDA.b #$02 : BRA .doors_move_cursor : +
|
||||
BIT.b #$02 : BEQ + : LDA.b #$01 : BRA .doors_move_cursor : +
|
||||
LDA.b #$03
|
||||
|
||||
.doors_move_cursor
|
||||
STA.b $00
|
||||
JSL MoveDoorsMapCursor
|
||||
BRA .doors_done
|
||||
|
||||
.select_new_room
|
||||
JSL DoorsMapSelectCursor
|
||||
BRA .doors_done
|
||||
|
||||
.next_entrance
|
||||
JSL DoorsMapNextEntrance
|
||||
BRA .doors_done
|
||||
|
||||
.change_dungeon
|
||||
JSL DoorsMapChangeDungeon
|
||||
BRA .doors_done
|
||||
|
||||
.current_room
|
||||
LDA.l CachedDungeonID
|
||||
CMP.w DungeonID
|
||||
BNE .doors_done
|
||||
JSL DoorsMapCurrentRoom
|
||||
BRA .doors_done
|
||||
|
||||
.doors_done
|
||||
REP #$20
|
||||
LDA.w #$0002 ; ignore input! nothing to see here!
|
||||
RTL
|
||||
|
||||
.not_fancy_door_map
|
||||
SEP #$20
|
||||
LDA.b $F6
|
||||
AND.b #$30
|
||||
BNE +
|
||||
|
||||
; what we wrote over
|
||||
REP #$20
|
||||
LDA.w DungeonMapFloorCountData, X
|
||||
AND.w #$000F
|
||||
CLC : ADC.b $00
|
||||
RTL
|
||||
|
||||
+ PHA
|
||||
TXA
|
||||
ASL A
|
||||
TAX
|
||||
PLA
|
||||
BIT.b #$20
|
||||
BNE +
|
||||
INX
|
||||
+ LDA.l DungeonMapData.prev, X
|
||||
STA.w DungeonID
|
||||
|
||||
LDA.b #$04
|
||||
STA.w SubModuleInterface
|
||||
REP #$20
|
||||
LDA.w #$0000
|
||||
RTL
|
||||
|
||||
DungeonMapSwitch_Submodule:
|
||||
JSL $80893D
|
||||
JSL $80833F
|
||||
|
||||
LDA.b #$09
|
||||
STA.b $14
|
||||
STA.w $0710
|
||||
|
||||
LDA.b #$01
|
||||
STA.w SubModuleInterface
|
||||
STA.w $020D
|
||||
STZ.w $0213
|
||||
STZ.w $021B
|
||||
STZ.w $021C
|
||||
STZ.b $06
|
||||
STZ.b $07
|
||||
|
||||
LDA.w DungeonID
|
||||
CMP.l CachedDungeonID
|
||||
BEQ .current_dungeon
|
||||
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l DungeonMapData.floor, X
|
||||
STA.b CurrentFloor
|
||||
BRA .continue
|
||||
|
||||
.current_dungeon
|
||||
LDA.l CachedCurrentFloor
|
||||
STA.b CurrentFloor
|
||||
|
||||
.continue
|
||||
REP #$20
|
||||
STZ.b $E0
|
||||
STZ.b $E2
|
||||
STZ.b $E4
|
||||
STZ.b $E6
|
||||
STZ.b $E8
|
||||
STZ.b $EA
|
||||
JML $98BCA1
|
||||
|
||||
SkipMapSprites:
|
||||
STZ.b $00
|
||||
|
||||
LDA.b $02 : PHA
|
||||
LDA.b $03 : PHA
|
||||
LDA.b $04 : PHA
|
||||
|
||||
LDA.l DRMode
|
||||
BNE +
|
||||
LDA.w SubModuleInterface
|
||||
CMP.b #$04
|
||||
BEQ +
|
||||
JSL DrawEntrances
|
||||
+
|
||||
|
||||
PLA : STA.b $04
|
||||
PLA : STA.b $03
|
||||
PLA : STA.b $02
|
||||
|
||||
STZ.b $0E
|
||||
STZ.b $0F
|
||||
|
||||
LDA.w SubModuleInterface
|
||||
CMP.b #$04
|
||||
BNE +
|
||||
JML $8AEAFC
|
||||
+
|
||||
|
||||
LDA.l DRMode
|
||||
BEQ +
|
||||
LDA.l DungeonMapMode
|
||||
BEQ .no_vanilla_draw
|
||||
JML $8AEADE
|
||||
.no_vanilla_draw
|
||||
JSL DrawDoorsMapSprites
|
||||
JML $8AEAFC
|
||||
+
|
||||
|
||||
LDA.l CachedDungeonID
|
||||
CMP.w DungeonID
|
||||
BEQ +
|
||||
JML $8AEAF3
|
||||
+ JML $8AEADE
|
||||
|
||||
CacheCurrentDungeon:
|
||||
STA.l $7EC206
|
||||
SEP #$20
|
||||
LDA.w DungeonID
|
||||
STA.l CachedDungeonID
|
||||
LDA.b CurrentFloor
|
||||
STA.l CachedCurrentFloor
|
||||
|
||||
LDA.l DRMode
|
||||
BEQ +
|
||||
|
||||
LDA.w DungeonID
|
||||
PHX
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l DungeonMapData.floor, X
|
||||
STA.b $A4
|
||||
PLX
|
||||
|
||||
+
|
||||
REP #$20
|
||||
RTL
|
||||
|
||||
RestoreCurrentDungeon:
|
||||
LDA.b #$F3
|
||||
STA.w $012C ; what we wrote over
|
||||
LDA.l CachedDungeonID
|
||||
STA.w DungeonID
|
||||
LDA.l CachedCurrentFloor
|
||||
STA.b CurrentFloor
|
||||
RTL
|
||||
|
||||
RestoreDungeonMapFloorIndex:
|
||||
STZ.w $020F ; first part we wrote over
|
||||
|
||||
LDA.w $021B
|
||||
STA.b $07
|
||||
STZ.b $06
|
||||
|
||||
LDA.b $0A ; the rest of what we wrote over
|
||||
AND.b #$08
|
||||
RTL
|
||||
|
||||
DrawDungeonLabel:
|
||||
LDY.b #$00
|
||||
LDA.w DungeonID
|
||||
ASL A
|
||||
TAX
|
||||
LDA.b NMISTRIPES
|
||||
BEQ +
|
||||
LDY.b #$20
|
||||
+
|
||||
|
||||
; Dungeon Label
|
||||
REP #$20
|
||||
LDA.w #$E660
|
||||
STA.w GFXStripes+$02, Y
|
||||
LDA.w #$0300
|
||||
STA.w GFXStripes+$04, Y
|
||||
|
||||
LDA.l DungeonLabels+0, X
|
||||
STA.w GFXStripes+$06, Y
|
||||
LDA.l DungeonLabels+2, X
|
||||
STA.w GFXStripes+$08, Y
|
||||
|
||||
TYA
|
||||
CLC : ADC.w #$0008
|
||||
TAY
|
||||
|
||||
; L/R switch indicators
|
||||
LDA.w #$E310
|
||||
STA.w GFXStripes+$02, Y
|
||||
LDA.w #$E910
|
||||
STA.w GFXStripes+$0A, Y
|
||||
LDA.w #$E318
|
||||
STA.w GFXStripes+$12, Y
|
||||
LDA.w #$E918
|
||||
STA.w GFXStripes+$1A, Y
|
||||
|
||||
LDA.w #$0300
|
||||
STA.w GFXStripes+$04, Y
|
||||
STA.w GFXStripes+$0C, Y
|
||||
STA.w GFXStripes+$14, Y
|
||||
STA.w GFXStripes+$1C, Y
|
||||
|
||||
LDA.w #$49AF
|
||||
STA.w GFXStripes+$06, Y
|
||||
STA.w GFXStripes+$16, Y
|
||||
LDA.w #$099E
|
||||
STA.w GFXStripes+$08, Y
|
||||
STA.w GFXStripes+$18, Y
|
||||
|
||||
LDA.w #$099F
|
||||
STA.w GFXStripes+$0E, Y
|
||||
STA.w GFXStripes+$1E, Y
|
||||
LDA.w #$09AF
|
||||
STA.w GFXStripes+$10, Y
|
||||
STA.w GFXStripes+$20, Y
|
||||
|
||||
TYA
|
||||
CLC : ADC.w #$0020
|
||||
TAY
|
||||
|
||||
LDA.l DRMode
|
||||
BEQ .not_doors
|
||||
LDA.l DungeonMapMode
|
||||
BEQ .doors
|
||||
.not_doors
|
||||
JMP .skip_doors
|
||||
|
||||
.doors
|
||||
; Select for Next Entrance indicator
|
||||
LDA.w #$E311
|
||||
STA.w GFXStripes+$02, Y
|
||||
LDA.w #$E319
|
||||
STA.w GFXStripes+$16, Y
|
||||
|
||||
LDA.w #$0F00
|
||||
STA.w GFXStripes+$04, Y
|
||||
STA.w GFXStripes+$18, Y
|
||||
|
||||
LDA.w #$09B8
|
||||
LDX.b #$07
|
||||
-
|
||||
STA.w GFXStripes+$06, Y
|
||||
STA.w GFXStripes+$1A, Y
|
||||
INC A
|
||||
INY : INY
|
||||
DEX
|
||||
BPL -
|
||||
|
||||
TYA
|
||||
CLC : ADC.w #$0018
|
||||
TAY
|
||||
|
||||
LDA.l CachedDungeonID
|
||||
AND.w #$00FF
|
||||
CMP.w DungeonID
|
||||
BNE .skip_doors
|
||||
|
||||
; Y for Current Location indicator
|
||||
LDA.w #$A411
|
||||
STA.w GFXStripes+$02, Y
|
||||
LDA.w #$A419
|
||||
STA.w GFXStripes+$12, Y
|
||||
|
||||
LDA.w #$0B00
|
||||
STA.w GFXStripes+$04, Y
|
||||
STA.w GFXStripes+$14, Y
|
||||
|
||||
LDA.w #$09A9
|
||||
LDX.b #$05
|
||||
-
|
||||
STA.w GFXStripes+$06, Y
|
||||
STA.w GFXStripes+$16, Y
|
||||
INC A
|
||||
INY : INY
|
||||
DEX
|
||||
BPL -
|
||||
|
||||
TYA
|
||||
CLC : ADC.w #$0014
|
||||
TAY
|
||||
|
||||
.skip_doors
|
||||
SEP #$20
|
||||
LDA.b #$FF
|
||||
STA.w GFXStripes+$02, Y
|
||||
LDA.b #$01
|
||||
STA.b NMISTRIPES
|
||||
|
||||
INC.w $020D ; what we wrote over
|
||||
RTL
|
||||
|
||||
StartCurrentRoomSearch:
|
||||
LDA.w DungeonMapFloorCountData, X
|
||||
LSR A : LSR A : LSR A : LSR A
|
||||
STA.b $00
|
||||
LDA.w DungeonMapFloorCountData, X
|
||||
AND.b #$0F
|
||||
CLC : ADC.b $00
|
||||
ASL A
|
||||
TAY
|
||||
RTL
|
||||
|
||||
FindCurrentRoom:
|
||||
PHX
|
||||
TYA
|
||||
%ADD_MapMode()
|
||||
LDA.l MapDrawingData_floor_data_offset, X
|
||||
STA.b $0C
|
||||
LDY.w #$0000
|
||||
|
||||
%LDX_MapMode()
|
||||
|
||||
SEP #$20
|
||||
|
||||
.next_room_check
|
||||
CPY.b $0C
|
||||
BCS .not_found
|
||||
|
||||
LDA.b [$72], Y
|
||||
INY
|
||||
CMP.b $0E
|
||||
BEQ .found
|
||||
|
||||
LDA.b $00
|
||||
CMP.l MapDrawingData_floor_pixel_column_wrap, X
|
||||
BCS .next_row
|
||||
CLC : ADC.l MapDrawingData_supertile_pixel_spacing, X
|
||||
STA.b $00
|
||||
BRA .next_room_check
|
||||
|
||||
.next_row
|
||||
STZ.b $00
|
||||
|
||||
LDA.b $02
|
||||
CMP.l MapDrawingData_floor_pixel_row_wrap, X
|
||||
BCS .next_floor
|
||||
CLC : ADC.l MapDrawingData_supertile_pixel_spacing, X
|
||||
STA.b $02
|
||||
BRA .next_room_check
|
||||
|
||||
.next_floor
|
||||
STZ.b $02
|
||||
BRA .next_room_check
|
||||
|
||||
.found
|
||||
PLX
|
||||
JML $8AE891
|
||||
|
||||
.not_found
|
||||
PLX
|
||||
JML $8AE8CD
|
||||
@@ -1,269 +0,0 @@
|
||||
; move aga boss icon to correct room
|
||||
org $8AEE75
|
||||
db $08
|
||||
|
||||
; use AA1 = $1C for map stuff
|
||||
org $80E193
|
||||
skip 4
|
||||
db $61, $62, $63, $D6
|
||||
|
||||
org $8AE11D
|
||||
LDA.b #$1C
|
||||
|
||||
org $8AE12B
|
||||
LDA.b #$20
|
||||
|
||||
; dungeon map sheets
|
||||
org $80DD97
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
db $61, $56, $57, $62
|
||||
|
||||
; unused chest data
|
||||
org $81E9A5
|
||||
dw $000F ; freezor room, second chest (only one chest in supertile)
|
||||
|
||||
org $81EA6E
|
||||
dw $000F ; mire spike room, second chest (only one chest in supertile)
|
||||
|
||||
org $81EAF8
|
||||
dw $000F ; GT button/switch/bladetrap room (no chest in supertile)
|
||||
|
||||
; Dungeon Map Palettes 2-5 left half
|
||||
org $9BE544
|
||||
dw $0000, $71E7, $7FFF, $3B5F, $0000, $0000, $7EB5, $1CE7
|
||||
|
||||
org $9BE564
|
||||
dw $0000, $5565, $7FFF, $331C, $0000, $0000, $7E27, $0C63
|
||||
|
||||
org $9BE584
|
||||
dw $0000, $4100, $7FFF, $2656, $4100, $0000, $4100, $4100
|
||||
|
||||
org $9BE5A4
|
||||
dw $0000, $34E0, $7FFF, $34E0, $34E0, $0000, $34E0, $34E0
|
||||
|
||||
; move BG1 to main screen in dungeon map screen
|
||||
org $8AE130
|
||||
LDA.b #$17 : STA.b $1C
|
||||
LDA.b #$00 : STA.b $1D
|
||||
|
||||
; make skull icon blink opposite our loot icons
|
||||
org $8AEE2B
|
||||
AND.b #$10
|
||||
NOP #2
|
||||
db $F0 ; BEQ to replace BCS
|
||||
|
||||
;================================================================================
|
||||
; Overhaul of Dungeon Map Screen
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8AE64D
|
||||
PLX
|
||||
JML NormalDrawDungeonMapRoom
|
||||
|
||||
org $8AE606
|
||||
PLX
|
||||
JML DrawNonexistentRoom
|
||||
|
||||
org $8AE152
|
||||
JSL LoadLastHUDPalette
|
||||
|
||||
org $808BD3
|
||||
JSL LoadStripes
|
||||
BRA + : NOP #9 : +
|
||||
|
||||
org $8AEAE8 ; vanilla checks number of sprites drawn instead of... counting...
|
||||
LDA.b $0E
|
||||
CMP.b #$02
|
||||
|
||||
;================================================================================
|
||||
; Swapping Dungeon in Dungeon Map Screen (L/R)
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8AE9A7
|
||||
JSL CheckSwitchMap
|
||||
BRA + : NOP #3 : +
|
||||
|
||||
org $8AEF06
|
||||
DEC.b $13
|
||||
BNE +
|
||||
JML DungeonMapSwitch_Submodule
|
||||
+ RTL
|
||||
warnpc $8AEF29
|
||||
|
||||
org $8AEADA
|
||||
JML SkipMapSprites
|
||||
|
||||
org $8AE9C7
|
||||
JSL RestoreDungeonMapFloorIndex
|
||||
NOP
|
||||
|
||||
org $98BC86
|
||||
JSL CacheCurrentDungeon
|
||||
|
||||
org $8AEFC5
|
||||
JSL RestoreCurrentDungeon
|
||||
NOP
|
||||
|
||||
org $8AE1EC
|
||||
PLB
|
||||
JML DrawDungeonLabel
|
||||
|
||||
org $8AE83E
|
||||
JSL StartCurrentRoomSearch
|
||||
BRA + : NOP #6 : +
|
||||
|
||||
org $8AE86C
|
||||
JML FindCurrentRoom
|
||||
padbyte $EA
|
||||
pad $8AE891
|
||||
|
||||
org $8AEBF8
|
||||
LDA.w $0217
|
||||
SEC : SBC.b $0F
|
||||
BMI +
|
||||
CMP.b #$18
|
||||
BCS +
|
||||
skip 7
|
||||
+
|
||||
|
||||
org $8AEB9A
|
||||
db -8, 8, -8, 8
|
||||
db -8, -8, 8, 8
|
||||
|
||||
;================================================================================
|
||||
; Show indicators of what is left in each room
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8AEABA
|
||||
JSL RedrawLoot
|
||||
NOP
|
||||
|
||||
org $8AE42B
|
||||
JSL FirstDrawLoot
|
||||
|
||||
;================================================================================
|
||||
; Blink indicators of what is left in each room
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8AE964
|
||||
JSL BlinkLoot
|
||||
|
||||
org $8AE235
|
||||
JSL WriteBigEndianAddressX
|
||||
org $8AE290
|
||||
JSL WriteBigEndianAddressY
|
||||
org $8AE350
|
||||
JSL WriteBigEndianAddressY
|
||||
|
||||
org $8AE206
|
||||
JSL StartDoubleWrite
|
||||
NOP
|
||||
|
||||
org $8AE2E0
|
||||
JML CheckDoubleWrite
|
||||
NOP
|
||||
|
||||
org $8AE21C
|
||||
JSL DrawMountain
|
||||
BRA + : NOP #9 : +
|
||||
|
||||
;================================================================================
|
||||
; Custom Door Rando Maps
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8AE590
|
||||
JSL PrepDrawRow
|
||||
BRA + : NOP #5 : +
|
||||
|
||||
org $8AE5F2
|
||||
JSR LoadDungeonMapRoomPointer_0A
|
||||
STA.b $72
|
||||
|
||||
org $8AE600
|
||||
LDA.b [$72], Y
|
||||
|
||||
org $8AE634
|
||||
JSR LoadDungeonMapRoomPointer_0A
|
||||
STA.b $72
|
||||
|
||||
org $8AE63B
|
||||
LDA.b [$72], Y
|
||||
|
||||
org $8AE867
|
||||
JSR LoadDungeonMapRoomPointer_0A
|
||||
STA.b $72
|
||||
|
||||
org $8AE872
|
||||
LDA.b [$72], Y
|
||||
|
||||
org $8AE8DD
|
||||
JSR LoadDungeonMapRoomPointer_0A
|
||||
|
||||
org $8AE8E4
|
||||
STA.b $72
|
||||
|
||||
org $8AE8F9
|
||||
LDA.b [$72], Y
|
||||
|
||||
org $8AEBC6
|
||||
JSL GetLocationMarkerLeft
|
||||
NOP
|
||||
|
||||
;================================================================================
|
||||
; Draw Wacky Door Rando Layouts
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8AE3D7
|
||||
LDA.l DungeonMapMode
|
||||
BNE .normal
|
||||
LDA.l DRMode
|
||||
BEQ .normal
|
||||
|
||||
JSL DrawWackyDoorRandoStuff
|
||||
JMP.w $8AE422
|
||||
NOP
|
||||
|
||||
.normal
|
||||
warnpc $8AE3EB
|
||||
|
||||
org $8AE439
|
||||
dw $0F19, $4F19, $8F19, $CF19
|
||||
|
||||
org $8AE449
|
||||
dw $0F1A, $8F1A
|
||||
|
||||
org $8AE451
|
||||
dw $0F1B, $4F1B
|
||||
|
||||
org $8AE473
|
||||
NOP #2
|
||||
|
||||
org $8AE4A4
|
||||
NOP #2
|
||||
|
||||
org $8AE4DC
|
||||
NOP #2
|
||||
|
||||
org $8AE4F9
|
||||
dw $0F1E, $0F1F, $0F20, $0F21
|
||||
dw $0F22, $0F23, $0F24, $0F25
|
||||
|
||||
org $8AE539
|
||||
LDA.w #$0F1C
|
||||
|
||||
org $8AE573
|
||||
LDA.w #$0F1D
|
||||
|
||||
org $8AE555
|
||||
NOP #2
|
||||
|
||||
org $8AE576
|
||||
NOP #2
|
||||
@@ -1,40 +0,0 @@
|
||||
pushpc
|
||||
incsrc hooks.asm
|
||||
|
||||
macro WriteGFXSheetPointer(sheet, location)
|
||||
pushpc
|
||||
org $80CFC0+<sheet>
|
||||
db <location>>>16
|
||||
|
||||
org $80D09F+<sheet>
|
||||
db <location>>>8
|
||||
|
||||
org $80D17E+<sheet>
|
||||
db <location>>>0
|
||||
pullpc
|
||||
endmacro
|
||||
|
||||
%WriteGFXSheetPointer($C9, DungeonMapIcons1)
|
||||
%WriteGFXSheetPointer($CA, DungeonMapIcons2)
|
||||
%WriteGFXSheetPointer($D5, DungeonMapIcons3)
|
||||
%WriteGFXSheetPointer($D4, MapSheetD4)
|
||||
%WriteGFXSheetPointer($D6, DungeonMapDoorConnectors)
|
||||
|
||||
%WriteGFXSheetPointer($61, DungeonMapIcons4)
|
||||
%WriteGFXSheetPointer($62, DungeonMapIcons5)
|
||||
%WriteGFXSheetPointer($63, DungeonMapIcons6)
|
||||
|
||||
pullpc
|
||||
|
||||
incsrc mappable_doors.asm
|
||||
incsrc current_room_map.asm
|
||||
incsrc draw_rooms.asm
|
||||
incsrc map_bg3.asm
|
||||
incsrc dungeon_switch.asm
|
||||
incsrc draw_loot.asm
|
||||
incsrc check_loot.asm
|
||||
incsrc blink_loot.asm
|
||||
incsrc data/doors_display.asm
|
||||
incsrc data/spiral_stairs.asm
|
||||
incsrc data/fall_warps.asm
|
||||
incsrc data/split_room.asm
|
||||
@@ -1,280 +0,0 @@
|
||||
LoadStripes:
|
||||
CPY.b #$09
|
||||
BEQ .dungeon_map
|
||||
.not_dungeon_map
|
||||
LDA.w $80937A, Y
|
||||
STA.b $00
|
||||
LDA.w $809383,Y
|
||||
STA.b $01
|
||||
LDA.w $80938C,Y
|
||||
STA.b $02
|
||||
RTL
|
||||
|
||||
.dungeon_map
|
||||
LDA.l DungeonMapMode
|
||||
BNE .4x3
|
||||
LDA.l DRMode
|
||||
BNE .6x6
|
||||
|
||||
.5x5
|
||||
LDA.b #BG3DungeonMap5x5Stripes>>0
|
||||
STA.b $00
|
||||
LDA.b #BG3DungeonMap5x5Stripes>>8
|
||||
STA.b $01
|
||||
LDA.b #BG3DungeonMap5x5Stripes>>16
|
||||
STA.b $02
|
||||
RTL
|
||||
|
||||
.4x3
|
||||
LDA.b #BG3DungeonMap4x3Stripes>>0
|
||||
STA.b $00
|
||||
LDA.b #BG3DungeonMap4x3Stripes>>8
|
||||
STA.b $01
|
||||
LDA.b #BG3DungeonMap4x3Stripes>>16
|
||||
STA.b $02
|
||||
RTL
|
||||
|
||||
.6x6
|
||||
LDA.b #BG3DungeonMap6x6Stripes>>0
|
||||
STA.b $00
|
||||
LDA.b #BG3DungeonMap6x6Stripes>>8
|
||||
STA.b $01
|
||||
LDA.b #BG3DungeonMap6x6Stripes>>16
|
||||
STA.b $02
|
||||
RTL
|
||||
|
||||
LoadLastHUDPalette:
|
||||
; what we wrote over
|
||||
JSL $9BEE52
|
||||
|
||||
REP #$20
|
||||
LDA.l MapHUDPalette
|
||||
STA.l PaletteBuffer+$3A
|
||||
LDA.l MapHUDPalette+2
|
||||
STA.l PaletteBuffer+$3C
|
||||
LDA.l MapHUDPalette+4
|
||||
STA.l PaletteBuffer+$3E
|
||||
SEP #$20
|
||||
RTL
|
||||
|
||||
macro VanillaCommonMapStripes()
|
||||
dw $4260, $0100, $2100
|
||||
dw $4360, $0E40, $2101
|
||||
dw $4B60, $0100, $6100
|
||||
dw $6260, $2EC0, $2110
|
||||
dw $6B60, $2EC0, $6110
|
||||
dw $6263, $0100, $A100
|
||||
dw $6363, $0E40, $A101
|
||||
dw $6B63, $0100, $E100
|
||||
dw $8460, $0B00, $2102, $2103, $2104, $2105, $2106, $2107
|
||||
dw $A460, $0B00, $2112, $2113, $2114, $2115, $2116, $2117
|
||||
dw $5D60, $0100, $6100
|
||||
dw $7D60, $2EC0, $6110
|
||||
dw $7D63, $0100, $E100
|
||||
dw $0060, $7E40, $2111
|
||||
dw $8063, $3E41, $2111
|
||||
dw $0060, $3EC0, $2111
|
||||
dw $0160, $3EC0, $2111
|
||||
dw $0C60, $3EC0, $2111
|
||||
dw $0D60, $3EC0, $2111
|
||||
dw $1E60, $3EC0, $2111
|
||||
dw $1F60, $3EC0, $2111
|
||||
endmacro
|
||||
|
||||
|
||||
BG3DungeonMap5x5Stripes:
|
||||
%VanillaCommonMapStripes()
|
||||
; left edge of map border, from vanilla
|
||||
dw $4E60, $0100, $2100
|
||||
dw $4F60, $1A40, $2101
|
||||
dw $6E60, $2EC0, $2110
|
||||
dw $6E63, $0100, $A100
|
||||
dw $6F63, $1A40, $A101
|
||||
|
||||
; horizontal borders
|
||||
dw $7260, $1240, $1D11
|
||||
dw $D261, $1240, $1D11
|
||||
dw $F261, $1240, $1D11
|
||||
dw $5263, $1240, $1D11
|
||||
|
||||
; vertical borders
|
||||
dw $7160, $2EC0, $1D11
|
||||
dw $7C60, $2EC0, $1D11
|
||||
|
||||
macro TopOfSquares(start)
|
||||
; silly Big Endian
|
||||
db <start>>>8, <start>, $00, $13
|
||||
dw $5D4C, $1D4C, $5D4C, $1D4C, $5D4C, $1D4C, $5D4C, $1D4C, $5D4C, $1D4C
|
||||
endmacro
|
||||
|
||||
macro BottomOfSquares(start)
|
||||
; silly Big Endian
|
||||
db <start>>>8, <start>, $00, $13
|
||||
dw $DD4C, $9D4C, $DD4C, $9D4C, $DD4C, $9D4C, $DD4C, $9D4C, $DD4C, $9D4C
|
||||
endmacro
|
||||
|
||||
macro FullRow(start)
|
||||
%TopOfSquares(<start>)
|
||||
%BottomOfSquares(<start>+$20)
|
||||
endmacro
|
||||
|
||||
; top grid
|
||||
%FullRow($6092)
|
||||
%FullRow($60D2)
|
||||
%FullRow($6112)
|
||||
%FullRow($6152)
|
||||
%FullRow($6192)
|
||||
|
||||
%FullRow($6212)
|
||||
%FullRow($6252)
|
||||
%FullRow($6292)
|
||||
%FullRow($62D2)
|
||||
%FullRow($6312)
|
||||
|
||||
db $FF
|
||||
|
||||
BG3DungeonMap4x3Stripes:
|
||||
%VanillaCommonMapStripes()
|
||||
; left edge of map border, adjusted from vanilla
|
||||
dw $4D60, $0100, $2100
|
||||
dw $4E60, $1C40, $2101
|
||||
dw $6D60, $2EC0, $2110
|
||||
dw $6D63, $0100, $A100
|
||||
dw $6E63, $1C40, $A101
|
||||
|
||||
; horizontal borders
|
||||
dw $B160, $1440, $1D11
|
||||
dw $1161, $1440, $1D11
|
||||
dw $7161, $1440, $1D11
|
||||
dw $D161, $1440, $1D11
|
||||
dw $3162, $1440, $1D11
|
||||
dw $9162, $1440, $1D11
|
||||
dw $F162, $1440, $1D11
|
||||
dw $5163, $1440, $1D11
|
||||
|
||||
; vertical borders
|
||||
dw $B060, $12C0, $1D11
|
||||
dw $BC60, $12C0, $1D11
|
||||
dw $3062, $12C0, $1D11
|
||||
dw $3C62, $12C0, $1D11
|
||||
|
||||
macro TopOfDoorSquares(start)
|
||||
; silly Big Endian
|
||||
db <start>>>8, <start>, $00, $15
|
||||
dw $5D4C, $1D4C, $1D11, $5D4C, $1D4C, $1D11, $5D4C, $1D4C, $1D11, $5D4C, $1D4C
|
||||
endmacro
|
||||
|
||||
macro BottomOfDoorSquares(start)
|
||||
; silly Big Endian
|
||||
db <start>>>8, <start>, $00, $15
|
||||
dw $DD4C, $9D4C, $1D11, $DD4C, $9D4C, $1D11, $DD4C, $9D4C, $1D11, $DD4C, $9D4C
|
||||
endmacro
|
||||
|
||||
macro FullDoorRow(start)
|
||||
%TopOfDoorSquares(<start>)
|
||||
%BottomOfDoorSquares(<start>+$20)
|
||||
endmacro
|
||||
|
||||
; top grid
|
||||
%FullDoorRow($60D1)
|
||||
%FullDoorRow($6131)
|
||||
%FullDoorRow($6191)
|
||||
|
||||
%FullDoorRow($6251)
|
||||
%FullDoorRow($62B1)
|
||||
%FullDoorRow($6311)
|
||||
|
||||
db $FF
|
||||
|
||||
BG3DungeonMap6x6Stripes:
|
||||
; vanilla
|
||||
dw $4260, $0100, $2100
|
||||
dw $4360, $0E40, $2101
|
||||
dw $4B60, $0100, $6100
|
||||
dw $8460, $0B00, $2102, $2103, $2104, $2105, $2106, $2107
|
||||
dw $A460, $0B00, $2112, $2113, $2114, $2115, $2116, $2117
|
||||
dw $0060, $7E40, $2111
|
||||
dw $8063, $3E41, $2111
|
||||
dw $0060, $3EC0, $2111
|
||||
dw $0160, $3EC0, $2111
|
||||
dw $0C60, $3EC0, $2111
|
||||
dw $0D60, $3EC0, $2111
|
||||
dw $1E60, $3EC0, $2111
|
||||
dw $1F60, $3EC0, $2111
|
||||
|
||||
; left side border
|
||||
dw $6260, $1AC0, $2110
|
||||
dw $6B60, $1AC0, $6110
|
||||
dw $2262, $0100, $A100
|
||||
dw $2362, $0E40, $A101
|
||||
dw $2B62, $0100, $E100
|
||||
|
||||
; right side top area border
|
||||
dw $4E60, $0100, $2100
|
||||
dw $4F60, $1A40, $2101
|
||||
dw $5D60, $0100, $6100
|
||||
dw $6E60, $1AC0, $2110
|
||||
dw $7D60, $1AC0, $6110
|
||||
dw $2E62, $0100, $A100
|
||||
dw $2F62, $1A40, $A101
|
||||
dw $3D62, $0100, $E100
|
||||
|
||||
; right side bottom area border
|
||||
dw $8E62, $0100, $2100
|
||||
dw $8F62, $1A40, $2101
|
||||
dw $9D62, $0100, $6100
|
||||
dw $AE62, $06C0, $2110
|
||||
dw $BD62, $06C0, $6110
|
||||
dw $2E63, $0100, $A100
|
||||
dw $2F63, $1A40, $A101
|
||||
dw $3D63, $0100, $E100
|
||||
|
||||
; blank below left side
|
||||
dw $4262, $4440, $2111
|
||||
dw $6262, $4440, $2111
|
||||
|
||||
dw $8262, $1240, $2111
|
||||
dw $A262, $1240, $2111
|
||||
dw $C262, $1240, $2111
|
||||
dw $E262, $1240, $2111
|
||||
dw $0263, $1240, $2111
|
||||
dw $2263, $1240, $2111
|
||||
|
||||
dw $4263, $4440, $2111
|
||||
dw $6263, $4440, $2111
|
||||
|
||||
; map area inside top area
|
||||
dw $6F60, $1A40, $1D11
|
||||
dw $8F60, $1A40, $1D11
|
||||
dw $AF60, $1A40, $1D11
|
||||
dw $CF60, $1A40, $1D11
|
||||
dw $EF60, $1A40, $1D11
|
||||
dw $0F61, $1A40, $1D11
|
||||
dw $2F61, $1A40, $1D11
|
||||
dw $4F61, $1A40, $1D11
|
||||
dw $6F61, $1A40, $1D11
|
||||
dw $8F61, $1A40, $1D11
|
||||
dw $AF61, $1A40, $1D11
|
||||
dw $CF61, $1A40, $1D11
|
||||
dw $EF61, $1A40, $1D11
|
||||
dw $0F62, $1A40, $1D11
|
||||
|
||||
; center square
|
||||
dw $3561, $0300
|
||||
dw $5D4C, $1D4C
|
||||
|
||||
dw $5561, $0300
|
||||
dw $DD4C, $9D4C
|
||||
|
||||
; map area inside bottom area
|
||||
dw $AF62, $1A40, $1D11
|
||||
|
||||
dw $CF62, $1B00
|
||||
dw $1D11, $5D4C, $1D4C, $1D11, $5D4C, $1D4C, $1D11, $5D4C, $1D4C, $1D11, $1D11, $5D4C, $1D4C, $1D11
|
||||
|
||||
dw $EF62, $1B00
|
||||
dw $1D11, $DD4C, $9D4C, $1D11, $DD4C, $9D4C, $1D11, $DD4C, $9D4C, $1D11, $1D11, $DD4C, $9D4C, $1D11
|
||||
|
||||
dw $0F63, $1A40, $1D11
|
||||
|
||||
db $FF
|
||||
@@ -1,474 +0,0 @@
|
||||
MapDrawingData:
|
||||
.floor_data_offset
|
||||
dw $0000, $0000
|
||||
dw $0019, $000C
|
||||
dw $0032, $0018
|
||||
dw $004B, $0024
|
||||
dw $0064, $0030
|
||||
dw $007D, $003C
|
||||
dw $0096, $0048
|
||||
dw $00AF, $0054
|
||||
dw $00C8, $0060
|
||||
|
||||
.row_data_offset
|
||||
dw $0000, $0000
|
||||
dw $0005, $0004
|
||||
dw $000A, $0008
|
||||
dw $000F, $000C
|
||||
dw $0014, $0010
|
||||
|
||||
.corner_tile_address
|
||||
dw $00E2, $0160
|
||||
dw $00F8, $0178
|
||||
dw $03A2, $03A0
|
||||
dw $03B8, $03B8
|
||||
|
||||
.row_tile_address
|
||||
dw $00E4, $0162
|
||||
dw $03A4, $03A2
|
||||
|
||||
.row_tile_length
|
||||
dw $0014, $0016
|
||||
|
||||
.column_tile_address
|
||||
dw $0122, $01A0
|
||||
dw $0138, $01B8
|
||||
|
||||
.column_tile_length
|
||||
dw $0280, $0200
|
||||
|
||||
.floor_label_address
|
||||
dw $035E, $035C
|
||||
|
||||
.row_start_address
|
||||
dw $0124, $01A2
|
||||
dw $01A4, $0262
|
||||
dw $0224, $0322
|
||||
dw $02A4, $03D2
|
||||
dw $0324, $04A2
|
||||
|
||||
.column_count
|
||||
dw $0005, $0004
|
||||
|
||||
.column_spacing
|
||||
dw $0004, $0006
|
||||
|
||||
.row_count
|
||||
dw $0005, $0003
|
||||
|
||||
.bg1_grid_start
|
||||
dw $1091, $10D1
|
||||
|
||||
.sprite_offset_x_base
|
||||
dw $0090, $0088
|
||||
|
||||
.sprite_offset_y_base
|
||||
dw $001F, $002F
|
||||
dw $007F, $008F
|
||||
|
||||
.entrance_sprite_offset_y_base
|
||||
dw $0087, $0097
|
||||
|
||||
.supertile_pixel_spacing
|
||||
dw $0010, $0018
|
||||
|
||||
.floor_pixel_column_wrap
|
||||
dw $0040, $0048
|
||||
|
||||
.floor_pixel_row_wrap
|
||||
dw $0040, $0030
|
||||
|
||||
CustomMapDrawingData:
|
||||
.column_wrap
|
||||
dw $0003
|
||||
.column_count
|
||||
dw $0004
|
||||
.row_wrap
|
||||
dw $0002
|
||||
|
||||
.floor_connection_data_offset
|
||||
dw $0000
|
||||
dw $0011
|
||||
dw $0022
|
||||
dw $0033
|
||||
dw $0044
|
||||
dw $0055
|
||||
dw $0066
|
||||
dw $0077
|
||||
dw $0088
|
||||
|
||||
.row_connection_data_offset
|
||||
dw $0000
|
||||
dw $0007
|
||||
dw $000E
|
||||
dw $0015
|
||||
|
||||
macro LDA_MapMode()
|
||||
LDA.l DungeonMapMode
|
||||
ASL A
|
||||
endmacro
|
||||
|
||||
macro LDX_MapMode()
|
||||
%LDA_MapMode()
|
||||
TAX
|
||||
endmacro
|
||||
|
||||
macro LDY_MapMode()
|
||||
%LDA_MapMode()
|
||||
TAY
|
||||
endmacro
|
||||
|
||||
macro ADD_MapMode()
|
||||
CLC : ADC.l DungeonMapMode
|
||||
ASL A
|
||||
TAX
|
||||
endmacro
|
||||
|
||||
macro Map_LDA(addr, label)
|
||||
pushpc
|
||||
org <addr>
|
||||
JSR LDA_<label>
|
||||
pullpc
|
||||
|
||||
if not(defined("LDA_<label>"))
|
||||
!LDA_<label> = 1
|
||||
LDA_<label>:
|
||||
PHX
|
||||
%LDX_MapMode()
|
||||
LDA.l MapDrawingData_<label>, X
|
||||
PLX
|
||||
RTS
|
||||
endif
|
||||
endmacro
|
||||
|
||||
macro Map_LDAY(addr, label)
|
||||
pushpc
|
||||
org <addr>
|
||||
JSR LDA_Y_<label>
|
||||
pullpc
|
||||
|
||||
if not(defined("LDA_Y_<label>"))
|
||||
!LDA_Y_<label> = 1
|
||||
LDA_Y_<label>:
|
||||
PHX
|
||||
TYA
|
||||
%ADD_MapMode()
|
||||
LDA.l MapDrawingData_<label>, X
|
||||
PLX
|
||||
RTS
|
||||
endif
|
||||
endmacro
|
||||
|
||||
macro Map_LDAX(addr, label)
|
||||
pushpc
|
||||
org <addr>
|
||||
JSR LDA_X_<label>
|
||||
pullpc
|
||||
|
||||
if not(defined("LDA_X_<label>"))
|
||||
!LDA_X_<label> = 1
|
||||
LDA_X_<label>:
|
||||
PHX
|
||||
TXA
|
||||
%ADD_MapMode()
|
||||
LDA.l MapDrawingData_<label>, X
|
||||
PLX
|
||||
RTS
|
||||
endif
|
||||
endmacro
|
||||
|
||||
macro Map_CMP(addr, label)
|
||||
pushpc
|
||||
org <addr>
|
||||
JSR CMP_<label>
|
||||
pullpc
|
||||
|
||||
if not(defined("CMP_<label>"))
|
||||
!CMP_<label> = 1
|
||||
CMP_<label>:
|
||||
PHX
|
||||
PHA
|
||||
%LDX_MapMode()
|
||||
PLA
|
||||
CMP.l MapDrawingData_<label>, X
|
||||
BEQ .z_flag_set
|
||||
.z_flag_clear
|
||||
PLX
|
||||
REP #$02
|
||||
RTS
|
||||
.z_flag_set
|
||||
PLX
|
||||
SEP #$02
|
||||
RTS
|
||||
endif
|
||||
endmacro
|
||||
|
||||
macro Map_ADD(addr, label)
|
||||
pushpc
|
||||
org <addr>
|
||||
JSR ADD_<label>
|
||||
pullpc
|
||||
|
||||
if not(defined("ADD_<label>"))
|
||||
!ADD_<label> = 1
|
||||
ADD_<label>:
|
||||
PHX
|
||||
PHA
|
||||
%LDX_MapMode()
|
||||
PLA
|
||||
CLC : ADC.l MapDrawingData_<label>, X
|
||||
PLX
|
||||
RTS
|
||||
endif
|
||||
endmacro
|
||||
|
||||
macro Map_ADDY(addr, label)
|
||||
pushpc
|
||||
org <addr>
|
||||
JSR ADD_Y_<label>
|
||||
pullpc
|
||||
|
||||
if not(defined("ADD_Y_<label>"))
|
||||
!ADD_Y_<label> = 1
|
||||
ADD_Y_<label>:
|
||||
PHX
|
||||
PHA
|
||||
TYA
|
||||
%ADD_MapMode()
|
||||
PLA
|
||||
CLC : ADC.l MapDrawingData_<label>, X
|
||||
PLX
|
||||
RTS
|
||||
endif
|
||||
endmacro
|
||||
|
||||
pushpc
|
||||
|
||||
org $8AE5DA
|
||||
ADC.b $02 ; swap position of load and add for ease
|
||||
|
||||
org $8AE652 ; steal some space from the old map-drawing code we're no longer using
|
||||
|
||||
LoadDungeonMapRoomPointer_0A:
|
||||
JSL LoadDungeonMapRoomPointer
|
||||
RTS
|
||||
|
||||
%Map_LDAY($8AE45F, corner_tile_address)
|
||||
%Map_LDAY($8AE489, row_tile_address)
|
||||
%Map_CMP($8AE4B0, row_tile_length)
|
||||
%Map_LDAY($8AE4C1, column_tile_address)
|
||||
%Map_CMP($8AE4EA, column_tile_length)
|
||||
%Map_LDA($8AE54A, floor_label_address)
|
||||
%Map_LDAX($8AE5D7, row_data_offset)
|
||||
%Map_LDAY($8AE5F7, floor_data_offset)
|
||||
%Map_CMP($8AE5A2, row_count)
|
||||
%Map_CMP($8AE7FA, column_count)
|
||||
%Map_ADD($8AE896, sprite_offset_x_base)
|
||||
%Map_ADDY($8AE8B5, sprite_offset_y_base)
|
||||
%Map_ADD($8AE952, sprite_offset_y_base)
|
||||
%Map_ADDY($8AEBDB, sprite_offset_y_base)
|
||||
|
||||
warnpc $8AE7F6
|
||||
padbyte $EA
|
||||
pad $8AE7F6
|
||||
|
||||
pullpc
|
||||
|
||||
incsrc data/doors_connections.asm
|
||||
|
||||
LoadDungeonMapRoomPointer:
|
||||
LDA.l DungeonMapMode
|
||||
BEQ .normal
|
||||
LDA.w #bank(CustomMapPointers)
|
||||
STA.b $74
|
||||
LDA.l CustomMapPointers, X
|
||||
RTL
|
||||
|
||||
.normal
|
||||
LDA.w #bank(DungeonMapRoomPointers)
|
||||
STA.b $74
|
||||
LDA.l DungeonMapRoomPointers, X
|
||||
RTL
|
||||
|
||||
PrepDrawRow:
|
||||
%ADD_MapMode()
|
||||
LDA.l MapDrawingData_row_start_address, X
|
||||
CLC : ADC.b $06
|
||||
AND.w #$0FFF
|
||||
TAX
|
||||
|
||||
LDA.l DungeonMapMode
|
||||
BEQ .done
|
||||
|
||||
JSR DrawRowOfRoomConnections
|
||||
|
||||
.done
|
||||
RTL
|
||||
|
||||
ClearAdjacentConnections:
|
||||
; Left
|
||||
LDA.b $02
|
||||
BEQ +
|
||||
LDA.b $0E
|
||||
BIT.w #$000A
|
||||
BNE +
|
||||
LDA.w #$0F00
|
||||
STA.l $7F0000-$02, X
|
||||
STA.l $7F0040-$02, X
|
||||
+
|
||||
|
||||
; Top
|
||||
LDA.b $00
|
||||
BEQ +
|
||||
LDA.b $0E
|
||||
BIT.w #$000C
|
||||
BNE +
|
||||
LDA.w #$0F00
|
||||
STA.l $7F0000-$40, X
|
||||
STA.l $7F0002-$40, X
|
||||
+
|
||||
|
||||
; Right
|
||||
LDA.b $02
|
||||
CMP.l CustomMapDrawingData_column_wrap
|
||||
BCS +
|
||||
LDA.b $0E
|
||||
BIT.w #$0005
|
||||
BNE +
|
||||
LDA.w #$0F00
|
||||
STA.l $7F0000+$04, X
|
||||
STA.l $7F0040+$04, X
|
||||
+
|
||||
|
||||
; Bottom
|
||||
LDA.b $00
|
||||
CMP.l CustomMapDrawingData_row_wrap
|
||||
BCS +
|
||||
LDA.b $0E
|
||||
BIT.w #$0003
|
||||
BNE +
|
||||
LDA.w #$0F00
|
||||
STA.l $7F0000+$80, X
|
||||
STA.l $7F0002+$80, X
|
||||
+
|
||||
RTL
|
||||
|
||||
DrawRowOfRoomConnections:
|
||||
PHB : PHK : PLB
|
||||
PHX
|
||||
|
||||
LDX.w DungeonID
|
||||
LDA.l DoorConnectionPointers, X
|
||||
STA.b $04
|
||||
|
||||
LDA.l DungeonMapFloorCountData, X
|
||||
AND.w #$000F
|
||||
CLC : ADC.w DungeonMapCurrentFloor
|
||||
AND.w #$00FF
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l CustomMapDrawingData_floor_connection_data_offset, X
|
||||
CLC : ADC.b $04
|
||||
STA.b $04
|
||||
|
||||
LDA.b $00
|
||||
ASL A
|
||||
TAX
|
||||
LDA.l CustomMapDrawingData_row_connection_data_offset, X
|
||||
CLC : ADC.b $04
|
||||
STA.b $04
|
||||
|
||||
STZ.b $02
|
||||
|
||||
PLX : PHX
|
||||
LDY.w #$0000
|
||||
|
||||
.next_horizontal
|
||||
LDA.b ($04), Y
|
||||
AND.w #$00FF
|
||||
JSR DrawHorizontalConnector
|
||||
INY
|
||||
INX #6
|
||||
|
||||
INC.b $02
|
||||
LDA.b $02
|
||||
CMP.l CustomMapDrawingData_column_wrap
|
||||
BCC .next_horizontal
|
||||
|
||||
LDA.b $00
|
||||
CMP.l CustomMapDrawingData_row_wrap
|
||||
BCS .done
|
||||
|
||||
PLX : PHX
|
||||
|
||||
STZ.b $02
|
||||
|
||||
.next_vertical
|
||||
LDA.b ($04), Y
|
||||
AND.w #$00FF
|
||||
JSR DrawVerticalConnector
|
||||
INY
|
||||
INX #6
|
||||
|
||||
INC.b $02
|
||||
LDA.b $02
|
||||
CMP.l CustomMapDrawingData_column_count
|
||||
BCC .next_vertical
|
||||
|
||||
.done
|
||||
PLX
|
||||
PLB
|
||||
RTS
|
||||
|
||||
; A = connector index
|
||||
; X = address
|
||||
DrawHorizontalConnector:
|
||||
PHY
|
||||
ASL A : ASL A
|
||||
TAY
|
||||
|
||||
LDA.w DoorConnectionTiles+0, Y
|
||||
BEQ +
|
||||
ORA.w #$1404
|
||||
STA.l $7F0004, X
|
||||
+
|
||||
|
||||
LDA.w DoorConnectionTiles+2, Y
|
||||
BEQ +
|
||||
ORA.w #$1404
|
||||
STA.l $7F0044, X
|
||||
+
|
||||
|
||||
PLY
|
||||
RTS
|
||||
|
||||
; A = connector index
|
||||
; X = address
|
||||
DrawVerticalConnector:
|
||||
PHY
|
||||
ASL A : ASL A
|
||||
TAY
|
||||
|
||||
LDA.w DoorConnectionTiles+0, Y
|
||||
BEQ +
|
||||
ORA.w #$1400
|
||||
STA.l $7F0080, X
|
||||
+
|
||||
|
||||
LDA.w DoorConnectionTiles+2, Y
|
||||
BEQ +
|
||||
ORA.w #$1400
|
||||
STA.l $7F0082, X
|
||||
+
|
||||
|
||||
PLY
|
||||
RTS
|
||||
|
||||
GetLocationMarkerLeft:
|
||||
LDA.b LinkQuadrantH
|
||||
BEQ +
|
||||
LDA.b #$F8
|
||||
+
|
||||
CLC : ADC.w $0215
|
||||
AND.b #$F8
|
||||
RTL
|
||||
@@ -1,208 +0,0 @@
|
||||
; $B9F000
|
||||
SupertileRoomShapes:
|
||||
incsrc data/supertile_shapes.asm
|
||||
warnpc $B9F800
|
||||
padbyte $FF
|
||||
pad $B9F800
|
||||
|
||||
org $B9F800
|
||||
DungeonMapData:
|
||||
db $02, $04, $00, $00 ; Sewers
|
||||
db $1A, $00, $00, $00 ; Hyrule Castle
|
||||
db $00, $06, $00, $00 ; Eastern Palace
|
||||
db $04, $14, $00, $00 ; Desert Palace
|
||||
db $14, $0C, $01, $00 ; Castle Tower
|
||||
db $0C, $10, $00, $00 ; Swamp Palace
|
||||
db $08, $0A, $00, $00 ; Palace of Darkness
|
||||
db $12, $18, $00, $00 ; Misery Mire
|
||||
db $0A, $16, $FF, $00 ; Skull Woods
|
||||
db $16, $0E, $00, $00 ; Ice Palace
|
||||
db $06, $08, $01, $00 ; Tower of Hera
|
||||
db $10, $12, $00, $00 ; Thieves Town
|
||||
db $0E, $1A, $00, $00 ; Turtle Rock
|
||||
db $18, $02, $01, $00 ; Ganon's Tower
|
||||
db $1A, $02, $00, $00 ; Extra
|
||||
db $1A, $02, $00, $00 ; Extra
|
||||
|
||||
struct DungeonMapData DungeonMapData
|
||||
.prev: skip 1
|
||||
.next: skip 1
|
||||
.floor: skip 1
|
||||
.unused: skip 1
|
||||
endstruct
|
||||
|
||||
warnpc $B9F840
|
||||
org $B9F840
|
||||
|
||||
DoorConnectionPointers:
|
||||
skip $20
|
||||
|
||||
warnpc $B9F860
|
||||
org $B9F860
|
||||
|
||||
CustomMapPointers:
|
||||
skip $20
|
||||
|
||||
warnpc $B9F880
|
||||
org $B9F880
|
||||
|
||||
LootTypeIcons:
|
||||
dw $0B00, $0B00, $0B00, $0B00 ; 00 - nothing
|
||||
dw $2DCB, $6DCB, $ADCB, $EDCB ; 01 - unknown - dot
|
||||
dw $29EB, $69EB, $29FB, $69FB ; 02 - junk - pot
|
||||
dw $29CA, $69CA, $29DA, $29DB ; 03 - small key
|
||||
dw $29E9, $69E9, $29F9, $69F9 ; 04 - triforce piece
|
||||
dw $29DD, $69DD, $A9DD, $E9DD ; 05 - safety - plus
|
||||
dw $29EC, $69EC, $29FC, $69FC ; 06 - less important item - small chest
|
||||
dw $29CE, $29CF, $29DE, $29DF ; 07 - map
|
||||
dw $29E8, $69E8, $29F8, $69F8 ; 08 - compass
|
||||
dw $29CA, $69CA, $29DA, $29DB ; 09 - small key
|
||||
dw $29C8, $69C8, $29D8, $29D9 ; 0A - big key
|
||||
dw $29ED, $69ED, $29FD, $69FD ; 0B - important inventory item - big chest
|
||||
dw $29CC, $29CD, $29DC, $69DC ; 0C - pendant
|
||||
dw $2DC9, $69C9, $A9C9, $EDC9 ; 0D - crystal
|
||||
dw $29E9, $69E9, $29F9, $69F9 ; 0E - triforce piece
|
||||
dw $29EA, $69EA, $29EB, $69EB ; 0F - triforce
|
||||
|
||||
warnpc $B9F900
|
||||
org $B9F900
|
||||
LootTypeMapping:
|
||||
incsrc data/item_mapping.asm
|
||||
|
||||
warnpc $B9FA00
|
||||
org $B9FA00
|
||||
; Room ID mappings to bit to check for presence and address of item drop
|
||||
MiscLocations:
|
||||
dw $00C8 : db $04 : dl HeartContainer_ArmosKnights
|
||||
dw $0033 : db $04 : dl HeartContainer_Lanmolas
|
||||
dw $0007 : db $04 : dl HeartContainer_Moldorm
|
||||
|
||||
dw $005A : db $04 : dl HeartContainer_HelmasaurKing
|
||||
dw $0006 : db $04 : dl HeartContainer_Arrghus
|
||||
dw $0029 : db $04 : dl HeartContainer_Mothula
|
||||
dw $00AC : db $04 : dl HeartContainer_Blind
|
||||
dw $00DE : db $04 : dl HeartContainer_Kholdstare
|
||||
dw $0090 : db $04 : dl HeartContainer_Vitreous
|
||||
dw $00A4 : db $04 : dl HeartContainer_Trinexx
|
||||
|
||||
dw $0073 : db $05 : dl BonkKey_Desert ; torch
|
||||
dw $008C : db $05 : dl BonkKey_GTower ; torch
|
||||
dw $0087 : db $05 : dl StandingKey_Hera
|
||||
|
||||
dw $FFFF : db $FF : dl $FFFFFF ; Placeholders
|
||||
dw $FFFF : db $FF : dl $FFFFFF
|
||||
dw $FFFF : db $FF : dl $FFFFFF ; Aga 1? ($0020)
|
||||
dw $FFFF : db $FF : dl $FFFFFF ; Ice Armos? ($001C)
|
||||
dw $FFFF : db $FF : dl $FFFFFF ; Lanmolas 2? ($0033)
|
||||
dw $FFFF : db $FF : dl $FFFFFF ; Moldorm 2? ($004D)
|
||||
dw $FFFF : db $FF : dl $FFFFFF ; Aga 2? ($000D)
|
||||
dw $FFFF
|
||||
|
||||
warnpc $B9FA9A
|
||||
org $B9FA9A
|
||||
MapHUDPalette:
|
||||
dw $0000, $3ED8, $2E54
|
||||
|
||||
warnpc $B9FAA0
|
||||
org $B9FAA0
|
||||
PrizeLocations:
|
||||
dw $00C8 : db $02 ; Armos Knights
|
||||
dw $0033 : db $03 ; Lanmolas
|
||||
dw $0006 : db $05 ; Arrghus
|
||||
dw $005A : db $06 ; Helmasaur King
|
||||
dw $0090 : db $07 ; Vitreous
|
||||
dw $0029 : db $08 ; Mothula
|
||||
dw $00DE : db $09 ; Kholdstare
|
||||
dw $0007 : db $0A ; Moldorm
|
||||
dw $00AC : db $0B ; Blind
|
||||
dw $00A4 : db $0C ; Trinexx
|
||||
dw $FFFF
|
||||
|
||||
warnpc $B9FAC0
|
||||
org $B9FAC0
|
||||
SupertileEntrances:
|
||||
incsrc data/entrance_tiles.asm
|
||||
warnpc $B9FB00
|
||||
padbyte $FF
|
||||
pad $B9FB00
|
||||
|
||||
; $B9FB00
|
||||
DungeonLabels:
|
||||
dw $2550, $2579 ; Sewers
|
||||
dw $2564, $255F ; Hyrule Castle
|
||||
dw $2561, $256C ; Eastern Palace
|
||||
dw $2560, $256C ; Desert Palace
|
||||
dw $255D, $2570 ; Agahnim's Tower
|
||||
dw $256F, $256C ; Swamp Palace
|
||||
dw $256C, $2560 ; Palace of Darkness
|
||||
dw $2569, $2569 ; Misery Mire
|
||||
dw $256F, $2573 ; Skull Woods
|
||||
dw $2565, $256C ; Ice Palace
|
||||
dw $2570, $2564 ; Tower of Hera
|
||||
dw $2570, $2570 ; Thieves' Town
|
||||
dw $2570, $256E ; Turtle Rock
|
||||
dw $2563, $2570 ; Ganon's Tower
|
||||
dw $25A4, $25A4 ; Reserved
|
||||
dw $25A4, $25A4 ; Reserved
|
||||
|
||||
; $B9FB40
|
||||
|
||||
warnpc $B9FF00
|
||||
|
||||
org $B9FF00
|
||||
; $00 - do not show anything
|
||||
; $01 - show presence of supertile as dark square
|
||||
; $02 - show presence of quadrants as dark squares
|
||||
; $03 - show outline of shape with walls but no interior details (palette 5)
|
||||
; $04 - show dark with stairs but no hole/internal walls (palette 4)
|
||||
; $05 - show mostly lit with stairs and holes/internal walls (palette 3)
|
||||
; $06 - show fully lit with stairs and holes/internal walls (palette 2)
|
||||
ShowRooms:
|
||||
.default
|
||||
db $02
|
||||
.have_map
|
||||
db $05
|
||||
.have_compass
|
||||
db $03
|
||||
.visited_tile
|
||||
db $04
|
||||
.reserved
|
||||
skip 4
|
||||
warnpc $B9FF08
|
||||
|
||||
org $B9FF08
|
||||
; $00 - do not show anything
|
||||
; $01 - show presence of unobtained items
|
||||
; $02 - show category of item
|
||||
ShowItems:
|
||||
.default
|
||||
db $00
|
||||
.have_map
|
||||
db $00
|
||||
.have_compass
|
||||
db $02
|
||||
.visited_tile
|
||||
db $01
|
||||
.reserved
|
||||
skip 4
|
||||
warnpc $B9FF10
|
||||
|
||||
org $B9FF10
|
||||
; ---P bepc
|
||||
; P - dungeon prizes
|
||||
; b - bosses (and torches in GT and desert, plus hera basement standing item)
|
||||
; e - enemy drops
|
||||
; p - pots
|
||||
; c - chests
|
||||
ItemSources:
|
||||
db $09
|
||||
|
||||
; $B9FF11
|
||||
AlwaysShowCompass:
|
||||
db $01
|
||||
|
||||
; $B9FF12
|
||||
; $0000 - vanilla 5x5 maps
|
||||
; $0001 - special DR 4x3 maps
|
||||
DungeonMapMode:
|
||||
dw $0000
|
||||
@@ -3,16 +3,6 @@
|
||||
;--------------------------------------------------------------------------------
|
||||
SpawnDungeonPrize:
|
||||
PHX : PHB
|
||||
|
||||
PHA
|
||||
; Don't spawn prize in Cave state, Hyrule Castle, Escape, Castle Tower, or Ganon's Tower
|
||||
LDA.w DungeonID : BMI .skip_prize_drop ; Cave state
|
||||
CMP.b #$00 : BEQ .skip_prize_drop ; Escape
|
||||
CMP.b #$02 : BEQ .skip_prize_drop ; Hyrule Castle
|
||||
CMP.b #$1A : BEQ .skip_prize_drop ; Ganon's Tower
|
||||
CMP.b #$08 : BEQ .skip_prize_drop ; Agahnim's Tower (Castle Tower)
|
||||
PLA
|
||||
|
||||
STA.w ItemReceiptID
|
||||
TAX
|
||||
LDA.b $06,S : STA.b ScrapBuffer72 ; Store current RoomTag index
|
||||
@@ -28,10 +18,6 @@ SpawnDungeonPrize:
|
||||
PLB : PLX
|
||||
RTL
|
||||
|
||||
.skip_prize_drop:
|
||||
PLA : PLB : PLX
|
||||
RTL
|
||||
|
||||
AddDungeonPrizeAncilla:
|
||||
LDY.w ItemReceiptID
|
||||
STZ.w AncillaVelocityY,X
|
||||
@@ -467,7 +453,6 @@ RTL
|
||||
|
||||
MaybeSkipCrystalCutsceneFollowerReset:
|
||||
PHA
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BEQ .skip
|
||||
; skip if prizes are shuffled outside of normal boss drops
|
||||
LDA.l InventoryTable_properties+($37*2) : AND.b #$01 : BEQ .continue
|
||||
.skip
|
||||
|
||||
@@ -20,12 +20,7 @@ DoDungeonMapBossIcon:
|
||||
; get sprite pointer for room
|
||||
LDA.l UWSpritesPointers,X
|
||||
STA.b Scrap00 ; pointer in $00
|
||||
if !FEATURE_FIX_BASEROM
|
||||
LDA.w #$0089
|
||||
else
|
||||
LDA.w #$0028 ; set the bank to 28 for now
|
||||
endif
|
||||
STA.b Scrap02
|
||||
LDA.w #$0028 : STA.b Scrap02 ; set the bank to 28 for now
|
||||
LDY.w #$0001 ; to skip the "sort"
|
||||
|
||||
; get first byte to make sure it isn't an empty room
|
||||
52
elder.asm
52
elder.asm
@@ -39,30 +39,32 @@ RTL
|
||||
|
||||
Elder_Code:
|
||||
{
|
||||
TXY : LDX.b #$06
|
||||
REP #$30
|
||||
LDA.l GoalConditionTable, X
|
||||
TAX : LDA.l $B00000, X
|
||||
SEP #$30
|
||||
TYX
|
||||
CMP.b #$00 : BEQ .despawn ; no goal, despawn
|
||||
LDA.l TurnInGoalItems : BNE +
|
||||
REP #$20
|
||||
LDA.l GoalItemRequirement : BEQ .despawn
|
||||
LDA.l GanonVulnerableMode : AND.w #$00FF : CMP.w #$0005 : BEQ .despawn
|
||||
LDA.l TurnInGoalItems : AND.w #$00FF : BNE +
|
||||
.despawn
|
||||
SEP #$20
|
||||
STZ.w SpriteAITable, X ; despawn self
|
||||
RTS
|
||||
+
|
||||
SEP #$20
|
||||
LDA.b GameSubMode
|
||||
BNE .done
|
||||
LDA.b #$96
|
||||
LDY.b #$01
|
||||
|
||||
JSL Sprite_ShowSolicitedMessageIfPlayerFacing_PreserveMessage : BCC .dont_show
|
||||
LDA.b #$03 : JSL CheckConditionPass : BCC +
|
||||
REP #$20
|
||||
LDA.l GoalCounter
|
||||
CMP.l GoalItemRequirement : !BLT +
|
||||
SEP #$20
|
||||
JSL ActivateTriforceCutscene
|
||||
+
|
||||
.dont_show
|
||||
|
||||
.done
|
||||
SEP #$20
|
||||
LDA.b FrameCounter : LSR #5 : AND.b #$01 : STA.w SpriteGFXControl, X
|
||||
RTS
|
||||
}
|
||||
@@ -142,35 +144,19 @@ MasterSword_CheckIfPulled:
|
||||
|
||||
MasterSword_ConditionalActivateCutscene:
|
||||
LDA.w SpriteMovement,X : BNE .specialCutscene
|
||||
PHX
|
||||
REP #$30
|
||||
LDA.w SprRedrawFlag, X : BNE .doNormalPed
|
||||
INC.w SprRedrawFlag, X
|
||||
LDA.l PedPullGfx : BEQ .doNormalPed
|
||||
LDX.w ItemStackPtr : STA.l ItemGFXStack,X
|
||||
LDA.w #$BCE0>>1 : STA.l ItemTargetStack,X
|
||||
TXA : INC #2 : STA.w ItemStackPtr
|
||||
.doNormalPed
|
||||
SEP #$30
|
||||
PLX
|
||||
JML Sprite_CheckDamageToPlayerSameLayerLong ; what we wrote over
|
||||
.specialCutscene
|
||||
LDA.b #$02 : STA.w ItemReceiptPose ; Link's 2-hands-up pose
|
||||
STA.b LinkLayer ; draw Link on top
|
||||
; draw Triforce piece in VRAM
|
||||
LDA.w SprRedrawFlag, X : BNE .skipTransfer
|
||||
INC.w SprRedrawFlag, X
|
||||
PHX
|
||||
REP #$30
|
||||
LDA.l MurahdahlaGfx : BNE .submitRequest
|
||||
LDX.w #$006A<<1 : LDA.l StandingItemGraphicsOffsets,X
|
||||
.submitRequest
|
||||
LDX.w ItemStackPtr : STA.l ItemGFXStack,X
|
||||
LDX.w #$006A<<1
|
||||
LDA.l StandingItemGraphicsOffsets,X : LDX.w ItemStackPtr : STA.l ItemGFXStack,X
|
||||
LDA.w #$9CE0>>1 : STA.l ItemTargetStack,X
|
||||
TXA : INC #2 : STA.w ItemStackPtr
|
||||
SEP #$30
|
||||
PLX
|
||||
.skipTransfer
|
||||
PLA : PLA : PLA : JML MasterSword_InPedestal_DoCutscene ; do cutscene
|
||||
|
||||
MasterSword_ConditionalGrabPose:
|
||||
@@ -187,20 +173,10 @@ RTL
|
||||
MasterSword_SpawnPendantProp_ChangePalette:
|
||||
STA.w SpriteVelocityY,Y : PLX ; what we wrote over
|
||||
LDA.w SpriteMovement,X : BNE .specialCutscene
|
||||
LDA.l PedPullGfx : BNE .customPedGfx
|
||||
LDA.l PedPullGfx+1 : BNE .customPedGfx
|
||||
BRA .done
|
||||
.customPedGfx
|
||||
LDA.l PedPullPalette : ASL : INC : BRA .setPalette
|
||||
.specialCutscene
|
||||
LDA.b #$08 : STA.w SpriteOAMProp,Y ; change palette
|
||||
LDA.b #$02 : STA.w SpriteLayer,Y ; change layer
|
||||
LDA.l MurahdahlaGfx : BNE .customGfx
|
||||
LDA.l MurahdahlaGfx+1 : BNE .customGfx
|
||||
LDA.b #$08 : BRA .setPalette
|
||||
.customGfx
|
||||
LDA.l MurahdahlaPalette : ASL
|
||||
.setPalette
|
||||
STA.w SpriteOAMProp,Y ; change palette
|
||||
.done
|
||||
JML MasterSword_SpawnPendantProp_ChangePalette_return
|
||||
|
||||
|
||||
@@ -23,13 +23,12 @@ boss_move:
|
||||
+
|
||||
|
||||
CMP.b #41 : BNE + ; Is it Skull Woods Boss Room
|
||||
; TODO: Add moving floor sprite
|
||||
JSL Sprite_ResetAll ; reset sprites twice in that room for some reasons (fix bug with kholdstare)
|
||||
JSL Dungeon_ResetSprites ; Restore the dungeon_resetsprites
|
||||
LDA.w $0E20 : CMP.b #$92 : BNE ++ ; Is it Helmasuar King?
|
||||
LDA.b #$07 : STA.w $0B00 ;Spawn the bugged moving floor sprite
|
||||
STZ.w $0B28
|
||||
INC.w OverlordXLow
|
||||
++
|
||||
LDA.b #$07 : STA.w $0B00 ;Spawn the moving floor sprite
|
||||
STZ.w $0B28
|
||||
INC.w OverlordXLow
|
||||
BRL .move_to_bottom_right
|
||||
+
|
||||
|
||||
@@ -288,16 +287,3 @@ new_trinexx_code:
|
||||
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
;================================================================================
|
||||
; Check if water tile in Swamp boss room, skip interaction
|
||||
;--------------------------------------------------------------------------------
|
||||
swamp_boss_tile_interaction:
|
||||
LDA.l Sprite_ReducedTileInteractionTable, X : BEQ .return
|
||||
CPX.b #$09 : BNE .return ; return if non-water tile
|
||||
LDX.b IndoorsFlag : BEQ .return ; return if overworld
|
||||
LDX.b RoomIndex : CPX.b #$06 : BNE .return ; return if not swamp boss room
|
||||
LDA.b #$00
|
||||
.return
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -15,12 +15,3 @@ incsrc hooks/damage_hooks.asm
|
||||
incsrc hooks/overworld_sprite_hooks.asm
|
||||
|
||||
incsrc hooks/underworld_sprite_hooks.asm
|
||||
|
||||
org $85B8BA
|
||||
JSL GeldmanDrawOverride
|
||||
|
||||
org $9EAAAC
|
||||
JSL StalfosKnightDrawOverride
|
||||
|
||||
org $9EB209
|
||||
JSL BlobDrawOverride
|
||||
@@ -11,16 +11,14 @@ Sprite_ResetAll: ; Bank09.asm(1344)
|
||||
;================================================================================
|
||||
; On Room Transition -> Move Sprite depending on the room loaded
|
||||
;--------------------------------------------------------------------------------
|
||||
if not(!FEATURE_FIX_BASEROM)
|
||||
org $828979 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) original jsl : $09C114
|
||||
JSL boss_move
|
||||
org $828C16 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) original jsl : $09C114
|
||||
JSL boss_move
|
||||
org $829338 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) original jsl : $09C114
|
||||
JSL boss_move
|
||||
org $828256 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) original jsl : $09C114
|
||||
JSL boss_move
|
||||
endif
|
||||
org $828979 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) original jsl : $09C114
|
||||
JSL boss_move
|
||||
org $828C16 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) original jsl : $09C114
|
||||
JSL boss_move
|
||||
org $829338 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) original jsl : $09C114
|
||||
JSL boss_move
|
||||
org $828256 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) original jsl : $09C114
|
||||
JSL boss_move
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -41,10 +39,3 @@ JSL new_kholdstare_code ; Write new gfx in the vram
|
||||
org $1DAD67 ; sprite_trinexx.asm (62) : LDA.b #$03 : STA $0DC0, X
|
||||
JSL new_trinexx_code : NOP
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
;================================================================================
|
||||
; Swamp Boss Room Water Fix
|
||||
;--------------------------------------------------------------------------------
|
||||
org $06E81A
|
||||
JSL swamp_boss_tile_interaction
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
; New bush mob randomization
|
||||
;--------------------------------------------------------------------------------
|
||||
org $868279
|
||||
BRA +
|
||||
MaybeSkipTerrainDebris:
|
||||
JSL MaybeSkipTerrainDebris_long : RTS ; sticking this here, no other free space in bank 06
|
||||
NOP #3
|
||||
+
|
||||
NOP #$0A
|
||||
JSL sprite_bush_spawn
|
||||
NOP ; we keep the branch
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -18,3 +18,10 @@ org $9DD88E
|
||||
;0EDBB2 0EDBB3
|
||||
; LDX.b #$01
|
||||
;}
|
||||
|
||||
org $85B8BA ; geldman
|
||||
JSL Sprite_MaybeForceDrawShadow
|
||||
org $9EAAAC ; stalfos knight
|
||||
JSL Sprite_MaybeForceDrawShadow
|
||||
org $9EB209 ; blob
|
||||
JSL Sprite_MaybeForceDrawShadow
|
||||
|
||||
@@ -61,3 +61,7 @@ LDA.b [Scrap00],Y
|
||||
|
||||
org $89C416
|
||||
LDA.b [Scrap00],Y
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@ pushpc
|
||||
|
||||
org $9EC147
|
||||
JSL NewKodongoCollision
|
||||
BRA + : NOP #3 : +
|
||||
JMP .continue : NOP #2
|
||||
.continue
|
||||
|
||||
org $9EC152
|
||||
Kodongo_SetDirection:
|
||||
@@ -11,18 +12,8 @@ pullpc
|
||||
|
||||
NewKodongoCollision:
|
||||
LDA.w SpriteMoveDirection, X : INC A : AND.b #$03 : STA.w SpriteMoveDirection, X
|
||||
JSL Kodongo_InVanillaRoom : BEQ .continue
|
||||
;If they collide more than 4 times just set direction
|
||||
LDA.w SpriteAuxTable, X : INC A : STA.w SpriteAuxTable, X : CMP.b #$04 : BCC .continue
|
||||
PLA : PLA : PEA.w Kodongo_SetDirection-1
|
||||
.continue
|
||||
RTL
|
||||
|
||||
Kodongo_InVanillaRoom:
|
||||
LDA.b RoomIndex+1 : BNE .return
|
||||
LDA.b RoomIndex : CMP.b #$19 : BEQ .return
|
||||
CMP.b #$27 : BEQ .return
|
||||
CMP.b #$77 : BEQ .return
|
||||
.return
|
||||
RTL
|
||||
nop #10
|
||||
RTL
|
||||
@@ -52,5 +52,8 @@ incsrc falling_death.asm
|
||||
incsrc shell_gfx.asm
|
||||
warnpc $B6FFFF ;if we hit this we need to split stuff by bank
|
||||
|
||||
org $8684BD
|
||||
Sprite_Get16BitCoords_long:
|
||||
|
||||
org $9EC6FA ;F46FA
|
||||
SpritePrep_Eyegore:
|
||||
@@ -26,7 +26,7 @@ SpritePrep_Eyegore_become_mimic:
|
||||
;JSL resetSprite_Mimic : NOP
|
||||
|
||||
org $86ED9E ; Sprite_ApplyCalculatedDamage, skip high sprite id early exit
|
||||
JSL IsItReallyAMimic : NOP
|
||||
; JSL IsItReallyAMimic : NOP ; now hooked into from souls.asm
|
||||
|
||||
org $86EDA6 ; Sprite_ApplyCalculatedDamage .not_absorbable
|
||||
JSL notItemSprite_Mimic
|
||||
@@ -108,4 +108,4 @@ notItemSprite_Mimic:
|
||||
.continue
|
||||
; restore code
|
||||
REP #$20 : ASL #2
|
||||
RTL
|
||||
RTL
|
||||
|
||||
@@ -1,48 +1,11 @@
|
||||
LoadUnderworldSprites:
|
||||
STA.b Scrap00 ; part one of what we replaced
|
||||
LDA.w #UWSpritesData>>16 ; set the bank to 28 for now
|
||||
STA.b Scrap02
|
||||
LDA.w $048E
|
||||
LDA.w #UWSpritesData>>16 : STA.b Scrap02 ; set the bank to 28 for now
|
||||
LDA.w $048E
|
||||
RTL
|
||||
|
||||
GetSpriteSlot16Bit:
|
||||
LDA.b Scrap03 : AND.w #$00FF
|
||||
ASL A
|
||||
TAY
|
||||
RTL
|
||||
|
||||
GeldmanDrawOverride:
|
||||
PLA : PLA : PLA ; fix the call stack
|
||||
LDA.l DRFlags+1 : AND.b #$08 : BEQ .vanilla
|
||||
|
||||
LDA.b #$01
|
||||
STA.w $0DC0,X
|
||||
JML Sprite_4C_Geldman_do_indeed_draw
|
||||
|
||||
.vanilla
|
||||
JSL Sprite_PrepOAMCoordLong
|
||||
JML Sprite_4C_Geldman_continue
|
||||
|
||||
StalfosKnightDrawOverride:
|
||||
LDA.l DRFlags+1 : AND.b #$08 : BEQ .vanilla
|
||||
|
||||
JSL Sprite_PrepOAMCoordLong
|
||||
LDA.b #$12
|
||||
JML Sprite_DrawShadowLong
|
||||
|
||||
.vanilla
|
||||
JSL Sprite_PrepOAMCoordLong
|
||||
RTL
|
||||
|
||||
BlobDrawOverride:
|
||||
PLA : PLA : PLA ; fix the call stack
|
||||
LDA.l DRFlags+1 : AND.b #$08 : BEQ .vanilla
|
||||
|
||||
LDA.b #$05
|
||||
STA.w $0DC0,X
|
||||
|
||||
JML SpriteDraw_Blob_head_popping_out
|
||||
|
||||
.vanilla
|
||||
JSL Sprite_PrepOAMCoordLong
|
||||
JML SpriteDraw_Blob_bad_gfx
|
||||
RTL
|
||||
@@ -25,3 +25,15 @@ NewFireBarDamage:
|
||||
RTL
|
||||
.NotSameLayer
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
Sprite_MaybeForceDrawShadow:
|
||||
JSL Sprite_PrepOAMCoordLong
|
||||
LDA.l DRFlags+1 : AND.b #$08 : BEQ .return
|
||||
LDA.b GameMode : CMP.b #$07 : BNE .return
|
||||
JSL Sprite_DrawShadowLong
|
||||
; LDA.w SpriteTypeTable,X : CMP.b #$91 : BNE .return ; stalfos knight
|
||||
; ; move shadow down by 8 pixels
|
||||
; + LDA.w SpriteOAMProperties,X : AND.b #$1F : ASL #2 : TAY : INY ; get OAM offset
|
||||
; LDA.b (OAMPtr),Y : CLC : ADC.b #$08 : STA.b (OAMPtr),Y
|
||||
.return
|
||||
RTL
|
||||
|
||||
@@ -63,8 +63,8 @@ RTS
|
||||
RTS
|
||||
;--------------------------------------------------------------------------------
|
||||
SmithDoorCheck:
|
||||
LDA.l FollowerTravelAllowed : AND.w #$00FF : BEQ .orig
|
||||
;If FollowerTravelAllowed is set Frog/Smith can enter multi-entrance overworld doors
|
||||
LDA.l SmithTravelsFreely : AND.w #$00FF : BEQ .orig
|
||||
;If SmithTravelsFreely is set Frog/Smith can enter multi-entrance overworld doors
|
||||
JML Overworld_Entrance_BRANCH_RHO
|
||||
|
||||
.orig ; The rest is equivlent to what we overwrote
|
||||
|
||||
44
events.asm
44
events.asm
@@ -61,22 +61,13 @@ OnDungeonExit:
|
||||
PLP : PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
OnSave:
|
||||
LDA.b #$70 : PHA : PLB ; thing we wrote over - data bank change
|
||||
JSL DarkWorldSaveFix
|
||||
JML MSUResumeReset
|
||||
;--------------------------------------------------------------------------------
|
||||
OnQuit:
|
||||
JSL SQEGFix
|
||||
JSL MSUResumeReset
|
||||
LDA.b #$00 : STA.l AltTextFlag ; bandaid patch bug with mirroring away from text
|
||||
LDA.b #$10 : STA.b MAINDESQ ; thing we wrote over
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
OnDeathNoSave:
|
||||
JSL MSUResumeReset
|
||||
LDA.b #$05 : STA.b $10 ; what we wrote over
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
OnUncleItemGet:
|
||||
PHA
|
||||
|
||||
@@ -107,8 +98,8 @@ RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
OnAga1Defeated:
|
||||
STA.l ProgressIndicator ; vanilla game state stuff we overwrote
|
||||
; seems light_speed option to auto triforce room is unused for now
|
||||
BRA +
|
||||
LDA.l GanonVulnerableMode
|
||||
CMP.b #$06 : BNE +
|
||||
.light_speed
|
||||
REP #$20
|
||||
LDA.w #$0019 : STA.b GameMode
|
||||
@@ -144,7 +135,7 @@ OnFileCreation:
|
||||
|
||||
; Resolve instant post-aga if standard
|
||||
SEP #$20
|
||||
LDA.l InitProgressIndicator : BIT.b #$80 : BEQ +
|
||||
LDA.l InitProgressIndicator : BIT #$80 : BEQ +
|
||||
LDA.b #$00 : STA.l ProgressIndicatorSRAM ; set post-aga after zelda rescue
|
||||
LDA.b #$00 : STA.l OverworldEventDataSRAM+$02 ; keep rain state vanilla
|
||||
+
|
||||
@@ -217,37 +208,18 @@ OnInitFileSelect:
|
||||
JSL EnableForceBlank
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
OnGloomDamage:
|
||||
LDA.b #$01
|
||||
STA.l UpdateHUDFlag
|
||||
LDA.l MaximumHealth
|
||||
SEC : SBC.b #$08
|
||||
STA.l CurrentHealth
|
||||
BEQ +
|
||||
STA.l MaximumHealth
|
||||
+ RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
OnLinkDamaged:
|
||||
JSL IncrementDamageTakenCounter_Arb
|
||||
LDA.l ChallengeModes : AND.b #$03 : CMP.b #$02 : BEQ .gloom
|
||||
JML OHKOTimer
|
||||
.gloom
|
||||
STZ.b $00
|
||||
JML OnGloomDamage
|
||||
;--------------------------------------------------------------------------------
|
||||
;OnEnterWater:
|
||||
; JSL UnequipCapeQuiet ; what we wrote over
|
||||
;RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
OnLinkDamagedFromPit:
|
||||
LDA.l ChallengeModes : AND.b #$03 : CMP.b #$02 : BEQ .gloom
|
||||
JSL OHKOTimer
|
||||
BRA +
|
||||
.gloom
|
||||
JSL OnGloomDamage
|
||||
CLC : ADC.b #$08 : STA.l CurrentHealth
|
||||
|
||||
+ LDA.l AllowAccidentalMajorGlitch
|
||||
LDA.l AllowAccidentalMajorGlitch
|
||||
BEQ ++
|
||||
-- LDA.b #$14 : STA.b GameSubMode ; thing we wrote over
|
||||
|
||||
@@ -259,12 +231,7 @@ OnLinkDamagedFromPit:
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
OnLinkDamagedFromPitOutdoors:
|
||||
LDA.l ChallengeModes : AND.b #$03 : CMP.b #$02 : BEQ .gloom
|
||||
JML OHKOTimer ; make sure this is last
|
||||
.gloom
|
||||
JSL OnGloomDamage
|
||||
CLC : ADC.b #$08
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
OnOWTransition:
|
||||
JSL FloodGateReset
|
||||
@@ -277,7 +244,6 @@ OnOWTransition:
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
OnLoadDuckMap:
|
||||
JSL SelectFirstFluteSpot
|
||||
LDA.l DuckMapFlag
|
||||
BNE +
|
||||
INC : STA.l DuckMapFlag
|
||||
|
||||
@@ -248,12 +248,8 @@ DrawPlayerFileShared:
|
||||
|
||||
; Flute
|
||||
LDA.l InventoryTrackingSRAM : AND.w #$0003 : BEQ +
|
||||
LDA.l $7003C2 : AND.w #$00FF : BNE .pseudo
|
||||
%fs_drawItem(7,16,FileSelectItems_flute)
|
||||
BRA ++
|
||||
.pseudo
|
||||
%fs_drawItem(7,16,FileSelectItems_flute_green)
|
||||
BRA ++
|
||||
+
|
||||
%fs_drawItemGray(7,16,FileSelectItems_flute)
|
||||
++
|
||||
@@ -543,8 +539,6 @@ FileSelectItems:
|
||||
dw #$0264|!FS_COLOR_BROWN, #$0265|!FS_COLOR_BROWN, #$0274|!FS_COLOR_BROWN, #$0275|!FS_COLOR_BROWN
|
||||
.flute
|
||||
dw #$0266|!FS_COLOR_BLUE, #$0267|!FS_COLOR_BLUE, #$0276|!FS_COLOR_BLUE, #$0277|!FS_COLOR_BLUE
|
||||
.flute_green
|
||||
dw #$0266|!FS_COLOR_GREEN, #$0267|!FS_COLOR_GREEN, #$0276|!FS_COLOR_GREEN, #$0277|!FS_COLOR_GREEN
|
||||
.book
|
||||
dw #$026A|!FS_COLOR_GREEN, #$026B|!FS_COLOR_GREEN, #$027A|!FS_COLOR_GREEN, #$027B|!FS_COLOR_GREEN
|
||||
.redcane
|
||||
|
||||
942
follower.asm
942
follower.asm
@@ -1,942 +0,0 @@
|
||||
pushpc
|
||||
; follower hooks
|
||||
org $81EBB6
|
||||
JSL MaybeSetZeldaCheckpoint
|
||||
org $899FA1
|
||||
db $FF, $FF, $FF ; disable timed follower messages
|
||||
org $89A647
|
||||
JSL MaybeSkipFollowerTrigger : NOP
|
||||
org $89F544
|
||||
JSL MaybeDeleteFollowersOnDeath
|
||||
|
||||
org $85EBCF
|
||||
JSL SpritePrep_ZeldaFollower : NOP #2
|
||||
org $85EC9E
|
||||
JSL SpriteDraw_ZeldaMaiden
|
||||
org $85ECD9
|
||||
JSL Zelda_WaitingInCell
|
||||
org $85ED46
|
||||
JSL Zelda_BecomeFollower : NOP #2
|
||||
|
||||
org $9EE902
|
||||
JSL SpritePrep_OldManFollower : NOP #2 : db $F0 ; BEQ
|
||||
org $9DFF18
|
||||
JSL SpriteDraw_OldManFollower
|
||||
org $9EE9BC
|
||||
JSL Follower_CheckMessageCollision
|
||||
org $9EE9CC
|
||||
JSL OldMan_BecomeFollower : NOP #2
|
||||
|
||||
org $86899C
|
||||
JSL SpritePrep_BlindMaiden : NOP #2
|
||||
org $8689A7
|
||||
JSL BlindZeldaDespawnFix : NOP #2
|
||||
org $9EE8B0
|
||||
JSL SpriteDraw_ZeldaMaiden
|
||||
org $9EE8CD
|
||||
JSL Follower_CheckCollision
|
||||
org $9EE8D7
|
||||
JSL BlindMaiden_BecomeFollower : NOP
|
||||
|
||||
org $868A7E
|
||||
JSL SpritePrep_SmithyFrog : BRA + : NOP #8 : +
|
||||
org $86B2AA
|
||||
JSL Follower_CheckMessageCollision
|
||||
org $86B2B4
|
||||
JSL Frog_BecomeFollower : NOP #2
|
||||
org $86B341
|
||||
JSL SpriteDraw_FrogFollower
|
||||
|
||||
org $868A53
|
||||
JSL SpritePrep_PurpleChest : NOP #2
|
||||
org $9EE0D7
|
||||
JSL SpriteDraw_PurpleChest
|
||||
org $9EE0E7
|
||||
JSL Follower_CheckMessageCollision
|
||||
org $9EE0ED
|
||||
JSL PurpleChest_FollowCheck
|
||||
org $9EE0F7
|
||||
JSL PurpleChest_BecomeFollower : NOP
|
||||
|
||||
org $868A0A
|
||||
JSL SpritePrep_SuperBomb
|
||||
org $868A4A
|
||||
SuperBomb_BecomeFollower_exit:
|
||||
org $9EE16E
|
||||
BRA + : NOP #6 : + ; fix bomb shop dialog for dwarfless big bomb
|
||||
org $9EE1E8
|
||||
JSL SuperBomb_FollowCheck
|
||||
org $9EE1F1
|
||||
JSL SuperBomb_BecomeFollower : NOP #2
|
||||
org $9EE2C0
|
||||
JSL SpriteDraw_SuperBomb
|
||||
|
||||
org $868D51
|
||||
JSL SpritePrep_Kiki : NOP #2
|
||||
org $9EE3E6
|
||||
JSL Kiki_OfferToFollow
|
||||
org $9EE495
|
||||
JSL Kiki_FollowCheck : BRA + : NOP #12 : +
|
||||
org $9EE4AF
|
||||
JSL Kiki_BecomeFollower : NOP #2
|
||||
org $9EE4F7
|
||||
JSL Kiki_FixTeleportOnExit
|
||||
org $89A1B2
|
||||
JSL Kiki_DontScareTheMonke : NOP #3
|
||||
|
||||
org $868D63
|
||||
JSL SpritePrep_Locksmith : NOP #2 : db $90 ; BCC
|
||||
org $868D7E
|
||||
db $80 ; BRA
|
||||
org $86BCD9
|
||||
JML Locksmith_Chillin_PostMessage
|
||||
org $86BD09
|
||||
JSL Locksmith_BecomeFollower : NOP #2
|
||||
org $86BD7A ; allow follower pickup after purple chest item
|
||||
LDA.b #$00 : STA.w SpriteActivity, X
|
||||
JSL Locksmith_RespondToAnswer_PostItem
|
||||
org $86BDB4
|
||||
JSL SpriteDraw_LocksmithFollower
|
||||
pullpc
|
||||
|
||||
MaybeSkipFollowerTrigger:
|
||||
LDA.b GameMode : AND.w #$00FF : CMP.w #$0010 : BNE .normal
|
||||
.no_trigger
|
||||
INC : RTL
|
||||
.normal
|
||||
LDA.w $02F2 : AND.b Scrap06 ; what we wrote over
|
||||
RTL
|
||||
|
||||
MaybeDeleteFollowersOnDeath:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
; s+q = favor keeping current follower
|
||||
; death = favor replacing with unfulfilled starting followers
|
||||
; during escape = always favor keeping zelda
|
||||
LDA.b GameMode : CMP.b #$17 : BEQ .keep
|
||||
LDA.w DungeonID : NOP #2 : BPL .keep
|
||||
LDA.l InitFollowerIndicator : BEQ .keep
|
||||
JSL DetermineFollowerSpawn_check_resolved : BCS .keep
|
||||
LDA.l ProgressIndicator : CMP.b #$02 : BCS .delete
|
||||
LDA.l FollowerIndicator : CMP.b #$01 : BEQ .keep
|
||||
.delete
|
||||
PLA : PLA : PEA.w $89F558-1
|
||||
RTL
|
||||
.keep
|
||||
PLA : PLA : PEA.w $89F55E-1
|
||||
RTL
|
||||
.vanilla
|
||||
LDA.l FollowerIndicator ; what we wrote over
|
||||
RTL
|
||||
|
||||
StartingFollower:
|
||||
LDA.l InitFollowerIndicator : BEQ .return
|
||||
PHA
|
||||
REP #$20
|
||||
; possible spawn points
|
||||
LDA.b RoomIndex : CMP.w #$0104 : BEQ + ; links house
|
||||
CMP.w #$0012 : BEQ + ; sanc
|
||||
CMP.w #$00E4 : BEQ + ; old man
|
||||
CMP.w #$0112 : BEQ + ; dark sanc
|
||||
CMP.w #$011C : BEQ + ; bomb shop
|
||||
SEP #$20 : PLA : RTL
|
||||
+
|
||||
SEP #$20
|
||||
LDA.l FollowerIndicator : BEQ +
|
||||
LDA.l FollowerDropped : CMP.b #$80 : PLA : BCC .return : PHA
|
||||
+ LDA.l ProgressIndicator : CMP.b #$02 : PLA : BCC .escape_check
|
||||
PHA
|
||||
JSL DetermineFollowerSpawn_check_resolved
|
||||
PLA
|
||||
BCC .issue_follower
|
||||
BRA .return
|
||||
.escape_check
|
||||
CMP.b #$01 : BNE .return
|
||||
PHA : LDA.l ProgressFlags : AND.b #$04 : CMP.b #$04 : PLA : BCS .return
|
||||
.issue_follower
|
||||
STA.l FollowerIndicator
|
||||
LDA.b #$00 : STA.l FollowerDropped
|
||||
.return
|
||||
RTL
|
||||
|
||||
MaybeSetZeldaCheckpoint:
|
||||
AND.w #$7FFF : TAX ; what we wrote over
|
||||
SEP #$20
|
||||
LDA.l ProgressFlags : AND.b #$04 : BNE .return ; zelda rescued
|
||||
LDA.l StartingEntrance : CMP.b #$02 : BEQ .return ; cell checkpoint set
|
||||
CMP.b #$04 : BEQ .return ; throne room checkpoint set
|
||||
LDA.l FollowerIndicator : CMP.b #$01 : BNE .return ; zelda following
|
||||
LDA.b RoomIndex : CMP.b #$80 : BNE + ;zelda cell
|
||||
LDA.l Follower_Zelda : CMP.b #$01 : BNE .return
|
||||
BRA .set_checkpoint
|
||||
+ CMP.b #$45 : BNE .return ; maiden cell
|
||||
CPX.w #$0964 : BNE .return ; top big lock
|
||||
LDA.l Follower_Maiden : CMP.b #$01 : BNE .return
|
||||
.set_checkpoint
|
||||
LDA.b #$02 : STA.l StartingEntrance
|
||||
PHX
|
||||
SEP #$10
|
||||
JSL SaveDeathCount
|
||||
JSL Dungeon_SaveRoomQuadrantData
|
||||
REP #$10
|
||||
PLX
|
||||
.return
|
||||
REP #$30
|
||||
RTL
|
||||
|
||||
FollowerGfxRedraw:
|
||||
PHP : SEP #$30
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .return
|
||||
PHY
|
||||
LDY.b #$0F
|
||||
.next
|
||||
LDA.w SpriteAITable,Y : BEQ ++
|
||||
LDA.w SpriteTypeTable,Y : CMP.b #$76 : BEQ + ; zelda
|
||||
CMP.b #$AD : BEQ + ; old man
|
||||
CMP.b #$B7 : BEQ + ; maiden
|
||||
CMP.b #$1A : BEQ + ; frog
|
||||
CMP.b #$39 : BEQ + ; locksmith
|
||||
CMP.b #$B6 : BEQ + ; kiki
|
||||
CMP.b #$B4 : BEQ + ; purple chest
|
||||
CMP.b #$B5 : BNE ++ ; big bomb
|
||||
LDA.w SpriteJumpIndex,Y : CMP.b #$02 : BEQ +
|
||||
BRA ++
|
||||
+ LDA.b #$01 : STA.w SprRedrawFlag,Y
|
||||
++ DEY : BPL .next
|
||||
PLY
|
||||
.return
|
||||
PLP
|
||||
RTL
|
||||
|
||||
; A = 2 byte VRAM position in OAM2 for head/body
|
||||
; Scrap06/07/08 = address to OAM group
|
||||
; Returns with carry flag set if draw occurred
|
||||
TransferAndDrawFollowerGfx:
|
||||
PHA
|
||||
LDA.w SpriteTimerE, X : AND.w #$0008 : BNE .skip_draw ; skip drawing every other frame
|
||||
LDA.b 1,S
|
||||
JSR TransferFollowerSpriteGfx ; returns with SEP #$20
|
||||
LDA.w SpriteTypeTable, X : CMP.b #$39 : BNE +
|
||||
; locksmith location flicker if quest completed but purple chest remains
|
||||
LDA.w SpriteAux, X : BNE .continue
|
||||
JSL DetermineFollowerSpawn : BCS .flicker
|
||||
+ BRA .continue
|
||||
.flicker
|
||||
LDA.w SpriteTimerE, X : NOP #2 : BNE .continue
|
||||
LDA.b #$0C : STA.w SpriteTimerE, X
|
||||
.continue
|
||||
PLA : XBA : PLA : XBA
|
||||
JSL SpriteDraw_Follower
|
||||
SEC
|
||||
RTL
|
||||
.skip_draw
|
||||
PLA
|
||||
SEP #$20
|
||||
CLC
|
||||
RTL
|
||||
|
||||
; A = 2 byte VRAM position in OAM2 for head/body
|
||||
TransferFollowerSpriteGfx_skip_transfer:
|
||||
PLA : PLA
|
||||
RTS
|
||||
TransferFollowerSpriteGfx:
|
||||
PHA : SEP #$20
|
||||
LDA.w SprRedrawFlag, X : BEQ .skip_transfer
|
||||
.redraw
|
||||
STZ.w SprRedrawFlag, X
|
||||
JSL DetermineFollower
|
||||
CMP.b #$01 : BNE +
|
||||
PLA : XBA : LDA.b #$83 ; zelda body
|
||||
JSR QueueFollowerSpriteGfx
|
||||
PLA : XBA : LDA.b #$82 ; zelda head
|
||||
JMP QueueFollowerSpriteGfx
|
||||
+ CMP.b #$04 : BNE +
|
||||
PLA : XBA : LDA.b #$84 ; old man body
|
||||
JSR QueueFollowerSpriteGfx
|
||||
PLA : XBA : LDA.b #$85 ; old man head
|
||||
JMP QueueFollowerSpriteGfx
|
||||
+ CMP.b #$06 : BNE +
|
||||
PLA : XBA : LDA.b #$81 ; maiden body
|
||||
JSR QueueFollowerSpriteGfx
|
||||
PLA : XBA : LDA.b #$80 ; maiden head
|
||||
JMP QueueFollowerSpriteGfx
|
||||
+ CMP.b #$07 : BNE +
|
||||
PLA : XBA : PLA : LDA.b #$11 ; frog
|
||||
JMP QueueFollowerSpriteGfx
|
||||
+ CMP.b #$08 : BNE +
|
||||
PLA : XBA : PLA : LDA.b #$16 ; smith
|
||||
JMP QueueFollowerSpriteGfx
|
||||
+ CMP.b #$09 : BNE +
|
||||
PLA : XBA : LDA.b #$87 ; locksmith body
|
||||
JSR QueueFollowerSpriteGfx
|
||||
PLA : XBA : LDA.b #$86 ; locksmith head
|
||||
JMP QueueFollowerSpriteGfx
|
||||
+ CMP.b #$0A : BNE +
|
||||
PLA : XBA : LDA.b #$13 ; kiki body
|
||||
JSR QueueFollowerSpriteGfx
|
||||
PLA : XBA : LDA.b #$12 ; kiki head
|
||||
JMP QueueFollowerSpriteGfx
|
||||
+ CMP.b #$0C : BNE +
|
||||
PLA : XBA : PLA : LDA.b #$14 ; purple chest
|
||||
JMP QueueFollowerSpriteGfx
|
||||
+ PLA : XBA : PLA : LDA.b #$15 ; super bomb
|
||||
JMP QueueFollowerSpriteGfx
|
||||
|
||||
; A = 2 bytes, dest/src
|
||||
QueueFollowerSpriteGfx:
|
||||
PHX : REP #$20
|
||||
PHA
|
||||
AND.w #$00FF : CMP.w #$00FF : BEQ +
|
||||
ASL #6 : EOR.w #$8000 : BRA .write_src
|
||||
+ LDA.w #$0020 ; blank tile
|
||||
.write_src
|
||||
LDX.w ItemStackPtr : STA.l ItemGFXStack,X
|
||||
PLA : XBA
|
||||
AND.w #$00FF : ASL #4 : EOR.w #$5000
|
||||
STA.l ItemTargetStack,X
|
||||
TXA : INC #2 : STA.w ItemStackPtr
|
||||
SEP #$20 : PLX
|
||||
RTS
|
||||
|
||||
; A = 2 byte VRAM position in OAM2 for head/body
|
||||
; Scrap06/07/08 = address to OAM group
|
||||
; Scrap09/0A = address to palette data
|
||||
SpriteDraw_Follower:
|
||||
PHB : LDY.b #$7E : PHY : PLB
|
||||
REP #$20
|
||||
PHA
|
||||
LDY.b #$0E
|
||||
- LDA.b [Scrap06], Y : STA.w SpriteDynamicOAM, Y
|
||||
DEY #2 : BPL -
|
||||
LDA.b Scrap09 : STA.b Scrap06
|
||||
PLA
|
||||
SEP #$20
|
||||
STA.w SpriteDynamicOAM+$0C : XBA : STA.w SpriteDynamicOAM+$04
|
||||
JSL DetermineFollower : PHA
|
||||
PHX
|
||||
TAX : DEX
|
||||
LDA.b Scrap06 : ORA.b Scrap07 : BEQ +
|
||||
TXY
|
||||
LDA.b [Scrap06], Y
|
||||
BRA .set_palette
|
||||
+
|
||||
LDA.l .palette_data, X
|
||||
.set_palette
|
||||
STA.w SpriteDynamicOAM+$05 : STA.w SpriteDynamicOAM+$0D
|
||||
PLX
|
||||
REP #$20
|
||||
LDA.w #$0002 : STA.b Scrap06
|
||||
LDA.w #SpriteDynamicOAM : STA.b Scrap08
|
||||
SEP #$20
|
||||
PLA : CMP.b #$07 : BCC + : CMP.b #$09 : BEQ + : CMP.b #$0A : BEQ +
|
||||
; only draw body
|
||||
PHA
|
||||
LDA.b #$01 : STA.b Scrap06
|
||||
LDA.b #SpriteDynamicOAM+8 : STA.b Scrap08
|
||||
PLA
|
||||
+
|
||||
; follower specific adjustments
|
||||
CMP.b #$04 : BNE +
|
||||
LDA.w SpriteDynamicOAM+$0A : SEC : SBC.b #8 : STA.w SpriteDynamicOAM+$02 ; old man coords
|
||||
+
|
||||
CMP.b #$0A : BNE +
|
||||
LDA.w SpriteDynamicOAM+$0A : SEC : SBC.b #6 : STA.w SpriteDynamicOAM+$02 ; kiki coords
|
||||
LDA.w SpriteTypeTable, X : CMP.b #$1A : BEQ ++ : CMP.b #$B4 : BCS ++ : BRA .draw
|
||||
++ LDA.w SpriteDynamicOAM+$05 : ORA.b #$40
|
||||
STA.w SpriteDynamicOAM+$05 : STA.w SpriteDynamicOAM+$0D ; kiki horiz flip
|
||||
+
|
||||
.draw
|
||||
JSL Sprite_DrawMultiple_player_deferred
|
||||
PLB
|
||||
RTL
|
||||
.palette_data
|
||||
; 01 04 06 07 08 09 0A 0C 0D
|
||||
db $00, $00, $00, $00, $00, $06, $00, $00, $06, $00, $00, $00, $00
|
||||
|
||||
|
||||
DetermineFollower:
|
||||
LDA.w SpriteAux, X : BEQ .skip_stored : RTL ; stored follower
|
||||
.skip_stored
|
||||
+ LDA.w $0E20,X : CMP.b #$1A : BNE +
|
||||
LDA.l Follower_Frog : BRA .finalize
|
||||
+ CMP.b #$39 : BNE +
|
||||
LDA.l Follower_Locksmith : BRA .finalize
|
||||
+ CMP.b #$AD : BNE +
|
||||
LDA.l Follower_OldMan : BRA .finalize
|
||||
+ CMP.b #$B6 : BNE +
|
||||
LDA.l Follower_Kiki : BRA .finalize
|
||||
+ CMP.b #$B7 : BNE +
|
||||
LDA.l Follower_Maiden : BRA .finalize
|
||||
+ CMP.b #$76 : BNE +
|
||||
LDA.l Follower_Zelda : BRA .finalize
|
||||
+ CMP.b #$B4 : BNE +
|
||||
LDA.l Follower_PurpleChest : BRA .finalize
|
||||
+ LDA.l Follower_SuperBomb
|
||||
.finalize
|
||||
PHA
|
||||
CMP.b #$07 : BNE +
|
||||
LDA.l CurrentWorld : BNE +
|
||||
PLA : LDA.b #$08 : RTL
|
||||
+
|
||||
PLA
|
||||
RTL
|
||||
|
||||
SetAndLoadFollower:
|
||||
LDA.l FollowerIndicator
|
||||
.skip_current
|
||||
PHA
|
||||
LDA.b #$00 : STA.l FollowerDropped
|
||||
JSL DetermineFollower : STA.l FollowerIndicator
|
||||
CMP.b #$01 : BNE +
|
||||
JSL DetermineFollower_skip_stored : CMP.b #$01 : BNE +
|
||||
LDA.b #$02 : STA.l StartingEntrance
|
||||
JSL SaveDeathCount
|
||||
PHX
|
||||
JSL Dungeon_SaveRoomQuadrantData
|
||||
PLX
|
||||
+ CMP.b #$09 : BNE +
|
||||
LDA.b #$40 : STA.w $02CD : STZ.w $02CE ; locksmith timed message
|
||||
+
|
||||
PHX
|
||||
JSL Tagalong_LoadGfx
|
||||
PLX
|
||||
PLA : BNE +
|
||||
JSL Follower_Initialize
|
||||
JML Sprite_BecomeFollower
|
||||
+
|
||||
RTL
|
||||
|
||||
StoreAndLoadFollower:
|
||||
LDA.l FollowerDropped : BNE .no_storage
|
||||
LDA.l FollowerIndicator : BEQ .no_storage
|
||||
PHA
|
||||
JSL SetAndLoadFollower_skip_current
|
||||
PLA : STA.w SpriteAux, X
|
||||
LDA.b #$13 : JSL Sound_SetSfx3PanLong
|
||||
LDA.b #$01 : STA.w SprRedrawFlag, X
|
||||
STZ.w SpriteActivity, X
|
||||
LDA.b #$90 : STA.w SpriteTimerE, X
|
||||
SEC : RTL
|
||||
.no_storage
|
||||
JSL SetAndLoadFollower_skip_current
|
||||
CLC : RTL
|
||||
|
||||
; return SEC if destination resolved
|
||||
DetermineFollowerSpawn_locksmith_check:
|
||||
; locksmith location needs to spawn if purple chest reward not acquired
|
||||
LDA.l FollowerIndicator : CMP.b #$0C : BEQ .always_spawn
|
||||
JSL DetermineFollower_skip_stored : CMP.l FollowerIndicator : BEQ .matched_following
|
||||
LDA.l NpcFlagsVanilla : AND.b #$10 : BEQ .always_spawn
|
||||
BRA DetermineFollowerSpawn
|
||||
.always_spawn
|
||||
CLC : RTL
|
||||
.matched_following
|
||||
SEC : RTL
|
||||
|
||||
DetermineFollowerSpawn_include_stored:
|
||||
JSL DetermineFollower
|
||||
BRA DetermineFollowerSpawn_byof
|
||||
DetermineFollowerSpawn:
|
||||
JSL DetermineFollower_skip_stored
|
||||
.byof
|
||||
CMP.l FollowerIndicator : BEQ .matched_following
|
||||
.skip_match_check
|
||||
PHA
|
||||
; despawn if pre-requisite not met
|
||||
LDA.w SpriteTypeTable, X : CMP.b #$B4 : BNE +
|
||||
LDA.l NpcFlagsVanilla : AND.b #$20 : EOR.b #$20 : CMP.b #$20
|
||||
BRA .prereq_check
|
||||
+ CMP.b #$B5 : BNE +
|
||||
LDA.l CrystalsField : AND.b #$05 : CMP.b #$05
|
||||
LDA.b #$FF : ADC.b #$00 : ROR ; flip carry flag
|
||||
.prereq_check
|
||||
PLA : BCC .check_resolved
|
||||
RTL
|
||||
+
|
||||
PLA
|
||||
.check_resolved
|
||||
CMP.b #$01 : BNE +
|
||||
LDA.l ProgressFlags : AND.b #$04 : CMP.b #$04 : RTL
|
||||
+ CMP.b #$04 : BNE +
|
||||
JML ItemCheck_OldMan
|
||||
+ CMP.b #$06 : BNE +
|
||||
LDA.l RoomDataWRAM[$AC].high : AND.b #$08 : CMP.b #$08 : BCS ++
|
||||
LDA.l EnemizerFlags_close_blind_door : CMP.b #$01
|
||||
++
|
||||
RTL
|
||||
+ CMP.b #$09 : BCS + ; if frog or smith
|
||||
LDA.l NpcFlagsVanilla : AND.b #$20 : CMP.b #$20 : RTL
|
||||
+ CMP.b #$0A : BNE +
|
||||
LDA.l OverworldEventDataWRAM+$5E : AND.b #$20 : CMP.b #$20 : RTL
|
||||
+ CMP.b #$0C : BNE +
|
||||
LDA.l NpcFlagsVanilla : AND.b #$10 : CMP.b #$10 : RTL
|
||||
+
|
||||
.always_spawn
|
||||
CLC : RTL ; big bomb and locksmith have no completion condition in code
|
||||
.matched_following
|
||||
SEC : RTL
|
||||
|
||||
Follower_CheckMessageCollision:
|
||||
PHA
|
||||
LDA.w SpriteTimerE, X : BNE .skip_collision_check
|
||||
PLA
|
||||
JML Sprite_ShowMessageFromPlayerContact ; what we wrote over
|
||||
.skip_collision_check
|
||||
PLA
|
||||
CLC : RTL
|
||||
|
||||
Follower_CheckTileCollision:
|
||||
LDA.w SpriteTimerE, X : BNE .skip_collision_check
|
||||
JML Sprite_CheckTileCollisionLong ; what we wrote over
|
||||
.skip_collision_check
|
||||
RTL
|
||||
|
||||
Follower_CheckCollision:
|
||||
LDA.w SpriteTimerE, X : BNE .skip_collision_check
|
||||
JML Sprite_CheckDamageToPlayerSameLayerLong ; what we wrote over
|
||||
.skip_collision_check
|
||||
CLC : RTL
|
||||
|
||||
SpritePrep_ZeldaFollower:
|
||||
LDA.b RoomIndex : CMP.b #$12 : BEQ .no_follower_shuffle_sanc
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .no_follower_shuffle
|
||||
JSL DetermineFollowerSpawn : BCC + : RTL : +
|
||||
LDA.b #$01 : STA.w SprRedrawFlag, X
|
||||
PLA : PLA : PEA.w $EC4B-1 ; return to spawn
|
||||
RTL
|
||||
.no_follower_shuffle
|
||||
LDA.l FollowerIndicator : CMP.b #$01
|
||||
RTL
|
||||
.no_follower_shuffle_sanc
|
||||
LDA.l FollowerIndicator : CMP.b #$02
|
||||
RTL
|
||||
|
||||
Zelda_WaitingInCell:
|
||||
JSL Follower_CheckCollision ; what we wrote over, kinda
|
||||
BCC .return
|
||||
PHP
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE +
|
||||
INC.w SpriteActivity, X
|
||||
PLP
|
||||
PLA : PLA : PEA.w $ECF9-1 : RTL ; skip sprite movement
|
||||
+
|
||||
PLP
|
||||
.return
|
||||
RTL
|
||||
|
||||
Zelda_BecomeFollower:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
PLA : PLA
|
||||
JSL StoreAndLoadFollower : BCC +
|
||||
PEA.w $ED68-1 : RTL ; jump to avoid sprite despawn
|
||||
+
|
||||
PEA.w $ED60-1 ; jump to despawn
|
||||
RTL
|
||||
|
||||
.vanilla
|
||||
LDA.b #$02 : STA.l StartingEntrance ; what we wrote over
|
||||
RTL
|
||||
|
||||
SpritePrep_BlindMaiden:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
JSL DetermineFollowerSpawn : BCC +
|
||||
LDA.b #$01 : RTL
|
||||
+
|
||||
LDA.b #$01 : STA.w SprRedrawFlag, X
|
||||
INC.w SpriteAncillaInteract, X
|
||||
STZ.w FollowerNoDraw
|
||||
PLA : PLA : PEA.w $89C8-1 ; return to spawn
|
||||
RTL
|
||||
.vanilla
|
||||
LDA.l RoomDataWRAM[$AC].high : AND.b #$08 ; what we wrote over
|
||||
RTL
|
||||
|
||||
; Prevent followers from causing blind/maiden to despawn:
|
||||
; Door rando: let zelda despawn the maiden.
|
||||
BlindZeldaDespawnFix:
|
||||
LDA.l FollowerIndicator ; what we wrote over
|
||||
CMP.b #06 : BEQ +
|
||||
LDA.w SpritePosYLow,X : BEQ +
|
||||
LDA.b #$00 : RTL ; don't despawn follower if maiden isn't "present"
|
||||
+
|
||||
LDA.b #$01 : RTL
|
||||
|
||||
SpriteDraw_ZeldaMaiden:
|
||||
LDA.b RoomIndex : CMP.b #$12 : BEQ .vanilla
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
LDA.b #.oam_group>>16 : STA.b Scrap08
|
||||
LDA.w SpriteTypeTable, X : CMP.b #$76 : BNE +
|
||||
REP #$20
|
||||
LDA.w #.oam_group : STA.b Scrap06
|
||||
LDA.w #0000 : STA.b Scrap09
|
||||
LDA.l Follower_Zelda_vram
|
||||
BRA .transfer
|
||||
+
|
||||
REP #$20
|
||||
LDA.w #.oam_group : STA.b Scrap06
|
||||
LDA.w #.palette_data_maiden : STA.b Scrap09
|
||||
LDA.l Follower_Maiden_vram
|
||||
.transfer
|
||||
JML TransferAndDrawFollowerGfx
|
||||
.skip_draw
|
||||
RTL
|
||||
.vanilla:
|
||||
JML SpriteDraw_Maiden
|
||||
.oam_group:
|
||||
dw 1, -7 : db $20, $00, $00, $02
|
||||
dw 1, 3 : db $22, $00, $00, $02
|
||||
.palette_data_maiden
|
||||
; 01 04 06 07 08 09 0A 0C 0D
|
||||
db $02, $00, $00, $02, $00, $04, $02, $02, $04, $02, $00, $02, $02
|
||||
|
||||
BlindMaiden_BecomeFollower:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
PLA : PLA
|
||||
JSL StoreAndLoadFollower : BCS .return
|
||||
STZ.w SpriteAITable, X
|
||||
.return
|
||||
PEA.w $E8EA-1 ; jump ahead on return
|
||||
RTL
|
||||
.vanilla
|
||||
STZ.w SpriteAITable, X : LDA.b #$06 ; what we wrote over
|
||||
RTL
|
||||
|
||||
SpritePrep_OldManFollower:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .no_follower_shuffle
|
||||
PLA : PLA
|
||||
JSL DetermineFollowerSpawn : BCC +
|
||||
PEA.w $E928-1 ; return to despawn
|
||||
RTL
|
||||
+
|
||||
LDA.b #$01 : STA.w SprRedrawFlag, X
|
||||
PEA.w $E927-1 ; return to spawn
|
||||
RTL
|
||||
.no_follower_shuffle
|
||||
LDA.l FollowerIndicator : CMP.b #$04
|
||||
RTL
|
||||
|
||||
SpriteDraw_OldManFollower:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
LDA.w SpriteJumpIndex, X : CMP.b #$01 : BEQ .vanilla
|
||||
LDA.b #.oam_group>>16 : STA.b Scrap08
|
||||
REP #$20
|
||||
LDA.w #.oam_group : STA.b Scrap06
|
||||
LDA.w #0000 : STA.b Scrap09
|
||||
PLA : PEA.w $FF45-1 ; skip vanilla draw
|
||||
LDA.l Follower_OldMan_vram
|
||||
JML TransferAndDrawFollowerGfx
|
||||
.vanilla
|
||||
LDA.b #$02 : STA.b Scrap06 ; what we wrote over
|
||||
RTL
|
||||
.oam_group
|
||||
dw 0, 0 : db $AC, $00, $00, $02
|
||||
dw 0, 8 : db $AE, $00, $00, $02
|
||||
|
||||
OldMan_BecomeFollower:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BCC .set_follower_and_despawn
|
||||
PLA : PLA
|
||||
JSL StoreAndLoadFollower : BCC +
|
||||
PEA.w $E9DF-1 : RTL ; jump to avoid sprite despawn
|
||||
+
|
||||
PEA.w $E9DC-1 ; jump to despawn
|
||||
RTL
|
||||
.set_follower_and_despawn
|
||||
JSL SetAndLoadFollower
|
||||
PLA : PLA : PEA.w $E9D6-1
|
||||
|
||||
SpritePrep_SmithyFrog:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .no_follower_shuffle
|
||||
JSL DetermineFollowerSpawn : BCC +
|
||||
LDA.b #$01 ; return to despawn
|
||||
RTL
|
||||
+
|
||||
LDA.b #$01 : STA.w SprRedrawFlag, X
|
||||
DEC ; return to spawn
|
||||
RTL
|
||||
.no_follower_shuffle
|
||||
LDA.l FollowerIndicator : BNE + ; what we wrote over
|
||||
LDA.l NpcFlagsVanilla : AND.b #$20 ; what we wrote over
|
||||
+ RTL
|
||||
|
||||
SpriteDraw_FrogFollower:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
LDA.b #.oam_group>>16 : STA.b Scrap08
|
||||
REP #$20
|
||||
LDA.w #.oam_group : STA.b Scrap06
|
||||
LDA.w #0000 : STA.b Scrap09
|
||||
PLA : PEA.w $DCD6-1
|
||||
LDA.l Follower_Frog_vram
|
||||
JML TransferAndDrawFollowerGfx
|
||||
.vanilla
|
||||
LDA.b #$01 : STA.b Scrap06 ; what we wrote over
|
||||
RTL
|
||||
.oam_group:
|
||||
dw 1, -8 : db $FF, $00, $00, $02
|
||||
dw 1, 0 : db $C8, $00, $00, $02
|
||||
|
||||
Frog_BecomeFollower:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BCC .set_follower_and_despawn
|
||||
PLA : PLA
|
||||
JSL StoreAndLoadFollower : BCC +
|
||||
PEA.w $B2C7-1 : RTL ; jump to avoid sprite despawn
|
||||
+
|
||||
PEA.w $B2C4-1 ; jump to despawn
|
||||
RTL
|
||||
.set_follower_and_despawn
|
||||
JSL SetAndLoadFollower
|
||||
PLA : PLA : PEA.w $B2C4-1 ; jump to despawn
|
||||
RTL
|
||||
|
||||
SpritePrep_PurpleChest:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
JSL DetermineFollowerSpawn : BCC +
|
||||
LDA.b #$00 ; return to despawn
|
||||
RTL
|
||||
+
|
||||
PLA : PLA : PEA.w $8A69-1 ; return to spawn
|
||||
LDA.b #$01 : STA.w SprRedrawFlag, X
|
||||
RTL
|
||||
.vanilla
|
||||
LDA.l FollowerIndicator : CMP.b #$0C
|
||||
RTL
|
||||
|
||||
SpriteDraw_PurpleChest:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
LDA.b #.oam_group>>16 : STA.b Scrap08
|
||||
REP #$20
|
||||
LDA.w #.oam_group : STA.b Scrap06
|
||||
LDA.w #0000 : STA.b Scrap09
|
||||
LDA.l Follower_PurpleChest_vram
|
||||
JML TransferAndDrawFollowerGfx
|
||||
.vanilla
|
||||
JML Sprite_PrepAndDrawSingleLargeLong ; what we wrote over
|
||||
.oam_group:
|
||||
dw 0, -8 : db $C8, $00, $00, $02
|
||||
dw 0, 0 : db $EE, $00, $00, $02
|
||||
|
||||
PurpleChest_FollowCheck:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
LDA.b #$00
|
||||
RTL
|
||||
.vanilla
|
||||
LDA.l FollowerIndicator ; what we wrote over
|
||||
RTL
|
||||
|
||||
PurpleChest_BecomeFollower:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
PLA : PLA
|
||||
JSL StoreAndLoadFollower : BCS .return
|
||||
STZ.w SpriteAITable, X
|
||||
.return
|
||||
PEA.w $E10A-1 ; jump ahead on return
|
||||
RTL
|
||||
.vanilla
|
||||
STZ.w SpriteAITable, X : LDA.b #$0C ; what we wrote over
|
||||
RTL
|
||||
|
||||
SpritePrep_SuperBomb:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
JSL DetermineFollowerSpawn : BCC +
|
||||
LDA.b #$00 ; despawn on exit
|
||||
RTL
|
||||
+
|
||||
LDA.b #$05
|
||||
RTL
|
||||
.vanilla
|
||||
LDA.l CrystalsField ; what we wrote over
|
||||
RTL
|
||||
|
||||
SpriteDraw_SuperBomb:
|
||||
LDA.w SpriteJumpIndex, X : CMP.b #$02 : BNE .vanilla
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
LDA.b #.oam_group>>16 : STA.b Scrap08
|
||||
REP #$20
|
||||
LDA.w #.oam_group : STA.b Scrap06
|
||||
LDA.w #.palette_data : STA.b Scrap09
|
||||
PLA : PEA.w $E2E2-1 ; skip vanilla draw
|
||||
LDA.l Follower_SuperBomb_vram
|
||||
JML TransferAndDrawFollowerGfx
|
||||
.vanilla
|
||||
LDA.b #$01 : STA.b Scrap06 ; what we wrote over
|
||||
RTL
|
||||
.oam_group:
|
||||
dw 0, -8 : db $AE, $08, $00, $02
|
||||
dw 0, 0 : db $4E, $08, $00, $02
|
||||
.palette_data
|
||||
; 01 04 06 07 08 09 0A 0C 0D
|
||||
db $08, $00, $00, $08, $00, $06, $08, $08, $06, $08, $00, $08, $08
|
||||
|
||||
SuperBomb_FollowCheck:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
LDA.w SpriteTimerE, X : BNE .skip_follow
|
||||
LDA.w SpriteAux, X : BEQ .vanilla
|
||||
PLA : PLA : PEA.w $E1F1-1 ; jump to skip cost, no double charge
|
||||
RTL
|
||||
.skip_follow
|
||||
PLA : PLA : PEA.w $E20C-1 ; jump to exit
|
||||
RTL
|
||||
.vanilla
|
||||
LDA.b #$64 : LDY.b #$00 ; what we wrote over
|
||||
RTL
|
||||
|
||||
SuperBomb_BecomeFollower:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
PLA : PLA
|
||||
JSL StoreAndLoadFollower : BCC +
|
||||
PEA.w $E20C-1 : RTL ; jump to exit
|
||||
+
|
||||
PEA.w $E201-1 ; jump to despawn
|
||||
RTL
|
||||
.vanilla
|
||||
LDA.b #$0D : STA.l FollowerIndicator ; what we wrote over
|
||||
RTL
|
||||
|
||||
pushpc
|
||||
org $868A14
|
||||
NOP #3 ; fix bomb shop spawn for dwarfless big bomb
|
||||
LDA.b #$B5 : JSL Sprite_SpawnDynamically
|
||||
BMI SuperBomb_BecomeFollower_exit
|
||||
LDA.b #$01 : STA.w SprRedrawFlag, Y ; force redraw for super bomb gfx
|
||||
pullpc
|
||||
|
||||
SpritePrep_Kiki:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
JSL DetermineFollowerSpawn : BCC +
|
||||
LDA.b #$20 : RTL ; despawn on exit
|
||||
+
|
||||
LDA.b #$00
|
||||
RTL
|
||||
.vanilla
|
||||
LDX.b OverworldIndex : LDA.l OverworldEventDataWRAM,X ; what we wrote over
|
||||
RTL
|
||||
|
||||
Kiki_OfferToFollow:
|
||||
PHA
|
||||
LDA.w SpriteTimerE, X : BNE .skip_collision_check
|
||||
PLA
|
||||
JML Sprite_ShowMessageUnconditional ; what we wrote over
|
||||
.skip_collision_check
|
||||
PLA
|
||||
CLC : RTL
|
||||
|
||||
Kiki_FollowCheck:
|
||||
JSL DetermineFollowerSpawn_include_stored : BCS .skip_follow
|
||||
LDA.w SpriteTimerE, X
|
||||
RTL
|
||||
.skip_follow
|
||||
LDA.b #$20
|
||||
RTL
|
||||
|
||||
Kiki_BecomeFollower:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .no_follower_shuffle
|
||||
PLA : PLA : PEA.w $E4C2-1 ; jump to exit
|
||||
STZ.w FollowerNoDraw
|
||||
JML StoreAndLoadFollower
|
||||
.no_follower_shuffle
|
||||
LDA.b #$00 : STA.l FollowerDropped ; defuse bomb
|
||||
LDA.b #$0A : STA.l FollowerIndicator
|
||||
RTL
|
||||
|
||||
Kiki_FixTeleportOnExit:
|
||||
REP #$30
|
||||
LDA.b LinkPosX : STA.w LinkPosXCache
|
||||
LDA.b LinkPosY : STA.w LinkPosYCache
|
||||
SEP #$30
|
||||
LDA.b #$19 : LDY.b #$01 ; what we wrote over
|
||||
RTL
|
||||
|
||||
; on return it checks BEQ and if non-zero, kiki get spook
|
||||
Kiki_DontScareTheMonke:
|
||||
LDA.b LinkJumping : BEQ .return
|
||||
CMP.b #$02 : BEQ .no_spook ; needed for quake usage
|
||||
LDA.w NoDamage : BNE .no_spook
|
||||
LDA.w LinkThud : BNE .no_spook
|
||||
.spook
|
||||
LDA.b #$01 : RTL
|
||||
.no_spook
|
||||
LDA.b #$00
|
||||
.return
|
||||
RTL
|
||||
|
||||
SpritePrep_Locksmith:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
JSL DetermineFollowerSpawn_locksmith_check : BCS +
|
||||
LDA.b #$01 : STA.w SprRedrawFlag, X
|
||||
+
|
||||
LDA.l FollowerIndicator
|
||||
RTL
|
||||
.vanilla
|
||||
LDA.l FollowerIndicator : CMP.b #$09 ; what we wrote over
|
||||
BEQ +
|
||||
CLC : RTL
|
||||
+
|
||||
SEC : RTL
|
||||
|
||||
SpriteDraw_LocksmithFollower:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
LDA.b #.oam_group>>16 : STA.b Scrap08
|
||||
REP #$20
|
||||
LDA.w #.oam_group : STA.b Scrap06
|
||||
LDA.w #.palette_data : STA.b Scrap09
|
||||
PLA : PEA.w $DCD6-1 ; skip draw on exit
|
||||
LDA.l Follower_Locksmith_vram
|
||||
JML TransferAndDrawFollowerGfx
|
||||
.vanilla
|
||||
LDA.b #$02 : STA.b Scrap06 ; what we wrote over
|
||||
RTL
|
||||
.oam_group:
|
||||
dw 0, -8 : db $EA, $00, $00, $02
|
||||
dw 0, 0 : db $EC, $00, $00, $02
|
||||
.palette_data
|
||||
; 01 04 06 07 08 09 0A 0C 0D
|
||||
db $00, $00, $00, $0E, $00, $00, $0E, $0E, $00, $0E, $00, $0E, $0E
|
||||
|
||||
Locksmith_Chillin_PostMessage:
|
||||
LDA.w SpriteAux, X : BEQ +
|
||||
; when a follower is stored, merely walk near them
|
||||
LDA.w SpritePosXLow, X : PHA
|
||||
JSL Follower_CheckCollision : BCC .return
|
||||
BRA .continue
|
||||
+
|
||||
LDA.w SpritePosXLow, X : PHA
|
||||
SEC : SBC.b #$10 : STA.w SpritePosXLow, X
|
||||
LDA.b #$01 : STA.w SpriteVelocityX, X
|
||||
JSL Sprite_Get16BitCoords_long
|
||||
JSL Follower_CheckTileCollision : BNE .return
|
||||
.continue
|
||||
INC.w SpriteActivity, X ; award follower
|
||||
LDA.l FollowerIndicator : CMP.b #$0C : BEQ .purple_chest_prize
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BEQ .return
|
||||
LDA.l FollowerIndicator : CMP.b #$00 : BEQ .return
|
||||
LDA.b #$05 : STA.w SpriteActivity, X ; forever do nothing
|
||||
BRA .return
|
||||
.purple_chest_prize
|
||||
INC.w SpriteActivity, X ; prep for purple chest prize
|
||||
.return
|
||||
PLA : STA.w SpritePosXLow, X
|
||||
JML $86BD08 ; jump back to immediately RTS
|
||||
|
||||
Locksmith_BecomeFollower:
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
|
||||
STZ.w FollowerNoDraw
|
||||
PLA : PLA
|
||||
JSL StoreAndLoadFollower : BCS +
|
||||
LDA.l FollowerIndicator : CMP.b #$0C : BEQ +
|
||||
PEA.w $BD24-1 : RTL ; jump to despawn
|
||||
+
|
||||
PEA.w $BD27-1 ; jump to exit
|
||||
RTL
|
||||
.vanilla
|
||||
LDA.b #$09 : STA.l FollowerIndicator
|
||||
RTL
|
||||
|
||||
Locksmith_RespondToAnswer_PostItem:
|
||||
STA.l FollowerIndicator ; what we wrote over
|
||||
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .no_despawn
|
||||
LDA.w SpriteAux, X : CMP.b #$0C : BEQ .despawn
|
||||
CMP.b #$00 : BNE .no_despawn
|
||||
LDA.l Follower_Locksmith : CMP.b #$0C : BEQ .despawn
|
||||
JSL DetermineFollowerSpawn_include_stored : BCC .no_despawn
|
||||
.despawn
|
||||
STZ.w SpriteAITable, X
|
||||
.no_despawn
|
||||
RTL
|
||||
@@ -48,7 +48,7 @@ JML NMIHookReturn
|
||||
;--------------------------------------------------------------------------------
|
||||
PostNMIHookAction:
|
||||
LDA.w NMIAux : BEQ +
|
||||
PHK : PEA.w .return-1 ; push stack for RTL return
|
||||
PHK : PEA .return-1 ; push stack for RTL return
|
||||
JMP.w [NMIAux]
|
||||
.return
|
||||
STZ.w NMIAux ; zero bank byte of NMI hook pointer
|
||||
|
||||
29
gloom.asm
29
gloom.asm
@@ -1,29 +0,0 @@
|
||||
AdjustDefaultGraphics:
|
||||
JSL $80E310
|
||||
|
||||
LDA.l ChallengeModes : AND.b #$03 : CMP.b #$02 : BEQ .gloom
|
||||
RTL
|
||||
|
||||
.gloom
|
||||
LDA.b #$80
|
||||
STA.w $2115
|
||||
|
||||
REP #$20
|
||||
LDA.w #$7500
|
||||
STA.w $2116
|
||||
|
||||
LDY.b #SkullGfx_end-SkullGfx
|
||||
LDX.b #$00
|
||||
|
||||
- LDA.l SkullGfx, X
|
||||
STA.w $2118
|
||||
INX #2
|
||||
DEY #2
|
||||
BNE -
|
||||
|
||||
SEP #$20
|
||||
RTL
|
||||
|
||||
SkullGfx:
|
||||
incbin "data/skull.bin"
|
||||
.end
|
||||
471
goalitem.asm
471
goalitem.asm
@@ -1,6 +1,6 @@
|
||||
GoalItemGanonCheck:
|
||||
LDA.w SpriteTypeTable, X : CMP.b #$D6 : BNE .success ; skip if not ganon
|
||||
LDA.b #$01 : JSL CheckConditionPass
|
||||
JSL CheckGanonVulnerability
|
||||
BCS .success
|
||||
|
||||
.fail
|
||||
@@ -11,193 +11,104 @@ RTL
|
||||
LDA.b OAMOffsetY : CMP.b #$80 ; thing we wrote over
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
; Input A = Type of condition check
|
||||
; Carry clear = failed check
|
||||
; Carry set = successful check
|
||||
CheckConditionPass:
|
||||
PHX : PHY
|
||||
PHB
|
||||
LDY.b #GoalConditionTable>>16 : PHY : PLB : STY.b Scrap02
|
||||
REP #$20
|
||||
ASL : TAY
|
||||
LDA.w GoalConditionTable, Y : STA.b Scrap00
|
||||
PHK : PLB
|
||||
SEP #$20
|
||||
LDY.b #$00
|
||||
- LDA.b [Scrap00], Y : CMP.b #$FF : BEQ .exit
|
||||
INY : ROL : TAX
|
||||
JSR (.conditions, X) : BCC .exit : BRA -
|
||||
|
||||
.exit
|
||||
PLB : PLY : PLX
|
||||
RTL
|
||||
|
||||
; Y = index after condition code
|
||||
; Carry = Set if using default target value
|
||||
.conditions
|
||||
dw .always_fail
|
||||
dw .pendants
|
||||
dw .crystals
|
||||
dw .pendant_bosses
|
||||
dw .crystal_bosses
|
||||
dw .bosses
|
||||
dw .agahnim_defeated
|
||||
dw .agahnim2_defeated
|
||||
dw .goal_item
|
||||
dw .collection_rate
|
||||
dw .custom_goal
|
||||
dw .bingo
|
||||
dw .success
|
||||
dw .success
|
||||
dw .success
|
||||
dw .success
|
||||
|
||||
.agahnim2_defeated
|
||||
LDA.l RoomDataWRAM[$0D].high : AND.b #$08 : BEQ .fail
|
||||
.bingo ; not implemented yet
|
||||
.success
|
||||
SEC : RTS
|
||||
.always_fail
|
||||
.fail
|
||||
CLC : RTS
|
||||
.pendants
|
||||
PHP
|
||||
LDA.l PendantCounter : PLP : BCC +
|
||||
CMP.b #$03 : RTS
|
||||
.crystals
|
||||
PHP
|
||||
LDA.l CrystalCounter : PLP : BCC +
|
||||
CMP.b #$07 : RTS
|
||||
.pendant_bosses
|
||||
PHP
|
||||
LDA.b #$02
|
||||
JSR CheckForBossesDefeated : PLP : BCC +
|
||||
CMP.b #$03 : RTS
|
||||
.crystal_bosses
|
||||
PHP
|
||||
LDA.b #$01
|
||||
JSR CheckForBossesDefeated : PLP : BCC +
|
||||
CMP.b #$07 : RTS
|
||||
.bosses
|
||||
PHP
|
||||
LDA.b #$00
|
||||
JSR CheckForBossesDefeated : PLP : BCC +
|
||||
CMP.b #$10 : RTS
|
||||
+ CMP.b [Scrap00], Y : INY : RTS
|
||||
.agahnim_defeated
|
||||
LDA.l ProgressIndicator : CMP.b #$03 : RTS
|
||||
.goal_item
|
||||
REP #$20
|
||||
LDA.l GoalCounter : BCC +
|
||||
CMP.l GoalItemRequirement : BRA ++
|
||||
.collection_rate
|
||||
REP #$20
|
||||
LDA.l TotalItemCounter : BCC +
|
||||
CMP.l TotalItemCount : BRA ++
|
||||
+ CMP.b [Scrap00], Y : INY : INY : ++
|
||||
SEP #$20
|
||||
RTS
|
||||
.custom_goal
|
||||
LDA.b [Scrap00], Y : INY ; options
|
||||
PHA : AND.b #$07 : ASL : TAX : PLA
|
||||
;JMP CheckConditionPassCustom
|
||||
; flows into next function, do not insert code after without uncommenting above
|
||||
|
||||
; --------------------------------------------------------------------------------
|
||||
; Input A = Options value, see GoalConditionTable for format
|
||||
; Input X = Condition check type index
|
||||
; Input Y = Index after Options byte
|
||||
CheckConditionPassCustom:
|
||||
PHX : PHA : BIT.b #$08 : PHP
|
||||
REP #$30
|
||||
LDA.b [Scrap00], Y : INY : INY ; address
|
||||
PLP : REP #$30 : BEQ .byte
|
||||
.word
|
||||
;Carry clear = ganon invincible
|
||||
;Carry set = ganon vulnerable
|
||||
CheckGanonVulnerability:
|
||||
PHX
|
||||
LDA.l GanonVulnerableMode
|
||||
ASL
|
||||
TAX
|
||||
SEP #$20
|
||||
PLA
|
||||
AND.b #$10
|
||||
REP #$20
|
||||
BNE +
|
||||
LDA.l $7E0000, X : BRA ++
|
||||
+
|
||||
LDA.l $7F0000, X : ++
|
||||
SEP #$10
|
||||
PLX
|
||||
REP #$10
|
||||
JSR (.comparisons, X)
|
||||
INY
|
||||
SEP #$30
|
||||
RTS
|
||||
.byte
|
||||
TAX
|
||||
SEP #$20
|
||||
PLA
|
||||
AND.b #$10 : BNE +
|
||||
LDA.l $7E0000, X : BRA ++
|
||||
+
|
||||
LDA.l $7F0000, X : ++
|
||||
SEP #$10
|
||||
PLX
|
||||
JMP (.comparisons, X)
|
||||
|
||||
.comparisons
|
||||
dw .minimum
|
||||
dw .exact
|
||||
dw .bitfield_nonzero
|
||||
dw .bitfield_match
|
||||
dw .count_bits
|
||||
dw .fail
|
||||
dw .fail
|
||||
dw .fail
|
||||
; Carry
|
||||
; 0 - invulnerable
|
||||
; 1 - vulnerable
|
||||
JSR (.goals, X)
|
||||
|
||||
.pass
|
||||
INY : SEC : RTS
|
||||
.count_bits
|
||||
JSL CountBits
|
||||
.minimum
|
||||
CMP.b [Scrap00], Y : INY
|
||||
RTS
|
||||
.bitfield_match
|
||||
AND.b [Scrap00], Y
|
||||
.exact
|
||||
CMP.b [Scrap00], Y : BEQ .pass
|
||||
INY : CLC : RTS
|
||||
.bitfield_nonzero
|
||||
AND.b [Scrap00], Y : BNE .pass
|
||||
.fail
|
||||
INY : CLC : RTS
|
||||
;--------------------------------------------------------------------------------
|
||||
GTCutscene_TransferGfx:
|
||||
PHA
|
||||
REP #$20
|
||||
STZ.w DuckPose
|
||||
LDA.l GanonsTowerOpenGfx : BEQ .original_crystal
|
||||
PHX
|
||||
LDX.w ItemStackPtr : STA.l ItemGFXStack,X
|
||||
LDA.w #$81C0>>1 : STA.l ItemTargetStack,X
|
||||
INX #2 : STX.w ItemStackPtr
|
||||
PLX
|
||||
SEP #$20
|
||||
PLA
|
||||
RTL
|
||||
.original_crystal
|
||||
SEP #$20
|
||||
PLA
|
||||
JML TransferItemReceiptToBuffer_using_GraphicsID
|
||||
;--------------------------------------------------------------------------------
|
||||
AncillaDraw_GTCutsceneCrystal_OAMPrep:
|
||||
LDA.l GanonsTowerOpenGfx : ORA.l GanonsTowerOpenGfx+1 : BEQ .vanilla
|
||||
LDA.b #$0E : STA.b (OAMPtr),Y
|
||||
INY
|
||||
LDA.l GanonsTowerOpenPalette : AND.b #$67 : ASL : ORA.b #$30
|
||||
STA.b (OAMPtr),Y
|
||||
PLX
|
||||
RTL
|
||||
.vanilla
|
||||
LDA.b #$24 : STA.b (OAMPtr),Y
|
||||
INY
|
||||
LDA.b #$3C : STA.b (OAMPtr),Y
|
||||
RTL
|
||||
|
||||
|
||||
.goals
|
||||
dw .vulnerable
|
||||
dw .invulnerable
|
||||
dw .all_dungeons
|
||||
dw .crystals_and_aga
|
||||
dw .crystals
|
||||
dw .goal_item
|
||||
dw .light_speed
|
||||
dw .crystals_and_bosses
|
||||
dw .bosses_only
|
||||
dw .all_dungeons_no_agahnim
|
||||
dw .all_items
|
||||
dw .completionist
|
||||
|
||||
; 00 = always vulnerable
|
||||
.vulnerable
|
||||
.success
|
||||
SEC
|
||||
RTS
|
||||
|
||||
; 01 = always invulnerable
|
||||
.invulnerable
|
||||
.fail
|
||||
CLC
|
||||
RTS
|
||||
|
||||
; 02 = All dungeons
|
||||
.all_dungeons
|
||||
LDA.l ProgressIndicator : CMP.b #$03 : BCC .fail ; require post-aga world state
|
||||
|
||||
; 09 = All dungeons except agahnim
|
||||
.all_dungeons_no_agahnim
|
||||
LDA.l PendantsField : AND.b #$07 : CMP.b #$07 : BNE .fail ; require all pendants
|
||||
LDA.l CrystalsField : AND.b #$7F : CMP.b #$7F : BNE .fail ; require all crystals
|
||||
LDA.l RoomDataWRAM[$0D].high : AND.b #$08 : BEQ .fail ; require aga2 defeated (pyramid hole open)
|
||||
BRA .success
|
||||
|
||||
; 03 = crystals and aga 2
|
||||
.crystals_and_aga
|
||||
LDA.l RoomDataWRAM[$0D].high : AND.b #$08 : BEQ .fail ; check aga2 first then bleed in
|
||||
|
||||
; 04 = crystals only
|
||||
.crystals
|
||||
JSL CheckEnoughCrystalsForGanon
|
||||
RTS
|
||||
|
||||
; 05 = require goal item
|
||||
.goal_item
|
||||
REP #$20
|
||||
LDA.l GoalCounter : CMP.l GoalItemRequirement
|
||||
SEP #$20
|
||||
RTS
|
||||
|
||||
; 06 = light speed
|
||||
.light_speed
|
||||
BRA .fail
|
||||
|
||||
; 07 = Crystals and bosses
|
||||
.crystals_and_bosses
|
||||
JSL CheckEnoughCrystalsForGanon ; check crystals first then bleed in to next
|
||||
BCC .fail
|
||||
|
||||
; 08 = Crystal bosses but no crystals
|
||||
.bosses_only
|
||||
JMP CheckForCrystalBossesDefeated
|
||||
|
||||
; 09 = 100% item collection rate
|
||||
.all_items
|
||||
REP #$20
|
||||
LDA.l TotalItemCounter : CMP.l TotalItemCount
|
||||
SEP #$20
|
||||
RTS
|
||||
|
||||
; 0A = 100% item collection rate and all dungeons
|
||||
.completionist
|
||||
REP #$20
|
||||
LDA.l TotalItemCounter : CMP.l TotalItemCount
|
||||
SEP #$20
|
||||
BCC .fail
|
||||
BRA .all_dungeons
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
GTCutscene_CrystalMasks:
|
||||
db %00000000 ; 0 crystals
|
||||
@@ -260,94 +171,48 @@ GTCutscene_ActivateSparkle_SelectCrystal:
|
||||
PLY
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
; prioritizes: number of gfx used > sum of targets > number of goals
|
||||
; Scrap00 stores number of goals
|
||||
; Y sums all goal target values
|
||||
GTCutscene_NumberOfCrystals:
|
||||
PHX : PHY : PHP
|
||||
REP #$20
|
||||
LDA.l GanonsTowerOpenGfx+2 : BEQ .not_multiple_gfx
|
||||
LDX.b #$04
|
||||
- LDA.l GanonsTowerOpenGfx, X : BEQ +
|
||||
INX : INX : CPX.b #$0E : BCC -
|
||||
+
|
||||
TXA : LSR
|
||||
JMP .done
|
||||
.not_multiple_gfx
|
||||
LDX.b #$00 : LDA.l GoalConditionTable, X
|
||||
TXY : STY.b Scrap00
|
||||
REP #$10
|
||||
LDA.l GanonsTowerOpenAddress : CMP.w #CrystalCounter : BEQ +
|
||||
LDA.w #$0001 : BRA .done
|
||||
+ LDA.l GanonsTowerOpenTarget
|
||||
.done
|
||||
SEP #$20
|
||||
TAX
|
||||
.next
|
||||
LDA.l $B00000, X : CMP.b #$FF : BNE + : JMP .use_y : +
|
||||
INC.b Scrap00
|
||||
ROL : PHP : CMP.b #$10 : BCS .not_8bit_compare
|
||||
CMP.b #$0C : BEQ .agas_goal
|
||||
CMP.b #$0E : BEQ .agas_goal
|
||||
; uses 8-bit targets
|
||||
PLP : BCC .use_8bit_target
|
||||
CMP.b #$04 : BEQ .crystal_goal ; crystal goal
|
||||
CMP.b #$08 : BEQ .crystal_goal ; crystal bosses goal
|
||||
CMP.b #$02 : BEQ .pendant_goal ; pendant goal
|
||||
CMP.b #$06 : BEQ .pendant_goal ; pendant bosses goal
|
||||
BRA .bosses_goal
|
||||
.crystal_goal
|
||||
LDA.b #$07 : INX : BRA .add_to_y
|
||||
.pendant_goal
|
||||
LDA.b #$03 : INX : BRA .add_to_y
|
||||
.bosses_goal
|
||||
INY : INX : BRA .next ; just increment Y by 1 since default of 10 is already more than max 7
|
||||
.agas_goal
|
||||
PLP : INX : BRA .next
|
||||
.use_8bit_target
|
||||
INX : LDA.l $B00000, X : INX
|
||||
.add_to_y
|
||||
PHY : CLC : ADC.b 1,S : PLY : TAY : BRA .next
|
||||
.not_8bit_compare
|
||||
CMP.b #$14 : BEQ .custom_goal : BCS .unknown
|
||||
; triforce hunt/collection rate - uses 16-bit targets
|
||||
PLP : INX : BCC +
|
||||
LDA.l $B00000, X : INX : INX : BRA .add_to_y
|
||||
+ INY : BRA .next
|
||||
.custom_goal
|
||||
PLP
|
||||
INX : LDA.l $B00000, X : BIT.b #$08 : PHP
|
||||
INX : INX : INX : AND.b #$03 : BEQ .use_custom_target
|
||||
; comparison method doesn't use a quantity, increment Y by 1
|
||||
INY : INX : PLP : BEQ +
|
||||
INX
|
||||
+
|
||||
BRA .next
|
||||
.use_custom_target
|
||||
PLP : BEQ ..8bit
|
||||
; 16-bit target
|
||||
REP #$20
|
||||
LDA.l $B00000, X : CMP.w #$0008 : SEP #$20 : INX : BRA +
|
||||
..8bit
|
||||
LDA.l $B00000, X : CMP.b #$08 : + : BCC +
|
||||
; target exceeds 7, just increment Y by 1
|
||||
INY : INX : JMP .next
|
||||
+
|
||||
INX : BRA .add_to_y
|
||||
.unknown ; unknown condition, exit with safe value
|
||||
PLP : INY
|
||||
.use_y
|
||||
TYA : BEQ + : CMP.b #$08 : BCC .done
|
||||
+ LDA.b Scrap00 : BEQ .use_one : CMP.b #$08 : BCC .done
|
||||
.use_one
|
||||
LDA.b #$01
|
||||
.done
|
||||
PLP : PLY : PLX
|
||||
RTS
|
||||
;--------------------------------------------------------------------------------
|
||||
CheckEnoughCrystalsForGanon:
|
||||
REP #$20
|
||||
LDA.l CrystalCounter
|
||||
CMP.l GanonVulnerableTarget
|
||||
SEP #$20
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
CheckTowerOpen:
|
||||
LDA.b #$00 : JML CheckConditionPass
|
||||
LDA.l GanonsTowerOpenMode : ASL : TAX
|
||||
JSR (.tower_open_modes,X)
|
||||
RTL
|
||||
.tower_open_modes
|
||||
dw .vanilla
|
||||
dw .arbitrary_cmp
|
||||
|
||||
.vanilla
|
||||
LDA.l CrystalsField
|
||||
AND.b #$7F : CMP.b #$7F
|
||||
RTS
|
||||
|
||||
.arbitrary_cmp
|
||||
REP #$30
|
||||
LDA.l GanonsTowerOpenAddress : TAX
|
||||
LDA.l $7E0000,X
|
||||
CMP.l GanonsTowerOpenTarget
|
||||
SEP #$30
|
||||
RTS
|
||||
|
||||
;---------------------------------------------------------------------------------------------------
|
||||
CheckAgaForPed:
|
||||
REP #$20
|
||||
; seems light_speed option to force blue balls is unused for now
|
||||
BRA .vanilla
|
||||
LDA.l GanonVulnerableMode
|
||||
CMP.w #$0006 : BNE .vanilla
|
||||
|
||||
.light_speed
|
||||
SEP #$20
|
||||
@@ -368,61 +233,73 @@ CheckAgaForPed:
|
||||
RTL
|
||||
|
||||
;---------------------------------------------------------------------------------------------------
|
||||
CheckForBossesDefeated:
|
||||
CheckForCrystalBossesDefeated:
|
||||
PHB : PHX : PHY
|
||||
|
||||
STA.b Scrap04 ; 0 = check all, 1 = check crystals, 2 = check pendants
|
||||
|
||||
LDA.b #CrystalPendantFlags_3>>16
|
||||
LDA.b #CrystalPendantFlags_2>>16
|
||||
PHA : PLB
|
||||
|
||||
STZ.b Scrap03 ; count of number of bosses killed
|
||||
STZ.b Scrap05
|
||||
|
||||
REP #$30
|
||||
|
||||
; count of number of bosses killed
|
||||
STZ.b Scrap00
|
||||
|
||||
LDY.w #10
|
||||
|
||||
.next_check
|
||||
LDA.w CrystalPendantFlags_3+2,Y : AND.w #$00FF : BEQ .skip
|
||||
CMP.w #$0008 ; C set = pendant, C clear = crystal
|
||||
LDA.b Scrap04 : BEQ .proceed
|
||||
PHP : ROR : BCC +
|
||||
PLP : BCS .skip : BRA .proceed
|
||||
+ PLP : BCC .skip
|
||||
LDA.w CrystalPendantFlags_2+2,Y
|
||||
BIT.w #$0040
|
||||
BEQ ++
|
||||
|
||||
.proceed
|
||||
TYA : ASL : TAX
|
||||
TYA
|
||||
ASL
|
||||
TAX
|
||||
|
||||
LDA.l DungeonMapBossRooms+4,X
|
||||
ASL : TAX
|
||||
LDA.l DrawHUDDungeonItems_boss_room_ids-4,X
|
||||
TAX
|
||||
LDA.l RoomDataWRAM.l,X
|
||||
|
||||
AND.w #$0800 : BEQ .skip
|
||||
INC.b Scrap03
|
||||
AND.w #$0800
|
||||
BEQ ++
|
||||
|
||||
.skip
|
||||
DEY : BPL .next_check
|
||||
INC.b Scrap00
|
||||
|
||||
++ DEY
|
||||
BPL .next_check
|
||||
|
||||
SEP #$30
|
||||
PLY : PLX : PLB
|
||||
|
||||
LDA.b Scrap03
|
||||
LDA.b Scrap00 : CMP.l GanonVulnerableTarget
|
||||
|
||||
|
||||
RTS
|
||||
;---------------------------------------------------------------------------------------------------
|
||||
CheckPedestalPull:
|
||||
; Out: c - Successful ped pull if set, do nothing if unset.
|
||||
LDA.b #$02 : JSL CheckConditionPass : BCS .return
|
||||
PHX : PHP
|
||||
LDA.b GameMode : CMP.b #$0E : BEQ +
|
||||
REP #$30
|
||||
LDX.w #$0004 : LDA.l GoalConditionTable, X : TAX
|
||||
LDA.l $B00000, X : CMP.w #$FF81 : BEQ +
|
||||
SEP #$30
|
||||
LDA.b #$97 : LDY.b #$01
|
||||
JSL Sprite_ShowMessageUnconditional
|
||||
+
|
||||
PLP : PLX
|
||||
.return
|
||||
PHX
|
||||
LDA.l PedCheckMode : ASL : TAX
|
||||
JSR (.pedestal_modes,X)
|
||||
PLX
|
||||
RTL
|
||||
|
||||
.pedestal_modes
|
||||
dw .vanilla
|
||||
dw .arbitrary_cmp
|
||||
|
||||
.vanilla
|
||||
LDA.l PendantsField
|
||||
AND.b #$07 : CMP.b #$07 : BNE ..nopull
|
||||
SEC
|
||||
RTS
|
||||
..nopull
|
||||
CLC
|
||||
RTS
|
||||
|
||||
.arbitrary_cmp
|
||||
REP #$30
|
||||
LDA.l PedPullAddress : TAX
|
||||
LDA.l $7E0000,X
|
||||
CMP.l PedPullTarget
|
||||
SEP #$30
|
||||
RTS
|
||||
|
||||
@@ -4,10 +4,19 @@
|
||||
HeartPieceGet:
|
||||
PHX : PHY
|
||||
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
||||
LDY.w SprSourceItemId, X
|
||||
LDY.w SprItemReceipt, X : BNE +
|
||||
LDA.w SprSourceItemId, X : BNE ++
|
||||
JSL LoadHeartPieceRoomValue
|
||||
STA.w SprSourceItemId, X
|
||||
++
|
||||
JSL AttemptItemSubstitution
|
||||
JSL ResolveLootIDLong
|
||||
STA.w SprItemReceipt, X
|
||||
TAY
|
||||
+
|
||||
JSL MaybeMarkDigSpotCollected
|
||||
.skipLoad
|
||||
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
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
|
||||
LDA.l HeartPieceQuarter : INC A : AND.b #$03 : STA.l HeartPieceQuarter
|
||||
@@ -23,7 +32,16 @@ RTL
|
||||
HeartContainerGet:
|
||||
PHX : PHY
|
||||
JSL IncrementBossSword
|
||||
LDY.w SprSourceItemId, X
|
||||
LDY.w SprItemReceipt, X : BNE +
|
||||
LDA.w SprSourceItemId, X : BNE ++
|
||||
JSL LoadHeartContainerRoomValue
|
||||
STA.w SprSourceItemId, X
|
||||
++
|
||||
JSL AttemptItemSubstitution
|
||||
JSL ResolveLootIDLong
|
||||
STA.w SprItemReceipt, X
|
||||
TAY
|
||||
+
|
||||
BRA HeartPieceGet_skipLoad
|
||||
;--------------------------------------------------------------------------------
|
||||
DrawHeartPieceGFX:
|
||||
@@ -242,12 +260,6 @@ LoadOutdoorValue:
|
||||
PHP
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
LDA.b OverworldIndex
|
||||
; Rain state fix: In rain state DW, use LW screen ID for item lookup
|
||||
BIT.w #$0040 : BEQ +
|
||||
LDA.l ProgressIndicator : AND.w #$00FF : CMP.w #$0002
|
||||
LDA.b OverworldIndex : BCS ++ : AND.w #$00BF
|
||||
++
|
||||
+
|
||||
CMP.w #$00 : BNE +
|
||||
LDA.l OWBonkPrizeTable[$00].loot
|
||||
JMP .done
|
||||
|
||||
175
hooks.asm
175
hooks.asm
@@ -407,16 +407,6 @@ STA.l StalfosBombDamage
|
||||
org $8AB76E ; <- 5376E - Bank0A.asm : 30 (JSL OverworldMap_InitGfx)
|
||||
JSL OnLoadDuckMap
|
||||
|
||||
;================================================================================
|
||||
; Fix Clobbered Gfx
|
||||
;--------------------------------------------------------------------------------
|
||||
org $80DB92
|
||||
JSL PostFixMirrorGfxPrep
|
||||
org $80D911
|
||||
JML PostFixMirrorGfx
|
||||
org $80E259
|
||||
JSL PostFixOAMGfx : NOP
|
||||
|
||||
;================================================================================
|
||||
; Infinite Bombs / Arrows / Magic
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -540,8 +530,6 @@ JML GTCutscene_ConditionalAnimateCrystals
|
||||
org $88CE93
|
||||
GTCutscene_DrawSingleCrystal:
|
||||
JML GTCutscene_ConditionalDrawSingleCrystal
|
||||
org $88CED1
|
||||
JSL AncillaDraw_GTCutsceneCrystal_OAMPrep : BRA + : NOP #3 : +
|
||||
;--------------------------------------------------------------------------------
|
||||
org $88CF19 ; <- 44F19 - ancilla_break_tower_seal.asm : 336 (TXA : AND.b #$07 : TAX)
|
||||
JSL GTCutscene_ActivateSparkle_SelectCrystal
|
||||
@@ -567,6 +555,12 @@ JSL AgahnimAsksAboutPed
|
||||
org $9ED6E8
|
||||
JSL CheckAgaForPed : NOP
|
||||
|
||||
;================================================================================
|
||||
; Zelda Sprite Fixes
|
||||
;--------------------------------------------------------------------------------
|
||||
org $85EBCF ; <- 2EBCF - sprite_zelda.asm : 23 (LDA $7EF359 : CMP.b #$02 : BCS .hasMasterSword)
|
||||
JSL SpawnZelda : NOP #2
|
||||
|
||||
;================================================================================
|
||||
; Alternate Goal
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -694,6 +688,12 @@ db $06, $1F, $40, $12, $01, $3F, $14, $01, $3F, $13, $1F, $42, $1A, $1F, $4B, $1
|
||||
org $85DFB1 ; <- 2DFB1 - Bank05.asm : 2499
|
||||
JSL SkipDrawEOR
|
||||
|
||||
;================================================================================
|
||||
; Kiki Big Bomb Fix
|
||||
;--------------------------------------------------------------------------------
|
||||
org $9EE4AF ; <- f64af sprite_kiki.asm : 285 (LDA.b #$0A : STA $7EF3CC)
|
||||
JSL AssignKiki : NOP #2
|
||||
|
||||
;================================================================================
|
||||
; Wallmaster camera fix
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -840,10 +840,15 @@ JSL LoadModifiedIceFloorValue_a01 : NOP
|
||||
org $83FC16 ; <- 1FC16 ($A8, $B8, $3D, $D0, $B8, $3D)
|
||||
db $B1, $C6, $F9, $C9, $C6, $F9 ; data insert - 2 chests, fat fairy room
|
||||
|
||||
; unused item receipts - moved to pyramid fairy
|
||||
; unused item receipts
|
||||
org $81E97E
|
||||
dw $0116 : db $5E
|
||||
dw $0116 : db $64
|
||||
dw $0116 : db $08
|
||||
dw $0116 : db $25
|
||||
;--------------------------------------------------------------------------------
|
||||
org $9EE16E ; <- F616E - sprite_bomb_shop_entity.asm : 73
|
||||
NOP #8 ; fix bomb shop dialog for dwarfless big bomb
|
||||
org $868A14 ; <- 30A14 - sprite_prep.asm : 716
|
||||
NOP #8 ; fix bomb shop spawn for dwarfless big bomb
|
||||
;--------------------------------------------------------------------------------
|
||||
org $86B489 ; <- 33489 - sprite_smithy_bros.asm : 473 (LDA $7EF359 : CMP.b #$03 : BCS .tempered_sword_or_better)
|
||||
JML GetSmithSword : NOP #4
|
||||
@@ -1814,9 +1819,7 @@ Sprite_ShowMessageUnconditional_Rest:
|
||||
;--------------------------------------------------------------------------------
|
||||
;-- Music restarting at zelda fix
|
||||
org $85ED10 ; <- 2ED10 - sprite_zelda.asm : 233 - (LDA.b #$19 : STA $012C)
|
||||
BRA + : NOP #3 : +
|
||||
org $85ED63
|
||||
BRA + : NOP #3 : +
|
||||
NOP #5
|
||||
;--------------------------------------------------------------------------------
|
||||
org $9ECE47 ; <- F4E47 - sprite_crystal_maiden.asm : 220
|
||||
JML MaidenCrystalScript
|
||||
@@ -1878,14 +1881,11 @@ JSL CalculateSignIndex
|
||||
; Dark World Spawn Location Fix & Follower Fixes
|
||||
;--------------------------------------------------------------------------------
|
||||
org $80894A ; <- 94A
|
||||
PHB : JSL OnSave
|
||||
PHB : JSL DarkWorldSaveFix
|
||||
;--------------------------------------------------------------------------------
|
||||
org $828046 ; <- 10046 - Bank02.asm : 217 (JSL EnableForceBlank) (Start of Module_LoadFile)
|
||||
JSL OnFileLoad
|
||||
;--------------------------------------------------------------------------------
|
||||
org $89F5DF
|
||||
JSL OnDeathNoSave
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8280A2
|
||||
JSL GetCurrentWorldForLoad
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -2241,6 +2241,8 @@ org $82A9B0 ; (BCS $A9B7)
|
||||
NOP #2
|
||||
org $82C1C8 ; (BCS $C1CC)
|
||||
NOP #2
|
||||
org $82ADA0 ; (LDA.b #$F1 : STA $012C)
|
||||
JSL Overworld_MosaicDarkWorldChecks : NOP
|
||||
;--------------------------------------------------------------------------------
|
||||
org $85CC58 ; <- Bank05.asm:1307 (LDA $040A : CMP.b #$18)
|
||||
JSL PsychoSolder_MusicCheck : NOP #1
|
||||
@@ -2266,9 +2268,8 @@ JSL Overworld_DetermineMusic
|
||||
BRA + : NOP #42 : +
|
||||
;--------------------------------------------------------------------------------
|
||||
org $82B0C4
|
||||
LDA.b OverworldIndex : CMP.b #$80 : BCS +
|
||||
JSL Overworld_DetermineAndSetMusic
|
||||
BRA + : NOP #10 : +
|
||||
BRA + : NOP #16 : +
|
||||
;--------------------------------------------------------------------------------
|
||||
org $82B1C1
|
||||
JSL Overworld_DetermineAmbientSFX
|
||||
@@ -2286,18 +2287,8 @@ BRA + : NOP #12 : +
|
||||
org $88C442
|
||||
JSL Overworld_DetermineAndSetMusic : NOP
|
||||
;--------------------------------------------------------------------------------
|
||||
org $9BD1CD
|
||||
JSL Overworld_DetermineAndSetMusic : NOP
|
||||
;--------------------------------------------------------------------------------
|
||||
org $9DFD27
|
||||
JSL Overworld_DetermineAndSetMusic : NOP
|
||||
;--------------------------------------------------------------------------------
|
||||
org $829253
|
||||
JSL FixHalfVolumeOnSpawnExitToOverworld : NOP
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8292D9
|
||||
BRA + : NOP #4 : +
|
||||
JSL FixPreAgaMusicFadeOut : db $B0 ; BCS
|
||||
;================================================================================
|
||||
|
||||
;================================================================================
|
||||
@@ -2356,6 +2347,24 @@ org $82A451 ; <- 12451 - Bank02.asm:6283 (LDA $F6 : AND.b #$40 : BEQ .xButtonNot
|
||||
JSL QuickSwap
|
||||
;================================================================================
|
||||
|
||||
;================================================================================
|
||||
; Tagalong Fixes
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8689AB ; <- 309AB - sprite_prep.asm: 647 (LDA $7EF3CC : CMP.b #$06 : BEQ .killSprite)
|
||||
; Note: In JP 1.0 we have: (CMP.b #$00 : BNE .killSprite) appling US bugfix
|
||||
; Prevent followers from causing blind/maiden to despawn:
|
||||
; Door rando: let zelda despawn the maiden.
|
||||
JSL BlindZeldaDespawnFix
|
||||
|
||||
org $8689AF
|
||||
SpritePrep_BlindMaiden_despawn_follower: ; this is the normal execution path
|
||||
|
||||
org $8689C9
|
||||
SpritePrep_BlindMaiden_kill_the_girl: ; not the follower
|
||||
;--------------------------------------------------------------------------------
|
||||
; Fix old man purple chest issues using the same method as above
|
||||
org $9EE906 ; <- F6906 - sprite_old_mountain_man.asm : 31 (LDA $7EF3CC : CMP.b #$00 : BNE .already_have_tagalong)
|
||||
CMP.b #$04 : db $F0 ; BEQ
|
||||
;--------------------------------------------------------------------------------
|
||||
;Control which doors frog/smith can enter
|
||||
org $9BBCF0 ; <- DBCF0 - Bank1B.asm: 248 (LDA $04B8 : BNE BRANCH_MU)
|
||||
@@ -2667,7 +2676,7 @@ org $898AEE : JSL TransferItemReceiptToBuffer_using_GraphicsID
|
||||
org $898C85 : JSL TransferItemReceiptToBuffer_using_GraphicsID
|
||||
|
||||
; gt cutscene
|
||||
org $899BBE : JSL GTCutscene_TransferGfx
|
||||
org $899BBE : JSL TransferItemReceiptToBuffer_using_GraphicsID
|
||||
|
||||
;===================================================================================================
|
||||
; gratuitous NOPs removed for speed
|
||||
@@ -2729,92 +2738,40 @@ NOP #2 ; this fixes Link's direction after mirroring and falling after entering
|
||||
;--------------------------------------------------------------------------------
|
||||
; Enable new room header table
|
||||
;--------------------------------------------------------------------------------
|
||||
if not(!FEATURE_FIX_BASEROM)
|
||||
org $81B5E6
|
||||
LDA.b #$30
|
||||
endif
|
||||
org $81B5E6
|
||||
LDA.b #$30
|
||||
|
||||
;================================================================================
|
||||
;===================================================================================================
|
||||
;--------------------------------------------------------------------------------
|
||||
; Mimic dash changes
|
||||
;--------------------------------------------------------------------------------
|
||||
org $9EC7BE
|
||||
JSL MimicDirection
|
||||
|
||||
;================================================================================
|
||||
;===================================================================================================
|
||||
;--------------------------------------------------------------------------------
|
||||
; Gloom VRAM overwrite
|
||||
; Boss souls changes
|
||||
;--------------------------------------------------------------------------------
|
||||
org $828068
|
||||
JSL AdjustDefaultGraphics
|
||||
org $8DB866
|
||||
JSL CheckBossSoul : BRA + : NOP #2 : +
|
||||
|
||||
;================================================================================
|
||||
; Special Weapons Modes
|
||||
;--------------------------------------------------------------------------------
|
||||
org $86ECC3 ; Bank06.asm@4704 (PHX : TAX : LDA.l .damage_classes, X : PLX)
|
||||
JSL DamageClassCalc
|
||||
BRA + : NOP #29 : +
|
||||
;--------------------------------------------------------------------------------
|
||||
org $86ED94 ; Bank06.asm@4866 (LDA $0E60, X : AND.b #$40)
|
||||
JSL Utility_CheckImpervious
|
||||
NOP
|
||||
;--------------------------------------------------------------------------------
|
||||
org $86ED9E
|
||||
JSL CheckInvincibleFlag : NOP
|
||||
|
||||
;================================================================================
|
||||
;--------------------------------------------------------------------------------
|
||||
; Variable Ganon Vulnerability
|
||||
;--------------------------------------------------------------------------------
|
||||
org $88BBD4 ; ancilla_magic_powder.asm@253 (LDA #$0A : JSL Ancilla_CheckSpriteDamage.preset_class)
|
||||
JSL Ganon_CheckPowderVulnerability
|
||||
NOP #2
|
||||
org $85DFFE
|
||||
JSL SoulPaletteSet : BRA + : NOP #5 : +
|
||||
|
||||
org $1D8F4E ; sprite_ganon.asm@325 (LDA $04C5 : CMP #$02)
|
||||
JSL Ganon_CheckInvincible
|
||||
NOP
|
||||
org $85DFB7
|
||||
JSL SoulPaletteApply : NOP #2
|
||||
|
||||
org $0DD628 ; Bank0D.asm@1266 (LDA $0B6B, Y : AND #$02)
|
||||
JSL CheckBeeBoss
|
||||
NOP
|
||||
org $9E8086
|
||||
JSL HelmasaurPaletteFix : BRA + : NOP #2 : +
|
||||
|
||||
org $0DD677 ; Bank0D.asm@1303 (JSL Ancilla_CheckSpriteDamage.preset_class)
|
||||
JSL Ganon_CheckBeeVulnerability
|
||||
;--------------------------------------------------------------------------------
|
||||
org $9E838C
|
||||
JSL HelmasaurHammerFix : NOP
|
||||
|
||||
;================================================================================
|
||||
; PseudoFlute
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8AB7D5 ; bank_0A.asm@5655 (DEC.w $1AF0 : LDA.b #$20 : STA.w $012F)
|
||||
JSL SelectFlutePrev
|
||||
BRA + : NOP #2 : +
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8AB7E3 ; bank_0A.asm@5665 (INC.w $1AF0 : LDA.b #$20 : STA.w $012F)
|
||||
JSL SelectFluteNext
|
||||
BRA + : NOP #2 : +
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8AB877 ; bank_0A.asm@5758 (STA.b $0C : LDA.b #$00 : STA.b $0B)
|
||||
JSL SetFluteSpotPalette
|
||||
NOP #2
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8AB8BF ; bank_0A.asm@5800 (STA.b $0C : LDA.b #$00 : STA.b $0B)
|
||||
JSL SetFluteSpotPalette
|
||||
NOP #2
|
||||
;--------------------------------------------------------------------------------
|
||||
org $82AFBE ; bank_02.asm@8776 (LDA.l $7EC213 : STA.b $8A)
|
||||
JSL CheckEnterOverworld
|
||||
NOP #2
|
||||
;--------------------------------------------------------------------------------
|
||||
org $82A9A1 ; bank_02.asm@7655 (STA.b $8A : STA.w $040A)
|
||||
JSL CheckTransitionOverworld
|
||||
NOP
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8DF741
|
||||
dw $3CD4, $3CD5, $3CE4, $3CE5
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8DE58E ; bank_0D.asm@15401 (AND.w #$00FF : STA.b $02)
|
||||
JSL DrawFluteIcon
|
||||
NOP
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8DFB63 ; bank_0D.asm@18092 (LDA.l $7EF33F, X : AND.w #$00FF)
|
||||
JSL CheckFluteInHUD
|
||||
NOP #3
|
||||
;--------------------------------------------------------------------------------
|
||||
org $9DD884
|
||||
JSL MoldormPaletteFix_b : NOP
|
||||
|
||||
org $9DDB2E
|
||||
JSL MoldormPaletteFix_d : NOP
|
||||
|
||||
@@ -114,10 +114,7 @@ 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 ;
|
||||
InitFluteBitfield: db $00 ;
|
||||
InitSpecialWeaponLevel: db $00 ;
|
||||
InitItemOnB: db $00 ;
|
||||
skip 37 ;
|
||||
InitProgressIndicator: db $02 ; PC 0x1833C5 - Set to $80 for instant post-aga with standard
|
||||
InitProgressFlags: db $14 ; PC 0x1833C6 - Set to $00 for standard
|
||||
InitMapIcons: skip 1 ; PC 0x1833C7
|
||||
@@ -126,8 +123,8 @@ InitNpcFlagsVanilla: skip 1 ; PC 0x1833C9
|
||||
InitCurrentWorld: skip 1 ; PC 0x1833CA
|
||||
skip 1 ; PC 0x1833CB
|
||||
InitFollowerIndicator: skip 1 ; PC 0x1833CC
|
||||
InitFollowerYCoord: skip 2 ; PC 0x1833CD
|
||||
InitFollowerXCoord: skip 2 ; PC 0x1833CF
|
||||
InitFollowerXCoord: skip 2 ; PC 0x1833CD
|
||||
InitFollowerYCoord: skip 2 ; PC 0x1833CF
|
||||
InitDroppedFollowerIndoors: skip 1 ; PC 0x1833D1
|
||||
InitDroppedFollowerLayer: skip 1 ; PC 0x1833D2
|
||||
InitFollowerDropped: skip 1 ; PC 0x1833D3
|
||||
|
||||
@@ -646,7 +646,7 @@ RTL
|
||||
; CollectPowder:
|
||||
;--------------------------------------------------------------------------------
|
||||
CollectPowder:
|
||||
LDY.w SprSourceItemId, X ; Retrieve stored item type
|
||||
LDY.w SprItemReceipt, X ; Retrieve stored item type
|
||||
BNE +
|
||||
; if for any reason the item value is 0 reload it, just in case
|
||||
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues) : TAY
|
||||
@@ -810,9 +810,12 @@ LDA.w AncillaGet, X : CMP.b #$4A : BNE +
|
||||
; collecting pre-activated flute
|
||||
LDA.b #$13 : JML Ancilla_SFX2_Near
|
||||
+ ; not pre-activated flute
|
||||
LDA.l !MULTIWORLD_RECEIVING_ITEM : BEQ .normal
|
||||
LDA.l MultiworldJunkItemTimer : BEQ .normal
|
||||
LDA.w AncillaGet, X
|
||||
JSL.l ItemIsJunk : BEQ .normal
|
||||
|
||||
.junk
|
||||
.multijunk
|
||||
LDA.b #$3B : JML Ancilla_SFX3_Near ; what we wrote over
|
||||
|
||||
.normal
|
||||
@@ -824,9 +827,12 @@ CPY.b #$4A : BNE +
|
||||
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$13 : STA.w SFX2
|
||||
RTL
|
||||
+ ; normal itemget sfx
|
||||
LDA.l !MULTIWORLD_RECEIVING_ITEM : BEQ .normal
|
||||
LDA.l MultiworldJunkItemTimer : BEQ .normal
|
||||
TYA
|
||||
JSL.l ItemIsJunk : BEQ .normal
|
||||
|
||||
.junk
|
||||
.multijunk
|
||||
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$3B : STA.w SFX3
|
||||
RTL
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ endmacro
|
||||
%ReceiptProps($67, -4, 0, $FF, $F36A, $FF, skip, skip) ; 67 -
|
||||
%ReceiptProps($68, -4, 0, $FF, $F36A, $FF, skip, skip) ; 68 -
|
||||
%ReceiptProps($69, -4, 0, $FF, $F36A, $FF, skip, skip) ; 69 -
|
||||
%ReceiptProps($6A, -4, 0, $4A, $F36A, $FF, triforce, skip) ; 6A - Triforce
|
||||
%ReceiptProps($6A, -4, 0, $49, $F36A, $FF, triforce, skip) ; 6A - Triforce
|
||||
%ReceiptProps($6B, -4, 0, $50, $F36A, $FF, goal_item, skip) ; 6B - Power star
|
||||
%ReceiptProps($6C, -4, 0, $49, $F36A, $FF, goal_item, skip) ; 6C - Triforce Piece
|
||||
%ReceiptProps($6D, -4, 0, $FF, $F36A, $FF, request_F0, skip) ; 6D - Server request item
|
||||
@@ -377,16 +377,16 @@ endmacro
|
||||
%ReceiptProps($ED, -4, 0, $49, $F36A, $FF, skip, skip) ; ED -
|
||||
%ReceiptProps($EE, -4, 0, $49, $F36A, $FF, skip, skip) ; EE -
|
||||
%ReceiptProps($EF, -4, 0, $49, $F36A, $FF, skip, skip) ; EF -
|
||||
%ReceiptProps($F0, -4, 0, $49, $F36A, $FF, skip, skip) ; F0 -
|
||||
%ReceiptProps($F1, -4, 0, $49, $F36A, $FF, skip, skip) ; F1 -
|
||||
%ReceiptProps($F2, -4, 0, $49, $F36A, $FF, skip, skip) ; F2 -
|
||||
%ReceiptProps($F3, -4, 0, $49, $F36A, $FF, skip, skip) ; F3 -
|
||||
%ReceiptProps($F4, -4, 0, $49, $F36A, $FF, skip, skip) ; F4 -
|
||||
%ReceiptProps($F5, -4, 0, $49, $F36A, $FF, skip, skip) ; F5 -
|
||||
%ReceiptProps($F6, -4, 0, $49, $F36A, $FF, skip, skip) ; F6 -
|
||||
%ReceiptProps($F7, -4, 0, $49, $F36A, $FF, skip, skip) ; F7 -
|
||||
%ReceiptProps($F8, -4, 0, $49, $F36A, $FF, skip, skip) ; F8 -
|
||||
%ReceiptProps($F9, -4, 0, $49, $F36A, $FF, skip, skip) ; F9 -
|
||||
%ReceiptProps($F0, -4, 0, $51, $F36A, $FF, skip, skip) ; F0 - Armos Soul
|
||||
%ReceiptProps($F1, -4, 0, $52, $F36A, $FF, skip, skip) ; F1 - Lanmolas Soul
|
||||
%ReceiptProps($F2, -4, 0, $53, $F36A, $FF, skip, skip) ; F2 - Moldorm Soul
|
||||
%ReceiptProps($F3, -4, 0, $54, $F36A, $FF, skip, skip) ; F3 - Helmasaur Soul
|
||||
%ReceiptProps($F4, -4, 0, $55, $F36A, $FF, skip, skip) ; F4 - Arrghus Soul
|
||||
%ReceiptProps($F5, -4, 0, $56, $F36A, $FF, skip, skip) ; F5 - Mothula Soul
|
||||
%ReceiptProps($F6, -4, 0, $57, $F36A, $FF, skip, skip) ; F6 - Blind Soul
|
||||
%ReceiptProps($F7, -4, 0, $58, $F36A, $FF, skip, skip) ; F7 - Kholdstare Soul
|
||||
%ReceiptProps($F8, -4, 0, $59, $F36A, $FF, skip, skip) ; F8 - Vitreous Soul
|
||||
%ReceiptProps($F9, -4, 0, $5A, $F36A, $FF, skip, skip) ; F9 - Trinexx Soul
|
||||
%ReceiptProps($FA, -4, 0, $49, $F36A, $FF, skip, skip) ; FA -
|
||||
%ReceiptProps($FB, -4, 0, $49, $F36A, $FF, skip, skip) ; FB -
|
||||
%ReceiptProps($FC, -4, 0, $49, $F36A, $FF, skip, skip) ; FC -
|
||||
@@ -656,16 +656,16 @@ endmacro
|
||||
%SpriteProps($ED, 2, 2, $04, $04, $0000) ; ED -
|
||||
%SpriteProps($EE, 2, 2, $04, $04, $0000) ; EE -
|
||||
%SpriteProps($EF, 2, 2, $04, $04, $0000) ; EF -
|
||||
%SpriteProps($F0, 2, 2, $04, $04, $0000) ; F0 -
|
||||
%SpriteProps($F1, 2, 2, $04, $04, $0000) ; F1 -
|
||||
%SpriteProps($F2, 2, 2, $04, $04, $0000) ; F2 -
|
||||
%SpriteProps($F3, 2, 2, $04, $04, $0000) ; F3 -
|
||||
%SpriteProps($F4, 2, 2, $04, $04, $0000) ; F4 -
|
||||
%SpriteProps($F5, 2, 2, $04, $04, $0000) ; F5 -
|
||||
%SpriteProps($F6, 2, 2, $04, $04, $0000) ; F6 -
|
||||
%SpriteProps($F7, 2, 2, $04, $04, $0000) ; F7 -
|
||||
%SpriteProps($F8, 2, 2, $04, $04, $0000) ; F8 -
|
||||
%SpriteProps($F9, 2, 2, $04, $04, $0000) ; F9 -
|
||||
%SpriteProps($F0, 2, 2, $83, $83, PalettesCustom_armos) ; F0 - Armos Soul
|
||||
%SpriteProps($F1, 2, 2, $83, $83, PalettesCustom_lanmolas) ; F1 - Lanmolas Soul
|
||||
%SpriteProps($F2, 2, 2, $83, $83, PalettesCustom_moldorm) ; F2 - Moldorm Soul
|
||||
%SpriteProps($F3, 2, 2, $83, $83, PalettesCustom_helmasaur) ; F3 - Helmasuar Soul
|
||||
%SpriteProps($F4, 2, 2, $83, $83, PalettesCustom_arrghus) ; F4 - Arrghus Soul
|
||||
%SpriteProps($F5, 2, 2, $83, $83, PalettesCustom_mothula) ; F5 - Mothula Soul
|
||||
%SpriteProps($F6, 2, 2, $83, $83, PalettesCustom_blind) ; F6 - Blind Soul
|
||||
%SpriteProps($F7, 2, 2, $83, $83, PalettesCustom_kholdstare) ; F7 - Kholdstare Soul
|
||||
%SpriteProps($F8, 2, 2, $83, $83, PalettesCustom_vitreous) ; F8 - Vitreous Soul
|
||||
%SpriteProps($F9, 2, 2, $83, $83, PalettesCustom_trinexx) ; F9 - Trinexx Soul
|
||||
%SpriteProps($FA, 2, 2, $04, $04, $0000) ; FA -
|
||||
%SpriteProps($FB, 2, 2, $04, $04, $0000) ; FB -
|
||||
%SpriteProps($FC, 2, 2, $04, $04, $0000) ; FC -
|
||||
@@ -932,16 +932,16 @@ endmacro
|
||||
%InventoryItem($ED, $0001, $0000, $0000) ; ED -
|
||||
%InventoryItem($EE, $0001, $0000, $0000) ; EE -
|
||||
%InventoryItem($EF, $0001, $0000, $0000) ; EF -
|
||||
%InventoryItem($F0, $0001, $0000, $0000) ; F0 -
|
||||
%InventoryItem($F1, $0001, $0000, $0000) ; F1 -
|
||||
%InventoryItem($F2, $0001, $0000, $0000) ; F2 -
|
||||
%InventoryItem($F3, $0001, $0000, $0000) ; F3 -
|
||||
%InventoryItem($F4, $0001, $0000, $0000) ; F4 -
|
||||
%InventoryItem($F5, $0001, $0000, $0000) ; F5 -
|
||||
%InventoryItem($F6, $0001, $0000, $0000) ; F6 -
|
||||
%InventoryItem($F7, $0001, $0000, $0000) ; F7 -
|
||||
%InventoryItem($F8, $0001, $0000, $0000) ; F8 -
|
||||
%InventoryItem($F9, $0001, $0000, $0000) ; F9 -
|
||||
%InventoryItem($F0, $0081, $0000, $0000) ; F0 - Armos Soul
|
||||
%InventoryItem($F1, $0081, $0000, $0000) ; F1 - Lanmolas Soul
|
||||
%InventoryItem($F2, $0081, $0000, $0000) ; F2 - Moldorm Soul
|
||||
%InventoryItem($F3, $0081, $0000, $0000) ; F3 - Helmasuar Soul
|
||||
%InventoryItem($F4, $0081, $0000, $0000) ; F4 - Arrghus Soul
|
||||
%InventoryItem($F5, $0081, $0000, $0000) ; F5 - Mothula Soul
|
||||
%InventoryItem($F6, $0081, $0000, $0000) ; F6 - Blind Soul
|
||||
%InventoryItem($F7, $0081, $0000, $0000) ; F7 - Kholdstare Soul
|
||||
%InventoryItem($F8, $0081, $0000, $0000) ; F8 - Vitreous Soul
|
||||
%InventoryItem($F9, $0081, $0000, $0000) ; F9 - Trinexx Soul
|
||||
%InventoryItem($FA, $0001, $0000, $0000) ; FA -
|
||||
%InventoryItem($FB, $0001, $0000, $0000) ; FB -
|
||||
%InventoryItem($FC, $0001, $0000, $0000) ; FC -
|
||||
@@ -1196,16 +1196,16 @@ ItemReceiptGraphicsOffsets:
|
||||
dw $0 ; ED -
|
||||
dw $0 ; EE -
|
||||
dw $0 ; EF -
|
||||
dw $0 ; F0 -
|
||||
dw $0 ; F1 -
|
||||
dw $0 ; F2 -
|
||||
dw $0 ; F3 -
|
||||
dw $0 ; F4 -
|
||||
dw $0 ; F5 -
|
||||
dw $0 ; F6 -
|
||||
dw $0 ; F7 -
|
||||
dw $0 ; F8 -
|
||||
dw $0 ; F9 -
|
||||
dw $1C20 ; F0 - Armos Soul
|
||||
dw $1C60 ; F1 - Lanmolas Soul
|
||||
dw $1CA0 ; F2 - Moldorm Soul
|
||||
dw $1D20 ; F3 - Helmasuar Soul
|
||||
dw $1D60 ; F4 - Arrghus Soul
|
||||
dw $1DA0 ; F5 - Mothula Soul
|
||||
dw $1DE0 ; F6 - Blind Soul
|
||||
dw $2020 ; F7 - Kholdstare Soul
|
||||
dw $2060 ; F8 - Vitreous Soul
|
||||
dw $20A0 ; F9 - Trinexx Soul
|
||||
dw $0 ; FA -
|
||||
dw $0 ; FB -
|
||||
dw $0 ; FC -
|
||||
@@ -1437,7 +1437,7 @@ StandingItemGraphicsOffsets:
|
||||
dw $0960 ; D0 - Bee trap
|
||||
dw $0 ; D1 - Apples
|
||||
dw $0 ; D2 - Fairy
|
||||
dw BigDecompressionBuffer+$0140 ; D3 - Chicken
|
||||
dw $11E0 ; D3 - Chicken
|
||||
dw $01E0 ; D4 - Big Magic
|
||||
dw $11E0 ; D5 - 5 Arrows
|
||||
dw $0 ; D6 - Good Bee
|
||||
@@ -1466,16 +1466,16 @@ StandingItemGraphicsOffsets:
|
||||
dw $0 ; ED -
|
||||
dw $0 ; EE -
|
||||
dw $0 ; EF -
|
||||
dw $0 ; F0 -
|
||||
dw $0 ; F1 -
|
||||
dw $0 ; F2 -
|
||||
dw $0 ; F3 -
|
||||
dw $0 ; F4 -
|
||||
dw $0 ; F5 -
|
||||
dw $0 ; F6 -
|
||||
dw $0 ; F7 -
|
||||
dw $0 ; F8 -
|
||||
dw $0 ; F9 -
|
||||
dw $1C20 ; F0 - Armos Soul
|
||||
dw $1C60 ; F1 - Lanmolas Soul
|
||||
dw $1CA0 ; F2 - Moldorm Soul
|
||||
dw $1D20 ; F3 - Helmasuar Soul
|
||||
dw $1D60 ; F4 - Arrghus Soul
|
||||
dw $1DA0 ; F5 - Mothula Soul
|
||||
dw $1DE0 ; F6 - Blind Soul
|
||||
dw $2020 ; F7 - Kholdstare Soul
|
||||
dw $2060 ; F8 - Vitreous Soul
|
||||
dw $20A0 ; F9 - Trinexx Soul
|
||||
dw $0 ; FA -
|
||||
dw $0 ; FB -
|
||||
dw $0 ; FC -
|
||||
|
||||
@@ -376,7 +376,7 @@ TransferCommonToVRAM:
|
||||
REP #$21
|
||||
SEP #$10
|
||||
|
||||
LDA.w #BigDecompressionBuffer+$2400
|
||||
LDA.w #BigDecompressionBuffer+$2000
|
||||
LDX.b #BigDecompressionBuffer>>16
|
||||
STA.w $4302
|
||||
STX.w $4304
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
; hooks
|
||||
org $81DB19
|
||||
JSL MaybeSkipSmashTerrain : BCS $81DB11
|
||||
|
||||
org $81E6B0
|
||||
JSL RevealPotItem
|
||||
RTS
|
||||
@@ -42,9 +39,6 @@ org $86d180
|
||||
org $86d18d ; <- 3518D - sprite_absorbable.asm : 274 (LDA $7EF36F : INC A : STA $7EF36F)
|
||||
JSL KeyGet
|
||||
|
||||
org $86E24A
|
||||
JSR MaybeSkipTerrainDebris
|
||||
|
||||
org $86f9f3 ; bank06.asm : 6732 (JSL SpritePrep_LoadProperties)
|
||||
JSL LoadProperties_PreserveCertainProps
|
||||
|
||||
@@ -52,11 +46,6 @@ org $86828A
|
||||
Sprite_SpawnSecret_SpriteSpawnDynamically:
|
||||
JSL CheckSprite_Spawn
|
||||
|
||||
org $87B114
|
||||
JSL MaybeUnableToLiftPotSfx
|
||||
NOP #4
|
||||
db $30 ; BMI
|
||||
|
||||
org $87B169
|
||||
JSL PreventPotSpawn : NOP
|
||||
|
||||
@@ -91,25 +80,13 @@ InitializeMirrorHDMA:
|
||||
org $89D62E
|
||||
UWSpritesPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers
|
||||
|
||||
if !FEATURE_FIX_BASEROM
|
||||
org $81DB67
|
||||
else
|
||||
org $89D87E
|
||||
endif
|
||||
org $89D87E
|
||||
UWPotsPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers
|
||||
|
||||
if !FEATURE_FIX_BASEROM
|
||||
org $01DDE7
|
||||
else
|
||||
org $89DACE
|
||||
endif
|
||||
org $89DACE
|
||||
UWPotsData: ; variable number of bytes (max 0x11D1) for all pots data
|
||||
|
||||
if !FEATURE_FIX_BASEROM
|
||||
org $89D92E
|
||||
else
|
||||
org $A88000
|
||||
endif
|
||||
org $A88000
|
||||
UWSpritesData: ; variable number of bytes (max 0x2800) for all sprites and sprite drop data
|
||||
; First $2800 bytes of this bank (28) is reserved for the sprite tables
|
||||
|
||||
@@ -200,7 +177,7 @@ RevealPotItem:
|
||||
|
||||
LDA.b RoomIndex : ASL : TAX
|
||||
|
||||
LDA.l UWPotsPointers, X : STA.b Scrap00 ; we may move this
|
||||
LDA.l UWPotsPointers,X : STA.b Scrap00 ; we may move this
|
||||
LDA.w #UWPotsPointers>>16 : STA.b Scrap02
|
||||
|
||||
LDY.w #$FFFD : LDX.w #$FFFF
|
||||
@@ -694,7 +671,7 @@ KeyGet:
|
||||
PHA
|
||||
LDA.l StandingItemsOn : BNE +
|
||||
PLA : RTL
|
||||
+ LDY.w SprSourceItemId, X
|
||||
+ LDY.w SprItemReceipt, X
|
||||
LDA.w SprItemIndex, X : STA.w SpawnedItemIndex
|
||||
LDA.w SprItemFlags, X : STA.w SpawnedItemFlag
|
||||
STY.b Scrap00
|
||||
@@ -708,7 +685,7 @@ KeyGet:
|
||||
+ LSR : TAX
|
||||
LDA.b Scrap00 : CMP.l KeyTable, X : BNE +
|
||||
.countIt
|
||||
LDA.l StandingItemCounterMask : AND SpawnedItemFlag : BEQ ++
|
||||
LDA.l StandingItemCounterMask : AND.w SpawnedItemFlag : BEQ ++
|
||||
JSL AddInventory
|
||||
++ PLX : PLA : RTL
|
||||
+ CMP.b #$AF : beq .countIt ; universal key
|
||||
@@ -716,7 +693,7 @@ KeyGet:
|
||||
.skip PLX
|
||||
.receive
|
||||
JSL Player_HaltDashAttackLong
|
||||
TYA : JSL AttemptItemSubstitution : TAY
|
||||
TYA : JSL AttemptItemSubstitution : JSL ResolveLootIDLong : TAY
|
||||
JSL Link_ReceiveItem
|
||||
PLA : DEC : RTL
|
||||
|
||||
@@ -724,7 +701,7 @@ KeyTable:
|
||||
db $A0, $A0, $A2, $A3, $A4, $A5, $A6, $A7, $A8, $A9, $AA, $AB, $AC, $AD
|
||||
|
||||
BigKeyGet:
|
||||
LDY.w SprSourceItemId, X
|
||||
LDY.w SprItemReceipt, X
|
||||
CPY.b #$32 : BNE +
|
||||
STZ.w ItemReceiptMethod : LDY.b #$32 ; what we wrote over
|
||||
PHX : JSL Link_ReceiveItem : PLX ; what we wrote over
|
||||
@@ -796,6 +773,7 @@ CheckSprite_Spawn:
|
||||
RTL
|
||||
.check
|
||||
LDA.b Scrap0D : CMP.b #$08 : BNE +
|
||||
LDA.w LinkDashing : BNE .error
|
||||
LDX.b #$0F
|
||||
|
||||
; loop looking for a Sprite with state 0A (carried by the player)
|
||||
@@ -806,9 +784,7 @@ RTL
|
||||
LDA.b #$00 : STZ.w SpriteAITable, X
|
||||
LDA.b #$E4 : JSL Sprite_SpawnDynamically
|
||||
BMI .error
|
||||
LDA.w UseY1 : AND.b #$02 : BNE ++
|
||||
LDA.b #$40 : TSB.w AButtonAct
|
||||
++ RTL
|
||||
LDA.b #$40 : TSB.w AButtonAct : RTL
|
||||
|
||||
.error
|
||||
LDA.b #$3C ; SFX2_3C - error beep
|
||||
@@ -827,102 +803,15 @@ PreventPotSpawn2:
|
||||
LDA.b #$01 : TSB.b LinkStrafe ; what we wrote over
|
||||
+ RTL
|
||||
|
||||
MaybeSkipTerrainDebris_long:
|
||||
STZ.w SecretId ; what we wrote over
|
||||
LDA.w SpriteTypeTable, X : CMP.b #$EC
|
||||
BEQ .return
|
||||
PLA : PLA : PLA : PLA : PLA
|
||||
LDA.b #Sprite_ScheduleForBreakage_exit>>16 : PHA
|
||||
PEA.w Sprite_ScheduleForBreakage_exit-1
|
||||
.return
|
||||
RTL
|
||||
|
||||
MaybeSkipSmashTerrain:
|
||||
STY.w ManipIndex : LDA.w ManipTileMapX, Y ; what we wrote over
|
||||
PHA
|
||||
SEP #$30
|
||||
LDX.b #$0F
|
||||
- LDA.w SpriteAITable, X : BEQ .continue
|
||||
DEX
|
||||
BPL -
|
||||
.skip
|
||||
PLA : PLA
|
||||
LDA.b #$3C : STA.w SFX2 ; error beep
|
||||
SEC
|
||||
RTL
|
||||
.continue
|
||||
REP #$30
|
||||
PLA
|
||||
CLC
|
||||
RTL
|
||||
|
||||
MaybeUnableToLiftPotSfx:
|
||||
- LDA.w SpriteAITable,X : BEQ .return
|
||||
DEX
|
||||
BPL -
|
||||
LDA.b #$3C : STA.w SFX2 ; error beep
|
||||
LDA.b #$FF
|
||||
.return
|
||||
RTL
|
||||
|
||||
CheckIfPotIsSpecial:
|
||||
TXA ; give index to A so we can do a CMP.l
|
||||
CMP.l $018550 ; see if our current index is that of object 230
|
||||
BNE .normal_pot
|
||||
BEQ .specialpot
|
||||
|
||||
.special_pot
|
||||
PHX
|
||||
|
||||
; get pot index and cache room ID offset
|
||||
LDA.b RoomIndex : ASL : STA.b Scrap0E
|
||||
TAX
|
||||
|
||||
LDA.b $08
|
||||
BIT.b $BF : BVC .upper ; if $BF has bit 14 set, it's upper layer
|
||||
ORA.w #$2000 ; set the lower layer bit ($2000)
|
||||
.upper
|
||||
STA.b $90 ; cache tilemap offset
|
||||
|
||||
LDA.l UWPotsPointers,X : TAX
|
||||
LDY.w #$0000
|
||||
|
||||
.next_pot
|
||||
LDA.l UWPotsPointers&$FF0000, X ; read only the bank
|
||||
CMP.w #$FFFF
|
||||
BEQ .nothing
|
||||
AND.w #$3FFF ; mask out the first three bits (used for item indicators and layer)
|
||||
|
||||
CMP.b $90 ; check against the tilemap offset
|
||||
BEQ .get_flag
|
||||
|
||||
INX #3
|
||||
INY #2
|
||||
BRA .next_pot
|
||||
|
||||
.get_flag
|
||||
TYX
|
||||
|
||||
LDA.l BitFieldMasks,X
|
||||
LDX.b Scrap0E ; get room ID
|
||||
STA.b Scrap0E
|
||||
LDA.l RoomPotData,X
|
||||
|
||||
BRA .check_pot
|
||||
|
||||
.nothing
|
||||
INC ; from FFFF, A is now 0000 so the AND always fails
|
||||
|
||||
.check_pot
|
||||
LDY.b $08 : PLX
|
||||
AND.b Scrap0E
|
||||
BEQ .exit ; zero flag will be set, which is what we want
|
||||
LDX.w #$0E82 ; the normal pot obj. See RoomDrawObjectData_#obj0E82
|
||||
|
||||
.normal_pot
|
||||
; Normal pot, so run the vanilla code
|
||||
; Normal pot, so run the vanilla code
|
||||
LDA.l CurrentWorld ; check for dark world
|
||||
.exit
|
||||
RTL
|
||||
.specialpot ; zero flag already set, so gtg
|
||||
RTL
|
||||
|
||||
SetTheSceneFix:
|
||||
STZ.b $6C
|
||||
|
||||
@@ -34,20 +34,16 @@ RTL
|
||||
; Output: 0 locked, 1 open
|
||||
;--------------------------------------------------------------------------------
|
||||
CheckForZelda:
|
||||
LDA.l ProgressIndicator : CMP.b #$02 : !BLT + ; Skip if rain is falling
|
||||
LDA.b #$01 ; pretend we have zelda anyway
|
||||
RTL
|
||||
+
|
||||
LDA.l FollowerIndicator
|
||||
LDA.l ProgressIndicator : CMP.b #$02 : !BLT + ; Skip if rain is falling
|
||||
LDA.b #$01 ; pretend we have zelda anyway
|
||||
RTL
|
||||
+
|
||||
LDA.l FollowerIndicator
|
||||
RTL
|
||||
;================================================================================
|
||||
SetOverlayIfLamp:
|
||||
JSL LampCheck
|
||||
CMP.b #$00
|
||||
BEQ +
|
||||
LDA.b #$01
|
||||
+
|
||||
STA.b SUBDESQ ; write it directly to the overlay, this isn't a terrible idea at all
|
||||
JSL LampCheck
|
||||
STA.b SUBDESQ ; write it directly to the overlay, this isn't a terrible idea at all
|
||||
RTL
|
||||
;================================================================================
|
||||
; Mantle Object Changes
|
||||
|
||||
@@ -2,13 +2,6 @@
|
||||
; Maiden Crystal Fixes
|
||||
;================================================================================
|
||||
|
||||
pushpc
|
||||
|
||||
org $9ECE25
|
||||
STZ.w $1F00 : NOP : NOP ; fix to allow VRAM corruption during Blind fight
|
||||
|
||||
pullpc
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
; MaidenCrystalScript
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
135
menu/compress.py
135
menu/compress.py
@@ -1,135 +0,0 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Compression function reverse-engineered from ALTTP's decompression routine at $00E7DE
|
||||
def compress(data):
|
||||
out = bytearray()
|
||||
i = 0
|
||||
|
||||
while i < len(data):
|
||||
# Check for repeating byte pattern
|
||||
if i + 1 < len(data) and data[i] == data[i + 1]:
|
||||
length = 2
|
||||
while i + length < len(data) and data[i] == data[i + length] and length < 32:
|
||||
length += 1
|
||||
# Repeating byte: 0x20-0x3F
|
||||
out.append(0x20 | (length - 1))
|
||||
out.append(data[i])
|
||||
i += length
|
||||
continue
|
||||
|
||||
# Check for incremental byte pattern
|
||||
if i + 2 < len(data) and data[i + 1] == data[i] + 1 and data[i + 2] == data[i] + 2:
|
||||
length = 3
|
||||
while i + length < len(data) and data[i + length] == data[i] + length and length < 32:
|
||||
length += 1
|
||||
# Incremental: 0x60-0x7F
|
||||
out.append(0x60 | (length - 1))
|
||||
out.append(data[i])
|
||||
i += length
|
||||
continue
|
||||
|
||||
# Check for repeating word pattern (alternating two bytes)
|
||||
if i + 3 < len(data):
|
||||
# Check if we have an alternating pattern: A B A B...
|
||||
byte_a = data[i]
|
||||
byte_b = data[i + 1]
|
||||
length = 2
|
||||
while i + length < len(data) and length < 32:
|
||||
if length % 2 == 0:
|
||||
if data[i + length] != byte_a:
|
||||
break
|
||||
else:
|
||||
if data[i + length] != byte_b:
|
||||
break
|
||||
length += 1
|
||||
|
||||
if length >= 4: # Need at least 4 bytes (2 alternations) to make it worthwhile
|
||||
# Repeating word: 0x40-0x5F
|
||||
out.append(0x40 | (length - 1))
|
||||
out.append(byte_a)
|
||||
out.append(byte_b)
|
||||
i += length
|
||||
continue
|
||||
|
||||
# Check for copy from past (LZ with absolute offset)
|
||||
best_len = 0
|
||||
best_off = 0
|
||||
search_start = max(0, i - 65536) # Can reference anywhere in output
|
||||
for j in range(search_start, i):
|
||||
length = 0
|
||||
while i + length < len(data) and data[j + length] == data[i + length] and length < 1024:
|
||||
length += 1
|
||||
if length >= 2 and length > best_len:
|
||||
best_len = length
|
||||
best_off = j # Absolute offset, not relative!
|
||||
|
||||
if best_len >= 2:
|
||||
# Copy from past: 0x80-0xDF or 0xE0-0xFE (extended)
|
||||
# Offset is ABSOLUTE position in the output buffer
|
||||
if best_len <= 32:
|
||||
# Standard copy: 0x80-0xDF (5 bits for length-1, 16 bits for absolute offset)
|
||||
out.append(0x80 | ((best_len - 1) & 0x1F))
|
||||
out.append(best_off & 0xFF)
|
||||
out.append((best_off >> 8) & 0xFF)
|
||||
else:
|
||||
# Extended copy: 0xE0-0xFE
|
||||
if best_len > 1024:
|
||||
best_len = 1024
|
||||
# Command byte: 111LLLLL where L is length bits
|
||||
cmd = 0xE0 | (((best_len - 1) >> 8) & 0x1F)
|
||||
out.append(cmd)
|
||||
out.append((best_len - 1) & 0xFF)
|
||||
out.append(best_off & 0xFF)
|
||||
out.append((best_off >> 8) & 0xFF)
|
||||
i += best_len
|
||||
continue
|
||||
|
||||
# Raw copy (no pattern found)
|
||||
size = 1
|
||||
while size < 32 and i + size < len(data):
|
||||
# Don't extend raw copy if we find a better pattern ahead
|
||||
if i + size + 1 < len(data) and data[i + size] == data[i + size + 1]:
|
||||
break
|
||||
if i + size + 2 < len(data) and data[i + size + 1] == data[i + size] + 1:
|
||||
break
|
||||
# Check LZ
|
||||
found_lz = False
|
||||
for j in range(max(0, i + size - 2048), i + size):
|
||||
if i + size + 1 < len(data) and data[j] == data[i + size] and data[j + 1] == data[i + size + 1]:
|
||||
found_lz = True
|
||||
break
|
||||
if found_lz:
|
||||
break
|
||||
size += 1
|
||||
|
||||
# Raw copy: 0x00-0x1F
|
||||
out.append(size - 1)
|
||||
out.extend(data[i:i + size])
|
||||
i += size
|
||||
|
||||
# End marker
|
||||
out.append(0xFF)
|
||||
return out
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) != 3:
|
||||
print("Usage: python compress.py <input_file> <output_file>")
|
||||
sys.exit(1)
|
||||
|
||||
input_file_path = sys.argv[1]
|
||||
output_file_path = sys.argv[2]
|
||||
|
||||
if not os.path.exists(input_file_path):
|
||||
print(f"Error: Input file not found at {input_file_path}")
|
||||
sys.exit(1)
|
||||
|
||||
with open(input_file_path, 'rb') as f:
|
||||
input_data = f.read()
|
||||
|
||||
compressed_data = compress(input_data)
|
||||
|
||||
with open(output_file_path, 'wb') as f:
|
||||
f.write(compressed_data)
|
||||
|
||||
print(f"Successfully compressed '{input_file_path}' to '{output_file_path}'")
|
||||
@@ -1,112 +0,0 @@
|
||||
import sys
|
||||
|
||||
def decompress(compressed_data):
|
||||
out = bytearray()
|
||||
i = 0
|
||||
|
||||
while i < len(compressed_data):
|
||||
cmd = compressed_data[i]
|
||||
|
||||
if cmd == 0xFF:
|
||||
# End marker
|
||||
break
|
||||
|
||||
i += 1
|
||||
|
||||
# Decode based on top 3 bits
|
||||
top_bits = cmd & 0xE0
|
||||
|
||||
if cmd < 0xE0:
|
||||
# Standard commands
|
||||
length = (cmd & 0x1F) + 1
|
||||
|
||||
if top_bits == 0x00:
|
||||
# Raw copy
|
||||
out.extend(compressed_data[i:i+length])
|
||||
i += length
|
||||
elif top_bits == 0x20:
|
||||
# Repeating byte
|
||||
byte_val = compressed_data[i]
|
||||
out.extend([byte_val] * length)
|
||||
i += 1
|
||||
elif top_bits == 0x40:
|
||||
# Repeating word - alternates between two bytes
|
||||
byte_a = compressed_data[i]
|
||||
byte_b = compressed_data[i+1]
|
||||
for j in range(length):
|
||||
if j % 2 == 0:
|
||||
out.append(byte_a)
|
||||
else:
|
||||
out.append(byte_b)
|
||||
i += 2
|
||||
elif top_bits == 0x60:
|
||||
# Incremental
|
||||
start_val = compressed_data[i]
|
||||
for j in range(length):
|
||||
out.append((start_val + j) & 0xFF)
|
||||
i += 1
|
||||
elif top_bits >= 0x80:
|
||||
# Copy from past (absolute offset)
|
||||
offset = compressed_data[i] | (compressed_data[i+1] << 8)
|
||||
for j in range(length):
|
||||
out.append(out[offset + j])
|
||||
i += 2
|
||||
else:
|
||||
# Extended command (0xE0-0xFE)
|
||||
# Command type from bits 5-7 (after shifting)
|
||||
cmd_type = ((cmd << 3) & 0xE0)
|
||||
# Length from bits 0-1 of command (high) + next byte (low)
|
||||
length_high = cmd & 0x03
|
||||
length_low = compressed_data[i]
|
||||
length = (length_high << 8) | length_low
|
||||
length += 1
|
||||
i += 1
|
||||
|
||||
if cmd_type == 0x00:
|
||||
# Extended raw copy
|
||||
out.extend(compressed_data[i:i+length])
|
||||
i += length
|
||||
elif cmd_type == 0x20:
|
||||
# Extended repeating byte
|
||||
byte_val = compressed_data[i]
|
||||
out.extend([byte_val] * length)
|
||||
i += 1
|
||||
elif cmd_type == 0x40:
|
||||
# Extended repeating word - alternates between two bytes
|
||||
byte_a = compressed_data[i]
|
||||
byte_b = compressed_data[i+1]
|
||||
for j in range(length):
|
||||
if j % 2 == 0:
|
||||
out.append(byte_a)
|
||||
else:
|
||||
out.append(byte_b)
|
||||
i += 2
|
||||
elif cmd_type == 0x60:
|
||||
# Extended incremental
|
||||
start_val = compressed_data[i]
|
||||
for j in range(length):
|
||||
out.append((start_val + j) & 0xFF)
|
||||
i += 1
|
||||
elif cmd_type >= 0x80:
|
||||
# Extended copy from past
|
||||
offset = compressed_data[i] | (compressed_data[i+1] << 8)
|
||||
for j in range(length):
|
||||
out.append(out[offset + j])
|
||||
i += 2
|
||||
|
||||
return out
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) != 3:
|
||||
print("Usage: python decompress.py <input_file> <output_file>")
|
||||
sys.exit(1)
|
||||
|
||||
with open(sys.argv[1], 'rb') as f:
|
||||
compressed = f.read()
|
||||
|
||||
decompressed = decompress(compressed)
|
||||
|
||||
with open(sys.argv[2], 'wb') as f:
|
||||
f.write(decompressed)
|
||||
|
||||
print(f"Decompressed {len(compressed)} bytes to {len(decompressed)} bytes")
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
menu/drfont.2bpp
BIN
menu/drfont.2bpp
Binary file not shown.
BIN
menu/drsheetdc.2bppc
Normal file
BIN
menu/drsheetdc.2bppc
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -9,7 +9,7 @@ UploadMenuOnlyIcons:
|
||||
REP #$20
|
||||
LDA.w #MenuOnlyIcons : STA.w $4342
|
||||
LDA.w #$1801 : STA.w $4340
|
||||
LDA.w #$0240 : STA.w $4345
|
||||
LDA.w #$03A0 : 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"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3
msu.asm
3
msu.asm
@@ -427,6 +427,8 @@ StoreMusicOnDeath:
|
||||
MSUInit:
|
||||
PHP
|
||||
|
||||
LDA.b #$00
|
||||
STA.l MSULoadedTrack
|
||||
JSL MSUResumeReset
|
||||
|
||||
LDA.l NoBGM : BNE .done
|
||||
@@ -497,7 +499,6 @@ MSUInit:
|
||||
;--------------------------------------------------------------------------------
|
||||
MSUResumeReset:
|
||||
LDA.b #$00
|
||||
STA.l MSULoadedTrack
|
||||
STA.l MSUResumeTrack
|
||||
STA.l MSUResumeTime : STA.l MSUResumeTime+1 : STA.l MSUResumeTime+2 : STA.l MSUResumeTime+3
|
||||
STA.l MSUResumeControl
|
||||
|
||||
57
music.asm
57
music.asm
@@ -96,14 +96,15 @@ Overworld_DetermineMusic:
|
||||
CMP.b #$43 : BEQ .darkMountain
|
||||
CMP.b #$45 : BEQ .darkMountain
|
||||
CMP.b #$47 : BEQ .darkMountain
|
||||
LDX.b #$09 ; default dark world theme
|
||||
BRA .default_set
|
||||
+
|
||||
|
||||
LDX.b #$02 ; hyrule field theme
|
||||
|
||||
.default_set
|
||||
LDA.l CurrentWorld : BEQ +
|
||||
LDX.b #$09 ; default dark world theme
|
||||
|
||||
; Check if we're entering the village
|
||||
LDA.b OverworldIndex : CMP.b #$18 : BNE +
|
||||
+ LDA.b OverworldIndex : CMP.b #$18 : BNE +
|
||||
; Check what phase we're in
|
||||
; LDA ProgressIndicator : CMP.b #$03 : !BGE .bunny
|
||||
LDX.b #$07 ; Default village theme (phase <3)
|
||||
@@ -173,21 +174,24 @@ RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
pushpc
|
||||
org $82AD6C
|
||||
; Determine whether or not to fade out music on mosaic transitions
|
||||
OverworldMosaicTransition_HandleSong:
|
||||
LDA.b GameSubMode : CMP.b #$0D : BNE .dont_fade
|
||||
LDA.w CurrentControlRequest : CMP.b #$04 : BEQ .dont_fade
|
||||
BRA .fade_song
|
||||
; Additional dark world checks to determine whether or not to fade out music
|
||||
; on mosaic transitions
|
||||
;
|
||||
; On entry, A = $8A (overworld area being loaded)
|
||||
Overworld_MosaicDarkWorldChecks:
|
||||
CMP.b #$40 : BEQ .checkCrystals
|
||||
CMP.b #$42 : BEQ .checkCrystals
|
||||
CMP.b #$50 : BEQ .checkCrystals
|
||||
CMP.b #$51 : BNE .doFade
|
||||
|
||||
warnpc $82ADA0
|
||||
org $82ADA0
|
||||
.fade_song
|
||||
org $82ADA5
|
||||
.dont_fade
|
||||
.checkCrystals
|
||||
LDA.l CrystalsField : CMP.b #$7F : BEQ .done
|
||||
|
||||
pullpc
|
||||
.doFade
|
||||
LDA.b #$F1 : STA.w MusicControlRequest ; thing we wrote over, fade out music
|
||||
|
||||
.done
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -226,22 +230,3 @@ FallingMusicFadeOut:
|
||||
.return
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
FixHalfVolumeOnSpawnExitToOverworld:
|
||||
BEQ .exit : STA.w MusicControlRequest ; what we wrote over
|
||||
LDA.w DungeonID : BNE .exit
|
||||
LDA.b LinkPosY+1 : ROR : LDA.b LinkPosY : ROR
|
||||
CMP.b #$DC : BCS .exit ; check if link loading in room from a spawn
|
||||
; set queue to half volume to trigger full volume on exit
|
||||
LDA.b #$F2 : STA.w MusicControlQueue
|
||||
.exit
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
FixPreAgaMusicFadeOut:
|
||||
LDA.l DRMode : TAX : CPX.b #$01 : BCS .exit_no_fade+1
|
||||
LDA.b RoomIndex : CMP.w #$0030 : BEQ .exit_and_fade ; what we
|
||||
CMP.w #$0040 : BEQ .exit_and_fade ; wrote over
|
||||
.exit_no_fade
|
||||
SEC : RTL
|
||||
.exit_and_fade
|
||||
CLC : RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
122
newhud.asm
122
newhud.asm
@@ -152,23 +152,14 @@ NewHUD_DrawDungeonCounters:
|
||||
|
||||
;================================================================================
|
||||
NewHUD_DrawPrizeIcon:
|
||||
REP #$10
|
||||
SEP #$20
|
||||
REP #$10
|
||||
SEP #$20
|
||||
LDA.b GameMode
|
||||
CMP.b #$12 : BEQ .no_prize
|
||||
CMP.b #$0E : BNE .check_hud_flag
|
||||
LDA.b GameSubMode
|
||||
CMP.b #$03 : BNE .check_dungeon
|
||||
LDA.w SubModuleInterface
|
||||
CMP.b #$06 : BNE .check_hud_flag
|
||||
LDA.l $7EC22A
|
||||
BRA .know_dungeon
|
||||
|
||||
.check_hud_flag
|
||||
LDA.l UpdateHUDFlag : BEQ NewHUD_DrawItemCounter
|
||||
.check_dungeon
|
||||
LDA.w DungeonID
|
||||
.know_dungeon
|
||||
CMP.b #$12 : BEQ .no_prize
|
||||
CMP.b #$0E : BEQ +
|
||||
LDA.l UpdateHUDFlag : BEQ NewHUD_DrawItemCounter
|
||||
+
|
||||
LDA.w DungeonID
|
||||
CMP.b #$1A : BCS .no_prize
|
||||
CMP.b #$04 : BCC .no_prize
|
||||
CMP.b #$08 : BNE .dungeon
|
||||
@@ -185,19 +176,19 @@ NewHUD_DrawPrizeIcon:
|
||||
LDA.l MapMode
|
||||
|
||||
REP #$30
|
||||
BEQ .prize
|
||||
BEQ .prize
|
||||
|
||||
LDA.w MapField
|
||||
AND.l DungeonItemMasks,X
|
||||
BEQ .no_prize
|
||||
|
||||
.prize
|
||||
TYX
|
||||
LDA.l CrystalPendantFlags_3,X : AND.w #$00FF
|
||||
ASL : TAX
|
||||
LDA.l PrizeIconTiles_Transparent,X : BEQ .no_icon
|
||||
TAY
|
||||
BRA .draw_prize
|
||||
.prize
|
||||
TYX
|
||||
LDA.l CrystalPendantFlags_3,X : AND.w #$00FF
|
||||
ASL : TAX
|
||||
LDA.l PrizeIconTiles_Transparent,X : BEQ .no_icon
|
||||
TAY
|
||||
BRA .draw_prize
|
||||
|
||||
.pendant
|
||||
LDY.w #!PTile
|
||||
@@ -460,15 +451,6 @@ HUDHex4Digit_Long:
|
||||
REP #$20
|
||||
RTL
|
||||
|
||||
;================================================================================
|
||||
ClearHearts:
|
||||
LDA.w #!BlankTile
|
||||
LDX.b #$14
|
||||
- STA.l HUDTileMapBuffer+$066, X
|
||||
STA.l HUDTileMapBuffer+$0A6, X
|
||||
DEX #2
|
||||
BPL -
|
||||
RTS
|
||||
;================================================================================
|
||||
UpdateHearts:
|
||||
PHB
|
||||
@@ -479,22 +461,6 @@ UpdateHearts:
|
||||
PHX
|
||||
PLB
|
||||
|
||||
; OHKO mode
|
||||
LDA.l ChallengeModes : AND.w #$0003 : CMP.w #$0001 : BNE +
|
||||
LDA.w #$240A
|
||||
STA.l HUDTileMapBuffer+$068
|
||||
INC
|
||||
STA.l HUDTileMapBuffer+$06A
|
||||
INC
|
||||
STA.l HUDTileMapBuffer+$06C
|
||||
JMP .skip_partial
|
||||
+
|
||||
|
||||
; Gloom mode
|
||||
LDA.l ChallengeModes : AND.w #$0003 : CMP.w #$0002 : BNE +
|
||||
JSR ClearHearts
|
||||
+
|
||||
|
||||
LDA.w MaximumHealth
|
||||
LSR
|
||||
LSR
|
||||
@@ -514,11 +480,11 @@ UpdateHearts:
|
||||
CPX.b #$01
|
||||
BMI .done_hearts
|
||||
|
||||
PHX
|
||||
LDA.l HUDHeartColors_index : ASL : TAX
|
||||
LDA.l HUDHeartColors_masks_game_hud,X
|
||||
PLX
|
||||
ORA.w #$20A0
|
||||
PHX
|
||||
LDA.l HUDHeartColors_index : ASL : TAX
|
||||
LDA.l HUDHeartColors_masks_game_hud,X
|
||||
PLX
|
||||
ORA.w #$20A0
|
||||
|
||||
CPY.b #$01
|
||||
BPL .add_heart
|
||||
@@ -560,16 +526,16 @@ UpdateHearts:
|
||||
CMP.w #$0005
|
||||
BCS .more_than_half
|
||||
|
||||
LDA.l HUDHeartColors_index : ASL : TAX
|
||||
LDA.l HUDHeartColors_masks_game_hud,X
|
||||
ORA.w #$20A1
|
||||
LDA.l HUDHeartColors_index : ASL : TAX
|
||||
LDA.l HUDHeartColors_masks_game_hud,X
|
||||
ORA.w #$20A1
|
||||
STA.b (Scrap09)
|
||||
BRA .skip_partial
|
||||
BRA .skip_partial
|
||||
|
||||
.more_than_half
|
||||
LDA.l HUDHeartColors_index : ASL : TAX
|
||||
LDA.l HUDHeartColors_masks_game_hud,X
|
||||
ORA.w #$20A0
|
||||
LDA.l HUDHeartColors_index : ASL : TAX
|
||||
LDA.l HUDHeartColors_masks_game_hud,X
|
||||
ORA.w #$20A0
|
||||
STA.b (Scrap09)
|
||||
|
||||
.skip_partial
|
||||
@@ -579,29 +545,29 @@ UpdateHearts:
|
||||
RTL
|
||||
|
||||
CheckHeartPaletteFileSelect:
|
||||
LDA.l HUDHeartColors_index : ASL : TAX
|
||||
LDA.l HUDHeartColors_masks_file_select,X
|
||||
ORA.w #$0200
|
||||
LDX.w #$000A
|
||||
LDA.l HUDHeartColors_index : ASL : TAX
|
||||
LDA.l HUDHeartColors_masks_file_select,X
|
||||
ORA.w #$0200
|
||||
LDX.w #$000A
|
||||
RTL
|
||||
|
||||
CheckHeartPalette:
|
||||
PHX
|
||||
LDA.l HUDHeartColors_index : ASL : TAX
|
||||
LDA.l HUDHeartColors_masks_game_hud,X
|
||||
ORA.w #$20A0
|
||||
PLX
|
||||
PHX
|
||||
LDA.l HUDHeartColors_index : ASL : TAX
|
||||
LDA.l HUDHeartColors_masks_game_hud,X
|
||||
ORA.w #$20A0
|
||||
PLX
|
||||
RTS
|
||||
|
||||
ColorAnimatedHearts:
|
||||
PHX
|
||||
REP #$20
|
||||
LDA.l HUDHeartColors_index : ASL : TAX
|
||||
LDA.l HUDHeartColors_masks_game_hud,X
|
||||
PLX
|
||||
ORA.l HeartFramesBaseTiles,X
|
||||
STA.b [Scrap00],Y
|
||||
SEP #$20
|
||||
PHX
|
||||
REP #$20
|
||||
LDA.l HUDHeartColors_index : ASL : TAX
|
||||
LDA.l HUDHeartColors_masks_game_hud,X
|
||||
PLX
|
||||
ORA.l HeartFramesBaseTiles,X
|
||||
STA.b [Scrap00],Y
|
||||
SEP #$20
|
||||
RTL
|
||||
|
||||
HeartFramesBaseTiles:
|
||||
|
||||
@@ -188,12 +188,10 @@ ItemBehavior:
|
||||
BRA .store_inventory_tracking
|
||||
|
||||
.flute_inactive
|
||||
LDA.b #$00 : STA.l FluteBitfield
|
||||
LDA.l InventoryTracking : ORA.b #$02
|
||||
BRA .store_inventory_tracking
|
||||
|
||||
.flute_active
|
||||
LDA.b #$00 : STA.l FluteBitfield
|
||||
LDA.l InventoryTracking : ORA.b #$01
|
||||
BRA .store_inventory_tracking
|
||||
|
||||
@@ -1212,7 +1210,7 @@ MaybeFlagDungeonTotalsEntrance:
|
||||
LDA.l CompassMode : AND.w #$000F : BEQ .maps ; Skip if we're not showing compass counts
|
||||
JSR FlagCompassCount
|
||||
.maps
|
||||
LDA.l MapHUDMode : AND.w #$000F
|
||||
; LDA.l MapHUDMode : AND.w #$000F : BEQ .done
|
||||
LDX.w DungeonID
|
||||
JSR FlagMapCount
|
||||
.done
|
||||
@@ -1227,7 +1225,7 @@ FlagCompassCount:
|
||||
RTS
|
||||
;--------------------------------------------------------------------------------
|
||||
FlagMapCount:
|
||||
CMP.w #$0002 : BEQ .mapShown
|
||||
; CMP.w #$0002 : BEQ .mapShown
|
||||
LDA.l MapMode : AND.w #$00FF : BEQ .mapShown
|
||||
LDA.l MapField : AND.l DungeonItemMasks, X : BEQ .done ; skip if we don't have map
|
||||
.mapShown
|
||||
|
||||
@@ -138,7 +138,7 @@ RTL
|
||||
ItemSet_Mushroom:
|
||||
PHA
|
||||
LDA.l NpcFlags+1 : ORA.b #$10 : STA.l NpcFlags+1
|
||||
LDY.w SprSourceItemId, X ; Retrieve stored item type
|
||||
LDY.w SprItemReceipt, X ; Retrieve stored item type
|
||||
BNE +
|
||||
; if for any reason the item value is 0 reload it, just in case
|
||||
%GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues) : TAY
|
||||
|
||||
595
owrando.asm
595
owrando.asm
@@ -320,7 +320,6 @@ OWLightWorldOrCrossed:
|
||||
|
||||
OWFluteCancel:
|
||||
{
|
||||
lda.l FluteBitfield : cmp.b #$FF : beq +
|
||||
lda.l OWFlags+1 : and.b #$01 : bne +
|
||||
jsl FluteMenu_LoadTransport : rtl
|
||||
+ lda.w RandoOverworldTargetEdge : bne +
|
||||
@@ -332,10 +331,8 @@ OWFluteCancel2:
|
||||
lda.b Joy1B_All : ora.b Joy1A_All : and.b #$c0 : bne +
|
||||
jml FluteMenu_HandleSelection_NoSelection
|
||||
+ inc.w SubModuleInterface
|
||||
lda.l FluteBitfield : cmp.b #$FF : beq .cancel
|
||||
lda.l OWFlags+1 : and.b #$01 : beq +
|
||||
lda.b Joy1B_All : cmp.b #$40 : bne +
|
||||
.cancel
|
||||
lda.b #$01 : sta.w RandoOverworldTargetEdge
|
||||
+ rtl
|
||||
}
|
||||
@@ -616,13 +613,7 @@ OWBonkDrops:
|
||||
LDA.w $0400 : ORA.b 1,S : STA.w $0400
|
||||
BRA .increment_collection
|
||||
++
|
||||
LDA.b OverworldIndex
|
||||
BIT.b #$40 : BEQ +
|
||||
LDA.l ProgressIndicator : CMP.b #$02
|
||||
LDA.b OverworldIndex : BCS ++ : AND.b #$BF
|
||||
++
|
||||
+
|
||||
TAX : LDA.l OverworldEventDataWRAM,X : ORA.b 1,S : STA.l OverworldEventDataWRAM,X
|
||||
LDX.b OverworldIndex : LDA.l OverworldEventDataWRAM,X : ORA.b 1,S : STA.l OverworldEventDataWRAM,X
|
||||
|
||||
.increment_collection
|
||||
REP #$20
|
||||
@@ -682,19 +673,13 @@ OWBonkDropLookup:
|
||||
{
|
||||
; loop thru rando bonk table to find match
|
||||
LDA.b OverworldIndex
|
||||
BIT.b #$40 : BEQ +
|
||||
LDA.l ProgressIndicator : AND.b #$FF : CMP.b #$02
|
||||
LDA.b OverworldIndex : BCS ++ : AND.b #$BF
|
||||
++
|
||||
+
|
||||
LDX.b #((UWBonkPrizeData-OWBonkPrizeData)-sizeof(OWBonkPrizeTable)) ; 41 bonk items, 6 bytes each
|
||||
- CMP.w OWBonkPrizeData,X : BNE +
|
||||
INX
|
||||
PHA
|
||||
LDA.w SpritePosXLow,Y : LSR A : LSR A : LSR A : LSR A
|
||||
EOR.w SpritePosYLow,Y : CMP.w OWBonkPrizeData,X : BNE ++ ; X = row + 1
|
||||
PLA : SEC : RTS
|
||||
++ DEX : PLA
|
||||
SEC : RTS
|
||||
++ DEX : LDA.b OverworldIndex
|
||||
+ CPX.b #$00 : BNE +
|
||||
CLC : RTS
|
||||
+ DEX : DEX : DEX : DEX : DEX : DEX : BRA -
|
||||
@@ -704,22 +689,16 @@ OWBonkDropLookup:
|
||||
OWBonkDropCollected:
|
||||
{
|
||||
; check if collected
|
||||
CLC
|
||||
LDA.b IndoorsFlag : BEQ +
|
||||
LDA.l RoomDataWRAM[$0120].high : AND.b 3,S : BEQ .return ; S = Collected, FlagBitmask, X (row + 2)
|
||||
SEC : RTS
|
||||
+
|
||||
LDA.b OverworldIndex
|
||||
BIT.b #$40 : BEQ +
|
||||
LDA.l ProgressIndicator : CMP.b #$02
|
||||
LDA.b OverworldIndex : BCS ++ : AND.b #$BF
|
||||
++
|
||||
+
|
||||
TAX
|
||||
LDA.l OverworldEventDataWRAM,X : AND.b 3,S : BEQ .return ; S = Collected, FlagBitmask, X (row + 2)
|
||||
LDX.b OverworldIndex : LDA.l OverworldEventDataWRAM,X : AND.b 3,S : BEQ .return ; S = Collected, FlagBitmask, X (row + 2)
|
||||
SEC : RTS
|
||||
|
||||
.return
|
||||
CLC : RTS
|
||||
RTS
|
||||
}
|
||||
|
||||
; A = SprItemReceipt, Y = Sprite Slot Index, X = free/overwritten
|
||||
@@ -1405,291 +1384,291 @@ db $80, $80, $81
|
||||
org $aaa800 ;PC 152800
|
||||
OWNorthEdges:
|
||||
; Min Max Width Mid OW Slot/OWID VRAM Terrain Dest Index
|
||||
dw $00a0, $00a0, $0000, $00a0, $0000, $0284, $0000, $B040 ;Lost Woods (exit only)
|
||||
dw $0458, $0540, $00e8, $04cc, $0a0a, $180a, $0000, $0000
|
||||
dw $0f38, $0f60, $0028, $0f4c, $0f0f, $009a, $0000, $2041 ;Waterfall (exit only)
|
||||
dw $0058, $0058, $0000, $0058, $1010, $1800, $0000, $0001
|
||||
dw $0178, $0178, $0000, $0178, $1010, $181e, $0000, $0002
|
||||
dw $0388, $0388, $0000, $0388, $1111, $1820, $0000, $0003
|
||||
dw $0480, $05b0, $0130, $0518, $1212, $1812, $0000, $0004
|
||||
dw $0f70, $0f90, $0020, $0f80, $1717, $1820, $0000, $0005
|
||||
dw $0078, $0098, $0020, $0088, $1818, $1802, $0000, $0006 ;Kakariko
|
||||
dw $0138, $0158, $0020, $0148, $1818, $181a, $0000, $0007
|
||||
dw $02e8, $0348, $0060, $0318, $1819, $1854, $0000, $0008
|
||||
dw $0478, $04d0, $0058, $04a4, $1a1a, $1806, $0000, $0009
|
||||
dw $0510, $0538, $0028, $0524, $1a1a, $1816, $0000, $000a
|
||||
dw $0a48, $0af0, $00a8, $0a9c, $1d1d, $1804, $0000, $000b
|
||||
dw $0b28, $0b38, $0010, $0b30, $1d1d, $1818, $0001, $000c
|
||||
dw $0b70, $0ba0, $0030, $0b88, $1d1d, $1820, $0000, $000d
|
||||
dw $0a40, $0b10, $00d0, $0aa8, $2525, $1806, $0000, $000e
|
||||
dw $0350, $0390, $0040, $0370, $2929, $1820, $0000, $000f
|
||||
dw $0670, $06a8, $0038, $068c, $2b2b, $1802, $0000, $0010
|
||||
dw $0898, $09b0, $0118, $0924, $2c2c, $1814, $0000, $0011 ;Links House
|
||||
dw $0a40, $0ba0, $0160, $0af0, $2d2d, $180e, $0000, $0012
|
||||
dw $0c70, $0c90, $0020, $0c80, $2e2e, $1802, $0000, $0013
|
||||
dw $0f70, $0f80, $0010, $0f78, $2f2f, $1820, $0000, $0014
|
||||
dw $0430, $0468, $0038, $044c, $3232, $1800, $0000, $0015
|
||||
dw $04d8, $04f8, $0020, $04e8, $3232, $180c, $0000, $0016
|
||||
dw $0688, $06b0, $0028, $069c, $3333, $1804, $0000, $0017
|
||||
dw $08d0, $08f0, $0020, $08e0, $3434, $180e, $0000, $0018
|
||||
dw $0a80, $0b40, $00c0, $0ae0, $3535, $180c, $0000, $0019
|
||||
dw $0d38, $0d58, $0020, $0d48, $3536, $185a, $0001, $001a
|
||||
dw $0d90, $0da0, $0010, $0d98, $3536, $1860, $0000, $001b
|
||||
dw $06a0, $07b0, $0110, $0728, $3b3b, $1816, $0000, $001c
|
||||
dw $0830, $09b0, $0180, $08f0, $3c3c, $1810, $0000, $001d
|
||||
dw $0e78, $0e88, $0010, $0e80, $3f3f, $1802, $0001, $001e
|
||||
dw $0ee0, $0fc0, $00e0, $0f50, $3f3f, $181c, $0000, $001f
|
||||
dw $0458, $0540, $00e8, $04cc, $4a4a, $180a, $0000, $0020
|
||||
dw $0058, $0058, $0000, $0058, $5050, $181e, $0000, $0021
|
||||
dw $0178, $0178, $0000, $0178, $5050, $1800, $0000, $0022
|
||||
dw $0388, $0388, $0000, $0388, $5151, $1820, $0000, $0023
|
||||
dw $0480, $05b0, $0130, $0518, $5252, $1812, $0000, $0024
|
||||
dw $0f70, $0f90, $0020, $0f80, $5757, $1820, $0000, $0025
|
||||
dw $0078, $0098, $0020, $0088, $5858, $1802, $0000, $0026 ;Village of Outcasts
|
||||
dw $0138, $0158, $0020, $0148, $5858, $181a, $0000, $0027
|
||||
dw $02e8, $0348, $0060, $0318, $5859, $1854, $0000, $0028
|
||||
dw $0478, $04d0, $0058, $04a4, $5a5a, $1806, $0000, $0029
|
||||
dw $0510, $0538, $0028, $0524, $5a5a, $1816, $0000, $002a
|
||||
dw $0a48, $0af0, $00a8, $0a9c, $5d5d, $1804, $0000, $002b
|
||||
dw $0b28, $0b38, $0010, $0b30, $5d5d, $1818, $0001, $002c
|
||||
dw $0b70, $0ba0, $0030, $0b88, $5d5d, $1820, $0000, $002d
|
||||
dw $0a40, $0b10, $00d0, $0aa8, $6565, $1806, $0000, $002e
|
||||
dw $0350, $0390, $0040, $0370, $6969, $1820, $0000, $002f
|
||||
dw $0670, $06a8, $0038, $068c, $6b6b, $1802, $0000, $0030
|
||||
dw $0898, $09b0, $0118, $0924, $6c6c, $1814, $0000, $0031
|
||||
dw $0a40, $0ba0, $0160, $0af0, $6d6d, $180e, $0000, $0032
|
||||
dw $0c70, $0c90, $0020, $0c80, $6e6e, $1802, $0000, $0033
|
||||
dw $0f70, $0f80, $0010, $0f78, $6f6f, $1820, $0000, $0034
|
||||
dw $0430, $0468, $0038, $044c, $7272, $1800, $0000, $0035
|
||||
dw $04d8, $04f8, $0020, $04e8, $7272, $180c, $0000, $0036
|
||||
dw $0688, $06b0, $0028, $069c, $7373, $1804, $0000, $0037
|
||||
dw $08d0, $08f0, $0020, $08e0, $7474, $180e, $0000, $0038
|
||||
dw $0a80, $0b40, $00c0, $0ae0, $7575, $180c, $0000, $0039
|
||||
dw $0d38, $0d58, $0020, $0d48, $7576, $185a, $0001, $003a
|
||||
dw $0d90, $0da0, $0010, $0d98, $7576, $1860, $0000, $003b
|
||||
dw $06a0, $07b0, $0110, $0728, $7b7b, $1816, $0000, $003c
|
||||
dw $0830, $09b0, $0180, $08f0, $7c7c, $1810, $0000, $003d
|
||||
dw $0e78, $0e88, $0010, $0e80, $7f7f, $1802, $0001, $003e
|
||||
dw $0ee0, $0fc0, $00e0, $0f50, $7f7f, $181c, $0000, $003f
|
||||
dw $00a0, $00a0, $0000, $00a0, $0000, $0000, $0000, $B040 ;Lost Woods (exit only)
|
||||
dw $0458, $0540, $00e8, $04cc, $0a0a, $0000, $0000, $0000
|
||||
dw $0f38, $0f60, $0028, $0f4c, $0f0f, $0000, $0000, $2041 ;Waterfall (exit only)
|
||||
dw $0058, $0058, $0000, $0058, $1010, $0000, $0000, $0001
|
||||
dw $0178, $0178, $0000, $0178, $1010, $0000, $0000, $0002
|
||||
dw $0388, $0388, $0000, $0388, $1111, $0000, $0000, $0003
|
||||
dw $0480, $05b0, $0130, $0518, $1212, $0000, $0000, $0004
|
||||
dw $0f70, $0f90, $0020, $0f80, $1717, $0000, $0000, $0005
|
||||
dw $0078, $0098, $0020, $0088, $1818, $0000, $0000, $0006 ;Kakariko
|
||||
dw $0138, $0158, $0020, $0148, $1818, $0000, $0000, $0007
|
||||
dw $02e8, $0348, $0060, $0318, $1819, $0000, $0000, $0008
|
||||
dw $0478, $04d0, $0058, $04a4, $1a1a, $0000, $0000, $0009
|
||||
dw $0510, $0538, $0028, $0524, $1a1a, $0000, $0000, $000a
|
||||
dw $0a48, $0af0, $00a8, $0a9c, $1d1d, $0000, $0000, $000b
|
||||
dw $0b28, $0b38, $0010, $0b30, $1d1d, $0000, $0001, $000c
|
||||
dw $0b70, $0ba0, $0030, $0b88, $1d1d, $0000, $0000, $000d
|
||||
dw $0a40, $0b10, $00d0, $0aa8, $2525, $0000, $0000, $000e
|
||||
dw $0350, $0390, $0040, $0370, $2929, $0000, $0000, $000f
|
||||
dw $0670, $06a8, $0038, $068c, $2b2b, $0000, $0000, $0010
|
||||
dw $0898, $09b0, $0118, $0924, $2c2c, $0000, $0000, $0011 ;Links House
|
||||
dw $0a40, $0ba0, $0160, $0af0, $2d2d, $0000, $0000, $0012
|
||||
dw $0c70, $0c90, $0020, $0c80, $2e2e, $0000, $0000, $0013
|
||||
dw $0f70, $0f80, $0010, $0f78, $2f2f, $0000, $0000, $0014
|
||||
dw $0430, $0468, $0038, $044c, $3232, $0000, $0000, $0015
|
||||
dw $04d8, $04f8, $0020, $04e8, $3232, $0000, $0000, $0016
|
||||
dw $0688, $06b0, $0028, $069c, $3333, $0000, $0000, $0017
|
||||
dw $08d0, $08f0, $0020, $08e0, $3434, $0000, $0000, $0018
|
||||
dw $0a80, $0b40, $00c0, $0ae0, $3535, $0000, $0000, $0019
|
||||
dw $0d38, $0d58, $0020, $0d48, $3536, $0000, $0001, $001a
|
||||
dw $0d90, $0da0, $0010, $0d98, $3536, $0000, $0000, $001b
|
||||
dw $06a0, $07b0, $0110, $0728, $3b3b, $0000, $0000, $001c
|
||||
dw $0830, $09b0, $0180, $08f0, $3c3c, $0000, $0000, $001d
|
||||
dw $0e78, $0e88, $0010, $0e80, $3f3f, $0000, $0001, $001e
|
||||
dw $0ee0, $0fc0, $00e0, $0f50, $3f3f, $0000, $0000, $001f
|
||||
dw $0458, $0540, $00e8, $04cc, $4a4a, $0000, $0000, $0020
|
||||
dw $0058, $0058, $0000, $0058, $5050, $0000, $0000, $0021
|
||||
dw $0178, $0178, $0000, $0178, $5050, $0000, $0000, $0022
|
||||
dw $0388, $0388, $0000, $0388, $5151, $0000, $0000, $0023
|
||||
dw $0480, $05b0, $0130, $0518, $5252, $0000, $0000, $0024
|
||||
dw $0f70, $0f90, $0020, $0f80, $5757, $0000, $0000, $0025
|
||||
dw $0078, $0098, $0020, $0088, $5858, $0000, $0000, $0026 ;Village of Outcasts
|
||||
dw $0138, $0158, $0020, $0148, $5858, $0000, $0000, $0027
|
||||
dw $02e8, $0348, $0060, $0318, $5859, $0000, $0000, $0028
|
||||
dw $0478, $04d0, $0058, $04a4, $5a5a, $0000, $0000, $0029
|
||||
dw $0510, $0538, $0028, $0524, $5a5a, $0000, $0000, $002a
|
||||
dw $0a48, $0af0, $00a8, $0a9c, $5d5d, $0000, $0000, $002b
|
||||
dw $0b28, $0b38, $0010, $0b30, $5d5d, $0000, $0001, $002c
|
||||
dw $0b70, $0ba0, $0030, $0b88, $5d5d, $0000, $0000, $002d
|
||||
dw $0a40, $0b10, $00d0, $0aa8, $6565, $0000, $0000, $002e
|
||||
dw $0350, $0390, $0040, $0370, $6969, $0000, $0000, $002f
|
||||
dw $0670, $06a8, $0038, $068c, $6b6b, $0000, $0000, $0030
|
||||
dw $0898, $09b0, $0118, $0924, $6c6c, $0000, $0000, $0031
|
||||
dw $0a40, $0ba0, $0160, $0af0, $6d6d, $0000, $0000, $0032
|
||||
dw $0c70, $0c90, $0020, $0c80, $6e6e, $0000, $0000, $0033
|
||||
dw $0f70, $0f80, $0010, $0f78, $6f6f, $0000, $0000, $0034
|
||||
dw $0430, $0468, $0038, $044c, $7272, $0000, $0000, $0035
|
||||
dw $04d8, $04f8, $0020, $04e8, $7272, $0000, $0000, $0036
|
||||
dw $0688, $06b0, $0028, $069c, $7373, $0000, $0000, $0037
|
||||
dw $08d0, $08f0, $0020, $08e0, $7474, $0000, $0000, $0038
|
||||
dw $0a80, $0b40, $00c0, $0ae0, $7575, $0000, $0000, $0039
|
||||
dw $0d38, $0d58, $0020, $0d48, $7576, $0000, $0001, $003a
|
||||
dw $0d90, $0da0, $0010, $0d98, $7576, $0000, $0000, $003b
|
||||
dw $06a0, $07b0, $0110, $0728, $7b7b, $0000, $0000, $003c
|
||||
dw $0830, $09b0, $0180, $08f0, $7c7c, $0000, $0000, $003d
|
||||
dw $0e78, $0e88, $0010, $0e80, $7f7f, $0000, $0001, $003e
|
||||
dw $0ee0, $0fc0, $00e0, $0f50, $7f7f, $0000, $0000, $003f
|
||||
OWSouthEdges:
|
||||
dw $0458, $0540, $00e8, $04cc, $0202, $100a, $0000, $0001
|
||||
dw $0058, $0058, $0000, $0058, $0008, $2000, $0000, $0003
|
||||
dw $0178, $0178, $0000, $0178, $0008, $2020, $0000, $0004
|
||||
dw $0388, $0388, $0000, $0388, $0009, $2060, $0000, $0005
|
||||
dw $0480, $05b0, $0130, $0518, $0a0a, $1012, $0000, $0006
|
||||
dw $0f70, $0f90, $0020, $0f80, $0f0f, $1020, $0000, $0007
|
||||
dw $0078, $0098, $0020, $0088, $1010, $1002, $0000, $0008
|
||||
dw $0138, $0158, $0020, $0148, $1010, $101a, $0000, $0009
|
||||
dw $02e8, $0348, $0060, $0318, $1111, $1014, $0000, $000a
|
||||
dw $0478, $04d0, $0058, $04a4, $1212, $1006, $0000, $000b
|
||||
dw $0510, $0538, $0028, $0524, $1212, $1016, $0000, $000c
|
||||
dw $0a48, $0af0, $00a8, $0a9c, $1515, $1004, $0000, $000d
|
||||
dw $0b28, $0b38, $0010, $0b30, $1515, $1018, $0001, $000e
|
||||
dw $0b70, $0ba0, $0030, $0b88, $1515, $1020, $0000, $000f
|
||||
dw $0a40, $0b10, $00d0, $0aa8, $1d1d, $1006, $0000, $0010
|
||||
dw $0350, $0390, $0040, $0370, $1821, $2060, $0000, $0011
|
||||
dw $0670, $06a8, $0038, $068c, $1b23, $2002, $0000, $0012
|
||||
dw $0898, $09b0, $0118, $0924, $1b24, $2054, $0000, $0013
|
||||
dw $0a40, $0ba0, $0160, $0af0, $2525, $100e, $0000, $0014
|
||||
dw $0c70, $0c90, $0020, $0c80, $1e26, $2002, $0000, $0015
|
||||
dw $0f70, $0f80, $0010, $0f78, $1e27, $2060, $0000, $0016
|
||||
dw $0430, $0468, $0038, $044c, $2a2a, $1000, $0000, $0017
|
||||
dw $04d8, $04f8, $0020, $04e8, $2a2a, $100c, $0000, $0018
|
||||
dw $0688, $06b0, $0028, $069c, $2b2b, $1004, $0000, $0019
|
||||
dw $08d0, $08f0, $0020, $08e0, $2c2c, $100e, $0000, $001a
|
||||
dw $0a80, $0b40, $00c0, $0ae0, $2d2d, $100c, $0000, $001b
|
||||
dw $0d38, $0d58, $0020, $0d48, $2e2e, $101a, $0001, $001c
|
||||
dw $0d90, $0da0, $0010, $0d98, $2e2e, $1020, $0000, $001d
|
||||
dw $06a0, $07b0, $0110, $0728, $3333, $1016, $0000, $001e
|
||||
dw $0830, $09b0, $0180, $08f0, $3434, $1010, $0000, $001f
|
||||
dw $0e78, $0e88, $0010, $0e80, $3737, $1002, $0001, $0020
|
||||
dw $0ee0, $0fc0, $00e0, $0f50, $3737, $101c, $0000, $0021
|
||||
dw $0458, $0540, $00e8, $04cc, $4242, $100a, $0000, $0022
|
||||
dw $0058, $0058, $0000, $0058, $4048, $2000, $0000, $0023
|
||||
dw $0178, $0178, $0000, $0178, $4048, $2020, $0000, $0024
|
||||
dw $0388, $0388, $0000, $0388, $4049, $2060, $0000, $0025
|
||||
dw $0480, $05b0, $0130, $0518, $4a4a, $1012, $0000, $0026
|
||||
dw $0f70, $0f90, $0020, $0f80, $4f4f, $1020, $0000, $0027
|
||||
dw $0078, $0098, $0020, $0088, $5050, $1002, $0000, $0028
|
||||
dw $0138, $0158, $0020, $0148, $5050, $101a, $0000, $0029
|
||||
dw $02e8, $0348, $0060, $0318, $5151, $1014, $0000, $002a
|
||||
dw $0478, $04d0, $0058, $04a4, $5252, $1006, $0000, $002b
|
||||
dw $0510, $0538, $0028, $0524, $5252, $1016, $0000, $002c
|
||||
dw $0a48, $0af0, $00a8, $0a9c, $5555, $1004, $0000, $002d
|
||||
dw $0b28, $0b38, $0010, $0b30, $5555, $1018, $0001, $002e
|
||||
dw $0b70, $0ba0, $0030, $0b88, $5555, $1020, $0000, $002f
|
||||
dw $0a40, $0b10, $00d0, $0aa8, $5d5d, $1006, $0000, $0030
|
||||
dw $0350, $0390, $0040, $0370, $5861, $2060, $0000, $0031
|
||||
dw $0670, $06a8, $0038, $068c, $5b63, $2002, $0000, $0032
|
||||
dw $0898, $09b0, $0118, $0924, $5b64, $2054, $0000, $0033
|
||||
dw $0a40, $0ba0, $0160, $0af0, $6565, $100e, $0000, $0034
|
||||
dw $0c70, $0c90, $0020, $0c80, $5e66, $2002, $0000, $0035
|
||||
dw $0f70, $0f80, $0010, $0f78, $5e67, $2060, $0000, $0036
|
||||
dw $0430, $0468, $0038, $044c, $6a6a, $1000, $0000, $0037
|
||||
dw $04d8, $04f8, $0020, $04e8, $6a6a, $100c, $0000, $0038
|
||||
dw $0688, $06b0, $0028, $069c, $6b6b, $1004, $0000, $0039
|
||||
dw $08d0, $08f0, $0020, $08e0, $6c6c, $100e, $0000, $003a
|
||||
dw $0a80, $0b40, $00c0, $0ae0, $6d6d, $100c, $0000, $003b
|
||||
dw $0d38, $0d58, $0020, $0d48, $6e6e, $101a, $0001, $003c
|
||||
dw $0d90, $0da0, $0010, $0d98, $6e6e, $1020, $0000, $003d
|
||||
dw $06a0, $07b0, $0110, $0728, $7373, $1016, $0000, $003e
|
||||
dw $0830, $09b0, $0180, $08f0, $7474, $1010, $0000, $003f
|
||||
dw $0e78, $0e88, $0010, $0e80, $7777, $1002, $0001, $0040
|
||||
dw $0ee0, $0fc0, $00e0, $0f50, $7777, $101c, $0000, $0041
|
||||
dw $0458, $0540, $00e8, $04cc, $0202, $0000, $0000, $0001
|
||||
dw $0058, $0058, $0000, $0058, $0008, $0000, $0000, $0003
|
||||
dw $0178, $0178, $0000, $0178, $0008, $0000, $0000, $0004
|
||||
dw $0388, $0388, $0000, $0388, $0009, $0000, $0000, $0005
|
||||
dw $0480, $05b0, $0130, $0518, $0a0a, $0000, $0000, $0006
|
||||
dw $0f70, $0f90, $0020, $0f80, $0f0f, $0000, $0000, $0007
|
||||
dw $0078, $0098, $0020, $0088, $1010, $0000, $0000, $0008
|
||||
dw $0138, $0158, $0020, $0148, $1010, $0000, $0000, $0009
|
||||
dw $02e8, $0348, $0060, $0318, $1111, $0000, $0000, $000a
|
||||
dw $0478, $04d0, $0058, $04a4, $1212, $0000, $0000, $000b
|
||||
dw $0510, $0538, $0028, $0524, $1212, $0000, $0000, $000c
|
||||
dw $0a48, $0af0, $00a8, $0a9c, $1515, $0000, $0000, $000d
|
||||
dw $0b28, $0b38, $0010, $0b30, $1515, $0000, $0001, $000e
|
||||
dw $0b70, $0ba0, $0030, $0b88, $1515, $0000, $0000, $000f
|
||||
dw $0a40, $0b10, $00d0, $0aa8, $1d1d, $0000, $0000, $0010
|
||||
dw $0350, $0390, $0040, $0370, $1821, $0000, $0000, $0011
|
||||
dw $0670, $06a8, $0038, $068c, $1b23, $0000, $0000, $0012
|
||||
dw $0898, $09b0, $0118, $0924, $1b24, $0000, $0000, $0013
|
||||
dw $0a40, $0ba0, $0160, $0af0, $2525, $0000, $0000, $0014
|
||||
dw $0c70, $0c90, $0020, $0c80, $1e26, $0000, $0000, $0015
|
||||
dw $0f70, $0f80, $0010, $0f78, $1e27, $0000, $0000, $0016
|
||||
dw $0430, $0468, $0038, $044c, $2a2a, $0000, $0000, $0017
|
||||
dw $04d8, $04f8, $0020, $04e8, $2a2a, $0000, $0000, $0018
|
||||
dw $0688, $06b0, $0028, $069c, $2b2b, $0000, $0000, $0019
|
||||
dw $08d0, $08f0, $0020, $08e0, $2c2c, $0000, $0000, $001a
|
||||
dw $0a80, $0b40, $00c0, $0ae0, $2d2d, $0000, $0000, $001b
|
||||
dw $0d38, $0d58, $0020, $0d48, $2e2e, $0000, $0001, $001c
|
||||
dw $0d90, $0da0, $0010, $0d98, $2e2e, $0000, $0000, $001d
|
||||
dw $06a0, $07b0, $0110, $0728, $3333, $0000, $0000, $001e
|
||||
dw $0830, $09b0, $0180, $08f0, $3434, $0000, $0000, $001f
|
||||
dw $0e78, $0e88, $0010, $0e80, $3737, $0000, $0001, $0020
|
||||
dw $0ee0, $0fc0, $00e0, $0f50, $3737, $0000, $0000, $0021
|
||||
dw $0458, $0540, $00e8, $04cc, $4242, $0000, $0000, $0022
|
||||
dw $0058, $0058, $0000, $0058, $4048, $0000, $0000, $0023
|
||||
dw $0178, $0178, $0000, $0178, $4048, $0000, $0000, $0024
|
||||
dw $0388, $0388, $0000, $0388, $4049, $0000, $0000, $0025
|
||||
dw $0480, $05b0, $0130, $0518, $4a4a, $0000, $0000, $0026
|
||||
dw $0f70, $0f90, $0020, $0f80, $4f4f, $0000, $0000, $0027
|
||||
dw $0078, $0098, $0020, $0088, $5050, $0000, $0000, $0028
|
||||
dw $0138, $0158, $0020, $0148, $5050, $0000, $0000, $0029
|
||||
dw $02e8, $0348, $0060, $0318, $5151, $0000, $0000, $002a
|
||||
dw $0478, $04d0, $0058, $04a4, $5252, $0000, $0000, $002b
|
||||
dw $0510, $0538, $0028, $0524, $5252, $0000, $0000, $002c
|
||||
dw $0a48, $0af0, $00a8, $0a9c, $5555, $0000, $0000, $002d
|
||||
dw $0b28, $0b38, $0010, $0b30, $5555, $0000, $0001, $002e
|
||||
dw $0b70, $0ba0, $0030, $0b88, $5555, $0000, $0000, $002f
|
||||
dw $0a40, $0b10, $00d0, $0aa8, $5d5d, $0000, $0000, $0030
|
||||
dw $0350, $0390, $0040, $0370, $5861, $0000, $0000, $0031
|
||||
dw $0670, $06a8, $0038, $068c, $5b63, $0000, $0000, $0032
|
||||
dw $0898, $09b0, $0118, $0924, $5b64, $0000, $0000, $0033
|
||||
dw $0a40, $0ba0, $0160, $0af0, $6565, $0000, $0000, $0034
|
||||
dw $0c70, $0c90, $0020, $0c80, $5e66, $0000, $0000, $0035
|
||||
dw $0f70, $0f80, $0010, $0f78, $5e67, $0000, $0000, $0036
|
||||
dw $0430, $0468, $0038, $044c, $6a6a, $0000, $0000, $0037
|
||||
dw $04d8, $04f8, $0020, $04e8, $6a6a, $0000, $0000, $0038
|
||||
dw $0688, $06b0, $0028, $069c, $6b6b, $0000, $0000, $0039
|
||||
dw $08d0, $08f0, $0020, $08e0, $6c6c, $0000, $0000, $003a
|
||||
dw $0a80, $0b40, $00c0, $0ae0, $6d6d, $0000, $0000, $003b
|
||||
dw $0d38, $0d58, $0020, $0d48, $6e6e, $0000, $0001, $003c
|
||||
dw $0d90, $0da0, $0010, $0d98, $6e6e, $0000, $0000, $003d
|
||||
dw $06a0, $07b0, $0110, $0728, $7373, $0000, $0000, $003e
|
||||
dw $0830, $09b0, $0180, $08f0, $7474, $0000, $0000, $003f
|
||||
dw $0e78, $0e88, $0010, $0e80, $7777, $0000, $0001, $0040
|
||||
dw $0ee0, $0fc0, $00e0, $0f50, $7777, $0000, $0000, $0041
|
||||
dw $0080, $0080, $0000, $0080, $8080, $0000, $0000, $0000 ;Pedestal (unused)
|
||||
dw $0288, $02c0, $0038, $02a4, $8189, $1782, $0000, $0002 ;Zora (unused)
|
||||
dw $0288, $02c0, $0038, $02a4, $8189, $0000, $0000, $0002 ;Zora (unused)
|
||||
OWWestEdges:
|
||||
dw $0070, $00a0, $0030, $0088, $0202, $00e0, $0000, $0000
|
||||
dw $0068, $0078, $0010, $0070, $0505, $0060, $0000, $0001
|
||||
dw $0068, $0088, $0020, $0078, $0707, $00e0, $0000, $0002
|
||||
dw $0318, $0368, $0050, $0340, $050d, $1660, $0000, $0003
|
||||
dw $0450, $0488, $0038, $046c, $1212, $00e0, $0000, $0004
|
||||
dw $0560, $05a0, $0040, $0580, $1212, $08e0, $0000, $0005
|
||||
dw $0488, $0500, $0078, $04c4, $1313, $0360, $0000, $0006
|
||||
dw $0538, $05a8, $0070, $0570, $1313, $08e0, $0000, $0007
|
||||
dw $0470, $05a8, $0138, $050c, $1414, $04e0, $0000, $0008
|
||||
dw $0470, $0598, $0128, $0504, $1515, $04e0, $0000, $0009
|
||||
dw $0480, $0488, $0008, $0484, $1616, $01e0, $0001, $000a
|
||||
dw $04b0, $0510, $0060, $04e0, $1616, $04e0, $0000, $000b
|
||||
dw $0560, $0588, $0028, $0574, $1616, $08e0, $0000, $000c
|
||||
dw $0450, $0458, $0008, $0454, $1717, $00e0, $0001, $000d
|
||||
dw $0480, $04a8, $0028, $0494, $1717, $01e0, $0000, $000e
|
||||
dw $0718, $0738, $0020, $0728, $1b1b, $06e0, $0000, $000f
|
||||
dw $0908, $0948, $0040, $0928, $2222, $05e0, $0000, $0010
|
||||
dw $0878, $08a8, $0030, $0890, $2525, $01e0, $0000, $0011
|
||||
dw $0bb8, $0bc8, $0010, $0bc0, $2929, $0960, $0000, $0012
|
||||
dw $0b60, $0ba0, $0040, $0b80, $2a2a, $0960, $0000, $0013
|
||||
dw $0ab0, $0ad0, $0020, $0ac0, $2c2c, $0360, $0000, $0014
|
||||
dw $0af0, $0b40, $0050, $0b18, $2c2c, $05e0, $0000, $0015
|
||||
dw $0b78, $0ba0, $0028, $0b8c, $2c2c, $08a0, $0000, $0016
|
||||
dw $0b10, $0b28, $0018, $0b1c, $2d2d, $061c, $0001, $604a ;Stone Bridge (exit only)
|
||||
dw $0b68, $0b98, $0030, $0b80, $2d2d, $08e0, $0000, $0017
|
||||
dw $0a68, $0ab8, $0050, $0a90, $2e2e, $01e0, $0000, $0018
|
||||
dw $0b00, $0b78, $0078, $0b3c, $2e2e, $0660, $0001, $0019
|
||||
dw $0c50, $0db8, $0168, $0d04, $3333, $05e0, $0000, $001a
|
||||
dw $0c78, $0ce3, $006b, $0cad, $3434, $02e0, $0000, $001b
|
||||
dw $0ce4, $0d33, $004f, $0d0b, $3434, $05e0, $0001, $001c
|
||||
dw $0d34, $0db8, $0084, $0d76, $3434, $08e0, $0000, $001d
|
||||
dw $0ea8, $0f20, $0078, $0ee4, $3a3a, $03e0, $0000, $001e
|
||||
dw $0f78, $0fa8, $0030, $0f90, $3a3a, $0860, $0000, $001f
|
||||
dw $0f18, $0f18, $0000, $0f18, $3b3b, $0660, $0000, $0020
|
||||
dw $0fc8, $0fc8, $0000, $0fc8, $3b3b, $08e0, $0000, $0021
|
||||
dw $0e28, $0fb8, $0190, $0ef0, $3c3c, $04e0, $0000, $0022
|
||||
dw $0f78, $0fb8, $0040, $0f98, $353d, $1860, $0000, $0023
|
||||
dw $0f20, $0f40, $0020, $0f30, $3f3f, $05e0, $0001, $0024
|
||||
dw $0f70, $0fb8, $0048, $0f94, $3f3f, $0860, $0000, $0025
|
||||
dw $0070, $00a0, $0030, $0088, $4242, $00e0, $0000, $0026
|
||||
dw $0068, $0078, $0010, $0070, $4545, $0060, $0000, $0027
|
||||
dw $0068, $0088, $0020, $0078, $4747, $00e0, $0000, $0028
|
||||
dw $0318, $0368, $0050, $0340, $454d, $1660, $0000, $0029
|
||||
dw $0450, $0488, $0038, $046c, $5252, $00e0, $0000, $002a
|
||||
dw $0560, $05a0, $0040, $0580, $5252, $08e0, $0000, $002b
|
||||
dw $0488, $0500, $0078, $04c4, $5353, $0360, $0000, $002c
|
||||
dw $0538, $05a8, $0070, $0570, $5353, $08e0, $0000, $002d
|
||||
dw $0470, $05a8, $0138, $050c, $5454, $04e0, $0000, $002e
|
||||
dw $0470, $0598, $0128, $0504, $5555, $04e0, $0000, $002f
|
||||
dw $0480, $0488, $0008, $0484, $5656, $01e0, $0001, $0030
|
||||
dw $04b0, $0510, $0060, $04e0, $5656, $04e0, $0000, $0031
|
||||
dw $0560, $0588, $0028, $0574, $5656, $08e0, $0000, $0032
|
||||
dw $0450, $0458, $0008, $0454, $5757, $00e0, $0001, $0033
|
||||
dw $0480, $04a8, $0028, $0494, $5757, $01e0, $0000, $0034
|
||||
dw $0908, $0948, $0040, $0928, $6262, $05e0, $0000, $0035
|
||||
dw $0878, $08a8, $0030, $0890, $6565, $01e0, $0000, $0036
|
||||
dw $0b60, $0b68, $0008, $0b64, $6969, $08e0, $0000, $0037
|
||||
dw $0bb8, $0bc8, $0010, $0bc0, $6969, $0960, $0000, $0038
|
||||
dw $0b60, $0ba0, $0040, $0b80, $6a6a, $0960, $0000, $0039
|
||||
dw $0ab0, $0ad0, $0020, $0ac0, $6c6c, $0360, $0000, $003a
|
||||
dw $0af0, $0b40, $0050, $0b18, $6c6c, $05e0, $0000, $003b
|
||||
dw $0b78, $0ba0, $0028, $0b8c, $6c6c, $08a0, $0000, $003c
|
||||
dw $0b68, $0b98, $0030, $0b80, $6d6d, $08e0, $0000, $003d
|
||||
dw $0a68, $0ab8, $0050, $0a90, $6e6e, $01e0, $0000, $003e
|
||||
dw $0b00, $0b78, $0078, $0b3c, $6e6e, $0660, $0001, $003f
|
||||
dw $0c50, $0db8, $0168, $0d04, $7373, $05e0, $0000, $0040
|
||||
dw $0c78, $0ce3, $006b, $0cad, $7474, $02e0, $0000, $0041
|
||||
dw $0ce4, $0d33, $004f, $0d0b, $7474, $05e0, $0001, $0042
|
||||
dw $0d34, $0db8, $0084, $0d76, $7474, $08e0, $0000, $0043
|
||||
dw $0f18, $0f18, $0000, $0f18, $7b7b, $0660, $0000, $0044
|
||||
dw $0fc8, $0fc8, $0000, $0fc8, $7b7b, $08e0, $0000, $0045
|
||||
dw $0e28, $0fb8, $0190, $0ef0, $7c7c, $04e0, $0000, $0046
|
||||
dw $0f78, $0fb8, $0040, $0f98, $757d, $1860, $0000, $0047
|
||||
dw $0f20, $0f40, $0020, $0f30, $7f7f, $05e0, $0001, $0048
|
||||
dw $0f70, $0fb8, $0048, $0f94, $7f7f, $0860, $0000, $0049
|
||||
dw $0070, $00a0, $0030, $0088, $0202, $0000, $0000, $0000
|
||||
dw $0068, $0078, $0010, $0070, $0505, $0000, $0000, $0001
|
||||
dw $0068, $0088, $0020, $0078, $0707, $0000, $0000, $0002
|
||||
dw $0318, $0368, $0050, $0340, $050d, $0000, $0000, $0003
|
||||
dw $0450, $0488, $0038, $046c, $1212, $0000, $0000, $0004
|
||||
dw $0560, $05a0, $0040, $0580, $1212, $0000, $0000, $0005
|
||||
dw $0488, $0500, $0078, $04c4, $1313, $0000, $0000, $0006
|
||||
dw $0538, $05a8, $0070, $0570, $1313, $0000, $0000, $0007
|
||||
dw $0470, $05a8, $0138, $050c, $1414, $0000, $0000, $0008
|
||||
dw $0470, $0598, $0128, $0504, $1515, $0000, $0000, $0009
|
||||
dw $0480, $0488, $0008, $0484, $1616, $0000, $0001, $000a
|
||||
dw $04b0, $0510, $0060, $04e0, $1616, $0000, $0000, $000b
|
||||
dw $0560, $0588, $0028, $0574, $1616, $0000, $0000, $000c
|
||||
dw $0450, $0458, $0008, $0454, $1717, $0000, $0001, $000d
|
||||
dw $0480, $04a8, $0028, $0494, $1717, $0000, $0000, $000e
|
||||
dw $0718, $0738, $0020, $0728, $1b1b, $0000, $0000, $000f
|
||||
dw $0908, $0948, $0040, $0928, $2222, $0000, $0000, $0010
|
||||
dw $0878, $08a8, $0030, $0890, $2525, $0000, $0000, $0011
|
||||
dw $0bb8, $0bc8, $0010, $0bc0, $2929, $0000, $0000, $0012
|
||||
dw $0b60, $0ba0, $0040, $0b80, $2a2a, $0000, $0000, $0013
|
||||
dw $0ab0, $0ad0, $0020, $0ac0, $2c2c, $0000, $0000, $0014
|
||||
dw $0af0, $0b40, $0050, $0b18, $2c2c, $0000, $0000, $0015
|
||||
dw $0b78, $0ba0, $0028, $0b8c, $2c2c, $0000, $0000, $0016
|
||||
dw $0b10, $0b28, $0018, $0b1c, $2d2d, $0000, $0001, $604a ;Stone Bridge (exit only)
|
||||
dw $0b68, $0b98, $0030, $0b80, $2d2d, $0000, $0000, $0017
|
||||
dw $0a68, $0ab8, $0050, $0a90, $2e2e, $0000, $0000, $0018
|
||||
dw $0b00, $0b78, $0078, $0b3c, $2e2e, $0000, $0001, $0019
|
||||
dw $0c50, $0db8, $0168, $0d04, $3333, $0000, $0000, $001a
|
||||
dw $0c78, $0ce3, $006b, $0cad, $3434, $0000, $0000, $001b
|
||||
dw $0ce4, $0d33, $004f, $0d0b, $3434, $0000, $0001, $001c
|
||||
dw $0d34, $0db8, $0084, $0d76, $3434, $0000, $0000, $001d
|
||||
dw $0ea8, $0f20, $0078, $0ee4, $3a3a, $0000, $0000, $001e
|
||||
dw $0f78, $0fa8, $0030, $0f90, $3a3a, $0000, $0000, $001f
|
||||
dw $0f18, $0f18, $0000, $0f18, $3b3b, $0000, $0000, $0020
|
||||
dw $0fc8, $0fc8, $0000, $0fc8, $3b3b, $0000, $0000, $0021
|
||||
dw $0e28, $0fb8, $0190, $0ef0, $3c3c, $0000, $0000, $0022
|
||||
dw $0f78, $0fb8, $0040, $0f98, $353d, $0000, $0000, $0023
|
||||
dw $0f20, $0f40, $0020, $0f30, $3f3f, $0000, $0001, $0024
|
||||
dw $0f70, $0fb8, $0048, $0f94, $3f3f, $0000, $0000, $0025
|
||||
dw $0070, $00a0, $0030, $0088, $4242, $0000, $0000, $0026
|
||||
dw $0068, $0078, $0010, $0070, $4545, $0000, $0000, $0027
|
||||
dw $0068, $0088, $0020, $0078, $4747, $0000, $0000, $0028
|
||||
dw $0318, $0368, $0050, $0340, $454d, $0000, $0000, $0029
|
||||
dw $0450, $0488, $0038, $046c, $5252, $0000, $0000, $002a
|
||||
dw $0560, $05a0, $0040, $0580, $5252, $0000, $0000, $002b
|
||||
dw $0488, $0500, $0078, $04c4, $5353, $0000, $0000, $002c
|
||||
dw $0538, $05a8, $0070, $0570, $5353, $0000, $0000, $002d
|
||||
dw $0470, $05a8, $0138, $050c, $5454, $0000, $0000, $002e
|
||||
dw $0470, $0598, $0128, $0504, $5555, $0000, $0000, $002f
|
||||
dw $0480, $0488, $0008, $0484, $5656, $0000, $0001, $0030
|
||||
dw $04b0, $0510, $0060, $04e0, $5656, $0000, $0000, $0031
|
||||
dw $0560, $0588, $0028, $0574, $5656, $0000, $0000, $0032
|
||||
dw $0450, $0458, $0008, $0454, $5757, $0000, $0001, $0033
|
||||
dw $0480, $04a8, $0028, $0494, $5757, $0000, $0000, $0034
|
||||
dw $0908, $0948, $0040, $0928, $6262, $0000, $0000, $0035
|
||||
dw $0878, $08a8, $0030, $0890, $6565, $0000, $0000, $0036
|
||||
dw $0b60, $0b68, $0008, $0b64, $6969, $0000, $0000, $0037
|
||||
dw $0bb8, $0bc8, $0010, $0bc0, $6969, $0000, $0000, $0038
|
||||
dw $0b60, $0ba0, $0040, $0b80, $6a6a, $0000, $0000, $0039
|
||||
dw $0ab0, $0ad0, $0020, $0ac0, $6c6c, $0000, $0000, $003a
|
||||
dw $0af0, $0b40, $0050, $0b18, $6c6c, $0000, $0000, $003b
|
||||
dw $0b78, $0ba0, $0028, $0b8c, $6c6c, $0000, $0000, $003c
|
||||
dw $0b68, $0b98, $0030, $0b80, $6d6d, $0000, $0000, $003d
|
||||
dw $0a68, $0ab8, $0050, $0a90, $6e6e, $0000, $0000, $003e
|
||||
dw $0b00, $0b78, $0078, $0b3c, $6e6e, $0000, $0001, $003f
|
||||
dw $0c50, $0db8, $0168, $0d04, $7373, $0000, $0000, $0040
|
||||
dw $0c78, $0ce3, $006b, $0cad, $7474, $0000, $0000, $0041
|
||||
dw $0ce4, $0d33, $004f, $0d0b, $7474, $0000, $0001, $0042
|
||||
dw $0d34, $0db8, $0084, $0d76, $7474, $0000, $0000, $0043
|
||||
dw $0f18, $0f18, $0000, $0f18, $7b7b, $0000, $0000, $0044
|
||||
dw $0fc8, $0fc8, $0000, $0fc8, $7b7b, $0000, $0000, $0045
|
||||
dw $0e28, $0fb8, $0190, $0ef0, $7c7c, $0000, $0000, $0046
|
||||
dw $0f78, $0fb8, $0040, $0f98, $757d, $0000, $0000, $0047
|
||||
dw $0f20, $0f40, $0020, $0f30, $7f7f, $0000, $0001, $0048
|
||||
dw $0f70, $0fb8, $0048, $0f94, $7f7f, $0000, $0000, $0049
|
||||
OWEastEdges:
|
||||
dw $0070, $00a0, $0030, $0088, $0001, $0180, $0000, $0000
|
||||
dw $0068, $0078, $0010, $0070, $0304, $0180, $0000, $0001
|
||||
dw $0068, $0088, $0020, $0078, $0506, $0180, $0000, $0002
|
||||
dw $0318, $0368, $0050, $0340, $030c, $1780, $0000, $0003
|
||||
dw $0450, $0488, $0038, $046c, $1111, $00c0, $0000, $0004
|
||||
dw $0560, $05a0, $0040, $0580, $1111, $08c0, $0000, $0005
|
||||
dw $0488, $0500, $0078, $04c4, $1212, $0340, $0000, $0006
|
||||
dw $0538, $05a8, $0070, $0570, $1212, $08c0, $0000, $0007
|
||||
dw $0470, $05a8, $0138, $050c, $1313, $04c0, $0000, $0008
|
||||
dw $0470, $0598, $0128, $0504, $1414, $04c0, $0000, $0009
|
||||
dw $0480, $0488, $0008, $0484, $1515, $01c0, $0001, $000a
|
||||
dw $04b0, $0510, $0060, $04e0, $1515, $04c0, $0000, $000b
|
||||
dw $0560, $0588, $0028, $0574, $1515, $08c0, $0000, $000c
|
||||
dw $0450, $0458, $0008, $0454, $1616, $00c0, $0001, $000d
|
||||
dw $0480, $04a8, $0028, $0494, $1616, $01c0, $0000, $000e
|
||||
dw $0718, $0738, $0020, $0728, $1a1a, $06c0, $0000, $000f
|
||||
dw $0908, $0948, $0040, $0928, $1821, $1680, $0000, $0010
|
||||
dw $0878, $08a8, $0030, $0890, $1b24, $1280, $0000, $0011
|
||||
dw $0bb8, $0bc8, $0010, $0bc0, $2828, $0940, $0000, $0012 ;Race Game
|
||||
dw $0b60, $0ba0, $0040, $0b80, $2929, $0940, $0000, $0013
|
||||
dw $0ab0, $0ad0, $0020, $0ac0, $2b2b, $0340, $0000, $0014
|
||||
dw $0af0, $0b40, $0050, $0b18, $2b2b, $05c0, $0000, $0015
|
||||
dw $0b78, $0ba0, $0028, $0b8c, $2b2b, $08c0, $0000, $0016
|
||||
dw $0b68, $0b98, $0030, $0b80, $2c2c, $08c0, $0000, $0018
|
||||
dw $0a68, $0ab8, $0050, $0a90, $2d2d, $01c0, $0000, $0019
|
||||
dw $0b00, $0b78, $0078, $0b3c, $2d2d, $0640, $0001, $001a
|
||||
dw $0c50, $0db8, $0168, $0d04, $3232, $05c0, $0000, $001b
|
||||
dw $0c78, $0ce3, $006b, $0cad, $3333, $02c0, $0000, $001c
|
||||
dw $0ce4, $0d33, $004f, $0d0b, $3333, $05c0, $0001, $001d
|
||||
dw $0d34, $0db8, $0084, $0d76, $3333, $08c0, $0000, $001e
|
||||
dw $0ea8, $0f20, $0078, $0ee4, $3039, $1480, $0000, $001f
|
||||
dw $0f78, $0fa8, $0030, $0f90, $3039, $1980, $0000, $0020
|
||||
dw $0f18, $0f18, $0000, $0f18, $3a3a, $0640, $0000, $0021
|
||||
dw $0fc8, $0fc8, $0000, $0fc8, $3a3a, $08c0, $0000, $0022
|
||||
dw $0e28, $0fb8, $0190, $0ef0, $3b3b, $04c0, $0000, $0023
|
||||
dw $0f78, $0fb8, $0040, $0f98, $3c3c, $08c0, $0000, $0024
|
||||
dw $0f20, $0f40, $0020, $0f30, $353e, $1680, $0001, $0025
|
||||
dw $0f70, $0fb8, $0048, $0f94, $353e, $1880, $0000, $0026
|
||||
dw $0070, $00a0, $0030, $0088, $4041, $0180, $0000, $0027 ;Skull Woods
|
||||
dw $0068, $0078, $0010, $0070, $4344, $0180, $0000, $0028
|
||||
dw $0068, $0088, $0020, $0078, $4546, $0180, $0000, $0029
|
||||
dw $0318, $0368, $0050, $0340, $434c, $1780, $0000, $002a
|
||||
dw $0450, $0488, $0038, $046c, $5151, $00c0, $0000, $002b
|
||||
dw $0560, $05a0, $0040, $0580, $5151, $08c0, $0000, $002c
|
||||
dw $0488, $0500, $0078, $04c4, $5252, $0340, $0000, $002d
|
||||
dw $0538, $05a8, $0070, $0570, $5252, $08c0, $0000, $002e
|
||||
dw $0470, $05a8, $0138, $050c, $5353, $04c0, $0000, $002f
|
||||
dw $0470, $0598, $0128, $0504, $5454, $04c0, $0000, $0030
|
||||
dw $0480, $0488, $0008, $0484, $5555, $01c0, $0001, $0031
|
||||
dw $04b0, $0510, $0060, $04e0, $5555, $04c0, $0000, $0032
|
||||
dw $0560, $0588, $0028, $0574, $5555, $08c0, $0000, $0033
|
||||
dw $0450, $0458, $0008, $0454, $5656, $00c0, $0001, $0034
|
||||
dw $0480, $04a8, $0028, $0494, $5656, $01c0, $0000, $0035
|
||||
dw $0908, $0948, $0040, $0928, $5861, $1680, $0000, $0036
|
||||
dw $0878, $08a8, $0030, $0890, $5b64, $1280, $0000, $0037
|
||||
dw $0b60, $0b68, $0008, $0b64, $6868, $08c0, $0000, $0038 ;Dig Game
|
||||
dw $0bb8, $0bc8, $0010, $0bc0, $6868, $0940, $0000, $0039
|
||||
dw $0b60, $0ba0, $0040, $0b80, $6969, $0940, $0000, $003a
|
||||
dw $0ab0, $0ad0, $0020, $0ac0, $6b6b, $0340, $0000, $003b
|
||||
dw $0af0, $0b40, $0050, $0b18, $6b6b, $05c0, $0000, $003c
|
||||
dw $0b78, $0ba0, $0028, $0b8c, $6b6b, $08c0, $0000, $003d
|
||||
dw $0b68, $0b98, $0030, $0b80, $6c6c, $08c0, $0000, $003e
|
||||
dw $0a68, $0ab8, $0050, $0a90, $6d6d, $01c0, $0000, $003f
|
||||
dw $0b00, $0b78, $0078, $0b3c, $6d6d, $0640, $0001, $0040
|
||||
dw $0c50, $0db8, $0168, $0d04, $7272, $05c0, $0000, $0041
|
||||
dw $0c78, $0ce3, $006b, $0cad, $7373, $02c0, $0000, $0042
|
||||
dw $0ce4, $0d33, $004f, $0d0b, $7373, $05c0, $0001, $0043
|
||||
dw $0d34, $0db8, $0084, $0d76, $7373, $08c0, $0000, $0044
|
||||
dw $0f18, $0f18, $0000, $0f18, $7a7a, $0640, $0000, $0045
|
||||
dw $0fc8, $0fc8, $0000, $0fc8, $7a7a, $08c0, $0000, $0046
|
||||
dw $0e28, $0fb8, $0190, $0ef0, $7b7b, $04c0, $0000, $0047
|
||||
dw $0f78, $0fb8, $0040, $0f98, $7c7c, $08c0, $0000, $0048
|
||||
dw $0f20, $0f40, $0020, $0f30, $757e, $1680, $0001, $0049
|
||||
dw $0f70, $0fb8, $0048, $0f94, $757e, $1880, $0000, $004a
|
||||
dw $0058, $00c0, $0068, $008c, $8080, $0020, $0001, $0017 ;Hobo (unused)
|
||||
dw $0070, $00a0, $0030, $0088, $0001, $0000, $0000, $0000
|
||||
dw $0068, $0078, $0010, $0070, $0304, $0000, $0000, $0001
|
||||
dw $0068, $0088, $0020, $0078, $0506, $0000, $0000, $0002
|
||||
dw $0318, $0368, $0050, $0340, $030c, $0000, $0000, $0003
|
||||
dw $0450, $0488, $0038, $046c, $1111, $0000, $0000, $0004
|
||||
dw $0560, $05a0, $0040, $0580, $1111, $0000, $0000, $0005
|
||||
dw $0488, $0500, $0078, $04c4, $1212, $0000, $0000, $0006
|
||||
dw $0538, $05a8, $0070, $0570, $1212, $0000, $0000, $0007
|
||||
dw $0470, $05a8, $0138, $050c, $1313, $0000, $0000, $0008
|
||||
dw $0470, $0598, $0128, $0504, $1414, $0000, $0000, $0009
|
||||
dw $0480, $0488, $0008, $0484, $1515, $0000, $0001, $000a
|
||||
dw $04b0, $0510, $0060, $04e0, $1515, $0000, $0000, $000b
|
||||
dw $0560, $0588, $0028, $0574, $1515, $0000, $0000, $000c
|
||||
dw $0450, $0458, $0008, $0454, $1616, $0000, $0001, $000d
|
||||
dw $0480, $04a8, $0028, $0494, $1616, $0000, $0000, $000e
|
||||
dw $0718, $0738, $0020, $0728, $1a1a, $0000, $0000, $000f
|
||||
dw $0908, $0948, $0040, $0928, $1821, $0000, $0000, $0010
|
||||
dw $0878, $08a8, $0030, $0890, $1b24, $0000, $0000, $0011
|
||||
dw $0bb8, $0bc8, $0010, $0bc0, $2828, $0000, $0000, $0012 ;Race Game
|
||||
dw $0b60, $0ba0, $0040, $0b80, $2929, $0000, $0000, $0013
|
||||
dw $0ab0, $0ad0, $0020, $0ac0, $2b2b, $0000, $0000, $0014
|
||||
dw $0af0, $0b40, $0050, $0b18, $2b2b, $0000, $0000, $0015
|
||||
dw $0b78, $0ba0, $0028, $0b8c, $2b2b, $0000, $0000, $0016
|
||||
dw $0b68, $0b98, $0030, $0b80, $2c2c, $0000, $0000, $0018
|
||||
dw $0a68, $0ab8, $0050, $0a90, $2d2d, $0000, $0000, $0019
|
||||
dw $0b00, $0b78, $0078, $0b3c, $2d2d, $0000, $0001, $001a
|
||||
dw $0c50, $0db8, $0168, $0d04, $3232, $0000, $0000, $001b
|
||||
dw $0c78, $0ce3, $006b, $0cad, $3333, $0000, $0000, $001c
|
||||
dw $0ce4, $0d33, $004f, $0d0b, $3333, $0000, $0001, $001d
|
||||
dw $0d34, $0db8, $0084, $0d76, $3333, $0000, $0000, $001e
|
||||
dw $0ea8, $0f20, $0078, $0ee4, $3039, $0000, $0000, $001f
|
||||
dw $0f78, $0fa8, $0030, $0f90, $3039, $0000, $0000, $0020
|
||||
dw $0f18, $0f18, $0000, $0f18, $3a3a, $0000, $0000, $0021
|
||||
dw $0fc8, $0fc8, $0000, $0fc8, $3a3a, $0000, $0000, $0022
|
||||
dw $0e28, $0fb8, $0190, $0ef0, $3b3b, $0000, $0000, $0023
|
||||
dw $0f78, $0fb8, $0040, $0f98, $3c3c, $0000, $0000, $0024
|
||||
dw $0f20, $0f40, $0020, $0f30, $353e, $0000, $0001, $0025
|
||||
dw $0f70, $0fb8, $0048, $0f94, $353e, $0000, $0000, $0026
|
||||
dw $0070, $00a0, $0030, $0088, $4041, $0000, $0000, $0027 ;Skull Woods
|
||||
dw $0068, $0078, $0010, $0070, $4344, $0000, $0000, $0028
|
||||
dw $0068, $0088, $0020, $0078, $4546, $0000, $0000, $0029
|
||||
dw $0318, $0368, $0050, $0340, $434c, $0000, $0000, $002a
|
||||
dw $0450, $0488, $0038, $046c, $5151, $0000, $0000, $002b
|
||||
dw $0560, $05a0, $0040, $0580, $5151, $0000, $0000, $002c
|
||||
dw $0488, $0500, $0078, $04c4, $5252, $0000, $0000, $002d
|
||||
dw $0538, $05a8, $0070, $0570, $5252, $0000, $0000, $002e
|
||||
dw $0470, $05a8, $0138, $050c, $5353, $0000, $0000, $002f
|
||||
dw $0470, $0598, $0128, $0504, $5454, $0000, $0000, $0030
|
||||
dw $0480, $0488, $0008, $0484, $5555, $0000, $0001, $0031
|
||||
dw $04b0, $0510, $0060, $04e0, $5555, $0000, $0000, $0032
|
||||
dw $0560, $0588, $0028, $0574, $5555, $0000, $0000, $0033
|
||||
dw $0450, $0458, $0008, $0454, $5656, $0000, $0001, $0034
|
||||
dw $0480, $04a8, $0028, $0494, $5656, $0000, $0000, $0035
|
||||
dw $0908, $0948, $0040, $0928, $5861, $0000, $0000, $0036
|
||||
dw $0878, $08a8, $0030, $0890, $5b64, $0000, $0000, $0037
|
||||
dw $0b60, $0b68, $0008, $0b64, $6868, $0000, $0000, $0038 ;Dig Game
|
||||
dw $0bb8, $0bc8, $0010, $0bc0, $6868, $0000, $0000, $0039
|
||||
dw $0b60, $0ba0, $0040, $0b80, $6969, $0000, $0000, $003a
|
||||
dw $0ab0, $0ad0, $0020, $0ac0, $6b6b, $0000, $0000, $003b
|
||||
dw $0af0, $0b40, $0050, $0b18, $6b6b, $0000, $0000, $003c
|
||||
dw $0b78, $0ba0, $0028, $0b8c, $6b6b, $0000, $0000, $003d
|
||||
dw $0b68, $0b98, $0030, $0b80, $6c6c, $0000, $0000, $003e
|
||||
dw $0a68, $0ab8, $0050, $0a90, $6d6d, $0000, $0000, $003f
|
||||
dw $0b00, $0b78, $0078, $0b3c, $6d6d, $0000, $0001, $0040
|
||||
dw $0c50, $0db8, $0168, $0d04, $7272, $0000, $0000, $0041
|
||||
dw $0c78, $0ce3, $006b, $0cad, $7373, $0000, $0000, $0042
|
||||
dw $0ce4, $0d33, $004f, $0d0b, $7373, $0000, $0001, $0043
|
||||
dw $0d34, $0db8, $0084, $0d76, $7373, $0000, $0000, $0044
|
||||
dw $0f18, $0f18, $0000, $0f18, $7a7a, $0000, $0000, $0045
|
||||
dw $0fc8, $0fc8, $0000, $0fc8, $7a7a, $0000, $0000, $0046
|
||||
dw $0e28, $0fb8, $0190, $0ef0, $7b7b, $0000, $0000, $0047
|
||||
dw $0f78, $0fb8, $0040, $0f98, $7c7c, $0000, $0000, $0048
|
||||
dw $0f20, $0f40, $0020, $0f30, $757e, $0000, $0001, $0049
|
||||
dw $0f70, $0fb8, $0048, $0f94, $757e, $0000, $0000, $004a
|
||||
dw $0058, $00c0, $0068, $008c, $8080, $0000, $0001, $0017 ;Hobo (unused)
|
||||
|
||||
org $aab9a0 ;PC 1539a0
|
||||
OWSpecialDestIndex:
|
||||
|
||||
@@ -168,7 +168,7 @@ RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
ChangeBootsColorForFakeBoots:
|
||||
LDA.l FakeBoots : AND.w #$00FF : BEQ +
|
||||
LDA.l BootsEquipment : AND.w #$00FF : BNE +
|
||||
LDA.l EquipmentSRAM+$15 : AND.w #$00FF : BNE +
|
||||
LDA.w #$F851 ; address of ItemMenu_ItemIcons_usused_nothing, which has the fake boots now
|
||||
BRA ++
|
||||
+ LDA.w #$F821 ; address of ItemMenu_ItemIcons_boots
|
||||
@@ -464,7 +464,40 @@ dw $2990 ; green pendant
|
||||
dw $298B ; blue pendant
|
||||
dw $299B ; red pendant
|
||||
;================================================================================
|
||||
DrawBossSouls:
|
||||
PHP : PHB : PHK : PLB
|
||||
REP #$30 ; Set 16-bit accumulator & index registers
|
||||
LDX.w #$0000 ; Paint entire box black & draw empty pendants and crystals
|
||||
-
|
||||
LDA.l .row0, X : STA.w GFXStripes+$02EA, X
|
||||
LDA.l .row1, X : STA.w GFXStripes+$032A, X
|
||||
LDA.l .row2, X : STA.w GFXStripes+$036A, X
|
||||
LDA.l .row3, X : STA.w GFXStripes+$03AA, X
|
||||
LDA.l .row4, X : STA.w GFXStripes+$03EA, X
|
||||
LDA.l .row5, X : STA.w GFXStripes+$042A, X
|
||||
LDA.l .row6, X : STA.w GFXStripes+$046A, X
|
||||
LDA.l .row7, X : STA.w GFXStripes+$04AA, X
|
||||
LDA.l .row8, X : STA.w GFXStripes+$04EA, X
|
||||
INX #2 : CPX.w #$0014 : BCC -
|
||||
|
||||
PLB : PLP
|
||||
RTL
|
||||
;================================================================================
|
||||
.row0 dw $28FB, $28F9, $28F9, $28F9, $28F9, $28F9, $28F9, $28F9, $28F9, $68FB
|
||||
.row1 dw $28FC, $31A4, $31A5, $24F5, $31A6, $31A7, $24F5, $31A8, $31A9, $68FC
|
||||
.row2 dw $28FC, $24F5, $24F5, $24F5, $24F5, $24F5, $24F5, $24F5, $24F5, $68FC
|
||||
.row3 dw $28FC, $31AA, $31AB, $24F5, $31AC, $31AD, $24F5, $31AE, $31AF, $68FC
|
||||
.row4 dw $28FC, $24F5, $24F5, $24F5, $24F5, $24F5, $24F5, $24F5, $24F5, $68FC
|
||||
.row5 dw $28FC, $31B0, $31B1, $24F5, $31B2, $31B3, $24F5, $31B4, $31B5, $68FC
|
||||
.row6 dw $28FC, $24F5, $24F5, $24F5, $24F5, $24F5, $24F5, $24F5, $24F5, $68FC
|
||||
.row7 dw $28FC, $24F5, $31B6, $31B7, $24F5, $24F5, $31B8, $31B9, $24F5, $68FC
|
||||
.row8 dw $A8FB, $A8F9, $A8F9, $A8F9, $A8F9, $A8F9, $A8F9, $A8F9, $A8F9, $E8FB
|
||||
;================================================================================
|
||||
DrawPendantCrystalDiagram:
|
||||
LDA.l HudFlag : AND.b #$40 : BEQ +
|
||||
JML.l DrawBossSouls
|
||||
+
|
||||
|
||||
PHP : PHB : PHK : PLB
|
||||
REP #$30 ; Set 16-bit accumulator & index registers
|
||||
LDX.w #$0000 ; Paint entire box black & draw empty pendants and crystals
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user