ref: a5375a080552f46a34377d21ab848f5cff7a6ecc
parent: 64da1f5d6bf96ff7f35165476ecc8d623f76060d
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Fri Jul 3 13:43:55 EDT 2020
Factor out graphics INCBINs from main.asm to gfx/*.asm
--- /dev/null
+++ b/gfx/fishing.asm
@@ -1,0 +1,4 @@
+RedFishingTilesFront: INCBIN "gfx/overworld/red_fish_front.2bpp"
+RedFishingTilesBack: INCBIN "gfx/overworld/red_fish_back.2bpp"
+RedFishingTilesSide: INCBIN "gfx/overworld/red_fish_side.2bpp"
+RedFishingRodTiles: INCBIN "gfx/overworld/fishing_rod.2bpp"
--- /dev/null
+++ b/gfx/font.asm
@@ -1,0 +1,31 @@
+PokemonLogoGraphics: INCBIN "gfx/title/pokemon_logo.2bpp"
+FontGraphics:: INCBIN "gfx/font/font.1bpp"
+FontGraphicsEnd::
+
+ABTiles: INCBIN "gfx/font/AB.2bpp"
+
+HpBarAndStatusGraphics:: INCBIN "gfx/font/font_battle_extra.2bpp"
+HpBarAndStatusGraphicsEnd::
+
+BattleHudTiles1: INCBIN "gfx/battle/battle_hud_1.1bpp"
+BattleHudTiles1End:
+BattleHudTiles2: INCBIN "gfx/battle/battle_hud_2.1bpp"
+BattleHudTiles3: INCBIN "gfx/battle/battle_hud_3.1bpp"
+BattleHudTiles3End:
+
+NintendoCopyrightLogoGraphics: INCBIN "gfx/intro_credits/copyright.2bpp"
+
+GamefreakLogoGraphics: INCBIN "gfx/title/gamefreak_inc.2bpp"
+GamefreakLogoGraphicsEnd:
+
+TextBoxGraphics:: INCBIN "gfx/font/font_extra.2bpp"
+TextBoxGraphicsEnd::
+
+PokedexTileGraphics: INCBIN "gfx/pokedex/pokedex.2bpp"
+PokedexTileGraphicsEnd:
+
+WorldMapTileGraphics: INCBIN "gfx/town_map/town_map.2bpp"
+WorldMapTileGraphicsEnd:
+
+PlayerCharacterTitleGraphics: INCBIN "gfx/title/player.2bpp"
+PlayerCharacterTitleGraphicsEnd:
--- /dev/null
+++ b/gfx/player.asm
@@ -1,0 +1,3 @@
+RedPicFront:: INCBIN "gfx/player/red.pic"
+ShrinkPic1:: INCBIN "gfx/player/shrink1.pic"
+ShrinkPic2:: INCBIN "gfx/player/shrink2.pic"
--- /dev/null
+++ b/gfx/trade.asm
@@ -1,0 +1,7 @@
+TradingAnimationGraphics:
+INCBIN "gfx/trade/game_boy.2bpp"
+INCBIN "gfx/trade/link_cable.2bpp"
+TradingAnimationGraphicsEnd:
+
+TradingAnimationGraphics2: INCBIN "gfx/trade/cable_ball.2bpp"
+TradingAnimationGraphics2End:
--- /dev/null
+++ b/gfx/trainer_card.asm
@@ -1,0 +1,8 @@
+TrainerInfoTextBoxTileGraphics: INCBIN "gfx/trainer_card/trainer_info.2bpp"
+TrainerInfoTextBoxTileGraphicsEnd:
+
+BlankLeaderNames: INCBIN "gfx/trainer_card/blank_leader_names.2bpp"
+
+CircleTile: INCBIN "gfx/trainer_card/circle_tile.2bpp"
+
+BadgeNumbersTileGraphics: INCBIN "gfx/trainer_card/badge_numbers.2bpp"
--- /dev/null
+++ b/gfx/version.asm
@@ -1,0 +1,8 @@
+Version_GFX:
+IF DEF(_RED)
+ INCBIN "gfx/title/red_version.1bpp" ; 10 tiles
+ENDC
+IF DEF(_BLUE)
+ INCBIN "gfx/title/blue_version.1bpp" ; 8 tiles
+ENDC
+Version_GFXEnd:
--- a/main.asm
+++ b/main.asm
@@ -84,28 +84,7 @@
SECTION "Graphics (BANK 4)", ROMX
-PokemonLogoGraphics: INCBIN "gfx/title/pokemon_logo.2bpp"
-FontGraphics:: INCBIN "gfx/font/font.1bpp"
-FontGraphicsEnd::
-ABTiles: INCBIN "gfx/font/AB.2bpp"
-HpBarAndStatusGraphics:: INCBIN "gfx/font/font_battle_extra.2bpp"
-HpBarAndStatusGraphicsEnd::
-BattleHudTiles1: INCBIN "gfx/battle/battle_hud_1.1bpp"
-BattleHudTiles1End:
-BattleHudTiles2: INCBIN "gfx/battle/battle_hud_2.1bpp"
-BattleHudTiles3: INCBIN "gfx/battle/battle_hud_3.1bpp"
-BattleHudTiles3End:
-NintendoCopyrightLogoGraphics: INCBIN "gfx/intro_credits/copyright.2bpp"
-GamefreakLogoGraphics: INCBIN "gfx/title/gamefreak_inc.2bpp"
-GamefreakLogoGraphicsEnd:
-TextBoxGraphics:: INCBIN "gfx/font/font_extra.2bpp"
-TextBoxGraphicsEnd::
-PokedexTileGraphics: INCBIN "gfx/pokedex/pokedex.2bpp"
-PokedexTileGraphicsEnd:
-WorldMapTileGraphics: INCBIN "gfx/town_map/town_map.2bpp"
-WorldMapTileGraphicsEnd:
-PlayerCharacterTitleGraphics: INCBIN "gfx/title/player.2bpp"
-PlayerCharacterTitleGraphicsEnd:
+INCLUDE "gfx/font.asm"
SECTION "Battle (BANK 4)", ROMX
@@ -113,11 +92,7 @@
INCLUDE "engine/overworld/is_player_just_outside_map.asm"
INCLUDE "engine/pokemon/status_screen.asm"
INCLUDE "engine/menus/party_menu.asm"
-
-RedPicFront:: INCBIN "gfx/player/red.pic"
-ShrinkPic1:: INCBIN "gfx/player/shrink1.pic"
-ShrinkPic2:: INCBIN "gfx/player/shrink2.pic"
-
+INCLUDE "gfx/player.asm"
INCLUDE "engine/overworld/turn_sprite.asm"
INCLUDE "engine/menus/start_sub_menus.asm"
INCLUDE "engine/items/tms.asm"
@@ -191,13 +166,7 @@
SECTION "Battle (BANK B)", ROMX
INCLUDE "engine/battle/display_effectiveness.asm"
-
-TrainerInfoTextBoxTileGraphics: INCBIN "gfx/trainer_card/trainer_info.2bpp"
-TrainerInfoTextBoxTileGraphicsEnd:
-BlankLeaderNames: INCBIN "gfx/trainer_card/blank_leader_names.2bpp"
-CircleTile: INCBIN "gfx/trainer_card/circle_tile.2bpp"
-BadgeNumbersTileGraphics: INCBIN "gfx/trainer_card/badge_numbers.2bpp"
-
+INCLUDE "gfx/trainer_card.asm"
INCLUDE "engine/items/tmhm.asm"
INCLUDE "engine/battle/scale_sprites.asm"
INCLUDE "engine/battle/move_effects/pay_day.asm"
@@ -229,15 +198,7 @@
INCLUDE "engine/battle/scroll_draw_trainer_pic.asm"
INCLUDE "engine/battle/trainer_ai.asm"
INCLUDE "engine/battle/draw_hud_pokeball_gfx.asm"
-
-TradingAnimationGraphics:
-INCBIN "gfx/trade/game_boy.2bpp"
-INCBIN "gfx/trade/link_cable.2bpp"
-TradingAnimationGraphicsEnd:
-
-TradingAnimationGraphics2: INCBIN "gfx/trade/cable_ball.2bpp"
-TradingAnimationGraphics2End:
-
+INCLUDE "gfx/trade.asm"
INCLUDE "engine/pokemon/evos_moves.asm"
INCLUDE "engine/battle/move_effects/heal.asm"
INCLUDE "engine/battle/move_effects/transform.asm"
@@ -344,17 +305,9 @@
SECTION "bank1A", ROMX
INCLUDE "engine/battle/decrement_pp.asm"
+INCLUDE "gfx/version.asm"
-Version_GFX:
-IF DEF(_RED)
- INCBIN "gfx/title/red_version.1bpp" ; 10 tiles
-ENDC
-IF DEF(_BLUE)
- INCBIN "gfx/title/blue_version.1bpp" ; 8 tiles
-ENDC
-Version_GFXEnd:
-
SECTION "bank1C", ROMX
INCLUDE "engine/movie/gamefreak.asm"
@@ -393,12 +346,7 @@
INCLUDE "engine/battle/animations.asm"
INCLUDE "engine/overworld/cut2.asm"
INCLUDE "engine/overworld/dust_smoke.asm"
-
-RedFishingTilesFront: INCBIN "gfx/overworld/red_fish_front.2bpp"
-RedFishingTilesBack: INCBIN "gfx/overworld/red_fish_back.2bpp"
-RedFishingTilesSide: INCBIN "gfx/overworld/red_fish_side.2bpp"
-RedFishingRodTiles: INCBIN "gfx/overworld/fishing_rod.2bpp"
-
+INCLUDE "gfx/fishing.asm"
INCLUDE "data/moves/animations.asm"
INCLUDE "engine/movie/evolution.asm"
INCLUDE "engine/overworld/elevator.asm"