From a90d7bed73bb7b9effbfce8d94b8a901323aaf8e Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 13 Apr 2021 12:51:27 -0400 Subject: [PATCH] Group miscellaneous graphics from main.asm into their own object file Fixes #824 --- Makefile | 1 + gfx/misc.asm | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ layout.link | 13 ++++++++++-- main.asm | 44 +++++---------------------------------- 4 files changed, 75 insertions(+), 41 deletions(-) create mode 100644 gfx/misc.asm diff --git a/Makefile b/Makefile index 909b98a7a..7eacd6b7b 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ data/pokemon/egg_moves.o \ data/pokemon/evos_attacks.o \ engine/movie/credits.o \ engine/overworld/events.o \ +gfx/misc.o \ gfx/pics.o \ gfx/sprites.o \ gfx/tilesets.o \ diff --git a/gfx/misc.asm b/gfx/misc.asm new file mode 100644 index 000000000..3788c07fe --- /dev/null +++ b/gfx/misc.asm @@ -0,0 +1,58 @@ +SECTION "Trainer Backpics", ROMX + +ChrisBackpic:: +INCBIN "gfx/player/chris_back.2bpp.lz" +DudeBackpic:: +INCBIN "gfx/battle/dude.2bpp.lz" + + +SECTION "Shrink Pics", ROMX + +Shrink1Pic:: +INCBIN "gfx/new_game/shrink1.2bpp.lz" +Shrink2Pic:: +INCBIN "gfx/new_game/shrink2.2bpp.lz" + + +SECTION "Unused Egg Pic", ROMX + +UnusedEggPic:: +; The G/S Egg pic. This is shifted up a few pixels. +INCBIN "gfx/pokemon/egg/unused_front.2bpp.lz" + + +SECTION "The End", ROMX + +TheEndGFX:: +INCBIN "gfx/credits/theend.2bpp" + + +SECTION "Font Inversed", ROMX + +FontInversed:: +INCBIN "gfx/font/font_inversed.1bpp" + + +SECTION "Copyright", ROMX + +CopyrightGFX:: +INCBIN "gfx/splash/copyright.2bpp" + + +SECTION "Intro Logo", ROMX + +GameFreakDittoGFX:: +INCBIN "gfx/splash/ditto.2bpp.lz" + + +SECTION "Unown Font", ROMX + +UnownFont:: +INCBIN "gfx/font/unown_font.2bpp" + + +SECTION "Pokégear GFX", ROMX + +PokegearGFX:: +INCBIN "gfx/pokegear/pokegear.2bpp.lz" + diff --git a/layout.link b/layout.link index 54c832dc9..315864c37 100644 --- a/layout.link +++ b/layout.link @@ -53,6 +53,7 @@ ROMX $09 "bank9" ROMX $0a "bankA" + "Trainer Backpics" ROMX $0b "bankB" ROMX $0c @@ -72,8 +73,11 @@ ROMX $12 "Crystal Features 1" ROMX $13 "bank13" + "Shrink Pics" + "bank13_2" ROMX $14 "bank14" + "Unused Egg Pic" ROMX $15 "Map Scripts 1" ROMX $16 @@ -135,6 +139,7 @@ ROMX $31 "Sprites 2" ROMX $32 "bank32" + "The End" ROMX $33 "Move Animations" "Extra Songs 2" @@ -150,6 +155,7 @@ ROMX $37 ROMX $38 "bank38" ROMX $39 + "Copyright" "bank39" ROMX $3a "Audio" @@ -290,9 +296,12 @@ ROMX $73 ROMX $74 "Pokedex Entries 193-251" ROMX $77 - "bank77" + "Unown Font" + "Print Party" "Tileset Data 7" - "bank77_2" + "bank77" + "Pokégear GFX" + "European Mail" ROMX $78 "Debug Room" "Tileset Data 8" diff --git a/main.asm b/main.asm index 650b5ea6c..b1041b4de 100644 --- a/main.asm +++ b/main.asm @@ -130,12 +130,6 @@ INCLUDE "engine/link/link.asm" INCLUDE "engine/overworld/wildmons.asm" INCLUDE "engine/battle/link_result.asm" -ChrisBackpic: -INCBIN "gfx/player/chris_back.2bpp.lz" - -DudeBackpic: -INCBIN "gfx/battle/dude.2bpp.lz" - SECTION "bankB", ROMX @@ -211,11 +205,8 @@ INCLUDE "data/maps/scenes.asm" INCLUDE "engine/overworld/load_map_part.asm" INCLUDE "engine/phone/phonering_copytilemapatonce.asm" -Shrink1Pic: -INCBIN "gfx/new_game/shrink1.2bpp.lz" -Shrink2Pic: -INCBIN "gfx/new_game/shrink2.2bpp.lz" +SECTION "bank13_2", ROMX INCLUDE "engine/link/link_2.asm" INCLUDE "engine/rtc/reset_password.asm" @@ -261,10 +252,6 @@ INCLUDE "data/pokemon/base_stats.asm" INCLUDE "data/pokemon/names.asm" INCLUDE "data/pokemon/unused_pic_banks.asm" -UnusedEggPic:: -; The G/S Egg pic. This is shifted up a few pixels. -INCBIN "gfx/pokemon/egg/unused_front.2bpp.lz" - SECTION "Crystal Phone Text", ROMX @@ -425,9 +412,6 @@ INCLUDE "engine/battle_anims/bg_effects.asm" INCLUDE "data/moves/animations.asm" INCLUDE "engine/events/poisonstep_pals.asm" -TheEndGFX:: -INCBIN "gfx/credits/theend.2bpp" - SECTION "Move Animations", ROMX @@ -461,12 +445,6 @@ INCLUDE "gfx/pokemon/frame_pointers.asm" INCLUDE "gfx/pokemon/kanto_frames.asm" -SECTION "Font Inversed", ROMX - -FontInversed: -INCBIN "gfx/font/font_inversed.1bpp" - - SECTION "Pic Animations 3", ROMX INCLUDE "gfx/pokemon/johto_frames.asm" @@ -485,9 +463,6 @@ INCLUDE "engine/pokemon/bills_pc.asm" SECTION "bank39", ROMX -CopyrightGFX:: -INCBIN "gfx/splash/copyright.2bpp" - INCLUDE "engine/menus/options_menu.asm" INCLUDE "engine/movie/splash.asm" INCLUDE "engine/movie/intro.asm" @@ -535,12 +510,6 @@ SECTION "mobile42", ROMX INCLUDE "mobile/mobile_42.asm" -SECTION "Intro Logo", ROMX - -GameFreakDittoGFX: -INCBIN "gfx/splash/ditto.2bpp.lz" - - SECTION "Title", ROMX INCLUDE "engine/movie/unused_title.asm" @@ -671,15 +640,12 @@ INCLUDE "data/moves/names.asm" INCLUDE "engine/overworld/landmarks.asm" -SECTION "bank77", ROMX - -UnownFont: -INCBIN "gfx/font/unown_font.2bpp" +SECTION "Print Party", ROMX INCLUDE "engine/printer/print_party.asm" -SECTION "bank77_2", ROMX +SECTION "bank77", ROMX INCLUDE "engine/rtc/print_hours_mins.asm" INCLUDE "engine/events/diploma.asm" @@ -687,8 +653,8 @@ INCLUDE "engine/pokedex/pokedex_3.asm" INCLUDE "engine/events/catch_tutorial_input.asm" INCLUDE "engine/pokegear/townmap_convertlinebreakcharacters.asm" -PokegearGFX: -INCBIN "gfx/pokegear/pokegear.2bpp.lz" + +SECTION "European Mail", ROMX INCLUDE "engine/pokemon/european_mail.asm"