From 03cb8c53f1507091f09a17235416904d5ed29a49 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 16 Sep 2018 13:40:47 -0400 Subject: [PATCH 1/2] Identify some Spaceworld beta content --- constants/scgb_constants.asm | 4 ++-- engine/gfx/cgb_layouts.asm | 16 ++++++++-------- engine/gfx/sgb_layouts.asm | 24 ++++++++++++------------ gfx/sgb/blk_packets.asm | 10 +++++----- gfx/sgb/pal_packets.asm | 4 ++-- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/constants/scgb_constants.asm b/constants/scgb_constants.asm index 807b5003c..e60ed9795 100644 --- a/constants/scgb_constants.asm +++ b/constants/scgb_constants.asm @@ -6,7 +6,7 @@ const SCGB_STATS_SCREEN_HP_PALS const SCGB_POKEDEX const SCGB_SLOT_MACHINE - const SCGB_06 + const SCGB_BETA_TITLE_SCREEN const SCGB_GS_INTRO const SCGB_DIPLOMA const SCGB_MAPPALS @@ -19,7 +19,7 @@ const SCGB_POKEDEX_SEARCH_OPTION const SCGB_BETA_POKER const SCGB_POKEPIC - const SCGB_13 + const SCGB_MAGNET_TRAIN const SCGB_PACKPALS const SCGB_TRAINER_CARD const SCGB_POKEDEX_UNOWN_MODE diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm index 71311f2f7..851486d49 100644 --- a/engine/gfx/cgb_layouts.asm +++ b/engine/gfx/cgb_layouts.asm @@ -36,7 +36,7 @@ LoadSGBLayoutCGB: dw _CGB_StatsScreenHPPals dw _CGB_Pokedex dw _CGB_SlotMachine - dw _CGB06 + dw _CGB_BetaTitleScreen dw _CGB_GSIntro dw _CGB_Diploma dw _CGB_MapPals @@ -47,9 +47,9 @@ LoadSGBLayoutCGB: dw _CGB_MoveList dw _CGB_BetaPikachuMinigame dw _CGB_PokedexSearchOption - dw _CGB11 + dw _CGB_BetaPoker dw _CGB_Pokepic - dw _CGB13 + dw _CGB_MagnetTrain dw _CGB_PackPals dw _CGB_TrainerCard dw _CGB_PokedexUnownMode @@ -419,8 +419,8 @@ _CGB_SlotMachine: ldh [hCGBPalUpdate], a ret -_CGB06: - ld hl, PalPacket_SCGB_06 + 1 +_CGB_BetaTitleScreen: + ld hl, PalPacket_BetaTitleScreen + 1 call CopyFourPalettes call WipeAttrMap ld de, wOBPals1 @@ -504,7 +504,7 @@ _CGB_GSIntro: call WipeAttrMap ret -_CGB11: +_CGB_BetaPoker: ld hl, BetaPokerPals ld de, wBGPals1 ld bc, 5 palettes @@ -863,8 +863,8 @@ _CGB_Pokepic: call ApplyAttrMap ret -_CGB13: - ld hl, PalPacket_SCGB_13 + 1 +_CGB_MagnetTrain: + ld hl, PalPacket_MagnetTrain + 1 call CopyFourPalettes call WipeAttrMap hlcoord 0, 4, wAttrMap diff --git a/engine/gfx/sgb_layouts.asm b/engine/gfx/sgb_layouts.asm index 7279f9a32..a0727c939 100644 --- a/engine/gfx/sgb_layouts.asm +++ b/engine/gfx/sgb_layouts.asm @@ -28,7 +28,7 @@ LoadSGBLayout: dw .SGB_StatsScreenHPPals dw .SGB_Pokedex dw .SGB_SlotMachine - dw .SGB06 + dw .SGB_BetaTitleScreen dw .SGB_GSIntro dw .SGB_Diploma dw .SGB_MapPals @@ -40,8 +40,8 @@ LoadSGBLayout: dw .SGB_BetaPikachuMinigame dw .SGB_PokedexSearchOption dw .SGB_BetaPoker - dw .SGB12 - dw .SGB13 + dw .SGB_Pokepic + dw .SGB_MagnetTrain dw .SGB_PackPals dw .SGB_TrainerCard dw .SGB_PokedexUnownMode @@ -283,9 +283,9 @@ LoadSGBLayout: ld de, BlkPacket_SlotMachine ret -.SGB06: - ld hl, PalPacket_SCGB_06 - ld de, BlkPacket_SCGB_06 +.SGB_BetaTitleScreen: + ld hl, PalPacket_BetaTitleScreen + ld de, BlkPacket_BetaTitleScreen ret .SGB_Diploma: @@ -321,9 +321,9 @@ endr ld [wSGBPredef], a ret -.SGB13: - ld hl, PalPacket_SCGB_13 - ld de, BlkPacket_SCGB_13 +.SGB_MagnetTrain: + ld hl, PalPacket_MagnetTrain + ld de, BlkPacket_MagnetTrain ret .SGB_BetaPikachuMinigame: @@ -408,7 +408,7 @@ endr ld de, BlkPacket_9a86 ret -.SGB12: +.SGB_Pokepic: ld hl, PalPacket_9bd6 ld de, wSGBPals ld bc, PALPACKET_LENGTH @@ -535,7 +535,7 @@ endr cp DUNGEON jr z, .cave cp ENVIRONMENT_5 - jr z, .perm5 + jr z, .env5 cp GATE jr z, .gate ld a, [wMapGroup] @@ -554,7 +554,7 @@ endr ld a, PREDEFPAL_DUNGEONS ret -.perm5 +.env5 ld a, PREDEFPAL_VERMILION ret diff --git a/gfx/sgb/blk_packets.asm b/gfx/sgb/blk_packets.asm index 92c6cb437..9c4bcb6ed 100644 --- a/gfx/sgb/blk_packets.asm +++ b/gfx/sgb/blk_packets.asm @@ -77,13 +77,13 @@ BlkPacket_GSTitleScreen: attr_blk_data %011, 1,1,0, 15,01, 18,04 ds 12 -BlkPacket_SCGB_06: +BlkPacket_BetaTitleScreen: attr_blk 1 - attr_blk_data %111, 0,0,1, 00,00, 19,05 + attr_blk_data %111, 0,0,1, 00,00, 19,05 ; logo ds 8 -BlkPacket_SCGB_13: +BlkPacket_MagnetTrain: attr_blk 2 - attr_blk_data %111, 2,2,0, 00,04, 19,13 - attr_blk_data %011, 1,1,0, 00,06, 19,11 + attr_blk_data %111, 2,2,0, 00,04, 19,13 ; fence + attr_blk_data %011, 1,1,0, 00,06, 19,11 ; train ds 2 diff --git a/gfx/sgb/pal_packets.asm b/gfx/sgb/pal_packets.asm index 1d5ae7e5e..b88bea526 100644 --- a/gfx/sgb/pal_packets.asm +++ b/gfx/sgb/pal_packets.asm @@ -19,7 +19,7 @@ ENDM PalPacket_GSTitleScreen: sgb_pal_set GS_TITLE_SCREEN_0, GS_TITLE_SCREEN_1, GS_TITLE_SCREEN_2, GS_TITLE_SCREEN_3 -PalPacket_SCGB_13: +PalPacket_MagnetTrain: sgb_pal_set BETA_SHINY_GREENMON, CGB_BADGE, RB_BROWNMON, 00 PalPacket_BetaPoker: @@ -67,7 +67,7 @@ UnreferencedPalPacket_9c86: PalPacket_SlotMachine: sgb_pal_set SLOT_MACHINE_0, SLOT_MACHINE_1, SLOT_MACHINE_2, SLOT_MACHINE_3 -PalPacket_SCGB_06: +PalPacket_BetaTitleScreen: sgb_pal_set BETA_LOGO_1, BETA_LOGO_2, DIPLOMA, RB_PURPLEMON PalPacket_Diploma: From 38bf21ae35504355b5c67f911c2e003c61c015b4 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 16 Sep 2018 16:02:58 -0400 Subject: [PATCH 2/2] Naming screen constants --- constants/menu_constants.asm | 12 ++++++++++++ engine/events/name_rater.asm | 2 +- engine/events/specials.asm | 2 +- engine/items/item_effects.asm | 4 ++-- engine/menus/intro_menu.asm | 2 +- engine/menus/naming_screen.asm | 3 ++- engine/pokemon/bills_pc.asm | 2 +- engine/pokemon/breeding.asm | 2 +- engine/pokemon/move_mon.asm | 2 +- mobile/mobile_22.asm | 2 +- 10 files changed, 23 insertions(+), 10 deletions(-) diff --git a/constants/menu_constants.asm b/constants/menu_constants.asm index bf6945bf4..4aaf10802 100644 --- a/constants/menu_constants.asm +++ b/constants/menu_constants.asm @@ -93,3 +93,15 @@ HMENURETURN_ASM EQU %11111111 const PARTYMENUTEXT_REVIVE const PARTYMENUTEXT_LEVEL_UP const PARTYMENUTEXT_HEAL_CONFUSION + +; Naming types (see engine/menus/naming_screen.asm) + const_def + const NAME_MON + const NAME_PLAYER + const NAME_RIVAL + const NAME_MOM + const NAME_BOX + const NAME_FRIEND + const NAME_6 ; duplicate of NAME_MON + const NAME_7 ; duplicate of NAME_MON +NUM_NAME_TYPES EQU const_value diff --git a/engine/events/name_rater.asm b/engine/events/name_rater.asm index 2cdff4bdd..1ec75db17 100644 --- a/engine/events/name_rater.asm +++ b/engine/events/name_rater.asm @@ -32,7 +32,7 @@ _NameRater: ld [wNamedObjectIndexBuffer], a ld [wCurSpecies], a call GetBaseData - ld b, 0 + ld b, NAME_MON ld de, wStringBuffer2 farcall _NamingScreen ; If the new name is empty, treat it as unchanged. diff --git a/engine/events/specials.asm b/engine/events/specials.asm index 07577232a..c030eaf11 100644 --- a/engine/events/specials.asm +++ b/engine/events/specials.asm @@ -84,7 +84,7 @@ FoundNone: ret NameRival: - ld b, $2 ; rival + ld b, NAME_RIVAL ld de, wRivalName farcall _NamingScreen ; default to "SILVER" diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index caa7d42a9..cdc22a019 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -584,7 +584,7 @@ PokeBallEffect: push de xor a ; PARTYMON ld [wMonType], a - ld b, 0 + ld b, NAME_MON farcall NamingScreen call RotateThreePalettesRight @@ -637,7 +637,7 @@ PokeBallEffect: ld a, BOXMON ld [wMonType], a ld de, wMonOrItemNameBuffer - ld b, $0 + ld b, NAME_MON farcall NamingScreen ld a, BANK(sBoxMonNicknames) diff --git a/engine/menus/intro_menu.asm b/engine/menus/intro_menu.asm index df0cc4edc..8cc9cb5ad 100644 --- a/engine/menus/intro_menu.asm +++ b/engine/menus/intro_menu.asm @@ -747,7 +747,7 @@ NamePlayer: ret .NewName: - ld b, 1 + ld b, NAME_PLAYER ld de, wPlayerName farcall NamingScreen diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm index addaed5a3..87e28263f 100644 --- a/engine/menus/naming_screen.asm +++ b/engine/menus/naming_screen.asm @@ -61,7 +61,7 @@ NamingScreen: .GetNamingScreenSetup: ld a, [wNamingScreenType] - and 7 + maskbits NUM_NAME_TYPES ld e, a ld d, 0 ld hl, .Jumptable @@ -73,6 +73,7 @@ NamingScreen: jp hl .Jumptable: +; entries correspond to NAME_* constants dw .Pokemon dw .Player dw .Rival diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm index 012d0e5d2..8127c8ff5 100644 --- a/engine/pokemon/bills_pc.asm +++ b/engine/pokemon/bills_pc.asm @@ -2454,7 +2454,7 @@ BillsPC_ChangeBoxSubmenu: ret .Name: - ld b, $4 ; box + ld b, NAME_BOX ld de, wd002 farcall NamingScreen call ClearTileMap diff --git a/engine/pokemon/breeding.asm b/engine/pokemon/breeding.asm index 022310de2..d24c1c608 100644 --- a/engine/pokemon/breeding.asm +++ b/engine/pokemon/breeding.asm @@ -330,7 +330,7 @@ HatchEggs: xor a ld [wMonType], a push de - ld b, $0 + ld b, NAME_MON farcall NamingScreen pop hl ld de, wStringBuffer1 diff --git a/engine/pokemon/move_mon.asm b/engine/pokemon/move_mon.asm index c67d210b9..fc268280b 100644 --- a/engine/pokemon/move_mon.asm +++ b/engine/pokemon/move_mon.asm @@ -1809,7 +1809,7 @@ InitNickname: call DisableSpriteUpdates pop de push de - ld b, $0 + ld b, NAME_MON farcall NamingScreen pop hl ld de, wStringBuffer1 diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm index e09a504a1..4c972e737 100644 --- a/mobile/mobile_22.asm +++ b/mobile/mobile_22.asm @@ -3487,7 +3487,7 @@ Function8a765: Function8a78c: call Function891fe ld de, wd002 - ld b, $5 + ld b, NAME_FRIEND farcall NamingScreen call OpenSRAMBank4 call Function8931b