From e02fa053f625d85e46ea640ab17edf6402e94339 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 18 Dec 2025 06:27:01 -0300 Subject: [PATCH 1/3] Automatically fix TM numbers over 100 in Bag menu (#8531) --- src/item_menu.c | 4 ++-- src/strings.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/item_menu.c b/src/item_menu.c index e63758b3ac..1479c9b3fa 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -937,7 +937,7 @@ static void GetItemNameFromPocket(u8 *dest, u16 itemId) { case POCKET_TM_HM: end = StringCopy(gStringVar2, GetMoveName(ItemIdToBattleMoveId(itemId))); - PrependFontIdToFit(gStringVar2, end, FONT_NARROW, 61); + PrependFontIdToFit(gStringVar2, end, FONT_NARROW, NUM_TECHNICAL_MACHINES >= 100 ? 60 : 65); if (GetItemTMHMIndex(itemId) > NUM_TECHNICAL_MACHINES) { // Get HM number @@ -947,7 +947,7 @@ static void GetItemNameFromPocket(u8 *dest, u16 itemId) else { // Get TM number - ConvertIntToDecimalStringN(gStringVar1, GetItemTMHMIndex(itemId), STR_CONV_MODE_LEADING_ZEROS, 2); + ConvertIntToDecimalStringN(gStringVar1, GetItemTMHMIndex(itemId), STR_CONV_MODE_LEADING_ZEROS, NUM_TECHNICAL_MACHINES >= 100 ? 3 : 2); StringExpandPlaceholders(dest, gText_NumberItem_TMBerry); } break; diff --git a/src/strings.c b/src/strings.c index 34c15fe35a..d63266c038 100644 --- a/src/strings.c +++ b/src/strings.c @@ -206,7 +206,7 @@ const u8 *const gPocketNamesStringsTable[] = [POCKET_KEY_ITEMS] = COMPOUND_STRING("KEY ITEMS") }; -const u8 gText_NumberItem_TMBerry[] = _("{NO}{STR_VAR_1}{CLEAR 0x07}{STR_VAR_2}"); +const u8 gText_NumberItem_TMBerry[] = _("{NO}{STR_VAR_1}{CLEAR 0x03}{STR_VAR_2}"); const u8 gText_NumberItem_HM[] = _("{CLEAR_TO 0x11}{STR_VAR_1}{CLEAR 0x05}{STR_VAR_2}"); const u8 gText_ShopBuy[] = _("BUY"); From 5cb1f2ff1ae06deb512cf04ebbc5bf63ca2de9a3 Mon Sep 17 00:00:00 2001 From: amiosi <44352097+amiosi@users.noreply.github.com> Date: Thu, 18 Dec 2025 06:37:32 -0500 Subject: [PATCH 2/3] Add different Poke Balls to more Trainers (#8467) --- src/battle_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/battle_main.c b/src/battle_main.c index 3aac0e4e1a..787e05608e 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -305,7 +305,7 @@ const struct TrainerClass gTrainerClasses[TRAINER_CLASS_COUNT] = { [TRAINER_CLASS_PKMN_TRAINER_1] = { _("{PKMN} TRAINER") }, [TRAINER_CLASS_PKMN_TRAINER_2] = { _("{PKMN} TRAINER") }, - [TRAINER_CLASS_HIKER] = { _("HIKER"), 10 }, + [TRAINER_CLASS_HIKER] = { _("HIKER"), 10, B_TRAINER_CLASS_POKE_BALLS >= GEN_8 ? BALL_ULTRA : BALL_POKE }, [TRAINER_CLASS_TEAM_AQUA] = { _("TEAM AQUA") }, [TRAINER_CLASS_PKMN_BREEDER] = { _("{PKMN} BREEDER"), 10, B_TRAINER_CLASS_POKE_BALLS >= GEN_8 ? BALL_HEAL : BALL_FRIEND }, [TRAINER_CLASS_COOLTRAINER] = { _("COOLTRAINER"), 12, BALL_ULTRA }, @@ -324,7 +324,7 @@ const struct TrainerClass gTrainerClasses[TRAINER_CLASS_COUNT] = [TRAINER_CLASS_TUBER_F] = { _("TUBER"), 1 }, [TRAINER_CLASS_TUBER_M] = { _("TUBER"), 1 }, [TRAINER_CLASS_LADY] = { _("LADY"), 50 }, - [TRAINER_CLASS_BEAUTY] = { _("BEAUTY"), 20 }, + [TRAINER_CLASS_BEAUTY] = { _("BEAUTY"), 20, B_TRAINER_CLASS_POKE_BALLS >= GEN_8 ? BALL_GREAT : BALL_POKE }, [TRAINER_CLASS_RICH_BOY] = { _("RICH BOY"), 50 }, [TRAINER_CLASS_POKEMANIAC] = { _("POKéMANIAC"), 15 }, [TRAINER_CLASS_GUITARIST] = { _("GUITARIST"), 8 }, @@ -335,13 +335,13 @@ const struct TrainerClass gTrainerClasses[TRAINER_CLASS_COUNT] = [TRAINER_CLASS_PSYCHIC] = { _("PSYCHIC"), 6 }, [TRAINER_CLASS_GENTLEMAN] = { _("GENTLEMAN"), 20, BALL_LUXURY }, [TRAINER_CLASS_ELITE_FOUR] = { _("ELITE FOUR"), 25, BALL_ULTRA }, - [TRAINER_CLASS_LEADER] = { _("LEADER"), 25 }, + [TRAINER_CLASS_LEADER] = { _("LEADER"), 25, B_TRAINER_CLASS_POKE_BALLS >= GEN_8 ? BALL_ULTRA : BALL_POKE }, [TRAINER_CLASS_SCHOOL_KID] = { _("SCHOOL KID") }, [TRAINER_CLASS_SR_AND_JR] = { _("SR. AND JR."), 4 }, [TRAINER_CLASS_WINSTRATE] = { _("WINSTRATE"), 10 }, [TRAINER_CLASS_POKEFAN] = { _("POKéFAN"), 20 }, [TRAINER_CLASS_YOUNGSTER] = { _("YOUNGSTER"), 4 }, - [TRAINER_CLASS_CHAMPION] = { _("CHAMPION"), 50 }, + [TRAINER_CLASS_CHAMPION] = { _("CHAMPION"), 50, BALL_ULTRA }, [TRAINER_CLASS_FISHERMAN] = { _("FISHERMAN"), 10, B_TRAINER_CLASS_POKE_BALLS >= GEN_8 ? BALL_DIVE : BALL_LURE }, [TRAINER_CLASS_TRIATHLETE] = { _("TRIATHLETE"), 10 }, [TRAINER_CLASS_DRAGON_TAMER] = { _("DRAGON TAMER"), 12 }, @@ -361,7 +361,7 @@ const struct TrainerClass gTrainerClasses[TRAINER_CLASS_COUNT] = [TRAINER_CLASS_YOUNG_COUPLE] = { _("YOUNG COUPLE"), 8 }, [TRAINER_CLASS_OLD_COUPLE] = { _("OLD COUPLE"), 10 }, [TRAINER_CLASS_SIS_AND_BRO] = { _("SIS AND BRO"), 3 }, - [TRAINER_CLASS_SALON_MAIDEN] = { _("SALON MAIDEN") }, + [TRAINER_CLASS_SALON_MAIDEN] = { _("SALON MAIDEN"), 0, BALL_ULTRA }, [TRAINER_CLASS_DOME_ACE] = { _("DOME ACE") }, [TRAINER_CLASS_PALACE_MAVEN] = { _("PALACE MAVEN") }, [TRAINER_CLASS_ARENA_TYCOON] = { _("ARENA TYCOON") }, From a0236bea8af2bd16d64558303c83240e2849763e Mon Sep 17 00:00:00 2001 From: RoamerX <20692776+RoamerX@users.noreply.github.com> Date: Thu, 18 Dec 2025 20:07:03 +0800 Subject: [PATCH 3/3] Update ld_script_modern.ld --- ld_script_modern.ld | 264 ++++++++++++++++++++++---------------------- 1 file changed, 132 insertions(+), 132 deletions(-) diff --git a/ld_script_modern.ld b/ld_script_modern.ld index 4493b73473..47989bd91f 100644 --- a/ld_script_modern.ld +++ b/ld_script_modern.ld @@ -1,132 +1,132 @@ -ENTRY(Start) - -gNumMusicPlayers = 4; -gMaxLines = 0; -gInitialMainCB2 = CB2_InitCopyrightScreenAfterBootup; - -MEMORY -{ - EWRAM (rwx) : ORIGIN = 0x2000000, LENGTH = 256K - IWRAM (rwx) : ORIGIN = 0x3000000, LENGTH = 32K - ROM (rx) : ORIGIN = 0x8000000, LENGTH = 32M -} - -SECTIONS { - - - .ewram ORIGIN(EWRAM) : AT (__ewram_lma) - ALIGN(4) - { - __ewram_start = .; - *(.ewram*) - . = ALIGN(4); - __ewram_end = .; - } > EWRAM - - .ewram.sbss (NOLOAD) : - ALIGN(4) - { - *.o(.sbss); - } > EWRAM - - .iwram ORIGIN(IWRAM) : AT (__iwram_lma) - ALIGN(4) - { - __iwram_start = .; - *(.iwram*); - . = ALIGN(4); - __iwram_end = .; - } > IWRAM - - .iwram.bss (NOLOAD) : - ALIGN(4) - { - *.o(.bss*); - *.o(common_data); - src/*.o(COMMON); - *libc.a:*.o(COMMON); - *libnosys.a:*.o(COMMON); - } > IWRAM - - /* BEGIN ROM DATA */ - - .text ORIGIN(ROM) : - ALIGN(4) - { - src/rom_header.o(.text*); - KEEP(*.o(.text.header_gf)); - KEEP(*.o(.text.header_rhh)); - src/crt0.o(.text); - *libagbsyscall.a:*.o(.text*); - *libgcc.a:*.o(.text*); - *libc.a:*.o(.text*); - *libnosys.a:*.o(.text*); - asm/*.o(.text*); - KEEP(*.o(.text.consts)); - *.o(.text*); - *.o(.eh_frame); - } > ROM =0 - - script_data : - ALIGN(4) - { - data/*.o(script_data); - } > ROM =0 - - .rodata : - ALIGN(4) - { - *.o(.rodata*); - *libgcc.a:*.o(.rodata*); - *libc.a:*.o(.rodata*); - *libc.a:*.o(.data*); - sound/songs/*.o(.rodata); - } > ROM =0 - - .data.iwram : - ALIGN(4) - { - __iwram_lma = .; - . = . + (__iwram_end - __iwram_start); - } > ROM = 0 - - .data.ewram : - ALIGN(4) - { - __ewram_lma = .; - . = . + (__ewram_end - __ewram_start); - } > ROM = 0 - - __rom_end = .; - - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - - /* Discard everything not specifically mentioned above. */ - /DISCARD/ : - { - *(*); - } -} +ENTRY(Start) + +gNumMusicPlayers = 4; +gMaxLines = 0; +gInitialMainCB2 = CB2_InitCopyrightScreenAfterBootup; + +MEMORY +{ + EWRAM (rwx) : ORIGIN = 0x2000000, LENGTH = 256K + IWRAM (rwx) : ORIGIN = 0x3000000, LENGTH = 32K + ROM (rx) : ORIGIN = 0x8000000, LENGTH = 32M +} + +SECTIONS { + + + .ewram ORIGIN(EWRAM) : AT (__ewram_lma) + ALIGN(4) + { + __ewram_start = .; + *(.ewram*) + . = ALIGN(4); + __ewram_end = .; + } > EWRAM + + .ewram.sbss (NOLOAD) : + ALIGN(4) + { + *.o(.sbss); + } > EWRAM + + .iwram ORIGIN(IWRAM) : AT (__iwram_lma) + ALIGN(4) + { + __iwram_start = .; + *(.iwram*); + . = ALIGN(4); + __iwram_end = .; + } > IWRAM + + .iwram.bss (NOLOAD) : + ALIGN(4) + { + *.o(.bss*); + *.o(common_data); + src/*.o(COMMON); + *libc.a:*.o(COMMON); + *libnosys.a:*.o(COMMON); + } > IWRAM + + /* BEGIN ROM DATA */ + + .text ORIGIN(ROM) : + ALIGN(4) + { + src/rom_header.o(.text*); + KEEP(*.o(.text.header_gf)); + KEEP(*.o(.text.header_rhh)); + src/crt0.o(.text); + *libagbsyscall.a:*.o(.text*); + *libgcc.a:*.o(.text*); + *libc.a:*.o(.text*); + *libnosys.a:*.o(.text*); + asm/*.o(.text*); + KEEP(*.o(.text.consts)); + *.o(.text*); + *.o(.eh_frame); + } > ROM =0 + + script_data : + ALIGN(4) + { + data/*.o(script_data); + } > ROM =0 + + .rodata : + ALIGN(4) + { + *.o(.rodata*); + *libgcc.a:*.o(.rodata*); + *libc.a:*.o(.rodata*); + *libc.a:*.o(.data*); + sound/songs/*.o(.rodata); + } > ROM =0 + + .data.iwram : + ALIGN(4) + { + __iwram_lma = .; + . = . + (__iwram_end - __iwram_start); + } > ROM = 0 + + .data.ewram : + ALIGN(4) + { + __ewram_lma = .; + . = . + (__ewram_end - __ewram_start); + } > ROM = 0 + + __rom_end = .; + + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + + /* Discard everything not specifically mentioned above. */ + /DISCARD/ : + { + *(*); + } +}