From 108bf2981d8a0cbfa0ce0f19b3d6f5d1d549e06c Mon Sep 17 00:00:00 2001 From: PokefanMarcel <166040321+PokefanMarcel@users.noreply.github.com> Date: Sun, 7 Sep 2025 18:46:26 +0200 Subject: [PATCH 1/7] Use RAMG_SRAM_ENABLE (#530) --- 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 6285a330..c5d6a1d1 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -6373,7 +6373,7 @@ LoadPlayerBackPic: jr nz, .loop ld de, vBackPic call InterlaceMergeSpriteBuffers - ld a, $a + ld a, RAMG_SRAM_ENABLE ld [rRAMG], a xor a ld [rRAMB], a From 59da8c8122ebb8fcc334d4e5421e4fb333eea730 Mon Sep 17 00:00:00 2001 From: PokefanMarcel <166040321+PokefanMarcel@users.noreply.github.com> Date: Wed, 10 Sep 2025 21:48:30 +0200 Subject: [PATCH 2/7] Clean up home/copy2.asm (#531) * Use `SCREEN_WIDTH`, rename loop, and remove obsolete comment in `ClearScreenArea` * Use `SCREEN_HEIGHT` and `lb` in `CopyScreenTileBufferToVRAM` * Use `SCREEN_AREA` in `ClearScreen` --- home/copy2.asm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/home/copy2.asm b/home/copy2.asm index 06c45b59..9e5b1f14 100644 --- a/home/copy2.asm +++ b/home/copy2.asm @@ -161,39 +161,39 @@ CopyVideoDataDouble:: ClearScreenArea:: ; Clear tilemap area cxb at hl. - ld a, " " ; blank tile - ld de, 20 ; screen width -.y + ld a, " " + ld de, SCREEN_WIDTH +.loopRows push hl push bc -.x +.loopTiles ld [hli], a dec c - jr nz, .x + jr nz, .loopTiles pop bc pop hl add hl, de dec b - jr nz, .y + jr nz, .loopRows ret CopyScreenTileBufferToVRAM:: ; Copy wTileMap to the BG Map starting at b * $100. ; This is done in thirds of 6 rows, so it takes 3 frames. - ld c, 6 + ld c, SCREEN_HEIGHT / 3 - ld hl, $600 * 0 + lb hl, 0, 0 decoord 0, 6 * 0 call .setup call DelayFrame - ld hl, $600 * 1 + lb hl, SCREEN_HEIGHT / 3, 0 decoord 0, 6 * 1 call .setup call DelayFrame - ld hl, $600 * 2 + lb hl, 2 * SCREEN_HEIGHT / 3, 0 decoord 0, 6 * 2 call .setup jp DelayFrame @@ -215,7 +215,7 @@ CopyScreenTileBufferToVRAM:: ClearScreen:: ; Clear wTileMap, then wait ; for the bg map to update. - ld bc, 20 * 18 + ld bc, SCREEN_AREA inc b hlcoord 0, 0 ld a, " " From 628797baffe7ea7dd4b224116d9704c7ae1b9c29 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 26 Sep 2025 16:55:23 -0400 Subject: [PATCH 3/7] Revise some RAM buffer constants --- constants/pokemon_data_constants.asm | 6 ++---- constants/text_constants.asm | 10 +++++----- engine/items/item_effects.asm | 4 ++-- engine/menus/party_menu.asm | 2 +- engine/overworld/wild_mons.asm | 6 +++--- ram/wram.asm | 12 +++++++----- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm index e174f78d..1234acab 100644 --- a/constants/pokemon_data_constants.asm +++ b/constants/pokemon_data_constants.asm @@ -64,7 +64,6 @@ DEF HOF_MON EQU $10 DEF HOF_TEAM EQU PARTY_LENGTH * HOF_MON DEF HOF_TEAM_CAPACITY EQU 50 - ; mon data locations ; Note that some values are not supported by all functions that use these values. const_def @@ -74,15 +73,14 @@ DEF HOF_TEAM_CAPACITY EQU 50 const DAYCARE_DATA ; 3 const BATTLE_MON_DATA ; 4 - -; See data/pokemon/evos_moves.asm - ; Evolution types const_def 1 const EVOLVE_LEVEL ; 1 const EVOLVE_ITEM ; 2 const EVOLVE_TRADE ; 3 +; evolution data (see data/pokemon/evos_moves.asm) +DEF NUM_EVOS_IN_BUFFER EQU 3 ; wMonHGrowthRate values ; GrowthRateTable indexes (see data/growth_rates.asm) diff --git a/constants/text_constants.asm b/constants/text_constants.asm index d4e259fe..4dbdf666 100644 --- a/constants/text_constants.asm +++ b/constants/text_constants.asm @@ -1,5 +1,5 @@ -DEF NAME_LENGTH EQU 11 -DEF ITEM_NAME_LENGTH EQU 13 +DEF NAME_LENGTH EQU 11 +DEF ITEM_NAME_LENGTH EQU 13 DEF NAME_BUFFER_LENGTH EQU 20 ; PrintNumber, PrintBCDNumber @@ -8,9 +8,9 @@ DEF NAME_BUFFER_LENGTH EQU 20 const BIT_LEFT_ALIGN ; 6 const BIT_LEADING_ZEROES ; 7 -DEF MONEY_SIGN EQU (1 << BIT_MONEY_SIGN) -DEF LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN) -DEF 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 diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 8a96c517..1b68e47a 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -2195,7 +2195,7 @@ ItemUseTMHM: .chooseMon ld hl, wStringBuffer ld de, wTempMoveNameBuffer - ld bc, 14 + ld bc, ITEM_NAME_LENGTH + 1 call CopyData ; save the move name because DisplayPartyMenu will overwrite it ld a, $ff ld [wUpdateSpritesEnabled], a @@ -2205,7 +2205,7 @@ ItemUseTMHM: push af ld hl, wTempMoveNameBuffer ld de, wStringBuffer - ld bc, 14 + ld bc, ITEM_NAME_LENGTH + 1 call CopyData pop af jr nc, .checkIfAbleToLearnMove diff --git a/engine/menus/party_menu.asm b/engine/menus/party_menu.asm index e6388b5f..81472c31 100644 --- a/engine/menus/party_menu.asm +++ b/engine/menus/party_menu.asm @@ -131,7 +131,7 @@ RedrawPartyMenu_:: ld l, a ld de, wEvoDataBuffer ld a, BANK(EvosMovesPointerTable) - ld bc, 4 * 3 + 1 ; enough for Eevee's three 4-byte evolutions and 0 terminator + ld bc, wEvoDataBufferEnd - wEvoDataBuffer call FarCopyData ld hl, wEvoDataBuffer ld de, .notAbleToEvolveText diff --git a/engine/overworld/wild_mons.asm b/engine/overworld/wild_mons.asm index 2593e0ec..2b186e75 100644 --- a/engine/overworld/wild_mons.asm +++ b/engine/overworld/wild_mons.asm @@ -16,10 +16,10 @@ LoadWildData:: jr z, .NoGrassData ; if no grass data, skip to surfing data push hl ld de, wGrassMons ; otherwise, load grass data - ld bc, $14 + ld bc, WILDDATA_LENGTH - 1 call CopyData pop hl - ld bc, $14 + ld bc, WILDDATA_LENGTH - 1 add hl, bc .NoGrassData ld a, [hli] @@ -27,7 +27,7 @@ LoadWildData:: and a ret z ; if no water data, we're done ld de, wWaterMons ; otherwise, load surfing data - ld bc, $14 + ld bc, WILDDATA_LENGTH - 1 jp CopyData INCLUDE "data/wild/grass_water.asm" diff --git a/ram/wram.asm b/ram/wram.asm index 504eb646..0121b065 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -890,6 +890,7 @@ wDownscaledMonSize:: ; FormatMovesString stores the number of moves minus one here wNumMovesMinusOne:: db +; This union spans 20 bytes. UNION ; storage buffer for various name strings wNameBuffer:: ds NAME_BUFFER_LENGTH @@ -905,7 +906,8 @@ wPayDayMoney:: ds 3 NEXTU ; evolution data for one mon -wEvoDataBuffer:: ds 4 * 3 + 1 ; enough for Eevee's three 4-byte evolutions and 0 terminator +wEvoDataBuffer:: ds NUM_EVOS_IN_BUFFER * 4 + 1 ; enough for Eevee's three 4-byte evolutions and 0 terminator +wEvoDataBufferEnd:: NEXTU wBattleMenuCurrentPP:: db @@ -1068,7 +1070,7 @@ wPartyMenuBlkPacket:: ds $30 NEXTU ds 29 ; storage buffer for various strings -wStringBuffer:: ds 20 +wStringBuffer:: ds NAME_BUFFER_LENGTH NEXTU ds 29 @@ -1206,7 +1208,7 @@ wTrainerPicPointer:: dw ds 1 UNION -wTempMoveNameBuffer:: ds 14 +wTempMoveNameBuffer:: ds ITEM_NAME_LENGTH + 1 NEXTU ; The name of the mon that is learning a move. @@ -2136,12 +2138,12 @@ wEventFlags:: flag_array NUM_EVENTS UNION wGrassRate:: db -wGrassMons:: ds 10 * 2 +wGrassMons:: ds WILDDATA_LENGTH - 1 ds 8 wWaterRate:: db -wWaterMons:: ds 10 * 2 +wWaterMons:: ds WILDDATA_LENGTH - 1 NEXTU ; linked game's trainer name From e3af20b907fad59bcbee7d36ab4912d0cc5f2935 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 5 Oct 2025 10:53:31 -0400 Subject: [PATCH 4/7] Consistently use `ld [hli]`/`ld [hld]`, not `ldi`/`ldd` --- engine/battle/core.asm | 14 +++++++------- engine/battle/move_effects/substitute.asm | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/engine/battle/core.asm b/engine/battle/core.asm index c5d6a1d1..83a52c2a 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -4160,7 +4160,7 @@ IgnoredOrdersText: GetDamageVarsForPlayerAttack: xor a ld hl, wDamage ; damage to eventually inflict, initialise to zero - ldi [hl], a + ld [hli], a ld [hl], a ld hl, wPlayerMovePower ld a, [hli] @@ -4466,8 +4466,8 @@ CalculateDamage: xor a ld hl, hDividend - ldi [hl], a - ldi [hl], a + ld [hli], a + ld [hli], a ld [hl], a ; Multiply level by 2 @@ -4480,11 +4480,11 @@ CalculateDamage: pop af .nc inc hl - ldi [hl], a + ld [hli], a ; Divide by 5 ld a, 5 - ldd [hl], a + ld [hld], a push bc ld b, 4 call Divide @@ -4723,7 +4723,7 @@ HandleCounterMove: ; if it did damage, double it ld a, [hl] add a - ldd [hl], a + ld [hld], a ld a, [hl] adc a ld [hl], a @@ -5074,7 +5074,7 @@ HandleBuildingRage: call StatModifierUpEffect ; stat modifier raising function pop hl xor a - ldd [hl], a ; null move effect + ld [hld], a ; null move effect ld a, RAGE ld [hl], a ; restore the target pokemon's move number to Rage ldh a, [hWhoseTurn] diff --git a/engine/battle/move_effects/substitute.asm b/engine/battle/move_effects/substitute.asm index b1fd8ac2..e4311209 100644 --- a/engine/battle/move_effects/substitute.asm +++ b/engine/battle/move_effects/substitute.asm @@ -39,7 +39,7 @@ SubstituteEffect_: jr c, .notEnoughHP ; underflow means user would be left with negative health ; bug: since it only branches on carry, it will possibly leave user with 0 HP .userHasZeroOrMoreHP - ldi [hl], a ; save resulting HP after subtraction into current HP + ld [hli], a ; save resulting HP after subtraction into current HP ld [hl], d ld h, b ld l, c From c2d81fb5983e5ebeec8e4ae985060a0ccfa9b8e4 Mon Sep 17 00:00:00 2001 From: PokefanMarcel <166040321+PokefanMarcel@users.noreply.github.com> Date: Thu, 6 Nov 2025 20:06:33 +0100 Subject: [PATCH 5/7] Expand comment on `_AfterTrade2Text ` to mention pokeyellow's changes (#536) --- data/events/trades.asm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/events/trades.asm b/data/events/trades.asm index 2f5b9116..8734d1d4 100644 --- a/data/events/trades.asm +++ b/data/events/trades.asm @@ -13,7 +13,8 @@ TradeMons: ; Red/Green. Japanese Blue changed _AfterTrade2Text to say your Pokémon ; "went and evolved" and also changed the trades to match. English ; Red/Blue uses the original JP Red/Green trades but with the JP Blue - ; post-trade text. + ; post-trade text. English Yellow changed _AfterTrade2Text to + ; not mention evolution. npctrade NIDORINO, NIDORINA, TRADE_DIALOGSET_CASUAL, "TERRY" npctrade ABRA, MR_MIME, TRADE_DIALOGSET_CASUAL, "MARCEL" npctrade BUTTERFREE, BEEDRILL, TRADE_DIALOGSET_HAPPY, "CHIKUCHIKU" ; unused From 8105df94a3cac2e72f2d63988f39627d1da2c7c1 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Wed, 12 Nov 2025 13:42:41 -0500 Subject: [PATCH 6/7] Use the same tools/make_patch.c as Gen 2 The `--ignore` flag is not needed in Gen 1 --- tools/make_patch.c | 71 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 59 insertions(+), 12 deletions(-) diff --git a/tools/make_patch.c b/tools/make_patch.c index 82b018fd..0d874fdc 100644 --- a/tools/make_patch.c +++ b/tools/make_patch.c @@ -1,5 +1,5 @@ #define PROGRAM_NAME "make_patch" -#define USAGE_OPTS "values.sym patched.gbc original.gbc vc.patch.template vc.patch" +#define USAGE_OPTS "[--ignore addr:size] values.sym patched.gbc original.gbc vc.patch.template vc.patch" #include "common.h" @@ -127,7 +127,7 @@ struct Symbol *parse_symbols(const char *filename) { 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'}); + 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 @@ -143,7 +143,7 @@ struct Symbol *parse_symbols(const char *filename) { // 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'}); + buffer_append(buffer, &(char){'\0'}); parse_symbol_value(buffer->data, &bank, &address); } buffer->size = 0; @@ -349,7 +349,15 @@ void skip_to_next_line(FILE *restrict input, FILE *restrict output) { } } -struct Buffer *process_template(const char *template_filename, const char *patch_filename, FILE *restrict new_rom, FILE *restrict orig_rom, const struct Symbol *symbols) { +struct Buffer *process_template( + const char *template_filename, + const char *patch_filename, + FILE *restrict new_rom, + FILE *restrict orig_rom, + const struct Symbol *symbols, + unsigned int ignore_addr, + unsigned int ignore_size +) { FILE *input = xfopen(template_filename, 'r'); FILE *output = xfopen(patch_filename, 'w'); @@ -358,6 +366,11 @@ 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 ignored data will always differ + unsigned int rom_size = (unsigned int)xfsize("", orig_rom); + if (ignore_size > 0 && ignore_size <= rom_size && ignore_addr <= rom_size - ignore_size) { + buffer_append(patches, &(struct Patch){ignore_addr, ignore_size}); + } // Fill in the template const struct Symbol *current_hook = NULL; @@ -375,7 +388,7 @@ struct Buffer *process_template(const char *template_filename, const char *patch for (c = getc(input); c != EOF && c != '}'; c = getc(input)) { buffer_append(buffer, &c); } - buffer_append(buffer, &(char []){'\0'}); + 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; @@ -404,7 +417,7 @@ struct Buffer *process_template(const char *template_filename, const char *patch buffer_append(buffer, &c); } } - buffer_append(buffer, &(char []){'\0'}); + 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); @@ -458,19 +471,53 @@ bool verify_completeness(FILE *restrict orig_rom, FILE *restrict new_rom, struct } } +void parse_args(int argc, char *argv[], unsigned int *ignore_addr, unsigned int *ignore_size) { + struct option long_options[] = { + {"ignore", required_argument, 0, 'i'}, + {"help", no_argument, 0, 'h'}, + {0} + }; + for (int opt; (opt = getopt_long(argc, argv, "h", long_options)) != -1;) { + switch (opt) { + case 'i': { + char *colon = strchr(optarg, ':'); + if (colon) { + *colon++ = '\0'; + *ignore_addr = strtoul(optarg, NULL, 0); + *ignore_size = strtoul(colon, NULL, 0); + } else { + error_exit("Error: Invalid argument for '--ignore': \"%s\"\n", optarg); + } + break; + } + case 'h': + usage_exit(0); + break; + default: + usage_exit(1); + } + } +} + int main(int argc, char *argv[]) { - if (argc != 6) { + unsigned int ignore_addr = 0, ignore_size = 0; + + parse_args(argc, argv, &ignore_addr, &ignore_size); + + argc -= optind; + argv += optind; + if (argc != 5) { usage_exit(1); } - struct Symbol *symbols = parse_symbols(argv[1]); + struct Symbol *symbols = parse_symbols(argv[0]); - FILE *new_rom = xfopen(argv[2], 'r'); - FILE *orig_rom = xfopen(argv[3], 'r'); - struct Buffer *patches = process_template(argv[4], argv[5], new_rom, orig_rom, symbols); + FILE *new_rom = xfopen(argv[1], 'r'); + FILE *orig_rom = xfopen(argv[2], 'r'); + struct Buffer *patches = process_template(argv[3], argv[4], new_rom, orig_rom, symbols, ignore_addr, ignore_size); if (!verify_completeness(orig_rom, new_rom, patches)) { - fprintf(stderr, PROGRAM_NAME ": Warning: Not all ROM differences are defined by \"%s\"\n", argv[5]); + fprintf(stderr, PROGRAM_NAME ": Warning: Not all ROM differences are defined by \"%s\"\n", argv[4]); } symbol_free(symbols); From 5943b96cf6d5eda52df2ad689af0ac251e4e0841 Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Wed, 12 Nov 2025 15:44:07 -0500 Subject: [PATCH 7/7] Use features of RGBDS 1.0.0 (#537) --- .github/workflows/main.yml | 2 +- .rgbds-version | 2 +- INSTALL.md | 20 +++--- Makefile | 51 ++++++++------ engine/battle/animations.asm | 6 +- engine/battle/core.asm | 42 ++++++------ engine/battle/effects.asm | 2 +- engine/battle/link_battle_versus_text.asm | 4 +- engine/battle/misc.asm | 10 +-- engine/battle/print_type.asm | 2 +- engine/battle/save_trainer_name.asm | 2 +- engine/events/diploma.asm | 2 +- engine/events/evolve_trade.asm | 6 +- engine/events/give_pokemon.asm | 8 +-- engine/events/pokedex_rating.asm | 2 +- engine/gfx/hp_bar.asm | 2 +- engine/items/town_map.asm | 10 +-- engine/link/cable_club.asm | 16 ++--- engine/menus/main_menu.asm | 10 +-- engine/menus/naming_screen.asm | 18 ++--- engine/menus/party_menu.asm | 2 +- engine/menus/pokedex.asm | 20 +++--- engine/menus/save.asm | 6 +- engine/menus/start_sub_menus.asm | 8 +-- engine/menus/text_box.asm | 2 +- engine/movie/credits.asm | 2 +- engine/movie/hall_of_fame.asm | 2 +- engine/movie/oak_speech/oak_speech2.asm | 6 +- engine/movie/title.asm | 2 +- engine/movie/trade.asm | 4 +- engine/overworld/player_state.asm | 2 +- engine/pokemon/bills_pc.asm | 14 ++-- engine/pokemon/evos_moves.asm | 2 +- engine/pokemon/status_ailments.asm | 30 ++++---- engine/pokemon/status_screen.asm | 16 ++--- engine/slots/slot_machine.asm | 2 +- home/copy2.asm | 4 +- home/copy_string.asm | 2 +- home/list_menu.asm | 8 +-- home/names.asm | 8 +-- home/names2.asm | 2 +- home/pokemon.asm | 10 +-- home/print_bcd.asm | 10 +-- home/print_num.asm | 8 +-- home/text.asm | 84 +++++++++++------------ home/vcopy.asm | 2 +- home/window.asm | 16 ++--- macros/asserts.asm | 44 ++++++------ macros/code.asm | 4 +- macros/const.asm | 16 ++--- macros/coords.asm | 36 +++++----- macros/data.asm | 24 +++---- macros/gfx.asm | 4 +- macros/predef.asm | 14 ++-- macros/ram.asm | 2 +- macros/scripts/maps.asm | 8 +-- macros/vc.asm | 12 ++-- rgbdscheck.asm | 8 +-- scripts/Route23.asm | 2 +- vc/pokeblue.constants.asm | 44 ++++++------ vc/pokered.constants.asm | 44 ++++++------ 61 files changed, 378 insertions(+), 375 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 570c217c..968b5026 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@master with: path: rgbds - ref: v0.9.3 + ref: v1.0.0 repository: gbdev/rgbds - name: Install rgbds diff --git a/.rgbds-version b/.rgbds-version index 965065db..3eefcb9d 100644 --- a/.rgbds-version +++ b/.rgbds-version @@ -1 +1 @@ -0.9.3 +1.0.0 diff --git a/INSTALL.md b/INSTALL.md index 7add0173..ec45f109 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -42,9 +42,9 @@ 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#pre-built) for Windows with Cygwin to install **rgbds 0.9.3**. +Then follow the [**rgbds** install instructions](https://rgbds.gbdev.io/install#pre-built) for Windows with Cygwin to install **rgbds 1.0.0**. -**Note:** If you already have an installed rgbds older than 0.9.3, you will need to update to 0.9.3. Ignore this if you have never installed rgbds before. If a version newer than 0.9.3 does not work, try downloading 0.9.3. +**Note:** If you already have an installed rgbds older than 1.0.0, you will need to update to 1.0.0. Ignore this if you have never installed rgbds before. If a version newer than 1.0.0 does not work, try downloading 1.0.0. Now open the **Cygwin terminal** and enter the following commands. @@ -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#pre-built) for macOS to install **rgbds 0.9.3**. +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for macOS to install **rgbds 1.0.0**. 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#building-from-source) to build **rgbds 0.9.3** from source. +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 1.0.0** 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#building-from-source) to build **rgbds 0.9.3** from source. +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 1.0.0** from source. ### Arch Linux @@ -104,7 +104,7 @@ To install the software required for **pokered**: sudo pacman -S make gcc git rgbds ``` -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.9.3** 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 1.0.0** from source. ### Termux @@ -120,7 +120,7 @@ To install **rgbds**: pkg install rgbds ``` -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.9.3** 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 1.0.0** from source. ### Other distros @@ -131,7 +131,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#building-from-source) to build **rgbds 0.9.3** 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 1.0.0** from source. Now you're ready to [build **pokered**](#build-pokered). @@ -153,8 +153,8 @@ make ### Build with a local rgbds version -If you have different projects that require different versions of `rgbds`, it might not be convenient to install rgbds 0.9.3 globally. Instead, you can put its files in a directory within pokered, such as `pokered/rgbds-0.9.3/`. Then specify it when you run `make`: +If you have different projects that require different versions of `rgbds`, it might not be convenient to install rgbds 1.0.0 globally. Instead, you can put its files in a directory within pokered, such as `pokered/rgbds-1.0.0/`. Then specify it when you run `make`: ```bash -make RGBDS=rgbds-0.9.3/ +make RGBDS=rgbds-1.0.0/ ``` diff --git a/Makefile b/Makefile index 0ff65aac..0ca4ec7c 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,11 @@ RGBFIX ?= $(RGBDS)rgbfix RGBGFX ?= $(RGBDS)rgbgfx RGBLINK ?= $(RGBDS)rgblink +RGBASMFLAGS ?= -Weverything -Wtruncation=1 +RGBLINKFLAGS ?= -Weverything -Wtruncation=1 +RGBFIXFLAGS ?= -Weverything +RGBGFXFLAGS ?= -Weverything + ### Build targets @@ -85,7 +90,7 @@ tools: $(MAKE) -C tools/ -RGBASMFLAGS = -Q8 -P includes.asm -Weverything -Wtruncation=1 +RGBASMFLAGS += -Q8 -P includes.asm # Create a sym/map for debug purposes if `make` run with `DEBUG=1` ifeq ($(DEBUG),1) RGBASMFLAGS += -E @@ -128,21 +133,23 @@ $(foreach obj, $(pokeblue_vc_obj), $(eval $(call DEP,$(obj),$(obj:_blue_vc.o=.as endif -pokered_pad = 0x00 -pokeblue_pad = 0x00 -pokered_vc_pad = 0x00 -pokeblue_vc_pad = 0x00 -pokeblue_debug_pad = 0xff +RGBLINKFLAGS += -d +pokered.gbc: RGBLINKFLAGS += -p 0x00 +pokeblue.gbc: RGBLINKFLAGS += -p 0x00 +pokeblue_debug.gbc: RGBLINKFLAGS += -p 0xff +pokered_vc.gbc: RGBLINKFLAGS += -p 0x00 +pokeblue_vc.gbc: RGBLINKFLAGS += -p 0x00 -pokered_opt = -jsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 -t "POKEMON RED" -pokeblue_opt = -jsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 -t "POKEMON BLUE" -pokeblue_debug_opt = -jsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 -t "POKEMON BLUE" -pokered_vc_opt = -jsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 -t "POKEMON RED" -pokeblue_vc_opt = -jsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 -t "POKEMON BLUE" +RGBFIXFLAGS += -jsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 +pokered.gbc: RGBFIXFLAGS += -p 0x00 -t "POKEMON RED" +pokeblue.gbc: RGBFIXFLAGS += -p 0x00 -t "POKEMON BLUE" +pokeblue_debug.gbc: RGBFIXFLAGS += -p 0xff -t "POKEMON BLUE" +pokered_vc.gbc: RGBFIXFLAGS += -p 0x00 -t "POKEMON RED" +pokeblue_vc.gbc: RGBFIXFLAGS += -p 0x00 -t "POKEMON BLUE" %.gbc: $$(%_obj) layout.link - $(RGBLINK) -p $($*_pad) -d -m $*.map -n $*.sym -l layout.link -o $@ $(filter %.o,$^) - $(RGBFIX) -p $($*_pad) $($*_opt) $@ + $(RGBLINK) $(RGBLINKFLAGS) -l layout.link -m $*.map -n $*.sym -o $@ $(filter %.o,$^) + $(RGBFIX) $(RGBFIXFLAGS) $@ ### Misc file-specific graphics rules @@ -150,13 +157,13 @@ pokeblue_vc_opt = -jsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 -t "POKEM gfx/battle/move_anim_0.2bpp: tools/gfx += --trim-whitespace gfx/battle/move_anim_1.2bpp: tools/gfx += --trim-whitespace -gfx/intro/blue_jigglypuff_1.2bpp: rgbgfx += --columns -gfx/intro/blue_jigglypuff_2.2bpp: rgbgfx += --columns -gfx/intro/blue_jigglypuff_3.2bpp: rgbgfx += --columns -gfx/intro/red_nidorino_1.2bpp: rgbgfx += --columns -gfx/intro/red_nidorino_2.2bpp: rgbgfx += --columns -gfx/intro/red_nidorino_3.2bpp: rgbgfx += --columns -gfx/intro/gengar.2bpp: rgbgfx += --columns +gfx/intro/blue_jigglypuff_1.2bpp: RGBGFXFLAGS += --columns +gfx/intro/blue_jigglypuff_2.2bpp: RGBGFXFLAGS += --columns +gfx/intro/blue_jigglypuff_3.2bpp: RGBGFXFLAGS += --columns +gfx/intro/red_nidorino_1.2bpp: RGBGFXFLAGS += --columns +gfx/intro/red_nidorino_2.2bpp: RGBGFXFLAGS += --columns +gfx/intro/red_nidorino_3.2bpp: RGBGFXFLAGS += --columns +gfx/intro/gengar.2bpp: RGBGFXFLAGS += --columns gfx/intro/gengar.2bpp: tools/gfx += --remove-duplicates --preserve=0x19,0x76 gfx/credits/the_end.2bpp: tools/gfx += --interleave --png=$< @@ -173,12 +180,12 @@ gfx/trade/game_boy.2bpp: tools/gfx += --remove-duplicates ### Catch-all graphics rules %.2bpp: %.png - $(RGBGFX) --colors dmg=e4 $(rgbgfx) -o $@ $< + $(RGBGFX) --colors dmg $(RGBGFXFLAGS) -o $@ $< $(if $(tools/gfx),\ tools/gfx $(tools/gfx) -o $@ $@ || $$($(RM) $@ && false)) %.1bpp: %.png - $(RGBGFX) --colors dmg=e4 $(rgbgfx) --depth 1 -o $@ $< + $(RGBGFX) --colors dmg $(RGBGFXFLAGS) --depth 1 -o $@ $< $(if $(tools/gfx),\ tools/gfx $(tools/gfx) --depth 1 -o $@ $@ || $$($(RM) $@ && false)) diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index 6f255dd6..40b2047b 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -1603,7 +1603,7 @@ _AnimationSquishMonPic: call AnimCopyRowRight inc hl .next - ld [hl], " " + ld [hl], ' ' pop hl ld de, SCREEN_WIDTH add hl, de @@ -1838,7 +1838,7 @@ _AnimationSlideMonOff: ; plus one instead. cp $61 ret c - ld a, " " + ld a, ' ' ret .EnemyNextTile @@ -1848,7 +1848,7 @@ _AnimationSlideMonOff: ; the lower right tile is in the first column to slide off the screen. cp $30 ret c - ld a, " " + ld a, ' ' ret AnimationSlideMonHalfOff: diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 83a52c2a..87abf2e8 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -20,7 +20,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ld hl, vBGMap0 ld bc, TILEMAP_AREA .clearBackgroundLoop - ld a, " " + ld a, ' ' ld [hli], a dec bc ld a, b @@ -1984,11 +1984,11 @@ CenterMonName: .loop inc de ld a, [de] - cp "@" + cp '@' jr z, .done inc de ld a, [de] - cp "@" + cp '@' jr z, .done dec hl dec b @@ -2036,15 +2036,15 @@ DisplayBattleMenu:: call CopyData ; the following simulates the keystrokes by drawing menus on screen hlcoord 9, 14 - ld [hl], "▶" + ld [hl], '▶' ld c, 80 call DelayFrames - ld [hl], " " + ld [hl], ' ' hlcoord 9, 16 - ld [hl], "▶" + ld [hl], '▶' ld c, 50 call DelayFrames - ld [hl], "▷" + ld [hl], '▷' ld a, $2 ; select the "ITEM" menu jp .upperLeftMenuItemWasNotSelected .oldManName @@ -2062,7 +2062,7 @@ DisplayBattleMenu:: .leftColumn ; put cursor in left column of menu ld a, [wBattleType] cp BATTLE_TYPE_SAFARI - ld a, " " + ld a, ' ' jr z, .safariLeftColumn ; put cursor in left column for normal battle menu (i.e. when it's not a Safari battle) ldcoord_a 15, 14 ; clear upper cursor position in right column @@ -2095,7 +2095,7 @@ DisplayBattleMenu:: .rightColumn ; put cursor in right column of menu ld a, [wBattleType] cp BATTLE_TYPE_SAFARI - ld a, " " + ld a, ' ' jr z, .safariRightColumn ; put cursor in right column for normal battle menu (i.e. when it's not a Safari battle) ldcoord_a 9, 14 ; clear upper cursor position in left column @@ -2328,7 +2328,7 @@ PartyMenuOrRockOrRun: .partyMonDeselected hlcoord 11, 11 ld bc, 6 * SCREEN_WIDTH + 9 - ld a, " " + ld a, ' ' call FillMemory xor a ; NORMAL_PARTY_MENU ld [wPartyMenuTypeOrMessageID], a @@ -2495,9 +2495,9 @@ MoveSelectionMenu: ; so it is necessary to put the di ei block to not cause tearing call TextBoxBorder hlcoord 4, 12 - ld [hl], "─" + ld [hl], '─' hlcoord 10, 12 - ld [hl], "┘" + ld [hl], '┘' ei hlcoord 6, 13 call .writemoves @@ -2603,7 +2603,7 @@ SelectMenuItem: dec a ld bc, SCREEN_WIDTH call AddNTimes - ld [hl], "▷" + ld [hl], '▷' .select ld hl, hUILayoutFlags set BIT_DOUBLE_SPACED_MENU, [hl] @@ -2886,9 +2886,9 @@ PrintMenuItem: ld de, TypeText call PlaceString hlcoord 7, 11 - ld [hl], "/" + ld [hl], '/' hlcoord 5, 9 - ld [hl], "/" + ld [hl], '/' hlcoord 5, 11 ld de, wBattleMenuCurrentPP lb bc, 1, 2 @@ -6841,17 +6841,17 @@ InitWildBattle: ld [hli], a ; write front sprite pointer ld [hl], b ld hl, wEnemyMonNick ; set name to "GHOST" - ld a, "G" + ld a, 'G' ld [hli], a - ld a, "H" + ld a, 'H' ld [hli], a - ld a, "O" + ld a, 'O' ld [hli], a - ld a, "S" + ld a, 'S' ld [hli], a - ld a, "T" + ld a, 'T' ld [hli], a - ld [hl], "@" + ld [hl], '@' ld a, [wCurPartySpecies] push af ld a, MON_GHOST diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm index e111f783..413c34d9 100644 --- a/engine/battle/effects.asm +++ b/engine/battle/effects.asm @@ -743,7 +743,7 @@ FellText: PrintStatText: ld hl, StatModTextStrings - ld c, "@" + ld c, '@' .findStatName_outer dec b jr z, .foundStatName diff --git a/engine/battle/link_battle_versus_text.asm b/engine/battle/link_battle_versus_text.asm index 374dcabc..d37d40c7 100644 --- a/engine/battle/link_battle_versus_text.asm +++ b/engine/battle/link_battle_versus_text.asm @@ -13,9 +13,9 @@ DisplayLinkBattleVersusTextBox: call PlaceString ; place bold "VS" tiles between the names hlcoord 9, 8 - ld a, "" + ld a, '' ld [hli], a - ld [hl], "" + ld [hl], '' xor a ld [wUpdateSpritesEnabled], a callfar SetupPlayerAndEnemyPokeballs diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm index 66675dbf..3deebc61 100644 --- a/engine/battle/misc.asm +++ b/engine/battle/misc.asm @@ -17,7 +17,7 @@ FormatMovesString: ld hl, wNameBuffer .copyNameLoop ld a, [hli] - cp "@" + cp '@' jr z, .doneCopyingName ld [de], a inc de @@ -26,7 +26,7 @@ FormatMovesString: ld a, b ld [wNumMovesMinusOne], a inc b - ld a, "" + ld a, '' ld [de], a inc de pop hl @@ -35,19 +35,19 @@ FormatMovesString: jr z, .done jr .printMoveNameLoop .printDashLoop - ld a, "-" + ld a, '-' ld [de], a inc de inc b ld a, b cp NUM_MOVES jr z, .done - ld a, "" + ld a, '' ld [de], a inc de jr .printDashLoop .done - ld a, "@" + ld a, '@' ld [de], a ret diff --git a/engine/battle/print_type.asm b/engine/battle/print_type.asm index e7c6729c..6ebd4189 100644 --- a/engine/battle/print_type.asm +++ b/engine/battle/print_type.asm @@ -25,7 +25,7 @@ PrintType: ; erase "TYPE2/" if the mon only has 1 type EraseType2Text: - ld a, " " + ld a, ' ' ld bc, $13 add hl, bc ld bc, $6 diff --git a/engine/battle/save_trainer_name.asm b/engine/battle/save_trainer_name.asm index b25d5a11..08260029 100644 --- a/engine/battle/save_trainer_name.asm +++ b/engine/battle/save_trainer_name.asm @@ -14,7 +14,7 @@ SaveTrainerName:: ld a, [hli] ld [de], a inc de - cp "@" + cp '@' jr nz, .CopyCharacter ret diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm index 900e3782..b4ccbb07 100644 --- a/engine/events/diploma.asm +++ b/engine/events/diploma.asm @@ -79,7 +79,7 @@ UnusedPlayerNameLengthFunc: lb bc, $ff, $00 .loop ld a, [hli] - cp "@" + cp '@' ret z dec c jr .loop diff --git a/engine/events/evolve_trade.asm b/engine/events/evolve_trade.asm index 8ec7ad5c..7dfc2433 100644 --- a/engine/events/evolve_trade.asm +++ b/engine/events/evolve_trade.asm @@ -6,13 +6,13 @@ InGameTrade_CheckForTradeEvo: ; Graveler's English name and Haunter's early English name "Spectre". ; The final release replaced Graveler and Haunter in TradeMons. ld a, [wInGameTradeReceiveMonName] - cp "G" ; GRAVELER + cp 'G' ; GRAVELER jr z, .nameMatched ; "SPECTRE" (HAUNTER) - cp "S" + cp 'S' ret nz ld a, [wInGameTradeReceiveMonName + 1] - cp "P" + cp 'P' ret nz .nameMatched ld a, [wPartyCount] diff --git a/engine/events/give_pokemon.asm b/engine/events/give_pokemon.asm index 640a3dba..b25ef048 100644 --- a/engine/events/give_pokemon.asm +++ b/engine/events/give_pokemon.asm @@ -24,15 +24,15 @@ _GivePokemon:: cp 9 jr c, .singleDigitBoxNum sub 9 - ld [hl], "1" + ld [hl], '1' inc hl - add "0" + add '0' jr .next .singleDigitBoxNum - add "1" + add '1' .next ld [hli], a - ld [hl], "@" + ld [hl], '@' ld hl, SentToBoxText call PrintText scf diff --git a/engine/events/pokedex_rating.asm b/engine/events/pokedex_rating.asm index 1086257a..510b11a3 100644 --- a/engine/events/pokedex_rating.asm +++ b/engine/events/pokedex_rating.asm @@ -42,7 +42,7 @@ DisplayDexRating: inc de .copyRatingTextLoop ld a, [hli] - cp "@" + cp '@' jr z, .doneCopying ld [de], a inc de diff --git a/engine/gfx/hp_bar.asm b/engine/gfx/hp_bar.asm index c1ae598e..d8dcaa24 100644 --- a/engine/gfx/hp_bar.asm +++ b/engine/gfx/hp_bar.asm @@ -223,7 +223,7 @@ UpdateHPBar_PrintHPNumber: .next add hl, de push hl - ld a, " " + ld a, ' ' ld [hli], a ld [hli], a ld [hli], a diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm index 227ee033..6758adea 100644 --- a/engine/items/town_map.asm +++ b/engine/items/town_map.asm @@ -57,7 +57,7 @@ DisplayTownMap: ld a, [hli] ld [de], a inc de - cp "@" + cp '@' jr nz, .copyMapName hlcoord 1, 0 ld de, wNameBuffer @@ -166,7 +166,7 @@ LoadTownMap_Fly:: ld hl, wFlyLocationsList decoord 18, 0 .townMapFlyLoop - ld a, " " + ld a, ' ' ld [de], a push hl push hl @@ -183,9 +183,9 @@ LoadTownMap_Fly:: ld c, 15 call DelayFrames hlcoord 18, 0 - ld [hl], "▲" + ld [hl], '▲' hlcoord 19, 0 - ld [hl], "▼" + ld [hl], '▼' pop hl .inputLoop push hl @@ -363,7 +363,7 @@ DrawPlayerOrBirdSprite: ld a, [hli] ld [de], a inc de - cp "@" + cp '@' jr nz, .loop ld hl, wShadowOAM ld de, wShadowOAMBackup diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index a4307532..c94b2693 100644 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -482,7 +482,7 @@ TradeCenter_SelectMon: ld a, 16 ld [wTopMenuItemY], a .selectStatsMenuItem - ld a, " " + ld a, ' ' ldcoord_a 11, 16 ld a, PAD_RIGHT | PAD_B | PAD_A ld [wMenuWatchedKeys], a @@ -499,7 +499,7 @@ TradeCenter_SelectMon: call LoadScreenTilesFromBuffer1 jp .playerMonMenu .selectTradeMenuItem - ld a, " " + ld a, ' ' ldcoord_a 1, 16 ld a, PAD_LEFT | PAD_B | PAD_A ld [wMenuWatchedKeys], a @@ -547,10 +547,10 @@ TradeCenter_SelectMon: ld l, a ld a, [wMenuCursorLocation + 1] ld h, a - ld a, " " + ld a, ' ' ld [hl], a .cancelMenuItem_Loop - ld a, "▶" ; filled arrow cursor + ld a, '▶' ; filled arrow cursor ldcoord_a 1, 16 .cancelMenuItem_JoypadLoop call JoypadLowSensitivity @@ -562,14 +562,14 @@ TradeCenter_SelectMon: bit B_PAD_UP, a jr z, .cancelMenuItem_JoypadLoop ; if Up pressed - ld a, " " + ld a, ' ' ldcoord_a 1, 16 ld a, [wPartyCount] dec a ld [wCurrentMenuItem], a jp .playerMonMenu .cancelMenuItem_APressed - ld a, "▷" ; unfilled arrow cursor + ld a, '▷' ; unfilled arrow cursor ldcoord_a 1, 16 ld a, $f ld [wSerialExchangeNybbleSendData], a @@ -619,7 +619,7 @@ TradeCenter_PlaceSelectedEnemyMonMenuCursor: hlcoord 1, 9 ld bc, SCREEN_WIDTH call AddNTimes - ld [hl], "▷" ; cursor + ld [hl], '▷' ; cursor ret TradeCenter_DisplayStats: @@ -950,7 +950,7 @@ CableClub_TextBoxBorder: push hl ld a, $7b ; border left vertical line tile ld [hli], a - ld a, " " + ld a, ' ' call CableClub_DrawHorizontalLine ld [hl], $77 ; border right vertical line tile pop hl diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index c6f8547b..f4d8ec03 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -227,9 +227,9 @@ LinkMenu: ld a, SC_START | SC_INTERNAL ldh [rSC], a .skipStartingTransfer - ld b, " " - ld c, " " - ld d, "▷" + ld b, ' ' + ld c, ' ' + ld d, '▷' ld a, [wLinkMenuSelectionSendBuffer] and PAD_B << 2 ; was B button pressed? jr nz, .updateCursorPosition @@ -682,7 +682,7 @@ SetCursorPositionsFromOptions: ld e, a ld d, 0 add hl, de - ld [hl], "▷" + ld [hl], '▷' ret ; table that indicates how the 3 text speed options affect frame delays @@ -709,7 +709,7 @@ CheckForPlayerNameInSRAM: ld hl, sPlayerName .loop ld a, [hli] - cp "@" + cp '@' jr z, .found dec b jr nz, .loop diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm index 14eb0b28..fda482e3 100644 --- a/engine/menus/naming_screen.asm +++ b/engine/menus/naming_screen.asm @@ -40,7 +40,7 @@ AskName: pop af ld [wUpdateSpritesEnabled], a ld a, [wStringBuffer] - cp "@" + cp '@' ret nz .declinedNickname ld d, h @@ -64,7 +64,7 @@ DisplayNameRaterScreen:: call RestoreScreenTilesAndReloadTilePatterns call LoadGBPal ld a, [wStringBuffer] - cp "@" + cp '@' jr z, .playerCancelled ld hl, wPartyMonNicks ld bc, NAME_LENGTH @@ -108,7 +108,7 @@ DisplayNamingScreen: ld [wMenuWatchedKeys], a ld a, 7 ld [wMaxMenuItem], a - ld a, "@" + ld a, '@' ld [wStringBuffer], a xor a ld hl, wNamingScreenSubmitName @@ -231,10 +231,10 @@ DisplayNamingScreen: ld [wNamingScreenLetter], a call CalcStringLength ld a, [wNamingScreenLetter] - cp "゙" + cp '゙' ld de, Dakutens jr z, .dakutensAndHandakutens - cp "゚" + cp '゚' ld de, Handakutens jr z, .dakutensAndHandakutens ld a, [wNamingScreenType] @@ -259,7 +259,7 @@ DisplayNamingScreen: .addLetter ld a, [wNamingScreenLetter] ld [hli], a - ld [hl], "@" + ld [hl], '@' ld a, SFX_PRESS_AB call PlaySound ret @@ -269,7 +269,7 @@ DisplayNamingScreen: ret z call CalcStringLength dec hl - ld [hl], "@" + ld [hl], '@' ret .pressedRight ld a, [wCurrentMenuItem] @@ -442,7 +442,7 @@ CalcStringLength: ld c, $0 .loop ld a, [hl] - cp "@" + cp '@' ret z inc hl inc c @@ -468,7 +468,7 @@ PrintNamingText: call PlaceString ld hl, $1 add hl, bc - ld [hl], "の" ; leftover from Japanese version; blank tile $c9 in English + ld [hl], 'の' ; leftover from Japanese version; blank tile $c9 in English hlcoord 1, 3 ld de, NicknameTextString jr .placeString diff --git a/engine/menus/party_menu.asm b/engine/menus/party_menu.asm index 81472c31..f2688b52 100644 --- a/engine/menus/party_menu.asm +++ b/engine/menus/party_menu.asm @@ -51,7 +51,7 @@ RedrawPartyMenu_:: dec hl dec hl dec hl - ld a, "▷" ; unfilled right arrow menu cursor + ld a, '▷' ; unfilled right arrow menu cursor ld [hli], a ; place the cursor inc hl inc hl diff --git a/engine/menus/pokedex.asm b/engine/menus/pokedex.asm index 1f58fd68..3e4096bc 100644 --- a/engine/menus/pokedex.asm +++ b/engine/menus/pokedex.asm @@ -121,7 +121,7 @@ HandlePokedexSideMenu: push bc hlcoord 0, 3 ld de, 20 - lb bc, " ", 13 + lb bc, ' ', 13 call DrawTileLine ; cover up the menu cursor in the pokemon list pop bc ret @@ -130,7 +130,7 @@ HandlePokedexSideMenu: push bc hlcoord 15, 10 ld de, 20 - lb bc, " ", 7 + lb bc, ' ', 7 call DrawTileLine ; cover up the menu cursor in the side menu pop bc jr .exitSideMenu @@ -159,7 +159,7 @@ HandlePokedexListMenu: ldh [hAutoBGTransferEnabled], a ; draw the horizontal line separating the seen and owned amounts from the menu hlcoord 15, 8 - ld a, "─" + ld a, '─' ld [hli], a ld [hli], a ld [hli], a @@ -251,7 +251,7 @@ HandlePokedexListMenu: ld hl, wPokedexOwned call IsPokemonBitSet pop hl - ld a, " " + ld a, ' ' jr z, .writeTile ld a, $72 ; pokeball tile .writeTile @@ -476,9 +476,9 @@ ShowPokedexDataInternal: call IndexToPokedex hlcoord 2, 8 - ld a, "№" + ld a, '№' ld [hli], a - ld a, "" + ld a, '' ld [hli], a ld de, wPokedexNum lb bc, LEADING_ZEROES | 1, 3 @@ -518,14 +518,14 @@ ShowPokedexDataInternal: hlcoord 12, 6 lb bc, 1, 2 call PrintNumber ; print feet (height) - ld a, "′" + ld a, '′' ld [hl], a inc de inc de ; de = address of inches (height) hlcoord 15, 6 lb bc, LEADING_ZEROES | 1, 2 call PrintNumber ; print inches (height) - ld a, "″" + ld a, '″' ld [hl], a ; now print the weight (note that weight is stored in tenths of pounds internally) inc de @@ -553,12 +553,12 @@ ShowPokedexDataInternal: ldh a, [hDexWeight] sbc 0 jr nc, .next - ld [hl], "0" ; if the weight is less than 10, put a 0 before the decimal point + ld [hl], '0' ; if the weight is less than 10, put a 0 before the decimal point .next inc hl ld a, [hli] ld [hld], a ; make space for the decimal point by moving the last digit forward one tile - ld [hl], "" ; decimal point tile + ld [hl], '' ; decimal point tile pop af ldh [hDexWeight + 1], a ; restore original value of [hDexWeight + 1] pop af diff --git a/engine/menus/save.asm b/engine/menus/save.asm index 7112207f..9dfdd949 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -474,11 +474,11 @@ DisplayChangeBoxMenu: jr c, .singleDigitBoxNum sub 9 hlcoord 8, 2 - ld [hl], "1" - add "0" + ld [hl], '1' + add '0' jr .next .singleDigitBoxNum - add "1" + add '1' .next ldcoord_a 9, 2 hlcoord 1, 2 diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm index e845941f..8ba05b3f 100644 --- a/engine/menus/start_sub_menus.asm +++ b/engine/menus/start_sub_menus.asm @@ -289,7 +289,7 @@ ErasePartyMenuCursors:: ld bc, 2 * SCREEN_WIDTH ; menu cursor positions are 2 rows apart ld a, 6 ; 6 menu cursor positions .loop - ld [hl], " " + ld [hl], ' ' add hl, bc dec a jr nz, .loop @@ -329,7 +329,7 @@ StartMenu_Item:: jp RedisplayStartMenu .choseItem ; erase menu cursor (blank each tile in front of an item name) - ld a, " " + ld a, ' ' ldcoord_a 5, 4 ldcoord_a 5, 6 ldcoord_a 5, 8 @@ -481,7 +481,7 @@ DrawTrainerInfo: predef DisplayPicCenteredOrUpperRight call DisableLCD hlcoord 0, 2 - ld a, " " + ld a, ' ' call TrainerInfo_DrawVerticalLine hlcoord 1, 2 call TrainerInfo_DrawVerticalLine @@ -671,7 +671,7 @@ SwitchPartyMon_ClearGfx: ld bc, SCREEN_WIDTH * 2 call AddNTimes ld c, SCREEN_WIDTH * 2 - ld a, " " + ld a, ' ' .clearMonBGLoop ; clear the mon's row in the party menu ld [hli], a dec c diff --git a/engine/menus/text_box.asm b/engine/menus/text_box.asm index 076b395f..94c432c7 100644 --- a/engine/menus/text_box.asm +++ b/engine/menus/text_box.asm @@ -470,7 +470,7 @@ DisplayFieldMoveMonMenu: jr z, .reachedName .skipNameLoop ; skip past current name ld a, [hli] - cp "@" + cp '@' jr nz, .skipNameLoop jr .skipNamesLoop .reachedName diff --git a/engine/movie/credits.asm b/engine/movie/credits.asm index bdd66e8e..1a68a7b5 100644 --- a/engine/movie/credits.asm +++ b/engine/movie/credits.asm @@ -164,7 +164,7 @@ FillFourRowsWithBlack: FillMiddleOfScreenWithWhite: hlcoord 0, 4 ld bc, SCREEN_WIDTH * 10 - ld a, " " + ld a, ' ' jp FillMemory Credits: diff --git a/engine/movie/hall_of_fame.asm b/engine/movie/hall_of_fame.asm index 7653b4bc..b2c0de42 100644 --- a/engine/movie/hall_of_fame.asm +++ b/engine/movie/hall_of_fame.asm @@ -8,7 +8,7 @@ AnimateHallOfFame: call DisableLCD ld hl, vBGMap0 ld bc, 2 * TILEMAP_AREA - ld a, " " + ld a, ' ' call FillMemory call EnableLCD ld hl, rLCDC diff --git a/engine/movie/oak_speech/oak_speech2.asm b/engine/movie/oak_speech/oak_speech2.asm index ceaa6838..df05091a 100644 --- a/engine/movie/oak_speech/oak_speech2.asm +++ b/engine/movie/oak_speech/oak_speech2.asm @@ -16,7 +16,7 @@ ChoosePlayerName: ld [wNamingScreenType], a call DisplayNamingScreen ld a, [wStringBuffer] - cp "@" + cp '@' jr z, .customName call ClearScreen call Delay3 @@ -49,7 +49,7 @@ ChooseRivalName: ld [wNamingScreenType], a call DisplayNamingScreen ld a, [wStringBuffer] - cp "@" + cp '@' jr z, .customName call ClearScreen call Delay3 @@ -199,7 +199,7 @@ GetDefaultName: ld e, l .innerLoop ld a, [hli] - cp "@" + cp '@' jr nz, .innerLoop ld a, b cp c diff --git a/engine/movie/title.asm b/engine/movie/title.asm index bcd01f33..698dd5e0 100644 --- a/engine/movie/title.asm +++ b/engine/movie/title.asm @@ -357,7 +357,7 @@ DrawPlayerCharacter: ClearBothBGMaps: ld hl, vBGMap0 ld bc, 2 * TILEMAP_AREA - ld a, " " + ld a, ' ' jp FillMemory LoadTitleMonSprite: diff --git a/engine/movie/trade.asm b/engine/movie/trade.asm index 4cb9d394..bf77f21e 100644 --- a/engine/movie/trade.asm +++ b/engine/movie/trade.asm @@ -150,7 +150,7 @@ Trade_Delay80: Trade_ClearTileMap: hlcoord 0, 0 ld bc, SCREEN_AREA - ld a, " " + ld a, ' ' jp FillMemory LoadTradingGFXAndMonNames: @@ -168,7 +168,7 @@ LoadTradingGFXAndMonNames: call FarCopyData2 ld hl, vBGMap0 ld bc, 2 * TILEMAP_AREA - ld a, " " + ld a, ' ' call FillMemory call ClearSprites ld a, $ff diff --git a/engine/overworld/player_state.asm b/engine/overworld/player_state.asm index a5d3ee3e..263ab634 100644 --- a/engine/overworld/player_state.asm +++ b/engine/overworld/player_state.asm @@ -240,7 +240,7 @@ PrintSafariZoneSteps:: cp 10 jr nc, .tenOrMore hlcoord 5, 3 - ld a, " " + ld a, ' ' ld [hl], a .tenOrMore hlcoord 6, 3 diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm index 6d522377..0fcdedc6 100644 --- a/engine/pokemon/bills_pc.asm +++ b/engine/pokemon/bills_pc.asm @@ -157,11 +157,11 @@ BillsPCMenu: ; two digit box num sub 9 hlcoord 17, 16 - ld [hl], "1" - add "0" + ld [hl], '1' + add '0' jr .next .singleDigitBoxNum - add "1" + add '1' .next ldcoord_a 18, 16 hlcoord 10, 16 @@ -240,15 +240,15 @@ BillsPCDeposit: cp 9 jr c, .singleDigitBoxNum sub 9 - ld [hl], "1" + ld [hl], '1' inc hl - add "0" + add '0' jr .next .singleDigitBoxNum - add "1" + add '1' .next ld [hli], a - ld [hl], "@" + ld [hl], '@' ld hl, MonWasStoredText call PrintText jp BillsPCMenu diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm index afae4396..1b92a093 100644 --- a/engine/pokemon/evos_moves.asm +++ b/engine/pokemon/evos_moves.asm @@ -278,7 +278,7 @@ RenameEvolvedMon: cp [hl] inc hl ret nz - cp "@" + cp '@' jr nz, .compareNamesLoop ld a, [wWhichPokemon] ld bc, NAME_LENGTH diff --git a/engine/pokemon/status_ailments.asm b/engine/pokemon/status_ailments.asm index 05205a34..2c5b3bcd 100644 --- a/engine/pokemon/status_ailments.asm +++ b/engine/pokemon/status_ailments.asm @@ -10,37 +10,37 @@ PrintStatusAilment:: jr nz, .par and SLP_MASK ret z - ld a, "S" + ld a, 'S' ld [hli], a - ld a, "L" + ld a, 'L' ld [hli], a - ld [hl], "P" + ld [hl], 'P' ret .psn - ld a, "P" + ld a, 'P' ld [hli], a - ld a, "S" + ld a, 'S' ld [hli], a - ld [hl], "N" + ld [hl], 'N' ret .brn - ld a, "B" + ld a, 'B' ld [hli], a - ld a, "R" + ld a, 'R' ld [hli], a - ld [hl], "N" + ld [hl], 'N' ret .frz - ld a, "F" + ld a, 'F' ld [hli], a - ld a, "R" + ld a, 'R' ld [hli], a - ld [hl], "Z" + ld [hl], 'Z' ret .par - ld a, "P" + ld a, 'P' ld [hli], a - ld a, "A" + ld a, 'A' ld [hli], a - ld [hl], "R" + ld [hl], 'R' ret diff --git a/engine/pokemon/status_screen.asm b/engine/pokemon/status_screen.asm index 344e7802..80cdfb17 100644 --- a/engine/pokemon/status_screen.asm +++ b/engine/pokemon/status_screen.asm @@ -52,7 +52,7 @@ DrawHP_: ld de, wLoadedMonHP lb bc, 2, 3 call PrintNumber - ld a, "/" + ld a, '/' ld [hli], a ld de, wLoadedMonMaxHP lb bc, 2, 3 @@ -110,9 +110,9 @@ StatusScreen: call DrawLineBox ; Draws the box around name, HP and status ld de, -6 add hl, de - ld [hl], "" + ld [hl], '' dec hl - ld [hl], "№" + ld [hl], '№' hlcoord 19, 9 lb bc, 8, 6 call DrawLineBox ; Draws the box around types, ID No. and OT @@ -329,13 +329,13 @@ StatusScreen2: ld b, a ; Number of moves ? hlcoord 11, 10 ld de, SCREEN_WIDTH * 2 - ld a, "" + ld a, '' call StatusScreen_PrintPP ; Print "PP" ld a, b and a jr z, .InitPP ld c, a - ld a, "-" + ld a, '-' call StatusScreen_PrintPP ; Fill the rest with -- .InitPP ld hl, wLoadedMonMoves @@ -372,7 +372,7 @@ StatusScreen2: ld de, wStatusScreenCurrentPP lb bc, 1, 2 call PrintNumber - ld a, "/" + ld a, '/' ld [hli], a ld de, wMaxPP lb bc, 1, 2 @@ -400,7 +400,7 @@ StatusScreen2: ld [wLoadedMonLevel], a ; Increase temporarily if not 100 .Level100 hlcoord 14, 6 - ld [hl], "" + ld [hl], '' inc hl inc hl call PrintLevel @@ -469,7 +469,7 @@ StatusScreenExpText: StatusScreen_ClearName: ld bc, 10 - ld a, " " + ld a, ' ' jp FillMemory StatusScreen_PrintPP: diff --git a/engine/slots/slot_machine.asm b/engine/slots/slot_machine.asm index 9dc32397..147519c7 100644 --- a/engine/slots/slot_machine.asm +++ b/engine/slots/slot_machine.asm @@ -629,7 +629,7 @@ SlotMachine_PrintWinningSymbol: inc a ld [hl], a hlcoord 18, 16 - ld [hl], "▼" + ld [hl], '▼' ret SlotMachine_SubtractBetFromPlayerCoins: diff --git a/home/copy2.asm b/home/copy2.asm index 9e5b1f14..1ad9fbba 100644 --- a/home/copy2.asm +++ b/home/copy2.asm @@ -161,7 +161,7 @@ CopyVideoDataDouble:: ClearScreenArea:: ; Clear tilemap area cxb at hl. - ld a, " " + ld a, ' ' ld de, SCREEN_WIDTH .loopRows push hl @@ -218,7 +218,7 @@ ClearScreen:: ld bc, SCREEN_AREA inc b hlcoord 0, 0 - ld a, " " + ld a, ' ' .loop ld [hli], a dec c diff --git a/home/copy_string.asm b/home/copy_string.asm index 05f9ba80..3531aaf8 100644 --- a/home/copy_string.asm +++ b/home/copy_string.asm @@ -8,6 +8,6 @@ CopyString:: ld a, [de] inc de ld [hli], a - cp "@" + cp '@' jr nz, CopyString ret diff --git a/home/list_menu.asm b/home/list_menu.asm index b7204e65..00b5704a 100644 --- a/home/list_menu.asm +++ b/home/list_menu.asm @@ -66,7 +66,7 @@ DisplayListMenuIDLoop:: and a ; is it the Old Man battle? jr z, .notOldManBattle .oldManBattle - ld a, "▶" + ld a, '▶' ldcoord_a 5, 4 ; place menu cursor in front of first menu entry ld c, 80 call DelayFrames @@ -478,7 +478,7 @@ PrintListMenuEntries:: push hl ld bc, SCREEN_WIDTH + 8 ; 1 row down and 8 columns right add hl, bc - ld a, "×" + ld a, '×' ld [hli], a ld a, [wNamedObjectIndex] push af @@ -506,7 +506,7 @@ PrintListMenuEntries:: cp c ; is it this item? jr nz, .nextListEntry dec hl - ld a, "▷" + ld a, '▷' ld [hli], a .nextListEntry ld bc, 2 * SCREEN_WIDTH ; 2 rows @@ -517,7 +517,7 @@ PrintListMenuEntries:: jp nz, .loop ld bc, -8 add hl, bc - ld a, "▼" + ld a, '▼' ld [hl], a ret .printCancelMenuItem diff --git a/home/names.asm b/home/names.asm index 5848cb19..4b6f6903 100644 --- a/home/names.asm +++ b/home/names.asm @@ -16,7 +16,7 @@ GetMonName:: ld bc, NAME_LENGTH - 1 call CopyData ld hl, wNameBuffer + NAME_LENGTH - 1 - ld [hl], "@" + ld [hl], '@' pop de pop af ldh [hLoadedROMBank], a @@ -74,7 +74,7 @@ GetMachineName:: ; now get the machine number and convert it to text ld a, [wNamedObjectIndex] sub TM01 - 1 - ld b, "0" + ld b, '0' .FirstDigit sub 10 jr c, .SecondDigit @@ -87,11 +87,11 @@ GetMachineName:: ld [de], a inc de pop af - ld b, "0" + ld b, '0' add b ld [de], a inc de - ld a, "@" + ld a, '@' ld [de], a pop af ld [wNamedObjectIndex], a diff --git a/home/names2.asm b/home/names2.asm index 7178e706..90d04b8d 100644 --- a/home/names2.asm +++ b/home/names2.asm @@ -75,7 +75,7 @@ GetName:: ld e, l .nextChar ld a, [hli] - cp "@" + cp '@' jr nz, .nextChar inc c ld a, b diff --git a/home/pokemon.asm b/home/pokemon.asm index 3b990848..d720a642 100644 --- a/home/pokemon.asm +++ b/home/pokemon.asm @@ -320,11 +320,11 @@ PrintStatusCondition:: pop de jr nz, PrintStatusConditionNotFainted ; if the pokemon's HP is 0, print "FNT" - ld a, "F" + ld a, 'F' ld [hli], a - ld a, "N" + ld a, 'N' ld [hli], a - ld [hl], "T" + ld [hl], 'T' and a ret @@ -337,7 +337,7 @@ PrintStatusConditionNotFainted:: ; hl = destination address ; [wLoadedMonLevel] = level PrintLevel:: - ld a, "" ; ":L" tile ID + ld a, '' ; ":L" tile ID ld [hli], a ld c, 2 ; number of digits ld a, [wLoadedMonLevel] ; level @@ -353,7 +353,7 @@ PrintLevel:: ; hl = destination address ; [wLoadedMonLevel] = level PrintLevelFull:: - ld a, "" ; ":L" tile ID + ld a, '' ; ":L" tile ID ld [hli], a ld c, 3 ; number of digits ld a, [wLoadedMonLevel] ; level diff --git a/home/print_bcd.asm b/home/print_bcd.asm index 57ec12a8..2e501be5 100644 --- a/home/print_bcd.asm +++ b/home/print_bcd.asm @@ -20,7 +20,7 @@ PrintBCDNumber:: jr z, .loop bit BIT_LEADING_ZEROES, b jr nz, .loop - ld [hl], "¥" + ld [hl], '¥' inc hl .loop ld a, [de] @@ -40,10 +40,10 @@ PrintBCDNumber:: .skipRightAlignmentAdjustment bit BIT_MONEY_SIGN, b jr z, .skipCurrencySymbol - ld [hl], "¥" + ld [hl], '¥' inc hl .skipCurrencySymbol - ld [hl], "0" + ld [hl], '0' call PrintLetterDelay inc hl .done @@ -59,13 +59,13 @@ PrintBCDDigit:: ; if bit 7 is set, then no numbers have been printed yet bit BIT_MONEY_SIGN, b jr z, .skipCurrencySymbol - ld [hl], "¥" + ld [hl], '¥' inc hl res BIT_MONEY_SIGN, b .skipCurrencySymbol res BIT_LEADING_ZEROES, b .outputDigit - add "0" + add '0' ld [hli], a jp PrintLetterDelay .zeroDigit diff --git a/home/print_num.asm b/home/print_num.asm index ef202239..32fae363 100644 --- a/home/print_num.asm +++ b/home/print_num.asm @@ -107,14 +107,14 @@ ENDM call .PrintLeadingZero jr .next .past - ld a, "0" + ld a, '0' add c ld [hl], a .next call .NextDigit .ones - ld a, "0" + ld a, '0' add b ld [hli], a pop de @@ -191,7 +191,7 @@ ENDM or c jr z, .PrintLeadingZero - ld a, "0" + ld a, '0' add c ld [hl], a ldh [hPastLeadingZeros], a @@ -200,7 +200,7 @@ ENDM .PrintLeadingZero: bit BIT_LEADING_ZEROES, d ret z - ld [hl], "0" + ld [hl], '0' ret .NextDigit: diff --git a/home/text.asm b/home/text.asm index 17fb7266..8ec872e0 100644 --- a/home/text.asm +++ b/home/text.asm @@ -3,7 +3,7 @@ TextBoxBorder:: ; top row push hl - ld a, "┌" + ld a, '┌' ld [hli], a inc a ; "─" call .PlaceChars @@ -17,11 +17,11 @@ TextBoxBorder:: ; middle rows .next push hl - ld a, "│" + ld a, '│' ld [hli], a - ld a, " " + ld a, ' ' call .PlaceChars - ld [hl], "│" + ld [hl], '│' pop hl ld de, SCREEN_WIDTH @@ -30,11 +30,11 @@ TextBoxBorder:: jr nz, .next ; bottom row - ld a, "└" + ld a, '└' ld [hli], a - ld a, "─" + ld a, '─' call .PlaceChars - ld [hl], "┘" + ld [hl], '┘' ret .PlaceChars:: @@ -51,7 +51,7 @@ PlaceString:: PlaceNextChar:: ld a, [de] - cp "@" + cp '@' jr nz, .NotTerminator ld b, h ld c, l @@ -59,7 +59,7 @@ PlaceNextChar:: ret .NotTerminator - cp "" + cp '' jr nz, .NotNext ld bc, 2 * SCREEN_WIDTH ldh a, [hUILayoutFlags] @@ -73,7 +73,7 @@ PlaceNextChar:: jp NextChar .NotNext - cp "" + cp '' jr nz, .NotLine pop hl hlcoord 1, 16 @@ -83,26 +83,26 @@ PlaceNextChar:: .NotLine ; Check against a dictionary - dict "", NullChar - dict "", _ContTextNoPause - dict "<_CONT>", _ContText - dict "", Paragraph - dict "", PageChar - dict "", PrintPlayerName - dict "", PrintRivalName - dict "#", PlacePOKe - dict "", PCChar - dict "", RocketChar - dict "", TMChar - dict "", TrainerChar - dict "", ContText - dict "<……>", SixDotsChar - dict "", DoneText - dict "", PromptText - dict "", PlacePKMN - dict "", PlaceDexEnd - dict "", PlaceMoveTargetsName - dict "", PlaceMoveUsersName + dict '', NullChar + dict '', _ContTextNoPause + dict '<_CONT>', _ContText + dict '', Paragraph + dict '', PageChar + dict '', PrintPlayerName + dict '', PrintRivalName + dict '#', PlacePOKe + dict '', PCChar + dict '', RocketChar + dict '', TMChar + dict '', TrainerChar + dict '', ContText + dict '<……>', SixDotsChar + dict '', DoneText + dict '', PromptText + dict '', PlacePKMN + dict '', PlaceDexEnd + dict '', PlaceMoveTargetsName + dict '', PlaceMoveUsersName ld [hli], a call PrintLetterDelay @@ -202,7 +202,7 @@ ContCharText:: text_end PlaceDexEnd:: - ld [hl], "." + ld [hl], '.' pop hl ret @@ -210,12 +210,12 @@ PromptText:: ld a, [wLinkState] cp LINK_STATE_BATTLING jp z, .ok - ld a, "▼" + ld a, '▼' ldcoord_a 18, 16 .ok call ProtectedDelay3 call ManualTextScroll - ld a, " " + ld a, ' ' ldcoord_a 18, 16 DoneText:: @@ -229,7 +229,7 @@ DoneText:: Paragraph:: push de - ld a, "▼" + ld a, '▼' ldcoord_a 18, 16 call ProtectedDelay3 call ManualTextScroll @@ -244,7 +244,7 @@ Paragraph:: PageChar:: push de - ld a, "▼" + ld a, '▼' ldcoord_a 18, 16 call ProtectedDelay3 call ManualTextScroll @@ -260,13 +260,13 @@ PageChar:: jp NextChar _ContText:: - ld a, "▼" + ld a, '▼' ldcoord_a 18, 16 call ProtectedDelay3 push de call ManualTextScroll pop de - ld a, " " + ld a, ' ' ldcoord_a 18, 16 _ContTextNoPause:: push de @@ -291,7 +291,7 @@ ScrollTextUpOneLine:: dec b jr nz, .copyText hlcoord 1, 16 - ld a, " " + ld a, ' ' ld b, SCREEN_WIDTH - 2 .clearText ld [hli], a @@ -436,12 +436,12 @@ TextCommand_PROMPT_BUTTON:: ld a, [wLinkState] cp LINK_STATE_BATTLING jp z, TextCommand_WAIT_BUTTON - ld a, "▼" + ld a, '▼' ldcoord_a 18, 16 ; place down arrow in lower right corner of dialogue text box push bc call ManualTextScroll ; blink arrow and wait for A or B to be pressed pop bc - ld a, " " + ld a, ' ' ldcoord_a 18, 16 ; overwrite down arrow with blank space pop hl jp NextTextCommand @@ -449,7 +449,7 @@ TextCommand_PROMPT_BUTTON:: TextCommand_SCROLL:: ; pushes text up two lines and sets the BC cursor to the border tile ; below the first character column of the text box. - ld a, " " + ld a, ' ' ldcoord_a 18, 16 ; place blank space in lower right corner of dialogue text box call ScrollTextUpOneLine call ScrollTextUpOneLine @@ -564,7 +564,7 @@ TextCommand_DOTS:: ld l, c .loop - ld a, "…" + ld a, '…' ld [hli], a push de call Joypad diff --git a/home/vcopy.asm b/home/vcopy.asm index e4ba2cdb..8ae9484a 100644 --- a/home/vcopy.asm +++ b/home/vcopy.asm @@ -19,7 +19,7 @@ GetRowColAddressBgMap:: ; clears a VRAM background map with blank space tiles ; INPUT: h - high byte of background tile map address in VRAM ClearBgMap:: - ld a, " " + ld a, ' ' jr .next ld a, l .next diff --git a/home/window.asm b/home/window.asm index 48bef77a..6885a138 100644 --- a/home/window.asm +++ b/home/window.asm @@ -151,7 +151,7 @@ PlaceMenuCursor:: jr nz, .oldMenuItemLoop .checkForArrow1 ld a, [hl] - cp "▶" ; was an arrow next to the previously selected menu item? + cp '▶' ; was an arrow next to the previously selected menu item? jr nz, .skipClearingArrow .clearArrow ld a, [wTileBehindCursor] @@ -177,11 +177,11 @@ PlaceMenuCursor:: jr nz, .currentMenuItemLoop .checkForArrow2 ld a, [hl] - cp "▶" ; has the right arrow already been placed? + cp '▶' ; has the right arrow already been placed? jr z, .skipSavingTile ; if so, don't lose the saved tile ld [wTileBehindCursor], a ; save tile before overwriting with right arrow .skipSavingTile - ld a, "▶" ; place right arrow + ld a, '▶' ; place right arrow ld [hl], a ld a, l ld [wMenuCursorLocation], a @@ -201,7 +201,7 @@ PlaceUnfilledArrowMenuCursor:: ld l, a ld a, [wMenuCursorLocation + 1] ld h, a - ld [hl], "▷" + ld [hl], '▷' ld a, b ret @@ -211,7 +211,7 @@ EraseMenuCursor:: ld l, a ld a, [wMenuCursorLocation + 1] ld h, a - ld [hl], " " + ld [hl], ' ' ret ; This toggles a blinking down arrow at hl on and off after a delay has passed. @@ -225,7 +225,7 @@ EraseMenuCursor:: HandleDownArrowBlinkTiming:: ld a, [hl] ld b, a - ld a, "▼" + ld a, '▼' cp b jr nz, .downArrowOff .downArrowOn @@ -237,7 +237,7 @@ HandleDownArrowBlinkTiming:: dec a ldh [hDownArrowBlinkCount2], a ret nz - ld a, " " + ld a, ' ' ld [hl], a ld a, $ff ldh [hDownArrowBlinkCount1], a @@ -259,7 +259,7 @@ HandleDownArrowBlinkTiming:: ret nz ld a, $06 ldh [hDownArrowBlinkCount2], a - ld a, "▼" + ld a, '▼' ld [hl], a ret diff --git a/macros/asserts.asm b/macros/asserts.asm index 7b41a654..e2de1505 100644 --- a/macros/asserts.asm +++ b/macros/asserts.asm @@ -1,18 +1,14 @@ ; Macros to verify assumptions about the data or code -MACRO _redef_current_label +MACRO? _redef_current_label IF DEF(\1) PURGE \1 ENDC IF _NARG == 3 + (\3) DEF \1 EQUS "\<_NARG>" - ELIF DEF(..) - IF .. - @ == 0 - DEF \1 EQUS "{..}" - ENDC - ELIF DEF(.) - if . - @ == 0 - DEF \1 EQUS "{.}" + ELIF STRLEN(#__SCOPE__) + IF {{__SCOPE__}} - @ == 0 + DEF \1 EQUS #{__SCOPE__} ENDC ENDC if !DEF(\1) @@ -21,12 +17,12 @@ MACRO _redef_current_label ENDC ENDM -MACRO table_width +MACRO? table_width DEF CURRENT_TABLE_WIDTH = \1 _redef_current_label CURRENT_TABLE_START, "._table_width\@", 2, \# ENDM -MACRO assert_table_length +MACRO? assert_table_length DEF w = \1 DEF x = w * CURRENT_TABLE_WIDTH DEF y = @ - {CURRENT_TABLE_START} @@ -34,7 +30,7 @@ MACRO assert_table_length "bytes, for {d:x} total; but got {d:y} bytes" ENDM -MACRO assert_max_table_length +MACRO? assert_max_table_length DEF w = \1 DEF x = w * CURRENT_TABLE_WIDTH DEF y = @ - {CURRENT_TABLE_START} @@ -42,24 +38,24 @@ MACRO assert_max_table_length "{d:CURRENT_TABLE_WIDTH} bytes, for maximum {d:x} total; but got {d:y} bytes" ENDM -MACRO list_start +MACRO? list_start DEF list_index = 0 _redef_current_label CURRENT_LIST_START, "._list_start\@", 1, \# ENDM -MACRO li +MACRO? li ASSERT STRFIND(\1, "@") == -1, "String terminator \"@\" in list entry: \1" db \1, "@" DEF list_index += 1 ENDM -MACRO assert_list_length +MACRO? assert_list_length DEF x = \1 ASSERT x == list_index, \ "{CURRENT_LIST_START}: expected {d:x} entries, got {d:list_index}" ENDM -MACRO nybble_array +MACRO? nybble_array DEF CURRENT_NYBBLE_ARRAY_VALUE = 0 DEF CURRENT_NYBBLE_ARRAY_LENGTH = 0 IF _NARG == 1 @@ -70,7 +66,7 @@ MACRO nybble_array ENDC ENDM -MACRO nybble +MACRO? nybble ASSERT 0 <= (\1) && (\1) < $10, "nybbles must be 0-15" DEF CURRENT_NYBBLE_ARRAY_VALUE = (\1) | (CURRENT_NYBBLE_ARRAY_VALUE << 4) DEF CURRENT_NYBBLE_ARRAY_LENGTH += 1 @@ -80,7 +76,7 @@ MACRO nybble ENDC ENDM -MACRO end_nybble_array +MACRO? end_nybble_array IF CURRENT_NYBBLE_ARRAY_LENGTH % 2 db CURRENT_NYBBLE_ARRAY_VALUE << 4 ENDC @@ -94,7 +90,7 @@ MACRO end_nybble_array ENDC ENDM -MACRO bit_array +MACRO? bit_array DEF CURRENT_BIT_ARRAY_VALUE = 0 DEF CURRENT_BIT_ARRAY_LENGTH = 0 IF _NARG == 1 @@ -105,7 +101,7 @@ MACRO bit_array ENDC ENDM -MACRO dbit +MACRO? dbit ASSERT (\1) == 0 || (\1) == 1, "bits must be 0 or 1" DEF CURRENT_BIT_ARRAY_VALUE |= (\1) << (CURRENT_BIT_ARRAY_LENGTH % 8) DEF CURRENT_BIT_ARRAY_LENGTH += 1 @@ -115,7 +111,7 @@ MACRO dbit ENDC ENDM -MACRO end_bit_array +MACRO? end_bit_array IF CURRENT_BIT_ARRAY_LENGTH % 8 db CURRENT_BIT_ARRAY_VALUE ENDC @@ -129,7 +125,7 @@ MACRO end_bit_array ENDC ENDM -MACRO def_grass_wildmons +MACRO? def_grass_wildmons ;\1: encounter rate DEF CURRENT_GRASS_WILDMONS_RATE = \1 REDEF CURRENT_GRASS_WILDMONS_LABEL EQUS "._def_grass_wildmons_\1" @@ -137,7 +133,7 @@ MACRO def_grass_wildmons db \1 ENDM -MACRO end_grass_wildmons +MACRO? end_grass_wildmons DEF x = @ - {CURRENT_GRASS_WILDMONS_LABEL} IF CURRENT_GRASS_WILDMONS_RATE == 0 ASSERT 1 == x, \ @@ -148,7 +144,7 @@ MACRO end_grass_wildmons ENDC ENDM -MACRO def_water_wildmons +MACRO? def_water_wildmons ;\1: encounter rate DEF CURRENT_WATER_WILDMONS_RATE = \1 REDEF CURRENT_WATER_WILDMONS_LABEL EQUS "._def_water_wildmons_\1" @@ -156,7 +152,7 @@ MACRO def_water_wildmons db \1 ENDM -MACRO end_water_wildmons +MACRO? end_water_wildmons DEF x = @ - {CURRENT_WATER_WILDMONS_LABEL} IF CURRENT_WATER_WILDMONS_RATE == 0 ASSERT 1 == x, \ diff --git a/macros/code.asm b/macros/code.asm index 3c65e100..c972f97e 100644 --- a/macros/code.asm +++ b/macros/code.asm @@ -1,10 +1,10 @@ ; Syntactic sugar macros -MACRO lb ; r, hi, lo +MACRO? lb ; r, hi, lo ld \1, ((\2) & $ff) << 8 + ((\3) & $ff) ENDM -MACRO ldpal +MACRO? ldpal ld \1, \2 << 6 | \3 << 4 | \4 << 2 | \5 ENDM diff --git a/macros/const.asm b/macros/const.asm index fa2f0753..d6a34672 100644 --- a/macros/const.asm +++ b/macros/const.asm @@ -1,6 +1,6 @@ ; Enumerate constants -MACRO const_def +MACRO? const_def IF _NARG >= 1 DEF const_value = \1 ELSE @@ -13,22 +13,22 @@ MACRO const_def ENDC ENDM -MACRO const +MACRO? const DEF \1 EQU const_value DEF const_value += const_inc ENDM -MACRO const_export +MACRO? const_export const \1 EXPORT \1 ENDM -MACRO shift_const +MACRO? shift_const DEF \1 EQU 1 << const_value DEF const_value += const_inc ENDM -MACRO const_skip +MACRO? const_skip if _NARG >= 1 DEF const_value += const_inc * (\1) else @@ -36,7 +36,7 @@ MACRO const_skip endc ENDM -MACRO const_next +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 @@ -44,12 +44,12 @@ MACRO const_next endc ENDM -MACRO dw_const +MACRO? dw_const dw \1 const \2 ENDM -MACRO rb_skip +MACRO? rb_skip IF _NARG == 1 rsset _RS + \1 ELSE diff --git a/macros/coords.asm b/macros/coords.asm index 6eccdec4..4f801d01 100644 --- a/macros/coords.asm +++ b/macros/coords.asm @@ -1,4 +1,4 @@ -MACRO validate_coords +MACRO? validate_coords IF _NARG >= 4 IF \1 >= \3 fail "x coord out of range" @@ -11,19 +11,19 @@ MACRO validate_coords ENDC ENDM -MACRO hlcoord +MACRO? hlcoord coord hl, \# ENDM -MACRO bccoord +MACRO? bccoord coord bc, \# ENDM -MACRO decoord +MACRO? decoord coord de, \# ENDM -MACRO coord +MACRO? coord ; register, x, y[, origin] validate_coords \2, \3 IF _NARG >= 4 @@ -33,19 +33,19 @@ MACRO coord ENDC ENDM -MACRO hlbgcoord +MACRO? hlbgcoord bgcoord hl, \# ENDM -MACRO bcbgcoord +MACRO? bcbgcoord bgcoord bc, \# ENDM -MACRO debgcoord +MACRO? debgcoord bgcoord de, \# ENDM -MACRO bgcoord +MACRO? bgcoord ; register, x, y[, origin] validate_coords \2, \3, TILEMAP_WIDTH, TILEMAP_HEIGHT IF _NARG >= 4 @@ -55,30 +55,30 @@ MACRO bgcoord ENDC ENDM -MACRO hlowcoord +MACRO? hlowcoord owcoord hl, \# ENDM -MACRO bcowcoord +MACRO? bcowcoord owcoord bc, \# ENDM -MACRO deowcoord +MACRO? deowcoord owcoord de, \# ENDM -MACRO owcoord +MACRO? owcoord ; register, x, y, map width ld \1, wOverworldMap + ((\2) + 3) + (((\3) + 3) * ((\4) + (3 * 2))) ENDM -MACRO event_displacement +MACRO? event_displacement ; map width, x blocks, y blocks dw (wOverworldMap + 7 + (\1) + ((\1) + 6) * ((\3) >> 1) + ((\2) >> 1)) db \3, \2 ENDM -MACRO dwcoord +MACRO? dwcoord ; x, y validate_coords \1, \2 IF _NARG >= 3 @@ -88,7 +88,7 @@ MACRO dwcoord ENDC ENDM -MACRO ldcoord_a +MACRO? ldcoord_a ; x, y[, origin] validate_coords \1, \2 IF _NARG >= 3 @@ -98,7 +98,7 @@ MACRO ldcoord_a ENDC ENDM -MACRO lda_coord +MACRO? lda_coord ; x, y[, origin] validate_coords \1, \2 IF _NARG >= 3 @@ -108,7 +108,7 @@ MACRO lda_coord ENDC ENDM -MACRO dbmapcoord +MACRO? dbmapcoord ; x, y db \2, \1 ENDM diff --git a/macros/data.asm b/macros/data.asm index c945a21d..feb8f1b8 100644 --- a/macros/data.asm +++ b/macros/data.asm @@ -2,19 +2,19 @@ DEF percent EQUS "* $ff / 100" -MACRO bcd2 +MACRO? bcd2 dn ((\1) / 1000) % 10, ((\1) / 100) % 10 dn ((\1) / 10) % 10, (\1) % 10 ENDM -MACRO bcd3 +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 -MACRO tmhm +MACRO? tmhm ; initialize bytes to 0 FOR n, (NUM_TM_HM + 7) / 8 DEF _tm{d:n} = 0 @@ -40,49 +40,49 @@ ENDM ; Constant data (db, dw, dl) macros -MACRO dbw +MACRO? dbw db \1 dw \2 ENDM -MACRO dwb +MACRO? dwb dw \1 db \2 ENDM -MACRO dn ; nybbles +MACRO? dn ; nybbles REPT _NARG / 2 db ((\1) << 4) | (\2) SHIFT 2 ENDR ENDM -MACRO dc ; "crumbs" +MACRO? dc ; "crumbs" REPT _NARG / 4 db ((\1) << 6) | ((\2) << 4) | ((\3) << 2) | (\4) SHIFT 4 ENDR ENDM -MACRO bigdw ; big-endian word +MACRO? bigdw ; big-endian word db HIGH(\1), LOW(\1) ENDM -MACRO dba ; dbw bank, address +MACRO? dba ; dbw bank, address REPT _NARG dbw BANK(\1), \1 SHIFT ENDR ENDM -MACRO dab ; dwb address, bank +MACRO? dab ; dwb address, bank REPT _NARG dwb \1, BANK(\1) SHIFT ENDR ENDM -MACRO dname +MACRO? dname IF _NARG == 2 DEF n = \2 ELSE @@ -91,5 +91,5 @@ MACRO dname ASSERT STRFIND(\1, "@") == -1, "String terminator \"@\" in name: \1" ASSERT CHARLEN(\1) <= n, "Name longer than {d:n} characters: \1" db \1 - ds n - CHARLEN(\1), "@" + ds n - CHARLEN(\1), '@' ENDM diff --git a/macros/gfx.asm b/macros/gfx.asm index 8c02bcd7..817f8787 100644 --- a/macros/gfx.asm +++ b/macros/gfx.asm @@ -1,4 +1,4 @@ -MACRO RGB +MACRO? RGB REPT _NARG / 3 dw palred (\1) + palgreen (\2) + palblue (\3) SHIFT 3 @@ -16,7 +16,7 @@ DEF color EQUS "+ PAL_COLORS *" DEF tiles EQUS "* TILE_SIZE" DEF tile EQUS "+ TILE_SIZE *" -MACRO dbsprite +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 45b0197b..efd692f1 100644 --- a/macros/predef.asm +++ b/macros/predef.asm @@ -1,32 +1,32 @@ -MACRO predef_id +MACRO? predef_id ld a, (\1Predef - PredefPointers) / 3 ENDM -MACRO predef +MACRO? predef predef_id \1 call Predef ENDM -MACRO predef_jump +MACRO? predef_jump predef_id \1 jp Predef ENDM -MACRO tx_pre_id +MACRO? tx_pre_id ld a, (\1_id - TextPredefs) / 2 + 1 ENDM -MACRO tx_pre +MACRO? tx_pre tx_pre_id \1 call PrintPredefTextID ENDM -MACRO tx_pre_jump +MACRO? tx_pre_jump tx_pre_id \1 jp PrintPredefTextID ENDM -MACRO db_tx_pre +MACRO? db_tx_pre db (\1_id - TextPredefs) / 2 + 1 ENDM diff --git a/macros/ram.asm b/macros/ram.asm index 5f2b8a6f..61358434 100644 --- a/macros/ram.asm +++ b/macros/ram.asm @@ -1,6 +1,6 @@ ; Used in wram.asm -MACRO flag_array +MACRO? flag_array ds ((\1) + 7) / 8 ENDM diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index 49150c6e..127a13ad 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -174,7 +174,7 @@ MACRO connection DEF _tgt = 0 ENDC - IF !STRCMP("\1", "north") + IF "\1" === "north" DEF _blk = \3_WIDTH * (\3_HEIGHT - 3) + _src DEF _map = _tgt DEF _win = (\3_WIDTH + 6) * \3_HEIGHT + 1 @@ -185,7 +185,7 @@ MACRO connection DEF _len = \3_WIDTH ENDC - ELIF !STRCMP("\1", "south") + ELIF "\1" === "south" DEF _blk = _src DEF _map = (CURRENT_MAP_WIDTH + 6) * (CURRENT_MAP_HEIGHT + 3) + _tgt DEF _win = \3_WIDTH + 7 @@ -196,7 +196,7 @@ MACRO connection DEF _len = \3_WIDTH ENDC - ELIF !STRCMP("\1", "west") + ELIF "\1" === "west" DEF _blk = (\3_WIDTH * _src) + \3_WIDTH - 3 DEF _map = (CURRENT_MAP_WIDTH + 6) * _tgt DEF _win = (\3_WIDTH + 6) * 2 - 6 @@ -207,7 +207,7 @@ MACRO connection DEF _len = \3_HEIGHT ENDC - ELIF !STRCMP("\1", "east") + ELIF "\1" === "east" DEF _blk = (\3_WIDTH * _src) DEF _map = (CURRENT_MAP_WIDTH + 6) * _tgt + CURRENT_MAP_WIDTH + 3 DEF _win = \3_WIDTH + 7 diff --git a/macros/vc.asm b/macros/vc.asm index 0990e988..bc0734aa 100644 --- a/macros/vc.asm +++ b/macros/vc.asm @@ -1,22 +1,22 @@ -MACRO vc_hook +MACRO? vc_hook IF DEF(_RED_VC) || DEF(_BLUE_VC) .VC_\1:: ENDC ENDM -MACRO vc_hook_red +MACRO? vc_hook_red IF DEF(_RED_VC) .VC_\1:: ENDC ENDM -MACRO vc_hook_blue +MACRO? vc_hook_blue IF DEF(_BLUE_VC) .VC_\1:: ENDC ENDM -MACRO vc_patch +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" @@ -24,7 +24,7 @@ MACRO vc_patch ENDC ENDM -MACRO vc_patch_end +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:: @@ -32,7 +32,7 @@ MACRO vc_patch_end ENDC ENDM -MACRO vc_assert +MACRO? vc_assert IF DEF(_RED_VC) || DEF(_BLUE_VC) ASSERT \# ENDC diff --git a/rgbdscheck.asm b/rgbdscheck.asm index 4198765b..0ba32a29 100644 --- a/rgbdscheck.asm +++ b/rgbdscheck.asm @@ -1,6 +1,6 @@ -IF !DEF(__RGBDS_MAJOR__) || !DEF(__RGBDS_MINOR__) || !DEF(__RGBDS_PATCH__) - fail "pokered requires rgbds v0.9.3 or newer." +IF !DEF(__RGBDS_MAJOR__) + fail "pokered requires rgbds v1.0.0 or newer." ENDC -IF __RGBDS_MAJOR__ == 0 && (__RGBDS_MINOR__ < 9 || (__RGBDS_MINOR__ == 9 && __RGBDS_PATCH__ < 3)) - fail "pokered requires rgbds v0.9.3 or newer." +IF __RGBDS_MAJOR__ < 1 + fail "pokered requires rgbds v1.0.0 or newer." ENDC diff --git a/scripts/Route23.asm b/scripts/Route23.asm index e2a66c4e..911a2ef3 100644 --- a/scripts/Route23.asm +++ b/scripts/Route23.asm @@ -86,7 +86,7 @@ Route23CopyBadgeTextScript: ld a, [hli] ld [de], a inc de - cp "@" + cp '@' jr nz, .copyTextLoop ret diff --git a/vc/pokeblue.constants.asm b/vc/pokeblue.constants.asm index e55bcca0..1622a41d 100644 --- a/vc/pokeblue.constants.asm +++ b/vc/pokeblue.constants.asm @@ -1,32 +1,32 @@ ; These are all the asm constants needed to make the blue_vc patch. ; [FPA 001 Begin] -EXPORT DEF M_CHAR EQU "M" -EXPORT DEF E_CHAR EQU "E" -EXPORT DEF G_CHAR EQU "G" -EXPORT DEF A_CHAR EQU "A" -EXPORT DEF P_CHAR EQU "P" -EXPORT DEF S_CHAR EQU "S" -EXPORT DEF L_CHAR EQU "L" -EXPORT DEF F_CHAR EQU "F" -EXPORT DEF X_CHAR EQU "X" +EXPORT DEF M_CHAR EQU 'M' +EXPORT DEF E_CHAR EQU 'E' +EXPORT DEF G_CHAR EQU 'G' +EXPORT DEF A_CHAR EQU 'A' +EXPORT DEF P_CHAR EQU 'P' +EXPORT DEF S_CHAR EQU 'S' +EXPORT DEF L_CHAR EQU 'L' +EXPORT DEF F_CHAR EQU 'F' +EXPORT DEF X_CHAR EQU 'X' EXPORT MEGA_PUNCH ; [FPA 001 End] EXPORT EXPLOSION ; [FPA 002 Begin] -EXPORT DEF U_CHAR EQU "U" -EXPORT DEF I_CHAR EQU "I" +EXPORT DEF U_CHAR EQU 'U' +EXPORT DEF I_CHAR EQU 'I' EXPORT GUILLOTINE ; [FPA 002 End] -EXPORT DEF K_CHAR EQU "K" +EXPORT DEF K_CHAR EQU 'K' EXPORT MEGA_KICK ; [FPA 004 Begin] -EXPORT DEF B_CHAR EQU "B" -EXPORT DEF Z_CHAR EQU "Z" +EXPORT DEF B_CHAR EQU 'B' +EXPORT DEF Z_CHAR EQU 'Z' EXPORT BLIZZARD ; [FPA 005 Begin] @@ -36,29 +36,29 @@ EXPORT BUBBLEBEAM EXPORT HYPER_BEAM ; [FPA 006 Begin] -EXPORT DEF H_CHAR EQU "H" -EXPORT DEF Y_CHAR EQU "Y" +EXPORT DEF H_CHAR EQU 'H' +EXPORT DEF Y_CHAR EQU 'Y' ; [FPA 007 Begin] -EXPORT DEF T_CHAR EQU "T" -EXPORT DEF N_CHAR EQU "N" +EXPORT DEF T_CHAR EQU 'T' +EXPORT DEF N_CHAR EQU 'N' EXPORT THUNDERBOLT ; [FPA 008 Begin] -EXPORT DEF R_CHAR EQU "R" +EXPORT DEF R_CHAR EQU 'R' EXPORT REFLECT ; [FPA 009 Begin] EXPORT SELFDESTRUCT ; [FPA 010 Begin] -EXPORT DEF D_CHAR EQU "D" +EXPORT DEF D_CHAR EQU 'D' EXPORT DREAM_EATER ; [FPA 011 Begin] -EXPORT DEF O_CHAR EQU "O" +EXPORT DEF O_CHAR EQU 'O' EXPORT SPORE ; [FPA 012 Begin] -EXPORT DEF C_CHAR EQU "C" +EXPORT DEF C_CHAR EQU 'C' EXPORT ROCK_SLIDE diff --git a/vc/pokered.constants.asm b/vc/pokered.constants.asm index aec40f11..a4b8ca24 100644 --- a/vc/pokered.constants.asm +++ b/vc/pokered.constants.asm @@ -1,58 +1,58 @@ ; These are all the asm constants needed to make the red_vc patch. ; [FPA 001 Begin] -EXPORT DEF M_CHAR EQU "M" -EXPORT DEF E_CHAR EQU "E" -EXPORT DEF G_CHAR EQU "G" -EXPORT DEF A_CHAR EQU "A" -EXPORT DEF P_CHAR EQU "P" -EXPORT DEF S_CHAR EQU "S" -EXPORT DEF L_CHAR EQU "L" -EXPORT DEF F_CHAR EQU "F" -EXPORT DEF D_CHAR EQU "D" -EXPORT DEF X_CHAR EQU "X" +EXPORT DEF M_CHAR EQU 'M' +EXPORT DEF E_CHAR EQU 'E' +EXPORT DEF G_CHAR EQU 'G' +EXPORT DEF A_CHAR EQU 'A' +EXPORT DEF P_CHAR EQU 'P' +EXPORT DEF S_CHAR EQU 'S' +EXPORT DEF L_CHAR EQU 'L' +EXPORT DEF F_CHAR EQU 'F' +EXPORT DEF D_CHAR EQU 'D' +EXPORT DEF X_CHAR EQU 'X' EXPORT MEGA_PUNCH ; [FPA 002 Begin] -EXPORT DEF U_CHAR EQU "U" -EXPORT DEF I_CHAR EQU "I" +EXPORT DEF U_CHAR EQU 'U' +EXPORT DEF I_CHAR EQU 'I' EXPORT GUILLOTINE ; [FPA 003 Begin] -EXPORT DEF K_CHAR EQU "K" +EXPORT DEF K_CHAR EQU 'K' EXPORT MEGA_KICK ; [FPA 004 Begin] -EXPORT DEF B_CHAR EQU "B" +EXPORT DEF B_CHAR EQU 'B' EXPORT BUBBLEBEAM ; [FPA 005 Begin] -EXPORT DEF H_CHAR EQU "H" -EXPORT DEF Y_CHAR EQU "Y" +EXPORT DEF H_CHAR EQU 'H' +EXPORT DEF Y_CHAR EQU 'Y' EXPORT HYPER_BEAM ; [FPA 006 Begin] -EXPORT DEF T_CHAR EQU "T" -EXPORT DEF N_CHAR EQU "N" +EXPORT DEF T_CHAR EQU 'T' +EXPORT DEF N_CHAR EQU 'N' EXPORT THUNDERBOLT ; [FPA 007 Begin] -EXPORT DEF R_CHAR EQU "R" +EXPORT DEF R_CHAR EQU 'R' EXPORT REFLECT ; [FPA 008 Begin] EXPORT DREAM_EATER ; [FPA 008 End] -EXPORT DEF Z_CHAR EQU "Z" +EXPORT DEF Z_CHAR EQU 'Z' EXPORT BLIZZARD ; [FPA 009 Begin] -EXPORT DEF O_CHAR EQU "O" +EXPORT DEF O_CHAR EQU 'O' EXPORT SPORE ; [FPA 010 Begin] -EXPORT DEF C_CHAR EQU "C" +EXPORT DEF C_CHAR EQU 'C' EXPORT ROCK_SLIDE ; [FPA 010 End]