From 9523681b8c356cad3607a32893f095334a80fb6e Mon Sep 17 00:00:00 2001 From: stringflow Date: Thu, 9 Dec 2021 17:30:15 +0100 Subject: [PATCH 01/45] Fix incorrect comment about money received after battle (#346) * fix incorrect comment about money received after battle * fix incorrect comment in wram.asm --- data/trainers/pic_pointers_money.asm | 2 +- wram.asm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/trainers/pic_pointers_money.asm b/data/trainers/pic_pointers_money.asm index c60a3ef95..36ee77ce7 100644 --- a/data/trainers/pic_pointers_money.asm +++ b/data/trainers/pic_pointers_money.asm @@ -6,7 +6,7 @@ ENDM TrainerPicAndMoneyPointers:: table_width 5, TrainerPicAndMoneyPointers ; pic pointer, base reward money - ; money received after battle = base money × level of highest-level enemy mon + ; money received after battle = base money × level of last enemy mon pic_money YoungsterPic, 1500 pic_money BugCatcherPic, 1000 pic_money LassPic, 1500 diff --git a/wram.asm b/wram.asm index 12b1e51a2..428d8c96c 100644 --- a/wram.asm +++ b/wram.asm @@ -1199,7 +1199,7 @@ ENDU ds 2 -; money received after battle = base money × level of highest-level enemy mon +; money received after battle = base money × level of last enemy mon wTrainerBaseMoney:: dw ; BCD wMissableObjectCounter:: db From 7e78c1171d1206ca2f31cc67c55cc715eeb44ee5 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 4 Mar 2022 18:21:12 -0500 Subject: [PATCH 02/45] Gen 1's Minimize graphic was not a complete 8x8 tile --- engine/battle/animations.asm | 12 ++++++++++-- gfx/battle/minimize.png | Bin 74 -> 0 bytes 2 files changed, 10 insertions(+), 2 deletions(-) delete mode 100644 gfx/battle/minimize.png diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index 476e937fd..8f113adc0 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -1694,7 +1694,7 @@ AnimationMinimizeMon: ld bc, 7 * 7 * $10 call FillMemory pop hl - ld de, $194 + ld de, 7 * 3 * $10 + 4 * $10 + 4 add hl, de ld de, MinimizedMonSprite ld c, MinimizedMonSpriteEnd - MinimizedMonSprite @@ -1710,7 +1710,15 @@ AnimationMinimizeMon: jp AnimationShowMonPic MinimizedMonSprite: - INCBIN "gfx/battle/minimize.1bpp" +; 8x5 partial tile graphic +pusho +opt b.X ; . = 0, X = 1 + db %...XX... + db %..XXXX.. + db %.XXXXXX. + db %..XXXX.. + db %..X..X.. +popo MinimizedMonSpriteEnd: AnimationSlideMonDownAndHide: diff --git a/gfx/battle/minimize.png b/gfx/battle/minimize.png deleted file mode 100644 index 35ca75cb92222c6b50eccfaac1cbca052978184e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 74 zcmeAS@N?(olHy`uVBq!ia0vp^96-#<2qYK+UQPG`qy#-(978y+Cs&*+n6Xf>BcGW; XSe^M)?UoA%L5e(G{an^LB{Ts5J_Qok From a75dd222709c92ae136d835ff2451391d5a88e45 Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 8 Mar 2022 21:52:57 -0500 Subject: [PATCH 03/45] Slightly refactor some C tools --- Makefile | 2 +- tools/Makefile | 11 +- tools/common.h | 130 +++++++++++++++--- tools/gfx.c | 313 ++++++++++++++++++------------------------ tools/scan_includes.c | 179 ++++++++++-------------- 5 files changed, 325 insertions(+), 310 deletions(-) diff --git a/Makefile b/Makefile index fb1122ca8..08abfa12d 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ clean: tidy find gfx \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -delete tidy: - rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(pokeblue_debug_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o + $(RM) $(roms) $(pokered_obj) $(pokeblue_obj) $(pokeblue_debug_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o $(MAKE) clean -C tools/ compare: $(roms) diff --git a/tools/Makefile b/tools/Makefile index 7ab1d1469..32f764a19 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,16 +1,21 @@ .PHONY: all clean CC := gcc -CFLAGS := -O3 -std=c99 -Wall -Wextra -Wno-missing-field-initializers +CFLAGS := -O3 -std=c11 -Wall -Wextra -pedantic -Wno-missing-field-initializers -tools := scan_includes gfx pkmncompress +tools := \ + gfx \ + pkmncompress \ + scan_includes all: $(tools) @: clean: - rm -f $(tools) + $(RM) $(tools) gfx: common.h +scan_includes: common.h + %: %.c $(CC) $(CFLAGS) -o $@ $< diff --git a/tools/common.h b/tools/common.h index 4da0b2ef1..a8b694459 100644 --- a/tools/common.h +++ b/tools/common.h @@ -1,40 +1,132 @@ #ifndef GUARD_COMMON_H #define GUARD_COMMON_H -int __getopt_long_i__; -#define getopt_long(c, v, s, l) getopt_long(c, v, s, l, &__getopt_long_i__) +#include +#include +#include +#include +#include +#include +#include +#include -FILE *fopen_verbose(char *filename, char *mode) { +#ifndef PROGRAM_NAME +#error Define PROGRAM_NAME before including common.h! +#endif +#ifndef USAGE_OPTS +#error Define USAGE_OPTS before including common.h! +#endif + +#define error_exit(...) exit((fprintf(stderr, PROGRAM_NAME ": " __VA_ARGS__), 1)) + +void usage_exit(int status) { + fprintf(stderr, "Usage: " PROGRAM_NAME " " USAGE_OPTS "\n"); + exit(status); +} + +int getopt_long_index; +#define getopt_long(argc, argv, optstring, longopts) getopt_long(argc, argv, optstring, longopts, &getopt_long_index) + +void *xmalloc(size_t size) { + errno = 0; + void *m = malloc(size); + if (!m) { + error_exit("Could not allocate %zu bytes: %s\n", size, strerror(errno)); + } + return m; +} + +void *xcalloc(size_t size) { + errno = 0; + void *m = calloc(size, 1); + if (!m) { + error_exit("Could not allocate %zu bytes: %s\n", size, strerror(errno)); + } + return m; +} + +void *xrealloc(void *m, size_t size) { + errno = 0; + m = realloc(m, size); + if (!m) { + error_exit("Could not allocate %zu bytes: %s\n", size, strerror(errno)); + } + return m; +} + +FILE *xfopen(const char *filename, char rw) { + char mode[3] = {rw, 'b', '\0'}; + errno = 0; FILE *f = fopen(filename, mode); if (!f) { - fprintf(stderr, "Could not open file: \"%s\"\n", filename); + error_exit("Could not open file \"%s\": %s\n", filename, strerror(errno)); } return f; } -uint8_t *read_u8(char *filename, int *size) { - FILE *f = fopen_verbose(filename, "rb"); - if (!f) { - exit(1); +void xfread(uint8_t *data, size_t size, const char *filename, FILE *f) { + errno = 0; + if (fread(data, 1, size, f) != size) { + fclose(f); + error_exit("Could not read from file \"%s\": %s\n", filename, strerror(errno)); + } +} + +void xfwrite(const uint8_t *data, size_t size, const char *filename, FILE *f) { + errno = 0; + if (fwrite(data, 1, size, f) != size) { + fclose(f); + error_exit("Could not write to file \"%s\": %s\n", filename, strerror(errno)); + } +} + +long xfsize(const char *filename, FILE *f) { + long size = -1; + errno = 0; + if (!fseek(f, 0, SEEK_END)) { + size = ftell(f); + if (size != -1) { + rewind(f); + } } - fseek(f, 0, SEEK_END); - *size = ftell(f); - rewind(f); - uint8_t *data = malloc(*size); - if (*size != (int)fread(data, 1, *size, f)) { - fprintf(stderr, "Could not read file: \"%s\"\n", filename); - exit(1); + if (size == -1) { + error_exit("Could not measure file \"%s\": %s\n", filename, strerror(errno)); } + return size; +} + +uint8_t *read_u8(const char *filename, long *size) { + FILE *f = xfopen(filename, 'r'); + *size = xfsize(filename, f); + uint8_t *data = xmalloc(*size); + xfread(data, *size, filename, f); fclose(f); return data; } -void write_u8(char *filename, uint8_t *data, int size) { - FILE *f = fopen_verbose(filename, "wb"); - if (f) { - fwrite(data, 1, size, f); +void write_u8(const char *filename, uint8_t *data, size_t size) { + FILE *f = xfopen(filename, 'w'); + xfwrite(data, size, filename, f); + fclose(f); +} + +uint32_t read_png_width(const char *filename) { + FILE *f = xfopen(filename, 'r'); + uint8_t header[16] = {0}; + xfread(header, sizeof(header), filename, f); + static uint8_t expected_header[16] = { + 0x89, 'P', 'N', 'G', '\r', '\n', 0x1A, '\n', // signature + 0, 0, 0, 13, // IHDR chunk length + 'I', 'H', 'D', 'R', // IHDR chunk type + }; + if (memcmp(header, expected_header, sizeof(header))) { fclose(f); + error_exit("Not a valid PNG file: \"%s\"\n", filename); } + uint8_t bytes[4] = {0}; + xfread(bytes, sizeof(bytes), filename, f); + fclose(f); + return (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3]; } #endif // GUARD_COMMON_H diff --git a/tools/gfx.c b/tools/gfx.c index 7d6dd0ee8..4264e669c 100644 --- a/tools/gfx.c +++ b/tools/gfx.c @@ -1,94 +1,96 @@ -#include -#include -#include -#include -#include -#include +#define PROGRAM_NAME "gfx" +#define USAGE_OPTS "[-h|--help] [--trim-whitespace] [--remove-whitespace] [--interleave] [--remove-duplicates [--keep-whitespace]] [--remove-xflip] [--remove-yflip] [--preserve indexes] [-d|--depth depth] [-p|--png filename.png] [-o|--out outfile] infile" #include "common.h" -static void usage(void) { - fprintf(stderr, "Usage: gfx [--trim-whitespace] [--remove-whitespace] [--interleave] [--remove-duplicates [--keep-whitespace]] [--remove-xflip] [--remove-yflip] [--preserve indexes] [--png filename] [-d depth] [-h] [-o outfile] infile\n"); -} - -static void error(char *message) { - fputs(message, stderr); - fputs("\n", stderr); -} - struct Options { - int trim_whitespace; - int remove_whitespace; - int help; - char *outfile; - int depth; - int interleave; - int remove_duplicates; - int keep_whitespace; - int remove_xflip; - int remove_yflip; + bool trim_whitespace; + bool remove_whitespace; + bool interleave; + bool remove_duplicates; + bool keep_whitespace; + bool remove_xflip; + bool remove_yflip; int *preserved; int num_preserved; + int depth; char *png_file; + char *outfile; }; -struct Options Options = { - .depth = 2, -}; +struct Options options = {.depth = 2}; -void get_args(int argc, char *argv[]) { +void parse_args(int argc, char *argv[]) { struct option long_options[] = { - {"remove-whitespace", no_argument, &Options.remove_whitespace, 1}, - {"trim-whitespace", no_argument, &Options.trim_whitespace, 1}, - {"interleave", no_argument, &Options.interleave, 1}, - {"remove-duplicates", no_argument, &Options.remove_duplicates, 1}, - {"keep-whitespace", no_argument, &Options.keep_whitespace, 1}, - {"remove-xflip", no_argument, &Options.remove_xflip, 1}, - {"remove-yflip", no_argument, &Options.remove_yflip, 1}, + {"remove-whitespace", no_argument, 0, 'R'}, + {"trim-whitespace", no_argument, 0, 'T'}, + {"interleave", no_argument, 0, 'I'}, + {"remove-duplicates", no_argument, 0, 'D'}, + {"keep-whitespace", no_argument, 0, 'W'}, + {"remove-xflip", no_argument, 0, 'X'}, + {"remove-yflip", no_argument, 0, 'Y'}, {"preserve", required_argument, 0, 'r'}, {"png", required_argument, 0, 'p'}, {"depth", required_argument, 0, 'd'}, + {"out", required_argument, 0, 'o'}, {"help", no_argument, 0, 'h'}, {0} }; - char *token; - for (int opt = 0; opt != -1;) { - switch (opt = getopt_long(argc, argv, "ho:d:p:", long_options)) { - case 'h': - Options.help = true; + for (int opt; (opt = getopt_long(argc, argv, "d:o:p:h", long_options)) != -1;) { + switch (opt) { + case 'R': + options.remove_whitespace = true; break; - case 'o': - Options.outfile = optarg; + case 'T': + options.trim_whitespace = true; break; - case 'd': - Options.depth = strtoul(optarg, NULL, 0); + case 'I': + options.interleave = true; + break; + case 'D': + options.remove_duplicates = true; + break; + case 'W': + options.keep_whitespace = true; + break; + case 'X': + options.remove_xflip = true; + break; + case 'Y': + options.remove_yflip = true; break; case 'r': - token = strtok(optarg, ","); - while (token) { - Options.num_preserved++; - Options.preserved = realloc(Options.preserved, Options.num_preserved * sizeof(int)); - Options.preserved[Options.num_preserved-1] = strtoul(token, NULL, 0); - token = strtok(NULL, ","); + for (char *token = strtok(optarg, ","); token; token = strtok(NULL, ",")) { + options.preserved = xrealloc(options.preserved, ++options.num_preserved * sizeof(*options.preserved)); + options.preserved[options.num_preserved-1] = strtoul(token, NULL, 0); } break; + case 'd': + options.depth = strtoul(optarg, NULL, 0); + break; case 'p': - Options.png_file = optarg; + options.png_file = optarg; break; - case 0: - case -1: + case 'o': + options.outfile = optarg; break; - default: - usage(); - exit(1); + case 'h': + usage_exit(0); break; + default: + usage_exit(1); } } } +struct Graphic { + uint8_t *data; + long size; +}; + bool is_preserved(int index) { - for (int i = 0; i < Options.num_preserved; i++) { - if (Options.preserved[i] == index) { + for (int i = 0; i < options.num_preserved; i++) { + if (options.preserved[i] == index) { return true; } } @@ -96,22 +98,16 @@ bool is_preserved(int index) { } void shift_preserved(int removed_index) { - for (int i = 0; i < Options.num_preserved; i++) { - if (Options.preserved[i] >= removed_index) { - Options.preserved[i]--; + for (int i = 0; i < options.num_preserved; i++) { + if (options.preserved[i] >= removed_index) { + options.preserved[i]--; } } } -struct Graphic { - int size; - uint8_t *data; -}; - -bool is_whitespace(uint8_t *tile, int tile_size) { - uint8_t WHITESPACE = 0; +bool is_whitespace(const uint8_t *tile, int tile_size) { for (int i = 0; i < tile_size; i++) { - if (tile[i] != WHITESPACE) { + if (tile[i] != 0) { return false; } } @@ -119,7 +115,7 @@ bool is_whitespace(uint8_t *tile, int tile_size) { } void trim_whitespace(struct Graphic *graphic) { - int tile_size = Options.depth * 8; + int tile_size = options.depth * 8; for (int i = graphic->size - tile_size; i > 0; i -= tile_size) { if (is_whitespace(&graphic->data[i], tile_size) && !is_preserved(i / tile_size)) { graphic->size = i; @@ -129,36 +125,34 @@ void trim_whitespace(struct Graphic *graphic) { } } +int get_tile_size(void) { + return options.depth * (options.interleave ? 16 : 8); +} + void remove_whitespace(struct Graphic *graphic) { - int tile_size = Options.depth * 8; - if (Options.interleave) tile_size *= 2; - - // Make sure we have a whole number of tiles, round down if required + int tile_size = get_tile_size(); graphic->size &= ~(tile_size - 1); - int i = 0; for (int j = 0, d = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) { - while (j < graphic->size && is_whitespace(&graphic->data[j], tile_size) && !is_preserved(j / tile_size - d)) { + for (; j < graphic->size && is_whitespace(&graphic->data[j], tile_size) && !is_preserved(j / tile_size - d); j += tile_size, d++) { shift_preserved(j / tile_size - d); - d++; - j += tile_size; } if (j >= graphic->size) { break; - } - if (j > i) { + } else if (j > i) { memcpy(&graphic->data[i], &graphic->data[j], tile_size); } } graphic->size = i; } -bool tile_exists(uint8_t *tile, uint8_t *tiles, int tile_size, int num_tiles) { +bool tile_exists(const uint8_t *tile, const uint8_t *tiles, int tile_size, int num_tiles) { for (int i = 0; i < num_tiles; i++) { bool match = true; for (int j = 0; j < tile_size; j++) { if (tile[j] != tiles[i * tile_size + j]) { match = false; + break; } } if (match) { @@ -169,21 +163,15 @@ bool tile_exists(uint8_t *tile, uint8_t *tiles, int tile_size, int num_tiles) { } void remove_duplicates(struct Graphic *graphic) { - int tile_size = Options.depth * 8; - if (Options.interleave) tile_size *= 2; - int num_tiles = 0; - - // Make sure we have a whole number of tiles, round down if required + int tile_size = get_tile_size(); graphic->size &= ~(tile_size - 1); - + int num_tiles = 0; for (int i = 0, j = 0, d = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) { - while (j < graphic->size && tile_exists(&graphic->data[j], graphic->data, tile_size, num_tiles)) { - if ((Options.keep_whitespace && is_whitespace(&graphic->data[j], tile_size)) || is_preserved(j / tile_size - d)) { + for (; j < graphic->size && tile_exists(&graphic->data[j], graphic->data, tile_size, num_tiles); j += tile_size, d++) { + if ((options.keep_whitespace && is_whitespace(&graphic->data[j], tile_size)) || is_preserved(j / tile_size - d)) { break; } shift_preserved(j / tile_size - d); - d++; - j += tile_size; } if (j >= graphic->size) { break; @@ -196,48 +184,49 @@ void remove_duplicates(struct Graphic *graphic) { graphic->size = num_tiles * tile_size; } -bool flip_exists(uint8_t *tile, uint8_t *tiles, int tile_size, int num_tiles, bool xflip, bool yflip) { - uint8_t flip[tile_size]; - memset(flip, 0, sizeof(flip)); +// for (int i = 0; i < 256; i++) +// for (int bit = 0; bit < 8; bit++) { +// flipped[i] |= ((i >> bit) & 1) << (7 - bit); +const uint8_t flipped[256] = { + 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, + 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, + 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, + 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, + 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, + 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, + 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, + 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, + 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, + 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, + 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, + 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, + 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, + 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, + 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, + 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff +}; + +bool flip_exists(const uint8_t *tile, const uint8_t *tiles, int tile_size, int num_tiles, bool xflip, bool yflip) { + uint8_t flip[tile_size]; // VLA + memset(flip, 0, tile_size); int half_size = tile_size / 2; for (int i = 0; i < tile_size; i++) { - int byte = i; - if (yflip) { - byte = tile_size - 1 - (i ^ 1); - if (Options.interleave && i < half_size) { - byte = half_size - 1 - (i ^ 1); - } - } - if (xflip) { - for (int bit = 0; bit < 8; bit++) { - flip[byte] |= ((tile[i] >> bit) & 1) << (7 - bit); - } - } else { - flip[byte] = tile[i]; - } - } - if (tile_exists(flip, tiles, tile_size, num_tiles)) { - return true; + int j = yflip ? (options.interleave && i < half_size ? half_size : tile_size) - 1 - (i ^ 1) : i; + flip[j] = xflip ? flipped[tile[i]] : tile[i]; } - return false; + return tile_exists(flip, tiles, tile_size, num_tiles); } void remove_flip(struct Graphic *graphic, bool xflip, bool yflip) { - int tile_size = Options.depth * 8; - if (Options.interleave) tile_size *= 2; - int num_tiles = 0; - - // Make sure we have a whole number of tiles, round down if required + int tile_size = get_tile_size(); graphic->size &= ~(tile_size - 1); - + int num_tiles = 0; for (int i = 0, j = 0, d = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) { - while (j < graphic->size && flip_exists(&graphic->data[j], graphic->data, tile_size, num_tiles, xflip, yflip)) { - if ((Options.keep_whitespace && is_whitespace(&graphic->data[j], tile_size)) || is_preserved(j / tile_size - d)) { + for (; j < graphic->size && flip_exists(&graphic->data[j], graphic->data, tile_size, num_tiles, xflip, yflip); j += tile_size, d++) { + if ((options.keep_whitespace && is_whitespace(&graphic->data[j], tile_size)) || is_preserved(j / tile_size - d)) { break; } shift_preserved(j / tile_size - d); - d++; - j += tile_size; } if (j >= graphic->size) { break; @@ -251,18 +240,13 @@ void remove_flip(struct Graphic *graphic, bool xflip, bool yflip) { } void interleave(struct Graphic *graphic, int width) { - int tile_size = Options.depth * 8; + int tile_size = options.depth * 8; int width_tiles = width / 8; int num_tiles = graphic->size / tile_size; - uint8_t *interleaved = malloc(graphic->size); + uint8_t *interleaved = xmalloc(graphic->size); for (int i = 0; i < num_tiles; i++) { - int tile = i * 2; int row = i / width_tiles; - tile -= width_tiles * row; - if (row % 2) { - tile -= width_tiles; - tile += 1; - } + int tile = i * 2 - (row % 2 ? width_tiles * (row + 1) - 1 : width_tiles * row); memcpy(&interleaved[tile * tile_size], &graphic->data[i * tile_size], tile_size); } graphic->size = num_tiles * tile_size; @@ -270,76 +254,47 @@ void interleave(struct Graphic *graphic, int width) { free(interleaved); } -int png_get_width(char *filename) { - FILE *f = fopen_verbose(filename, "rb"); - if (!f) { - exit(1); - } - - const int OFFSET_WIDTH = 16; - uint8_t bytes[4]; - fseek(f, OFFSET_WIDTH, SEEK_SET); - size_t size = 4; - size_t result = fread(bytes, 1, size, f); - fclose(f); - if (result != size) { - fprintf(stderr, "Could not read file at offset 0x%x: \"%s\"\n", OFFSET_WIDTH, filename); - exit(1); - } - - int width = 0; - for (int i = 0; i < 4; i++) { - width |= bytes[i] << (8 * (3 - i)); - } - return width; -} - - int main(int argc, char *argv[]) { - get_args(argc, argv); + parse_args(argc, argv); + argc -= optind; argv += optind; - if (Options.help) { - usage(); - return 0; - } if (argc < 1) { - usage(); - exit(1); + usage_exit(1); } - char *infile = argv[0]; + struct Graphic graphic; - graphic.data = read_u8(infile, &graphic.size); - if (Options.trim_whitespace) { + graphic.data = read_u8(argv[0], &graphic.size); + + if (options.trim_whitespace) { trim_whitespace(&graphic); } - if (Options.interleave) { - if (!Options.png_file) { - error("interleave: need --png to infer dimensions"); - usage(); - exit(1); + if (options.interleave) { + if (!options.png_file) { + error_exit("--interleave needs --png to infer dimensions"); } - int width = png_get_width(Options.png_file); + int width = read_png_width(options.png_file); interleave(&graphic, width); } - if (Options.remove_duplicates) { + if (options.remove_duplicates) { remove_duplicates(&graphic); } - if (Options.remove_xflip) { + if (options.remove_xflip) { remove_flip(&graphic, true, false); } - if (Options.remove_yflip) { + if (options.remove_yflip) { remove_flip(&graphic, false, true); } - if (Options.remove_xflip && Options.remove_yflip) { + if (options.remove_xflip && options.remove_yflip) { remove_flip(&graphic, true, true); } - if (Options.remove_whitespace) { + if (options.remove_whitespace) { remove_whitespace(&graphic); } - if (Options.outfile) { - write_u8(Options.outfile, graphic.data, graphic.size); + if (options.outfile) { + write_u8(options.outfile, graphic.data, graphic.size); } + free(graphic.data); return 0; } diff --git a/tools/scan_includes.c b/tools/scan_includes.c index 63af3bcfb..e57ddc358 100644 --- a/tools/scan_includes.c +++ b/tools/scan_includes.c @@ -1,135 +1,98 @@ -#include -#include -#include -#include -#include +#define PROGRAM_NAME "scan_includes" +#define USAGE_OPTS "[-h|--help] [-s|--strict] filename.asm" -void usage(void) { - printf("Usage: scan_includes [-h] [-s] filename\n" - "-h, --help\n" - " Print usage and exit\n" - "-s, --strict\n" - " Fail if a file cannot be read\n"); -} - -struct Options { - bool help; - bool strict; -}; +#include "common.h" -struct Options Options = {0}; +void parse_args(int argc, char *argv[], bool *strict) { + struct option long_options[] = { + {"strict", no_argument, 0, 's'}, + {"help", no_argument, 0, 'h'}, + {0} + }; + for (int opt; (opt = getopt_long(argc, argv, "sh", long_options)) != -1;) { + switch (opt) { + case 's': + *strict = true; + break; + case 'h': + usage_exit(0); + break; + default: + usage_exit(1); + } + } +} -void scan_file(char* filename) { +void scan_file(const char *filename, bool strict) { + errno = 0; FILE *f = fopen(filename, "rb"); if (!f) { - if (Options.strict) { - fprintf(stderr, "Could not open file: '%s'\n", filename); - exit(1); + if (strict) { + error_exit("Could not open file \"%s\": %s\n", filename, strerror(errno)); } else { return; } } - fseek(f, 0, SEEK_END); - long size = ftell(f); - rewind(f); - - char *buffer = malloc(size + 1); - char *orig = buffer; - size = fread(buffer, 1, size, f); - buffer[size] = '\0'; + long size = xfsize(filename, f); + char *contents = xmalloc(size + 1); + xfread((uint8_t *)contents, size, filename, f); fclose(f); + contents[size] = '\0'; - for (; buffer && (buffer - orig < size); buffer++) { - bool is_include = false; - bool is_incbin = false; - switch (*buffer) { - case ';': - buffer = strchr(buffer, '\n'); - if (!buffer) { - fprintf(stderr, "%s: no newline at end of file\n", filename); - break; - } - break; - - case '"': - buffer++; - buffer = strchr(buffer, '"'); - if (!buffer) { - fprintf(stderr, "%s: unterminated string\n", filename); - break; - } - buffer++; - break; - - case 'i': - case 'I': - if ((strncmp(buffer, "INCBIN", 6) == 0) || (strncmp(buffer, "incbin", 6) == 0)) { - is_incbin = true; - } else if ((strncmp(buffer, "INCLUDE", 7) == 0) || (strncmp(buffer, "include", 7) == 0)) { - is_include = true; - } - if (is_incbin || is_include) { - buffer = strchr(buffer, '"'); - if (!buffer) { - break; - } - buffer++; - int length = strcspn(buffer, "\""); - char *include = malloc(length + 1); - strncpy(include, buffer, length); - include[length] = '\0'; - printf("%s ", include); + for (char *ptr = contents; ptr && ptr - contents < size; ptr++) { + bool is_incbin = false, is_include = false; + switch (*ptr) { + case ';': + ptr = strchr(ptr, '\n'); + if (!ptr) { + fprintf(stderr, "%s: no newline at end of file\n", filename); + } + break; + case '"': + ptr++; + ptr = strchr(ptr, '"'); + if (ptr) { + ptr++; + } else { + fprintf(stderr, "%s: unterminated string\n", filename); + } + break; + case 'I': + case 'i': + is_incbin = !strncmp(ptr, "INCBIN", 6) || !strncmp(ptr, "incbin", 6); + is_include = !strncmp(ptr, "INCLUDE", 7) || !strncmp(ptr, "include", 7); + if (is_incbin || is_include) { + ptr = strchr(ptr, '"'); + if (ptr) { + ptr++; + char *include_path = ptr; + size_t length = strcspn(ptr, "\""); + ptr += length + 1; + include_path[length] = '\0'; + printf("%s ", include_path); if (is_include) { - scan_file(include); + scan_file(include_path, strict); } - free(include); - buffer = strchr(buffer, '"'); } - break; - - } - if (!buffer) { + } break; } - } - free(orig); + free(contents); } -int main(int argc, char* argv[]) { - int i = 0; - struct option long_options[] = { - {"strict", no_argument, 0, 's'}, - {"help", no_argument, 0, 'h'}, - {0} - }; - int opt = -1; - while ((opt = getopt_long(argc, argv, "sh", long_options, &i)) != -1) { - switch (opt) { - case 's': - Options.strict = true; - break; - case 'h': - Options.help = true; - break; - default: - usage(); - exit(1); - break; - } - } +int main(int argc, char *argv[]) { + bool strict = false; + parse_args(argc, argv, &strict); + argc -= optind; argv += optind; - if (Options.help) { - usage(); - return 0; - } if (argc < 1) { - usage(); - exit(1); + usage_exit(1); } - scan_file(argv[0]); + + scan_file(argv[0], strict); return 0; } From e17557706a0ad7653264d3dc4b25a74744f4ab26 Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 15 Mar 2022 17:29:07 -0400 Subject: [PATCH 04/45] Use -flto for all tools --- tools/Makefile | 2 +- tools/common.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index 32f764a19..64d6fe8a7 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,7 +1,7 @@ .PHONY: all clean CC := gcc -CFLAGS := -O3 -std=c11 -Wall -Wextra -pedantic -Wno-missing-field-initializers +CFLAGS := -O3 -flto -std=c11 -Wall -Wextra -pedantic -Wno-missing-field-initializers tools := \ gfx \ diff --git a/tools/common.h b/tools/common.h index a8b694459..38b7cc6d0 100644 --- a/tools/common.h +++ b/tools/common.h @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include #include #include From 570d83b73c770547e15a9c63d35588b09cc23f1f Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 15 Mar 2022 17:35:30 -0400 Subject: [PATCH 05/45] Use noreturn for usage_exit --- tools/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/common.h b/tools/common.h index 38b7cc6d0..f04e917b2 100644 --- a/tools/common.h +++ b/tools/common.h @@ -21,7 +21,7 @@ #define error_exit(...) exit((fprintf(stderr, PROGRAM_NAME ": " __VA_ARGS__), 1)) -void usage_exit(int status) { +noreturn void usage_exit(int status) { fprintf(stderr, "Usage: " PROGRAM_NAME " " USAGE_OPTS "\n"); exit(status); } From 07df4a5f88aa5b9927a0f8a7c317afa57a313ab9 Mon Sep 17 00:00:00 2001 From: Rangi Date: Thu, 17 Mar 2022 20:36:13 -0400 Subject: [PATCH 06/45] Refactor pkmncompress.c to use common.h Fixes #349 --- tools/Makefile | 2 +- tools/pkmncompress.c | 516 +++++++++++++------------------------------ 2 files changed, 150 insertions(+), 368 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 64d6fe8a7..f30f8ef7b 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,7 +1,7 @@ .PHONY: all clean CC := gcc -CFLAGS := -O3 -flto -std=c11 -Wall -Wextra -pedantic -Wno-missing-field-initializers +CFLAGS := -O3 -flto -std=c11 -Wall -Wextra -pedantic tools := \ gfx \ diff --git a/tools/pkmncompress.c b/tools/pkmncompress.c index db707653b..f8899b1e7 100644 --- a/tools/pkmncompress.c +++ b/tools/pkmncompress.c @@ -14,79 +14,46 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include -#include -#include -#include +#define PROGRAM_NAME "pkmncompress" +#define USAGE_OPTS "infile.2bpp outfile.pic" -typedef uint8_t u8; +#include "common.h" -u8 *compressed = NULL; -int xrows = 0; -int xwidth = 0; -int curbit = 0; -int curbyte = 0; +uint8_t compressed[15 * 15 * 0x10]; +int cur_bit; +int cur_byte; -void writebit(int bit) -{ - if (++curbit == 8) - { - curbyte++; - curbit = 0; +void write_bit(int bit) { + if (++cur_bit == 8) { + cur_byte++; + cur_bit = 0; } - compressed[curbyte] |= bit << (7 - curbit); + compressed[cur_byte] |= bit << (7 - cur_bit); } -void method_1(u8 *RAM) -{ - int i; - int j; - int nibble_1; - int nibble_2 = 0; - int code_1; - int code_2; - int table; - static int method_1[2][0x10] = { +void compress_plane(uint8_t *plane, int width) { + static int nybble_lookup[2][0x10] = { {0x0, 0x1, 0x3, 0x2, 0x6, 0x7, 0x5, 0x4, 0xC, 0xD, 0xF, 0xE, 0xA, 0xB, 0x9, 0x8}, - {0x8, 0x9, 0xB, 0xA, 0xE, 0xF, 0xD, 0xC, 0x4, 0x5, 0x7, 0x6, 0x2, 0x3, 0x1, 0x0} + {0x8, 0x9, 0xB, 0xA, 0xE, 0xF, 0xD, 0xC, 0x4, 0x5, 0x7, 0x6, 0x2, 0x3, 0x1, 0x0}, }; - - for (i = 0; i < xrows * xwidth * 8; i++) - { - j = i / xrows; - j += i % xrows * xwidth * 8; - if (!(i % xrows)) - { - nibble_2 = 0; - } - nibble_1 = (RAM[j] >> 4) & 0x0F; - table = 0; - if (nibble_2 & 1) - { - table = 1; + int ram_size = width * width * 8; + for (int i = 0, nybble_lo = 0; i < ram_size; i++) { + int m = i % width; + if (!m) { + nybble_lo = 0; } - code_1 = method_1[table][nibble_1]; - nibble_2 = RAM[j] & 0x0F; - table = 0; - if (nibble_1 & 1) - { - table = 1; - } - code_2 = method_1[table][nibble_2]; - RAM[j] = (code_1 << 4) | code_2; + int j = i / width + m * width * 8; + int nybble_hi = (plane[j] >> 4) & 0xF; + int code_1 = nybble_lookup[nybble_lo & 1][nybble_hi]; + nybble_lo = plane[j] & 0xF; + int code_2 = nybble_lookup[nybble_hi & 1][nybble_lo]; + plane[j] = (code_1 << 4) | code_2; } } -// "Get the previous power of 2. Deriving the bitcount from that seems to be faster on average than using the lookup table." -void RLE(int nums) -{ - int v; - int j; - int bitcount; - int number; - - bitcount = -1; - v = ++nums; +void rle_encode_number(int n) { + int bit_count = -1; + int v = ++n; v++; v |= v >> 1; v |= v >> 2; @@ -95,357 +62,172 @@ void RLE(int nums) v |= v >> 16; v -= v >> 1; v--; - - number = nums - v; - while(v) { + int number = n - v; + while (v) { v >>= 1; - bitcount++; - } - for(j = 0; j < bitcount; j++) { - writebit(1); - } - writebit(0); - for(j = bitcount; j >= 0; j--) { - writebit((number >> j) & 1); - } -} - -void RLE_old(int nums) -{ - int search; - int i; - int j; - int bitcount; - int number; - static int RLE[0x10] = {0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF}; - - bitcount = -1; - search = ++nums; - while (search > 0) - { - for (i = 0; i < 0xF; i++) - { - if (RLE[i] == search) - { - bitcount = i; - break; - } - } - if (bitcount != -1) - { - break; - } - search--; + bit_count++; } - number = nums - RLE[bitcount]; - for (j = 0; j < bitcount; j++) - { - writebit(1); + for (int j = 0; j < bit_count; j++) { + write_bit(1); } - writebit(0); - for (j = bitcount; j >= 0; j--) - { - writebit((number >> j) & 1); + write_bit(0); + for (int j = bit_count; j >= 0; j--) { + write_bit((number >> j) & 1); } } -void data_packet(u8 *bitgroups, int bgi) -{ - int i; - for (i = 0; i < bgi; i++) - { - writebit((bitgroups[i] >> 1) & 1); - writebit(bitgroups[i] & 1); +void write_data_packet(uint8_t *bit_groups, int n) { + for (int i = 0; i < n; i++) { + write_bit((bit_groups[i] >> 1) & 1); + write_bit(bit_groups[i] & 1); } } -int interpret_compress(u8 *RAM_1, u8 *RAM_2, int interpretation, int switchram) -{ - u8 *_1_RAM; - u8 *_2_RAM; - int i; - int ram; - int type; - int nums; - u8 *bitgroups; - int x; - int y; - int byte; - int bit; - int bitgroup; - int bgi = 0; - - int ram_size = xrows * xwidth * 8; - _1_RAM = (u8 *)calloc(ram_size, 1); - _2_RAM = (u8 *)calloc(ram_size, 1); - if (switchram) - { - memcpy(_1_RAM, RAM_2, ram_size); - memcpy(_2_RAM, RAM_1, ram_size); - } - else - { - memcpy(_1_RAM, RAM_1, ram_size); - memcpy(_2_RAM, RAM_2, ram_size); - } - - switch(interpretation) - { - case 1: - method_1(_1_RAM); - method_1(_2_RAM); - break; - case 2: - case 3: - for (i = 0; i < xrows * xwidth * 8; i++) - { - _2_RAM[i] ^= _1_RAM[i]; - } - method_1(_1_RAM); - break; - } - if (interpretation == 3) - { - method_1(_2_RAM); +int interpret_compress(uint8_t *plane1, uint8_t *plane2, int mode, int order, int width) { + int ram_size = width * width * 8; + uint8_t *_plane1 = xmalloc(ram_size); + uint8_t *_plane2 = xmalloc(ram_size); + if (order) { + memcpy(_plane1, plane2, ram_size); + memcpy(_plane2, plane1, ram_size); + } else { + memcpy(_plane1, plane1, ram_size); + memcpy(_plane2, plane2, ram_size); + } + if (mode != 1) { + for (int i = 0; i < ram_size; i++) { + _plane2[i] ^= _plane1[i]; + } } - - curbit = 7; - curbyte = 0; - compressed = (u8 *)calloc(0x310, 1); - compressed[0] = (xrows << 4) | xwidth; - writebit(switchram); - - for (ram = 0; ram < 2; ram++) - { - type = 0; - nums = 0; - bitgroups = (u8 *)calloc(0x1000, 1); - - for (x = 0; x < xwidth; x++) - { - for (bit = 0; bit < 8; bit += 2) - { - byte = x * xrows * 8; - for (y=0; y < xrows * 8; y++) - { - if (ram) - { - bitgroup = (_2_RAM[byte] >> (6 - bit)) & 3; - } - else - { - bitgroup = (_1_RAM[byte] >> (6 - bit)) & 3; - } - if (!bitgroup) - { - if (!type) - { - writebit(0); - } - else if (type == 1) - { + compress_plane(_plane1, width); + if (mode != 2) { + compress_plane(_plane2, width); + } + cur_bit = 7; + cur_byte = 0; + memset(compressed, 0, sizeof(compressed) / sizeof(*compressed)); + compressed[0] = (width << 4) | width; + write_bit(order); + uint8_t bit_groups[0x1000] = {0}; + int index = 0; + for (int plane = 0; plane < 2; plane++) { + int type = 0; + int nums = 0; + memset(bit_groups, 0, sizeof(bit_groups) / sizeof(*bit_groups)); + for (int x = 0; x < width; x++) { + for (int bit = 0; bit < 8; bit += 2) { + for (int y = 0, byte = x * width * 8; y < width * 8; y++, byte++) { + int bit_group = ((plane ? _plane2 : _plane1)[byte] >> (6 - bit)) & 3; + if (!bit_group) { + if (!type) { + write_bit(0); + } else if (type == 1) { nums++; - } - else - { - data_packet(bitgroups, bgi); - writebit(0); - writebit(0); + } else { + write_data_packet(bit_groups, index); + write_bit(0); + write_bit(0); } type = 1; - free(bitgroups); - bitgroups = (u8 *)calloc(0x1000, 1); - bgi = 0; - } - else - { - if (!type) - { - writebit(1); - } - else if (type == 1) - { - RLE(nums); + memset(bit_groups, 0, sizeof(bit_groups) / sizeof(*bit_groups)); + index = 0; + } else { + if (!type) { + write_bit(1); + } else if (type == 1) { + rle_encode_number(nums); } - type = -1; - bitgroups[bgi++] = bitgroup; + type = 2; + bit_groups[index++] = bit_group; nums = 0; } - byte++; } } } - if (type == 1) - { - RLE(nums); + if (type == 1) { + rle_encode_number(nums); + } else { + write_data_packet(bit_groups, index); } - else - { - data_packet(bitgroups, bgi); - } - if (!ram) - { - if (interpretation < 2) - { - writebit(0); - } - else - { - writebit(1); - writebit(interpretation - 2); + if (!plane) { + if (mode < 2) { + write_bit(0); + } else { + write_bit(1); + write_bit(mode - 2); } } } - free(bitgroups); - free(_1_RAM); - free(_2_RAM); - return (curbyte + 1) * 8 + curbit; + free(_plane1); + free(_plane2); + return (cur_byte + 1) * 8 + cur_bit; } -int compress(u8 *data, int width, int height) -{ - u8 *RAM_1; - u8 *RAM_2; - int i; - int mode; - int order; - int newsize; - int compressedsize; - int size = -1; - u8 *current = NULL; - int ram_size; - - xrows = height; - xwidth = width; - - ram_size = xrows * xwidth * 8; - - RAM_1 = (u8 *)calloc(ram_size, 1); - RAM_2 = (u8 *)calloc(ram_size, 1); - - for (i = 0; i < xrows * xwidth * 8; i++) - { - RAM_1[i] = data[(i << 1)]; - RAM_2[i] = data[(i << 1) | 1]; - } - - for (mode = 1; mode < 4; mode++) - { - for (order = 0; order < 2; order++) - { - if (!(mode == 1 && order == 0)) - { - newsize = interpret_compress(RAM_1, RAM_2, mode, order); - if (size == -1 || newsize < size) - { - if (current != NULL) - { - free(current); - } - current = (u8 *)calloc(0x310, 1); - memcpy(current, compressed, newsize / 8); - free(compressed); - size = newsize; - } +int compress(uint8_t *data, int width) { + int ram_size = width * width * 8; + uint8_t *plane1 = xmalloc(ram_size); + uint8_t *plane2 = xmalloc(ram_size); + for (int i = 0; i < ram_size; i++) { + plane1[i] = data[i * 2]; + plane2[i] = data[i * 2 + 1]; + } + uint8_t current[sizeof(compressed) / sizeof(*compressed)] = {0}; + int compressed_size = -1; + for (int mode = 1; mode < 4; mode++) { + for (int order = 0; order < 2; order++) { + if (mode == 1 && order == 0) { + continue; + } + int new_size = interpret_compress(plane1, plane2, mode, order, width); + if (compressed_size == -1 || new_size < compressed_size) { + compressed_size = new_size; + memset(current, 0, sizeof(current) / sizeof(*current)); + memcpy(current, compressed, compressed_size / 8); } } } - compressed = (u8 *)calloc(0x310, 1); - compressedsize = size / 8; - memcpy(compressed, current, compressedsize); - free(current); - - free(RAM_1); - free(RAM_2); - - return compressedsize; + memset(compressed, 0, sizeof(compressed) / sizeof(*compressed)); + memcpy(compressed, current, compressed_size / 8); + free(plane1); + free(plane2); + return compressed_size / 8; } -uint8_t *transpose_tiles(uint8_t *data, int width, int height) -{ - int i; - int j; - int tile_size = 0x10; - - int size = width * height * tile_size; - u8 *transposed = calloc(size, 1); - for (i = 0; i < size; i++) - { - j = (i / 0x10) * width * 0x10; +uint8_t *transpose_tiles(uint8_t *data, int width) { + int size = width * width * 0x10; + uint8_t *transposed = xmalloc(size); + for (int i = 0; i < size; i++) { + int j = (i / 0x10) * width * 0x10; j = (j % size) + 0x10 * (j / size) + (i % 0x10); transposed[j] = data[i]; } - free(data); - return transposed; } -int main(int argc, char *argv[]) -{ - int width = 0; - int height = 0; - int transpose = 1; - - if (argc != 3) - { - fputs("Usage: pkmncompress infile.2bpp outfile.pic\n", stderr); - return EXIT_FAILURE; +int main(int argc, char *argv[]) { + if (argc != 3) { + usage_exit(1); } - char *infile = argv[1]; - char *outfile = argv[2]; - - FILE *f = fopen(infile, "rb"); - if (!f) { - fprintf(stderr, "failed to open for reading: '%s'\n", infile); - return EXIT_FAILURE; - } - fseek(f, 0, SEEK_END); - int filesize = ftell(f); + long filesize; + uint8_t *data = read_u8(argv[1], &filesize); - for (int i = 0; i < 32; i++) { - width = i; - height = i; - if (width * height * 16 >= filesize) { + int width = 0; + for (int w = 1; w < 16; w++) { + if (filesize == w * w * 0x10) { + width = w; break; } } - if (width * height * 16 < filesize) { - fprintf(stderr, "file too big: '%s' (%x)\n", infile, filesize); - return EXIT_FAILURE; - } - if (width * height * 16 > filesize) { - fprintf(stderr, "wrong filesize for '%s' (%x). must be a square image of 16-byte tiles\n", infile, filesize); - return EXIT_FAILURE; + if (!width) { + error_exit("Image is not a square, or is larger than 15x15 tiles"); } - u8 *data = (u8 *)calloc(filesize, 1); - fseek(f, 0, SEEK_SET); - int size = fread(data, 1, filesize, f); - fclose(f); - if (size != filesize) { - fprintf(stderr, "failed to read: '%s'\n", infile); - return EXIT_FAILURE; - } - - if (transpose) { - data = transpose_tiles(data, width, height); - } - - int compressed_size = compress(data, width, height); + data = transpose_tiles(data, width); + int compressed_size = compress(data, width); + write_u8(argv[2], compressed, compressed_size); free(data); - - f = fopen(outfile, "wb"); - if (!f) { - fprintf(stderr, "failed to open for writing: '%s'\n", outfile); - return EXIT_FAILURE; - } - fwrite(compressed, 1, compressed_size, f); - fclose(f); - - free(compressed); - - return EXIT_SUCCESS; + return 0; } From fe8d3c51a4056f0dd61dbef332ad9e714b82089a Mon Sep 17 00:00:00 2001 From: vulcandth Date: Sat, 26 Mar 2022 15:59:36 -0500 Subject: [PATCH 07/45] Build the Virtual Console patches with `make red_vc` and `make blue_vc` (#351) --- .gitattributes | 3 + .gitignore | 1 + Makefile | 68 ++++- README.md | 2 + data/text/text_4.asm | 10 + engine/battle/animations.asm | 29 ++ engine/battle/core.asm | 25 ++ engine/gfx/palettes.asm | 1 + engine/link/cable_club.asm | 4 + engine/link/cable_club_npc.asm | 4 + engine/menus/main_menu.asm | 2 + engine/menus/save.asm | 43 +-- home/serial.asm | 14 + macros.asm | 1 + macros/vc.asm | 39 +++ roms.sha1 | 2 + sram.asm | 2 + tools/.gitignore | 3 +- tools/Makefile | 1 + tools/make_patch.c | 469 ++++++++++++++++++++++++++++++++ vc/pokeblue.constants.asm | 71 +++++ vc/pokeblue.patch.template | 436 +++++++++++++++++++++++++++++ vc/pokered.constants.asm | 74 +++++ vc/pokered.patch.template | 482 +++++++++++++++++++++++++++++++++ 24 files changed, 1752 insertions(+), 34 deletions(-) create mode 100644 macros/vc.asm create mode 100644 tools/make_patch.c create mode 100644 vc/pokeblue.constants.asm create mode 100644 vc/pokeblue.patch.template create mode 100644 vc/pokered.constants.asm create mode 100644 vc/pokered.patch.template diff --git a/.gitattributes b/.gitattributes index 48b1085c8..e22e2bbbb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -15,3 +15,6 @@ *.wav binary *.blk binary *.pic binary + +# Declare files that will always have CRLF line endings on checkout. +*.patch.template text eol=crlf linguist-language=INI diff --git a/.gitignore b/.gitignore index 8643ec148..53f351430 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ # compiled roms *.gbc *.gb +*.patch # rgbds extras *.map diff --git a/Makefile b/Makefile index 08abfa12d..3a23f759b 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,27 @@ -roms := pokered.gbc pokeblue.gbc pokeblue_debug.gbc +roms := \ + pokered.gbc \ + pokeblue.gbc \ + pokeblue_debug.gbc +patches := \ + pokered.patch \ + pokeblue.patch rom_obj := \ -audio.o \ -home.o \ -main.o \ -maps.o \ -text.o \ -wram.o \ -gfx/pics.o \ -gfx/sprites.o \ -gfx/tilesets.o + audio.o \ + home.o \ + main.o \ + maps.o \ + text.o \ + wram.o \ + gfx/pics.o \ + gfx/sprites.o \ + gfx/tilesets.o pokered_obj := $(rom_obj:.o=_red.o) pokeblue_obj := $(rom_obj:.o=_blue.o) pokeblue_debug_obj := $(rom_obj:.o=_blue_debug.o) +pokered_vc_obj := $(rom_obj:.o=_red_vc.o) +pokeblue_vc_obj := $(rom_obj:.o=_blue_vc.o) ### Build tools @@ -43,15 +51,34 @@ all: $(roms) red: pokered.gbc blue: pokeblue.gbc blue_debug: pokeblue_debug.gbc +red_vc: pokered.patch +blue_vc: pokeblue.patch clean: tidy - find gfx \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -delete + find gfx \ + \( -iname '*.1bpp' \ + -o -iname '*.2bpp' \ + -o -iname '*.pic' \) \ + -delete tidy: - $(RM) $(roms) $(pokered_obj) $(pokeblue_obj) $(pokeblue_debug_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o + $(RM) $(roms) \ + $(roms:.gbc=.sym) \ + $(roms:.gbc=.map) \ + $(patches) \ + $(patches:.patch=_vc.gbc) \ + $(patches:.patch=_vc.sym) \ + $(patches:.patch=_vc.map) \ + $(patches:%.patch=vc/%.constants.sym) \ + $(pokered_obj) \ + $(pokeblue_obj) \ + $(pokered_vc_obj) \ + $(pokeblue_vc_obj) \ + $(pokeblue_debug_obj) \ + rgbdscheck.o $(MAKE) clean -C tools/ -compare: $(roms) +compare: $(roms) $(patches) @$(SHA1) -c roms.sha1 tools: @@ -67,6 +94,11 @@ endif $(pokered_obj): RGBASMFLAGS += -D _RED $(pokeblue_obj): RGBASMFLAGS += -D _BLUE $(pokeblue_debug_obj): RGBASMFLAGS += -D _BLUE -D _DEBUG +$(pokered_vc_obj): RGBASMFLAGS += -D _RED -D _RED_VC +$(pokeblue_vc_obj): RGBASMFLAGS += -D _BLUE -D _BLUE_VC + +%.patch: vc/%.constants.sym %_vc.gbc %.gbc vc/%.patch.template + tools/make_patch $*_vc.sym $^ $@ rgbdscheck.o: rgbdscheck.asm $(RGBASM) -o $@ $< @@ -89,6 +121,12 @@ $(info $(shell $(MAKE) -C tools)) $(foreach obj, $(pokered_obj), $(eval $(call DEP,$(obj),$(obj:_red.o=.asm)))) $(foreach obj, $(pokeblue_obj), $(eval $(call DEP,$(obj),$(obj:_blue.o=.asm)))) $(foreach obj, $(pokeblue_debug_obj), $(eval $(call DEP,$(obj),$(obj:_blue_debug.o=.asm)))) +$(foreach obj, $(pokered_vc_obj), $(eval $(call DEP,$(obj),$(obj:_red_vc.o=.asm)))) +$(foreach obj, $(pokeblue_vc_obj), $(eval $(call DEP,$(obj),$(obj:_blue_vc.o=.asm)))) + +# Dependencies for VC files that need to run scan_includes +%.constants.sym: %.constants.asm $(shell tools/scan_includes %.constants.asm) | rgbdscheck.o + $(RGBASM) $< > $@ endif @@ -98,11 +136,15 @@ endif pokered_pad = 0x00 pokeblue_pad = 0x00 +pokered_vc_pad = 0x00 +pokeblue_vc_pad = 0x00 pokeblue_debug_pad = 0xff pokered_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON RED" pokeblue_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE" pokeblue_debug_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE" +pokered_vc_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON RED" +pokeblue_vc_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE" %.gbc: $$(%_obj) layout.link $(RGBLINK) -p $($*_pad) -d -m $*.map -n $*.sym -l layout.link -o $@ $(filter %.o,$^) diff --git a/README.md b/README.md index bfffd4e90..950b8b993 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ It builds the following ROMs: - Pokemon Red (UE) [S][!].gb `sha1: ea9bcae617fdf159b045185467ae58b2e4a48b9a` - Pokemon Blue (UE) [S][!].gb `sha1: d7037c83e1ae5b39bde3c30787637ba1d4c48ce2` - BLUEMONS.GB (debug build) `sha1: 5b1456177671b79b263c614ea0e7cc9ac542e9c4` +- dmgapae0.e69.patch `sha1: 0fb5f743696adfe1dbb2e062111f08f9bc5a293a` +- dmgapee0.e68.patch `sha1: ed4be94dc29c64271942c87f2157bca9ca1019c7` To set up the repository, see [**INSTALL.md**](INSTALL.md). diff --git a/data/text/text_4.asm b/data/text/text_4.asm index 6a472dc24..60ec7abea 100644 --- a/data/text/text_4.asm +++ b/data/text/text_4.asm @@ -211,9 +211,19 @@ _CableClubNPCPleaseWaitText:: text_end _CableClubNPCLinkClosedBecauseOfInactivityText:: + vc_patch Change_MSG +IF DEF(_RED_VC) || DEF(_BLUE_VC) + text "Please come again!" + done + text_start + text "sed because of" + cont "inactivity." +ELSE text "The link has been" line "closed because of" cont "inactivity." +ENDC + vc_patch_end para "Please contact" line "your friend and" diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index 8f113adc0..f1dd3d4ee 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -176,8 +176,12 @@ PlayAnimation: ld h, [hl] ld l, a .animationLoop + vc_hook FPA_Thunderbolt_End ld a, [hli] + vc_hook_red FPA_007_End + vc_hook_blue FPA_009_End cp -1 + vc_hook_blue FPA_008_End jr z, .AnimationOver cp FIRST_SE_ID ; is this subanimation or a special effect? jr c, .playSubanimation @@ -246,37 +250,55 @@ PlayAnimation: ld a, [wAnimPalette] ldh [rOBP0], a call LoadAnimationTileset + vc_hook FPA_001_Begin call LoadSubanimation call PlaySubanimation + vc_hook FPA_001_End pop af + vc_hook_red FPA_008_End ldh [rOBP0], a .nextAnimationCommand + vc_hook FPA_005_End pop hl + vc_hook FPA_002_End jr .animationLoop .AnimationOver ret LoadSubanimation: + vc_hook FPA_002_Begin ld a, [wSubAnimAddrPtr + 1] + vc_hook FPA_003_Begin ld h, a + vc_hook_red FPA_131_Begin ld a, [wSubAnimAddrPtr] + vc_hook_red FPA_56_Begin ld l, a ld a, [hli] ld e, a + vc_hook FPA_76_Begin ld a, [hl] + vc_hook FPA_Thunderbolt_Begin ld d, a ; de = address of subanimation ld a, [de] + vc_hook_blue FPA_012_Begin ld b, a + vc_hook FPA_Spore_Begin and %00011111 + vc_hook FPA_Bubblebeam_Begin ld [wSubAnimCounter], a ; number of frame blocks + vc_hook_red FPA_010_Begin + vc_hook_blue FPA_009_Begin ld a, b and %11100000 cp SUBANIMTYPE_ENEMY << 5 + vc_hook_blue FPA_004_Begin jr nz, .isNotType5 .isType5 call GetSubanimationTransform2 jr .saveTransformation .isNotType5 + vc_hook FPA_Hyper_Beam_Begin call GetSubanimationTransform1 .saveTransformation ; place the upper 3 bits of a into bits 0-2 of a before storing @@ -307,6 +329,7 @@ LoadSubanimation: ; sets the transform to SUBANIMTYPE_NORMAL if it's the player's turn ; sets the transform to the subanimation type if it's the enemy's turn GetSubanimationTransform1: + vc_hook FPA_Reflect_Begin ld b, a ldh a, [hWhoseTurn] and a @@ -399,11 +422,15 @@ MoveAnimation: jr nz, .animationsDisabled call ShareMoveAnimations call PlayAnimation + vc_hook_red FPA_004_End + vc_hook_blue FPA_011_End jr .next4 .animationsDisabled ld c, 30 call DelayFrames .next4 + vc_hook_red FPA_010_End + vc_hook_blue FPA_012_End call PlayApplyingAttackAnimation ; shake the screen or flash the pic in and out (to show damage) .animationFinished call WaitForSoundToFinish @@ -541,6 +568,7 @@ SetAnimationPalette: .notSGB ld a, $e4 ld [wAnimPalette], a + vc_hook FPA_Dream_Eater_Begin ldh [rOBP0], a ld a, $6c ldh [rOBP1], a @@ -956,6 +984,7 @@ AnimationFlashScreenLong: ld [wFlashScreenLongCounter], a pop hl jr nz, .loop + vc_hook_red FPA_phy_End ret ; BG palettes diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 4a166f7e1..e77117072 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -3023,6 +3023,7 @@ LinkBattleExchangeData: ld a, b .doExchange ld [wSerialExchangeNybbleSendData], a + vc_hook send_byt2 callfar PrintWaitingText .syncLoop1 call Serial_ExchangeNybble @@ -3030,18 +3031,33 @@ LinkBattleExchangeData: ld a, [wSerialExchangeNybbleReceiveData] inc a jr z, .syncLoop1 + vc_hook send_byt2_ret + vc_patch FIGHT +IF DEF(_RED_VC) || DEF(_BLUE_VC) + ld b, 26 +ELSE ld b, 10 +ENDC + vc_patch_end .syncLoop2 call DelayFrame call Serial_ExchangeNybble dec b jr nz, .syncLoop2 + vc_hook send_dummy + vc_patch FIGHT2 +IF DEF(_RED_VC) || DEF(_BLUE_VC) + ld b, 26 +ELSE ld b, 10 +ENDC + vc_patch_end .syncLoop3 call DelayFrame call Serial_SendZeroByte dec b jr nz, .syncLoop3 + vc_hook send_dummy_end ret ExecutePlayerMove: @@ -6661,7 +6677,14 @@ BattleRandom: ld a, [hl] pop bc pop hl + vc_hook fight_ret_c + vc_patch fight_ret +IF DEF(_RED_VC) || DEF(_BLUE_VC) + ret +ELSE ret c +ENDC + vc_patch_end ; if we picked the last seed, we need to recalculate the nine seeds push hl @@ -6726,7 +6749,9 @@ HandleExplodingAnimation: PlayMoveAnimation: ld [wAnimationID], a + vc_hook_red FPA_conf_Begin call Delay3 + vc_hook_red FPA_phy_Begin predef_jump MoveAnimation InitBattle:: diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm index a43c66bae..d26d82a63 100644 --- a/engine/gfx/palettes.asm +++ b/engine/gfx/palettes.asm @@ -484,6 +484,7 @@ CheckSGB: ldh a, [rJOYP] ldh a, [rJOYP] call Wait7000 + vc_hook Network_RESET call Wait7000 ld a, $30 ldh [rJOYP], a diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index cabc19aba..296900a6f 100644 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -124,18 +124,21 @@ CableClub_DoBattleOrTradeAgain: ld hl, wSerialRandomNumberListBlock ld de, wSerialOtherGameboyRandomNumberListBlock ld bc, $11 + vc_hook Network17 call Serial_ExchangeBytes ld a, SERIAL_NO_DATA_BYTE ld [de], a ld hl, wSerialPlayerDataBlock ld de, wSerialEnemyDataBlock ld bc, $1a8 + vc_hook Network424 call Serial_ExchangeBytes ld a, SERIAL_NO_DATA_BYTE ld [de], a ld hl, wSerialPartyMonsPatchList ld de, wSerialEnemyMonsPatchList ld bc, $c8 + vc_hook Network200 call Serial_ExchangeBytes ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) ldh [rIE], a @@ -859,6 +862,7 @@ TradeCenter_Trade: ld de, TradeCompleted call PlaceString predef SaveSAVtoSRAM2 + vc_hook save_game_end ld c, 50 call DelayFrames xor a diff --git a/engine/link/cable_club_npc.asm b/engine/link/cable_club_npc.asm index 594adf08a..e2a9bc884 100644 --- a/engine/link/cable_club_npc.asm +++ b/engine/link/cable_club_npc.asm @@ -27,6 +27,7 @@ CableClubNPC:: xor a ldh [hSerialReceiveData], a ld a, START_TRANSFER_EXTERNAL_CLOCK + vc_hook linkCable_fake_begin ldh [rSC], a ld a, [wLinkTimeoutCounter] dec a @@ -54,6 +55,7 @@ CableClubNPC:: ld a, [wCurrentMenuItem] and a jr nz, .choseNo + vc_hook linkCable_block_input callfar SaveSAVtoSRAM call WaitForSoundToFinish ld a, SFX_SAVE @@ -66,8 +68,10 @@ CableClubNPC:: xor a ld [hl], a ldh [hSerialReceivedNewData], a + vc_hook linkCable_fake_end ld [wSerialExchangeNybbleSendData], a call Serial_SyncAndExchangeNybble + vc_hook Network_RECHECK ld hl, wUnknownSerialCounter ld a, [hli] inc a diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index 7e4cc9bef..0708c0cea 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -284,9 +284,11 @@ LinkMenu: .choseCancel xor a ld [wMenuJoypadPollCount], a + vc_hook Network_STOP call Delay3 call CloseLinkConnection ld hl, LinkCanceledText + vc_hook Network_END call PrintText ld hl, wd72e res 6, [hl] diff --git a/engine/menus/save.asm b/engine/menus/save.asm index 83a5ca9b0..fdf69765b 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -37,20 +37,23 @@ LoadSAV0: ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a - ld hl, sPlayerName ; hero name located in SRAM - ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV +; This vc_hook does not have to be in any particular location. +; It is defined here because it refers to the same labels as the two lines below. + vc_hook SaveLimit + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld c, a - ld a, [sMainDataCheckSum] ; SAV's checksum + ld a, [sMainDataCheckSum] cp c jp z, .checkSumsMatched ; If the computed checksum didn't match the saved on, try again. - ld hl, sPlayerName - ld bc, sMainDataCheckSum - sPlayerName + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld c, a - ld a, [sMainDataCheckSum] ; SAV's checksum + ld a, [sMainDataCheckSum] cp c jp nz, SAVBadCheckSum @@ -84,11 +87,11 @@ LoadSAV1: ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a - ld hl, sPlayerName ; hero name located in SRAM - ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld c, a - ld a, [sMainDataCheckSum] ; SAV's checksum + ld a, [sMainDataCheckSum] cp c jr nz, SAVBadCheckSum ld hl, sCurBoxData @@ -104,11 +107,11 @@ LoadSAV2: ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a - ld hl, sPlayerName ; hero name located in SRAM - ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld c, a - ld a, [sMainDataCheckSum] ; SAV's checksum + ld a, [sMainDataCheckSum] cp c jp nz, SAVBadCheckSum ld hl, sPartyData @@ -219,8 +222,8 @@ SaveSAVtoSRAM0: call CopyData ldh a, [hTileAnimations] ld [sTileAnimations], a - ld hl, sPlayerName - ld bc, sMainDataCheckSum - sPlayerName + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld [sMainDataCheckSum], a xor a @@ -239,8 +242,8 @@ SaveSAVtoSRAM1: ld de, sCurBoxData ld bc, wBoxDataEnd - wBoxDataStart call CopyData - ld hl, sPlayerName - ld bc, sMainDataCheckSum - sPlayerName + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld [sMainDataCheckSum], a xor a @@ -262,8 +265,8 @@ SaveSAVtoSRAM2: ld de, sMainData ld bc, wPokedexSeenEnd - wPokedexOwned call CopyData - ld hl, sPlayerName - ld bc, sMainDataCheckSum - sPlayerName + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld [sMainDataCheckSum], a xor a @@ -612,8 +615,8 @@ SAVCheckRandomID: ld a, [sPlayerName] and a jr z, .next - ld hl, sPlayerName - ld bc, sMainDataCheckSum - sPlayerName + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld c, a ld a, [sMainDataCheckSum] diff --git a/home/serial.asm b/home/serial.asm index bd984d4f5..7fb6b82c8 100644 --- a/home/serial.asm +++ b/home/serial.asm @@ -230,6 +230,7 @@ Serial_PrintWaitingTextAndSyncAndExchangeNybble:: jp LoadScreenTilesFromBuffer1 Serial_SyncAndExchangeNybble:: + vc_hook send_send_buf2 ld a, $ff ld [wSerialExchangeNybbleReceiveData], a .loop1 @@ -253,13 +254,25 @@ Serial_SyncAndExchangeNybble:: ld a, [wSerialExchangeNybbleReceiveData] inc a jr z, .loop1 + vc_patch Network10 +IF DEF(_RED_VC) || DEF(_BLUE_VC) + ld b, 26 +ELSE ld b, 10 +ENDC + vc_patch_end .loop2 call DelayFrame call Serial_ExchangeNybble dec b jr nz, .loop2 + vc_patch Network11 +IF DEF(_RED_VC) || DEF(_BLUE_VC) + ld b, 26 +ELSE ld b, 10 +ENDC + vc_patch_end .loop3 call DelayFrame call Serial_SendZeroByte @@ -267,6 +280,7 @@ Serial_SyncAndExchangeNybble:: jr nz, .loop3 ld a, [wSerialExchangeNybbleReceiveData] ld [wSerialSyncAndExchangeNybbleReceiveData], a + vc_hook send_send_buf2_ret ret Serial_ExchangeNybble:: diff --git a/macros.asm b/macros.asm index 4eacddaf4..466cc1adc 100644 --- a/macros.asm +++ b/macros.asm @@ -6,6 +6,7 @@ INCLUDE "macros/data.asm" INCLUDE "macros/code.asm" INCLUDE "macros/gfx.asm" INCLUDE "macros/coords.asm" +INCLUDE "macros/vc.asm" INCLUDE "macros/scripts/audio.asm" INCLUDE "macros/scripts/maps.asm" diff --git a/macros/vc.asm b/macros/vc.asm new file mode 100644 index 000000000..0d6b8db08 --- /dev/null +++ b/macros/vc.asm @@ -0,0 +1,39 @@ +vc_hook: MACRO +IF DEF(_RED_VC) || DEF(_BLUE_VC) +.VC_\1:: +ENDC +ENDM + +vc_hook_red: MACRO +IF DEF(_RED_VC) +.VC_\1:: +ENDC +ENDM + +vc_hook_blue: MACRO +IF DEF(_BLUE_VC) +.VC_\1:: +ENDC +ENDM + +vc_patch: MACRO +IF DEF(_RED_VC) || DEF(_BLUE_VC) + ASSERT !DEF(CURRENT_VC_PATCH), "Already started a vc_patch" +CURRENT_VC_PATCH EQUS "\1" +.VC_{CURRENT_VC_PATCH}:: +ENDC +ENDM + +vc_patch_end: MACRO +IF DEF(_RED_VC) || DEF(_BLUE_VC) + ASSERT DEF(CURRENT_VC_PATCH), "No vc_patch started" +.VC_{CURRENT_VC_PATCH}_End:: + PURGE CURRENT_VC_PATCH +ENDC +ENDM + +vc_assert: MACRO +IF DEF(_RED_VC) || DEF(_BLUE_VC) + ASSERT \# +ENDC +ENDM diff --git a/roms.sha1 b/roms.sha1 index 44e94aafb..65ba4d28c 100644 --- a/roms.sha1 +++ b/roms.sha1 @@ -1,3 +1,5 @@ ea9bcae617fdf159b045185467ae58b2e4a48b9a *pokered.gbc d7037c83e1ae5b39bde3c30787637ba1d4c48ce2 *pokeblue.gbc 5b1456177671b79b263c614ea0e7cc9ac542e9c4 *pokeblue_debug.gbc +0fb5f743696adfe1dbb2e062111f08f9bc5a293a *pokered.patch +ed4be94dc29c64271942c87f2157bca9ca1019c7 *pokeblue.patch diff --git a/sram.asm b/sram.asm index 776610c54..684517912 100644 --- a/sram.asm +++ b/sram.asm @@ -13,12 +13,14 @@ SECTION "Save Data", SRAM ds $598 +sGameData:: sPlayerName:: ds NAME_LENGTH sMainData:: ds wMainDataEnd - wMainDataStart sSpriteData:: ds wSpriteDataEnd - wSpriteDataStart sPartyData:: ds wPartyDataEnd - wPartyDataStart sCurBoxData:: ds wBoxDataEnd - wBoxDataStart sTileAnimations:: db +sGameDataEnd:: sMainDataCheckSum:: db diff --git a/tools/.gitignore b/tools/.gitignore index 967af1064..7955375e5 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -1,3 +1,4 @@ -scan_includes gfx +make_patch pkmncompress +scan_includes diff --git a/tools/Makefile b/tools/Makefile index f30f8ef7b..f00a04866 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -5,6 +5,7 @@ CFLAGS := -O3 -flto -std=c11 -Wall -Wextra -pedantic tools := \ gfx \ + make_patch \ pkmncompress \ scan_includes diff --git a/tools/make_patch.c b/tools/make_patch.c new file mode 100644 index 000000000..29d798f61 --- /dev/null +++ b/tools/make_patch.c @@ -0,0 +1,469 @@ +#define PROGRAM_NAME "make_patch" +#define USAGE_OPTS "labels.sym constants.sym patched.gbc original.gbc vc.patch.template vc.patch" + +#include "common.h" + +#include + +struct Buffer { + size_t item_size; + size_t size; + size_t capacity; + void *data; +}; + +struct Symbol { + struct Symbol *next; + unsigned int address; + unsigned int offset; + char name[]; // C99 FAM +}; + +struct Patch { + unsigned int offset; + unsigned int size; +}; + +struct Buffer *buffer_create(size_t item_size) { + struct Buffer *buffer = xmalloc(sizeof(*buffer)); + buffer->item_size = item_size; + buffer->size = 0; + buffer->capacity = 0x10; + buffer->data = xmalloc(buffer->capacity * item_size); + return buffer; +} + +void buffer_append(struct Buffer *buffer, const void *item) { + if (buffer->size >= buffer->capacity) { + buffer->capacity = (buffer->capacity + 1) * 2; + buffer->data = xrealloc(buffer->data, buffer->capacity * buffer->item_size); + } + memcpy((char *)buffer->data + (buffer->size++ * buffer->item_size), item, buffer->item_size); +} + +void buffer_free(struct Buffer *buffer) { + free(buffer->data); + free(buffer); +} + +void symbol_append(struct Symbol **symbols, const char *name, int bank, int address) { + size_t name_len = strlen(name) + 1; + struct Symbol *symbol = xmalloc(sizeof(*symbol) + name_len); + symbol->address = address; + symbol->offset = address < 0x8000 + ? (bank > 0 ? address + (bank - 1) * 0x4000 : address) // ROM addresses are relative to their bank + : address - 0x8000; // RAM addresses are relative to the start of all RAM + memcpy(symbol->name, name, name_len); + symbol->next = *symbols; + *symbols = symbol; +} + +void symbol_free(struct Symbol *symbols) { + for (struct Symbol *next; symbols; symbols = next) { + next = symbols->next; + free(symbols); + } +} + +const struct Symbol *symbol_find(const struct Symbol *symbols, const char *name) { + size_t name_len = strlen(name); + for (const struct Symbol *symbol = symbols; symbol; symbol = symbol->next) { + size_t sym_name_len = strlen(symbol->name); + if (name_len > sym_name_len) { + continue; + } + const char *sym_name = symbol->name; + if (name[0] == '.') { + // If `name` is a local label, compare it to the local part of `symbol->name` + sym_name += sym_name_len - name_len; + } + if (!strcmp(sym_name, name)) { + return symbol; + } + } + error_exit("Error: Unknown symbol: \"%s\"\n", name); +} + +const struct Symbol *symbol_find_cat(const struct Symbol *symbols, const char *prefix, const char *suffix) { + char *sym_name = xmalloc(strlen(prefix) + strlen(suffix) + 1); + sprintf(sym_name, "%s%s", prefix, suffix); + const struct Symbol *symbol = symbol_find(symbols, sym_name); + free(sym_name); + return symbol; +} + +int parse_number(const char *input, int base) { + char *endptr; + int n = (int)strtol(input, &endptr, base); + if (endptr == input || *endptr || n < 0) { + error_exit("Error: Cannot parse number: \"%s\"\n", input); + } + return n; +} + +void parse_symbol_value(char *input, int *restrict bank, int *restrict address) { + char *colon = strchr(input, ':'); + if (!colon) { + error_exit("Error: Cannot parse bank+address: \"%s\"\n", input); + } + *colon++ = '\0'; + *bank = parse_number(input, 16); + *address = parse_number(colon, 16); +} + +void parse_symbols(const char *filename, struct Symbol **symbols) { + FILE *file = xfopen(filename, 'r'); + struct Buffer *buffer = buffer_create(1); + + enum { SYM_PRE, SYM_VALUE, SYM_SPACE, SYM_NAME } state = SYM_PRE; + int bank = 0; + int address = 0; + + for (;;) { + int c = getc(file); + if (c == EOF || c == '\n' || c == '\r' || c == ';' || (state == SYM_NAME && (c == ' ' || c == '\t'))) { + if (state == SYM_NAME) { + // The symbol name has ended; append the buffered symbol + buffer_append(buffer, &(char []){'\0'}); + symbol_append(symbols, buffer->data, bank, address); + } + // Skip to the next line, ignoring anything after the symbol value and name + state = SYM_PRE; + while (c != EOF && c != '\n' && c != '\r') { + c = getc(file); + } + if (c == EOF) { + break; + } + } else if (c != ' ' && c != '\t') { + if (state == SYM_PRE || state == SYM_SPACE) { + // The symbol value or name has started; buffer its contents + if (++state == SYM_NAME) { + // The symbol name has started; parse the buffered value + buffer_append(buffer, &(char []){'\0'}); + parse_symbol_value(buffer->data, &bank, &address); + } + buffer->size = 0; + } + buffer_append(buffer, &c); + } else if (state == SYM_VALUE) { + // The symbol value has ended; wait to see if a name comes after it + state = SYM_SPACE; + } + } + + fclose(file); + buffer_free(buffer); +} + +int strfind(const char *s, const char *list[], int count) { + for (int i = 0; i < count; i++) { + if (!strcmp(s, list[i])) { + return i; + } + } + return -1; +} + +#define vstrfind(s, ...) strfind(s, (const char *[]){__VA_ARGS__}, sizeof (const char *[]){__VA_ARGS__} / sizeof(const char *)) + +int parse_arg_value(const char *arg, bool absolute, const struct Symbol *symbols, const char *patch_name) { + // Comparison operators for "ConditionValueB" evaluate to their particular values + int op = vstrfind(arg, "==", ">", "<", ">=", "<=", "!=", "||"); + if (op >= 0) { + return op == 6 ? 0x11 : op; // "||" is 0x11 + } + + // Literal numbers evaluate to themselves + if (isdigit((unsigned)arg[0]) || arg[0] == '+') { + return parse_number(arg, 0); + } + + // Symbols evaluate to their offset or address, plus an optional offset mod + int offset_mod = 0; + char *plus = strchr(arg, '+'); + if (plus) { + offset_mod = parse_number(plus, 0); + *plus = '\0'; + } + const char *sym_name = !strcmp(arg, "@") ? patch_name : arg; // "@" is the current patch label + const struct Symbol *symbol = symbol_find(symbols, sym_name); + return (absolute ? symbol->offset : symbol->address) + offset_mod; +} + +void interpret_command(char *command, const struct Symbol *current_hook, const struct Symbol *symbols, struct Buffer *patches, FILE *restrict new_rom, FILE *restrict orig_rom, FILE *restrict output) { + // Strip all leading spaces and all but one trailing space + int x = 0; + for (int i = 0; command[i]; i++) { + if (!isspace((unsigned)command[i]) || (i > 0 && !isspace((unsigned)command[i - 1]))) { + command[x++] = command[i]; + } + } + command[x - (x > 0 && isspace((unsigned)command[x - 1]))] = '\0'; + + // Count the arguments + int argc = 0; + for (const char *c = command; *c; c++) { + if (isspace((unsigned)*c)) { + argc++; + } + } + + // Get the arguments + char *argv[argc]; // VLA + char *arg = command; + for (int i = 0; i < argc; i++) { + while (*arg && !isspace((unsigned)*arg)) { + arg++; + } + if (!*arg) { + break; + } + *arg++ = '\0'; + argv[i] = arg; + } + + // Use the arguments + if (vstrfind(command, "patch", "PATCH", "patch_", "PATCH_", "patch/", "PATCH/") >= 0) { + if (argc > 2) { + error_exit("Error: Invalid arguments for command: \"%s\"\n", command); + } + if (!current_hook) { + error_exit("Error: No current patch for command: \"%s\"\n", command); + } + int current_offset = current_hook->offset + (argc > 0 ? parse_number(argv[0], 0) : 0); + if (fseek(orig_rom, current_offset, SEEK_SET)) { + error_exit("Error: Cannot seek to \"vc_patch %s\" in the original ROM\n", current_hook->name); + } + if (fseek(new_rom, current_offset, SEEK_SET)) { + error_exit("Error: Cannot seek to \"vc_patch %s\" in the new ROM\n", current_hook->name); + } + int length; + if (argc == 2) { + length = parse_number(argv[1], 0); + } else { + const struct Symbol *current_hook_end = symbol_find_cat(symbols, current_hook->name, "_End"); + length = current_hook_end->offset - current_offset; + } + buffer_append(patches, &(struct Patch){current_offset, length}); + bool modified = false; + if (length == 1) { + int c = getc(new_rom); + modified = c != getc(orig_rom); + fprintf(output, isupper((unsigned)command[0]) ? "0x%02X" : "0x%02x", c); + } else { + if (command[strlen(command) - 1] != '/') { + fprintf(output, command[strlen(command) - 1] == '_' ? "a%d: " : "a%d:", length); + } + for (int i = 0; i < length; i++) { + if (i) { + putc(' ', output); + } + int c = getc(new_rom); + modified |= c != getc(orig_rom); + fprintf(output, isupper((unsigned)command[0]) ? "%02X" : "%02x", c); + } + } + if (!modified) { + fprintf(stderr, PROGRAM_NAME ": Warning: \"vc_patch %s\" doesn't alter the ROM\n", current_hook->name); + } + + } else if (vstrfind(command, "dws", "DWS", "dws_", "DWS_", "dws/", "DWS/") >= 0) { + if (argc < 1) { + error_exit("Error: Invalid arguments for command: \"%s\"\n", command); + } + if (command[strlen(command) - 1] != '/') { + fprintf(output, command[strlen(command) - 1] == '_' ? "a%d: " : "a%d:", argc * 2); + } + for (int i = 0; i < argc; i++) { + int value = parse_arg_value(argv[i], false, symbols, current_hook->name); + if (value > 0xffff) { + error_exit("Error: Invalid value for \"%s\" argument: 0x%x\n", command, value); + } + if (i) { + putc(' ', output); + } + fprintf(output, isupper((unsigned)command[0]) ? "%02X %02X": "%02x %02x", value & 0xff, value >> 8); + } + + } else if (vstrfind(command, "db", "DB", "db_", "DB_", "db/", "DB/") >= 0) { + if (argc != 1) { + error_exit("Error: Invalid arguments for command: \"%s\"\n", command); + } + int value = parse_arg_value(argv[0], false, symbols, current_hook->name); + if (value > 0xff) { + error_exit("Error: Invalid value for \"%s\" argument: 0x%x\n", command, value); + } + if (command[strlen(command) - 1] != '/') { + fputs(command[strlen(command) - 1] == '_' ? "a1: " : "a1:", output); + } + fprintf(output, isupper((unsigned)command[0]) ? "%02X" : "%02x", value); + + } else if (vstrfind(command, "hex", "HEX", "HEx", "Hex", "heX", "hEX", "hex~", "HEX~", "HEx~", "Hex~", "heX~", "hEX~") >= 0) { + if (argc != 1 && argc != 2) { + error_exit("Error: Invalid arguments for command: \"%s\"\n", command); + } + int value = parse_arg_value(argv[0], command[strlen(command) - 1] != '~', symbols, current_hook->name); + int padding = argc > 1 ? parse_number(argv[1], 0) : 2; + if (vstrfind(command, "HEx", "HEx~") >= 0) { + fprintf(output, "0x%0*X%02x", padding - 2, value >> 8, value & 0xff); + } else if (vstrfind(command, "Hex", "Hex~") >= 0) { + fprintf(output, "0x%0*X%03x", padding - 3, value >> 12, value & 0xfff); + } else if (vstrfind(command, "heX", "heX~") >= 0) { + fprintf(output, "0x%0*x%02X", padding - 2, value >> 8, value & 0xff); + } else if (vstrfind(command, "hEX", "hEX~") >= 0) { + fprintf(output, "0x%0*x%03X", padding - 3, value >> 12, value & 0xfff); + } else { + fprintf(output, isupper((unsigned)command[0]) ? "0x%0*X" : "0x%0*x", padding, value); + } + + } else { + error_exit("Error: Unknown command: \"%s\"\n", command); + } +} + +void skip_to_next_line(FILE *restrict input, FILE *restrict output) { + for (int c = getc(input); c != EOF; c = getc(input)) { + putc(c, output); + if (c == '\n' || c == '\r') { + break; + } + } +} + +struct Buffer *process_template(const char *template_filename, const char *patch_filename, FILE *restrict new_rom, FILE *restrict orig_rom, const struct Symbol *symbols) { + FILE *input = xfopen(template_filename, 'r'); + FILE *output = xfopen(patch_filename, 'w'); + + struct Buffer *patches = buffer_create(sizeof(struct Patch)); + struct Buffer *buffer = buffer_create(1); + + // The ROM checksum will always differ + buffer_append(patches, &(struct Patch){0x14e, 2}); + // The Stadium data (see stadium.c) will always differ + unsigned int rom_size = (unsigned int)xfsize("", orig_rom); + unsigned int stadium_size = 24 + 6 + 2 + (rom_size / 0x2000) * 2; + buffer_append(patches, &(struct Patch){rom_size - stadium_size, stadium_size}); + + // Fill in the template + const struct Symbol *current_hook = NULL; + for (int c = getc(input); c != EOF; c = getc(input)) { + switch (c) { + case ';': + // ";" comments until the end of the line + putc(c, output); + skip_to_next_line(input, output); + break; + + case '{': + // "{...}" is a template command; buffer its contents + buffer->size = 0; + for (c = getc(input); c != EOF && c != '}'; c = getc(input)) { + buffer_append(buffer, &c); + } + buffer_append(buffer, &(char []){'\0'}); + // Interpret the command in the context of the current patch + interpret_command(buffer->data, current_hook, symbols, patches, new_rom, orig_rom, output); + break; + + case '[': + // "[...]" is a patch label; buffer its contents + putc(c, output); + bool alternate = false; + buffer->size = 0; + for (c = getc(input); c != EOF; c = getc(input)) { + if (!alternate && c == '@') { + // "@" designates an alternate name for the ".VC_" label + alternate = true; + buffer->size = 0; + } else if (c == ']') { + putc(c, output); + break; + } else { + if (!alternate) { + putc(c, output); + if (!isalnum(c) && c != '_') { + // Convert non-identifier characters to underscores + c = '_'; + } + } + buffer_append(buffer, &c); + } + } + buffer_append(buffer, &(char []){'\0'}); + // The current patch should have a corresponding ".VC_" label + current_hook = symbol_find_cat(symbols, ".VC_", buffer->data); + skip_to_next_line(input, output); + break; + + default: + putc(c, output); + } + } + + rewind(orig_rom); + rewind(new_rom); + + fclose(input); + fclose(output); + buffer_free(buffer); + return patches; +} + +int compare_patch(const void *patch1, const void *patch2) { + unsigned int offset1 = ((const struct Patch *)patch1)->offset; + unsigned int offset2 = ((const struct Patch *)patch2)->offset; + return offset1 > offset2 ? 1 : offset1 < offset2 ? -1 : 0; +} + +bool verify_completeness(FILE *restrict orig_rom, FILE *restrict new_rom, struct Buffer *patches) { + qsort(patches->data, patches->size, patches->item_size, compare_patch); + for (unsigned int offset = 0, index = 0; ; offset++) { + int orig_byte = getc(orig_rom); + int new_byte = getc(new_rom); + if (orig_byte == EOF || new_byte == EOF) { + return orig_byte == new_byte; + } + struct Patch *patch = &((struct Patch *)patches->data)[index]; + if (index < patches->size && patch->offset == offset) { + if (fseek(orig_rom, patch->size, SEEK_CUR)) { + return false; + } + if (fseek(new_rom, patch->size, SEEK_CUR)) { + return false; + } + offset += patch->size; + index++; + } else if (orig_byte != new_byte) { + fprintf(stderr, PROGRAM_NAME ": Warning: Unpatched difference at offset: 0x%x\n", offset); + fprintf(stderr, " Original ROM value: 0x%02x\n", orig_byte); + fprintf(stderr, " Patched ROM value: 0x%02x\n", new_byte); + fprintf(stderr, " Current patch offset: 0x%06x\n", patch->offset); + return false; + } + } +} + +int main(int argc, char *argv[]) { + if (argc != 7) { + usage_exit(1); + } + + struct Symbol *symbols = NULL; + parse_symbols(argv[1], &symbols); + parse_symbols(argv[2], &symbols); + + FILE *new_rom = xfopen(argv[3], 'r'); + FILE *orig_rom = xfopen(argv[4], 'r'); + struct Buffer *patches = process_template(argv[5], argv[6], new_rom, orig_rom, symbols); + + if (!verify_completeness(orig_rom, new_rom, patches)) { + fprintf(stderr, PROGRAM_NAME ": Warning: Not all ROM differences are defined by \"%s\"\n", argv[6]); + } + + symbol_free(symbols); + fclose(new_rom); + fclose(orig_rom); + buffer_free(patches); + return 0; +} diff --git a/vc/pokeblue.constants.asm b/vc/pokeblue.constants.asm new file mode 100644 index 000000000..a197afaea --- /dev/null +++ b/vc/pokeblue.constants.asm @@ -0,0 +1,71 @@ +INCLUDE "constants.asm" + +; These are all the asm constants needed to make the blue_vc patch. + +vc_const: MACRO +x = \1 + PRINTLN "00:{04x:x} \1" ; same format as rgblink's .sym file +ENDM + +; [FPA 001 Begin] + vc_const "M" + vc_const "E" + vc_const "G" + vc_const "A" + vc_const "P" + vc_const "S" + vc_const "L" + vc_const "F" + vc_const "X" + vc_const MEGA_PUNCH + +; [FPA 001 End] + vc_const EXPLOSION + +; [FPA 002 Begin] + vc_const "U" + vc_const "I" + vc_const GUILLOTINE + +; [FPA 002 End] + vc_const "K" + vc_const MEGA_KICK + +; [FPA 004 Begin] + vc_const "B" + vc_const "Z" + vc_const BLIZZARD + +; [FPA 005 Begin] + vc_const BUBBLEBEAM + +; [FPA 005 End] + vc_const HYPER_BEAM + +; [FPA 006 Begin] + vc_const "H" + vc_const "Y" + +; [FPA 007 Begin] + vc_const "T" + vc_const "N" + vc_const THUNDERBOLT + +; [FPA 008 Begin] + vc_const "R" + vc_const REFLECT + +; [FPA 009 Begin] + vc_const SELFDESTRUCT + +; [FPA 010 Begin] + vc_const "D" + vc_const DREAM_EATER + +; [FPA 011 Begin] + vc_const "O" + vc_const SPORE + +; [FPA 012 Begin] + vc_const "C" + vc_const ROCK_SLIDE diff --git a/vc/pokeblue.patch.template b/vc/pokeblue.patch.template new file mode 100644 index 000000000..2a8bb119a --- /dev/null +++ b/vc/pokeblue.patch.template @@ -0,0 +1,436 @@ +;Format Sample +;[xxxx] ;User-defined Name (Max:31 chars) +;Mode = 1 ;1:Fixcode; 2:Fixvalue; 3:Mask; 4:Palette; 5:Double Frame Buffer +;Type = 0 ;0:Begin 1:End +;Index = 0 ;Index +;Address = x1F8000 ;ROM Address +;MemAddress = x2000 ;RAM Address +;Fixcode = 0 ;Mode1: Fixed Rom Code; Mode2: Fixed Value +;DelayFrame = 0 ;Delay Frame +;FadeFrame = 0 ;Fade Frame 0:Off +;DarkEnable0 = 0 ;0:Off, 1:On (for Normal Mode) +;ReduceEnable0 = 0 ;0:Off, 1:On (for Normal Mode) +;MotionBEnable0 = 0 ;0:Off, 1:Black Fade, 2:, 3:Frame Blend (for Normal Mode) +;Dark0 = 10 ;0~10 (for Normal Mode) +;ReduceColorR0 = 0 ;0~31 (for Normal Mode) +;ReduceColorG0 = 0 ;0~31 (for Normal Mode) +;ReduceColorB0 = 0 ;0~31 (for Normal Mode) +;MotionBlur0 = 31 ;0~31 (for Normal Mode) +;DarkEnable1 = 0 ;0:Off, 1:On (for Green Mode) +;ReduceEnable1 = 0 ;0:Off, 1:On (for Green Mode) +;MotionBEnable1 = 0 ;0:Off, 1:Black Fade, 2:, 3:Frame Blend (for Green Mode) +;Dark1 = 10 ;0~10 (for Green Mode) +;ReduceColorR1 = 0 ;0~31 (for Green Mode) +;ReduceColorG1 = 0 ;0~31 (for Green Mode) +;ReduceColorB1 = 0 ;0~31 (for Green Mode) +;MotionBlur1 = 31 ;0~31 (for Green Mode) +;PaletteX = c31,31,31 ;X:0~15, cR,G,B (0~31) +[SaveLimit] +Mode = 12 +Type = 1 +Index = {hex sGameData} +Address = {hex sGameDataEnd} + +[send_send_buf2] +Mode = 2 +Address = {HEX @} +Type = 29 + +[send_send_buf2_ret] +Mode = 2 +Address = {HEX @} +Type = 30 + +[send_byt2] +Mode = 2 +Address = {HEX @+5} +Type = 31 + +[send_byt2_ret] +Mode = 2 +Address = {HEX @} +Type = 32 + +[send_dummy] +Mode = 2 +Address = {HEX @} +Type = 33 + +[send_dummy_end] +Mode = 2 +Address = {HEX @} +Type = 34 + +[FIGHT] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[FIGHT2] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[Network10] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[Network11] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[Network17] +Mode = 2 +Address = {HEX @} +Type = 5 + +[Network424] +Mode = 2 +Address = {HEX @} +Type = 4 + +[Network200] +Mode = 2 +Address = {HEX @} +Type = 4 + +[Network_RECHECK] +Mode = 2 +Address = {HEX @} +Type = 7 + +[Network_STOP] +Mode = 2 +Address = {HEX @} +Type = 8 + +[Network_END] +Mode = 2 +Address = {HEX @} +Type = 9 + +[Network_RESET] +Mode = 2 +Address = {HEX @} +Type = 10 + +[linkCable fake begin] +Mode = 2 +Address = {HEX @} +Type = 16 + +[linkCable fake end] +Mode = 2 +Address = {HEX @} +Type = 17 + +[linkCable block input] +Mode = 2 +Address = {HEX @+5} +Type = 18 + +;[save game start] +;Mode = 2 +;Address = 0x59E6 +;Type = 19 + +[save game end] +Mode = 2 +Address = {HEX @} +Type = 20 + +[Change_MSG] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH_ +1 20} + +[fight_ret] +Mode = 1 +Address = {HEX @} +Fixcode = {PATCH} + +[fight_ret_c] +Mode = 2 +Address = {HEX @} +Type = 98 + +;rsm003758 +;No151 +[FPA 001 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 27 +ConditionType = 11 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+5 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == == || == == == == == || == == == == == } +ConditionValueC = {dws_ "M" "E" "G" "A" "P" MEGA_PUNCH 00 "S" "E" "L" "F" MEGA_PUNCH 00 "E" "X" "P" "L" MEGA_PUNCH } + +[FPA 001 End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 11 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+5 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == == || == == == == == || == == == == == } +ConditionValueC = {dws_ "M" "E" "G" "A" "P" MEGA_PUNCH 00 "E" "X" "P" "L" EXPLOSION 00 "E" "X" "P" "L" MEGA_PUNCH } + + + +;rsm141151 +;No117 +[FPA 002 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 9 +MotionBEnable1 = 3 +MotionBlur1 = 8 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "G" "U" "I" "L" GUILLOTINE } + +[FPA 002 End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 11 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+5 wAnimationID} +ConditionValueB = {dws_ == == == == == || == == == == == == } +ConditionValueC = {dws_ "G" "U" "I" "L" GUILLOTINE 00 "M" "E" "G" "A" "K" MEGA_KICK } + + + +;rsm143918 +;No150 +[FPA 003 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 25 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+5 wAnimationID} +ConditionValueB = {dws_ == == == == == == } +ConditionValueC = {dws_ "M" "E" "G" "A" "K" MEGA_KICK } + + + +;rsm152422 +;No131 +[FPA 004 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 25 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "B" "L" "I" "Z" BLIZZARD } + + +;rsm160334 +;No123 +[FPA 005 Begin@FPA_Bubblebeam_Begin] +Mode = 3 +Type = 0 +Address = {hex @} +MotionBEnable0 = 3 +MotionBlur0 = 27 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "B" "U" "B" "B" BUBBLEBEAM } + +[FPA 005 End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 11 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == || == == == == == || == == == == == } +ConditionValueC = {dws_ "B" "U" "B" "B" BUBBLEBEAM 00 "H" "Y" "P" "E" HYPER_BEAM 00 "B" "L" "I" "Z" BLIZZARD } + + +;rsm163356 +;No116 +[FPA 006 Begin@FPA_Hyper_Beam_Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 1 +MotionBlur0 = 5 +MotionBEnable1 = 1 +MotionBlur1 = 5 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "H" "Y" "P" "E" HYPER_BEAM } + + + +;rsm174631 +;No57 +[FPA 007 Begin@FPA_Thunderbolt_Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 30 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "T" "H" "U" "N" THUNDERBOLT } + + +[FPA 007 End@FPA_Thunderbolt_End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "T" "H" "U" "N" THUNDERBOLT } + + +;rsm134518 +;No159 +[FPA 008 Begin@FPA_Reflect_Begin] +Mode = 3 +Type = 0 +Address = {hex @} +MotionBEnable0 = 1 +MotionBlur0 = 5 +MotionBEnable1 = 1 +MotionBlur1 = 5 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "R" "E" "F" "L" REFLECT } + +[FPA 008 End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "R" "E" "F" "L" REFLECT } + + + + +;rsm140510 +;No56 +[FPA 009 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 27 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "S" "E" "L" "F" SELFDESTRUCT} + +[FPA 009 End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 11 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == || == == == == == } +ConditionValueC = {dws_ "S" "E" "L" "F" MEGA_PUNCH 00 "S" "E" "L" "F" SELFDESTRUCT} + +;rsm150211 +;No156 +[FPA 010 Begin@FPA_Dream_Eater_Begin] +Mode = 3 +Type = 0 +Address = {hex @} +MotionBEnable0 = 3 +MotionBlur0 = 10 +MotionBEnable1 = 3 +MotionBlur1 = 7 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "D" "R" "E" "A" DREAM_EATER } + +;[FPA 010 End] +;Mode = 3 +;Type = 1 +;Address = 0x78176 +;ConditionType = 0 +;ConditionValueA = a10: 4b cf 4c cf 4d cf 4e cf 7c d0 +;ConditionValueB = a10: 00 00 00 00 00 00 00 00 00 00 +;ConditionValueC = a10: 83 00 91 00 84 00 80 00 8a 00 + +;rsm163334 +;No36 +[FPA 011 Begin@FPA_Spore_Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 8 +MotionBEnable1 = 3 +MotionBlur1 = 8 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "S" "P" "O" "R" SPORE } + +[FPA 011 End] +Mode = 3 +Type = 1 +Address = {hex @} +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "S" "P" "O" "R" SPORE } + +;rsm012224 +;No12 +[FPA 012 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 27 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "R" "O" "C" "K" ROCK_SLIDE } + +[FPA 012 End] +Mode = 3 +Type = 1 +Address = {hex @} +ConditionType = 11 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == || == == == == == } +ConditionValueC = {dws_ "R" "O" "C" "K" ROCK_SLIDE 00 "D" "R" "E" "A" DREAM_EATER } + + + + + +;explosion +;No76 +[FPA 76 Begin] +Mode = 3 +Type = 0 +Address = 0x78186 +MotionBEnable0 = 3 +MotionBlur0 = 28 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "E" "X" "P" "L" EXPLOSION } \ No newline at end of file diff --git a/vc/pokered.constants.asm b/vc/pokered.constants.asm new file mode 100644 index 000000000..4bc623881 --- /dev/null +++ b/vc/pokered.constants.asm @@ -0,0 +1,74 @@ +INCLUDE "constants.asm" + +; These are all the asm constants needed to make the red_vc patch. + +vc_const: MACRO +x = \1 + PRINTLN "00:{04x:x} \1" ; same format as rgblink's .sym file +ENDM + +; [FPA 001 Begin] + vc_const "M" + vc_const "E" + vc_const "G" + vc_const "A" + vc_const "P" + vc_const "S" + vc_const "L" + vc_const "F" + vc_const "D" + vc_const "X" + vc_const MEGA_PUNCH + +; [FPA 002 Begin] + vc_const "U" + vc_const "I" + vc_const GUILLOTINE + +; [FPA 003 Begin] + vc_const "K" + vc_const MEGA_KICK + +; [FPA 004 Begin] + vc_const "B" + vc_const BUBBLEBEAM + +; [FPA 005 Begin] + vc_const "H" + vc_const "Y" + vc_const HYPER_BEAM + +; [FPA 006 Begin] + vc_const "T" + vc_const "N" + vc_const THUNDERBOLT + +; [FPA 007 Begin] + vc_const "R" + vc_const "F" + vc_const REFLECT + +; [FPA 008 Begin] + vc_const DREAM_EATER + +; [FPA 008 End] + vc_const "Z" + vc_const BLIZZARD + +; [FPA 009 Begin] + vc_const "O" + vc_const SPORE + +; [FPA 010 Begin] + vc_const "C" + vc_const ROCK_SLIDE + +; [FPA 010 End] + vc_const SELFDESTRUCT + vc_const EXPLOSION + +; [FPA conf Begin] + vc_const CONFUSION + +; [FPA phy Begin] + vc_const PSYCHIC_M diff --git a/vc/pokered.patch.template b/vc/pokered.patch.template new file mode 100644 index 000000000..52f5d0fe4 --- /dev/null +++ b/vc/pokered.patch.template @@ -0,0 +1,482 @@ +;Format Sample +;[xxxx] ;User-defined Name (Max:31 chars) +;Mode = 1 ;1:Fixcode; 2:Fixvalue; 3:Mask; 4:Palette; 5:Double Frame Buffer +;Type = 0 ;0:Begin 1:End +;Index = 0 ;Index +;Address = x1F8000 ;ROM Address +;MemAddress = x2000 ;RAM Address +;Fixcode = 0 ;Mode1: Fixed Rom Code; Mode2: Fixed Value +;DelayFrame = 0 ;Delay Frame +;FadeFrame = 0 ;Fade Frame 0:Off +;DarkEnable0 = 0 ;0:Off, 1:On (for Normal Mode) +;ReduceEnable0 = 0 ;0:Off, 1:On (for Normal Mode) +;MotionBEnable0 = 0 ;0:Off, 1:Black Fade, 2:, 3:Frame Blend (for Normal Mode) +;Dark0 = 10 ;0~10 (for Normal Mode) +;ReduceColorR0 = 0 ;0~31 (for Normal Mode) +;ReduceColorG0 = 0 ;0~31 (for Normal Mode) +;ReduceColorB0 = 0 ;0~31 (for Normal Mode) +;MotionBlur0 = 31 ;0~31 (for Normal Mode) +;DarkEnable1 = 0 ;0:Off, 1:On (for Green Mode) +;ReduceEnable1 = 0 ;0:Off, 1:On (for Green Mode) +;MotionBEnable1 = 0 ;0:Off, 1:Black Fade, 2:, 3:Frame Blend (for Green Mode) +;Dark1 = 10 ;0~10 (for Green Mode) +;ReduceColorR1 = 0 ;0~31 (for Green Mode) +;ReduceColorG1 = 0 ;0~31 (for Green Mode) +;ReduceColorB1 = 0 ;0~31 (for Green Mode) +;MotionBlur1 = 31 ;0~31 (for Green Mode) +;PaletteX = c31,31,31 ;X:0~15, cR,G,B (0~31) +[SaveLimit] +Mode = 12 +Type = 1 +Index = {hex sGameData} +Address = {hex sGameDataEnd} + +;[Fix pokemon] +;Mode = 2 +;Address = 0x1551 +;Type = 3 + +[send_send_buf2] +Mode = 2 +Address = {HEX @} +Type = 29 + +[send_send_buf2_ret] +Mode = 2 +Address = {HEX @} +Type = 30 + +[send_byt2] +Mode = 2 +Address = {HEX @+5} +Type = 31 + +[send_byt2_ret] +Mode = 2 +Address = {HEX @} +Type = 32 + +[send_dummy] +Mode = 2 +Address = {HEX @} +Type = 33 + +[send_dummy_end] +Mode = 2 +Address = {HEX @} +Type = 34 + +[FIGHT] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[FIGHT2] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[Network10] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[Network11] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[Network17] +Mode = 2 +Address = {HEX @} +Type = 5 + +[Network424] +Mode = 2 +Address = {HEX @} +Type = 4 + +[Network200] +Mode = 2 +Address = {HEX @} +Type = 4 + +[Network_RECHECK] +Mode = 2 +Address = {HEX @} +Type = 7 + +[Network_STOP] +Mode = 2 +Address = {HEX @} +Type = 8 + +[Network_END] +Mode = 2 +Address = {HEX @} +Type = 9 + +[Network_RESET] +Mode = 2 +Address = {HEX @} +Type = 10 + +[linkCable fake begin] +Mode = 2 +Address = {HEX @} +Type = 16 + +[linkCable fake end] +Mode = 2 +Address = {HEX @} +Type = 17 + +[linkCable block input] +Mode = 2 +Address = {HEX @+5} +Type = 18 + +;[save game start] +;Mode = 2 +;Address = 0x59E6 +;Type = 19 + +[save game end] +Mode = 2 +Address = {HEX @} +Type = 20 + +;93 A7 A4 7F AB A8 AD AA 7F A7 +;at 93 +[Change_MSG] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH_ +1 20} + +[fight_ret] +Mode = 1 +Address = {HEX @} +Fixcode = {PATCH} + +[fight_ret_c] +Mode = 2 +Address = {HEX @} +Type = 98 + +; The effect_no decide which animation will be played. +; So we use it as a condition value. The address of effect_no is 0xd07c +; a7 c0 3e 05 ea +; and a A7 +; ret nz C0 +; +; ld a,5 3E 05 +; ld (anime_buf),a EA +; +; +;effect_select_rdy: +; ld (effect_no),a +; +; call put_wait +; +; ld a,B_EFFECT_SELECT + + +;rsm033659 +;no151 mega punch +[FPA 001 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 21 +MotionBEnable1 = 3 +MotionBlur1 = 21 +ConditionType = 11 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+5 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+4 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == == || == == == == == == || == == == == == } +ConditionValueC = {dws_ "M" "E" "G" "A" "P" MEGA_PUNCH 00 "S" "E" "L" "F" "D" MEGA_PUNCH 00 "E" "X" "P" "L" MEGA_PUNCH } + + +[FPA 001 End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+5 wAnimationID} +ConditionValueB = {dws_ == == == == == == } +ConditionValueC = {dws_ "M" "E" "G" "A" "P" MEGA_PUNCH } + + +;rsm032916 +;no117 guillotine +[FPA 002 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 9 +MotionBEnable1 = 3 +MotionBlur1 = 8 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "G" "U" "I" "L" GUILLOTINE } + +[FPA 002 End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "G" "U" "I" "L" GUILLOTINE } + + +;rsm041307 +;no150 mega kick +[FPA 003 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 25 +MotionBEnable1 = 3 +MotionBlur1 = 21 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+5 wAnimationID} +ConditionValueB = {dws_ == == == == == == } +ConditionValueC = {dws_ "M" "E" "G" "A" "K" MEGA_KICK } + + +;rsm001929 +;no123 bubble beam +[FPA 004 Begin@FPA_Bubblebeam_Begin] +Mode = 3 +Type = 0 +Address = {hex @} +MotionBEnable0 = 3 +MotionBlur0 = 30 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "B" "U" "B" "B" BUBBLEBEAM } + +[FPA 004 End] +Mode = 3 +Type = 1 +Address = {hex @} +ConditionType = 11 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+5 wAnimationID} +ConditionValueB = {dws_ == == == == == || == == == == == == } +ConditionValueC = {dws_ "B" "U" "B" "B" BUBBLEBEAM 00 "M" "E" "G" "A" "K" MEGA_KICK } + + +;rsm103658 +;no116 hyper beam +[FPA 005 Begin@FPA_Hyper_Beam_Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 1 +MotionBlur0 = 5 +MotionBEnable1 = 1 +MotionBlur1 = 5 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "H" "Y" "P" "E" HYPER_BEAM } + +[FPA 005 End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "H" "Y" "P" "E" HYPER_BEAM } + + +;rsm133358 +;no57 thunderbolt +[FPA 006 Begin@FPA_Thunderbolt_Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 30 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "T" "H" "U" "N" THUNDERBOLT } + + +[FPA 006 End@FPA_Thunderbolt_End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "T" "H" "U" "N" THUNDERBOLT } + +;rsm152340 +;no159 reflect +[FPA 007 Begin@FPA_Reflect_Begin] +Mode = 3 +Type = 0 +Address = {hex @} +MotionBEnable0 = 1 +MotionBlur0 = 6 +MotionBEnable1 = 1 +MotionBlur1 = 5 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "R" "E" "F" "L" REFLECT } + +[FPA 007 End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "R" "E" "F" "L" REFLECT } + +;rsm171812 +;no156 dream eater +[FPA 008 Begin@FPA_Dream_Eater_Begin] +Mode = 3 +Type = 0 +Address = {hex @} +MotionBEnable0 = 3 +MotionBlur0 = 10 +MotionBEnable1 = 3 +MotionBlur1 = 7 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "D" "R" "E" "A" DREAM_EATER } + +[FPA 008 End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+4} {dws/ wAnimationID} +ConditionValueB = {dws_ == == == == == } {dws/ == } +ConditionValueC = {dws_ "B" "L" "I" "Z" "Z" } {dws/ BLIZZARD } + +;rsm174650 +;no36 spore +[FPA 009 Begin@FPA_Spore_Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 8 +MotionBEnable1 = 3 +MotionBlur1 = 8 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "S" "P" "O" "R" SPORE } + + +;rsm152115 +;no12 rock slide +[FPA 010 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 27 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "R" "O" "C" "K" ROCK_SLIDE } + +[FPA 010 End] +Mode = 3 +Type = 1 +Address = {HEX @} +ConditionType = 11 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+4 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+4 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+5 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID 00 wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == || == == == == == || == == == == == || == == == == == == || == == == == == == || == == == == == == || == == == == == || == == == == == } +ConditionValueC = {dws_ "D" "R" "E" "A" DREAM_EATER 00 "R" "O" "C" "K" ROCK_SLIDE 00 "S" "P" "O" "R" SPORE 00 "S" "E" "L" "F" "D" MEGA_PUNCH 00 "S" "E" "L" "F" "D" SELFDESTRUCT 00 "C" "O" "N" "F" "S" CONFUSION 00 "E" "X" "P" "L" EXPLOSION 00 "E" "X" "P" "L" MEGA_PUNCH } + + +;explosion +;No76 explosion +[FPA 76 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 28 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wAnimationID} +ConditionValueB = {dws_ == == == == == } +ConditionValueC = {dws_ "E" "X" "P" "L" EXPLOSION } + + +;No56 self-destruct +[FPA 56 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 23 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+4 wAnimationID} +ConditionValueB = {dws_ == == == == == == } +ConditionValueC = {dws_ "S" "E" "L" "F" "D" SELFDESTRUCT} + + +;No131 blizzard +[FPA 131 Begin] +Mode = 3 +Type = 0 +Address = {HEX @} +MotionBEnable0 = 3 +MotionBlur0 = 26 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+4 wAnimationID} +ConditionValueB = {dws_ == == == == == == } +ConditionValueC = {dws_ "B" "L" "I" "Z" "Z" BLIZZARD } + + +;confusion +[FPA conf Begin] +Mode = 3 +Type = 0 +Address = {hex @} +MotionBEnable1 = 3 +MotionBlur1 = 21 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+5 wAnimationID} +ConditionValueB = {dws_ == == == == == == } +ConditionValueC = {dws_ "C" "O" "N" "F" "S" CONFUSION } + +;phychic +[FPA phy Begin] +Mode = 3 +Type = 0 +Address = {hex @} +MotionBEnable1 = 3 +MotionBlur1 = 21 +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+5 wAnimationID} +ConditionValueB = {dws_ == == == == == == } +ConditionValueC = {dws_ "P" "S" "Y" "C" "I" PSYCHIC_M } + +[FPA phy End] +Mode = 3 +Type = 1 +Address = {hex @} +ConditionType = 0 +ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuffer+3 wStringBuffer+5 wAnimationID} +ConditionValueB = {dws_ == == == == == == } +ConditionValueC = {dws_ "P" "S" "Y" "C" "I" PSYCHIC_M } + + From 27d0b146addee8185178388e0f7a94353d8409ba Mon Sep 17 00:00:00 2001 From: SatoMew Date: Fri, 1 Apr 2022 04:49:08 +0100 Subject: [PATCH 08/45] Add comment explaining the purpose of TrainerNamePointers (#352) --- data/trainers/name_pointers.asm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/trainers/name_pointers.asm b/data/trainers/name_pointers.asm index 98e2e4063..6317f54ae 100644 --- a/data/trainers/name_pointers.asm +++ b/data/trainers/name_pointers.asm @@ -1,5 +1,7 @@ TrainerNamePointers: -; what is the point of these? +; These are only used for trainers' defeat speeches. +; They were originally shortened variants of the trainer class names +; in the Japanese versions, but are now redundant with TrainerNames. dw .YoungsterName dw .BugCatcherName dw .LassName From 0fd9ba5670e4f5075b2ef9697df7b5226148dce9 Mon Sep 17 00:00:00 2001 From: vulcandth Date: Sun, 17 Apr 2022 13:44:57 -0500 Subject: [PATCH 09/45] Add hSerialConnectionStatus vc_assert (#354) --- engine/link/cable_club_npc.asm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engine/link/cable_club_npc.asm b/engine/link/cable_club_npc.asm index e2a9bc884..b4fb40901 100644 --- a/engine/link/cable_club_npc.asm +++ b/engine/link/cable_club_npc.asm @@ -27,7 +27,15 @@ CableClubNPC:: xor a ldh [hSerialReceiveData], a ld a, START_TRANSFER_EXTERNAL_CLOCK +; This vc_hook causes the Virtual Console to set [hSerialConnectionStatus] to +; USING_INTERNAL_CLOCK, which allows the player to proceed past the link +; receptionist's "Please wait." It assumes that hSerialConnectionStatus is at +; its original address. vc_hook linkCable_fake_begin + vc_assert hSerialConnectionStatus == $ffaa, \ + "hSerialConnectionStatus is no longer located at 00:ffaa" + vc_assert USING_INTERNAL_CLOCK == $02, \ + "USING_INTERNAL_CLOCK is no longer equal to $02." ldh [rSC], a ld a, [wLinkTimeoutCounter] dec a From 1dcaede8b5e41dbec9bf3f2b18c77d1b7d2de708 Mon Sep 17 00:00:00 2001 From: vulcandth Date: Tue, 26 Apr 2022 15:10:46 -0500 Subject: [PATCH 10/45] Remove Stadium data patch from tools/make_patch.c (#355) --- tools/make_patch.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/make_patch.c b/tools/make_patch.c index 29d798f61..71c6b455a 100644 --- a/tools/make_patch.c +++ b/tools/make_patch.c @@ -340,10 +340,6 @@ struct Buffer *process_template(const char *template_filename, const char *patch // The ROM checksum will always differ buffer_append(patches, &(struct Patch){0x14e, 2}); - // The Stadium data (see stadium.c) will always differ - unsigned int rom_size = (unsigned int)xfsize("", orig_rom); - unsigned int stadium_size = 24 + 6 + 2 + (rom_size / 0x2000) * 2; - buffer_append(patches, &(struct Patch){rom_size - stadium_size, stadium_size}); // Fill in the template const struct Symbol *current_hook = NULL; From d7808d110f6b104a3e5ed7b21260ed8f1b718719 Mon Sep 17 00:00:00 2001 From: vulcandth Date: Mon, 6 Jun 2022 16:22:34 -0500 Subject: [PATCH 11/45] Improved Virtual Console patch identifiers (#357) --- data/text/text_4.asm | 2 +- engine/battle/animations.asm | 60 +++++++++++---------- engine/battle/core.asm | 20 +++---- engine/gfx/palettes.asm | 2 +- engine/link/cable_club.asm | 8 +-- engine/link/cable_club_npc.asm | 8 +-- engine/menus/main_menu.asm | 4 +- engine/menus/save.asm | 2 +- home/serial.asm | 8 +-- vc/pokeblue.patch.template | 92 +++++++++++++++---------------- vc/pokered.patch.template | 98 +++++++++++++++++----------------- 11 files changed, 153 insertions(+), 151 deletions(-) diff --git a/data/text/text_4.asm b/data/text/text_4.asm index 60ec7abea..39c7ab91b 100644 --- a/data/text/text_4.asm +++ b/data/text/text_4.asm @@ -211,7 +211,7 @@ _CableClubNPCPleaseWaitText:: text_end _CableClubNPCLinkClosedBecauseOfInactivityText:: - vc_patch Change_MSG + vc_patch Change_link_closed_inactivity_message IF DEF(_RED_VC) || DEF(_BLUE_VC) text "Please come again!" done diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index f1dd3d4ee..afed76d74 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -176,12 +176,12 @@ PlayAnimation: ld h, [hl] ld l, a .animationLoop - vc_hook FPA_Thunderbolt_End + vc_hook Stop_reducing_move_anim_flashing_Thunderbolt ld a, [hli] - vc_hook_red FPA_007_End - vc_hook_blue FPA_009_End + vc_hook_red Stop_reducing_move_anim_flashing_Reflect + vc_hook_blue Stop_reducing_move_anim_flashing_Self_Destruct cp -1 - vc_hook_blue FPA_008_End + vc_hook_blue Stop_reducing_move_anim_flashing_Reflect jr z, .AnimationOver cp FIRST_SE_ID ; is this subanimation or a special effect? jr c, .playSubanimation @@ -250,55 +250,57 @@ PlayAnimation: ld a, [wAnimPalette] ldh [rOBP0], a call LoadAnimationTileset - vc_hook FPA_001_Begin + vc_hook Reduce_move_anim_flashing_Mega_Punch_Self_Destruct_Explosion call LoadSubanimation call PlaySubanimation - vc_hook FPA_001_End + vc_hook_red Stop_reducing_move_anim_flashing_Mega_Punch + vc_hook_blue Stop_reducing_move_anim_flashing_Mega_Punch_Explosion pop af - vc_hook_red FPA_008_End + vc_hook_red Stop_reducing_move_anim_flashing_Dream_Eater ldh [rOBP0], a .nextAnimationCommand - vc_hook FPA_005_End + vc_hook_red Stop_reducing_move_anim_flashing_Hyper_Beam + vc_hook_blue Stop_reducing_move_anim_flashing_Bubblebeam_Hyper_Beam_Blizzard pop hl - vc_hook FPA_002_End + vc_hook Stop_reducing_move_anim_flashing_Guillotine jr .animationLoop .AnimationOver ret LoadSubanimation: - vc_hook FPA_002_Begin + vc_hook Reduce_move_anim_flashing_Guillotine ld a, [wSubAnimAddrPtr + 1] - vc_hook FPA_003_Begin + vc_hook Reduce_move_anim_flashing_Mega_Kick ld h, a - vc_hook_red FPA_131_Begin + vc_hook_red Reduce_move_anim_flashing_Blizzard ld a, [wSubAnimAddrPtr] - vc_hook_red FPA_56_Begin + vc_hook_red Reduce_move_anim_flashing_Self_Destruct ld l, a ld a, [hli] ld e, a - vc_hook FPA_76_Begin + vc_hook Reduce_move_anim_flashing_Explosion ld a, [hl] - vc_hook FPA_Thunderbolt_Begin + vc_hook Reduce_move_anim_flashing_Thunderbolt ld d, a ; de = address of subanimation ld a, [de] - vc_hook_blue FPA_012_Begin + vc_hook_blue Reduce_move_anim_flashing_Rock_Slide ld b, a - vc_hook FPA_Spore_Begin + vc_hook Reduce_move_anim_flashing_Spore and %00011111 - vc_hook FPA_Bubblebeam_Begin + vc_hook Reduce_move_anim_flashing_Bubblebeam ld [wSubAnimCounter], a ; number of frame blocks - vc_hook_red FPA_010_Begin - vc_hook_blue FPA_009_Begin + vc_hook_red Reduce_move_anim_flashing_Rock_Slide + vc_hook_blue Reduce_move_anim_flashing_Self_Destruct ld a, b and %11100000 cp SUBANIMTYPE_ENEMY << 5 - vc_hook_blue FPA_004_Begin + vc_hook_blue Reduce_move_anim_flashing_Blizzard jr nz, .isNotType5 .isType5 call GetSubanimationTransform2 jr .saveTransformation .isNotType5 - vc_hook FPA_Hyper_Beam_Begin + vc_hook Reduce_move_anim_flashing_Hyper_Beam call GetSubanimationTransform1 .saveTransformation ; place the upper 3 bits of a into bits 0-2 of a before storing @@ -329,7 +331,7 @@ LoadSubanimation: ; sets the transform to SUBANIMTYPE_NORMAL if it's the player's turn ; sets the transform to the subanimation type if it's the enemy's turn GetSubanimationTransform1: - vc_hook FPA_Reflect_Begin + vc_hook Reduce_move_anim_flashing_Reflect ld b, a ldh a, [hWhoseTurn] and a @@ -422,15 +424,15 @@ MoveAnimation: jr nz, .animationsDisabled call ShareMoveAnimations call PlayAnimation - vc_hook_red FPA_004_End - vc_hook_blue FPA_011_End + vc_hook_red Stop_reducing_move_anim_flashing_Bubblebeam_Mega_Kick + vc_hook_blue Stop_reducing_move_anim_flashing_Spore jr .next4 .animationsDisabled ld c, 30 call DelayFrames .next4 - vc_hook_red FPA_010_End - vc_hook_blue FPA_012_End + vc_hook_red Stop_reducing_move_anim_flashing + vc_hook_blue Stop_reducing_move_anim_flashing_Rock_Slide_Dream_Eater call PlayApplyingAttackAnimation ; shake the screen or flash the pic in and out (to show damage) .animationFinished call WaitForSoundToFinish @@ -568,7 +570,7 @@ SetAnimationPalette: .notSGB ld a, $e4 ld [wAnimPalette], a - vc_hook FPA_Dream_Eater_Begin + vc_hook Reduce_move_anim_flashing_Dream_Eater ldh [rOBP0], a ld a, $6c ldh [rOBP1], a @@ -984,7 +986,7 @@ AnimationFlashScreenLong: ld [wFlashScreenLongCounter], a pop hl jr nz, .loop - vc_hook_red FPA_phy_End + vc_hook_red Stop_reducing_move_anim_flashing_Psychic ret ; BG palettes diff --git a/engine/battle/core.asm b/engine/battle/core.asm index e77117072..66ca1aa9a 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -3023,7 +3023,7 @@ LinkBattleExchangeData: ld a, b .doExchange ld [wSerialExchangeNybbleSendData], a - vc_hook send_byt2 + vc_hook Wireless_start_exchange callfar PrintWaitingText .syncLoop1 call Serial_ExchangeNybble @@ -3031,8 +3031,8 @@ LinkBattleExchangeData: ld a, [wSerialExchangeNybbleReceiveData] inc a jr z, .syncLoop1 - vc_hook send_byt2_ret - vc_patch FIGHT + vc_hook Wireless_end_exchange + vc_patch Wireless_net_delay_1 IF DEF(_RED_VC) || DEF(_BLUE_VC) ld b, 26 ELSE @@ -3044,8 +3044,8 @@ ENDC call Serial_ExchangeNybble dec b jr nz, .syncLoop2 - vc_hook send_dummy - vc_patch FIGHT2 + vc_hook Wireless_start_send_zero_bytes + vc_patch Wireless_net_delay_2 IF DEF(_RED_VC) || DEF(_BLUE_VC) ld b, 26 ELSE @@ -3057,7 +3057,7 @@ ENDC call Serial_SendZeroByte dec b jr nz, .syncLoop3 - vc_hook send_dummy_end + vc_hook Wireless_end_send_zero_bytes ret ExecutePlayerMove: @@ -6677,8 +6677,8 @@ BattleRandom: ld a, [hl] pop bc pop hl - vc_hook fight_ret_c - vc_patch fight_ret + vc_hook Unknown_BattleRandom_ret_c + vc_patch BattleRandom_ret IF DEF(_RED_VC) || DEF(_BLUE_VC) ret ELSE @@ -6749,9 +6749,9 @@ HandleExplodingAnimation: PlayMoveAnimation: ld [wAnimationID], a - vc_hook_red FPA_conf_Begin + vc_hook_red Reduce_move_anim_flashing_Confusion call Delay3 - vc_hook_red FPA_phy_Begin + vc_hook_red Reduce_move_anim_flashing_Psychic predef_jump MoveAnimation InitBattle:: diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm index d26d82a63..caa22c10d 100644 --- a/engine/gfx/palettes.asm +++ b/engine/gfx/palettes.asm @@ -484,7 +484,7 @@ CheckSGB: ldh a, [rJOYP] ldh a, [rJOYP] call Wait7000 - vc_hook Network_RESET + vc_hook Unknown_network_reset call Wait7000 ld a, $30 ldh [rJOYP], a diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index 296900a6f..e1b92eab8 100644 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -124,21 +124,21 @@ CableClub_DoBattleOrTradeAgain: ld hl, wSerialRandomNumberListBlock ld de, wSerialOtherGameboyRandomNumberListBlock ld bc, $11 - vc_hook Network17 + vc_hook Wireless_ExchangeBytes_1_unknown_Type5 call Serial_ExchangeBytes ld a, SERIAL_NO_DATA_BYTE ld [de], a ld hl, wSerialPlayerDataBlock ld de, wSerialEnemyDataBlock ld bc, $1a8 - vc_hook Network424 + vc_hook Wireless_ExchangeBytes_2 call Serial_ExchangeBytes ld a, SERIAL_NO_DATA_BYTE ld [de], a ld hl, wSerialPartyMonsPatchList ld de, wSerialEnemyMonsPatchList ld bc, $c8 - vc_hook Network200 + vc_hook Wireless_ExchangeBytes_3 call Serial_ExchangeBytes ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) ldh [rIE], a @@ -862,7 +862,7 @@ TradeCenter_Trade: ld de, TradeCompleted call PlaceString predef SaveSAVtoSRAM2 - vc_hook save_game_end + vc_hook Trade_save_game_end ld c, 50 call DelayFrames xor a diff --git a/engine/link/cable_club_npc.asm b/engine/link/cable_club_npc.asm index b4fb40901..41f56a212 100644 --- a/engine/link/cable_club_npc.asm +++ b/engine/link/cable_club_npc.asm @@ -31,7 +31,7 @@ CableClubNPC:: ; USING_INTERNAL_CLOCK, which allows the player to proceed past the link ; receptionist's "Please wait." It assumes that hSerialConnectionStatus is at ; its original address. - vc_hook linkCable_fake_begin + vc_hook Link_fake_connection_status vc_assert hSerialConnectionStatus == $ffaa, \ "hSerialConnectionStatus is no longer located at 00:ffaa" vc_assert USING_INTERNAL_CLOCK == $02, \ @@ -63,7 +63,7 @@ CableClubNPC:: ld a, [wCurrentMenuItem] and a jr nz, .choseNo - vc_hook linkCable_block_input + vc_hook Wireless_TryQuickSave_block_input callfar SaveSAVtoSRAM call WaitForSoundToFinish ld a, SFX_SAVE @@ -76,10 +76,10 @@ CableClubNPC:: xor a ld [hl], a ldh [hSerialReceivedNewData], a - vc_hook linkCable_fake_end + vc_hook Wireless_prompt ld [wSerialExchangeNybbleSendData], a call Serial_SyncAndExchangeNybble - vc_hook Network_RECHECK + vc_hook Wireless_net_recheck ld hl, wUnknownSerialCounter ld a, [hli] inc a diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index 0708c0cea..7db60d3d3 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -284,11 +284,11 @@ LinkMenu: .choseCancel xor a ld [wMenuJoypadPollCount], a - vc_hook Network_STOP + vc_hook Wireless_net_stop call Delay3 call CloseLinkConnection ld hl, LinkCanceledText - vc_hook Network_END + vc_hook Wireless_net_end call PrintText ld hl, wd72e res 6, [hl] diff --git a/engine/menus/save.asm b/engine/menus/save.asm index fdf69765b..b74b90587 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -39,7 +39,7 @@ LoadSAV0: ld [MBC1SRamBank], a ; This vc_hook does not have to be in any particular location. ; It is defined here because it refers to the same labels as the two lines below. - vc_hook SaveLimit + vc_hook Unknown_save_limit ld hl, sGameData ld bc, sGameDataEnd - sGameData call SAVCheckSum diff --git a/home/serial.asm b/home/serial.asm index 7fb6b82c8..f44772dfe 100644 --- a/home/serial.asm +++ b/home/serial.asm @@ -230,7 +230,7 @@ Serial_PrintWaitingTextAndSyncAndExchangeNybble:: jp LoadScreenTilesFromBuffer1 Serial_SyncAndExchangeNybble:: - vc_hook send_send_buf2 + vc_hook Wireless_WaitLinkTransfer ld a, $ff ld [wSerialExchangeNybbleReceiveData], a .loop1 @@ -254,7 +254,7 @@ Serial_SyncAndExchangeNybble:: ld a, [wSerialExchangeNybbleReceiveData] inc a jr z, .loop1 - vc_patch Network10 + vc_patch Wireless_net_delay_3 IF DEF(_RED_VC) || DEF(_BLUE_VC) ld b, 26 ELSE @@ -266,7 +266,7 @@ ENDC call Serial_ExchangeNybble dec b jr nz, .loop2 - vc_patch Network11 + vc_patch Wireless_net_delay_4 IF DEF(_RED_VC) || DEF(_BLUE_VC) ld b, 26 ELSE @@ -280,7 +280,7 @@ ENDC jr nz, .loop3 ld a, [wSerialExchangeNybbleReceiveData] ld [wSerialSyncAndExchangeNybbleReceiveData], a - vc_hook send_send_buf2_ret + vc_hook Wireless_WaitLinkTransfer_ret ret Serial_ExchangeNybble:: diff --git a/vc/pokeblue.patch.template b/vc/pokeblue.patch.template index 2a8bb119a..6427bf924 100644 --- a/vc/pokeblue.patch.template +++ b/vc/pokeblue.patch.template @@ -25,108 +25,108 @@ ;ReduceColorB1 = 0 ;0~31 (for Green Mode) ;MotionBlur1 = 31 ;0~31 (for Green Mode) ;PaletteX = c31,31,31 ;X:0~15, cR,G,B (0~31) -[SaveLimit] +[SaveLimit@Unknown_save_limit] Mode = 12 Type = 1 Index = {hex sGameData} Address = {hex sGameDataEnd} -[send_send_buf2] +[send_send_buf2@Wireless_WaitLinkTransfer] Mode = 2 Address = {HEX @} Type = 29 -[send_send_buf2_ret] +[send_send_buf2_ret@Wireless_WaitLinkTransfer_ret] Mode = 2 Address = {HEX @} Type = 30 -[send_byt2] +[send_byt2@Wireless_start_exchange] Mode = 2 Address = {HEX @+5} Type = 31 -[send_byt2_ret] +[send_byt2_ret@Wireless_end_exchange] Mode = 2 Address = {HEX @} Type = 32 -[send_dummy] +[send_dummy@Wireless_start_send_zero_bytes] Mode = 2 Address = {HEX @} Type = 33 -[send_dummy_end] +[send_dummy_end@Wireless_end_send_zero_bytes] Mode = 2 Address = {HEX @} Type = 34 -[FIGHT] +[FIGHT@Wireless_net_delay_1] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[FIGHT2] +[FIGHT2@Wireless_net_delay_2] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network10] +[Network10@Wireless_net_delay_3] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network11] +[Network11@Wireless_net_delay_4] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network17] +[Network17@Wireless_ExchangeBytes_1_unknown_Type5] Mode = 2 Address = {HEX @} Type = 5 -[Network424] +[Network424@Wireless_ExchangeBytes_2] Mode = 2 Address = {HEX @} Type = 4 -[Network200] +[Network200@Wireless_ExchangeBytes_3] Mode = 2 Address = {HEX @} Type = 4 -[Network_RECHECK] +[Network_RECHECK@Wireless_net_recheck] Mode = 2 Address = {HEX @} Type = 7 -[Network_STOP] +[Network_STOP@Wireless_net_stop] Mode = 2 Address = {HEX @} Type = 8 -[Network_END] +[Network_END@Wireless_net_end] Mode = 2 Address = {HEX @} Type = 9 -[Network_RESET] +[Network_RESET@Unknown_network_reset] Mode = 2 Address = {HEX @} Type = 10 -[linkCable fake begin] +[linkCable fake begin@Link_fake_connection_status] Mode = 2 Address = {HEX @} Type = 16 -[linkCable fake end] +[linkCable fake end@Wireless_prompt] Mode = 2 Address = {HEX @} Type = 17 -[linkCable block input] +[linkCable block input@Wireless_TryQuickSave_block_input] Mode = 2 Address = {HEX @+5} Type = 18 @@ -136,29 +136,29 @@ Type = 18 ;Address = 0x59E6 ;Type = 19 -[save game end] +[save game end@Trade_save_game_end] Mode = 2 Address = {HEX @} Type = 20 -[Change_MSG] +[Change_MSG@Change_link_closed_inactivity_message] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH_ +1 20} -[fight_ret] +[fight_ret@BattleRandom_ret] Mode = 1 Address = {HEX @} Fixcode = {PATCH} -[fight_ret_c] +[fight_ret_c@Unknown_BattleRandom_ret_c] Mode = 2 Address = {HEX @} Type = 98 ;rsm003758 ;No151 -[FPA 001 Begin] +[FPA 001 Begin@Reduce_move_anim_flashing_Mega_Punch_Self_Destruct_Explosion] Mode = 3 Type = 0 Address = {HEX @} @@ -169,7 +169,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == == || == == == == == || == == == == == } ConditionValueC = {dws_ "M" "E" "G" "A" "P" MEGA_PUNCH 00 "S" "E" "L" "F" MEGA_PUNCH 00 "E" "X" "P" "L" MEGA_PUNCH } -[FPA 001 End] +[FPA 001 End@Stop_reducing_move_anim_flashing_Mega_Punch_Explosion] Mode = 3 Type = 1 Address = {HEX @} @@ -182,7 +182,7 @@ ConditionValueC = {dws_ "M" "E" "G" "A" ;rsm141151 ;No117 -[FPA 002 Begin] +[FPA 002 Begin@Reduce_move_anim_flashing_Guillotine] Mode = 3 Type = 0 Address = {HEX @} @@ -195,7 +195,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "G" "U" "I" "L" GUILLOTINE } -[FPA 002 End] +[FPA 002 End@Stop_reducing_move_anim_flashing_Guillotine] Mode = 3 Type = 1 Address = {HEX @} @@ -208,7 +208,7 @@ ConditionValueC = {dws_ "G" "U" "I" "L" ;rsm143918 ;No150 -[FPA 003 Begin] +[FPA 003 Begin@Reduce_move_anim_flashing_Mega_Kick] Mode = 3 Type = 0 Address = {HEX @} @@ -223,7 +223,7 @@ ConditionValueC = {dws_ "M" "E" "G" "A" ;rsm152422 ;No131 -[FPA 004 Begin] +[FPA 004 Begin@Reduce_move_anim_flashing_Blizzard] Mode = 3 Type = 0 Address = {HEX @} @@ -237,7 +237,7 @@ ConditionValueC = {dws_ "B" "L" "I" "Z" ;rsm160334 ;No123 -[FPA 005 Begin@FPA_Bubblebeam_Begin] +[FPA 005 Begin@Reduce_move_anim_flashing_Bubblebeam] Mode = 3 Type = 0 Address = {hex @} @@ -248,7 +248,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "B" "U" "B" "B" BUBBLEBEAM } -[FPA 005 End] +[FPA 005 End@Stop_reducing_move_anim_flashing_Bubblebeam_Hyper_Beam_Blizzard] Mode = 3 Type = 1 Address = {HEX @} @@ -260,7 +260,7 @@ ConditionValueC = {dws_ "B" "U" "B" "B" ;rsm163356 ;No116 -[FPA 006 Begin@FPA_Hyper_Beam_Begin] +[FPA 006 Begin@Reduce_move_anim_flashing_Hyper_Beam] Mode = 3 Type = 0 Address = {HEX @} @@ -277,7 +277,7 @@ ConditionValueC = {dws_ "H" "Y" "P" "E" ;rsm174631 ;No57 -[FPA 007 Begin@FPA_Thunderbolt_Begin] +[FPA 007 Begin@Reduce_move_anim_flashing_Thunderbolt] Mode = 3 Type = 0 Address = {HEX @} @@ -289,7 +289,7 @@ ConditionValueB = {dws_ == == == == ConditionValueC = {dws_ "T" "H" "U" "N" THUNDERBOLT } -[FPA 007 End@FPA_Thunderbolt_End] +[FPA 007 End@Stop_reducing_move_anim_flashing_Thunderbolt] Mode = 3 Type = 1 Address = {HEX @} @@ -301,7 +301,7 @@ ConditionValueC = {dws_ "T" "H" "U" "N" ;rsm134518 ;No159 -[FPA 008 Begin@FPA_Reflect_Begin] +[FPA 008 Begin@Reduce_move_anim_flashing_Reflect] Mode = 3 Type = 0 Address = {hex @} @@ -314,7 +314,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "R" "E" "F" "L" REFLECT } -[FPA 008 End] +[FPA 008 End@Stop_reducing_move_anim_flashing_Reflect] Mode = 3 Type = 1 Address = {HEX @} @@ -328,7 +328,7 @@ ConditionValueC = {dws_ "R" "E" "F" "L" ;rsm140510 ;No56 -[FPA 009 Begin] +[FPA 009 Begin@Reduce_move_anim_flashing_Self_Destruct] Mode = 3 Type = 0 Address = {HEX @} @@ -339,7 +339,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "S" "E" "L" "F" SELFDESTRUCT} -[FPA 009 End] +[FPA 009 End@Stop_reducing_move_anim_flashing_Self_Destruct] Mode = 3 Type = 1 Address = {HEX @} @@ -350,7 +350,7 @@ ConditionValueC = {dws_ "S" "E" "L" "F" ;rsm150211 ;No156 -[FPA 010 Begin@FPA_Dream_Eater_Begin] +[FPA 010 Begin@Reduce_move_anim_flashing_Dream_Eater] Mode = 3 Type = 0 Address = {hex @} @@ -374,7 +374,7 @@ ConditionValueC = {dws_ "D" "R" "E" "A" ;rsm163334 ;No36 -[FPA 011 Begin@FPA_Spore_Begin] +[FPA 011 Begin@Reduce_move_anim_flashing_Spore] Mode = 3 Type = 0 Address = {HEX @} @@ -387,7 +387,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "S" "P" "O" "R" SPORE } -[FPA 011 End] +[FPA 011 End@Stop_reducing_move_anim_flashing_Spore] Mode = 3 Type = 1 Address = {hex @} @@ -398,7 +398,7 @@ ConditionValueC = {dws_ "S" "P" "O" "R" ;rsm012224 ;No12 -[FPA 012 Begin] +[FPA 012 Begin@Reduce_move_anim_flashing_Rock_Slide] Mode = 3 Type = 0 Address = {HEX @} @@ -409,7 +409,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "R" "O" "C" "K" ROCK_SLIDE } -[FPA 012 End] +[FPA 012 End@Stop_reducing_move_anim_flashing_Rock_Slide_Dream_Eater] Mode = 3 Type = 1 Address = {hex @} @@ -424,7 +424,7 @@ ConditionValueC = {dws_ "R" "O" "C" "K" ;explosion ;No76 -[FPA 76 Begin] +[FPA 76 Begin@Reduce_move_anim_flashing_Explosion] Mode = 3 Type = 0 Address = 0x78186 diff --git a/vc/pokered.patch.template b/vc/pokered.patch.template index 52f5d0fe4..6b015ca42 100644 --- a/vc/pokered.patch.template +++ b/vc/pokered.patch.template @@ -25,7 +25,7 @@ ;ReduceColorB1 = 0 ;0~31 (for Green Mode) ;MotionBlur1 = 31 ;0~31 (for Green Mode) ;PaletteX = c31,31,31 ;X:0~15, cR,G,B (0~31) -[SaveLimit] +[SaveLimit@Unknown_save_limit] Mode = 12 Type = 1 Index = {hex sGameData} @@ -36,102 +36,102 @@ Address = {hex sGameDataEnd} ;Address = 0x1551 ;Type = 3 -[send_send_buf2] +[send_send_buf2@Wireless_WaitLinkTransfer] Mode = 2 Address = {HEX @} Type = 29 -[send_send_buf2_ret] +[send_send_buf2_ret@Wireless_WaitLinkTransfer_ret] Mode = 2 Address = {HEX @} Type = 30 -[send_byt2] +[send_byt2@Wireless_start_exchange] Mode = 2 Address = {HEX @+5} Type = 31 -[send_byt2_ret] +[send_byt2_ret@Wireless_end_exchange] Mode = 2 Address = {HEX @} Type = 32 -[send_dummy] +[send_dummy@Wireless_start_send_zero_bytes] Mode = 2 Address = {HEX @} Type = 33 -[send_dummy_end] +[send_dummy_end@Wireless_end_send_zero_bytes] Mode = 2 Address = {HEX @} Type = 34 -[FIGHT] +[FIGHT@Wireless_net_delay_1] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[FIGHT2] +[FIGHT2@Wireless_net_delay_2] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network10] +[Network10@Wireless_net_delay_3] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network11] +[Network11@Wireless_net_delay_4] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network17] +[Network17@Wireless_ExchangeBytes_1_unknown_Type5] Mode = 2 Address = {HEX @} Type = 5 -[Network424] +[Network424@Wireless_ExchangeBytes_2] Mode = 2 Address = {HEX @} Type = 4 -[Network200] +[Network200@Wireless_ExchangeBytes_3] Mode = 2 Address = {HEX @} Type = 4 -[Network_RECHECK] +[Network_RECHECK@Wireless_net_recheck] Mode = 2 Address = {HEX @} Type = 7 -[Network_STOP] +[Network_STOP@Wireless_net_stop] Mode = 2 Address = {HEX @} Type = 8 -[Network_END] +[Network_END@Wireless_net_end] Mode = 2 Address = {HEX @} Type = 9 -[Network_RESET] +[Network_RESET@Unknown_network_reset] Mode = 2 Address = {HEX @} Type = 10 -[linkCable fake begin] +[linkCable fake begin@Link_fake_connection_status] Mode = 2 Address = {HEX @} Type = 16 -[linkCable fake end] +[linkCable fake end@Wireless_prompt] Mode = 2 Address = {HEX @} Type = 17 -[linkCable block input] +[linkCable block input@Wireless_TryQuickSave_block_input] Mode = 2 Address = {HEX @+5} Type = 18 @@ -141,24 +141,24 @@ Type = 18 ;Address = 0x59E6 ;Type = 19 -[save game end] +[save game end@Trade_save_game_end] Mode = 2 Address = {HEX @} Type = 20 ;93 A7 A4 7F AB A8 AD AA 7F A7 ;at 93 -[Change_MSG] +[Change_MSG@Change_link_closed_inactivity_message] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH_ +1 20} -[fight_ret] +[fight_ret@BattleRandom_ret] Mode = 1 Address = {HEX @} Fixcode = {PATCH} -[fight_ret_c] +[fight_ret_c@Unknown_BattleRandom_ret_c] Mode = 2 Address = {HEX @} Type = 98 @@ -183,7 +183,7 @@ Type = 98 ;rsm033659 ;no151 mega punch -[FPA 001 Begin] +[FPA 001 Begin@Reduce_move_anim_flashing_Mega_Punch_Self_Destruct_Explosion] Mode = 3 Type = 0 Address = {HEX @} @@ -197,7 +197,7 @@ ConditionValueB = {dws_ == == == == ConditionValueC = {dws_ "M" "E" "G" "A" "P" MEGA_PUNCH 00 "S" "E" "L" "F" "D" MEGA_PUNCH 00 "E" "X" "P" "L" MEGA_PUNCH } -[FPA 001 End] +[FPA 001 End@Stop_reducing_move_anim_flashing_Mega_Punch] Mode = 3 Type = 1 Address = {HEX @} @@ -209,7 +209,7 @@ ConditionValueC = {dws_ "M" "E" "G" "A" ;rsm032916 ;no117 guillotine -[FPA 002 Begin] +[FPA 002 Begin@Reduce_move_anim_flashing_Guillotine] Mode = 3 Type = 0 Address = {HEX @} @@ -222,7 +222,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "G" "U" "I" "L" GUILLOTINE } -[FPA 002 End] +[FPA 002 End@Stop_reducing_move_anim_flashing_Guillotine] Mode = 3 Type = 1 Address = {HEX @} @@ -234,7 +234,7 @@ ConditionValueC = {dws_ "G" "U" "I" "L" ;rsm041307 ;no150 mega kick -[FPA 003 Begin] +[FPA 003 Begin@Reduce_move_anim_flashing_Mega_Kick] Mode = 3 Type = 0 Address = {HEX @} @@ -250,7 +250,7 @@ ConditionValueC = {dws_ "M" "E" "G" "A" ;rsm001929 ;no123 bubble beam -[FPA 004 Begin@FPA_Bubblebeam_Begin] +[FPA 004 Begin@Reduce_move_anim_flashing_Bubblebeam] Mode = 3 Type = 0 Address = {hex @} @@ -261,7 +261,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "B" "U" "B" "B" BUBBLEBEAM } -[FPA 004 End] +[FPA 004 End@Stop_reducing_move_anim_flashing_Bubblebeam_Mega_Kick] Mode = 3 Type = 1 Address = {hex @} @@ -273,7 +273,7 @@ ConditionValueC = {dws_ "B" "U" "B" "B" ;rsm103658 ;no116 hyper beam -[FPA 005 Begin@FPA_Hyper_Beam_Begin] +[FPA 005 Begin@Reduce_move_anim_flashing_Hyper_Beam] Mode = 3 Type = 0 Address = {HEX @} @@ -286,7 +286,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "H" "Y" "P" "E" HYPER_BEAM } -[FPA 005 End] +[FPA 005 End@Stop_reducing_move_anim_flashing_Hyper_Beam] Mode = 3 Type = 1 Address = {HEX @} @@ -298,7 +298,7 @@ ConditionValueC = {dws_ "H" "Y" "P" "E" ;rsm133358 ;no57 thunderbolt -[FPA 006 Begin@FPA_Thunderbolt_Begin] +[FPA 006 Begin@Reduce_move_anim_flashing_Thunderbolt] Mode = 3 Type = 0 Address = {HEX @} @@ -310,7 +310,7 @@ ConditionValueB = {dws_ == == == == ConditionValueC = {dws_ "T" "H" "U" "N" THUNDERBOLT } -[FPA 006 End@FPA_Thunderbolt_End] +[FPA 006 End@Stop_reducing_move_anim_flashing_Thunderbolt] Mode = 3 Type = 1 Address = {HEX @} @@ -321,7 +321,7 @@ ConditionValueC = {dws_ "T" "H" "U" "N" ;rsm152340 ;no159 reflect -[FPA 007 Begin@FPA_Reflect_Begin] +[FPA 007 Begin@Reduce_move_anim_flashing_Reflect] Mode = 3 Type = 0 Address = {hex @} @@ -334,7 +334,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "R" "E" "F" "L" REFLECT } -[FPA 007 End] +[FPA 007 End@Stop_reducing_move_anim_flashing_Reflect] Mode = 3 Type = 1 Address = {HEX @} @@ -345,7 +345,7 @@ ConditionValueC = {dws_ "R" "E" "F" "L" ;rsm171812 ;no156 dream eater -[FPA 008 Begin@FPA_Dream_Eater_Begin] +[FPA 008 Begin@Reduce_move_anim_flashing_Dream_Eater] Mode = 3 Type = 0 Address = {hex @} @@ -358,7 +358,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "D" "R" "E" "A" DREAM_EATER } -[FPA 008 End] +[FPA 008 End@Stop_reducing_move_anim_flashing_Dream_Eater] Mode = 3 Type = 1 Address = {HEX @} @@ -369,7 +369,7 @@ ConditionValueC = {dws_ "B" "L" "I" "Z" ;rsm174650 ;no36 spore -[FPA 009 Begin@FPA_Spore_Begin] +[FPA 009 Begin@Reduce_move_anim_flashing_Spore] Mode = 3 Type = 0 Address = {HEX @} @@ -385,7 +385,7 @@ ConditionValueC = {dws_ "S" "P" "O" "R" ;rsm152115 ;no12 rock slide -[FPA 010 Begin] +[FPA 010 Begin@Reduce_move_anim_flashing_Rock_Slide] Mode = 3 Type = 0 Address = {HEX @} @@ -396,7 +396,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "R" "O" "C" "K" ROCK_SLIDE } -[FPA 010 End] +[FPA 010 End@Stop_reducing_move_anim_flashing] Mode = 3 Type = 1 Address = {HEX @} @@ -408,7 +408,7 @@ ConditionValueC = {dws_ "D" "R" "E" "A" ;explosion ;No76 explosion -[FPA 76 Begin] +[FPA 76 Begin@Reduce_move_anim_flashing_Explosion] Mode = 3 Type = 0 Address = {HEX @} @@ -421,7 +421,7 @@ ConditionValueC = {dws_ "E" "X" "P" "L" ;No56 self-destruct -[FPA 56 Begin] +[FPA 56 Begin@Reduce_move_anim_flashing_Self_Destruct] Mode = 3 Type = 0 Address = {HEX @} @@ -434,7 +434,7 @@ ConditionValueC = {dws_ "S" "E" "L" "F" ;No131 blizzard -[FPA 131 Begin] +[FPA 131 Begin@Reduce_move_anim_flashing_Blizzard] Mode = 3 Type = 0 Address = {HEX @} @@ -447,7 +447,7 @@ ConditionValueC = {dws_ "B" "L" "I" "Z" ;confusion -[FPA conf Begin] +[FPA conf Begin@Reduce_move_anim_flashing_Confusion] Mode = 3 Type = 0 Address = {hex @} @@ -459,7 +459,7 @@ ConditionValueB = {dws_ == == == == ConditionValueC = {dws_ "C" "O" "N" "F" "S" CONFUSION } ;phychic -[FPA phy Begin] +[FPA phy Begin@Reduce_move_anim_flashing_Psychic] Mode = 3 Type = 0 Address = {hex @} @@ -470,7 +470,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == == } ConditionValueC = {dws_ "P" "S" "Y" "C" "I" PSYCHIC_M } -[FPA phy End] +[FPA phy End@Stop_reducing_move_anim_flashing_Psychic] Mode = 3 Type = 1 Address = {hex @} From 6b5be9129cabe72b9f775b02db1bf7e7169153da Mon Sep 17 00:00:00 2001 From: vulcandth Date: Mon, 6 Jun 2022 16:25:31 -0500 Subject: [PATCH 12/45] RGBDS syntax updates (#358) New MACRO and DEF syntax --- audio/low_health_alarm.asm | 2 +- constants/audio_constants.asm | 34 +-- constants/battle_constants.asm | 50 ++-- constants/credits_constants.asm | 2 +- constants/event_constants.asm | 2 +- constants/gfx_constants.asm | 40 +-- constants/hardware_constants.asm | 228 +++++++++--------- constants/hide_show_constants.asm | 6 +- constants/icon_constants.asm | 4 +- constants/input_constants.asm | 18 +- constants/item_constants.asm | 42 ++-- constants/map_constants.asm | 16 +- constants/map_data_constants.asm | 2 +- constants/map_object_constants.asm | 32 +-- constants/menu_constants.asm | 16 +- constants/misc_constants.asm | 10 +- constants/move_animation_constants.asm | 8 +- constants/move_constants.asm | 4 +- constants/move_effect_constants.asm | 2 +- constants/music_constants.asm | 24 +- constants/oam_constants.asm | 24 +- constants/palette_constants.asm | 12 +- constants/pokedex_constants.asm | 2 +- constants/pokemon_constants.asm | 10 +- constants/pokemon_data_constants.asm | 62 ++--- constants/script_constants.asm | 30 +-- constants/serial_constants.asm | 36 +-- constants/sprite_constants.asm | 4 +- constants/sprite_data_constants.asm | 10 +- constants/text_constants.asm | 14 +- constants/tileset_constants.asm | 2 +- constants/trainer_constants.asm | 8 +- constants/type_constants.asm | 6 +- data/battle_anims/special_effect_pointers.asm | 2 +- data/battle_anims/special_effects.asm | 2 +- data/battle_anims/subanimations.asm | 2 +- data/events/bench_guys.asm | 2 +- data/events/hidden_coins.asm | 2 +- data/events/hidden_item_coords.asm | 2 +- data/events/hidden_objects.asm | 6 +- data/growth_rates.asm | 2 +- data/icon_pointers.asm | 2 +- data/items/vending_prices.asm | 2 +- data/maps/force_bike_surf.asm | 2 +- data/maps/special_warps.asm | 6 +- data/maps/sprite_sets.asm | 6 +- data/maps/town_map_entries.asm | 4 +- data/moves/animations.asm | 2 +- data/moves/moves.asm | 2 +- data/pokemon/cries.asm | 2 +- data/predef_pointers.asm | 12 +- data/sgb/sgb_packets.asm | 18 +- data/sprites/sprites.asm | 2 +- data/text_boxes.asm | 2 +- data/text_predef_pointers.asm | 2 +- data/tilemaps.asm | 2 +- data/tilesets/bookshelf_tile_ids.asm | 2 +- data/tilesets/collision_tile_ids.asm | 2 +- data/tilesets/door_tile_ids.asm | 2 +- data/tilesets/spinner_tiles.asm | 2 +- data/tilesets/tileset_headers.asm | 2 +- data/tilesets/warp_carpet_tile_ids.asm | 2 +- data/tilesets/warp_tile_ids.asm | 2 +- data/trainers/move_choices.asm | 4 +- data/trainers/pic_pointers_money.asm | 2 +- data/yes_no_menu_strings.asm | 2 +- engine/battle/animations.asm | 2 +- engine/battle/battle_transitions.asm | 2 +- engine/events/diploma.asm | 4 +- .../hidden_objects/cinnabar_gym_quiz.asm | 6 +- engine/gfx/mon_icons.asm | 4 +- engine/items/town_map.asm | 2 +- engine/movie/intro.asm | 2 +- engine/movie/oak_speech/init_player_data.asm | 2 +- engine/movie/trade.asm | 6 +- engine/overworld/dust_smoke.asm | 2 +- engine/overworld/movement.asm | 2 +- engine/overworld/player_animations.asm | 2 +- home/init.asm | 2 +- home/print_num.asm | 22 +- home/text.asm | 2 +- home/text_script.asm | 2 +- home/vblank.asm | 2 +- macros/asserts.asm | 172 ++++++------- macros/code.asm | 16 +- macros/const.asm | 70 +++--- macros/coords.asm | 36 +-- macros/data.asm | 78 +++--- macros/farcall.asm | 12 +- macros/gfx.asm | 28 +-- macros/predef.asm | 14 +- macros/scripts/audio.asm | 54 ++--- macros/scripts/events.asm | 138 +++++------ macros/scripts/maps.asm | 184 +++++++------- macros/scripts/text.asm | 88 +++---- macros/vc.asm | 56 ++--- macros/wram.asm | 18 +- rgbdscheck.asm | 8 +- sram.asm | 12 +- vc/pokeblue.constants.asm | 4 +- vc/pokered.constants.asm | 4 +- 101 files changed, 964 insertions(+), 964 deletions(-) diff --git a/audio/low_health_alarm.asm b/audio/low_health_alarm.asm index a550cf700..08060aab7 100644 --- a/audio/low_health_alarm.asm +++ b/audio/low_health_alarm.asm @@ -61,7 +61,7 @@ Music_DoLowHealthAlarm:: jr nz, .copyLoop ret -alarm_tone: MACRO +MACRO alarm_tone db \1 ; length db \2 ; envelope dw \3 ; frequency diff --git a/constants/audio_constants.asm b/constants/audio_constants.asm index 69ec4e747..59900fecd 100644 --- a/constants/audio_constants.asm +++ b/constants/audio_constants.asm @@ -13,7 +13,7 @@ const A_ ; 9 const A# ; A const B_ ; B -NUM_NOTES EQU const_value +DEF NUM_NOTES EQU const_value ; channel ; Audio[1|2|3]_HWChannelBaseAddresses, Audio[1|2|3]_HWChannelDisableMasks, @@ -23,31 +23,31 @@ NUM_NOTES EQU const_value const Ch2 ; 1 const Ch3 ; 2 const Ch4 ; 3 -NUM_MUSIC_CHANS EQU const_value +DEF NUM_MUSIC_CHANS EQU const_value const Ch5 ; 4 const Ch6 ; 5 const Ch7 ; 6 const Ch8 ; 7 -NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS -NUM_CHANNELS EQU const_value +DEF NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS +DEF NUM_CHANNELS EQU const_value ; HW sound channel register base addresses -HW_CH1_BASE EQU LOW(rNR10) -HW_CH2_BASE EQU LOW(rNR21) - 1 -HW_CH3_BASE EQU LOW(rNR30) -HW_CH4_BASE EQU LOW(rNR41) - 1 +DEF HW_CH1_BASE EQU LOW(rNR10) +DEF HW_CH2_BASE EQU LOW(rNR21) - 1 +DEF HW_CH3_BASE EQU LOW(rNR30) +DEF HW_CH4_BASE EQU LOW(rNR41) - 1 ; HW sound channel enable bit masks -HW_CH1_ENABLE_MASK EQU %00010001 -HW_CH2_ENABLE_MASK EQU %00100010 -HW_CH3_ENABLE_MASK EQU %01000100 -HW_CH4_ENABLE_MASK EQU %10001000 +DEF HW_CH1_ENABLE_MASK EQU %00010001 +DEF HW_CH2_ENABLE_MASK EQU %00100010 +DEF HW_CH3_ENABLE_MASK EQU %01000100 +DEF HW_CH4_ENABLE_MASK EQU %10001000 ; HW sound channel disable bit masks -HW_CH1_DISABLE_MASK EQU (~HW_CH1_ENABLE_MASK & $ff) -HW_CH2_DISABLE_MASK EQU (~HW_CH2_ENABLE_MASK & $ff) -HW_CH3_DISABLE_MASK EQU (~HW_CH3_ENABLE_MASK & $ff) -HW_CH4_DISABLE_MASK EQU (~HW_CH4_ENABLE_MASK & $ff) +DEF HW_CH1_DISABLE_MASK EQU (~HW_CH1_ENABLE_MASK & $ff) +DEF HW_CH2_DISABLE_MASK EQU (~HW_CH2_ENABLE_MASK & $ff) +DEF HW_CH3_DISABLE_MASK EQU (~HW_CH3_ENABLE_MASK & $ff) +DEF HW_CH4_DISABLE_MASK EQU (~HW_CH4_ENABLE_MASK & $ff) const_def 1 const REG_DUTY_SOUND_LEN ; 1 @@ -65,4 +65,4 @@ HW_CH4_DISABLE_MASK EQU (~HW_CH4_ENABLE_MASK & $ff) const BIT_ROTATE_DUTY_CYCLE ; 6 ; if rotating duty cycle ; wChannelFlags2 constant (only has one flag) -BIT_EXECUTE_MUSIC EQU 0 ; if in execute music +DEF BIT_EXECUTE_MUSIC EQU 0 ; if in execute music diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm index fdbe87758..b394b7a2a 100644 --- a/constants/battle_constants.asm +++ b/constants/battle_constants.asm @@ -1,6 +1,6 @@ -MAX_LEVEL EQU 100 +DEF MAX_LEVEL EQU 100 -NUM_MOVES EQU 4 +DEF NUM_MOVES EQU 4 ; VitaminStats indexes (see data/battle/stat_names.asm) const_def @@ -9,7 +9,7 @@ NUM_MOVES EQU 4 const STAT_DEFENSE const STAT_SPEED const STAT_SPECIAL -NUM_STATS EQU const_value +DEF NUM_STATS EQU const_value ; StatModTextStrings indexes (see data/battle/stat_mod_names.asm) const_def @@ -20,20 +20,20 @@ NUM_STATS EQU const_value const MOD_ACCURACY const MOD_EVASION const_skip 2 -NUM_STAT_MODS EQU const_value +DEF NUM_STAT_MODS EQU const_value ; Moves struct fields (see data/moves/moves.asm) rsreset -MOVE_ANIM rb -MOVE_EFFECT rb -MOVE_POWER rb -MOVE_TYPE rb -MOVE_ACC rb -MOVE_PP rb -MOVE_LENGTH EQU _RS +DEF MOVE_ANIM rb +DEF MOVE_EFFECT rb +DEF MOVE_POWER rb +DEF MOVE_TYPE rb +DEF MOVE_ACC rb +DEF MOVE_PP rb +DEF MOVE_LENGTH EQU _RS ; D733 flags -BIT_TEST_BATTLE EQU 0 +DEF BIT_TEST_BATTLE EQU 0 ; battle type constants (wBattleType values) const_def @@ -42,33 +42,33 @@ BIT_TEST_BATTLE EQU 0 const BATTLE_TYPE_SAFARI ; 2 ; damage limits before type effectiveness -MIN_NEUTRAL_DAMAGE EQU 2 -MAX_NEUTRAL_DAMAGE EQU 999 +DEF MIN_NEUTRAL_DAMAGE EQU 2 +DEF MAX_NEUTRAL_DAMAGE EQU 999 ; fixed damage constants -SONICBOOM_DAMAGE EQU 20 -DRAGON_RAGE_DAMAGE EQU 40 +DEF SONICBOOM_DAMAGE EQU 20 +DEF DRAGON_RAGE_DAMAGE EQU 40 ; type effectiveness factors, scaled by 10 -SUPER_EFFECTIVE EQU 20 -MORE_EFFECTIVE EQU 15 -EFFECTIVE EQU 10 -NOT_VERY_EFFECTIVE EQU 05 -NO_EFFECT EQU 00 +DEF SUPER_EFFECTIVE EQU 20 +DEF MORE_EFFECTIVE EQU 15 +DEF EFFECTIVE EQU 10 +DEF NOT_VERY_EFFECTIVE EQU 05 +DEF NO_EFFECT EQU 00 ; non-volatile statuses -SLP EQU %111 ; sleep counter +DEF SLP EQU %111 ; sleep counter const_def 3 const PSN ; 3 const BRN ; 4 const FRZ ; 5 const PAR ; 6 -MAX_STAT_VALUE EQU 999 +DEF MAX_STAT_VALUE EQU 999 ; trainer dvs -ATKDEFDV_TRAINER EQU $98 -SPDSPCDV_TRAINER EQU $88 +DEF ATKDEFDV_TRAINER EQU $98 +DEF SPDSPCDV_TRAINER EQU $88 ; wPlayerBattleStatus1 or wEnemyBattleStatus1 bit flags const_def diff --git a/constants/credits_constants.asm b/constants/credits_constants.asm index 78dc76759..ba62012b9 100644 --- a/constants/credits_constants.asm +++ b/constants/credits_constants.asm @@ -64,7 +64,7 @@ const CRED_FUKUI ; $3D const CRED_CLUB ; $3E const CRED_PAAD ; $3F -NUM_CRED_STRINGS EQU const_value +DEF NUM_CRED_STRINGS EQU const_value const_def -1, -1 const CRED_TEXT_FADE_MON ; $FF diff --git a/constants/event_constants.asm b/constants/event_constants.asm index 4f1698808..9e2ebcc62 100644 --- a/constants/event_constants.asm +++ b/constants/event_constants.asm @@ -772,4 +772,4 @@ ; End of events const_next $A00 -NUM_EVENTS EQU const_value +DEF NUM_EVENTS EQU const_value diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm index 91463e7c2..522b6a679 100644 --- a/constants/gfx_constants.asm +++ b/constants/gfx_constants.asm @@ -1,33 +1,33 @@ -TILE_WIDTH EQU 8 ; pixels -LEN_1BPP_TILE EQU 1 * TILE_WIDTH ; bytes -LEN_2BPP_TILE EQU 2 * TILE_WIDTH ; bytes +DEF TILE_WIDTH EQU 8 ; pixels +DEF LEN_1BPP_TILE EQU 1 * TILE_WIDTH ; bytes +DEF LEN_2BPP_TILE EQU 2 * TILE_WIDTH ; bytes -SCREEN_WIDTH EQU 20 -SCREEN_HEIGHT EQU 18 -SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels -SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * TILE_WIDTH ; pixels +DEF SCREEN_WIDTH EQU 20 +DEF SCREEN_HEIGHT EQU 18 +DEF SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels +DEF SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * TILE_WIDTH ; pixels -BG_MAP_WIDTH EQU 32 ; tiles -BG_MAP_HEIGHT EQU 32 ; tiles +DEF BG_MAP_WIDTH EQU 32 ; tiles +DEF BG_MAP_HEIGHT EQU 32 ; tiles -SPRITEBUFFERSIZE EQU 7 * 7 * LEN_1BPP_TILE +DEF SPRITEBUFFERSIZE EQU 7 * 7 * LEN_1BPP_TILE ; HP bar -HP_BAR_GREEN EQU 0 -HP_BAR_YELLOW EQU 1 -HP_BAR_RED EQU 2 +DEF HP_BAR_GREEN EQU 0 +DEF HP_BAR_YELLOW EQU 1 +DEF HP_BAR_RED EQU 2 ; wOAMBuffer -NUM_SPRITE_OAM_STRUCTS EQU 40 +DEF NUM_SPRITE_OAM_STRUCTS EQU 40 ; hAutoBGTransferEnabled -TRANSFERTOP EQU 0 -TRANSFERMIDDLE EQU 1 -TRANSFERBOTTOM EQU 2 +DEF TRANSFERTOP EQU 0 +DEF TRANSFERMIDDLE EQU 1 +DEF TRANSFERBOTTOM EQU 2 ; hRedrawRowOrColumnMode -REDRAW_COL EQU 1 -REDRAW_ROW EQU 2 +DEF REDRAW_COL EQU 1 +DEF REDRAW_ROW EQU 2 ; tile list ids ; TileIDListPointerTable indexes (see data/tilemaps.asm) @@ -40,4 +40,4 @@ REDRAW_ROW EQU 2 const TILEMAP_GENGAR_INTRO_3 const TILEMAP_GAME_BOY const TILEMAP_LINK_CABLE -NUM_TILEMAPS EQU const_value +DEF NUM_TILEMAPS EQU const_value diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm index 993a02f5f..0cc833837 100644 --- a/constants/hardware_constants.asm +++ b/constants/hardware_constants.asm @@ -1,130 +1,130 @@ ; From http://nocash.emubase.de/pandocs.htm. -GBC EQU $11 +DEF GBC EQU $11 ; memory map -VRAM_Begin EQU $8000 -VRAM_End EQU $a000 -SRAM_Begin EQU $a000 -SRAM_End EQU $c000 -WRAM0_Begin EQU $c000 -WRAM0_End EQU $d000 -WRAM1_Begin EQU $d000 -WRAM1_End EQU $e000 +DEF VRAM_Begin EQU $8000 +DEF VRAM_End EQU $a000 +DEF SRAM_Begin EQU $a000 +DEF SRAM_End EQU $c000 +DEF WRAM0_Begin EQU $c000 +DEF WRAM0_End EQU $d000 +DEF WRAM1_Begin EQU $d000 +DEF WRAM1_End EQU $e000 ; hardware registers $ff00-$ff80 (see below) -HRAM_Begin EQU $ff80 -HRAM_End EQU $ffff +DEF HRAM_Begin EQU $ff80 +DEF HRAM_End EQU $ffff ; MBC1 -MBC1SRamEnable EQU $0000 -MBC1RomBank EQU $2000 -MBC1SRamBank EQU $4000 -MBC1SRamBankingMode EQU $6000 +DEF MBC1SRamEnable EQU $0000 +DEF MBC1RomBank EQU $2000 +DEF MBC1SRamBank EQU $4000 +DEF MBC1SRamBankingMode EQU $6000 -SRAM_DISABLE EQU $00 -SRAM_ENABLE EQU $0a +DEF SRAM_DISABLE EQU $00 +DEF SRAM_ENABLE EQU $0a -NUM_SRAM_BANKS EQU 4 +DEF NUM_SRAM_BANKS EQU 4 ; interrupt flags -VBLANK EQU 0 -LCD_STAT EQU 1 -TIMER EQU 2 -SERIAL EQU 3 -JOYPAD EQU 4 +DEF VBLANK EQU 0 +DEF LCD_STAT EQU 1 +DEF TIMER EQU 2 +DEF SERIAL EQU 3 +DEF JOYPAD EQU 4 -LY_VBLANK EQU 145 +DEF LY_VBLANK EQU 145 ; serial -START_TRANSFER_EXTERNAL_CLOCK EQU $80 -START_TRANSFER_INTERNAL_CLOCK EQU $81 +DEF START_TRANSFER_EXTERNAL_CLOCK EQU $80 +DEF START_TRANSFER_INTERNAL_CLOCK EQU $81 ; Hardware registers -rJOYP EQU $ff00 ; Joypad (R/W) -rSB EQU $ff01 ; Serial transfer data (R/W) -rSC EQU $ff02 ; Serial Transfer Control (R/W) -rSC_ON EQU 7 -rSC_CGB EQU 1 -rSC_CLOCK EQU 0 -rDIV EQU $ff04 ; Divider Register (R/W) -rTIMA EQU $ff05 ; Timer counter (R/W) -rTMA EQU $ff06 ; Timer Modulo (R/W) -rTAC EQU $ff07 ; Timer Control (R/W) -rTAC_ON EQU 2 -rTAC_4096_HZ EQU 0 -rTAC_262144_HZ EQU 1 -rTAC_65536_HZ EQU 2 -rTAC_16384_HZ EQU 3 -rIF EQU $ff0f ; Interrupt Flag (R/W) -rNR10 EQU $ff10 ; Channel 1 Sweep register (R/W) -rNR11 EQU $ff11 ; Channel 1 Sound length/Wave pattern duty (R/W) -rNR12 EQU $ff12 ; Channel 1 Volume Envelope (R/W) -rNR13 EQU $ff13 ; Channel 1 Frequency lo (Write Only) -rNR14 EQU $ff14 ; Channel 1 Frequency hi (R/W) -rNR21 EQU $ff16 ; Channel 2 Sound Length/Wave Pattern Duty (R/W) -rNR22 EQU $ff17 ; Channel 2 Volume Envelope (R/W) -rNR23 EQU $ff18 ; Channel 2 Frequency lo data (W) -rNR24 EQU $ff19 ; Channel 2 Frequency hi data (R/W) -rNR30 EQU $ff1a ; Channel 3 Sound on/off (R/W) -rNR31 EQU $ff1b ; Channel 3 Sound Length -rNR32 EQU $ff1c ; Channel 3 Select output level (R/W) -rNR33 EQU $ff1d ; Channel 3 Frequency's lower data (W) -rNR34 EQU $ff1e ; Channel 3 Frequency's higher data (R/W) -rNR41 EQU $ff20 ; Channel 4 Sound Length (R/W) -rNR42 EQU $ff21 ; Channel 4 Volume Envelope (R/W) -rNR43 EQU $ff22 ; Channel 4 Polynomial Counter (R/W) -rNR44 EQU $ff23 ; Channel 4 Counter/consecutive; Initial (R/W) -rNR50 EQU $ff24 ; Channel control / ON-OFF / Volume (R/W) -rNR51 EQU $ff25 ; Selection of Sound output terminal (R/W) -rNR52 EQU $ff26 ; Sound on/off -rWave_0 EQU $ff30 -rWave_1 EQU $ff31 -rWave_2 EQU $ff32 -rWave_3 EQU $ff33 -rWave_4 EQU $ff34 -rWave_5 EQU $ff35 -rWave_6 EQU $ff36 -rWave_7 EQU $ff37 -rWave_8 EQU $ff38 -rWave_9 EQU $ff39 -rWave_a EQU $ff3a -rWave_b EQU $ff3b -rWave_c EQU $ff3c -rWave_d EQU $ff3d -rWave_e EQU $ff3e -rWave_f EQU $ff3f -rLCDC EQU $ff40 ; LCD Control (R/W) -rLCDC_ENABLE EQU 7 -rLCDC_ENABLE_MASK EQU 1 << rLCDC_ENABLE -rSTAT EQU $ff41 ; LCDC Status (R/W) -rSCY EQU $ff42 ; Scroll Y (R/W) -rSCX EQU $ff43 ; Scroll X (R/W) -rLY EQU $ff44 ; LCDC Y-Coordinate (R) -rLYC EQU $ff45 ; LY Compare (R/W) -rDMA EQU $ff46 ; DMA Transfer and Start Address (W) -rBGP EQU $ff47 ; BG Palette Data (R/W) - Non CGB Mode Only -rOBP0 EQU $ff48 ; Object Palette 0 Data (R/W) - Non CGB Mode Only -rOBP1 EQU $ff49 ; Object Palette 1 Data (R/W) - Non CGB Mode Only -rWY EQU $ff4a ; Window Y Position (R/W) -rWX EQU $ff4b ; Window X Position minus 7 (R/W) -rKEY1 EQU $ff4d ; CGB Mode Only - Prepare Speed Switch -rVBK EQU $ff4f ; CGB Mode Only - VRAM Bank -rHDMA1 EQU $ff51 ; CGB Mode Only - New DMA Source, High -rHDMA2 EQU $ff52 ; CGB Mode Only - New DMA Source, Low -rHDMA3 EQU $ff53 ; CGB Mode Only - New DMA Destination, High -rHDMA4 EQU $ff54 ; CGB Mode Only - New DMA Destination, Low -rHDMA5 EQU $ff55 ; CGB Mode Only - New DMA Length/Mode/Start -rRP EQU $ff56 ; CGB Mode Only - Infrared Communications Port -rBGPI EQU $ff68 ; CGB Mode Only - Background Palette Index -rBGPD EQU $ff69 ; CGB Mode Only - Background Palette Data -rOBPI EQU $ff6a ; CGB Mode Only - Sprite Palette Index -rOBPD EQU $ff6b ; CGB Mode Only - Sprite Palette Data -rUNKNOWN1 EQU $ff6c ; (FEh) Bit 0 (Read/Write) - CGB Mode Only -rSVBK EQU $ff70 ; CGB Mode Only - WRAM Bank -rUNKNOWN2 EQU $ff72 ; (00h) - Bit 0-7 (Read/Write) -rUNKNOWN3 EQU $ff73 ; (00h) - Bit 0-7 (Read/Write) -rUNKNOWN4 EQU $ff74 ; (00h) - Bit 0-7 (Read/Write) - CGB Mode Only -rUNKNOWN5 EQU $ff75 ; (8Fh) - Bit 4-6 (Read/Write) -rUNKNOWN6 EQU $ff76 ; (00h) - Always 00h (Read Only) -rUNKNOWN7 EQU $ff77 ; (00h) - Always 00h (Read Only) -rIE EQU $ffff ; Interrupt Enable (R/W) +DEF rJOYP EQU $ff00 ; Joypad (R/W) +DEF rSB EQU $ff01 ; Serial transfer data (R/W) +DEF rSC EQU $ff02 ; Serial Transfer Control (R/W) +DEF rSC_ON EQU 7 +DEF rSC_CGB EQU 1 +DEF rSC_CLOCK EQU 0 +DEF rDIV EQU $ff04 ; Divider Register (R/W) +DEF rTIMA EQU $ff05 ; Timer counter (R/W) +DEF rTMA EQU $ff06 ; Timer Modulo (R/W) +DEF rTAC EQU $ff07 ; Timer Control (R/W) +DEF rTAC_ON EQU 2 +DEF rTAC_4096_HZ EQU 0 +DEF rTAC_262144_HZ EQU 1 +DEF rTAC_65536_HZ EQU 2 +DEF rTAC_16384_HZ EQU 3 +DEF rIF EQU $ff0f ; Interrupt Flag (R/W) +DEF rNR10 EQU $ff10 ; Channel 1 Sweep register (R/W) +DEF rNR11 EQU $ff11 ; Channel 1 Sound length/Wave pattern duty (R/W) +DEF rNR12 EQU $ff12 ; Channel 1 Volume Envelope (R/W) +DEF rNR13 EQU $ff13 ; Channel 1 Frequency lo (Write Only) +DEF rNR14 EQU $ff14 ; Channel 1 Frequency hi (R/W) +DEF rNR21 EQU $ff16 ; Channel 2 Sound Length/Wave Pattern Duty (R/W) +DEF rNR22 EQU $ff17 ; Channel 2 Volume Envelope (R/W) +DEF rNR23 EQU $ff18 ; Channel 2 Frequency lo data (W) +DEF rNR24 EQU $ff19 ; Channel 2 Frequency hi data (R/W) +DEF rNR30 EQU $ff1a ; Channel 3 Sound on/off (R/W) +DEF rNR31 EQU $ff1b ; Channel 3 Sound Length +DEF rNR32 EQU $ff1c ; Channel 3 Select output level (R/W) +DEF rNR33 EQU $ff1d ; Channel 3 Frequency's lower data (W) +DEF rNR34 EQU $ff1e ; Channel 3 Frequency's higher data (R/W) +DEF rNR41 EQU $ff20 ; Channel 4 Sound Length (R/W) +DEF rNR42 EQU $ff21 ; Channel 4 Volume Envelope (R/W) +DEF rNR43 EQU $ff22 ; Channel 4 Polynomial Counter (R/W) +DEF rNR44 EQU $ff23 ; Channel 4 Counter/consecutive; Initial (R/W) +DEF rNR50 EQU $ff24 ; Channel control / ON-OFF / Volume (R/W) +DEF rNR51 EQU $ff25 ; Selection of Sound output terminal (R/W) +DEF rNR52 EQU $ff26 ; Sound on/off +DEF rWave_0 EQU $ff30 +DEF rWave_1 EQU $ff31 +DEF rWave_2 EQU $ff32 +DEF rWave_3 EQU $ff33 +DEF rWave_4 EQU $ff34 +DEF rWave_5 EQU $ff35 +DEF rWave_6 EQU $ff36 +DEF rWave_7 EQU $ff37 +DEF rWave_8 EQU $ff38 +DEF rWave_9 EQU $ff39 +DEF rWave_a EQU $ff3a +DEF rWave_b EQU $ff3b +DEF rWave_c EQU $ff3c +DEF rWave_d EQU $ff3d +DEF rWave_e EQU $ff3e +DEF rWave_f EQU $ff3f +DEF rLCDC EQU $ff40 ; LCD Control (R/W) +DEF rLCDC_ENABLE EQU 7 +DEF rLCDC_ENABLE_MASK EQU 1 << rLCDC_ENABLE +DEF rSTAT EQU $ff41 ; LCDC Status (R/W) +DEF rSCY EQU $ff42 ; Scroll Y (R/W) +DEF rSCX EQU $ff43 ; Scroll X (R/W) +DEF rLY EQU $ff44 ; LCDC Y-Coordinate (R) +DEF rLYC EQU $ff45 ; LY Compare (R/W) +DEF rDMA EQU $ff46 ; DMA Transfer and Start Address (W) +DEF rBGP EQU $ff47 ; BG Palette Data (R/W) - Non CGB Mode Only +DEF rOBP0 EQU $ff48 ; Object Palette 0 Data (R/W) - Non CGB Mode Only +DEF rOBP1 EQU $ff49 ; Object Palette 1 Data (R/W) - Non CGB Mode Only +DEF rWY EQU $ff4a ; Window Y Position (R/W) +DEF rWX EQU $ff4b ; Window X Position minus 7 (R/W) +DEF rKEY1 EQU $ff4d ; CGB Mode Only - Prepare Speed Switch +DEF rVBK EQU $ff4f ; CGB Mode Only - VRAM Bank +DEF rHDMA1 EQU $ff51 ; CGB Mode Only - New DMA Source, High +DEF rHDMA2 EQU $ff52 ; CGB Mode Only - New DMA Source, Low +DEF rHDMA3 EQU $ff53 ; CGB Mode Only - New DMA Destination, High +DEF rHDMA4 EQU $ff54 ; CGB Mode Only - New DMA Destination, Low +DEF rHDMA5 EQU $ff55 ; CGB Mode Only - New DMA Length/Mode/Start +DEF rRP EQU $ff56 ; CGB Mode Only - Infrared Communications Port +DEF rBGPI EQU $ff68 ; CGB Mode Only - Background Palette Index +DEF rBGPD EQU $ff69 ; CGB Mode Only - Background Palette Data +DEF rOBPI EQU $ff6a ; CGB Mode Only - Sprite Palette Index +DEF rOBPD EQU $ff6b ; CGB Mode Only - Sprite Palette Data +DEF rUNKNOWN1 EQU $ff6c ; (FEh) Bit 0 (Read/Write) - CGB Mode Only +DEF rSVBK EQU $ff70 ; CGB Mode Only - WRAM Bank +DEF rUNKNOWN2 EQU $ff72 ; (00h) - Bit 0-7 (Read/Write) +DEF rUNKNOWN3 EQU $ff73 ; (00h) - Bit 0-7 (Read/Write) +DEF rUNKNOWN4 EQU $ff74 ; (00h) - Bit 0-7 (Read/Write) - CGB Mode Only +DEF rUNKNOWN5 EQU $ff75 ; (8Fh) - Bit 4-6 (Read/Write) +DEF rUNKNOWN6 EQU $ff76 ; (00h) - Always 00h (Read Only) +DEF rUNKNOWN7 EQU $ff77 ; (00h) - Always 00h (Read Only) +DEF rIE EQU $ffff ; Interrupt Enable (R/W) diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index 4770a29a2..b73271e87 100644 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -1,5 +1,5 @@ -HIDE EQU $11 -SHOW EQU $15 +DEF HIDE EQU $11 +DEF SHOW EQU $15 ; MissableObjects indexes (see data/maps/hide_show_data.asm) ; this is a list of the sprites that can be enabled/disabled during the game @@ -237,4 +237,4 @@ SHOW EQU $15 const HS_SEAFOAM_ISLANDS_B4F_BOULDER_1 ; E1 const HS_SEAFOAM_ISLANDS_B4F_BOULDER_2 ; E2 const HS_ARTICUNO ; E3 X -NUM_HS_OBJECTS EQU const_value +DEF NUM_HS_OBJECTS EQU const_value diff --git a/constants/icon_constants.asm b/constants/icon_constants.asm index 14202da3d..767e29c6d 100644 --- a/constants/icon_constants.asm +++ b/constants/icon_constants.asm @@ -12,6 +12,6 @@ const ICON_SNAKE ; $8 const ICON_QUADRUPED ; $9 -ICON_TRADEBUBBLE EQU $e +DEF ICON_TRADEBUBBLE EQU $e -ICONOFFSET EQU $40 ; difference between alternating icon frames' tile IDs +DEF ICONOFFSET EQU $40 ; difference between alternating icon frames' tile IDs diff --git a/constants/input_constants.asm b/constants/input_constants.asm index 7984d5a90..f9070cba0 100644 --- a/constants/input_constants.asm +++ b/constants/input_constants.asm @@ -9,12 +9,12 @@ const BIT_D_UP const BIT_D_DOWN -NO_INPUT EQU 0 -A_BUTTON EQU 1 << BIT_A_BUTTON -B_BUTTON EQU 1 << BIT_B_BUTTON -SELECT EQU 1 << BIT_SELECT -START EQU 1 << BIT_START -D_RIGHT EQU 1 << BIT_D_RIGHT -D_LEFT EQU 1 << BIT_D_LEFT -D_UP EQU 1 << BIT_D_UP -D_DOWN EQU 1 << BIT_D_DOWN +DEF NO_INPUT EQU 0 +DEF A_BUTTON EQU 1 << BIT_A_BUTTON +DEF B_BUTTON EQU 1 << BIT_B_BUTTON +DEF SELECT EQU 1 << BIT_SELECT +DEF START EQU 1 << BIT_START +DEF D_RIGHT EQU 1 << BIT_D_RIGHT +DEF D_LEFT EQU 1 << BIT_D_LEFT +DEF D_UP EQU 1 << BIT_D_UP +DEF D_DOWN EQU 1 << BIT_D_DOWN diff --git a/constants/item_constants.asm b/constants/item_constants.asm index f3c71985b..edd70379c 100644 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -29,8 +29,8 @@ const POTION ; $14 const BOULDERBADGE ; $15 const CASCADEBADGE ; $16 -SAFARI_BAIT EQU $15 ; overload -SAFARI_ROCK EQU $16 ; overload +DEF SAFARI_BAIT EQU $15 ; overload +DEF SAFARI_ROCK EQU $16 ; overload const THUNDERBADGE ; $17 const RAINBOWBADGE ; $18 const SOULBADGE ; $19 @@ -92,7 +92,7 @@ SAFARI_ROCK EQU $16 ; overload const MAX_ETHER ; $51 const ELIXER ; $52 const MAX_ELIXER ; $53 -NUM_ITEMS EQU const_value - 1 +DEF NUM_ITEMS EQU const_value - 1 ; elevator floors use item IDs const FLOOR_B2F ; $54 @@ -109,54 +109,54 @@ NUM_ITEMS EQU const_value - 1 const FLOOR_10F ; $5F const FLOOR_11F ; $60 const FLOOR_B4F ; $61 -NUM_FLOORS EQU const_value - 1 - NUM_ITEMS +DEF NUM_FLOORS EQU const_value - 1 - NUM_ITEMS const_next $C4 ; HMs are defined before TMs, so the actual number of TM definitions ; is not yet available. The TM quantity is hard-coded here and must ; match the actual number below. -NUM_TMS EQU 50 +DEF NUM_TMS EQU 50 -__tmhm_value__ = NUM_TMS + 1 +DEF __tmhm_value__ = NUM_TMS + 1 -add_tmnum: MACRO -\1_TMNUM EQU __tmhm_value__ -__tmhm_value__ += 1 +MACRO add_tmnum + DEF \1_TMNUM EQU __tmhm_value__ + DEF __tmhm_value__ += 1 ENDM -add_hm: MACRO +MACRO add_hm ; Defines three constants: ; - HM_\1: the item id, starting at $C4 ; - \1_TMNUM: the learnable TM/HM flag, starting at 51 ; - HM##_MOVE: alias for the move id, equal to the value of \1 const HM_\1 -HM_VALUE = __tmhm_value__ - NUM_TMS -HM{02d:HM_VALUE}_MOVE EQU \1 + DEF HM_VALUE = __tmhm_value__ - NUM_TMS + DEF HM{02d:HM_VALUE}_MOVE EQU \1 add_tmnum \1 ENDM -HM01 EQU const_value +DEF HM01 EQU const_value add_hm CUT ; $C4 add_hm FLY ; $C5 add_hm SURF ; $C6 add_hm STRENGTH ; $C7 add_hm FLASH ; $C8 -NUM_HMS EQU const_value - HM01 +DEF NUM_HMS EQU const_value - HM01 -__tmhm_value__ = 1 +DEF __tmhm_value__ = 1 -add_tm: MACRO +MACRO add_tm ; Defines three constants: ; - TM_\1: the item id, starting at $C9 ; - \1_TMNUM: the learnable TM/HM flag, starting at 1 ; - TM##_MOVE: alias for the move id, equal to the value of \1 const TM_\1 -TM{02d:__tmhm_value__}_MOVE EQU \1 + DEF TM{02d:__tmhm_value__}_MOVE EQU \1 add_tmnum \1 ENDM -TM01 EQU const_value +DEF TM01 EQU const_value add_tm MEGA_PUNCH ; $C9 add_tm RAZOR_WIND ; $CA add_tm SWORDS_DANCE ; $CB @@ -209,9 +209,9 @@ TM01 EQU const_value add_tm SUBSTITUTE ; $FA ASSERT NUM_TMS == const_value - TM01, "NUM_TMS ({d:NUM_TMS}) does not match the number of add_tm definitions" -NUM_TM_HM EQU NUM_TMS + NUM_HMS +DEF NUM_TM_HM EQU NUM_TMS + NUM_HMS ; 50 TMs + 5 HMs = 55 learnable TM/HM flags per Pokémon. ; These fit in 7 bytes, with one unused bit left over. -__tmhm_value__ = NUM_TM_HM + 1 -UNUSED_TMNUM EQU __tmhm_value__ +DEF __tmhm_value__ = NUM_TM_HM + 1 +DEF UNUSED_TMNUM EQU __tmhm_value__ diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 583433421..86e18e625 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -1,7 +1,7 @@ -mapconst: MACRO +MACRO mapconst const \1 -\1_HEIGHT EQU \2 -\1_WIDTH EQU \3 + DEF \1_HEIGHT EQU \2 + DEF \1_WIDTH EQU \3 ENDM ; map ids @@ -26,9 +26,9 @@ ENDM mapconst CINNABAR_ISLAND, 9, 10 ; $08 mapconst INDIGO_PLATEAU, 9, 10 ; $09 mapconst SAFFRON_CITY, 18, 20 ; $0A -NUM_CITY_MAPS EQU const_value +DEF NUM_CITY_MAPS EQU const_value mapconst UNUSED_MAP_0B, 0, 0 ; $0B -FIRST_ROUTE_MAP EQU const_value +DEF FIRST_ROUTE_MAP EQU const_value mapconst ROUTE_1, 18, 10 ; $0C mapconst ROUTE_2, 36, 10 ; $0D mapconst ROUTE_3, 9, 35 ; $0E @@ -54,7 +54,7 @@ FIRST_ROUTE_MAP EQU const_value mapconst ROUTE_23, 72, 10 ; $22 mapconst ROUTE_24, 18, 10 ; $23 mapconst ROUTE_25, 9, 30 ; $24 -FIRST_INDOOR_MAP EQU const_value +DEF FIRST_INDOOR_MAP EQU const_value mapconst REDS_HOUSE_1F, 4, 4 ; $25 mapconst REDS_HOUSE_2F, 4, 4 ; $26 mapconst BLUES_HOUSE, 4, 4 ; $27 @@ -266,8 +266,8 @@ FIRST_INDOOR_MAP EQU const_value mapconst LORELEIS_ROOM, 6, 5 ; $F5 mapconst BRUNOS_ROOM, 6, 5 ; $F6 mapconst AGATHAS_ROOM, 6, 5 ; $F7 -NUM_MAPS EQU const_value +DEF NUM_MAPS EQU const_value ; Indoor maps, such as houses, use this as the Map ID in their exit warps ; This map ID takes the player back to the last outdoor map they were on, stored in wLastMap -LAST_MAP EQU -1 +DEF LAST_MAP EQU -1 diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm index 605e70135..1877e6a08 100644 --- a/constants/map_data_constants.asm +++ b/constants/map_data_constants.asm @@ -1,6 +1,6 @@ ; width of east/west connections ; height of north/south connections -MAP_BORDER EQU 3 +DEF MAP_BORDER EQU 3 ; connection directions const_def diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm index 899e01f09..5c666d834 100644 --- a/constants/map_object_constants.asm +++ b/constants/map_object_constants.asm @@ -16,7 +16,7 @@ const SPRITESTATEDATA1_0D ; d const SPRITESTATEDATA1_0E ; e const SPRITESTATEDATA1_0F ; f -SPRITESTATEDATA1_LENGTH EQU const_value +DEF SPRITESTATEDATA1_LENGTH EQU const_value ; spritestatedata2 struct members (see macros/wram.asm) const_def @@ -36,24 +36,24 @@ SPRITESTATEDATA1_LENGTH EQU const_value const SPRITESTATEDATA2_PICTUREID ; d const SPRITESTATEDATA2_IMAGEBASEOFFSET ; e const SPRITESTATEDATA2_0F ; f -SPRITESTATEDATA2_LENGTH EQU const_value +DEF SPRITESTATEDATA2_LENGTH EQU const_value -NUM_SPRITESTATEDATA_STRUCTS EQU 16 +DEF NUM_SPRITESTATEDATA_STRUCTS EQU 16 ; different kinds of people events -ITEM EQU $80 -TRAINER EQU $40 +DEF ITEM EQU $80 +DEF TRAINER EQU $40 -WALK EQU $FE -STAY EQU $FF +DEF WALK EQU $FE +DEF STAY EQU $FF -ANY_DIR EQU $00 -UP_DOWN EQU $01 -LEFT_RIGHT EQU $02 -DOWN EQU $D0 -UP EQU $D1 -LEFT EQU $D2 -RIGHT EQU $D3 -NONE EQU $FF +DEF ANY_DIR EQU $00 +DEF UP_DOWN EQU $01 +DEF LEFT_RIGHT EQU $02 +DEF DOWN EQU $D0 +DEF UP EQU $D1 +DEF LEFT EQU $D2 +DEF RIGHT EQU $D3 +DEF NONE EQU $FF -BOULDER_MOVEMENT_BYTE_2 EQU $10 +DEF BOULDER_MOVEMENT_BYTE_2 EQU $10 diff --git a/constants/menu_constants.asm b/constants/menu_constants.asm index eafebe974..f1f0d4175 100644 --- a/constants/menu_constants.asm +++ b/constants/menu_constants.asm @@ -1,5 +1,5 @@ -BAG_ITEM_CAPACITY EQU 20 -PC_ITEM_CAPACITY EQU 50 +DEF BAG_ITEM_CAPACITY EQU 20 +DEF PC_ITEM_CAPACITY EQU 50 ; text box IDs const_def 1 @@ -42,15 +42,15 @@ PC_ITEM_CAPACITY EQU 50 const TRADE_CANCEL_MENU ; 5 const HEAL_CANCEL_MENU ; 6 const NO_YES_MENU ; 7 -NUM_TWO_OPTION_MENUS EQU const_value +DEF NUM_TWO_OPTION_MENUS EQU const_value ; menu exit method constants for list menus and the buy/sell/quit menu -CHOSE_MENU_ITEM EQU 1 ; pressed A -CANCELLED_MENU EQU 2 ; pressed B +DEF CHOSE_MENU_ITEM EQU 1 ; pressed A +DEF CANCELLED_MENU EQU 2 ; pressed B ; menu exit method constants for two-option menus -CHOSE_FIRST_ITEM EQU 1 -CHOSE_SECOND_ITEM EQU 2 +DEF CHOSE_FIRST_ITEM EQU 1 +DEF CHOSE_SECOND_ITEM EQU 2 ; move mon constants const_def @@ -71,7 +71,7 @@ CHOSE_SECOND_ITEM EQU 2 ; party menu message IDs ; PartyMenuItemUseMessagePointers indexes (see engine/menus/party_menu.asm) const_next $F0 -FIRST_PARTY_MENU_TEXT_ID EQU const_value +DEF FIRST_PARTY_MENU_TEXT_ID EQU const_value const ANTIDOTE_MSG ; $F0 const BURN_HEAL_MSG ; $F1 const ICE_HEAL_MSG ; $F2 diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 4aff58dae..847756082 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -1,6 +1,6 @@ ; Boolean checks -FALSE EQU 0 -TRUE EQU 1 +DEF FALSE EQU 0 +DEF TRUE EQU 1 ; flag operations const_def @@ -9,9 +9,9 @@ TRUE EQU 1 const FLAG_TEST ; 2 ; wOptions -TEXT_DELAY_FAST EQU %001 ; 1 -TEXT_DELAY_MEDIUM EQU %011 ; 3 -TEXT_DELAY_SLOW EQU %101 ; 5 +DEF TEXT_DELAY_FAST EQU %001 ; 1 +DEF TEXT_DELAY_MEDIUM EQU %011 ; 3 +DEF TEXT_DELAY_SLOW EQU %101 ; 5 const_def 6 const BIT_BATTLE_SHIFT ; 6 diff --git a/constants/move_animation_constants.asm b/constants/move_animation_constants.asm index dc8c94fb7..3d62cd192 100644 --- a/constants/move_animation_constants.asm +++ b/constants/move_animation_constants.asm @@ -1,7 +1,7 @@ ; special effects that are part of move animations ; SpecialEffectPointers associates them with effect routines (see data/battle_anims/special_effect_pointers.asm) const_def $C0 -FIRST_SE_ID EQU const_value +DEF FIRST_SE_ID EQU const_value const_skip $18 const SE_WAVY_SCREEN ; $D8 used in Psywave/Night Shade/Psychic etc. const SE_SUBSTITUTE_MON ; $D9 used in Substitute (turns the pokemon into a mini sprite) @@ -132,7 +132,7 @@ FIRST_SE_ID EQU const_value const SUBANIM_53 const SUBANIM_54 const SUBANIM_55 -NUM_SUBANIMS EQU const_value +DEF NUM_SUBANIMS EQU const_value ; types of subanimations const_def @@ -268,7 +268,7 @@ NUM_SUBANIMS EQU const_value const FRAMEBLOCK_77 const FRAMEBLOCK_78 const FRAMEBLOCK_79 -NUM_FRAMEBLOCKS EQU const_value +DEF NUM_FRAMEBLOCKS EQU const_value ; base coordinates that are part of subanimations ; FrameBlockBaseCoords indexes (see data/battle_anims/base_coords.asm) @@ -450,7 +450,7 @@ NUM_FRAMEBLOCKS EQU const_value const BASECOORD_AE const BASECOORD_AF const BASECOORD_B0 -NUM_BASECOORDS EQU const_value +DEF NUM_BASECOORDS EQU const_value ; frame block modes that are part of subanimations const_def diff --git a/constants/move_constants.asm b/constants/move_constants.asm index 52c442106..570be95e2 100644 --- a/constants/move_constants.asm +++ b/constants/move_constants.asm @@ -171,7 +171,7 @@ const SLASH ; a3 const SUBSTITUTE ; a4 const STRUGGLE ; a5 -NUM_ATTACKS EQU const_value - 1 +DEF NUM_ATTACKS EQU const_value - 1 ; Moves do double duty as animation identifiers. @@ -213,4 +213,4 @@ NUM_ATTACKS EQU const_value - 1 const ROCK_ANIM ; throw rock const BAIT_ANIM ; throw bait -NUM_ATTACK_ANIMS EQU const_value - 1 +DEF NUM_ATTACK_ANIMS EQU const_value - 1 diff --git a/constants/move_effect_constants.asm b/constants/move_effect_constants.asm index bc4446474..8f33ece32 100644 --- a/constants/move_effect_constants.asm +++ b/constants/move_effect_constants.asm @@ -91,4 +91,4 @@ const LEECH_SEED_EFFECT ; $54 const SPLASH_EFFECT ; $55 const DISABLE_EFFECT ; $56 -NUM_MOVE_EFFECTS EQU const_value - 1 +DEF NUM_MOVE_EFFECTS EQU const_value - 1 diff --git a/constants/music_constants.asm b/constants/music_constants.asm index fcca90051..e72e88d93 100644 --- a/constants/music_constants.asm +++ b/constants/music_constants.asm @@ -1,8 +1,8 @@ ; Song ids are calculated by address to save space. ; SFX_Headers_(1|2|3) indexes (see audio/headers/*.asm) -music_const: MACRO -\1 EQUS "((\2 - SFX_Headers_1) / 3)" +MACRO music_const + DEF \1 EQUS "((\2 - SFX_Headers_1) / 3)" ENDM ; AUDIO_1 @@ -57,7 +57,7 @@ ENDM music_const MUSIC_MEET_MALE_TRAINER, Music_MeetMaleTrainer ; AUDIO_1 AUDIO_2 AUDIO_3 -NOISE_INSTRUMENTS_START EQUS "SFX_NOISE_INSTRUMENT01" +DEF NOISE_INSTRUMENTS_START EQUS "SFX_NOISE_INSTRUMENT01" music_const SFX_NOISE_INSTRUMENT01, SFX_Noise_Instrument01_1 music_const SFX_NOISE_INSTRUMENT02, SFX_Noise_Instrument02_1 music_const SFX_NOISE_INSTRUMENT03, SFX_Noise_Instrument03_1 @@ -77,9 +77,9 @@ NOISE_INSTRUMENTS_START EQUS "SFX_NOISE_INSTRUMENT01" music_const SFX_NOISE_INSTRUMENT17, SFX_Noise_Instrument17_1 music_const SFX_NOISE_INSTRUMENT18, SFX_Noise_Instrument18_1 music_const SFX_NOISE_INSTRUMENT19, SFX_Noise_Instrument19_1 -NOISE_INSTRUMENTS_END EQUS "SFX_NOISE_INSTRUMENT19 + 1" +DEF NOISE_INSTRUMENTS_END EQUS "SFX_NOISE_INSTRUMENT19 + 1" -CRY_SFX_START EQUS "SFX_CRY_00" +DEF CRY_SFX_START EQUS "SFX_CRY_00" music_const SFX_CRY_00, SFX_Cry00_1 music_const SFX_CRY_01, SFX_Cry01_1 music_const SFX_CRY_02, SFX_Cry02_1 @@ -118,7 +118,7 @@ CRY_SFX_START EQUS "SFX_CRY_00" music_const SFX_CRY_23, SFX_Cry23_1 music_const SFX_CRY_24, SFX_Cry24_1 music_const SFX_CRY_25, SFX_Cry25_1 -CRY_SFX_END EQUS "SFX_CRY_25 + 3" +DEF CRY_SFX_END EQUS "SFX_CRY_25 + 3" music_const SFX_GET_ITEM_2, SFX_Get_Item2_1 music_const SFX_TINK, SFX_Tink_1 @@ -163,7 +163,7 @@ CRY_SFX_END EQUS "SFX_CRY_25 + 3" ; AUDIO_1 music_const SFX_POKEFLUTE, SFX_Pokeflute music_const SFX_SAFARI_ZONE_PA, SFX_Safari_Zone_PA -MAX_SFX_ID_1 EQUS "SFX_SAFARI_ZONE_PA" +DEF MAX_SFX_ID_1 EQUS "SFX_SAFARI_ZONE_PA" ; AUDIO_2 music_const SFX_LEVEL_UP, SFX_Level_Up @@ -175,7 +175,7 @@ MAX_SFX_ID_1 EQUS "SFX_SAFARI_ZONE_PA" music_const SFX_DEX_PAGE_ADDED, SFX_Dex_Page_Added music_const SFX_CAUGHT_MON, SFX_Caught_Mon -BATTLE_SFX_START EQUS "SFX_PECK" +DEF BATTLE_SFX_START EQUS "SFX_PECK" music_const SFX_PECK, SFX_Peck music_const SFX_FAINT_FALL, SFX_Faint_Fall music_const SFX_BATTLE_09, SFX_Battle_09 @@ -225,8 +225,8 @@ BATTLE_SFX_START EQUS "SFX_PECK" music_const SFX_BATTLE_35, SFX_Battle_35 music_const SFX_BATTLE_36, SFX_Battle_36 music_const SFX_SILPH_SCOPE, SFX_Silph_Scope -BATTLE_SFX_END EQUS "SFX_SILPH_SCOPE + 1" -MAX_SFX_ID_2 EQUS "SFX_SILPH_SCOPE" +DEF BATTLE_SFX_END EQUS "SFX_SILPH_SCOPE + 1" +DEF MAX_SFX_ID_2 EQUS "SFX_SILPH_SCOPE" ; AUDIO_3 music_const SFX_INTRO_LUNGE, SFX_Intro_Lunge @@ -239,6 +239,6 @@ MAX_SFX_ID_2 EQUS "SFX_SILPH_SCOPE" music_const SFX_SLOTS_REWARD, SFX_Slots_Reward music_const SFX_SLOTS_NEW_SPIN, SFX_Slots_New_Spin music_const SFX_SHOOTING_STAR, SFX_Shooting_Star -MAX_SFX_ID_3 EQUS "SFX_SHOOTING_STAR" +DEF MAX_SFX_ID_3 EQUS "SFX_SHOOTING_STAR" -SFX_STOP_ALL_MUSIC EQU $ff +DEF SFX_STOP_ALL_MUSIC EQU $ff diff --git a/constants/oam_constants.asm b/constants/oam_constants.asm index be63dc244..8c5e6be88 100644 --- a/constants/oam_constants.asm +++ b/constants/oam_constants.asm @@ -1,17 +1,17 @@ ; OAM flags used by this game -OAMFLAG_ENDOFDATA EQU %00000001 ; pseudo OAM flag, only used by game logic -OAMFLAG_CANBEMASKED EQU %00000010 ; pseudo OAM flag, only used by game logic +DEF OAMFLAG_ENDOFDATA EQU %00000001 ; pseudo OAM flag, only used by game logic +DEF OAMFLAG_CANBEMASKED EQU %00000010 ; pseudo OAM flag, only used by game logic ; OAM attribute flags -OAM_PALETTE EQU %111 -OAM_TILE_BANK EQU 3 -OAM_OBP_NUM EQU 4 ; Non CGB Mode Only -OAM_X_FLIP EQU 5 -OAM_Y_FLIP EQU 6 -OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3) +DEF OAM_PALETTE EQU %111 +DEF OAM_TILE_BANK EQU 3 +DEF OAM_OBP_NUM EQU 4 ; Non CGB Mode Only +DEF OAM_X_FLIP EQU 5 +DEF OAM_Y_FLIP EQU 6 +DEF OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3) ; OAM attribute masks -OAM_OBP1 EQU 1 << OAM_OBP_NUM ; OBJ palette 1 -OAM_HFLIP EQU 1 << OAM_X_FLIP ; horizontal flip -OAM_VFLIP EQU 1 << OAM_Y_FLIP ; vertical flip -OAM_BEHIND_BG EQU 1 << OAM_PRIORITY ; behind bg (except color 0) +DEF OAM_OBP1 EQU 1 << OAM_OBP_NUM ; OBJ palette 1 +DEF OAM_HFLIP EQU 1 << OAM_X_FLIP ; horizontal flip +DEF OAM_VFLIP EQU 1 << OAM_Y_FLIP ; vertical flip +DEF OAM_BEHIND_BG EQU 1 << OAM_PRIORITY ; behind bg (except color 0) diff --git a/constants/palette_constants.asm b/constants/palette_constants.asm index c26945e8f..78d39c95f 100644 --- a/constants/palette_constants.asm +++ b/constants/palette_constants.asm @@ -4,10 +4,10 @@ const SHADE_LIGHT ; %01 const SHADE_DARK ; %10 const SHADE_BLACK ; %11 -NUM_PAL_COLORS EQU const_value +DEF NUM_PAL_COLORS EQU const_value -PAL_COLOR_SIZE EQU 2 -PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE +DEF PAL_COLOR_SIZE EQU 2 +DEF PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE ; pal/blk packets ; SetPalFunctions indexes (see engine/gfx/palettes.asm) @@ -27,8 +27,8 @@ PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE const SET_PAL_GAME_FREAK_INTRO ; $0C const SET_PAL_TRAINER_CARD ; $0D -SET_PAL_PARTY_MENU_HP_BARS EQU $fc -SET_PAL_DEFAULT EQU $ff +DEF SET_PAL_PARTY_MENU_HP_BARS EQU $fc +DEF SET_PAL_DEFAULT EQU $ff ; sgb palettes ; SuperPalettes indexes (see data/sgb/sgb_palettes.asm) @@ -70,4 +70,4 @@ SET_PAL_DEFAULT EQU $ff const PAL_BADGE ; $22 const PAL_CAVE ; $23 const PAL_GAMEFREAK ; $24 -NUM_SGB_PALS EQU const_value +DEF NUM_SGB_PALS EQU const_value diff --git a/constants/pokedex_constants.asm b/constants/pokedex_constants.asm index a805b261f..a839a03aa 100644 --- a/constants/pokedex_constants.asm +++ b/constants/pokedex_constants.asm @@ -156,4 +156,4 @@ const DEX_MEWTWO ; 150 const DEX_MEW ; 151 -NUM_POKEMON EQU const_value - 1 +DEF NUM_POKEMON EQU const_value - 1 diff --git a/constants/pokemon_constants.asm b/constants/pokemon_constants.asm index d01398b89..ea206bb83 100644 --- a/constants/pokemon_constants.asm +++ b/constants/pokemon_constants.asm @@ -198,12 +198,12 @@ const WEEPINBELL ; $BD const VICTREEBEL ; $BE -NUM_POKEMON_INDEXES EQU const_value - 1 +DEF NUM_POKEMON_INDEXES EQU const_value - 1 ; starters -STARTER1 EQU CHARMANDER -STARTER2 EQU SQUIRTLE -STARTER3 EQU BULBASAUR +DEF STARTER1 EQU CHARMANDER +DEF STARTER2 EQU SQUIRTLE +DEF STARTER3 EQU BULBASAUR ; ghost Marowak in Pokémon Tower -RESTLESS_SOUL EQU MAROWAK +DEF RESTLESS_SOUL EQU MAROWAK diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm index 6670f7771..430abfe06 100644 --- a/constants/pokemon_data_constants.asm +++ b/constants/pokemon_data_constants.asm @@ -1,37 +1,37 @@ ; base data struct members (see data/pokemon/base_stats/*.asm) rsreset -BASE_DEX_NO rb -BASE_STATS rb NUM_STATS +DEF BASE_DEX_NO rb +DEF BASE_STATS rb NUM_STATS rsset BASE_STATS -BASE_HP rb -BASE_ATK rb -BASE_DEF rb -BASE_SPD rb -BASE_SPC rb -BASE_TYPES rw +DEF BASE_HP rb +DEF BASE_ATK rb +DEF BASE_DEF rb +DEF BASE_SPD rb +DEF BASE_SPC rb +DEF BASE_TYPES rw rsset BASE_TYPES -BASE_TYPE_1 rb -BASE_TYPE_2 rb -BASE_CATCH_RATE rb -BASE_EXP rb -BASE_PIC_SIZE rb -BASE_FRONTPIC rw -BASE_BACKPIC rw -BASE_MOVES rb NUM_MOVES -BASE_GROWTH_RATE rb -BASE_TMHM rb (NUM_TM_HM + 7) / 8 - rb_skip -BASE_DATA_SIZE EQU _RS +DEF BASE_TYPE_1 rb +DEF BASE_TYPE_2 rb +DEF BASE_CATCH_RATE rb +DEF BASE_EXP rb +DEF BASE_PIC_SIZE rb +DEF BASE_FRONTPIC rw +DEF BASE_BACKPIC rw +DEF BASE_MOVES rb NUM_MOVES +DEF BASE_GROWTH_RATE rb +DEF BASE_TMHM rb (NUM_TM_HM + 7) / 8 + rb_skip +DEF BASE_DATA_SIZE EQU _RS -PARTY_LENGTH EQU 6 +DEF PARTY_LENGTH EQU 6 -MONS_PER_BOX EQU 20 -NUM_BOXES EQU 12 +DEF MONS_PER_BOX EQU 20 +DEF NUM_BOXES EQU 12 -HOF_MON EQU $10 -HOF_TEAM EQU PARTY_LENGTH * HOF_MON -HOF_TEAM_CAPACITY EQU 50 +DEF HOF_MON EQU $10 +DEF HOF_TEAM EQU PARTY_LENGTH * HOF_MON +DEF HOF_TEAM_CAPACITY EQU 50 ; mon data locations @@ -52,8 +52,8 @@ HOF_TEAM_CAPACITY EQU 50 const EV_ITEM ; 2 const EV_TRADE ; 3 -MAX_EVOLUTIONS EQU 3 -EVOLUTION_SIZE EQU 4 +DEF MAX_EVOLUTIONS EQU 3 +DEF EVOLUTION_SIZE EQU 4 ; wMonHGrowthRate values @@ -65,8 +65,8 @@ EVOLUTION_SIZE EQU 4 const GROWTH_MEDIUM_SLOW const GROWTH_FAST const GROWTH_SLOW -NUM_GROWTH_RATES EQU const_value +DEF NUM_GROWTH_RATES EQU const_value ; wild data (see data/wild/maps/*.asm) -NUM_WILDMONS EQU 10 -WILDDATA_LENGTH EQU 1 + NUM_WILDMONS * 2 +DEF NUM_WILDMONS EQU 10 +DEF WILDDATA_LENGTH EQU 1 + NUM_WILDMONS * 2 diff --git a/constants/script_constants.asm b/constants/script_constants.asm index fe50e8aeb..d4543f050 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -5,17 +5,17 @@ const SMILE_BUBBLE ; 2 ; slot symbols -SLOTS7 EQU $0200 -SLOTSBAR EQU $0604 -SLOTSCHERRY EQU $0A08 -SLOTSFISH EQU $0E0C -SLOTSBIRD EQU $1210 -SLOTSMOUSE EQU $1614 +DEF SLOTS7 EQU $0200 +DEF SLOTSBAR EQU $0604 +DEF SLOTSCHERRY EQU $0A08 +DEF SLOTSFISH EQU $0E0C +DEF SLOTSBIRD EQU $1210 +DEF SLOTSMOUSE EQU $1614 ; StartSlotMachine dialogs -SLOTS_OUTOFORDER EQU $fd -SLOTS_OUTTOLUNCH EQU $fe -SLOTS_SOMEONESKEYS EQU $ff +DEF SLOTS_OUTOFORDER EQU $fd +DEF SLOTS_OUTTOLUNCH EQU $fe +DEF SLOTS_SOMEONESKEYS EQU $ff ; in game trades ; TradeMons indexes (see data/events/trades.asm) @@ -30,7 +30,7 @@ SLOTS_SOMEONESKEYS EQU $ff const TRADE_FOR_DORIS const TRADE_FOR_CRINKLES const TRADE_FOR_SPOT -NUM_NPC_TRADES EQU const_value +DEF NUM_NPC_TRADES EQU const_value ; in game trade dialog sets ; InGameTradeTextPointers indexes (see engine/events/in_game_trades.asm) @@ -50,10 +50,10 @@ NUM_NPC_TRADES EQU const_value const BIT_MARSHBADGE ; 5 const BIT_VOLCANOBADGE ; 6 const BIT_EARTHBADGE ; 7 -NUM_BADGES EQU const_value +DEF NUM_BADGES EQU const_value ; OaksAideScript results -OAKS_AIDE_BAG_FULL EQU $00 -OAKS_AIDE_GOT_ITEM EQU $01 -OAKS_AIDE_NOT_ENOUGH_MONS EQU $80 -OAKS_AIDE_REFUSED EQU $ff +DEF OAKS_AIDE_BAG_FULL EQU $00 +DEF OAKS_AIDE_GOT_ITEM EQU $01 +DEF OAKS_AIDE_NOT_ENOUGH_MONS EQU $80 +DEF OAKS_AIDE_REFUSED EQU $ff diff --git a/constants/serial_constants.asm b/constants/serial_constants.asm index a6aae3156..166039800 100644 --- a/constants/serial_constants.asm +++ b/constants/serial_constants.asm @@ -1,27 +1,27 @@ -ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01 -ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK EQU $02 +DEF ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01 +DEF ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK EQU $02 -USING_EXTERNAL_CLOCK EQU $01 -USING_INTERNAL_CLOCK EQU $02 -CONNECTION_NOT_ESTABLISHED EQU $ff +DEF USING_EXTERNAL_CLOCK EQU $01 +DEF USING_INTERNAL_CLOCK EQU $02 +DEF CONNECTION_NOT_ESTABLISHED EQU $ff ; signals the start of an array of bytes transferred over the link cable -SERIAL_PREAMBLE_BYTE EQU $FD +DEF SERIAL_PREAMBLE_BYTE EQU $FD ; this byte is used when there is no data to send -SERIAL_NO_DATA_BYTE EQU $FE +DEF SERIAL_NO_DATA_BYTE EQU $FE ; signals the end of one part of a patch list (there are two parts) for player/enemy party data -SERIAL_PATCH_LIST_PART_TERMINATOR EQU $FF +DEF SERIAL_PATCH_LIST_PART_TERMINATOR EQU $FF -LINK_STATE_NONE EQU $00 ; not using link -LINK_STATE_IN_CABLE_CLUB EQU $01 ; in a cable club room (Colosseum or Trade Centre) -LINK_STATE_START_TRADE EQU $02 ; pre-trade selection screen initialisation -LINK_STATE_START_BATTLE EQU $03 ; pre-battle initialisation -LINK_STATE_BATTLING EQU $04 ; in a link battle -LINK_STATE_RESET EQU $05 ; reset game (unused) -LINK_STATE_TRADING EQU $32 ; in a link trade +DEF LINK_STATE_NONE EQU $00 ; not using link +DEF LINK_STATE_IN_CABLE_CLUB EQU $01 ; in a cable club room (Colosseum or Trade Centre) +DEF LINK_STATE_START_TRADE EQU $02 ; pre-trade selection screen initialisation +DEF LINK_STATE_START_BATTLE EQU $03 ; pre-battle initialisation +DEF LINK_STATE_BATTLING EQU $04 ; in a link battle +DEF LINK_STATE_RESET EQU $05 ; reset game (unused) +DEF LINK_STATE_TRADING EQU $32 ; in a link trade -LINKBATTLE_RUN EQU $F -LINKBATTLE_STRUGGLE EQU $E -LINKBATTLE_NO_ACTION EQU $D +DEF LINKBATTLE_RUN EQU $F +DEF LINKBATTLE_STRUGGLE EQU $E +DEF LINKBATTLE_NO_ACTION EQU $D diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm index ee7238d90..700ec47a5 100644 --- a/constants/sprite_constants.asm +++ b/constants/sprite_constants.asm @@ -62,7 +62,7 @@ const SPRITE_BRUNO ; $3a const SPRITE_LORELEI ; $3b const SPRITE_SEEL ; $3c -FIRST_STILL_SPRITE EQU const_value +DEF FIRST_STILL_SPRITE EQU const_value const SPRITE_POKE_BALL ; $3d const SPRITE_FOSSIL ; $3e const SPRITE_BOULDER ; $3f @@ -75,4 +75,4 @@ FIRST_STILL_SPRITE EQU const_value const SPRITE_UNUSED_GAMBLER_ASLEEP_1 ; $46 const SPRITE_UNUSED_GAMBLER_ASLEEP_2 ; $47 const SPRITE_GAMBLER_ASLEEP ; $48 -NUM_SPRITES EQU const_value - 1 +DEF NUM_SPRITES EQU const_value - 1 diff --git a/constants/sprite_data_constants.asm b/constants/sprite_data_constants.asm index e1104262d..44dc0fa94 100644 --- a/constants/sprite_data_constants.asm +++ b/constants/sprite_data_constants.asm @@ -11,7 +11,7 @@ const NPC_MOVEMENT_LEFT ; $80 const NPC_MOVEMENT_RIGHT ; $C0 -NPC_CHANGE_FACING EQU $E0 +DEF NPC_CHANGE_FACING EQU $E0 ; player direction constants const_def @@ -20,7 +20,7 @@ NPC_CHANGE_FACING EQU $E0 const PLAYER_DIR_BIT_DOWN ; 2 const PLAYER_DIR_BIT_UP ; 3 -PLAYER_DIR_RIGHT EQU 1 << PLAYER_DIR_BIT_RIGHT -PLAYER_DIR_LEFT EQU 1 << PLAYER_DIR_BIT_LEFT -PLAYER_DIR_DOWN EQU 1 << PLAYER_DIR_BIT_DOWN -PLAYER_DIR_UP EQU 1 << PLAYER_DIR_BIT_UP +DEF PLAYER_DIR_RIGHT EQU 1 << PLAYER_DIR_BIT_RIGHT +DEF PLAYER_DIR_LEFT EQU 1 << PLAYER_DIR_BIT_LEFT +DEF PLAYER_DIR_DOWN EQU 1 << PLAYER_DIR_BIT_DOWN +DEF PLAYER_DIR_UP EQU 1 << PLAYER_DIR_BIT_UP diff --git a/constants/text_constants.asm b/constants/text_constants.asm index e0d36148f..5943457b0 100644 --- a/constants/text_constants.asm +++ b/constants/text_constants.asm @@ -1,6 +1,6 @@ -NAME_LENGTH EQU 11 -ITEM_NAME_LENGTH EQU 13 -NAME_BUFFER_LENGTH EQU 20 +DEF NAME_LENGTH EQU 11 +DEF ITEM_NAME_LENGTH EQU 13 +DEF NAME_BUFFER_LENGTH EQU 20 ; PrintNumber const_def 5 @@ -8,9 +8,9 @@ NAME_BUFFER_LENGTH EQU 20 const BIT_LEFT_ALIGN ; 6 const BIT_LEADING_ZEROES ; 7 -MONEY_SIGN EQU (1 << BIT_MONEY_SIGN) -LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN) -LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES) +DEF MONEY_SIGN EQU (1 << BIT_MONEY_SIGN) +DEF LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN) +DEF LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES) ; special text IDs (see home/text_script.asm) const_def $d0 @@ -19,4 +19,4 @@ LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES) const TEXT_REPEL_WORE_OFF ; $d2 const TEXT_SAFARI_GAME_OVER ; $d3 -TEXT_START_MENU EQU $00 +DEF TEXT_START_MENU EQU $00 diff --git a/constants/tileset_constants.asm b/constants/tileset_constants.asm index 446df0216..e7fe88f53 100644 --- a/constants/tileset_constants.asm +++ b/constants/tileset_constants.asm @@ -25,4 +25,4 @@ const CLUB ; 21 const FACILITY ; 22 const PLATEAU ; 23 -NUM_TILESETS EQU const_value +DEF NUM_TILESETS EQU const_value diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm index 14b662f3b..4daf8a960 100644 --- a/constants/trainer_constants.asm +++ b/constants/trainer_constants.asm @@ -1,8 +1,8 @@ -OPP_ID_OFFSET EQU 200 +DEF OPP_ID_OFFSET EQU 200 -trainer_const: MACRO +MACRO trainer_const const \1 -OPP_\1 EQU OPP_ID_OFFSET + \1 + DEF OPP_\1 EQU OPP_ID_OFFSET + \1 ENDM ; trainer class ids @@ -62,4 +62,4 @@ ENDM trainer_const CHANNELER ; $2D trainer_const AGATHA ; $2E trainer_const LANCE ; $2F -NUM_TRAINERS EQU const_value - 1 +DEF NUM_TRAINERS EQU const_value - 1 diff --git a/constants/type_constants.asm b/constants/type_constants.asm index 24817c20f..e9df7faf0 100644 --- a/constants/type_constants.asm +++ b/constants/type_constants.asm @@ -1,7 +1,7 @@ ; TypeNames indexes (see data/types/names.asm) const_def -PHYSICAL EQU const_value +DEF PHYSICAL EQU const_value const NORMAL ; $00 const FIGHTING ; $01 const FLYING ; $02 @@ -14,7 +14,7 @@ PHYSICAL EQU const_value const_next 20 -SPECIAL EQU const_value +DEF SPECIAL EQU const_value const FIRE ; $14 const WATER ; $15 const GRASS ; $16 @@ -23,4 +23,4 @@ SPECIAL EQU const_value const ICE ; $19 const DRAGON ; $1A -NUM_TYPES EQU const_value +DEF NUM_TYPES EQU const_value diff --git a/data/battle_anims/special_effect_pointers.asm b/data/battle_anims/special_effect_pointers.asm index 4e2fb857e..4089d557c 100644 --- a/data/battle_anims/special_effect_pointers.asm +++ b/data/battle_anims/special_effect_pointers.asm @@ -1,4 +1,4 @@ -special_effect: MACRO +MACRO special_effect db \1 dw \2 ENDM diff --git a/data/battle_anims/special_effects.asm b/data/battle_anims/special_effects.asm index 98385d472..068e3b19c 100644 --- a/data/battle_anims/special_effects.asm +++ b/data/battle_anims/special_effects.asm @@ -1,4 +1,4 @@ -anim_special_effect: MACRO +MACRO anim_special_effect db \1 dw \2 ENDM diff --git a/data/battle_anims/subanimations.asm b/data/battle_anims/subanimations.asm index 54d346a6b..d67d4641c 100644 --- a/data/battle_anims/subanimations.asm +++ b/data/battle_anims/subanimations.asm @@ -94,7 +94,7 @@ SubanimationPointers: ; db frame block id, base coordinate id, frame block mode ; ENDR -subanim: MACRO +MACRO subanim db (\1 << 5) | \2 ENDM diff --git a/data/events/bench_guys.asm b/data/events/bench_guys.asm index 2e7eeb2a1..8f3d0948d 100644 --- a/data/events/bench_guys.asm +++ b/data/events/bench_guys.asm @@ -1,4 +1,4 @@ -bench_guy_text: MACRO +MACRO bench_guy_text db \1, \2 db_tx_pre \3 ENDM diff --git a/data/events/hidden_coins.asm b/data/events/hidden_coins.asm index bcdbcd80b..f2485f505 100644 --- a/data/events/hidden_coins.asm +++ b/data/events/hidden_coins.asm @@ -1,4 +1,4 @@ -hidden_coin: MACRO +MACRO hidden_coin db \1, \3, \2 ENDM diff --git a/data/events/hidden_item_coords.asm b/data/events/hidden_item_coords.asm index 115f53aa8..30619d6be 100644 --- a/data/events/hidden_item_coords.asm +++ b/data/events/hidden_item_coords.asm @@ -1,4 +1,4 @@ -hidden_item: MACRO +MACRO hidden_item db \1, \3, \2 ENDM diff --git a/data/events/hidden_objects.asm b/data/events/hidden_objects.asm index efb990267..55e337313 100644 --- a/data/events/hidden_objects.asm +++ b/data/events/hidden_objects.asm @@ -174,14 +174,14 @@ HiddenObjectPointers: dw CeruleanCityHiddenObjects dw Route4HiddenObjects -hidden_object: MACRO +MACRO hidden_object db \2 ; y coord db \1 ; x coord db \3 ; item id dba \4 ; object routine ENDM -hidden_text_predef: MACRO +MACRO hidden_text_predef db \2 ; y coord db \1 ; x coord db_tx_pre \3 ; text id @@ -191,7 +191,7 @@ ENDM ; Some hidden objects use SPRITE_FACING_* values, ; but these do not actually prevent the player ; from interacting with them in any direction. -ANY_FACING EQU $d0 +DEF ANY_FACING EQU $d0 TradeCenterHiddenObjects: hidden_object 5, 4, ANY_FACING, CableClubRightGameboy diff --git a/data/growth_rates.asm b/data/growth_rates.asm index cc0955e46..aaba27a8d 100644 --- a/data/growth_rates.asm +++ b/data/growth_rates.asm @@ -1,4 +1,4 @@ -growth_rate: MACRO +MACRO growth_rate ; [1]/[2]*n**3 + [3]*n**2 + [4]*n - [5] dn \1, \2 if \3 < 0 diff --git a/data/icon_pointers.asm b/data/icon_pointers.asm index 79db936ec..1ff8a29e9 100644 --- a/data/icon_pointers.asm +++ b/data/icon_pointers.asm @@ -1,4 +1,4 @@ -mon_icon_header: MACRO +MACRO mon_icon_header dw \1 tile \2 db \3 db BANK(\1) diff --git a/data/items/vending_prices.asm b/data/items/vending_prices.asm index 9680c48df..39f6dfde6 100644 --- a/data/items/vending_prices.asm +++ b/data/items/vending_prices.asm @@ -1,4 +1,4 @@ -vend_item: MACRO +MACRO vend_item db \1 bcd3 \2 ENDM diff --git a/data/maps/force_bike_surf.asm b/data/maps/force_bike_surf.asm index 74eba3259..01416d899 100644 --- a/data/maps/force_bike_surf.asm +++ b/data/maps/force_bike_surf.asm @@ -1,4 +1,4 @@ -force_bike_surf: MACRO +MACRO force_bike_surf db \1, \3, \2 ENDM diff --git a/data/maps/special_warps.asm b/data/maps/special_warps.asm index 56dac3a56..cad320edb 100644 --- a/data/maps/special_warps.asm +++ b/data/maps/special_warps.asm @@ -17,7 +17,7 @@ DungeonWarpList: db -1 ; end -fly_warp: MACRO +MACRO fly_warp event_displacement \1_WIDTH, \2, \3 db ((\3) & $01) ;sub-block Y db ((\2) & $01) ;sub-block X @@ -38,7 +38,7 @@ DungeonWarpData: fly_warp POKEMON_MANSION_2F, 18, 14 -special_warp_spec: MACRO +MACRO special_warp_spec db \1 fly_warp \1, \2, \3 db \4 @@ -56,7 +56,7 @@ ColosseumSpec2: special_warp_spec COLOSSEUM, 6, 4, CLUB -fly_warp_spec: MACRO +MACRO fly_warp_spec db \1, 0 dw \2 ENDM diff --git a/data/maps/sprite_sets.asm b/data/maps/sprite_sets.asm index 6aad2958b..755ed2fcb 100644 --- a/data/maps/sprite_sets.asm +++ b/data/maps/sprite_sets.asm @@ -39,8 +39,8 @@ MapSpriteSets: db $02 ; ROUTE_25 assert_table_length FIRST_INDOOR_MAP -EAST_WEST EQU 1 -NORTH_SOUTH EQU 2 +DEF EAST_WEST EQU 1 +DEF NORTH_SOUTH EQU 2 ; Format: ; 00: determines whether the map is split EAST_WEST or NORTH_SOUTH @@ -64,7 +64,7 @@ SplitMapSpriteSets: SpriteSets: ; each sprite set has 9 walking sprites and 2 still sprites -SPRITE_SET_LENGTH EQU 9 + 2 +DEF SPRITE_SET_LENGTH EQU 9 + 2 ; sprite set $01 table_width 1 diff --git a/data/maps/town_map_entries.asm b/data/maps/town_map_entries.asm index fdec1e150..78b7ff62d 100644 --- a/data/maps/town_map_entries.asm +++ b/data/maps/town_map_entries.asm @@ -1,4 +1,4 @@ -external_map: MACRO +MACRO external_map dn \2, \1 dw \3 ENDM @@ -47,7 +47,7 @@ ExternalMapEntries: assert_table_length FIRST_INDOOR_MAP -internal_map: MACRO +MACRO internal_map db \1 + 1 dn \3, \2 dw \4 diff --git a/data/moves/animations.asm b/data/moves/animations.asm index 0d8a2bd4d..0049cf598 100644 --- a/data/moves/animations.asm +++ b/data/moves/animations.asm @@ -214,7 +214,7 @@ AttackAnimationPointers: ; if \2 is a subanimation_id: ;\3: tileset_id ;\4: delay -battle_anim: MACRO +MACRO battle_anim IF _NARG == 4 db (\3 << 6) | \4 db \1 - 1 diff --git a/data/moves/moves.asm b/data/moves/moves.asm index 0e52e01ce..b7e5e7af2 100644 --- a/data/moves/moves.asm +++ b/data/moves/moves.asm @@ -1,4 +1,4 @@ -move: MACRO +MACRO move db \1 ; animation (interchangeable with move id) db \2 ; effect db \3 ; power diff --git a/data/pokemon/cries.asm b/data/pokemon/cries.asm index f823cdefc..290f5625f 100644 --- a/data/pokemon/cries.asm +++ b/data/pokemon/cries.asm @@ -1,4 +1,4 @@ -mon_cry: MACRO +MACRO mon_cry db (\1 - CRY_SFX_START) / 3 db \2, \3 ENDM diff --git a/data/predef_pointers.asm b/data/predef_pointers.asm index b8911f3c3..eaef75f6c 100644 --- a/data/predef_pointers.asm +++ b/data/predef_pointers.asm @@ -1,10 +1,10 @@ -add_predef: MACRO +MACRO add_predef \1Predef:: -IF _NARG == 1 - dba \1 -ELSE - dbw \2, \1 -ENDC + IF _NARG == 1 + dba \1 + ELSE + dbw \2, \1 + ENDC ENDM PredefPointers:: diff --git a/data/sgb/sgb_packets.asm b/data/sgb/sgb_packets.asm index 0b6219e10..11fc8900d 100644 --- a/data/sgb/sgb_packets.asm +++ b/data/sgb/sgb_packets.asm @@ -1,51 +1,51 @@ -ATTR_BLK: MACRO +MACRO ATTR_BLK ; This is a command macro. ; Use ATTR_BLK_DATA for data sets. db ($4 << 3) + ((\1 * 6) / 16 + 1) db \1 ENDM -ATTR_BLK_DATA: MACRO +MACRO ATTR_BLK_DATA db \1 ; which regions are affected db \2 + (\3 << 2) + (\4 << 4) ; palette for each region db \5, \6, \7, \8 ; x1, y1, x2, y2 ENDM -PAL_SET: MACRO +MACRO PAL_SET db ($a << 3) + 1 dw \1, \2, \3, \4 ds 7, 0 ENDM -PAL_TRN: MACRO +MACRO PAL_TRN db ($b << 3) + 1 ds 15, 0 ENDM -MLT_REQ: MACRO +MACRO MLT_REQ db ($11 << 3) + 1 db \1 - 1 ds 14, 0 ENDM -CHR_TRN: MACRO +MACRO CHR_TRN db ($13 << 3) + 1 db \1 + (\2 << 1) ds 14, 0 ENDM -PCT_TRN: MACRO +MACRO PCT_TRN db ($14 << 3) + 1 ds 15, 0 ENDM -MASK_EN: MACRO +MACRO MASK_EN db ($17 << 3) + 1 db \1 ds 14, 0 ENDM -DATA_SND: MACRO +MACRO DATA_SND db ($f << 3) + 1 dw \1 ; address db \2 ; bank diff --git a/data/sprites/sprites.asm b/data/sprites/sprites.asm index 1cd793c17..72715087d 100644 --- a/data/sprites/sprites.asm +++ b/data/sprites/sprites.asm @@ -1,4 +1,4 @@ -overworld_sprite: MACRO +MACRO overworld_sprite dw \1 db \2 tiles db BANK(\1) diff --git a/data/text_boxes.asm b/data/text_boxes.asm index 34e6a4147..f96f2d687 100644 --- a/data/text_boxes.asm +++ b/data/text_boxes.asm @@ -15,7 +15,7 @@ TextBoxCoordTable: db MON_SPRITE_POPUP, 6, 4, 14, 13 db -1 ; end -text_box_text: MACRO +MACRO text_box_text db \1 ; text box ID db \2, \3, \4, \5 ; text box coordinates dw \6 ; text pointer diff --git a/data/text_predef_pointers.asm b/data/text_predef_pointers.asm index 8c125fa0c..d13e0f169 100644 --- a/data/text_predef_pointers.asm +++ b/data/text_predef_pointers.asm @@ -1,4 +1,4 @@ -add_tx_pre: MACRO +MACRO add_tx_pre \1_id:: dw \1 ENDM diff --git a/data/tilemaps.asm b/data/tilemaps.asm index 3b1e24c9d..3e1033beb 100644 --- a/data/tilemaps.asm +++ b/data/tilemaps.asm @@ -1,4 +1,4 @@ -tile_ids: MACRO +MACRO tile_ids dw \1 dn \3, \2 ENDM diff --git a/data/tilesets/bookshelf_tile_ids.asm b/data/tilesets/bookshelf_tile_ids.asm index 55143d730..715297618 100644 --- a/data/tilesets/bookshelf_tile_ids.asm +++ b/data/tilesets/bookshelf_tile_ids.asm @@ -1,4 +1,4 @@ -bookshelf_tile: MACRO +MACRO bookshelf_tile db \1, \2 db_tx_pre \3 ENDM diff --git a/data/tilesets/collision_tile_ids.asm b/data/tilesets/collision_tile_ids.asm index c1bee7ce7..94efc9259 100644 --- a/data/tilesets/collision_tile_ids.asm +++ b/data/tilesets/collision_tile_ids.asm @@ -1,4 +1,4 @@ -coll_tiles: MACRO +MACRO coll_tiles IF _NARG db \# ; all args ENDC diff --git a/data/tilesets/door_tile_ids.asm b/data/tilesets/door_tile_ids.asm index 716f76f3b..4b4a65edc 100644 --- a/data/tilesets/door_tile_ids.asm +++ b/data/tilesets/door_tile_ids.asm @@ -14,7 +14,7 @@ DoorTileIDPointers: dbw PLATEAU, .PlateauDoorTileIDs db -1 ; end -door_tiles: MACRO +MACRO door_tiles IF _NARG db \# ; all args ENDC diff --git a/data/tilesets/spinner_tiles.asm b/data/tilesets/spinner_tiles.asm index 82506b6df..9ce3deb37 100644 --- a/data/tilesets/spinner_tiles.asm +++ b/data/tilesets/spinner_tiles.asm @@ -1,4 +1,4 @@ -spinner: MACRO +MACRO spinner ; \1: source ; \2: offset (BANK() chokes on literals) ; \3: dest diff --git a/data/tilesets/tileset_headers.asm b/data/tilesets/tileset_headers.asm index 375b06873..a8500ef22 100644 --- a/data/tilesets/tileset_headers.asm +++ b/data/tilesets/tileset_headers.asm @@ -1,4 +1,4 @@ -tileset: MACRO +MACRO tileset db BANK(\1_GFX) dw \1_Block, \1_GFX, \1_Coll db \2, \3, \4 ; counter tiles diff --git a/data/tilesets/warp_carpet_tile_ids.asm b/data/tilesets/warp_carpet_tile_ids.asm index a8a190116..1b8ebbbeb 100644 --- a/data/tilesets/warp_carpet_tile_ids.asm +++ b/data/tilesets/warp_carpet_tile_ids.asm @@ -4,7 +4,7 @@ WarpTileListPointers: dw .FacingLeftWarpTiles dw .FacingRightWarpTiles -warp_carpet_tiles: MACRO +MACRO warp_carpet_tiles IF _NARG db \# ; all args ENDC diff --git a/data/tilesets/warp_tile_ids.asm b/data/tilesets/warp_tile_ids.asm index 80df6cdfd..823b4b36e 100644 --- a/data/tilesets/warp_tile_ids.asm +++ b/data/tilesets/warp_tile_ids.asm @@ -26,7 +26,7 @@ WarpTileIDPointers: dw .PlateauWarpTileIDs assert_table_length NUM_TILESETS -warp_tiles: MACRO +MACRO warp_tiles IF _NARG db \# ; all args ENDC diff --git a/data/trainers/move_choices.asm b/data/trainers/move_choices.asm index 66bc36e7e..3741f06b9 100644 --- a/data/trainers/move_choices.asm +++ b/data/trainers/move_choices.asm @@ -1,9 +1,9 @@ -move_choices: MACRO +MACRO move_choices IF _NARG db \# ; all args ENDC db 0 ; end -list_index += 1 + DEF list_index += 1 ENDM ; move choice modification methods that are applied for each trainer class diff --git a/data/trainers/pic_pointers_money.asm b/data/trainers/pic_pointers_money.asm index 36ee77ce7..4515d8806 100644 --- a/data/trainers/pic_pointers_money.asm +++ b/data/trainers/pic_pointers_money.asm @@ -1,4 +1,4 @@ -pic_money: MACRO +MACRO pic_money dw \1 bcd3 \2 ENDM diff --git a/data/yes_no_menu_strings.asm b/data/yes_no_menu_strings.asm index e6e232794..82c3a3a5d 100644 --- a/data/yes_no_menu_strings.asm +++ b/data/yes_no_menu_strings.asm @@ -1,4 +1,4 @@ -two_option_menu: MACRO +MACRO two_option_menu db \1, \2, \3 dw \4 ENDM diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index afed76d74..c25257f08 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -372,7 +372,7 @@ LoadAnimationTileset: ld c, a ; number of tiles jp CopyVideoData ; load tileset -anim_tileset: MACRO +MACRO anim_tileset db \1 dw \2 db -1 ; padding diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index 90e99f98e..bc4665e4d 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -662,7 +662,7 @@ BattleTransition_Circle_Sub2: const CIRCLE_LEFT const CIRCLE_RIGHT -half_circle: MACRO +MACRO half_circle ; quadrant x, circle data, target coord db \1 dw \2 diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm index 91541f090..7c48c0863 100644 --- a/engine/events/diploma.asm +++ b/engine/events/diploma.asm @@ -1,4 +1,4 @@ -CIRCLE_TILE_ID EQU $70 +DEF CIRCLE_TILE_ID EQU $70 DisplayDiploma:: call SaveScreenTilesToBuffer2 @@ -83,7 +83,7 @@ UnusedPlayerNameLengthFunc: dec c jr .loop -diploma_text: MACRO +MACRO diploma_text dw \3 dwcoord \1, \2 ENDM diff --git a/engine/events/hidden_objects/cinnabar_gym_quiz.asm b/engine/events/hidden_objects/cinnabar_gym_quiz.asm index e2ae7fbe8..f4c46115a 100644 --- a/engine/events/hidden_objects/cinnabar_gym_quiz.asm +++ b/engine/events/hidden_objects/cinnabar_gym_quiz.asm @@ -183,12 +183,12 @@ UpdateCinnabarGymGateTileBlocks_:: jr nz, .loop ret -gym_gate_coord: MACRO +MACRO gym_gate_coord db \1, \2, \3, 0 ENDM -HORIZONTAL_GATE_BLOCK EQU $54 -VERTICAL_GATE_BLOCK EQU $5f +DEF HORIZONTAL_GATE_BLOCK EQU $54 +DEF VERTICAL_GATE_BLOCK EQU $5f CinnabarGymGateCoords: ; x coord, y coord, block id diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm index 164096402..6f6b88c7d 100644 --- a/engine/gfx/mon_icons.asm +++ b/engine/gfx/mon_icons.asm @@ -280,8 +280,8 @@ GetPartyMonSpriteID: INCLUDE "data/pokemon/menu_icons.asm" -INC_FRAME_1 EQUS "0, $20" -INC_FRAME_2 EQUS "$20, $20" +DEF INC_FRAME_1 EQUS "0, $20" +DEF INC_FRAME_2 EQUS "$20, $20" BugIconFrame1: INCBIN "gfx/icons/bug.2bpp", INC_FRAME_1 PlantIconFrame1: INCBIN "gfx/icons/plant.2bpp", INC_FRAME_1 diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm index a12c0c8ad..930472161 100644 --- a/engine/items/town_map.asm +++ b/engine/items/town_map.asm @@ -1,4 +1,4 @@ -NOT_VISITED EQU $fe +DEF NOT_VISITED EQU $fe DisplayTownMap: call LoadTownMap diff --git a/engine/movie/intro.asm b/engine/movie/intro.asm index 9813d67c9..bca095a81 100644 --- a/engine/movie/intro.asm +++ b/engine/movie/intro.asm @@ -3,7 +3,7 @@ const MOVE_GENGAR_RIGHT const MOVE_GENGAR_LEFT -ANIMATION_END EQU 80 +DEF ANIMATION_END EQU 80 PlayIntro: xor a diff --git a/engine/movie/oak_speech/init_player_data.asm b/engine/movie/oak_speech/init_player_data.asm index f722ebffe..44869d447 100644 --- a/engine/movie/oak_speech/init_player_data.asm +++ b/engine/movie/oak_speech/init_player_data.asm @@ -21,7 +21,7 @@ InitPlayerData2: ld hl, wNumBoxItems call InitializeEmptyList -START_MONEY EQU $3000 +DEF START_MONEY EQU $3000 ld hl, wPlayerMoney + 1 ld a, HIGH(START_MONEY) ld [hld], a diff --git a/engine/movie/trade.asm b/engine/movie/trade.asm index a287c9b4a..35423820d 100644 --- a/engine/movie/trade.asm +++ b/engine/movie/trade.asm @@ -56,12 +56,12 @@ TradeAnimCommon: ld [wOptions], a ret -addtradefunc: MACRO +MACRO addtradefunc \1TradeFunc:: dw \1 ENDM -tradefunc: MACRO +MACRO tradefunc db (\1TradeFunc - TradeFuncPointerTable) / 2 ENDM @@ -697,7 +697,7 @@ Trade_WriteCircleOAM: jr nz, .loop ret -trade_circle_oam: MACRO +MACRO trade_circle_oam dw \1 db \2, \3 ENDM diff --git a/engine/overworld/dust_smoke.asm b/engine/overworld/dust_smoke.asm index bb2915675..c97b3e567 100644 --- a/engine/overworld/dust_smoke.asm +++ b/engine/overworld/dust_smoke.asm @@ -51,7 +51,7 @@ GetMoveBoulderDustFunctionPointer: pop hl ret -boulder_dust_adjust: MACRO +MACRO boulder_dust_adjust db \1, \2 ; coords dw \3 ; function ENDM diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index 2fb8c3841..e08da61a0 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -1,4 +1,4 @@ -MAP_TILESET_SIZE EQU $60 +DEF MAP_TILESET_SIZE EQU $60 UpdatePlayerSprite: ld a, [wSpritePlayerStateData2WalkAnimationCounter] diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index c458a013b..6a890cfdc 100644 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -475,7 +475,7 @@ FishingRodOAM: dbsprite 8, 10, 0, 0, $fe, 0 ; left dbsprite 11, 10, 0, 0, $fe, OAM_HFLIP ; right -fishing_gfx: MACRO +MACRO fishing_gfx dw \1 db \2 db BANK(\1) diff --git a/home/init.asm b/home/init.asm index e5840e654..81e75586f 100644 --- a/home/init.asm +++ b/home/init.asm @@ -8,7 +8,7 @@ SoftReset:: Init:: ; Program init. -rLCDC_DEFAULT EQU %11100011 +DEF rLCDC_DEFAULT EQU %11100011 ; * LCD enabled ; * Window tile map at $9C00 ; * Window display enabled diff --git a/home/print_num.asm b/home/print_num.asm index e2628b1f4..ef2022391 100644 --- a/home/print_num.asm +++ b/home/print_num.asm @@ -59,20 +59,20 @@ PrintNumber:: cp 6 jr z, .hundred_thousands -print_digit: MACRO +MACRO print_digit -IF (\1) / $10000 - ld a, \1 / $10000 % $100 -ELSE - xor a -ENDC + IF (\1) / $10000 + ld a, \1 / $10000 % $100 + ELSE + xor a + ENDC ldh [hPowerOf10 + 0], a -IF (\1) / $100 - ld a, \1 / $100 % $100 -ELSE - xor a -ENDC + IF (\1) / $100 + ld a, \1 / $100 % $100 + ELSE + xor a + ENDC ldh [hPowerOf10 + 1], a ld a, \1 / $1 % $100 diff --git a/home/text.asm b/home/text.asm index 244c6fdba..b1f5e55c0 100644 --- a/home/text.asm +++ b/home/text.asm @@ -123,7 +123,7 @@ TextIDErrorText:: ; "[hSpriteIndexOrTextID] ERROR." text_far _TextIDErrorText text_end -print_name: MACRO +MACRO print_name push de ld de, \1 jr PlaceCommandCharacter diff --git a/home/text_script.asm b/home/text_script.asm index 39bc3f5bf..9e1ba275f 100644 --- a/home/text_script.asm +++ b/home/text_script.asm @@ -66,7 +66,7 @@ DisplayTextID:: ; check first byte of text for special cases -dict2: MACRO +MACRO dict2 cp \1 jr nz, .not\@ \2 diff --git a/home/vblank.asm b/home/vblank.asm index 4c7abc200..b8b46ba72 100644 --- a/home/vblank.asm +++ b/home/vblank.asm @@ -93,7 +93,7 @@ DelayFrame:: ; Wait for the next vblank interrupt. ; As a bonus, this saves battery. -NOT_VBLANKED EQU 1 +DEF NOT_VBLANKED EQU 1 ld a, NOT_VBLANKED ldh [hVBlankOccurred], a diff --git a/macros/asserts.asm b/macros/asserts.asm index df2cdcd44..64e6bc7bf 100644 --- a/macros/asserts.asm +++ b/macros/asserts.asm @@ -1,122 +1,122 @@ ; Macros to verify assumptions about the data or code -table_width: MACRO -CURRENT_TABLE_WIDTH = \1 -IF _NARG == 2 -REDEF CURRENT_TABLE_START EQUS "\2" -ELSE -REDEF CURRENT_TABLE_START EQUS "._table_width\@" -{CURRENT_TABLE_START}: -ENDC +MACRO table_width + DEF CURRENT_TABLE_WIDTH = \1 + IF _NARG == 2 + REDEF CURRENT_TABLE_START EQUS "\2" + ELSE + REDEF CURRENT_TABLE_START EQUS "._table_width\@" + {CURRENT_TABLE_START}: + ENDC ENDM -assert_table_length: MACRO -x = \1 +MACRO assert_table_length + DEF x = \1 ASSERT x * CURRENT_TABLE_WIDTH == @ - {CURRENT_TABLE_START}, \ "{CURRENT_TABLE_START}: expected {d:x} entries, each {d:CURRENT_TABLE_WIDTH} bytes" ENDM -list_start: MACRO -list_index = 0 -IF _NARG == 1 -REDEF CURRENT_LIST_START EQUS "\1" -ELSE -REDEF CURRENT_LIST_START EQUS "._list_start\@" -{CURRENT_LIST_START}: -ENDC +MACRO list_start + DEF list_index = 0 + IF _NARG == 1 + REDEF CURRENT_LIST_START EQUS "\1" + ELSE + REDEF CURRENT_LIST_START EQUS "._list_start\@" + {CURRENT_LIST_START}: + ENDC ENDM -li: MACRO +MACRO li ASSERT !STRIN(\1, "@"), STRCAT("String terminator \"@\" in list entry: ", \1) db \1, "@" -list_index += 1 + DEF list_index += 1 ENDM -assert_list_length: MACRO -x = \1 +MACRO assert_list_length + DEF x = \1 ASSERT x == list_index, \ "{CURRENT_LIST_START}: expected {d:x} entries, got {d:list_index}" ENDM -nybble_array: MACRO -CURRENT_NYBBLE_ARRAY_VALUE = 0 -CURRENT_NYBBLE_ARRAY_LENGTH = 0 -IF _NARG == 1 -REDEF CURRENT_NYBBLE_ARRAY_START EQUS "\1" -ELSE -REDEF CURRENT_NYBBLE_ARRAY_START EQUS "._nybble_array\@" -{CURRENT_NYBBLE_ARRAY_START}: -ENDC +MACRO nybble_array + DEF CURRENT_NYBBLE_ARRAY_VALUE = 0 + DEF CURRENT_NYBBLE_ARRAY_LENGTH = 0 + IF _NARG == 1 + REDEF CURRENT_NYBBLE_ARRAY_START EQUS "\1" + ELSE + REDEF CURRENT_NYBBLE_ARRAY_START EQUS "._nybble_array\@" + {CURRENT_NYBBLE_ARRAY_START}: + ENDC ENDM -nybble: MACRO +MACRO nybble ASSERT 0 <= (\1) && (\1) < $10, "nybbles must be 0-15" -CURRENT_NYBBLE_ARRAY_VALUE = (\1) | (CURRENT_NYBBLE_ARRAY_VALUE << 4) -CURRENT_NYBBLE_ARRAY_LENGTH += 1 -IF CURRENT_NYBBLE_ARRAY_LENGTH % 2 == 0 - db CURRENT_NYBBLE_ARRAY_VALUE -CURRENT_NYBBLE_ARRAY_VALUE = 0 -ENDC + DEF CURRENT_NYBBLE_ARRAY_VALUE = (\1) | (CURRENT_NYBBLE_ARRAY_VALUE << 4) + DEF CURRENT_NYBBLE_ARRAY_LENGTH += 1 + IF CURRENT_NYBBLE_ARRAY_LENGTH % 2 == 0 + db CURRENT_NYBBLE_ARRAY_VALUE + DEF CURRENT_NYBBLE_ARRAY_VALUE = 0 + ENDC ENDM -end_nybble_array: MACRO -IF CURRENT_NYBBLE_ARRAY_LENGTH % 2 - db CURRENT_NYBBLE_ARRAY_VALUE << 4 -ENDC -IF _NARG == 1 -x = \1 - ASSERT x == CURRENT_NYBBLE_ARRAY_LENGTH, \ - "{CURRENT_NYBBLE_ARRAY_START}: expected {d:x} nybbles, got {d:CURRENT_NYBBLE_ARRAY_LENGTH}" -x = (x + 1) / 2 - ASSERT x == @ - {CURRENT_NYBBLE_ARRAY_START}, \ - "{CURRENT_NYBBLE_ARRAY_START}: expected {d:x} bytes" -ENDC +MACRO end_nybble_array + IF CURRENT_NYBBLE_ARRAY_LENGTH % 2 + db CURRENT_NYBBLE_ARRAY_VALUE << 4 + ENDC + IF _NARG == 1 + DEF x = \1 + ASSERT x == CURRENT_NYBBLE_ARRAY_LENGTH, \ + "{CURRENT_NYBBLE_ARRAY_START}: expected {d:x} nybbles, got {d:CURRENT_NYBBLE_ARRAY_LENGTH}" + DEF x = (x + 1) / 2 + ASSERT x == @ - {CURRENT_NYBBLE_ARRAY_START}, \ + "{CURRENT_NYBBLE_ARRAY_START}: expected {d:x} bytes" + ENDC ENDM -bit_array: MACRO -CURRENT_BIT_ARRAY_VALUE = 0 -CURRENT_BIT_ARRAY_LENGTH = 0 -IF _NARG == 1 -REDEF CURRENT_BIT_ARRAY_START EQUS "\1" -ELSE -REDEF CURRENT_BIT_ARRAY_START EQUS "._bit_array\@" -{CURRENT_BIT_ARRAY_START}: -ENDC +MACRO bit_array + DEF CURRENT_BIT_ARRAY_VALUE = 0 + DEF CURRENT_BIT_ARRAY_LENGTH = 0 + IF _NARG == 1 + REDEF CURRENT_BIT_ARRAY_START EQUS "\1" + ELSE + REDEF CURRENT_BIT_ARRAY_START EQUS "._bit_array\@" + {CURRENT_BIT_ARRAY_START}: + ENDC ENDM -dbit: MACRO +MACRO dbit ASSERT (\1) == 0 || (\1) == 1, "bits must be 0 or 1" -CURRENT_BIT_ARRAY_VALUE |= (\1) << (CURRENT_BIT_ARRAY_LENGTH % 8) -CURRENT_BIT_ARRAY_LENGTH += 1 -IF CURRENT_BIT_ARRAY_LENGTH % 8 == 0 - db CURRENT_BIT_ARRAY_VALUE -CURRENT_BIT_ARRAY_VALUE = 0 -ENDC + DEF CURRENT_BIT_ARRAY_VALUE |= (\1) << (CURRENT_BIT_ARRAY_LENGTH % 8) + DEF CURRENT_BIT_ARRAY_LENGTH += 1 + IF CURRENT_BIT_ARRAY_LENGTH % 8 == 0 + db CURRENT_BIT_ARRAY_VALUE + DEF CURRENT_BIT_ARRAY_VALUE = 0 + ENDC ENDM -end_bit_array: MACRO -IF CURRENT_BIT_ARRAY_LENGTH % 8 - db CURRENT_BIT_ARRAY_VALUE -ENDC -IF _NARG == 1 -x = \1 - ASSERT x == CURRENT_BIT_ARRAY_LENGTH, \ - "{CURRENT_BIT_ARRAY_START}: expected {d:x} bits, got {d:CURRENT_BIT_ARRAY_LENGTH}" -x = (x + 7) / 8 - ASSERT x == @ - {CURRENT_BIT_ARRAY_START}, \ - "{CURRENT_BIT_ARRAY_START}: expected {d:x} bytes" -ENDC +MACRO end_bit_array + IF CURRENT_BIT_ARRAY_LENGTH % 8 + db CURRENT_BIT_ARRAY_VALUE + ENDC + IF _NARG == 1 + DEF x = \1 + ASSERT x == CURRENT_BIT_ARRAY_LENGTH, \ + "{CURRENT_BIT_ARRAY_START}: expected {d:x} bits, got {d:CURRENT_BIT_ARRAY_LENGTH}" + DEF x = (x + 7) / 8 + ASSERT x == @ - {CURRENT_BIT_ARRAY_START}, \ + "{CURRENT_BIT_ARRAY_START}: expected {d:x} bytes" + ENDC ENDM -def_grass_wildmons: MACRO +MACRO def_grass_wildmons ;\1: encounter rate -CURRENT_GRASS_WILDMONS_RATE = \1 -REDEF CURRENT_GRASS_WILDMONS_LABEL EQUS "._def_grass_wildmons_\1" + DEF CURRENT_GRASS_WILDMONS_RATE = \1 + REDEF CURRENT_GRASS_WILDMONS_LABEL EQUS "._def_grass_wildmons_\1" {CURRENT_GRASS_WILDMONS_LABEL}: db \1 ENDM -end_grass_wildmons: MACRO +MACRO end_grass_wildmons IF CURRENT_GRASS_WILDMONS_RATE == 0 ASSERT 1 == @ - {CURRENT_GRASS_WILDMONS_LABEL}, \ "def_grass_wildmons {d:CURRENT_GRASS_WILDMONS_RATE}: expected 1 byte" @@ -126,15 +126,15 @@ end_grass_wildmons: MACRO ENDC ENDM -def_water_wildmons: MACRO +MACRO def_water_wildmons ;\1: encounter rate -CURRENT_WATER_WILDMONS_RATE = \1 -REDEF CURRENT_WATER_WILDMONS_LABEL EQUS "._def_water_wildmons_\1" + DEF CURRENT_WATER_WILDMONS_RATE = \1 + REDEF CURRENT_WATER_WILDMONS_LABEL EQUS "._def_water_wildmons_\1" {CURRENT_WATER_WILDMONS_LABEL}: db \1 ENDM -end_water_wildmons: MACRO +MACRO end_water_wildmons IF CURRENT_WATER_WILDMONS_RATE == 0 ASSERT 1 == @ - {CURRENT_WATER_WILDMONS_LABEL}, \ "def_water_wildmons {d:CURRENT_WATER_WILDMONS_RATE}: expected 1 byte" diff --git a/macros/code.asm b/macros/code.asm index e0b3e9c9d..3c65e100a 100644 --- a/macros/code.asm +++ b/macros/code.asm @@ -1,20 +1,20 @@ ; Syntactic sugar macros -lb: MACRO ; r, hi, lo +MACRO lb ; r, hi, lo ld \1, ((\2) & $ff) << 8 + ((\3) & $ff) ENDM -ldpal: MACRO +MACRO ldpal ld \1, \2 << 6 | \3 << 4 | \4 << 2 | \5 ENDM ; Design patterns -dict: MACRO -IF \1 == 0 - and a -ELSE - cp \1 -ENDC +MACRO dict + IF \1 == 0 + and a + ELSE + cp \1 + ENDC jp z, \2 ENDM diff --git a/macros/const.asm b/macros/const.asm index afbde7bc0..7c7f85918 100644 --- a/macros/const.asm +++ b/macros/const.asm @@ -1,48 +1,48 @@ ; Enumerate constants -const_def: MACRO -IF _NARG >= 1 -const_value = \1 -ELSE -const_value = 0 -ENDC -IF _NARG >= 2 -const_inc = \2 -ELSE -const_inc = 1 -ENDC +MACRO const_def + IF _NARG >= 1 + DEF const_value = \1 + ELSE + DEF const_value = 0 + ENDC + IF _NARG >= 2 + DEF const_inc = \2 + ELSE + DEF const_inc = 1 + ENDC ENDM -const: MACRO -\1 EQU const_value -const_value += const_inc +MACRO const + DEF \1 EQU const_value + DEF const_value += const_inc ENDM -shift_const: MACRO -\1 EQU 1 << const_value -const_value += const_inc +MACRO shift_const + DEF \1 EQU 1 << const_value + DEF const_value += const_inc ENDM -const_skip: MACRO -if _NARG >= 1 -const_value += const_inc * (\1) -else -const_value += const_inc -endc +MACRO const_skip + if _NARG >= 1 + DEF const_value += const_inc * (\1) + else + DEF const_value += const_inc + endc ENDM -const_next: MACRO -if (const_value > 0 && \1 < const_value) || (const_value < 0 && \1 > const_value) -fail "const_next cannot go backwards from {const_value} to \1" -else -const_value = \1 -endc +MACRO const_next + if (const_value > 0 && \1 < const_value) || (const_value < 0 && \1 > const_value) + fail "const_next cannot go backwards from {const_value} to \1" + else + DEF const_value = \1 + endc ENDM -rb_skip: MACRO -IF _NARG == 1 -rsset _RS + \1 -ELSE -rsset _RS + 1 -ENDC +MACRO rb_skip + IF _NARG == 1 + rsset _RS + \1 + ELSE + rsset _RS + 1 + ENDC ENDM diff --git a/macros/coords.asm b/macros/coords.asm index 6b16e7f79..813888951 100644 --- a/macros/coords.asm +++ b/macros/coords.asm @@ -1,4 +1,4 @@ -validate_coords: MACRO +MACRO validate_coords IF _NARG >= 4 IF \1 >= \3 fail "x coord out of range" @@ -11,11 +11,11 @@ validate_coords: MACRO ENDC ENDM -hlcoord EQUS "coord hl," -bccoord EQUS "coord bc," -decoord EQUS "coord de," +DEF hlcoord EQUS "coord hl," +DEF bccoord EQUS "coord bc," +DEF decoord EQUS "coord de," -coord: MACRO +MACRO coord ; register, x, y[, origin] validate_coords \2, \3 IF _NARG >= 4 @@ -25,11 +25,11 @@ coord: MACRO ENDC ENDM -hlbgcoord EQUS "bgcoord hl," -bcbgcoord EQUS "bgcoord bc," -debgcoord EQUS "bgcoord de," +DEF hlbgcoord EQUS "bgcoord hl," +DEF bcbgcoord EQUS "bgcoord bc," +DEF debgcoord EQUS "bgcoord de," -bgcoord: MACRO +MACRO bgcoord ; register, x, y[, origin] validate_coords \2, \3, BG_MAP_WIDTH, BG_MAP_HEIGHT IF _NARG >= 4 @@ -39,22 +39,22 @@ bgcoord: MACRO ENDC ENDM -hlowcoord EQUS "owcoord hl," -bcowcoord EQUS "owcoord bc," -deowcoord EQUS "owcoord de," +DEF hlowcoord EQUS "owcoord hl," +DEF bcowcoord EQUS "owcoord bc," +DEF deowcoord EQUS "owcoord de," -owcoord: MACRO +MACRO owcoord ; register, x, y, map width ld \1, wOverworldMap + ((\2) + 3) + (((\3) + 3) * ((\4) + (3 * 2))) ENDM -event_displacement: MACRO +MACRO event_displacement ; map width, x blocks, y blocks dw (wOverworldMap + 7 + (\1) + ((\1) + 6) * ((\3) >> 1) + ((\2) >> 1)) db \3, \2 ENDM -dwcoord: MACRO +MACRO dwcoord ; x, y validate_coords \1, \2 IF _NARG >= 3 @@ -64,7 +64,7 @@ dwcoord: MACRO ENDC ENDM -ldcoord_a: MACRO +MACRO ldcoord_a ; x, y[, origin] validate_coords \1, \2 IF _NARG >= 3 @@ -74,7 +74,7 @@ ldcoord_a: MACRO ENDC ENDM -lda_coord: MACRO +MACRO lda_coord ; x, y[, origin] validate_coords \1, \2 IF _NARG >= 3 @@ -84,7 +84,7 @@ lda_coord: MACRO ENDC ENDM -dbmapcoord: MACRO +MACRO dbmapcoord ; x, y db \2, \1 ENDM diff --git a/macros/data.asm b/macros/data.asm index 1f3c87a0d..5092b74ee 100644 --- a/macros/data.asm +++ b/macros/data.asm @@ -1,71 +1,71 @@ ; Value macros -percent EQUS "* $ff / 100" +DEF percent EQUS "* $ff / 100" -bcd2: MACRO +MACRO bcd2 dn ((\1) / 1000) % 10, ((\1) / 100) % 10 dn ((\1) / 10) % 10, (\1) % 10 ENDM -bcd3: MACRO +MACRO bcd3 dn ((\1) / 100000) % 10, ((\1) / 10000) % 10 dn ((\1) / 1000) % 10, ((\1) / 100) % 10 dn ((\1) / 10) % 10, (\1) % 10 ENDM ; used in data/pokemon/base_stats/*.asm -tmhm: MACRO +MACRO tmhm ; initialize bytes to 0 -FOR n, (NUM_TM_HM + 7) / 8 -_tm{d:n} = 0 -ENDR -; set bits of bytes -REPT _NARG - IF DEF(\1_TMNUM) -n = (\1_TMNUM - 1) / 8 -i = (\1_TMNUM - 1) % 8 -_tm{d:n} |= 1 << i - ELSE - FAIL "\1 is not a TM or HM move" - ENDC - SHIFT -ENDR -; output bytes -FOR n, (NUM_TM_HM + 7) / 8 - db _tm{d:n} -ENDR + FOR n, (NUM_TM_HM + 7) / 8 + DEF _tm{d:n} = 0 + ENDR + ; set bits of bytes + REPT _NARG + IF DEF(\1_TMNUM) + DEF n = (\1_TMNUM - 1) / 8 + DEF i = (\1_TMNUM - 1) % 8 + DEF _tm{d:n} |= 1 << i + ELSE + FAIL "\1 is not a TM or HM move" + ENDC + SHIFT + ENDR + ; output bytes + FOR n, (NUM_TM_HM + 7) / 8 + db _tm{d:n} + ENDR ENDM ; Constant data (db, dw, dl) macros -dbw: MACRO +MACRO dbw db \1 dw \2 ENDM -dwb: MACRO +MACRO dwb dw \1 db \2 ENDM -dn: MACRO ; nybbles -REPT _NARG / 2 - db ((\1) << 4) | (\2) - SHIFT 2 -ENDR +MACRO dn ; nybbles + REPT _NARG / 2 + db ((\1) << 4) | (\2) + SHIFT 2 + ENDR ENDM -dba: MACRO ; dbw bank, address -REPT _NARG - dbw BANK(\1), \1 - SHIFT -ENDR +MACRO dba ; dbw bank, address + REPT _NARG + dbw BANK(\1), \1 + SHIFT + ENDR ENDM -dab: MACRO ; dwb address, bank -REPT _NARG - dwb \1, BANK(\1) - SHIFT -ENDR +MACRO dab ; dwb address, bank + REPT _NARG + dwb \1, BANK(\1) + SHIFT + ENDR ENDM diff --git a/macros/farcall.asm b/macros/farcall.asm index 93f8f1ac0..a40bff361 100644 --- a/macros/farcall.asm +++ b/macros/farcall.asm @@ -1,28 +1,28 @@ -farcall: MACRO +MACRO farcall ld b, BANK(\1) ld hl, \1 call Bankswitch ENDM -callfar: MACRO +MACRO callfar ld hl, \1 ld b, BANK(\1) call Bankswitch ENDM -farjp: MACRO +MACRO farjp ld b, BANK(\1) ld hl, \1 jp Bankswitch ENDM -jpfar: MACRO +MACRO jpfar ld hl, \1 ld b, BANK(\1) jp Bankswitch ENDM -homecall: MACRO +MACRO homecall ldh a, [hLoadedROMBank] push af ld a, BANK(\1) @@ -34,7 +34,7 @@ homecall: MACRO ld [MBC1RomBank], a ENDM -homecall_sf: MACRO ; homecall but save flags by popping into bc instead of af +MACRO homecall_sf ; homecall but save flags by popping into bc instead of af ldh a, [hLoadedROMBank] push af ld a, BANK(\1) diff --git a/macros/gfx.asm b/macros/gfx.asm index 98eabec44..944e6dd59 100644 --- a/macros/gfx.asm +++ b/macros/gfx.asm @@ -1,22 +1,22 @@ -RGB: MACRO -REPT _NARG / 3 - dw palred (\1) + palgreen (\2) + palblue (\3) - SHIFT 3 -ENDR +MACRO RGB + REPT _NARG / 3 + dw palred (\1) + palgreen (\2) + palblue (\3) + SHIFT 3 + ENDR ENDM -palred EQUS "(1 << 0) *" -palgreen EQUS "(1 << 5) *" -palblue EQUS "(1 << 10) *" +DEF palred EQUS "(1 << 0) *" +DEF palgreen EQUS "(1 << 5) *" +DEF palblue EQUS "(1 << 10) *" -palettes EQUS "* PALETTE_SIZE" -palette EQUS "+ PALETTE_SIZE *" -color EQUS "+ PAL_COLOR_SIZE *" +DEF palettes EQUS "* PALETTE_SIZE" +DEF palette EQUS "+ PALETTE_SIZE *" +DEF color EQUS "+ PAL_COLOR_SIZE *" -tiles EQUS "* LEN_2BPP_TILE" -tile EQUS "+ LEN_2BPP_TILE *" +DEF tiles EQUS "* LEN_2BPP_TILE" +DEF tile EQUS "+ LEN_2BPP_TILE *" -dbsprite: MACRO +MACRO dbsprite ; x tile, y tile, x pixel, y pixel, vtile offset, attributes db (\2 * TILE_WIDTH) % $100 + \4, (\1 * TILE_WIDTH) % $100 + \3, \5, \6 ENDM diff --git a/macros/predef.asm b/macros/predef.asm index d86582d1b..45b0197b8 100644 --- a/macros/predef.asm +++ b/macros/predef.asm @@ -1,32 +1,32 @@ -predef_id: MACRO +MACRO predef_id ld a, (\1Predef - PredefPointers) / 3 ENDM -predef: MACRO +MACRO predef predef_id \1 call Predef ENDM -predef_jump: MACRO +MACRO predef_jump predef_id \1 jp Predef ENDM -tx_pre_id: MACRO +MACRO tx_pre_id ld a, (\1_id - TextPredefs) / 2 + 1 ENDM -tx_pre: MACRO +MACRO tx_pre tx_pre_id \1 call PrintPredefTextID ENDM -tx_pre_jump: MACRO +MACRO tx_pre_jump tx_pre_id \1 jp PrintPredefTextID ENDM -db_tx_pre: MACRO +MACRO db_tx_pre db (\1_id - TextPredefs) / 2 + 1 ENDM diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm index b12a2adca..114bf5768 100644 --- a/macros/scripts/audio.asm +++ b/macros/scripts/audio.asm @@ -1,4 +1,4 @@ -audio_header: MACRO +MACRO audio_header db (_NARG - 2) << 6 | \2 dw \1_\2 IF _NARG > 2 @@ -24,7 +24,7 @@ ENDM ; small magnitude means quick change, large magnitude means slow change ; in signed magnitude representation, so a value of 8 is the same as (negative) 0 const pitch_sweep_cmd ; $10 -pitch_sweep: MACRO +MACRO pitch_sweep db pitch_sweep_cmd IF \2 < 0 db (\1 << 4) | (%1000 | (\2 * -1)) @@ -41,8 +41,8 @@ ENDM ; fade: positive value means decrease in volume, negative value means increase in volume ; small magnitude means quick change, large magnitude means slow change ; in signed magnitude representation, so a value of 8 is the same as (negative) 0 -square_note_cmd EQU sfx_note_cmd ; $20 -square_note: MACRO +DEF square_note_cmd EQU sfx_note_cmd ; $20 +MACRO square_note db square_note_cmd | \1 IF \3 < 0 db (\2 << 4) | (%1000 | (\3 * -1)) @@ -56,8 +56,8 @@ ENDM ; fade: positive value means decrease in volume, negative value means increase in volume ; small magnitude means quick change, large magnitude means slow change ; in signed magnitude representation, so a value of 8 is the same as (negative) 0 -noise_note_cmd EQU sfx_note_cmd ; $20 -noise_note: MACRO +DEF noise_note_cmd EQU sfx_note_cmd ; $20 +MACRO noise_note db noise_note_cmd | \1 IF \3 < 0 db (\2 << 4) | (%1000 | (\3 * -1)) @@ -68,7 +68,7 @@ noise_note: MACRO ENDM ; arguments: pitch, length [1, 16] -note: MACRO +MACRO note db (\1 << 4) | (\2 - 1) ENDM @@ -76,7 +76,7 @@ ENDM ; arguments: instrument [1, 19], length [1, 16] const drum_note_cmd ; $b0 -drum_note: MACRO +MACRO drum_note db drum_note_cmd | (\2 - 1) db \1 ENDM @@ -85,7 +85,7 @@ ENDM ; like drum_note but one 1 byte instead of 2 ; can only be used with instruments 1-10, excluding 2 ; unused -drum_note_short: MACRO +MACRO drum_note_short db (\1 << 4) | (\2 - 1) ENDM @@ -93,7 +93,7 @@ ENDM ; arguments: length [1, 16] const rest_cmd ; $c0 -rest: MACRO +MACRO rest db rest_cmd | (\1 - 1) ENDM @@ -104,7 +104,7 @@ ENDM ; small magnitude means quick change, large magnitude means slow change ; in signed magnitude representation, so a value of 8 is the same as (negative) 0 const note_type_cmd ; $d0 -note_type: MACRO +MACRO note_type db note_type_cmd | \1 IF \3 < 0 db (\2 << 4) | (%1000 | (\3 * -1)) @@ -114,8 +114,8 @@ note_type: MACRO ENDM ; arguments: speed [0, 15] -drum_speed_cmd EQU note_type_cmd ; $d0 -drum_speed: MACRO +DEF drum_speed_cmd EQU note_type_cmd ; $d0 +MACRO drum_speed db drum_speed_cmd | \1 ENDM @@ -123,7 +123,7 @@ ENDM ; arguments: octave [1, 8] const octave_cmd ; $e0 -octave: MACRO +MACRO octave db octave_cmd | (8 - \1) ENDM @@ -131,7 +131,7 @@ ENDM ; when enabled, effective frequency used is incremented by 1 const toggle_perfect_pitch_cmd ; $e8 -toggle_perfect_pitch: MACRO +MACRO toggle_perfect_pitch db toggle_perfect_pitch_cmd ENDM @@ -142,7 +142,7 @@ ENDM ; depth: amplitude of vibrato wave ; rate: frequency of vibrato wave const vibrato_cmd ; $ea -vibrato: MACRO +MACRO vibrato db vibrato_cmd db \1 db (\2 << 4) | \3 @@ -150,7 +150,7 @@ ENDM ; arguments: length [1, 256], octave [1, 8], pitch const pitch_slide_cmd ; $eb -pitch_slide: MACRO +MACRO pitch_slide db pitch_slide_cmd db \1 - 1 db ((8 - \2) << 4) | \3 @@ -158,7 +158,7 @@ ENDM ; arguments: duty cycle [0, 3] (12.5%, 25%, 50%, 75%) const duty_cycle_cmd ; $ec -duty_cycle: MACRO +MACRO duty_cycle db duty_cycle_cmd db \1 ENDM @@ -170,27 +170,27 @@ ENDM ; if larger than $100, large note speed or note length values might cause overflow ; stored in big endian const tempo_cmd ; $ed -tempo: MACRO +MACRO tempo db tempo_cmd db HIGH(\1), LOW(\1) ENDM ; arguments: left output enable mask, right output enable mask const stereo_panning_cmd ; $ee -stereo_panning: MACRO +MACRO stereo_panning db stereo_panning_cmd db (\1 << 4) | \2 ENDM const unknownmusic0xef_cmd ; $ef -unknownmusic0xef: MACRO +MACRO unknownmusic0xef db unknownmusic0xef_cmd db \1 ENDM ; arguments: left master volume [0, 7], right master volume [0, 7] const volume_cmd ; $f0 -volume: MACRO +MACRO volume db volume_cmd db (\1 << 4) | \2 ENDM @@ -199,7 +199,7 @@ ENDM ; when enabled, the sfx data is interpreted as music data const execute_music_cmd ; $f8 -execute_music: MACRO +MACRO execute_music db execute_music_cmd ENDM @@ -207,27 +207,27 @@ ENDM ; arguments: duty cycle 1, duty cycle 2, duty cycle 3, duty cycle 4 const duty_cycle_pattern_cmd ; $fc -duty_cycle_pattern: MACRO +MACRO duty_cycle_pattern db duty_cycle_pattern_cmd db \1 << 6 | \2 << 4 | \3 << 2 | \4 ENDM ; arguments: address const sound_call_cmd ; $fd -sound_call: MACRO +MACRO sound_call db sound_call_cmd dw \1 ENDM ; arguments: count, address const sound_loop_cmd ; $fe -sound_loop: MACRO +MACRO sound_loop db sound_loop_cmd db \1 dw \2 ENDM const sound_ret_cmd ; $ff -sound_ret: MACRO +MACRO sound_ret db sound_ret_cmd ENDM diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm index a9b1c6159..fdbedb6f0 100644 --- a/macros/scripts/events.asm +++ b/macros/scripts/events.asm @@ -1,7 +1,7 @@ ;\1 = event index ;\2 = return result in carry instead of zero flag -CheckEvent: MACRO -event_byte = ((\1) / 8) +MACRO CheckEvent + DEF event_byte = ((\1) / 8) ld a, [wEventFlags + event_byte] IF _NARG > 1 @@ -19,9 +19,9 @@ ENDM ;\1 = event index -CheckEventReuseA: MACRO +MACRO CheckEventReuseA IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) + DEF event_byte = ((\1) / 8) ld a, [wEventFlags + event_byte] ENDC @@ -31,10 +31,10 @@ ENDM ;\1 = event index ;\2 = event index of the last event used before the branch -CheckEventAfterBranchReuseA: MACRO -event_byte = ((\2) / 8) +MACRO CheckEventAfterBranchReuseA + DEF event_byte = ((\2) / 8) IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) + DEF event_byte = ((\1) / 8) ld a, [wEventFlags + event_byte] ENDC @@ -45,7 +45,7 @@ ENDM ;\1 = reg ;\2 = event index ;\3 = event index this event is relative to (optional, this is needed when there is a fixed flag address) -EventFlagBit: MACRO +MACRO EventFlagBit IF _NARG > 2 ld \1, ((\3) % 8) + ((\2) - (\3)) ELSE @@ -56,24 +56,24 @@ ENDM ;\1 = reg ;\2 = event index -EventFlagAddress: MACRO -event_byte = ((\2) / 8) +MACRO EventFlagAddress + DEF event_byte = ((\2) / 8) ld \1, wEventFlags + event_byte ENDM ;\1 = event index -CheckEventHL: MACRO -event_byte = ((\1) / 8) +MACRO CheckEventHL + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte bit (\1) % 8, [hl] ENDM ;\1 = event index -CheckEventReuseHL: MACRO -IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) +MACRO CheckEventReuseHL + IF event_byte != ((\1) / 8) + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte ENDC @@ -83,18 +83,18 @@ ENDM ; dangerous, only use when HL is guaranteed to be the desired value ;\1 = event index -CheckEventForceReuseHL: MACRO -event_byte = ((\1) / 8) +MACRO CheckEventForceReuseHL + DEF event_byte = ((\1) / 8) bit (\1) % 8, [hl] ENDM ;\1 = event index ;\2 = event index of the last event used before the branch -CheckEventAfterBranchReuseHL: MACRO -event_byte = ((\2) / 8) -IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) +MACRO CheckEventAfterBranchReuseHL + DEF event_byte = ((\2) / 8) + IF event_byte != ((\1) / 8) + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte ENDC @@ -103,8 +103,8 @@ ENDM ;\1 = event index -CheckAndSetEvent: MACRO -event_byte = ((\1) / 8) +MACRO CheckAndSetEvent + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte bit (\1) % 8, [hl] set (\1) % 8, [hl] @@ -112,8 +112,8 @@ ENDM ;\1 = event index -CheckAndResetEvent: MACRO -event_byte = ((\1) / 8) +MACRO CheckAndResetEvent + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte bit (\1) % 8, [hl] res (\1) % 8, [hl] @@ -121,7 +121,7 @@ ENDM ;\1 = event index -CheckAndSetEventA: MACRO +MACRO CheckAndSetEventA ld a, [wEventFlags + ((\1) / 8)] bit (\1) % 8, a set (\1) % 8, a @@ -130,7 +130,7 @@ ENDM ;\1 = event index -CheckAndResetEventA: MACRO +MACRO CheckAndResetEventA ld a, [wEventFlags + ((\1) / 8)] bit (\1) % 8, a res (\1) % 8, a @@ -139,17 +139,17 @@ ENDM ;\1 = event index -SetEvent: MACRO -event_byte = ((\1) / 8) +MACRO SetEvent + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte set (\1) % 8, [hl] ENDM ;\1 = event index -SetEventReuseHL: MACRO +MACRO SetEventReuseHL IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte ENDC @@ -159,10 +159,10 @@ ENDM ;\1 = event index ;\2 = event index of the last event used before the branch -SetEventAfterBranchReuseHL: MACRO -event_byte = ((\2) / 8) -IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) +MACRO SetEventAfterBranchReuseHL + DEF event_byte = ((\2) / 8) + IF event_byte != ((\1) / 8) + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte ENDC @@ -172,8 +172,8 @@ ENDM ; dangerous, only use when HL is guaranteed to be the desired value ;\1 = event index -SetEventForceReuseHL: MACRO -event_byte = ((\1) / 8) +MACRO SetEventForceReuseHL + DEF event_byte = ((\1) / 8) set (\1) % 8, [hl] ENDM @@ -181,7 +181,7 @@ ENDM ;\1 = event index ;\2 = event index ;\3, \4, ... = additional (optional) event indices -SetEvents: MACRO +MACRO SetEvents SetEvent \1 REPT _NARG - 1 SetEventReuseHL \2 @@ -191,17 +191,17 @@ ENDM ;\1 = event index -ResetEvent: MACRO -event_byte = ((\1) / 8) +MACRO ResetEvent + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte res (\1) % 8, [hl] ENDM ;\1 = event index -ResetEventReuseHL: MACRO +MACRO ResetEventReuseHL IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte ENDC @@ -211,10 +211,10 @@ ENDM ;\1 = event index ;\2 = event index of the last event used before the branch -ResetEventAfterBranchReuseHL: MACRO -event_byte = ((\2) / 8) -IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) +MACRO ResetEventAfterBranchReuseHL + DEF event_byte = ((\2) / 8) + IF event_byte != ((\1) / 8) + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte ENDC @@ -224,8 +224,8 @@ ENDM ; dangerous, only use when HL is guaranteed to be the desired value ;\1 = event index -ResetEventForceReuseHL: MACRO -event_byte = ((\1) / 8) +MACRO ResetEventForceReuseHL + DEF event_byte = ((\1) / 8) res (\1) % 8, [hl] ENDM @@ -233,7 +233,7 @@ ENDM ;\1 = event index ;\2 = event index ;\3 = event index (optional) -ResetEvents: MACRO +MACRO ResetEvents ResetEvent \1 REPT _NARG - 1 ResetEventReuseHL \2 @@ -244,9 +244,9 @@ ENDM ;\1 = start ;\2 = end -SetEventRange: MACRO -event_start_byte = ((\1) / 8) -event_end_byte = ((\2) / 8) +MACRO SetEventRange + DEF event_start_byte = ((\1) / 8) + DEF event_end_byte = ((\2) / 8) IF event_end_byte < event_start_byte FAIL "Incorrect argument order in SetEventRange." @@ -257,12 +257,12 @@ event_end_byte = ((\2) / 8) or (1 << (((\2) % 8) + 1)) - (1 << ((\1) % 8)) ld [wEventFlags + event_start_byte], a ELSE -event_fill_start = event_start_byte + 1 -event_fill_count = event_end_byte - event_start_byte - 1 + DEF event_fill_start = event_start_byte + 1 + DEF event_fill_count = event_end_byte - event_start_byte - 1 IF ((\1) % 8) == 0 -event_fill_start -= 1 -event_fill_count += 1 + DEF event_fill_start -= 1 + DEF event_fill_count += 1 ELSE ld a, [wEventFlags + event_start_byte] or $ff - ((1 << ((\1) % 8)) - 1) @@ -270,7 +270,7 @@ event_fill_count += 1 ENDC IF ((\2) % 8) == 7 -event_fill_count += 1 + DEF event_fill_count += 1 ENDC IF event_fill_count == 1 @@ -306,9 +306,9 @@ ENDM ;\1 = start ;\2 = end ;\3 = assume a is 0 if present -ResetEventRange: MACRO -event_start_byte = ((\1) / 8) -event_end_byte = ((\2) / 8) +MACRO ResetEventRange + DEF event_start_byte = ((\1) / 8) + DEF event_end_byte = ((\2) / 8) IF event_end_byte < event_start_byte FAIL "Incorrect argument order in ResetEventRange." @@ -319,12 +319,12 @@ event_end_byte = ((\2) / 8) and ~((1 << (((\2) % 8) + 1)) - (1 << ((\1) % 8))) & $ff ld [wEventFlags + event_start_byte], a ELSE -event_fill_start = event_start_byte + 1 -event_fill_count = event_end_byte - event_start_byte - 1 + DEF event_fill_start = event_start_byte + 1 + DEF event_fill_count = event_end_byte - event_start_byte - 1 IF ((\1) % 8) == 0 -event_fill_start -= 1 -event_fill_count += 1 + DEF event_fill_start -= 1 + DEF event_fill_count += 1 ELSE ld a, [wEventFlags + event_start_byte] and ~($ff - ((1 << ((\1) % 8)) - 1)) & $ff @@ -332,7 +332,7 @@ event_fill_count += 1 ENDC IF ((\2) % 8) == 7 -event_fill_count += 1 + DEF event_fill_count += 1 ENDC IF event_fill_count == 1 @@ -375,10 +375,10 @@ ENDM ;\1 = event index 1 ;\2 = event index 2 ;\3 = try to reuse a (optional) -CheckBothEventsSet: MACRO +MACRO CheckBothEventsSet IF ((\1) / 8) == ((\2) / 8) IF (_NARG < 3) || (((\1) / 8) != event_byte) -event_byte = ((\1) / 8) + DEF event_byte = ((\1) / 8) ld a, [wEventFlags + ((\1) / 8)] ENDC and (1 << ((\1) % 8)) | (1 << ((\2) % 8)) @@ -411,7 +411,7 @@ ENDM ; returns the complement of whether either event is set in Z flag ;\1 = event index 1 ;\2 = event index 2 -CheckEitherEventSet: MACRO +MACRO CheckEitherEventSet IF ((\1) / 8) == ((\2) / 8) ld a, [wEventFlags + ((\1) / 8)] and (1 << ((\1) % 8)) | (1 << ((\2) % 8)) @@ -441,7 +441,7 @@ ENDM ; for handling fixed event bits when events are inserted/removed ;\1 = event index ;\2 = fixed flag bit -AdjustEventBit: MACRO +MACRO AdjustEventBit IF ((\1) % 8) != (\2) add ((\1) % 8) - (\2) ENDC diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index bae8fd077..5c1a8ad56 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -1,7 +1,7 @@ -def_object_events: MACRO -REDEF _NUM_OBJECT_EVENTS EQUS "_NUM_OBJECT_EVENTS_\@" +MACRO def_object_events + REDEF _NUM_OBJECT_EVENTS EQUS "_NUM_OBJECT_EVENTS_\@" db {_NUM_OBJECT_EVENTS} -{_NUM_OBJECT_EVENTS} = 0 + DEF {_NUM_OBJECT_EVENTS} = 0 ENDM ;\1 x position @@ -13,7 +13,7 @@ ENDM ;\7 items only: item id ;\7 trainers only: trainer class/pokemon id ;\8 trainers only: trainer number/pokemon level -object_event: MACRO +MACRO object_event db \3 db \2 + 4 db \1 + 4 @@ -29,42 +29,42 @@ object_event: MACRO ELSE db \6 ENDC -{_NUM_OBJECT_EVENTS} += 1 + DEF {_NUM_OBJECT_EVENTS} += 1 ENDM -def_warp_events: MACRO -REDEF _NUM_WARP_EVENTS EQUS "_NUM_WARP_EVENTS_\@" +MACRO def_warp_events + REDEF _NUM_WARP_EVENTS EQUS "_NUM_WARP_EVENTS_\@" db {_NUM_WARP_EVENTS} -{_NUM_WARP_EVENTS} = 0 + DEF {_NUM_WARP_EVENTS} = 0 ENDM ;\1 x position ;\2 y position ;\3 destination map (-1 = wLastMap) ;\4 destination warp id; starts at 1 (internally at 0) -warp_event: MACRO +MACRO warp_event db \2, \1, \4 - 1, \3 -_WARP_{d:{_NUM_WARP_EVENTS}}_X = \1 -_WARP_{d:{_NUM_WARP_EVENTS}}_Y = \2 -{_NUM_WARP_EVENTS} += 1 + DEF _WARP_{d:{_NUM_WARP_EVENTS}}_X = \1 + DEF _WARP_{d:{_NUM_WARP_EVENTS}}_Y = \2 + DEF {_NUM_WARP_EVENTS} += 1 ENDM -def_bg_events: MACRO -REDEF _NUM_BG_EVENTS EQUS "_NUM_BG_EVENTS_\@" +MACRO def_bg_events + REDEF _NUM_BG_EVENTS EQUS "_NUM_BG_EVENTS_\@" db {_NUM_BG_EVENTS} -{_NUM_BG_EVENTS} = 0 + DEF {_NUM_BG_EVENTS} = 0 ENDM ;\1 x position ;\2 y position ;\3 sign id -bg_event: MACRO +MACRO bg_event db \2, \1, \3 -{_NUM_BG_EVENTS} += 1 + DEF {_NUM_BG_EVENTS} += 1 ENDM ;\1 source map -def_warps_to: MACRO +MACRO def_warps_to FOR n, _NUM_WARP_EVENTS warp_to _WARP_{d:n}_X, _WARP_{d:n}_Y, \1_WIDTH ENDR @@ -73,18 +73,18 @@ ENDM ;\1 x position ;\2 y position ;\3 map width -warp_to: MACRO +MACRO warp_to event_displacement \3, \1, \2 ENDM ;\1 first bit offset / first object id -def_trainers: MACRO -IF _NARG == 1 -CURRENT_TRAINER_BIT = \1 -ELSE -CURRENT_TRAINER_BIT = 1 -ENDC +MACRO def_trainers + IF _NARG == 1 + DEF CURRENT_TRAINER_BIT = \1 + ELSE + DEF CURRENT_TRAINER_BIT = 1 + ENDC ENDM ;\1 event flag @@ -92,22 +92,22 @@ ENDM ;\3 TextBeforeBattle ;\4 TextAfterBattle ;\5 TextEndBattle -trainer: MACRO -_ev_bit = \1 % 8 -_cur_bit = CURRENT_TRAINER_BIT % 8 +MACRO trainer + DEF _ev_bit = \1 % 8 + DEF _cur_bit = CURRENT_TRAINER_BIT % 8 ASSERT _ev_bit == _cur_bit, \ "Expected \1 to be bit {d:_cur_bit}, got {d:_ev_bit}" db CURRENT_TRAINER_BIT db \2 << 4 dw wEventFlags + (\1 - CURRENT_TRAINER_BIT) / 8 dw \3, \5, \4, \4 -CURRENT_TRAINER_BIT += 1 + DEF CURRENT_TRAINER_BIT += 1 ENDM ;\1 x position ;\2 y position ;\3 movement data -map_coord_movement: MACRO +MACRO map_coord_movement dbmapcoord \1, \2 dw \3 ENDM @@ -117,10 +117,10 @@ ENDM ;\2 map id ;\3 tileset ;\4 connections: combo of NORTH, SOUTH, WEST, and/or EAST, or 0 for none -map_header: MACRO -CURRENT_MAP_WIDTH = \2_WIDTH -CURRENT_MAP_HEIGHT = \2_HEIGHT -CURRENT_MAP_OBJECT EQUS "\1_Object" +MACRO map_header + DEF CURRENT_MAP_WIDTH = \2_WIDTH + DEF CURRENT_MAP_HEIGHT = \2_HEIGHT + DEF CURRENT_MAP_OBJECT EQUS "\1_Object" \1_h:: db \3 db CURRENT_MAP_HEIGHT, CURRENT_MAP_WIDTH @@ -131,7 +131,7 @@ CURRENT_MAP_OBJECT EQUS "\1_Object" ENDM ; Comes after map_header and connection macros -end_map_header: MACRO +MACRO end_map_header dw {CURRENT_MAP_OBJECT} PURGE CURRENT_MAP_WIDTH, CURRENT_MAP_HEIGHT, CURRENT_MAP_OBJECT ENDM @@ -142,63 +142,63 @@ ENDM ;\3 map id ;\4 offset of the target map relative to the current map ; (x offset for east/west, y offset for north/south) -connection: MACRO - -; Calculate tile offsets for source (current) and target maps -_src = 0 -_tgt = (\4) + 3 -IF _tgt < 2 -_src = -_tgt -_tgt = 0 -ENDC - -IF !STRCMP("\1", "north") -_blk = \3_WIDTH * (\3_HEIGHT - 3) + _src -_map = _tgt -_win = (\3_WIDTH + 6) * \3_HEIGHT + 1 -_y = \3_HEIGHT * 2 - 1 -_x = (\4) * -2 -_len = CURRENT_MAP_WIDTH + 3 - (\4) -IF _len > \3_WIDTH -_len = \3_WIDTH -ENDC - -ELIF !STRCMP("\1", "south") -_blk = _src -_map = (CURRENT_MAP_WIDTH + 6) * (CURRENT_MAP_HEIGHT + 3) + _tgt -_win = \3_WIDTH + 7 -_y = 0 -_x = (\4) * -2 -_len = CURRENT_MAP_WIDTH + 3 - (\4) -IF _len > \3_WIDTH -_len = \3_WIDTH -ENDC - -ELIF !STRCMP("\1", "west") -_blk = (\3_WIDTH * _src) + \3_WIDTH - 3 -_map = (CURRENT_MAP_WIDTH + 6) * _tgt -_win = (\3_WIDTH + 6) * 2 - 6 -_y = (\4) * -2 -_x = \3_WIDTH * 2 - 1 -_len = CURRENT_MAP_HEIGHT + 3 - (\4) -IF _len > \3_HEIGHT -_len = \3_HEIGHT -ENDC - -ELIF !STRCMP("\1", "east") -_blk = (\3_WIDTH * _src) -_map = (CURRENT_MAP_WIDTH + 6) * _tgt + CURRENT_MAP_WIDTH + 3 -_win = \3_WIDTH + 7 -_y = (\4) * -2 -_x = 0 -_len = CURRENT_MAP_HEIGHT + 3 - (\4) -IF _len > \3_HEIGHT -_len = \3_HEIGHT -ENDC - -ELSE -fail "Invalid direction for 'connection'." -ENDC +MACRO connection + + ; Calculate tile offsets for source (current) and target maps + DEF _src = 0 + DEF _tgt = (\4) + 3 + IF _tgt < 2 + DEF _src = -_tgt + DEF _tgt = 0 + ENDC + + IF !STRCMP("\1", "north") + DEF _blk = \3_WIDTH * (\3_HEIGHT - 3) + _src + DEF _map = _tgt + DEF _win = (\3_WIDTH + 6) * \3_HEIGHT + 1 + DEF _y = \3_HEIGHT * 2 - 1 + DEF _x = (\4) * -2 + DEF _len = CURRENT_MAP_WIDTH + 3 - (\4) + IF _len > \3_WIDTH + DEF _len = \3_WIDTH + ENDC + + ELIF !STRCMP("\1", "south") + DEF _blk = _src + DEF _map = (CURRENT_MAP_WIDTH + 6) * (CURRENT_MAP_HEIGHT + 3) + _tgt + DEF _win = \3_WIDTH + 7 + DEF _y = 0 + DEF _x = (\4) * -2 + DEF _len = CURRENT_MAP_WIDTH + 3 - (\4) + IF _len > \3_WIDTH + DEF _len = \3_WIDTH + ENDC + + ELIF !STRCMP("\1", "west") + DEF _blk = (\3_WIDTH * _src) + \3_WIDTH - 3 + DEF _map = (CURRENT_MAP_WIDTH + 6) * _tgt + DEF _win = (\3_WIDTH + 6) * 2 - 6 + DEF _y = (\4) * -2 + DEF _x = \3_WIDTH * 2 - 1 + DEF _len = CURRENT_MAP_HEIGHT + 3 - (\4) + IF _len > \3_HEIGHT + DEF _len = \3_HEIGHT + ENDC + + ELIF !STRCMP("\1", "east") + DEF _blk = (\3_WIDTH * _src) + DEF _map = (CURRENT_MAP_WIDTH + 6) * _tgt + CURRENT_MAP_WIDTH + 3 + DEF _win = \3_WIDTH + 7 + DEF _y = (\4) * -2 + DEF _x = 0 + DEF _len = CURRENT_MAP_HEIGHT + 3 - (\4) + IF _len > \3_HEIGHT + DEF _len = \3_HEIGHT + ENDC + + ELSE + fail "Invalid direction for 'connection'." + ENDC db \3 dw \2_Blocks + _blk diff --git a/macros/scripts/text.asm b/macros/scripts/text.asm index c446c6c7e..418e839ca 100644 --- a/macros/scripts/text.asm +++ b/macros/scripts/text.asm @@ -1,44 +1,44 @@ -text EQUS "db TX_START," ; Start writing text. -next EQUS "db \"\"," ; Move a line down. -line EQUS "db \"\"," ; Start writing at the bottom line. -para EQUS "db \"\"," ; Start a new paragraph. -cont EQUS "db \"\"," ; Scroll to the next line. -done EQUS "db \"\"" ; End a text box. -prompt EQUS "db \"\"" ; Prompt the player to end a text box (initiating some other event). +DEF text EQUS "db TX_START," ; Start writing text. +DEF next EQUS "db \"\"," ; Move a line down. +DEF line EQUS "db \"\"," ; Start writing at the bottom line. +DEF para EQUS "db \"\"," ; Start a new paragraph. +DEF cont EQUS "db \"\"," ; Scroll to the next line. +DEF done EQUS "db \"\"" ; End a text box. +DEF prompt EQUS "db \"\"" ; Prompt the player to end a text box (initiating some other event). -page EQUS "db \"\"," ; Start a new Pokédex page. -dex EQUS "db \"\", \"@\"" ; End a Pokédex entry. +DEF page EQUS "db \"\"," ; Start a new Pokédex page. +DEF dex EQUS "db \"\", \"@\"" ; End a Pokédex entry. ; TextCommandJumpTable indexes (see home/text.asm) const_def const TX_START ; $00 -text_start: MACRO +MACRO text_start db TX_START ENDM const TX_RAM ; $01 -text_ram: MACRO +MACRO text_ram db TX_RAM dw \1 ; address to read from ENDM const TX_BCD ; $02 -text_bcd: MACRO +MACRO text_bcd db TX_BCD dw \1 ; address to read from db \2 ; number of bytes + print flags ENDM const TX_MOVE ; $03 -text_move: MACRO +MACRO text_move db TX_MOVE dw \1 ; address of the new location ENDM const TX_BOX ; $04 -text_box: MACRO +MACRO text_box ; draw box db TX_BOX dw \1 ; address of upper left corner @@ -46,27 +46,27 @@ text_box: MACRO ENDM const TX_LOW ; $05 -text_low: MACRO +MACRO text_low db TX_LOW ENDM const TX_PROMPT_BUTTON ; $06 -text_promptbutton: MACRO +MACRO text_promptbutton db TX_PROMPT_BUTTON ENDM const TX_SCROLL ; $07 -text_scroll: MACRO +MACRO text_scroll db TX_SCROLL ENDM const TX_START_ASM ; $08 -text_asm: MACRO +MACRO text_asm db TX_START_ASM ENDM const TX_NUM ; $09 -text_decimal: MACRO +MACRO text_decimal ; print a big-endian decimal number. db TX_NUM dw \1 ; address to read from @@ -74,76 +74,76 @@ text_decimal: MACRO ENDM const TX_PAUSE ; $0a -text_pause: MACRO +MACRO text_pause db TX_PAUSE ENDM const TX_SOUND_GET_ITEM_1 ; $0b -sound_get_item_1: MACRO +MACRO sound_get_item_1 db TX_SOUND_GET_ITEM_1 ENDM -TX_SOUND_LEVEL_UP EQU TX_SOUND_GET_ITEM_1 -sound_level_up EQUS "sound_get_item_1" +DEF TX_SOUND_LEVEL_UP EQU TX_SOUND_GET_ITEM_1 +DEF sound_level_up EQUS "sound_get_item_1" const TX_DOTS ; $0c -text_dots: MACRO +MACRO text_dots db TX_DOTS db \1 ; number of ellipses to draw ENDM const TX_WAIT_BUTTON ; $0d -text_waitbutton: MACRO +MACRO text_waitbutton db TX_WAIT_BUTTON ENDM const TX_SOUND_POKEDEX_RATING ; $0e -sound_pokedex_rating: MACRO +MACRO sound_pokedex_rating db TX_SOUND_POKEDEX_RATING ENDM const TX_SOUND_GET_ITEM_1_DUPLICATE ; $0f -sound_get_item_1_duplicate: MACRO +MACRO sound_get_item_1_duplicate db TX_SOUND_GET_ITEM_1_DUPLICATE ENDM const TX_SOUND_GET_ITEM_2 ; $10 -sound_get_item_2: MACRO +MACRO sound_get_item_2 db TX_SOUND_GET_ITEM_2 ENDM const TX_SOUND_GET_KEY_ITEM ; $11 -sound_get_key_item: MACRO +MACRO sound_get_key_item db TX_SOUND_GET_KEY_ITEM ENDM const TX_SOUND_CAUGHT_MON ; $12 -sound_caught_mon: MACRO +MACRO sound_caught_mon db TX_SOUND_CAUGHT_MON ENDM const TX_SOUND_DEX_PAGE_ADDED ; $13 -sound_dex_page_added: MACRO +MACRO sound_dex_page_added db TX_SOUND_DEX_PAGE_ADDED ENDM const TX_SOUND_CRY_NIDORINA ; $14 -sound_cry_nidorina: MACRO +MACRO sound_cry_nidorina db TX_SOUND_CRY_NIDORINA ENDM const TX_SOUND_CRY_PIDGEOT ; $15 -sound_cry_pidgeot: MACRO +MACRO sound_cry_pidgeot db TX_SOUND_CRY_PIDGEOT ENDM const TX_SOUND_CRY_DEWGONG ; $16 -sound_cry_dewgong: MACRO +MACRO sound_cry_dewgong db TX_SOUND_CRY_DEWGONG ENDM const TX_FAR ; $17 -text_far: MACRO +MACRO text_far db TX_FAR dab \1 ; address of text commands ENDM @@ -152,7 +152,7 @@ ENDM const_next $50 const TX_END ; $50 -text_end: MACRO +MACRO text_end db TX_END ENDM @@ -161,12 +161,12 @@ ENDM const_def -1, -1 const TX_SCRIPT_POKECENTER_NURSE ; $ff -script_pokecenter_nurse: MACRO +MACRO script_pokecenter_nurse db TX_SCRIPT_POKECENTER_NURSE ENDM const TX_SCRIPT_MART ; $fe -script_mart: MACRO +MACRO script_mart db TX_SCRIPT_MART db _NARG ; number of items IF _NARG @@ -176,12 +176,12 @@ script_mart: MACRO ENDM const TX_SCRIPT_BILLS_PC ; $fd -script_bills_pc: MACRO +MACRO script_bills_pc db TX_SCRIPT_BILLS_PC ENDM const TX_SCRIPT_PLAYERS_PC ; $fc -script_players_pc: MACRO +MACRO script_players_pc db TX_SCRIPT_PLAYERS_PC ENDM @@ -190,23 +190,23 @@ ENDM const_skip ; $fa const TX_SCRIPT_POKECENTER_PC ; $f9 -script_pokecenter_pc: MACRO +MACRO script_pokecenter_pc db TX_SCRIPT_POKECENTER_PC ENDM const_skip ; $f8 const TX_SCRIPT_PRIZE_VENDOR ; $f7 -script_prize_vendor: MACRO +MACRO script_prize_vendor db TX_SCRIPT_PRIZE_VENDOR ENDM const TX_SCRIPT_CABLE_CLUB_RECEPTIONIST ; $f6 -script_cable_club_receptionist: MACRO +MACRO script_cable_club_receptionist db TX_SCRIPT_CABLE_CLUB_RECEPTIONIST ENDM const TX_SCRIPT_VENDING_MACHINE ; $f5 -script_vending_machine: MACRO +MACRO script_vending_machine db TX_SCRIPT_VENDING_MACHINE ENDM diff --git a/macros/vc.asm b/macros/vc.asm index 0d6b8db08..0990e988f 100644 --- a/macros/vc.asm +++ b/macros/vc.asm @@ -1,39 +1,39 @@ -vc_hook: MACRO -IF DEF(_RED_VC) || DEF(_BLUE_VC) -.VC_\1:: -ENDC +MACRO vc_hook + IF DEF(_RED_VC) || DEF(_BLUE_VC) + .VC_\1:: + ENDC ENDM -vc_hook_red: MACRO -IF DEF(_RED_VC) -.VC_\1:: -ENDC +MACRO vc_hook_red + IF DEF(_RED_VC) + .VC_\1:: + ENDC ENDM -vc_hook_blue: MACRO -IF DEF(_BLUE_VC) -.VC_\1:: -ENDC +MACRO vc_hook_blue + IF DEF(_BLUE_VC) + .VC_\1:: + ENDC ENDM -vc_patch: MACRO -IF DEF(_RED_VC) || DEF(_BLUE_VC) - ASSERT !DEF(CURRENT_VC_PATCH), "Already started a vc_patch" -CURRENT_VC_PATCH EQUS "\1" -.VC_{CURRENT_VC_PATCH}:: -ENDC +MACRO vc_patch + IF DEF(_RED_VC) || DEF(_BLUE_VC) + ASSERT !DEF(CURRENT_VC_PATCH), "Already started a vc_patch" + DEF CURRENT_VC_PATCH EQUS "\1" + .VC_{CURRENT_VC_PATCH}:: + ENDC ENDM -vc_patch_end: MACRO -IF DEF(_RED_VC) || DEF(_BLUE_VC) - ASSERT DEF(CURRENT_VC_PATCH), "No vc_patch started" -.VC_{CURRENT_VC_PATCH}_End:: - PURGE CURRENT_VC_PATCH -ENDC +MACRO vc_patch_end + IF DEF(_RED_VC) || DEF(_BLUE_VC) + ASSERT DEF(CURRENT_VC_PATCH), "No vc_patch started" + .VC_{CURRENT_VC_PATCH}_End:: + PURGE CURRENT_VC_PATCH + ENDC ENDM -vc_assert: MACRO -IF DEF(_RED_VC) || DEF(_BLUE_VC) - ASSERT \# -ENDC +MACRO vc_assert + IF DEF(_RED_VC) || DEF(_BLUE_VC) + ASSERT \# + ENDC ENDM diff --git a/macros/wram.asm b/macros/wram.asm index 872e7f57d..df5dcf909 100644 --- a/macros/wram.asm +++ b/macros/wram.asm @@ -1,12 +1,12 @@ ; Used in wram.asm -flag_array: MACRO +MACRO flag_array ds ((\1) + 7) / 8 ENDM -BOX_STRUCT_LENGTH EQU 25 + NUM_MOVES * 2 +DEF BOX_STRUCT_LENGTH EQU 25 + NUM_MOVES * 2 -box_struct: MACRO +MACRO box_struct \1Species:: db \1HP:: dw \1BoxLevel:: db @@ -27,7 +27,7 @@ box_struct: MACRO \1PP:: ds NUM_MOVES ENDM -party_struct: MACRO +MACRO party_struct box_struct \1 \1Level:: db \1Stats:: @@ -38,7 +38,7 @@ party_struct: MACRO \1Special:: dw ENDM -battle_struct: MACRO +MACRO battle_struct \1Species:: db \1HP:: dw \1PartyPos:: @@ -60,7 +60,7 @@ battle_struct: MACRO \1PP:: ds NUM_MOVES ENDM -spritestatedata1: MACRO +MACRO spritestatedata1 \1PictureID:: db \1MovementStatus:: db \1ImageIndex:: db @@ -78,7 +78,7 @@ spritestatedata1: MACRO \1End:: ENDM -spritestatedata2: MACRO +MACRO spritestatedata2 \1WalkAnimationCounter:: db ds 1 \1YDisplacement:: db @@ -96,14 +96,14 @@ spritestatedata2: MACRO \1End:: ENDM -sprite_oam_struct: MACRO +MACRO sprite_oam_struct \1YCoord:: db \1XCoord:: db \1TileID:: db \1Attributes:: db ENDM -map_connection_struct: MACRO +MACRO map_connection_struct \1ConnectedMap:: db \1ConnectionStripSrc:: dw \1ConnectionStripDest:: dw diff --git a/rgbdscheck.asm b/rgbdscheck.asm index 556fbae4d..8c51e1af6 100644 --- a/rgbdscheck.asm +++ b/rgbdscheck.asm @@ -1,8 +1,8 @@ -MAJOR EQU 0 -MINOR EQU 5 -PATCH EQU 2 +DEF MAJOR EQU 0 +DEF MINOR EQU 5 +DEF PATCH EQU 2 -wrong_rgbds: MACRO +MACRO wrong_rgbds fail "pokered requires rgbds v0.5.2 or newer." ENDM diff --git a/sram.asm b/sram.asm index 684517912..6cb453711 100644 --- a/sram.asm +++ b/sram.asm @@ -26,12 +26,12 @@ sMainDataCheckSum:: db ; The PC boxes will not fit into one SRAM bank, ; so they use multiple SECTIONs -box_n = 0 -boxes: MACRO -REPT \1 -box_n += 1 -sBox{d:box_n}:: ds wBoxDataEnd - wBoxDataStart -ENDR +DEF box_n = 0 +MACRO boxes + REPT \1 + DEF box_n += 1 + sBox{d:box_n}:: ds wBoxDataEnd - wBoxDataStart + ENDR ENDM SECTION "Saved Boxes 1", SRAM diff --git a/vc/pokeblue.constants.asm b/vc/pokeblue.constants.asm index a197afaea..f89c4fd9a 100644 --- a/vc/pokeblue.constants.asm +++ b/vc/pokeblue.constants.asm @@ -2,8 +2,8 @@ INCLUDE "constants.asm" ; These are all the asm constants needed to make the blue_vc patch. -vc_const: MACRO -x = \1 +MACRO vc_const + DEF x = \1 PRINTLN "00:{04x:x} \1" ; same format as rgblink's .sym file ENDM diff --git a/vc/pokered.constants.asm b/vc/pokered.constants.asm index 4bc623881..cb7efa963 100644 --- a/vc/pokered.constants.asm +++ b/vc/pokered.constants.asm @@ -2,8 +2,8 @@ INCLUDE "constants.asm" ; These are all the asm constants needed to make the red_vc patch. -vc_const: MACRO -x = \1 +MACRO vc_const + DEF x = \1 PRINTLN "00:{04x:x} \1" ; same format as rgblink's .sym file ENDM From 6c945a6b6a0d21ba4bf0c2977bb44d2482dffcb8 Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 7 Jun 2022 22:27:30 -0400 Subject: [PATCH 13/45] Mention WildDataPointers in map_constants.asm --- constants/map_constants.asm | 1 + 1 file changed, 1 insertion(+) diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 86e18e625..48b254613 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -12,6 +12,7 @@ ENDM ; - MapHSPointers (see data/maps/hide_show_data.asm) ; - MapSpriteSets (see data/maps/sprite_sets.asm) ; - ExternalMapEntries (see data/maps/town_map_entries.asm) +; - WildDataPointers (see data/wild/grass_water.asm) ; Each map also has associated data in maps.asm. ; Order: towns/cities, then routes, then indoor/dungeon maps const_def From edb55e00f84024dd3634a25df8715e8b9cb3454b Mon Sep 17 00:00:00 2001 From: vulcandth Date: Fri, 17 Jun 2022 21:25:52 -0500 Subject: [PATCH 14/45] Rename `SLP` to `SLP_MASK` (#361) Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com> --- constants/battle_constants.asm | 2 +- engine/battle/core.asm | 14 +++++++------- engine/battle/move_effects/haze.asm | 2 +- engine/items/item_effects.asm | 10 +++++----- engine/pokemon/status_ailments.asm | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm index b394b7a2a..2ae1cdeff 100644 --- a/constants/battle_constants.asm +++ b/constants/battle_constants.asm @@ -57,7 +57,7 @@ DEF NOT_VERY_EFFECTIVE EQU 05 DEF NO_EFFECT EQU 00 ; non-volatile statuses -DEF SLP EQU %111 ; sleep counter +DEF SLP_MASK EQU %111 ; 0-7 turns const_def 3 const PSN ; 3 const BRN ; 4 diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 66ca1aa9a..1a252c029 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -308,7 +308,7 @@ MainInBattleLoop: and a ret nz ; return if pokedoll was used to escape from battle ld a, [wBattleMonStatus] - and (1 << FRZ) | SLP ; is mon frozen or asleep? + and (1 << FRZ) | SLP_MASK jr nz, .selectEnemyMove ; if so, jump ld a, [wPlayerBattleStatus1] and (1 << STORING_ENERGY) | (1 << USING_TRAPPING_MOVE) ; check player is using Bide or using a multi-turn attack like wrap @@ -2934,7 +2934,7 @@ SelectEnemyMove: and (1 << CHARGING_UP) | (1 << THRASHING_ABOUT) ; using a charging move or thrash/petal dance ret nz ld a, [wEnemyMonStatus] - and SLP | 1 << FRZ ; sleeping or frozen + and (1 << FRZ) | SLP_MASK ret nz ld a, [wEnemyBattleStatus1] and (1 << USING_TRAPPING_MOVE) | (1 << STORING_ENERGY) ; using a trapping move like wrap or bide @@ -3275,7 +3275,7 @@ PrintGhostText: and a jr nz, .Ghost ld a, [wBattleMonStatus] ; player's turn - and SLP | (1 << FRZ) + and (1 << FRZ) | SLP_MASK ret nz ld hl, ScaredText call PrintText @@ -3317,7 +3317,7 @@ IsGhostBattle: CheckPlayerStatusConditions: ld hl, wBattleMonStatus ld a, [hl] - and SLP ; sleep mask + and SLP_MASK jr z, .FrozenCheck ; sleeping dec a @@ -4029,7 +4029,7 @@ CheckForDisobedience: call BattleRandom add a swap a - and SLP ; sleep mask + and SLP_MASK jr z, .monNaps ; keep trying until we get at least 1 turn of sleep ld [wBattleMonStatus], a ld hl, BeganToNapText @@ -5362,7 +5362,7 @@ MoveHitTest: cp DREAM_EATER_EFFECT jr nz, .swiftCheck ld a, [bc] - and SLP ; is the target pokemon sleeping? + and SLP_MASK jp z, .moveMissed .swiftCheck ld a, [de] @@ -5796,7 +5796,7 @@ ExecuteEnemyMoveDone: CheckEnemyStatusConditions: ld hl, wEnemyMonStatus ld a, [hl] - and SLP ; sleep mask + and SLP_MASK jr z, .checkIfFrozen dec a ; decrement number of turns left ld [wEnemyMonStatus], a diff --git a/engine/battle/move_effects/haze.asm b/engine/battle/move_effects/haze.asm index c15c848ba..76722d0e9 100644 --- a/engine/battle/move_effects/haze.asm +++ b/engine/battle/move_effects/haze.asm @@ -24,7 +24,7 @@ HazeEffect_: .cureStatuses ld a, [hl] ld [hl], $0 - and SLP | (1 << FRZ) + and (1 << FRZ) | SLP_MASK jr z, .cureVolatileStatuses ; prevent the Pokemon from executing a move if it was asleep or frozen ld a, $ff diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index f58b737eb..16b4140a7 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -225,7 +225,7 @@ ItemUseBall: ld a, [wEnemyMonStatus] and a jr z, .skipAilmentValueSubtraction ; no ailments - and 1 << FRZ | SLP + and (1 << FRZ) | SLP_MASK ld c, 12 jr z, .notFrozenOrAsleep ld c, 25 @@ -380,7 +380,7 @@ ItemUseBall: ld a, [wEnemyMonStatus] and a jr z, .skip5 - and 1 << FRZ | SLP + and (1 << FRZ) | SLP_MASK ld b, 5 jr z, .addAilmentValue ld b, 10 @@ -878,7 +878,7 @@ ItemUseMedicine: lb bc, ICE_HEAL_MSG, 1 << FRZ cp ICE_HEAL jr z, .checkMonStatus - lb bc, AWAKENING_MSG, SLP + lb bc, AWAKENING_MSG, SLP_MASK cp AWAKENING jr z, .checkMonStatus lb bc, PARALYZ_HEAL_MSG, 1 << PAR @@ -1700,7 +1700,7 @@ ItemUsePokeflute: .inBattle xor a ld [wWereAnyMonsAsleep], a - ld b, ~SLP & $ff + ld b, ~SLP_MASK ld hl, wPartyMon1Status call WakeUpEntireParty ld a, [wIsInBattle] @@ -1752,7 +1752,7 @@ WakeUpEntireParty: .loop ld a, [hl] push af - and SLP ; is pokemon asleep? + and SLP_MASK jr z, .notAsleep ld a, 1 ld [wWereAnyMonsAsleep], a ; indicate that a pokemon had to be woken up diff --git a/engine/pokemon/status_ailments.asm b/engine/pokemon/status_ailments.asm index 3da1fc433..05205a348 100644 --- a/engine/pokemon/status_ailments.asm +++ b/engine/pokemon/status_ailments.asm @@ -8,7 +8,7 @@ PrintStatusAilment:: jr nz, .frz bit PAR, a jr nz, .par - and SLP + and SLP_MASK ret z ld a, "S" ld [hli], a From ba15b4b44e33877f1c314910648c5a7d682c7c75 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 17 Jun 2022 22:54:47 -0400 Subject: [PATCH 15/45] Add a subdirectory for RAM files --- Makefile | 2 +- ram.asm | 9 +++++++++ hram.asm => ram/hram.asm | 0 sram.asm => ram/sram.asm | 0 vram.asm => ram/vram.asm | 0 wram.asm => ram/wram.asm | 13 ------------- 6 files changed, 10 insertions(+), 14 deletions(-) create mode 100644 ram.asm rename hram.asm => ram/hram.asm (100%) rename sram.asm => ram/sram.asm (100%) rename vram.asm => ram/vram.asm (100%) rename wram.asm => ram/wram.asm (99%) diff --git a/Makefile b/Makefile index 3a23f759b..636f5c3d0 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,8 @@ rom_obj := \ home.o \ main.o \ maps.o \ + ram.o \ text.o \ - wram.o \ gfx/pics.o \ gfx/sprites.o \ gfx/tilesets.o diff --git a/ram.asm b/ram.asm new file mode 100644 index 000000000..24040b140 --- /dev/null +++ b/ram.asm @@ -0,0 +1,9 @@ +INCLUDE "constants.asm" + +INCLUDE "macros/wram.asm" + + +INCLUDE "ram/vram.asm" +INCLUDE "ram/wram.asm" +INCLUDE "ram/sram.asm" +INCLUDE "ram/hram.asm" diff --git a/hram.asm b/ram/hram.asm similarity index 100% rename from hram.asm rename to ram/hram.asm diff --git a/sram.asm b/ram/sram.asm similarity index 100% rename from sram.asm rename to ram/sram.asm diff --git a/vram.asm b/ram/vram.asm similarity index 100% rename from vram.asm rename to ram/vram.asm diff --git a/wram.asm b/ram/wram.asm similarity index 99% rename from wram.asm rename to ram/wram.asm index 428d8c96c..0804e6ee9 100644 --- a/wram.asm +++ b/ram/wram.asm @@ -1,11 +1,3 @@ -INCLUDE "constants.asm" - -INCLUDE "macros/wram.asm" - - -INCLUDE "vram.asm" - - SECTION "Audio RAM", WRAM0 wUnusedC000:: db @@ -2337,8 +2329,3 @@ SECTION "Stack", WRAM0 ; the stack grows downward ds $100 - 1 wStack:: db - - -INCLUDE "sram.asm" - -INCLUDE "hram.asm" From 4e96f9d232cd51be9d51a76f7d0cc6211aaccdca Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 17 Jun 2022 22:58:46 -0400 Subject: [PATCH 16/45] `cp MR_FUJIS_HOUSE` -> `cp POKEMON_TOWER_7F + 1` Fixes #362 --- engine/battle/core.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 1a252c029..c746e52b3 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -3302,7 +3302,7 @@ IsGhostBattle: ld a, [wCurMap] cp POKEMON_TOWER_1F jr c, .next - cp MR_FUJIS_HOUSE + cp POKEMON_TOWER_7F + 1 jr nc, .next ld b, SILPH_SCOPE call IsItemInBag From 9cfae346587676e8f7b345a41b0b55734da2dd23 Mon Sep 17 00:00:00 2001 From: Rangi Date: Wed, 22 Jun 2022 20:09:48 -0400 Subject: [PATCH 17/45] Automatically upload .sym files to a 'symbols' branch Fixes #248 --- .github/workflows/main.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c10521831..13cc4e5f0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,3 +54,24 @@ jobs: DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} run: | .github/webhook.sh + + - name: Checkout symbols + if: ${{ github.event_name == 'push' && github.repository_owner == 'pret' }} + uses: actions/checkout@master + with: + path: symbols + ref: symbols + + - name: Move symbols + if: ${{ github.event_name == 'push' && github.repository_owner == 'pret' }} + run: | + cp -v *.sym symbols/ + + - name: Update symbols + if: ${{ github.event_name == 'push' && github.repository_owner == 'pret' }} + uses: EndBug/add-and-commit@v7 + with: + branch: symbols + cwd: "./symbols" + add: "*.sym" + message: ${{ github.event.commits[0].message }} From 610ec0fd2271defcc6ebda89b379455155fdb3ca Mon Sep 17 00:00:00 2001 From: vulcandth Date: Wed, 22 Jun 2022 19:15:58 -0500 Subject: [PATCH 18/45] VC ExchangeBytes Aliases (#363) Co-authored-by: aaaaaa123456789 --- engine/link/cable_club.asm | 6 +++--- vc/pokeblue.patch.template | 6 +++--- vc/pokered.patch.template | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index e1b92eab8..40e0dfe8b 100644 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -124,21 +124,21 @@ CableClub_DoBattleOrTradeAgain: ld hl, wSerialRandomNumberListBlock ld de, wSerialOtherGameboyRandomNumberListBlock ld bc, $11 - vc_hook Wireless_ExchangeBytes_1_unknown_Type5 + vc_hook Wireless_ExchangeBytes_RNG_state_unknown_Type5 call Serial_ExchangeBytes ld a, SERIAL_NO_DATA_BYTE ld [de], a ld hl, wSerialPlayerDataBlock ld de, wSerialEnemyDataBlock ld bc, $1a8 - vc_hook Wireless_ExchangeBytes_2 + vc_hook Wireless_ExchangeBytes_party_structs call Serial_ExchangeBytes ld a, SERIAL_NO_DATA_BYTE ld [de], a ld hl, wSerialPartyMonsPatchList ld de, wSerialEnemyMonsPatchList ld bc, $c8 - vc_hook Wireless_ExchangeBytes_3 + vc_hook Wireless_ExchangeBytes_patch_lists call Serial_ExchangeBytes ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) ldh [rIE], a diff --git a/vc/pokeblue.patch.template b/vc/pokeblue.patch.template index 6427bf924..b49dff334 100644 --- a/vc/pokeblue.patch.template +++ b/vc/pokeblue.patch.template @@ -81,17 +81,17 @@ Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network17@Wireless_ExchangeBytes_1_unknown_Type5] +[Network17@Wireless_ExchangeBytes_RNG_state_unknown_Type5] Mode = 2 Address = {HEX @} Type = 5 -[Network424@Wireless_ExchangeBytes_2] +[Network424@Wireless_ExchangeBytes_party_structs] Mode = 2 Address = {HEX @} Type = 4 -[Network200@Wireless_ExchangeBytes_3] +[Network200@Wireless_ExchangeBytes_patch_lists] Mode = 2 Address = {HEX @} Type = 4 diff --git a/vc/pokered.patch.template b/vc/pokered.patch.template index 6b015ca42..a86b1ce2d 100644 --- a/vc/pokered.patch.template +++ b/vc/pokered.patch.template @@ -86,17 +86,17 @@ Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network17@Wireless_ExchangeBytes_1_unknown_Type5] +[Network17@Wireless_ExchangeBytes_RNG_state_unknown_Type5] Mode = 2 Address = {HEX @} Type = 5 -[Network424@Wireless_ExchangeBytes_2] +[Network424@Wireless_ExchangeBytes_party_structs] Mode = 2 Address = {HEX @} Type = 4 -[Network200@Wireless_ExchangeBytes_3] +[Network200@Wireless_ExchangeBytes_patch_lists] Mode = 2 Address = {HEX @} Type = 4 From 60276d0c5b9234619707518f29e6b85b8719b838 Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Sun, 26 Jun 2022 10:41:36 -0300 Subject: [PATCH 19/45] Fix INSTALL.md's dead links (#365) --- INSTALL.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index ec2f71a02..95ce870ed 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -42,7 +42,7 @@ Run setup and leave the default settings. At the "**Select Packages**" step, cho Double click on the text that says "**Skip**" next to each package to select the most recent version to install. -Then follow the [**rgbds** install instructions](https://rgbds.gbdev.io/install/windows) for Windows with Cygwin to install **rgbds 0.5.2**. +Then follow the [**rgbds** install instructions](https://rgbds.gbdev.io/install#pre-built) for Windows with Cygwin to install **rgbds 0.5.2**. **Note:** If you already have an older rgbds, you will need to update to 0.5.2. Ignore this if you have never installed rgbds before. If a version newer than 0.5.2 does not work, try downloading 0.5.2. @@ -67,7 +67,7 @@ Install [**Homebrew**](https://brew.sh/). Follow the official instructions. Open **Terminal** and prepare to enter commands. -Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/macos) for macOS to install **rgbds 0.5.2**. +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for macOS to install **rgbds 0.5.2**. Now you're ready to [build **pokered**](#build-pokered). @@ -84,7 +84,7 @@ To install the software required for **pokered**: sudo apt-get install make gcc git ``` -Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.2** from source. +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.5.2** from source. ### OpenSUSE @@ -94,7 +94,7 @@ To install the software required for **pokered**: sudo zypper install make gcc git ``` -Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.2** from source. +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.5.2** from source. ### Arch Linux @@ -104,9 +104,9 @@ To install the software required for **pokered**: sudo pacman -S make gcc git ``` -Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/arch) for Arch Linux to install **rgbds 0.5.2**. +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for Arch Linux to install **rgbds 0.5.2**. -If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.2** from source. +If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.5.2** from source. ### Termux @@ -122,7 +122,7 @@ To install **rgbds**: sudo apt install rgbds ``` -If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.2** from source. +If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.5.2** from source. ### Other distros @@ -133,7 +133,7 @@ If your distro is not listed here, try to find the required software in its repo - `git` - `rgbds` -If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.2** from source. +If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.5.2** from source. Now you're ready to [build **pokered**](#build-pokered). From fcd6e5a1b2ee4f2191c8e843e25fe5e40880c98b Mon Sep 17 00:00:00 2001 From: vulcandth Date: Thu, 30 Jun 2022 20:24:33 -0500 Subject: [PATCH 20/45] Stop_reducing_move_anim_flashing_Dream_Eater -> Stop_reducing_move_anim_flashing_Blizzard (#369) --- engine/battle/animations.asm | 2 +- vc/pokered.patch.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index c25257f08..7ad1bb3e8 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -256,7 +256,7 @@ PlayAnimation: vc_hook_red Stop_reducing_move_anim_flashing_Mega_Punch vc_hook_blue Stop_reducing_move_anim_flashing_Mega_Punch_Explosion pop af - vc_hook_red Stop_reducing_move_anim_flashing_Dream_Eater + vc_hook_red Stop_reducing_move_anim_flashing_Blizzard ldh [rOBP0], a .nextAnimationCommand vc_hook_red Stop_reducing_move_anim_flashing_Hyper_Beam diff --git a/vc/pokered.patch.template b/vc/pokered.patch.template index a86b1ce2d..08fba1a66 100644 --- a/vc/pokered.patch.template +++ b/vc/pokered.patch.template @@ -358,7 +358,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "D" "R" "E" "A" DREAM_EATER } -[FPA 008 End@Stop_reducing_move_anim_flashing_Dream_Eater] +[FPA 008 End@Stop_reducing_move_anim_flashing_Blizzard] Mode = 3 Type = 1 Address = {HEX @} From 5d8da0dc548c85d0622939c58f028abd32d178db Mon Sep 17 00:00:00 2001 From: Rangi Date: Thu, 30 Jun 2022 21:29:56 -0400 Subject: [PATCH 21/45] Use backwards-compatible EQU syntax for rgbdscheck.asm --- rgbdscheck.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rgbdscheck.asm b/rgbdscheck.asm index 8c51e1af6..a836a1561 100644 --- a/rgbdscheck.asm +++ b/rgbdscheck.asm @@ -1,6 +1,6 @@ -DEF MAJOR EQU 0 -DEF MINOR EQU 5 -DEF PATCH EQU 2 +MAJOR EQU 0 +MINOR EQU 5 +PATCH EQU 2 MACRO wrong_rgbds fail "pokered requires rgbds v0.5.2 or newer." From 70cbb483288cd048f85420a63caadc707e9b75bf Mon Sep 17 00:00:00 2001 From: vulcandth Date: Mon, 4 Jul 2022 00:08:17 -0500 Subject: [PATCH 22/45] party_struct constants and ExchangeBytes size (#364) Co-Authored-By: Rangi <35663410+Rangi42@users.noreply.github.com> --- constants/pokemon_data_constants.asm | 31 ++++++++++++++++++++++++++++ constants/serial_constants.asm | 4 ++++ engine/link/cable_club.asm | 6 +++--- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm index 430abfe06..1fd7ce19c 100644 --- a/constants/pokemon_data_constants.asm +++ b/constants/pokemon_data_constants.asm @@ -23,6 +23,37 @@ DEF BASE_TMHM rb (NUM_TM_HM + 7) / 8 rb_skip DEF BASE_DATA_SIZE EQU _RS +; party_struct members (see macros/wram.asm) +rsreset +DEF MON_SPECIES rb +DEF MON_HP rw +DEF MON_BOX_LEVEL rb +DEF MON_STATUS rb +DEF MON_TYPE rw +rsset MON_TYPE +DEF MON_TYPE1 rb +DEF MON_TYPE2 rb +DEF MON_CATCH_RATE rb +DEF MON_MOVES rb NUM_MOVES +DEF MON_OTID rw +DEF MON_EXP rb 3 +DEF MON_HP_EXP rw +DEF MON_ATK_EXP rw +DEF MON_DEF_EXP rw +DEF MON_SPD_EXP rw +DEF MON_SPC_EXP rw +DEF MON_DVS rw +DEF MON_PP rb NUM_MOVES +DEF BOXMON_STRUCT_LENGTH EQU _RS +DEF MON_LEVEL rb +DEF MON_STATS rw NUM_STATS +rsset MON_STATS +DEF MON_MAXHP rw +DEF MON_ATK rw +DEF MON_DEF rw +DEF MON_SPD rw +DEF MON_SPC rw +DEF PARTYMON_STRUCT_LENGTH EQU _RS DEF PARTY_LENGTH EQU 6 diff --git a/constants/serial_constants.asm b/constants/serial_constants.asm index 166039800..37747b768 100644 --- a/constants/serial_constants.asm +++ b/constants/serial_constants.asm @@ -14,6 +14,10 @@ DEF SERIAL_NO_DATA_BYTE EQU $FE ; signals the end of one part of a patch list (there are two parts) for player/enemy party data DEF SERIAL_PATCH_LIST_PART_TERMINATOR EQU $FF +DEF SERIAL_PREAMBLE_LENGTH EQU 6 +DEF SERIAL_RN_PREAMBLE_LENGTH EQU 7 +DEF SERIAL_RNS_LENGTH EQU 10 + DEF LINK_STATE_NONE EQU $00 ; not using link DEF LINK_STATE_IN_CABLE_CLUB EQU $01 ; in a cable club room (Colosseum or Trade Centre) DEF LINK_STATE_START_TRADE EQU $02 ; pre-trade selection screen initialisation diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index 40e0dfe8b..7e8560933 100644 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -123,21 +123,21 @@ CableClub_DoBattleOrTradeAgain: ldh [rIE], a ld hl, wSerialRandomNumberListBlock ld de, wSerialOtherGameboyRandomNumberListBlock - ld bc, $11 + ld bc, SERIAL_RN_PREAMBLE_LENGTH + SERIAL_RNS_LENGTH vc_hook Wireless_ExchangeBytes_RNG_state_unknown_Type5 call Serial_ExchangeBytes ld a, SERIAL_NO_DATA_BYTE ld [de], a ld hl, wSerialPlayerDataBlock ld de, wSerialEnemyDataBlock - ld bc, $1a8 + ld bc, SERIAL_PREAMBLE_LENGTH + NAME_LENGTH + 1 + PARTY_LENGTH + 1 + (PARTYMON_STRUCT_LENGTH + NAME_LENGTH * 2) * PARTY_LENGTH + 3 vc_hook Wireless_ExchangeBytes_party_structs call Serial_ExchangeBytes ld a, SERIAL_NO_DATA_BYTE ld [de], a ld hl, wSerialPartyMonsPatchList ld de, wSerialEnemyMonsPatchList - ld bc, $c8 + ld bc, 200 vc_hook Wireless_ExchangeBytes_patch_lists call Serial_ExchangeBytes ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) From a24a39793c7672eabd8ddd6666a28f498e994935 Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Mon, 4 Jul 2022 02:10:14 -0300 Subject: [PATCH 23/45] Identify the rest of the hardware constants (#371) See https://github.com/pret/pokecrystal/pull/972 and https://github.com/pret/pokecrystal/pull/947 for details. --- constants/hardware_constants.asm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm index 0cc833837..fba150875 100644 --- a/constants/hardware_constants.asm +++ b/constants/hardware_constants.asm @@ -119,12 +119,8 @@ DEF rBGPI EQU $ff68 ; CGB Mode Only - Background Palette Index DEF rBGPD EQU $ff69 ; CGB Mode Only - Background Palette Data DEF rOBPI EQU $ff6a ; CGB Mode Only - Sprite Palette Index DEF rOBPD EQU $ff6b ; CGB Mode Only - Sprite Palette Data -DEF rUNKNOWN1 EQU $ff6c ; (FEh) Bit 0 (Read/Write) - CGB Mode Only +DEF rOPRI EQU $ff6c ; CGB Mode Only - Object Priority Mode DEF rSVBK EQU $ff70 ; CGB Mode Only - WRAM Bank -DEF rUNKNOWN2 EQU $ff72 ; (00h) - Bit 0-7 (Read/Write) -DEF rUNKNOWN3 EQU $ff73 ; (00h) - Bit 0-7 (Read/Write) -DEF rUNKNOWN4 EQU $ff74 ; (00h) - Bit 0-7 (Read/Write) - CGB Mode Only -DEF rUNKNOWN5 EQU $ff75 ; (8Fh) - Bit 4-6 (Read/Write) -DEF rUNKNOWN6 EQU $ff76 ; (00h) - Always 00h (Read Only) -DEF rUNKNOWN7 EQU $ff77 ; (00h) - Always 00h (Read Only) +DEF rPCM12 EQU $ff76 ; Channels 1 & 2 Amplitude (R) +DEF rPCM34 EQU $ff77 ; Channels 3 & 4 Amplitude (R) DEF rIE EQU $ffff ; Interrupt Enable (R/W) From 19814a48940fb5f1950df88c76ccc8d198802f5f Mon Sep 17 00:00:00 2001 From: dannye <33dannye@gmail.com> Date: Mon, 4 Jul 2022 03:12:18 -0500 Subject: [PATCH 24/45] Fix typo: HeatButt -> HeadButt --- data/moves/animations.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/moves/animations.asm b/data/moves/animations.asm index 0049cf598..e30e43790 100644 --- a/data/moves/animations.asm +++ b/data/moves/animations.asm @@ -28,7 +28,7 @@ AttackAnimationPointers: dw JumpKickAnim dw RollingKickAnim dw SandAttackAnim - dw HeatButtAnim + dw HeadButtAnim dw HornAttackAnim dw FuryAttackAnim dw HornDrillAnim @@ -360,7 +360,7 @@ SandAttackAnim: battle_anim SAND_ATTACK, SUBANIM_28, 1, 6 db -1 ; end -HeatButtAnim: +HeadButtAnim: battle_anim HEADBUTT, SUBANIM_05, 1, 6 db -1 ; end From b045ac4f16ca9b611a3e3baef0d9a0c33ac6351c Mon Sep 17 00:00:00 2001 From: Rangi Date: Sat, 9 Jul 2022 14:34:45 -0400 Subject: [PATCH 25/45] Remove comment about addresses --- data/credits/credits_text.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/credits/credits_text.asm b/data/credits/credits_text.asm index 220f8a379..37ba04bdc 100644 --- a/data/credits/credits_text.asm +++ b/data/credits/credits_text.asm @@ -67,7 +67,7 @@ CreditsTextPointers: dw CredPAAD assert_table_length NUM_CRED_STRINGS -CredVersion: ; this 1 byte difference makes all bank addresses offset by 1 in the blue version +CredVersion: IF DEF(_RED) db -8, "RED VERSION STAFF@" ENDC From cc46b0e510e07f2e7a0d14732c02a2f416eac9e1 Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Sat, 9 Jul 2022 18:18:18 -0300 Subject: [PATCH 26/45] wOAMBuffer -> wShadowOAM (#370) --- constants/gfx_constants.asm | 2 +- engine/battle/animations.asm | 32 ++++++++++++------------- engine/battle/battle_transitions.asm | 2 +- engine/battle/core.asm | 4 ++-- engine/battle/draw_hud_pokeball_gfx.asm | 8 +++---- engine/battle/ghost_marowak_anim.asm | 2 +- engine/events/diploma.asm | 2 +- engine/gfx/mon_icons.asm | 8 +++---- engine/gfx/oam_dma.asm | 2 +- engine/gfx/sprite_oam.asm | 6 ++--- engine/items/item_effects.asm | 2 +- engine/items/town_map.asm | 20 ++++++++-------- engine/menus/start_sub_menus.asm | 2 +- engine/movie/intro.asm | 4 ++-- engine/movie/splash.asm | 18 +++++++------- engine/movie/title.asm | 4 ++-- engine/movie/title2.asm | 2 +- engine/movie/trade.asm | 6 ++--- engine/overworld/cut.asm | 2 +- engine/overworld/cut2.asm | 22 ++++++++--------- engine/overworld/dust_smoke.asm | 2 +- engine/overworld/emotion_bubbles.asm | 8 +++---- engine/overworld/healing_machine.asm | 2 +- engine/overworld/player_animations.asm | 24 +++++++++---------- engine/slots/slot_machine.asm | 6 ++--- home/clear_sprites.asm | 6 ++--- home/oam.asm | 2 +- ram/wram.asm | 8 +++---- scripts/VermilionDock.asm | 2 +- 29 files changed, 105 insertions(+), 105 deletions(-) diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm index 522b6a679..c62682088 100644 --- a/constants/gfx_constants.asm +++ b/constants/gfx_constants.asm @@ -17,7 +17,7 @@ DEF HP_BAR_GREEN EQU 0 DEF HP_BAR_YELLOW EQU 1 DEF HP_BAR_RED EQU 2 -; wOAMBuffer +; wShadowOAM DEF NUM_SPRITE_OAM_STRUCTS EQU 40 ; hAutoBGTransferEnabled diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index 7ad1bb3e8..789dcb8a6 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -147,7 +147,7 @@ DrawFrameBlock: jr z, .resetFrameBlockDestAddr call AnimationCleanOAM .resetFrameBlockDestAddr - ld hl, wOAMBuffer ; OAM buffer + ld hl, wShadowOAM ld a, l ld [wFBDestAddr + 1], a ld a, h @@ -583,7 +583,7 @@ PlaySubanimation: call GetMoveSound call PlaySound .skipPlayingSound - ld hl, wOAMBuffer ; base address of OAM buffer + ld hl, wShadowOAM ld a, l ld [wFBDestAddr + 1], a ld a, h @@ -855,7 +855,7 @@ TradeShakePokeball: ; if it's the end of the animation, make the ball jump up ld de, BallMoveDistances1 .loop - ld hl, wOAMBuffer ; OAM buffer + ld hl, wShadowOAM ld bc, 4 .innerLoop ld a, [de] @@ -885,7 +885,7 @@ BallMoveDistances1: TradeJumpPokeball: ld de, BallMoveDistances2 .loop - ld hl, wOAMBuffer ; OAM buffer + ld hl, wShadowOAM ld bc, 4 .innerLoop ld a, [de] @@ -925,8 +925,8 @@ BallMoveDistances2: ; this function copies the current musical note graphic ; so that there are two musical notes flying towards the defending pokemon DoGrowlSpecialEffects: - ld hl, wOAMBuffer ; OAM buffer - ld de, wOAMBuffer + $10 + ld hl, wShadowOAM + ld de, wShadowOAMSprite04 ld bc, $10 call CopyData ; copy the musical note graphic ld a, [wSubAnimCounter] @@ -1136,7 +1136,7 @@ AnimationWaterDropletsEverywhere: ret _AnimationWaterDroplets: - ld hl, wOAMBuffer + ld hl, wShadowOAM .loop ld a, [wBaseCoordY] ld [hli], a ; Y @@ -1264,7 +1264,7 @@ ShakeEnemyHUD_WritePlayerMonPicOAM: ld [wBaseCoordX], a ld a, $30 ld [wBaseCoordY], a - ld hl, wOAMBuffer + ld hl, wShadowOAM ld d, 0 ld c, 7 .loop @@ -1498,7 +1498,7 @@ AnimationSpiralBallsInward: .loop push hl ld c, 3 - ld de, wOAMBuffer + ld de, wShadowOAM .innerLoop ld a, [hl] cp $ff @@ -1637,7 +1637,7 @@ _AnimationShootBallsUpward: call LoadAnimationTileset pop bc ld d, $7a ; ball tile - ld hl, wOAMBuffer + ld hl, wShadowOAM push bc ld a, [wBaseCoordY] ld e, a @@ -1651,7 +1651,7 @@ _AnimationShootBallsUpward: ld [wNumShootingBalls], a .loop push bc - ld hl, wOAMBuffer + ld hl, wShadowOAM .innerLoop ld a, [wBaseCoordY] add 8 @@ -2080,7 +2080,7 @@ InitMultipleObjectsOAM: xor a ld e, a ld [wBaseCoordX], a - ld hl, wOAMBuffer + ld hl, wShadowOAM .loop call BattleAnimWriteOAMEntry dec c @@ -2336,7 +2336,7 @@ AnimationFallingObjects: call InitMultipleObjectsOAM call FallingObjects_InitXCoords call FallingObjects_InitMovementData - ld hl, wOAMBuffer + ld hl, wShadowOAM ld [hl], 0 .loop ld hl, wFallingObjectsMovementData @@ -2363,7 +2363,7 @@ AnimationFallingObjects: dec c jr nz, .innerLoop call Delay3 - ld hl, wOAMBuffer + ld hl, wShadowOAM ld a, [hl] ; Y cp 104 ; has the top falling object reached 104 yet? jr nz, .loop ; keep moving the falling objects down until it does @@ -2372,7 +2372,7 @@ AnimationFallingObjects: FallingObjects_UpdateOAMEntry: ; Increases Y by 2 pixels and adjusts X and X flip based on the falling object's ; movement byte. - ld hl, wOAMBuffer + ld hl, wShadowOAM add hl, de ld a, [hl] inc a @@ -2433,7 +2433,7 @@ FallingObjects_UpdateMovementByte: ret FallingObjects_InitXCoords: - ld hl, wOAMBuffer + $01 + ld hl, wShadowOAMSprite00XCoord ld de, FallingObjects_InitialXCoords ld a, [wNumFallingObjects] ld c, a diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index bc4665e4d..a16fd2504 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -26,7 +26,7 @@ BattleTransition: jr nz, .loop1 ; Clear OAM except for the blocks used by the player and enemy trainer sprites. - ld hl, wOAMBuffer + $10 + ld hl, wShadowOAMSprite04 ld c, 9 .loop2 ld a, b diff --git a/engine/battle/core.asm b/engine/battle/core.asm index c746e52b3..580a98997 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -105,7 +105,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; instead, the enemy pic is part of the background and uses the scroll register, while the player's head is a sprite and is slid by changing its X coordinates in a loop SlidePlayerHeadLeft: push bc - ld hl, wOAMBuffer + $01 + ld hl, wShadowOAMSprite00XCoord ld c, $15 ; number of OAM entries ld de, $4 ; size of OAM entry .loop @@ -6327,7 +6327,7 @@ LoadPlayerBackPic: ASSERT BANK(RedPicBack) == BANK(OldManPicBack) call UncompressSpriteFromDE predef ScaleSpriteByTwo - ld hl, wOAMBuffer + ld hl, wShadowOAM xor a ldh [hOAMTile], a ; initial tile number ld b, $7 ; 7 columns diff --git a/engine/battle/draw_hud_pokeball_gfx.asm b/engine/battle/draw_hud_pokeball_gfx.asm index 097a0fcc9..34bff58da 100644 --- a/engine/battle/draw_hud_pokeball_gfx.asm +++ b/engine/battle/draw_hud_pokeball_gfx.asm @@ -27,7 +27,7 @@ SetupOwnPartyPokeballs: ld [hl], a ld a, 8 ld [wHUDPokeballGfxOffsetX], a - ld hl, wOAMBuffer + ld hl, wShadowOAM jp WritePokeballOAMData SetupEnemyPartyPokeballs: @@ -41,7 +41,7 @@ SetupEnemyPartyPokeballs: ld [hl], $20 ld a, -8 ld [wHUDPokeballGfxOffsetX], a - ld hl, wOAMBuffer + PARTY_LENGTH * 4 + ld hl, wShadowOAMSprite06 jp WritePokeballOAMData SetupPokeballs: @@ -174,7 +174,7 @@ SetupPlayerAndEnemyPokeballs: ld [hl], $40 ld a, 8 ld [wHUDPokeballGfxOffsetX], a - ld hl, wOAMBuffer + ld hl, wShadowOAM call WritePokeballOAMData ld hl, wEnemyMons ld de, wEnemyPartyCount @@ -183,7 +183,7 @@ SetupPlayerAndEnemyPokeballs: ld a, $50 ld [hli], a ld [hl], $68 - ld hl, wOAMBuffer + $18 + ld hl, wShadowOAMSprite06 jp WritePokeballOAMData ; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (fainted) and pokeball slot (no mon) diff --git a/engine/battle/ghost_marowak_anim.asm b/engine/battle/ghost_marowak_anim.asm index 9c1ad96fb..a7f4d025b 100644 --- a/engine/battle/ghost_marowak_anim.asm +++ b/engine/battle/ghost_marowak_anim.asm @@ -58,7 +58,7 @@ CopyMonPicFromBGToSpriteVRAM: ld [wBaseCoordY], a ld a, $70 ld [wBaseCoordX], a - ld hl, wOAMBuffer + ld hl, wShadowOAM lb bc, 6, 6 ld d, $8 .oamLoop diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm index 7c48c0863..41e0d7c65 100644 --- a/engine/events/diploma.asm +++ b/engine/events/diploma.asm @@ -42,7 +42,7 @@ DisplayDiploma:: ; Move the player 33 pixels right and set the priority bit so he appears ; behind the background layer. - ld hl, wOAMBuffer + $01 + ld hl, wShadowOAMSprite00XCoord lb bc, $80, $28 .adjustPlayerGfxLoop ld a, [hl] ; X diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm index 6f6b88c7d..73b1632f4 100644 --- a/engine/gfx/mon_icons.asm +++ b/engine/gfx/mon_icons.asm @@ -43,7 +43,7 @@ GetAnimationSpeed: .resetSprites push bc ld hl, wMonPartySpritesSavedOAM - ld de, wOAMBuffer + ld de, wShadowOAM ld bc, $60 call CopyData pop bc @@ -51,7 +51,7 @@ GetAnimationSpeed: jr .incTimer .animateSprite push bc - ld hl, wOAMBuffer + $02 ; OAM tile id + ld hl, wShadowOAMSprite00TileID ld bc, $10 ld a, [wCurrentMenuItem] call AddNTimes @@ -236,7 +236,7 @@ WriteMonPartySpriteOAM: ; make a copy at wMonPartySpritesSavedOAM. push af ld c, $10 - ld h, HIGH(wOAMBuffer) + ld h, HIGH(wShadowOAM) ldh a, [hPartyMonIndex] swap a ld l, a @@ -252,7 +252,7 @@ WriteMonPartySpriteOAM: ; Make a copy of the OAM buffer with the first animation frame written so that ; we can flip back to it from the second frame by copying it back. .makeCopy - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wMonPartySpritesSavedOAM ld bc, $60 jp CopyData diff --git a/engine/gfx/oam_dma.asm b/engine/gfx/oam_dma.asm index fe93e90d4..11e52694a 100644 --- a/engine/gfx/oam_dma.asm +++ b/engine/gfx/oam_dma.asm @@ -16,7 +16,7 @@ DMARoutine: LOAD "OAM DMA", HRAM hDMARoutine:: ; initiate DMA - ld a, HIGH(wOAMBuffer) + ld a, HIGH(wShadowOAM) ldh [rDMA], a ; wait for DMA to finish ld a, $28 diff --git a/engine/gfx/sprite_oam.asm b/engine/gfx/sprite_oam.asm index b3c07ecdc..69956a317 100644 --- a/engine/gfx/sprite_oam.asm +++ b/engine/gfx/sprite_oam.asm @@ -1,6 +1,6 @@ PrepareOAMData:: ; Determine OAM data for currently visible -; sprites and write it to wOAMBuffer. +; sprites and write it to wShadowOAM. ld a, [wUpdateSpritesEnabled] dec a @@ -79,7 +79,7 @@ PrepareOAMData:: ldh a, [hOAMBufferOffset] ld e, a - ld d, HIGH(wOAMBuffer) + ld d, HIGH(wShadowOAM) .tileLoop ldh a, [hSpriteScreenY] ; temp for sprite Y position @@ -147,7 +147,7 @@ PrepareOAMData:: ; Clear unused OAM. ldh a, [hOAMBufferOffset] ld l, a - ld h, HIGH(wOAMBuffer) + ld h, HIGH(wShadowOAM) ld de, $4 ld b, $a0 ld a, [wd736] diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 16b4140a7..faba88374 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -1175,7 +1175,7 @@ ItemUseMedicine: xor a ld [wBattleMonStatus], a ; remove the status ailment in the in-battle pokemon data .calculateHPBarCoords - ld hl, wOAMBuffer + $90 + ld hl, wShadowOAMSprite36 ld bc, 2 * SCREEN_WIDTH inc d .calculateHPBarCoordsLoop diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm index 930472161..d278d0347 100644 --- a/engine/items/town_map.asm +++ b/engine/items/town_map.asm @@ -16,7 +16,7 @@ DisplayTownMap: hlcoord 1, 0 ld de, wcd6d call PlaceString - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wTileMapBackup ld bc, $10 call CopyData @@ -47,7 +47,7 @@ DisplayTownMap: call TownMapCoordsToOAMCoords ld a, $4 ld [wOAMBaseTile], a - ld hl, wOAMBuffer + $10 + ld hl, wShadowOAMSprite04 call WriteTownMapSpriteOAM ; town map cursor sprite pop hl ld de, wcd6d @@ -60,7 +60,7 @@ DisplayTownMap: hlcoord 1, 0 ld de, wcd6d call PlaceString - ld hl, wOAMBuffer + $10 + ld hl, wShadowOAMSprite04 ld de, wTileMapBackup + 16 ld bc, $10 call CopyData @@ -362,7 +362,7 @@ DrawPlayerOrBirdSprite: inc de cp "@" jr nz, .loop - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wTileMapBackup ld bc, $a0 jp CopyData @@ -370,7 +370,7 @@ DrawPlayerOrBirdSprite: DisplayWildLocations: farcall FindWildLocationsOfMon call ZeroOutDuplicatesInList - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wTownMapCoords .loop ld a, [de] @@ -410,7 +410,7 @@ DisplayWildLocations: ld b, $0 call DrawPlayerOrBirdSprite .done - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wTileMapBackup ld bc, $a0 jp CopyData @@ -439,9 +439,9 @@ TownMapCoordsToOAMCoords: WritePlayerOrBirdSpriteOAM: ld a, [wOAMBaseTile] and a - ld hl, wOAMBuffer + $90 ; for player sprite + ld hl, wShadowOAMSprite36 ; for player sprite jr z, WriteTownMapSpriteOAM - ld hl, wOAMBuffer + $80 ; for bird sprite + ld hl, wShadowOAMSprite32 ; for bird sprite WriteTownMapSpriteOAM: push hl @@ -600,13 +600,13 @@ TownMapSpriteBlinkingAnimation:: jr nz, .done ; show sprites when the counter reaches 50 ld hl, wTileMapBackup - ld de, wOAMBuffer + ld de, wShadowOAM ld bc, $90 call CopyData xor a jr .done .hideSprites - ld hl, wOAMBuffer + ld hl, wShadowOAM ld b, $24 ld de, $4 .hideSpritesLoop diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm index dbc6ab895..7dfb7dc3b 100644 --- a/engine/menus/start_sub_menus.asm +++ b/engine/menus/start_sub_menus.asm @@ -677,7 +677,7 @@ SwitchPartyMon_ClearGfx: dec c jr nz, .clearMonBGLoop pop af - ld hl, wOAMBuffer + ld hl, wShadowOAM ld bc, $10 call AddNTimes ld de, $4 diff --git a/engine/movie/intro.asm b/engine/movie/intro.asm index bca095a81..f489c60b6 100644 --- a/engine/movie/intro.asm +++ b/engine/movie/intro.asm @@ -158,7 +158,7 @@ AnimateIntroNidorino: jr AnimateIntroNidorino UpdateIntroNidorinoOAM: - ld hl, wOAMBuffer + ld hl, wShadowOAM ld a, [wIntroNidorinoBaseTile] ld d, a .loop @@ -177,7 +177,7 @@ UpdateIntroNidorinoOAM: ret InitIntroNidorinoOAM: - ld hl, wOAMBuffer + ld hl, wShadowOAM ld d, 0 .loop push bc diff --git a/engine/movie/splash.asm b/engine/movie/splash.asm index eede8ccb9..2373a0f93 100644 --- a/engine/movie/splash.asm +++ b/engine/movie/splash.asm @@ -16,11 +16,11 @@ LoadShootingStarGraphics: lb bc, BANK(FallingStar), (FallingStarEnd - FallingStar) / $10 call CopyVideoData ld hl, GameFreakLogoOAMData - ld de, wOAMBuffer + $60 + ld de, wShadowOAMSprite24 ld bc, GameFreakLogoOAMDataEnd - GameFreakLogoOAMData call CopyData ld hl, GameFreakShootingStarOAMData - ld de, wOAMBuffer + ld de, wShadowOAM ld bc, GameFreakShootingStarOAMDataEnd - GameFreakShootingStarOAMData jp CopyData @@ -30,7 +30,7 @@ AnimateShootingStar: call PlaySound ; Move the big star down and left across the screen. - ld hl, wOAMBuffer + ld hl, wShadowOAM lb bc, $a0, $4 .bigStarLoop push hl @@ -60,7 +60,7 @@ AnimateShootingStar: jr nz, .bigStarLoop ; Clear big star OAM. - ld hl, wOAMBuffer + ld hl, wShadowOAM ld c, 4 ld de, 4 .clearOAMLoop @@ -83,7 +83,7 @@ AnimateShootingStar: ; Copy 24 instances of the small stars OAM data. ; Note that their coordinates put them off-screen. - ld de, wOAMBuffer + ld de, wShadowOAM ld a, 24 .initSmallStarsOAMLoop push af @@ -106,7 +106,7 @@ AnimateShootingStar: ld d, a push bc push hl - ld hl, wOAMBuffer + $50 + ld hl, wShadowOAMSprite20 ld c, 4 .smallStarsInnerLoop ; introduce new wave of 4 small stars OAM entries ld a, [de] @@ -131,8 +131,8 @@ AnimateShootingStar: push af ; shift the existing OAM entries down to make room for the next wave - ld hl, wOAMBuffer + $10 - ld de, wOAMBuffer + ld hl, wShadowOAMSprite04 + ld de, wShadowOAM ld bc, $50 call CopyData @@ -186,7 +186,7 @@ SmallStarsEmptyWave: MoveDownSmallStars: ld b, 8 .loop - ld hl, wOAMBuffer + $5c + ld hl, wShadowOAMSprite23 ld a, [wMoveDownSmallStarsOAMCount] ld de, -4 ld c, a diff --git a/engine/movie/title.asm b/engine/movie/title.asm index 8f97f8fa7..1ee0cc250 100644 --- a/engine/movie/title.asm +++ b/engine/movie/title.asm @@ -93,7 +93,7 @@ DisplayTitleScreen: call DrawPlayerCharacter ; put a pokeball in the player's hand - ld hl, wOAMBuffer + $28 + ld hl, wShadowOAMSprite10 ld a, $74 ld [hl], a @@ -322,7 +322,7 @@ DrawPlayerCharacter: call ClearSprites xor a ld [wPlayerCharacterOAMTile], a - ld hl, wOAMBuffer + ld hl, wShadowOAM lb de, $60, $5a ld b, 7 .loop diff --git a/engine/movie/title2.asm b/engine/movie/title2.asm index 315cf6b59..bc75015f5 100644 --- a/engine/movie/title2.asm +++ b/engine/movie/title2.asm @@ -115,6 +115,6 @@ GetTitleBallY: pop de and a ret z - ld [wOAMBuffer + $28], a + ld [wShadowOAMSprite10YCoord], a inc e ret diff --git a/engine/movie/trade.asm b/engine/movie/trade.asm index 35423820d..def901ba2 100644 --- a/engine/movie/trade.asm +++ b/engine/movie/trade.asm @@ -315,7 +315,7 @@ Trade_AnimateBallEnteringLinkCable: xor $1 ld [wLinkCableAnimBulgeToggle], a add $7e - ld hl, wOAMBuffer + $02 + ld hl, wShadowOAMSprite00TileID ld de, 4 ld c, e .cycleLinkCableBulgeTile @@ -599,7 +599,7 @@ Trade_AnimCircledMon: ldh a, [rBGP] xor $3c ; make link cable flash ldh [rBGP], a - ld hl, wOAMBuffer + $02 + ld hl, wShadowOAMSprite00TileID ld de, $4 ld c, $14 .loop @@ -619,7 +619,7 @@ Trade_WriteCircledMonOAM: call Trade_WriteCircleOAM Trade_AddOffsetsToOAMCoords: - ld hl, wOAMBuffer + ld hl, wShadowOAM ld c, $14 .loop ld a, [wBaseCoordY] diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm index 6a92ccc0c..4a337e8dd 100644 --- a/engine/overworld/cut.asm +++ b/engine/overworld/cut.asm @@ -99,7 +99,7 @@ InitCutAnimOAM: ld hl, vChars1 tile $7f call LoadCutGrassAnimationTilePattern call WriteCutOrBoulderDustAnimationOAMBlock - ld hl, wOAMBuffer + $93 + ld hl, wShadowOAMSprite36Attributes ld de, 4 ld a, $30 ld c, e diff --git a/engine/overworld/cut2.asm b/engine/overworld/cut2.asm index 3d4a59058..69c8cb132 100644 --- a/engine/overworld/cut2.asm +++ b/engine/overworld/cut2.asm @@ -5,12 +5,12 @@ AnimCut: ld c, $8 .cutTreeLoop push bc - ld hl, wOAMBuffer + $91 + ld hl, wShadowOAMSprite36XCoord ld a, 1 ld [wCoordAdjustmentAmount], a ld c, 2 call AdjustOAMBlockXPos2 - ld hl, wOAMBuffer + $99 + ld hl, wShadowOAMSprite38XCoord ld a, -1 ld [wCoordAdjustmentAmount], a ld c, 2 @@ -33,7 +33,7 @@ AnimCut: ld c, $8 call AnimCutGrass_UpdateOAMEntries call AnimCutGrass_SwapOAMEntries - ld hl, wOAMBuffer + $90 + ld hl, wShadowOAMSprite36YCoord ld a, 2 ld [wCoordAdjustmentAmount], a ld c, 4 @@ -45,22 +45,22 @@ AnimCut: AnimCutGrass_UpdateOAMEntries: push bc - ld hl, wOAMBuffer + $91 + ld hl, wShadowOAMSprite36XCoord ld a, 1 ld [wCoordAdjustmentAmount], a ld c, 1 call AdjustOAMBlockXPos2 - ld hl, wOAMBuffer + $95 + ld hl, wShadowOAMSprite37XCoord ld a, 2 ld [wCoordAdjustmentAmount], a ld c, 1 call AdjustOAMBlockXPos2 - ld hl, wOAMBuffer + $99 + ld hl, wShadowOAMSprite38XCoord ld a, -2 ld [wCoordAdjustmentAmount], a ld c, 1 call AdjustOAMBlockXPos2 - ld hl, wOAMBuffer + $9d + ld hl, wShadowOAMSprite39XCoord ld a, -1 ld [wCoordAdjustmentAmount], a ld c, 1 @@ -75,15 +75,15 @@ AnimCutGrass_UpdateOAMEntries: ret AnimCutGrass_SwapOAMEntries: - ld hl, wOAMBuffer + $90 + ld hl, wShadowOAMSprite36 ld de, wBuffer ld bc, $8 call CopyData - ld hl, wOAMBuffer + $98 - ld de, wOAMBuffer + $90 + ld hl, wShadowOAMSprite38 + ld de, wShadowOAMSprite36 ld bc, $8 call CopyData ld hl, wBuffer - ld de, wOAMBuffer + $98 + ld de, wShadowOAMSprite38 ld bc, $8 jp CopyData diff --git a/engine/overworld/dust_smoke.asm b/engine/overworld/dust_smoke.asm index c97b3e567..96dd364a0 100644 --- a/engine/overworld/dust_smoke.asm +++ b/engine/overworld/dust_smoke.asm @@ -43,7 +43,7 @@ GetMoveBoulderDustFunctionPointer: ld h, [hl] ld l, a push hl - ld hl, wOAMBuffer + $90 + ld hl, wShadowOAMSprite36 ld d, $0 add hl, de ld e, l diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index 5a41c226e..84b13f173 100644 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -17,11 +17,11 @@ EmotionBubble: ld [wUpdateSpritesEnabled], a ld a, [wd736] bit 6, a ; are the last 4 OAM entries reserved for a shadow or fishing rod? - ld hl, wOAMBuffer + 4 * 35 + $3 ; $8f - ld de, wOAMBuffer + 4 * 39 + $3 ; $9f + ld hl, wShadowOAMSprite35Attributes + ld de, wShadowOAMSprite39Attributes jr z, .next - ld hl, wOAMBuffer + 4 * 31 + $3 ; $7f - ld de, wOAMBuffer + 4 * 35 + $3 ; $8f + ld hl, wShadowOAMSprite31Attributes + ld de, wShadowOAMSprite35Attributes ; Copy OAM data 16 bytes forward to make room for emotion bubble OAM data at the ; start of the OAM buffer. diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index 63c8f9ea8..e297762ca 100644 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -12,7 +12,7 @@ AnimateHealingMachine: push af ld a, $e0 ldh [rOBP1], a - ld hl, wOAMBuffer + $84 + ld hl, wShadowOAMSprite33 ld de, PokeCenterOAMData call CopyHealingMachineOAM ld a, 4 diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 6a890cfdc..bec59369b 100644 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -205,19 +205,19 @@ LeaveMapThroughHoleAnim: ld a, $ff ld [wUpdateSpritesEnabled], a ; disable UpdateSprites ; shift upper half of player's sprite down 8 pixels and hide lower half - ld a, [wOAMBuffer + 0 * 4 + 2] - ld [wOAMBuffer + 2 * 4 + 2], a - ld a, [wOAMBuffer + 1 * 4 + 2] - ld [wOAMBuffer + 3 * 4 + 2], a + ld a, [wShadowOAMSprite00TileID] + ld [wShadowOAMSprite02TileID], a + ld a, [wShadowOAMSprite01TileID] + ld [wShadowOAMSprite03TileID], a ld a, $a0 - ld [wOAMBuffer + 0 * 4], a - ld [wOAMBuffer + 1 * 4], a + ld [wShadowOAMSprite00YCoord], a + ld [wShadowOAMSprite01YCoord], a ld c, 2 call DelayFrames ; hide upper half of player's sprite ld a, $a0 - ld [wOAMBuffer + 2 * 4], a - ld [wOAMBuffer + 3 * 4], a + ld [wShadowOAMSprite02YCoord], a + ld [wShadowOAMSprite03YCoord], a call GBFadeOutToWhite ld a, $1 ld [wUpdateSpritesEnabled], a ; enable UpdateSprites @@ -392,7 +392,7 @@ FishingAnim: ld b, $0 ld hl, FishingRodOAM add hl, bc - ld de, wOAMBuffer + $9c + ld de, wShadowOAMSprite39 ld bc, $4 call CopyData ld c, 100 @@ -412,7 +412,7 @@ FishingAnim: .loop ld hl, wSpritePlayerStateData1YPixels call .ShakePlayerSprite - ld hl, wOAMBuffer + $9c + ld hl, wShadowOAMSprite39 call .ShakePlayerSprite call Delay3 dec b @@ -424,7 +424,7 @@ FishingAnim: cp SPRITE_FACING_UP jr nz, .skipHidingFishingRod ld a, $a0 - ld [wOAMBuffer + $9c], a + ld [wShadowOAMSprite39YCoord], a .skipHidingFishingRod ld hl, wEmotionBubbleSpriteIndex @@ -438,7 +438,7 @@ FishingAnim: cp SPRITE_FACING_UP jr nz, .skipUnhidingFishingRod ld a, $44 - ld [wOAMBuffer + $9c], a + ld [wShadowOAMSprite39YCoord], a .skipUnhidingFishingRod ld hl, ItsABiteText diff --git a/engine/slots/slot_machine.asm b/engine/slots/slot_machine.asm index 1c2bb4c99..6dd3b42d8 100644 --- a/engine/slots/slot_machine.asm +++ b/engine/slots/slot_machine.asm @@ -757,7 +757,7 @@ SlotMachine_UpdateBallTiles: SlotMachine_AnimWheel1: ld bc, SlotMachineWheel1 ld de, wSlotMachineWheel1Offset - ld hl, wOAMBuffer + ld hl, wShadowOAMSprite00 ld a, $30 ld [wBaseCoordX], a jr SlotMachine_AnimWheel @@ -765,7 +765,7 @@ SlotMachine_AnimWheel1: SlotMachine_AnimWheel2: ld bc, SlotMachineWheel2 ld de, wSlotMachineWheel2Offset - ld hl, wOAMBuffer + $30 + ld hl, wShadowOAMSprite12 ld a, $50 ld [wBaseCoordX], a jr SlotMachine_AnimWheel @@ -773,7 +773,7 @@ SlotMachine_AnimWheel2: SlotMachine_AnimWheel3: ld bc, SlotMachineWheel3 ld de, wSlotMachineWheel3Offset - ld hl, wOAMBuffer + $60 + ld hl, wShadowOAMSprite24 ld a, $70 ld [wBaseCoordX], a diff --git a/home/clear_sprites.asm b/home/clear_sprites.asm index 79cc99d66..6d1066fae 100644 --- a/home/clear_sprites.asm +++ b/home/clear_sprites.asm @@ -1,7 +1,7 @@ ClearSprites:: xor a - ld hl, wOAMBuffer - ld b, wOAMBufferEnd - wOAMBuffer + ld hl, wShadowOAM + ld b, wShadowOAMEnd - wShadowOAM .loop ld [hli], a dec b @@ -10,7 +10,7 @@ ClearSprites:: HideSprites:: ld a, 160 - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, 4 ld b, 40 .loop diff --git a/home/oam.asm b/home/oam.asm index 8a940d975..8be59f6ee 100644 --- a/home/oam.asm +++ b/home/oam.asm @@ -4,7 +4,7 @@ ; c = X coordinate of upper left corner of sprite ; de = base address of 4 tile number and attribute pairs WriteOAMBlock:: - ld h, HIGH(wOAMBuffer) + ld h, HIGH(wShadowOAM) swap a ; multiply by 16 ld l, a call .writeOneEntry ; upper left diff --git a/ram/wram.asm b/ram/wram.asm index 0804e6ee9..3becc82a7 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -143,12 +143,12 @@ wSpriteDataEnd:: SECTION "OAM Buffer", WRAM0 ; buffer for OAM data. Copied to OAM by DMA -wOAMBuffer:: -; wOAMBufferSprite00 - wOAMBufferSprite39 +wShadowOAM:: +; wShadowOAMSprite00 - wShadowOAMSprite39 FOR n, NUM_SPRITE_OAM_STRUCTS -wOAMBufferSprite{02d:n}:: sprite_oam_struct wOAMBufferSprite{02d:n} +wShadowOAMSprite{02d:n}:: sprite_oam_struct wShadowOAMSprite{02d:n} ENDR -wOAMBufferEnd:: +wShadowOAMEnd:: SECTION "Tilemap", WRAM0 diff --git a/scripts/VermilionDock.asm b/scripts/VermilionDock.asm index f98e1250d..947797988 100644 --- a/scripts/VermilionDock.asm +++ b/scripts/VermilionDock.asm @@ -124,7 +124,7 @@ VermilionDock_1db9b: VermilionDock_AnimSmokePuffDriftRight: push bc push de - ld hl, wOAMBuffer + 4 * $4 + 1 ; x coord + ld hl, wShadowOAMSprite04XCoord ld a, [wSSAnneSmokeDriftAmount] swap a ld c, a From 927b5a47009ea1ac6e69c1931ecc6b03d7c75497 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 10 Jul 2022 19:16:17 -0400 Subject: [PATCH 27/45] =?UTF-8?q?Identify=20Pok=C3=A9dex=20rating=20text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/events/pokedex_rating.asm | 96 ++++++++++++++++---------------- text/OaksLab.asm | 32 +++++------ 2 files changed, 64 insertions(+), 64 deletions(-) diff --git a/engine/events/pokedex_rating.asm b/engine/events/pokedex_rating.asm index c61253b7d..e66dac8e4 100644 --- a/engine/events/pokedex_rating.asm +++ b/engine/events/pokedex_rating.asm @@ -56,83 +56,83 @@ PokedexRatingText_441cc: text_end DexRatingsTable: - dbw 10, PokedexRatingText_44201 - dbw 20, PokedexRatingText_44206 - dbw 30, PokedexRatingText_4420b - dbw 40, PokedexRatingText_44210 - dbw 50, PokedexRatingText_44215 - dbw 60, PokedexRatingText_4421a - dbw 70, PokedexRatingText_4421f - dbw 80, PokedexRatingText_44224 - dbw 90, PokedexRatingText_44229 - dbw 100, PokedexRatingText_4422e - dbw 110, PokedexRatingText_44233 - dbw 120, PokedexRatingText_44238 - dbw 130, PokedexRatingText_4423d - dbw 140, PokedexRatingText_44242 - dbw 150, PokedexRatingText_44247 - dbw NUM_POKEMON + 1, PokedexRatingText_4424c + dbw 10, PokedexRatingText01 + dbw 20, PokedexRatingText02 + dbw 30, PokedexRatingText03 + dbw 40, PokedexRatingText04 + dbw 50, PokedexRatingText05 + dbw 60, PokedexRatingText06 + dbw 70, PokedexRatingText07 + dbw 80, PokedexRatingText08 + dbw 90, PokedexRatingText09 + dbw 100, PokedexRatingText10 + dbw 110, PokedexRatingText11 + dbw 120, PokedexRatingText12 + dbw 130, PokedexRatingText13 + dbw 140, PokedexRatingText14 + dbw 150, PokedexRatingText15 + dbw NUM_POKEMON + 1, PokedexRatingText16 -PokedexRatingText_44201: - text_far _OaksLabText_44201 +PokedexRatingText01: + text_far _PokedexRatingText01 text_end -PokedexRatingText_44206: - text_far _OaksLabText_44206 +PokedexRatingText02: + text_far _PokedexRatingText02 text_end -PokedexRatingText_4420b: - text_far _OaksLabText_4420b +PokedexRatingText03: + text_far _PokedexRatingText03 text_end -PokedexRatingText_44210: - text_far _OaksLabText_44210 +PokedexRatingText04: + text_far _PokedexRatingText04 text_end -PokedexRatingText_44215: - text_far _OaksLabText_44215 +PokedexRatingText05: + text_far _PokedexRatingText05 text_end -PokedexRatingText_4421a: - text_far _OaksLabText_4421a +PokedexRatingText06: + text_far _PokedexRatingText06 text_end -PokedexRatingText_4421f: - text_far _OaksLabText_4421f +PokedexRatingText07: + text_far _PokedexRatingText07 text_end -PokedexRatingText_44224: - text_far _OaksLabText_44224 +PokedexRatingText08: + text_far _PokedexRatingText08 text_end -PokedexRatingText_44229: - text_far _OaksLabText_44229 +PokedexRatingText09: + text_far _PokedexRatingText09 text_end -PokedexRatingText_4422e: - text_far _OaksLabText_4422e +PokedexRatingText10: + text_far _PokedexRatingText10 text_end -PokedexRatingText_44233: - text_far _OaksLabText_44233 +PokedexRatingText11: + text_far _PokedexRatingText11 text_end -PokedexRatingText_44238: - text_far _OaksLabText_44238 +PokedexRatingText12: + text_far _PokedexRatingText12 text_end -PokedexRatingText_4423d: - text_far _OaksLabText_4423d +PokedexRatingText13: + text_far _PokedexRatingText13 text_end -PokedexRatingText_44242: - text_far _OaksLabText_44242 +PokedexRatingText14: + text_far _PokedexRatingText14 text_end -PokedexRatingText_44247: - text_far _OaksLabText_44247 +PokedexRatingText15: + text_far _PokedexRatingText15 text_end -PokedexRatingText_4424c: - text_far _OaksLabText_4424c +PokedexRatingText16: + text_far _PokedexRatingText16 text_end diff --git a/text/OaksLab.asm b/text/OaksLab.asm index 18ecadb7a..9c247832c 100644 --- a/text/OaksLab.asm +++ b/text/OaksLab.asm @@ -378,41 +378,41 @@ _OaksLabText_441cc:: line "Rating:" prompt -_OaksLabText_44201:: +_PokedexRatingText01:: text "You still have" line "lots to do." cont "Look for #MON" cont "in grassy areas!" done -_OaksLabText_44206:: +_PokedexRatingText02:: text "You're on the" line "right track! " cont "Get a FLASH HM" cont "from my AIDE!" done -_OaksLabText_4420b:: +_PokedexRatingText03:: text "You still need" line "more #MON!" cont "Try to catch" cont "other species!" done -_OaksLabText_44210:: +_PokedexRatingText04:: text "Good, you're" line "trying hard!" cont "Get an ITEMFINDER" cont "from my AIDE!" done -_OaksLabText_44215:: +_PokedexRatingText05:: text "Looking good!" line "Go find my AIDE" cont "when you get 50!" done -_OaksLabText_4421a:: +_PokedexRatingText06:: text "You finally got at" line "least 50 species!" cont "Be sure to get" @@ -420,62 +420,62 @@ _OaksLabText_4421a:: cont "AIDE!" done -_OaksLabText_4421f:: +_PokedexRatingText07:: text "Ho! This is geting" line "even better!" done -_OaksLabText_44224:: +_PokedexRatingText08:: text "Very good!" line "Go fish for some" cont "marine #MON!" done -_OaksLabText_44229:: +_PokedexRatingText09:: text "Wonderful!" line "Do you like to" cont "collect things?" done -_OaksLabText_4422e:: +_PokedexRatingText10:: text "I'm impressed!" line "It must have been" cont "difficult to do!" done -_OaksLabText_44233:: +_PokedexRatingText11:: text "You finally got at" line "least 100 species!" cont "I can't believe" cont "how good you are!" done -_OaksLabText_44238:: +_PokedexRatingText12:: text "You even have the" line "evolved forms of" cont "#MON! Super!" done -_OaksLabText_4423d:: +_PokedexRatingText13:: text "Excellent! Trade" line "with friends to" cont "get some more!" done -_OaksLabText_44242:: +_PokedexRatingText14:: text "Outstanding!" line "You've become a" cont "real pro at this!" done -_OaksLabText_44247:: +_PokedexRatingText15:: text "I have nothing" line "left to say!" cont "You're the" cont "authority now!" done -_OaksLabText_4424c:: +_PokedexRatingText16:: text "Your #DEX is" line "entirely complete!" cont "Congratulations!" From a66adbcc5c63d133c68bb7a758e8920fde6de2ff Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 10 Jul 2022 19:26:18 -0400 Subject: [PATCH 28/45] =?UTF-8?q?Sync=20Pok=C3=A9dex=20rating=20text=20wit?= =?UTF-8?q?h=20pokeyellow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/events/pokedex_rating.asm | 102 +++++++++++++------------- text.asm | 1 + text/OaksLab.asm | 118 ------------------------------- text/pokedex_ratings.asm | 117 ++++++++++++++++++++++++++++++ 4 files changed, 169 insertions(+), 169 deletions(-) create mode 100644 text/pokedex_ratings.asm diff --git a/engine/events/pokedex_rating.asm b/engine/events/pokedex_rating.asm index e66dac8e4..1086257a9 100644 --- a/engine/events/pokedex_rating.asm +++ b/engine/events/pokedex_rating.asm @@ -26,7 +26,7 @@ DisplayDexRating: CheckAndResetEventA EVENT_HALL_OF_FAME_DEX_RATING jr nz, .hallOfFame push hl - ld hl, PokedexRatingText_441cc + ld hl, DexCompletionText call PrintText pop hl call PrintText @@ -51,88 +51,88 @@ DisplayDexRating: ld [de], a ret -PokedexRatingText_441cc: - text_far _OaksLabText_441cc +DexCompletionText: + text_far _DexCompletionText text_end DexRatingsTable: - dbw 10, PokedexRatingText01 - dbw 20, PokedexRatingText02 - dbw 30, PokedexRatingText03 - dbw 40, PokedexRatingText04 - dbw 50, PokedexRatingText05 - dbw 60, PokedexRatingText06 - dbw 70, PokedexRatingText07 - dbw 80, PokedexRatingText08 - dbw 90, PokedexRatingText09 - dbw 100, PokedexRatingText10 - dbw 110, PokedexRatingText11 - dbw 120, PokedexRatingText12 - dbw 130, PokedexRatingText13 - dbw 140, PokedexRatingText14 - dbw 150, PokedexRatingText15 - dbw NUM_POKEMON + 1, PokedexRatingText16 + dbw 10, DexRatingText_Own0To9 + dbw 20, DexRatingText_Own10To19 + dbw 30, DexRatingText_Own20To29 + dbw 40, DexRatingText_Own30To39 + dbw 50, DexRatingText_Own40To49 + dbw 60, DexRatingText_Own50To59 + dbw 70, DexRatingText_Own60To69 + dbw 80, DexRatingText_Own70To79 + dbw 90, DexRatingText_Own80To89 + dbw 100, DexRatingText_Own90To99 + dbw 110, DexRatingText_Own100To109 + dbw 120, DexRatingText_Own110To119 + dbw 130, DexRatingText_Own120To129 + dbw 140, DexRatingText_Own130To139 + dbw 150, DexRatingText_Own140To149 + dbw NUM_POKEMON + 1, DexRatingText_Own150To151 -PokedexRatingText01: - text_far _PokedexRatingText01 +DexRatingText_Own0To9: + text_far _DexRatingText_Own0To9 text_end -PokedexRatingText02: - text_far _PokedexRatingText02 +DexRatingText_Own10To19: + text_far _DexRatingText_Own10To19 text_end -PokedexRatingText03: - text_far _PokedexRatingText03 +DexRatingText_Own20To29: + text_far _DexRatingText_Own20To29 text_end -PokedexRatingText04: - text_far _PokedexRatingText04 +DexRatingText_Own30To39: + text_far _DexRatingText_Own30To39 text_end -PokedexRatingText05: - text_far _PokedexRatingText05 +DexRatingText_Own40To49: + text_far _DexRatingText_Own40To49 text_end -PokedexRatingText06: - text_far _PokedexRatingText06 +DexRatingText_Own50To59: + text_far _DexRatingText_Own50To59 text_end -PokedexRatingText07: - text_far _PokedexRatingText07 +DexRatingText_Own60To69: + text_far _DexRatingText_Own60To69 text_end -PokedexRatingText08: - text_far _PokedexRatingText08 +DexRatingText_Own70To79: + text_far _DexRatingText_Own70To79 text_end -PokedexRatingText09: - text_far _PokedexRatingText09 +DexRatingText_Own80To89: + text_far _DexRatingText_Own80To89 text_end -PokedexRatingText10: - text_far _PokedexRatingText10 +DexRatingText_Own90To99: + text_far _DexRatingText_Own90To99 text_end -PokedexRatingText11: - text_far _PokedexRatingText11 +DexRatingText_Own100To109: + text_far _DexRatingText_Own100To109 text_end -PokedexRatingText12: - text_far _PokedexRatingText12 +DexRatingText_Own110To119: + text_far _DexRatingText_Own110To119 text_end -PokedexRatingText13: - text_far _PokedexRatingText13 +DexRatingText_Own120To129: + text_far _DexRatingText_Own120To129 text_end -PokedexRatingText14: - text_far _PokedexRatingText14 +DexRatingText_Own130To139: + text_far _DexRatingText_Own130To139 text_end -PokedexRatingText15: - text_far _PokedexRatingText15 +DexRatingText_Own140To149: + text_far _DexRatingText_Own140To149 text_end -PokedexRatingText16: - text_far _PokedexRatingText16 +DexRatingText_Own150To151: + text_far _DexRatingText_Own150To151 text_end diff --git a/text.asm b/text.asm index be17bfc62..c5020bbad 100644 --- a/text.asm +++ b/text.asm @@ -146,6 +146,7 @@ INCLUDE "data/text/text_3.asm" INCLUDE "text/RedsHouse1F.asm" INCLUDE "text/BluesHouse.asm" INCLUDE "text/OaksLab.asm" +INCLUDE "text/pokedex_ratings.asm" INCLUDE "text/ViridianPokecenter.asm" INCLUDE "text/ViridianMart.asm" INCLUDE "text/ViridianSchoolHouse.asm" diff --git a/text/OaksLab.asm b/text/OaksLab.asm index 9c247832c..74804841f 100644 --- a/text/OaksLab.asm +++ b/text/OaksLab.asm @@ -362,121 +362,3 @@ _OaksLabText_1d405:: text "I study #MON as" line "PROF.OAK's AIDE." done - -_OaksLabText_441cc:: - text "#DEX comp-" - line "letion is:" - - para "@" - text_decimal hDexRatingNumMonsSeen, 1, 3 - text " #MON seen" - line "@" - text_decimal hDexRatingNumMonsOwned, 1, 3 - text " #MON owned" - - para "PROF.OAK's" - line "Rating:" - prompt - -_PokedexRatingText01:: - text "You still have" - line "lots to do." - cont "Look for #MON" - cont "in grassy areas!" - done - -_PokedexRatingText02:: - text "You're on the" - line "right track! " - cont "Get a FLASH HM" - cont "from my AIDE!" - done - -_PokedexRatingText03:: - text "You still need" - line "more #MON!" - cont "Try to catch" - cont "other species!" - done - -_PokedexRatingText04:: - text "Good, you're" - line "trying hard!" - cont "Get an ITEMFINDER" - cont "from my AIDE!" - done - -_PokedexRatingText05:: - text "Looking good!" - line "Go find my AIDE" - cont "when you get 50!" - done - -_PokedexRatingText06:: - text "You finally got at" - line "least 50 species!" - cont "Be sure to get" - cont "EXP.ALL from my" - cont "AIDE!" - done - -_PokedexRatingText07:: - text "Ho! This is geting" - line "even better!" - done - -_PokedexRatingText08:: - text "Very good!" - line "Go fish for some" - cont "marine #MON!" - done - -_PokedexRatingText09:: - text "Wonderful!" - line "Do you like to" - cont "collect things?" - done - -_PokedexRatingText10:: - text "I'm impressed!" - line "It must have been" - cont "difficult to do!" - done - -_PokedexRatingText11:: - text "You finally got at" - line "least 100 species!" - cont "I can't believe" - cont "how good you are!" - done - -_PokedexRatingText12:: - text "You even have the" - line "evolved forms of" - cont "#MON! Super!" - done - -_PokedexRatingText13:: - text "Excellent! Trade" - line "with friends to" - cont "get some more!" - done - -_PokedexRatingText14:: - text "Outstanding!" - line "You've become a" - cont "real pro at this!" - done - -_PokedexRatingText15:: - text "I have nothing" - line "left to say!" - cont "You're the" - cont "authority now!" - done - -_PokedexRatingText16:: - text "Your #DEX is" - line "entirely complete!" - cont "Congratulations!" - done diff --git a/text/pokedex_ratings.asm b/text/pokedex_ratings.asm new file mode 100644 index 000000000..9b4f9e619 --- /dev/null +++ b/text/pokedex_ratings.asm @@ -0,0 +1,117 @@ +_DexCompletionText:: + text "#DEX comp-" + line "letion is:" + + para "@" + text_decimal hDexRatingNumMonsSeen, 1, 3 + text " #MON seen" + line "@" + text_decimal hDexRatingNumMonsOwned, 1, 3 + text " #MON owned" + + para "PROF.OAK's" + line "Rating:" + prompt + +_DexRatingText_Own0To9:: + text "You still have" + line "lots to do." + cont "Look for #MON" + cont "in grassy areas!" + done + +_DexRatingText_Own10To19:: + text "You're on the" + line "right track! " + cont "Get a FLASH HM" + cont "from my AIDE!" + done + +_DexRatingText_Own20To29:: + text "You still need" + line "more #MON!" + cont "Try to catch" + cont "other species!" + done + +_DexRatingText_Own30To39:: + text "Good, you're" + line "trying hard!" + cont "Get an ITEMFINDER" + cont "from my AIDE!" + done + +_DexRatingText_Own40To49:: + text "Looking good!" + line "Go find my AIDE" + cont "when you get 50!" + done + +_DexRatingText_Own50To59:: + text "You finally got at" + line "least 50 species!" + cont "Be sure to get" + cont "EXP.ALL from my" + cont "AIDE!" + done + +_DexRatingText_Own60To69:: + text "Ho! This is geting" + line "even better!" + done + +_DexRatingText_Own70To79:: + text "Very good!" + line "Go fish for some" + cont "marine #MON!" + done + +_DexRatingText_Own80To89:: + text "Wonderful!" + line "Do you like to" + cont "collect things?" + done + +_DexRatingText_Own90To99:: + text "I'm impressed!" + line "It must have been" + cont "difficult to do!" + done + +_DexRatingText_Own100To109:: + text "You finally got at" + line "least 100 species!" + cont "I can't believe" + cont "how good you are!" + done + +_DexRatingText_Own110To119:: + text "You even have the" + line "evolved forms of" + cont "#MON! Super!" + done + +_DexRatingText_Own120To129:: + text "Excellent! Trade" + line "with friends to" + cont "get some more!" + done + +_DexRatingText_Own130To139:: + text "Outstanding!" + line "You've become a" + cont "real pro at this!" + done + +_DexRatingText_Own140To149:: + text "I have nothing" + line "left to say!" + cont "You're the" + cont "authority now!" + done + +_DexRatingText_Own150To151:: + text "Your #DEX is" + line "entirely complete!" + cont "Congratulations!" + done From d8c6817279e415d6177b0548c0ad0994546ff104 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 10 Jul 2022 20:22:11 -0400 Subject: [PATCH 29/45] Replace "branch" labels in music files with local names --- audio/alternate_tempo.asm | 12 +- audio/music/bikeriding.asm | 67 ++++----- audio/music/celadon.asm | 17 +-- audio/music/cinnabar.asm | 17 +-- audio/music/cinnabarmansion.asm | 43 +++--- audio/music/cities1.asm | 104 +++++++------- audio/music/cities2.asm | 17 +-- audio/music/credits.asm | 102 +++++++------- audio/music/defeatedgymleader.asm | 17 +-- audio/music/defeatedtrainer.asm | 17 +-- audio/music/defeatedwildmon.asm | 17 +-- audio/music/dungeon1.asm | 224 ++++++++++++++---------------- audio/music/dungeon2.asm | 59 ++++---- audio/music/dungeon3.asm | 79 +++++------ audio/music/finalbattle.asm | 55 ++++---- audio/music/gamecorner.asm | 75 +++++----- audio/music/gym.asm | 53 ++++--- audio/music/gymleaderbattle.asm | 17 +-- audio/music/halloffame.asm | 23 ++- audio/music/indigoplateau.asm | 97 ++++++------- audio/music/introbattle.asm | 3 - audio/music/jigglypuffsong.asm | 1 - audio/music/lavender.asm | 23 ++- audio/music/meeteviltrainer.asm | 17 +-- audio/music/meetfemaletrainer.asm | 26 ++-- audio/music/meetmaletrainer.asm | 17 +-- audio/music/meetprofoak.asm | 35 ++--- audio/music/meetrival.asm | 43 +++--- audio/music/museumguy.asm | 51 +++---- audio/music/oakslab.asm | 17 +-- audio/music/pallettown.asm | 22 ++- audio/music/pkmnhealed.asm | 2 - audio/music/pokecenter.asm | 47 +++---- audio/music/pokemontower.asm | 17 +-- audio/music/routes1.asm | 41 +++--- audio/music/routes2.asm | 27 ++-- audio/music/routes3.asm | 23 ++- audio/music/routes4.asm | 23 ++- audio/music/safarizone.asm | 35 ++--- audio/music/silphco.asm | 25 ++-- audio/music/ssanne.asm | 15 +- audio/music/surfing.asm | 17 +-- audio/music/titlescreen.asm | 128 ++++++++--------- audio/music/trainerbattle.asm | 17 +-- audio/music/unusedsong.asm | 15 +- audio/music/vermilion.asm | 38 +++-- audio/music/wildbattle.asm | 22 ++- 47 files changed, 812 insertions(+), 1047 deletions(-) diff --git a/audio/alternate_tempo.asm b/audio/alternate_tempo.asm index 6c2cdc491..480eb554c 100644 --- a/audio/alternate_tempo.asm +++ b/audio/alternate_tempo.asm @@ -4,11 +4,11 @@ Music_RivalAlternateStart:: ld a, MUSIC_MEET_RIVAL call PlayMusic ld hl, wChannelCommandPointers - ld de, Music_MeetRival_branch_b1a2 + ld de, Music_MeetRival_Ch1_AlternateStart call Audio1_OverwriteChannelPointer - ld de, Music_MeetRival_branch_b21d + ld de, Music_MeetRival_Ch2_AlternateStart call Audio1_OverwriteChannelPointer - ld de, Music_MeetRival_branch_b2b5 + ld de, Music_MeetRival_Ch3_AlternateStart Audio1_OverwriteChannelPointer: ld a, e @@ -23,14 +23,14 @@ Music_RivalAlternateTempo:: ld a, MUSIC_MEET_RIVAL call PlayMusic ld hl, wChannelCommandPointers - ld de, Music_MeetRival_branch_b119 + ld de, Music_MeetRival_Ch1_AlternateTempo jp Audio1_OverwriteChannelPointer ; applies both the alternate start and alternate tempo Music_RivalAlternateStartAndTempo:: call Music_RivalAlternateStart ld hl, wChannelCommandPointers - ld de, Music_MeetRival_branch_b19b + ld de, Music_MeetRival_Ch1_AlternateStartAndTempo jp Audio1_OverwriteChannelPointer ; an alternate tempo for Cities1 which is used for the Hall of Fame room @@ -46,5 +46,5 @@ Music_Cities1AlternateTempo:: ld a, MUSIC_CITIES1 call PlayMusic ld hl, wChannelCommandPointers - ld de, Music_Cities1_branch_aa6f + ld de, Music_Cities1_Ch1_AlternateTempo jp Audio1_OverwriteChannelPointer diff --git a/audio/music/bikeriding.asm b/audio/music/bikeriding.asm index 302e5cf9d..5ee7ba859 100644 --- a/audio/music/bikeriding.asm +++ b/audio/music/bikeriding.asm @@ -6,8 +6,7 @@ Music_BikeRiding_Ch1:: note_type 12, 11, 5 octave 3 note G_, 2 - -Music_BikeRiding_branch_7dbc9:: +.mainloop: octave 4 note C_, 4 note D_, 4 @@ -150,8 +149,7 @@ Music_BikeRiding_branch_7dbc9:: note G_, 12 note_type 12, 11, 5 vibrato 8, 1, 4 - sound_loop 0, Music_BikeRiding_branch_7dbc9 - + sound_loop 0, .mainloop Music_BikeRiding_Ch2:: duty_cycle 2 @@ -159,8 +157,7 @@ Music_BikeRiding_Ch2:: note_type 12, 12, 3 octave 4 note C_, 2 - -Music_BikeRiding_branch_7dc75:: +.mainloop: note E_, 4 note F_, 4 note G_, 4 @@ -299,14 +296,12 @@ Music_BikeRiding_branch_7dc75:: note_type 12, 12, 7 note B_, 12 note_type 12, 12, 3 - sound_loop 0, Music_BikeRiding_branch_7dc75 - + sound_loop 0, .mainloop Music_BikeRiding_Ch3:: note_type 12, 1, 3 rest 2 - -Music_BikeRiding_branch_7dd17:: +.mainloop: octave 4 note C_, 1 rest 1 @@ -640,36 +635,34 @@ Music_BikeRiding_branch_7dd17:: octave 4 note F_, 1 rest 1 - sound_loop 0, Music_BikeRiding_branch_7dd17 - + sound_loop 0, .mainloop Music_BikeRiding_Ch4:: drum_speed 12 rest 2 +.mainloop: + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub3 + sound_call .sub2 + sound_call .sub2 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub3 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_loop 0, .mainloop -Music_BikeRiding_branch_7de6a:: - sound_call Music_BikeRiding_branch_7dea7 - sound_call Music_BikeRiding_branch_7deb4 - sound_call Music_BikeRiding_branch_7dea7 - sound_call Music_BikeRiding_branch_7dec2 - sound_call Music_BikeRiding_branch_7deb4 - sound_call Music_BikeRiding_branch_7deb4 - sound_call Music_BikeRiding_branch_7dea7 - sound_call Music_BikeRiding_branch_7dea7 - sound_call Music_BikeRiding_branch_7dea7 - sound_call Music_BikeRiding_branch_7dea7 - sound_call Music_BikeRiding_branch_7deb4 - sound_call Music_BikeRiding_branch_7dea7 - sound_call Music_BikeRiding_branch_7dec2 - sound_call Music_BikeRiding_branch_7dea7 - sound_call Music_BikeRiding_branch_7deb4 - sound_call Music_BikeRiding_branch_7dea7 - sound_call Music_BikeRiding_branch_7dea7 - sound_call Music_BikeRiding_branch_7dea7 - sound_call Music_BikeRiding_branch_7dea7 - sound_loop 0, Music_BikeRiding_branch_7de6a - -Music_BikeRiding_branch_7dea7:: +.sub1: rest 2 drum_note 16, 2 rest 2 @@ -680,7 +673,7 @@ Music_BikeRiding_branch_7dea7:: drum_note 16, 2 sound_ret -Music_BikeRiding_branch_7deb4:: +.sub2: rest 2 drum_note 16, 2 rest 2 @@ -691,7 +684,7 @@ Music_BikeRiding_branch_7deb4:: drum_note 16, 2 sound_ret -Music_BikeRiding_branch_7dec2:: +.sub3: rest 2 drum_note 16, 2 rest 2 diff --git a/audio/music/celadon.asm b/audio/music/celadon.asm index 5f03fc51d..307231125 100644 --- a/audio/music/celadon.asm +++ b/audio/music/celadon.asm @@ -7,8 +7,7 @@ Music_Celadon_Ch1:: rest 8 octave 3 note D_, 8 - -Music_Celadon_branch_b6d4:: +.mainloop: duty_cycle 2 note_type 12, 11, 2 note G_, 4 @@ -104,8 +103,7 @@ Music_Celadon_branch_b6d4:: note G_, 4 note F#, 4 note A_, 4 - sound_loop 0, Music_Celadon_branch_b6d4 - + sound_loop 0, .mainloop Music_Celadon_Ch2:: duty_cycle 3 @@ -121,8 +119,7 @@ Music_Celadon_Ch2:: note G_, 1 note_type 12, 10, 0 note A_, 8 - -Music_Celadon_branch_b74a:: +.mainloop: duty_cycle 2 note_type 12, 12, 2 octave 4 @@ -223,8 +220,7 @@ Music_Celadon_branch_b74a:: note D_, 2 note E_, 2 note D_, 8 - sound_loop 0, Music_Celadon_branch_b74a - + sound_loop 0, .mainloop Music_Celadon_Ch3:: note_type 12, 1, 3 @@ -238,8 +234,7 @@ Music_Celadon_Ch3:: note E_, 1 note F#, 1 note G_, 1 - -Music_Celadon_branch_b7c1:: +.mainloop: octave 4 note D_, 2 note B_, 2 @@ -408,4 +403,4 @@ Music_Celadon_branch_b7c1:: note G_, 2 note F#, 2 note E_, 2 - sound_loop 0, Music_Celadon_branch_b7c1 + sound_loop 0, .mainloop diff --git a/audio/music/cinnabar.asm b/audio/music/cinnabar.asm index 69496af5e..b0c69ce2d 100644 --- a/audio/music/cinnabar.asm +++ b/audio/music/cinnabar.asm @@ -4,8 +4,7 @@ Music_Cinnabar_Ch1:: duty_cycle 3 vibrato 12, 3, 4 toggle_perfect_pitch - -Music_Cinnabar_branch_b878:: +.mainloop: note_type 12, 11, 5 rest 4 octave 3 @@ -82,14 +81,12 @@ Music_Cinnabar_branch_b878:: note G_, 8 note F#, 4 note E_, 4 - sound_loop 0, Music_Cinnabar_branch_b878 - + sound_loop 0, .mainloop Music_Cinnabar_Ch2:: duty_cycle 3 vibrato 10, 2, 3 - -Music_Cinnabar_branch_b8d9:: +.mainloop: note_type 12, 12, 7 octave 3 note G_, 6 @@ -176,13 +173,11 @@ Music_Cinnabar_branch_b8d9:: octave 3 note B_, 2 note A_, 6 - sound_loop 0, Music_Cinnabar_branch_b8d9 - + sound_loop 0, .mainloop Music_Cinnabar_Ch3:: note_type 12, 1, 0 - -Music_Cinnabar_branch_b93f:: +.mainloop: octave 4 note G_, 1 rest 3 @@ -351,4 +346,4 @@ Music_Cinnabar_branch_b93f:: octave 5 note C_, 1 rest 1 - sound_loop 0, Music_Cinnabar_branch_b93f + sound_loop 0, .mainloop diff --git a/audio/music/cinnabarmansion.asm b/audio/music/cinnabarmansion.asm index ac6c08c35..426715d6a 100644 --- a/audio/music/cinnabarmansion.asm +++ b/audio/music/cinnabarmansion.asm @@ -3,8 +3,8 @@ Music_CinnabarMansion_Ch1:: volume 7, 7 vibrato 11, 2, 5 duty_cycle 2 - -Music_CinnabarMansion_branch_7ed19:: +.mainloop: +.loop1: note_type 12, 6, 2 octave 5 note E_, 1 @@ -25,7 +25,7 @@ Music_CinnabarMansion_branch_7ed19:: octave 5 note B_, 1 rest 2 - sound_loop 14, Music_CinnabarMansion_branch_7ed19 + sound_loop 14, .loop1 note_type 12, 10, 5 rest 16 rest 16 @@ -35,26 +35,22 @@ Music_CinnabarMansion_branch_7ed19:: octave 5 note B_, 1 note B_, 2 - sound_loop 0, Music_CinnabarMansion_branch_7ed19 - + sound_loop 0, .mainloop Music_CinnabarMansion_Ch2:: duty_cycle 2 toggle_perfect_pitch vibrato 10, 2, 4 note_type 12, 12, 2 - -Music_CinnabarMansion_branch_7ed48:: +.introloop: rest 16 rest 16 - sound_loop 4, Music_CinnabarMansion_branch_7ed48 - -Music_CinnabarMansion_branch_7ed4e:: + sound_loop 4, .introloop +.mainloop: note_type 12, 12, 2 - -Music_CinnabarMansion_branch_7ed50:: - sound_call Music_CinnabarMansion_branch_7ed6c - sound_loop 3, Music_CinnabarMansion_branch_7ed50 +.loop1: + sound_call .sub1 + sound_loop 3, .loop1 octave 3 note E_, 4 note D#, 4 @@ -72,9 +68,9 @@ Music_CinnabarMansion_branch_7ed50:: note G#, 4 note G_, 4 note D#, 4 - sound_loop 0, Music_CinnabarMansion_branch_7ed4e + sound_loop 0, .mainloop -Music_CinnabarMansion_branch_7ed6c:: +.sub1: octave 3 note E_, 4 note D#, 4 @@ -94,11 +90,10 @@ Music_CinnabarMansion_branch_7ed6c:: note A#, 4 sound_ret - Music_CinnabarMansion_Ch3:: note_type 12, 1, 1 - -Music_CinnabarMansion_branch_7ed80:: +.mainloop: +.loop1: octave 2 note B_, 2 rest 2 @@ -134,14 +129,13 @@ Music_CinnabarMansion_branch_7ed80:: rest 2 note D#, 2 rest 2 - sound_loop 8, Music_CinnabarMansion_branch_7ed80 + sound_loop 8, .loop1 note E_, 16 note D#, 16 note G_, 16 note G#, 8 note D#, 8 - sound_loop 0, Music_CinnabarMansion_branch_7ed80 - + sound_loop 0, .mainloop Music_CinnabarMansion_Ch4:: drum_speed 6 @@ -149,8 +143,7 @@ Music_CinnabarMansion_Ch4:: rest 16 rest 16 rest 16 - -Music_CinnabarMansion_branch_7edb5:: +.mainloop: drum_note 12, 2 drum_note 12, 2 drum_note 13, 4 @@ -169,4 +162,4 @@ Music_CinnabarMansion_branch_7edb5:: rest 10 rest 8 drum_note 14, 8 - sound_loop 0, Music_CinnabarMansion_branch_7edb5 + sound_loop 0, .mainloop diff --git a/audio/music/cities1.asm b/audio/music/cities1.asm index 00ca3b5ff..f2c654a77 100644 --- a/audio/music/cities1.asm +++ b/audio/music/cities1.asm @@ -1,16 +1,14 @@ -Music_Cities1_branch_aa6f:: +Music_Cities1_Ch1_AlternateTempo:: tempo 232 - sound_loop 0, Music_Cities1_branch_aa79 + sound_loop 0, Music_Cities1_Ch1.body Music_Cities1_Ch1:: tempo 144 - -Music_Cities1_branch_aa79:: +.body: volume 7, 7 vibrato 8, 2, 4 duty_cycle 3 - -Music_Cities1_branch_aa80:: +.mainloop: note_type 12, 12, 5 octave 3 note G#, 4 @@ -39,7 +37,7 @@ Music_Cities1_branch_aa80:: octave 2 note B_, 4 note_type 12, 12, 5 - sound_call Music_Cities1_branch_ab7d + sound_call .sub1 octave 3 note D#, 6 note E_, 2 @@ -90,7 +88,7 @@ Music_Cities1_branch_aa80:: note B_, 2 note B_, 4 note_type 12, 12, 5 - sound_call Music_Cities1_branch_ab7d + sound_call .sub1 octave 3 note D#, 4 note D#, 2 @@ -114,7 +112,7 @@ Music_Cities1_branch_aa80:: note C#, 2 note E_, 4 note_type 12, 11, 3 - sound_call Music_Cities1_branch_ab8a + sound_call .sub2 note A_, 2 note B_, 2 note A_, 2 @@ -142,8 +140,7 @@ Music_Cities1_branch_aa80:: octave 2 note B_, 2 octave 3 - -Music_Cities1_branch_ab12:: +.loop1: note C#, 2 note D#, 2 note C#, 2 @@ -153,7 +150,7 @@ Music_Cities1_branch_ab12:: octave 3 note C#, 2 note D#, 2 - sound_loop 2, Music_Cities1_branch_ab12 + sound_loop 2, .loop1 note E_, 2 octave 2 note B_, 4 @@ -180,7 +177,7 @@ Music_Cities1_branch_ab12:: octave 2 note B_, 2 octave 3 - sound_call Music_Cities1_branch_ab8a + sound_call .sub2 note A_, 2 note E_, 2 note A_, 2 @@ -240,9 +237,9 @@ Music_Cities1_branch_ab12:: octave 3 note E_, 2 note F#, 2 - sound_loop 0, Music_Cities1_branch_aa80 + sound_loop 0, .mainloop -Music_Cities1_branch_ab7d:: +.sub1: octave 3 note F#, 2 note D#, 4 @@ -257,7 +254,7 @@ Music_Cities1_branch_ab7d:: note C#, 2 sound_ret -Music_Cities1_branch_ab8a:: +.sub2: note A_, 2 note E_, 2 note C#, 2 @@ -267,10 +264,10 @@ Music_Cities1_branch_ab8a:: note E_, 2 sound_ret - Music_Cities1_Ch2:: +.mainloop: vibrato 5, 1, 5 - sound_call Music_Cities1_branch_ac00 + sound_call .sub1 octave 4 note G#, 2 note_type 12, 12, 4 @@ -283,7 +280,7 @@ Music_Cities1_Ch2:: note E_, 6 note F#, 6 note G#, 4 - sound_call Music_Cities1_branch_ac00 + sound_call .sub1 octave 4 note G#, 2 note_type 12, 12, 4 @@ -357,9 +354,9 @@ Music_Cities1_Ch2:: note G#, 1 note_type 12, 10, 4 note A_, 1 - sound_loop 0, Music_Cities1_Ch2 + sound_loop 0, .mainloop -Music_Cities1_branch_ac00:: +.sub1: duty_cycle 2 note_type 12, 12, 3 octave 4 @@ -400,17 +397,15 @@ Music_Cities1_branch_ac00:: note F#, 2 sound_ret - Music_Cities1_Ch3:: note_type 12, 1, 1 toggle_perfect_pitch - -Music_Cities1_branch_ac35:: +.mainloop: vibrato 0, 0, 0 octave 4 - sound_call Music_Cities1_branch_acc5 - sound_call Music_Cities1_branch_acc5 - sound_call Music_Cities1_branch_acce + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 note G#, 2 note E_, 2 note F#, 2 @@ -419,7 +414,7 @@ Music_Cities1_branch_ac35:: note E_, 2 note F#, 2 note G#, 2 - sound_call Music_Cities1_branch_acc5 + sound_call .sub1 note B_, 2 note E_, 2 note F#, 2 @@ -428,8 +423,8 @@ Music_Cities1_branch_ac35:: note E_, 2 note F#, 2 note G#, 2 - sound_call Music_Cities1_branch_acc5 - sound_call Music_Cities1_branch_acce + sound_call .sub1 + sound_call .sub2 note G#, 2 note E_, 2 note F#, 2 @@ -530,9 +525,9 @@ Music_Cities1_branch_ac35:: note A_, 2 note G#, 2 note F#, 2 - sound_loop 0, Music_Cities1_branch_ac35 + sound_loop 0, .mainloop -Music_Cities1_branch_acc5:: +.sub1: rest 2 note E_, 2 note F#, 2 @@ -543,7 +538,7 @@ Music_Cities1_branch_acc5:: note G#, 2 sound_ret -Music_Cities1_branch_acce:: +.sub2: note A_, 2 note F#, 2 note G#, 2 @@ -578,27 +573,26 @@ Music_Cities1_branch_acce:: note F#, 2 sound_ret - Music_Cities1_Ch4:: +.mainloop: drum_speed 12 - sound_call Music_Cities1_branch_ad36 - -Music_Cities1_branch_acf3:: - sound_call Music_Cities1_branch_ad36 - sound_call Music_Cities1_branch_ad45 - sound_call Music_Cities1_branch_ad45 - sound_loop 2, Music_Cities1_branch_acf3 - sound_call Music_Cities1_branch_ad36 - sound_call Music_Cities1_branch_ad5f - sound_call Music_Cities1_branch_ad52 + sound_call .sub1 +.loop1: + sound_call .sub1 + sound_call .sub2 + sound_call .sub2 + sound_loop 2, .loop1 + sound_call .sub1 + sound_call .sub4 + sound_call .sub3 drum_note 6, 6 drum_note 6, 6 drum_note 7, 4 - sound_call Music_Cities1_branch_ad6e - sound_call Music_Cities1_branch_ad5f - sound_call Music_Cities1_branch_ad52 - sound_call Music_Cities1_branch_ad6e - sound_call Music_Cities1_branch_ad52 + sound_call .sub5 + sound_call .sub4 + sound_call .sub3 + sound_call .sub5 + sound_call .sub3 drum_note 6, 6 drum_note 6, 6 drum_note 7, 2 @@ -609,9 +603,9 @@ Music_Cities1_branch_acf3:: drum_note 6, 6 drum_note 8, 6 drum_note 8, 4 - sound_loop 0, Music_Cities1_Ch4 + sound_loop 0, .mainloop -Music_Cities1_branch_ad36:: +.sub1: drum_note 8, 6 drum_note 8, 6 drum_note 8, 4 @@ -621,7 +615,7 @@ Music_Cities1_branch_ad36:: drum_note 8, 2 sound_ret -Music_Cities1_branch_ad45:: +.sub2: drum_note 8, 6 drum_note 8, 6 drum_note 8, 4 @@ -630,7 +624,7 @@ Music_Cities1_branch_ad45:: drum_note 8, 4 sound_ret -Music_Cities1_branch_ad52:: +.sub3: drum_note 6, 6 drum_note 6, 6 drum_note 7, 4 @@ -639,7 +633,7 @@ Music_Cities1_branch_ad52:: drum_note 7, 4 sound_ret -Music_Cities1_branch_ad5f:: +.sub4: drum_note 6, 6 drum_note 6, 6 drum_note 7, 4 @@ -649,7 +643,7 @@ Music_Cities1_branch_ad5f:: drum_note 6, 2 sound_ret -Music_Cities1_branch_ad6e:: +.sub5: drum_note 6, 6 drum_note 6, 6 drum_note 7, 2 diff --git a/audio/music/cities2.asm b/audio/music/cities2.asm index 6397f9656..dad0cebd2 100644 --- a/audio/music/cities2.asm +++ b/audio/music/cities2.asm @@ -14,8 +14,7 @@ Music_Cities2_Ch1:: octave 2 note B_, 2 rest 14 - -Music_Cities2_branch_b51a:: +.mainloop: octave 3 note B_, 4 octave 4 @@ -91,8 +90,7 @@ Music_Cities2_branch_b51a:: note F#, 4 note E_, 2 rest 14 - sound_loop 0, Music_Cities2_branch_b51a - + sound_loop 0, .mainloop Music_Cities2_Ch2:: duty_cycle 3 @@ -123,8 +121,7 @@ Music_Cities2_Ch2:: note F#, 1 note G#, 1 note A_, 1 - -Music_Cities2_branch_b58b:: +.mainloop: note_type 12, 10, 6 note G#, 6 note_type 12, 12, 2 @@ -277,8 +274,7 @@ Music_Cities2_branch_b58b:: note F#, 1 note G#, 1 note A_, 1 - sound_loop 0, Music_Cities2_branch_b58b - + sound_loop 0, .mainloop Music_Cities2_Ch3:: note_type 12, 1, 1 @@ -292,8 +288,7 @@ Music_Cities2_Ch3:: note G#, 2 note E_, 2 note G#, 2 - -Music_Cities2_branch_b64c:: +.mainloop: note F#, 2 note A_, 2 note F#, 2 @@ -413,4 +408,4 @@ Music_Cities2_branch_b64c:: note G#, 2 note E_, 2 note G#, 2 - sound_loop 0, Music_Cities2_branch_b64c + sound_loop 0, .mainloop diff --git a/audio/music/credits.asm b/audio/music/credits.asm index b8a6d7dd8..7fa036f9d 100644 --- a/audio/music/credits.asm +++ b/audio/music/credits.asm @@ -283,7 +283,6 @@ Music_Credits_Ch1:: note A_, 8 sound_ret - Music_Credits_Ch2:: duty_cycle 3 vibrato 10, 2, 5 @@ -573,7 +572,6 @@ Music_Credits_Ch2:: note A_, 8 sound_ret - Music_Credits_Ch3:: note_type 12, 1, 0 octave 5 @@ -597,9 +595,9 @@ Music_Credits_Ch3:: note A_, 1 rest 15 rest 16 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffae - sound_call Music_Credits_branch_7ffa4 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 octave 4 note E_, 2 note A_, 2 @@ -609,13 +607,13 @@ Music_Credits_Ch3:: note F#, 2 note G_, 2 note A_, 2 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffae - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffb8 - sound_call Music_Credits_branch_7ffb8 - sound_call Music_Credits_branch_7ffc1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub1 + sound_call .sub3 + sound_call .sub3 + sound_call .sub4 octave 4 note A_, 2 octave 5 @@ -631,34 +629,34 @@ Music_Credits_Ch3:: octave 4 note B_, 2 note A_, 2 - sound_call Music_Credits_branch_7ffb8 - sound_call Music_Credits_branch_7ffb8 - sound_call Music_Credits_branch_7ffc1 - sound_call Music_Credits_branch_7ffc1 + sound_call .sub3 + sound_call .sub3 + sound_call .sub4 + sound_call .sub4 octave 4 note G_, 4 note A_, 4 note B_, 4 octave 5 note D_, 4 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffae - sound_call Music_Credits_branch_7ffae - sound_call Music_Credits_branch_7ffa4 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub2 + sound_call .sub1 note E_, 4 note A_, 2 note E_, 4 note A_, 2 note E_, 2 note A_, 2 - sound_call Music_Credits_branch_7ffae - sound_call Music_Credits_branch_7ffae - sound_call Music_Credits_branch_7ffa4 + sound_call .sub2 + sound_call .sub2 + sound_call .sub1 note E_, 2 note A_, 2 note E_, 2 @@ -667,10 +665,10 @@ Music_Credits_Ch3:: note A_, 2 note G#, 2 note A_, 2 - sound_call Music_Credits_branch_7ffd2 - sound_call Music_Credits_branch_7ffd2 - sound_call Music_Credits_branch_7ffdb - sound_call Music_Credits_branch_7ffdb + sound_call .sub5 + sound_call .sub5 + sound_call .sub6 + sound_call .sub6 note F_, 2 note A_, 2 note F_, 2 @@ -687,8 +685,8 @@ Music_Credits_Ch3:: note D_, 2 note E_, 2 note F_, 2 - sound_call Music_Credits_branch_7ffb8 - sound_call Music_Credits_branch_7ffb8 + sound_call .sub3 + sound_call .sub3 note E_, 4 note A_, 4 note E_, 4 @@ -697,16 +695,16 @@ Music_Credits_Ch3:: note A_, 4 note E_, 4 note A_, 4 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffe4 - sound_call Music_Credits_branch_7ffe4 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffa4 - sound_call Music_Credits_branch_7ffb8 - sound_call Music_Credits_branch_7ffb8 - sound_call Music_Credits_branch_7ffed - sound_call Music_Credits_branch_7ffed + sound_call .sub1 + sound_call .sub1 + sound_call .sub7 + sound_call .sub7 + sound_call .sub1 + sound_call .sub1 + sound_call .sub3 + sound_call .sub3 + sound_call .sub8 + sound_call .sub8 note A_, 1 rest 1 note A_, 1 @@ -717,7 +715,7 @@ Music_Credits_Ch3:: rest 7 sound_ret -Music_Credits_branch_7ffa4:: +.sub1: octave 4 note E_, 2 note A_, 2 @@ -729,7 +727,7 @@ Music_Credits_branch_7ffa4:: note A_, 2 sound_ret -Music_Credits_branch_7ffae:: +.sub2: octave 4 note D_, 2 note G_, 2 @@ -741,7 +739,7 @@ Music_Credits_branch_7ffae:: note G_, 2 sound_ret -Music_Credits_branch_7ffb8:: +.sub3: note G_, 2 note B_, 2 note G_, 2 @@ -752,7 +750,7 @@ Music_Credits_branch_7ffb8:: note B_, 2 sound_ret -Music_Credits_branch_7ffc1:: +.sub4: octave 4 note A_, 2 octave 5 @@ -771,7 +769,7 @@ Music_Credits_branch_7ffc1:: note C#, 2 sound_ret -Music_Credits_branch_7ffd2:: +.sub5: note D_, 2 note A_, 2 note D_, 2 @@ -782,7 +780,7 @@ Music_Credits_branch_7ffd2:: note A_, 2 sound_ret -Music_Credits_branch_7ffdb:: +.sub6: note E_, 2 note G#, 2 note E_, 2 @@ -793,7 +791,7 @@ Music_Credits_branch_7ffdb:: note G#, 2 sound_ret -Music_Credits_branch_7ffe4:: +.sub7: note E_, 2 note B_, 2 note E_, 2 @@ -804,7 +802,7 @@ Music_Credits_branch_7ffe4:: note B_, 2 sound_ret -Music_Credits_branch_7ffed:: +.sub8: note A_, 1 rest 1 note A_, 1 diff --git a/audio/music/defeatedgymleader.asm b/audio/music/defeatedgymleader.asm index 159bf42b3..6a71afccf 100644 --- a/audio/music/defeatedgymleader.asm +++ b/audio/music/defeatedgymleader.asm @@ -19,8 +19,7 @@ Music_DefeatedGymLeader_Ch1:: note A_, 8 note_type 12, 10, 7 note A_, 8 - -Music_DefeatedGymLeader_branch_23ccc:: +.mainloop: note_type 12, 11, 2 octave 3 note A_, 2 @@ -159,8 +158,7 @@ Music_DefeatedGymLeader_branch_23ccc:: note_type 12, 10, 7 note G_, 8 note E_, 8 - sound_loop 0, Music_DefeatedGymLeader_branch_23ccc - + sound_loop 0, .mainloop Music_DefeatedGymLeader_Ch2:: duty_cycle 2 @@ -180,8 +178,7 @@ Music_DefeatedGymLeader_Ch2:: note F#, 8 note_type 12, 11, 7 note F#, 8 - -Music_DefeatedGymLeader_branch_23d84:: +.mainloop: note_type 12, 12, 2 octave 4 note D_, 2 @@ -349,8 +346,7 @@ Music_DefeatedGymLeader_branch_23d84:: note B_, 1 octave 4 note C#, 1 - sound_loop 0, Music_DefeatedGymLeader_branch_23d84 - + sound_loop 0, .mainloop Music_DefeatedGymLeader_Ch3:: note_type 12, 1, 0 @@ -369,8 +365,7 @@ Music_DefeatedGymLeader_Ch3:: octave 5 note D_, 1 note F#, 8 - -Music_DefeatedGymLeader_branch_23e65:: +.mainloop: octave 4 note F#, 1 rest 1 @@ -604,4 +599,4 @@ Music_DefeatedGymLeader_branch_23e65:: note A_, 2 note G_, 2 note E_, 2 - sound_loop 0, Music_DefeatedGymLeader_branch_23e65 + sound_loop 0, .mainloop diff --git a/audio/music/defeatedtrainer.asm b/audio/music/defeatedtrainer.asm index 158d755c4..a035df11b 100644 --- a/audio/music/defeatedtrainer.asm +++ b/audio/music/defeatedtrainer.asm @@ -20,8 +20,7 @@ Music_DefeatedTrainer_Ch1:: note F#, 12 duty_cycle 1 tempo 224 - -Music_DefeatedTrainer_branch_23a76:: +.mainloop: note_type 4, 6, 3 octave 3 note A_, 6 @@ -92,8 +91,7 @@ Music_DefeatedTrainer_branch_23a76:: note G_, 3 note A_, 3 note B_, 3 - sound_loop 0, Music_DefeatedTrainer_branch_23a76 - + sound_loop 0, .mainloop Music_DefeatedTrainer_Ch2:: duty_cycle 2 @@ -109,8 +107,7 @@ Music_DefeatedTrainer_Ch2:: note C#, 2 note_type 4, 12, 4 note D_, 12 - -Music_DefeatedTrainer_branch_23ad2:: +.mainloop: note_type 4, 8, 5 octave 4 note D_, 6 @@ -169,8 +166,7 @@ Music_DefeatedTrainer_branch_23ad2:: note E_, 12 note_type 4, 6, 7 note E_, 12 - sound_loop 0, Music_DefeatedTrainer_branch_23ad2 - + sound_loop 0, .mainloop Music_DefeatedTrainer_Ch3:: note_type 4, 1, 0 @@ -185,8 +181,7 @@ Music_DefeatedTrainer_Ch3:: note G_, 2 note A_, 12 note_type 4, 2, 1 - -Music_DefeatedTrainer_branch_23b24:: +.mainloop: note F#, 3 rest 3 note F#, 3 @@ -263,4 +258,4 @@ Music_DefeatedTrainer_branch_23b24:: note C#, 3 octave 4 note A_, 3 - sound_loop 0, Music_DefeatedTrainer_branch_23b24 + sound_loop 0, .mainloop diff --git a/audio/music/defeatedwildmon.asm b/audio/music/defeatedwildmon.asm index 364f548ec..83b1c9091 100644 --- a/audio/music/defeatedwildmon.asm +++ b/audio/music/defeatedwildmon.asm @@ -13,8 +13,7 @@ Music_DefeatedWildMon_Ch1:: note G#, 1 note F#, 1 note E_, 12 - -Music_DefeatedWildMon_branch_23b8b:: +.mainloop: note_type 12, 6, 2 note E_, 2 note F#, 2 @@ -64,8 +63,7 @@ Music_DefeatedWildMon_branch_23b8b:: note A#, 2 note A#, 4 note A_, 8 - sound_loop 0, Music_DefeatedWildMon_branch_23b8b - + sound_loop 0, .mainloop Music_DefeatedWildMon_Ch2:: execute_music @@ -78,8 +76,7 @@ Music_DefeatedWildMon_Ch2:: note A_, 1 note_type 12, 12, 7 note B_, 12 - -Music_DefeatedWildMon_branch_23bce:: +.mainloop: note_type 12, 8, 2 octave 3 note B_, 2 @@ -139,8 +136,7 @@ Music_DefeatedWildMon_branch_23bce:: note D_, 2 note D_, 4 note C_, 8 - sound_loop 0, Music_DefeatedWildMon_branch_23bce - + sound_loop 0, .mainloop Music_DefeatedWildMon_Ch3:: execute_music @@ -161,8 +157,7 @@ Music_DefeatedWildMon_Ch3:: rest 3 note E_, 1 rest 3 - -Music_DefeatedWildMon_branch_23c21:: +.mainloop: octave 4 note E_, 1 rest 1 @@ -299,4 +294,4 @@ Music_DefeatedWildMon_branch_23c21:: rest 3 octave 4 note D#, 4 - sound_loop 0, Music_DefeatedWildMon_branch_23c21 + sound_loop 0, .mainloop diff --git a/audio/music/dungeon1.asm b/audio/music/dungeon1.asm index 49c6f89c8..50a9ee04e 100644 --- a/audio/music/dungeon1.asm +++ b/audio/music/dungeon1.asm @@ -10,14 +10,12 @@ Music_Dungeon1_Ch1:: octave 4 note F#, 8 stereo_panning %1111, %1111 - -Music_Dungeon1_branch_7dee5:: +.mainloop: note_type 12, 11, 2 octave 3 - -Music_Dungeon1_branch_7dee8:: - sound_call Music_Dungeon1_branch_7dfaa - sound_loop 3, Music_Dungeon1_branch_7dee8 +.loop1: + sound_call .sub1 + sound_loop 3, .loop1 note E_, 1 note D#, 1 note B_, 1 @@ -34,23 +32,22 @@ Music_Dungeon1_branch_7dee8:: note G#, 1 note A_, 1 note A#, 1 - -Music_Dungeon1_branch_7deff:: - sound_call Music_Dungeon1_branch_7dfaa - sound_loop 4, Music_Dungeon1_branch_7deff - sound_call Music_Dungeon1_branch_7dfd5 +.loop2: + sound_call .sub1 + sound_loop 4, .loop2 + sound_call .sub4 octave 3 note G_, 1 note F#, 1 note E_, 1 note G_, 1 - sound_call Music_Dungeon1_branch_7dfd5 + sound_call .sub4 octave 3 note A_, 1 note G_, 1 note E_, 1 note A_, 1 - sound_call Music_Dungeon1_branch_7dfd5 + sound_call .sub4 octave 3 note B_, 1 note A_, 1 @@ -62,12 +59,12 @@ Music_Dungeon1_branch_7deff:: note E_, 4 note D#, 4 note_type 12, 12, 2 - sound_call Music_Dungeon1_branch_7dfc5 + sound_call .sub3 octave 3 note B_, 3 - sound_call Music_Dungeon1_branch_7dfc5 + sound_call .sub3 note C_, 3 - sound_call Music_Dungeon1_branch_7dfc5 + sound_call .sub3 note C#, 3 note_type 12, 12, 3 octave 3 @@ -126,12 +123,11 @@ Music_Dungeon1_branch_7deff:: note A#, 1 octave 3 note C#, 1 - -Music_Dungeon1_branch_7df6e:: +.loop3: rest 16 - sound_loop 8, Music_Dungeon1_branch_7df6e + sound_loop 8, .loop3 note_type 12, 12, 3 - sound_call Music_Dungeon1_branch_7dfbb + sound_call .sub2 note B_, 2 note G_, 2 octave 3 @@ -140,7 +136,7 @@ Music_Dungeon1_branch_7df6e:: note G_, 2 note A_, 4 note F#, 2 - sound_call Music_Dungeon1_branch_7dfbb + sound_call .sub2 note A#, 2 note G_, 2 note B_, 4 @@ -149,23 +145,23 @@ Music_Dungeon1_branch_7df6e:: note G_, 2 note D#, 2 note_type 12, 12, 2 - sound_call Music_Dungeon1_branch_7dfc5 + sound_call .sub3 octave 3 note B_, 3 - sound_call Music_Dungeon1_branch_7dfc5 + sound_call .sub3 note C_, 3 - sound_call Music_Dungeon1_branch_7dfc5 + sound_call .sub3 note C#, 3 note_type 12, 12, 7 octave 3 note F#, 8 note D#, 8 note_type 12, 12, 2 - sound_call Music_Dungeon1_branch_7dfaa - sound_call Music_Dungeon1_branch_7dfaa - sound_loop 0, Music_Dungeon1_branch_7dee5 + sound_call .sub1 + sound_call .sub1 + sound_loop 0, .mainloop -Music_Dungeon1_branch_7dfaa:: +.sub1: note E_, 1 note D#, 1 note B_, 1 @@ -184,7 +180,7 @@ Music_Dungeon1_branch_7dfaa:: note A#, 1 sound_ret -Music_Dungeon1_branch_7dfbb:: +.sub2: octave 2 note G_, 2 note A#, 4 @@ -196,7 +192,7 @@ Music_Dungeon1_branch_7dfbb:: note A#, 2 sound_ret -Music_Dungeon1_branch_7dfc5:: +.sub3: octave 3 note E_, 1 note E_, 1 @@ -214,7 +210,7 @@ Music_Dungeon1_branch_7dfc5:: note C_, 1 sound_ret -Music_Dungeon1_branch_7dfd5:: +.sub4: note E_, 1 note E_, 1 rest 4 @@ -225,7 +221,6 @@ Music_Dungeon1_branch_7dfd5:: rest 1 sound_ret - Music_Dungeon1_Ch2:: vibrato 11, 1, 5 duty_cycle 3 @@ -235,13 +230,11 @@ Music_Dungeon1_Ch2:: note_type 12, 4, -5 octave 5 note D_, 8 - -Music_Dungeon1_branch_7dfeb:: +.mainloop: note_type 12, 12, 2 - -Music_Dungeon1_branch_7dfed:: - sound_call Music_Dungeon1_branch_7e097 - sound_loop 3, Music_Dungeon1_branch_7dfed +.loop1: + sound_call .sub1 + sound_loop 3, .loop1 octave 2 note E_, 1 note E_, 1 @@ -260,18 +253,17 @@ Music_Dungeon1_branch_7dfed:: note F#, 1 note G_, 1 note D#, 1 - -Music_Dungeon1_branch_7e006:: - sound_call Music_Dungeon1_branch_7e097 - sound_loop 4, Music_Dungeon1_branch_7e006 +.loop2: + sound_call .sub1 + sound_loop 4, .loop2 rest 2 - sound_call Music_Dungeon1_branch_7e0ab + sound_call .sub2 octave 3 note C_, 4 - sound_call Music_Dungeon1_branch_7e0ab + sound_call .sub2 octave 3 note C#, 4 - sound_call Music_Dungeon1_branch_7e0ab + sound_call .sub2 octave 3 note D#, 4 note_type 12, 13, 3 @@ -282,13 +274,13 @@ Music_Dungeon1_branch_7e006:: octave 3 note B_, 4 note_type 12, 13, 2 - sound_call Music_Dungeon1_branch_7e0b5 + sound_call .sub3 octave 3 note F#, 4 - sound_call Music_Dungeon1_branch_7e0b5 + sound_call .sub3 octave 3 note G_, 4 - sound_call Music_Dungeon1_branch_7e0b5 + sound_call .sub3 octave 3 note A#, 4 note_type 12, 13, 3 @@ -310,24 +302,24 @@ Music_Dungeon1_branch_7e006:: note F#, 8 note G_, 8 note_type 12, 13, 2 - sound_call Music_Dungeon1_branch_7e0ba + sound_call .sub4 rest 10 note E_, 1 rest 1 - sound_call Music_Dungeon1_branch_7e0ba + sound_call .sub4 rest 12 - sound_call Music_Dungeon1_branch_7e0ba + sound_call .sub4 rest 12 - sound_call Music_Dungeon1_branch_7e0ba + sound_call .sub4 rest 14 note_type 12, 13, 3 - sound_call Music_Dungeon1_branch_7e0cd + sound_call .sub6 note D#, 4 - sound_call Music_Dungeon1_branch_7e0cd + sound_call .sub6 note D#, 2 rest 2 note_type 12, 13, 2 - sound_call Music_Dungeon1_branch_7e0c0 + sound_call .sub5 rest 2 octave 3 note F#, 4 @@ -347,7 +339,7 @@ Music_Dungeon1_branch_7e006:: rest 2 octave 3 note G_, 4 - sound_call Music_Dungeon1_branch_7e0c0 + sound_call .sub5 octave 3 note A#, 4 note_type 12, 13, 6 @@ -355,11 +347,11 @@ Music_Dungeon1_branch_7e006:: octave 4 note D#, 8 note_type 12, 13, 2 - sound_call Music_Dungeon1_branch_7e097 - sound_call Music_Dungeon1_branch_7e097 - sound_loop 0, Music_Dungeon1_branch_7dfeb + sound_call .sub1 + sound_call .sub1 + sound_loop 0, .mainloop -Music_Dungeon1_branch_7e097:: +.sub1: octave 2 note E_, 1 note E_, 1 @@ -381,7 +373,7 @@ Music_Dungeon1_branch_7e097:: note B_, 1 sound_ret -Music_Dungeon1_branch_7e0ab:: +.sub2: octave 2 note E_, 1 note E_, 1 @@ -393,14 +385,14 @@ Music_Dungeon1_branch_7e0ab:: rest 3 sound_ret -Music_Dungeon1_branch_7e0b5:: +.sub3: octave 2 note E_, 1 note E_, 1 rest 10 sound_ret -Music_Dungeon1_branch_7e0ba:: +.sub4: octave 1 note E_, 1 note G_, 1 @@ -408,7 +400,7 @@ Music_Dungeon1_branch_7e0ba:: note D#, 1 sound_ret -Music_Dungeon1_branch_7e0c0:: +.sub5: octave 2 note E_, 1 note E_, 1 @@ -423,7 +415,7 @@ Music_Dungeon1_branch_7e0c0:: note C_, 1 sound_ret -Music_Dungeon1_branch_7e0cd:: +.sub6: octave 3 note E_, 6 note G_, 6 @@ -440,7 +432,6 @@ Music_Dungeon1_branch_7e0cd:: note F#, 6 sound_ret - Music_Dungeon1_Ch3:: note_type 12, 1, 1 vibrato 8, 2, 6 @@ -448,10 +439,9 @@ Music_Dungeon1_Ch3:: octave 4 note D_, 1 note D#, 1 - -Music_Dungeon1_branch_7e0e5:: - sound_call Music_Dungeon1_branch_7e140 - sound_call Music_Dungeon1_branch_7e140 +.mainloop: + sound_call .sub1 + sound_call .sub1 octave 5 note E_, 2 rest 4 @@ -462,10 +452,10 @@ Music_Dungeon1_branch_7e0e5:: rest 1 octave 4 note F#, 4 - sound_call Music_Dungeon1_branch_7e154 + sound_call .sub2 octave 4 note G_, 4 - sound_call Music_Dungeon1_branch_7e154 + sound_call .sub2 octave 4 note A_, 4 note B_, 4 @@ -473,7 +463,7 @@ Music_Dungeon1_branch_7e0e5:: note G_, 4 note F#, 4 rest 6 - sound_call Music_Dungeon1_branch_7e177 + sound_call .sub5 note B_, 4 note A#, 4 note G_, 4 @@ -482,36 +472,36 @@ Music_Dungeon1_branch_7e0e5:: note F#, 4 note E_, 4 note D#, 4 - sound_call Music_Dungeon1_branch_7e15e + sound_call .sub3 rest 12 - sound_call Music_Dungeon1_branch_7e15e + sound_call .sub3 rest 12 - sound_call Music_Dungeon1_branch_7e15e + sound_call .sub3 rest 10 note E_, 1 rest 1 - sound_call Music_Dungeon1_branch_7e15e + sound_call .sub3 rest 12 - sound_call Music_Dungeon1_branch_7e15e + sound_call .sub3 rest 12 - sound_call Music_Dungeon1_branch_7e15e + sound_call .sub3 rest 10 note D_, 1 note D#, 1 - sound_call Music_Dungeon1_branch_7e164 - sound_call Music_Dungeon1_branch_7e164 + sound_call .sub4 + sound_call .sub4 note E_, 2 rest 4 - sound_call Music_Dungeon1_branch_7e177 + sound_call .sub5 note B_, 8 note F#, 6 note D_, 1 note D#, 1 rest 16 rest 16 - sound_loop 0, Music_Dungeon1_branch_7e0e5 + sound_loop 0, .mainloop -Music_Dungeon1_branch_7e140:: +.sub1: octave 5 note E_, 4 note B_, 4 @@ -533,7 +523,7 @@ Music_Dungeon1_branch_7e140:: note D#, 4 sound_ret -Music_Dungeon1_branch_7e154:: +.sub2: octave 6 note E_, 1 note E_, 1 @@ -545,7 +535,7 @@ Music_Dungeon1_branch_7e154:: rest 1 sound_ret -Music_Dungeon1_branch_7e15e:: +.sub3: octave 3 note E_, 1 note G_, 1 @@ -553,7 +543,7 @@ Music_Dungeon1_branch_7e15e:: note D#, 1 sound_ret -Music_Dungeon1_branch_7e164:: +.sub4: note E_, 4 note B_, 4 note A#, 4 @@ -574,7 +564,7 @@ Music_Dungeon1_branch_7e164:: note D#, 4 sound_ret -Music_Dungeon1_branch_7e177:: +.sub5: octave 4 note E_, 1 rest 3 @@ -595,79 +585,73 @@ Music_Dungeon1_branch_7e177:: note A#, 4 sound_ret - Music_Dungeon1_Ch4:: drum_speed 12 rest 14 drum_note 12, 1 drum_note 12, 1 - -Music_Dungeon1_branch_7e190:: - sound_call Music_Dungeon1_branch_7e1f1 - sound_loop 3, Music_Dungeon1_branch_7e190 +.mainloop: +.loop1: + sound_call .sub1 + sound_loop 3, .loop1 drum_note 13, 4 drum_note 12, 4 drum_note 13, 4 drum_note 12, 2 drum_note 12, 2 - -Music_Dungeon1_branch_7e1a1:: - sound_call Music_Dungeon1_branch_7e1f1 - sound_loop 3, Music_Dungeon1_branch_7e1a1 +.loop2: + sound_call .sub1 + sound_loop 3, .loop2 drum_note 13, 4 drum_note 12, 4 drum_note 13, 4 drum_note 13, 4 - -Music_Dungeon1_branch_7e1b0:: - sound_call Music_Dungeon1_branch_7e1fa - sound_loop 3, Music_Dungeon1_branch_7e1b0 - sound_call Music_Dungeon1_branch_7e202 - -Music_Dungeon1_branch_7e1ba:: - sound_call Music_Dungeon1_branch_7e1fa - sound_loop 3, Music_Dungeon1_branch_7e1ba - sound_call Music_Dungeon1_branch_7e202 +.loop3: + sound_call .sub2 + sound_loop 3, .loop3 + sound_call .sub3 +.loop4: + sound_call .sub2 + sound_loop 3, .loop4 + sound_call .sub3 drum_note 9, 4 drum_note 10, 4 drum_note 10, 4 rest 2 drum_note 9, 2 drum_note 13, 4 - -Music_Dungeon1_branch_7e1cf:: +.loop5: rest 16 - sound_loop 13, Music_Dungeon1_branch_7e1cf + sound_loop 13, .loop5 rest 12 - -Music_Dungeon1_branch_7e1d5:: - sound_call Music_Dungeon1_branch_7e1fa - sound_loop 3, Music_Dungeon1_branch_7e1d5 +.loop6: + sound_call .sub2 + sound_loop 3, .loop6 drum_note 12, 4 drum_note 12, 4 drum_note 12, 4 rest 2 drum_note 12, 1 drum_note 12, 1 - sound_call Music_Dungeon1_branch_7e1f1 - sound_call Music_Dungeon1_branch_7e1f1 - sound_loop 0, Music_Dungeon1_branch_7e190 + sound_call .sub1 + sound_call .sub1 + sound_loop 0, .mainloop -Music_Dungeon1_branch_7e1f1:: +.sub1: drum_note 13, 4 drum_note 12, 4 drum_note 13, 4 drum_note 12, 4 sound_ret -Music_Dungeon1_branch_7e1fa:: +.sub2: drum_note 12, 1 drum_note 12, 1 rest 10 drum_note 14, 4 sound_ret -Music_Dungeon1_branch_7e202:: +.sub3: drum_note 9, 4 drum_note 10, 4 drum_note 10, 4 diff --git a/audio/music/dungeon2.asm b/audio/music/dungeon2.asm index 2167bfd7d..890f9cbe8 100644 --- a/audio/music/dungeon2.asm +++ b/audio/music/dungeon2.asm @@ -4,8 +4,8 @@ Music_Dungeon2_Ch1:: duty_cycle 3 toggle_perfect_pitch vibrato 10, 1, 4 - -Music_Dungeon2_branch_7e892:: +.mainloop: +.loop1: note_type 12, 11, 2 octave 4 note E_, 4 @@ -51,7 +51,7 @@ Music_Dungeon2_branch_7e892:: note G_, 2 note A_, 4 note F#, 2 - sound_loop 2, Music_Dungeon2_branch_7e892 + sound_loop 2, .loop1 note_type 12, 1, -7 octave 3 note E_, 16 @@ -67,13 +67,12 @@ Music_Dungeon2_branch_7e892:: rest 16 rest 16 rest 16 - sound_loop 0, Music_Dungeon2_branch_7e892 - + sound_loop 0, .mainloop Music_Dungeon2_Ch2:: vibrato 11, 1, 5 - -Music_Dungeon2_branch_7e8db:: +.mainloop: +.loop1: duty_cycle 3 note_type 12, 12, 2 octave 3 @@ -110,7 +109,7 @@ Music_Dungeon2_branch_7e8db:: note G_, 4 note G_, 4 note F#, 4 - sound_loop 2, Music_Dungeon2_branch_7e8db + sound_loop 2, .loop1 octave 3 note E_, 2 note G_, 2 @@ -159,16 +158,15 @@ Music_Dungeon2_branch_7e8db:: note D_, 16 note C_, 16 note D_, 16 - sound_loop 0, Music_Dungeon2_branch_7e8db - + sound_loop 0, .mainloop Music_Dungeon2_Ch3:: note_type 12, 1, 3 vibrato 8, 2, 6 - -Music_Dungeon2_branch_7e940:: - sound_call Music_Dungeon2_branch_7e9d1 - sound_loop 16, Music_Dungeon2_branch_7e940 +.mainloop: +.loop1: + sound_call .sub2 + sound_loop 16, .loop1 note E_, 4 rest 4 rest 4 @@ -186,8 +184,7 @@ Music_Dungeon2_branch_7e940:: rest 4 rest 4 note A#, 4 - -Music_Dungeon2_branch_7e958:: +.loop2: octave 5 note E_, 2 rest 2 @@ -223,7 +220,7 @@ Music_Dungeon2_branch_7e958:: rest 2 note D#, 2 rest 2 - sound_loop 3, Music_Dungeon2_branch_7e958 + sound_loop 3, .loop2 octave 4 note E_, 4 note B_, 4 @@ -259,15 +256,17 @@ Music_Dungeon2_branch_7e958:: rest 16 rest 16 rest 16 - sound_call Music_Dungeon2_branch_7e9d1 - sound_call Music_Dungeon2_branch_7e9d1 - sound_call Music_Dungeon2_branch_7e9d1 - sound_call Music_Dungeon2_branch_7e9d1 - sound_call Music_Dungeon2_branch_7e9d1 - sound_call Music_Dungeon2_branch_7e9d1 - sound_call Music_Dungeon2_branch_7e9d1 - sound_call Music_Dungeon2_branch_7e9d1 - sound_loop 0, Music_Dungeon2_branch_7e940 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_loop 0, .mainloop + +.sub1: ; unreferenced octave 2 note G_, 2 note A#, 4 @@ -288,7 +287,7 @@ Music_Dungeon2_branch_7e958:: rest 2 sound_ret -Music_Dungeon2_branch_7e9d1:: +.sub2: octave 4 note E_, 2 rest 4 @@ -301,11 +300,9 @@ Music_Dungeon2_branch_7e9d1:: note F#, 4 sound_ret - Music_Dungeon2_Ch4:: drum_speed 12 - -Music_Dungeon2_branch_7e9dd:: +.mainloop: drum_note 12, 4 drum_note 13, 4 drum_note 12, 4 @@ -314,4 +311,4 @@ Music_Dungeon2_branch_7e9dd:: drum_note 13, 4 drum_note 11, 4 drum_note 9, 4 - sound_loop 0, Music_Dungeon2_branch_7e9dd + sound_loop 0, .mainloop diff --git a/audio/music/dungeon3.asm b/audio/music/dungeon3.asm index 81b2ead81..881bc82ab 100644 --- a/audio/music/dungeon3.asm +++ b/audio/music/dungeon3.asm @@ -4,13 +4,11 @@ Music_Dungeon3_Ch1:: duty_cycle 3 toggle_perfect_pitch vibrato 8, 1, 4 - -Music_Dungeon3_branch_7e9fc:: +.mainloop: note_type 12, 12, 3 - -Music_Dungeon3_branch_7e9fe:: - sound_call Music_Dungeon3_branch_7eab2 - sound_loop 3, Music_Dungeon3_branch_7e9fe +.loop1: + sound_call .sub1 + sound_loop 3, .loop1 octave 2 note B_, 2 octave 3 @@ -23,14 +21,12 @@ Music_Dungeon3_branch_7e9fe:: note G_, 2 note D#, 2 note E_, 2 - -Music_Dungeon3_branch_7ea11:: - sound_call Music_Dungeon3_branch_7eac1 - sound_loop 4, Music_Dungeon3_branch_7ea11 - -Music_Dungeon3_branch_7ea18:: - sound_call Music_Dungeon3_branch_7eab2 - sound_loop 4, Music_Dungeon3_branch_7ea18 +.loop2: + sound_call .sub2 + sound_loop 4, .loop2 +.loop3: + sound_call .sub1 + sound_loop 4, .loop3 octave 4 note F_, 2 note F_, 2 @@ -44,7 +40,7 @@ Music_Dungeon3_branch_7ea18:: note D#, 2 note D_, 2 note D_, 2 - sound_call Music_Dungeon3_branch_7eafc + sound_call .sub7 octave 4 note D_, 2 note D_, 2 @@ -58,14 +54,12 @@ Music_Dungeon3_branch_7ea18:: note E_, 2 note F_, 2 note F_, 2 - -Music_Dungeon3_branch_7ea3c:: - sound_call Music_Dungeon3_branch_7eace - sound_loop 4, Music_Dungeon3_branch_7ea3c - -Music_Dungeon3_branch_7ea43:: - sound_call Music_Dungeon3_branch_7eadd - sound_loop 3, Music_Dungeon3_branch_7ea43 +.loop4: + sound_call .sub3 + sound_loop 4, .loop4 +.loop5: + sound_call .sub4 + sound_loop 3, .loop5 octave 3 note C#, 2 octave 2 @@ -130,8 +124,8 @@ Music_Dungeon3_branch_7ea43:: note E_, 2 octave 4 note C_, 2 - sound_call Music_Dungeon3_branch_7eaea - sound_call Music_Dungeon3_branch_7eaea + sound_call .sub5 + sound_call .sub5 octave 3 note G#, 2 note E_, 2 @@ -147,16 +141,16 @@ Music_Dungeon3_branch_7ea43:: note E_, 2 rest 16 rest 8 - sound_call Music_Dungeon3_branch_7eaf7 - sound_call Music_Dungeon3_branch_7eaf7 - sound_call Music_Dungeon3_branch_7eaf7 - sound_call Music_Dungeon3_branch_7eaf7 + sound_call .sub6 + sound_call .sub6 + sound_call .sub6 + sound_call .sub6 note D#, 2 rest 16 rest 16 - sound_loop 0, Music_Dungeon3_branch_7e9fc + sound_loop 0, .mainloop -Music_Dungeon3_branch_7eab2:: +.sub1: octave 2 note B_, 2 octave 3 @@ -173,7 +167,7 @@ Music_Dungeon3_branch_7eab2:: note D#, 2 sound_ret -Music_Dungeon3_branch_7eac1:: +.sub2: note E_, 2 note G#, 2 octave 4 @@ -188,7 +182,7 @@ Music_Dungeon3_branch_7eac1:: note G#, 2 sound_ret -Music_Dungeon3_branch_7eace:: +.sub3: octave 3 note D#, 2 octave 2 @@ -205,7 +199,7 @@ Music_Dungeon3_branch_7eace:: note B_, 2 sound_ret -Music_Dungeon3_branch_7eadd:: +.sub4: note A_, 2 note F_, 2 octave 3 @@ -220,7 +214,7 @@ Music_Dungeon3_branch_7eadd:: note F_, 2 sound_ret -Music_Dungeon3_branch_7eaea:: +.sub5: octave 3 note G#, 2 note E_, 2 @@ -235,14 +229,14 @@ Music_Dungeon3_branch_7eaea:: note C_, 2 sound_ret -Music_Dungeon3_branch_7eaf7:: +.sub6: note D#, 2 note G_, 2 note D#, 2 note C#, 6 sound_ret -Music_Dungeon3_branch_7eafc:: +.sub7: tempo 168 octave 1 note A#, 1 @@ -334,12 +328,10 @@ Music_Dungeon3_branch_7eafc:: tempo 160 sound_ret - Music_Dungeon3_Ch2:: vibrato 11, 1, 5 duty_cycle 3 - -Music_Dungeon3_branch_7eb6d:: +.mainloop: note_type 12, 13, 3 octave 4 note D#, 6 @@ -604,10 +596,10 @@ Music_Dungeon3_branch_7eb6d:: note B_, 2 octave 3 note D#, 2 - sound_loop 0, Music_Dungeon3_branch_7eb6d - + sound_loop 0, .mainloop Music_Dungeon3_Ch3:: +.mainloop: note_type 12, 1, 2 rest 16 rest 16 @@ -707,8 +699,7 @@ Music_Dungeon3_Ch3:: rest 16 rest 16 rest 10 - sound_loop 0, Music_Dungeon3_Ch3 - + sound_loop 0, .mainloop Music_Dungeon3_Ch4:: drum_speed 12 diff --git a/audio/music/finalbattle.asm b/audio/music/finalbattle.asm index 6dec6bbb7..032c129e1 100644 --- a/audio/music/finalbattle.asm +++ b/audio/music/finalbattle.asm @@ -103,8 +103,7 @@ Music_FinalBattle_Ch1:: note G#, 3 note_type 12, 11, 7 note D#, 4 - -Music_FinalBattle_branch_23429:: +.mainloop: note_type 12, 11, 7 octave 3 note E_, 4 @@ -331,8 +330,8 @@ Music_FinalBattle_branch_23429:: octave 4 note C#, 12 note_type 12, 4, 0 - sound_call Music_FinalBattle_branch_23710 - sound_call Music_FinalBattle_branch_23710 + sound_call Music_FinalBattle_Ch2.sub2 + sound_call Music_FinalBattle_Ch2.sub2 note_type 12, 11, 7 octave 3 note E_, 4 @@ -378,8 +377,7 @@ Music_FinalBattle_branch_23429:: note E_, 8 note_type 12, 11, 7 note E_, 8 - sound_loop 0, Music_FinalBattle_branch_23429 - + sound_loop 0, .mainloop Music_FinalBattle_Ch2:: duty_cycle 3 @@ -464,13 +462,13 @@ Music_FinalBattle_Ch2:: note E_, 3 note_type 12, 12, 2 note D#, 4 - sound_call Music_FinalBattle_branch_23704 - sound_call Music_FinalBattle_branch_23704 - sound_call Music_FinalBattle_branch_23704 - sound_call Music_FinalBattle_branch_23704 - sound_call Music_FinalBattle_branch_23704 - sound_call Music_FinalBattle_branch_23704 - sound_call Music_FinalBattle_branch_23704 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 note_type 12, 12, 1 octave 4 note E_, 1 @@ -478,8 +476,7 @@ Music_FinalBattle_Ch2:: note_type 12, 4, -2 octave 3 note G#, 4 - -Music_FinalBattle_branch_235e6:: +.mainloop: note_type 12, 13, 7 octave 4 note E_, 8 @@ -671,9 +668,9 @@ Music_FinalBattle_branch_235e6:: note_type 12, 12, 7 note A_, 8 note_type 12, 12, 5 - sound_call Music_FinalBattle_branch_23710 + sound_call .sub2 note_type 12, 11, 1 - sound_call Music_FinalBattle_branch_23710 + sound_call .sub2 note_type 12, 13, 7 octave 4 note E_, 8 @@ -707,9 +704,9 @@ Music_FinalBattle_branch_235e6:: note E_, 8 note A#, 4 note B_, 12 - sound_loop 0, Music_FinalBattle_branch_235e6 + sound_loop 0, .mainloop -Music_FinalBattle_branch_23704:: +.sub1: octave 4 note E_, 1 note E_, 1 @@ -723,7 +720,7 @@ Music_FinalBattle_branch_23704:: note F_, 1 sound_ret -Music_FinalBattle_branch_23710:: +.sub2: octave 4 note D_, 2 note C#, 2 @@ -737,7 +734,6 @@ Music_FinalBattle_branch_23710:: note D_, 2 sound_ret - Music_FinalBattle_Ch3:: note_type 12, 1, 1 octave 4 @@ -835,8 +831,7 @@ Music_FinalBattle_Ch3:: note D#, 1 note E_, 1 note G_, 1 - -Music_FinalBattle_branch_2377d:: +.mainloop: octave 4 note E_, 1 octave 3 @@ -1081,8 +1076,8 @@ Music_FinalBattle_branch_2377d:: note C#, 2 note E_, 2 note C#, 2 - sound_call Music_FinalBattle_branch_2395b - sound_call Music_FinalBattle_branch_2395b + sound_call .sub1 + sound_call .sub1 octave 4 note G_, 2 octave 5 @@ -1116,8 +1111,8 @@ Music_FinalBattle_branch_2377d:: note F#, 1 note G_, 1 note G#, 1 - sound_call Music_FinalBattle_branch_2396c - sound_call Music_FinalBattle_branch_2396c + sound_call .sub2 + sound_call .sub2 octave 4 note A#, 2 octave 5 @@ -1303,9 +1298,9 @@ Music_FinalBattle_branch_2377d:: note E_, 2 note A_, 2 note B_, 4 - sound_loop 0, Music_FinalBattle_branch_2377d + sound_loop 0, .mainloop -Music_FinalBattle_branch_2395b:: +.sub1: octave 4 note F#, 2 octave 5 @@ -1324,7 +1319,7 @@ Music_FinalBattle_branch_2395b:: note C#, 2 sound_ret -Music_FinalBattle_branch_2396c:: +.sub2: octave 4 note A_, 2 octave 5 diff --git a/audio/music/gamecorner.asm b/audio/music/gamecorner.asm index f152d180a..c0f8fc837 100644 --- a/audio/music/gamecorner.asm +++ b/audio/music/gamecorner.asm @@ -14,8 +14,7 @@ Music_GameCorner_Ch1:: note D#, 2 note C#, 2 note D#, 16 - -Music_GameCorner_branch_7e222:: +.mainloop: note_type 12, 11, 5 octave 3 note C#, 4 @@ -180,8 +179,7 @@ Music_GameCorner_branch_7e222:: note G#, 1 note G_, 1 note G#, 8 - sound_loop 0, Music_GameCorner_branch_7e222 - + sound_loop 0, .mainloop Music_GameCorner_Ch2:: duty_cycle 2 @@ -205,8 +203,7 @@ Music_GameCorner_Ch2:: note B_, 1 note A#, 1 note B_, 8 - -Music_GameCorner_branch_7e2fa:: +.mainloop: duty_cycle 2 note_type 12, 12, 7 octave 3 @@ -340,8 +337,7 @@ Music_GameCorner_branch_7e2fa:: note A_, 4 note F#, 4 note B_, 16 - sound_loop 0, Music_GameCorner_branch_7e2fa - + sound_loop 0, .mainloop Music_GameCorner_Ch3:: note_type 12, 1, 3 @@ -369,15 +365,14 @@ Music_GameCorner_Ch3:: rest 1 note D#, 1 rest 1 - -Music_GameCorner_branch_7e3a5:: - sound_call Music_GameCorner_branch_7e418 - sound_call Music_GameCorner_branch_7e42d - sound_call Music_GameCorner_branch_7e442 - sound_call Music_GameCorner_branch_7e457 - sound_call Music_GameCorner_branch_7e46c - sound_call Music_GameCorner_branch_7e481 - sound_call Music_GameCorner_branch_7e496 +.mainloop: + sound_call .sub1 + sound_call .sub2 + sound_call .sub3 + sound_call .sub4 + sound_call .sub5 + sound_call .sub6 + sound_call .sub7 note D#, 1 rest 1 note A_, 1 @@ -396,13 +391,13 @@ Music_GameCorner_branch_7e3a5:: rest 1 note F#, 1 rest 1 - sound_call Music_GameCorner_branch_7e418 - sound_call Music_GameCorner_branch_7e42d - sound_call Music_GameCorner_branch_7e442 - sound_call Music_GameCorner_branch_7e457 - sound_call Music_GameCorner_branch_7e46c - sound_call Music_GameCorner_branch_7e481 - sound_call Music_GameCorner_branch_7e496 + sound_call .sub1 + sound_call .sub2 + sound_call .sub3 + sound_call .sub4 + sound_call .sub5 + sound_call .sub6 + sound_call .sub7 note E_, 1 rest 3 octave 3 @@ -415,9 +410,9 @@ Music_GameCorner_branch_7e3a5:: rest 3 note B_, 1 rest 1 - sound_call Music_GameCorner_branch_7e46c - sound_call Music_GameCorner_branch_7e418 - sound_call Music_GameCorner_branch_7e4ab + sound_call .sub5 + sound_call .sub1 + sound_call .sub8 note E_, 1 rest 1 note G#, 1 @@ -436,13 +431,13 @@ Music_GameCorner_branch_7e3a5:: rest 1 note E_, 1 rest 1 - sound_call Music_GameCorner_branch_7e46c - sound_call Music_GameCorner_branch_7e418 - sound_call Music_GameCorner_branch_7e4ab - sound_call Music_GameCorner_branch_7e42d - sound_loop 0, Music_GameCorner_branch_7e3a5 + sound_call .sub5 + sound_call .sub1 + sound_call .sub8 + sound_call .sub2 + sound_loop 0, .mainloop -Music_GameCorner_branch_7e418:: +.sub1: note E_, 1 rest 1 note G#, 1 @@ -465,7 +460,7 @@ Music_GameCorner_branch_7e418:: rest 1 sound_ret -Music_GameCorner_branch_7e42d:: +.sub2: note E_, 1 rest 1 note G#, 1 @@ -488,7 +483,7 @@ Music_GameCorner_branch_7e42d:: rest 1 sound_ret -Music_GameCorner_branch_7e442:: +.sub3: note E_, 1 rest 1 note B_, 1 @@ -511,7 +506,7 @@ Music_GameCorner_branch_7e442:: rest 1 sound_ret -Music_GameCorner_branch_7e457:: +.sub4: note D#, 1 rest 1 note A_, 1 @@ -534,7 +529,7 @@ Music_GameCorner_branch_7e457:: rest 1 sound_ret -Music_GameCorner_branch_7e46c:: +.sub5: note D#, 1 rest 1 note F#, 1 @@ -557,7 +552,7 @@ Music_GameCorner_branch_7e46c:: rest 1 sound_ret -Music_GameCorner_branch_7e481:: +.sub6: note D#, 1 rest 1 note F#, 1 @@ -580,7 +575,7 @@ Music_GameCorner_branch_7e481:: rest 1 sound_ret -Music_GameCorner_branch_7e496:: +.sub7: note F#, 1 rest 1 note B_, 1 @@ -603,7 +598,7 @@ Music_GameCorner_branch_7e496:: rest 1 sound_ret -Music_GameCorner_branch_7e4ab:: +.sub8: note F#, 1 rest 1 note A_, 1 diff --git a/audio/music/gym.asm b/audio/music/gym.asm index 1ffc49305..da6a5babe 100644 --- a/audio/music/gym.asm +++ b/audio/music/gym.asm @@ -21,8 +21,7 @@ Music_Gym_Ch1:: note E_, 1 note F_, 4 note G_, 4 - -Music_Gym_branch_bcd8:: +.mainloop: note E_, 4 note F_, 2 note G_, 2 @@ -162,8 +161,7 @@ Music_Gym_branch_bcd8:: note A_, 2 note G_, 2 note A_, 2 - sound_loop 0, Music_Gym_branch_bcd8 - + sound_loop 0, .mainloop Music_Gym_Ch2:: duty_cycle 3 @@ -183,8 +181,7 @@ Music_Gym_Ch2:: note A_, 12 note_type 12, 12, 7 note B_, 4 - -Music_Gym_branch_bd82:: +.mainloop: octave 4 note C_, 12 octave 3 @@ -285,8 +282,7 @@ Music_Gym_branch_bd82:: note C_, 1 note D_, 1 note E_, 12 - sound_loop 0, Music_Gym_branch_bd82 - + sound_loop 0, .mainloop Music_Gym_Ch3:: note_type 12, 1, 1 @@ -296,23 +292,22 @@ Music_Gym_Ch3:: note G_, 2 note F_, 2 note D_, 2 - -Music_Gym_branch_be02:: - sound_call Music_Gym_branch_be3b - sound_call Music_Gym_branch_be44 - sound_call Music_Gym_branch_be3b - sound_call Music_Gym_branch_be44 - sound_call Music_Gym_branch_be3b - sound_call Music_Gym_branch_be44 - sound_call Music_Gym_branch_be3b - sound_call Music_Gym_branch_be44 - sound_call Music_Gym_branch_be3b - sound_call Music_Gym_branch_be4d - sound_call Music_Gym_branch_be3b - sound_call Music_Gym_branch_be4d - sound_call Music_Gym_branch_be3b - sound_call Music_Gym_branch_be4d - sound_call Music_Gym_branch_be3b +.mainloop: + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub3 + sound_call .sub1 + sound_call .sub3 + sound_call .sub1 + sound_call .sub3 + sound_call .sub1 note F_, 2 note A#, 2 note F_, 2 @@ -321,9 +316,9 @@ Music_Gym_branch_be02:: note A#, 2 note A_, 2 note F_, 2 - sound_loop 0, Music_Gym_branch_be02 + sound_loop 0, .mainloop -Music_Gym_branch_be3b:: +.sub1: note E_, 2 note G_, 2 note E_, 2 @@ -334,7 +329,7 @@ Music_Gym_branch_be3b:: note G_, 2 sound_ret -Music_Gym_branch_be44:: +.sub2: note D_, 2 note F_, 2 note D_, 2 @@ -345,7 +340,7 @@ Music_Gym_branch_be44:: note F_, 2 sound_ret -Music_Gym_branch_be4d:: +.sub3: note F_, 2 note A#, 2 note F_, 2 diff --git a/audio/music/gymleaderbattle.asm b/audio/music/gymleaderbattle.asm index 5befd6658..1d7dae9ab 100644 --- a/audio/music/gymleaderbattle.asm +++ b/audio/music/gymleaderbattle.asm @@ -56,8 +56,7 @@ Music_GymLeaderBattle_Ch1:: note F#, 1 rest 9 note A_, 6 - -Music_GymLeaderBattle_branch_223b0:: +.mainloop: note F#, 1 octave 3 note C#, 1 @@ -544,8 +543,7 @@ Music_GymLeaderBattle_branch_223b0:: note A_, 2 note G#, 4 note E_, 6 - sound_loop 0, Music_GymLeaderBattle_branch_223b0 - + sound_loop 0, .mainloop Music_GymLeaderBattle_Ch2:: duty_cycle 3 @@ -607,8 +605,7 @@ Music_GymLeaderBattle_Ch2:: rest 9 octave 4 note C#, 6 - -Music_GymLeaderBattle_branch_225e0:: +.mainloop: note_type 12, 12, 5 note D#, 4 note C#, 4 @@ -845,8 +842,7 @@ Music_GymLeaderBattle_branch_225e0:: note_type 12, 12, 3 octave 4 note A_, 6 - sound_loop 0, Music_GymLeaderBattle_branch_225e0 - + sound_loop 0, .mainloop Music_GymLeaderBattle_Ch3:: vibrato 0, 2, 0 @@ -1039,8 +1035,7 @@ Music_GymLeaderBattle_Ch3:: octave 4 note C#, 6 note_type 12, 1, 4 - -Music_GymLeaderBattle_branch_227b1:: +.mainloop: octave 3 note B_, 2 octave 4 @@ -1397,4 +1392,4 @@ Music_GymLeaderBattle_branch_227b1:: note B_, 2 octave 4 note G_, 6 - sound_loop 0, Music_GymLeaderBattle_branch_227b1 + sound_loop 0, .mainloop diff --git a/audio/music/halloffame.asm b/audio/music/halloffame.asm index 80dafaa6c..f568b2e2b 100644 --- a/audio/music/halloffame.asm +++ b/audio/music/halloffame.asm @@ -14,8 +14,8 @@ Music_HallOfFame_Ch1:: note E_, 1 note F_, 1 note F#, 1 - -Music_HallOfFame_branch_7fbc5:: +.mainloop: +.loop1: note_type 12, 8, 0 octave 4 note C_, 16 @@ -23,19 +23,17 @@ Music_HallOfFame_branch_7fbc5:: note F#, 16 note_type 12, 6, 0 note F_, 16 - sound_loop 3, Music_HallOfFame_branch_7fbc5 + sound_loop 3, .loop1 rest 16 rest 16 rest 16 rest 16 - sound_loop 0, Music_HallOfFame_branch_7fbc5 - + sound_loop 0, .mainloop Music_HallOfFame_Ch2:: vibrato 8, 2, 5 duty_cycle 3 - -Music_HallOfFame_branch_7fbdf:: +.mainloop: note_type 12, 12, 4 octave 3 note G_, 2 @@ -60,13 +58,12 @@ Music_HallOfFame_branch_7fbdf:: note A#, 4 note A_, 4 note F_, 2 - sound_loop 0, Music_HallOfFame_branch_7fbdf - + sound_loop 0, .mainloop Music_HallOfFame_Ch3:: +.mainloop: note_type 12, 1, 2 - -Music_HallOfFame_branch_7fbfe:: +.loop1: octave 4 note D_, 2 note G_, 2 @@ -76,7 +73,7 @@ Music_HallOfFame_branch_7fbfe:: note G_, 2 note D_, 2 note G_, 2 - sound_loop 12, Music_HallOfFame_branch_7fbfe + sound_loop 12, .loop1 note D_, 4 note G_, 4 note D_, 4 @@ -93,4 +90,4 @@ Music_HallOfFame_branch_7fbfe:: note G_, 4 note E_, 4 note G_, 4 - sound_loop 0, Music_HallOfFame_Ch3 + sound_loop 0, .mainloop diff --git a/audio/music/indigoplateau.asm b/audio/music/indigoplateau.asm index cc3c2cef1..c93fd8599 100644 --- a/audio/music/indigoplateau.asm +++ b/audio/music/indigoplateau.asm @@ -12,25 +12,24 @@ Music_IndigoPlateau_Ch1:: note A_, 4 note_type 12, 10, 4 note A#, 4 - -Music_IndigoPlateau_branch_a605:: - sound_call Music_IndigoPlateau_branch_a659 +.mainloop: + sound_call .sub1 note_type 12, 11, 4 octave 3 note D_, 4 - sound_call Music_IndigoPlateau_branch_a659 + sound_call .sub1 note_type 12, 11, 4 octave 3 note D#, 4 - sound_call Music_IndigoPlateau_branch_a659 + sound_call .sub1 note_type 12, 11, 4 octave 3 note D_, 4 - sound_call Music_IndigoPlateau_branch_a659 + sound_call .sub1 note_type 12, 10, 0 octave 2 note A#, 4 - sound_call Music_IndigoPlateau_branch_a659 + sound_call .sub1 note_type 12, 11, 4 octave 3 note D_, 4 @@ -71,9 +70,9 @@ Music_IndigoPlateau_branch_a605:: note_type 12, 4, -6 octave 2 note A#, 8 - sound_loop 0, Music_IndigoPlateau_branch_a605 + sound_loop 0, .mainloop -Music_IndigoPlateau_branch_a659:: +.sub1: note_type 12, 11, 2 octave 2 note A_, 4 @@ -85,7 +84,6 @@ Music_IndigoPlateau_branch_a659:: note A_, 4 sound_ret - Music_IndigoPlateau_Ch2:: duty_cycle 3 vibrato 8, 2, 5 @@ -97,27 +95,26 @@ Music_IndigoPlateau_Ch2:: note D_, 4 note_type 12, 5, -2 note D#, 4 - -Music_IndigoPlateau_branch_a673:: - sound_call Music_IndigoPlateau_branch_a6af +.mainloop: + sound_call .sub1 note_type 12, 12, 5 note A_, 4 - sound_call Music_IndigoPlateau_branch_a6af + sound_call .sub1 note_type 12, 12, 5 note A#, 4 - sound_call Music_IndigoPlateau_branch_a6af + sound_call .sub1 note_type 12, 12, 5 note A_, 4 - sound_call Music_IndigoPlateau_branch_a6af + sound_call .sub1 note_type 12, 12, 7 note C#, 4 - sound_call Music_IndigoPlateau_branch_a6af + sound_call .sub1 note_type 12, 12, 5 note A_, 4 - sound_call Music_IndigoPlateau_branch_a6af + sound_call .sub1 note_type 12, 12, 5 note A#, 4 - sound_call Music_IndigoPlateau_branch_a6af + sound_call .sub1 note_type 12, 12, 5 octave 4 note C_, 2 @@ -132,9 +129,9 @@ Music_IndigoPlateau_branch_a673:: note_type 12, 4, -5 octave 4 note D#, 8 - sound_loop 0, Music_IndigoPlateau_branch_a673 + sound_loop 0, .mainloop -Music_IndigoPlateau_branch_a6af:: +.sub1: note_type 12, 12, 2 octave 3 note D_, 4 @@ -146,7 +143,6 @@ Music_IndigoPlateau_branch_a6af:: note D_, 4 sound_ret - Music_IndigoPlateau_Ch3:: note_type 12, 1, 0 octave 4 @@ -159,11 +155,10 @@ Music_IndigoPlateau_Ch3:: note D_, 2 rest 2 note D#, 4 - -Music_IndigoPlateau_branch_a6c6:: - sound_call Music_IndigoPlateau_branch_a6fe - sound_call Music_IndigoPlateau_branch_a6fe - sound_call Music_IndigoPlateau_branch_a6fe +.mainloop: + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 note D_, 2 rest 2 note D_, 2 @@ -179,8 +174,8 @@ Music_IndigoPlateau_branch_a6c6:: note D_, 2 rest 2 note F#, 4 - sound_call Music_IndigoPlateau_branch_a6fe - sound_call Music_IndigoPlateau_branch_a6fe + sound_call .sub1 + sound_call .sub1 note D_, 2 rest 2 note D_, 2 @@ -203,9 +198,9 @@ Music_IndigoPlateau_branch_a6c6:: note D_, 8 note A#, 8 note D#, 8 - sound_loop 0, Music_IndigoPlateau_branch_a6c6 + sound_loop 0, .mainloop -Music_IndigoPlateau_branch_a6fe:: +.sub1: octave 4 note D_, 2 rest 2 @@ -224,7 +219,6 @@ Music_IndigoPlateau_branch_a6fe:: note A_, 4 sound_ret - Music_IndigoPlateau_Ch4:: drum_speed 6 drum_note 17, 16 @@ -239,22 +233,21 @@ Music_IndigoPlateau_Ch4:: drum_note 18, 1 drum_note 18, 1 drum_note 18, 1 - -Music_IndigoPlateau_branch_a728:: - sound_call Music_IndigoPlateau_branch_a791 - sound_call Music_IndigoPlateau_branch_a77e - sound_call Music_IndigoPlateau_branch_a791 - sound_call Music_IndigoPlateau_branch_a7a8 - sound_call Music_IndigoPlateau_branch_a791 - sound_call Music_IndigoPlateau_branch_a77e - sound_call Music_IndigoPlateau_branch_a791 - sound_call Music_IndigoPlateau_branch_a7a8 - sound_call Music_IndigoPlateau_branch_a791 - sound_call Music_IndigoPlateau_branch_a77e - sound_call Music_IndigoPlateau_branch_a791 - sound_call Music_IndigoPlateau_branch_a7a8 - sound_call Music_IndigoPlateau_branch_a77e - sound_call Music_IndigoPlateau_branch_a7a8 +.mainloop: + sound_call .sub2 + sound_call .sub1 + sound_call .sub2 + sound_call .sub3 + sound_call .sub2 + sound_call .sub1 + sound_call .sub2 + sound_call .sub3 + sound_call .sub2 + sound_call .sub1 + sound_call .sub2 + sound_call .sub3 + sound_call .sub1 + sound_call .sub3 drum_note 17, 16 drum_note 17, 8 drum_note 18, 8 @@ -275,9 +268,9 @@ Music_IndigoPlateau_branch_a728:: drum_note 17, 1 drum_note 17, 1 drum_note 17, 1 - sound_loop 0, Music_IndigoPlateau_branch_a728 + sound_loop 0, .mainloop -Music_IndigoPlateau_branch_a77e:: +.sub1: drum_note 17, 4 drum_note 18, 4 drum_note 19, 4 @@ -289,7 +282,7 @@ Music_IndigoPlateau_branch_a77e:: drum_note 18, 2 sound_ret -Music_IndigoPlateau_branch_a791:: +.sub2: drum_note 17, 4 drum_note 18, 4 drum_note 19, 4 @@ -303,7 +296,7 @@ Music_IndigoPlateau_branch_a791:: drum_note 18, 1 sound_ret -Music_IndigoPlateau_branch_a7a8:: +.sub3: drum_note 17, 4 drum_note 18, 4 drum_note 17, 4 diff --git a/audio/music/introbattle.asm b/audio/music/introbattle.asm index 681631f64..0bd844eb5 100644 --- a/audio/music/introbattle.asm +++ b/audio/music/introbattle.asm @@ -89,7 +89,6 @@ Music_IntroBattle_Ch1:: note D_, 16 sound_ret - Music_IntroBattle_Ch2:: duty_cycle 3 vibrato 8, 2, 5 @@ -164,7 +163,6 @@ Music_IntroBattle_Ch2:: note D_, 16 sound_ret - Music_IntroBattle_Ch3:: note_type 12, 1, 0 rest 8 @@ -228,7 +226,6 @@ Music_IntroBattle_Ch3:: rest 15 sound_ret - Music_IntroBattle_Ch4:: drum_speed 6 drum_note 19, 1 diff --git a/audio/music/jigglypuffsong.asm b/audio/music/jigglypuffsong.asm index d8995fbd9..bd6a97718 100644 --- a/audio/music/jigglypuffsong.asm +++ b/audio/music/jigglypuffsong.asm @@ -20,7 +20,6 @@ Music_JigglypuffSong_Ch1:: note E_, 10 sound_ret - Music_JigglypuffSong_Ch2:: vibrato 5, 1, 5 duty_cycle 2 diff --git a/audio/music/lavender.asm b/audio/music/lavender.asm index 70fff2e5f..5822ff3e0 100644 --- a/audio/music/lavender.asm +++ b/audio/music/lavender.asm @@ -10,8 +10,7 @@ Music_Lavender_Ch1:: rest 16 rest 16 note_type 12, 10, 7 - -Music_Lavender_branch_bb6b:: +.mainloop: octave 3 note G_, 8 note G_, 8 @@ -59,22 +58,19 @@ Music_Lavender_branch_bb6b:: rest 16 rest 16 rest 16 - sound_loop 0, Music_Lavender_branch_bb6b - + sound_loop 0, .mainloop Music_Lavender_Ch2:: vibrato 0, 3, 4 duty_cycle 3 note_type 12, 9, 1 - -Music_Lavender_branch_bba5:: +.mainloop: octave 5 note C_, 4 note G_, 4 note B_, 4 note F#, 4 - sound_loop 0, Music_Lavender_branch_bba5 - + sound_loop 0, .mainloop Music_Lavender_Ch3:: vibrato 4, 1, 1 @@ -84,8 +80,7 @@ Music_Lavender_Ch3:: rest 16 rest 16 note_type 12, 2, 5 - -Music_Lavender_branch_bbb9:: +.mainloop: octave 4 note E_, 16 note D_, 16 @@ -183,8 +178,7 @@ Music_Lavender_branch_bbb9:: note G_, 4 note F#, 4 note B_, 4 - sound_loop 0, Music_Lavender_branch_bbb9 - + sound_loop 0, .mainloop Music_Lavender_Ch4:: drum_speed 12 @@ -192,8 +186,7 @@ Music_Lavender_Ch4:: rest 16 rest 16 rest 16 - -Music_Lavender_branch_bc26:: +.mainloop: drum_note 7, 8 drum_note 7, 8 - sound_loop 0, Music_Lavender_branch_bc26 + sound_loop 0, .mainloop diff --git a/audio/music/meeteviltrainer.asm b/audio/music/meeteviltrainer.asm index eb7b59442..3e4657203 100644 --- a/audio/music/meeteviltrainer.asm +++ b/audio/music/meeteviltrainer.asm @@ -10,16 +10,14 @@ Music_MeetEvilTrainer_Ch1:: note C#, 2 note_type 12, 4, -7 note D_, 4 - -Music_MeetEvilTrainer_branch_7f6ae:: +.mainloop: note_type 12, 10, 1 note D_, 4 note D_, 4 note D_, 4 note_type 12, 7, 0 note D_, 4 - sound_loop 0, Music_MeetEvilTrainer_branch_7f6ae - + sound_loop 0, .mainloop Music_MeetEvilTrainer_Ch2:: duty_cycle 1 @@ -28,8 +26,7 @@ Music_MeetEvilTrainer_Ch2:: note B_, 2 note A#, 2 note B_, 8 - -Music_MeetEvilTrainer_branch_7f6c2:: +.mainloop: note_type 12, 12, 2 octave 4 note D#, 2 @@ -57,8 +54,7 @@ Music_MeetEvilTrainer_branch_7f6c2:: note_type 12, 3, -7 note A#, 4 note_type 12, 12, 2 - sound_loop 0, Music_MeetEvilTrainer_branch_7f6c2 - + sound_loop 0, .mainloop Music_MeetEvilTrainer_Ch3:: note_type 12, 1, 0 @@ -68,8 +64,7 @@ Music_MeetEvilTrainer_Ch3:: rest 1 note F_, 1 rest 1 - -Music_MeetEvilTrainer_branch_7f6ee:: +.mainloop: note F#, 1 rest 3 note F#, 1 @@ -77,4 +72,4 @@ Music_MeetEvilTrainer_branch_7f6ee:: note F#, 1 rest 3 note A#, 4 - sound_loop 0, Music_MeetEvilTrainer_branch_7f6ee + sound_loop 0, .mainloop diff --git a/audio/music/meetfemaletrainer.asm b/audio/music/meetfemaletrainer.asm index c76483e50..876c34414 100644 --- a/audio/music/meetfemaletrainer.asm +++ b/audio/music/meetfemaletrainer.asm @@ -12,19 +12,18 @@ Music_MeetFemaleTrainer_Ch1:: note C#, 2 note C_, 2 note_type 12, 8, 1 - -Music_MeetFemaleTrainer_branch_7f70c:: +.mainloop: +.loop1: octave 3 note E_, 4 - sound_loop 12, Music_MeetFemaleTrainer_branch_7f70c + sound_loop 12, .loop1 note E_, 4 octave 2 note B_, 4 note B_, 4 octave 3 note E_, 4 - sound_loop 0, Music_MeetFemaleTrainer_branch_7f70c - + sound_loop 0, .mainloop Music_MeetFemaleTrainer_Ch2:: duty_cycle 2 @@ -34,8 +33,7 @@ Music_MeetFemaleTrainer_Ch2:: note_type 12, 12, 7 octave 4 note B_, 12 - -Music_MeetFemaleTrainer_branch_7f726:: +.mainloop: note_type 12, 12, 2 octave 3 note B_, 4 @@ -68,8 +66,7 @@ Music_MeetFemaleTrainer_branch_7f726:: note F#, 2 note G#, 2 note A_, 2 - sound_loop 0, Music_MeetFemaleTrainer_branch_7f726 - + sound_loop 0, .mainloop Music_MeetFemaleTrainer_Ch3:: note_type 12, 1, 0 @@ -82,9 +79,8 @@ Music_MeetFemaleTrainer_Ch3:: rest 1 note A_, 1 rest 1 - -Music_MeetFemaleTrainer_branch_7f756:: - sound_call Music_MeetFemaleTrainer_branch_7f770 +.mainloop: + sound_call .sub1 note G#, 1 rest 3 note E_, 1 @@ -93,7 +89,7 @@ Music_MeetFemaleTrainer_branch_7f756:: rest 3 note E_, 1 rest 3 - sound_call Music_MeetFemaleTrainer_branch_7f770 + sound_call .sub1 note G#, 1 rest 3 note E_, 1 @@ -102,9 +98,9 @@ Music_MeetFemaleTrainer_branch_7f756:: rest 3 note B_, 1 rest 3 - sound_loop 0, Music_MeetFemaleTrainer_branch_7f756 + sound_loop 0, .mainloop -Music_MeetFemaleTrainer_branch_7f770:: +.sub1: note G#, 1 rest 3 note E_, 1 diff --git a/audio/music/meetmaletrainer.asm b/audio/music/meetmaletrainer.asm index a2786052a..79775d6d3 100644 --- a/audio/music/meetmaletrainer.asm +++ b/audio/music/meetmaletrainer.asm @@ -12,8 +12,7 @@ Music_MeetMaleTrainer_Ch1:: note E_, 1 note F_, 12 rest 16 - -Music_MeetMaleTrainer_branch_7f78f:: +.mainloop: octave 3 note B_, 4 note A_, 4 @@ -29,8 +28,7 @@ Music_MeetMaleTrainer_branch_7f78f:: octave 4 note D_, 8 note E_, 16 - sound_loop 0, Music_MeetMaleTrainer_branch_7f78f - + sound_loop 0, .mainloop Music_MeetMaleTrainer_Ch2:: duty_cycle 3 @@ -48,8 +46,7 @@ Music_MeetMaleTrainer_Ch2:: rest 3 note E_, 1 rest 9 - -Music_MeetMaleTrainer_branch_7f7b5:: +.mainloop: note_type 12, 12, 4 octave 4 note E_, 6 @@ -72,8 +69,7 @@ Music_MeetMaleTrainer_branch_7f7b5:: note F#, 8 octave 4 note C#, 8 - sound_loop 0, Music_MeetMaleTrainer_branch_7f7b5 - + sound_loop 0, .mainloop Music_MeetMaleTrainer_Ch3:: note_type 12, 1, 0 @@ -99,8 +95,7 @@ Music_MeetMaleTrainer_Ch3:: rest 1 note F#, 1 rest 1 - -Music_MeetMaleTrainer_branch_7f7ea:: +.mainloop: note E_, 1 rest 1 note B_, 1 @@ -187,4 +182,4 @@ Music_MeetMaleTrainer_branch_7f7ea:: rest 1 note D#, 1 rest 1 - sound_loop 0, Music_MeetMaleTrainer_branch_7f7ea + sound_loop 0, .mainloop diff --git a/audio/music/meetprofoak.asm b/audio/music/meetprofoak.asm index 24c6741a7..f8cf47159 100644 --- a/audio/music/meetprofoak.asm +++ b/audio/music/meetprofoak.asm @@ -37,8 +37,7 @@ Music_MeetProfOak_Ch1:: note D#, 4 note F#, 2 note F#, 4 - -Music_MeetProfOak_branch_af85:: +.mainloop: note F#, 6 note E_, 4 note A_, 2 @@ -71,8 +70,7 @@ Music_MeetProfOak_branch_af85:: note E_, 4 note G#, 2 note G#, 4 - sound_loop 0, Music_MeetProfOak_branch_af85 - + sound_loop 0, .mainloop Music_MeetProfOak_Ch2:: vibrato 8, 1, 1 @@ -154,8 +152,7 @@ Music_MeetProfOak_Ch2:: note B_, 2 note B_, 4 note_type 12, 11, 5 - -Music_MeetProfOak_branch_b005:: +.mainloop: octave 4 note C#, 6 octave 3 @@ -205,8 +202,7 @@ Music_MeetProfOak_branch_b005:: note E_, 1 note_type 12, 11, 7 note G#, 16 - sound_loop 0, Music_MeetProfOak_branch_b005 - + sound_loop 0, .mainloop Music_MeetProfOak_Ch3:: note_type 12, 1, 2 @@ -335,8 +331,8 @@ Music_MeetProfOak_Ch3:: rest 1 note G#, 1 rest 1 - -Music_MeetProfOak_branch_b0bc:: +.mainloop: +.loop1: octave 4 note A_, 1 rest 1 @@ -361,9 +357,8 @@ Music_MeetProfOak_branch_b0bc:: octave 5 note C#, 1 rest 1 - sound_loop 2, Music_MeetProfOak_branch_b0bc - -Music_MeetProfOak_branch_b0d8:: + sound_loop 2, .loop1 +.loop2: octave 4 note G#, 1 rest 1 @@ -381,9 +376,8 @@ Music_MeetProfOak_branch_b0d8:: rest 1 note B_, 1 rest 1 - sound_loop 2, Music_MeetProfOak_branch_b0d8 - -Music_MeetProfOak_branch_b0ed:: + sound_loop 2, .loop2 +.loop3: note F#, 1 rest 1 note A_, 1 @@ -400,9 +394,8 @@ Music_MeetProfOak_branch_b0ed:: rest 1 note A_, 1 rest 1 - sound_loop 2, Music_MeetProfOak_branch_b0ed - -Music_MeetProfOak_branch_b101:: + sound_loop 2, .loop3 +.loop4: note G#, 1 rest 1 note B_, 1 @@ -419,5 +412,5 @@ Music_MeetProfOak_branch_b101:: rest 1 note B_, 1 rest 1 - sound_loop 2, Music_MeetProfOak_branch_b101 - sound_loop 0, Music_MeetProfOak_branch_b0bc + sound_loop 2, .loop4 + sound_loop 0, .mainloop diff --git a/audio/music/meetrival.asm b/audio/music/meetrival.asm index 958db7be8..32dfe1533 100644 --- a/audio/music/meetrival.asm +++ b/audio/music/meetrival.asm @@ -1,11 +1,10 @@ -Music_MeetRival_branch_b119:: +Music_MeetRival_Ch1_AlternateTempo:: tempo 100 - sound_loop 0, Music_MeetRival_branch_b123 + sound_loop 0, Music_MeetRival_Ch1.body Music_MeetRival_Ch1:: tempo 112 - -Music_MeetRival_branch_b123:: +.body: volume 7, 7 duty_cycle 3 vibrato 6, 3, 4 @@ -30,8 +29,7 @@ Music_MeetRival_branch_b123:: note A_, 2 note G_, 2 note A_, 2 - -Music_MeetRival_branch_b140:: +.mainloop: note B_, 4 note A#, 2 note A_, 4 @@ -117,16 +115,15 @@ Music_MeetRival_branch_b140:: note A_, 2 note G_, 2 note A_, 2 - sound_loop 0, Music_MeetRival_branch_b140 + sound_loop 0, .mainloop -Music_MeetRival_branch_b19b:: +Music_MeetRival_Ch1_AlternateStartAndTempo:: tempo 100 - sound_loop 0, Music_MeetRival_branch_b1a5 + sound_loop 0, Music_MeetRival_Ch1_AlternateStart.body -Music_MeetRival_branch_b1a2:: +Music_MeetRival_Ch1_AlternateStart:: tempo 112 - -Music_MeetRival_branch_b1a5:: +.body: volume 7, 7 duty_cycle 3 vibrato 6, 3, 4 @@ -140,8 +137,7 @@ Music_MeetRival_branch_b1a5:: note A_, 2 note G_, 2 note A_, 2 - sound_loop 0, Music_MeetRival_branch_b140 - + sound_loop 0, Music_MeetRival_Ch1.mainloop Music_MeetRival_Ch2:: duty_cycle 3 @@ -169,8 +165,7 @@ Music_MeetRival_Ch2:: note D_, 2 note F_, 2 note F#, 2 - -Music_MeetRival_branch_b1d8:: +.mainloop: note_type 12, 12, 7 note G_, 4 note D_, 2 @@ -228,9 +223,9 @@ Music_MeetRival_branch_b1d8:: note D_, 2 note F_, 2 note F#, 2 - sound_loop 0, Music_MeetRival_branch_b1d8 + sound_loop 0, .mainloop -Music_MeetRival_branch_b21d:: +Music_MeetRival_Ch2_AlternateStart:: duty_cycle 3 vibrato 10, 2, 6 note_type 12, 12, 7 @@ -245,8 +240,7 @@ Music_MeetRival_branch_b21d:: note D_, 2 note F_, 2 note F#, 2 - sound_loop 0, Music_MeetRival_branch_b1d8 - + sound_loop 0, Music_MeetRival_Ch2.mainloop Music_MeetRival_Ch3:: note_type 12, 1, 4 @@ -272,8 +266,7 @@ Music_MeetRival_Ch3:: rest 1 note G_, 1 rest 1 - -Music_MeetRival_branch_b24b:: +.mainloop: note G_, 2 octave 5 note D_, 2 @@ -376,9 +369,9 @@ Music_MeetRival_branch_b24b:: rest 2 octave 5 note D_, 2 - sound_loop 0, Music_MeetRival_branch_b24b + sound_loop 0, .mainloop -Music_MeetRival_branch_b2b5:: +Music_MeetRival_Ch3_AlternateStart:: note_type 12, 1, 4 octave 4 note G_, 1 @@ -393,4 +386,4 @@ Music_MeetRival_branch_b2b5:: rest 1 note G_, 1 rest 1 - sound_loop 0, Music_MeetRival_branch_b24b + sound_loop 0, Music_MeetRival_Ch3.mainloop diff --git a/audio/music/museumguy.asm b/audio/music/museumguy.asm index 60ebd553e..1577d4664 100644 --- a/audio/music/museumguy.asm +++ b/audio/music/museumguy.asm @@ -21,39 +21,37 @@ Music_MuseumGuy_Ch1:: note E_, 1 note G#, 1 note B_, 10 - sound_call Music_MuseumGuy_branch_ade7 - sound_call Music_MuseumGuy_branch_adec - sound_call Music_MuseumGuy_branch_ade7 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 note E_, 4 note E_, 4 note E_, 2 note E_, 6 - -Music_MuseumGuy_branch_add6:: - sound_call Music_MuseumGuy_branch_ade7 - sound_call Music_MuseumGuy_branch_adec - sound_call Music_MuseumGuy_branch_ade7 +.mainloop: + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 note E_, 4 note E_, 4 note E_, 2 note E_, 6 - sound_loop 0, Music_MuseumGuy_branch_add6 + sound_loop 0, .mainloop -Music_MuseumGuy_branch_ade7:: +.sub1: note E_, 2 note E_, 6 note F#, 2 note F#, 6 sound_ret -Music_MuseumGuy_branch_adec:: +.sub2: note E_, 2 note E_, 6 note D_, 2 note D_, 6 sound_ret - Music_MuseumGuy_Ch2:: duty_cycle 2 note_type 12, 12, 1 @@ -106,8 +104,7 @@ Music_MuseumGuy_Ch2:: note A_, 2 note A_, 2 note A_, 4 - -Music_MuseumGuy_branch_ae26:: +.mainloop: octave 3 note A_, 2 octave 4 @@ -162,8 +159,7 @@ Music_MuseumGuy_branch_ae26:: note A_, 2 note A_, 2 note A_, 4 - sound_loop 0, Music_MuseumGuy_branch_ae26 - + sound_loop 0, .mainloop Music_MuseumGuy_Ch3:: note_type 12, 1, 0 @@ -175,7 +171,7 @@ Music_MuseumGuy_Ch3:: rest 3 note E_, 1 rest 9 - sound_call Music_MuseumGuy_branch_aeb8 + sound_call .sub1 note A_, 1 rest 1 note A_, 1 @@ -184,7 +180,7 @@ Music_MuseumGuy_Ch3:: rest 1 note G#, 1 rest 5 - sound_call Music_MuseumGuy_branch_aeb8 + sound_call .sub1 note B_, 1 rest 3 note G#, 1 @@ -193,9 +189,8 @@ Music_MuseumGuy_Ch3:: rest 1 note A_, 1 rest 3 - -Music_MuseumGuy_branch_ae8e:: - sound_call Music_MuseumGuy_branch_aec1 +.mainloop: + sound_call .sub2 rest 3 octave 6 note E_, 1 @@ -211,7 +206,7 @@ Music_MuseumGuy_branch_ae8e:: rest 1 note G#, 1 rest 3 - sound_call Music_MuseumGuy_branch_aec1 + sound_call .sub2 rest 1 octave 6 note E_, 1 @@ -229,9 +224,9 @@ Music_MuseumGuy_branch_ae8e:: rest 1 note A_, 1 rest 3 - sound_loop 0, Music_MuseumGuy_branch_ae8e + sound_loop 0, .mainloop -Music_MuseumGuy_branch_aeb8:: +.sub1: note A_, 1 rest 1 note A_, 1 @@ -242,7 +237,7 @@ Music_MuseumGuy_branch_aeb8:: rest 5 sound_ret -Music_MuseumGuy_branch_aec1:: +.sub2: octave 6 note C#, 1 rest 1 @@ -260,7 +255,6 @@ Music_MuseumGuy_branch_aec1:: note A_, 1 sound_ret - Music_MuseumGuy_Ch4:: drum_speed 12 rest 16 @@ -274,8 +268,7 @@ Music_MuseumGuy_Ch4:: drum_note 19, 1 drum_note 18, 1 drum_note 18, 1 - -Music_MuseumGuy_branch_aee1:: +.mainloop: drum_note 17, 4 drum_note 17, 6 drum_note 17, 2 @@ -334,4 +327,4 @@ Music_MuseumGuy_branch_aee1:: drum_note 19, 1 drum_note 18, 1 drum_note 18, 1 - sound_loop 0, Music_MuseumGuy_branch_aee1 + sound_loop 0, .mainloop diff --git a/audio/music/oakslab.asm b/audio/music/oakslab.asm index 5af9f9a92..fc9974fdc 100644 --- a/audio/music/oakslab.asm +++ b/audio/music/oakslab.asm @@ -15,8 +15,7 @@ Music_OaksLab_Ch1:: note G#, 1 note A_, 1 note B_, 1 - -Music_OaksLab_branch_7eed0:: +.mainloop: octave 4 note C#, 4 octave 3 @@ -66,8 +65,7 @@ Music_OaksLab_branch_7eed0:: note E_, 4 note F#, 4 note G#, 4 - sound_loop 0, Music_OaksLab_branch_7eed0 - + sound_loop 0, .mainloop Music_OaksLab_Ch2:: duty_cycle 3 @@ -83,8 +81,7 @@ Music_OaksLab_Ch2:: note E_, 1 note F#, 1 note G#, 1 - -Music_OaksLab_branch_7ef16:: +.mainloop: note A_, 6 note G#, 1 note F#, 1 @@ -141,8 +138,7 @@ Music_OaksLab_branch_7ef16:: rest 1 note F#, 1 rest 1 - sound_loop 0, Music_OaksLab_branch_7ef16 - + sound_loop 0, .mainloop Music_OaksLab_Ch3:: note_type 12, 1, 1 @@ -154,8 +150,7 @@ Music_OaksLab_Ch3:: rest 1 note E_, 1 rest 1 - -Music_OaksLab_branch_7ef5c:: +.mainloop: note C#, 1 rest 1 note A_, 1 @@ -390,4 +385,4 @@ Music_OaksLab_branch_7ef5c:: rest 3 note E_, 1 rest 3 - sound_loop 0, Music_OaksLab_branch_7ef5c + sound_loop 0, .mainloop diff --git a/audio/music/pallettown.asm b/audio/music/pallettown.asm index 26e5710ff..9d1aff7aa 100644 --- a/audio/music/pallettown.asm +++ b/audio/music/pallettown.asm @@ -3,8 +3,7 @@ Music_PalletTown_Ch1:: volume 7, 7 duty_cycle 2 note_type 12, 12, 3 - -Music_PalletTown_branch_a7ce:: +.mainloop: octave 3 note B_, 4 octave 4 @@ -144,14 +143,13 @@ Music_PalletTown_branch_a7ce:: note D_, 2 note C_, 2 note D_, 2 - sound_loop 0, Music_PalletTown_branch_a7ce - sound_ret + sound_loop 0, .mainloop + sound_ret ; unused Music_PalletTown_Ch2:: duty_cycle 2 - -Music_PalletTown_branch_a861:: +.mainloop: note_type 12, 13, 3 octave 5 note D_, 2 @@ -258,15 +256,14 @@ Music_PalletTown_branch_a861:: note B_, 4 note B_, 8 note A_, 8 - sound_loop 0, Music_PalletTown_branch_a861 - sound_ret + sound_loop 0, .mainloop + sound_ret ; unused Music_PalletTown_Ch3:: vibrato 24, 2, 8 note_type 12, 1, 2 - -Music_PalletTown_branch_a8e3:: +.mainloop: octave 4 note G_, 6 note E_, 6 @@ -310,5 +307,6 @@ Music_PalletTown_branch_a8e3:: note E_, 8 note E_, 8 note F#, 8 - sound_loop 0, Music_PalletTown_branch_a8e3 - sound_ret + sound_loop 0, .mainloop + + sound_ret ; unused diff --git a/audio/music/pkmnhealed.asm b/audio/music/pkmnhealed.asm index 2fe9e4ce6..cb858110a 100644 --- a/audio/music/pkmnhealed.asm +++ b/audio/music/pkmnhealed.asm @@ -18,7 +18,6 @@ Music_PkmnHealed_Ch1:: note B_, 4 sound_ret - Music_PkmnHealed_Ch2:: duty_cycle 2 note_type 12, 12, 3 @@ -32,7 +31,6 @@ Music_PkmnHealed_Ch2:: note E_, 8 sound_ret - Music_PkmnHealed_Ch3:: note_type 12, 1, 0 octave 4 diff --git a/audio/music/pokecenter.asm b/audio/music/pokecenter.asm index a4a3f2bf2..cdfa1188c 100644 --- a/audio/music/pokecenter.asm +++ b/audio/music/pokecenter.asm @@ -4,8 +4,7 @@ Music_Pokecenter_Ch1:: duty_cycle 3 vibrato 10, 2, 2 toggle_perfect_pitch - -Music_Pokecenter_branch_be61:: +.mainloop: note_type 12, 10, 3 octave 3 note F#, 2 @@ -146,20 +145,18 @@ Music_Pokecenter_branch_be61:: note E_, 2 note F#, 2 note G_, 2 - sound_loop 0, Music_Pokecenter_branch_be61 - + sound_loop 0, .mainloop Music_Pokecenter_Ch2:: vibrato 8, 2, 5 - -Music_Pokecenter_branch_befc:: - sound_call Music_Pokecenter_branch_bf4e +.mainloop: + sound_call .sub1 duty_cycle 3 note_type 12, 10, 5 octave 3 note A_, 4 note E_, 4 - sound_call Music_Pokecenter_branch_bf60 + sound_call .sub2 note D_, 2 note F#, 6 duty_cycle 3 @@ -167,13 +164,13 @@ Music_Pokecenter_branch_befc:: octave 3 note A_, 4 note E_, 4 - sound_call Music_Pokecenter_branch_bf4e + sound_call .sub1 duty_cycle 3 note_type 12, 10, 5 octave 3 note A_, 4 note E_, 4 - sound_call Music_Pokecenter_branch_bf60 + sound_call .sub2 note D_, 8 duty_cycle 3 note_type 12, 10, 5 @@ -213,9 +210,9 @@ Music_Pokecenter_branch_befc:: note F#, 2 note E_, 2 note D_, 8 - sound_loop 0, Music_Pokecenter_branch_befc + sound_loop 0, .mainloop -Music_Pokecenter_branch_bf4e:: +.sub1: duty_cycle 2 note_type 12, 12, 2 octave 4 @@ -232,7 +229,7 @@ Music_Pokecenter_branch_bf4e:: note C#, 6 sound_ret -Music_Pokecenter_branch_bf60:: +.sub2: duty_cycle 2 note_type 12, 12, 2 octave 4 @@ -247,11 +244,9 @@ Music_Pokecenter_branch_bf60:: note C#, 2 sound_ret - Music_Pokecenter_Ch3:: note_type 12, 1, 0 - -Music_Pokecenter_branch_bf72:: +.mainloop: octave 4 note D_, 2 note F#, 2 @@ -261,8 +256,8 @@ Music_Pokecenter_branch_bf72:: note F#, 2 note G_, 2 note F#, 2 - sound_call Music_Pokecenter_branch_bfd9 - sound_call Music_Pokecenter_branch_bfe2 + sound_call .sub1 + sound_call .sub2 note F#, 2 note A_, 2 note F#, 2 @@ -279,8 +274,8 @@ Music_Pokecenter_branch_bf72:: note F#, 2 note G_, 2 note F#, 2 - sound_call Music_Pokecenter_branch_bfd9 - sound_call Music_Pokecenter_branch_bfe2 + sound_call .sub1 + sound_call .sub2 note D_, 2 note F#, 2 note D_, 2 @@ -289,7 +284,7 @@ Music_Pokecenter_branch_bf72:: note B_, 2 note A_, 2 note G_, 2 - sound_call Music_Pokecenter_branch_bfeb + sound_call .sub3 note G_, 2 note B_, 2 note G_, 2 @@ -314,7 +309,7 @@ Music_Pokecenter_branch_bf72:: note A_, 2 note G#, 2 note A_, 2 - sound_call Music_Pokecenter_branch_bfeb + sound_call .sub3 note G_, 2 note B_, 2 note G_, 2 @@ -339,9 +334,9 @@ Music_Pokecenter_branch_bf72:: note G_, 2 note F#, 2 note E_, 2 - sound_loop 0, Music_Pokecenter_branch_bf72 + sound_loop 0, .mainloop -Music_Pokecenter_branch_bfd9:: +.sub1: note E_, 2 note A_, 2 note E_, 2 @@ -352,7 +347,7 @@ Music_Pokecenter_branch_bfd9:: note A_, 2 sound_ret -Music_Pokecenter_branch_bfe2:: +.sub2: note E_, 2 note A_, 2 note E_, 2 @@ -363,7 +358,7 @@ Music_Pokecenter_branch_bfe2:: note A_, 2 sound_ret -Music_Pokecenter_branch_bfeb:: +.sub3: note F#, 2 note A_, 2 note F#, 2 diff --git a/audio/music/pokemontower.asm b/audio/music/pokemontower.asm index ef3a3b88b..0126acad6 100644 --- a/audio/music/pokemontower.asm +++ b/audio/music/pokemontower.asm @@ -8,8 +8,7 @@ Music_PokemonTower_Ch1:: rest 4 octave 4 note B_, 12 - -Music_PokemonTower_branch_7f05a:: +.mainloop: note_type 12, 11, 4 octave 4 note G_, 1 @@ -137,8 +136,7 @@ Music_PokemonTower_branch_7f05a:: octave 5 note C_, 16 note C_, 16 - sound_loop 0, Music_PokemonTower_branch_7f05a - + sound_loop 0, .mainloop Music_PokemonTower_Ch2:: vibrato 20, 3, 4 @@ -148,8 +146,7 @@ Music_PokemonTower_Ch2:: note C_, 12 octave 4 note E_, 4 - -Music_PokemonTower_branch_7f0ee:: +.mainloop: note_type 12, 12, 1 octave 5 note C_, 8 @@ -289,8 +286,7 @@ Music_PokemonTower_branch_7f0ee:: vibrato 0, 3, 4 note_type 12, 10, 7 note C_, 16 - sound_loop 0, Music_PokemonTower_branch_7f0ee - + sound_loop 0, .mainloop Music_PokemonTower_Ch3:: vibrato 4, 1, 1 @@ -298,8 +294,7 @@ Music_PokemonTower_Ch3:: rest 8 octave 5 note G_, 8 - -Music_PokemonTower_branch_7f1a2:: +.mainloop: note E_, 1 rest 7 note E_, 1 @@ -455,4 +450,4 @@ Music_PokemonTower_branch_7f1a2:: rest 1 note D#, 1 rest 1 - sound_loop 0, Music_PokemonTower_branch_7f1a2 + sound_loop 0, .mainloop diff --git a/audio/music/routes1.asm b/audio/music/routes1.asm index cdefb6ee9..b4c8377d2 100644 --- a/audio/music/routes1.asm +++ b/audio/music/routes1.asm @@ -4,8 +4,7 @@ Music_Routes1_Ch1:: vibrato 4, 2, 3 duty_cycle 2 toggle_perfect_pitch - -Music_Routes1_branch_9be9:: +.mainloop: note_type 12, 10, 1 rest 4 octave 4 @@ -102,22 +101,21 @@ Music_Routes1_branch_9be9:: octave 3 note A_, 2 note A_, 2 - sound_loop 0, Music_Routes1_branch_9be9 - sound_ret + sound_loop 0, .mainloop + sound_ret ; unused Music_Routes1_Ch2:: duty_cycle 2 - -Music_Routes1_branch_9c53:: +.mainloop: note_type 12, 13, 1 - sound_call Music_Routes1_branch_9c65 - sound_call Music_Routes1_branch_9c78 - sound_call Music_Routes1_branch_9c65 - sound_call Music_Routes1_branch_9c8d - sound_loop 0, Music_Routes1_branch_9c53 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub3 + sound_loop 0, .mainloop -Music_Routes1_branch_9c65:: +.sub1: octave 4 note D_, 1 note E_, 1 @@ -138,7 +136,7 @@ Music_Routes1_branch_9c65:: note E_, 6 sound_ret -Music_Routes1_branch_9c78:: +.sub2: note C#, 1 note D_, 1 note E_, 2 @@ -161,7 +159,7 @@ Music_Routes1_branch_9c78:: note F#, 2 sound_ret -Music_Routes1_branch_9c8d:: +.sub3: note C#, 1 note D_, 1 note E_, 2 @@ -231,14 +229,13 @@ Music_Routes1_branch_9c8d:: note D_, 2 note D_, 2 sound_ret - sound_ret + sound_ret ; unused Music_Routes1_Ch3:: vibrato 8, 2, 5 note_type 12, 1, 3 - -Music_Routes1_branch_9cdd:: +.mainloop: rest 2 octave 4 note D_, 4 @@ -305,11 +302,12 @@ Music_Routes1_branch_9cdd:: note A_, 8 octave 4 note D_, 6 - sound_loop 0, Music_Routes1_branch_9cdd - sound_ret + sound_loop 0, .mainloop + sound_ret ; unused Music_Routes1_Ch4:: +.mainloop: drum_speed 12 rest 4 drum_note 15, 2 @@ -400,5 +398,6 @@ Music_Routes1_Ch4:: rest 2 drum_note 15, 2 drum_note 15, 2 - sound_loop 0, Music_Routes1_Ch4 - sound_ret + sound_loop 0, .mainloop + + sound_ret ; unused diff --git a/audio/music/routes2.asm b/audio/music/routes2.asm index e6782df30..d60d6cb36 100644 --- a/audio/music/routes2.asm +++ b/audio/music/routes2.asm @@ -3,8 +3,7 @@ Music_Routes2_Ch1:: volume 7, 7 vibrato 9, 2, 5 duty_cycle 1 - -Music_Routes2_branch_9dc3:: +.mainloop: note_type 12, 11, 2 octave 2 note B_, 4 @@ -138,15 +137,14 @@ Music_Routes2_branch_9dc3:: note B_, 2 octave 4 note E_, 2 - sound_loop 0, Music_Routes2_branch_9dc3 - sound_ret + sound_loop 0, .mainloop + sound_ret ; unused Music_Routes2_Ch2:: vibrato 8, 2, 6 duty_cycle 3 - -Music_Routes2_branch_9e54:: +.mainloop: note_type 12, 13, 4 octave 4 note E_, 6 @@ -212,14 +210,13 @@ Music_Routes2_branch_9e54:: note A_, 1 note G#, 8 rest 4 - sound_loop 0, Music_Routes2_branch_9e54 - sound_ret + sound_loop 0, .mainloop + sound_ret ; unused Music_Routes2_Ch3:: vibrato 9, 2, 8 - -Music_Routes2_branch_9e9e:: +.mainloop: note_type 12, 1, 1 octave 3 note E_, 2 @@ -320,11 +317,12 @@ Music_Routes2_branch_9e9e:: rest 2 note E_, 2 rest 2 - sound_loop 0, Music_Routes2_branch_9e9e - sound_ret + sound_loop 0, .mainloop + sound_ret ; unused Music_Routes2_Ch4:: +.mainloop: drum_speed 12 drum_note 3, 2 rest 2 @@ -421,5 +419,6 @@ Music_Routes2_Ch4:: rest 3 drum_note 3, 3 rest 3 - sound_loop 0, Music_Routes2_Ch4 - sound_ret + sound_loop 0, .mainloop + + sound_ret ; unused diff --git a/audio/music/routes3.asm b/audio/music/routes3.asm index 26a41590c..d7140c6c4 100644 --- a/audio/music/routes3.asm +++ b/audio/music/routes3.asm @@ -14,8 +14,7 @@ Music_Routes3_Ch1:: note E_, 1 rest 16 rest 15 - -Music_Routes3_branch_9fc3:: +.mainloop: note_type 12, 11, 5 note E_, 6 note D_, 1 @@ -74,8 +73,7 @@ Music_Routes3_branch_9fc3:: note_type 8, 9, 0 note F_, 12 note G_, 12 - sound_loop 0, Music_Routes3_branch_9fc3 - + sound_loop 0, .mainloop Music_Routes3_Ch2:: vibrato 8, 2, 3 @@ -91,8 +89,7 @@ Music_Routes3_Ch2:: note C_, 1 rest 15 rest 16 - -Music_Routes3_branch_a01a:: +.mainloop: note_type 12, 12, 7 duty_cycle 2 octave 4 @@ -175,8 +172,7 @@ Music_Routes3_branch_a01a:: octave 3 note A_, 8 note B_, 8 - sound_loop 0, Music_Routes3_branch_a01a - + sound_loop 0, .mainloop Music_Routes3_Ch3:: vibrato 4, 1, 0 @@ -212,8 +208,7 @@ Music_Routes3_Ch3:: note G_, 2 rest 2 note G_, 8 - -Music_Routes3_branch_a0a3:: +.mainloop: note_type 12, 1, 2 note E_, 1 rest 1 @@ -351,8 +346,7 @@ Music_Routes3_branch_a0a3:: note F_, 1 rest 1 note A_, 4 - sound_loop 0, Music_Routes3_branch_a0a3 - + sound_loop 0, .mainloop Music_Routes3_Ch4:: drum_speed 6 @@ -392,8 +386,7 @@ Music_Routes3_Ch4:: drum_note 19, 1 drum_note 18, 1 drum_note 18, 1 - -Music_Routes3_branch_a17a:: +.mainloop: drum_note 17, 12 drum_note 17, 2 drum_note 18, 2 @@ -512,4 +505,4 @@ Music_Routes3_branch_a17a:: drum_note 18, 1 drum_note 18, 1 drum_note 18, 1 - sound_loop 0, Music_Routes3_branch_a17a + sound_loop 0, .mainloop diff --git a/audio/music/routes4.asm b/audio/music/routes4.asm index 50679f543..98e1455a8 100644 --- a/audio/music/routes4.asm +++ b/audio/music/routes4.asm @@ -21,8 +21,7 @@ Music_Routes4_Ch1:: note E_, 1 note F#, 1 note B_, 1 - -Music_Routes4_branch_a28a:: +.mainloop: note_type 12, 11, 7 note B_, 6 note E_, 2 @@ -135,8 +134,7 @@ Music_Routes4_branch_a28a:: note F#, 3 note G#, 3 note A_, 3 - sound_loop 0, Music_Routes4_branch_a28a - + sound_loop 0, .mainloop Music_Routes4_Ch2:: vibrato 12, 2, 4 @@ -163,8 +161,7 @@ Music_Routes4_Ch2:: note B_, 1 octave 4 note D#, 1 - -Music_Routes4_branch_a325:: +.mainloop: note_type 12, 12, 7 note E_, 6 octave 3 @@ -285,8 +282,7 @@ Music_Routes4_branch_a325:: note E_, 8 note_type 12, 10, 7 note E_, 10 - sound_loop 0, Music_Routes4_branch_a325 - + sound_loop 0, .mainloop Music_Routes4_Ch3:: note_type 12, 1, 0 @@ -307,8 +303,7 @@ Music_Routes4_Ch3:: rest 3 note D#, 1 rest 3 - -Music_Routes4_branch_a3d7:: +.mainloop: note E_, 1 rest 3 note E_, 1 @@ -503,8 +498,7 @@ Music_Routes4_branch_a3d7:: rest 3 note D#, 1 rest 1 - sound_loop 0, Music_Routes4_branch_a3d7 - + sound_loop 0, .mainloop Music_Routes4_Ch4:: drum_speed 12 @@ -514,8 +508,7 @@ Music_Routes4_Ch4:: drum_note 19, 1 drum_note 18, 1 drum_note 18, 1 - -Music_Routes4_branch_a4a8:: +.mainloop: drum_note 17, 4 drum_note 19, 1 drum_note 19, 1 @@ -678,4 +671,4 @@ Music_Routes4_branch_a4a8:: drum_note 17, 2 drum_note 17, 2 drum_note 17, 2 - sound_loop 0, Music_Routes4_branch_a4a8 + sound_loop 0, .mainloop diff --git a/audio/music/safarizone.asm b/audio/music/safarizone.asm index 0ca2f71a7..505dd130b 100644 --- a/audio/music/safarizone.asm +++ b/audio/music/safarizone.asm @@ -16,17 +16,16 @@ Music_SafariZone_Ch1:: note G_, 1 rest 4 duty_cycle 3 - -Music_SafariZone_branch_bc4f:: - sound_call Music_SafariZone_branch_bc5f +.mainloop: + sound_call .sub1 note_type 12, 10, 4 note F#, 4 - sound_call Music_SafariZone_branch_bc5f + sound_call .sub1 note_type 12, 10, 4 note F#, 4 - sound_loop 0, Music_SafariZone_branch_bc4f + sound_loop 0, .mainloop -Music_SafariZone_branch_bc5f:: +.sub1: note_type 12, 10, 2 octave 3 note C_, 4 @@ -38,7 +37,6 @@ Music_SafariZone_branch_bc5f:: note C_, 4 sound_ret - Music_SafariZone_Ch2:: duty_cycle 2 vibrato 8, 2, 5 @@ -50,17 +48,16 @@ Music_SafariZone_Ch2:: note D_, 1 rest 4 duty_cycle 3 - -Music_SafariZone_branch_bc79:: - sound_call Music_SafariZone_branch_bc89 +.mainloop: + sound_call .sub1 note_type 12, 11, 5 note A_, 4 - sound_call Music_SafariZone_branch_bc89 + sound_call .sub1 note_type 12, 11, 5 note B_, 4 - sound_loop 0, Music_SafariZone_branch_bc79 + sound_loop 0, .mainloop -Music_SafariZone_branch_bc89:: +.sub1: note_type 12, 11, 2 octave 3 note G_, 4 @@ -72,21 +69,19 @@ Music_SafariZone_branch_bc89:: note G_, 4 sound_ret - Music_SafariZone_Ch3:: note_type 12, 1, 0 rest 8 - -Music_SafariZone_branch_bc97:: - sound_call Music_SafariZone_branch_bca5 +.mainloop: + sound_call .sub1 octave 4 note A_, 4 - sound_call Music_SafariZone_branch_bca5 + sound_call .sub1 octave 4 note B_, 4 - sound_loop 0, Music_SafariZone_branch_bc97 + sound_loop 0, .mainloop -Music_SafariZone_branch_bca5:: +.sub1: octave 3 note A_, 2 rest 2 diff --git a/audio/music/silphco.asm b/audio/music/silphco.asm index 3c7512bad..9e4265f94 100644 --- a/audio/music/silphco.asm +++ b/audio/music/silphco.asm @@ -32,8 +32,7 @@ Music_SilphCo_Ch1:: rest 6 note B_, 2 rest 2 - -Music_SilphCo_branch_7f26d:: +.mainloop: note G_, 2 rest 2 note B_, 2 @@ -185,9 +184,9 @@ Music_SilphCo_branch_7f26d:: note A#, 2 note B_, 2 note A#, 2 - sound_call Music_SilphCo_branch_7f3f0 - sound_call Music_SilphCo_branch_7f3f0 - sound_call Music_SilphCo_branch_7f3f0 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 rest 4 note C_, 2 rest 6 @@ -365,9 +364,9 @@ Music_SilphCo_branch_7f26d:: rest 6 note B_, 2 rest 2 - sound_loop 0, Music_SilphCo_branch_7f26d + sound_loop 0, .mainloop -Music_SilphCo_branch_7f3f0:: +.sub1: octave 2 note B_, 2 note A#, 2 @@ -394,7 +393,6 @@ Music_SilphCo_branch_7f3f0:: note C_, 2 sound_ret - Music_SilphCo_Ch2:: vibrato 10, 3, 2 duty_cycle 3 @@ -427,8 +425,7 @@ Music_SilphCo_Ch2:: rest 6 note G#, 2 rest 2 - -Music_SilphCo_branch_7f42e:: +.mainloop: note E_, 2 rest 2 note G_, 2 @@ -777,8 +774,7 @@ Music_SilphCo_branch_7f42e:: rest 6 note G#, 2 rest 2 - sound_loop 0, Music_SilphCo_branch_7f42e - + sound_loop 0, .mainloop Music_SilphCo_Ch3:: vibrato 8, 1, 1 @@ -789,8 +785,7 @@ Music_SilphCo_Ch3:: note D#, 4 note E_, 4 note F_, 4 - -Music_SilphCo_branch_7f5c9:: +.mainloop: note E_, 4 note D#, 4 note D_, 4 @@ -997,4 +992,4 @@ Music_SilphCo_branch_7f5c9:: note D#, 4 note E_, 4 note F_, 4 - sound_loop 0, Music_SilphCo_branch_7f5c9 + sound_loop 0, .mainloop diff --git a/audio/music/ssanne.asm b/audio/music/ssanne.asm index 4dae83bc6..61f4237e3 100644 --- a/audio/music/ssanne.asm +++ b/audio/music/ssanne.asm @@ -4,8 +4,7 @@ Music_SSAnne_Ch1:: duty_cycle 1 vibrato 8, 3, 4 toggle_perfect_pitch - -Music_SSAnne_branch_b3b2:: +.mainloop: note_type 12, 10, 4 rest 12 octave 3 @@ -104,14 +103,12 @@ Music_SSAnne_branch_b3b2:: rest 4 octave 3 note D_, 8 - sound_loop 0, Music_SSAnne_branch_b3b2 - + sound_loop 0, .mainloop Music_SSAnne_Ch2:: duty_cycle 0 vibrato 12, 2, 4 - -Music_SSAnne_branch_b41e:: +.mainloop: note_type 12, 12, 5 octave 3 note A_, 2 @@ -279,10 +276,10 @@ Music_SSAnne_branch_b41e:: note C#, 3 octave 3 note B_, 3 - sound_loop 0, Music_SSAnne_branch_b41e - + sound_loop 0, .mainloop Music_SSAnne_Ch3:: +.mainloop: note_type 12, 1, 3 rest 16 rest 12 @@ -335,4 +332,4 @@ Music_SSAnne_Ch3:: note F#, 8 note G#, 8 note B_, 8 - sound_loop 0, Music_SSAnne_Ch3 + sound_loop 0, .mainloop diff --git a/audio/music/surfing.asm b/audio/music/surfing.asm index 4765f3917..03636ef1b 100644 --- a/audio/music/surfing.asm +++ b/audio/music/surfing.asm @@ -15,8 +15,7 @@ Music_Surfing_Ch1:: note G#, 2 note F#, 2 note G#, 4 - -Music_Surfing_branch_7fa30:: +.mainloop: note_type 12, 11, 2 note E_, 2 note E_, 4 @@ -113,8 +112,7 @@ Music_Surfing_branch_7fa30:: note G#, 2 note F#, 2 note E_, 4 - sound_loop 0, Music_Surfing_branch_7fa30 - + sound_loop 0, .mainloop Music_Surfing_Ch2:: duty_cycle 3 @@ -131,8 +129,7 @@ Music_Surfing_Ch2:: note D_, 2 octave 3 note B_, 2 - -Music_Surfing_branch_7faae:: +.mainloop: note_type 12, 12, 6 octave 4 note E_, 6 @@ -200,8 +197,7 @@ Music_Surfing_branch_7faae:: note A_, 1 octave 5 note C#, 6 - sound_loop 0, Music_Surfing_branch_7faae - + sound_loop 0, .mainloop Music_Surfing_Ch3:: note_type 12, 1, 0 @@ -212,8 +208,7 @@ Music_Surfing_Ch3:: note E_, 2 note F#, 2 note G#, 2 - -Music_Surfing_branch_7fb03:: +.mainloop: octave 3 note A_, 2 octave 4 @@ -332,4 +327,4 @@ Music_Surfing_branch_7fb03:: note C#, 2 note D_, 2 note E_, 2 - sound_loop 0, Music_Surfing_branch_7fb03 + sound_loop 0, .mainloop diff --git a/audio/music/titlescreen.asm b/audio/music/titlescreen.asm index a70b27618..624fc064e 100644 --- a/audio/music/titlescreen.asm +++ b/audio/music/titlescreen.asm @@ -25,11 +25,10 @@ Music_TitleScreen_Ch1:: note A_, 2 note A_, 2 note F#, 2 - -Music_TitleScreen_branch_7e4e2:: - sound_call Music_TitleScreen_branch_7e541 - sound_call Music_TitleScreen_branch_7e54a - sound_call Music_TitleScreen_branch_7e541 +.mainloop: + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 octave 3 note C_, 8 note_type 8, 12, 6 @@ -52,9 +51,9 @@ Music_TitleScreen_branch_7e4e2:: octave 3 note C_, 2 note D_, 2 - sound_call Music_TitleScreen_branch_7e541 - sound_call Music_TitleScreen_branch_7e54a - sound_call Music_TitleScreen_branch_7e541 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 note C_, 6 note C_, 6 note E_, 4 @@ -82,21 +81,21 @@ Music_TitleScreen_branch_7e4e2:: octave 4 note C_, 4 note C#, 4 - sound_call Music_TitleScreen_branch_7e55c + sound_call .sub3 note_type 8, 11, 4 octave 4 note C_, 4 note C_, 4 note C#, 4 - sound_call Music_TitleScreen_branch_7e55c + sound_call .sub3 note_type 8, 11, 2 octave 3 note E_, 4 note E_, 4 note C#, 4 - sound_loop 0, Music_TitleScreen_branch_7e4e2 + sound_loop 0, .mainloop -Music_TitleScreen_branch_7e541:: +.sub1: note_type 12, 12, 6 octave 3 note D_, 6 @@ -106,7 +105,7 @@ Music_TitleScreen_branch_7e541:: note D_, 8 sound_ret -Music_TitleScreen_branch_7e54a:: +.sub2: note C_, 6 note F_, 6 note C_, 4 @@ -124,7 +123,7 @@ Music_TitleScreen_branch_7e54a:: note C_, 4 sound_ret -Music_TitleScreen_branch_7e55c:: +.sub3: note_type 12, 12, 1 note D_, 1 rest 1 @@ -153,7 +152,6 @@ Music_TitleScreen_branch_7e55c:: note D_, 1 sound_ret - Music_TitleScreen_Ch2:: vibrato 16, 4, 6 duty_cycle 1 @@ -178,18 +176,17 @@ Music_TitleScreen_Ch2:: note F_, 2 note F_, 2 note F#, 2 - -Music_TitleScreen_branch_7e594:: +.mainloop: vibrato 16, 4, 6 - sound_call Music_TitleScreen_branch_7e622 + sound_call .sub1 octave 2 note A_, 4 note F_, 4 - sound_call Music_TitleScreen_branch_7e62c + sound_call .sub2 octave 2 note A_, 8 note B_, 16 - sound_call Music_TitleScreen_branch_7e622 + sound_call .sub1 octave 2 note A_, 6 note F_, 2 @@ -208,11 +205,11 @@ Music_TitleScreen_branch_7e594:: note D_, 1 note F#, 1 note G_, 16 - sound_call Music_TitleScreen_branch_7e622 + sound_call .sub1 octave 2 note A_, 2 note F_, 6 - sound_call Music_TitleScreen_branch_7e62c + sound_call .sub2 octave 3 note C_, 2 octave 2 @@ -220,7 +217,7 @@ Music_TitleScreen_branch_7e594:: note B_, 6 note G_, 2 note F_, 8 - sound_call Music_TitleScreen_branch_7e622 + sound_call .sub1 note_type 8, 9, 5 octave 2 note G_, 4 @@ -262,7 +259,7 @@ Music_TitleScreen_branch_7e594:: octave 5 note C_, 4 note C#, 4 - sound_call Music_TitleScreen_branch_7e636 + sound_call .sub3 rest 3 note D_, 1 rest 3 @@ -272,7 +269,7 @@ Music_TitleScreen_branch_7e594:: note C_, 4 note C_, 4 note C#, 4 - sound_call Music_TitleScreen_branch_7e636 + sound_call .sub3 note D_, 1 rest 2 note D_, 1 @@ -284,9 +281,9 @@ Music_TitleScreen_branch_7e594:: note C_, 4 octave 4 note B_, 4 - sound_loop 0, Music_TitleScreen_branch_7e594 + sound_loop 0, .mainloop -Music_TitleScreen_branch_7e622:: +.sub1: note_type 12, 14, 7 octave 3 note G_, 6 @@ -296,7 +293,7 @@ Music_TitleScreen_branch_7e622:: note_type 12, 9, 5 sound_ret -Music_TitleScreen_branch_7e62c:: +.sub2: note_type 12, 14, 7 octave 4 note F_, 6 @@ -306,7 +303,7 @@ Music_TitleScreen_branch_7e62c:: note_type 12, 9, 5 sound_ret -Music_TitleScreen_branch_7e636:: +.sub3: note_type 12, 14, 1 note D_, 1 rest 2 @@ -320,7 +317,6 @@ Music_TitleScreen_branch_7e636:: note D_, 1 sound_ret - Music_TitleScreen_Ch3:: note_type 12, 1, 0 octave 3 @@ -347,41 +343,39 @@ Music_TitleScreen_Ch3:: note F_, 2 note F_, 2 note A_, 2 - -Music_TitleScreen_branch_7e65e:: - sound_call Music_TitleScreen_branch_7e6c9 - sound_call Music_TitleScreen_branch_7e6d0 - -Music_TitleScreen_branch_7e664:: - sound_call Music_TitleScreen_branch_7e6c9 - sound_call Music_TitleScreen_branch_7e6c9 - sound_call Music_TitleScreen_branch_7e6c9 - sound_call Music_TitleScreen_branch_7e6d0 - sound_loop 3, Music_TitleScreen_branch_7e664 - sound_call Music_TitleScreen_branch_7e6c9 +.mainloop: + sound_call .sub1 + sound_call .sub2 +.loop1: + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_loop 3, .loop1 + sound_call .sub1 note G_, 6 note D_, 3 note A_, 6 note F_, 3 note A_, 3 note F_, 3 - sound_call Music_TitleScreen_branch_7e6d7 + sound_call .sub3 note A#, 3 note F_, 3 - sound_call Music_TitleScreen_branch_7e6d7 + sound_call .sub3 note B_, 3 note G_, 3 - sound_call Music_TitleScreen_branch_7e6dc + sound_call .sub4 octave 4 note C_, 3 octave 3 note G_, 3 - sound_call Music_TitleScreen_branch_7e6dc + sound_call .sub4 octave 4 note C#, 3 octave 3 note A_, 3 - sound_call Music_TitleScreen_branch_7e6e5 + sound_call .sub5 octave 5 pitch_slide 1, 4, D_ note D_, 4 @@ -398,7 +392,7 @@ Music_TitleScreen_branch_7e664:: note C_, 4 note C_, 4 note C#, 4 - sound_call Music_TitleScreen_branch_7e6e5 + sound_call .sub5 octave 6 pitch_slide 1, 5, D_ note D_, 4 @@ -413,9 +407,9 @@ Music_TitleScreen_branch_7e664:: note C_, 4 octave 3 note B_, 4 - sound_loop 0, Music_TitleScreen_branch_7e65e + sound_loop 0, .mainloop -Music_TitleScreen_branch_7e6c9:: +.sub1: note G_, 6 note D_, 3 note G_, 6 @@ -424,7 +418,7 @@ Music_TitleScreen_branch_7e6c9:: note D_, 3 sound_ret -Music_TitleScreen_branch_7e6d0:: +.sub2: note F_, 6 note C_, 3 note F_, 6 @@ -433,14 +427,14 @@ Music_TitleScreen_branch_7e6d0:: note C_, 3 sound_ret -Music_TitleScreen_branch_7e6d7:: +.sub3: note A#, 6 note F_, 3 note A#, 6 note F_, 3 sound_ret -Music_TitleScreen_branch_7e6dc:: +.sub4: octave 4 note C_, 6 octave 3 @@ -451,14 +445,13 @@ Music_TitleScreen_branch_7e6dc:: note G_, 3 sound_ret -Music_TitleScreen_branch_7e6e5:: +.sub5: note_type 12, 1, 0 octave 4 note D_, 1 rest 5 sound_ret - Music_TitleScreen_Ch4:: drum_speed 6 rest 4 @@ -486,8 +479,7 @@ Music_TitleScreen_Ch4:: drum_note 3, 2 drum_note 2, 2 drum_note 1, 2 - -Music_TitleScreen_branch_7e716:: +.mainloop: drum_speed 12 drum_note 2, 1 rest 3 @@ -497,8 +489,8 @@ Music_TitleScreen_branch_7e716:: drum_note 2, 1 drum_note 3, 1 rest 3 - sound_call Music_TitleScreen_branch_7e834 - sound_call Music_TitleScreen_branch_7e834 + sound_call .sub1 + sound_call .sub1 drum_note 2, 1 rest 3 drum_note 2, 1 @@ -509,7 +501,7 @@ Music_TitleScreen_branch_7e716:: rest 1 drum_note 3, 1 drum_note 2, 1 - sound_call Music_TitleScreen_branch_7e842 + sound_call .sub2 drum_note 2, 1 rest 3 drum_note 2, 1 @@ -520,7 +512,7 @@ Music_TitleScreen_branch_7e716:: rest 1 drum_note 2, 1 rest 1 - sound_call Music_TitleScreen_branch_7e842 + sound_call .sub2 drum_note 2, 1 rest 3 drum_note 2, 1 @@ -535,8 +527,8 @@ Music_TitleScreen_branch_7e716:: drum_note 4, 1 drum_note 4, 1 drum_speed 12 - sound_call Music_TitleScreen_branch_7e834 - sound_call Music_TitleScreen_branch_7e842 + sound_call .sub1 + sound_call .sub2 drum_note 2, 1 rest 3 drum_note 2, 1 @@ -555,8 +547,8 @@ Music_TitleScreen_branch_7e716:: rest 1 drum_note 3, 1 drum_note 2, 1 - sound_call Music_TitleScreen_branch_7e834 - sound_call Music_TitleScreen_branch_7e842 + sound_call .sub1 + sound_call .sub2 drum_note 2, 1 rest 3 drum_note 2, 1 @@ -652,9 +644,9 @@ Music_TitleScreen_branch_7e716:: drum_note 2, 4 drum_note 3, 4 drum_note 2, 4 - sound_loop 0, Music_TitleScreen_branch_7e716 + sound_loop 0, .mainloop -Music_TitleScreen_branch_7e834:: +.sub1: drum_note 2, 1 rest 3 drum_note 2, 1 @@ -665,7 +657,7 @@ Music_TitleScreen_branch_7e834:: rest 3 sound_ret -Music_TitleScreen_branch_7e842:: +.sub2: drum_note 2, 1 rest 3 drum_note 2, 1 diff --git a/audio/music/trainerbattle.asm b/audio/music/trainerbattle.asm index ba5d6d1b7..08df5fb54 100644 --- a/audio/music/trainerbattle.asm +++ b/audio/music/trainerbattle.asm @@ -65,8 +65,7 @@ Music_TrainerBattle_Ch1:: note F_, 6 note C_, 2 note C#, 2 - -Music_TrainerBattle_branch_22962:: +.mainloop: note_type 12, 11, 5 note D_, 2 note E_, 4 @@ -646,8 +645,7 @@ Music_TrainerBattle_branch_22962:: note G#, 1 note A_, 1 note A#, 1 - sound_loop 0, Music_TrainerBattle_branch_22962 - + sound_loop 0, .mainloop Music_TrainerBattle_Ch2:: duty_cycle 3 @@ -721,8 +719,7 @@ Music_TrainerBattle_Ch2:: note D_, 6 octave 4 note A_, 4 - -Music_TrainerBattle_branch_22bfc:: +.mainloop: note_type 12, 12, 7 octave 3 note B_, 6 @@ -950,8 +947,7 @@ Music_TrainerBattle_branch_22bfc:: note C_, 16 note E_, 8 note G_, 8 - sound_loop 0, Music_TrainerBattle_branch_22bfc - + sound_loop 0, .mainloop Music_TrainerBattle_Ch3:: vibrato 0, 2, 0 @@ -1091,8 +1087,7 @@ Music_TrainerBattle_Ch3:: note A#, 2 octave 3 note C_, 2 - -Music_TrainerBattle_branch_22d9c:: +.mainloop: octave 2 note A#, 1 note B_, 1 @@ -1854,4 +1849,4 @@ Music_TrainerBattle_branch_22d9c:: note E_, 2 note D_, 2 note C_, 2 - sound_loop 0, Music_TrainerBattle_branch_22d9c + sound_loop 0, .mainloop diff --git a/audio/music/unusedsong.asm b/audio/music/unusedsong.asm index a2291a2a8..ce3434414 100644 --- a/audio/music/unusedsong.asm +++ b/audio/music/unusedsong.asm @@ -2,8 +2,7 @@ Music_UnusedSong_Ch1:: tempo 144 volume 7, 7 vibrato 5, 1, 6 - -Music_UnusedSong_branch_a91b:: +.mainloop: note_type 12, 1, 0 octave 6 note E_, 1 @@ -178,17 +177,16 @@ Music_UnusedSong_branch_a91b:: rest 6 note B_, 2 rest 6 - sound_loop 0, Music_UnusedSong_branch_a91b - sound_ret + sound_loop 0, .mainloop + sound_ret ; unused Music_UnusedSong_Ch2:: tempo 144 volume 7, 7 toggle_perfect_pitch vibrato 6, 1, 5 - -Music_UnusedSong_branch_a9d8:: +.mainloop: note_type 12, 1, 0 octave 6 note E_, 1 @@ -334,5 +332,6 @@ Music_UnusedSong_branch_a9d8:: rest 6 note D#, 2 rest 6 - sound_loop 0, Music_UnusedSong_branch_a9d8 - sound_ret + sound_loop 0, .mainloop + + sound_ret ; unused diff --git a/audio/music/vermilion.asm b/audio/music/vermilion.asm index 2788cde90..ed0bc846e 100644 --- a/audio/music/vermilion.asm +++ b/audio/music/vermilion.asm @@ -4,8 +4,7 @@ Music_Vermilion_Ch1:: duty_cycle 3 vibrato 12, 3, 4 toggle_perfect_pitch - -Music_Vermilion_branch_b9f6:: +.mainloop: note_type 12, 11, 5 octave 3 note E_, 4 @@ -108,14 +107,12 @@ Music_Vermilion_branch_b9f6:: note F#, 2 note G#, 2 note B_, 2 - sound_loop 0, Music_Vermilion_branch_b9f6 - + sound_loop 0, .mainloop Music_Vermilion_Ch2:: duty_cycle 3 vibrato 10, 2, 3 - -Music_Vermilion_branch_ba66:: +.mainloop: note_type 12, 12, 7 octave 3 note A_, 8 @@ -175,13 +172,11 @@ Music_Vermilion_branch_ba66:: note E_, 4 note F#, 8 note E_, 8 - sound_loop 0, Music_Vermilion_branch_ba66 - + sound_loop 0, .mainloop Music_Vermilion_Ch3:: note_type 12, 1, 0 - -Music_Vermilion_branch_baa8:: +.mainloop: octave 4 note A_, 2 note E_, 2 @@ -279,14 +274,13 @@ Music_Vermilion_branch_baa8:: note E_, 2 note G#, 2 note E_, 2 - sound_loop 0, Music_Vermilion_branch_baa8 - + sound_loop 0, .mainloop Music_Vermilion_Ch4:: drum_speed 12 - -Music_Vermilion_branch_bb0e:: - sound_call Music_Vermilion_branch_bb3f +.mainloop: +.loop1: + sound_call .sub1 drum_note 6, 2 drum_note 6, 1 drum_note 6, 1 @@ -300,14 +294,14 @@ Music_Vermilion_branch_bb0e:: drum_note 6, 1 drum_note 6, 1 drum_note 6, 1 - sound_loop 4, Music_Vermilion_branch_bb0e - sound_call Music_Vermilion_branch_bb3f - sound_call Music_Vermilion_branch_bb3f - sound_call Music_Vermilion_branch_bb3f - sound_call Music_Vermilion_branch_bb3f - sound_loop 0, Music_Vermilion_branch_bb0e + sound_loop 4, .loop1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_loop 0, .mainloop -Music_Vermilion_branch_bb3f:: +.sub1: drum_note 6, 2 drum_note 6, 1 drum_note 6, 1 diff --git a/audio/music/wildbattle.asm b/audio/music/wildbattle.asm index f7cfab147..c8ebf5622 100644 --- a/audio/music/wildbattle.asm +++ b/audio/music/wildbattle.asm @@ -60,8 +60,7 @@ Music_WildBattle_Ch1:: note E_, 6 note D#, 10 note C#, 10 - -Music_WildBattle_branch_230e0:: +.mainloop: note_type 12, 11, 3 note C#, 1 note D_, 1 @@ -297,8 +296,7 @@ Music_WildBattle_branch_230e0:: note D#, 6 note_type 12, 10, 7 note C#, 8 - sound_loop 0, Music_WildBattle_branch_230e0 - + sound_loop 0, .mainloop Music_WildBattle_Ch2:: duty_cycle 3 @@ -371,8 +369,7 @@ Music_WildBattle_Ch2:: note G_, 6 note G_, 10 note G_, 10 - -Music_WildBattle_branch_23225:: +.mainloop: note_type 12, 12, 5 note G_, 6 note F#, 6 @@ -459,8 +456,7 @@ Music_WildBattle_branch_23225:: note G_, 6 note_type 12, 12, 7 note F_, 8 - sound_loop 0, Music_WildBattle_branch_23225 - + sound_loop 0, .mainloop Music_WildBattle_Ch3:: vibrato 0, 2, 0 @@ -497,8 +493,7 @@ Music_WildBattle_Ch3:: octave 3 note A#, 2 note B_, 2 - -Music_WildBattle_branch_232b5:: +.introloop: octave 4 note C_, 2 note G_, 2 @@ -530,9 +525,8 @@ Music_WildBattle_branch_232b5:: note A#, 2 note G#, 2 note F_, 2 - sound_loop 2, Music_WildBattle_branch_232b5 - -Music_WildBattle_branch_232d8:: + sound_loop 2, .introloop +.mainloop: note C_, 2 note G_, 2 note C_, 2 @@ -735,4 +729,4 @@ Music_WildBattle_branch_232d8:: note G#, 2 note C#, 2 note G#, 2 - sound_loop 0, Music_WildBattle_branch_232d8 + sound_loop 0, .mainloop From cc98f282271f627773203b038def8404bf9f9dad Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 10 Jul 2022 20:22:24 -0400 Subject: [PATCH 30/45] Replace "branch" labels in SFX files with local names --- audio/sfx/59_1.asm | 1 - audio/sfx/59_3.asm | 1 - audio/sfx/ball_poof.asm | 1 - audio/sfx/ball_toss.asm | 1 - audio/sfx/battle_1e.asm | 1 - audio/sfx/battle_24.asm | 1 - audio/sfx/battle_27.asm | 12 ++++-------- audio/sfx/battle_28.asm | 2 -- audio/sfx/battle_29.asm | 1 - audio/sfx/battle_2a.asm | 2 -- audio/sfx/battle_2b.asm | 1 - audio/sfx/battle_2c.asm | 2 -- audio/sfx/battle_2e.asm | 2 -- audio/sfx/battle_2f.asm | 2 -- audio/sfx/battle_31.asm | 1 - audio/sfx/battle_32.asm | 1 - audio/sfx/battle_33.asm | 1 - audio/sfx/battle_34.asm | 2 -- audio/sfx/battle_35.asm | 1 - audio/sfx/battle_36.asm | 9 +++------ audio/sfx/caught_mon.asm | 2 -- audio/sfx/cry00_1.asm | 2 -- audio/sfx/cry00_2.asm | 2 -- audio/sfx/cry00_3.asm | 2 -- audio/sfx/cry01_1.asm | 2 -- audio/sfx/cry01_2.asm | 2 -- audio/sfx/cry01_3.asm | 2 -- audio/sfx/cry02_1.asm | 2 -- audio/sfx/cry02_2.asm | 2 -- audio/sfx/cry02_3.asm | 2 -- audio/sfx/cry03_1.asm | 2 -- audio/sfx/cry03_2.asm | 2 -- audio/sfx/cry03_3.asm | 2 -- audio/sfx/cry04_1.asm | 2 -- audio/sfx/cry04_2.asm | 2 -- audio/sfx/cry04_3.asm | 2 -- audio/sfx/cry05_1.asm | 2 -- audio/sfx/cry05_2.asm | 2 -- audio/sfx/cry05_3.asm | 2 -- audio/sfx/cry06_1.asm | 2 -- audio/sfx/cry06_2.asm | 2 -- audio/sfx/cry06_3.asm | 2 -- audio/sfx/cry07_1.asm | 2 -- audio/sfx/cry07_2.asm | 2 -- audio/sfx/cry07_3.asm | 2 -- audio/sfx/cry08_1.asm | 2 -- audio/sfx/cry08_2.asm | 2 -- audio/sfx/cry08_3.asm | 2 -- audio/sfx/cry09_1.asm | 2 -- audio/sfx/cry09_2.asm | 2 -- audio/sfx/cry09_3.asm | 2 -- audio/sfx/cry0a_1.asm | 2 -- audio/sfx/cry0a_2.asm | 2 -- audio/sfx/cry0a_3.asm | 2 -- audio/sfx/cry0b_1.asm | 2 -- audio/sfx/cry0b_2.asm | 2 -- audio/sfx/cry0b_3.asm | 2 -- audio/sfx/cry0c_1.asm | 2 -- audio/sfx/cry0c_2.asm | 2 -- audio/sfx/cry0c_3.asm | 2 -- audio/sfx/cry0d_1.asm | 2 -- audio/sfx/cry0d_2.asm | 2 -- audio/sfx/cry0d_3.asm | 2 -- audio/sfx/cry0e_1.asm | 2 -- audio/sfx/cry0e_2.asm | 2 -- audio/sfx/cry0e_3.asm | 2 -- audio/sfx/cry0f_1.asm | 2 -- audio/sfx/cry0f_2.asm | 2 -- audio/sfx/cry0f_3.asm | 2 -- audio/sfx/cry10_1.asm | 2 -- audio/sfx/cry10_2.asm | 2 -- audio/sfx/cry10_3.asm | 2 -- audio/sfx/cry11_1.asm | 2 -- audio/sfx/cry11_2.asm | 2 -- audio/sfx/cry11_3.asm | 2 -- audio/sfx/cry12_1.asm | 2 -- audio/sfx/cry12_2.asm | 2 -- audio/sfx/cry12_3.asm | 2 -- audio/sfx/cry13_1.asm | 2 -- audio/sfx/cry13_2.asm | 2 -- audio/sfx/cry13_3.asm | 2 -- audio/sfx/cry14_1.asm | 2 -- audio/sfx/cry14_2.asm | 2 -- audio/sfx/cry14_3.asm | 2 -- audio/sfx/cry15_1.asm | 2 -- audio/sfx/cry15_2.asm | 2 -- audio/sfx/cry15_3.asm | 2 -- audio/sfx/cry16_1.asm | 2 -- audio/sfx/cry16_2.asm | 2 -- audio/sfx/cry16_3.asm | 2 -- audio/sfx/cry17_1.asm | 2 -- audio/sfx/cry17_2.asm | 2 -- audio/sfx/cry17_3.asm | 2 -- audio/sfx/cry18_1.asm | 2 -- audio/sfx/cry18_2.asm | 2 -- audio/sfx/cry18_3.asm | 2 -- audio/sfx/cry19_1.asm | 2 -- audio/sfx/cry19_2.asm | 2 -- audio/sfx/cry19_3.asm | 2 -- audio/sfx/cry1a_1.asm | 2 -- audio/sfx/cry1a_2.asm | 2 -- audio/sfx/cry1a_3.asm | 2 -- audio/sfx/cry1b_1.asm | 2 -- audio/sfx/cry1b_2.asm | 2 -- audio/sfx/cry1b_3.asm | 2 -- audio/sfx/cry1c_1.asm | 2 -- audio/sfx/cry1c_2.asm | 2 -- audio/sfx/cry1c_3.asm | 2 -- audio/sfx/cry1d_1.asm | 2 -- audio/sfx/cry1d_2.asm | 2 -- audio/sfx/cry1d_3.asm | 2 -- audio/sfx/cry1e_1.asm | 2 -- audio/sfx/cry1e_2.asm | 2 -- audio/sfx/cry1e_3.asm | 2 -- audio/sfx/cry1f_1.asm | 2 -- audio/sfx/cry1f_2.asm | 2 -- audio/sfx/cry1f_3.asm | 2 -- audio/sfx/cry20_1.asm | 2 -- audio/sfx/cry20_2.asm | 2 -- audio/sfx/cry20_3.asm | 2 -- audio/sfx/cry21_1.asm | 2 -- audio/sfx/cry21_2.asm | 2 -- audio/sfx/cry21_3.asm | 2 -- audio/sfx/cry22_1.asm | 2 -- audio/sfx/cry22_2.asm | 2 -- audio/sfx/cry22_3.asm | 2 -- audio/sfx/cry23_1.asm | 2 -- audio/sfx/cry23_2.asm | 2 -- audio/sfx/cry23_3.asm | 2 -- audio/sfx/cry24_1.asm | 2 -- audio/sfx/cry24_2.asm | 2 -- audio/sfx/cry24_3.asm | 2 -- audio/sfx/cry25_1.asm | 2 -- audio/sfx/cry25_2.asm | 2 -- audio/sfx/cry25_3.asm | 2 -- audio/sfx/denied_1.asm | 1 - audio/sfx/denied_3.asm | 1 - audio/sfx/dex_page_added.asm | 1 - audio/sfx/faint_thud.asm | 1 - audio/sfx/get_item1_1.asm | 2 -- audio/sfx/get_item1_3.asm | 2 -- audio/sfx/get_item2_1.asm | 2 -- audio/sfx/get_item2_2.asm | 2 -- audio/sfx/get_item2_3.asm | 2 -- audio/sfx/get_key_item_1.asm | 2 -- audio/sfx/get_key_item_3.asm | 2 -- audio/sfx/level_up.asm | 2 -- audio/sfx/pokedex_rating_1.asm | 2 -- audio/sfx/pokedex_rating_3.asm | 2 -- audio/sfx/pokeflute_ch5_ch6.asm | 1 - audio/sfx/psybeam.asm | 2 -- audio/sfx/psychic_m.asm | 2 -- audio/sfx/purchase_1.asm | 1 - audio/sfx/purchase_3.asm | 1 - audio/sfx/save_1.asm | 1 - audio/sfx/save_3.asm | 1 - audio/sfx/slots_new_spin.asm | 1 - audio/sfx/ss_anne_horn_1.asm | 1 - audio/sfx/ss_anne_horn_3.asm | 1 - audio/sfx/swap_1.asm | 1 - audio/sfx/swap_3.asm | 1 - audio/sfx/unused_cry_1.asm | 2 -- audio/sfx/unused_cry_2.asm | 2 -- audio/sfx/unused_cry_3.asm | 2 -- 164 files changed, 7 insertions(+), 312 deletions(-) diff --git a/audio/sfx/59_1.asm b/audio/sfx/59_1.asm index ef9098326..64292bc22 100644 --- a/audio/sfx/59_1.asm +++ b/audio/sfx/59_1.asm @@ -3,7 +3,6 @@ SFX_59_1_Ch5: square_note 4, 15, 1, 1920 sound_ret - SFX_59_1_Ch6: duty_cycle 2 square_note 1, 0, 8, 0 diff --git a/audio/sfx/59_3.asm b/audio/sfx/59_3.asm index 7510842fd..bfcd1e485 100644 --- a/audio/sfx/59_3.asm +++ b/audio/sfx/59_3.asm @@ -3,7 +3,6 @@ SFX_59_3_Ch5: square_note 4, 15, 1, 1920 sound_ret - SFX_59_3_Ch6: duty_cycle 2 square_note 1, 0, 8, 0 diff --git a/audio/sfx/ball_poof.asm b/audio/sfx/ball_poof.asm index 396adf443..8210406b0 100644 --- a/audio/sfx/ball_poof.asm +++ b/audio/sfx/ball_poof.asm @@ -5,7 +5,6 @@ SFX_Ball_Poof_Ch5: pitch_sweep 0, 8 sound_ret - SFX_Ball_Poof_Ch8: noise_note 15, 10, 2, 34 sound_ret diff --git a/audio/sfx/ball_toss.asm b/audio/sfx/ball_toss.asm index 207bf720a..065e472c4 100644 --- a/audio/sfx/ball_toss.asm +++ b/audio/sfx/ball_toss.asm @@ -4,7 +4,6 @@ SFX_Ball_Toss_Ch5: square_note 15, 15, 2, 1920 sound_ret - SFX_Ball_Toss_Ch6: duty_cycle 2 square_note 15, 12, 2, 1922 diff --git a/audio/sfx/battle_1e.asm b/audio/sfx/battle_1e.asm index 26820e8de..9b04ef49e 100644 --- a/audio/sfx/battle_1e.asm +++ b/audio/sfx/battle_1e.asm @@ -7,7 +7,6 @@ SFX_Battle_1E_Ch5: pitch_sweep 0, 8 sound_ret - SFX_Battle_1E_Ch8: noise_note 0, 13, 1, 66 noise_note 4, 10, 1, 50 diff --git a/audio/sfx/battle_24.asm b/audio/sfx/battle_24.asm index f99cf59a7..4f53b3685 100644 --- a/audio/sfx/battle_24.asm +++ b/audio/sfx/battle_24.asm @@ -5,7 +5,6 @@ SFX_Battle_24_Ch5: pitch_sweep 0, 8 sound_ret - SFX_Battle_24_Ch8: noise_note 15, 3, -7, 34 noise_note 15, 15, 2, 33 diff --git a/audio/sfx/battle_27.asm b/audio/sfx/battle_27.asm index 1b505811b..d7b3e0ff1 100644 --- a/audio/sfx/battle_27.asm +++ b/audio/sfx/battle_27.asm @@ -1,25 +1,21 @@ SFX_Battle_27_Ch5: duty_cycle 2 square_note 15, 3, -7, 1984 - -SFX_Battle_27_branch_2062a: +.loop1: square_note 15, 13, -7, 1984 - sound_loop 4, SFX_Battle_27_branch_2062a + sound_loop 4, .loop1 square_note 15, 13, 1, 1984 sound_ret - SFX_Battle_27_Ch6: duty_cycle_pattern 2, 3, 0, 3 square_note 15, 2, -7, 1992 - -SFX_Battle_27_branch_2063d: +.loop1: square_note 15, 12, -7, 1991 - sound_loop 4, SFX_Battle_27_branch_2063d + sound_loop 4, .loop1 square_note 15, 12, 1, 1992 sound_ret - SFX_Battle_27_Ch8: noise_note 3, 9, 7, 18 noise_note 3, 10, 1, 17 diff --git a/audio/sfx/battle_28.asm b/audio/sfx/battle_28.asm index 467e411d0..5913c7a3e 100644 --- a/audio/sfx/battle_28.asm +++ b/audio/sfx/battle_28.asm @@ -5,7 +5,6 @@ SFX_Battle_28_Ch5: sound_loop 12, SFX_Battle_28_Ch5 sound_ret - SFX_Battle_28_Ch6: duty_cycle_pattern 2, 3, 0, 3 square_note 0, 14, 1, 1985 @@ -13,7 +12,6 @@ SFX_Battle_28_Ch6: sound_loop 12, SFX_Battle_28_Ch6 sound_ret - SFX_Battle_28_Ch8: noise_note 1, 13, 1, 73 noise_note 1, 13, 1, 41 diff --git a/audio/sfx/battle_29.asm b/audio/sfx/battle_29.asm index c3999ec87..e6b85bc62 100644 --- a/audio/sfx/battle_29.asm +++ b/audio/sfx/battle_29.asm @@ -7,7 +7,6 @@ SFX_Battle_29_Ch5: square_note 15, 12, 2, 272 sound_ret - SFX_Battle_29_Ch8: noise_note 10, 15, 3, 53 noise_note 14, 15, 6, 69 diff --git a/audio/sfx/battle_2a.asm b/audio/sfx/battle_2a.asm index 1faf2dda4..7a746b5fc 100644 --- a/audio/sfx/battle_2a.asm +++ b/audio/sfx/battle_2a.asm @@ -8,7 +8,6 @@ SFX_Battle_2A_Ch5: square_note 8, 13, 1, 1536 sound_ret - SFX_Battle_2A_Ch6: duty_cycle_pattern 2, 0, 3, 1 square_note 5, 14, 4, 1504 @@ -18,7 +17,6 @@ SFX_Battle_2A_Ch6: sound_loop 3, SFX_Battle_2A_Ch6 sound_ret - SFX_Battle_2A_Ch8: noise_note 5, 12, 3, 51 noise_note 3, 9, 2, 67 diff --git a/audio/sfx/battle_2b.asm b/audio/sfx/battle_2b.asm index d60a96f6f..e39cd73d6 100644 --- a/audio/sfx/battle_2b.asm +++ b/audio/sfx/battle_2b.asm @@ -9,7 +9,6 @@ SFX_Battle_2B_Ch5: square_note 8, 8, 1, 1024 sound_ret - SFX_Battle_2B_Ch8: noise_note 3, 6, 2, 34 noise_note 3, 10, 2, 50 diff --git a/audio/sfx/battle_2c.asm b/audio/sfx/battle_2c.asm index 7530210fd..ed4ad5371 100644 --- a/audio/sfx/battle_2c.asm +++ b/audio/sfx/battle_2c.asm @@ -6,7 +6,6 @@ SFX_Battle_2C_Ch5: sound_loop 3, SFX_Battle_2C_Ch5 sound_ret - SFX_Battle_2C_Ch6: duty_cycle_pattern 2, 0, 3, 1 square_note 7, 14, 4, 1072 @@ -15,7 +14,6 @@ SFX_Battle_2C_Ch6: sound_loop 4, SFX_Battle_2C_Ch6 sound_ret - SFX_Battle_2C_Ch8: noise_note 9, 15, 4, 68 noise_note 9, 15, 2, 67 diff --git a/audio/sfx/battle_2e.asm b/audio/sfx/battle_2e.asm index ab5665fa7..57f7fe51b 100644 --- a/audio/sfx/battle_2e.asm +++ b/audio/sfx/battle_2e.asm @@ -7,7 +7,6 @@ SFX_Battle_2E_Ch5: sound_loop 8, SFX_Battle_2E_Ch5 sound_ret - SFX_Battle_2E_Ch6: duty_cycle_pattern 2, 3, 0, 3 square_note 2, 14, 1, 770 @@ -17,7 +16,6 @@ SFX_Battle_2E_Ch6: sound_loop 8, SFX_Battle_2E_Ch6 sound_ret - SFX_Battle_2E_Ch8: noise_note 2, 13, 3, 16 noise_note 3, 13, 3, 17 diff --git a/audio/sfx/battle_2f.asm b/audio/sfx/battle_2f.asm index dd80e5993..0918f50e2 100644 --- a/audio/sfx/battle_2f.asm +++ b/audio/sfx/battle_2f.asm @@ -5,7 +5,6 @@ SFX_Battle_2F_Ch5: sound_loop 8, SFX_Battle_2F_Ch5 sound_ret - SFX_Battle_2F_Ch6: duty_cycle_pattern 2, 3, 0, 3 square_note 4, 14, 2, 514 @@ -13,7 +12,6 @@ SFX_Battle_2F_Ch6: sound_loop 9, SFX_Battle_2F_Ch6 sound_ret - SFX_Battle_2F_Ch8: noise_note 4, 15, -7, 67 noise_note 4, 15, 2, 68 diff --git a/audio/sfx/battle_31.asm b/audio/sfx/battle_31.asm index 83dc96f43..7996a7c27 100644 --- a/audio/sfx/battle_31.asm +++ b/audio/sfx/battle_31.asm @@ -7,7 +7,6 @@ SFX_Battle_31_Ch5: square_note 15, 15, 2, 2016 sound_ret - SFX_Battle_31_Ch6: duty_cycle 3 square_note 15, 15, -7, 2018 diff --git a/audio/sfx/battle_32.asm b/audio/sfx/battle_32.asm index c906dcacd..d1eaf472b 100644 --- a/audio/sfx/battle_32.asm +++ b/audio/sfx/battle_32.asm @@ -5,7 +5,6 @@ SFX_Battle_32_Ch5: pitch_sweep 0, 8 sound_ret - SFX_Battle_32_Ch6: duty_cycle 3 square_note 8, 15, 1, 1793 diff --git a/audio/sfx/battle_33.asm b/audio/sfx/battle_33.asm index 95afe0455..85e303471 100644 --- a/audio/sfx/battle_33.asm +++ b/audio/sfx/battle_33.asm @@ -7,7 +7,6 @@ SFX_Battle_33_Ch5: square_note 8, 15, 1, 1792 sound_ret - SFX_Battle_33_Ch6: duty_cycle 3 square_note 6, 14, 1, 1296 diff --git a/audio/sfx/battle_34.asm b/audio/sfx/battle_34.asm index 654049e45..a52e83327 100644 --- a/audio/sfx/battle_34.asm +++ b/audio/sfx/battle_34.asm @@ -5,7 +5,6 @@ SFX_Battle_34_Ch5: square_note 15, 15, 3, 1024 sound_ret - SFX_Battle_34_Ch6: duty_cycle_pattern 2, 3, 1, 0 square_note 8, 14, -7, 960 @@ -13,7 +12,6 @@ SFX_Battle_34_Ch6: square_note 15, 14, 3, 960 sound_ret - SFX_Battle_34_Ch8: noise_note 4, 15, -7, 81 noise_note 8, 15, -7, 84 diff --git a/audio/sfx/battle_35.asm b/audio/sfx/battle_35.asm index e9f786575..b0cc12674 100644 --- a/audio/sfx/battle_35.asm +++ b/audio/sfx/battle_35.asm @@ -12,7 +12,6 @@ SFX_Battle_35_Ch5: note G#, 8 sound_ret - SFX_Battle_35_Ch6: execute_music vibrato 10, 2, 3 diff --git a/audio/sfx/battle_36.asm b/audio/sfx/battle_36.asm index 773bf7538..e029c2496 100644 --- a/audio/sfx/battle_36.asm +++ b/audio/sfx/battle_36.asm @@ -11,15 +11,13 @@ SFX_Battle_36_Ch5: square_note 2, 15, 1, 1984 square_note 2, 15, 1, 1792 square_note 2, 15, 1, 2000 - -SFX_Battle_36_branch_20930: +.loop1: square_note 2, 15, 1, 1792 square_note 2, 15, 1, 2016 - sound_loop 12, SFX_Battle_36_branch_20930 + sound_loop 12, .loop1 square_note 15, 15, 1, 1792 sound_ret - SFX_Battle_36_Ch6: duty_cycle_pattern 2, 3, 0, 3 square_note 2, 15, 1, 1921 @@ -35,11 +33,10 @@ SFX_Battle_36_Ch6: square_note 2, 15, 1, 2001 square_note 2, 15, 1, 1793 square_note 2, 15, 1, 2017 - sound_loop 12, SFX_Battle_36_branch_20930 + sound_loop 12, SFX_Battle_36_Ch5.loop1 square_note 15, 15, 1, 1793 sound_ret - SFX_Battle_36_Ch8: noise_note 1, 13, 1, 73 noise_note 1, 13, 1, 41 diff --git a/audio/sfx/caught_mon.asm b/audio/sfx/caught_mon.asm index 3fe278f3a..aeae799dd 100644 --- a/audio/sfx/caught_mon.asm +++ b/audio/sfx/caught_mon.asm @@ -21,7 +21,6 @@ SFX_Caught_Mon_Ch5: note E_, 8 sound_ret - SFX_Caught_Mon_Ch6: execute_music duty_cycle 2 @@ -43,7 +42,6 @@ SFX_Caught_Mon_Ch6: note G#, 8 sound_ret - SFX_Caught_Mon_Ch7: execute_music note_type 6, 1, 0 diff --git a/audio/sfx/cry00_1.asm b/audio/sfx/cry00_1.asm index 22a416349..8bcd5c7ca 100644 --- a/audio/sfx/cry00_1.asm +++ b/audio/sfx/cry00_1.asm @@ -5,7 +5,6 @@ SFX_Cry00_1_Ch5: square_note 8, 9, 1, 1880 sound_ret - SFX_Cry00_1_Ch6: duty_cycle_pattern 2, 2, 0, 0 square_note 5, 11, 3, 1800 @@ -13,7 +12,6 @@ SFX_Cry00_1_Ch6: square_note 8, 7, 1, 1864 sound_ret - SFX_Cry00_1_Ch8: noise_note 3, 10, 1, 28 noise_note 14, 9, 4, 44 diff --git a/audio/sfx/cry00_2.asm b/audio/sfx/cry00_2.asm index 97d17e8f0..df8fabc63 100644 --- a/audio/sfx/cry00_2.asm +++ b/audio/sfx/cry00_2.asm @@ -5,7 +5,6 @@ SFX_Cry00_2_Ch5: square_note 8, 9, 1, 1880 sound_ret - SFX_Cry00_2_Ch6: duty_cycle_pattern 2, 2, 0, 0 square_note 5, 11, 3, 1800 @@ -13,7 +12,6 @@ SFX_Cry00_2_Ch6: square_note 8, 7, 1, 1864 sound_ret - SFX_Cry00_2_Ch8: noise_note 3, 10, 1, 28 noise_note 14, 9, 4, 44 diff --git a/audio/sfx/cry00_3.asm b/audio/sfx/cry00_3.asm index e332c35ef..bc3c4977c 100644 --- a/audio/sfx/cry00_3.asm +++ b/audio/sfx/cry00_3.asm @@ -5,7 +5,6 @@ SFX_Cry00_3_Ch5: square_note 8, 9, 1, 1880 sound_ret - SFX_Cry00_3_Ch6: duty_cycle_pattern 2, 2, 0, 0 square_note 5, 11, 3, 1800 @@ -13,7 +12,6 @@ SFX_Cry00_3_Ch6: square_note 8, 7, 1, 1864 sound_ret - SFX_Cry00_3_Ch8: noise_note 3, 10, 1, 28 noise_note 14, 9, 4, 44 diff --git a/audio/sfx/cry01_1.asm b/audio/sfx/cry01_1.asm index cb35392b2..51d468c21 100644 --- a/audio/sfx/cry01_1.asm +++ b/audio/sfx/cry01_1.asm @@ -6,7 +6,6 @@ SFX_Cry01_1_Ch5: square_note 8, 13, 1, 1808 sound_ret - SFX_Cry01_1_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 5, 11, 3, 1777 @@ -15,7 +14,6 @@ SFX_Cry01_1_Ch6: square_note 8, 11, 1, 1537 sound_ret - SFX_Cry01_1_Ch8: noise_note 3, 10, 2, 60 noise_note 12, 9, 4, 44 diff --git a/audio/sfx/cry01_2.asm b/audio/sfx/cry01_2.asm index 449adac79..31c130a67 100644 --- a/audio/sfx/cry01_2.asm +++ b/audio/sfx/cry01_2.asm @@ -6,7 +6,6 @@ SFX_Cry01_2_Ch5: square_note 8, 13, 1, 1808 sound_ret - SFX_Cry01_2_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 5, 11, 3, 1777 @@ -15,7 +14,6 @@ SFX_Cry01_2_Ch6: square_note 8, 11, 1, 1537 sound_ret - SFX_Cry01_2_Ch8: noise_note 3, 10, 2, 60 noise_note 12, 9, 4, 44 diff --git a/audio/sfx/cry01_3.asm b/audio/sfx/cry01_3.asm index ef8e5e8cc..5e8e8ea9f 100644 --- a/audio/sfx/cry01_3.asm +++ b/audio/sfx/cry01_3.asm @@ -6,7 +6,6 @@ SFX_Cry01_3_Ch5: square_note 8, 13, 1, 1808 sound_ret - SFX_Cry01_3_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 5, 11, 3, 1777 @@ -15,7 +14,6 @@ SFX_Cry01_3_Ch6: square_note 8, 11, 1, 1537 sound_ret - SFX_Cry01_3_Ch8: noise_note 3, 10, 2, 60 noise_note 12, 9, 4, 44 diff --git a/audio/sfx/cry02_1.asm b/audio/sfx/cry02_1.asm index 3db37e974..3191ac1f7 100644 --- a/audio/sfx/cry02_1.asm +++ b/audio/sfx/cry02_1.asm @@ -5,13 +5,11 @@ SFX_Cry02_1_Ch5: square_note 8, 13, 1, 1500 sound_ret - SFX_Cry02_1_Ch6: duty_cycle_pattern 2, 2, 1, 1 square_note 7, 9, 5, 1089 square_note 2, 8, 1, 1313 square_note 8, 6, 1, 1306 - SFX_Cry02_1_Ch8: sound_ret diff --git a/audio/sfx/cry02_2.asm b/audio/sfx/cry02_2.asm index a623e071d..9657bb510 100644 --- a/audio/sfx/cry02_2.asm +++ b/audio/sfx/cry02_2.asm @@ -5,13 +5,11 @@ SFX_Cry02_2_Ch5: square_note 8, 13, 1, 1500 sound_ret - SFX_Cry02_2_Ch6: duty_cycle_pattern 2, 2, 1, 1 square_note 7, 9, 5, 1089 square_note 2, 8, 1, 1313 square_note 8, 6, 1, 1306 - SFX_Cry02_2_Ch8: sound_ret diff --git a/audio/sfx/cry02_3.asm b/audio/sfx/cry02_3.asm index 4e0861d1d..6a7d5bc8d 100644 --- a/audio/sfx/cry02_3.asm +++ b/audio/sfx/cry02_3.asm @@ -5,13 +5,11 @@ SFX_Cry02_3_Ch5: square_note 8, 13, 1, 1500 sound_ret - SFX_Cry02_3_Ch6: duty_cycle_pattern 2, 2, 1, 1 square_note 7, 9, 5, 1089 square_note 2, 8, 1, 1313 square_note 8, 6, 1, 1306 - SFX_Cry02_3_Ch8: sound_ret diff --git a/audio/sfx/cry03_1.asm b/audio/sfx/cry03_1.asm index cb58c394a..34f348f6f 100644 --- a/audio/sfx/cry03_1.asm +++ b/audio/sfx/cry03_1.asm @@ -9,7 +9,6 @@ SFX_Cry03_1_Ch5: square_note 8, 14, 1, 1408 sound_ret - SFX_Cry03_1_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 4, 12, 7, 1284 @@ -21,7 +20,6 @@ SFX_Cry03_1_Ch6: square_note 8, 12, 1, 1154 sound_ret - SFX_Cry03_1_Ch8: noise_note 12, 14, 4, 76 noise_note 10, 12, 7, 92 diff --git a/audio/sfx/cry03_2.asm b/audio/sfx/cry03_2.asm index 2813ce1a4..92abf5629 100644 --- a/audio/sfx/cry03_2.asm +++ b/audio/sfx/cry03_2.asm @@ -9,7 +9,6 @@ SFX_Cry03_2_Ch5: square_note 8, 14, 1, 1408 sound_ret - SFX_Cry03_2_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 4, 12, 7, 1284 @@ -21,7 +20,6 @@ SFX_Cry03_2_Ch6: square_note 8, 12, 1, 1154 sound_ret - SFX_Cry03_2_Ch8: noise_note 12, 14, 4, 76 noise_note 10, 12, 7, 92 diff --git a/audio/sfx/cry03_3.asm b/audio/sfx/cry03_3.asm index ae561a7a4..58919104f 100644 --- a/audio/sfx/cry03_3.asm +++ b/audio/sfx/cry03_3.asm @@ -9,7 +9,6 @@ SFX_Cry03_3_Ch5: square_note 8, 14, 1, 1408 sound_ret - SFX_Cry03_3_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 4, 12, 7, 1284 @@ -21,7 +20,6 @@ SFX_Cry03_3_Ch6: square_note 8, 12, 1, 1154 sound_ret - SFX_Cry03_3_Ch8: noise_note 12, 14, 4, 76 noise_note 10, 12, 7, 92 diff --git a/audio/sfx/cry04_1.asm b/audio/sfx/cry04_1.asm index 24662192b..21b188151 100644 --- a/audio/sfx/cry04_1.asm +++ b/audio/sfx/cry04_1.asm @@ -9,7 +9,6 @@ SFX_Cry04_1_Ch5: square_note 8, 11, 1, 1552 sound_ret - SFX_Cry04_1_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 4, 14, 7, 1537 @@ -21,7 +20,6 @@ SFX_Cry04_1_Ch6: square_note 8, 10, 1, 1393 sound_ret - SFX_Cry04_1_Ch8: noise_note 7, 13, 6, 92 noise_note 8, 14, 6, 76 diff --git a/audio/sfx/cry04_2.asm b/audio/sfx/cry04_2.asm index f18fd9cd9..1b96453a4 100644 --- a/audio/sfx/cry04_2.asm +++ b/audio/sfx/cry04_2.asm @@ -9,7 +9,6 @@ SFX_Cry04_2_Ch5: square_note 8, 11, 1, 1552 sound_ret - SFX_Cry04_2_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 4, 14, 7, 1537 @@ -21,7 +20,6 @@ SFX_Cry04_2_Ch6: square_note 8, 10, 1, 1393 sound_ret - SFX_Cry04_2_Ch8: noise_note 7, 13, 6, 92 noise_note 8, 14, 6, 76 diff --git a/audio/sfx/cry04_3.asm b/audio/sfx/cry04_3.asm index 718af40f9..448c440ed 100644 --- a/audio/sfx/cry04_3.asm +++ b/audio/sfx/cry04_3.asm @@ -9,7 +9,6 @@ SFX_Cry04_3_Ch5: square_note 8, 11, 1, 1552 sound_ret - SFX_Cry04_3_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 4, 14, 7, 1537 @@ -21,7 +20,6 @@ SFX_Cry04_3_Ch6: square_note 8, 10, 1, 1393 sound_ret - SFX_Cry04_3_Ch8: noise_note 7, 13, 6, 92 noise_note 8, 14, 6, 76 diff --git a/audio/sfx/cry05_1.asm b/audio/sfx/cry05_1.asm index 1c3fce204..5a65899a6 100644 --- a/audio/sfx/cry05_1.asm +++ b/audio/sfx/cry05_1.asm @@ -6,7 +6,6 @@ SFX_Cry05_1_Ch5: square_note 8, 10, 1, 1376 sound_ret - SFX_Cry05_1_Ch6: duty_cycle_pattern 3, 3, 1, 1 square_note 6, 14, 2, 1154 @@ -14,6 +13,5 @@ SFX_Cry05_1_Ch6: square_note 6, 11, 2, 1250 square_note 8, 8, 1, 1217 - SFX_Cry05_1_Ch8: sound_ret diff --git a/audio/sfx/cry05_2.asm b/audio/sfx/cry05_2.asm index 53f076f29..660491efa 100644 --- a/audio/sfx/cry05_2.asm +++ b/audio/sfx/cry05_2.asm @@ -6,7 +6,6 @@ SFX_Cry05_2_Ch5: square_note 8, 10, 1, 1376 sound_ret - SFX_Cry05_2_Ch6: duty_cycle_pattern 3, 3, 1, 1 square_note 6, 14, 2, 1154 @@ -14,6 +13,5 @@ SFX_Cry05_2_Ch6: square_note 6, 11, 2, 1250 square_note 8, 8, 1, 1217 - SFX_Cry05_2_Ch8: sound_ret diff --git a/audio/sfx/cry05_3.asm b/audio/sfx/cry05_3.asm index 2d5b02b80..842421513 100644 --- a/audio/sfx/cry05_3.asm +++ b/audio/sfx/cry05_3.asm @@ -6,7 +6,6 @@ SFX_Cry05_3_Ch5: square_note 8, 10, 1, 1376 sound_ret - SFX_Cry05_3_Ch6: duty_cycle_pattern 3, 3, 1, 1 square_note 6, 14, 2, 1154 @@ -14,6 +13,5 @@ SFX_Cry05_3_Ch6: square_note 6, 11, 2, 1250 square_note 8, 8, 1, 1217 - SFX_Cry05_3_Ch8: sound_ret diff --git a/audio/sfx/cry06_1.asm b/audio/sfx/cry06_1.asm index 03b75b0a0..bdd9f4143 100644 --- a/audio/sfx/cry06_1.asm +++ b/audio/sfx/cry06_1.asm @@ -7,11 +7,9 @@ SFX_Cry06_1_Ch5: square_note 15, 8, 2, 549 square_note 15, 4, 2, 519 - SFX_Cry06_1_Ch6: sound_ret - SFX_Cry06_1_Ch8: noise_note 8, 13, 4, 140 noise_note 4, 14, 2, 156 diff --git a/audio/sfx/cry06_2.asm b/audio/sfx/cry06_2.asm index 6ddbfeb0d..dd5938ad7 100644 --- a/audio/sfx/cry06_2.asm +++ b/audio/sfx/cry06_2.asm @@ -7,11 +7,9 @@ SFX_Cry06_2_Ch5: square_note 15, 8, 2, 549 square_note 15, 4, 2, 519 - SFX_Cry06_2_Ch6: sound_ret - SFX_Cry06_2_Ch8: noise_note 8, 13, 4, 140 noise_note 4, 14, 2, 156 diff --git a/audio/sfx/cry06_3.asm b/audio/sfx/cry06_3.asm index d509053b9..7dd94de35 100644 --- a/audio/sfx/cry06_3.asm +++ b/audio/sfx/cry06_3.asm @@ -7,11 +7,9 @@ SFX_Cry06_3_Ch5: square_note 15, 8, 2, 549 square_note 15, 4, 2, 519 - SFX_Cry06_3_Ch6: sound_ret - SFX_Cry06_3_Ch8: noise_note 8, 13, 4, 140 noise_note 4, 14, 2, 156 diff --git a/audio/sfx/cry07_1.asm b/audio/sfx/cry07_1.asm index 3733e7462..86c61da73 100644 --- a/audio/sfx/cry07_1.asm +++ b/audio/sfx/cry07_1.asm @@ -5,7 +5,6 @@ SFX_Cry07_1_Ch5: square_note 8, 12, 1, 1568 sound_ret - SFX_Cry07_1_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 3, 12, 3, 1667 @@ -13,7 +12,6 @@ SFX_Cry07_1_Ch6: square_note 8, 10, 1, 1537 sound_ret - SFX_Cry07_1_Ch8: noise_note 4, 13, 3, 92 noise_note 15, 14, 6, 76 diff --git a/audio/sfx/cry07_2.asm b/audio/sfx/cry07_2.asm index 6a134397e..d4aa6ce2d 100644 --- a/audio/sfx/cry07_2.asm +++ b/audio/sfx/cry07_2.asm @@ -5,7 +5,6 @@ SFX_Cry07_2_Ch5: square_note 8, 12, 1, 1568 sound_ret - SFX_Cry07_2_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 3, 12, 3, 1667 @@ -13,7 +12,6 @@ SFX_Cry07_2_Ch6: square_note 8, 10, 1, 1537 sound_ret - SFX_Cry07_2_Ch8: noise_note 4, 13, 3, 92 noise_note 15, 14, 6, 76 diff --git a/audio/sfx/cry07_3.asm b/audio/sfx/cry07_3.asm index a8b60f380..213335dfc 100644 --- a/audio/sfx/cry07_3.asm +++ b/audio/sfx/cry07_3.asm @@ -5,7 +5,6 @@ SFX_Cry07_3_Ch5: square_note 8, 12, 1, 1568 sound_ret - SFX_Cry07_3_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 3, 12, 3, 1667 @@ -13,7 +12,6 @@ SFX_Cry07_3_Ch6: square_note 8, 10, 1, 1537 sound_ret - SFX_Cry07_3_Ch8: noise_note 4, 13, 3, 92 noise_note 15, 14, 6, 76 diff --git a/audio/sfx/cry08_1.asm b/audio/sfx/cry08_1.asm index 92f17fa84..1950e1ffc 100644 --- a/audio/sfx/cry08_1.asm +++ b/audio/sfx/cry08_1.asm @@ -6,7 +6,6 @@ SFX_Cry08_1_Ch5: square_note 15, 11, 2, 1340 sound_ret - SFX_Cry08_1_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 14, 13, 6, 1283 @@ -15,7 +14,6 @@ SFX_Cry08_1_Ch6: square_note 15, 10, 2, 1243 sound_ret - SFX_Cry08_1_Ch8: noise_note 12, 14, 6, 76 noise_note 11, 13, 7, 92 diff --git a/audio/sfx/cry08_2.asm b/audio/sfx/cry08_2.asm index 53ac28912..7b6bb949c 100644 --- a/audio/sfx/cry08_2.asm +++ b/audio/sfx/cry08_2.asm @@ -6,7 +6,6 @@ SFX_Cry08_2_Ch5: square_note 15, 11, 2, 1340 sound_ret - SFX_Cry08_2_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 14, 13, 6, 1283 @@ -15,7 +14,6 @@ SFX_Cry08_2_Ch6: square_note 15, 10, 2, 1243 sound_ret - SFX_Cry08_2_Ch8: noise_note 12, 14, 6, 76 noise_note 11, 13, 7, 92 diff --git a/audio/sfx/cry08_3.asm b/audio/sfx/cry08_3.asm index 81bcf3607..850f452d8 100644 --- a/audio/sfx/cry08_3.asm +++ b/audio/sfx/cry08_3.asm @@ -6,7 +6,6 @@ SFX_Cry08_3_Ch5: square_note 15, 11, 2, 1340 sound_ret - SFX_Cry08_3_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 14, 13, 6, 1283 @@ -15,7 +14,6 @@ SFX_Cry08_3_Ch6: square_note 15, 10, 2, 1243 sound_ret - SFX_Cry08_3_Ch8: noise_note 12, 14, 6, 76 noise_note 11, 13, 7, 92 diff --git a/audio/sfx/cry09_1.asm b/audio/sfx/cry09_1.asm index f8c600bd4..a59ef2884 100644 --- a/audio/sfx/cry09_1.asm +++ b/audio/sfx/cry09_1.asm @@ -9,7 +9,6 @@ SFX_Cry09_1_Ch5: square_note 15, 15, 2, 2008 sound_ret - SFX_Cry09_1_Ch6: duty_cycle_pattern 0, 0, 1, 1 square_note 2, 0, 8, 0 @@ -22,7 +21,6 @@ SFX_Cry09_1_Ch6: square_note 15, 10, 2, 1751 sound_ret - SFX_Cry09_1_Ch8: noise_note 2, 15, 2, 60 noise_note 8, 14, 4, 62 diff --git a/audio/sfx/cry09_2.asm b/audio/sfx/cry09_2.asm index 12965e077..683b5b527 100644 --- a/audio/sfx/cry09_2.asm +++ b/audio/sfx/cry09_2.asm @@ -9,7 +9,6 @@ SFX_Cry09_2_Ch5: square_note 15, 15, 2, 2008 sound_ret - SFX_Cry09_2_Ch6: duty_cycle_pattern 0, 0, 1, 1 square_note 2, 0, 8, 0 @@ -22,7 +21,6 @@ SFX_Cry09_2_Ch6: square_note 15, 10, 2, 1751 sound_ret - SFX_Cry09_2_Ch8: noise_note 2, 15, 2, 60 noise_note 8, 14, 4, 62 diff --git a/audio/sfx/cry09_3.asm b/audio/sfx/cry09_3.asm index 2c85d7500..e77ec78dd 100644 --- a/audio/sfx/cry09_3.asm +++ b/audio/sfx/cry09_3.asm @@ -9,7 +9,6 @@ SFX_Cry09_3_Ch5: square_note 15, 15, 2, 2008 sound_ret - SFX_Cry09_3_Ch6: duty_cycle_pattern 0, 0, 1, 1 square_note 2, 0, 8, 0 @@ -22,7 +21,6 @@ SFX_Cry09_3_Ch6: square_note 15, 10, 2, 1751 sound_ret - SFX_Cry09_3_Ch8: noise_note 2, 15, 2, 60 noise_note 8, 14, 4, 62 diff --git a/audio/sfx/cry0a_1.asm b/audio/sfx/cry0a_1.asm index bcb718447..5d9dc5fa1 100644 --- a/audio/sfx/cry0a_1.asm +++ b/audio/sfx/cry0a_1.asm @@ -9,7 +9,6 @@ SFX_Cry0A_1_Ch5: square_note 15, 10, 2, 1736 sound_ret - SFX_Cry0A_1_Ch6: duty_cycle_pattern 0, 0, 1, 1 square_note 3, 0, 8, 0 @@ -22,7 +21,6 @@ SFX_Cry0A_1_Ch6: square_note 15, 7, 2, 1673 sound_ret - SFX_Cry0A_1_Ch8: noise_note 2, 15, 2, 60 noise_note 8, 14, 4, 62 diff --git a/audio/sfx/cry0a_2.asm b/audio/sfx/cry0a_2.asm index fb365e91a..a2c9e97e2 100644 --- a/audio/sfx/cry0a_2.asm +++ b/audio/sfx/cry0a_2.asm @@ -9,7 +9,6 @@ SFX_Cry0A_2_Ch5: square_note 15, 10, 2, 1736 sound_ret - SFX_Cry0A_2_Ch6: duty_cycle_pattern 0, 0, 1, 1 square_note 3, 0, 8, 0 @@ -22,7 +21,6 @@ SFX_Cry0A_2_Ch6: square_note 15, 7, 2, 1673 sound_ret - SFX_Cry0A_2_Ch8: noise_note 2, 15, 2, 60 noise_note 8, 14, 4, 62 diff --git a/audio/sfx/cry0a_3.asm b/audio/sfx/cry0a_3.asm index bf6dfcf13..281297366 100644 --- a/audio/sfx/cry0a_3.asm +++ b/audio/sfx/cry0a_3.asm @@ -9,7 +9,6 @@ SFX_Cry0A_3_Ch5: square_note 15, 10, 2, 1736 sound_ret - SFX_Cry0A_3_Ch6: duty_cycle_pattern 0, 0, 1, 1 square_note 3, 0, 8, 0 @@ -22,7 +21,6 @@ SFX_Cry0A_3_Ch6: square_note 15, 7, 2, 1673 sound_ret - SFX_Cry0A_3_Ch8: noise_note 2, 15, 2, 60 noise_note 8, 14, 4, 62 diff --git a/audio/sfx/cry0b_1.asm b/audio/sfx/cry0b_1.asm index 51e445aba..8336817c6 100644 --- a/audio/sfx/cry0b_1.asm +++ b/audio/sfx/cry0b_1.asm @@ -12,7 +12,6 @@ SFX_Cry0B_1_Ch5: square_note 8, 11, 1, 1857 sound_ret - SFX_Cry0B_1_Ch6: duty_cycle_pattern 1, 0, 1, 0 square_note 12, 0, 8, 0 @@ -24,7 +23,6 @@ SFX_Cry0B_1_Ch6: square_note 8, 13, 1, 1793 sound_ret - SFX_Cry0B_1_Ch8: noise_note 15, 0, 8, 0 noise_note 4, 0, 8, 0 diff --git a/audio/sfx/cry0b_2.asm b/audio/sfx/cry0b_2.asm index 68cb0ba69..37b22af9e 100644 --- a/audio/sfx/cry0b_2.asm +++ b/audio/sfx/cry0b_2.asm @@ -12,7 +12,6 @@ SFX_Cry0B_2_Ch5: square_note 8, 11, 1, 1857 sound_ret - SFX_Cry0B_2_Ch6: duty_cycle_pattern 1, 0, 1, 0 square_note 12, 0, 8, 0 @@ -24,7 +23,6 @@ SFX_Cry0B_2_Ch6: square_note 8, 13, 1, 1793 sound_ret - SFX_Cry0B_2_Ch8: noise_note 15, 0, 8, 0 noise_note 4, 0, 8, 0 diff --git a/audio/sfx/cry0b_3.asm b/audio/sfx/cry0b_3.asm index 3328a8b67..8ed2b5ff6 100644 --- a/audio/sfx/cry0b_3.asm +++ b/audio/sfx/cry0b_3.asm @@ -12,7 +12,6 @@ SFX_Cry0B_3_Ch5: square_note 8, 11, 1, 1857 sound_ret - SFX_Cry0B_3_Ch6: duty_cycle_pattern 1, 0, 1, 0 square_note 12, 0, 8, 0 @@ -24,7 +23,6 @@ SFX_Cry0B_3_Ch6: square_note 8, 13, 1, 1793 sound_ret - SFX_Cry0B_3_Ch8: noise_note 15, 0, 8, 0 noise_note 4, 0, 8, 0 diff --git a/audio/sfx/cry0c_1.asm b/audio/sfx/cry0c_1.asm index a59f9e8d0..0c0d84fd0 100644 --- a/audio/sfx/cry0c_1.asm +++ b/audio/sfx/cry0c_1.asm @@ -11,7 +11,6 @@ SFX_Cry0C_1_Ch5: square_note 8, 12, 1, 1568 sound_ret - SFX_Cry0C_1_Ch6: duty_cycle_pattern 1, 0, 1, 0 square_note 12, 12, 3, 1472 @@ -24,6 +23,5 @@ SFX_Cry0C_1_Ch6: square_note 2, 9, 1, 1497 square_note 8, 9, 1, 1505 - SFX_Cry0C_1_Ch8: sound_ret diff --git a/audio/sfx/cry0c_2.asm b/audio/sfx/cry0c_2.asm index 5be195a9a..74a4c4886 100644 --- a/audio/sfx/cry0c_2.asm +++ b/audio/sfx/cry0c_2.asm @@ -11,7 +11,6 @@ SFX_Cry0C_2_Ch5: square_note 8, 12, 1, 1568 sound_ret - SFX_Cry0C_2_Ch6: duty_cycle_pattern 1, 0, 1, 0 square_note 12, 12, 3, 1472 @@ -24,6 +23,5 @@ SFX_Cry0C_2_Ch6: square_note 2, 9, 1, 1497 square_note 8, 9, 1, 1505 - SFX_Cry0C_2_Ch8: sound_ret diff --git a/audio/sfx/cry0c_3.asm b/audio/sfx/cry0c_3.asm index f75f7a645..925a3eaeb 100644 --- a/audio/sfx/cry0c_3.asm +++ b/audio/sfx/cry0c_3.asm @@ -11,7 +11,6 @@ SFX_Cry0C_3_Ch5: square_note 8, 12, 1, 1568 sound_ret - SFX_Cry0C_3_Ch6: duty_cycle_pattern 1, 0, 1, 0 square_note 12, 12, 3, 1472 @@ -24,6 +23,5 @@ SFX_Cry0C_3_Ch6: square_note 2, 9, 1, 1497 square_note 8, 9, 1, 1505 - SFX_Cry0C_3_Ch8: sound_ret diff --git a/audio/sfx/cry0d_1.asm b/audio/sfx/cry0d_1.asm index 3bd1c4e53..ce9d07f16 100644 --- a/audio/sfx/cry0d_1.asm +++ b/audio/sfx/cry0d_1.asm @@ -9,7 +9,6 @@ SFX_Cry0D_1_Ch5: sound_loop 2, SFX_Cry0D_1_Ch5 sound_ret - SFX_Cry0D_1_Ch6: duty_cycle_pattern 1, 0, 0, 0 square_note 4, 0, 8, 0 @@ -25,7 +24,6 @@ SFX_Cry0D_1_Ch6: square_note 4, 13, 1, 1569 sound_ret - SFX_Cry0D_1_Ch8: noise_note 6, 13, 2, 28 noise_note 9, 11, 1, 44 diff --git a/audio/sfx/cry0d_2.asm b/audio/sfx/cry0d_2.asm index 1c57d5dc2..7191493c4 100644 --- a/audio/sfx/cry0d_2.asm +++ b/audio/sfx/cry0d_2.asm @@ -9,7 +9,6 @@ SFX_Cry0D_2_Ch5: sound_loop 2, SFX_Cry0D_2_Ch5 sound_ret - SFX_Cry0D_2_Ch6: duty_cycle_pattern 1, 0, 0, 0 square_note 4, 0, 8, 0 @@ -25,7 +24,6 @@ SFX_Cry0D_2_Ch6: square_note 4, 13, 1, 1569 sound_ret - SFX_Cry0D_2_Ch8: noise_note 6, 13, 2, 28 noise_note 9, 11, 1, 44 diff --git a/audio/sfx/cry0d_3.asm b/audio/sfx/cry0d_3.asm index be354add8..d82f8b438 100644 --- a/audio/sfx/cry0d_3.asm +++ b/audio/sfx/cry0d_3.asm @@ -9,7 +9,6 @@ SFX_Cry0D_3_Ch5: sound_loop 2, SFX_Cry0D_3_Ch5 sound_ret - SFX_Cry0D_3_Ch6: duty_cycle_pattern 1, 0, 0, 0 square_note 4, 0, 8, 0 @@ -25,7 +24,6 @@ SFX_Cry0D_3_Ch6: square_note 4, 13, 1, 1569 sound_ret - SFX_Cry0D_3_Ch8: noise_note 6, 13, 2, 28 noise_note 9, 11, 1, 44 diff --git a/audio/sfx/cry0e_1.asm b/audio/sfx/cry0e_1.asm index 183280e29..e73e6b059 100644 --- a/audio/sfx/cry0e_1.asm +++ b/audio/sfx/cry0e_1.asm @@ -6,7 +6,6 @@ SFX_Cry0E_1_Ch5: square_note 8, 14, 1, 1536 sound_ret - SFX_Cry0E_1_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 4, 11, 1, 1761 @@ -15,7 +14,6 @@ SFX_Cry0E_1_Ch6: square_note 8, 11, 1, 1505 sound_ret - SFX_Cry0E_1_Ch8: noise_note 2, 6, 1, 50 noise_note 2, 6, 1, 33 diff --git a/audio/sfx/cry0e_2.asm b/audio/sfx/cry0e_2.asm index 905adbb35..f83fd85de 100644 --- a/audio/sfx/cry0e_2.asm +++ b/audio/sfx/cry0e_2.asm @@ -6,7 +6,6 @@ SFX_Cry0E_2_Ch5: square_note 8, 14, 1, 1536 sound_ret - SFX_Cry0E_2_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 4, 11, 1, 1761 @@ -15,7 +14,6 @@ SFX_Cry0E_2_Ch6: square_note 8, 11, 1, 1505 sound_ret - SFX_Cry0E_2_Ch8: noise_note 2, 6, 1, 50 noise_note 2, 6, 1, 33 diff --git a/audio/sfx/cry0e_3.asm b/audio/sfx/cry0e_3.asm index a17dc5771..c3eed0466 100644 --- a/audio/sfx/cry0e_3.asm +++ b/audio/sfx/cry0e_3.asm @@ -6,7 +6,6 @@ SFX_Cry0E_3_Ch5: square_note 8, 14, 1, 1536 sound_ret - SFX_Cry0E_3_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 4, 11, 1, 1761 @@ -15,7 +14,6 @@ SFX_Cry0E_3_Ch6: square_note 8, 11, 1, 1505 sound_ret - SFX_Cry0E_3_Ch8: noise_note 2, 6, 1, 50 noise_note 2, 6, 1, 33 diff --git a/audio/sfx/cry0f_1.asm b/audio/sfx/cry0f_1.asm index 2cf79d6db..41c463c31 100644 --- a/audio/sfx/cry0f_1.asm +++ b/audio/sfx/cry0f_1.asm @@ -8,7 +8,6 @@ SFX_Cry0F_1_Ch5: square_note 8, 12, 1, 1600 sound_ret - SFX_Cry0F_1_Ch6: duty_cycle_pattern 3, 0, 3, 0 square_note 3, 12, 7, 1921 @@ -19,7 +18,6 @@ SFX_Cry0F_1_Ch6: square_note 8, 10, 1, 1538 sound_ret - SFX_Cry0F_1_Ch8: noise_note 3, 14, 4, 60 noise_note 12, 13, 6, 44 diff --git a/audio/sfx/cry0f_2.asm b/audio/sfx/cry0f_2.asm index 39f70bfef..306ed6e1b 100644 --- a/audio/sfx/cry0f_2.asm +++ b/audio/sfx/cry0f_2.asm @@ -8,7 +8,6 @@ SFX_Cry0F_2_Ch5: square_note 8, 12, 1, 1600 sound_ret - SFX_Cry0F_2_Ch6: duty_cycle_pattern 3, 0, 3, 0 square_note 3, 12, 7, 1921 @@ -19,7 +18,6 @@ SFX_Cry0F_2_Ch6: square_note 8, 10, 1, 1538 sound_ret - SFX_Cry0F_2_Ch8: noise_note 3, 14, 4, 60 noise_note 12, 13, 6, 44 diff --git a/audio/sfx/cry0f_3.asm b/audio/sfx/cry0f_3.asm index f96df4824..04c18c7d4 100644 --- a/audio/sfx/cry0f_3.asm +++ b/audio/sfx/cry0f_3.asm @@ -8,7 +8,6 @@ SFX_Cry0F_3_Ch5: square_note 8, 12, 1, 1600 sound_ret - SFX_Cry0F_3_Ch6: duty_cycle_pattern 3, 0, 3, 0 square_note 3, 12, 7, 1921 @@ -19,7 +18,6 @@ SFX_Cry0F_3_Ch6: square_note 8, 10, 1, 1538 sound_ret - SFX_Cry0F_3_Ch8: noise_note 3, 14, 4, 60 noise_note 12, 13, 6, 44 diff --git a/audio/sfx/cry10_1.asm b/audio/sfx/cry10_1.asm index dc8d2b71b..f8273bc8b 100644 --- a/audio/sfx/cry10_1.asm +++ b/audio/sfx/cry10_1.asm @@ -10,7 +10,6 @@ SFX_Cry10_1_Ch5: square_note 15, 9, 1, 1824 sound_ret - SFX_Cry10_1_Ch6: duty_cycle_pattern 1, 3, 2, 1 square_note 10, 14, 7, 1666 @@ -23,7 +22,6 @@ SFX_Cry10_1_Ch6: square_note 15, 8, 1, 1826 sound_ret - SFX_Cry10_1_Ch8: noise_note 4, 7, 4, 33 noise_note 4, 7, 4, 16 diff --git a/audio/sfx/cry10_2.asm b/audio/sfx/cry10_2.asm index f026f7c14..580736efc 100644 --- a/audio/sfx/cry10_2.asm +++ b/audio/sfx/cry10_2.asm @@ -10,7 +10,6 @@ SFX_Cry10_2_Ch5: square_note 15, 9, 1, 1824 sound_ret - SFX_Cry10_2_Ch6: duty_cycle_pattern 1, 3, 2, 1 square_note 10, 14, 7, 1666 @@ -23,7 +22,6 @@ SFX_Cry10_2_Ch6: square_note 15, 8, 1, 1826 sound_ret - SFX_Cry10_2_Ch8: noise_note 4, 7, 4, 33 noise_note 4, 7, 4, 16 diff --git a/audio/sfx/cry10_3.asm b/audio/sfx/cry10_3.asm index 4b494b60b..551fcfed7 100644 --- a/audio/sfx/cry10_3.asm +++ b/audio/sfx/cry10_3.asm @@ -10,7 +10,6 @@ SFX_Cry10_3_Ch5: square_note 15, 9, 1, 1824 sound_ret - SFX_Cry10_3_Ch6: duty_cycle_pattern 1, 3, 2, 1 square_note 10, 14, 7, 1666 @@ -23,7 +22,6 @@ SFX_Cry10_3_Ch6: square_note 15, 8, 1, 1826 sound_ret - SFX_Cry10_3_Ch8: noise_note 4, 7, 4, 33 noise_note 4, 7, 4, 16 diff --git a/audio/sfx/cry11_1.asm b/audio/sfx/cry11_1.asm index 09fa81237..823b8163e 100644 --- a/audio/sfx/cry11_1.asm +++ b/audio/sfx/cry11_1.asm @@ -9,7 +9,6 @@ SFX_Cry11_1_Ch5: square_note 8, 11, 1, 1840 sound_ret - SFX_Cry11_1_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 4, 0, 8, 0 @@ -22,7 +21,6 @@ SFX_Cry11_1_Ch6: square_note 8, 7, 1, 1752 sound_ret - SFX_Cry11_1_Ch8: noise_note 2, 15, 2, 76 noise_note 6, 14, 6, 58 diff --git a/audio/sfx/cry11_2.asm b/audio/sfx/cry11_2.asm index b51b01c17..7fab820b9 100644 --- a/audio/sfx/cry11_2.asm +++ b/audio/sfx/cry11_2.asm @@ -9,7 +9,6 @@ SFX_Cry11_2_Ch5: square_note 8, 11, 1, 1840 sound_ret - SFX_Cry11_2_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 4, 0, 8, 0 @@ -22,7 +21,6 @@ SFX_Cry11_2_Ch6: square_note 8, 7, 1, 1752 sound_ret - SFX_Cry11_2_Ch8: noise_note 2, 15, 2, 76 noise_note 6, 14, 6, 58 diff --git a/audio/sfx/cry11_3.asm b/audio/sfx/cry11_3.asm index 1a8b0c10a..d462b0a0b 100644 --- a/audio/sfx/cry11_3.asm +++ b/audio/sfx/cry11_3.asm @@ -9,7 +9,6 @@ SFX_Cry11_3_Ch5: square_note 8, 11, 1, 1840 sound_ret - SFX_Cry11_3_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 4, 0, 8, 0 @@ -22,7 +21,6 @@ SFX_Cry11_3_Ch6: square_note 8, 7, 1, 1752 sound_ret - SFX_Cry11_3_Ch8: noise_note 2, 15, 2, 76 noise_note 6, 14, 6, 58 diff --git a/audio/sfx/cry12_1.asm b/audio/sfx/cry12_1.asm index d2ee5f6e1..dcef04a90 100644 --- a/audio/sfx/cry12_1.asm +++ b/audio/sfx/cry12_1.asm @@ -6,7 +6,6 @@ SFX_Cry12_1_Ch5: square_note 8, 13, 1, 1152 sound_ret - SFX_Cry12_1_Ch6: duty_cycle_pattern 3, 2, 3, 2 square_note 11, 13, 2, 1080 @@ -15,7 +14,6 @@ SFX_Cry12_1_Ch6: square_note 8, 11, 1, 1144 sound_ret - SFX_Cry12_1_Ch8: noise_note 10, 14, 6, 108 noise_note 15, 13, 2, 92 diff --git a/audio/sfx/cry12_2.asm b/audio/sfx/cry12_2.asm index 8a4afa2ab..4fb94d861 100644 --- a/audio/sfx/cry12_2.asm +++ b/audio/sfx/cry12_2.asm @@ -6,7 +6,6 @@ SFX_Cry12_2_Ch5: square_note 8, 13, 1, 1152 sound_ret - SFX_Cry12_2_Ch6: duty_cycle_pattern 3, 2, 3, 2 square_note 11, 13, 2, 1080 @@ -15,7 +14,6 @@ SFX_Cry12_2_Ch6: square_note 8, 11, 1, 1144 sound_ret - SFX_Cry12_2_Ch8: noise_note 10, 14, 6, 108 noise_note 15, 13, 2, 92 diff --git a/audio/sfx/cry12_3.asm b/audio/sfx/cry12_3.asm index b114cdf40..26335800a 100644 --- a/audio/sfx/cry12_3.asm +++ b/audio/sfx/cry12_3.asm @@ -6,7 +6,6 @@ SFX_Cry12_3_Ch5: square_note 8, 13, 1, 1152 sound_ret - SFX_Cry12_3_Ch6: duty_cycle_pattern 3, 2, 3, 2 square_note 11, 13, 2, 1080 @@ -15,7 +14,6 @@ SFX_Cry12_3_Ch6: square_note 8, 11, 1, 1144 sound_ret - SFX_Cry12_3_Ch8: noise_note 10, 14, 6, 108 noise_note 15, 13, 2, 92 diff --git a/audio/sfx/cry13_1.asm b/audio/sfx/cry13_1.asm index 7ba33d8d0..767a61b0b 100644 --- a/audio/sfx/cry13_1.asm +++ b/audio/sfx/cry13_1.asm @@ -8,7 +8,6 @@ SFX_Cry13_1_Ch5: square_note 8, 11, 1, 1536 sound_ret - SFX_Cry13_1_Ch6: duty_cycle_pattern 2, 1, 2, 1 square_note 14, 12, 6, 1201 @@ -19,7 +18,6 @@ SFX_Cry13_1_Ch6: square_note 8, 9, 1, 1265 sound_ret - SFX_Cry13_1_Ch8: noise_note 10, 14, 6, 92 noise_note 10, 13, 6, 108 diff --git a/audio/sfx/cry13_2.asm b/audio/sfx/cry13_2.asm index 31ba80a10..b76aa7b85 100644 --- a/audio/sfx/cry13_2.asm +++ b/audio/sfx/cry13_2.asm @@ -8,7 +8,6 @@ SFX_Cry13_2_Ch5: square_note 8, 11, 1, 1536 sound_ret - SFX_Cry13_2_Ch6: duty_cycle_pattern 2, 1, 2, 1 square_note 14, 12, 6, 1201 @@ -19,7 +18,6 @@ SFX_Cry13_2_Ch6: square_note 8, 9, 1, 1265 sound_ret - SFX_Cry13_2_Ch8: noise_note 10, 14, 6, 92 noise_note 10, 13, 6, 108 diff --git a/audio/sfx/cry13_3.asm b/audio/sfx/cry13_3.asm index 8ca4cb0bd..b6b52ed29 100644 --- a/audio/sfx/cry13_3.asm +++ b/audio/sfx/cry13_3.asm @@ -8,7 +8,6 @@ SFX_Cry13_3_Ch5: square_note 8, 11, 1, 1536 sound_ret - SFX_Cry13_3_Ch6: duty_cycle_pattern 2, 1, 2, 1 square_note 14, 12, 6, 1201 @@ -19,7 +18,6 @@ SFX_Cry13_3_Ch6: square_note 8, 9, 1, 1265 sound_ret - SFX_Cry13_3_Ch8: noise_note 10, 14, 6, 92 noise_note 10, 13, 6, 108 diff --git a/audio/sfx/cry14_1.asm b/audio/sfx/cry14_1.asm index d892918f4..f1411c556 100644 --- a/audio/sfx/cry14_1.asm +++ b/audio/sfx/cry14_1.asm @@ -5,7 +5,6 @@ SFX_Cry14_1_Ch5: square_note 8, 13, 1, 2008 sound_ret - SFX_Cry14_1_Ch6: duty_cycle_pattern 2, 2, 1, 1 square_note 10, 12, 4, 1905 @@ -13,7 +12,6 @@ SFX_Cry14_1_Ch6: square_note 8, 10, 1, 1975 sound_ret - SFX_Cry14_1_Ch8: noise_note 8, 14, 4, 76 noise_note 14, 12, 4, 60 diff --git a/audio/sfx/cry14_2.asm b/audio/sfx/cry14_2.asm index 040bfe108..b9b7e3940 100644 --- a/audio/sfx/cry14_2.asm +++ b/audio/sfx/cry14_2.asm @@ -5,7 +5,6 @@ SFX_Cry14_2_Ch5: square_note 8, 13, 1, 2008 sound_ret - SFX_Cry14_2_Ch6: duty_cycle_pattern 2, 2, 1, 1 square_note 10, 12, 4, 1905 @@ -13,7 +12,6 @@ SFX_Cry14_2_Ch6: square_note 8, 10, 1, 1975 sound_ret - SFX_Cry14_2_Ch8: noise_note 8, 14, 4, 76 noise_note 14, 12, 4, 60 diff --git a/audio/sfx/cry14_3.asm b/audio/sfx/cry14_3.asm index 142707c55..69446d1d6 100644 --- a/audio/sfx/cry14_3.asm +++ b/audio/sfx/cry14_3.asm @@ -5,7 +5,6 @@ SFX_Cry14_3_Ch5: square_note 8, 13, 1, 2008 sound_ret - SFX_Cry14_3_Ch6: duty_cycle_pattern 2, 2, 1, 1 square_note 10, 12, 4, 1905 @@ -13,7 +12,6 @@ SFX_Cry14_3_Ch6: square_note 8, 10, 1, 1975 sound_ret - SFX_Cry14_3_Ch8: noise_note 8, 14, 4, 76 noise_note 14, 12, 4, 60 diff --git a/audio/sfx/cry15_1.asm b/audio/sfx/cry15_1.asm index 473d46cb0..e040ed421 100644 --- a/audio/sfx/cry15_1.asm +++ b/audio/sfx/cry15_1.asm @@ -8,7 +8,6 @@ SFX_Cry15_1_Ch5: square_note 8, 12, 1, 1760 sound_ret - SFX_Cry15_1_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 6, 12, 3, 1793 @@ -19,7 +18,6 @@ SFX_Cry15_1_Ch6: square_note 8, 10, 1, 1633 sound_ret - SFX_Cry15_1_Ch8: noise_note 6, 14, 3, 92 noise_note 14, 13, 6, 76 diff --git a/audio/sfx/cry15_2.asm b/audio/sfx/cry15_2.asm index 823987898..eeb5e6581 100644 --- a/audio/sfx/cry15_2.asm +++ b/audio/sfx/cry15_2.asm @@ -8,7 +8,6 @@ SFX_Cry15_2_Ch5: square_note 8, 12, 1, 1760 sound_ret - SFX_Cry15_2_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 6, 12, 3, 1793 @@ -19,7 +18,6 @@ SFX_Cry15_2_Ch6: square_note 8, 10, 1, 1633 sound_ret - SFX_Cry15_2_Ch8: noise_note 6, 14, 3, 92 noise_note 14, 13, 6, 76 diff --git a/audio/sfx/cry15_3.asm b/audio/sfx/cry15_3.asm index dcd6683b7..077295645 100644 --- a/audio/sfx/cry15_3.asm +++ b/audio/sfx/cry15_3.asm @@ -8,7 +8,6 @@ SFX_Cry15_3_Ch5: square_note 8, 12, 1, 1760 sound_ret - SFX_Cry15_3_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 6, 12, 3, 1793 @@ -19,7 +18,6 @@ SFX_Cry15_3_Ch6: square_note 8, 10, 1, 1633 sound_ret - SFX_Cry15_3_Ch8: noise_note 6, 14, 3, 92 noise_note 14, 13, 6, 76 diff --git a/audio/sfx/cry16_1.asm b/audio/sfx/cry16_1.asm index 410ec4ad8..f8e249f7e 100644 --- a/audio/sfx/cry16_1.asm +++ b/audio/sfx/cry16_1.asm @@ -5,7 +5,6 @@ SFX_Cry16_1_Ch5: square_note 15, 13, 2, 1856 sound_ret - SFX_Cry16_1_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 15, 12, 7, 1875 @@ -13,7 +12,6 @@ SFX_Cry16_1_Ch6: square_note 15, 12, 2, 1809 sound_ret - SFX_Cry16_1_Ch8: noise_note 13, 15, 6, 76 noise_note 4, 14, 6, 60 diff --git a/audio/sfx/cry16_2.asm b/audio/sfx/cry16_2.asm index a91355a68..bb23a93f7 100644 --- a/audio/sfx/cry16_2.asm +++ b/audio/sfx/cry16_2.asm @@ -5,7 +5,6 @@ SFX_Cry16_2_Ch5: square_note 15, 13, 2, 1856 sound_ret - SFX_Cry16_2_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 15, 12, 7, 1875 @@ -13,7 +12,6 @@ SFX_Cry16_2_Ch6: square_note 15, 12, 2, 1809 sound_ret - SFX_Cry16_2_Ch8: noise_note 13, 15, 6, 76 noise_note 4, 14, 6, 60 diff --git a/audio/sfx/cry16_3.asm b/audio/sfx/cry16_3.asm index 838a4241d..eb1367706 100644 --- a/audio/sfx/cry16_3.asm +++ b/audio/sfx/cry16_3.asm @@ -5,7 +5,6 @@ SFX_Cry16_3_Ch5: square_note 15, 13, 2, 1856 sound_ret - SFX_Cry16_3_Ch6: duty_cycle_pattern 1, 1, 2, 2 square_note 15, 12, 7, 1875 @@ -13,7 +12,6 @@ SFX_Cry16_3_Ch6: square_note 15, 12, 2, 1809 sound_ret - SFX_Cry16_3_Ch8: noise_note 13, 15, 6, 76 noise_note 4, 14, 6, 60 diff --git a/audio/sfx/cry17_1.asm b/audio/sfx/cry17_1.asm index dcfde2bc1..f9838dc2b 100644 --- a/audio/sfx/cry17_1.asm +++ b/audio/sfx/cry17_1.asm @@ -6,7 +6,6 @@ SFX_Cry17_1_Ch5: square_note 15, 10, 2, 1120 sound_ret - SFX_Cry17_1_Ch6: duty_cycle_pattern 1, 0, 1, 0 square_note 14, 13, 7, 1153 @@ -15,7 +14,6 @@ SFX_Cry17_1_Ch6: square_note 15, 12, 2, 993 sound_ret - SFX_Cry17_1_Ch8: noise_note 14, 15, 7, 124 noise_note 12, 15, 6, 108 diff --git a/audio/sfx/cry17_2.asm b/audio/sfx/cry17_2.asm index f2b1f3667..0906f36a7 100644 --- a/audio/sfx/cry17_2.asm +++ b/audio/sfx/cry17_2.asm @@ -6,7 +6,6 @@ SFX_Cry17_2_Ch5: square_note 15, 10, 2, 1120 sound_ret - SFX_Cry17_2_Ch6: duty_cycle_pattern 1, 0, 1, 0 square_note 14, 13, 7, 1153 @@ -15,7 +14,6 @@ SFX_Cry17_2_Ch6: square_note 15, 12, 2, 993 sound_ret - SFX_Cry17_2_Ch8: noise_note 14, 15, 7, 124 noise_note 12, 15, 6, 108 diff --git a/audio/sfx/cry17_3.asm b/audio/sfx/cry17_3.asm index dabb4dbcc..e3cd20dc4 100644 --- a/audio/sfx/cry17_3.asm +++ b/audio/sfx/cry17_3.asm @@ -6,7 +6,6 @@ SFX_Cry17_3_Ch5: square_note 15, 10, 2, 1120 sound_ret - SFX_Cry17_3_Ch6: duty_cycle_pattern 1, 0, 1, 0 square_note 14, 13, 7, 1153 @@ -15,7 +14,6 @@ SFX_Cry17_3_Ch6: square_note 15, 12, 2, 993 sound_ret - SFX_Cry17_3_Ch8: noise_note 14, 15, 7, 124 noise_note 12, 15, 6, 108 diff --git a/audio/sfx/cry18_1.asm b/audio/sfx/cry18_1.asm index c67f03d1c..95b840861 100644 --- a/audio/sfx/cry18_1.asm +++ b/audio/sfx/cry18_1.asm @@ -10,7 +10,6 @@ SFX_Cry18_1_Ch5: square_note 8, 12, 1, 1696 sound_ret - SFX_Cry18_1_Ch6: duty_cycle_pattern 0, 0, 3, 3 square_note 9, 13, 5, 1585 @@ -23,7 +22,6 @@ SFX_Cry18_1_Ch6: square_note 8, 11, 1, 1617 sound_ret - SFX_Cry18_1_Ch8: noise_note 6, 14, 3, 76 noise_note 4, 12, 3, 60 diff --git a/audio/sfx/cry18_2.asm b/audio/sfx/cry18_2.asm index 55be1c3f9..7600e7841 100644 --- a/audio/sfx/cry18_2.asm +++ b/audio/sfx/cry18_2.asm @@ -10,7 +10,6 @@ SFX_Cry18_2_Ch5: square_note 8, 12, 1, 1696 sound_ret - SFX_Cry18_2_Ch6: duty_cycle_pattern 0, 0, 3, 3 square_note 9, 13, 5, 1585 @@ -23,7 +22,6 @@ SFX_Cry18_2_Ch6: square_note 8, 11, 1, 1617 sound_ret - SFX_Cry18_2_Ch8: noise_note 6, 14, 3, 76 noise_note 4, 12, 3, 60 diff --git a/audio/sfx/cry18_3.asm b/audio/sfx/cry18_3.asm index cc0db3ec1..60e325fde 100644 --- a/audio/sfx/cry18_3.asm +++ b/audio/sfx/cry18_3.asm @@ -10,7 +10,6 @@ SFX_Cry18_3_Ch5: square_note 8, 12, 1, 1696 sound_ret - SFX_Cry18_3_Ch6: duty_cycle_pattern 0, 0, 3, 3 square_note 9, 13, 5, 1585 @@ -23,7 +22,6 @@ SFX_Cry18_3_Ch6: square_note 8, 11, 1, 1617 sound_ret - SFX_Cry18_3_Ch8: noise_note 6, 14, 3, 76 noise_note 4, 12, 3, 60 diff --git a/audio/sfx/cry19_1.asm b/audio/sfx/cry19_1.asm index eca89a1c2..d6e12b823 100644 --- a/audio/sfx/cry19_1.asm +++ b/audio/sfx/cry19_1.asm @@ -5,7 +5,6 @@ SFX_Cry19_1_Ch5: square_note 15, 12, 1, 1840 sound_ret - SFX_Cry19_1_Ch6: duty_cycle_pattern 2, 0, 0, 1 square_note 2, 12, 2, 1793 @@ -13,6 +12,5 @@ SFX_Cry19_1_Ch6: square_note 15, 13, 7, 1857 square_note 15, 10, 2, 1793 - SFX_Cry19_1_Ch8: sound_ret diff --git a/audio/sfx/cry19_2.asm b/audio/sfx/cry19_2.asm index 3a7d51fd5..b4f95a215 100644 --- a/audio/sfx/cry19_2.asm +++ b/audio/sfx/cry19_2.asm @@ -5,7 +5,6 @@ SFX_Cry19_2_Ch5: square_note 15, 12, 1, 1840 sound_ret - SFX_Cry19_2_Ch6: duty_cycle_pattern 2, 0, 0, 1 square_note 2, 12, 2, 1793 @@ -13,6 +12,5 @@ SFX_Cry19_2_Ch6: square_note 15, 13, 7, 1857 square_note 15, 10, 2, 1793 - SFX_Cry19_2_Ch8: sound_ret diff --git a/audio/sfx/cry19_3.asm b/audio/sfx/cry19_3.asm index 965e6cf0e..4ba66cff0 100644 --- a/audio/sfx/cry19_3.asm +++ b/audio/sfx/cry19_3.asm @@ -5,7 +5,6 @@ SFX_Cry19_3_Ch5: square_note 15, 12, 1, 1840 sound_ret - SFX_Cry19_3_Ch6: duty_cycle_pattern 2, 0, 0, 1 square_note 2, 12, 2, 1793 @@ -13,6 +12,5 @@ SFX_Cry19_3_Ch6: square_note 15, 13, 7, 1857 square_note 15, 10, 2, 1793 - SFX_Cry19_3_Ch8: sound_ret diff --git a/audio/sfx/cry1a_1.asm b/audio/sfx/cry1a_1.asm index f319878a2..c1a94a234 100644 --- a/audio/sfx/cry1a_1.asm +++ b/audio/sfx/cry1a_1.asm @@ -8,7 +8,6 @@ SFX_Cry1A_1_Ch5: square_note 8, 13, 1, 1952 sound_ret - SFX_Cry1A_1_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 6, 12, 7, 1793 @@ -19,7 +18,6 @@ SFX_Cry1A_1_Ch6: square_note 8, 9, 1, 1890 sound_ret - SFX_Cry1A_1_Ch8: noise_note 3, 14, 2, 60 noise_note 8, 13, 6, 76 diff --git a/audio/sfx/cry1a_2.asm b/audio/sfx/cry1a_2.asm index 64fd06749..3e4c75284 100644 --- a/audio/sfx/cry1a_2.asm +++ b/audio/sfx/cry1a_2.asm @@ -8,7 +8,6 @@ SFX_Cry1A_2_Ch5: square_note 8, 13, 1, 1952 sound_ret - SFX_Cry1A_2_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 6, 12, 7, 1793 @@ -19,7 +18,6 @@ SFX_Cry1A_2_Ch6: square_note 8, 9, 1, 1890 sound_ret - SFX_Cry1A_2_Ch8: noise_note 3, 14, 2, 60 noise_note 8, 13, 6, 76 diff --git a/audio/sfx/cry1a_3.asm b/audio/sfx/cry1a_3.asm index a55f0dcf0..91f011e77 100644 --- a/audio/sfx/cry1a_3.asm +++ b/audio/sfx/cry1a_3.asm @@ -8,7 +8,6 @@ SFX_Cry1A_3_Ch5: square_note 8, 13, 1, 1952 sound_ret - SFX_Cry1A_3_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 6, 12, 7, 1793 @@ -19,7 +18,6 @@ SFX_Cry1A_3_Ch6: square_note 8, 9, 1, 1890 sound_ret - SFX_Cry1A_3_Ch8: noise_note 3, 14, 2, 60 noise_note 8, 13, 6, 76 diff --git a/audio/sfx/cry1b_1.asm b/audio/sfx/cry1b_1.asm index 0070a0f1b..9515f66ba 100644 --- a/audio/sfx/cry1b_1.asm +++ b/audio/sfx/cry1b_1.asm @@ -7,7 +7,6 @@ SFX_Cry1B_1_Ch5: square_note 8, 13, 1, 1744 sound_ret - SFX_Cry1B_1_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 7, 14, 6, 1665 @@ -17,7 +16,6 @@ SFX_Cry1B_1_Ch6: square_note 8, 12, 1, 1681 sound_ret - SFX_Cry1B_1_Ch8: noise_note 10, 10, 6, 60 noise_note 14, 9, 4, 44 diff --git a/audio/sfx/cry1b_2.asm b/audio/sfx/cry1b_2.asm index 9453ce9b8..871cf8929 100644 --- a/audio/sfx/cry1b_2.asm +++ b/audio/sfx/cry1b_2.asm @@ -7,7 +7,6 @@ SFX_Cry1B_2_Ch5: square_note 8, 13, 1, 1744 sound_ret - SFX_Cry1B_2_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 7, 14, 6, 1665 @@ -17,7 +16,6 @@ SFX_Cry1B_2_Ch6: square_note 8, 12, 1, 1681 sound_ret - SFX_Cry1B_2_Ch8: noise_note 10, 10, 6, 60 noise_note 14, 9, 4, 44 diff --git a/audio/sfx/cry1b_3.asm b/audio/sfx/cry1b_3.asm index f6a1d76a8..625f66c8e 100644 --- a/audio/sfx/cry1b_3.asm +++ b/audio/sfx/cry1b_3.asm @@ -7,7 +7,6 @@ SFX_Cry1B_3_Ch5: square_note 8, 13, 1, 1744 sound_ret - SFX_Cry1B_3_Ch6: duty_cycle_pattern 0, 0, 2, 2 square_note 7, 14, 6, 1665 @@ -17,7 +16,6 @@ SFX_Cry1B_3_Ch6: square_note 8, 12, 1, 1681 sound_ret - SFX_Cry1B_3_Ch8: noise_note 10, 10, 6, 60 noise_note 14, 9, 4, 44 diff --git a/audio/sfx/cry1c_1.asm b/audio/sfx/cry1c_1.asm index 929835a5e..f23a04266 100644 --- a/audio/sfx/cry1c_1.asm +++ b/audio/sfx/cry1c_1.asm @@ -10,7 +10,6 @@ SFX_Cry1C_1_Ch5: square_note 8, 10, 1, 2015 sound_ret - SFX_Cry1C_1_Ch6: duty_cycle_pattern 1, 0, 1, 0 square_note 6, 12, 3, 1993 @@ -21,7 +20,6 @@ SFX_Cry1C_1_Ch6: square_note 15, 10, 2, 1989 sound_ret - SFX_Cry1C_1_Ch8: noise_note 13, 1, -1, 124 noise_note 13, 15, 7, 140 diff --git a/audio/sfx/cry1c_2.asm b/audio/sfx/cry1c_2.asm index c9f239164..adea2c804 100644 --- a/audio/sfx/cry1c_2.asm +++ b/audio/sfx/cry1c_2.asm @@ -10,7 +10,6 @@ SFX_Cry1C_2_Ch5: square_note 8, 10, 1, 2015 sound_ret - SFX_Cry1C_2_Ch6: duty_cycle_pattern 1, 0, 1, 0 square_note 6, 12, 3, 1993 @@ -21,7 +20,6 @@ SFX_Cry1C_2_Ch6: square_note 15, 10, 2, 1989 sound_ret - SFX_Cry1C_2_Ch8: noise_note 13, 1, -1, 124 noise_note 13, 15, 7, 140 diff --git a/audio/sfx/cry1c_3.asm b/audio/sfx/cry1c_3.asm index 7b18f0388..182bda93f 100644 --- a/audio/sfx/cry1c_3.asm +++ b/audio/sfx/cry1c_3.asm @@ -10,7 +10,6 @@ SFX_Cry1C_3_Ch5: square_note 8, 10, 1, 2015 sound_ret - SFX_Cry1C_3_Ch6: duty_cycle_pattern 1, 0, 1, 0 square_note 6, 12, 3, 1993 @@ -21,7 +20,6 @@ SFX_Cry1C_3_Ch6: square_note 15, 10, 2, 1989 sound_ret - SFX_Cry1C_3_Ch8: noise_note 13, 1, -1, 124 noise_note 13, 15, 7, 140 diff --git a/audio/sfx/cry1d_1.asm b/audio/sfx/cry1d_1.asm index a532ec5cf..d7999114e 100644 --- a/audio/sfx/cry1d_1.asm +++ b/audio/sfx/cry1d_1.asm @@ -8,7 +8,6 @@ SFX_Cry1D_1_Ch5: square_note 8, 10, 1, 1572 sound_ret - SFX_Cry1D_1_Ch6: duty_cycle_pattern 0, 2, 0, 2 square_note 15, 11, 0, 1731 @@ -19,7 +18,6 @@ SFX_Cry1D_1_Ch6: square_note 8, 6, 1, 1512 sound_ret - SFX_Cry1D_1_Ch8: noise_note 6, 14, 6, 76 noise_note 15, 13, 6, 60 diff --git a/audio/sfx/cry1d_2.asm b/audio/sfx/cry1d_2.asm index c919ba1ec..063e24905 100644 --- a/audio/sfx/cry1d_2.asm +++ b/audio/sfx/cry1d_2.asm @@ -8,7 +8,6 @@ SFX_Cry1D_2_Ch5: square_note 8, 10, 1, 1572 sound_ret - SFX_Cry1D_2_Ch6: duty_cycle_pattern 0, 2, 0, 2 square_note 15, 11, 0, 1731 @@ -19,7 +18,6 @@ SFX_Cry1D_2_Ch6: square_note 8, 6, 1, 1512 sound_ret - SFX_Cry1D_2_Ch8: noise_note 6, 14, 6, 76 noise_note 15, 13, 6, 60 diff --git a/audio/sfx/cry1d_3.asm b/audio/sfx/cry1d_3.asm index 47e389974..8cd203cc6 100644 --- a/audio/sfx/cry1d_3.asm +++ b/audio/sfx/cry1d_3.asm @@ -8,7 +8,6 @@ SFX_Cry1D_3_Ch5: square_note 8, 10, 1, 1572 sound_ret - SFX_Cry1D_3_Ch6: duty_cycle_pattern 0, 2, 0, 2 square_note 15, 11, 0, 1731 @@ -19,7 +18,6 @@ SFX_Cry1D_3_Ch6: square_note 8, 6, 1, 1512 sound_ret - SFX_Cry1D_3_Ch8: noise_note 6, 14, 6, 76 noise_note 15, 13, 6, 60 diff --git a/audio/sfx/cry1e_1.asm b/audio/sfx/cry1e_1.asm index 19634a5ee..b1134905a 100644 --- a/audio/sfx/cry1e_1.asm +++ b/audio/sfx/cry1e_1.asm @@ -10,7 +10,6 @@ SFX_Cry1E_1_Ch5: square_note 8, 10, 1, 1984 sound_ret - SFX_Cry1E_1_Ch6: duty_cycle_pattern 0, 1, 0, 1 square_note 3, 0, 8, 1 @@ -24,7 +23,6 @@ SFX_Cry1E_1_Ch6: square_note 8, 8, 1, 1921 sound_ret - SFX_Cry1E_1_Ch8: noise_note 6, 0, 8, 1 noise_note 5, 14, 2, 92 diff --git a/audio/sfx/cry1e_2.asm b/audio/sfx/cry1e_2.asm index 740044898..6a88e67b0 100644 --- a/audio/sfx/cry1e_2.asm +++ b/audio/sfx/cry1e_2.asm @@ -10,7 +10,6 @@ SFX_Cry1E_2_Ch5: square_note 8, 10, 1, 1984 sound_ret - SFX_Cry1E_2_Ch6: duty_cycle_pattern 0, 1, 0, 1 square_note 3, 0, 8, 1 @@ -24,7 +23,6 @@ SFX_Cry1E_2_Ch6: square_note 8, 8, 1, 1921 sound_ret - SFX_Cry1E_2_Ch8: noise_note 6, 0, 8, 1 noise_note 5, 14, 2, 92 diff --git a/audio/sfx/cry1e_3.asm b/audio/sfx/cry1e_3.asm index 357c2f71d..3e434a930 100644 --- a/audio/sfx/cry1e_3.asm +++ b/audio/sfx/cry1e_3.asm @@ -10,7 +10,6 @@ SFX_Cry1E_3_Ch5: square_note 8, 10, 1, 1984 sound_ret - SFX_Cry1E_3_Ch6: duty_cycle_pattern 0, 1, 0, 1 square_note 3, 0, 8, 1 @@ -24,7 +23,6 @@ SFX_Cry1E_3_Ch6: square_note 8, 8, 1, 1921 sound_ret - SFX_Cry1E_3_Ch8: noise_note 6, 0, 8, 1 noise_note 5, 14, 2, 92 diff --git a/audio/sfx/cry1f_1.asm b/audio/sfx/cry1f_1.asm index 1f5b3a8d6..6f55afb8c 100644 --- a/audio/sfx/cry1f_1.asm +++ b/audio/sfx/cry1f_1.asm @@ -6,7 +6,6 @@ SFX_Cry1F_1_Ch5: square_note 8, 12, 1, 1818 sound_ret - SFX_Cry1F_1_Ch6: duty_cycle_pattern 3, 0, 3, 0 square_note 4, 15, 4, 1408 @@ -15,7 +14,6 @@ SFX_Cry1F_1_Ch6: square_note 8, 13, 1, 1756 sound_ret - SFX_Cry1F_1_Ch8: noise_note 5, 12, 4, 70 noise_note 13, 10, 5, 68 diff --git a/audio/sfx/cry1f_2.asm b/audio/sfx/cry1f_2.asm index 99f3a056e..36adf829c 100644 --- a/audio/sfx/cry1f_2.asm +++ b/audio/sfx/cry1f_2.asm @@ -6,7 +6,6 @@ SFX_Cry1F_2_Ch5: square_note 8, 12, 1, 1818 sound_ret - SFX_Cry1F_2_Ch6: duty_cycle_pattern 3, 0, 3, 0 square_note 4, 15, 4, 1408 @@ -15,7 +14,6 @@ SFX_Cry1F_2_Ch6: square_note 8, 13, 1, 1756 sound_ret - SFX_Cry1F_2_Ch8: noise_note 5, 12, 4, 70 noise_note 13, 10, 5, 68 diff --git a/audio/sfx/cry1f_3.asm b/audio/sfx/cry1f_3.asm index c9cf5441a..aa7a780a3 100644 --- a/audio/sfx/cry1f_3.asm +++ b/audio/sfx/cry1f_3.asm @@ -6,7 +6,6 @@ SFX_Cry1F_3_Ch5: square_note 8, 12, 1, 1818 sound_ret - SFX_Cry1F_3_Ch6: duty_cycle_pattern 3, 0, 3, 0 square_note 4, 15, 4, 1408 @@ -15,7 +14,6 @@ SFX_Cry1F_3_Ch6: square_note 8, 13, 1, 1756 sound_ret - SFX_Cry1F_3_Ch8: noise_note 5, 12, 4, 70 noise_note 13, 10, 5, 68 diff --git a/audio/sfx/cry20_1.asm b/audio/sfx/cry20_1.asm index 15a160ae9..f199b33fe 100644 --- a/audio/sfx/cry20_1.asm +++ b/audio/sfx/cry20_1.asm @@ -6,7 +6,6 @@ SFX_Cry20_1_Ch5: square_note 8, 13, 1, 1297 sound_ret - SFX_Cry20_1_Ch6: duty_cycle_pattern 0, 1, 1, 1 square_note 12, 14, 1, 1292 @@ -15,7 +14,6 @@ SFX_Cry20_1_Ch6: square_note 8, 12, 1, 1290 sound_ret - SFX_Cry20_1_Ch8: noise_note 14, 15, 2, 101 noise_note 13, 14, 2, 85 diff --git a/audio/sfx/cry20_2.asm b/audio/sfx/cry20_2.asm index 281e478cf..2d522fbf5 100644 --- a/audio/sfx/cry20_2.asm +++ b/audio/sfx/cry20_2.asm @@ -6,7 +6,6 @@ SFX_Cry20_2_Ch5: square_note 8, 13, 1, 1297 sound_ret - SFX_Cry20_2_Ch6: duty_cycle_pattern 0, 1, 1, 1 square_note 12, 14, 1, 1292 @@ -15,7 +14,6 @@ SFX_Cry20_2_Ch6: square_note 8, 12, 1, 1290 sound_ret - SFX_Cry20_2_Ch8: noise_note 14, 15, 2, 101 noise_note 13, 14, 2, 85 diff --git a/audio/sfx/cry20_3.asm b/audio/sfx/cry20_3.asm index 8191ca6e2..f32f36140 100644 --- a/audio/sfx/cry20_3.asm +++ b/audio/sfx/cry20_3.asm @@ -6,7 +6,6 @@ SFX_Cry20_3_Ch5: square_note 8, 13, 1, 1297 sound_ret - SFX_Cry20_3_Ch6: duty_cycle_pattern 0, 1, 1, 1 square_note 12, 14, 1, 1292 @@ -15,7 +14,6 @@ SFX_Cry20_3_Ch6: square_note 8, 12, 1, 1290 sound_ret - SFX_Cry20_3_Ch8: noise_note 14, 15, 2, 101 noise_note 13, 14, 2, 85 diff --git a/audio/sfx/cry21_1.asm b/audio/sfx/cry21_1.asm index 2cf517a82..eaeb7c581 100644 --- a/audio/sfx/cry21_1.asm +++ b/audio/sfx/cry21_1.asm @@ -10,7 +10,6 @@ SFX_Cry21_1_Ch5: square_note 8, 13, 1, 1282 sound_ret - SFX_Cry21_1_Ch6: duty_cycle_pattern 3, 0, 3, 0 square_note 3, 13, 3, 1376 @@ -22,6 +21,5 @@ SFX_Cry21_1_Ch6: square_note 3, 12, 4, 1248 square_note 8, 12, 1, 1280 - SFX_Cry21_1_Ch8: sound_ret diff --git a/audio/sfx/cry21_2.asm b/audio/sfx/cry21_2.asm index 8136de632..9e2bfeced 100644 --- a/audio/sfx/cry21_2.asm +++ b/audio/sfx/cry21_2.asm @@ -10,7 +10,6 @@ SFX_Cry21_2_Ch5: square_note 8, 13, 1, 1282 sound_ret - SFX_Cry21_2_Ch6: duty_cycle_pattern 3, 0, 3, 0 square_note 3, 13, 3, 1376 @@ -22,6 +21,5 @@ SFX_Cry21_2_Ch6: square_note 3, 12, 4, 1248 square_note 8, 12, 1, 1280 - SFX_Cry21_2_Ch8: sound_ret diff --git a/audio/sfx/cry21_3.asm b/audio/sfx/cry21_3.asm index d829f9f2e..a896bac30 100644 --- a/audio/sfx/cry21_3.asm +++ b/audio/sfx/cry21_3.asm @@ -10,7 +10,6 @@ SFX_Cry21_3_Ch5: square_note 8, 13, 1, 1282 sound_ret - SFX_Cry21_3_Ch6: duty_cycle_pattern 3, 0, 3, 0 square_note 3, 13, 3, 1376 @@ -22,6 +21,5 @@ SFX_Cry21_3_Ch6: square_note 3, 12, 4, 1248 square_note 8, 12, 1, 1280 - SFX_Cry21_3_Ch8: sound_ret diff --git a/audio/sfx/cry22_1.asm b/audio/sfx/cry22_1.asm index dd910103f..cc9aa4b81 100644 --- a/audio/sfx/cry22_1.asm +++ b/audio/sfx/cry22_1.asm @@ -6,7 +6,6 @@ SFX_Cry22_1_Ch5: square_note 8, 9, 1, 897 sound_ret - SFX_Cry22_1_Ch6: duty_cycle_pattern 3, 2, 3, 2 square_note 2, 3, -6, 1456 @@ -15,7 +14,6 @@ SFX_Cry22_1_Ch6: square_note 8, 6, 1, 1456 sound_ret - SFX_Cry22_1_Ch8: noise_note 2, 9, 2, 73 noise_note 7, 11, 5, 41 diff --git a/audio/sfx/cry22_2.asm b/audio/sfx/cry22_2.asm index 43e09d67f..2ac4b7c60 100644 --- a/audio/sfx/cry22_2.asm +++ b/audio/sfx/cry22_2.asm @@ -6,7 +6,6 @@ SFX_Cry22_2_Ch5: square_note 8, 9, 1, 897 sound_ret - SFX_Cry22_2_Ch6: duty_cycle_pattern 3, 2, 3, 2 square_note 2, 3, -6, 1456 @@ -15,7 +14,6 @@ SFX_Cry22_2_Ch6: square_note 8, 6, 1, 1456 sound_ret - SFX_Cry22_2_Ch8: noise_note 2, 9, 2, 73 noise_note 7, 11, 5, 41 diff --git a/audio/sfx/cry22_3.asm b/audio/sfx/cry22_3.asm index 397edba10..6ed84ed85 100644 --- a/audio/sfx/cry22_3.asm +++ b/audio/sfx/cry22_3.asm @@ -6,7 +6,6 @@ SFX_Cry22_3_Ch5: square_note 8, 9, 1, 897 sound_ret - SFX_Cry22_3_Ch6: duty_cycle_pattern 3, 2, 3, 2 square_note 2, 3, -6, 1456 @@ -15,7 +14,6 @@ SFX_Cry22_3_Ch6: square_note 8, 6, 1, 1456 sound_ret - SFX_Cry22_3_Ch8: noise_note 2, 9, 2, 73 noise_note 7, 11, 5, 41 diff --git a/audio/sfx/cry23_1.asm b/audio/sfx/cry23_1.asm index 5aeafe0f4..9f41e5c1e 100644 --- a/audio/sfx/cry23_1.asm +++ b/audio/sfx/cry23_1.asm @@ -7,7 +7,6 @@ SFX_Cry23_1_Ch5: square_note 8, 12, 1, 1984 sound_ret - SFX_Cry23_1_Ch6: duty_cycle_pattern 1, 1, 3, 3 square_note 15, 9, 7, 1921 @@ -16,7 +15,6 @@ SFX_Cry23_1_Ch6: square_note 15, 8, 3, 1921 sound_ret - SFX_Cry23_1_Ch8: noise_note 3, 15, 2, 60 noise_note 13, 14, 6, 44 diff --git a/audio/sfx/cry23_2.asm b/audio/sfx/cry23_2.asm index 04e4136b3..dd863419a 100644 --- a/audio/sfx/cry23_2.asm +++ b/audio/sfx/cry23_2.asm @@ -7,7 +7,6 @@ SFX_Cry23_2_Ch5: square_note 8, 12, 1, 1984 sound_ret - SFX_Cry23_2_Ch6: duty_cycle_pattern 1, 1, 3, 3 square_note 15, 9, 7, 1921 @@ -16,7 +15,6 @@ SFX_Cry23_2_Ch6: square_note 15, 8, 3, 1921 sound_ret - SFX_Cry23_2_Ch8: noise_note 3, 15, 2, 60 noise_note 13, 14, 6, 44 diff --git a/audio/sfx/cry23_3.asm b/audio/sfx/cry23_3.asm index 418e69bb5..996be40cb 100644 --- a/audio/sfx/cry23_3.asm +++ b/audio/sfx/cry23_3.asm @@ -7,7 +7,6 @@ SFX_Cry23_3_Ch5: square_note 8, 12, 1, 1984 sound_ret - SFX_Cry23_3_Ch6: duty_cycle_pattern 1, 1, 3, 3 square_note 15, 9, 7, 1921 @@ -16,7 +15,6 @@ SFX_Cry23_3_Ch6: square_note 15, 8, 3, 1921 sound_ret - SFX_Cry23_3_Ch8: noise_note 3, 15, 2, 60 noise_note 13, 14, 6, 44 diff --git a/audio/sfx/cry24_1.asm b/audio/sfx/cry24_1.asm index 7e9927071..91dd00691 100644 --- a/audio/sfx/cry24_1.asm +++ b/audio/sfx/cry24_1.asm @@ -10,7 +10,6 @@ SFX_Cry24_1_Ch5: square_note 8, 12, 1, 1600 sound_ret - SFX_Cry24_1_Ch6: duty_cycle_pattern 0, 0, 1, 1 square_note 15, 11, 7, 1601 @@ -23,7 +22,6 @@ SFX_Cry24_1_Ch6: square_note 8, 7, 1, 1537 sound_ret - SFX_Cry24_1_Ch8: noise_note 15, 14, 4, 60 noise_note 10, 12, 7, 76 diff --git a/audio/sfx/cry24_2.asm b/audio/sfx/cry24_2.asm index d845f6ed0..7bcc150bd 100644 --- a/audio/sfx/cry24_2.asm +++ b/audio/sfx/cry24_2.asm @@ -10,7 +10,6 @@ SFX_Cry24_2_Ch5: square_note 8, 12, 1, 1600 sound_ret - SFX_Cry24_2_Ch6: duty_cycle_pattern 0, 0, 1, 1 square_note 15, 11, 7, 1601 @@ -23,7 +22,6 @@ SFX_Cry24_2_Ch6: square_note 8, 7, 1, 1537 sound_ret - SFX_Cry24_2_Ch8: noise_note 15, 14, 4, 60 noise_note 10, 12, 7, 76 diff --git a/audio/sfx/cry24_3.asm b/audio/sfx/cry24_3.asm index e8c1f24e3..b8cb248c5 100644 --- a/audio/sfx/cry24_3.asm +++ b/audio/sfx/cry24_3.asm @@ -10,7 +10,6 @@ SFX_Cry24_3_Ch5: square_note 8, 12, 1, 1600 sound_ret - SFX_Cry24_3_Ch6: duty_cycle_pattern 0, 0, 1, 1 square_note 15, 11, 7, 1601 @@ -23,7 +22,6 @@ SFX_Cry24_3_Ch6: square_note 8, 7, 1, 1537 sound_ret - SFX_Cry24_3_Ch8: noise_note 15, 14, 4, 60 noise_note 10, 12, 7, 76 diff --git a/audio/sfx/cry25_1.asm b/audio/sfx/cry25_1.asm index 64d593890..62087da96 100644 --- a/audio/sfx/cry25_1.asm +++ b/audio/sfx/cry25_1.asm @@ -7,7 +7,6 @@ SFX_Cry25_1_Ch5: square_note 8, 13, 1, 1872 sound_ret - SFX_Cry25_1_Ch6: duty_cycle_pattern 1, 3, 1, 3 square_note 6, 12, 3, 1810 @@ -17,7 +16,6 @@ SFX_Cry25_1_Ch6: square_note 8, 11, 1, 1842 sound_ret - SFX_Cry25_1_Ch8: noise_note 8, 13, 6, 44 noise_note 12, 12, 6, 60 diff --git a/audio/sfx/cry25_2.asm b/audio/sfx/cry25_2.asm index 8ed470067..011af185f 100644 --- a/audio/sfx/cry25_2.asm +++ b/audio/sfx/cry25_2.asm @@ -7,7 +7,6 @@ SFX_Cry25_2_Ch5: square_note 8, 13, 1, 1872 sound_ret - SFX_Cry25_2_Ch6: duty_cycle_pattern 1, 3, 1, 3 square_note 6, 12, 3, 1810 @@ -17,7 +16,6 @@ SFX_Cry25_2_Ch6: square_note 8, 11, 1, 1842 sound_ret - SFX_Cry25_2_Ch8: noise_note 8, 13, 6, 44 noise_note 12, 12, 6, 60 diff --git a/audio/sfx/cry25_3.asm b/audio/sfx/cry25_3.asm index f9800dc8e..b9fa96ca0 100644 --- a/audio/sfx/cry25_3.asm +++ b/audio/sfx/cry25_3.asm @@ -7,7 +7,6 @@ SFX_Cry25_3_Ch5: square_note 8, 13, 1, 1872 sound_ret - SFX_Cry25_3_Ch6: duty_cycle_pattern 1, 3, 1, 3 square_note 6, 12, 3, 1810 @@ -17,7 +16,6 @@ SFX_Cry25_3_Ch6: square_note 8, 11, 1, 1842 sound_ret - SFX_Cry25_3_Ch8: noise_note 8, 13, 6, 44 noise_note 12, 12, 6, 60 diff --git a/audio/sfx/denied_1.asm b/audio/sfx/denied_1.asm index 2c1320039..9ac692c51 100644 --- a/audio/sfx/denied_1.asm +++ b/audio/sfx/denied_1.asm @@ -8,7 +8,6 @@ SFX_Denied_1_Ch5: square_note 1, 0, 0, 0 sound_ret - SFX_Denied_1_Ch6: duty_cycle 3 square_note 4, 15, 0, 1025 diff --git a/audio/sfx/denied_3.asm b/audio/sfx/denied_3.asm index 56a0753fe..1db9f0e67 100644 --- a/audio/sfx/denied_3.asm +++ b/audio/sfx/denied_3.asm @@ -8,7 +8,6 @@ SFX_Denied_3_Ch5: square_note 1, 0, 0, 0 sound_ret - SFX_Denied_3_Ch6: duty_cycle 3 square_note 4, 15, 0, 1025 diff --git a/audio/sfx/dex_page_added.asm b/audio/sfx/dex_page_added.asm index 555b3beb5..342e5d56f 100644 --- a/audio/sfx/dex_page_added.asm +++ b/audio/sfx/dex_page_added.asm @@ -7,7 +7,6 @@ SFX_Dex_Page_Added_Ch5: pitch_sweep 0, 8 sound_ret - SFX_Dex_Page_Added_Ch6: duty_cycle 2 square_note 15, 9, 2, 1536 diff --git a/audio/sfx/faint_thud.asm b/audio/sfx/faint_thud.asm index 527e027fd..02e60ba8f 100644 --- a/audio/sfx/faint_thud.asm +++ b/audio/sfx/faint_thud.asm @@ -3,7 +3,6 @@ SFX_Faint_Thud_Ch5: pitch_sweep 0, 8 sound_ret - SFX_Faint_Thud_Ch8: noise_note 4, 15, 5, 51 noise_note 8, 15, 4, 34 diff --git a/audio/sfx/get_item1_1.asm b/audio/sfx/get_item1_1.asm index 09f76c703..c88643437 100644 --- a/audio/sfx/get_item1_1.asm +++ b/audio/sfx/get_item1_1.asm @@ -15,7 +15,6 @@ SFX_Get_Item1_1_Ch5: note E_, 4 sound_ret - SFX_Get_Item1_1_Ch6: execute_music vibrato 8, 2, 7 @@ -29,7 +28,6 @@ SFX_Get_Item1_1_Ch6: note B_, 4 sound_ret - SFX_Get_Item1_1_Ch7: execute_music note_type 4, 1, 0 diff --git a/audio/sfx/get_item1_3.asm b/audio/sfx/get_item1_3.asm index dfc1848fc..12f17aa87 100644 --- a/audio/sfx/get_item1_3.asm +++ b/audio/sfx/get_item1_3.asm @@ -15,7 +15,6 @@ SFX_Get_Item1_3_Ch5: note E_, 4 sound_ret - SFX_Get_Item1_3_Ch6: execute_music vibrato 8, 2, 7 @@ -29,7 +28,6 @@ SFX_Get_Item1_3_Ch6: note B_, 4 sound_ret - SFX_Get_Item1_3_Ch7: execute_music note_type 4, 1, 0 diff --git a/audio/sfx/get_item2_1.asm b/audio/sfx/get_item2_1.asm index 04bbdae21..f225109f6 100644 --- a/audio/sfx/get_item2_1.asm +++ b/audio/sfx/get_item2_1.asm @@ -24,7 +24,6 @@ SFX_Get_Item2_1_Ch5: note C_, 8 sound_ret - SFX_Get_Item2_1_Ch6: execute_music vibrato 8, 2, 7 @@ -45,7 +44,6 @@ SFX_Get_Item2_1_Ch6: note A_, 8 sound_ret - SFX_Get_Item2_1_Ch7: execute_music note_type 5, 1, 0 diff --git a/audio/sfx/get_item2_2.asm b/audio/sfx/get_item2_2.asm index f05e07282..2f7ed947a 100644 --- a/audio/sfx/get_item2_2.asm +++ b/audio/sfx/get_item2_2.asm @@ -24,7 +24,6 @@ SFX_Get_Item2_2_Ch5: note C_, 8 sound_ret - SFX_Get_Item2_2_Ch6: execute_music vibrato 8, 2, 7 @@ -45,7 +44,6 @@ SFX_Get_Item2_2_Ch6: note A_, 8 sound_ret - SFX_Get_Item2_2_Ch7: execute_music note_type 5, 1, 0 diff --git a/audio/sfx/get_item2_3.asm b/audio/sfx/get_item2_3.asm index 036d375b6..74edbe540 100644 --- a/audio/sfx/get_item2_3.asm +++ b/audio/sfx/get_item2_3.asm @@ -24,7 +24,6 @@ SFX_Get_Item2_3_Ch5: note C_, 8 sound_ret - SFX_Get_Item2_3_Ch6: execute_music vibrato 8, 2, 7 @@ -45,7 +44,6 @@ SFX_Get_Item2_3_Ch6: note A_, 8 sound_ret - SFX_Get_Item2_3_Ch7: execute_music note_type 5, 1, 0 diff --git a/audio/sfx/get_key_item_1.asm b/audio/sfx/get_key_item_1.asm index a19f11432..59e868b45 100644 --- a/audio/sfx/get_key_item_1.asm +++ b/audio/sfx/get_key_item_1.asm @@ -22,7 +22,6 @@ SFX_Get_Key_Item_1_Ch5: note A#, 8 sound_ret - SFX_Get_Key_Item_1_Ch6: execute_music vibrato 4, 2, 3 @@ -46,7 +45,6 @@ SFX_Get_Key_Item_1_Ch6: note D#, 8 sound_ret - SFX_Get_Key_Item_1_Ch7: execute_music note_type 5, 1, 0 diff --git a/audio/sfx/get_key_item_3.asm b/audio/sfx/get_key_item_3.asm index c1063a7f9..f06ba09d3 100644 --- a/audio/sfx/get_key_item_3.asm +++ b/audio/sfx/get_key_item_3.asm @@ -22,7 +22,6 @@ SFX_Get_Key_Item_3_Ch5: note A#, 8 sound_ret - SFX_Get_Key_Item_3_Ch6: execute_music vibrato 4, 2, 3 @@ -46,7 +45,6 @@ SFX_Get_Key_Item_3_Ch6: note D#, 8 sound_ret - SFX_Get_Key_Item_3_Ch7: execute_music note_type 5, 1, 0 diff --git a/audio/sfx/level_up.asm b/audio/sfx/level_up.asm index f1af49788..6ec2a17c5 100644 --- a/audio/sfx/level_up.asm +++ b/audio/sfx/level_up.asm @@ -19,7 +19,6 @@ SFX_Level_Up_Ch5: note F_, 8 sound_ret - SFX_Level_Up_Ch6: execute_music vibrato 4, 2, 2 @@ -39,7 +38,6 @@ SFX_Level_Up_Ch6: note A_, 8 sound_ret - SFX_Level_Up_Ch7: execute_music note_type 6, 1, 0 diff --git a/audio/sfx/pokedex_rating_1.asm b/audio/sfx/pokedex_rating_1.asm index 0df1138fb..4e7d58faa 100644 --- a/audio/sfx/pokedex_rating_1.asm +++ b/audio/sfx/pokedex_rating_1.asm @@ -20,7 +20,6 @@ SFX_Pokedex_Rating_1_Ch5: note F_, 4 sound_ret - SFX_Pokedex_Rating_1_Ch6: execute_music duty_cycle 2 @@ -43,7 +42,6 @@ SFX_Pokedex_Rating_1_Ch6: note F_, 4 sound_ret - SFX_Pokedex_Rating_1_Ch7: execute_music note_type 5, 1, 0 diff --git a/audio/sfx/pokedex_rating_3.asm b/audio/sfx/pokedex_rating_3.asm index 18dbcda24..a7142a1d7 100644 --- a/audio/sfx/pokedex_rating_3.asm +++ b/audio/sfx/pokedex_rating_3.asm @@ -20,7 +20,6 @@ SFX_Pokedex_Rating_3_Ch5: note F_, 4 sound_ret - SFX_Pokedex_Rating_3_Ch6: execute_music duty_cycle 2 @@ -43,7 +42,6 @@ SFX_Pokedex_Rating_3_Ch6: note F_, 4 sound_ret - SFX_Pokedex_Rating_3_Ch7: execute_music note_type 5, 1, 0 diff --git a/audio/sfx/pokeflute_ch5_ch6.asm b/audio/sfx/pokeflute_ch5_ch6.asm index 4f0e96a8c..e17eb3cc1 100644 --- a/audio/sfx/pokeflute_ch5_ch6.asm +++ b/audio/sfx/pokeflute_ch5_ch6.asm @@ -1,7 +1,6 @@ SFX_Pokeflute_Ch5: tempo 256 - SFX_Pokeflute_Ch6: execute_music note_type 8, 0, 0 diff --git a/audio/sfx/psybeam.asm b/audio/sfx/psybeam.asm index 2b94cf6d3..d6bf3b426 100644 --- a/audio/sfx/psybeam.asm +++ b/audio/sfx/psybeam.asm @@ -7,7 +7,6 @@ SFX_Psybeam_Ch5: square_note 10, 15, 1, 1600 sound_ret - SFX_Psybeam_Ch6: duty_cycle_pattern 2, 3, 0, 3 square_note 10, 15, 3, 1393 @@ -17,7 +16,6 @@ SFX_Psybeam_Ch6: square_note 10, 15, 1, 1393 sound_ret - SFX_Psybeam_Ch8: noise_note 2, 13, 1, 74 noise_note 2, 13, 2, 42 diff --git a/audio/sfx/psychic_m.asm b/audio/sfx/psychic_m.asm index ff0ab3844..36aefff8d 100644 --- a/audio/sfx/psychic_m.asm +++ b/audio/sfx/psychic_m.asm @@ -10,7 +10,6 @@ SFX_Psychic_M_Ch5: pitch_sweep 0, 8 sound_ret - SFX_Psychic_M_Ch6: duty_cycle 2 square_note 8, 12, 4, 1904 @@ -21,7 +20,6 @@ SFX_Psychic_M_Ch6: square_note 15, 15, 2, 1892 sound_ret - SFX_Psychic_M_Ch8: noise_note 15, 3, -7, 20 noise_note 15, 12, -7, 19 diff --git a/audio/sfx/purchase_1.asm b/audio/sfx/purchase_1.asm index 9dc06f0b0..1abb8dfed 100644 --- a/audio/sfx/purchase_1.asm +++ b/audio/sfx/purchase_1.asm @@ -4,7 +4,6 @@ SFX_Purchase_1_Ch5: square_note 8, 15, 2, 2016 sound_ret - SFX_Purchase_1_Ch6: duty_cycle 2 square_note 1, 0, 8, 0 diff --git a/audio/sfx/purchase_3.asm b/audio/sfx/purchase_3.asm index eaa4bb602..f7f2ccdf0 100644 --- a/audio/sfx/purchase_3.asm +++ b/audio/sfx/purchase_3.asm @@ -4,7 +4,6 @@ SFX_Purchase_3_Ch5: square_note 8, 15, 2, 2016 sound_ret - SFX_Purchase_3_Ch6: duty_cycle 2 square_note 1, 0, 8, 0 diff --git a/audio/sfx/save_1.asm b/audio/sfx/save_1.asm index d0849ff51..d1e193b29 100644 --- a/audio/sfx/save_1.asm +++ b/audio/sfx/save_1.asm @@ -9,7 +9,6 @@ SFX_Save_1_Ch5: square_note 15, 15, 2, 2016 sound_ret - SFX_Save_1_Ch6: duty_cycle 2 square_note 4, 0, 8, 0 diff --git a/audio/sfx/save_3.asm b/audio/sfx/save_3.asm index 8db092b25..cfd867320 100644 --- a/audio/sfx/save_3.asm +++ b/audio/sfx/save_3.asm @@ -15,7 +15,6 @@ ELSE ENDC sound_ret - SFX_Save_3_Ch6: duty_cycle 2 IF DEF(_RED) diff --git a/audio/sfx/slots_new_spin.asm b/audio/sfx/slots_new_spin.asm index a8b668b84..2333f5ecc 100644 --- a/audio/sfx/slots_new_spin.asm +++ b/audio/sfx/slots_new_spin.asm @@ -5,7 +5,6 @@ SFX_Slots_New_Spin_Ch5: square_note 15, 15, 1, 1984 sound_ret - SFX_Slots_New_Spin_Ch6: duty_cycle 2 square_note 4, 12, 1, 1729 diff --git a/audio/sfx/ss_anne_horn_1.asm b/audio/sfx/ss_anne_horn_1.asm index 7f5094f48..118c4314f 100644 --- a/audio/sfx/ss_anne_horn_1.asm +++ b/audio/sfx/ss_anne_horn_1.asm @@ -9,7 +9,6 @@ SFX_SS_Anne_Horn_1_Ch5: square_note 15, 15, 2, 1280 sound_ret - SFX_SS_Anne_Horn_1_Ch6: duty_cycle 3 square_note 15, 15, 0, 1154 diff --git a/audio/sfx/ss_anne_horn_3.asm b/audio/sfx/ss_anne_horn_3.asm index fda8e3462..cf6b4bf55 100644 --- a/audio/sfx/ss_anne_horn_3.asm +++ b/audio/sfx/ss_anne_horn_3.asm @@ -9,7 +9,6 @@ SFX_SS_Anne_Horn_3_Ch5: square_note 15, 15, 2, 1280 sound_ret - SFX_SS_Anne_Horn_3_Ch6: duty_cycle 3 square_note 15, 15, 0, 1154 diff --git a/audio/sfx/swap_1.asm b/audio/sfx/swap_1.asm index 98bfff72c..3e8c675cb 100644 --- a/audio/sfx/swap_1.asm +++ b/audio/sfx/swap_1.asm @@ -3,7 +3,6 @@ SFX_Swap_1_Ch5: square_note 8, 14, 1, 1856 sound_ret - SFX_Swap_1_Ch6: duty_cycle 2 square_note 2, 0, 8, 0 diff --git a/audio/sfx/swap_3.asm b/audio/sfx/swap_3.asm index 8e86ac7c7..2bbf484df 100644 --- a/audio/sfx/swap_3.asm +++ b/audio/sfx/swap_3.asm @@ -3,7 +3,6 @@ SFX_Swap_3_Ch5: square_note 8, 14, 1, 1856 sound_ret - SFX_Swap_3_Ch6: duty_cycle 2 square_note 2, 0, 8, 0 diff --git a/audio/sfx/unused_cry_1.asm b/audio/sfx/unused_cry_1.asm index 342ca2ab2..0ff7c79a9 100644 --- a/audio/sfx/unused_cry_1.asm +++ b/audio/sfx/unused_cry_1.asm @@ -9,7 +9,6 @@ SFX_UnusedCry_1_Ch5: ; unreferenced square_note 8, 7, 1, 1924 sound_ret - SFX_UnusedCry_1_Ch6: ; unreferenced duty_cycle_pattern 0, 0, 1, 1 square_note 15, 10, 0, 1857 @@ -20,7 +19,6 @@ SFX_UnusedCry_1_Ch6: ; unreferenced square_note 8, 3, 1, 1862 sound_ret - SFX_UnusedCry_1_Ch8: ; unreferenced noise_note 2, 15, 2, 76 noise_note 6, 14, 0, 58 diff --git a/audio/sfx/unused_cry_2.asm b/audio/sfx/unused_cry_2.asm index aa6218e1e..4924e5609 100644 --- a/audio/sfx/unused_cry_2.asm +++ b/audio/sfx/unused_cry_2.asm @@ -9,7 +9,6 @@ SFX_UnusedCry_2_Ch5: ; unreferenced square_note 8, 7, 1, 1924 sound_ret - SFX_UnusedCry_2_Ch6: ; unreferenced duty_cycle_pattern 0, 0, 1, 1 square_note 15, 10, 0, 1857 @@ -20,7 +19,6 @@ SFX_UnusedCry_2_Ch6: ; unreferenced square_note 8, 3, 1, 1862 sound_ret - SFX_UnusedCry_2_Ch8: ; unreferenced noise_note 2, 15, 2, 76 noise_note 6, 14, 0, 58 diff --git a/audio/sfx/unused_cry_3.asm b/audio/sfx/unused_cry_3.asm index 957216332..6f3e27375 100644 --- a/audio/sfx/unused_cry_3.asm +++ b/audio/sfx/unused_cry_3.asm @@ -9,7 +9,6 @@ SFX_UnusedCry_3_Ch5: ; unreferenced square_note 8, 7, 1, 1924 sound_ret - SFX_UnusedCry_3_Ch6: ; unreferenced duty_cycle_pattern 0, 0, 1, 1 square_note 15, 10, 0, 1857 @@ -20,7 +19,6 @@ SFX_UnusedCry_3_Ch6: ; unreferenced square_note 8, 3, 1, 1862 sound_ret - SFX_UnusedCry_3_Ch8: ; unreferenced noise_note 2, 15, 2, 76 noise_note 6, 14, 0, 58 From 8f81e71f192bce4b6f56b042638da376737e5abc Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 10 Jul 2022 21:11:03 -0400 Subject: [PATCH 31/45] Identify some `.asm_*` labels --- audio/low_health_alarm.asm | 14 ++++---- data/sgb/sgb_packets.asm | 16 ++++----- engine/battle/core.asm | 4 +-- engine/events/diploma.asm | 5 +-- engine/events/hidden_objects/bench_guys.asm | 4 +-- .../hidden_objects/cinnabar_gym_quiz.asm | 4 +-- engine/events/pewter_guys.asm | 4 +-- engine/gfx/hp_bar.asm | 4 +-- engine/gfx/palettes.asm | 16 ++++----- engine/items/item_effects.asm | 36 +++++++++---------- engine/math/multiply_divide.asm | 22 ++++++------ engine/menus/main_menu.asm | 4 +-- engine/overworld/field_move_messages.asm | 4 +-- engine/overworld/missable_objects.asm | 4 +-- engine/overworld/pathfinding.asm | 8 ++--- engine/overworld/player_state.asm | 8 ++--- engine/overworld/spinners.asm | 14 ++++---- engine/overworld/tilesets.asm | 4 +-- engine/play_time.asm | 8 ++--- home/yes_no.asm | 2 +- 20 files changed, 93 insertions(+), 92 deletions(-) diff --git a/audio/low_health_alarm.asm b/audio/low_health_alarm.asm index 08060aab7..65e19aa7a 100644 --- a/audio/low_health_alarm.asm +++ b/audio/low_health_alarm.asm @@ -7,25 +7,25 @@ Music_DoLowHealthAlarm:: ret z ;nope and $7f ;low 7 bits are the timer. - jr nz, .asm_21383 ;if timer > 0, play low tone. + jr nz, .notToneHi ;if timer > 0, play low tone. call .playToneHi ld a, 30 ;keep this tone for 30 frames. - jr .asm_21395 ;reset the timer. + jr .resetTimer -.asm_21383 +.notToneHi cp 20 - jr nz, .asm_2138a ;if timer == 20, - call .playToneLo ;actually set the sound registers. + jr nz, .noTone ;if timer == 20, + call .playToneLo ;actually set the sound registers. -.asm_2138a +.noTone ld a, $86 ld [wChannelSoundIDs + Ch5], a ;disable sound channel? ld a, [wLowHealthAlarm] and $7f ;decrement alarm timer. dec a -.asm_21395 +.resetTimer ; reset the timer and enable flag. set 7, a ld [wLowHealthAlarm], a diff --git a/data/sgb/sgb_packets.asm b/data/sgb/sgb_packets.asm index 11fc8900d..2a38f6c5b 100644 --- a/data/sgb/sgb_packets.asm +++ b/data/sgb/sgb_packets.asm @@ -241,14 +241,14 @@ MaskEnCancelPacket: MASK_EN 0 ; This set of packets is found in several Japanese SGB-compatible titles. ; It appears to be part of NCL's SGB devkit. -DataSnd_72548: +DataSndPacket1: DATA_SND $85d, $0, 11 db $8C ; cpx #$8c (2) db $D0, $F4 ; bne -$0c db $60 ; rts ds 7, 0 -DataSnd_72558: +DataSndPacket2: DATA_SND $852, $0, 11 db $A9, $E7 ; lda #$e7 db $9F, $01, $C0, $7E ; sta $7ec001, x @@ -258,7 +258,7 @@ DataSnd_72558: db $E8 ; inx db $E0 ; cpx #$8c (1) -DataSnd_72568: +DataSndPacket3: DATA_SND $847, $0, 11 db $C4 ; cmp #$c4 (2) db $D0, $16 ; bne +$16 @@ -268,7 +268,7 @@ DataSnd_72568: db $D0, $10 ; bne +$10 db $A2, $28 ; ldx #$28 -DataSnd_72578: +DataSndPacket4: DATA_SND $83c, $0, 11 db $F0, $12 ; beq +$12 db $A5 ; lda dp @@ -279,7 +279,7 @@ DataSnd_72578: db $CA ; dex db $C9 ; cmp #$c4 (1) -DataSnd_72588: +DataSndPacket5: DATA_SND $831, $0, 11 dbw $0C, $CAA5 ; tsb $caa5 db $C9, $7E ; cmp #$7e @@ -288,7 +288,7 @@ DataSnd_72588: db $CB ; wai db $C9, $7E ; cmp #$7e -DataSnd_72598: +DataSndPacket6: DATA_SND $826, $0, 11 db $39 ; bne +$39 (2) dbw $CD, $C48 ; cmp $c48 @@ -297,7 +297,7 @@ DataSnd_72598: db $C9, $C9 ; cmp #$c9 db $80, $D0 ; bra -$30 -DataSnd_725a8: +DataSndPacket7: DATA_SND $81b, $0, 11 db $EA ; nop db $EA ; nop @@ -309,7 +309,7 @@ DataSnd_725a8: dbw $CD,$C4F ; cmp $c4f db $D0 ; bne +$39 (1) -DataSnd_725b8: +DataSndPacket8: DATA_SND $810, $0, 11 dbw $4C, $820 ; jmp $820 db $EA ; nop diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 580a98997..62813eb42 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -6768,11 +6768,11 @@ InitOpponent: DetermineWildOpponent: ld a, [wd732] bit 1, a - jr z, .asm_3ef2f + jr z, .notDebug ldh a, [hJoyHeld] bit BIT_B_BUTTON, a ret nz -.asm_3ef2f +.notDebug ld a, [wNumberOfNoRandomBattleStepsLeft] and a ret nz diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm index 41e0d7c65..e08b1f249 100644 --- a/engine/events/diploma.asm +++ b/engine/events/diploma.asm @@ -17,9 +17,10 @@ DisplayDiploma:: hlcoord 0, 0 lb bc, 16, 18 predef Diploma_TextBoxBorder + ld hl, DiplomaTextPointersAndCoords ld c, $5 -.asm_56715 +.placeTextLoop push bc ld a, [hli] ld e, a @@ -34,7 +35,7 @@ DisplayDiploma:: inc hl pop bc dec c - jr nz, .asm_56715 + jr nz, .placeTextLoop hlcoord 10, 4 ld de, wPlayerName call PlaceString diff --git a/engine/events/hidden_objects/bench_guys.asm b/engine/events/hidden_objects/bench_guys.asm index b41434ad5..55090c01a 100644 --- a/engine/events/hidden_objects/bench_guys.asm +++ b/engine/events/hidden_objects/bench_guys.asm @@ -79,9 +79,9 @@ SaffronCityPokecenterBenchGuyText:: text_asm CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ld hl, SaffronCityPokecenterBenchGuyText2 - jr nz, .asm_624f2 + jr nz, .printText ld hl, SaffronCityPokecenterBenchGuyText1 -.asm_624f2 +.printText call PrintText jp TextScriptEnd diff --git a/engine/events/hidden_objects/cinnabar_gym_quiz.asm b/engine/events/hidden_objects/cinnabar_gym_quiz.asm index f4c46115a..69f03f2c3 100644 --- a/engine/events/hidden_objects/cinnabar_gym_quiz.asm +++ b/engine/events/hidden_objects/cinnabar_gym_quiz.asm @@ -32,7 +32,7 @@ CinnabarGymQuiz:: call PrintText ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - call CinnabarGymQuiz_1ea92 + call CinnabarGymQuiz_AskQuestion jp TextScriptEnd CinnabarGymQuizIntroText: @@ -75,7 +75,7 @@ CinnabarGymGateFlagAction: EventFlagAddress hl, EVENT_CINNABAR_GYM_GATE0_UNLOCKED predef_jump FlagActionPredef -CinnabarGymQuiz_1ea92: +CinnabarGymQuiz_AskQuestion: call YesNoChoice ldh a, [hGymGateAnswer] ld c, a diff --git a/engine/events/pewter_guys.asm b/engine/events/pewter_guys.asm index 532fa4bfd..06bb60fb4 100644 --- a/engine/events/pewter_guys.asm +++ b/engine/events/pewter_guys.asm @@ -8,7 +8,7 @@ PewterGuys: add hl, de ld d, h ld e, l - ld hl, PointerTable_37ce6 + ld hl, PewterGuysCoordsTable ld a, [wWhichPewterGuy] add a ld b, 0 @@ -48,7 +48,7 @@ PewterGuys: inc hl jr .findMatchingCoordsLoop -PointerTable_37ce6: +PewterGuysCoordsTable: dw PewterMuseumGuyCoords dw PewterGymGuyCoords diff --git a/engine/gfx/hp_bar.asm b/engine/gfx/hp_bar.asm index e4de0b95f..d848a337a 100644 --- a/engine/gfx/hp_bar.asm +++ b/engine/gfx/hp_bar.asm @@ -215,10 +215,10 @@ UpdateHPBar_PrintHPNumber: push hl ldh a, [hUILayoutFlags] bit 0, a - jr z, .asm_fb15 + jr z, .hpBelowBar ld de, $9 jr .next -.asm_fb15 +.hpBelowBar ld de, $15 .next add hl, de diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm index caa22c10d..d97fbc556 100644 --- a/engine/gfx/palettes.asm +++ b/engine/gfx/palettes.asm @@ -443,14 +443,14 @@ PrepareSuperNintendoVRAMTransfer: .packetPointers ; Only the first packet is needed. dw MaskEnFreezePacket - dw DataSnd_72548 - dw DataSnd_72558 - dw DataSnd_72568 - dw DataSnd_72578 - dw DataSnd_72588 - dw DataSnd_72598 - dw DataSnd_725a8 - dw DataSnd_725b8 + dw DataSndPacket1 + dw DataSndPacket2 + dw DataSndPacket3 + dw DataSndPacket4 + dw DataSndPacket5 + dw DataSndPacket6 + dw DataSndPacket7 + dw DataSndPacket8 CheckSGB: ; Returns whether the game is running on an SGB in carry. diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index faba88374..024084844 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -2646,7 +2646,7 @@ SendNewMonToBox: ld a, [wcf91] ld [wd0b5], a ld c, a -.asm_e7b1 +.loop inc de ld a, [de] ld b, a @@ -2654,13 +2654,13 @@ SendNewMonToBox: ld c, b ld [de], a cp $ff - jr nz, .asm_e7b1 + jr nz, .loop call GetMonHeader ld hl, wBoxMonOT ld bc, NAME_LENGTH ld a, [wBoxCount] dec a - jr z, .asm_e7ee + jr z, .skip dec a call AddNTimes push hl @@ -2672,7 +2672,7 @@ SendNewMonToBox: ld a, [wBoxCount] dec a ld b, a -.asm_e7db +.loop2 push bc push hl ld bc, NAME_LENGTH @@ -2684,15 +2684,15 @@ SendNewMonToBox: add hl, bc pop bc dec b - jr nz, .asm_e7db -.asm_e7ee + jr nz, .loop2 +.skip ld hl, wPlayerName ld de, wBoxMonOT ld bc, NAME_LENGTH call CopyData ld a, [wBoxCount] dec a - jr z, .asm_e82a + jr z, .skip2 ld hl, wBoxMonNicks ld bc, NAME_LENGTH dec a @@ -2706,7 +2706,7 @@ SendNewMonToBox: ld a, [wBoxCount] dec a ld b, a -.asm_e817 +.loop3 push bc push hl ld bc, NAME_LENGTH @@ -2718,15 +2718,15 @@ SendNewMonToBox: add hl, bc pop bc dec b - jr nz, .asm_e817 -.asm_e82a + jr nz, .loop3 +.skip2 ld hl, wBoxMonNicks ld a, NAME_MON_SCREEN ld [wNamingScreenType], a predef AskName ld a, [wBoxCount] dec a - jr z, .asm_e867 + jr z, .skip3 ld hl, wBoxMons ld bc, wBoxMon2 - wBoxMon1 dec a @@ -2740,7 +2740,7 @@ SendNewMonToBox: ld a, [wBoxCount] dec a ld b, a -.asm_e854 +.loop4 push bc push hl ld bc, wBoxMon2 - wBoxMon1 @@ -2752,8 +2752,8 @@ SendNewMonToBox: add hl, bc pop bc dec b - jr nz, .asm_e854 -.asm_e867 + jr nz, .loop4 +.skip3 ld a, [wEnemyMonLevel] ld [wEnemyMonBoxLevel], a ld hl, wEnemyMon @@ -2783,11 +2783,11 @@ SendNewMonToBox: inc de xor a ld b, NUM_STATS * 2 -.asm_e89f +.loop5 ld [de], a inc de dec b - jr nz, .asm_e89f + jr nz, .loop5 ld hl, wEnemyMonDVs ld a, [hli] ld [de], a @@ -2796,12 +2796,12 @@ SendNewMonToBox: ld [de], a ld hl, wEnemyMonPP ld b, NUM_MOVES -.asm_e8b1 +.loop6 ld a, [hli] inc de ld [de], a dec b - jr nz, .asm_e8b1 + jr nz, .loop6 ret ; checks if the tile in front of the player is a shore or water tile diff --git a/engine/math/multiply_divide.asm b/engine/math/multiply_divide.asm index 2fcda1588..ab0650525 100644 --- a/engine/math/multiply_divide.asm +++ b/engine/math/multiply_divide.asm @@ -68,7 +68,7 @@ _Divide:: ldh [hDivideBuffer+4], a ld a, $9 ld e, a -.asm_37db3 +.loop ldh a, [hDivideBuffer] ld c, a ldh a, [hDividend+1] ; (aliases: hMultiplicand) @@ -78,18 +78,18 @@ _Divide:: ld c, a ldh a, [hDividend] ; (aliases: hProduct, hPastLeadingZeros, hQuotient) sbc c - jr c, .asm_37dce + jr c, .next ldh [hDividend], a ; (aliases: hProduct, hPastLeadingZeros, hQuotient) ld a, d ldh [hDividend+1], a ; (aliases: hMultiplicand) ldh a, [hDivideBuffer+4] inc a ldh [hDivideBuffer+4], a - jr .asm_37db3 -.asm_37dce + jr .loop +.next ld a, b cp $1 - jr z, .asm_37e18 + jr z, .done ldh a, [hDivideBuffer+4] sla a ldh [hDivideBuffer+4], a @@ -103,7 +103,7 @@ _Divide:: rl a ldh [hDivideBuffer+1], a dec e - jr nz, .asm_37e04 + jr nz, .next2 ld a, $8 ld e, a ldh a, [hDivideBuffer] @@ -116,20 +116,20 @@ _Divide:: ldh [hDividend+1], a ; (aliases: hMultiplicand) ldh a, [hDividend+3] ldh [hDividend+2], a -.asm_37e04 +.next2 ld a, e cp $1 - jr nz, .asm_37e0a + jr nz, .okay dec b -.asm_37e0a +.okay ldh a, [hDivisor] ; (aliases: hDivisor, hMultiplier, hPowerOf10) srl a ldh [hDivisor], a ; (aliases: hDivisor, hMultiplier, hPowerOf10) ldh a, [hDivideBuffer] rr a ldh [hDivideBuffer], a - jr .asm_37db3 -.asm_37e18 + jr .loop +.done ldh a, [hDividend+1] ; (aliases: hMultiplicand) ldh [hRemainder], a ; (aliases: hDivisor, hMultiplier, hPowerOf10) ldh a, [hDivideBuffer+4] diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index 7db60d3d3..d94c65eb4 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -184,13 +184,13 @@ LinkMenu: ld b, a and $f0 cp $d0 - jr z, .asm_5c7d + jr z, .checkEnemyMenuSelection ld a, [wLinkMenuSelectionReceiveBuffer + 1] ld b, a and $f0 cp $d0 jr nz, .exchangeMenuSelectionLoop -.asm_5c7d +.checkEnemyMenuSelection ld a, b and $c ; did the enemy press A or B? jr nz, .enemyPressedAOrB diff --git a/engine/overworld/field_move_messages.asm b/engine/overworld/field_move_messages.asm index 520ef8add..d75ffc213 100644 --- a/engine/overworld/field_move_messages.asm +++ b/engine/overworld/field_move_messages.asm @@ -32,7 +32,7 @@ IsSurfingAllowed: ret nz CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE ret z - ld hl, CoordsData_cdf7 + ld hl, SeafoamIslandsB4FStairsCoords call ArePlayerCoordsInArray ret nc ld hl, wd728 @@ -45,7 +45,7 @@ IsSurfingAllowed: ld hl, CyclingIsFunText jp PrintText -CoordsData_cdf7: +SeafoamIslandsB4FStairsCoords: dbmapcoord 7, 11 db -1 ; end diff --git a/engine/overworld/missable_objects.asm b/engine/overworld/missable_objects.asm index 31fdc2578..8f88b1386 100644 --- a/engine/overworld/missable_objects.asm +++ b/engine/overworld/missable_objects.asm @@ -23,9 +23,9 @@ LoadMissableObjects: ld de, MissableObjects ; calculate difference between out pointer and the base pointer ld a, l sub e - jr nc, .asm_f13c + jr nc, .noCarry dec h -.asm_f13c +.noCarry ld l, a ld a, h sub d diff --git a/engine/overworld/pathfinding.asm b/engine/overworld/pathfinding.asm index 1925dbbc4..d067345e2 100644 --- a/engine/overworld/pathfinding.asm +++ b/engine/overworld/pathfinding.asm @@ -14,22 +14,22 @@ FindPathToPlayer: call CalcDifference ld d, a and a - jr nz, .asm_f8da + jr nz, .stillHasYProgress ldh a, [hFindPathFlags] set 0, a ; current end of path matches the player's Y coordinate ldh [hFindPathFlags], a -.asm_f8da +.stillHasYProgress ldh a, [hFindPathXProgress] ld b, a ldh a, [hNPCPlayerXDistance] ; X distance in steps call CalcDifference ld e, a and a - jr nz, .asm_f8ec + jr nz, .stillHasXProgress ldh a, [hFindPathFlags] set 1, a ; current end of path matches the player's X coordinate ldh [hFindPathFlags], a -.asm_f8ec +.stillHasXProgress ldh a, [hFindPathFlags] cp $3 ; has the end of the path reached the player's position? jr z, .done diff --git a/engine/overworld/player_state.asm b/engine/overworld/player_state.asm index 70326754b..8d652cdfd 100644 --- a/engine/overworld/player_state.asm +++ b/engine/overworld/player_state.asm @@ -101,10 +101,10 @@ IsPlayerFacingEdgeOfMap:: ld b, a ld a, [wXCoord] ld c, a - ld de, .asm_c41e + ld de, .return push de jp hl -.asm_c41e +.return pop bc pop de pop hl @@ -239,11 +239,11 @@ PrintSafariZoneSteps:: call PlaceString ld a, [wNumSafariBalls] cp 10 - jr nc, .asm_c56d + jr nc, .tenOrMore hlcoord 5, 3 ld a, " " ld [hl], a -.asm_c56d +.tenOrMore hlcoord 6, 3 ld de, wNumSafariBalls lb bc, 1, 2 diff --git a/engine/overworld/spinners.asm b/engine/overworld/spinners.asm index 0ac6380d8..98b478c4b 100644 --- a/engine/overworld/spinners.asm +++ b/engine/overworld/spinners.asm @@ -11,18 +11,18 @@ LoadSpinnerArrowTiles:: ld a, [wCurMapTileset] cp FACILITY ld hl, FacilitySpinnerArrows - jr z, .asm_44ff6 + jr z, .gotSpinnerArrows ld hl, GymSpinnerArrows -.asm_44ff6 +.gotSpinnerArrows ld a, [wSimulatedJoypadStatesIndex] bit 0, a - jr nz, .asm_45001 - ld de, $18 + jr nz, .alternateGraphics + ld de, 6 * 4 add hl, de -.asm_45001 +.alternateGraphics ld a, $4 ld bc, $0 -.asm_45006 +.loop push af push hl push bc @@ -46,7 +46,7 @@ LoadSpinnerArrowTiles:: pop hl pop af dec a - jr nz, .asm_45006 + jr nz, .loop ret INCLUDE "data/tilesets/spinner_tiles.asm" diff --git a/engine/overworld/tilesets.asm b/engine/overworld/tilesets.asm index fa5cf6265..d36e11695 100644 --- a/engine/overworld/tilesets.asm +++ b/engine/overworld/tilesets.asm @@ -35,13 +35,13 @@ LoadTilesetHeader: call IsInArray pop de pop hl - jr c, .asm_c797 + jr c, .dungeon ld a, [wCurMapTileset] ld b, a ldh a, [hPreviousTileset] cp b jr z, .done -.asm_c797 +.dungeon ld a, [wDestinationWarpID] cp $ff jr z, .done diff --git a/engine/play_time.asm b/engine/play_time.asm index 298972429..dcba88c24 100644 --- a/engine/play_time.asm +++ b/engine/play_time.asm @@ -39,12 +39,12 @@ TrackPlayTime:: CountDownIgnoreInputBitReset: ld a, [wIgnoreInputCounter] and a - jr nz, .asm_18e40 + jr nz, .decrement ld a, $ff - jr .asm_18e41 -.asm_18e40 + jr .continue +.decrement dec a -.asm_18e41 +.continue ld [wIgnoreInputCounter], a and a ret nz diff --git a/home/yes_no.asm b/home/yes_no.asm index 5b0e09ed6..3f5a5a45b 100644 --- a/home/yes_no.asm +++ b/home/yes_no.asm @@ -5,7 +5,7 @@ YesNoChoice:: call InitYesNoTextBoxParameters jr DisplayYesNoChoice -Func_35f4:: +TwoOptionMenu:: ; unreferenced ld a, TWO_OPTION_MENU ld [wTextBoxID], a call InitYesNoTextBoxParameters From ce4c2d3d1247b7d90c7cf6d5b64ef486a88b70c7 Mon Sep 17 00:00:00 2001 From: vulcandth Date: Sun, 10 Jul 2022 22:42:17 -0500 Subject: [PATCH 32/45] Remove empty lines on the top of map header files (#375) --- data/maps/headers/AgathasRoom.asm | 1 - data/maps/headers/BikeShop.asm | 1 - data/maps/headers/BillsHouse.asm | 1 - data/maps/headers/BluesHouse.asm | 1 - data/maps/headers/BrunosRoom.asm | 1 - data/maps/headers/CeladonChiefHouse.asm | 1 - data/maps/headers/CeladonCity.asm | 1 - data/maps/headers/CeladonDiner.asm | 1 - data/maps/headers/CeladonGym.asm | 1 - data/maps/headers/CeladonHotel.asm | 1 - data/maps/headers/CeladonMansion1F.asm | 1 - data/maps/headers/CeladonMansion2F.asm | 1 - data/maps/headers/CeladonMansion3F.asm | 1 - data/maps/headers/CeladonMansionRoof.asm | 1 - data/maps/headers/CeladonMansionRoofHouse.asm | 1 - data/maps/headers/CeladonMart1F.asm | 1 - data/maps/headers/CeladonMart2F.asm | 1 - data/maps/headers/CeladonMart3F.asm | 1 - data/maps/headers/CeladonMart4F.asm | 1 - data/maps/headers/CeladonMart5F.asm | 1 - data/maps/headers/CeladonMartElevator.asm | 1 - data/maps/headers/CeladonMartRoof.asm | 1 - data/maps/headers/CeladonPokecenter.asm | 1 - data/maps/headers/CeruleanBadgeHouse.asm | 1 - data/maps/headers/CeruleanCave1F.asm | 1 - data/maps/headers/CeruleanCave2F.asm | 1 - data/maps/headers/CeruleanCaveB1F.asm | 1 - data/maps/headers/CeruleanCity.asm | 1 - data/maps/headers/CeruleanGym.asm | 1 - data/maps/headers/CeruleanMart.asm | 1 - data/maps/headers/CeruleanPokecenter.asm | 1 - data/maps/headers/CeruleanTradeHouse.asm | 1 - data/maps/headers/CeruleanTrashedHouse.asm | 1 - data/maps/headers/ChampionsRoom.asm | 1 - data/maps/headers/CinnabarGym.asm | 1 - data/maps/headers/CinnabarIsland.asm | 1 - data/maps/headers/CinnabarLab.asm | 1 - data/maps/headers/CinnabarLabFossilRoom.asm | 1 - data/maps/headers/CinnabarLabMetronomeRoom.asm | 1 - data/maps/headers/CinnabarLabTradeRoom.asm | 1 - data/maps/headers/CinnabarMart.asm | 1 - data/maps/headers/CinnabarPokecenter.asm | 1 - data/maps/headers/Colosseum.asm | 1 - data/maps/headers/CopycatsHouse1F.asm | 1 - data/maps/headers/CopycatsHouse2F.asm | 1 - data/maps/headers/Daycare.asm | 1 - data/maps/headers/DiglettsCave.asm | 1 - data/maps/headers/DiglettsCaveRoute11.asm | 1 - data/maps/headers/DiglettsCaveRoute2.asm | 1 - data/maps/headers/FightingDojo.asm | 1 - data/maps/headers/FuchsiaBillsGrandpasHouse.asm | 1 - data/maps/headers/FuchsiaCity.asm | 1 - data/maps/headers/FuchsiaGoodRodHouse.asm | 1 - data/maps/headers/FuchsiaGym.asm | 1 - data/maps/headers/FuchsiaMart.asm | 1 - data/maps/headers/FuchsiaMeetingRoom.asm | 1 - data/maps/headers/FuchsiaPokecenter.asm | 1 - data/maps/headers/GameCorner.asm | 1 - data/maps/headers/GameCornerPrizeRoom.asm | 1 - data/maps/headers/HallOfFame.asm | 1 - data/maps/headers/IndigoPlateau.asm | 1 - data/maps/headers/IndigoPlateauLobby.asm | 1 - data/maps/headers/LancesRoom.asm | 1 - data/maps/headers/LavenderCuboneHouse.asm | 1 - data/maps/headers/LavenderMart.asm | 1 - data/maps/headers/LavenderPokecenter.asm | 1 - data/maps/headers/LavenderTown.asm | 1 - data/maps/headers/LoreleisRoom.asm | 1 - data/maps/headers/MrFujisHouse.asm | 1 - data/maps/headers/MrPsychicsHouse.asm | 1 - data/maps/headers/MtMoon1F.asm | 1 - data/maps/headers/MtMoonB1F.asm | 1 - data/maps/headers/MtMoonB2F.asm | 1 - data/maps/headers/MtMoonPokecenter.asm | 1 - data/maps/headers/Museum1F.asm | 1 - data/maps/headers/Museum2F.asm | 1 - data/maps/headers/NameRatersHouse.asm | 1 - data/maps/headers/OaksLab.asm | 1 - data/maps/headers/PalletTown.asm | 1 - data/maps/headers/PewterCity.asm | 1 - data/maps/headers/PewterGym.asm | 1 - data/maps/headers/PewterMart.asm | 1 - data/maps/headers/PewterNidoranHouse.asm | 1 - data/maps/headers/PewterPokecenter.asm | 1 - data/maps/headers/PewterSpeechHouse.asm | 1 - data/maps/headers/PokemonFanClub.asm | 1 - data/maps/headers/PokemonMansion1F.asm | 1 - data/maps/headers/PokemonMansion2F.asm | 1 - data/maps/headers/PokemonMansion3F.asm | 1 - data/maps/headers/PokemonMansionB1F.asm | 1 - data/maps/headers/PokemonTower1F.asm | 1 - data/maps/headers/PokemonTower2F.asm | 1 - data/maps/headers/PokemonTower3F.asm | 1 - data/maps/headers/PokemonTower4F.asm | 1 - data/maps/headers/PokemonTower5F.asm | 1 - data/maps/headers/PokemonTower6F.asm | 1 - data/maps/headers/PokemonTower7F.asm | 1 - data/maps/headers/PowerPlant.asm | 1 - data/maps/headers/RedsHouse1F.asm | 1 - data/maps/headers/RedsHouse2F.asm | 1 - data/maps/headers/RockTunnel1F.asm | 1 - data/maps/headers/RockTunnelB1F.asm | 1 - data/maps/headers/RockTunnelPokecenter.asm | 1 - data/maps/headers/RocketHideoutB1F.asm | 1 - data/maps/headers/RocketHideoutB2F.asm | 1 - data/maps/headers/RocketHideoutB3F.asm | 1 - data/maps/headers/RocketHideoutB4F.asm | 1 - data/maps/headers/RocketHideoutElevator.asm | 1 - data/maps/headers/Route1.asm | 1 - data/maps/headers/Route10.asm | 1 - data/maps/headers/Route11.asm | 1 - data/maps/headers/Route11Gate1F.asm | 1 - data/maps/headers/Route11Gate2F.asm | 1 - data/maps/headers/Route12.asm | 1 - data/maps/headers/Route12Gate1F.asm | 1 - data/maps/headers/Route12Gate2F.asm | 1 - data/maps/headers/Route12SuperRodHouse.asm | 1 - data/maps/headers/Route13.asm | 1 - data/maps/headers/Route14.asm | 1 - data/maps/headers/Route15.asm | 1 - data/maps/headers/Route15Gate1F.asm | 1 - data/maps/headers/Route15Gate2F.asm | 1 - data/maps/headers/Route16.asm | 1 - data/maps/headers/Route16FlyHouse.asm | 1 - data/maps/headers/Route16Gate1F.asm | 1 - data/maps/headers/Route16Gate2F.asm | 1 - data/maps/headers/Route17.asm | 1 - data/maps/headers/Route18.asm | 1 - data/maps/headers/Route18Gate1F.asm | 1 - data/maps/headers/Route18Gate2F.asm | 1 - data/maps/headers/Route19.asm | 1 - data/maps/headers/Route2.asm | 1 - data/maps/headers/Route20.asm | 1 - data/maps/headers/Route21.asm | 1 - data/maps/headers/Route22.asm | 1 - data/maps/headers/Route22Gate.asm | 1 - data/maps/headers/Route23.asm | 1 - data/maps/headers/Route24.asm | 1 - data/maps/headers/Route25.asm | 1 - data/maps/headers/Route2Gate.asm | 1 - data/maps/headers/Route2TradeHouse.asm | 1 - data/maps/headers/Route3.asm | 1 - data/maps/headers/Route4.asm | 1 - data/maps/headers/Route5.asm | 1 - data/maps/headers/Route5Gate.asm | 1 - data/maps/headers/Route6.asm | 1 - data/maps/headers/Route6Gate.asm | 1 - data/maps/headers/Route7.asm | 1 - data/maps/headers/Route7Gate.asm | 1 - data/maps/headers/Route8.asm | 1 - data/maps/headers/Route8Gate.asm | 1 - data/maps/headers/Route9.asm | 1 - data/maps/headers/SSAnne1F.asm | 1 - data/maps/headers/SSAnne1FRooms.asm | 1 - data/maps/headers/SSAnne2F.asm | 1 - data/maps/headers/SSAnne2FRooms.asm | 1 - data/maps/headers/SSAnne3F.asm | 1 - data/maps/headers/SSAnneB1F.asm | 1 - data/maps/headers/SSAnneB1FRooms.asm | 1 - data/maps/headers/SSAnneBow.asm | 1 - data/maps/headers/SSAnneCaptainsRoom.asm | 1 - data/maps/headers/SSAnneKitchen.asm | 1 - data/maps/headers/SafariZoneCenter.asm | 1 - data/maps/headers/SafariZoneCenterRestHouse.asm | 1 - data/maps/headers/SafariZoneEast.asm | 1 - data/maps/headers/SafariZoneEastRestHouse.asm | 1 - data/maps/headers/SafariZoneGate.asm | 1 - data/maps/headers/SafariZoneNorth.asm | 1 - data/maps/headers/SafariZoneNorthRestHouse.asm | 1 - data/maps/headers/SafariZoneSecretHouse.asm | 1 - data/maps/headers/SafariZoneWest.asm | 1 - data/maps/headers/SafariZoneWestRestHouse.asm | 1 - data/maps/headers/SaffronCity.asm | 1 - data/maps/headers/SaffronGym.asm | 1 - data/maps/headers/SaffronMart.asm | 1 - data/maps/headers/SaffronPidgeyHouse.asm | 1 - data/maps/headers/SaffronPokecenter.asm | 1 - data/maps/headers/SeafoamIslands1F.asm | 1 - data/maps/headers/SeafoamIslandsB1F.asm | 1 - data/maps/headers/SeafoamIslandsB2F.asm | 1 - data/maps/headers/SeafoamIslandsB3F.asm | 1 - data/maps/headers/SeafoamIslandsB4F.asm | 1 - data/maps/headers/SilphCo10F.asm | 1 - data/maps/headers/SilphCo11F.asm | 1 - data/maps/headers/SilphCo1F.asm | 1 - data/maps/headers/SilphCo2F.asm | 1 - data/maps/headers/SilphCo3F.asm | 1 - data/maps/headers/SilphCo4F.asm | 1 - data/maps/headers/SilphCo5F.asm | 1 - data/maps/headers/SilphCo6F.asm | 1 - data/maps/headers/SilphCo7F.asm | 1 - data/maps/headers/SilphCo8F.asm | 1 - data/maps/headers/SilphCo9F.asm | 1 - data/maps/headers/SilphCoElevator.asm | 1 - data/maps/headers/TradeCenter.asm | 1 - data/maps/headers/UndergroundPathNorthSouth.asm | 1 - data/maps/headers/UndergroundPathRoute5.asm | 1 - data/maps/headers/UndergroundPathRoute6.asm | 1 - data/maps/headers/UndergroundPathRoute7.asm | 1 - data/maps/headers/UndergroundPathRoute7Copy.asm | 1 - data/maps/headers/UndergroundPathRoute8.asm | 1 - data/maps/headers/UndergroundPathWestEast.asm | 1 - data/maps/headers/VermilionCity.asm | 1 - data/maps/headers/VermilionDock.asm | 1 - data/maps/headers/VermilionGym.asm | 1 - data/maps/headers/VermilionMart.asm | 1 - data/maps/headers/VermilionOldRodHouse.asm | 1 - data/maps/headers/VermilionPidgeyHouse.asm | 1 - data/maps/headers/VermilionPokecenter.asm | 1 - data/maps/headers/VermilionTradeHouse.asm | 1 - data/maps/headers/VictoryRoad1F.asm | 1 - data/maps/headers/VictoryRoad2F.asm | 1 - data/maps/headers/VictoryRoad3F.asm | 1 - data/maps/headers/ViridianCity.asm | 1 - data/maps/headers/ViridianForest.asm | 1 - data/maps/headers/ViridianForestNorthGate.asm | 1 - data/maps/headers/ViridianForestSouthGate.asm | 1 - data/maps/headers/ViridianGym.asm | 1 - data/maps/headers/ViridianMart.asm | 1 - data/maps/headers/ViridianNicknameHouse.asm | 1 - data/maps/headers/ViridianPokecenter.asm | 1 - data/maps/headers/ViridianSchoolHouse.asm | 1 - data/maps/headers/WardensHouse.asm | 1 - 223 files changed, 223 deletions(-) diff --git a/data/maps/headers/AgathasRoom.asm b/data/maps/headers/AgathasRoom.asm index d04e0cfd0..882d03e01 100644 --- a/data/maps/headers/AgathasRoom.asm +++ b/data/maps/headers/AgathasRoom.asm @@ -1,3 +1,2 @@ - map_header AgathasRoom, AGATHAS_ROOM, CEMETERY, 0 end_map_header diff --git a/data/maps/headers/BikeShop.asm b/data/maps/headers/BikeShop.asm index b4b520e24..a9ef30944 100644 --- a/data/maps/headers/BikeShop.asm +++ b/data/maps/headers/BikeShop.asm @@ -1,3 +1,2 @@ - map_header BikeShop, BIKE_SHOP, CLUB, 0 end_map_header diff --git a/data/maps/headers/BillsHouse.asm b/data/maps/headers/BillsHouse.asm index 6063175d1..363234fdd 100644 --- a/data/maps/headers/BillsHouse.asm +++ b/data/maps/headers/BillsHouse.asm @@ -1,3 +1,2 @@ - map_header BillsHouse, BILLS_HOUSE, INTERIOR, 0 end_map_header diff --git a/data/maps/headers/BluesHouse.asm b/data/maps/headers/BluesHouse.asm index 33cee2544..de4b51f4c 100644 --- a/data/maps/headers/BluesHouse.asm +++ b/data/maps/headers/BluesHouse.asm @@ -1,3 +1,2 @@ - map_header BluesHouse, BLUES_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/BrunosRoom.asm b/data/maps/headers/BrunosRoom.asm index a0b2d4fd2..706d5ccdb 100644 --- a/data/maps/headers/BrunosRoom.asm +++ b/data/maps/headers/BrunosRoom.asm @@ -1,3 +1,2 @@ - map_header BrunosRoom, BRUNOS_ROOM, GYM, 0 end_map_header diff --git a/data/maps/headers/CeladonChiefHouse.asm b/data/maps/headers/CeladonChiefHouse.asm index 34f17273e..c8225665c 100644 --- a/data/maps/headers/CeladonChiefHouse.asm +++ b/data/maps/headers/CeladonChiefHouse.asm @@ -1,3 +1,2 @@ - map_header CeladonChiefHouse, CELADON_CHIEF_HOUSE, MANSION, 0 end_map_header diff --git a/data/maps/headers/CeladonCity.asm b/data/maps/headers/CeladonCity.asm index 6faa6f481..afd93c629 100644 --- a/data/maps/headers/CeladonCity.asm +++ b/data/maps/headers/CeladonCity.asm @@ -1,4 +1,3 @@ - map_header CeladonCity, CELADON_CITY, OVERWORLD, WEST | EAST connection west, Route16, ROUTE_16, 4 connection east, Route7, ROUTE_7, 4 diff --git a/data/maps/headers/CeladonDiner.asm b/data/maps/headers/CeladonDiner.asm index b18d96331..1afd5dd93 100644 --- a/data/maps/headers/CeladonDiner.asm +++ b/data/maps/headers/CeladonDiner.asm @@ -1,3 +1,2 @@ - map_header CeladonDiner, CELADON_DINER, LOBBY, 0 end_map_header diff --git a/data/maps/headers/CeladonGym.asm b/data/maps/headers/CeladonGym.asm index 2302c65a8..66cec4d3f 100644 --- a/data/maps/headers/CeladonGym.asm +++ b/data/maps/headers/CeladonGym.asm @@ -1,3 +1,2 @@ - map_header CeladonGym, CELADON_GYM, GYM, 0 end_map_header diff --git a/data/maps/headers/CeladonHotel.asm b/data/maps/headers/CeladonHotel.asm index 2339c14d9..ea5cf5e17 100644 --- a/data/maps/headers/CeladonHotel.asm +++ b/data/maps/headers/CeladonHotel.asm @@ -1,3 +1,2 @@ - map_header CeladonHotel, CELADON_HOTEL, POKECENTER, 0 end_map_header diff --git a/data/maps/headers/CeladonMansion1F.asm b/data/maps/headers/CeladonMansion1F.asm index 459700281..a35fb1dd2 100644 --- a/data/maps/headers/CeladonMansion1F.asm +++ b/data/maps/headers/CeladonMansion1F.asm @@ -1,3 +1,2 @@ - map_header CeladonMansion1F, CELADON_MANSION_1F, MANSION, 0 end_map_header diff --git a/data/maps/headers/CeladonMansion2F.asm b/data/maps/headers/CeladonMansion2F.asm index d5e3e77b7..1450a0937 100644 --- a/data/maps/headers/CeladonMansion2F.asm +++ b/data/maps/headers/CeladonMansion2F.asm @@ -1,3 +1,2 @@ - map_header CeladonMansion2F, CELADON_MANSION_2F, MANSION, 0 end_map_header diff --git a/data/maps/headers/CeladonMansion3F.asm b/data/maps/headers/CeladonMansion3F.asm index 7566caad4..e63113cca 100644 --- a/data/maps/headers/CeladonMansion3F.asm +++ b/data/maps/headers/CeladonMansion3F.asm @@ -1,3 +1,2 @@ - map_header CeladonMansion3F, CELADON_MANSION_3F, MANSION, 0 end_map_header diff --git a/data/maps/headers/CeladonMansionRoof.asm b/data/maps/headers/CeladonMansionRoof.asm index 9cbae6f62..a1ace86d0 100644 --- a/data/maps/headers/CeladonMansionRoof.asm +++ b/data/maps/headers/CeladonMansionRoof.asm @@ -1,3 +1,2 @@ - map_header CeladonMansionRoof, CELADON_MANSION_ROOF, MANSION, 0 end_map_header diff --git a/data/maps/headers/CeladonMansionRoofHouse.asm b/data/maps/headers/CeladonMansionRoofHouse.asm index cb80fac86..5b155f72b 100644 --- a/data/maps/headers/CeladonMansionRoofHouse.asm +++ b/data/maps/headers/CeladonMansionRoofHouse.asm @@ -1,3 +1,2 @@ - map_header CeladonMansionRoofHouse, CELADON_MANSION_ROOF_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/CeladonMart1F.asm b/data/maps/headers/CeladonMart1F.asm index 30bd9ba96..d13751466 100644 --- a/data/maps/headers/CeladonMart1F.asm +++ b/data/maps/headers/CeladonMart1F.asm @@ -1,3 +1,2 @@ - map_header CeladonMart1F, CELADON_MART_1F, LOBBY, 0 end_map_header diff --git a/data/maps/headers/CeladonMart2F.asm b/data/maps/headers/CeladonMart2F.asm index d78dfe287..2117cd766 100644 --- a/data/maps/headers/CeladonMart2F.asm +++ b/data/maps/headers/CeladonMart2F.asm @@ -1,3 +1,2 @@ - map_header CeladonMart2F, CELADON_MART_2F, LOBBY, 0 end_map_header diff --git a/data/maps/headers/CeladonMart3F.asm b/data/maps/headers/CeladonMart3F.asm index ad415eee5..d3bd42825 100644 --- a/data/maps/headers/CeladonMart3F.asm +++ b/data/maps/headers/CeladonMart3F.asm @@ -1,3 +1,2 @@ - map_header CeladonMart3F, CELADON_MART_3F, LOBBY, 0 end_map_header diff --git a/data/maps/headers/CeladonMart4F.asm b/data/maps/headers/CeladonMart4F.asm index b9ce5b34d..c9f170c66 100644 --- a/data/maps/headers/CeladonMart4F.asm +++ b/data/maps/headers/CeladonMart4F.asm @@ -1,3 +1,2 @@ - map_header CeladonMart4F, CELADON_MART_4F, LOBBY, 0 end_map_header diff --git a/data/maps/headers/CeladonMart5F.asm b/data/maps/headers/CeladonMart5F.asm index 04d65b2b6..036e3cad7 100644 --- a/data/maps/headers/CeladonMart5F.asm +++ b/data/maps/headers/CeladonMart5F.asm @@ -1,3 +1,2 @@ - map_header CeladonMart5F, CELADON_MART_5F, LOBBY, 0 end_map_header diff --git a/data/maps/headers/CeladonMartElevator.asm b/data/maps/headers/CeladonMartElevator.asm index 2a98ccb0b..709b5d349 100644 --- a/data/maps/headers/CeladonMartElevator.asm +++ b/data/maps/headers/CeladonMartElevator.asm @@ -1,3 +1,2 @@ - map_header CeladonMartElevator, CELADON_MART_ELEVATOR, LOBBY, 0 end_map_header diff --git a/data/maps/headers/CeladonMartRoof.asm b/data/maps/headers/CeladonMartRoof.asm index 823ff25f1..42089ef0c 100644 --- a/data/maps/headers/CeladonMartRoof.asm +++ b/data/maps/headers/CeladonMartRoof.asm @@ -1,3 +1,2 @@ - map_header CeladonMartRoof, CELADON_MART_ROOF, LOBBY, 0 end_map_header diff --git a/data/maps/headers/CeladonPokecenter.asm b/data/maps/headers/CeladonPokecenter.asm index 378a41ece..e380d1ed6 100644 --- a/data/maps/headers/CeladonPokecenter.asm +++ b/data/maps/headers/CeladonPokecenter.asm @@ -1,3 +1,2 @@ - map_header CeladonPokecenter, CELADON_POKECENTER, POKECENTER, 0 end_map_header diff --git a/data/maps/headers/CeruleanBadgeHouse.asm b/data/maps/headers/CeruleanBadgeHouse.asm index 47a97b141..c06ee7191 100644 --- a/data/maps/headers/CeruleanBadgeHouse.asm +++ b/data/maps/headers/CeruleanBadgeHouse.asm @@ -1,3 +1,2 @@ - map_header CeruleanBadgeHouse, CERULEAN_BADGE_HOUSE, SHIP, 0 end_map_header diff --git a/data/maps/headers/CeruleanCave1F.asm b/data/maps/headers/CeruleanCave1F.asm index 7c80bbeb2..49f6f0cde 100644 --- a/data/maps/headers/CeruleanCave1F.asm +++ b/data/maps/headers/CeruleanCave1F.asm @@ -1,3 +1,2 @@ - map_header CeruleanCave1F, CERULEAN_CAVE_1F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/CeruleanCave2F.asm b/data/maps/headers/CeruleanCave2F.asm index 353e265b9..8644b8ba4 100644 --- a/data/maps/headers/CeruleanCave2F.asm +++ b/data/maps/headers/CeruleanCave2F.asm @@ -1,3 +1,2 @@ - map_header CeruleanCave2F, CERULEAN_CAVE_2F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/CeruleanCaveB1F.asm b/data/maps/headers/CeruleanCaveB1F.asm index d759aa6b7..f7fe5d436 100644 --- a/data/maps/headers/CeruleanCaveB1F.asm +++ b/data/maps/headers/CeruleanCaveB1F.asm @@ -1,3 +1,2 @@ - map_header CeruleanCaveB1F, CERULEAN_CAVE_B1F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/CeruleanCity.asm b/data/maps/headers/CeruleanCity.asm index c925713ca..cf6c45a37 100644 --- a/data/maps/headers/CeruleanCity.asm +++ b/data/maps/headers/CeruleanCity.asm @@ -1,4 +1,3 @@ - map_header CeruleanCity, CERULEAN_CITY, OVERWORLD, NORTH | SOUTH | WEST | EAST connection north, Route24, ROUTE_24, 5 connection south, Route5, ROUTE_5, 5 diff --git a/data/maps/headers/CeruleanGym.asm b/data/maps/headers/CeruleanGym.asm index b1010ac3d..8307e2d38 100644 --- a/data/maps/headers/CeruleanGym.asm +++ b/data/maps/headers/CeruleanGym.asm @@ -1,3 +1,2 @@ - map_header CeruleanGym, CERULEAN_GYM, GYM, 0 end_map_header diff --git a/data/maps/headers/CeruleanMart.asm b/data/maps/headers/CeruleanMart.asm index 2ee316662..d611c42b8 100644 --- a/data/maps/headers/CeruleanMart.asm +++ b/data/maps/headers/CeruleanMart.asm @@ -1,3 +1,2 @@ - map_header CeruleanMart, CERULEAN_MART, MART, 0 end_map_header diff --git a/data/maps/headers/CeruleanPokecenter.asm b/data/maps/headers/CeruleanPokecenter.asm index b79e7aff2..5075e9d90 100644 --- a/data/maps/headers/CeruleanPokecenter.asm +++ b/data/maps/headers/CeruleanPokecenter.asm @@ -1,3 +1,2 @@ - map_header CeruleanPokecenter, CERULEAN_POKECENTER, POKECENTER, 0 end_map_header diff --git a/data/maps/headers/CeruleanTradeHouse.asm b/data/maps/headers/CeruleanTradeHouse.asm index 20970b775..5a5076752 100644 --- a/data/maps/headers/CeruleanTradeHouse.asm +++ b/data/maps/headers/CeruleanTradeHouse.asm @@ -1,3 +1,2 @@ - map_header CeruleanTradeHouse, CERULEAN_TRADE_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/CeruleanTrashedHouse.asm b/data/maps/headers/CeruleanTrashedHouse.asm index 192a41954..76d9f83fb 100644 --- a/data/maps/headers/CeruleanTrashedHouse.asm +++ b/data/maps/headers/CeruleanTrashedHouse.asm @@ -1,3 +1,2 @@ - map_header CeruleanTrashedHouse, CERULEAN_TRASHED_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/ChampionsRoom.asm b/data/maps/headers/ChampionsRoom.asm index aadc70a6d..818f1fb95 100644 --- a/data/maps/headers/ChampionsRoom.asm +++ b/data/maps/headers/ChampionsRoom.asm @@ -1,3 +1,2 @@ - map_header ChampionsRoom, CHAMPIONS_ROOM, GYM, $0 end_map_header diff --git a/data/maps/headers/CinnabarGym.asm b/data/maps/headers/CinnabarGym.asm index cc6dc1d7d..cf21a8f1c 100644 --- a/data/maps/headers/CinnabarGym.asm +++ b/data/maps/headers/CinnabarGym.asm @@ -1,3 +1,2 @@ - map_header CinnabarGym, CINNABAR_GYM, FACILITY, 0 end_map_header diff --git a/data/maps/headers/CinnabarIsland.asm b/data/maps/headers/CinnabarIsland.asm index a94498be8..e80b8f1e1 100644 --- a/data/maps/headers/CinnabarIsland.asm +++ b/data/maps/headers/CinnabarIsland.asm @@ -1,4 +1,3 @@ - map_header CinnabarIsland, CINNABAR_ISLAND, OVERWORLD, NORTH | EAST connection north, Route21, ROUTE_21, 0 connection east, Route20, ROUTE_20, 0 diff --git a/data/maps/headers/CinnabarLab.asm b/data/maps/headers/CinnabarLab.asm index e8081e75a..8d968d06d 100644 --- a/data/maps/headers/CinnabarLab.asm +++ b/data/maps/headers/CinnabarLab.asm @@ -1,3 +1,2 @@ - map_header CinnabarLab, CINNABAR_LAB, LAB, 0 end_map_header diff --git a/data/maps/headers/CinnabarLabFossilRoom.asm b/data/maps/headers/CinnabarLabFossilRoom.asm index 3cb884376..1d072a500 100644 --- a/data/maps/headers/CinnabarLabFossilRoom.asm +++ b/data/maps/headers/CinnabarLabFossilRoom.asm @@ -1,3 +1,2 @@ - map_header CinnabarLabFossilRoom, CINNABAR_LAB_FOSSIL_ROOM, LAB, 0 end_map_header diff --git a/data/maps/headers/CinnabarLabMetronomeRoom.asm b/data/maps/headers/CinnabarLabMetronomeRoom.asm index d77338c8e..ba9ffe967 100644 --- a/data/maps/headers/CinnabarLabMetronomeRoom.asm +++ b/data/maps/headers/CinnabarLabMetronomeRoom.asm @@ -1,3 +1,2 @@ - map_header CinnabarLabMetronomeRoom, CINNABAR_LAB_METRONOME_ROOM, LAB, 0 end_map_header diff --git a/data/maps/headers/CinnabarLabTradeRoom.asm b/data/maps/headers/CinnabarLabTradeRoom.asm index c23d9c15e..06d398495 100644 --- a/data/maps/headers/CinnabarLabTradeRoom.asm +++ b/data/maps/headers/CinnabarLabTradeRoom.asm @@ -1,3 +1,2 @@ - map_header CinnabarLabTradeRoom, CINNABAR_LAB_TRADE_ROOM, LAB, 0 end_map_header diff --git a/data/maps/headers/CinnabarMart.asm b/data/maps/headers/CinnabarMart.asm index c68d582a2..9fcc306f4 100644 --- a/data/maps/headers/CinnabarMart.asm +++ b/data/maps/headers/CinnabarMart.asm @@ -1,3 +1,2 @@ - map_header CinnabarMart, CINNABAR_MART, MART, 0 end_map_header diff --git a/data/maps/headers/CinnabarPokecenter.asm b/data/maps/headers/CinnabarPokecenter.asm index d910133bd..87bca04d6 100644 --- a/data/maps/headers/CinnabarPokecenter.asm +++ b/data/maps/headers/CinnabarPokecenter.asm @@ -1,3 +1,2 @@ - map_header CinnabarPokecenter, CINNABAR_POKECENTER, POKECENTER, 0 end_map_header diff --git a/data/maps/headers/Colosseum.asm b/data/maps/headers/Colosseum.asm index faf03eb4e..81fd1c4ea 100644 --- a/data/maps/headers/Colosseum.asm +++ b/data/maps/headers/Colosseum.asm @@ -1,3 +1,2 @@ - map_header Colosseum, COLOSSEUM, CLUB, 0 end_map_header diff --git a/data/maps/headers/CopycatsHouse1F.asm b/data/maps/headers/CopycatsHouse1F.asm index 532cef931..6f835fe83 100644 --- a/data/maps/headers/CopycatsHouse1F.asm +++ b/data/maps/headers/CopycatsHouse1F.asm @@ -1,3 +1,2 @@ - map_header CopycatsHouse1F, COPYCATS_HOUSE_1F, REDS_HOUSE_1, 0 end_map_header diff --git a/data/maps/headers/CopycatsHouse2F.asm b/data/maps/headers/CopycatsHouse2F.asm index 38b1fbbbf..dc47db317 100644 --- a/data/maps/headers/CopycatsHouse2F.asm +++ b/data/maps/headers/CopycatsHouse2F.asm @@ -1,3 +1,2 @@ - map_header CopycatsHouse2F, COPYCATS_HOUSE_2F, REDS_HOUSE_2, 0 end_map_header diff --git a/data/maps/headers/Daycare.asm b/data/maps/headers/Daycare.asm index dabeedd93..d0da36769 100644 --- a/data/maps/headers/Daycare.asm +++ b/data/maps/headers/Daycare.asm @@ -1,3 +1,2 @@ - map_header Daycare, DAYCARE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/DiglettsCave.asm b/data/maps/headers/DiglettsCave.asm index d3777d316..7ebf14c88 100644 --- a/data/maps/headers/DiglettsCave.asm +++ b/data/maps/headers/DiglettsCave.asm @@ -1,3 +1,2 @@ - map_header DiglettsCave, DIGLETTS_CAVE, CAVERN, 0 end_map_header diff --git a/data/maps/headers/DiglettsCaveRoute11.asm b/data/maps/headers/DiglettsCaveRoute11.asm index d8bdd7042..874481dcf 100644 --- a/data/maps/headers/DiglettsCaveRoute11.asm +++ b/data/maps/headers/DiglettsCaveRoute11.asm @@ -1,3 +1,2 @@ - map_header DiglettsCaveRoute11, DIGLETTS_CAVE_ROUTE_11, CAVERN, 0 end_map_header diff --git a/data/maps/headers/DiglettsCaveRoute2.asm b/data/maps/headers/DiglettsCaveRoute2.asm index 86f5ae35a..e61f79721 100644 --- a/data/maps/headers/DiglettsCaveRoute2.asm +++ b/data/maps/headers/DiglettsCaveRoute2.asm @@ -1,3 +1,2 @@ - map_header DiglettsCaveRoute2, DIGLETTS_CAVE_ROUTE_2, CAVERN, 0 end_map_header diff --git a/data/maps/headers/FightingDojo.asm b/data/maps/headers/FightingDojo.asm index 7ecadc57a..7702279a8 100644 --- a/data/maps/headers/FightingDojo.asm +++ b/data/maps/headers/FightingDojo.asm @@ -1,3 +1,2 @@ - map_header FightingDojo, FIGHTING_DOJO, DOJO, 0 end_map_header diff --git a/data/maps/headers/FuchsiaBillsGrandpasHouse.asm b/data/maps/headers/FuchsiaBillsGrandpasHouse.asm index 10ba48e90..944c7ac88 100644 --- a/data/maps/headers/FuchsiaBillsGrandpasHouse.asm +++ b/data/maps/headers/FuchsiaBillsGrandpasHouse.asm @@ -1,3 +1,2 @@ - map_header FuchsiaBillsGrandpasHouse, FUCHSIA_BILLS_GRANDPAS_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/FuchsiaCity.asm b/data/maps/headers/FuchsiaCity.asm index 6028bce04..8cfec1092 100644 --- a/data/maps/headers/FuchsiaCity.asm +++ b/data/maps/headers/FuchsiaCity.asm @@ -1,4 +1,3 @@ - map_header FuchsiaCity, FUCHSIA_CITY, OVERWORLD, SOUTH | WEST | EAST connection south, Route19, ROUTE_19, 5 connection west, Route18, ROUTE_18, 4 diff --git a/data/maps/headers/FuchsiaGoodRodHouse.asm b/data/maps/headers/FuchsiaGoodRodHouse.asm index d21611c18..2bf65a92b 100644 --- a/data/maps/headers/FuchsiaGoodRodHouse.asm +++ b/data/maps/headers/FuchsiaGoodRodHouse.asm @@ -1,3 +1,2 @@ - map_header FuchsiaGoodRodHouse, FUCHSIA_GOOD_ROD_HOUSE, SHIP, 0 end_map_header diff --git a/data/maps/headers/FuchsiaGym.asm b/data/maps/headers/FuchsiaGym.asm index 44be29711..1c51b53cf 100644 --- a/data/maps/headers/FuchsiaGym.asm +++ b/data/maps/headers/FuchsiaGym.asm @@ -1,3 +1,2 @@ - map_header FuchsiaGym, FUCHSIA_GYM, GYM, 0 end_map_header diff --git a/data/maps/headers/FuchsiaMart.asm b/data/maps/headers/FuchsiaMart.asm index 120fe305d..b56dafa8f 100644 --- a/data/maps/headers/FuchsiaMart.asm +++ b/data/maps/headers/FuchsiaMart.asm @@ -1,3 +1,2 @@ - map_header FuchsiaMart, FUCHSIA_MART, MART, 0 end_map_header diff --git a/data/maps/headers/FuchsiaMeetingRoom.asm b/data/maps/headers/FuchsiaMeetingRoom.asm index a5ab4f04a..9bf88bbfc 100644 --- a/data/maps/headers/FuchsiaMeetingRoom.asm +++ b/data/maps/headers/FuchsiaMeetingRoom.asm @@ -1,3 +1,2 @@ - map_header FuchsiaMeetingRoom, FUCHSIA_MEETING_ROOM, LAB, 0 end_map_header diff --git a/data/maps/headers/FuchsiaPokecenter.asm b/data/maps/headers/FuchsiaPokecenter.asm index c1c683bdf..fae3c293a 100644 --- a/data/maps/headers/FuchsiaPokecenter.asm +++ b/data/maps/headers/FuchsiaPokecenter.asm @@ -1,3 +1,2 @@ - map_header FuchsiaPokecenter, FUCHSIA_POKECENTER, POKECENTER, 0 end_map_header diff --git a/data/maps/headers/GameCorner.asm b/data/maps/headers/GameCorner.asm index ad367b931..7507a364a 100644 --- a/data/maps/headers/GameCorner.asm +++ b/data/maps/headers/GameCorner.asm @@ -1,3 +1,2 @@ - map_header GameCorner, GAME_CORNER, LOBBY, 0 end_map_header diff --git a/data/maps/headers/GameCornerPrizeRoom.asm b/data/maps/headers/GameCornerPrizeRoom.asm index 4668cbb89..6e08abf5d 100644 --- a/data/maps/headers/GameCornerPrizeRoom.asm +++ b/data/maps/headers/GameCornerPrizeRoom.asm @@ -1,3 +1,2 @@ - map_header GameCornerPrizeRoom, GAME_CORNER_PRIZE_ROOM, LOBBY, 0 end_map_header diff --git a/data/maps/headers/HallOfFame.asm b/data/maps/headers/HallOfFame.asm index e2dc3fb3c..bccc334ac 100644 --- a/data/maps/headers/HallOfFame.asm +++ b/data/maps/headers/HallOfFame.asm @@ -1,3 +1,2 @@ - map_header HallOfFame, HALL_OF_FAME, GYM, 0 end_map_header diff --git a/data/maps/headers/IndigoPlateau.asm b/data/maps/headers/IndigoPlateau.asm index ff394dfec..7f2f1d02b 100644 --- a/data/maps/headers/IndigoPlateau.asm +++ b/data/maps/headers/IndigoPlateau.asm @@ -1,4 +1,3 @@ - map_header IndigoPlateau, INDIGO_PLATEAU, PLATEAU, SOUTH connection south, Route23, ROUTE_23, 0 end_map_header diff --git a/data/maps/headers/IndigoPlateauLobby.asm b/data/maps/headers/IndigoPlateauLobby.asm index b13afa12e..639faef6d 100644 --- a/data/maps/headers/IndigoPlateauLobby.asm +++ b/data/maps/headers/IndigoPlateauLobby.asm @@ -1,3 +1,2 @@ - map_header IndigoPlateauLobby, INDIGO_PLATEAU_LOBBY, MART, 0 end_map_header diff --git a/data/maps/headers/LancesRoom.asm b/data/maps/headers/LancesRoom.asm index 0b69970e6..4075ac94c 100644 --- a/data/maps/headers/LancesRoom.asm +++ b/data/maps/headers/LancesRoom.asm @@ -1,3 +1,2 @@ - map_header LancesRoom, LANCES_ROOM, DOJO, 0 end_map_header diff --git a/data/maps/headers/LavenderCuboneHouse.asm b/data/maps/headers/LavenderCuboneHouse.asm index dfd38ff1c..bbb91b2dd 100644 --- a/data/maps/headers/LavenderCuboneHouse.asm +++ b/data/maps/headers/LavenderCuboneHouse.asm @@ -1,3 +1,2 @@ - map_header LavenderCuboneHouse, LAVENDER_CUBONE_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/LavenderMart.asm b/data/maps/headers/LavenderMart.asm index 82c239e66..385e87710 100644 --- a/data/maps/headers/LavenderMart.asm +++ b/data/maps/headers/LavenderMart.asm @@ -1,3 +1,2 @@ - map_header LavenderMart, LAVENDER_MART, MART, 0 end_map_header diff --git a/data/maps/headers/LavenderPokecenter.asm b/data/maps/headers/LavenderPokecenter.asm index c0cd0adf8..ff3ee244f 100644 --- a/data/maps/headers/LavenderPokecenter.asm +++ b/data/maps/headers/LavenderPokecenter.asm @@ -1,3 +1,2 @@ - map_header LavenderPokecenter, LAVENDER_POKECENTER, POKECENTER, 0 end_map_header diff --git a/data/maps/headers/LavenderTown.asm b/data/maps/headers/LavenderTown.asm index 7c1c9c468..27ac9eb16 100644 --- a/data/maps/headers/LavenderTown.asm +++ b/data/maps/headers/LavenderTown.asm @@ -1,4 +1,3 @@ - map_header LavenderTown, LAVENDER_TOWN, OVERWORLD, NORTH | SOUTH | WEST connection north, Route10, ROUTE_10, 0 connection south, Route12, ROUTE_12, 0 diff --git a/data/maps/headers/LoreleisRoom.asm b/data/maps/headers/LoreleisRoom.asm index feff946c0..862ad868c 100644 --- a/data/maps/headers/LoreleisRoom.asm +++ b/data/maps/headers/LoreleisRoom.asm @@ -1,3 +1,2 @@ - map_header LoreleisRoom, LORELEIS_ROOM, GYM, 0 end_map_header diff --git a/data/maps/headers/MrFujisHouse.asm b/data/maps/headers/MrFujisHouse.asm index 023cb5018..86cfbb53c 100644 --- a/data/maps/headers/MrFujisHouse.asm +++ b/data/maps/headers/MrFujisHouse.asm @@ -1,3 +1,2 @@ - map_header MrFujisHouse, MR_FUJIS_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/MrPsychicsHouse.asm b/data/maps/headers/MrPsychicsHouse.asm index 628db0440..1d826f3aa 100644 --- a/data/maps/headers/MrPsychicsHouse.asm +++ b/data/maps/headers/MrPsychicsHouse.asm @@ -1,3 +1,2 @@ - map_header MrPsychicsHouse, MR_PSYCHICS_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/MtMoon1F.asm b/data/maps/headers/MtMoon1F.asm index 8de2be3e9..82eca4ca6 100644 --- a/data/maps/headers/MtMoon1F.asm +++ b/data/maps/headers/MtMoon1F.asm @@ -1,3 +1,2 @@ - map_header MtMoon1F, MT_MOON_1F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/MtMoonB1F.asm b/data/maps/headers/MtMoonB1F.asm index 9c97b5c7e..66923c816 100644 --- a/data/maps/headers/MtMoonB1F.asm +++ b/data/maps/headers/MtMoonB1F.asm @@ -1,3 +1,2 @@ - map_header MtMoonB1F, MT_MOON_B1F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/MtMoonB2F.asm b/data/maps/headers/MtMoonB2F.asm index 0ed1f96e4..3f0595bde 100644 --- a/data/maps/headers/MtMoonB2F.asm +++ b/data/maps/headers/MtMoonB2F.asm @@ -1,3 +1,2 @@ - map_header MtMoonB2F, MT_MOON_B2F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/MtMoonPokecenter.asm b/data/maps/headers/MtMoonPokecenter.asm index 0425eae71..2d187f5f7 100644 --- a/data/maps/headers/MtMoonPokecenter.asm +++ b/data/maps/headers/MtMoonPokecenter.asm @@ -1,3 +1,2 @@ - map_header MtMoonPokecenter, MT_MOON_POKECENTER, POKECENTER, 0 end_map_header diff --git a/data/maps/headers/Museum1F.asm b/data/maps/headers/Museum1F.asm index d92176d23..a42b8eead 100644 --- a/data/maps/headers/Museum1F.asm +++ b/data/maps/headers/Museum1F.asm @@ -1,3 +1,2 @@ - map_header Museum1F, MUSEUM_1F, MUSEUM, 0 end_map_header diff --git a/data/maps/headers/Museum2F.asm b/data/maps/headers/Museum2F.asm index d5bf89182..9d4e4273f 100644 --- a/data/maps/headers/Museum2F.asm +++ b/data/maps/headers/Museum2F.asm @@ -1,3 +1,2 @@ - map_header Museum2F, MUSEUM_2F, MUSEUM, 0 end_map_header diff --git a/data/maps/headers/NameRatersHouse.asm b/data/maps/headers/NameRatersHouse.asm index 3f9010f08..86e17b895 100644 --- a/data/maps/headers/NameRatersHouse.asm +++ b/data/maps/headers/NameRatersHouse.asm @@ -1,3 +1,2 @@ - map_header NameRatersHouse, NAME_RATERS_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/OaksLab.asm b/data/maps/headers/OaksLab.asm index 42bb76e88..44483e939 100644 --- a/data/maps/headers/OaksLab.asm +++ b/data/maps/headers/OaksLab.asm @@ -1,3 +1,2 @@ - map_header OaksLab, OAKS_LAB, DOJO, 0 end_map_header diff --git a/data/maps/headers/PalletTown.asm b/data/maps/headers/PalletTown.asm index 2745bdc14..bdc43e4de 100644 --- a/data/maps/headers/PalletTown.asm +++ b/data/maps/headers/PalletTown.asm @@ -1,4 +1,3 @@ - map_header PalletTown, PALLET_TOWN, OVERWORLD, NORTH | SOUTH connection north, Route1, ROUTE_1, 0 connection south, Route21, ROUTE_21, 0 diff --git a/data/maps/headers/PewterCity.asm b/data/maps/headers/PewterCity.asm index 268adb7ac..bfc1f3eb9 100644 --- a/data/maps/headers/PewterCity.asm +++ b/data/maps/headers/PewterCity.asm @@ -1,4 +1,3 @@ - map_header PewterCity, PEWTER_CITY, OVERWORLD, SOUTH | EAST connection south, Route2, ROUTE_2, 5 connection east, Route3, ROUTE_3, 4 diff --git a/data/maps/headers/PewterGym.asm b/data/maps/headers/PewterGym.asm index a1659e42f..272b47c5c 100644 --- a/data/maps/headers/PewterGym.asm +++ b/data/maps/headers/PewterGym.asm @@ -1,3 +1,2 @@ - map_header PewterGym, PEWTER_GYM, GYM, 0 end_map_header diff --git a/data/maps/headers/PewterMart.asm b/data/maps/headers/PewterMart.asm index c9b24eb26..91b98739d 100644 --- a/data/maps/headers/PewterMart.asm +++ b/data/maps/headers/PewterMart.asm @@ -1,3 +1,2 @@ - map_header PewterMart, PEWTER_MART, MART, 0 end_map_header diff --git a/data/maps/headers/PewterNidoranHouse.asm b/data/maps/headers/PewterNidoranHouse.asm index ee2e46ca2..7dd43ee01 100644 --- a/data/maps/headers/PewterNidoranHouse.asm +++ b/data/maps/headers/PewterNidoranHouse.asm @@ -1,3 +1,2 @@ - map_header PewterNidoranHouse, PEWTER_NIDORAN_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/PewterPokecenter.asm b/data/maps/headers/PewterPokecenter.asm index 4e420bf85..07a371689 100644 --- a/data/maps/headers/PewterPokecenter.asm +++ b/data/maps/headers/PewterPokecenter.asm @@ -1,3 +1,2 @@ - map_header PewterPokecenter, PEWTER_POKECENTER, POKECENTER, 0 end_map_header diff --git a/data/maps/headers/PewterSpeechHouse.asm b/data/maps/headers/PewterSpeechHouse.asm index a378d61e0..0462ebc13 100644 --- a/data/maps/headers/PewterSpeechHouse.asm +++ b/data/maps/headers/PewterSpeechHouse.asm @@ -1,3 +1,2 @@ - map_header PewterSpeechHouse, PEWTER_SPEECH_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/PokemonFanClub.asm b/data/maps/headers/PokemonFanClub.asm index b4ff8e1c8..12abe59e7 100644 --- a/data/maps/headers/PokemonFanClub.asm +++ b/data/maps/headers/PokemonFanClub.asm @@ -1,3 +1,2 @@ - map_header PokemonFanClub, POKEMON_FAN_CLUB, INTERIOR, 0 end_map_header diff --git a/data/maps/headers/PokemonMansion1F.asm b/data/maps/headers/PokemonMansion1F.asm index 9407f956c..2cdc2ee38 100644 --- a/data/maps/headers/PokemonMansion1F.asm +++ b/data/maps/headers/PokemonMansion1F.asm @@ -1,3 +1,2 @@ - map_header PokemonMansion1F, POKEMON_MANSION_1F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/PokemonMansion2F.asm b/data/maps/headers/PokemonMansion2F.asm index deb7c84f1..c2ffa95c0 100644 --- a/data/maps/headers/PokemonMansion2F.asm +++ b/data/maps/headers/PokemonMansion2F.asm @@ -1,3 +1,2 @@ - map_header PokemonMansion2F, POKEMON_MANSION_2F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/PokemonMansion3F.asm b/data/maps/headers/PokemonMansion3F.asm index e4baa709a..9588013f8 100644 --- a/data/maps/headers/PokemonMansion3F.asm +++ b/data/maps/headers/PokemonMansion3F.asm @@ -1,3 +1,2 @@ - map_header PokemonMansion3F, POKEMON_MANSION_3F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/PokemonMansionB1F.asm b/data/maps/headers/PokemonMansionB1F.asm index 0aae67e6b..5e2a96467 100644 --- a/data/maps/headers/PokemonMansionB1F.asm +++ b/data/maps/headers/PokemonMansionB1F.asm @@ -1,3 +1,2 @@ - map_header PokemonMansionB1F, POKEMON_MANSION_B1F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/PokemonTower1F.asm b/data/maps/headers/PokemonTower1F.asm index 185fd2c09..51fec360b 100644 --- a/data/maps/headers/PokemonTower1F.asm +++ b/data/maps/headers/PokemonTower1F.asm @@ -1,3 +1,2 @@ - map_header PokemonTower1F, POKEMON_TOWER_1F, CEMETERY, 0 end_map_header diff --git a/data/maps/headers/PokemonTower2F.asm b/data/maps/headers/PokemonTower2F.asm index 5a6046c84..aa55737d0 100644 --- a/data/maps/headers/PokemonTower2F.asm +++ b/data/maps/headers/PokemonTower2F.asm @@ -1,3 +1,2 @@ - map_header PokemonTower2F, POKEMON_TOWER_2F, CEMETERY, 0 end_map_header diff --git a/data/maps/headers/PokemonTower3F.asm b/data/maps/headers/PokemonTower3F.asm index 49ebc4e70..88717251d 100644 --- a/data/maps/headers/PokemonTower3F.asm +++ b/data/maps/headers/PokemonTower3F.asm @@ -1,3 +1,2 @@ - map_header PokemonTower3F, POKEMON_TOWER_3F, CEMETERY, 0 end_map_header diff --git a/data/maps/headers/PokemonTower4F.asm b/data/maps/headers/PokemonTower4F.asm index 0eb9a0d6b..8e54dbed6 100644 --- a/data/maps/headers/PokemonTower4F.asm +++ b/data/maps/headers/PokemonTower4F.asm @@ -1,3 +1,2 @@ - map_header PokemonTower4F, POKEMON_TOWER_4F, CEMETERY, 0 end_map_header diff --git a/data/maps/headers/PokemonTower5F.asm b/data/maps/headers/PokemonTower5F.asm index e58c63c66..c070b5e63 100644 --- a/data/maps/headers/PokemonTower5F.asm +++ b/data/maps/headers/PokemonTower5F.asm @@ -1,3 +1,2 @@ - map_header PokemonTower5F, POKEMON_TOWER_5F, CEMETERY, 0 end_map_header diff --git a/data/maps/headers/PokemonTower6F.asm b/data/maps/headers/PokemonTower6F.asm index ba53347b0..d616e9952 100644 --- a/data/maps/headers/PokemonTower6F.asm +++ b/data/maps/headers/PokemonTower6F.asm @@ -1,3 +1,2 @@ - map_header PokemonTower6F, POKEMON_TOWER_6F, CEMETERY, 0 end_map_header diff --git a/data/maps/headers/PokemonTower7F.asm b/data/maps/headers/PokemonTower7F.asm index bd9f839bf..6a6eff824 100644 --- a/data/maps/headers/PokemonTower7F.asm +++ b/data/maps/headers/PokemonTower7F.asm @@ -1,3 +1,2 @@ - map_header PokemonTower7F, POKEMON_TOWER_7F, CEMETERY, 0 end_map_header diff --git a/data/maps/headers/PowerPlant.asm b/data/maps/headers/PowerPlant.asm index 88d82ae29..bf1dcd9f2 100644 --- a/data/maps/headers/PowerPlant.asm +++ b/data/maps/headers/PowerPlant.asm @@ -1,3 +1,2 @@ - map_header PowerPlant, POWER_PLANT, FACILITY, 0 end_map_header diff --git a/data/maps/headers/RedsHouse1F.asm b/data/maps/headers/RedsHouse1F.asm index 018bdc80e..938c72d69 100644 --- a/data/maps/headers/RedsHouse1F.asm +++ b/data/maps/headers/RedsHouse1F.asm @@ -1,3 +1,2 @@ - map_header RedsHouse1F, REDS_HOUSE_1F, REDS_HOUSE_1, 0 end_map_header diff --git a/data/maps/headers/RedsHouse2F.asm b/data/maps/headers/RedsHouse2F.asm index 10332e2cb..65eb0f9b5 100644 --- a/data/maps/headers/RedsHouse2F.asm +++ b/data/maps/headers/RedsHouse2F.asm @@ -1,3 +1,2 @@ - map_header RedsHouse2F, REDS_HOUSE_2F, REDS_HOUSE_2, $00 end_map_header diff --git a/data/maps/headers/RockTunnel1F.asm b/data/maps/headers/RockTunnel1F.asm index 268ee645b..f9cb92913 100644 --- a/data/maps/headers/RockTunnel1F.asm +++ b/data/maps/headers/RockTunnel1F.asm @@ -1,3 +1,2 @@ - map_header RockTunnel1F, ROCK_TUNNEL_1F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/RockTunnelB1F.asm b/data/maps/headers/RockTunnelB1F.asm index 7b13f647f..f812afde5 100644 --- a/data/maps/headers/RockTunnelB1F.asm +++ b/data/maps/headers/RockTunnelB1F.asm @@ -1,3 +1,2 @@ - map_header RockTunnelB1F, ROCK_TUNNEL_B1F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/RockTunnelPokecenter.asm b/data/maps/headers/RockTunnelPokecenter.asm index a873854bf..820340589 100644 --- a/data/maps/headers/RockTunnelPokecenter.asm +++ b/data/maps/headers/RockTunnelPokecenter.asm @@ -1,3 +1,2 @@ - map_header RockTunnelPokecenter, ROCK_TUNNEL_POKECENTER, POKECENTER, 0 end_map_header diff --git a/data/maps/headers/RocketHideoutB1F.asm b/data/maps/headers/RocketHideoutB1F.asm index 521a66934..5c4ba0633 100644 --- a/data/maps/headers/RocketHideoutB1F.asm +++ b/data/maps/headers/RocketHideoutB1F.asm @@ -1,3 +1,2 @@ - map_header RocketHideoutB1F, ROCKET_HIDEOUT_B1F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/RocketHideoutB2F.asm b/data/maps/headers/RocketHideoutB2F.asm index ab2a965da..aa15717f3 100644 --- a/data/maps/headers/RocketHideoutB2F.asm +++ b/data/maps/headers/RocketHideoutB2F.asm @@ -1,3 +1,2 @@ - map_header RocketHideoutB2F, ROCKET_HIDEOUT_B2F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/RocketHideoutB3F.asm b/data/maps/headers/RocketHideoutB3F.asm index 0a04b00eb..737e74cf5 100644 --- a/data/maps/headers/RocketHideoutB3F.asm +++ b/data/maps/headers/RocketHideoutB3F.asm @@ -1,3 +1,2 @@ - map_header RocketHideoutB3F, ROCKET_HIDEOUT_B3F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/RocketHideoutB4F.asm b/data/maps/headers/RocketHideoutB4F.asm index 11512c01f..9897f7c3e 100644 --- a/data/maps/headers/RocketHideoutB4F.asm +++ b/data/maps/headers/RocketHideoutB4F.asm @@ -1,3 +1,2 @@ - map_header RocketHideoutB4F, ROCKET_HIDEOUT_B4F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/RocketHideoutElevator.asm b/data/maps/headers/RocketHideoutElevator.asm index 90ece237c..ceb4711a2 100644 --- a/data/maps/headers/RocketHideoutElevator.asm +++ b/data/maps/headers/RocketHideoutElevator.asm @@ -1,3 +1,2 @@ - map_header RocketHideoutElevator, ROCKET_HIDEOUT_ELEVATOR, LOBBY, 0 end_map_header diff --git a/data/maps/headers/Route1.asm b/data/maps/headers/Route1.asm index 6eeb03476..36e53d83b 100644 --- a/data/maps/headers/Route1.asm +++ b/data/maps/headers/Route1.asm @@ -1,4 +1,3 @@ - map_header Route1, ROUTE_1, OVERWORLD, NORTH | SOUTH connection north, ViridianCity, VIRIDIAN_CITY, -5 connection south, PalletTown, PALLET_TOWN, 0 diff --git a/data/maps/headers/Route10.asm b/data/maps/headers/Route10.asm index ba498b0ab..c1d35489e 100644 --- a/data/maps/headers/Route10.asm +++ b/data/maps/headers/Route10.asm @@ -1,4 +1,3 @@ - map_header Route10, ROUTE_10, OVERWORLD, SOUTH | WEST connection south, LavenderTown, LAVENDER_TOWN, 0 connection west, Route9, ROUTE_9, 0 diff --git a/data/maps/headers/Route11.asm b/data/maps/headers/Route11.asm index d8f2e72f8..d71eeb828 100644 --- a/data/maps/headers/Route11.asm +++ b/data/maps/headers/Route11.asm @@ -1,4 +1,3 @@ - map_header Route11, ROUTE_11, OVERWORLD, WEST | EAST connection west, VermilionCity, VERMILION_CITY, -4 connection east, Route12, ROUTE_12, -27 diff --git a/data/maps/headers/Route11Gate1F.asm b/data/maps/headers/Route11Gate1F.asm index aa97b7915..bd8a2679e 100644 --- a/data/maps/headers/Route11Gate1F.asm +++ b/data/maps/headers/Route11Gate1F.asm @@ -1,3 +1,2 @@ - map_header Route11Gate1F, ROUTE_11_GATE_1F, GATE, 0 end_map_header diff --git a/data/maps/headers/Route11Gate2F.asm b/data/maps/headers/Route11Gate2F.asm index 560d38db3..33ab2f90a 100644 --- a/data/maps/headers/Route11Gate2F.asm +++ b/data/maps/headers/Route11Gate2F.asm @@ -1,3 +1,2 @@ - map_header Route11Gate2F, ROUTE_11_GATE_2F, GATE, 0 end_map_header diff --git a/data/maps/headers/Route12.asm b/data/maps/headers/Route12.asm index 931ddf1d6..c013784ca 100644 --- a/data/maps/headers/Route12.asm +++ b/data/maps/headers/Route12.asm @@ -1,4 +1,3 @@ - map_header Route12, ROUTE_12, OVERWORLD, NORTH | SOUTH | WEST connection north, LavenderTown, LAVENDER_TOWN, 0 connection south, Route13, ROUTE_13, -20 diff --git a/data/maps/headers/Route12Gate1F.asm b/data/maps/headers/Route12Gate1F.asm index 047a670c0..fa3c99a67 100644 --- a/data/maps/headers/Route12Gate1F.asm +++ b/data/maps/headers/Route12Gate1F.asm @@ -1,3 +1,2 @@ - map_header Route12Gate1F, ROUTE_12_GATE_1F, GATE, 0 end_map_header diff --git a/data/maps/headers/Route12Gate2F.asm b/data/maps/headers/Route12Gate2F.asm index e13667360..0938607f6 100644 --- a/data/maps/headers/Route12Gate2F.asm +++ b/data/maps/headers/Route12Gate2F.asm @@ -1,3 +1,2 @@ - map_header Route12Gate2F, ROUTE_12_GATE_2F, GATE, 0 end_map_header diff --git a/data/maps/headers/Route12SuperRodHouse.asm b/data/maps/headers/Route12SuperRodHouse.asm index 2195a9b14..a904c839e 100644 --- a/data/maps/headers/Route12SuperRodHouse.asm +++ b/data/maps/headers/Route12SuperRodHouse.asm @@ -1,3 +1,2 @@ - map_header Route12SuperRodHouse, ROUTE_12_SUPER_ROD_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/Route13.asm b/data/maps/headers/Route13.asm index 242aaa024..139156d5c 100644 --- a/data/maps/headers/Route13.asm +++ b/data/maps/headers/Route13.asm @@ -1,4 +1,3 @@ - map_header Route13, ROUTE_13, OVERWORLD, NORTH | WEST connection north, Route12, ROUTE_12, 20 connection west, Route14, ROUTE_14, 0 diff --git a/data/maps/headers/Route14.asm b/data/maps/headers/Route14.asm index c0c39c566..4b98c5f5c 100644 --- a/data/maps/headers/Route14.asm +++ b/data/maps/headers/Route14.asm @@ -1,4 +1,3 @@ - map_header Route14, ROUTE_14, OVERWORLD, WEST | EAST connection west, Route15, ROUTE_15, 18 connection east, Route13, ROUTE_13, 0 diff --git a/data/maps/headers/Route15.asm b/data/maps/headers/Route15.asm index 28a811d23..3253eda9d 100644 --- a/data/maps/headers/Route15.asm +++ b/data/maps/headers/Route15.asm @@ -1,4 +1,3 @@ - map_header Route15, ROUTE_15, OVERWORLD, WEST | EAST connection west, FuchsiaCity, FUCHSIA_CITY, -4 connection east, Route14, ROUTE_14, -18 diff --git a/data/maps/headers/Route15Gate1F.asm b/data/maps/headers/Route15Gate1F.asm index a23d15a08..32d0b3bf0 100644 --- a/data/maps/headers/Route15Gate1F.asm +++ b/data/maps/headers/Route15Gate1F.asm @@ -1,3 +1,2 @@ - map_header Route15Gate1F, ROUTE_15_GATE_1F, GATE, 0 end_map_header diff --git a/data/maps/headers/Route15Gate2F.asm b/data/maps/headers/Route15Gate2F.asm index 8ca898721..1a700146d 100644 --- a/data/maps/headers/Route15Gate2F.asm +++ b/data/maps/headers/Route15Gate2F.asm @@ -1,3 +1,2 @@ - map_header Route15Gate2F, ROUTE_15_GATE_2F, GATE, 0 end_map_header diff --git a/data/maps/headers/Route16.asm b/data/maps/headers/Route16.asm index 423c7af2d..3190be86d 100644 --- a/data/maps/headers/Route16.asm +++ b/data/maps/headers/Route16.asm @@ -1,4 +1,3 @@ - map_header Route16, ROUTE_16, OVERWORLD, SOUTH | EAST connection south, Route17, ROUTE_17, 0 connection east, CeladonCity, CELADON_CITY, -4 diff --git a/data/maps/headers/Route16FlyHouse.asm b/data/maps/headers/Route16FlyHouse.asm index 240b6df47..df6f58456 100644 --- a/data/maps/headers/Route16FlyHouse.asm +++ b/data/maps/headers/Route16FlyHouse.asm @@ -1,3 +1,2 @@ - map_header Route16FlyHouse, ROUTE_16_FLY_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/Route16Gate1F.asm b/data/maps/headers/Route16Gate1F.asm index 74fd1b7fe..05f23dd02 100644 --- a/data/maps/headers/Route16Gate1F.asm +++ b/data/maps/headers/Route16Gate1F.asm @@ -1,3 +1,2 @@ - map_header Route16Gate1F, ROUTE_16_GATE_1F, GATE, 0 end_map_header diff --git a/data/maps/headers/Route16Gate2F.asm b/data/maps/headers/Route16Gate2F.asm index ed889f4b6..b2e9507e1 100644 --- a/data/maps/headers/Route16Gate2F.asm +++ b/data/maps/headers/Route16Gate2F.asm @@ -1,3 +1,2 @@ - map_header Route16Gate2F, ROUTE_16_GATE_2F, GATE, 0 end_map_header diff --git a/data/maps/headers/Route17.asm b/data/maps/headers/Route17.asm index 5e8532998..ff8a6be08 100644 --- a/data/maps/headers/Route17.asm +++ b/data/maps/headers/Route17.asm @@ -1,4 +1,3 @@ - map_header Route17, ROUTE_17, OVERWORLD, NORTH | SOUTH connection north, Route16, ROUTE_16, 0 connection south, Route18, ROUTE_18, 0 diff --git a/data/maps/headers/Route18.asm b/data/maps/headers/Route18.asm index 34573051a..2068781c4 100644 --- a/data/maps/headers/Route18.asm +++ b/data/maps/headers/Route18.asm @@ -1,4 +1,3 @@ - map_header Route18, ROUTE_18, OVERWORLD, NORTH | EAST connection north, Route17, ROUTE_17, 0 connection east, FuchsiaCity, FUCHSIA_CITY, -4 diff --git a/data/maps/headers/Route18Gate1F.asm b/data/maps/headers/Route18Gate1F.asm index 2847e0e37..05aa68b15 100644 --- a/data/maps/headers/Route18Gate1F.asm +++ b/data/maps/headers/Route18Gate1F.asm @@ -1,3 +1,2 @@ - map_header Route18Gate1F, ROUTE_18_GATE_1F, GATE, 0 end_map_header diff --git a/data/maps/headers/Route18Gate2F.asm b/data/maps/headers/Route18Gate2F.asm index f25fa7009..7317384a3 100644 --- a/data/maps/headers/Route18Gate2F.asm +++ b/data/maps/headers/Route18Gate2F.asm @@ -1,3 +1,2 @@ - map_header Route18Gate2F, ROUTE_18_GATE_2F, GATE, 0 end_map_header diff --git a/data/maps/headers/Route19.asm b/data/maps/headers/Route19.asm index 7f01c8049..9ea5f1593 100644 --- a/data/maps/headers/Route19.asm +++ b/data/maps/headers/Route19.asm @@ -1,4 +1,3 @@ - map_header Route19, ROUTE_19, OVERWORLD, NORTH | WEST connection north, FuchsiaCity, FUCHSIA_CITY, -5 connection west, Route20, ROUTE_20, 18 diff --git a/data/maps/headers/Route2.asm b/data/maps/headers/Route2.asm index 521eef694..5fcb3f70a 100644 --- a/data/maps/headers/Route2.asm +++ b/data/maps/headers/Route2.asm @@ -1,4 +1,3 @@ - map_header Route2, ROUTE_2, OVERWORLD, NORTH | SOUTH connection north, PewterCity, PEWTER_CITY, -5 connection south, ViridianCity, VIRIDIAN_CITY, -5 diff --git a/data/maps/headers/Route20.asm b/data/maps/headers/Route20.asm index 3495b785d..cc9ffbc79 100644 --- a/data/maps/headers/Route20.asm +++ b/data/maps/headers/Route20.asm @@ -1,4 +1,3 @@ - map_header Route20, ROUTE_20, OVERWORLD, WEST | EAST connection west, CinnabarIsland, CINNABAR_ISLAND, 0 connection east, Route19, ROUTE_19, -18 diff --git a/data/maps/headers/Route21.asm b/data/maps/headers/Route21.asm index 803bf2177..968af4e0b 100644 --- a/data/maps/headers/Route21.asm +++ b/data/maps/headers/Route21.asm @@ -1,4 +1,3 @@ - map_header Route21, ROUTE_21, OVERWORLD, NORTH | SOUTH connection north, PalletTown, PALLET_TOWN, 0 connection south, CinnabarIsland, CINNABAR_ISLAND, 0 diff --git a/data/maps/headers/Route22.asm b/data/maps/headers/Route22.asm index a045838e5..8370b8e24 100644 --- a/data/maps/headers/Route22.asm +++ b/data/maps/headers/Route22.asm @@ -1,4 +1,3 @@ - map_header Route22, ROUTE_22, OVERWORLD, NORTH | EAST connection north, Route23, ROUTE_23, 0 ; unnecessary connection east, ViridianCity, VIRIDIAN_CITY, -4 diff --git a/data/maps/headers/Route22Gate.asm b/data/maps/headers/Route22Gate.asm index a9d1dd377..bac7eb706 100644 --- a/data/maps/headers/Route22Gate.asm +++ b/data/maps/headers/Route22Gate.asm @@ -1,3 +1,2 @@ - map_header Route22Gate, ROUTE_22_GATE, GATE, 0 end_map_header diff --git a/data/maps/headers/Route23.asm b/data/maps/headers/Route23.asm index 66c2936fe..7d3d8bd3b 100644 --- a/data/maps/headers/Route23.asm +++ b/data/maps/headers/Route23.asm @@ -1,4 +1,3 @@ - map_header Route23, ROUTE_23, PLATEAU, NORTH | SOUTH connection north, IndigoPlateau, INDIGO_PLATEAU, 0 connection south, Route22, ROUTE_22, 0 ; unnecessary diff --git a/data/maps/headers/Route24.asm b/data/maps/headers/Route24.asm index faf53660e..40758e828 100644 --- a/data/maps/headers/Route24.asm +++ b/data/maps/headers/Route24.asm @@ -1,4 +1,3 @@ - map_header Route24, ROUTE_24, OVERWORLD, SOUTH | EAST connection south, CeruleanCity, CERULEAN_CITY, -5 connection east, Route25, ROUTE_25, 0 diff --git a/data/maps/headers/Route25.asm b/data/maps/headers/Route25.asm index 1873d19b5..f2d5ff2e4 100644 --- a/data/maps/headers/Route25.asm +++ b/data/maps/headers/Route25.asm @@ -1,4 +1,3 @@ - map_header Route25, ROUTE_25, OVERWORLD, WEST connection west, Route24, ROUTE_24, 0 end_map_header diff --git a/data/maps/headers/Route2Gate.asm b/data/maps/headers/Route2Gate.asm index 730d8f2df..b1d1d08e8 100644 --- a/data/maps/headers/Route2Gate.asm +++ b/data/maps/headers/Route2Gate.asm @@ -1,3 +1,2 @@ - map_header Route2Gate, ROUTE_2_GATE, GATE, 0 end_map_header diff --git a/data/maps/headers/Route2TradeHouse.asm b/data/maps/headers/Route2TradeHouse.asm index b9937dad4..68482f96b 100644 --- a/data/maps/headers/Route2TradeHouse.asm +++ b/data/maps/headers/Route2TradeHouse.asm @@ -1,3 +1,2 @@ - map_header Route2TradeHouse, ROUTE_2_TRADE_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/Route3.asm b/data/maps/headers/Route3.asm index ddbd7783b..1dd2b2503 100644 --- a/data/maps/headers/Route3.asm +++ b/data/maps/headers/Route3.asm @@ -1,4 +1,3 @@ - map_header Route3, ROUTE_3, OVERWORLD, NORTH | WEST connection north, Route4, ROUTE_4, 25 connection west, PewterCity, PEWTER_CITY, -4 diff --git a/data/maps/headers/Route4.asm b/data/maps/headers/Route4.asm index 6c43171ab..ed24b466c 100644 --- a/data/maps/headers/Route4.asm +++ b/data/maps/headers/Route4.asm @@ -1,4 +1,3 @@ - map_header Route4, ROUTE_4, OVERWORLD, SOUTH | EAST connection south, Route3, ROUTE_3, -25 connection east, CeruleanCity, CERULEAN_CITY, -4 diff --git a/data/maps/headers/Route5.asm b/data/maps/headers/Route5.asm index ea84090c8..923017632 100644 --- a/data/maps/headers/Route5.asm +++ b/data/maps/headers/Route5.asm @@ -1,4 +1,3 @@ - map_header Route5, ROUTE_5, OVERWORLD, NORTH | SOUTH connection north, CeruleanCity, CERULEAN_CITY, -5 connection south, SaffronCity, SAFFRON_CITY, -5 diff --git a/data/maps/headers/Route5Gate.asm b/data/maps/headers/Route5Gate.asm index a01155336..f8b8362a3 100644 --- a/data/maps/headers/Route5Gate.asm +++ b/data/maps/headers/Route5Gate.asm @@ -1,3 +1,2 @@ - map_header Route5Gate, ROUTE_5_GATE, GATE, 0 end_map_header diff --git a/data/maps/headers/Route6.asm b/data/maps/headers/Route6.asm index 956aa4d64..13a686280 100644 --- a/data/maps/headers/Route6.asm +++ b/data/maps/headers/Route6.asm @@ -1,4 +1,3 @@ - map_header Route6, ROUTE_6, OVERWORLD, NORTH | SOUTH connection north, SaffronCity, SAFFRON_CITY, -5 connection south, VermilionCity, VERMILION_CITY, -5 diff --git a/data/maps/headers/Route6Gate.asm b/data/maps/headers/Route6Gate.asm index f80b57c8d..08996acbd 100644 --- a/data/maps/headers/Route6Gate.asm +++ b/data/maps/headers/Route6Gate.asm @@ -1,3 +1,2 @@ - map_header Route6Gate, ROUTE_6_GATE, GATE, 0 end_map_header diff --git a/data/maps/headers/Route7.asm b/data/maps/headers/Route7.asm index 8368c3fe3..27cd8b1d1 100644 --- a/data/maps/headers/Route7.asm +++ b/data/maps/headers/Route7.asm @@ -1,4 +1,3 @@ - map_header Route7, ROUTE_7, OVERWORLD, WEST | EAST connection west, CeladonCity, CELADON_CITY, -4 connection east, SaffronCity, SAFFRON_CITY, -4 diff --git a/data/maps/headers/Route7Gate.asm b/data/maps/headers/Route7Gate.asm index e9b9b16df..a77572084 100644 --- a/data/maps/headers/Route7Gate.asm +++ b/data/maps/headers/Route7Gate.asm @@ -1,3 +1,2 @@ - map_header Route7Gate, ROUTE_7_GATE, GATE, 0 end_map_header diff --git a/data/maps/headers/Route8.asm b/data/maps/headers/Route8.asm index 8df9e023f..467a8ff4d 100644 --- a/data/maps/headers/Route8.asm +++ b/data/maps/headers/Route8.asm @@ -1,4 +1,3 @@ - map_header Route8, ROUTE_8, OVERWORLD, WEST | EAST connection west, SaffronCity, SAFFRON_CITY, -4 connection east, LavenderTown, LAVENDER_TOWN, 0 diff --git a/data/maps/headers/Route8Gate.asm b/data/maps/headers/Route8Gate.asm index f6a320a49..2c319a97b 100644 --- a/data/maps/headers/Route8Gate.asm +++ b/data/maps/headers/Route8Gate.asm @@ -1,3 +1,2 @@ - map_header Route8Gate, ROUTE_8_GATE, GATE, 0 end_map_header diff --git a/data/maps/headers/Route9.asm b/data/maps/headers/Route9.asm index c1ed92250..4e97ee41a 100644 --- a/data/maps/headers/Route9.asm +++ b/data/maps/headers/Route9.asm @@ -1,4 +1,3 @@ - map_header Route9, ROUTE_9, OVERWORLD, WEST | EAST connection west, CeruleanCity, CERULEAN_CITY, -4 connection east, Route10, ROUTE_10, 0 diff --git a/data/maps/headers/SSAnne1F.asm b/data/maps/headers/SSAnne1F.asm index 80d25e2dc..c9bb5ea9e 100644 --- a/data/maps/headers/SSAnne1F.asm +++ b/data/maps/headers/SSAnne1F.asm @@ -1,3 +1,2 @@ - map_header SSAnne1F, SS_ANNE_1F, SHIP, 0 end_map_header diff --git a/data/maps/headers/SSAnne1FRooms.asm b/data/maps/headers/SSAnne1FRooms.asm index 8bdd8d001..2f24e897d 100644 --- a/data/maps/headers/SSAnne1FRooms.asm +++ b/data/maps/headers/SSAnne1FRooms.asm @@ -1,3 +1,2 @@ - map_header SSAnne1FRooms, SS_ANNE_1F_ROOMS, SHIP, 0 end_map_header diff --git a/data/maps/headers/SSAnne2F.asm b/data/maps/headers/SSAnne2F.asm index b2fe14d7b..16a09520f 100644 --- a/data/maps/headers/SSAnne2F.asm +++ b/data/maps/headers/SSAnne2F.asm @@ -1,3 +1,2 @@ - map_header SSAnne2F, SS_ANNE_2F, SHIP, 0 end_map_header diff --git a/data/maps/headers/SSAnne2FRooms.asm b/data/maps/headers/SSAnne2FRooms.asm index 2d349e4c1..02d5f7a35 100644 --- a/data/maps/headers/SSAnne2FRooms.asm +++ b/data/maps/headers/SSAnne2FRooms.asm @@ -1,3 +1,2 @@ - map_header SSAnne2FRooms, SS_ANNE_2F_ROOMS, SHIP, 0 end_map_header diff --git a/data/maps/headers/SSAnne3F.asm b/data/maps/headers/SSAnne3F.asm index f391a0cd4..b8faf7c97 100644 --- a/data/maps/headers/SSAnne3F.asm +++ b/data/maps/headers/SSAnne3F.asm @@ -1,3 +1,2 @@ - map_header SSAnne3F, SS_ANNE_3F, SHIP, 0 end_map_header diff --git a/data/maps/headers/SSAnneB1F.asm b/data/maps/headers/SSAnneB1F.asm index c21d7cff1..d3cebd1cf 100644 --- a/data/maps/headers/SSAnneB1F.asm +++ b/data/maps/headers/SSAnneB1F.asm @@ -1,3 +1,2 @@ - map_header SSAnneB1F, SS_ANNE_B1F, SHIP, 0 end_map_header diff --git a/data/maps/headers/SSAnneB1FRooms.asm b/data/maps/headers/SSAnneB1FRooms.asm index 1b8b46201..9ce96cd69 100644 --- a/data/maps/headers/SSAnneB1FRooms.asm +++ b/data/maps/headers/SSAnneB1FRooms.asm @@ -1,3 +1,2 @@ - map_header SSAnneB1FRooms, SS_ANNE_B1F_ROOMS, SHIP, 0 end_map_header diff --git a/data/maps/headers/SSAnneBow.asm b/data/maps/headers/SSAnneBow.asm index 2195e9700..7cf79f564 100644 --- a/data/maps/headers/SSAnneBow.asm +++ b/data/maps/headers/SSAnneBow.asm @@ -1,3 +1,2 @@ - map_header SSAnneBow, SS_ANNE_BOW, SHIP, 0 end_map_header diff --git a/data/maps/headers/SSAnneCaptainsRoom.asm b/data/maps/headers/SSAnneCaptainsRoom.asm index a24f930d1..3f3692b5e 100644 --- a/data/maps/headers/SSAnneCaptainsRoom.asm +++ b/data/maps/headers/SSAnneCaptainsRoom.asm @@ -1,3 +1,2 @@ - map_header SSAnneCaptainsRoom, SS_ANNE_CAPTAINS_ROOM, SHIP, 0 end_map_header diff --git a/data/maps/headers/SSAnneKitchen.asm b/data/maps/headers/SSAnneKitchen.asm index 47e84fbe1..807f9b799 100644 --- a/data/maps/headers/SSAnneKitchen.asm +++ b/data/maps/headers/SSAnneKitchen.asm @@ -1,3 +1,2 @@ - map_header SSAnneKitchen, SS_ANNE_KITCHEN, SHIP, 0 end_map_header diff --git a/data/maps/headers/SafariZoneCenter.asm b/data/maps/headers/SafariZoneCenter.asm index ccc58ed13..b5636c2cd 100644 --- a/data/maps/headers/SafariZoneCenter.asm +++ b/data/maps/headers/SafariZoneCenter.asm @@ -1,3 +1,2 @@ - map_header SafariZoneCenter, SAFARI_ZONE_CENTER, FOREST, 0 end_map_header diff --git a/data/maps/headers/SafariZoneCenterRestHouse.asm b/data/maps/headers/SafariZoneCenterRestHouse.asm index a866003f4..c80abea00 100644 --- a/data/maps/headers/SafariZoneCenterRestHouse.asm +++ b/data/maps/headers/SafariZoneCenterRestHouse.asm @@ -1,3 +1,2 @@ - map_header SafariZoneCenterRestHouse, SAFARI_ZONE_CENTER_REST_HOUSE, GATE, 0 end_map_header diff --git a/data/maps/headers/SafariZoneEast.asm b/data/maps/headers/SafariZoneEast.asm index c23e93349..2a6c564fd 100644 --- a/data/maps/headers/SafariZoneEast.asm +++ b/data/maps/headers/SafariZoneEast.asm @@ -1,3 +1,2 @@ - map_header SafariZoneEast, SAFARI_ZONE_EAST, FOREST, 0 end_map_header diff --git a/data/maps/headers/SafariZoneEastRestHouse.asm b/data/maps/headers/SafariZoneEastRestHouse.asm index 1f8d76c63..949647540 100644 --- a/data/maps/headers/SafariZoneEastRestHouse.asm +++ b/data/maps/headers/SafariZoneEastRestHouse.asm @@ -1,3 +1,2 @@ - map_header SafariZoneEastRestHouse, SAFARI_ZONE_EAST_REST_HOUSE, GATE, 0 end_map_header diff --git a/data/maps/headers/SafariZoneGate.asm b/data/maps/headers/SafariZoneGate.asm index 7816460d0..3f99fec02 100644 --- a/data/maps/headers/SafariZoneGate.asm +++ b/data/maps/headers/SafariZoneGate.asm @@ -1,3 +1,2 @@ - map_header SafariZoneGate, SAFARI_ZONE_GATE, GATE, 0 end_map_header diff --git a/data/maps/headers/SafariZoneNorth.asm b/data/maps/headers/SafariZoneNorth.asm index 32639d22d..b87195063 100644 --- a/data/maps/headers/SafariZoneNorth.asm +++ b/data/maps/headers/SafariZoneNorth.asm @@ -1,3 +1,2 @@ - map_header SafariZoneNorth, SAFARI_ZONE_NORTH, FOREST, 0 end_map_header diff --git a/data/maps/headers/SafariZoneNorthRestHouse.asm b/data/maps/headers/SafariZoneNorthRestHouse.asm index ec0838036..7f9d5dbc8 100644 --- a/data/maps/headers/SafariZoneNorthRestHouse.asm +++ b/data/maps/headers/SafariZoneNorthRestHouse.asm @@ -1,3 +1,2 @@ - map_header SafariZoneNorthRestHouse, SAFARI_ZONE_NORTH_REST_HOUSE, GATE, 0 end_map_header diff --git a/data/maps/headers/SafariZoneSecretHouse.asm b/data/maps/headers/SafariZoneSecretHouse.asm index 630577c47..1c055f275 100644 --- a/data/maps/headers/SafariZoneSecretHouse.asm +++ b/data/maps/headers/SafariZoneSecretHouse.asm @@ -1,3 +1,2 @@ - map_header SafariZoneSecretHouse, SAFARI_ZONE_SECRET_HOUSE, LAB, 0 end_map_header diff --git a/data/maps/headers/SafariZoneWest.asm b/data/maps/headers/SafariZoneWest.asm index a1117d09b..3bf4ad685 100644 --- a/data/maps/headers/SafariZoneWest.asm +++ b/data/maps/headers/SafariZoneWest.asm @@ -1,3 +1,2 @@ - map_header SafariZoneWest, SAFARI_ZONE_WEST, FOREST, 0 end_map_header diff --git a/data/maps/headers/SafariZoneWestRestHouse.asm b/data/maps/headers/SafariZoneWestRestHouse.asm index e4618e1d7..3d3bef715 100644 --- a/data/maps/headers/SafariZoneWestRestHouse.asm +++ b/data/maps/headers/SafariZoneWestRestHouse.asm @@ -1,3 +1,2 @@ - map_header SafariZoneWestRestHouse, SAFARI_ZONE_WEST_REST_HOUSE, GATE, 0 end_map_header diff --git a/data/maps/headers/SaffronCity.asm b/data/maps/headers/SaffronCity.asm index ee1f71e43..42494862b 100644 --- a/data/maps/headers/SaffronCity.asm +++ b/data/maps/headers/SaffronCity.asm @@ -1,4 +1,3 @@ - map_header SaffronCity, SAFFRON_CITY, OVERWORLD, NORTH | SOUTH | WEST | EAST connection north, Route5, ROUTE_5, 5 connection south, Route6, ROUTE_6, 5 diff --git a/data/maps/headers/SaffronGym.asm b/data/maps/headers/SaffronGym.asm index 14ee33237..1abaa4ff3 100644 --- a/data/maps/headers/SaffronGym.asm +++ b/data/maps/headers/SaffronGym.asm @@ -1,3 +1,2 @@ - map_header SaffronGym, SAFFRON_GYM, FACILITY, 0 end_map_header diff --git a/data/maps/headers/SaffronMart.asm b/data/maps/headers/SaffronMart.asm index f03132d2e..f0ec8505e 100644 --- a/data/maps/headers/SaffronMart.asm +++ b/data/maps/headers/SaffronMart.asm @@ -1,3 +1,2 @@ - map_header SaffronMart, SAFFRON_MART, MART, 0 end_map_header diff --git a/data/maps/headers/SaffronPidgeyHouse.asm b/data/maps/headers/SaffronPidgeyHouse.asm index e9f8dde7b..50203da2d 100644 --- a/data/maps/headers/SaffronPidgeyHouse.asm +++ b/data/maps/headers/SaffronPidgeyHouse.asm @@ -1,3 +1,2 @@ - map_header SaffronPidgeyHouse, SAFFRON_PIDGEY_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/SaffronPokecenter.asm b/data/maps/headers/SaffronPokecenter.asm index 9b2500501..94bf5a0bf 100644 --- a/data/maps/headers/SaffronPokecenter.asm +++ b/data/maps/headers/SaffronPokecenter.asm @@ -1,3 +1,2 @@ - map_header SaffronPokecenter, SAFFRON_POKECENTER, POKECENTER, 0 end_map_header diff --git a/data/maps/headers/SeafoamIslands1F.asm b/data/maps/headers/SeafoamIslands1F.asm index db5305495..5807a8ad4 100644 --- a/data/maps/headers/SeafoamIslands1F.asm +++ b/data/maps/headers/SeafoamIslands1F.asm @@ -1,3 +1,2 @@ - map_header SeafoamIslands1F, SEAFOAM_ISLANDS_1F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/SeafoamIslandsB1F.asm b/data/maps/headers/SeafoamIslandsB1F.asm index 589eef936..43d6cc184 100644 --- a/data/maps/headers/SeafoamIslandsB1F.asm +++ b/data/maps/headers/SeafoamIslandsB1F.asm @@ -1,3 +1,2 @@ - map_header SeafoamIslandsB1F, SEAFOAM_ISLANDS_B1F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/SeafoamIslandsB2F.asm b/data/maps/headers/SeafoamIslandsB2F.asm index f7e624edd..45ab3b369 100644 --- a/data/maps/headers/SeafoamIslandsB2F.asm +++ b/data/maps/headers/SeafoamIslandsB2F.asm @@ -1,3 +1,2 @@ - map_header SeafoamIslandsB2F, SEAFOAM_ISLANDS_B2F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/SeafoamIslandsB3F.asm b/data/maps/headers/SeafoamIslandsB3F.asm index b57da3c03..e4452a8df 100644 --- a/data/maps/headers/SeafoamIslandsB3F.asm +++ b/data/maps/headers/SeafoamIslandsB3F.asm @@ -1,3 +1,2 @@ - map_header SeafoamIslandsB3F, SEAFOAM_ISLANDS_B3F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/SeafoamIslandsB4F.asm b/data/maps/headers/SeafoamIslandsB4F.asm index bae1e3a2b..7504f74b0 100644 --- a/data/maps/headers/SeafoamIslandsB4F.asm +++ b/data/maps/headers/SeafoamIslandsB4F.asm @@ -1,3 +1,2 @@ - map_header SeafoamIslandsB4F, SEAFOAM_ISLANDS_B4F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/SilphCo10F.asm b/data/maps/headers/SilphCo10F.asm index 7a6786e76..1b4c0ea15 100644 --- a/data/maps/headers/SilphCo10F.asm +++ b/data/maps/headers/SilphCo10F.asm @@ -1,3 +1,2 @@ - map_header SilphCo10F, SILPH_CO_10F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/SilphCo11F.asm b/data/maps/headers/SilphCo11F.asm index 72eaaca27..9c1a3aadf 100644 --- a/data/maps/headers/SilphCo11F.asm +++ b/data/maps/headers/SilphCo11F.asm @@ -1,3 +1,2 @@ - map_header SilphCo11F, SILPH_CO_11F, INTERIOR, 0 end_map_header diff --git a/data/maps/headers/SilphCo1F.asm b/data/maps/headers/SilphCo1F.asm index 4c4ac97de..49ba5a387 100644 --- a/data/maps/headers/SilphCo1F.asm +++ b/data/maps/headers/SilphCo1F.asm @@ -1,3 +1,2 @@ - map_header SilphCo1F, SILPH_CO_1F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/SilphCo2F.asm b/data/maps/headers/SilphCo2F.asm index 7dc44a554..0e6fbe2e0 100644 --- a/data/maps/headers/SilphCo2F.asm +++ b/data/maps/headers/SilphCo2F.asm @@ -1,3 +1,2 @@ - map_header SilphCo2F, SILPH_CO_2F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/SilphCo3F.asm b/data/maps/headers/SilphCo3F.asm index 99e4aa153..de01f9be6 100644 --- a/data/maps/headers/SilphCo3F.asm +++ b/data/maps/headers/SilphCo3F.asm @@ -1,3 +1,2 @@ - map_header SilphCo3F, SILPH_CO_3F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/SilphCo4F.asm b/data/maps/headers/SilphCo4F.asm index 8eed0f9a7..026007743 100644 --- a/data/maps/headers/SilphCo4F.asm +++ b/data/maps/headers/SilphCo4F.asm @@ -1,3 +1,2 @@ - map_header SilphCo4F, SILPH_CO_4F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/SilphCo5F.asm b/data/maps/headers/SilphCo5F.asm index 3b40c3602..a589d31d6 100644 --- a/data/maps/headers/SilphCo5F.asm +++ b/data/maps/headers/SilphCo5F.asm @@ -1,3 +1,2 @@ - map_header SilphCo5F, SILPH_CO_5F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/SilphCo6F.asm b/data/maps/headers/SilphCo6F.asm index 3d2b3b8ca..f8f8b94bb 100644 --- a/data/maps/headers/SilphCo6F.asm +++ b/data/maps/headers/SilphCo6F.asm @@ -1,3 +1,2 @@ - map_header SilphCo6F, SILPH_CO_6F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/SilphCo7F.asm b/data/maps/headers/SilphCo7F.asm index 1591837ae..feb4c0829 100644 --- a/data/maps/headers/SilphCo7F.asm +++ b/data/maps/headers/SilphCo7F.asm @@ -1,3 +1,2 @@ - map_header SilphCo7F, SILPH_CO_7F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/SilphCo8F.asm b/data/maps/headers/SilphCo8F.asm index e676fa86b..de37e25c0 100644 --- a/data/maps/headers/SilphCo8F.asm +++ b/data/maps/headers/SilphCo8F.asm @@ -1,3 +1,2 @@ - map_header SilphCo8F, SILPH_CO_8F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/SilphCo9F.asm b/data/maps/headers/SilphCo9F.asm index 89f0300a9..ec8f9bcdf 100644 --- a/data/maps/headers/SilphCo9F.asm +++ b/data/maps/headers/SilphCo9F.asm @@ -1,3 +1,2 @@ - map_header SilphCo9F, SILPH_CO_9F, FACILITY, 0 end_map_header diff --git a/data/maps/headers/SilphCoElevator.asm b/data/maps/headers/SilphCoElevator.asm index 4dd9cd9fa..785443bcf 100644 --- a/data/maps/headers/SilphCoElevator.asm +++ b/data/maps/headers/SilphCoElevator.asm @@ -1,3 +1,2 @@ - map_header SilphCoElevator, SILPH_CO_ELEVATOR, LOBBY, 0 end_map_header diff --git a/data/maps/headers/TradeCenter.asm b/data/maps/headers/TradeCenter.asm index 268d76b2e..75c47d0a8 100644 --- a/data/maps/headers/TradeCenter.asm +++ b/data/maps/headers/TradeCenter.asm @@ -1,3 +1,2 @@ - map_header TradeCenter, TRADE_CENTER, CLUB, 0 end_map_header diff --git a/data/maps/headers/UndergroundPathNorthSouth.asm b/data/maps/headers/UndergroundPathNorthSouth.asm index 4bb03c795..c54004157 100644 --- a/data/maps/headers/UndergroundPathNorthSouth.asm +++ b/data/maps/headers/UndergroundPathNorthSouth.asm @@ -1,3 +1,2 @@ - map_header UndergroundPathNorthSouth, UNDERGROUND_PATH_NORTH_SOUTH, UNDERGROUND, 0 end_map_header diff --git a/data/maps/headers/UndergroundPathRoute5.asm b/data/maps/headers/UndergroundPathRoute5.asm index 18287254d..733bdb508 100644 --- a/data/maps/headers/UndergroundPathRoute5.asm +++ b/data/maps/headers/UndergroundPathRoute5.asm @@ -1,3 +1,2 @@ - map_header UndergroundPathRoute5, UNDERGROUND_PATH_ROUTE_5, GATE, 0 end_map_header diff --git a/data/maps/headers/UndergroundPathRoute6.asm b/data/maps/headers/UndergroundPathRoute6.asm index 677725430..b9e56bd88 100644 --- a/data/maps/headers/UndergroundPathRoute6.asm +++ b/data/maps/headers/UndergroundPathRoute6.asm @@ -1,3 +1,2 @@ - map_header UndergroundPathRoute6, UNDERGROUND_PATH_ROUTE_6, GATE, 0 end_map_header diff --git a/data/maps/headers/UndergroundPathRoute7.asm b/data/maps/headers/UndergroundPathRoute7.asm index d70548ed2..b3de5c698 100644 --- a/data/maps/headers/UndergroundPathRoute7.asm +++ b/data/maps/headers/UndergroundPathRoute7.asm @@ -1,3 +1,2 @@ - map_header UndergroundPathRoute7, UNDERGROUND_PATH_ROUTE_7, GATE, 0 end_map_header diff --git a/data/maps/headers/UndergroundPathRoute7Copy.asm b/data/maps/headers/UndergroundPathRoute7Copy.asm index 30bb70a8e..5627e074c 100644 --- a/data/maps/headers/UndergroundPathRoute7Copy.asm +++ b/data/maps/headers/UndergroundPathRoute7Copy.asm @@ -1,3 +1,2 @@ - map_header UndergroundPathRoute7Copy, UNDERGROUND_PATH_ROUTE_7, GATE, 0 end_map_header diff --git a/data/maps/headers/UndergroundPathRoute8.asm b/data/maps/headers/UndergroundPathRoute8.asm index 102d8413d..748e44419 100644 --- a/data/maps/headers/UndergroundPathRoute8.asm +++ b/data/maps/headers/UndergroundPathRoute8.asm @@ -1,3 +1,2 @@ - map_header UndergroundPathRoute8, UNDERGROUND_PATH_ROUTE_8, GATE, 0 end_map_header diff --git a/data/maps/headers/UndergroundPathWestEast.asm b/data/maps/headers/UndergroundPathWestEast.asm index 05976e87d..6dfa8832b 100644 --- a/data/maps/headers/UndergroundPathWestEast.asm +++ b/data/maps/headers/UndergroundPathWestEast.asm @@ -1,3 +1,2 @@ - map_header UndergroundPathWestEast, UNDERGROUND_PATH_WEST_EAST, UNDERGROUND, 0 end_map_header diff --git a/data/maps/headers/VermilionCity.asm b/data/maps/headers/VermilionCity.asm index e211562cc..b776a67f6 100644 --- a/data/maps/headers/VermilionCity.asm +++ b/data/maps/headers/VermilionCity.asm @@ -1,4 +1,3 @@ - map_header VermilionCity, VERMILION_CITY, OVERWORLD, NORTH | EAST connection north, Route6, ROUTE_6, 5 connection east, Route11, ROUTE_11, 4 diff --git a/data/maps/headers/VermilionDock.asm b/data/maps/headers/VermilionDock.asm index 9a9b61c24..0234f6162 100644 --- a/data/maps/headers/VermilionDock.asm +++ b/data/maps/headers/VermilionDock.asm @@ -1,3 +1,2 @@ - map_header VermilionDock, VERMILION_DOCK, SHIP_PORT, 0 end_map_header diff --git a/data/maps/headers/VermilionGym.asm b/data/maps/headers/VermilionGym.asm index ca75b8c13..f54c6bfb8 100644 --- a/data/maps/headers/VermilionGym.asm +++ b/data/maps/headers/VermilionGym.asm @@ -1,3 +1,2 @@ - map_header VermilionGym, VERMILION_GYM, GYM, 0 end_map_header diff --git a/data/maps/headers/VermilionMart.asm b/data/maps/headers/VermilionMart.asm index 5777db4b1..11f1d676a 100644 --- a/data/maps/headers/VermilionMart.asm +++ b/data/maps/headers/VermilionMart.asm @@ -1,3 +1,2 @@ - map_header VermilionMart, VERMILION_MART, MART, 0 end_map_header diff --git a/data/maps/headers/VermilionOldRodHouse.asm b/data/maps/headers/VermilionOldRodHouse.asm index f9c890e0c..40feae757 100644 --- a/data/maps/headers/VermilionOldRodHouse.asm +++ b/data/maps/headers/VermilionOldRodHouse.asm @@ -1,3 +1,2 @@ - map_header VermilionOldRodHouse, VERMILION_OLD_ROD_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/VermilionPidgeyHouse.asm b/data/maps/headers/VermilionPidgeyHouse.asm index afb817847..7ddf452fa 100644 --- a/data/maps/headers/VermilionPidgeyHouse.asm +++ b/data/maps/headers/VermilionPidgeyHouse.asm @@ -1,3 +1,2 @@ - map_header VermilionPidgeyHouse, VERMILION_PIDGEY_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/VermilionPokecenter.asm b/data/maps/headers/VermilionPokecenter.asm index af9827acf..6b7f7d629 100644 --- a/data/maps/headers/VermilionPokecenter.asm +++ b/data/maps/headers/VermilionPokecenter.asm @@ -1,3 +1,2 @@ - map_header VermilionPokecenter, VERMILION_POKECENTER, POKECENTER, 0 end_map_header diff --git a/data/maps/headers/VermilionTradeHouse.asm b/data/maps/headers/VermilionTradeHouse.asm index 3cb82c47e..f948348fe 100644 --- a/data/maps/headers/VermilionTradeHouse.asm +++ b/data/maps/headers/VermilionTradeHouse.asm @@ -1,3 +1,2 @@ - map_header VermilionTradeHouse, VERMILION_TRADE_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/VictoryRoad1F.asm b/data/maps/headers/VictoryRoad1F.asm index dae95f16a..c982da4b3 100644 --- a/data/maps/headers/VictoryRoad1F.asm +++ b/data/maps/headers/VictoryRoad1F.asm @@ -1,3 +1,2 @@ - map_header VictoryRoad1F, VICTORY_ROAD_1F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/VictoryRoad2F.asm b/data/maps/headers/VictoryRoad2F.asm index 99079ad38..7cb9aac5b 100644 --- a/data/maps/headers/VictoryRoad2F.asm +++ b/data/maps/headers/VictoryRoad2F.asm @@ -1,3 +1,2 @@ - map_header VictoryRoad2F, VICTORY_ROAD_2F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/VictoryRoad3F.asm b/data/maps/headers/VictoryRoad3F.asm index bc15cad76..aabde2e6f 100644 --- a/data/maps/headers/VictoryRoad3F.asm +++ b/data/maps/headers/VictoryRoad3F.asm @@ -1,3 +1,2 @@ - map_header VictoryRoad3F, VICTORY_ROAD_3F, CAVERN, 0 end_map_header diff --git a/data/maps/headers/ViridianCity.asm b/data/maps/headers/ViridianCity.asm index 0771cc819..1e497fc59 100644 --- a/data/maps/headers/ViridianCity.asm +++ b/data/maps/headers/ViridianCity.asm @@ -1,4 +1,3 @@ - map_header ViridianCity, VIRIDIAN_CITY, OVERWORLD, NORTH | SOUTH | WEST connection north, Route2, ROUTE_2, 5 connection south, Route1, ROUTE_1, 5 diff --git a/data/maps/headers/ViridianForest.asm b/data/maps/headers/ViridianForest.asm index d531ec862..8086f5184 100644 --- a/data/maps/headers/ViridianForest.asm +++ b/data/maps/headers/ViridianForest.asm @@ -1,3 +1,2 @@ - map_header ViridianForest, VIRIDIAN_FOREST, FOREST, 0 end_map_header diff --git a/data/maps/headers/ViridianForestNorthGate.asm b/data/maps/headers/ViridianForestNorthGate.asm index 5bfcd6edd..208b6df1f 100644 --- a/data/maps/headers/ViridianForestNorthGate.asm +++ b/data/maps/headers/ViridianForestNorthGate.asm @@ -1,3 +1,2 @@ - map_header ViridianForestNorthGate, VIRIDIAN_FOREST_NORTH_GATE, FOREST_GATE, 0 end_map_header diff --git a/data/maps/headers/ViridianForestSouthGate.asm b/data/maps/headers/ViridianForestSouthGate.asm index 87a492844..17ac15507 100644 --- a/data/maps/headers/ViridianForestSouthGate.asm +++ b/data/maps/headers/ViridianForestSouthGate.asm @@ -1,3 +1,2 @@ - map_header ViridianForestSouthGate, VIRIDIAN_FOREST_SOUTH_GATE, FOREST_GATE, 0 end_map_header diff --git a/data/maps/headers/ViridianGym.asm b/data/maps/headers/ViridianGym.asm index 640a71b6c..1812531fb 100644 --- a/data/maps/headers/ViridianGym.asm +++ b/data/maps/headers/ViridianGym.asm @@ -1,3 +1,2 @@ - map_header ViridianGym, VIRIDIAN_GYM, GYM, 0 end_map_header diff --git a/data/maps/headers/ViridianMart.asm b/data/maps/headers/ViridianMart.asm index 817b52657..ed5c4c90d 100644 --- a/data/maps/headers/ViridianMart.asm +++ b/data/maps/headers/ViridianMart.asm @@ -1,3 +1,2 @@ - map_header ViridianMart, VIRIDIAN_MART, MART, 0 end_map_header diff --git a/data/maps/headers/ViridianNicknameHouse.asm b/data/maps/headers/ViridianNicknameHouse.asm index 5a7c272fa..d0cb757cf 100644 --- a/data/maps/headers/ViridianNicknameHouse.asm +++ b/data/maps/headers/ViridianNicknameHouse.asm @@ -1,3 +1,2 @@ - map_header ViridianNicknameHouse, VIRIDIAN_NICKNAME_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/ViridianPokecenter.asm b/data/maps/headers/ViridianPokecenter.asm index daac19f33..79f1e3b51 100644 --- a/data/maps/headers/ViridianPokecenter.asm +++ b/data/maps/headers/ViridianPokecenter.asm @@ -1,3 +1,2 @@ - map_header ViridianPokecenter, VIRIDIAN_POKECENTER, POKECENTER, 0 end_map_header diff --git a/data/maps/headers/ViridianSchoolHouse.asm b/data/maps/headers/ViridianSchoolHouse.asm index f5b77212d..56cbb786e 100644 --- a/data/maps/headers/ViridianSchoolHouse.asm +++ b/data/maps/headers/ViridianSchoolHouse.asm @@ -1,3 +1,2 @@ - map_header ViridianSchoolHouse, VIRIDIAN_SCHOOL_HOUSE, HOUSE, 0 end_map_header diff --git a/data/maps/headers/WardensHouse.asm b/data/maps/headers/WardensHouse.asm index 08216f59c..6f484b3b3 100644 --- a/data/maps/headers/WardensHouse.asm +++ b/data/maps/headers/WardensHouse.asm @@ -1,3 +1,2 @@ - map_header WardensHouse, WARDENS_HOUSE, LAB, 0 end_map_header From bef36398c936e8aa3d61229dfe7b52ca577d024a Mon Sep 17 00:00:00 2001 From: dannye <33dannye@gmail.com> Date: Fri, 15 Jul 2022 05:46:22 -0500 Subject: [PATCH 33/45] Update comment --- audio/engine_2.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/engine_2.asm b/audio/engine_2.asm index 51a5d7c46..30845fc82 100644 --- a/audio/engine_2.asm +++ b/audio/engine_2.asm @@ -1074,7 +1074,7 @@ Audio2_IsCry: ; --- this section is only present in this copy of the sound engine Audio2_IsBattleSFX: -; Returns whether the currently playing audio is a cry in carry. +; Returns whether the currently playing audio is a battle sfx in carry. ld a, [wChannelSoundIDs + Ch8] ld b, a ld a, [wChannelSoundIDs + Ch5] From 8ffc0367f927d44ce96d84282146b206e423f31f Mon Sep 17 00:00:00 2001 From: vulcandth Date: Wed, 20 Jul 2022 22:06:40 -0500 Subject: [PATCH 34/45] Basic Issue Template with Discord Link (#377) Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/blank_issue.md | 4 ++++ .github/ISSUE_TEMPLATE/config.yml | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/blank_issue.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/blank_issue.md b/.github/ISSUE_TEMPLATE/blank_issue.md new file mode 100644 index 000000000..bf249d914 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/blank_issue.md @@ -0,0 +1,4 @@ +--- +name: Update to pokered +about: Suggest a possible change to pokered itself. +--- diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..ceec6344c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: pret Discord + url: https://discord.gg/d5dubZ3 + about: If you need help with using pokered, or just have general questions about it, ask in our Discord server! From 498da6ab0921a280507b3d96e7faac1b305959bd Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 26 Jul 2022 00:01:21 -0400 Subject: [PATCH 35/45] Clarify how Metronome picks a move --- engine/battle/core.asm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 62813eb42..44c657eee 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -5144,12 +5144,13 @@ MetronomePickMove: ; values for enemy turn ld de, wEnemyMoveNum ld hl, wEnemySelectedMove -; loop to pick a random number in the range [1, $a5) to be the move used by Metronome +; loop to pick a random number in the range of valid moves used by Metronome .pickMoveLoop call BattleRandom and a jr z, .pickMoveLoop - cp NUM_ATTACKS ; max move number (including Struggle) + cp STRUGGLE + assert NUM_ATTACKS == STRUGGLE ; random numbers greater than STRUGGLE are not moves jr nc, .pickMoveLoop cp METRONOME jr z, .pickMoveLoop From 1e689606a3e25875af72323ea0f45b06ed044b79 Mon Sep 17 00:00:00 2001 From: Rangi Date: Wed, 10 Aug 2022 21:20:31 -0400 Subject: [PATCH 36/45] PP must be 40 or less --- data/moves/moves.asm | 1 + 1 file changed, 1 insertion(+) diff --git a/data/moves/moves.asm b/data/moves/moves.asm index b7e5e7af2..c32a89cb9 100644 --- a/data/moves/moves.asm +++ b/data/moves/moves.asm @@ -5,6 +5,7 @@ MACRO move db \4 ; type db \5 percent ; accuracy db \6 ; pp + assert \6 <= 40, "PP must be 40 or less" ENDM Moves: From 8b194055907d1f69f9e0c7edd232f4e669e3fe48 Mon Sep 17 00:00:00 2001 From: Chatot4444 <94812895+Chatot4444@users.noreply.github.com> Date: Thu, 11 Aug 2022 08:51:18 -0400 Subject: [PATCH 37/45] Replace Hard-Coded Number With Constant (#381) Replace a hard coded $a in CheckMapForMon with NUM_WILDMONS --- engine/items/item_effects.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 024084844..913b86360 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -2919,7 +2919,7 @@ FindWildLocationsOfMon: CheckMapForMon: inc hl - ld b, $a + ld b, NUM_WILDMONS .loop ld a, [wd11e] cp [hl] From ac7263b1adef941f8978b775d4b7629a7d8620e3 Mon Sep 17 00:00:00 2001 From: SatoMew Date: Fri, 12 Aug 2022 02:22:57 +0100 Subject: [PATCH 38/45] Update comments related to Swift and Substitute checks (#380) Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com> --- engine/battle/core.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 44c657eee..6aa697c9c 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -5368,10 +5368,10 @@ MoveHitTest: .swiftCheck ld a, [de] cp SWIFT_EFFECT - ret z ; Swift never misses (interestingly, Azure Heights lists this is a myth, but it appears to be true) + ret z ; Swift never misses (this was fixed from the Japanese versions) call CheckTargetSubstitute ; substitute check (note that this overwrites a) jr z, .checkForDigOrFlyStatus -; This code is buggy. It's supposed to prevent HP draining moves from working on substitutes. +; The fix for Swift broke this code. It's supposed to prevent HP draining moves from working on Substitutes. ; Since CheckTargetSubstitute overwrites a with either $00 or $01, it never works. cp DRAIN_HP_EFFECT jp z, .moveMissed From bbb0e7e82deb6741f75a12b48f81076d92f5d9dc Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Thu, 11 Aug 2022 21:23:08 -0400 Subject: [PATCH 39/45] Use the same music headers as pokecrystal (#382) --- audio.asm | 6 +- audio/engine_1.asm | 84 ++-- audio/engine_2.asm | 94 ++-- audio/engine_3.asm | 84 ++-- audio/headers/musicheaders1.asm | 109 +++- audio/headers/musicheaders2.asm | 35 +- audio/headers/musicheaders3.asm | 96 +++- audio/headers/sfxheaders1.asm | 375 ++++++++++---- audio/headers/sfxheaders2.asm | 471 +++++++++++++----- audio/headers/sfxheaders3.asm | 400 +++++++++++---- audio/low_health_alarm.asm | 4 +- audio/poke_flute.asm | 2 +- ...{wave_instruments.asm => wave_samples.asm} | 0 constants/audio_constants.asm | 16 +- engine/battle/core.asm | 6 +- engine/battle/end_of_battle.asm | 2 +- engine/events/hidden_objects/safari_game.asm | 2 +- engine/items/item_effects.asm | 6 +- engine/movie/evolution.asm | 2 +- engine/overworld/elevator.asm | 2 +- home/audio.asm | 8 +- home/delay.asm | 2 +- home/overworld.asm | 4 +- macros/scripts/audio.asm | 55 +- scripts/PewterPokecenter.asm | 2 +- 25 files changed, 1313 insertions(+), 554 deletions(-) rename audio/{wave_instruments.asm => wave_samples.asm} (100%) diff --git a/audio.asm b/audio.asm index 35b0d872f..e934c4408 100644 --- a/audio.asm +++ b/audio.asm @@ -44,7 +44,7 @@ INCLUDE "audio/sfx/noise_instrument18_1.asm" INCLUDE "audio/sfx/noise_instrument19_1.asm" Audio1_WavePointers: -INCLUDE "audio/wave_instruments.asm" +INCLUDE "audio/wave_samples.asm" INCLUDE "audio/sfx/start_menu_1.asm" INCLUDE "audio/sfx/pokeflute.asm" @@ -144,7 +144,7 @@ INCLUDE "audio/sfx/noise_instrument18_2.asm" INCLUDE "audio/sfx/noise_instrument19_2.asm" Audio2_WavePointers: -INCLUDE "audio/wave_instruments.asm" +INCLUDE "audio/wave_samples.asm" INCLUDE "audio/sfx/press_ab_2.asm" INCLUDE "audio/sfx/start_menu_2.asm" @@ -270,7 +270,7 @@ INCLUDE "audio/sfx/noise_instrument18_3.asm" INCLUDE "audio/sfx/noise_instrument19_3.asm" Audio3_WavePointers: -INCLUDE "audio/wave_instruments.asm" +INCLUDE "audio/wave_samples.asm" INCLUDE "audio/sfx/start_menu_3.asm" INCLUDE "audio/sfx/cut_3.asm" diff --git a/audio/engine_1.asm b/audio/engine_1.asm index f9b4166a2..8b30fb1af 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -1,7 +1,7 @@ ; The first of three duplicated sound engines. Audio1_UpdateMusic:: - ld c, Ch1 + ld c, CHAN1 .loop ld b, 0 ld hl, wChannelSoundIDs @@ -10,7 +10,7 @@ Audio1_UpdateMusic:: and a jr z, .nextChannel ld a, c - cp Ch5 + cp CHAN5 jr nc, .applyAffects ; if sfx channel ld a, [wMuteAudioAndPauseMusic] and a @@ -30,7 +30,7 @@ Audio1_UpdateMusic:: .nextChannel ld a, c inc c ; inc channel number - cp Ch8 + cp CHAN8 jr nz, .loop ret @@ -46,9 +46,9 @@ Audio1_ApplyMusicAffects: dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c - cp Ch5 + cp CHAN5 jr nc, .startChecks ; if a sfx channel - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -171,7 +171,7 @@ Audio1_sound_ret: bit BIT_SOUND_CALL, [hl] jr nz, .returnFromCall ld a, c - cp Ch4 + cp CHAN4 jr nc, .noiseOrSfxChannel jr .disableChannelOutput .noiseOrSfxChannel @@ -179,7 +179,7 @@ Audio1_sound_ret: ld hl, wChannelFlags2 add hl, bc res BIT_EXECUTE_MUSIC, [hl] - cp Ch7 + cp CHAN7 jr nz, .skipSfxChannel3 ; restart hardware channel 3 (wave channel) output ld a, $0 @@ -223,19 +223,19 @@ Audio1_sound_ret: and [hl] ldh [rNR51], a .afterDisable - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .maybeCry jr .skipCry .maybeCry - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_END jr z, .skipCry jr c, .cry jr .skipCry .cry ld a, c - cp Ch5 + cp CHAN5 jr z, .skipRewind call Audio1_GoBackOneCommandIfCry ret c @@ -336,14 +336,14 @@ Audio1_note_type: add hl, bc ld [hl], a ; store low nibble as speed ld a, c - cp Ch4 + cp CHAN4 jr z, .noiseChannel ; noise channel has 0 params call Audio1_GetNextMusicByte ld d, a ld a, c - cp Ch3 + cp CHAN3 jr z, .musicChannel3 - cp Ch7 + cp CHAN7 jr nz, .skipChannel3 ld hl, wSfxWaveInstrument jr .channel3 @@ -477,7 +477,7 @@ Audio1_tempo: cp tempo_cmd jr nz, Audio1_stereo_panning ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel call Audio1_GetNextMusicByte ld [wMusicTempo], a ; store first param @@ -520,10 +520,10 @@ Audio1_unknownmusic0xef: ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .skip - ld a, [wChannelSoundIDs + Ch8] + ld a, [wChannelSoundIDs + CHAN8] ld [wDisableChannelOutputWhenSfxEnds], a xor a - ld [wChannelSoundIDs + Ch8], a + ld [wChannelSoundIDs + CHAN8], a .skip jp Audio1_sound_ret @@ -577,7 +577,7 @@ Audio1_sfx_note: cp sfx_note_cmd jr nz, Audio1_pitch_sweep ld a, c - cp Ch4 ; is this a noise or sfx channel? + cp CHAN4 ; is this a noise or sfx channel? jr c, Audio1_pitch_sweep ; no ld b, 0 ld hl, wChannelFlags2 @@ -607,7 +607,7 @@ Audio1_sfx_note: call Audio1_GetNextMusicByte ld e, a ld a, c - cp Ch8 + cp CHAN8 ld a, 0 jr z, .skip ; Channels 1 through 3 have 2 registers that control frequency, but the noise @@ -627,7 +627,7 @@ Audio1_sfx_note: Audio1_pitch_sweep: ld a, c - cp Ch5 + cp CHAN5 jr c, Audio1_note ; if not a sfx ld a, d cp pitch_sweep_cmd @@ -643,7 +643,7 @@ Audio1_pitch_sweep: Audio1_note: ld a, c - cp Ch4 + cp CHAN4 jr nz, Audio1_note_length ; if not noise channel ld a, d and $f0 @@ -701,7 +701,7 @@ Audio1_note_length: ld l, b call Audio1_MultiplyAdd ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ld a, [wMusicTempo] ld d, a @@ -711,7 +711,7 @@ Audio1_note_length: .sfxChannel ld d, $1 ld e, $0 - cp Ch8 + cp CHAN8 jr z, .skip ; if noise channel call Audio1_SetSfxTempo ld a, [wSfxTempo] @@ -751,10 +751,10 @@ Audio1_note_pitch: cp rest_cmd jr nz, .notRest ld a, c - cp Ch5 + cp CHAN5 jr nc, .next ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -762,9 +762,9 @@ Audio1_note_pitch: ; fall through .next ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 .channel3 ld b, 0 @@ -800,10 +800,10 @@ Audio1_note_pitch: .skipPitchSlide push de ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld d, 0 ld e, a add hl, de @@ -848,12 +848,12 @@ Audio1_EnableChannelOutput: or [hl] ; set this channel's bits ld d, a ld a, c - cp Ch8 + cp CHAN8 jr z, .noiseChannelOrNoSfx - cp Ch5 + cp CHAN5 jr nc, .skip ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -883,9 +883,9 @@ Audio1_ApplyDutyCycleAndSoundLength: add hl, bc ld d, [hl] ld a, c - cp Ch3 + cp CHAN3 jr z, .skipDuty ; if music channel 3 - cp Ch7 + cp CHAN7 jr z, .skipDuty ; if sfx channel 3 ; include duty cycle (except on channel 3 which doesn't have it) ld a, d @@ -904,15 +904,15 @@ Audio1_ApplyDutyCycleAndSoundLength: Audio1_ApplyWavePatternAndFrequency: ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 ; fall through .channel3 push de ld de, wMusicWaveInstrument - cp Ch3 + cp CHAN3 jr z, .next ld de, wSfxWaveInstrument .next @@ -1016,7 +1016,7 @@ Audio1_GoBackOneCommandIfCry: Audio1_IsCry: ; Returns whether the currently playing audio is a cry in carry. - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .next jr .no @@ -1453,7 +1453,7 @@ Audio1_PlaySound:: and a jr z, .playChannel ld a, e - cp Ch8 + cp CHAN8 jr nz, .notNoiseChannel ld a, [wSoundID] cp NOISE_INSTRUMENTS_END @@ -1552,7 +1552,7 @@ Audio1_PlaySound:: add hl, de ld [hl], a ld a, e - cp Ch5 + cp CHAN5 jr nz, .skipSweepDisable ld a, $8 ldh [rNR10], a ; sweep off @@ -1654,7 +1654,7 @@ Audio1_PlaySound:: ld a, [wSoundID] ld [hl], a pop af - cp Ch4 + cp CHAN4 jr c, .skipSettingFlag ld hl, wChannelFlags1 add hl, bc @@ -1686,12 +1686,12 @@ Audio1_PlaySound:: jr c, .cry jr .done .cry - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wChannelCommandPointers + Ch7 * 2 ; sfx wave channel pointer + ld hl, wChannelCommandPointers + CHAN7 * 2 ; sfx wave channel pointer ld de, Audio1_CryRet ld [hl], e inc hl diff --git a/audio/engine_2.asm b/audio/engine_2.asm index 30845fc82..8783c4c62 100644 --- a/audio/engine_2.asm +++ b/audio/engine_2.asm @@ -3,7 +3,7 @@ ; and the low health alarm that plays in battle Audio2_UpdateMusic:: - ld c, Ch1 + ld c, CHAN1 .loop ld b, 0 ld hl, wChannelSoundIDs @@ -12,7 +12,7 @@ Audio2_UpdateMusic:: and a jr z, .nextChannel ld a, c - cp Ch5 + cp CHAN5 jr nc, .applyAffects ; if sfx channel ld a, [wMuteAudioAndPauseMusic] and a @@ -32,7 +32,7 @@ Audio2_UpdateMusic:: .nextChannel ld a, c inc c ; inc channel number - cp Ch8 + cp CHAN8 jr nz, .loop ret @@ -48,9 +48,9 @@ Audio2_ApplyMusicAffects: dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c - cp Ch5 + cp CHAN5 jr nc, .startChecks ; if a sfx channel - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -161,7 +161,7 @@ Audio2_PlayNextNote: res BIT_PITCH_SLIDE_DECREASING, [hl] ; --- this section is only present in this copy of the sound engine ld a, c - cp Ch5 + cp CHAN5 jr nz, .beginChecks ld a, [wLowHealthAlarm] ; low health alarm enabled? bit 7, a @@ -182,7 +182,7 @@ Audio2_sound_ret: bit BIT_SOUND_CALL, [hl] jr nz, .returnFromCall ld a, c - cp Ch4 + cp CHAN4 jr nc, .noiseOrSfxChannel jr .disableChannelOutput .noiseOrSfxChannel @@ -190,7 +190,7 @@ Audio2_sound_ret: ld hl, wChannelFlags2 add hl, bc res BIT_EXECUTE_MUSIC, [hl] - cp Ch7 + cp CHAN7 jr nz, .skipSfxChannel3 ; restart hardware channel 3 (wave channel) output ld a, $0 @@ -234,19 +234,19 @@ Audio2_sound_ret: and [hl] ldh [rNR51], a .afterDisable - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .maybeCry jr .skipCry .maybeCry - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_END jr z, .skipCry jr c, .cry jr .skipCry .cry ld a, c - cp Ch5 + cp CHAN5 jr z, .skipRewind call Audio2_GoBackOneCommandIfCry ret c @@ -347,14 +347,14 @@ Audio2_note_type: add hl, bc ld [hl], a ; store low nibble as speed ld a, c - cp Ch4 + cp CHAN4 jr z, .noiseChannel ; noise channel has 0 params call Audio2_GetNextMusicByte ld d, a ld a, c - cp Ch3 + cp CHAN3 jr z, .musicChannel3 - cp Ch7 + cp CHAN7 jr nz, .skipChannel3 ld hl, wSfxWaveInstrument jr .channel3 @@ -488,7 +488,7 @@ Audio2_tempo: cp tempo_cmd jr nz, Audio2_stereo_panning ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel call Audio2_GetNextMusicByte ld [wMusicTempo], a ; store first param @@ -531,10 +531,10 @@ Audio2_unknownmusic0xef: ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .skip - ld a, [wChannelSoundIDs + Ch8] + ld a, [wChannelSoundIDs + CHAN8] ld [wDisableChannelOutputWhenSfxEnds], a xor a - ld [wChannelSoundIDs + Ch8], a + ld [wChannelSoundIDs + CHAN8], a .skip jp Audio2_sound_ret @@ -588,7 +588,7 @@ Audio2_sfx_note: cp sfx_note_cmd jr nz, Audio2_pitch_sweep ld a, c - cp Ch4 ; is this a noise or sfx channel? + cp CHAN4 ; is this a noise or sfx channel? jr c, Audio2_pitch_sweep ; no ld b, 0 ld hl, wChannelFlags2 @@ -618,7 +618,7 @@ Audio2_sfx_note: call Audio2_GetNextMusicByte ld e, a ld a, c - cp Ch8 + cp CHAN8 ld a, 0 jr z, .skip ; Channels 1 through 3 have 2 registers that control frequency, but the noise @@ -638,7 +638,7 @@ Audio2_sfx_note: Audio2_pitch_sweep: ld a, c - cp Ch5 + cp CHAN5 jr c, Audio2_note ; if not a sfx ld a, d cp pitch_sweep_cmd @@ -654,7 +654,7 @@ Audio2_pitch_sweep: Audio2_note: ld a, c - cp Ch4 + cp CHAN4 jr nz, Audio2_note_length ; if not noise channel ld a, d and $f0 @@ -712,7 +712,7 @@ Audio2_note_length: ld l, b call Audio2_MultiplyAdd ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ld a, [wMusicTempo] ld d, a @@ -722,7 +722,7 @@ Audio2_note_length: .sfxChannel ld d, $1 ld e, $0 - cp Ch8 + cp CHAN8 jr z, .skip ; if noise channel call Audio2_SetSfxTempo ld a, [wSfxTempo] @@ -762,10 +762,10 @@ Audio2_note_pitch: cp rest_cmd jr nz, .notRest ld a, c - cp Ch5 + cp CHAN5 jr nc, .next ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -773,9 +773,9 @@ Audio2_note_pitch: ; fall through .next ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 .channel3 ld b, 0 @@ -811,10 +811,10 @@ Audio2_note_pitch: .skipPitchSlide push de ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld d, 0 ld e, a add hl, de @@ -859,12 +859,12 @@ Audio2_EnableChannelOutput: or [hl] ; set this channel's bits ld d, a ld a, c - cp Ch8 + cp CHAN8 jr z, .noiseChannelOrNoSfx - cp Ch5 + cp CHAN5 jr nc, .skip ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -894,9 +894,9 @@ Audio2_ApplyDutyCycleAndSoundLength: add hl, bc ld d, [hl] ld a, c - cp Ch3 + cp CHAN3 jr z, .skipDuty ; if music channel 3 - cp Ch7 + cp CHAN7 jr z, .skipDuty ; if sfx channel 3 ; include duty cycle (except on channel 3 which doesn't have it) ld a, d @@ -915,15 +915,15 @@ Audio2_ApplyDutyCycleAndSoundLength: Audio2_ApplyWavePatternAndFrequency: ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 ; fall through .channel3 push de ld de, wMusicWaveInstrument - cp Ch3 + cp CHAN3 jr z, .next ld de, wSfxWaveInstrument .next @@ -963,7 +963,7 @@ Audio2_ApplyWavePatternAndFrequency: ld [hl], d ; store frequency high byte ; --- this section is only present in this copy of the sound engine ld a, c - cp Ch5 + cp CHAN5 jr c, .musicChannel call Audio2_ApplyFrequencyModifier .musicChannel @@ -974,7 +974,7 @@ Audio2_ApplyWavePatternAndFrequency: ; unused Audio2_ResetCryModifiers: ld a, c - cp Ch5 + cp CHAN5 jr nz, .skip ld a, [wLowHealthAlarm] bit 7, a @@ -1056,7 +1056,7 @@ Audio2_GoBackOneCommandIfCry: Audio2_IsCry: ; Returns whether the currently playing audio is a cry in carry. - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .next jr .no @@ -1075,9 +1075,9 @@ Audio2_IsCry: ; --- this section is only present in this copy of the sound engine Audio2_IsBattleSFX: ; Returns whether the currently playing audio is a battle sfx in carry. - ld a, [wChannelSoundIDs + Ch8] + ld a, [wChannelSoundIDs + CHAN8] ld b, a - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] or b cp BATTLE_SFX_START jr nc, .next @@ -1516,7 +1516,7 @@ Audio2_PlaySound:: and a jr z, .playChannel ld a, e - cp Ch8 + cp CHAN8 jr nz, .notNoiseChannel ld a, [wSoundID] cp NOISE_INSTRUMENTS_END @@ -1615,7 +1615,7 @@ Audio2_PlaySound:: add hl, de ld [hl], a ld a, e - cp Ch5 + cp CHAN5 jr nz, .skipSweepDisable ld a, $8 ldh [rNR10], a ; sweep off @@ -1717,7 +1717,7 @@ Audio2_PlaySound:: ld a, [wSoundID] ld [hl], a pop af - cp Ch4 + cp CHAN4 jr c, .skipSettingFlag ld hl, wChannelFlags1 add hl, bc @@ -1749,12 +1749,12 @@ Audio2_PlaySound:: jr c, .cry jr .done .cry - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wChannelCommandPointers + Ch7 * 2 ; sfx wave channel pointer + ld hl, wChannelCommandPointers + CHAN7 * 2 ; sfx wave channel pointer ld de, Audio2_CryRet ld [hl], e inc hl diff --git a/audio/engine_3.asm b/audio/engine_3.asm index 576184863..404e6e7cf 100644 --- a/audio/engine_3.asm +++ b/audio/engine_3.asm @@ -1,7 +1,7 @@ ; The third of three duplicated sound engines. Audio3_UpdateMusic:: - ld c, Ch1 + ld c, CHAN1 .loop ld b, 0 ld hl, wChannelSoundIDs @@ -10,7 +10,7 @@ Audio3_UpdateMusic:: and a jr z, .nextChannel ld a, c - cp Ch5 + cp CHAN5 jr nc, .applyAffects ; if sfx channel ld a, [wMuteAudioAndPauseMusic] and a @@ -30,7 +30,7 @@ Audio3_UpdateMusic:: .nextChannel ld a, c inc c ; inc channel number - cp Ch8 + cp CHAN8 jr nz, .loop ret @@ -46,9 +46,9 @@ Audio3_ApplyMusicAffects: dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c - cp Ch5 + cp CHAN5 jr nc, .startChecks ; if a sfx channel - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -171,7 +171,7 @@ Audio3_sound_ret: bit BIT_SOUND_CALL, [hl] jr nz, .returnFromCall ld a, c - cp Ch4 + cp CHAN4 jr nc, .noiseOrSfxChannel jr .disableChannelOutput .noiseOrSfxChannel @@ -179,7 +179,7 @@ Audio3_sound_ret: ld hl, wChannelFlags2 add hl, bc res BIT_EXECUTE_MUSIC, [hl] - cp Ch7 + cp CHAN7 jr nz, .skipSfxChannel3 ; restart hardware channel 3 (wave channel) output ld a, $0 @@ -223,19 +223,19 @@ Audio3_sound_ret: and [hl] ldh [rNR51], a .afterDisable - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .maybeCry jr .skipCry .maybeCry - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_END jr z, .skipCry jr c, .cry jr .skipCry .cry ld a, c - cp Ch5 + cp CHAN5 jr z, .skipRewind call Audio3_GoBackOneCommandIfCry ret c @@ -336,14 +336,14 @@ Audio3_note_type: add hl, bc ld [hl], a ; store low nibble as speed ld a, c - cp Ch4 + cp CHAN4 jr z, .noiseChannel ; noise channel has 0 params call Audio3_GetNextMusicByte ld d, a ld a, c - cp Ch3 + cp CHAN3 jr z, .musicChannel3 - cp Ch7 + cp CHAN7 jr nz, .skipChannel3 ld hl, wSfxWaveInstrument jr .channel3 @@ -477,7 +477,7 @@ Audio3_tempo: cp tempo_cmd jr nz, Audio3_stereo_panning ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel call Audio3_GetNextMusicByte ld [wMusicTempo], a ; store first param @@ -520,10 +520,10 @@ Audio3_unknownmusic0xef: ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .skip - ld a, [wChannelSoundIDs + Ch8] + ld a, [wChannelSoundIDs + CHAN8] ld [wDisableChannelOutputWhenSfxEnds], a xor a - ld [wChannelSoundIDs + Ch8], a + ld [wChannelSoundIDs + CHAN8], a .skip jp Audio3_sound_ret @@ -577,7 +577,7 @@ Audio3_sfx_note: cp sfx_note_cmd jr nz, Audio3_pitch_sweep ld a, c - cp Ch4 ; is this a noise or sfx channel? + cp CHAN4 ; is this a noise or sfx channel? jr c, Audio3_pitch_sweep ; no ld b, 0 ld hl, wChannelFlags2 @@ -607,7 +607,7 @@ Audio3_sfx_note: call Audio3_GetNextMusicByte ld e, a ld a, c - cp Ch8 + cp CHAN8 ld a, 0 jr z, .skip ; Channels 1 through 3 have 2 registers that control frequency, but the noise @@ -627,7 +627,7 @@ Audio3_sfx_note: Audio3_pitch_sweep: ld a, c - cp Ch5 + cp CHAN5 jr c, Audio3_note ; if not a sfx ld a, d cp pitch_sweep_cmd @@ -643,7 +643,7 @@ Audio3_pitch_sweep: Audio3_note: ld a, c - cp Ch4 + cp CHAN4 jr nz, Audio3_note_length ; if not noise channel ld a, d and $f0 @@ -701,7 +701,7 @@ Audio3_note_length: ld l, b call Audio3_MultiplyAdd ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ld a, [wMusicTempo] ld d, a @@ -711,7 +711,7 @@ Audio3_note_length: .sfxChannel ld d, $1 ld e, $0 - cp Ch8 + cp CHAN8 jr z, .skip ; if noise channel call Audio3_SetSfxTempo ld a, [wSfxTempo] @@ -751,10 +751,10 @@ Audio3_note_pitch: cp rest_cmd jr nz, .notRest ld a, c - cp Ch5 + cp CHAN5 jr nc, .next ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -762,9 +762,9 @@ Audio3_note_pitch: ; fall through .next ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 .channel3 ld b, 0 @@ -800,10 +800,10 @@ Audio3_note_pitch: .skipPitchSlide push de ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld d, 0 ld e, a add hl, de @@ -848,12 +848,12 @@ Audio3_EnableChannelOutput: or [hl] ; set this channel's bits ld d, a ld a, c - cp Ch8 + cp CHAN8 jr z, .noiseChannelOrNoSfx - cp Ch5 + cp CHAN5 jr nc, .skip ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -883,9 +883,9 @@ Audio3_ApplyDutyCycleAndSoundLength: add hl, bc ld d, [hl] ld a, c - cp Ch3 + cp CHAN3 jr z, .skipDuty ; if music channel 3 - cp Ch7 + cp CHAN7 jr z, .skipDuty ; if sfx channel 3 ; include duty cycle (except on channel 3 which doesn't have it) ld a, d @@ -904,15 +904,15 @@ Audio3_ApplyDutyCycleAndSoundLength: Audio3_ApplyWavePatternAndFrequency: ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 ; fall through .channel3 push de ld de, wMusicWaveInstrument - cp Ch3 + cp CHAN3 jr z, .next ld de, wSfxWaveInstrument .next @@ -1016,7 +1016,7 @@ Audio3_GoBackOneCommandIfCry: Audio3_IsCry: ; Returns whether the currently playing audio is a cry in carry. - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .next jr .no @@ -1453,7 +1453,7 @@ Audio3_PlaySound:: and a jr z, .playChannel ld a, e - cp Ch8 + cp CHAN8 jr nz, .notNoiseChannel ld a, [wSoundID] cp NOISE_INSTRUMENTS_END @@ -1552,7 +1552,7 @@ Audio3_PlaySound:: add hl, de ld [hl], a ld a, e - cp Ch5 + cp CHAN5 jr nz, .skipSweepDisable ld a, $8 ldh [rNR10], a ; sweep off @@ -1654,7 +1654,7 @@ Audio3_PlaySound:: ld a, [wSoundID] ld [hl], a pop af - cp Ch4 + cp CHAN4 jr c, .skipSettingFlag ld hl, wChannelFlags1 add hl, bc @@ -1686,12 +1686,12 @@ Audio3_PlaySound:: jr c, .cry jr .done .cry - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wChannelCommandPointers + Ch7 * 2 ; sfx wave channel pointer + ld hl, wChannelCommandPointers + CHAN7 * 2 ; sfx wave channel pointer ld de, Audio3_CryRet ld [hl], e inc hl diff --git a/audio/headers/musicheaders1.asm b/audio/headers/musicheaders1.asm index ef85eae65..fb3876713 100644 --- a/audio/headers/musicheaders1.asm +++ b/audio/headers/musicheaders1.asm @@ -1,66 +1,135 @@ Music_PalletTown:: - audio_header Music_PalletTown, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_PalletTown_Ch1 + channel 2, Music_PalletTown_Ch2 + channel 3, Music_PalletTown_Ch3 Music_Pokecenter:: - audio_header Music_Pokecenter, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Pokecenter_Ch1 + channel 2, Music_Pokecenter_Ch2 + channel 3, Music_Pokecenter_Ch3 Music_Gym:: - audio_header Music_Gym, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Gym_Ch1 + channel 2, Music_Gym_Ch2 + channel 3, Music_Gym_Ch3 ; Viridian City, Pewter City, Saffron City Music_Cities1:: - audio_header Music_Cities1, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Cities1_Ch1 + channel 2, Music_Cities1_Ch2 + channel 3, Music_Cities1_Ch3 + channel 4, Music_Cities1_Ch4 ; Cerulean City, Fuchsia City Music_Cities2:: - audio_header Music_Cities2, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Cities2_Ch1 + channel 2, Music_Cities2_Ch2 + channel 3, Music_Cities2_Ch3 Music_Celadon:: - audio_header Music_Celadon, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Celadon_Ch1 + channel 2, Music_Celadon_Ch2 + channel 3, Music_Celadon_Ch3 Music_Cinnabar:: - audio_header Music_Cinnabar, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Cinnabar_Ch1 + channel 2, Music_Cinnabar_Ch2 + channel 3, Music_Cinnabar_Ch3 Music_Vermilion:: - audio_header Music_Vermilion, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Vermilion_Ch1 + channel 2, Music_Vermilion_Ch2 + channel 3, Music_Vermilion_Ch3 + channel 4, Music_Vermilion_Ch4 Music_Lavender:: - audio_header Music_Lavender, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Lavender_Ch1 + channel 2, Music_Lavender_Ch2 + channel 3, Music_Lavender_Ch3 + channel 4, Music_Lavender_Ch4 Music_SSAnne:: - audio_header Music_SSAnne, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_SSAnne_Ch1 + channel 2, Music_SSAnne_Ch2 + channel 3, Music_SSAnne_Ch3 Music_MeetProfOak:: - audio_header Music_MeetProfOak, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetProfOak_Ch1 + channel 2, Music_MeetProfOak_Ch2 + channel 3, Music_MeetProfOak_Ch3 Music_MeetRival:: - audio_header Music_MeetRival, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetRival_Ch1 + channel 2, Music_MeetRival_Ch2 + channel 3, Music_MeetRival_Ch3 Music_MuseumGuy:: - audio_header Music_MuseumGuy, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_MuseumGuy_Ch1 + channel 2, Music_MuseumGuy_Ch2 + channel 3, Music_MuseumGuy_Ch3 + channel 4, Music_MuseumGuy_Ch4 Music_SafariZone:: - audio_header Music_SafariZone, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_SafariZone_Ch1 + channel 2, Music_SafariZone_Ch2 + channel 3, Music_SafariZone_Ch3 Music_PkmnHealed:: - audio_header Music_PkmnHealed, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_PkmnHealed_Ch1 + channel 2, Music_PkmnHealed_Ch2 + channel 3, Music_PkmnHealed_Ch3 ; Routes 1 and 2 Music_Routes1:: - audio_header Music_Routes1, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Routes1_Ch1 + channel 2, Music_Routes1_Ch2 + channel 3, Music_Routes1_Ch3 + channel 4, Music_Routes1_Ch4 ; Routes 24 and 25 Music_Routes2:: - audio_header Music_Routes2, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Routes2_Ch1 + channel 2, Music_Routes2_Ch2 + channel 3, Music_Routes2_Ch3 + channel 4, Music_Routes2_Ch4 ; Routes 3, 4, 5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 20, 21, 22 Music_Routes3:: - audio_header Music_Routes3, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Routes3_Ch1 + channel 2, Music_Routes3_Ch2 + channel 3, Music_Routes3_Ch3 + channel 4, Music_Routes3_Ch4 ; Routes 11, 12, 13, 14, 15 Music_Routes4:: - audio_header Music_Routes4, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Routes4_Ch1 + channel 2, Music_Routes4_Ch2 + channel 3, Music_Routes4_Ch3 + channel 4, Music_Routes4_Ch4 ; Route 23, Indigo Plateau Music_IndigoPlateau:: - audio_header Music_IndigoPlateau, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_IndigoPlateau_Ch1 + channel 2, Music_IndigoPlateau_Ch2 + channel 3, Music_IndigoPlateau_Ch3 + channel 4, Music_IndigoPlateau_Ch4 diff --git a/audio/headers/musicheaders2.asm b/audio/headers/musicheaders2.asm index d6cca9a9a..c24c08d6d 100644 --- a/audio/headers/musicheaders2.asm +++ b/audio/headers/musicheaders2.asm @@ -1,20 +1,41 @@ Music_GymLeaderBattle:: - audio_header Music_GymLeaderBattle, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_GymLeaderBattle_Ch1 + channel 2, Music_GymLeaderBattle_Ch2 + channel 3, Music_GymLeaderBattle_Ch3 Music_TrainerBattle:: - audio_header Music_TrainerBattle, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_TrainerBattle_Ch1 + channel 2, Music_TrainerBattle_Ch2 + channel 3, Music_TrainerBattle_Ch3 Music_WildBattle:: - audio_header Music_WildBattle, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_WildBattle_Ch1 + channel 2, Music_WildBattle_Ch2 + channel 3, Music_WildBattle_Ch3 Music_FinalBattle:: - audio_header Music_FinalBattle, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_FinalBattle_Ch1 + channel 2, Music_FinalBattle_Ch2 + channel 3, Music_FinalBattle_Ch3 Music_DefeatedTrainer:: - audio_header Music_DefeatedTrainer, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_DefeatedTrainer_Ch1 + channel 2, Music_DefeatedTrainer_Ch2 + channel 3, Music_DefeatedTrainer_Ch3 Music_DefeatedWildMon:: - audio_header Music_DefeatedWildMon, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_DefeatedWildMon_Ch1 + channel 2, Music_DefeatedWildMon_Ch2 + channel 3, Music_DefeatedWildMon_Ch3 Music_DefeatedGymLeader:: - audio_header Music_DefeatedGymLeader, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_DefeatedGymLeader_Ch1 + channel 2, Music_DefeatedGymLeader_Ch2 + channel 3, Music_DefeatedGymLeader_Ch3 diff --git a/audio/headers/musicheaders3.asm b/audio/headers/musicheaders3.asm index ca21b419c..82699f8e7 100644 --- a/audio/headers/musicheaders3.asm +++ b/audio/headers/musicheaders3.asm @@ -1,56 +1,116 @@ Music_TitleScreen:: - audio_header Music_TitleScreen, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_TitleScreen_Ch1 + channel 2, Music_TitleScreen_Ch2 + channel 3, Music_TitleScreen_Ch3 + channel 4, Music_TitleScreen_Ch4 Music_Credits:: - audio_header Music_Credits, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Credits_Ch1 + channel 2, Music_Credits_Ch2 + channel 3, Music_Credits_Ch3 Music_HallOfFame:: - audio_header Music_HallOfFame, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_HallOfFame_Ch1 + channel 2, Music_HallOfFame_Ch2 + channel 3, Music_HallOfFame_Ch3 Music_OaksLab:: - audio_header Music_OaksLab, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_OaksLab_Ch1 + channel 2, Music_OaksLab_Ch2 + channel 3, Music_OaksLab_Ch3 Music_JigglypuffSong:: - audio_header Music_JigglypuffSong, Ch1, Ch2 + channel_count 2 + channel 1, Music_JigglypuffSong_Ch1 + channel 2, Music_JigglypuffSong_Ch2 Music_BikeRiding:: - audio_header Music_BikeRiding, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_BikeRiding_Ch1 + channel 2, Music_BikeRiding_Ch2 + channel 3, Music_BikeRiding_Ch3 + channel 4, Music_BikeRiding_Ch4 Music_Surfing:: - audio_header Music_Surfing, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Surfing_Ch1 + channel 2, Music_Surfing_Ch2 + channel 3, Music_Surfing_Ch3 Music_GameCorner:: - audio_header Music_GameCorner, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_GameCorner_Ch1 + channel 2, Music_GameCorner_Ch2 + channel 3, Music_GameCorner_Ch3 Music_IntroBattle:: - audio_header Music_IntroBattle, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_IntroBattle_Ch1 + channel 2, Music_IntroBattle_Ch2 + channel 3, Music_IntroBattle_Ch3 + channel 4, Music_IntroBattle_Ch4 ; Power Plant, Cerulean Cave, Rocket HQ Music_Dungeon1:: - audio_header Music_Dungeon1, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Dungeon1_Ch1 + channel 2, Music_Dungeon1_Ch2 + channel 3, Music_Dungeon1_Ch3 + channel 4, Music_Dungeon1_Ch4 ; Viridian Forest, Seafoam Islands Music_Dungeon2:: - audio_header Music_Dungeon2, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Dungeon2_Ch1 + channel 2, Music_Dungeon2_Ch2 + channel 3, Music_Dungeon2_Ch3 + channel 4, Music_Dungeon2_Ch4 ; Mt. Moon, Rock Tunnel, Victory Road Music_Dungeon3:: - audio_header Music_Dungeon3, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Dungeon3_Ch1 + channel 2, Music_Dungeon3_Ch2 + channel 3, Music_Dungeon3_Ch3 + channel 4, Music_Dungeon3_Ch4 Music_CinnabarMansion:: - audio_header Music_CinnabarMansion, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_CinnabarMansion_Ch1 + channel 2, Music_CinnabarMansion_Ch2 + channel 3, Music_CinnabarMansion_Ch3 + channel 4, Music_CinnabarMansion_Ch4 Music_PokemonTower:: - audio_header Music_PokemonTower, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_PokemonTower_Ch1 + channel 2, Music_PokemonTower_Ch2 + channel 3, Music_PokemonTower_Ch3 Music_SilphCo:: - audio_header Music_SilphCo, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_SilphCo_Ch1 + channel 2, Music_SilphCo_Ch2 + channel 3, Music_SilphCo_Ch3 Music_MeetEvilTrainer:: - audio_header Music_MeetEvilTrainer, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetEvilTrainer_Ch1 + channel 2, Music_MeetEvilTrainer_Ch2 + channel 3, Music_MeetEvilTrainer_Ch3 Music_MeetFemaleTrainer:: - audio_header Music_MeetFemaleTrainer, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetFemaleTrainer_Ch1 + channel 2, Music_MeetFemaleTrainer_Ch2 + channel 3, Music_MeetFemaleTrainer_Ch3 Music_MeetMaleTrainer:: - audio_header Music_MeetMaleTrainer, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetMaleTrainer_Ch1 + channel 2, Music_MeetMaleTrainer_Ch2 + channel 3, Music_MeetMaleTrainer_Ch3 diff --git a/audio/headers/sfxheaders1.asm b/audio/headers/sfxheaders1.asm index 2d5eca4af..297b7582c 100644 --- a/audio/headers/sfxheaders1.asm +++ b/audio/headers/sfxheaders1.asm @@ -2,287 +2,472 @@ SFX_Headers_1:: db $ff, $ff, $ff ; padding SFX_Noise_Instrument01_1:: - audio_header SFX_Noise_Instrument01_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument01_1_Ch8 SFX_Noise_Instrument02_1:: - audio_header SFX_Noise_Instrument02_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument02_1_Ch8 SFX_Noise_Instrument03_1:: - audio_header SFX_Noise_Instrument03_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument03_1_Ch8 SFX_Noise_Instrument04_1:: - audio_header SFX_Noise_Instrument04_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument04_1_Ch8 SFX_Noise_Instrument05_1:: - audio_header SFX_Noise_Instrument05_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument05_1_Ch8 SFX_Noise_Instrument06_1:: - audio_header SFX_Noise_Instrument06_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument06_1_Ch8 SFX_Noise_Instrument07_1:: - audio_header SFX_Noise_Instrument07_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument07_1_Ch8 SFX_Noise_Instrument08_1:: - audio_header SFX_Noise_Instrument08_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument08_1_Ch8 SFX_Noise_Instrument09_1:: - audio_header SFX_Noise_Instrument09_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument09_1_Ch8 SFX_Noise_Instrument10_1:: - audio_header SFX_Noise_Instrument10_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument10_1_Ch8 SFX_Noise_Instrument11_1:: - audio_header SFX_Noise_Instrument11_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument11_1_Ch8 SFX_Noise_Instrument12_1:: - audio_header SFX_Noise_Instrument12_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument12_1_Ch8 SFX_Noise_Instrument13_1:: - audio_header SFX_Noise_Instrument13_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument13_1_Ch8 SFX_Noise_Instrument14_1:: - audio_header SFX_Noise_Instrument14_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument14_1_Ch8 SFX_Noise_Instrument15_1:: - audio_header SFX_Noise_Instrument15_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument15_1_Ch8 SFX_Noise_Instrument16_1:: - audio_header SFX_Noise_Instrument16_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument16_1_Ch8 SFX_Noise_Instrument17_1:: - audio_header SFX_Noise_Instrument17_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument17_1_Ch8 SFX_Noise_Instrument18_1:: - audio_header SFX_Noise_Instrument18_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument18_1_Ch8 SFX_Noise_Instrument19_1:: - audio_header SFX_Noise_Instrument19_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument19_1_Ch8 SFX_Cry00_1:: - audio_header SFX_Cry00_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry00_1_Ch5 + channel 6, SFX_Cry00_1_Ch6 + channel 8, SFX_Cry00_1_Ch8 SFX_Cry01_1:: - audio_header SFX_Cry01_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry01_1_Ch5 + channel 6, SFX_Cry01_1_Ch6 + channel 8, SFX_Cry01_1_Ch8 SFX_Cry02_1:: - audio_header SFX_Cry02_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry02_1_Ch5 + channel 6, SFX_Cry02_1_Ch6 + channel 8, SFX_Cry02_1_Ch8 SFX_Cry03_1:: - audio_header SFX_Cry03_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry03_1_Ch5 + channel 6, SFX_Cry03_1_Ch6 + channel 8, SFX_Cry03_1_Ch8 SFX_Cry04_1:: - audio_header SFX_Cry04_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry04_1_Ch5 + channel 6, SFX_Cry04_1_Ch6 + channel 8, SFX_Cry04_1_Ch8 SFX_Cry05_1:: - audio_header SFX_Cry05_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry05_1_Ch5 + channel 6, SFX_Cry05_1_Ch6 + channel 8, SFX_Cry05_1_Ch8 SFX_Cry06_1:: - audio_header SFX_Cry06_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry06_1_Ch5 + channel 6, SFX_Cry06_1_Ch6 + channel 8, SFX_Cry06_1_Ch8 SFX_Cry07_1:: - audio_header SFX_Cry07_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry07_1_Ch5 + channel 6, SFX_Cry07_1_Ch6 + channel 8, SFX_Cry07_1_Ch8 SFX_Cry08_1:: - audio_header SFX_Cry08_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry08_1_Ch5 + channel 6, SFX_Cry08_1_Ch6 + channel 8, SFX_Cry08_1_Ch8 SFX_Cry09_1:: - audio_header SFX_Cry09_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry09_1_Ch5 + channel 6, SFX_Cry09_1_Ch6 + channel 8, SFX_Cry09_1_Ch8 SFX_Cry0A_1:: - audio_header SFX_Cry0A_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0A_1_Ch5 + channel 6, SFX_Cry0A_1_Ch6 + channel 8, SFX_Cry0A_1_Ch8 SFX_Cry0B_1:: - audio_header SFX_Cry0B_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0B_1_Ch5 + channel 6, SFX_Cry0B_1_Ch6 + channel 8, SFX_Cry0B_1_Ch8 SFX_Cry0C_1:: - audio_header SFX_Cry0C_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0C_1_Ch5 + channel 6, SFX_Cry0C_1_Ch6 + channel 8, SFX_Cry0C_1_Ch8 SFX_Cry0D_1:: - audio_header SFX_Cry0D_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0D_1_Ch5 + channel 6, SFX_Cry0D_1_Ch6 + channel 8, SFX_Cry0D_1_Ch8 SFX_Cry0E_1:: - audio_header SFX_Cry0E_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0E_1_Ch5 + channel 6, SFX_Cry0E_1_Ch6 + channel 8, SFX_Cry0E_1_Ch8 SFX_Cry0F_1:: - audio_header SFX_Cry0F_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0F_1_Ch5 + channel 6, SFX_Cry0F_1_Ch6 + channel 8, SFX_Cry0F_1_Ch8 SFX_Cry10_1:: - audio_header SFX_Cry10_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry10_1_Ch5 + channel 6, SFX_Cry10_1_Ch6 + channel 8, SFX_Cry10_1_Ch8 SFX_Cry11_1:: - audio_header SFX_Cry11_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry11_1_Ch5 + channel 6, SFX_Cry11_1_Ch6 + channel 8, SFX_Cry11_1_Ch8 SFX_Cry12_1:: - audio_header SFX_Cry12_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry12_1_Ch5 + channel 6, SFX_Cry12_1_Ch6 + channel 8, SFX_Cry12_1_Ch8 SFX_Cry13_1:: - audio_header SFX_Cry13_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry13_1_Ch5 + channel 6, SFX_Cry13_1_Ch6 + channel 8, SFX_Cry13_1_Ch8 SFX_Cry14_1:: - audio_header SFX_Cry14_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry14_1_Ch5 + channel 6, SFX_Cry14_1_Ch6 + channel 8, SFX_Cry14_1_Ch8 SFX_Cry15_1:: - audio_header SFX_Cry15_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry15_1_Ch5 + channel 6, SFX_Cry15_1_Ch6 + channel 8, SFX_Cry15_1_Ch8 SFX_Cry16_1:: - audio_header SFX_Cry16_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry16_1_Ch5 + channel 6, SFX_Cry16_1_Ch6 + channel 8, SFX_Cry16_1_Ch8 SFX_Cry17_1:: - audio_header SFX_Cry17_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry17_1_Ch5 + channel 6, SFX_Cry17_1_Ch6 + channel 8, SFX_Cry17_1_Ch8 SFX_Cry18_1:: - audio_header SFX_Cry18_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry18_1_Ch5 + channel 6, SFX_Cry18_1_Ch6 + channel 8, SFX_Cry18_1_Ch8 SFX_Cry19_1:: - audio_header SFX_Cry19_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry19_1_Ch5 + channel 6, SFX_Cry19_1_Ch6 + channel 8, SFX_Cry19_1_Ch8 SFX_Cry1A_1:: - audio_header SFX_Cry1A_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1A_1_Ch5 + channel 6, SFX_Cry1A_1_Ch6 + channel 8, SFX_Cry1A_1_Ch8 SFX_Cry1B_1:: - audio_header SFX_Cry1B_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1B_1_Ch5 + channel 6, SFX_Cry1B_1_Ch6 + channel 8, SFX_Cry1B_1_Ch8 SFX_Cry1C_1:: - audio_header SFX_Cry1C_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1C_1_Ch5 + channel 6, SFX_Cry1C_1_Ch6 + channel 8, SFX_Cry1C_1_Ch8 SFX_Cry1D_1:: - audio_header SFX_Cry1D_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1D_1_Ch5 + channel 6, SFX_Cry1D_1_Ch6 + channel 8, SFX_Cry1D_1_Ch8 SFX_Cry1E_1:: - audio_header SFX_Cry1E_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1E_1_Ch5 + channel 6, SFX_Cry1E_1_Ch6 + channel 8, SFX_Cry1E_1_Ch8 SFX_Cry1F_1:: - audio_header SFX_Cry1F_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1F_1_Ch5 + channel 6, SFX_Cry1F_1_Ch6 + channel 8, SFX_Cry1F_1_Ch8 SFX_Cry20_1:: - audio_header SFX_Cry20_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry20_1_Ch5 + channel 6, SFX_Cry20_1_Ch6 + channel 8, SFX_Cry20_1_Ch8 SFX_Cry21_1:: - audio_header SFX_Cry21_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry21_1_Ch5 + channel 6, SFX_Cry21_1_Ch6 + channel 8, SFX_Cry21_1_Ch8 SFX_Cry22_1:: - audio_header SFX_Cry22_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry22_1_Ch5 + channel 6, SFX_Cry22_1_Ch6 + channel 8, SFX_Cry22_1_Ch8 SFX_Cry23_1:: - audio_header SFX_Cry23_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry23_1_Ch5 + channel 6, SFX_Cry23_1_Ch6 + channel 8, SFX_Cry23_1_Ch8 SFX_Cry24_1:: - audio_header SFX_Cry24_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry24_1_Ch5 + channel 6, SFX_Cry24_1_Ch6 + channel 8, SFX_Cry24_1_Ch8 SFX_Cry25_1:: - audio_header SFX_Cry25_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry25_1_Ch5 + channel 6, SFX_Cry25_1_Ch6 + channel 8, SFX_Cry25_1_Ch8 SFX_Get_Item1_1:: - audio_header SFX_Get_Item1_1, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item1_1_Ch5 + channel 6, SFX_Get_Item1_1_Ch6 + channel 7, SFX_Get_Item1_1_Ch7 SFX_Get_Item2_1:: - audio_header SFX_Get_Item2_1, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item2_1_Ch5 + channel 6, SFX_Get_Item2_1_Ch6 + channel 7, SFX_Get_Item2_1_Ch7 SFX_Tink_1:: - audio_header SFX_Tink_1, Ch5 + channel_count 1 + channel 5, SFX_Tink_1_Ch5 SFX_Heal_HP_1:: - audio_header SFX_Heal_HP_1, Ch5 + channel_count 1 + channel 5, SFX_Heal_HP_1_Ch5 SFX_Heal_Ailment_1:: - audio_header SFX_Heal_Ailment_1, Ch5 + channel_count 1 + channel 5, SFX_Heal_Ailment_1_Ch5 SFX_Start_Menu_1:: - audio_header SFX_Start_Menu_1, Ch8 + channel_count 1 + channel 8, SFX_Start_Menu_1_Ch8 SFX_Press_AB_1:: - audio_header SFX_Press_AB_1, Ch5 + channel_count 1 + channel 5, SFX_Press_AB_1_Ch5 SFX_Pokedex_Rating_1:: - audio_header SFX_Pokedex_Rating_1, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Pokedex_Rating_1_Ch5 + channel 6, SFX_Pokedex_Rating_1_Ch6 + channel 7, SFX_Pokedex_Rating_1_Ch7 SFX_Get_Key_Item_1:: - audio_header SFX_Get_Key_Item_1, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Key_Item_1_Ch5 + channel 6, SFX_Get_Key_Item_1_Ch6 + channel 7, SFX_Get_Key_Item_1_Ch7 SFX_Poisoned_1:: - audio_header SFX_Poisoned_1, Ch5 + channel_count 1 + channel 5, SFX_Poisoned_1_Ch5 SFX_Trade_Machine_1:: - audio_header SFX_Trade_Machine_1, Ch5 + channel_count 1 + channel 5, SFX_Trade_Machine_1_Ch5 SFX_Turn_On_PC_1:: - audio_header SFX_Turn_On_PC_1, Ch5 + channel_count 1 + channel 5, SFX_Turn_On_PC_1_Ch5 SFX_Turn_Off_PC_1:: - audio_header SFX_Turn_Off_PC_1, Ch5 + channel_count 1 + channel 5, SFX_Turn_Off_PC_1_Ch5 SFX_Enter_PC_1:: - audio_header SFX_Enter_PC_1, Ch5 + channel_count 1 + channel 5, SFX_Enter_PC_1_Ch5 SFX_Shrink_1:: - audio_header SFX_Shrink_1, Ch5 + channel_count 1 + channel 5, SFX_Shrink_1_Ch5 SFX_Switch_1:: - audio_header SFX_Switch_1, Ch5 + channel_count 1 + channel 5, SFX_Switch_1_Ch5 SFX_Healing_Machine_1:: - audio_header SFX_Healing_Machine_1, Ch5 + channel_count 1 + channel 5, SFX_Healing_Machine_1_Ch5 SFX_Teleport_Exit1_1:: - audio_header SFX_Teleport_Exit1_1, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Exit1_1_Ch5 SFX_Teleport_Enter1_1:: - audio_header SFX_Teleport_Enter1_1, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Enter1_1_Ch5 SFX_Teleport_Exit2_1:: - audio_header SFX_Teleport_Exit2_1, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Exit2_1_Ch5 SFX_Ledge_1:: - audio_header SFX_Ledge_1, Ch5 + channel_count 1 + channel 5, SFX_Ledge_1_Ch5 SFX_Teleport_Enter2_1:: - audio_header SFX_Teleport_Enter2_1, Ch8 + channel_count 1 + channel 8, SFX_Teleport_Enter2_1_Ch8 SFX_Fly_1:: - audio_header SFX_Fly_1, Ch8 + channel_count 1 + channel 8, SFX_Fly_1_Ch8 SFX_Denied_1:: - audio_header SFX_Denied_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Denied_1_Ch5 + channel 6, SFX_Denied_1_Ch6 SFX_Arrow_Tiles_1:: - audio_header SFX_Arrow_Tiles_1, Ch5 + channel_count 1 + channel 5, SFX_Arrow_Tiles_1_Ch5 SFX_Push_Boulder_1:: - audio_header SFX_Push_Boulder_1, Ch8 + channel_count 1 + channel 8, SFX_Push_Boulder_1_Ch8 SFX_SS_Anne_Horn_1:: - audio_header SFX_SS_Anne_Horn_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_SS_Anne_Horn_1_Ch5 + channel 6, SFX_SS_Anne_Horn_1_Ch6 SFX_Withdraw_Deposit_1:: - audio_header SFX_Withdraw_Deposit_1, Ch5 + channel_count 1 + channel 5, SFX_Withdraw_Deposit_1_Ch5 SFX_Cut_1:: - audio_header SFX_Cut_1, Ch8 + channel_count 1 + channel 8, SFX_Cut_1_Ch8 SFX_Go_Inside_1:: - audio_header SFX_Go_Inside_1, Ch8 + channel_count 1 + channel 8, SFX_Go_Inside_1_Ch8 SFX_Swap_1:: - audio_header SFX_Swap_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Swap_1_Ch5 + channel 6, SFX_Swap_1_Ch6 SFX_59_1:: - audio_header SFX_59_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_59_1_Ch5 + channel 6, SFX_59_1_Ch6 SFX_Purchase_1:: - audio_header SFX_Purchase_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Purchase_1_Ch5 + channel 6, SFX_Purchase_1_Ch6 SFX_Collision_1:: - audio_header SFX_Collision_1, Ch5 + channel_count 1 + channel 5, SFX_Collision_1_Ch5 SFX_Go_Outside_1:: - audio_header SFX_Go_Outside_1, Ch8 + channel_count 1 + channel 8, SFX_Go_Outside_1_Ch8 SFX_Save_1:: - audio_header SFX_Save_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Save_1_Ch5 + channel 6, SFX_Save_1_Ch6 ; the Pokeflute sound effect directly hijacks channel 3 SFX_Pokeflute:: - audio_header SFX_Pokeflute, Ch3 + channel_count 1 + channel 3, SFX_Pokeflute_Ch3 SFX_Safari_Zone_PA:: - audio_header SFX_Safari_Zone_PA, Ch5 + channel_count 1 + channel 5, SFX_Safari_Zone_PA_Ch5 diff --git a/audio/headers/sfxheaders2.asm b/audio/headers/sfxheaders2.asm index 912d137e3..1ccbf2655 100644 --- a/audio/headers/sfxheaders2.asm +++ b/audio/headers/sfxheaders2.asm @@ -2,358 +2,591 @@ SFX_Headers_2:: db $ff, $ff, $ff ; padding SFX_Noise_Instrument01_2:: - audio_header SFX_Noise_Instrument01_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument01_2_Ch8 SFX_Noise_Instrument02_2:: - audio_header SFX_Noise_Instrument02_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument02_2_Ch8 SFX_Noise_Instrument03_2:: - audio_header SFX_Noise_Instrument03_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument03_2_Ch8 SFX_Noise_Instrument04_2:: - audio_header SFX_Noise_Instrument04_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument04_2_Ch8 SFX_Noise_Instrument05_2:: - audio_header SFX_Noise_Instrument05_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument05_2_Ch8 SFX_Noise_Instrument06_2:: - audio_header SFX_Noise_Instrument06_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument06_2_Ch8 SFX_Noise_Instrument07_2:: - audio_header SFX_Noise_Instrument07_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument07_2_Ch8 SFX_Noise_Instrument08_2:: - audio_header SFX_Noise_Instrument08_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument08_2_Ch8 SFX_Noise_Instrument09_2:: - audio_header SFX_Noise_Instrument09_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument09_2_Ch8 SFX_Noise_Instrument10_2:: - audio_header SFX_Noise_Instrument10_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument10_2_Ch8 SFX_Noise_Instrument11_2:: - audio_header SFX_Noise_Instrument11_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument11_2_Ch8 SFX_Noise_Instrument12_2:: - audio_header SFX_Noise_Instrument12_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument12_2_Ch8 SFX_Noise_Instrument13_2:: - audio_header SFX_Noise_Instrument13_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument13_2_Ch8 SFX_Noise_Instrument14_2:: - audio_header SFX_Noise_Instrument14_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument14_2_Ch8 SFX_Noise_Instrument15_2:: - audio_header SFX_Noise_Instrument15_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument15_2_Ch8 SFX_Noise_Instrument16_2:: - audio_header SFX_Noise_Instrument16_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument16_2_Ch8 SFX_Noise_Instrument17_2:: - audio_header SFX_Noise_Instrument17_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument17_2_Ch8 SFX_Noise_Instrument18_2:: - audio_header SFX_Noise_Instrument18_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument18_2_Ch8 SFX_Noise_Instrument19_2:: - audio_header SFX_Noise_Instrument19_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument19_2_Ch8 SFX_Cry00_2:: - audio_header SFX_Cry00_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry00_2_Ch5 + channel 6, SFX_Cry00_2_Ch6 + channel 8, SFX_Cry00_2_Ch8 SFX_Cry01_2:: - audio_header SFX_Cry01_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry01_2_Ch5 + channel 6, SFX_Cry01_2_Ch6 + channel 8, SFX_Cry01_2_Ch8 SFX_Cry02_2:: - audio_header SFX_Cry02_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry02_2_Ch5 + channel 6, SFX_Cry02_2_Ch6 + channel 8, SFX_Cry02_2_Ch8 SFX_Cry03_2:: - audio_header SFX_Cry03_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry03_2_Ch5 + channel 6, SFX_Cry03_2_Ch6 + channel 8, SFX_Cry03_2_Ch8 SFX_Cry04_2:: - audio_header SFX_Cry04_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry04_2_Ch5 + channel 6, SFX_Cry04_2_Ch6 + channel 8, SFX_Cry04_2_Ch8 SFX_Cry05_2:: - audio_header SFX_Cry05_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry05_2_Ch5 + channel 6, SFX_Cry05_2_Ch6 + channel 8, SFX_Cry05_2_Ch8 SFX_Cry06_2:: - audio_header SFX_Cry06_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry06_2_Ch5 + channel 6, SFX_Cry06_2_Ch6 + channel 8, SFX_Cry06_2_Ch8 SFX_Cry07_2:: - audio_header SFX_Cry07_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry07_2_Ch5 + channel 6, SFX_Cry07_2_Ch6 + channel 8, SFX_Cry07_2_Ch8 SFX_Cry08_2:: - audio_header SFX_Cry08_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry08_2_Ch5 + channel 6, SFX_Cry08_2_Ch6 + channel 8, SFX_Cry08_2_Ch8 SFX_Cry09_2:: - audio_header SFX_Cry09_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry09_2_Ch5 + channel 6, SFX_Cry09_2_Ch6 + channel 8, SFX_Cry09_2_Ch8 SFX_Cry0A_2:: - audio_header SFX_Cry0A_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0A_2_Ch5 + channel 6, SFX_Cry0A_2_Ch6 + channel 8, SFX_Cry0A_2_Ch8 SFX_Cry0B_2:: - audio_header SFX_Cry0B_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0B_2_Ch5 + channel 6, SFX_Cry0B_2_Ch6 + channel 8, SFX_Cry0B_2_Ch8 SFX_Cry0C_2:: - audio_header SFX_Cry0C_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0C_2_Ch5 + channel 6, SFX_Cry0C_2_Ch6 + channel 8, SFX_Cry0C_2_Ch8 SFX_Cry0D_2:: - audio_header SFX_Cry0D_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0D_2_Ch5 + channel 6, SFX_Cry0D_2_Ch6 + channel 8, SFX_Cry0D_2_Ch8 SFX_Cry0E_2:: - audio_header SFX_Cry0E_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0E_2_Ch5 + channel 6, SFX_Cry0E_2_Ch6 + channel 8, SFX_Cry0E_2_Ch8 SFX_Cry0F_2:: - audio_header SFX_Cry0F_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0F_2_Ch5 + channel 6, SFX_Cry0F_2_Ch6 + channel 8, SFX_Cry0F_2_Ch8 SFX_Cry10_2:: - audio_header SFX_Cry10_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry10_2_Ch5 + channel 6, SFX_Cry10_2_Ch6 + channel 8, SFX_Cry10_2_Ch8 SFX_Cry11_2:: - audio_header SFX_Cry11_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry11_2_Ch5 + channel 6, SFX_Cry11_2_Ch6 + channel 8, SFX_Cry11_2_Ch8 SFX_Cry12_2:: - audio_header SFX_Cry12_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry12_2_Ch5 + channel 6, SFX_Cry12_2_Ch6 + channel 8, SFX_Cry12_2_Ch8 SFX_Cry13_2:: - audio_header SFX_Cry13_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry13_2_Ch5 + channel 6, SFX_Cry13_2_Ch6 + channel 8, SFX_Cry13_2_Ch8 SFX_Cry14_2:: - audio_header SFX_Cry14_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry14_2_Ch5 + channel 6, SFX_Cry14_2_Ch6 + channel 8, SFX_Cry14_2_Ch8 SFX_Cry15_2:: - audio_header SFX_Cry15_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry15_2_Ch5 + channel 6, SFX_Cry15_2_Ch6 + channel 8, SFX_Cry15_2_Ch8 SFX_Cry16_2:: - audio_header SFX_Cry16_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry16_2_Ch5 + channel 6, SFX_Cry16_2_Ch6 + channel 8, SFX_Cry16_2_Ch8 SFX_Cry17_2:: - audio_header SFX_Cry17_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry17_2_Ch5 + channel 6, SFX_Cry17_2_Ch6 + channel 8, SFX_Cry17_2_Ch8 SFX_Cry18_2:: - audio_header SFX_Cry18_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry18_2_Ch5 + channel 6, SFX_Cry18_2_Ch6 + channel 8, SFX_Cry18_2_Ch8 SFX_Cry19_2:: - audio_header SFX_Cry19_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry19_2_Ch5 + channel 6, SFX_Cry19_2_Ch6 + channel 8, SFX_Cry19_2_Ch8 SFX_Cry1A_2:: - audio_header SFX_Cry1A_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1A_2_Ch5 + channel 6, SFX_Cry1A_2_Ch6 + channel 8, SFX_Cry1A_2_Ch8 SFX_Cry1B_2:: - audio_header SFX_Cry1B_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1B_2_Ch5 + channel 6, SFX_Cry1B_2_Ch6 + channel 8, SFX_Cry1B_2_Ch8 SFX_Cry1C_2:: - audio_header SFX_Cry1C_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1C_2_Ch5 + channel 6, SFX_Cry1C_2_Ch6 + channel 8, SFX_Cry1C_2_Ch8 SFX_Cry1D_2:: - audio_header SFX_Cry1D_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1D_2_Ch5 + channel 6, SFX_Cry1D_2_Ch6 + channel 8, SFX_Cry1D_2_Ch8 SFX_Cry1E_2:: - audio_header SFX_Cry1E_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1E_2_Ch5 + channel 6, SFX_Cry1E_2_Ch6 + channel 8, SFX_Cry1E_2_Ch8 SFX_Cry1F_2:: - audio_header SFX_Cry1F_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1F_2_Ch5 + channel 6, SFX_Cry1F_2_Ch6 + channel 8, SFX_Cry1F_2_Ch8 SFX_Cry20_2:: - audio_header SFX_Cry20_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry20_2_Ch5 + channel 6, SFX_Cry20_2_Ch6 + channel 8, SFX_Cry20_2_Ch8 SFX_Cry21_2:: - audio_header SFX_Cry21_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry21_2_Ch5 + channel 6, SFX_Cry21_2_Ch6 + channel 8, SFX_Cry21_2_Ch8 SFX_Cry22_2:: - audio_header SFX_Cry22_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry22_2_Ch5 + channel 6, SFX_Cry22_2_Ch6 + channel 8, SFX_Cry22_2_Ch8 SFX_Cry23_2:: - audio_header SFX_Cry23_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry23_2_Ch5 + channel 6, SFX_Cry23_2_Ch6 + channel 8, SFX_Cry23_2_Ch8 SFX_Cry24_2:: - audio_header SFX_Cry24_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry24_2_Ch5 + channel 6, SFX_Cry24_2_Ch6 + channel 8, SFX_Cry24_2_Ch8 SFX_Cry25_2:: - audio_header SFX_Cry25_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry25_2_Ch5 + channel 6, SFX_Cry25_2_Ch6 + channel 8, SFX_Cry25_2_Ch8 SFX_Level_Up:: - audio_header SFX_Level_Up, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Level_Up_Ch5 + channel 6, SFX_Level_Up_Ch6 + channel 7, SFX_Level_Up_Ch7 SFX_Get_Item2_2:: - audio_header SFX_Get_Item2_2, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item2_2_Ch5 + channel 6, SFX_Get_Item2_2_Ch6 + channel 7, SFX_Get_Item2_2_Ch7 SFX_Tink_2:: - audio_header SFX_Tink_2, Ch5 + channel_count 1 + channel 5, SFX_Tink_2_Ch5 SFX_Heal_HP_2:: - audio_header SFX_Heal_HP_2, Ch5 + channel_count 1 + channel 5, SFX_Heal_HP_2_Ch5 SFX_Heal_Ailment_2:: - audio_header SFX_Heal_Ailment_2, Ch5 + channel_count 1 + channel 5, SFX_Heal_Ailment_2_Ch5 SFX_Start_Menu_2:: - audio_header SFX_Start_Menu_2, Ch8 + channel_count 1 + channel 8, SFX_Start_Menu_2_Ch8 SFX_Press_AB_2:: - audio_header SFX_Press_AB_2, Ch5 + channel_count 1 + channel 5, SFX_Press_AB_2_Ch5 SFX_Ball_Toss:: - audio_header SFX_Ball_Toss, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Ball_Toss_Ch5 + channel 6, SFX_Ball_Toss_Ch6 SFX_Ball_Poof:: - audio_header SFX_Ball_Poof, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Ball_Poof_Ch5 + channel 8, SFX_Ball_Poof_Ch8 SFX_Faint_Thud:: - audio_header SFX_Faint_Thud, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Faint_Thud_Ch5 + channel 8, SFX_Faint_Thud_Ch8 SFX_Run:: - audio_header SFX_Run, Ch8 + channel_count 1 + channel 8, SFX_Run_Ch8 SFX_Dex_Page_Added:: - audio_header SFX_Dex_Page_Added, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Dex_Page_Added_Ch5 + channel 6, SFX_Dex_Page_Added_Ch6 SFX_Caught_Mon:: - audio_header SFX_Caught_Mon, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Caught_Mon_Ch5 + channel 6, SFX_Caught_Mon_Ch6 + channel 7, SFX_Caught_Mon_Ch7 SFX_Peck:: - audio_header SFX_Peck, Ch8 + channel_count 1 + channel 8, SFX_Peck_Ch8 SFX_Faint_Fall:: - audio_header SFX_Faint_Fall, Ch5 + channel_count 1 + channel 5, SFX_Faint_Fall_Ch5 SFX_Battle_09:: - audio_header SFX_Battle_09, Ch5 + channel_count 1 + channel 5, SFX_Battle_09_Ch5 SFX_Pound:: - audio_header SFX_Pound, Ch8 + channel_count 1 + channel 8, SFX_Pound_Ch8 SFX_Battle_0B:: - audio_header SFX_Battle_0B, Ch8 + channel_count 1 + channel 8, SFX_Battle_0B_Ch8 SFX_Battle_0C:: - audio_header SFX_Battle_0C, Ch8 + channel_count 1 + channel 8, SFX_Battle_0C_Ch8 SFX_Battle_0D:: - audio_header SFX_Battle_0D, Ch8 + channel_count 1 + channel 8, SFX_Battle_0D_Ch8 SFX_Battle_0E:: - audio_header SFX_Battle_0E, Ch8 + channel_count 1 + channel 8, SFX_Battle_0E_Ch8 SFX_Battle_0F:: - audio_header SFX_Battle_0F, Ch8 + channel_count 1 + channel 8, SFX_Battle_0F_Ch8 SFX_Damage:: - audio_header SFX_Damage, Ch8 + channel_count 1 + channel 8, SFX_Damage_Ch8 SFX_Not_Very_Effective:: - audio_header SFX_Not_Very_Effective, Ch8 + channel_count 1 + channel 8, SFX_Not_Very_Effective_Ch8 SFX_Battle_12:: - audio_header SFX_Battle_12, Ch8 + channel_count 1 + channel 8, SFX_Battle_12_Ch8 SFX_Battle_13:: - audio_header SFX_Battle_13, Ch8 + channel_count 1 + channel 8, SFX_Battle_13_Ch8 SFX_Battle_14:: - audio_header SFX_Battle_14, Ch8 + channel_count 1 + channel 8, SFX_Battle_14_Ch8 SFX_Vine_Whip:: - audio_header SFX_Vine_Whip, Ch8 + channel_count 1 + channel 8, SFX_Vine_Whip_Ch8 SFX_Battle_16:: - audio_header SFX_Battle_16, Ch8 + channel_count 1 + channel 8, SFX_Battle_16_Ch8 SFX_Battle_17:: - audio_header SFX_Battle_17, Ch8 + channel_count 1 + channel 8, SFX_Battle_17_Ch8 SFX_Battle_18:: - audio_header SFX_Battle_18, Ch8 + channel_count 1 + channel 8, SFX_Battle_18_Ch8 SFX_Battle_19:: - audio_header SFX_Battle_19, Ch8 + channel_count 1 + channel 8, SFX_Battle_19_Ch8 SFX_Super_Effective:: - audio_header SFX_Super_Effective, Ch8 + channel_count 1 + channel 8, SFX_Super_Effective_Ch8 SFX_Battle_1B:: - audio_header SFX_Battle_1B, Ch8 + channel_count 1 + channel 8, SFX_Battle_1B_Ch8 SFX_Battle_1C:: - audio_header SFX_Battle_1C, Ch8 + channel_count 1 + channel 8, SFX_Battle_1C_Ch8 SFX_Doubleslap:: - audio_header SFX_Doubleslap, Ch8 + channel_count 1 + channel 8, SFX_Doubleslap_Ch8 SFX_Battle_1E:: - audio_header SFX_Battle_1E, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Battle_1E_Ch5 + channel 8, SFX_Battle_1E_Ch8 SFX_Horn_Drill:: - audio_header SFX_Horn_Drill, Ch8 + channel_count 1 + channel 8, SFX_Horn_Drill_Ch8 SFX_Battle_20:: - audio_header SFX_Battle_20, Ch8 + channel_count 1 + channel 8, SFX_Battle_20_Ch8 SFX_Battle_21:: - audio_header SFX_Battle_21, Ch8 + channel_count 1 + channel 8, SFX_Battle_21_Ch8 SFX_Battle_22:: - audio_header SFX_Battle_22, Ch8 + channel_count 1 + channel 8, SFX_Battle_22_Ch8 SFX_Battle_23:: - audio_header SFX_Battle_23, Ch8 + channel_count 1 + channel 8, SFX_Battle_23_Ch8 SFX_Battle_24:: - audio_header SFX_Battle_24, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Battle_24_Ch5 + channel 8, SFX_Battle_24_Ch8 SFX_Battle_25:: - audio_header SFX_Battle_25, Ch8 + channel_count 1 + channel 8, SFX_Battle_25_Ch8 SFX_Battle_26:: - audio_header SFX_Battle_26, Ch8 + channel_count 1 + channel 8, SFX_Battle_26_Ch8 SFX_Battle_27:: - audio_header SFX_Battle_27, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_27_Ch5 + channel 6, SFX_Battle_27_Ch6 + channel 8, SFX_Battle_27_Ch8 SFX_Battle_28:: - audio_header SFX_Battle_28, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_28_Ch5 + channel 6, SFX_Battle_28_Ch6 + channel 8, SFX_Battle_28_Ch8 SFX_Battle_29:: - audio_header SFX_Battle_29, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Battle_29_Ch5 + channel 8, SFX_Battle_29_Ch8 SFX_Battle_2A:: - audio_header SFX_Battle_2A, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_2A_Ch5 + channel 6, SFX_Battle_2A_Ch6 + channel 8, SFX_Battle_2A_Ch8 SFX_Battle_2B:: - audio_header SFX_Battle_2B, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Battle_2B_Ch5 + channel 8, SFX_Battle_2B_Ch8 SFX_Battle_2C:: - audio_header SFX_Battle_2C, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_2C_Ch5 + channel 6, SFX_Battle_2C_Ch6 + channel 8, SFX_Battle_2C_Ch8 SFX_Psybeam:: - audio_header SFX_Psybeam, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Psybeam_Ch5 + channel 6, SFX_Psybeam_Ch6 + channel 8, SFX_Psybeam_Ch8 SFX_Battle_2E:: - audio_header SFX_Battle_2E, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_2E_Ch5 + channel 6, SFX_Battle_2E_Ch6 + channel 8, SFX_Battle_2E_Ch8 SFX_Battle_2F:: - audio_header SFX_Battle_2F, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_2F_Ch5 + channel 6, SFX_Battle_2F_Ch6 + channel 8, SFX_Battle_2F_Ch8 SFX_Psychic_M:: - audio_header SFX_Psychic_M, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Psychic_M_Ch5 + channel 6, SFX_Psychic_M_Ch6 + channel 8, SFX_Psychic_M_Ch8 SFX_Battle_31:: - audio_header SFX_Battle_31, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Battle_31_Ch5 + channel 6, SFX_Battle_31_Ch6 SFX_Battle_32:: - audio_header SFX_Battle_32, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Battle_32_Ch5 + channel 6, SFX_Battle_32_Ch6 SFX_Battle_33:: - audio_header SFX_Battle_33, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Battle_33_Ch5 + channel 6, SFX_Battle_33_Ch6 SFX_Battle_34:: - audio_header SFX_Battle_34, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_34_Ch5 + channel 6, SFX_Battle_34_Ch6 + channel 8, SFX_Battle_34_Ch8 SFX_Battle_35:: - audio_header SFX_Battle_35, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Battle_35_Ch5 + channel 6, SFX_Battle_35_Ch6 SFX_Battle_36:: - audio_header SFX_Battle_36, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_36_Ch5 + channel 6, SFX_Battle_36_Ch6 + channel 8, SFX_Battle_36_Ch8 SFX_Silph_Scope:: - audio_header SFX_Silph_Scope, Ch5 + channel_count 1 + channel 5, SFX_Silph_Scope_Ch5 diff --git a/audio/headers/sfxheaders3.asm b/audio/headers/sfxheaders3.asm index 2732767f5..bc6451a7d 100644 --- a/audio/headers/sfxheaders3.asm +++ b/audio/headers/sfxheaders3.asm @@ -2,310 +2,504 @@ SFX_Headers_3:: db $ff, $ff, $ff ; padding SFX_Noise_Instrument01_3:: - audio_header SFX_Noise_Instrument01_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument01_3_Ch8 SFX_Noise_Instrument02_3:: - audio_header SFX_Noise_Instrument02_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument02_3_Ch8 SFX_Noise_Instrument03_3:: - audio_header SFX_Noise_Instrument03_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument03_3_Ch8 SFX_Noise_Instrument04_3:: - audio_header SFX_Noise_Instrument04_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument04_3_Ch8 SFX_Noise_Instrument05_3:: - audio_header SFX_Noise_Instrument05_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument05_3_Ch8 SFX_Noise_Instrument06_3:: - audio_header SFX_Noise_Instrument06_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument06_3_Ch8 SFX_Noise_Instrument07_3:: - audio_header SFX_Noise_Instrument07_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument07_3_Ch8 SFX_Noise_Instrument08_3:: - audio_header SFX_Noise_Instrument08_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument08_3_Ch8 SFX_Noise_Instrument09_3:: - audio_header SFX_Noise_Instrument09_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument09_3_Ch8 SFX_Noise_Instrument10_3:: - audio_header SFX_Noise_Instrument10_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument10_3_Ch8 SFX_Noise_Instrument11_3:: - audio_header SFX_Noise_Instrument11_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument11_3_Ch8 SFX_Noise_Instrument12_3:: - audio_header SFX_Noise_Instrument12_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument12_3_Ch8 SFX_Noise_Instrument13_3:: - audio_header SFX_Noise_Instrument13_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument13_3_Ch8 SFX_Noise_Instrument14_3:: - audio_header SFX_Noise_Instrument14_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument14_3_Ch8 SFX_Noise_Instrument15_3:: - audio_header SFX_Noise_Instrument15_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument15_3_Ch8 SFX_Noise_Instrument16_3:: - audio_header SFX_Noise_Instrument16_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument16_3_Ch8 SFX_Noise_Instrument17_3:: - audio_header SFX_Noise_Instrument17_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument17_3_Ch8 SFX_Noise_Instrument18_3:: - audio_header SFX_Noise_Instrument18_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument18_3_Ch8 SFX_Noise_Instrument19_3:: - audio_header SFX_Noise_Instrument19_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument19_3_Ch8 SFX_Cry00_3:: - audio_header SFX_Cry00_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry00_3_Ch5 + channel 6, SFX_Cry00_3_Ch6 + channel 8, SFX_Cry00_3_Ch8 SFX_Cry01_3:: - audio_header SFX_Cry01_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry01_3_Ch5 + channel 6, SFX_Cry01_3_Ch6 + channel 8, SFX_Cry01_3_Ch8 SFX_Cry02_3:: - audio_header SFX_Cry02_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry02_3_Ch5 + channel 6, SFX_Cry02_3_Ch6 + channel 8, SFX_Cry02_3_Ch8 SFX_Cry03_3:: - audio_header SFX_Cry03_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry03_3_Ch5 + channel 6, SFX_Cry03_3_Ch6 + channel 8, SFX_Cry03_3_Ch8 SFX_Cry04_3:: - audio_header SFX_Cry04_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry04_3_Ch5 + channel 6, SFX_Cry04_3_Ch6 + channel 8, SFX_Cry04_3_Ch8 SFX_Cry05_3:: - audio_header SFX_Cry05_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry05_3_Ch5 + channel 6, SFX_Cry05_3_Ch6 + channel 8, SFX_Cry05_3_Ch8 SFX_Cry06_3:: - audio_header SFX_Cry06_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry06_3_Ch5 + channel 6, SFX_Cry06_3_Ch6 + channel 8, SFX_Cry06_3_Ch8 SFX_Cry07_3:: - audio_header SFX_Cry07_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry07_3_Ch5 + channel 6, SFX_Cry07_3_Ch6 + channel 8, SFX_Cry07_3_Ch8 SFX_Cry08_3:: - audio_header SFX_Cry08_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry08_3_Ch5 + channel 6, SFX_Cry08_3_Ch6 + channel 8, SFX_Cry08_3_Ch8 SFX_Cry09_3:: - audio_header SFX_Cry09_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry09_3_Ch5 + channel 6, SFX_Cry09_3_Ch6 + channel 8, SFX_Cry09_3_Ch8 SFX_Cry0A_3:: - audio_header SFX_Cry0A_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0A_3_Ch5 + channel 6, SFX_Cry0A_3_Ch6 + channel 8, SFX_Cry0A_3_Ch8 SFX_Cry0B_3:: - audio_header SFX_Cry0B_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0B_3_Ch5 + channel 6, SFX_Cry0B_3_Ch6 + channel 8, SFX_Cry0B_3_Ch8 SFX_Cry0C_3:: - audio_header SFX_Cry0C_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0C_3_Ch5 + channel 6, SFX_Cry0C_3_Ch6 + channel 8, SFX_Cry0C_3_Ch8 SFX_Cry0D_3:: - audio_header SFX_Cry0D_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0D_3_Ch5 + channel 6, SFX_Cry0D_3_Ch6 + channel 8, SFX_Cry0D_3_Ch8 SFX_Cry0E_3:: - audio_header SFX_Cry0E_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0E_3_Ch5 + channel 6, SFX_Cry0E_3_Ch6 + channel 8, SFX_Cry0E_3_Ch8 SFX_Cry0F_3:: - audio_header SFX_Cry0F_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0F_3_Ch5 + channel 6, SFX_Cry0F_3_Ch6 + channel 8, SFX_Cry0F_3_Ch8 SFX_Cry10_3:: - audio_header SFX_Cry10_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry10_3_Ch5 + channel 6, SFX_Cry10_3_Ch6 + channel 8, SFX_Cry10_3_Ch8 SFX_Cry11_3:: - audio_header SFX_Cry11_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry11_3_Ch5 + channel 6, SFX_Cry11_3_Ch6 + channel 8, SFX_Cry11_3_Ch8 SFX_Cry12_3:: - audio_header SFX_Cry12_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry12_3_Ch5 + channel 6, SFX_Cry12_3_Ch6 + channel 8, SFX_Cry12_3_Ch8 SFX_Cry13_3:: - audio_header SFX_Cry13_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry13_3_Ch5 + channel 6, SFX_Cry13_3_Ch6 + channel 8, SFX_Cry13_3_Ch8 SFX_Cry14_3:: - audio_header SFX_Cry14_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry14_3_Ch5 + channel 6, SFX_Cry14_3_Ch6 + channel 8, SFX_Cry14_3_Ch8 SFX_Cry15_3:: - audio_header SFX_Cry15_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry15_3_Ch5 + channel 6, SFX_Cry15_3_Ch6 + channel 8, SFX_Cry15_3_Ch8 SFX_Cry16_3:: - audio_header SFX_Cry16_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry16_3_Ch5 + channel 6, SFX_Cry16_3_Ch6 + channel 8, SFX_Cry16_3_Ch8 SFX_Cry17_3:: - audio_header SFX_Cry17_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry17_3_Ch5 + channel 6, SFX_Cry17_3_Ch6 + channel 8, SFX_Cry17_3_Ch8 SFX_Cry18_3:: - audio_header SFX_Cry18_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry18_3_Ch5 + channel 6, SFX_Cry18_3_Ch6 + channel 8, SFX_Cry18_3_Ch8 SFX_Cry19_3:: - audio_header SFX_Cry19_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry19_3_Ch5 + channel 6, SFX_Cry19_3_Ch6 + channel 8, SFX_Cry19_3_Ch8 SFX_Cry1A_3:: - audio_header SFX_Cry1A_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1A_3_Ch5 + channel 6, SFX_Cry1A_3_Ch6 + channel 8, SFX_Cry1A_3_Ch8 SFX_Cry1B_3:: - audio_header SFX_Cry1B_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1B_3_Ch5 + channel 6, SFX_Cry1B_3_Ch6 + channel 8, SFX_Cry1B_3_Ch8 SFX_Cry1C_3:: - audio_header SFX_Cry1C_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1C_3_Ch5 + channel 6, SFX_Cry1C_3_Ch6 + channel 8, SFX_Cry1C_3_Ch8 SFX_Cry1D_3:: - audio_header SFX_Cry1D_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1D_3_Ch5 + channel 6, SFX_Cry1D_3_Ch6 + channel 8, SFX_Cry1D_3_Ch8 SFX_Cry1E_3:: - audio_header SFX_Cry1E_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1E_3_Ch5 + channel 6, SFX_Cry1E_3_Ch6 + channel 8, SFX_Cry1E_3_Ch8 SFX_Cry1F_3:: - audio_header SFX_Cry1F_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1F_3_Ch5 + channel 6, SFX_Cry1F_3_Ch6 + channel 8, SFX_Cry1F_3_Ch8 SFX_Cry20_3:: - audio_header SFX_Cry20_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry20_3_Ch5 + channel 6, SFX_Cry20_3_Ch6 + channel 8, SFX_Cry20_3_Ch8 SFX_Cry21_3:: - audio_header SFX_Cry21_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry21_3_Ch5 + channel 6, SFX_Cry21_3_Ch6 + channel 8, SFX_Cry21_3_Ch8 SFX_Cry22_3:: - audio_header SFX_Cry22_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry22_3_Ch5 + channel 6, SFX_Cry22_3_Ch6 + channel 8, SFX_Cry22_3_Ch8 SFX_Cry23_3:: - audio_header SFX_Cry23_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry23_3_Ch5 + channel 6, SFX_Cry23_3_Ch6 + channel 8, SFX_Cry23_3_Ch8 SFX_Cry24_3:: - audio_header SFX_Cry24_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry24_3_Ch5 + channel 6, SFX_Cry24_3_Ch6 + channel 8, SFX_Cry24_3_Ch8 SFX_Cry25_3:: - audio_header SFX_Cry25_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry25_3_Ch5 + channel 6, SFX_Cry25_3_Ch6 + channel 8, SFX_Cry25_3_Ch8 SFX_Get_Item1_3:: - audio_header SFX_Get_Item1_3, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item1_3_Ch5 + channel 6, SFX_Get_Item1_3_Ch6 + channel 7, SFX_Get_Item1_3_Ch7 SFX_Get_Item2_3:: - audio_header SFX_Get_Item2_3, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item2_3_Ch5 + channel 6, SFX_Get_Item2_3_Ch6 + channel 7, SFX_Get_Item2_3_Ch7 SFX_Tink_3:: - audio_header SFX_Tink_3, Ch5 + channel_count 1 + channel 5, SFX_Tink_3_Ch5 SFX_Heal_HP_3:: - audio_header SFX_Heal_HP_3, Ch5 + channel_count 1 + channel 5, SFX_Heal_HP_3_Ch5 SFX_Heal_Ailment_3:: - audio_header SFX_Heal_Ailment_3, Ch5 + channel_count 1 + channel 5, SFX_Heal_Ailment_3_Ch5 SFX_Start_Menu_3:: - audio_header SFX_Start_Menu_3, Ch8 + channel_count 1 + channel 8, SFX_Start_Menu_3_Ch8 SFX_Press_AB_3:: - audio_header SFX_Press_AB_3, Ch5 + channel_count 1 + channel 5, SFX_Press_AB_3_Ch5 SFX_Pokedex_Rating_3:: - audio_header SFX_Pokedex_Rating_3, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Pokedex_Rating_3_Ch5 + channel 6, SFX_Pokedex_Rating_3_Ch6 + channel 7, SFX_Pokedex_Rating_3_Ch7 SFX_Get_Key_Item_3:: - audio_header SFX_Get_Key_Item_3, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Key_Item_3_Ch5 + channel 6, SFX_Get_Key_Item_3_Ch6 + channel 7, SFX_Get_Key_Item_3_Ch7 SFX_Poisoned_3:: - audio_header SFX_Poisoned_3, Ch5 + channel_count 1 + channel 5, SFX_Poisoned_3_Ch5 SFX_Trade_Machine_3:: - audio_header SFX_Trade_Machine_3, Ch5 + channel_count 1 + channel 5, SFX_Trade_Machine_3_Ch5 SFX_Turn_On_PC_3:: - audio_header SFX_Turn_On_PC_3, Ch5 + channel_count 1 + channel 5, SFX_Turn_On_PC_3_Ch5 SFX_Turn_Off_PC_3:: - audio_header SFX_Turn_Off_PC_3, Ch5 + channel_count 1 + channel 5, SFX_Turn_Off_PC_3_Ch5 SFX_Enter_PC_3:: - audio_header SFX_Enter_PC_3, Ch5 + channel_count 1 + channel 5, SFX_Enter_PC_3_Ch5 SFX_Shrink_3:: - audio_header SFX_Shrink_3, Ch5 + channel_count 1 + channel 5, SFX_Shrink_3_Ch5 SFX_Switch_3:: - audio_header SFX_Switch_3, Ch5 + channel_count 1 + channel 5, SFX_Switch_3_Ch5 SFX_Healing_Machine_3:: - audio_header SFX_Healing_Machine_3, Ch5 + channel_count 1 + channel 5, SFX_Healing_Machine_3_Ch5 SFX_Teleport_Exit1_3:: - audio_header SFX_Teleport_Exit1_3, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Exit1_3_Ch5 SFX_Teleport_Enter1_3:: - audio_header SFX_Teleport_Enter1_3, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Enter1_3_Ch5 SFX_Teleport_Exit2_3:: - audio_header SFX_Teleport_Exit2_3, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Exit2_3_Ch5 SFX_Ledge_3:: - audio_header SFX_Ledge_3, Ch5 + channel_count 1 + channel 5, SFX_Ledge_3_Ch5 SFX_Teleport_Enter2_3:: - audio_header SFX_Teleport_Enter2_3, Ch8 + channel_count 1 + channel 8, SFX_Teleport_Enter2_3_Ch8 SFX_Fly_3:: - audio_header SFX_Fly_3, Ch8 + channel_count 1 + channel 8, SFX_Fly_3_Ch8 SFX_Denied_3:: - audio_header SFX_Denied_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Denied_3_Ch5 + channel 6, SFX_Denied_3_Ch6 SFX_Arrow_Tiles_3:: - audio_header SFX_Arrow_Tiles_3, Ch5 + channel_count 1 + channel 5, SFX_Arrow_Tiles_3_Ch5 SFX_Push_Boulder_3:: - audio_header SFX_Push_Boulder_3, Ch8 + channel_count 1 + channel 8, SFX_Push_Boulder_3_Ch8 SFX_SS_Anne_Horn_3:: - audio_header SFX_SS_Anne_Horn_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_SS_Anne_Horn_3_Ch5 + channel 6, SFX_SS_Anne_Horn_3_Ch6 SFX_Withdraw_Deposit_3:: - audio_header SFX_Withdraw_Deposit_3, Ch5 + channel_count 1 + channel 5, SFX_Withdraw_Deposit_3_Ch5 SFX_Cut_3:: - audio_header SFX_Cut_3, Ch8 + channel_count 1 + channel 8, SFX_Cut_3_Ch8 SFX_Go_Inside_3:: - audio_header SFX_Go_Inside_3, Ch8 + channel_count 1 + channel 8, SFX_Go_Inside_3_Ch8 SFX_Swap_3:: - audio_header SFX_Swap_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Swap_3_Ch5 + channel 6, SFX_Swap_3_Ch6 SFX_59_3:: - audio_header SFX_59_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_59_3_Ch5 + channel 6, SFX_59_3_Ch6 SFX_Purchase_3:: - audio_header SFX_Purchase_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Purchase_3_Ch5 + channel 6, SFX_Purchase_3_Ch6 SFX_Collision_3:: - audio_header SFX_Collision_3, Ch5 + channel_count 1 + channel 5, SFX_Collision_3_Ch5 SFX_Go_Outside_3:: - audio_header SFX_Go_Outside_3, Ch8 + channel_count 1 + channel 8, SFX_Go_Outside_3_Ch8 SFX_Save_3:: - audio_header SFX_Save_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Save_3_Ch5 + channel 6, SFX_Save_3_Ch6 SFX_Intro_Lunge:: - audio_header SFX_Intro_Lunge, Ch8 + channel_count 1 + channel 8, SFX_Intro_Lunge_Ch8 SFX_Intro_Hip:: - audio_header SFX_Intro_Hip, Ch5 + channel_count 1 + channel 5, SFX_Intro_Hip_Ch5 SFX_Intro_Hop:: - audio_header SFX_Intro_Hop, Ch5 + channel_count 1 + channel 5, SFX_Intro_Hop_Ch5 SFX_Intro_Raise:: - audio_header SFX_Intro_Raise, Ch8 + channel_count 1 + channel 8, SFX_Intro_Raise_Ch8 SFX_Intro_Crash:: - audio_header SFX_Intro_Crash, Ch8 + channel_count 1 + channel 8, SFX_Intro_Crash_Ch8 SFX_Intro_Whoosh:: - audio_header SFX_Intro_Whoosh, Ch8 + channel_count 1 + channel 8, SFX_Intro_Whoosh_Ch8 SFX_Slots_Stop_Wheel:: - audio_header SFX_Slots_Stop_Wheel, Ch5 + channel_count 1 + channel 5, SFX_Slots_Stop_Wheel_Ch5 SFX_Slots_Reward:: - audio_header SFX_Slots_Reward, Ch5 + channel_count 1 + channel 5, SFX_Slots_Reward_Ch5 SFX_Slots_New_Spin:: - audio_header SFX_Slots_New_Spin, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Slots_New_Spin_Ch5 + channel 6, SFX_Slots_New_Spin_Ch6 SFX_Shooting_Star:: - audio_header SFX_Shooting_Star, Ch5 + channel_count 1 + channel 5, SFX_Shooting_Star_Ch5 diff --git a/audio/low_health_alarm.asm b/audio/low_health_alarm.asm index 65e19aa7a..35fe18158 100644 --- a/audio/low_health_alarm.asm +++ b/audio/low_health_alarm.asm @@ -20,7 +20,7 @@ Music_DoLowHealthAlarm:: .noTone ld a, $86 - ld [wChannelSoundIDs + Ch5], a ;disable sound channel? + ld [wChannelSoundIDs + CHAN5], a ;disable sound channel? ld a, [wLowHealthAlarm] and $7f ;decrement alarm timer. dec a @@ -34,7 +34,7 @@ Music_DoLowHealthAlarm:: .disableAlarm xor a ld [wLowHealthAlarm], a ;disable alarm - ld [wChannelSoundIDs + Ch5], a ;re-enable sound channel? + ld [wChannelSoundIDs + CHAN5], a ;re-enable sound channel? ld de, .toneDataSilence jr .playTone diff --git a/audio/poke_flute.asm b/audio/poke_flute.asm index f55a2a1f6..1c0caab11 100644 --- a/audio/poke_flute.asm +++ b/audio/poke_flute.asm @@ -3,7 +3,7 @@ Music_PokeFluteInBattle:: ld a, SFX_CAUGHT_MON call PlaySoundWaitForCurrent ; then immediately overwrite the channel pointers - ld hl, wChannelCommandPointers + Ch5 * 2 + ld hl, wChannelCommandPointers + CHAN5 * 2 ld de, SFX_Pokeflute_Ch5 call Audio2_OverwriteChannelPointer ld de, SFX_Pokeflute_Ch6 diff --git a/audio/wave_instruments.asm b/audio/wave_samples.asm similarity index 100% rename from audio/wave_instruments.asm rename to audio/wave_samples.asm diff --git a/constants/audio_constants.asm b/constants/audio_constants.asm index 59900fecd..a89030526 100644 --- a/constants/audio_constants.asm +++ b/constants/audio_constants.asm @@ -19,15 +19,15 @@ DEF NUM_NOTES EQU const_value ; Audio[1|2|3]_HWChannelBaseAddresses, Audio[1|2|3]_HWChannelDisableMasks, ; and Audio[1|2|3]_HWChannelEnableMasks indexes (see audio/engine_[1|2|3].asm) const_def - const Ch1 ; 0 - const Ch2 ; 1 - const Ch3 ; 2 - const Ch4 ; 3 + const CHAN1 ; 0 + const CHAN2 ; 1 + const CHAN3 ; 2 + const CHAN4 ; 3 DEF NUM_MUSIC_CHANS EQU const_value - const Ch5 ; 4 - const Ch6 ; 5 - const Ch7 ; 6 - const Ch8 ; 7 + const CHAN5 ; 4 + const CHAN6 ; 5 + const CHAN7 ; 6 + const CHAN8 ; 7 DEF NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS DEF NUM_CHANNELS EQU const_value diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 6aa697c9c..f84b759c5 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -782,7 +782,7 @@ FaintEnemyPokemon: ld a, SFX_FAINT_FALL call PlaySoundWaitForCurrent .sfxwait - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_FAINT_FALL jr z, .sfxwait ld a, SFX_FAINT_THUD @@ -866,7 +866,7 @@ EndLowHealthAlarm: ; the low health alarm and prevents it from reactivating until the next battle. xor a ld [wLowHealthAlarm], a ; turn off low health alarm - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a inc a ld [wLowHealthAlarmDisabled], a ; prevent it from reactivating ret @@ -1864,7 +1864,7 @@ DrawPlayerHUDAndHPBar: ld [hl], $0 ret z xor a - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a ret .setLowHealthAlarm ld hl, wLowHealthAlarm diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm index bd4a1901b..b9f9d537e 100644 --- a/engine/battle/end_of_battle.asm +++ b/engine/battle/end_of_battle.asm @@ -46,7 +46,7 @@ EndOfBattle: .resetVariables xor a ld [wLowHealthAlarm], a ;disable low health alarm - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a ld [wIsInBattle], a ld [wBattleType], a ld [wMoveMissed], a diff --git a/engine/events/hidden_objects/safari_game.asm b/engine/events/hidden_objects/safari_game.asm index ac07e2f31..ea00be5a3 100644 --- a/engine/events/hidden_objects/safari_game.asm +++ b/engine/events/hidden_objects/safari_game.asm @@ -37,7 +37,7 @@ SafariZoneGameOver: ld a, SFX_SAFARI_ZONE_PA call PlayMusic .waitForMusicToPlay - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_SAFARI_ZONE_PA jr nz, .waitForMusicToPlay ld a, TEXT_SAFARI_GAME_OVER diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 913b86360..a89031b47 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -991,7 +991,7 @@ ItemUseMedicine: .notFullHP ; if the pokemon's current HP doesn't equal its max HP xor a ld [wLowHealthAlarm], a ;disable low health alarm - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a push hl push de ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1) @@ -1732,7 +1732,7 @@ ItemUsePokeflute: call WaitForSoundToFinish ; wait for sound to end farcall Music_PokeFluteInBattle ; play in-battle pokeflute music .musicWaitLoop ; wait for music to finish playing - ld a, [wChannelSoundIDs + Ch7] + ld a, [wChannelSoundIDs + CHAN7] and a ; music off? jr nz, .musicWaitLoop .skipMusic @@ -1799,7 +1799,7 @@ PlayedFluteHadEffectText: ld c, BANK(SFX_Pokeflute) call PlayMusic .musicWaitLoop ; wait for music to finish playing - ld a, [wChannelSoundIDs + Ch3] + ld a, [wChannelSoundIDs + CHAN3] cp SFX_POKEFLUTE jr z, .musicWaitLoop call PlayDefaultMusic ; start playing normal music again diff --git a/engine/movie/evolution.asm b/engine/movie/evolution.asm index 778405567..4464fd876 100644 --- a/engine/movie/evolution.asm +++ b/engine/movie/evolution.asm @@ -8,7 +8,7 @@ EvolveMon: push af xor a ld [wLowHealthAlarm], a - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a dec a ; SFX_STOP_ALL_MUSIC ld [wNewSoundID], a call PlaySound diff --git a/engine/overworld/elevator.asm b/engine/overworld/elevator.asm index fa4046021..0d19c1270 100644 --- a/engine/overworld/elevator.asm +++ b/engine/overworld/elevator.asm @@ -33,7 +33,7 @@ ShakeElevator:: ld a, SFX_SAFARI_ZONE_PA call PlayMusic .musicLoop - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_SAFARI_ZONE_PA jr z, .musicLoop call UpdateSprites diff --git a/home/audio.asm b/home/audio.asm index eded85e97..1da6453c5 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -146,10 +146,10 @@ PlaySound:: and a jr z, .next xor a - ld [wChannelSoundIDs + Ch5], a - ld [wChannelSoundIDs + Ch6], a - ld [wChannelSoundIDs + Ch7], a - ld [wChannelSoundIDs + Ch8], a + ld [wChannelSoundIDs + CHAN5], a + ld [wChannelSoundIDs + CHAN6], a + ld [wChannelSoundIDs + CHAN7], a + ld [wChannelSoundIDs + CHAN8], a .next ld a, [wAudioFadeOutControl] and a ; has a fade-out length been specified? diff --git a/home/delay.asm b/home/delay.asm index 850b23e9d..3d1ea44d8 100644 --- a/home/delay.asm +++ b/home/delay.asm @@ -18,7 +18,7 @@ WaitForSoundToFinish:: ret nz push hl .waitLoop - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 xor a or [hl] inc hl diff --git a/home/overworld.asm b/home/overworld.asm index 74c97cb7a..a4e547bfb 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -1244,7 +1244,7 @@ CollisionCheckOnLand:: call CheckTilePassable jr nc, .noCollision .collision - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_COLLISION ; check if collision sound is already playing jr z, .setCarry ld a, SFX_COLLISION @@ -1925,7 +1925,7 @@ CollisionCheckOnWater:: jr z, .stopSurfing ; stop surfing if the tile is passable jr .loop .collision - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_COLLISION ; check if collision sound is already playing jr z, .setCarry ld a, SFX_COLLISION diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm index 114bf5768..6b8a650a1 100644 --- a/macros/scripts/audio.asm +++ b/macros/scripts/audio.asm @@ -1,18 +1,15 @@ -MACRO audio_header - db (_NARG - 2) << 6 | \2 - dw \1_\2 - IF _NARG > 2 - db \3 - dw \1_\3 - ENDC - IF _NARG > 3 - db \4 - dw \1_\4 - ENDC - IF _NARG > 4 - db \5 - dw \1_\5 - ENDC +MACRO channel_count + ASSERT 0 < (\1) && (\1) <= NUM_MUSIC_CHANS, \ + "channel_count must be 1-{d:NUM_MUSIC_CHANS}" + DEF _num_channels = \1 - 1 +ENDM + +MACRO channel + ASSERT 0 < (\1) && (\1) <= NUM_CHANNELS, \ + "channel id must be 1-{d:NUM_CHANNELS}" + dn (_num_channels << 2), \1 - 1 ; channel id + dw \2 ; address + DEF _num_channels = 0 ENDM const_def $10 @@ -27,9 +24,9 @@ ENDM MACRO pitch_sweep db pitch_sweep_cmd IF \2 < 0 - db (\1 << 4) | (%1000 | (\2 * -1)) + dn \1, %1000 | (\2 * -1) ELSE - db (\1 << 4) | \2 + dn \1, \2 ENDC ENDM @@ -45,9 +42,9 @@ DEF square_note_cmd EQU sfx_note_cmd ; $20 MACRO square_note db square_note_cmd | \1 IF \3 < 0 - db (\2 << 4) | (%1000 | (\3 * -1)) + dn \2, %1000 | (\3 * -1) ELSE - db (\2 << 4) | \3 + dn \2, \3 ENDC dw \4 ENDM @@ -60,16 +57,16 @@ DEF noise_note_cmd EQU sfx_note_cmd ; $20 MACRO noise_note db noise_note_cmd | \1 IF \3 < 0 - db (\2 << 4) | (%1000 | (\3 * -1)) + dn \2, %1000 | (\3 * -1) ELSE - db (\2 << 4) | \3 + dn \2, \3 ENDC db \4 ENDM ; arguments: pitch, length [1, 16] MACRO note - db (\1 << 4) | (\2 - 1) + dn \1, \2 - 1 ENDM const_next $b0 @@ -86,7 +83,7 @@ ENDM ; can only be used with instruments 1-10, excluding 2 ; unused MACRO drum_note_short - db (\1 << 4) | (\2 - 1) + note \1, \2 ENDM const_next $c0 @@ -107,9 +104,9 @@ ENDM MACRO note_type db note_type_cmd | \1 IF \3 < 0 - db (\2 << 4) | (%1000 | (\3 * -1)) + dn \2, %1000 | (\3 * -1) ELSE - db (\2 << 4) | \3 + dn \2, \3 ENDC ENDM @@ -145,7 +142,7 @@ ENDM MACRO vibrato db vibrato_cmd db \1 - db (\2 << 4) | \3 + dn \2, \3 ENDM ; arguments: length [1, 256], octave [1, 8], pitch @@ -153,7 +150,7 @@ ENDM MACRO pitch_slide db pitch_slide_cmd db \1 - 1 - db ((8 - \2) << 4) | \3 + dn 8 - \2, \3 ENDM ; arguments: duty cycle [0, 3] (12.5%, 25%, 50%, 75%) @@ -179,7 +176,7 @@ ENDM const stereo_panning_cmd ; $ee MACRO stereo_panning db stereo_panning_cmd - db (\1 << 4) | \2 + dn \1, \2 ENDM const unknownmusic0xef_cmd ; $ef @@ -192,7 +189,7 @@ ENDM const volume_cmd ; $f0 MACRO volume db volume_cmd - db (\1 << 4) | \2 + dn \1, \2 ENDM const_next $f8 diff --git a/scripts/PewterPokecenter.asm b/scripts/PewterPokecenter.asm index 5030244c2..3267dcee4 100644 --- a/scripts/PewterPokecenter.asm +++ b/scripts/PewterPokecenter.asm @@ -62,7 +62,7 @@ PewterJigglypuffText: call DelayFrames ld a, [wChannelSoundIDs] ld b, a - ld a, [wChannelSoundIDs + Ch2] + ld a, [wChannelSoundIDs + CHAN2] or b jr nz, .spinMovementLoop From 63a7eb2cf545281cbeaf289b261f9345d9249819 Mon Sep 17 00:00:00 2001 From: SatoMew Date: Sat, 10 Sep 2022 18:44:31 +0100 Subject: [PATCH 40/45] Improve NPC trade labels and comments (#384) Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com> --- constants/script_constants.asm | 4 ++-- data/events/trades.asm | 24 ++++++++++++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/constants/script_constants.asm b/constants/script_constants.asm index d4543f050..afd1258bf 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -22,7 +22,7 @@ DEF SLOTS_SOMEONESKEYS EQU $ff const_def const TRADE_FOR_TERRY const TRADE_FOR_MARCEL - const TRADE_FOR_CHIKUCHIKU + const TRADE_FOR_CHIKUCHIKU ; unused const TRADE_FOR_SAILOR const TRADE_FOR_DUX const TRADE_FOR_MARC @@ -36,7 +36,7 @@ DEF NUM_NPC_TRADES EQU const_value ; InGameTradeTextPointers indexes (see engine/events/in_game_trades.asm) const_def const TRADE_DIALOGSET_CASUAL - const TRADE_DIALOGSET_POLITE + const TRADE_DIALOGSET_EVOLUTION const TRADE_DIALOGSET_HAPPY ; badges diff --git a/data/events/trades.asm b/data/events/trades.asm index 560abfa1e..b230a918d 100644 --- a/data/events/trades.asm +++ b/data/events/trades.asm @@ -2,14 +2,18 @@ TradeMons: ; entries correspond to TRADE_FOR_* constants table_width 3 + NAME_LENGTH, TradeMons ; give mon, get mon, dialog id, nickname - db NIDORINO, NIDORINA, TRADE_DIALOGSET_CASUAL, "TERRY@@@@@@" - db ABRA, MR_MIME, TRADE_DIALOGSET_CASUAL, "MARCEL@@@@@" - db BUTTERFREE, BEEDRILL, TRADE_DIALOGSET_HAPPY, "CHIKUCHIKU@" - db PONYTA, SEEL, TRADE_DIALOGSET_CASUAL, "SAILOR@@@@@" - db SPEAROW, FARFETCHD, TRADE_DIALOGSET_HAPPY, "DUX@@@@@@@@" - db SLOWBRO, LICKITUNG, TRADE_DIALOGSET_CASUAL, "MARC@@@@@@@" - db POLIWHIRL, JYNX, TRADE_DIALOGSET_POLITE, "LOLA@@@@@@@" - db RAICHU, ELECTRODE, TRADE_DIALOGSET_POLITE, "DORIS@@@@@@" - db VENONAT, TANGELA, TRADE_DIALOGSET_HAPPY, "CRINKLES@@@" - db NIDORAN_M, NIDORAN_F, TRADE_DIALOGSET_HAPPY, "SPOT@@@@@@@" + ; The two instances of TRADE_DIALOGSET_EVOLUTION are a leftover + ; from the Japanese Blue trades, which used species that evolve. + ; Japanese Red and Green used TRADE_DIALOGSET_CASUAL, and had + ; the same species as English Red and Blue. + db NIDORINO, NIDORINA, TRADE_DIALOGSET_CASUAL, "TERRY@@@@@@" + db ABRA, MR_MIME, TRADE_DIALOGSET_CASUAL, "MARCEL@@@@@" + db BUTTERFREE, BEEDRILL, TRADE_DIALOGSET_HAPPY, "CHIKUCHIKU@" ; unused + db PONYTA, SEEL, TRADE_DIALOGSET_CASUAL, "SAILOR@@@@@" + db SPEAROW, FARFETCHD, TRADE_DIALOGSET_HAPPY, "DUX@@@@@@@@" + db SLOWBRO, LICKITUNG, TRADE_DIALOGSET_CASUAL, "MARC@@@@@@@" + db POLIWHIRL, JYNX, TRADE_DIALOGSET_EVOLUTION, "LOLA@@@@@@@" + db RAICHU, ELECTRODE, TRADE_DIALOGSET_EVOLUTION, "DORIS@@@@@@" + db VENONAT, TANGELA, TRADE_DIALOGSET_HAPPY, "CRINKLES@@@" + db NIDORAN_M, NIDORAN_F, TRADE_DIALOGSET_HAPPY, "SPOT@@@@@@@" assert_table_length NUM_NPC_TRADES From 0c4d2e178ebbcee1d0b8de6354fef2d1134d90bc Mon Sep 17 00:00:00 2001 From: Rangi Date: Sat, 10 Sep 2022 13:52:11 -0400 Subject: [PATCH 41/45] Link to the symbols branch --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 950b8b993..706ab86cd 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ To set up the repository, see [**INSTALL.md**](INSTALL.md). ## See also +- [**Wiki**][wiki] (includes [tutorials][tutorials]) +- [**Symbols**][symbols] - **Discord:** [pret][discord] - **IRC:** [libera#pret][irc] @@ -37,6 +39,9 @@ Other disassembly projects: [pokeruby]: https://github.com/pret/pokeruby [pokefirered]: https://github.com/pret/pokefirered [pokeemerald]: https://github.com/pret/pokeemerald +[wiki]: https://github.com/pret/pokered/wiki +[tutorials]: https://github.com/pret/pokered/wiki/Tutorials +[symbols]: https://github.com/pret/pokered/tree/symbols [discord]: https://discord.gg/d5dubZ3 [irc]: https://web.libera.chat/?#pret [ci]: https://github.com/pret/pokered/actions From 74cee737f6990fd770838eb8fe4d090028a76bd9 Mon Sep 17 00:00:00 2001 From: vulcandth Date: Sun, 11 Sep 2022 00:05:04 -0500 Subject: [PATCH 42/45] Rename `macros/wram.asm` to `macros/ram.asm` (#388) --- constants/map_object_constants.asm | 4 ++-- constants/pokemon_data_constants.asm | 2 +- macros/{wram.asm => ram.asm} | 0 ram.asm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename macros/{wram.asm => ram.asm} (100%) diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm index 5c666d834..377edcea5 100644 --- a/constants/map_object_constants.asm +++ b/constants/map_object_constants.asm @@ -1,4 +1,4 @@ -; spritestatedata1 struct members (see macros/wram.asm) +; spritestatedata1 struct members (see macros/ram.asm) const_def const SPRITESTATEDATA1_PICTUREID ; 0 const SPRITESTATEDATA1_MOVEMENTSTATUS ; 1 @@ -18,7 +18,7 @@ const SPRITESTATEDATA1_0F ; f DEF SPRITESTATEDATA1_LENGTH EQU const_value -; spritestatedata2 struct members (see macros/wram.asm) +; spritestatedata2 struct members (see macros/ram.asm) const_def const SPRITESTATEDATA2_WALKANIMATIONCOUNTER ; 0 const SPRITESTATEDATA2_01 ; 1 diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm index 1fd7ce19c..028d67113 100644 --- a/constants/pokemon_data_constants.asm +++ b/constants/pokemon_data_constants.asm @@ -23,7 +23,7 @@ DEF BASE_TMHM rb (NUM_TM_HM + 7) / 8 rb_skip DEF BASE_DATA_SIZE EQU _RS -; party_struct members (see macros/wram.asm) +; party_struct members (see macros/ram.asm) rsreset DEF MON_SPECIES rb DEF MON_HP rw diff --git a/macros/wram.asm b/macros/ram.asm similarity index 100% rename from macros/wram.asm rename to macros/ram.asm diff --git a/ram.asm b/ram.asm index 24040b140..077ae7991 100644 --- a/ram.asm +++ b/ram.asm @@ -1,6 +1,6 @@ INCLUDE "constants.asm" -INCLUDE "macros/wram.asm" +INCLUDE "macros/ram.asm" INCLUDE "ram/vram.asm" From e9e769fba15c2373d43f37721a45427a9218c154 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 11 Sep 2022 15:00:06 -0400 Subject: [PATCH 43/45] Copy pokecrystal's `map_const` macro Fixes #386 --- constants/map_constants.asm | 502 ++++++++++++++++++------------------ 1 file changed, 251 insertions(+), 251 deletions(-) diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 48b254613..644cfab49 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -1,7 +1,7 @@ -MACRO mapconst +MACRO map_const const \1 - DEF \1_HEIGHT EQU \2 - DEF \1_WIDTH EQU \3 + DEF \1_WIDTH EQU \2 + DEF \1_HEIGHT EQU \3 ENDM ; map ids @@ -16,257 +16,257 @@ ENDM ; Each map also has associated data in maps.asm. ; Order: towns/cities, then routes, then indoor/dungeon maps const_def - mapconst PALLET_TOWN, 9, 10 ; $00 - mapconst VIRIDIAN_CITY, 18, 20 ; $01 - mapconst PEWTER_CITY, 18, 20 ; $02 - mapconst CERULEAN_CITY, 18, 20 ; $03 - mapconst LAVENDER_TOWN, 9, 10 ; $04 - mapconst VERMILION_CITY, 18, 20 ; $05 - mapconst CELADON_CITY, 18, 25 ; $06 - mapconst FUCHSIA_CITY, 18, 20 ; $07 - mapconst CINNABAR_ISLAND, 9, 10 ; $08 - mapconst INDIGO_PLATEAU, 9, 10 ; $09 - mapconst SAFFRON_CITY, 18, 20 ; $0A + map_const PALLET_TOWN, 10, 9 ; $00 + map_const VIRIDIAN_CITY, 20, 18 ; $01 + map_const PEWTER_CITY, 20, 18 ; $02 + map_const CERULEAN_CITY, 20, 18 ; $03 + map_const LAVENDER_TOWN, 10, 9 ; $04 + map_const VERMILION_CITY, 20, 18 ; $05 + map_const CELADON_CITY, 25, 18 ; $06 + map_const FUCHSIA_CITY, 20, 18 ; $07 + map_const CINNABAR_ISLAND, 10, 9 ; $08 + map_const INDIGO_PLATEAU, 10, 9 ; $09 + map_const SAFFRON_CITY, 20, 18 ; $0A DEF NUM_CITY_MAPS EQU const_value - mapconst UNUSED_MAP_0B, 0, 0 ; $0B + map_const UNUSED_MAP_0B, 0, 0 ; $0B DEF FIRST_ROUTE_MAP EQU const_value - mapconst ROUTE_1, 18, 10 ; $0C - mapconst ROUTE_2, 36, 10 ; $0D - mapconst ROUTE_3, 9, 35 ; $0E - mapconst ROUTE_4, 9, 45 ; $0F - mapconst ROUTE_5, 18, 10 ; $10 - mapconst ROUTE_6, 18, 10 ; $11 - mapconst ROUTE_7, 9, 10 ; $12 - mapconst ROUTE_8, 9, 30 ; $13 - mapconst ROUTE_9, 9, 30 ; $14 - mapconst ROUTE_10, 36, 10 ; $15 - mapconst ROUTE_11, 9, 30 ; $16 - mapconst ROUTE_12, 54, 10 ; $17 - mapconst ROUTE_13, 9, 30 ; $18 - mapconst ROUTE_14, 27, 10 ; $19 - mapconst ROUTE_15, 9, 30 ; $1A - mapconst ROUTE_16, 9, 20 ; $1B - mapconst ROUTE_17, 72, 10 ; $1C - mapconst ROUTE_18, 9, 25 ; $1D - mapconst ROUTE_19, 27, 10 ; $1E - mapconst ROUTE_20, 9, 50 ; $1F - mapconst ROUTE_21, 45, 10 ; $20 - mapconst ROUTE_22, 9, 20 ; $21 - mapconst ROUTE_23, 72, 10 ; $22 - mapconst ROUTE_24, 18, 10 ; $23 - mapconst ROUTE_25, 9, 30 ; $24 + map_const ROUTE_1, 10, 18 ; $0C + map_const ROUTE_2, 10, 36 ; $0D + map_const ROUTE_3, 35, 9 ; $0E + map_const ROUTE_4, 45, 9 ; $0F + map_const ROUTE_5, 10, 18 ; $10 + map_const ROUTE_6, 10, 18 ; $11 + map_const ROUTE_7, 10, 9 ; $12 + map_const ROUTE_8, 30, 9 ; $13 + map_const ROUTE_9, 30, 9 ; $14 + map_const ROUTE_10, 10, 36 ; $15 + map_const ROUTE_11, 30, 9 ; $16 + map_const ROUTE_12, 10, 54 ; $17 + map_const ROUTE_13, 30, 9 ; $18 + map_const ROUTE_14, 10, 27 ; $19 + map_const ROUTE_15, 30, 9 ; $1A + map_const ROUTE_16, 20, 9 ; $1B + map_const ROUTE_17, 10, 72 ; $1C + map_const ROUTE_18, 25, 9 ; $1D + map_const ROUTE_19, 10, 27 ; $1E + map_const ROUTE_20, 50, 9 ; $1F + map_const ROUTE_21, 10, 45 ; $20 + map_const ROUTE_22, 20, 9 ; $21 + map_const ROUTE_23, 10, 72 ; $22 + map_const ROUTE_24, 10, 18 ; $23 + map_const ROUTE_25, 30, 9 ; $24 DEF FIRST_INDOOR_MAP EQU const_value - mapconst REDS_HOUSE_1F, 4, 4 ; $25 - mapconst REDS_HOUSE_2F, 4, 4 ; $26 - mapconst BLUES_HOUSE, 4, 4 ; $27 - mapconst OAKS_LAB, 6, 5 ; $28 - mapconst VIRIDIAN_POKECENTER, 4, 7 ; $29 - mapconst VIRIDIAN_MART, 4, 4 ; $2A - mapconst VIRIDIAN_SCHOOL_HOUSE, 4, 4 ; $2B - mapconst VIRIDIAN_NICKNAME_HOUSE, 4, 4 ; $2C - mapconst VIRIDIAN_GYM, 9, 10 ; $2D - mapconst DIGLETTS_CAVE_ROUTE_2, 4, 4 ; $2E - mapconst VIRIDIAN_FOREST_NORTH_GATE, 4, 5 ; $2F - mapconst ROUTE_2_TRADE_HOUSE, 4, 4 ; $30 - mapconst ROUTE_2_GATE, 4, 5 ; $31 - mapconst VIRIDIAN_FOREST_SOUTH_GATE, 4, 5 ; $32 - mapconst VIRIDIAN_FOREST, 24, 17 ; $33 - mapconst MUSEUM_1F, 4, 10 ; $34 - mapconst MUSEUM_2F, 4, 7 ; $35 - mapconst PEWTER_GYM, 7, 5 ; $36 - mapconst PEWTER_NIDORAN_HOUSE, 4, 4 ; $37 - mapconst PEWTER_MART, 4, 4 ; $38 - mapconst PEWTER_SPEECH_HOUSE, 4, 4 ; $39 - mapconst PEWTER_POKECENTER, 4, 7 ; $3A - mapconst MT_MOON_1F, 18, 20 ; $3B - mapconst MT_MOON_B1F, 14, 14 ; $3C - mapconst MT_MOON_B2F, 18, 20 ; $3D - mapconst CERULEAN_TRASHED_HOUSE, 4, 4 ; $3E - mapconst CERULEAN_TRADE_HOUSE, 4, 4 ; $3F - mapconst CERULEAN_POKECENTER, 4, 7 ; $40 - mapconst CERULEAN_GYM, 7, 5 ; $41 - mapconst BIKE_SHOP, 4, 4 ; $42 - mapconst CERULEAN_MART, 4, 4 ; $43 - mapconst MT_MOON_POKECENTER, 4, 7 ; $44 - mapconst CERULEAN_TRASHED_HOUSE_COPY, 4, 4 ; $45 - mapconst ROUTE_5_GATE, 3, 4 ; $46 - mapconst UNDERGROUND_PATH_ROUTE_5, 4, 4 ; $47 - mapconst DAYCARE, 4, 4 ; $48 - mapconst ROUTE_6_GATE, 3, 4 ; $49 - mapconst UNDERGROUND_PATH_ROUTE_6, 4, 4 ; $4A - mapconst UNDERGROUND_PATH_ROUTE_6_COPY, 4, 4 ; $4B - mapconst ROUTE_7_GATE, 4, 3 ; $4C - mapconst UNDERGROUND_PATH_ROUTE_7, 4, 4 ; $4D - mapconst UNDERGROUND_PATH_ROUTE_7_COPY, 4, 4 ; $4E - mapconst ROUTE_8_GATE, 4, 3 ; $4F - mapconst UNDERGROUND_PATH_ROUTE_8, 4, 4 ; $50 - mapconst ROCK_TUNNEL_POKECENTER, 4, 7 ; $51 - mapconst ROCK_TUNNEL_1F, 18, 20 ; $52 - mapconst POWER_PLANT, 18, 20 ; $53 - mapconst ROUTE_11_GATE_1F, 5, 4 ; $54 - mapconst DIGLETTS_CAVE_ROUTE_11, 4, 4 ; $55 - mapconst ROUTE_11_GATE_2F, 4, 4 ; $56 - mapconst ROUTE_12_GATE_1F, 4, 5 ; $57 - mapconst BILLS_HOUSE, 4, 4 ; $58 - mapconst VERMILION_POKECENTER, 4, 7 ; $59 - mapconst POKEMON_FAN_CLUB, 4, 4 ; $5A - mapconst VERMILION_MART, 4, 4 ; $5B - mapconst VERMILION_GYM, 9, 5 ; $5C - mapconst VERMILION_PIDGEY_HOUSE, 4, 4 ; $5D - mapconst VERMILION_DOCK, 6, 14 ; $5E - mapconst SS_ANNE_1F, 9, 20 ; $5F - mapconst SS_ANNE_2F, 9, 20 ; $60 - mapconst SS_ANNE_3F, 3, 10 ; $61 - mapconst SS_ANNE_B1F, 4, 15 ; $62 - mapconst SS_ANNE_BOW, 7, 10 ; $63 - mapconst SS_ANNE_KITCHEN, 8, 7 ; $64 - mapconst SS_ANNE_CAPTAINS_ROOM, 4, 3 ; $65 - mapconst SS_ANNE_1F_ROOMS, 8, 12 ; $66 - mapconst SS_ANNE_2F_ROOMS, 8, 12 ; $67 - mapconst SS_ANNE_B1F_ROOMS, 8, 12 ; $68 - mapconst UNUSED_MAP_69, 0, 0 ; $69 - mapconst UNUSED_MAP_6A, 0, 0 ; $6A - mapconst UNUSED_MAP_6B, 0, 0 ; $6B - mapconst VICTORY_ROAD_1F, 9, 10 ; $6C - mapconst UNUSED_MAP_6D, 0, 0 ; $6D - mapconst UNUSED_MAP_6E, 0, 0 ; $6E - mapconst UNUSED_MAP_6F, 0, 0 ; $6F - mapconst UNUSED_MAP_70, 0, 0 ; $70 - mapconst LANCES_ROOM, 13, 13 ; $71 - mapconst UNUSED_MAP_72, 0, 0 ; $72 - mapconst UNUSED_MAP_73, 0, 0 ; $73 - mapconst UNUSED_MAP_74, 0, 0 ; $74 - mapconst UNUSED_MAP_75, 0, 0 ; $75 - mapconst HALL_OF_FAME, 4, 5 ; $76 - mapconst UNDERGROUND_PATH_NORTH_SOUTH, 24, 4 ; $77 - mapconst CHAMPIONS_ROOM, 4, 4 ; $78 - mapconst UNDERGROUND_PATH_WEST_EAST, 4, 25 ; $79 - mapconst CELADON_MART_1F, 4, 10 ; $7A - mapconst CELADON_MART_2F, 4, 10 ; $7B - mapconst CELADON_MART_3F, 4, 10 ; $7C - mapconst CELADON_MART_4F, 4, 10 ; $7D - mapconst CELADON_MART_ROOF, 4, 10 ; $7E - mapconst CELADON_MART_ELEVATOR, 2, 2 ; $7F - mapconst CELADON_MANSION_1F, 6, 4 ; $80 - mapconst CELADON_MANSION_2F, 6, 4 ; $81 - mapconst CELADON_MANSION_3F, 6, 4 ; $82 - mapconst CELADON_MANSION_ROOF, 6, 4 ; $83 - mapconst CELADON_MANSION_ROOF_HOUSE, 4, 4 ; $84 - mapconst CELADON_POKECENTER, 4, 7 ; $85 - mapconst CELADON_GYM, 9, 5 ; $86 - mapconst GAME_CORNER, 9, 10 ; $87 - mapconst CELADON_MART_5F, 4, 10 ; $88 - mapconst GAME_CORNER_PRIZE_ROOM, 4, 5 ; $89 - mapconst CELADON_DINER, 4, 5 ; $8A - mapconst CELADON_CHIEF_HOUSE, 4, 4 ; $8B - mapconst CELADON_HOTEL, 4, 7 ; $8C - mapconst LAVENDER_POKECENTER, 4, 7 ; $8D - mapconst POKEMON_TOWER_1F, 9, 10 ; $8E - mapconst POKEMON_TOWER_2F, 9, 10 ; $8F - mapconst POKEMON_TOWER_3F, 9, 10 ; $90 - mapconst POKEMON_TOWER_4F, 9, 10 ; $91 - mapconst POKEMON_TOWER_5F, 9, 10 ; $92 - mapconst POKEMON_TOWER_6F, 9, 10 ; $93 - mapconst POKEMON_TOWER_7F, 9, 10 ; $94 - mapconst MR_FUJIS_HOUSE, 4, 4 ; $95 - mapconst LAVENDER_MART, 4, 4 ; $96 - mapconst LAVENDER_CUBONE_HOUSE, 4, 4 ; $97 - mapconst FUCHSIA_MART, 4, 4 ; $98 - mapconst FUCHSIA_BILLS_GRANDPAS_HOUSE, 4, 4 ; $99 - mapconst FUCHSIA_POKECENTER, 4, 7 ; $9A - mapconst WARDENS_HOUSE, 4, 5 ; $9B - mapconst SAFARI_ZONE_GATE, 3, 4 ; $9C - mapconst FUCHSIA_GYM, 9, 5 ; $9D - mapconst FUCHSIA_MEETING_ROOM, 4, 7 ; $9E - mapconst SEAFOAM_ISLANDS_B1F, 9, 15 ; $9F - mapconst SEAFOAM_ISLANDS_B2F, 9, 15 ; $A0 - mapconst SEAFOAM_ISLANDS_B3F, 9, 15 ; $A1 - mapconst SEAFOAM_ISLANDS_B4F, 9, 15 ; $A2 - mapconst VERMILION_OLD_ROD_HOUSE, 4, 4 ; $A3 - mapconst FUCHSIA_GOOD_ROD_HOUSE, 4, 4 ; $A4 - mapconst POKEMON_MANSION_1F, 14, 15 ; $A5 - mapconst CINNABAR_GYM, 9, 10 ; $A6 - mapconst CINNABAR_LAB, 4, 9 ; $A7 - mapconst CINNABAR_LAB_TRADE_ROOM, 4, 4 ; $A8 - mapconst CINNABAR_LAB_METRONOME_ROOM, 4, 4 ; $A9 - mapconst CINNABAR_LAB_FOSSIL_ROOM, 4, 4 ; $AA - mapconst CINNABAR_POKECENTER, 4, 7 ; $AB - mapconst CINNABAR_MART, 4, 4 ; $AC - mapconst CINNABAR_MART_COPY, 4, 4 ; $AD - mapconst INDIGO_PLATEAU_LOBBY, 6, 8 ; $AE - mapconst COPYCATS_HOUSE_1F, 4, 4 ; $AF - mapconst COPYCATS_HOUSE_2F, 4, 4 ; $B0 - mapconst FIGHTING_DOJO, 6, 5 ; $B1 - mapconst SAFFRON_GYM, 9, 10 ; $B2 - mapconst SAFFRON_PIDGEY_HOUSE, 4, 4 ; $B3 - mapconst SAFFRON_MART, 4, 4 ; $B4 - mapconst SILPH_CO_1F, 9, 15 ; $B5 - mapconst SAFFRON_POKECENTER, 4, 7 ; $B6 - mapconst MR_PSYCHICS_HOUSE, 4, 4 ; $B7 - mapconst ROUTE_15_GATE_1F, 5, 4 ; $B8 - mapconst ROUTE_15_GATE_2F, 4, 4 ; $B9 - mapconst ROUTE_16_GATE_1F, 7, 4 ; $BA - mapconst ROUTE_16_GATE_2F, 4, 4 ; $BB - mapconst ROUTE_16_FLY_HOUSE, 4, 4 ; $BC - mapconst ROUTE_12_SUPER_ROD_HOUSE, 4, 4 ; $BD - mapconst ROUTE_18_GATE_1F, 5, 4 ; $BE - mapconst ROUTE_18_GATE_2F, 4, 4 ; $BF - mapconst SEAFOAM_ISLANDS_1F, 9, 15 ; $C0 - mapconst ROUTE_22_GATE, 4, 5 ; $C1 - mapconst VICTORY_ROAD_2F, 9, 15 ; $C2 - mapconst ROUTE_12_GATE_2F, 4, 4 ; $C3 - mapconst VERMILION_TRADE_HOUSE, 4, 4 ; $C4 - mapconst DIGLETTS_CAVE, 18, 20 ; $C5 - mapconst VICTORY_ROAD_3F, 9, 15 ; $C6 - mapconst ROCKET_HIDEOUT_B1F, 14, 15 ; $C7 - mapconst ROCKET_HIDEOUT_B2F, 14, 15 ; $C8 - mapconst ROCKET_HIDEOUT_B3F, 14, 15 ; $C9 - mapconst ROCKET_HIDEOUT_B4F, 12, 15 ; $CA - mapconst ROCKET_HIDEOUT_ELEVATOR, 4, 3 ; $CB - mapconst UNUSED_MAP_CC, 0, 0 ; $CC - mapconst UNUSED_MAP_CD, 0, 0 ; $CD - mapconst UNUSED_MAP_CE, 0, 0 ; $CE - mapconst SILPH_CO_2F, 9, 15 ; $CF - mapconst SILPH_CO_3F, 9, 15 ; $D0 - mapconst SILPH_CO_4F, 9, 15 ; $D1 - mapconst SILPH_CO_5F, 9, 15 ; $D2 - mapconst SILPH_CO_6F, 9, 13 ; $D3 - mapconst SILPH_CO_7F, 9, 13 ; $D4 - mapconst SILPH_CO_8F, 9, 13 ; $D5 - mapconst POKEMON_MANSION_2F, 14, 15 ; $D6 - mapconst POKEMON_MANSION_3F, 9, 15 ; $D7 - mapconst POKEMON_MANSION_B1F, 14, 15 ; $D8 - mapconst SAFARI_ZONE_EAST, 13, 15 ; $D9 - mapconst SAFARI_ZONE_NORTH, 18, 20 ; $DA - mapconst SAFARI_ZONE_WEST, 13, 15 ; $DB - mapconst SAFARI_ZONE_CENTER, 13, 15 ; $DC - mapconst SAFARI_ZONE_CENTER_REST_HOUSE, 4, 4 ; $DD - mapconst SAFARI_ZONE_SECRET_HOUSE, 4, 4 ; $DE - mapconst SAFARI_ZONE_WEST_REST_HOUSE, 4, 4 ; $DF - mapconst SAFARI_ZONE_EAST_REST_HOUSE, 4, 4 ; $E0 - mapconst SAFARI_ZONE_NORTH_REST_HOUSE, 4, 4 ; $E1 - mapconst CERULEAN_CAVE_2F, 9, 15 ; $E2 - mapconst CERULEAN_CAVE_B1F, 9, 15 ; $E3 - mapconst CERULEAN_CAVE_1F, 9, 15 ; $E4 - mapconst NAME_RATERS_HOUSE, 4, 4 ; $E5 - mapconst CERULEAN_BADGE_HOUSE, 4, 4 ; $E6 - mapconst UNUSED_MAP_E7, 0, 0 ; $E7 - mapconst ROCK_TUNNEL_B1F, 18, 20 ; $E8 - mapconst SILPH_CO_9F, 9, 13 ; $E9 - mapconst SILPH_CO_10F, 9, 8 ; $EA - mapconst SILPH_CO_11F, 9, 9 ; $EB - mapconst SILPH_CO_ELEVATOR, 2, 2 ; $EC - mapconst UNUSED_MAP_ED, 0, 0 ; $ED - mapconst UNUSED_MAP_EE, 0, 0 ; $EE - mapconst TRADE_CENTER, 4, 5 ; $EF - mapconst COLOSSEUM, 4, 5 ; $F0 - mapconst UNUSED_MAP_F1, 0, 0 ; $F1 - mapconst UNUSED_MAP_F2, 0, 0 ; $F2 - mapconst UNUSED_MAP_F3, 0, 0 ; $F3 - mapconst UNUSED_MAP_F4, 0, 0 ; $F4 - mapconst LORELEIS_ROOM, 6, 5 ; $F5 - mapconst BRUNOS_ROOM, 6, 5 ; $F6 - mapconst AGATHAS_ROOM, 6, 5 ; $F7 + map_const REDS_HOUSE_1F, 4, 4 ; $25 + map_const REDS_HOUSE_2F, 4, 4 ; $26 + map_const BLUES_HOUSE, 4, 4 ; $27 + map_const OAKS_LAB, 5, 6 ; $28 + map_const VIRIDIAN_POKECENTER, 7, 4 ; $29 + map_const VIRIDIAN_MART, 4, 4 ; $2A + map_const VIRIDIAN_SCHOOL_HOUSE, 4, 4 ; $2B + map_const VIRIDIAN_NICKNAME_HOUSE, 4, 4 ; $2C + map_const VIRIDIAN_GYM, 10, 9 ; $2D + map_const DIGLETTS_CAVE_ROUTE_2, 4, 4 ; $2E + map_const VIRIDIAN_FOREST_NORTH_GATE, 5, 4 ; $2F + map_const ROUTE_2_TRADE_HOUSE, 4, 4 ; $30 + map_const ROUTE_2_GATE, 5, 4 ; $31 + map_const VIRIDIAN_FOREST_SOUTH_GATE, 5, 4 ; $32 + map_const VIRIDIAN_FOREST, 17, 24 ; $33 + map_const MUSEUM_1F, 10, 4 ; $34 + map_const MUSEUM_2F, 7, 4 ; $35 + map_const PEWTER_GYM, 5, 7 ; $36 + map_const PEWTER_NIDORAN_HOUSE, 4, 4 ; $37 + map_const PEWTER_MART, 4, 4 ; $38 + map_const PEWTER_SPEECH_HOUSE, 4, 4 ; $39 + map_const PEWTER_POKECENTER, 7, 4 ; $3A + map_const MT_MOON_1F, 20, 18 ; $3B + map_const MT_MOON_B1F, 14, 14 ; $3C + map_const MT_MOON_B2F, 20, 18 ; $3D + map_const CERULEAN_TRASHED_HOUSE, 4, 4 ; $3E + map_const CERULEAN_TRADE_HOUSE, 4, 4 ; $3F + map_const CERULEAN_POKECENTER, 7, 4 ; $40 + map_const CERULEAN_GYM, 5, 7 ; $41 + map_const BIKE_SHOP, 4, 4 ; $42 + map_const CERULEAN_MART, 4, 4 ; $43 + map_const MT_MOON_POKECENTER, 7, 4 ; $44 + map_const CERULEAN_TRASHED_HOUSE_COPY, 4, 4 ; $45 + map_const ROUTE_5_GATE, 4, 3 ; $46 + map_const UNDERGROUND_PATH_ROUTE_5, 4, 4 ; $47 + map_const DAYCARE, 4, 4 ; $48 + map_const ROUTE_6_GATE, 4, 3 ; $49 + map_const UNDERGROUND_PATH_ROUTE_6, 4, 4 ; $4A + map_const UNDERGROUND_PATH_ROUTE_6_COPY, 4, 4 ; $4B + map_const ROUTE_7_GATE, 3, 4 ; $4C + map_const UNDERGROUND_PATH_ROUTE_7, 4, 4 ; $4D + map_const UNDERGROUND_PATH_ROUTE_7_COPY, 4, 4 ; $4E + map_const ROUTE_8_GATE, 3, 4 ; $4F + map_const UNDERGROUND_PATH_ROUTE_8, 4, 4 ; $50 + map_const ROCK_TUNNEL_POKECENTER, 7, 4 ; $51 + map_const ROCK_TUNNEL_1F, 20, 18 ; $52 + map_const POWER_PLANT, 20, 18 ; $53 + map_const ROUTE_11_GATE_1F, 4, 5 ; $54 + map_const DIGLETTS_CAVE_ROUTE_11, 4, 4 ; $55 + map_const ROUTE_11_GATE_2F, 4, 4 ; $56 + map_const ROUTE_12_GATE_1F, 5, 4 ; $57 + map_const BILLS_HOUSE, 4, 4 ; $58 + map_const VERMILION_POKECENTER, 7, 4 ; $59 + map_const POKEMON_FAN_CLUB, 4, 4 ; $5A + map_const VERMILION_MART, 4, 4 ; $5B + map_const VERMILION_GYM, 5, 9 ; $5C + map_const VERMILION_PIDGEY_HOUSE, 4, 4 ; $5D + map_const VERMILION_DOCK, 14, 6 ; $5E + map_const SS_ANNE_1F, 20, 9 ; $5F + map_const SS_ANNE_2F, 20, 9 ; $60 + map_const SS_ANNE_3F, 10, 3 ; $61 + map_const SS_ANNE_B1F, 15, 4 ; $62 + map_const SS_ANNE_BOW, 10, 7 ; $63 + map_const SS_ANNE_KITCHEN, 7, 8 ; $64 + map_const SS_ANNE_CAPTAINS_ROOM, 3, 4 ; $65 + map_const SS_ANNE_1F_ROOMS, 12, 8 ; $66 + map_const SS_ANNE_2F_ROOMS, 12, 8 ; $67 + map_const SS_ANNE_B1F_ROOMS, 12, 8 ; $68 + map_const UNUSED_MAP_69, 0, 0 ; $69 + map_const UNUSED_MAP_6A, 0, 0 ; $6A + map_const UNUSED_MAP_6B, 0, 0 ; $6B + map_const VICTORY_ROAD_1F, 10, 9 ; $6C + map_const UNUSED_MAP_6D, 0, 0 ; $6D + map_const UNUSED_MAP_6E, 0, 0 ; $6E + map_const UNUSED_MAP_6F, 0, 0 ; $6F + map_const UNUSED_MAP_70, 0, 0 ; $70 + map_const LANCES_ROOM, 13, 13 ; $71 + map_const UNUSED_MAP_72, 0, 0 ; $72 + map_const UNUSED_MAP_73, 0, 0 ; $73 + map_const UNUSED_MAP_74, 0, 0 ; $74 + map_const UNUSED_MAP_75, 0, 0 ; $75 + map_const HALL_OF_FAME, 5, 4 ; $76 + map_const UNDERGROUND_PATH_NORTH_SOUTH, 4, 24 ; $77 + map_const CHAMPIONS_ROOM, 4, 4 ; $78 + map_const UNDERGROUND_PATH_WEST_EAST, 25, 4 ; $79 + map_const CELADON_MART_1F, 10, 4 ; $7A + map_const CELADON_MART_2F, 10, 4 ; $7B + map_const CELADON_MART_3F, 10, 4 ; $7C + map_const CELADON_MART_4F, 10, 4 ; $7D + map_const CELADON_MART_ROOF, 10, 4 ; $7E + map_const CELADON_MART_ELEVATOR, 2, 2 ; $7F + map_const CELADON_MANSION_1F, 4, 6 ; $80 + map_const CELADON_MANSION_2F, 4, 6 ; $81 + map_const CELADON_MANSION_3F, 4, 6 ; $82 + map_const CELADON_MANSION_ROOF, 4, 6 ; $83 + map_const CELADON_MANSION_ROOF_HOUSE, 4, 4 ; $84 + map_const CELADON_POKECENTER, 7, 4 ; $85 + map_const CELADON_GYM, 5, 9 ; $86 + map_const GAME_CORNER, 10, 9 ; $87 + map_const CELADON_MART_5F, 10, 4 ; $88 + map_const GAME_CORNER_PRIZE_ROOM, 5, 4 ; $89 + map_const CELADON_DINER, 5, 4 ; $8A + map_const CELADON_CHIEF_HOUSE, 4, 4 ; $8B + map_const CELADON_HOTEL, 7, 4 ; $8C + map_const LAVENDER_POKECENTER, 7, 4 ; $8D + map_const POKEMON_TOWER_1F, 10, 9 ; $8E + map_const POKEMON_TOWER_2F, 10, 9 ; $8F + map_const POKEMON_TOWER_3F, 10, 9 ; $90 + map_const POKEMON_TOWER_4F, 10, 9 ; $91 + map_const POKEMON_TOWER_5F, 10, 9 ; $92 + map_const POKEMON_TOWER_6F, 10, 9 ; $93 + map_const POKEMON_TOWER_7F, 10, 9 ; $94 + map_const MR_FUJIS_HOUSE, 4, 4 ; $95 + map_const LAVENDER_MART, 4, 4 ; $96 + map_const LAVENDER_CUBONE_HOUSE, 4, 4 ; $97 + map_const FUCHSIA_MART, 4, 4 ; $98 + map_const FUCHSIA_BILLS_GRANDPAS_HOUSE, 4, 4 ; $99 + map_const FUCHSIA_POKECENTER, 7, 4 ; $9A + map_const WARDENS_HOUSE, 5, 4 ; $9B + map_const SAFARI_ZONE_GATE, 4, 3 ; $9C + map_const FUCHSIA_GYM, 5, 9 ; $9D + map_const FUCHSIA_MEETING_ROOM, 7, 4 ; $9E + map_const SEAFOAM_ISLANDS_B1F, 15, 9 ; $9F + map_const SEAFOAM_ISLANDS_B2F, 15, 9 ; $A0 + map_const SEAFOAM_ISLANDS_B3F, 15, 9 ; $A1 + map_const SEAFOAM_ISLANDS_B4F, 15, 9 ; $A2 + map_const VERMILION_OLD_ROD_HOUSE, 4, 4 ; $A3 + map_const FUCHSIA_GOOD_ROD_HOUSE, 4, 4 ; $A4 + map_const POKEMON_MANSION_1F, 15, 14 ; $A5 + map_const CINNABAR_GYM, 10, 9 ; $A6 + map_const CINNABAR_LAB, 9, 4 ; $A7 + map_const CINNABAR_LAB_TRADE_ROOM, 4, 4 ; $A8 + map_const CINNABAR_LAB_METRONOME_ROOM, 4, 4 ; $A9 + map_const CINNABAR_LAB_FOSSIL_ROOM, 4, 4 ; $AA + map_const CINNABAR_POKECENTER, 7, 4 ; $AB + map_const CINNABAR_MART, 4, 4 ; $AC + map_const CINNABAR_MART_COPY, 4, 4 ; $AD + map_const INDIGO_PLATEAU_LOBBY, 8, 6 ; $AE + map_const COPYCATS_HOUSE_1F, 4, 4 ; $AF + map_const COPYCATS_HOUSE_2F, 4, 4 ; $B0 + map_const FIGHTING_DOJO, 5, 6 ; $B1 + map_const SAFFRON_GYM, 10, 9 ; $B2 + map_const SAFFRON_PIDGEY_HOUSE, 4, 4 ; $B3 + map_const SAFFRON_MART, 4, 4 ; $B4 + map_const SILPH_CO_1F, 15, 9 ; $B5 + map_const SAFFRON_POKECENTER, 7, 4 ; $B6 + map_const MR_PSYCHICS_HOUSE, 4, 4 ; $B7 + map_const ROUTE_15_GATE_1F, 4, 5 ; $B8 + map_const ROUTE_15_GATE_2F, 4, 4 ; $B9 + map_const ROUTE_16_GATE_1F, 4, 7 ; $BA + map_const ROUTE_16_GATE_2F, 4, 4 ; $BB + map_const ROUTE_16_FLY_HOUSE, 4, 4 ; $BC + map_const ROUTE_12_SUPER_ROD_HOUSE, 4, 4 ; $BD + map_const ROUTE_18_GATE_1F, 4, 5 ; $BE + map_const ROUTE_18_GATE_2F, 4, 4 ; $BF + map_const SEAFOAM_ISLANDS_1F, 15, 9 ; $C0 + map_const ROUTE_22_GATE, 5, 4 ; $C1 + map_const VICTORY_ROAD_2F, 15, 9 ; $C2 + map_const ROUTE_12_GATE_2F, 4, 4 ; $C3 + map_const VERMILION_TRADE_HOUSE, 4, 4 ; $C4 + map_const DIGLETTS_CAVE, 20, 18 ; $C5 + map_const VICTORY_ROAD_3F, 15, 9 ; $C6 + map_const ROCKET_HIDEOUT_B1F, 15, 14 ; $C7 + map_const ROCKET_HIDEOUT_B2F, 15, 14 ; $C8 + map_const ROCKET_HIDEOUT_B3F, 15, 14 ; $C9 + map_const ROCKET_HIDEOUT_B4F, 15, 12 ; $CA + map_const ROCKET_HIDEOUT_ELEVATOR, 3, 4 ; $CB + map_const UNUSED_MAP_CC, 0, 0 ; $CC + map_const UNUSED_MAP_CD, 0, 0 ; $CD + map_const UNUSED_MAP_CE, 0, 0 ; $CE + map_const SILPH_CO_2F, 15, 9 ; $CF + map_const SILPH_CO_3F, 15, 9 ; $D0 + map_const SILPH_CO_4F, 15, 9 ; $D1 + map_const SILPH_CO_5F, 15, 9 ; $D2 + map_const SILPH_CO_6F, 13, 9 ; $D3 + map_const SILPH_CO_7F, 13, 9 ; $D4 + map_const SILPH_CO_8F, 13, 9 ; $D5 + map_const POKEMON_MANSION_2F, 15, 14 ; $D6 + map_const POKEMON_MANSION_3F, 15, 9 ; $D7 + map_const POKEMON_MANSION_B1F, 15, 14 ; $D8 + map_const SAFARI_ZONE_EAST, 15, 13 ; $D9 + map_const SAFARI_ZONE_NORTH, 20, 18 ; $DA + map_const SAFARI_ZONE_WEST, 15, 13 ; $DB + map_const SAFARI_ZONE_CENTER, 15, 13 ; $DC + map_const SAFARI_ZONE_CENTER_REST_HOUSE, 4, 4 ; $DD + map_const SAFARI_ZONE_SECRET_HOUSE, 4, 4 ; $DE + map_const SAFARI_ZONE_WEST_REST_HOUSE, 4, 4 ; $DF + map_const SAFARI_ZONE_EAST_REST_HOUSE, 4, 4 ; $E0 + map_const SAFARI_ZONE_NORTH_REST_HOUSE, 4, 4 ; $E1 + map_const CERULEAN_CAVE_2F, 15, 9 ; $E2 + map_const CERULEAN_CAVE_B1F, 15, 9 ; $E3 + map_const CERULEAN_CAVE_1F, 15, 9 ; $E4 + map_const NAME_RATERS_HOUSE, 4, 4 ; $E5 + map_const CERULEAN_BADGE_HOUSE, 4, 4 ; $E6 + map_const UNUSED_MAP_E7, 0, 0 ; $E7 + map_const ROCK_TUNNEL_B1F, 20, 18 ; $E8 + map_const SILPH_CO_9F, 13, 9 ; $E9 + map_const SILPH_CO_10F, 8, 9 ; $EA + map_const SILPH_CO_11F, 9, 9 ; $EB + map_const SILPH_CO_ELEVATOR, 2, 2 ; $EC + map_const UNUSED_MAP_ED, 0, 0 ; $ED + map_const UNUSED_MAP_EE, 0, 0 ; $EE + map_const TRADE_CENTER, 5, 4 ; $EF + map_const COLOSSEUM, 5, 4 ; $F0 + map_const UNUSED_MAP_F1, 0, 0 ; $F1 + map_const UNUSED_MAP_F2, 0, 0 ; $F2 + map_const UNUSED_MAP_F3, 0, 0 ; $F3 + map_const UNUSED_MAP_F4, 0, 0 ; $F4 + map_const LORELEIS_ROOM, 5, 6 ; $F5 + map_const BRUNOS_ROOM, 5, 6 ; $F6 + map_const AGATHAS_ROOM, 5, 6 ; $F7 DEF NUM_MAPS EQU const_value ; Indoor maps, such as houses, use this as the Map ID in their exit warps From cab3ccdbbd661aa75b9861aeaaa11fd0446c8113 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 11 Sep 2022 15:00:31 -0400 Subject: [PATCH 44/45] Comment about UndergroundPathNorthSouth.blk size Fixes #387 --- constants/map_constants.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 644cfab49..dad635792 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -138,7 +138,7 @@ DEF FIRST_INDOOR_MAP EQU const_value map_const UNUSED_MAP_74, 0, 0 ; $74 map_const UNUSED_MAP_75, 0, 0 ; $75 map_const HALL_OF_FAME, 5, 4 ; $76 - map_const UNDERGROUND_PATH_NORTH_SOUTH, 4, 24 ; $77 + map_const UNDERGROUND_PATH_NORTH_SOUTH, 4, 24 ; $77 ; UndergroundPathNorthSouth.blk is actually 4x23 map_const CHAMPIONS_ROOM, 4, 4 ; $78 map_const UNDERGROUND_PATH_WEST_EAST, 25, 4 ; $79 map_const CELADON_MART_1F, 10, 4 ; $7A From d809d3d59c0c1016b89332be7f6f3003efa7a9f9 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 11 Sep 2022 15:02:51 -0400 Subject: [PATCH 45/45] Add `UNUSED_TYPE`/`UNUSED_TYPE_END` constants Fixes #385 --- constants/type_constants.asm | 2 ++ data/types/names.asm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/constants/type_constants.asm b/constants/type_constants.asm index e9df7faf0..8226af1ab 100644 --- a/constants/type_constants.asm +++ b/constants/type_constants.asm @@ -12,7 +12,9 @@ DEF PHYSICAL EQU const_value const BUG ; $07 const GHOST ; $08 +DEF UNUSED_TYPES EQU const_value const_next 20 +DEF UNUSED_TYPES_END EQU const_value DEF SPECIAL EQU const_value const FIRE ; $14 diff --git a/data/types/names.asm b/data/types/names.asm index b63c072e1..87da5c5fd 100644 --- a/data/types/names.asm +++ b/data/types/names.asm @@ -11,7 +11,7 @@ TypeNames: dw .Bug dw .Ghost -REPT FIRE - GHOST - 1 +REPT UNUSED_TYPES_END - UNUSED_TYPES dw .Normal ENDR