summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--engine/battle/core.asm2
-rw-r--r--gfx/battle/dude.pngbin0 -> 375 bytes
-rw-r--r--gfx/player/chris_back.pngbin0 -> 458 bytes
-rw-r--r--gfx/pokemon/palette_pointers.asm523
-rw-r--r--main.asm414
-rw-r--r--tools/gfx.py8
-rw-r--r--tools/pokemontools/gfx.py8
-rw-r--r--tools/scan_includes.py35
-rwxr-xr-xtools/unused_sources.sh15
10 files changed, 297 insertions, 711 deletions
diff --git a/Makefile b/Makefile
index d9132f99..a96d33de 100644
--- a/Makefile
+++ b/Makefile
@@ -54,7 +54,7 @@ tidy:
clean:
rm -f $(roms) $(gold_obj) $(silver_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym)
- find gfx -iname "*.png" -delete
+ find gfx \( -iname "*.png" -not -iname "big_onix.png" \) -delete
$(MAKE) clean -C tools/
compare: $(roms)
@@ -108,3 +108,4 @@ pngs:
find gfx -iname "*.[12]bpp" -exec touch {} +
find gfx -iname "*.lz" -exec touch {} +
find gfx/pokemon gfx/trainers -iname "*.[1,2]bpp" -delete
+ rm gfx/battle/dude.2bpp gfx/player/chris_back.2bpp
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 734d151b..b3f97ecc 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -4791,7 +4791,7 @@ BattleMenuPKMN_Loop:
jr c, .Cancel
.loop
callfar FreezeMonIcons
- callfar GetMenu
+ callfar BattleMonMenu
jr c, BattleMenuPKMN_Loop
call PlaceHollowCursor
ld a, [wMenuCursorY]
diff --git a/gfx/battle/dude.png b/gfx/battle/dude.png
new file mode 100644
index 00000000..9a74a90d
--- /dev/null
+++ b/gfx/battle/dude.png
Binary files differ
diff --git a/gfx/player/chris_back.png b/gfx/player/chris_back.png
new file mode 100644
index 00000000..7bf3c50d
--- /dev/null
+++ b/gfx/player/chris_back.png
Binary files differ
diff --git a/gfx/pokemon/palette_pointers.asm b/gfx/pokemon/palette_pointers.asm
deleted file mode 100644
index 99fd584e..00000000
--- a/gfx/pokemon/palette_pointers.asm
+++ /dev/null
@@ -1,523 +0,0 @@
-PokemonPalettes:
- RGB 30, 22, 17
- RGB 16, 14, 19
- RGB 30, 22, 17
- RGB 16, 14, 19
-BulbasaurPalette: INCLUDE "gfx/pics/bulbasaur/normal.pal"
-BulbasaurShinyPalette: INCLUDE "gfx/pics/bulbasaur/shiny.pal"
-IvysaurPalette: INCLUDE "gfx/pics/ivysaur/normal.pal"
-IvysaurShinyPalette: INCLUDE "gfx/pics/ivysaur/shiny.pal"
-VenusaurPalette: INCLUDE "gfx/pics/venusaur/normal.pal"
-VenusaurShinyPalette: INCLUDE "gfx/pics/venusaur/shiny.pal"
-CharmanderPalette: INCLUDE "gfx/pics/charmander/normal.pal"
-CharmanderShinyPalette: INCLUDE "gfx/pics/charmander/shiny.pal"
-CharmeleonPalette: INCLUDE "gfx/pics/charmeleon/normal.pal"
-CharmeleonShinyPalette: INCLUDE "gfx/pics/charmeleon/shiny.pal"
-CharizardPalette: INCLUDE "gfx/pics/charizard/normal.pal"
-CharizardShinyPalette: INCLUDE "gfx/pics/charizard/shiny.pal"
-SquirtlePalette: INCLUDE "gfx/pics/squirtle/normal.pal"
-SquirtleShinyPalette: INCLUDE "gfx/pics/squirtle/shiny.pal"
-WartortlePalette: INCLUDE "gfx/pics/wartortle/normal.pal"
-WartortleShinyPalette: INCLUDE "gfx/pics/wartortle/shiny.pal"
-BlastoisePalette: INCLUDE "gfx/pics/blastoise/normal.pal"
-BlastoiseShinyPalette: INCLUDE "gfx/pics/blastoise/shiny.pal"
-CaterpiePalette: INCLUDE "gfx/pics/caterpie/normal.pal"
-CaterpieShinyPalette: INCLUDE "gfx/pics/caterpie/shiny.pal"
-MetapodPalette: INCLUDE "gfx/pics/metapod/normal.pal"
-MetapodShinyPalette: INCLUDE "gfx/pics/metapod/shiny.pal"
-ButterfreePalette: INCLUDE "gfx/pics/butterfree/normal.pal"
-ButterfreeShinyPalette: INCLUDE "gfx/pics/butterfree/shiny.pal"
-WeedlePalette: INCLUDE "gfx/pics/weedle/normal.pal"
-WeedleShinyPalette: INCLUDE "gfx/pics/weedle/shiny.pal"
-KakunaPalette: INCLUDE "gfx/pics/kakuna/normal.pal"
-KakunaShinyPalette: INCLUDE "gfx/pics/kakuna/shiny.pal"
-BeedrillPalette: INCLUDE "gfx/pics/beedrill/normal.pal"
-BeedrillShinyPalette: INCLUDE "gfx/pics/beedrill/shiny.pal"
-PidgeyPalette: INCLUDE "gfx/pics/pidgey/normal.pal"
-PidgeyShinyPalette: INCLUDE "gfx/pics/pidgey/shiny.pal"
-PidgeottoPalette: INCLUDE "gfx/pics/pidgeotto/normal.pal"
-PidgeottoShinyPalette: INCLUDE "gfx/pics/pidgeotto/shiny.pal"
-PidgeotPalette: INCLUDE "gfx/pics/pidgeot/normal.pal"
-PidgeotShinyPalette: INCLUDE "gfx/pics/pidgeot/shiny.pal"
-RattataPalette: INCLUDE "gfx/pics/rattata/normal.pal"
-RattataShinyPalette: INCLUDE "gfx/pics/rattata/shiny.pal"
-RaticatePalette: INCLUDE "gfx/pics/raticate/normal.pal"
-RaticateShinyPalette: INCLUDE "gfx/pics/raticate/shiny.pal"
-SpearowPalette: INCLUDE "gfx/pics/spearow/normal.pal"
-SpearowShinyPalette: INCLUDE "gfx/pics/spearow/shiny.pal"
-FearowPalette: INCLUDE "gfx/pics/fearow/normal.pal"
-FearowShinyPalette: INCLUDE "gfx/pics/fearow/shiny.pal"
-EkansPalette: INCLUDE "gfx/pics/ekans/normal.pal"
-EkansShinyPalette: INCLUDE "gfx/pics/ekans/shiny.pal"
-ArbokPalette: INCLUDE "gfx/pics/arbok/normal.pal"
-ArbokShinyPalette: INCLUDE "gfx/pics/arbok/shiny.pal"
-PikachuPalette: INCLUDE "gfx/pics/pikachu/normal.pal"
-PikachuShinyPalette: INCLUDE "gfx/pics/pikachu/shiny.pal"
-RaichuPalette: INCLUDE "gfx/pics/raichu/normal.pal"
-RaichuShinyPalette: INCLUDE "gfx/pics/raichu/shiny.pal"
-SandshrewPalette: INCLUDE "gfx/pics/sandshrew/normal.pal"
-SandshrewShinyPalette: INCLUDE "gfx/pics/sandshrew/shiny.pal"
-SandslashPalette: INCLUDE "gfx/pics/sandslash/normal.pal"
-SandslashShinyPalette: INCLUDE "gfx/pics/sandslash/shiny.pal"
-Nidoran_fPalette: INCLUDE "gfx/pics/nidoran_f/normal.pal"
-Nidoran_fShinyPalette: INCLUDE "gfx/pics/nidoran_f/shiny.pal"
-NidorinaPalette: INCLUDE "gfx/pics/nidorina/normal.pal"
-NidorinaShinyPalette: INCLUDE "gfx/pics/nidorina/shiny.pal"
-NidoqueenPalette: INCLUDE "gfx/pics/nidoqueen/normal.pal"
-NidoqueenShinyPalette: INCLUDE "gfx/pics/nidoqueen/shiny.pal"
-Nidoran_mPalette: INCLUDE "gfx/pics/nidoran_m/normal.pal"
-Nidoran_mShinyPalette: INCLUDE "gfx/pics/nidoran_m/shiny.pal"
-NidorinoPalette: INCLUDE "gfx/pics/nidorino/normal.pal"
-NidorinoShinyPalette: INCLUDE "gfx/pics/nidorino/shiny.pal"
-NidokingPalette: INCLUDE "gfx/pics/nidoking/normal.pal"
-NidokingShinyPalette: INCLUDE "gfx/pics/nidoking/shiny.pal"
-ClefairyPalette: INCLUDE "gfx/pics/clefairy/normal.pal"
-ClefairyShinyPalette: INCLUDE "gfx/pics/clefairy/shiny.pal"
-ClefablePalette: INCLUDE "gfx/pics/clefable/normal.pal"
-ClefableShinyPalette: INCLUDE "gfx/pics/clefable/shiny.pal"
-VulpixPalette: INCLUDE "gfx/pics/vulpix/normal.pal"
-VulpixShinyPalette: INCLUDE "gfx/pics/vulpix/shiny.pal"
-NinetalesPalette: INCLUDE "gfx/pics/ninetales/normal.pal"
-NinetalesShinyPalette: INCLUDE "gfx/pics/ninetales/shiny.pal"
-JigglypuffPalette: INCLUDE "gfx/pics/jigglypuff/normal.pal"
-JigglypuffShinyPalette: INCLUDE "gfx/pics/jigglypuff/shiny.pal"
-WigglytuffPalette: INCLUDE "gfx/pics/wigglytuff/normal.pal"
-WigglytuffShinyPalette: INCLUDE "gfx/pics/wigglytuff/shiny.pal"
-ZubatPalette: INCLUDE "gfx/pics/zubat/normal.pal"
-ZubatShinyPalette: INCLUDE "gfx/pics/zubat/shiny.pal"
-GolbatPalette: INCLUDE "gfx/pics/golbat/normal.pal"
-GolbatShinyPalette: INCLUDE "gfx/pics/golbat/shiny.pal"
-OddishPalette: INCLUDE "gfx/pics/oddish/normal.pal"
-OddishShinyPalette: INCLUDE "gfx/pics/oddish/shiny.pal"
-GloomPalette: INCLUDE "gfx/pics/gloom/normal.pal"
-GloomShinyPalette: INCLUDE "gfx/pics/gloom/shiny.pal"
-VileplumePalette: INCLUDE "gfx/pics/vileplume/normal.pal"
-VileplumeShinyPalette: INCLUDE "gfx/pics/vileplume/shiny.pal"
-ParasPalette: INCLUDE "gfx/pics/paras/normal.pal"
-ParasShinyPalette: INCLUDE "gfx/pics/paras/shiny.pal"
-ParasectPalette: INCLUDE "gfx/pics/parasect/normal.pal"
-ParasectShinyPalette: INCLUDE "gfx/pics/parasect/shiny.pal"
-VenonatPalette: INCLUDE "gfx/pics/venonat/normal.pal"
-VenonatShinyPalette: INCLUDE "gfx/pics/venonat/shiny.pal"
-VenomothPalette: INCLUDE "gfx/pics/venomoth/normal.pal"
-VenomothShinyPalette: INCLUDE "gfx/pics/venomoth/shiny.pal"
-DiglettPalette: INCLUDE "gfx/pics/diglett/normal.pal"
-DiglettShinyPalette: INCLUDE "gfx/pics/diglett/shiny.pal"
-DugtrioPalette: INCLUDE "gfx/pics/dugtrio/normal.pal"
-DugtrioShinyPalette: INCLUDE "gfx/pics/dugtrio/shiny.pal"
-MeowthPalette: INCLUDE "gfx/pics/meowth/normal.pal"
-MeowthShinyPalette: INCLUDE "gfx/pics/meowth/shiny.pal"
-PersianPalette: INCLUDE "gfx/pics/persian/normal.pal"
-PersianShinyPalette: INCLUDE "gfx/pics/persian/shiny.pal"
-PsyduckPalette: INCLUDE "gfx/pics/psyduck/normal.pal"
-PsyduckShinyPalette: INCLUDE "gfx/pics/psyduck/shiny.pal"
-GolduckPalette: INCLUDE "gfx/pics/golduck/normal.pal"
-GolduckShinyPalette: INCLUDE "gfx/pics/golduck/shiny.pal"
-MankeyPalette: INCLUDE "gfx/pics/mankey/normal.pal"
-MankeyShinyPalette: INCLUDE "gfx/pics/mankey/shiny.pal"
-PrimeapePalette: INCLUDE "gfx/pics/primeape/normal.pal"
-PrimeapeShinyPalette: INCLUDE "gfx/pics/primeape/shiny.pal"
-GrowlithePalette: INCLUDE "gfx/pics/growlithe/normal.pal"
-GrowlitheShinyPalette: INCLUDE "gfx/pics/growlithe/shiny.pal"
-ArcaninePalette: INCLUDE "gfx/pics/arcanine/normal.pal"
-ArcanineShinyPalette: INCLUDE "gfx/pics/arcanine/shiny.pal"
-PoliwagPalette: INCLUDE "gfx/pics/poliwag/normal.pal"
-PoliwagShinyPalette: INCLUDE "gfx/pics/poliwag/shiny.pal"
-PoliwhirlPalette: INCLUDE "gfx/pics/poliwhirl/normal.pal"
-PoliwhirlShinyPalette: INCLUDE "gfx/pics/poliwhirl/shiny.pal"
-PoliwrathPalette: INCLUDE "gfx/pics/poliwrath/normal.pal"
-PoliwrathShinyPalette: INCLUDE "gfx/pics/poliwrath/shiny.pal"
-AbraPalette: INCLUDE "gfx/pics/abra/normal.pal"
-AbraShinyPalette: INCLUDE "gfx/pics/abra/shiny.pal"
-KadabraPalette: INCLUDE "gfx/pics/kadabra/normal.pal"
-KadabraShinyPalette: INCLUDE "gfx/pics/kadabra/shiny.pal"
-AlakazamPalette: INCLUDE "gfx/pics/alakazam/normal.pal"
-AlakazamShinyPalette: INCLUDE "gfx/pics/alakazam/shiny.pal"
-MachopPalette: INCLUDE "gfx/pics/machop/normal.pal"
-MachopShinyPalette: INCLUDE "gfx/pics/machop/shiny.pal"
-MachokePalette: INCLUDE "gfx/pics/machoke/normal.pal"
-MachokeShinyPalette: INCLUDE "gfx/pics/machoke/shiny.pal"
-MachampPalette: INCLUDE "gfx/pics/machamp/normal.pal"
-MachampShinyPalette: INCLUDE "gfx/pics/machamp/shiny.pal"
-BellsproutPalette: INCLUDE "gfx/pics/bellsprout/normal.pal"
-BellsproutShinyPalette: INCLUDE "gfx/pics/bellsprout/shiny.pal"
-WeepinbellPalette: INCLUDE "gfx/pics/weepinbell/normal.pal"
-WeepinbellShinyPalette: INCLUDE "gfx/pics/weepinbell/shiny.pal"
-VictreebelPalette: INCLUDE "gfx/pics/victreebel/normal.pal"
-VictreebelShinyPalette: INCLUDE "gfx/pics/victreebel/shiny.pal"
-TentacoolPalette: INCLUDE "gfx/pics/tentacool/normal.pal"
-TentacoolShinyPalette: INCLUDE "gfx/pics/tentacool/shiny.pal"
-TentacruelPalette: INCLUDE "gfx/pics/tentacruel/normal.pal"
-TentacruelShinyPalette: INCLUDE "gfx/pics/tentacruel/shiny.pal"
-GeodudePalette: INCLUDE "gfx/pics/geodude/normal.pal"
-GeodudeShinyPalette: INCLUDE "gfx/pics/geodude/shiny.pal"
-GravelerPalette: INCLUDE "gfx/pics/graveler/normal.pal"
-GravelerShinyPalette: INCLUDE "gfx/pics/graveler/shiny.pal"
-GolemPalette: INCLUDE "gfx/pics/golem/normal.pal"
-GolemShinyPalette: INCLUDE "gfx/pics/golem/shiny.pal"
-PonytaPalette: INCLUDE "gfx/pics/ponyta/normal.pal"
-PonytaShinyPalette: INCLUDE "gfx/pics/ponyta/shiny.pal"
-RapidashPalette: INCLUDE "gfx/pics/rapidash/normal.pal"
-RapidashShinyPalette: INCLUDE "gfx/pics/rapidash/shiny.pal"
-SlowpokePalette: INCLUDE "gfx/pics/slowpoke/normal.pal"
-SlowpokeShinyPalette: INCLUDE "gfx/pics/slowpoke/shiny.pal"
-SlowbroPalette: INCLUDE "gfx/pics/slowbro/normal.pal"
-SlowbroShinyPalette: INCLUDE "gfx/pics/slowbro/shiny.pal"
-MagnemitePalette: INCLUDE "gfx/pics/magnemite/normal.pal"
-MagnemiteShinyPalette: INCLUDE "gfx/pics/magnemite/shiny.pal"
-MagnetonPalette: INCLUDE "gfx/pics/magneton/normal.pal"
-MagnetonShinyPalette: INCLUDE "gfx/pics/magneton/shiny.pal"
-Farfetch_dPalette: INCLUDE "gfx/pics/farfetch_d/normal.pal"
-Farfetch_dShinyPalette: INCLUDE "gfx/pics/farfetch_d/shiny.pal"
-DoduoPalette: INCLUDE "gfx/pics/doduo/normal.pal"
-DoduoShinyPalette: INCLUDE "gfx/pics/doduo/shiny.pal"
-DodrioPalette: INCLUDE "gfx/pics/dodrio/normal.pal"
-DodrioShinyPalette: INCLUDE "gfx/pics/dodrio/shiny.pal"
-SeelPalette: INCLUDE "gfx/pics/seel/normal.pal"
-SeelShinyPalette: INCLUDE "gfx/pics/seel/shiny.pal"
-DewgongPalette: INCLUDE "gfx/pics/dewgong/normal.pal"
-DewgongShinyPalette: INCLUDE "gfx/pics/dewgong/shiny.pal"
-GrimerPalette: INCLUDE "gfx/pics/grimer/normal.pal"
-GrimerShinyPalette: INCLUDE "gfx/pics/grimer/shiny.pal"
-MukPalette: INCLUDE "gfx/pics/muk/normal.pal"
-MukShinyPalette: INCLUDE "gfx/pics/muk/shiny.pal"
-ShellderPalette: INCLUDE "gfx/pics/shellder/normal.pal"
-ShellderShinyPalette: INCLUDE "gfx/pics/shellder/shiny.pal"
-CloysterPalette: INCLUDE "gfx/pics/cloyster/normal.pal"
-CloysterShinyPalette: INCLUDE "gfx/pics/cloyster/shiny.pal"
-GastlyPalette: INCLUDE "gfx/pics/gastly/normal.pal"
-GastlyShinyPalette: INCLUDE "gfx/pics/gastly/shiny.pal"
-HaunterPalette: INCLUDE "gfx/pics/haunter/normal.pal"
-HaunterShinyPalette: INCLUDE "gfx/pics/haunter/shiny.pal"
-GengarPalette: INCLUDE "gfx/pics/gengar/normal.pal"
-GengarShinyPalette: INCLUDE "gfx/pics/gengar/shiny.pal"
-OnixPalette: INCLUDE "gfx/pics/onix/normal.pal"
-OnixShinyPalette: INCLUDE "gfx/pics/onix/shiny.pal"
-DrowzeePalette: INCLUDE "gfx/pics/drowzee/normal.pal"
-DrowzeeShinyPalette: INCLUDE "gfx/pics/drowzee/shiny.pal"
-HypnoPalette: INCLUDE "gfx/pics/hypno/normal.pal"
-HypnoShinyPalette: INCLUDE "gfx/pics/hypno/shiny.pal"
-KrabbyPalette: INCLUDE "gfx/pics/krabby/normal.pal"
-KrabbyShinyPalette: INCLUDE "gfx/pics/krabby/shiny.pal"
-KinglerPalette: INCLUDE "gfx/pics/kingler/normal.pal"
-KinglerShinyPalette: INCLUDE "gfx/pics/kingler/shiny.pal"
-VoltorbPalette: INCLUDE "gfx/pics/voltorb/normal.pal"
-VoltorbShinyPalette: INCLUDE "gfx/pics/voltorb/shiny.pal"
-ElectrodePalette: INCLUDE "gfx/pics/electrode/normal.pal"
-ElectrodeShinyPalette: INCLUDE "gfx/pics/electrode/shiny.pal"
-ExeggcutePalette: INCLUDE "gfx/pics/exeggcute/normal.pal"
-ExeggcuteShinyPalette: INCLUDE "gfx/pics/exeggcute/shiny.pal"
-ExeggutorPalette: INCLUDE "gfx/pics/exeggutor/normal.pal"
-ExeggutorShinyPalette: INCLUDE "gfx/pics/exeggutor/shiny.pal"
-CubonePalette: INCLUDE "gfx/pics/cubone/normal.pal"
-CuboneShinyPalette: INCLUDE "gfx/pics/cubone/shiny.pal"
-MarowakPalette: INCLUDE "gfx/pics/marowak/normal.pal"
-MarowakShinyPalette: INCLUDE "gfx/pics/marowak/shiny.pal"
-HitmonleePalette: INCLUDE "gfx/pics/hitmonlee/normal.pal"
-HitmonleeShinyPalette: INCLUDE "gfx/pics/hitmonlee/shiny.pal"
-HitmonchanPalette: INCLUDE "gfx/pics/hitmonchan/normal.pal"
-HitmonchanShinyPalette: INCLUDE "gfx/pics/hitmonchan/shiny.pal"
-LickitungPalette: INCLUDE "gfx/pics/lickitung/normal.pal"
-LickitungShinyPalette: INCLUDE "gfx/pics/lickitung/shiny.pal"
-KoffingPalette: INCLUDE "gfx/pics/koffing/normal.pal"
-KoffingShinyPalette: INCLUDE "gfx/pics/koffing/shiny.pal"
-WeezingPalette: INCLUDE "gfx/pics/weezing/normal.pal"
-WeezingShinyPalette: INCLUDE "gfx/pics/weezing/shiny.pal"
-RhyhornPalette: INCLUDE "gfx/pics/rhyhorn/normal.pal"
-RhyhornShinyPalette: INCLUDE "gfx/pics/rhyhorn/shiny.pal"
-RhydonPalette: INCLUDE "gfx/pics/rhydon/normal.pal"
-RhydonShinyPalette: INCLUDE "gfx/pics/rhydon/shiny.pal"
-ChanseyPalette: INCLUDE "gfx/pics/chansey/normal.pal"
-ChanseyShinyPalette: INCLUDE "gfx/pics/chansey/shiny.pal"
-TangelaPalette: INCLUDE "gfx/pics/tangela/normal.pal"
-TangelaShinyPalette: INCLUDE "gfx/pics/tangela/shiny.pal"
-KangaskhanPalette: INCLUDE "gfx/pics/kangaskhan/normal.pal"
-KangaskhanShinyPalette: INCLUDE "gfx/pics/kangaskhan/shiny.pal"
-HorseaPalette: INCLUDE "gfx/pics/horsea/normal.pal"
-HorseaShinyPalette: INCLUDE "gfx/pics/horsea/shiny.pal"
-SeadraPalette: INCLUDE "gfx/pics/seadra/normal.pal"
-SeadraShinyPalette: INCLUDE "gfx/pics/seadra/shiny.pal"
-GoldeenPalette: INCLUDE "gfx/pics/goldeen/normal.pal"
-GoldeenShinyPalette: INCLUDE "gfx/pics/goldeen/shiny.pal"
-SeakingPalette: INCLUDE "gfx/pics/seaking/normal.pal"
-SeakingShinyPalette: INCLUDE "gfx/pics/seaking/shiny.pal"
-StaryuPalette: INCLUDE "gfx/pics/staryu/normal.pal"
-StaryuShinyPalette: INCLUDE "gfx/pics/staryu/shiny.pal"
-StarmiePalette: INCLUDE "gfx/pics/starmie/normal.pal"
-StarmieShinyPalette: INCLUDE "gfx/pics/starmie/shiny.pal"
-Mr__mimePalette: INCLUDE "gfx/pics/mr__mime/normal.pal"
-Mr__mimeShinyPalette: INCLUDE "gfx/pics/mr__mime/shiny.pal"
-ScytherPalette: INCLUDE "gfx/pics/scyther/normal.pal"
-ScytherShinyPalette: INCLUDE "gfx/pics/scyther/shiny.pal"
-JynxPalette: INCLUDE "gfx/pics/jynx/normal.pal"
-JynxShinyPalette: INCLUDE "gfx/pics/jynx/shiny.pal"
-ElectabuzzPalette: INCLUDE "gfx/pics/electabuzz/normal.pal"
-ElectabuzzShinyPalette: INCLUDE "gfx/pics/electabuzz/shiny.pal"
-MagmarPalette: INCLUDE "gfx/pics/magmar/normal.pal"
-MagmarShinyPalette: INCLUDE "gfx/pics/magmar/shiny.pal"
-PinsirPalette: INCLUDE "gfx/pics/pinsir/normal.pal"
-PinsirShinyPalette: INCLUDE "gfx/pics/pinsir/shiny.pal"
-TaurosPalette: INCLUDE "gfx/pics/tauros/normal.pal"
-TaurosShinyPalette: INCLUDE "gfx/pics/tauros/shiny.pal"
-MagikarpPalette: INCLUDE "gfx/pics/magikarp/normal.pal"
-MagikarpShinyPalette: INCLUDE "gfx/pics/magikarp/shiny.pal"
-GyaradosPalette: INCLUDE "gfx/pics/gyarados/normal.pal"
-GyaradosShinyPalette: INCLUDE "gfx/pics/gyarados/shiny.pal"
-LaprasPalette: INCLUDE "gfx/pics/lapras/normal.pal"
-LaprasShinyPalette: INCLUDE "gfx/pics/lapras/shiny.pal"
-DittoPalette: INCLUDE "gfx/pics/ditto/normal.pal"
-DittoShinyPalette: INCLUDE "gfx/pics/ditto/shiny.pal"
-EeveePalette: INCLUDE "gfx/pics/eevee/normal.pal"
-EeveeShinyPalette: INCLUDE "gfx/pics/eevee/shiny.pal"
-VaporeonPalette: INCLUDE "gfx/pics/vaporeon/normal.pal"
-VaporeonShinyPalette: INCLUDE "gfx/pics/vaporeon/shiny.pal"
-JolteonPalette: INCLUDE "gfx/pics/jolteon/normal.pal"
-JolteonShinyPalette: INCLUDE "gfx/pics/jolteon/shiny.pal"
-FlareonPalette: INCLUDE "gfx/pics/flareon/normal.pal"
-FlareonShinyPalette: INCLUDE "gfx/pics/flareon/shiny.pal"
-PorygonPalette: INCLUDE "gfx/pics/porygon/normal.pal"
-PorygonShinyPalette: INCLUDE "gfx/pics/porygon/shiny.pal"
-OmanytePalette: INCLUDE "gfx/pics/omanyte/normal.pal"
-OmanyteShinyPalette: INCLUDE "gfx/pics/omanyte/shiny.pal"
-OmastarPalette: INCLUDE "gfx/pics/omastar/normal.pal"
-OmastarShinyPalette: INCLUDE "gfx/pics/omastar/shiny.pal"
-KabutoPalette: INCLUDE "gfx/pics/kabuto/normal.pal"
-KabutoShinyPalette: INCLUDE "gfx/pics/kabuto/shiny.pal"
-KabutopsPalette: INCLUDE "gfx/pics/kabutops/normal.pal"
-KabutopsShinyPalette: INCLUDE "gfx/pics/kabutops/shiny.pal"
-AerodactylPalette: INCLUDE "gfx/pics/aerodactyl/normal.pal"
-AerodactylShinyPalette: INCLUDE "gfx/pics/aerodactyl/shiny.pal"
-SnorlaxPalette: INCLUDE "gfx/pics/snorlax/normal.pal"
-SnorlaxShinyPalette: INCLUDE "gfx/pics/snorlax/shiny.pal"
-ArticunoPalette: INCLUDE "gfx/pics/articuno/normal.pal"
-ArticunoShinyPalette: INCLUDE "gfx/pics/articuno/shiny.pal"
-ZapdosPalette: INCLUDE "gfx/pics/zapdos/normal.pal"
-ZapdosShinyPalette: INCLUDE "gfx/pics/zapdos/shiny.pal"
-MoltresPalette: INCLUDE "gfx/pics/moltres/normal.pal"
-MoltresShinyPalette: INCLUDE "gfx/pics/moltres/shiny.pal"
-DratiniPalette: INCLUDE "gfx/pics/dratini/normal.pal"
-DratiniShinyPalette: INCLUDE "gfx/pics/dratini/shiny.pal"
-DragonairPalette: INCLUDE "gfx/pics/dragonair/normal.pal"
-DragonairShinyPalette: INCLUDE "gfx/pics/dragonair/shiny.pal"
-DragonitePalette: INCLUDE "gfx/pics/dragonite/normal.pal"
-DragoniteShinyPalette: INCLUDE "gfx/pics/dragonite/shiny.pal"
-MewtwoPalette: INCLUDE "gfx/pics/mewtwo/normal.pal"
-MewtwoShinyPalette: INCLUDE "gfx/pics/mewtwo/shiny.pal"
-MewPalette: INCLUDE "gfx/pics/mew/normal.pal"
-MewShinyPalette: INCLUDE "gfx/pics/mew/shiny.pal"
-ChikoritaPalette: INCLUDE "gfx/pics/chikorita/normal.pal"
-ChikoritaShinyPalette: INCLUDE "gfx/pics/chikorita/shiny.pal"
-BayleefPalette: INCLUDE "gfx/pics/bayleef/normal.pal"
-BayleefShinyPalette: INCLUDE "gfx/pics/bayleef/shiny.pal"
-MeganiumPalette: INCLUDE "gfx/pics/meganium/normal.pal"
-MeganiumShinyPalette: INCLUDE "gfx/pics/meganium/shiny.pal"
-CyndaquilPalette: INCLUDE "gfx/pics/cyndaquil/normal.pal"
-CyndaquilShinyPalette: INCLUDE "gfx/pics/cyndaquil/shiny.pal"
-QuilavaPalette: INCLUDE "gfx/pics/quilava/normal.pal"
-QuilavaShinyPalette: INCLUDE "gfx/pics/quilava/shiny.pal"
-TyphlosionPalette: INCLUDE "gfx/pics/typhlosion/normal.pal"
-TyphlosionShinyPalette: INCLUDE "gfx/pics/typhlosion/shiny.pal"
-TotodilePalette: INCLUDE "gfx/pics/totodile/normal.pal"
-TotodileShinyPalette: INCLUDE "gfx/pics/totodile/shiny.pal"
-CroconawPalette: INCLUDE "gfx/pics/croconaw/normal.pal"
-CroconawShinyPalette: INCLUDE "gfx/pics/croconaw/shiny.pal"
-FeraligatrPalette: INCLUDE "gfx/pics/feraligatr/normal.pal"
-FeraligatrShinyPalette: INCLUDE "gfx/pics/feraligatr/shiny.pal"
-SentretPalette: INCLUDE "gfx/pics/sentret/normal.pal"
-SentretShinyPalette: INCLUDE "gfx/pics/sentret/shiny.pal"
-FurretPalette: INCLUDE "gfx/pics/furret/normal.pal"
-FurretShinyPalette: INCLUDE "gfx/pics/furret/shiny.pal"
-HoothootPalette: INCLUDE "gfx/pics/hoothoot/normal.pal"
-HoothootShinyPalette: INCLUDE "gfx/pics/hoothoot/shiny.pal"
-NoctowlPalette: INCLUDE "gfx/pics/noctowl/normal.pal"
-NoctowlShinyPalette: INCLUDE "gfx/pics/noctowl/shiny.pal"
-LedybaPalette: INCLUDE "gfx/pics/ledyba/normal.pal"
-LedybaShinyPalette: INCLUDE "gfx/pics/ledyba/shiny.pal"
-LedianPalette: INCLUDE "gfx/pics/ledian/normal.pal"
-LedianShinyPalette: INCLUDE "gfx/pics/ledian/shiny.pal"
-SpinarakPalette: INCLUDE "gfx/pics/spinarak/normal.pal"
-SpinarakShinyPalette: INCLUDE "gfx/pics/spinarak/shiny.pal"
-AriadosPalette: INCLUDE "gfx/pics/ariados/normal.pal"
-AriadosShinyPalette: INCLUDE "gfx/pics/ariados/shiny.pal"
-CrobatPalette: INCLUDE "gfx/pics/crobat/normal.pal"
-CrobatShinyPalette: INCLUDE "gfx/pics/crobat/shiny.pal"
-ChinchouPalette: INCLUDE "gfx/pics/chinchou/normal.pal"
-ChinchouShinyPalette: INCLUDE "gfx/pics/chinchou/shiny.pal"
-LanturnPalette: INCLUDE "gfx/pics/lanturn/normal.pal"
-LanturnShinyPalette: INCLUDE "gfx/pics/lanturn/shiny.pal"
-PichuPalette: INCLUDE "gfx/pics/pichu/normal.pal"
-PichuShinyPalette: INCLUDE "gfx/pics/pichu/shiny.pal"
-CleffaPalette: INCLUDE "gfx/pics/cleffa/normal.pal"
-CleffaShinyPalette: INCLUDE "gfx/pics/cleffa/shiny.pal"
-IgglybuffPalette: INCLUDE "gfx/pics/igglybuff/normal.pal"
-IgglybuffShinyPalette: INCLUDE "gfx/pics/igglybuff/shiny.pal"
-TogepiPalette: INCLUDE "gfx/pics/togepi/normal.pal"
-TogepiShinyPalette: INCLUDE "gfx/pics/togepi/shiny.pal"
-TogeticPalette: INCLUDE "gfx/pics/togetic/normal.pal"
-TogeticShinyPalette: INCLUDE "gfx/pics/togetic/shiny.pal"
-NatuPalette: INCLUDE "gfx/pics/natu/normal.pal"
-NatuShinyPalette: INCLUDE "gfx/pics/natu/shiny.pal"
-XatuPalette: INCLUDE "gfx/pics/xatu/normal.pal"
-XatuShinyPalette: INCLUDE "gfx/pics/xatu/shiny.pal"
-MareepPalette: INCLUDE "gfx/pics/mareep/normal.pal"
-MareepShinyPalette: INCLUDE "gfx/pics/mareep/shiny.pal"
-FlaaffyPalette: INCLUDE "gfx/pics/flaaffy/normal.pal"
-FlaaffyShinyPalette: INCLUDE "gfx/pics/flaaffy/shiny.pal"
-AmpharosPalette: INCLUDE "gfx/pics/ampharos/normal.pal"
-AmpharosShinyPalette: INCLUDE "gfx/pics/ampharos/shiny.pal"
-BellossomPalette: INCLUDE "gfx/pics/bellossom/normal.pal"
-BellossomShinyPalette: INCLUDE "gfx/pics/bellossom/shiny.pal"
-MarillPalette: INCLUDE "gfx/pics/marill/normal.pal"
-MarillShinyPalette: INCLUDE "gfx/pics/marill/shiny.pal"
-AzumarillPalette: INCLUDE "gfx/pics/azumarill/normal.pal"
-AzumarillShinyPalette: INCLUDE "gfx/pics/azumarill/shiny.pal"
-SudowoodoPalette: INCLUDE "gfx/pics/sudowoodo/normal.pal"
-SudowoodoShinyPalette: INCLUDE "gfx/pics/sudowoodo/shiny.pal"
-PolitoedPalette: INCLUDE "gfx/pics/politoed/normal.pal"
-PolitoedShinyPalette: INCLUDE "gfx/pics/politoed/shiny.pal"
-HoppipPalette: INCLUDE "gfx/pics/hoppip/normal.pal"
-HoppipShinyPalette: INCLUDE "gfx/pics/hoppip/shiny.pal"
-SkiploomPalette: INCLUDE "gfx/pics/skiploom/normal.pal"
-SkiploomShinyPalette: INCLUDE "gfx/pics/skiploom/shiny.pal"
-JumpluffPalette: INCLUDE "gfx/pics/jumpluff/normal.pal"
-JumpluffShinyPalette: INCLUDE "gfx/pics/jumpluff/shiny.pal"
-AipomPalette: INCLUDE "gfx/pics/aipom/normal.pal"
-AipomShinyPalette: INCLUDE "gfx/pics/aipom/shiny.pal"
-SunkernPalette: INCLUDE "gfx/pics/sunkern/normal.pal"
-SunkernShinyPalette: INCLUDE "gfx/pics/sunkern/shiny.pal"
-SunfloraPalette: INCLUDE "gfx/pics/sunflora/normal.pal"
-SunfloraShinyPalette: INCLUDE "gfx/pics/sunflora/shiny.pal"
-YanmaPalette: INCLUDE "gfx/pics/yanma/normal.pal"
-YanmaShinyPalette: INCLUDE "gfx/pics/yanma/shiny.pal"
-WooperPalette: INCLUDE "gfx/pics/wooper/normal.pal"
-WooperShinyPalette: INCLUDE "gfx/pics/wooper/shiny.pal"
-QuagsirePalette: INCLUDE "gfx/pics/quagsire/normal.pal"
-QuagsireShinyPalette: INCLUDE "gfx/pics/quagsire/shiny.pal"
-EspeonPalette: INCLUDE "gfx/pics/espeon/normal.pal"
-EspeonShinyPalette: INCLUDE "gfx/pics/espeon/shiny.pal"
-UmbreonPalette: INCLUDE "gfx/pics/umbreon/normal.pal"
-UmbreonShinyPalette: INCLUDE "gfx/pics/umbreon/shiny.pal"
-MurkrowPalette: INCLUDE "gfx/pics/murkrow/normal.pal"
-MurkrowShinyPalette: INCLUDE "gfx/pics/murkrow/shiny.pal"
-SlowkingPalette: INCLUDE "gfx/pics/slowking/normal.pal"
-SlowkingShinyPalette: INCLUDE "gfx/pics/slowking/shiny.pal"
-MisdreavusPalette: INCLUDE "gfx/pics/misdreavus/normal.pal"
-MisdreavusShinyPalette: INCLUDE "gfx/pics/misdreavus/shiny.pal"
-UnownPalette: INCLUDE "gfx/pics/unown/normal.pal"
-UnownShinyPalette: INCLUDE "gfx/pics/unown/shiny.pal"
-WobbuffetPalette: INCLUDE "gfx/pics/wobbuffet/normal.pal"
-WobbuffetShinyPalette: INCLUDE "gfx/pics/wobbuffet/shiny.pal"
-GirafarigPalette: INCLUDE "gfx/pics/girafarig/normal.pal"
-GirafarigShinyPalette: INCLUDE "gfx/pics/girafarig/shiny.pal"
-PinecoPalette: INCLUDE "gfx/pics/pineco/normal.pal"
-PinecoShinyPalette: INCLUDE "gfx/pics/pineco/shiny.pal"
-ForretressPalette: INCLUDE "gfx/pics/forretress/normal.pal"
-ForretressShinyPalette: INCLUDE "gfx/pics/forretress/shiny.pal"
-DunsparcePalette: INCLUDE "gfx/pics/dunsparce/normal.pal"
-DunsparceShinyPalette: INCLUDE "gfx/pics/dunsparce/shiny.pal"
-GligarPalette: INCLUDE "gfx/pics/gligar/normal.pal"
-GligarShinyPalette: INCLUDE "gfx/pics/gligar/shiny.pal"
-SteelixPalette: INCLUDE "gfx/pics/steelix/normal.pal"
-SteelixShinyPalette: INCLUDE "gfx/pics/steelix/shiny.pal"
-SnubbullPalette: INCLUDE "gfx/pics/snubbull/normal.pal"
-SnubbullShinyPalette: INCLUDE "gfx/pics/snubbull/shiny.pal"
-GranbullPalette: INCLUDE "gfx/pics/granbull/normal.pal"
-GranbullShinyPalette: INCLUDE "gfx/pics/granbull/shiny.pal"
-QwilfishPalette: INCLUDE "gfx/pics/qwilfish/normal.pal"
-QwilfishShinyPalette: INCLUDE "gfx/pics/qwilfish/shiny.pal"
-ScizorPalette: INCLUDE "gfx/pics/scizor/normal.pal"
-ScizorShinyPalette: INCLUDE "gfx/pics/scizor/shiny.pal"
-ShucklePalette: INCLUDE "gfx/pics/shuckle/normal.pal"
-ShuckleShinyPalette: INCLUDE "gfx/pics/shuckle/shiny.pal"
-HeracrossPalette: INCLUDE "gfx/pics/heracross/normal.pal"
-HeracrossShinyPalette: INCLUDE "gfx/pics/heracross/shiny.pal"
-SneaselPalette: INCLUDE "gfx/pics/sneasel/normal.pal"
-SneaselShinyPalette: INCLUDE "gfx/pics/sneasel/shiny.pal"
-TeddiursaPalette: INCLUDE "gfx/pics/teddiursa/normal.pal"
-TeddiursaShinyPalette: INCLUDE "gfx/pics/teddiursa/shiny.pal"
-UrsaringPalette: INCLUDE "gfx/pics/ursaring/normal.pal"
-UrsaringShinyPalette: INCLUDE "gfx/pics/ursaring/shiny.pal"
-SlugmaPalette: INCLUDE "gfx/pics/slugma/normal.pal"
-SlugmaShinyPalette: INCLUDE "gfx/pics/slugma/shiny.pal"
-MagcargoPalette: INCLUDE "gfx/pics/magcargo/normal.pal"
-MagcargoShinyPalette: INCLUDE "gfx/pics/magcargo/shiny.pal"
-SwinubPalette: INCLUDE "gfx/pics/swinub/normal.pal"
-SwinubShinyPalette: INCLUDE "gfx/pics/swinub/shiny.pal"
-PiloswinePalette: INCLUDE "gfx/pics/piloswine/normal.pal"
-PiloswineShinyPalette: INCLUDE "gfx/pics/piloswine/shiny.pal"
-CorsolaPalette: INCLUDE "gfx/pics/corsola/normal.pal"
-CorsolaShinyPalette: INCLUDE "gfx/pics/corsola/shiny.pal"
-RemoraidPalette: INCLUDE "gfx/pics/remoraid/normal.pal"
-RemoraidShinyPalette: INCLUDE "gfx/pics/remoraid/shiny.pal"
-OctilleryPalette: INCLUDE "gfx/pics/octillery/normal.pal"
-OctilleryShinyPalette: INCLUDE "gfx/pics/octillery/shiny.pal"
-DelibirdPalette: INCLUDE "gfx/pics/delibird/normal.pal"
-DelibirdShinyPalette: INCLUDE "gfx/pics/delibird/shiny.pal"
-MantinePalette: INCLUDE "gfx/pics/mantine/normal.pal"
-MantineShinyPalette: INCLUDE "gfx/pics/mantine/shiny.pal"
-SkarmoryPalette: INCLUDE "gfx/pics/skarmory/normal.pal"
-SkarmoryShinyPalette: INCLUDE "gfx/pics/skarmory/shiny.pal"
-HoundourPalette: INCLUDE "gfx/pics/houndour/normal.pal"
-HoundourShinyPalette: INCLUDE "gfx/pics/houndour/shiny.pal"
-HoundoomPalette: INCLUDE "gfx/pics/houndoom/normal.pal"
-HoundoomShinyPalette: INCLUDE "gfx/pics/houndoom/shiny.pal"
-KingdraPalette: INCLUDE "gfx/pics/kingdra/normal.pal"
-KingdraShinyPalette: INCLUDE "gfx/pics/kingdra/shiny.pal"
-PhanpyPalette: INCLUDE "gfx/pics/phanpy/normal.pal"
-PhanpyShinyPalette: INCLUDE "gfx/pics/phanpy/shiny.pal"
-DonphanPalette: INCLUDE "gfx/pics/donphan/normal.pal"
-DonphanShinyPalette: INCLUDE "gfx/pics/donphan/shiny.pal"
-Porygon2Palette: INCLUDE "gfx/pics/porygon2/normal.pal"
-Porygon2ShinyPalette: INCLUDE "gfx/pics/porygon2/shiny.pal"
-StantlerPalette: INCLUDE "gfx/pics/stantler/normal.pal"
-StantlerShinyPalette: INCLUDE "gfx/pics/stantler/shiny.pal"
-SmearglePalette: INCLUDE "gfx/pics/smeargle/normal.pal"
-SmeargleShinyPalette: INCLUDE "gfx/pics/smeargle/shiny.pal"
-TyroguePalette: INCLUDE "gfx/pics/tyrogue/normal.pal"
-TyrogueShinyPalette: INCLUDE "gfx/pics/tyrogue/shiny.pal"
-HitmontopPalette: INCLUDE "gfx/pics/hitmontop/normal.pal"
-HitmontopShinyPalette: INCLUDE "gfx/pics/hitmontop/shiny.pal"
-SmoochumPalette: INCLUDE "gfx/pics/smoochum/normal.pal"
-SmoochumShinyPalette: INCLUDE "gfx/pics/smoochum/shiny.pal"
-ElekidPalette: INCLUDE "gfx/pics/elekid/normal.pal"
-ElekidShinyPalette: INCLUDE "gfx/pics/elekid/shiny.pal"
-MagbyPalette: INCLUDE "gfx/pics/magby/normal.pal"
-MagbyShinyPalette: INCLUDE "gfx/pics/magby/shiny.pal"
-MiltankPalette: INCLUDE "gfx/pics/miltank/normal.pal"
-MiltankShinyPalette: INCLUDE "gfx/pics/miltank/shiny.pal"
-BlisseyPalette: INCLUDE "gfx/pics/blissey/normal.pal"
-BlisseyShinyPalette: INCLUDE "gfx/pics/blissey/shiny.pal"
-RaikouPalette: INCLUDE "gfx/pics/raikou/normal.pal"
-RaikouShinyPalette: INCLUDE "gfx/pics/raikou/shiny.pal"
-EnteiPalette: INCLUDE "gfx/pics/entei/normal.pal"
-EnteiShinyPalette: INCLUDE "gfx/pics/entei/shiny.pal"
-SuicunePalette: INCLUDE "gfx/pics/suicune/normal.pal"
-SuicuneShinyPalette: INCLUDE "gfx/pics/suicune/shiny.pal"
-LarvitarPalette: INCLUDE "gfx/pics/larvitar/normal.pal"
-LarvitarShinyPalette: INCLUDE "gfx/pics/larvitar/shiny.pal"
-PupitarPalette: INCLUDE "gfx/pics/pupitar/normal.pal"
-PupitarShinyPalette: INCLUDE "gfx/pics/pupitar/shiny.pal"
-TyranitarPalette: INCLUDE "gfx/pics/tyranitar/normal.pal"
-TyranitarShinyPalette: INCLUDE "gfx/pics/tyranitar/shiny.pal"
-LugiaPalette: INCLUDE "gfx/pics/lugia/normal.pal"
-LugiaShinyPalette: INCLUDE "gfx/pics/lugia/shiny.pal"
-Ho_ohPalette: INCLUDE "gfx/pics/ho_oh/normal.pal"
-Ho_ohShinyPalette: INCLUDE "gfx/pics/ho_oh/shiny.pal"
-CelebiPalette: INCLUDE "gfx/pics/celebi/normal.pal"
-CelebiShinyPalette: INCLUDE "gfx/pics/celebi/shiny.pal"
- RGB 30, 26, 11
- RGB 23, 16, 0
- RGB 30, 26, 11
- RGB 23, 16, 0
- RGB 30, 26, 11
- RGB 23, 16, 0
- RGB 30, 26, 11
- RGB 23, 16, 0
- RGB 30, 26, 11
- RGB 23, 16, 0
- RGB 30, 26, 11
- RGB 23, 16, 0
- RGB 23, 23, 23
- RGB 17, 17, 17
- RGB 23, 23, 23
- RGB 17, 17, 17
diff --git a/main.asm b/main.asm
index 65c28928..df91962b 100644
--- a/main.asm
+++ b/main.asm
@@ -17,6 +17,7 @@ INCLUDE "engine/events/happiness_egg.asm"
INCLUDE "engine/events/shuckle.asm"
INCLUDE "engine/events/haircut.asm"
+
SECTION "bank2", ROMX
INCLUDE "engine/tilesets/map_palettes.asm"
@@ -26,6 +27,7 @@ INCLUDE "engine/math/sine.asm"
INCLUDE "engine/predef.asm"
INCLUDE "engine/gfx/color.asm"
+
SECTION "bank3", ROMX
INCLUDE "engine/events/checktime.asm"
@@ -46,6 +48,7 @@ INCLUDE "engine/events/bug_contest/caught_mon.asm"
INCLUDE "engine/items/item_effects.asm"
INCLUDE "engine/pokemon/knows_move.asm"
+
SECTION "bank4", ROMX
INCLUDE "engine/overworld/player_movement.asm"
@@ -70,6 +73,7 @@ INCLUDE "engine/events/bug_contest/judging.asm"
INCLUDE "engine/events/pokerus/apply_pokerus_tick.asm"
INCLUDE "engine/events/bug_contest/contest_2.asm"
+
SECTION "bank5", ROMX
INCLUDE "engine/rtc/rtc.asm"
@@ -92,19 +96,25 @@ INCLUDE "engine/events/print_photo.asm"
INCLUDE "unknown/bank05_704d.asm"
INCLUDE "engine/pokemon/breeding.asm"
+
SECTION "bank6", ROMX
+
dr $18000, $1bdbc
+
SECTION "bank7", ROMX
LoadMapGroupRoof::
dr $1c000, $1f84c
+
SECTION "bank8", ROMX
+
dr $20000, $239fe
-EggMovePointers:
+EggMovePointers::
dr $239fe, $23e3d
+
SECTION "bank9", ROMX
StringBufferPointers::
@@ -121,79 +131,81 @@ _ExitMenu::
dr $24307, $24395
_InitVerticalMenuCursor::
dr $24395, $243eb
-UpdateItemDescription:
+UpdateItemDescription::
dr $243eb, $24477
-LoadObjectMasks:
+LoadObjectMasks::
dr $24477, $244d7
_InitScrollingMenu::
dr $244d7, $244f3
_ScrollingMenu::
dr $244f3, $2462e
-ScrollingMenu_ClearLeftColumn:
+ScrollingMenu_ClearLeftColumn::
dr $2462e, $24834
-SwitchItemsInBag:
+SwitchItemsInBag::
dr $24834, $249dc
-PlaceMenuItemName:
+PlaceMenuItemName::
dr $249dc, $249eb
-PlaceMenuItemQuantity:
+PlaceMenuItemQuantity::
dr $249eb, $24a10
-PlaceMoneyTopRight:
+PlaceMoneyTopRight::
dr $24a10, $24a18
-PlaceMoneyBottomLeft:
+PlaceMoneyBottomLeft::
dr $24a18, $24a20
-PlaceMoneyAtTopLeftOfTextbox:
+PlaceMoneyAtTopLeftOfTextbox::
dr $24a20, $24a4d
-DisplayCoinCaseBalance:
+DisplayCoinCaseBalance::
dr $24a4d, $24a76
-DisplayMoneyAndCoinBalance:
+DisplayMoneyAndCoinBalance::
dr $24a76, $24b05
-StartMenu_DrawBugContestStatusBox:
+StartMenu_DrawBugContestStatusBox::
dr $24b05, $24b10
-StartMenu_PrintBugContestStatus:
+StartMenu_PrintBugContestStatus::
dr $24b10, $24b8d
-Function24b8d:
+Function24b8d::
dr $24b8d, $24c89
-MonSubmenu:
+MonSubmenu::
dr $24c89, $24e09
-GetMenu::
+BattleMonMenu::
dr $24e09, $24e62
LoadBattleMenu::
dr $24e62, $24e72
ContestBattleMenu::
dr $24e72, $24f20
-SelectQuantityToToss:
+SelectQuantityToToss::
dr $24f20, $24f2a
-SelectQuantityToBuy:
+SelectQuantityToBuy::
dr $24f2a, $24f42
-SelectQuantityToSell:
+SelectQuantityToSell::
dr $24f42, $25061
-TrainerCard:
+TrainerCard::
dr $25061, $267af
-ProfOaksPC:
+ProfOaksPC::
dr $267af, $267ca
-ProfOaksPCBoot:
+ProfOaksPCBoot::
dr $267ca, $2692d
-InitDecorations:
+InitDecorations::
dr $2692d, $26938
-_PlayerDecorationMenu:
+_PlayerDecorationMenu::
dr $26938, $270d5
-ReceiveDecorationC:
+ReceiveDecorationC::
dr $270d5, $271be
-ToggleMaptileDecorations:
+ToggleMaptileDecorations::
dr $271be, $27216
-ToggleDecorationsVisibility:
+ToggleDecorationsVisibility::
dr $27216, $27271
INCLUDE "engine/battle/read_trainer_dvs.asm"
-ReturnToBattle_UseBall_:
+ReturnToBattle_UseBall_::
dr $27307, $2733d
-ConsumeHeldItem:
+ConsumeHeldItem::
dr $2733d, $2739f
INCLUDE "data/moves/effects.asm"
+
SECTION "banka", ROMX
+
dr $28000, $28d88
LinkTextboxAtHL::
dr $28d88, $28dea
@@ -202,97 +214,101 @@ TradeAnimation::
TradeAnimationPlayer2::
dr $28e22, $29a47
-CheckTimeCapsuleCompatibility:
+CheckTimeCapsuleCompatibility::
dr $29a47, $29ac7
-EnterTimeCapsule:
+EnterTimeCapsule::
dr $29ac7, $29ad9
-WaitForOtherPlayerToExit:
+WaitForOtherPlayerToExit::
dr $29ad9, $29b22
-SetBitsForLinkTradeRequest:
+SetBitsForLinkTradeRequest::
dr $29b22, $29b2b
-SetBitsForBattleRequest:
+SetBitsForBattleRequest::
dr $29b2b, $29b34
-SetBitsForTimeCapsuleRequest:
+SetBitsForTimeCapsuleRequest::
dr $29b34, $29b4b
-WaitForLinkedFriend:
+WaitForLinkedFriend::
dr $29b4b, $29bcc
-CheckLinkTimeout:
+CheckLinkTimeout::
dr $29bcc, $29c71
-TryQuickSave:
+TryQuickSave::
dr $29c71, $29c8d
-CheckBothSelectedSameRoom:
+CheckBothSelectedSameRoom::
dr $29c8d, $29cba
-TimeCapsule:
+TimeCapsule::
dr $29cba, $29ccf
-TradeCenter:
+TradeCenter::
dr $29ccf, $29ce4
-Colosseum:
+Colosseum::
dr $29ce4, $29cf9
-CloseLink:
+CloseLink::
dr $29cf9, $29d01
-FailedLinkToPast:
+FailedLinkToPast::
dr $29d01, $29d4e
-CableClubCheckWhichChris:
+CableClubCheckWhichChris::
dr $29d4e, $29dff
-Function29dff:
+Function29dff::
dr $29dff, $2a4bf
-MysteryGift_CopyReceivedDecosToPC:
+MysteryGift_CopyReceivedDecosToPC::
dr $2a4bf, $2a4e7
-UnlockMysteryGift:
+UnlockMysteryGift::
dr $2a4e7, $2a4f6
-Function2a4f6:
+Function2a4f6::
dr $2a4f6, $2a507
-BackupMysteryGift:
+BackupMysteryGift::
dr $2a507, $2a518
-RestoreMysteryGift:
+RestoreMysteryGift::
dr $2a518, $2a539
-LoadWildMonData:
+LoadWildMonData::
dr $2a539, $2a7d7
-InitRoamMons:
+InitRoamMons::
dr $2a7d7, $2a859
-UpdateRoamMons:
+UpdateRoamMons::
dr $2a859, $2a8e0
-JumpRoamMons:
+JumpRoamMons::
dr $2a8e0, $2a9f7
-RandomUnseenWildMon:
+RandomUnseenWildMon::
dr $2a9f7, $2aa6b
-RandomPhoneWildMon:
+RandomPhoneWildMon::
dr $2aa6b, $2aab3
-RandomPhoneMon:
+RandomPhoneMon::
dr $2aab3, $2ab35
-JohtoGrassWildMons:
+JohtoGrassWildMons::
dr $2ab35, $2bee3
+
SECTION "bankb", ROMX
+
dr $2c000, $2c033
-BattleStart_TrainerHuds:
+BattleStart_TrainerHuds::
dr $2c033, $2c045
-EnemySwitch_TrainerHud:
+EnemySwitch_TrainerHud::
dr $2c045, $2c0c8
-DrawPlayerHUDBorder:
+DrawPlayerHUDBorder::
dr $2c0c8, $2c0f8
-DrawEnemyHUDBorder:
+DrawEnemyHUDBorder::
dr $2c0f8, $2c1e4
-_ShowLinkBattleParticipants:
+_ShowLinkBattleParticipants::
dr $2c1e4, $2c225
INCLUDE "engine/battle/ai/redundant.asm"
-MoveDeletion:
+MoveDeletion::
dr $2c352, $2c57a
-Pack_TMHMPocketMenu_:
+Pack_TMHMPocketMenu_::
dr $2c57a, $2c5ca
-AskTeachTMHM:
+AskTeachTMHM::
dr $2c5ca, $2c606
-ChooseMonToLearnTMHM:
+ChooseMonToLearnTMHM::
dr $2c606, $2c672
-TeachTMHM:
+TeachTMHM::
dr $2c672, $2c943
PrintMoveDesc::
dr $2c943, $2c95d
GivePokerusAndConvertBerries::
dr $2c95d, $2ca31
+
SECTION "bankc", ROMX
+
dr $30000, $33d81
@@ -323,7 +339,7 @@ Pokedex::
Moves::
dr $41afe, $421db
-EvolvePokemon:
+EvolvePokemon::
dr $421db, $421e9
EvolveAfterBattle::
dr $421e9, $42483
@@ -331,12 +347,14 @@ LearnLevelMoves::
dr $42483, $424dd
FillMoves::
dr $424dd, $4278d
-GetPreEvolution:
+GetPreEvolution::
dr $4278d, $427bd
EvosAttacksPointers::
dr $427bd, $43e57
+
SECTION "bank11", ROMX
+
dr $44000, $440c8
INCLUDE "engine/battle/ai/move.asm"
dr $441c2, $44360
@@ -350,50 +368,51 @@ PlaceGraphic::
dr $44648, $44679
SendMailToPC::
dr $44679, $44830
-BackupPartyMonMail:
+BackupPartyMonMail::
dr $44830, $44850
-RestorePartyMonMail:
+RestorePartyMonMail::
dr $44850, $44870
-DeletePartyMonMail:
+DeletePartyMonMail::
dr $44870, $4488c
-IsAnyPokemonHoldingMail:
+IsAnyPokemonHoldingMail::
dr $4488c, $448ab
-_PlayerMailBoxMenu:
+_PlayerMailBoxMenu::
dr $448ab, $44aa2
+
SECTION "bank14", ROMX
-SelectMonFromParty:
+SelectMonFromParty::
dr $50000, $5001d
-SelectTradeOrDayCareMon:
+SelectTradeOrDayCareMon::
dr $5001d, $5004f
-LoadPartyMenuGFX:
+LoadPartyMenuGFX::
dr $5004f, $5005f
-WritePartyMenuTilemap:
+WritePartyMenuTilemap::
dr $5005f, $50355
-InitPartyMenuGFX:
+InitPartyMenuGFX::
dr $50355, $5037a
-InitPartyMenuWithCancel:
+InitPartyMenuWithCancel::
dr $5037a, $503a2
-InitPartyMenuNoCancel:
+InitPartyMenuNoCancel::
dr $503a2, $503cc
-PartyMenuSelect:
+PartyMenuSelect::
dr $503cc, $5040f
-PrintPartyMenuText:
+PrintPartyMenuText::
dr $5040f, $504db
-PrintPartyMenuActionText:
+PrintPartyMenuActionText::
dr $504db, $5054f
-LoadFishingGFX:
+LoadFishingGFX::
dr $5054f, $506f2
-SweetScentFromMenu:
+SweetScentFromMenu::
dr $506f2, $50763
-SquirtbottleFunction:
+SquirtbottleFunction::
dr $50763, $507ac
-CardKeyFunction:
+CardKeyFunction::
dr $507ac, $507e7
-BasementKeyFunction:
+BasementKeyFunction::
dr $507e7, $50819
-SacredAshFunction:
+SacredAshFunction::
dr $50819, $5087d
CopyMonToTempMon::
dr $5087d, $50940
@@ -424,45 +443,47 @@ PlaceNonFaintStatus::
dr $51437, $51478
ListMoves::
dr $51478, $51524
-CalcLevel:
+CalcLevel::
dr $51524, $51550
-CalcExpAtLevel:
+CalcExpAtLevel::
dr $51550, $5161b
-_SwitchPartyMons:
+_SwitchPartyMons::
dr $5161b, $51749
-
INCLUDE "engine/gfx/load_pics.asm"
INCLUDE "engine/pokemon/move_mon_wo_mail.asm"
INCLUDE "data/pokemon/base_stats.asm"
-Unknown53a6b:
+Unknown53a6b::
dr $53a6b, $53a83
EggPic::
INCBIN "gfx/pokemon/egg/front.2bpp.lz"
+
SECTION "bank21", ROMX
+
dr $84000, $842db
_PrinterReceive::
dr $842db, $84560
-PrintUnownStamp:
+PrintUnownStamp::
dr $84560, $845d4
-PrintMailAndExit:
+PrintMailAndExit::
dr $845d4, $84616
-PrintPartymon:
+PrintPartymon::
dr $84616, $84684
-Function84684:
+Function84684::
dr $84684, $86632
-_HallOfFamePC:
+_HallOfFamePC::
dr $86632, $87bfd
+
SECTION "bank23", ROMX
-SaveMenu_CopyTilemapAtOnce:
+SaveMenu_CopyTilemapAtOnce::
dr $8c000, $8c17a
-ResetClock_:
+ResetClock_::
dr $8c17a, $8c310
-DeleteSaveData_:
+DeleteSaveData_::
dr $8c310, $8c355
DummyPredef35::
DummyPredef36::
@@ -477,34 +498,34 @@ FadeInPalettes::
dr $8c3a0, $8c3ab
FadeOutPalettes::
dr $8c3ab, $8c3b9
-FadeInQuickly:
+FadeInQuickly::
dr $8c3b9, $8c3c4
-FadeBlackQuickly:
+FadeBlackQuickly::
dr $8c3c4, $8c3e9
Function8c3e9::
dr $8c3e9, $8c513
DoBattleTransition::
dr $8c513, $8ca5e
-PlayWhirlpoolSound:
+PlayWhirlpoolSound::
dr $8ca5e, $8ca6b
-BlindingFlash:
+BlindingFlash::
dr $8ca6b, $8ca8e
-ShakeHeadbuttTree:
+ShakeHeadbuttTree::
dr $8ca8e, $8cbb8
-OWCutAnimation:
+OWCutAnimation::
dr $8cbb8, $8cd65
-FlyFromAnimation:
+FlyFromAnimation::
dr $8cd65, $8cdab
-FlyToAnimation:
+FlyToAnimation::
dr $8cdab, $8ce7c
-MagnetTrain:
+MagnetTrain::
dr $8ce7c, $8d174
-ClearSpriteAnims:
+ClearSpriteAnims::
dr $8d174, $8d183
-PlaySpriteAnimationsAndDelay:
+PlaySpriteAnimationsAndDelay::
dr $8d183, $8d18a
-PlaySpriteAnimations:
+PlaySpriteAnimations::
dr $8d18a, $8d1f7
_InitSpriteAnimStruct::
dr $8d1f7, $8d332
@@ -526,6 +547,7 @@ UnfreezeMonIcons::
dr $8e922, $8e93d
HoldSwitchmonIcon::
dr $8e93d, $8fe43
+
ELIF DEF(_SILVER)
_ReinitSpriteAnimFrame::
dr $8d332, $8e6e3
@@ -545,46 +567,48 @@ HoldSwitchmonIcon::
dr $8e923, $8fe29
ENDC
+
SECTION "bank24", ROMX
+
dr $90000, $90641
-InitClock:
+InitClock::
dr $90641, $908dc
-SetDayOfWeek:
+SetDayOfWeek::
dr $908dc, $90a1b
-InitialSetDSTFlag:
+InitialSetDSTFlag::
dr $90a1b, $90a54
-InitialClearDSTFlag:
+InitialClearDSTFlag::
dr $90a54, $90a8d
-MrChrono:
+MrChrono::
dr $90a8d, $90b0f
-PrintHour:
+PrintHour::
dr $90b0f, $90b5e
-PokeGear:
+PokeGear::
dr $90b5e, $917ca
-RadioMusicRestartDE:
+RadioMusicRestartDE::
dr $917ca, $917de
-RadioMusicRestartPokemonChannel:
+RadioMusicRestartPokemonChannel::
dr $917de, $9188a
-Function9188a:
+Function9188a::
dr $9188a, $919c1
-Function919c1:
+Function919c1::
dr $919c1, $91a4f
-TownMap_:
+TownMap_::
dr $91a4f, $91c7f
Pokedex_GetArea::
dr $91c7f, $92364
-GetLandmarkName:
+GetLandmarkName::
dr $92364, $92c36
-Function92c36:
+Function92c36::
dr $92c36, $93f86
+
SECTION "bank25", ROMX
MapTriggers::
dr $94000, $940ed
-
INCLUDE "data/maps/maps.asm"
INCLUDE "data/maps/attributes.asm"
@@ -597,31 +621,34 @@ ScriptEvents::
CallCallback::
dr $97365, $97a59
-WarpToSpawnPoint:
+WarpToSpawnPoint::
dr $97a59, $97c2a
Function97c2a::
dr $97c2a, $97d96
+
SECTION "bank26", ROMX
IF DEF(_GOLD)
-TitleScreenGFX1:
+TitleScreenGFX1::
dr $98000, $98476
-TitleScreenGFX2:
+TitleScreenGFX2::
dr $98476, $98616
-GSIntroTilemap:
+GSIntroTilemap::
dr $98616, $98857
+
ELIF DEF(_SILVER)
-TitleScreenGFX1:
+TitleScreenGFX1::
dr $98000, $98498
-TitleScreenGFX2:
+TitleScreenGFX2::
dr $98498, $9862a
-GSIntroTilemap:
+GSIntroTilemap::
dr $9862a, $9886b
ENDC
INCLUDE "data/maps/blocks.asm"
+
SECTION "bank2e_2", ROMX
INCLUDE "engine/events/checkforhiddenitems.asm"
@@ -629,33 +656,37 @@ INCLUDE "engine/events/treemons.asm"
INCLUDE "engine/pokegear/radio.asm"
INCLUDE "engine/pokemon/mail_2.asm"
+
SECTION "bank31_2", ROMX
-Functionc7a40:
+
+Functionc7a40::
dr $c7a40, $c7a5a
-CheckForLuckyNumberWinners:
+CheckForLuckyNumberWinners::
dr $c7a5a, $c7bad
-PrintTodaysLuckyNumber:
+PrintTodaysLuckyNumber::
dr $c7bad, $c7bbf
-CheckPartyFullAfterContest:
+CheckPartyFullAfterContest::
dr $c7bbf, $c7cd0
-Functionc7cd0:
+Functionc7cd0::
dr $c7cd0, $c7cde
+
SECTION "bank32", ROMX
+
dr $c8000, $c80d6
DummyPredef2F::
dr $c80d6, $c900a
-
INCLUDE "data/moves/animations.asm"
LoadPoisonBGPals::
dr $cbc76, $cbdba
+
SECTION "Move Animations", ROMX
-DisplayCaughtContestMonStats:
+DisplayCaughtContestMonStats::
dr $cc000, $cc0c8
-DisplayAlreadyCaughtText:
+DisplayAlreadyCaughtText::
dr $cc0c8, $cc0d6
DummyPredef38::
DummyPredef39::
@@ -669,64 +700,72 @@ BattleAnimCmd_RaiseSub::
BattleAnimCmd_MinimizeOpp::
dr $cc67c, $cfce3
+
SECTION "bank36", ROMX
+
dr $d8000, $d8400
+
SECTION "bank38", ROMX
+
dr $e0000, $e0002
-Functione0002:
+Functione0002::
dr $e0002, $e081b
-RotateUnownFrontpic:
+RotateUnownFrontpic::
dr $e081b, $e0909
-Functione0909:
+Functione0909::
dr $e0909, $e199d
-Functione199d:
+Functione199d::
dr $e199d, $e2668
-Functione2668:
+Functione2668::
dr $e2668, $e2b9e
-DepositPokemon_:
+DepositPokemon_::
dr $e2b9e, $e2d71
-WithdrawPokemon_:
+WithdrawPokemon_::
dr $e2d71, $e2f47
-MovePKMNWithoutMail_:
+MovePKMNWithoutMail_::
dr $e2f47, $e3d25
-ChangeBox_:
+ChangeBox_::
dr $e3d25, $e3f74
+
SECTION "bank39", ROMX
-CopyrightGFX:
+CopyrightGFX::
INCBIN "gfx/intro/copyright.2bpp"
IF DEF(_GOLD)
-TitleScreenGFX3:
+TitleScreenGFX3::
dr $e41e0, $e4260
-TitleScreenGFX4:
+TitleScreenGFX4::
dr $e4260, $e4608
-OptionsMenu:
+OptionsMenu::
dr $e4608, $e49a8
+
ELIF DEF(_SILVER)
-TitleScreenGFX3:
+TitleScreenGFX3::
dr $e41e0, $e4220
-TitleScreenGFX4:
+TitleScreenGFX4::
dr $e4220, $e4450
-OptionsMenu:
+OptionsMenu::
dr $e4450, $e47f0
ENDC
INCLUDE "engine/movie/gamefreak_presents.asm"
IF DEF(_GOLD)
-GoldSilverIntro:
+GoldSilverIntro::
dr $e4cb1, $e7678
+
ELIF DEF(_SILVER)
-GoldSilverIntro:
+GoldSilverIntro::
dr $e4af9, $e74c0
ENDC
+
SECTION "bank3e", ROMX
Functionf8000::
@@ -750,55 +789,60 @@ ExpBarGFX::
TileCollisionTable::
dr $fb4be, $fb5be
-Shrink1Pic:
+Shrink1Pic::
dr $fb5be, $fb64e
-Shrink2Pic:
+Shrink2Pic::
dr $fb64e, $fb7f7
-_NameRater:
+_NameRater::
dr $fb7f7, $fb94b
-PlaySlowCry:
+PlaySlowCry::
dr $fb94b, $fb981
-NewPokedexEntry:
+NewPokedexEntry::
dr $fb981, $fba12
ConvertMon_1to2::
dr $fba12, $fbb22
-UpdateUnownDex:
+UpdateUnownDex::
dr $fbb22, $fbc3c
-CheckMagikarpLength:
+CheckMagikarpLength::
dr $fbc3c, $fbd00
CalcMagikarpLength::
dr $fbd00, $fbdd6
-MagikarpHouseSign:
+MagikarpHouseSign::
dr $fbdd6, $fbdf1
-HiddenPowerDamage:
+HiddenPowerDamage::
dr $fbdf1, $fbe5a
-_DisappearUser:
+_DisappearUser::
dr $fbe5a, $fbe6f
-_AppearUserRaiseSub:
+_AppearUserRaiseSub::
dr $fbe6f, $fbe77
-_AppearUserLowerSub:
+_AppearUserLowerSub::
dr $fbe77, $fbeaa
-DoWeatherModifiers:
+DoWeatherModifiers::
dr $fbeaa, $fbf2b
-DoBadgeTypeBoosts:
+DoBadgeTypeBoosts::
dr $fbf2b, $fbf93
+
SECTION "bank3f", ROMX
+
nop
DummyPredef3A::
ret
dr $fc002, $fde20
+
SECTION "bank40", ROMX
- dr $100000, $10110c
+ dr $100000, $10110c
INCLUDE "data/text/battle.asm"
+
SECTION "bank41", ROMX
- dr $104000, $10614d
+ dr $104000, $10614d
INCLUDE "data/maps/scripts.asm"
+
SECTION "bank6c", ROMX
ItemNames::
@@ -810,14 +854,19 @@ PokemonNames::
MoveNames::
dr $1b1574, $1b1ee1
+
SECTION "bank6d", ROMX
INCLUDE "data/moves/descriptions.asm"
+
SECTION "bank6e", ROMX
+
dr $1b8000, $1b9544
+
SECTION "bank70", ROMX
+
dr $1c0000, $1c0a66
UpdateTimePredef::
dr $1c0a66, $1c0a7a
@@ -838,4 +887,5 @@ ENDC
SECTION "bank7f", ROMX
+
dr $1ffdf8, $200000
diff --git a/tools/gfx.py b/tools/gfx.py
index e1f5b147..2505499d 100644
--- a/tools/gfx.py
+++ b/tools/gfx.py
@@ -168,6 +168,14 @@ def filepath_rules(filepath):
elif name == 'gfx_17079':
args['width'] = 16
+ elif 'gfx/player' in filedir:
+ if name == 'chris_back':
+ args['pic_dimensions'] = 6, 6
+
+ elif 'gfx/battle' in filedir:
+ if name == 'dude':
+ args['pic_dimensions'] = 6, 6
+
elif os.path.join(filedir, name) in pics:
args['pic'] = True
diff --git a/tools/pokemontools/gfx.py b/tools/pokemontools/gfx.py
index e6c9989d..f3e3ed53 100644
--- a/tools/pokemontools/gfx.py
+++ b/tools/pokemontools/gfx.py
@@ -433,7 +433,7 @@ def convert_2bpp_to_png(image, **kwargs):
# Width must be specified to interleave.
if interleave and width:
- image = interleave_tiles(image, width / 8)
+ image = interleave_tiles(image, width // 8)
# Pad the image by a given number of tiles if asked.
image += pad_color * 0x10 * tile_padding
@@ -766,11 +766,11 @@ def png_to_2bpp(filein, **kwargs):
tiles = get_tiles(image)
pic_length = w * h
- tile_width = width / 8
+ tile_width = width // 8
trailing = len(tiles) % pic_length
new_image = []
- for block in range(len(tiles) / pic_length):
- offset = (h * tile_width) * ((block * w) / tile_width) + ((block * w) % tile_width)
+ for block in range(len(tiles) // pic_length):
+ offset = (h * tile_width) * ((block * w) // tile_width) + ((block * w) % tile_width)
pic = []
for row in range(h):
index = offset + (row * tile_width)
diff --git a/tools/scan_includes.py b/tools/scan_includes.py
new file mode 100644
index 00000000..60929d3f
--- /dev/null
+++ b/tools/scan_includes.py
@@ -0,0 +1,35 @@
+#!/bin/python
+# coding: utf-8
+
+"""
+Recursively scan an asm file for dependencies.
+"""
+
+import sys
+import argparse
+
+includes = set()
+
+def scan_file(filename):
+ for line in open(filename):
+ if 'INC' not in line:
+ continue
+ line = line.split(';')[0]
+ if 'INCLUDE' in line:
+ include = line.split('"')[1]
+ includes.add(include)
+ scan_file(include)
+ elif 'INCBIN' in line:
+ include = line.split('"')[1]
+ includes.add(include)
+
+def main():
+ ap = argparse.ArgumentParser()
+ ap.add_argument('filenames', nargs='*')
+ args = ap.parse_args()
+ for filename in set(args.filenames):
+ scan_file(filename)
+ sys.stdout.write(' '.join(includes))
+
+if __name__ == '__main__':
+ main()
diff --git a/tools/unused_sources.sh b/tools/unused_sources.sh
new file mode 100755
index 00000000..233c032c
--- /dev/null
+++ b/tools/unused_sources.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Finds asm sources that aren't included in the build
+
+# top-level sources listed in Makefile
+toplevel='audio.asm data/text/common.asm data/pokemon/dex_entries.asm wram.asm
+main.asm home.asm gfx/sprites.asm gfx/pics_gold.asm gfx/pics_silver.asm'
+
+for asm in $toplevel; do
+ echo "$asm"
+ python tools/scan_includes.py "$asm"
+ echo
+done | tr ' ' '\n' | sort -u > includes.txt
+git ls-files | grep '\.asm$' | sort -u > sources.txt
+comm -23 sources.txt includes.txt
+rm sources.txt includes.txt