ref: 069ae7e2f3bc4f3939a4b97d6200a3fcdacc904b
parent: d059358d929e6ef691e6c2c96ea4c9e44120fc9b
parent: 89b9292db0898f8ad2b6ea8513a3190762eb58c8
author: surskitty <surskitty@gmail.com>
date: Sat Dec 9 19:19:24 EST 2017
Merge branch 'master' of github.com:pret/pokecrystal
--- a/Makefile
+++ b/Makefile
@@ -41,11 +41,6 @@
crystal: pokecrystal.gbc
crystal11: pokecrystal11.gbc
-# Build tools when building the rom
-ifeq (,$(filter clean tools,$(MAKECMDGOALS)))
-Makefile: tools ;
-endif
-
clean:
rm -f $(roms) $(crystal_obj) $(crystal11_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym)
$(MAKE) clean -C tools/
@@ -56,13 +51,28 @@
tools:
$(MAKE) -C tools/
-%11.o: dep = $(shell tools/scan_includes $(@D)/$*.asm)
-%11.o: %.asm $$(dep)
- $(RGBASM) -D CRYSTAL11 -o $@ $<
-%.o: dep = $(shell tools/scan_includes $(@D)/$*.asm)
-%.o: %.asm $$(dep)
- $(RGBASM) -o $@ $<
+$(crystal11_obj): RGBASMFLAGS = -D CRYSTAL11
+
+# The dep rules have to be explicit or else missing files won't be reported.
+# As a side effect, they're evaluated immediately instead of when the rule is invoked.
+# It doesn't look like $(shell) can be deferred so there might not be a better way.
+define DEP
+$1: $2 $$(shell tools/scan_includes $2)
+ $$(RGBASM) $$(RGBASMFLAGS) -o $$@ $$<
+endef
+
+# Build tools when building the rom.
+# This has to happen before the rules are processed, since that's when scan_includes is run.
+ifeq (,$(filter clean tools,$(MAKECMDGOALS)))
+
+$(info $(shell $(MAKE) -C tools))
+
+$(foreach obj, $(crystal11_obj), $(eval $(call DEP,$(obj),$(obj:11.o=.asm))))
+$(foreach obj, $(crystal_obj), $(eval $(call DEP,$(obj),$(obj:.o=.asm))))
+
+endif
+
pokecrystal11.gbc: $(crystal11_obj) pokecrystal.link
$(RGBLINK) -n pokecrystal11.sym -m pokecrystal11.map -l pokecrystal.link -o $@ $(crystal11_obj)
--- a/audio/music/music_labels.txt
+++ /dev/null
@@ -1,103 +1,0 @@
-Music_Nothing
-Music_TitleScreen
-Music_Route1
-Music_Route3
-Music_Route12
-Music_MagnetTrain
-Music_KantoGymLeaderBattle
-Music_KantoTrainerBattle
-Music_KantoWildPokemonBattle
-Music_PokemonCenter
-Music_LookHiker
-Music_LookLass
-Music_LookOfficer
-Music_HealPokemon
-Music_LavenderTown
-Music_Route2
-Music_MtMoon
-Music_ShowMeAround
-Music_GameCorner
-Music_Bicycle
-Music_HallOfFame
-Music_ViridianCity
-Music_CeladonCity
-Music_TrainerVictory
-Music_WildPokemonVictory
-Music_GymLeaderVictory
-Music_MtMoonSquare
-Music_Gym
-Music_PalletTown
-Music_ProfOaksPokemonTalk
-Music_ProfOak
-Music_LookRival
-Music_AfterTheRivalFight
-Music_Surf
-Music_Evolution
-Music_NationalPark
-Music_Credits
-Music_AzaleaTown
-Music_CherrygroveCity
-Music_LookKimonoGirl
-Music_UnionCave
-Music_JohtoWildPokemonBattle
-Music_JohtoTrainerBatle
-Music_Route30
-Music_EcruteakCity
-Music_VioletCity
-Music_JohtoGymLeaderBattle
-Music_ChampionBattle
-Music_RivalBattle
-Music_RocketBattle
-Music_ElmsLab
-Music_DarkCave
-Music_Route29
-Music_Route36
-Music_SSAqua
-Music_LookYoungster
-Music_LookBeauty
-Music_LookRocket
-Music_LookPokemaniac
-Music_LookSage
-Music_NewBarkTown
-Music_GoldenrodCity
-Music_VermilionCity
-Music_PokemonChannel
-Music_PokeFluteChannel
-Music_TinTower
-Music_SproutTower
-Music_BurnedTower
-Music_Lighthouse
-Music_LakeOfRage
-Music_IndigoPlateau
-Music_Route37
-Music_RocketHideout
-Music_DragonsDen
-Music_JohtoWildPokemonBattleNight
-Music_RuinsOfAlphRadioSignal
-Music_SuccessfulCapture
-Music_Route26
-Music_Mom
-Music_VictoryRoad
-Music_PokemonLullaby
-Music_PokemonMarch
-Music_GoldSilverOpening
-Music_GoldSilverOpening2
-Music_MainMenu
-Music_RuinsOfAlphInterior
-Music_RocketTheme
-Music_DancingHall
-Music_BugCatchingContestResults
-Music_BugCatchingContest
-Music_LakeOfRageRocketsRadioSignal
-Music_Printer
-Music_PostCredits
-Music_Clair
-Music_MobileAdapterMenu
-Music_MobileAdapter
-Music_BuenasPassword
-Music_LookMysticalMan
-Music_CrystalOpening
-Music_BattleTowerTheme
-Music_SuicuneBattle
-Music_BattleTowerLobby
-Music_MobileCenter
--- a/audio/music_pointers.asm
+++ b/audio/music_pointers.asm
@@ -1,12 +1,4 @@
-; See song sections in main.asm:
-; Songs i
-; Songs ii
-; Songs iii
-; Songs I
-; Songs II
-; Songs III
-; Songs IV
-; Songs V
+; See song sections in audio.asm.
; e906e
dba Music_Nothing ; 0xe91a3
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -2995,7 +2995,7 @@
PickPartyMonInBattle: ; 3d33c
.loop
- ld a, $2 ; Which PKMN?
+ ld a, PARTYMENUACTION_SWITCH ; Which PKMN?
ld [PartyMenuActionText], a
call JumpToPartyMenuAndPrintText
call SelectBattleMon
--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -416,16 +416,16 @@
; PartyMenuActionText
const_def
- const PARTYMENUACTION_00
+ const PARTYMENUACTION_CHOOSE_POKEMON
const PARTYMENUACTION_HEALING_ITEM
- const PARTYMENUACTION_02
- const PARTYMENUACTION_TEACH_TM
- const PARTYMENUACTION_04
+ const PARTYMENUACTION_SWITCH
+ const PARTYMENUACTION_TEACH_TMHM
+ const PARTYMENUACTION_MOVE
const PARTYMENUACTION_EVO_STONE
- const PARTYMENUACTION_06
- const PARTYMENUACTION_07
- const PARTYMENUACTION_08
- const PARTYMENUACTION_MOBILE
+ const PARTYMENUACTION_GIVE_MON
+ const PARTYMENUACTION_GIVE_MON_FEMALE ; unused
+ const PARTYMENUACTION_GIVE_ITEM
+ const PARTYMENUACTION_MOBILE ; mobile
const_value set $f0
const PARTYMENUTEXT_HEAL_PSN
--- a/engine/npctrade.asm
+++ b/engine/npctrade.asm
@@ -39,7 +39,7 @@
jr c, .done
; Select givemon from party
- ld b, 6
+ ld b, PARTYMENUACTION_GIVE_MON
callba SelectTradeOrDaycareMon
ld a, TRADE_CANCEL
jr c, .done
--- a/engine/pack.asm
+++ b/engine/pack.asm
@@ -603,7 +603,7 @@
push af
res NO_TEXT_SCROLL, a
ld [Options], a
- ld a, $8
+ ld a, PARTYMENUACTION_GIVE_ITEM
ld [PartyMenuActionText], a
call ClearBGPalettes
callba LoadPartyMenuGFX
--- a/engine/startmenu.asm
+++ b/engine/startmenu.asm
@@ -745,7 +745,7 @@
callba HoldSwitchmonIcon
callba InitPartyMenuNoCancel
- ld a, 4
+ ld a, PARTYMENUACTION_MOVE
ld [PartyMenuActionText], a
callba WritePartyMenuTilemap
callba PrintPartyMenuText
--- a/engine/tmhm2.asm
+++ b/engine/tmhm2.asm
@@ -80,7 +80,7 @@
callba LoadPartyMenuGFX
callba InitPartyMenuWithCancel
callba InitPartyMenuGFX
- ld a, $3 ; TeachWhichPKMNString
+ ld a, PARTYMENUACTION_TEACH_TMHM
ld [PartyMenuActionText], a
.loopback
callba WritePartyMenuTilemap
--- a/event/daycare.asm
+++ b/event/daycare.asm
@@ -123,7 +123,7 @@
jr c, .OnlyOneMon
ld a, DAYCARETEXT_WHICH_ONE
call PrintDayCareText
- ld b, 6
+ ld b, PARTYMENUACTION_GIVE_MON
callba SelectTradeOrDaycareMon
jr c, .Declined
ld a, [CurPartySpecies]
--- a/misc/mobile_12_2.asm
+++ b/misc/mobile_12_2.asm
@@ -316,7 +316,7 @@
call Function4aad3
Function4aa34: ; 4aa34
- ld a, $9
+ ld a, PARTYMENUACTION_MOBILE
ld [PartyMenuActionText], a
callba WritePartyMenuTilemap
xor a