Merge remote-tracking branch 'pret/master' into item_expansion

# Conflicts:
#	src/battle_script_commands.c
#	src/data/pokemon/base_stats.h
This commit is contained in:
Eduardo Quezada D'Ottone 2022-07-12 17:42:32 -04:00
commit f78bb4fb84
232 changed files with 4269 additions and 3855 deletions

View File

@ -418,21 +418,16 @@ If you aren't in the pokeemerald directory already, then **change directory** to
```bash ```bash
cd pokeemerald cd pokeemerald
``` ```
To build **pokeemerald.gba** for the first time and confirm it matches the official ROM image (Note: to speed up builds, see [Parallel builds](#parallel-builds)): To build **pokeemerald.gba** (Note: to speed up builds, see [Parallel builds](#parallel-builds)):
```bash ```bash
make compare make
``` ```
If an OK is returned, then the installation went smoothly. If it has built successfully you will have the output file **pokeemerald.gba** in your project folder.
<details> <details>
<summary>Note for Windows...</summary> <summary>Note for Windows...</summary>
> If you switched terminals since the last build (e.g. from msys2 to WSL1), you must run `make clean-tools` once before any subsequent `make` commands. > If you switched terminals since the last build (e.g. from msys2 to WSL1), you must run `make clean-tools` once before any subsequent `make` commands.
</details> </details>
To build **pokeemerald.gba** with your changes:
```bash
make
```
# Building guidance # Building guidance
## Parallel builds ## Parallel builds
@ -451,6 +446,22 @@ Replace `<output of nproc>` with the number that the `nproc` command returned.
`nproc` is not available on macOS. The alternative is `sysctl -n hw.ncpu` ([relevant Stack Overflow thread](https://stackoverflow.com/questions/1715580)). `nproc` is not available on macOS. The alternative is `sysctl -n hw.ncpu` ([relevant Stack Overflow thread](https://stackoverflow.com/questions/1715580)).
## Compare ROM to the original
For contributing, or if you'd simply like to verify that your ROM is identical to the original game, run:
```bash
make compare
```
If it matches, you will see the following at the end of the output:
```bash
pokeemerald.gba: OK
```
If there are any changes from the original game, you will instead see:
```bash
pokeemerald.gba: FAILED
shasum: WARNING: 1 computed checksum did NOT match
```
## devkitARM's C compiler ## devkitARM's C compiler
This project supports the `arm-none-eabi-gcc` compiler included with devkitARM. If devkitARM (a.k.a. gba-dev) has already been installed as part of the platform-specific instructions, simply run: This project supports the `arm-none-eabi-gcc` compiler included with devkitARM. If devkitARM (a.k.a. gba-dev) has already been installed as part of the platform-specific instructions, simply run:

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,10 @@
.set LOCALID_PLAYER, 13 .set LOCALID_PLAYER, 13
.set LOCALID_OPPONENT, 15 .set LOCALID_OPPONENT, 15
.set NO_DRAW, 0
.set DRAW_TRAINER, 1
.set DRAW_TUCKER, 2
BattleFrontier_BattleDomeBattleRoom_MapScripts:: BattleFrontier_BattleDomeBattleRoom_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleDomeBattleRoom_OnTransition map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleDomeBattleRoom_OnTransition
map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleDomeBattleRoom_OnFrame map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleDomeBattleRoom_OnFrame
@ -12,10 +16,6 @@ BattleFrontier_BattleDomeBattleRoom_MapScripts::
map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleDomeBattleRoom_OnResume map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleDomeBattleRoom_OnResume
.byte 0 .byte 0
.set NO_DRAW, 0
.set DRAW_TRAINER, 1
.set DRAW_TUCKER, 2
BattleFrontier_BattleDomeBattleRoom_OnTransition: BattleFrontier_BattleDomeBattleRoom_OnTransition:
dome_setopponentgfx dome_setopponentgfx
frontier_get FRONTIER_DATA_BATTLE_NUM frontier_get FRONTIER_DATA_BATTLE_NUM

View File

@ -364,7 +364,8 @@ BattleFrontier_BattlePikeLobby_Text_AwardYouTheseBattlePoints2:
@ Unused @ Unused
BattleFrontier_BattlePikeLobby_Text_ReachedBattlePointLimit: BattleFrontier_BattlePikeLobby_Text_ReachedBattlePointLimit:
.string "You appear to have reached the limit\n" .string "You appear to have reached the limit\n"
.string "for Battle Points…\pPlease exchange some Battle Points\n" .string "for Battle Points…\p"
.string "Please exchange some Battle Points\n"
.string "for prizes, then return…$" .string "for prizes, then return…$"
BattleFrontier_BattlePikeLobby_Text_FailedToSaveBeforeQuitting: BattleFrontier_BattlePikeLobby_Text_FailedToSaveBeforeQuitting:

View File

@ -22,18 +22,20 @@ BattleFrontier_Lounge2_EventScript_AlreadyMetManiac::
end end
BattleFrontier_Lounge2_EventScript_GiveAdvice:: BattleFrontier_Lounge2_EventScript_GiveAdvice::
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 0, BattleFrontier_Lounge2_EventScript_BufferSingle call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_TOWER_SINGLES, BattleFrontier_Lounge2_EventScript_BufferSingle
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 1, BattleFrontier_Lounge2_EventScript_BufferDouble call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_TOWER_DOUBLES, BattleFrontier_Lounge2_EventScript_BufferDouble
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 2, BattleFrontier_Lounge2_EventScript_BufferMulti call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_TOWER_MULTIS, BattleFrontier_Lounge2_EventScript_BufferMulti
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 3, BattleFrontier_Lounge2_EventScript_BufferMultiLink call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_TOWER_LINK, BattleFrontier_Lounge2_EventScript_BufferMultiLink
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 4, BattleFrontier_Lounge2_EventScript_BufferBattleDome call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_DOME, BattleFrontier_Lounge2_EventScript_BufferBattleDome
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 5, BattleFrontier_Lounge2_EventScript_BufferBattleFactory call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_FACTORY, BattleFrontier_Lounge2_EventScript_BufferBattleFactory
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 6, BattleFrontier_Lounge2_EventScript_BufferBattlePalace call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_PALACE, BattleFrontier_Lounge2_EventScript_BufferBattlePalace
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 7, BattleFrontier_Lounge2_EventScript_BufferBattleArena call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_ARENA, BattleFrontier_Lounge2_EventScript_BufferBattleArena
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 8, BattleFrontier_Lounge2_EventScript_BufferBattlePike call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_PIKE, BattleFrontier_Lounge2_EventScript_BufferBattlePike
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 9, BattleFrontier_Lounge2_EventScript_BufferBattlePyramid call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_PYRAMID, BattleFrontier_Lounge2_EventScript_BufferBattlePyramid
call_if_le VAR_FRONTIER_MANIAC_FACILITY, 3, BattleFrontier_Lounge2_EventScript_BattleTowerNews @ <= FRONTIER_MANIAC_TOWER_LINK is any Battle Tower mode
call_if_ge VAR_FRONTIER_MANIAC_FACILITY, 4, BattleFrontier_Lounge2_EventScript_FacilityNews call_if_le VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_TOWER_LINK, BattleFrontier_Lounge2_EventScript_BattleTowerNews
@ >= FRONTIER_MANIAC_DOME is any facility other than Battle Tower
call_if_ge VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_DOME, BattleFrontier_Lounge2_EventScript_FacilityNews
special ShowFrontierManiacMessage special ShowFrontierManiacMessage
waitmessage waitmessage
waitbuttonpress waitbuttonpress

View File

@ -12,7 +12,7 @@ MysteryGiftScript_AlteringCave_:
release release
end end
sText_MysteryGiftAlteringCave:: sText_MysteryGiftAlteringCave:
.string "Thank you for using the MYSTERY\n" .string "Thank you for using the MYSTERY\n"
.string "GIFT System.\p" .string "GIFT System.\p"
.string "There appears to be a rumor about\n" .string "There appears to be a rumor about\n"

View File

@ -4,145 +4,192 @@ gText_HighlyAppealingMove::
.string "A highly appealing move.$" .string "A highly appealing move.$"
gText_UserMoreEasilyStartled:: gText_UserMoreEasilyStartled::
.string "After this move, the user is\nmore easily startled.$" .string "After this move, the user is\n"
.string "more easily startled.$"
gText_GreatAppealButNoMoreToEnd:: gText_GreatAppealButNoMoreToEnd::
.string "Makes a great appeal, but\nallows no more to the end.$" .string "Makes a great appeal, but\n"
.string "allows no more to the end.$"
gText_UsedRepeatedlyWithoutBoringJudge:: gText_UsedRepeatedlyWithoutBoringJudge::
.string "Can be repeatedly used\nwithout boring the JUDGE.$" .string "Can be repeatedly used\n"
.string "without boring the JUDGE.$"
gText_AvoidStartledByOthersOnce:: gText_AvoidStartledByOthersOnce::
.string "Can avoid being startled\nby others once.$" .string "Can avoid being startled\n"
.string "by others once.$"
gText_AvoidStartledByOthers:: gText_AvoidStartledByOthers::
.string "Can avoid being startled\nby others.$" .string "Can avoid being startled\n"
.string "by others.$"
gText_AvoidStartledByOthersLittle:: gText_AvoidStartledByOthersLittle::
.string "Can avoid being startled\nby others a little.$" .string "Can avoid being startled\n"
.string "by others a little.$"
gText_UserLessLikelyStartled:: gText_UserLessLikelyStartled::
.string "After this move, the user is\nless likely to be startled.$" .string "After this move, the user is\n"
.string "less likely to be startled.$"
gText_SlightlyStartleFrontMon:: gText_SlightlyStartleFrontMon::
.string "Slightly startles the\nPOKéMON in front.$" .string "Slightly startles the\n"
.string "POKéMON in front.$"
gText_SlightlyStartleAppealed:: gText_SlightlyStartleAppealed::
.string "Slightly startles those\nthat have made appeals.$" .string "Slightly startles those\n"
.string "that have made appeals.$"
gText_StartleAppealedBeforeUser:: gText_StartleAppealedBeforeUser::
.string "Startles the POKéMON that\nappealed before the user.$" .string "Startles the POKéMON that\n"
.string "appealed before the user.$"
gText_StartleAllAppealed:: gText_StartleAllAppealed::
.string "Startles all POKéMON that\nhave done their appeals.$" .string "Startles all POKéMON that\n"
.string "have done their appeals.$"
gText_BadlyStartleFrontMon:: gText_BadlyStartleFrontMon::
.string "Badly startles the\nPOKéMON in front.$" .string "Badly startles the\n"
.string "POKéMON in front.$"
gText_BadlyStartleAppealed:: gText_BadlyStartleAppealed::
.string "Badly startles those that\nhave made appeals.$" .string "Badly startles those that\n"
.string "have made appeals.$"
gText_StartleAppealedBeforeUser2:: gText_StartleAppealedBeforeUser2::
.string "Startles the POKéMON that\nappealed before the user.$" .string "Startles the POKéMON that\n"
.string "appealed before the user.$"
gText_StartleAllAppealed2:: gText_StartleAllAppealed2::
.string "Startles all POKéMON that\nhave done their appeals.$" .string "Startles all POKéMON that\n"
.string "have done their appeals.$"
gText_ShiftJudgesAttentionFromOthers:: gText_ShiftJudgesAttentionFromOthers::
.string "Shifts the JUDGE's\nattention from others.$" .string "Shifts the JUDGE's\n"
.string "attention from others.$"
gText_StartleMonHasJudgesAttention:: gText_StartleMonHasJudgesAttention::
.string "Startles the POKéMON that\nhas the JUDGE's attention.$" .string "Startles the POKéMON that\n"
.string "has the JUDGE's attention.$"
gText_JamOthersMissesTurn:: gText_JamOthersMissesTurn::
.string "Jams the others, and misses\none turn of appeals.$" .string "Jams the others, and misses\n"
.string "one turn of appeals.$"
gText_StartleMonsMadeSameTypeAppeal:: gText_StartleMonsMadeSameTypeAppeal::
.string "Startles POKéMON that\nmade a same-type appeal.$" .string "Startles POKéMON that\n"
.string "made a same-type appeal.$"
gText_BadlyStartleCoolAppeals:: gText_BadlyStartleCoolAppeals::
.string "Badly startles POKéMON\nthat made COOL appeals.$" .string "Badly startles POKéMON\n"
.string "that made COOL appeals.$"
gText_BadlyStartleBeautyAppeals:: gText_BadlyStartleBeautyAppeals::
.string "Badly startles POKéMON\nthat made BEAUTY appeals.$" .string "Badly startles POKéMON\n"
.string "that made BEAUTY appeals.$"
gText_BadlyStartleCuteAppeals:: gText_BadlyStartleCuteAppeals::
.string "Badly startles POKéMON\nthat made CUTE appeals.$" .string "Badly startles POKéMON\n"
.string "that made CUTE appeals.$"
gText_BadlyStartleSmartAppeals:: gText_BadlyStartleSmartAppeals::
.string "Badly startles POKéMON\nthat made SMART appeals.$" .string "Badly startles POKéMON\n"
.string "that made SMART appeals.$"
gText_BadlyStartleToughAppeals:: gText_BadlyStartleToughAppeals::
.string "Badly startles POKéMON\nthat made TOUGH appeals.$" .string "Badly startles POKéMON\n"
.string "that made TOUGH appeals.$"
gText_MakeMonAfterUserNervous:: gText_MakeMonAfterUserNervous::
.string "Makes one POKéMON after\nthe user nervous.$" .string "Makes one POKéMON after\n"
.string "the user nervous.$"
gText_MakeAllMonsAfterUserNervous:: gText_MakeAllMonsAfterUserNervous::
.string "Makes all POKéMON after\nthe user nervous.$" .string "Makes all POKéMON after\n"
.string "the user nervous.$"
gText_WorsenConditionOfThoseMadeAppeals:: gText_WorsenConditionOfThoseMadeAppeals::
.string "Worsens the condition of\nthose that made appeals.$" .string "Worsens the condition of\n"
.string "those that made appeals.$"
gText_BadlyStartleMonsGoodCondition:: gText_BadlyStartleMonsGoodCondition::
.string "Badly startles POKéMON in\ngood condition.$" .string "Badly startles POKéMON in\n"
.string "good condition.$"
gText_AppealGreatIfPerformedFirst:: gText_AppealGreatIfPerformedFirst::
.string "The appeal works great if\nperformed first.$" .string "The appeal works great if\n"
.string "performed first.$"
gText_AppealGreatIfPerformedLast:: gText_AppealGreatIfPerformedLast::
.string "The appeal works great if\nperformed last.$" .string "The appeal works great if\n"
.string "performed last.$"
gText_AppealAsGoodAsThoseBeforeIt:: gText_AppealAsGoodAsThoseBeforeIt::
.string "Makes the appeal as good\nas those before it.$" .string "Makes the appeal as good\n"
.string "as those before it.$"
gText_AppealAsGoodAsOneBeforeIt:: gText_AppealAsGoodAsOneBeforeIt::
.string "Makes the appeal as good\nas the one before it.$" .string "Makes the appeal as good\n"
.string "as the one before it.$"
gText_AppealBetterLaterItsPerformed:: gText_AppealBetterLaterItsPerformed::
.string "The appeal works better\nthe later it is performed.$" .string "The appeal works better\n"
.string "the later it is performed.$"
gText_AppealVariesDependingOnTiming:: gText_AppealVariesDependingOnTiming::
.string "The appeal's quality varies\ndepending on its timing.$" .string "The appeal's quality varies\n"
.string "depending on its timing.$"
gText_WorksWellIfSameTypeAsBefore:: gText_WorksWellIfSameTypeAsBefore::
.string "Works well if it's the same\ntype as the one before.$" .string "Works well if it's the same\n"
.string "type as the one before.$"
gText_WorksWellIfDifferentTypeAsBefore:: gText_WorksWellIfDifferentTypeAsBefore::
.string "Works well if different in\ntype than the one before.$" .string "Works well if different in\n"
.string "type than the one before.$"
gText_AffectedByAppealInFront:: gText_AffectedByAppealInFront::
.string "Affected by how well the\nappeal in front goes.$" .string "Affected by how well the\n"
.string "appeal in front goes.$"
gText_UpsConditionHelpsPreventNervousness:: gText_UpsConditionHelpsPreventNervousness::
.string "Ups the user's condition.\nHelps prevent nervousness.$" .string "Ups the user's condition.\n"
.string "Helps prevent nervousness.$"
gText_AppealWorksWellIfConditionGood:: gText_AppealWorksWellIfConditionGood::
.string "The appeal works well if the\nuser's condition is good.$" .string "The appeal works well if the\n"
.string "user's condition is good.$"
gText_NextAppealMadeEarlier:: gText_NextAppealMadeEarlier::
.string "The next appeal can be\nmade earlier next turn.$" .string "The next appeal can be\n"
.string "made earlier next turn.$"
gText_NextAppealMadeLater:: gText_NextAppealMadeLater::
.string "The next appeal can be\nmade later next turn.$" .string "The next appeal can be\n"
.string "made later next turn.$"
gText_TurnOrderMoreEasilyScrambled:: gText_TurnOrderMoreEasilyScrambled::
.string "Makes the next turn's order\nmore easily scrambled.$" .string "Makes the next turn's order\n"
.string "more easily scrambled.$"
gText_ScrambleOrderOfNextAppeals:: gText_ScrambleOrderOfNextAppeals::
.string "Scrambles the order of\nappeals on the next turn.$" .string "Scrambles the order of\n"
.string "appeals on the next turn.$"
gText_AppealExcitesAudienceInAnyContest:: gText_AppealExcitesAudienceInAnyContest::
.string "An appeal that excites the\naudience in any CONTEST.$" .string "An appeal that excites the\n"
.string "audience in any CONTEST.$"
gText_BadlyStartlesMonsGoodAppeals:: gText_BadlyStartlesMonsGoodAppeals::
.string "Badly startles all POKéMON\nthat made good appeals.$" .string "Badly startles all POKéMON\n"
.string "that made good appeals.$"
gText_AppealBestMoreCrowdExcited:: gText_AppealBestMoreCrowdExcited::
.string "The appeal works best the\nmore the crowd is excited.$" .string "The appeal works best the\n"
.string "more the crowd is excited.$"
gText_TemporarilyStopCrowdExcited:: gText_TemporarilyStopCrowdExcited::
.string "Temporarily stops the\ncrowd from growing excited.$" .string "Temporarily stops the\n"
.string "crowd from growing excited.$"
@ Unused move names @ Unused move names

View File

@ -5,7 +5,8 @@ gText_PkmnTransferredSomeonesPC::
.string "BOX “{STR_VAR_1}.”$" .string "BOX “{STR_VAR_1}.”$"
gText_PkmnTransferredLanettesPC:: gText_PkmnTransferredLanettesPC::
.string "{STR_VAR_2} was transferred to\nLANETTE'S PC.\p" .string "{STR_VAR_2} was transferred to\n"
.string "LANETTE'S PC.\p"
.string "It was placed in \n" .string "It was placed in \n"
.string "BOX “{STR_VAR_1}.”$" .string "BOX “{STR_VAR_1}.”$"

View File

@ -3,7 +3,7 @@ gBirchDexRatingText_AreYouCurious::
.string "Are you curious about how your\n" .string "Are you curious about how your\n"
.string "POKéDEX is coming along?$" .string "POKéDEX is coming along?$"
gBirchDexRatingText_Cancel: gBirchDexRatingText_Cancel::
.string "Hm? Oh, you haven't caught enough\n" .string "Hm? Oh, you haven't caught enough\n"
.string "POKéMON to make it worthwhile.$" .string "POKéMON to make it worthwhile.$"

View File

@ -1,5 +1,6 @@
gText_WantToUseSurf:: gText_WantToUseSurf::
.string "The water is dyed a deep blue…\nWould you like to SURF?$" .string "The water is dyed a deep blue…\n"
.string "Would you like to SURF?$"
gText_PlayerUsedSurf:: gText_PlayerUsedSurf::
.string "{STR_VAR_1} used SURF!$" .string "{STR_VAR_1} used SURF!$"

View File

@ -166,7 +166,7 @@ BattleFrontier_BattleTowerLobby_Text_LookingForwardToNextBattle::
.string "I'll be looking forward to your\n" .string "I'll be looking forward to your\n"
.string "next battle!$" .string "next battle!$"
gTVBravoTrainerBattleTowerText00:: BravoTrainerBattleTower_Text_Intro::
.string "Yeah!\n" .string "Yeah!\n"
.string "It's BRAVO TRAINER time!\p" .string "It's BRAVO TRAINER time!\p"
.string "Today, we're going to profile {STR_VAR_1},\n" .string "Today, we're going to profile {STR_VAR_1},\n"
@ -174,12 +174,12 @@ gTVBravoTrainerBattleTowerText00::
.string "For the challenge, {STR_VAR_1} entered\n" .string "For the challenge, {STR_VAR_1} entered\n"
.string "one wicked {STR_VAR_2}.$" .string "one wicked {STR_VAR_2}.$"
gTVBravoTrainerBattleTowerText01:: BravoTrainerBattleTower_Text_NewRecord::
.string "The pair set a new record of {STR_VAR_2} wins\n" .string "The pair set a new record of {STR_VAR_2} wins\n"
.string "in a row in {STR_VAR_1} competition!\l" .string "in a row in {STR_VAR_1} competition!\l"
.string "Bravo, TRAINER!$" .string "Bravo, TRAINER!$"
gTVBravoTrainerBattleTowerText02:: BravoTrainerBattleTower_Text_Lost::
.string "The twosome finally succumbed to\n" .string "The twosome finally succumbed to\n"
.string "{STR_VAR_1} in match number {STR_VAR_2}.\l" .string "{STR_VAR_1} in match number {STR_VAR_2}.\l"
.string "Nice try, TRAINER!\p" .string "Nice try, TRAINER!\p"
@ -188,7 +188,7 @@ gTVBravoTrainerBattleTowerText02::
.string "We asked the TRAINER for impressions\n" .string "We asked the TRAINER for impressions\n"
.string "on the match with {STR_VAR_1}.$" .string "on the match with {STR_VAR_1}.$"
gTVBravoTrainerBattleTowerText03:: BravoTrainerBattleTower_Text_Won::
.string "The twosome won it all by defeating\n" .string "The twosome won it all by defeating\n"
.string "{STR_VAR_1}'s {STR_VAR_2} thoroughly.\l" .string "{STR_VAR_1}'s {STR_VAR_2} thoroughly.\l"
.string "Bravo, TRAINER!\p" .string "Bravo, TRAINER!\p"
@ -197,7 +197,7 @@ gTVBravoTrainerBattleTowerText03::
.string "We asked the TRAINER for impressions\n" .string "We asked the TRAINER for impressions\n"
.string "on the moment of glory.$" .string "on the moment of glory.$"
gTVBravoTrainerBattleTowerText04:: BravoTrainerBattleTower_Text_LostFinal::
.string "After a string of wins, the pair finally\n" .string "After a string of wins, the pair finally\n"
.string "succumbed to {STR_VAR_1}'s {STR_VAR_2},\l" .string "succumbed to {STR_VAR_1}'s {STR_VAR_2},\l"
.string "their final hurdle.\p" .string "their final hurdle.\p"
@ -208,7 +208,7 @@ gTVBravoTrainerBattleTowerText04::
.string "We asked the TRAINER for impressions\n" .string "We asked the TRAINER for impressions\n"
.string "on battling the celebrity pair.$" .string "on battling the celebrity pair.$"
gTVBravoTrainerBattleTowerText05:: BravoTrainerBattleTower_Text_Satisfied::
.string "This is what the TRAINER had to say:\n" .string "This is what the TRAINER had to say:\n"
.string "“I'm satisfied!”\p" .string "“I'm satisfied!”\p"
.string "Now isn't that a refreshing reply?\n" .string "Now isn't that a refreshing reply?\n"
@ -218,7 +218,7 @@ gTVBravoTrainerBattleTowerText05::
.string "I found out exactly how satisfied\n" .string "I found out exactly how satisfied\n"
.string "when I heard the TRAINER say this:$" .string "when I heard the TRAINER say this:$"
gTVBravoTrainerBattleTowerText06:: BravoTrainerBattleTower_Text_Unsatisfied::
.string "This is what the TRAINER had to say:\n" .string "This is what the TRAINER had to say:\n"
.string "“I'm not satisfied…”\p" .string "“I'm not satisfied…”\p"
.string "Our TRAINER was obviously a little down\n" .string "Our TRAINER was obviously a little down\n"
@ -228,22 +228,22 @@ gTVBravoTrainerBattleTowerText06::
.string "Anyway, I found out how dissatisfied\n" .string "Anyway, I found out how dissatisfied\n"
.string "our TRAINER was when I heard this:$" .string "our TRAINER was when I heard this:$"
gTVBravoTrainerBattleTowerText07:: BravoTrainerBattleTower_Text_None1::
.string "None$" .string "None$"
gTVBravoTrainerBattleTowerText08:: BravoTrainerBattleTower_Text_None2::
.string "None$" .string "None$"
gTVBravoTrainerBattleTowerText09:: BravoTrainerBattleTower_Text_None3::
.string "None$" .string "None$"
gTVBravoTrainerBattleTowerText10:: BravoTrainerBattleTower_Text_None4::
.string "None$" .string "None$"
gTVBravoTrainerBattleTowerText11:: BravoTrainerBattleTower_Text_Response::
.string "{STR_VAR_1}.”$" .string "{STR_VAR_1}.”$"
gTVBravoTrainerBattleTowerText12:: BravoTrainerBattleTower_Text_ResponseSatisfied::
.string "{STR_VAR_1}.”\n" .string "{STR_VAR_1}.”\n"
.string "Now isn't that great?\p" .string "Now isn't that great?\p"
.string "It really expresses {STR_VAR_2}'s joy,\n" .string "It really expresses {STR_VAR_2}'s joy,\n"
@ -252,7 +252,7 @@ gTVBravoTrainerBattleTowerText12::
.string "end… It really was what you'd call\l" .string "end… It really was what you'd call\l"
.string "{STR_VAR_1}”!$" .string "{STR_VAR_1}”!$"
gTVBravoTrainerBattleTowerText13:: BravoTrainerBattleTower_Text_ResponseUnsatisfied::
.string "{STR_VAR_1}.”\n" .string "{STR_VAR_1}.”\n"
.string "Now isn't that fitting?\p" .string "Now isn't that fitting?\p"
.string "That battle with {STR_VAR_3} at the\n" .string "That battle with {STR_VAR_3} at the\n"
@ -261,7 +261,7 @@ gTVBravoTrainerBattleTowerText13::
.string "{STR_VAR_2}'s disappointment comes across\n" .string "{STR_VAR_2}'s disappointment comes across\n"
.string "loud and clear, I'd say!$" .string "loud and clear, I'd say!$"
gTVBravoTrainerBattleTowerText14:: BravoTrainerBattleTower_Text_Outro::
.string "Bravo, {STR_VAR_1}!\n" .string "Bravo, {STR_VAR_1}!\n"
.string "Bravo, {STR_VAR_2}!\p" .string "Bravo, {STR_VAR_2}!\p"
.string "I hope we can count on seeing\n" .string "I hope we can count on seeing\n"

View File

@ -1,51 +0,0 @@
# Bugs and Glitches
These are known bugs and glitches in the original Pokémon Emerald game: code that clearly does not work as intended, or that only works in limited circumstances but has the possibility to fail or crash. Defining the `BUGFIX` and `UBFIX` preprocessor variables will fix some of these automatically. `UBFIX` will already be defined for MODERN builds.
Fixes are written in the `diff` format. If you've used Git before, this should look familiar:
```diff
this is some code
-delete red - lines
+add green + lines
```
## Contents
- [Scrolling through items in the bag causes the image to flicker](#scrolling-through-items-in-the-bag-causes-the-image-to-flicker)
## Scrolling through items in the bag causes the image to flicker
**Fix:** Add the following function to [src/item_menu_icons.c](https://github.com/pret/pokeemerald/blob/master/src/item_menu_icons.c):
```diff
+void HideBagItemIconSprite(u8 id)
+{
+ u8 *spriteId = &gBagMenu->spriteId[10];
+ if (spriteId[id] != 0xFF)
+ {
+ gSprites[spriteId[id]].invisible = TRUE;
+ }
+}
```
and its corresponding declaration in [include/item_menu_icons.h](https://github.com/pret/pokeemerald/blob/master/include/item_menu_icons.h):
```diff
+void HideBagItemIconSprite(u8 id);
```
Then edit `BagMenu_MoveCursorCallback` in [src/item_menu.c](https://github.com/pret/pokeemerald/blob/master/src/item_menu.c):
```diff
...
{
- RemoveBagItemIconSprite(1 ^ gBagMenu->itemIconSlot);
+ HideBagItemIconSprite(gBagMenu->itemIconSlot ^ 1);
+ RemoveBagItemIconSprite(gBagMenu->itemIconSlot);
if (itemIndex != LIST_CANCEL)
...
```

View File

@ -76,7 +76,7 @@ s32 ChangeBgY(u8 bg, s32 value, u8 op);
s32 ChangeBgY_ScreenOff(u8 bg, s32 value, u8 op); s32 ChangeBgY_ScreenOff(u8 bg, s32 value, u8 op);
s32 GetBgY(u8 bg); s32 GetBgY(u8 bg);
void SetBgAffine(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle); void SetBgAffine(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle);
u8 Unused_AdjustBgMosaic(u8 a1, u8 a2); u8 Unused_AdjustBgMosaic(u8 val, u8 mode);
void SetBgTilemapBuffer(u8 bg, void *tilemap); void SetBgTilemapBuffer(u8 bg, void *tilemap);
void UnsetBgTilemapBuffer(u8 bg); void UnsetBgTilemapBuffer(u8 bg);
void* GetBgTilemapBuffer(u8 bg); void* GetBgTilemapBuffer(u8 bg);

View File

@ -94,7 +94,7 @@ static void ApplyAffineAnimFrame(u8 matrixNum, struct AffineAnimFrameCmd *frameC
static u8 IndexOfSpriteTileTag(u16 tag); static u8 IndexOfSpriteTileTag(u16 tag);
static void AllocSpriteTileRange(u16 tag, u16 start, u16 count); static void AllocSpriteTileRange(u16 tag, u16 start, u16 count);
static void DoLoadSpritePalette(const u16 *src, u16 paletteOffset); static void DoLoadSpritePalette(const u16 *src, u16 paletteOffset);
static void UpdateSpriteMatrixAnchorPos(struct Sprite* sprite, s32 a1, s32 a2); static void UpdateSpriteMatrixAnchorPos(struct Sprite*, s32, s32);
typedef void (*AnimFunc)(struct Sprite *); typedef void (*AnimFunc)(struct Sprite *);
typedef void (*AnimCmdFunc)(struct Sprite *); typedef void (*AnimCmdFunc)(struct Sprite *);
@ -632,15 +632,12 @@ void DestroySprite(struct Sprite *sprite)
} }
} }
void ResetOamRange(u8 a, u8 b) void ResetOamRange(u8 start, u8 end)
{ {
u8 i; u8 i;
for (i = start; i < end; i++)
for (i = a; i < b; i++)
{
gMain.oamBuffer[i] = *(struct OamData *)&gDummyOamData; gMain.oamBuffer[i] = *(struct OamData *)&gDummyOamData;
} }
}
void LoadOam(void) void LoadOam(void)
{ {

View File

@ -270,7 +270,7 @@ u8 CreateSpriteAtEnd(const struct SpriteTemplate *template, s16 x, s16 y, u8 sub
u8 CreateInvisibleSprite(void (*callback)(struct Sprite *)); u8 CreateInvisibleSprite(void (*callback)(struct Sprite *));
u8 CreateSpriteAndAnimate(const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority); u8 CreateSpriteAndAnimate(const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority);
void DestroySprite(struct Sprite *sprite); void DestroySprite(struct Sprite *sprite);
void ResetOamRange(u8 a, u8 b); void ResetOamRange(u8 start, u8 end);
void LoadOam(void); void LoadOam(void);
void SetOamMatrix(u8 matrixNum, u16 a, u16 b, u16 c, u16 d); void SetOamMatrix(u8 matrixNum, u16 a, u16 b, u16 c, u16 d);
void CalcCenterToCornerVec(struct Sprite *sprite, u8 shape, u8 size, u8 affineMode); void CalcCenterToCornerVec(struct Sprite *sprite, u8 shape, u8 size, u8 affineMode);

View File

@ -326,14 +326,14 @@ void RunTextPrinters(void)
{ {
if (sTextPrinters[i].active) if (sTextPrinters[i].active)
{ {
u16 temp = RenderFont(&sTextPrinters[i]); u16 renderCmd = RenderFont(&sTextPrinters[i]);
switch (temp) switch (renderCmd)
{ {
case RENDER_PRINT: case RENDER_PRINT:
CopyWindowToVram(sTextPrinters[i].printerTemplate.windowId, COPYWIN_GFX); CopyWindowToVram(sTextPrinters[i].printerTemplate.windowId, COPYWIN_GFX);
case RENDER_UPDATE: case RENDER_UPDATE:
if (sTextPrinters[i].callback != 0) if (sTextPrinters[i].callback != NULL)
sTextPrinters[i].callback(&sTextPrinters[i].printerTemplate, temp); sTextPrinters[i].callback(&sTextPrinters[i].printerTemplate, renderCmd);
break; break;
case RENDER_FINISH: case RENDER_FINISH:
sTextPrinters[i].active = FALSE; sTextPrinters[i].active = FALSE;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 B

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 B

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 394 B

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 486 B

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

After

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 B

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 B

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 B

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 B

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 B

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 445 B

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 B

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 435 B

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 435 B

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

After

Width:  |  Height:  |  Size: 231 B

View File

Before

Width:  |  Height:  |  Size: 394 B

After

Width:  |  Height:  |  Size: 394 B

View File

@ -62,7 +62,7 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
bool8 IsContest(void); bool8 IsContest(void);
s8 BattleAnimAdjustPanning(s8 pan); s8 BattleAnimAdjustPanning(s8 pan);
s8 BattleAnimAdjustPanning2(s8 pan); s8 BattleAnimAdjustPanning2(s8 pan);
s16 KeepPanInRange(s16 a, int oldPan); s16 KeepPanInRange(s16 panArg, int oldPan);
s16 CalculatePanIncrement(s16 sourcePan, s16 targetPan, s16 incrementPan); s16 CalculatePanIncrement(s16 sourcePan, s16 targetPan, s16 incrementPan);
void RelocateBattleBgPal(u16 paletteNum, u16 *dest, u32 offset, bool8 largeScreen); void RelocateBattleBgPal(u16 paletteNum, u16 *dest, u32 offset, bool8 largeScreen);
void ResetBattleAnimBg(bool8); void ResetBattleAnimBg(bool8);
@ -91,14 +91,14 @@ bool8 AnimTranslateLinear(struct Sprite *sprite);
void TranslateAnimSpriteToTargetMonLocation(struct Sprite *sprite); void TranslateAnimSpriteToTargetMonLocation(struct Sprite *sprite);
u8 GetBattlerSpriteCoord2(u8 battlerId, u8 attributeId); u8 GetBattlerSpriteCoord2(u8 battlerId, u8 attributeId);
void InitAnimLinearTranslationWithSpeed(struct Sprite *sprite); void InitAnimLinearTranslationWithSpeed(struct Sprite *sprite);
u16 ArcTan2Neg(s16 a, s16 b); u16 ArcTan2Neg(s16 x, s16 y);
void TrySetSpriteRotScale(struct Sprite *sprite, bool8 a2, s16 xScale, s16 yScale, u16 rotation); void TrySetSpriteRotScale(struct Sprite *sprite, bool8 recalcCenterVector, s16 xScale, s16 yScale, u16 rotation);
void RunStoredCallbackWhenAffineAnimEnds(struct Sprite *sprite); void RunStoredCallbackWhenAffineAnimEnds(struct Sprite *sprite);
void TranslateSpriteLinearAndFlicker(struct Sprite *sprite); void TranslateSpriteLinearAndFlicker(struct Sprite *sprite);
void SetSpriteCoordsToAnimAttackerCoords(struct Sprite *sprite); void SetSpriteCoordsToAnimAttackerCoords(struct Sprite *sprite);
void RunStoredCallbackWhenAnimEnds(struct Sprite *sprite); void RunStoredCallbackWhenAnimEnds(struct Sprite *sprite);
void SetAnimSpriteInitialXOffset(struct Sprite *sprite, s16 a2); void SetAnimSpriteInitialXOffset(struct Sprite *sprite, s16 xOffset);
s16 GetBattlerSpriteCoordAttr(u8 battlerId, u8 a2); s16 GetBattlerSpriteCoordAttr(u8 battlerId, u8 attr);
u8 GetBattlerYCoordWithElevation(u8 battlerId); u8 GetBattlerYCoordWithElevation(u8 battlerId);
void WaitAnimForDuration(struct Sprite *sprite); void WaitAnimForDuration(struct Sprite *sprite);
void AnimTravelDiagonally(struct Sprite *sprite); void AnimTravelDiagonally(struct Sprite *sprite);
@ -109,7 +109,7 @@ void *LoadPointerFromVars(s16 bottom, s16 top);
void StorePointerInVars(s16 *bottom, s16 *top, const void *ptr); void StorePointerInVars(s16 *bottom, s16 *top, const void *ptr);
void InitPrioritiesForVisibleBattlers(void); void InitPrioritiesForVisibleBattlers(void);
void GetBattleAnimBg1Data(struct BattleAnimBgData*); void GetBattleAnimBg1Data(struct BattleAnimBgData*);
void GetBattleAnimBgData(struct BattleAnimBgData*, u32 arg1); void GetBattleAnimBgData(struct BattleAnimBgData*, u32 bgId);
u8 GetBattlerSpriteSubpriority(u8 battlerId); u8 GetBattlerSpriteSubpriority(u8 battlerId);
bool8 TranslateAnimHorizontalArc(struct Sprite *sprite); bool8 TranslateAnimHorizontalArc(struct Sprite *sprite);
void TranslateSpriteLinearByIdFixedPoint(struct Sprite *sprite); void TranslateSpriteLinearByIdFixedPoint(struct Sprite *sprite);
@ -118,7 +118,7 @@ void SetSpriteRotScale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation);
void InitSpriteDataForLinearTranslation(struct Sprite *sprite); void InitSpriteDataForLinearTranslation(struct Sprite *sprite);
void PrepareBattlerSpriteForRotScale(u8 spriteId, u8 objMode); void PrepareBattlerSpriteForRotScale(u8 spriteId, u8 objMode);
void SetBattlerSpriteYOffsetFromRotation(u8 spriteId); void SetBattlerSpriteYOffsetFromRotation(u8 spriteId);
u32 GetBattleBgPalettesMask(u8 battleBackground, u8 attacker, u8 target, u8 attackerPartner, u8 targetPartner, u8 a6, u8 a7); u32 GetBattlePalettesMask(bool8 battleBackground, bool8 attacker, bool8 target, bool8 attackerPartner, bool8 targetPartner, bool8 anim1, bool8 anim2);
u32 GetBattleMonSpritePalettesMask(u8 playerLeft, u8 playerRight, u8 opponentLeft, u8 opponentRight); u32 GetBattleMonSpritePalettesMask(u8 playerLeft, u8 playerRight, u8 opponentLeft, u8 opponentRight);
u8 AnimDummyReturnArg(u8 battler); u8 AnimDummyReturnArg(u8 battler);
s16 CloneBattlerSpriteWithBlend(u8); s16 CloneBattlerSpriteWithBlend(u8);
@ -129,7 +129,7 @@ void AnimLoadCompressedBgGfx(u32, const u32*, u32);
void UpdateAnimBg3ScreenSize(bool8); void UpdateAnimBg3ScreenSize(bool8);
void TranslateSpriteInGrowingCircle(struct Sprite *); void TranslateSpriteInGrowingCircle(struct Sprite *);
void SetBattlerSpriteYOffsetFromYScale(u8 spriteId); void SetBattlerSpriteYOffsetFromYScale(u8 spriteId);
void PrepareEruptAnimTaskData(struct Task *task, u8 a2, s16 a3, s16 a4, s16 a5, s16 a6, u16 a7); void PrepareEruptAnimTaskData(struct Task *task, u8 spriteId, s16 xScaleStart, s16 yScaleStart, s16 xScaleEnd, s16 yScaleEnd, u16 duration);
u8 UpdateEruptAnimTask(struct Task *task); u8 UpdateEruptAnimTask(struct Task *task);
void DestroyAnimSpriteAndDisableBlend(struct Sprite *); void DestroyAnimSpriteAndDisableBlend(struct Sprite *);
void AnimLoadCompressedBgTilemap(u32 bgId, const void *src); void AnimLoadCompressedBgTilemap(u32 bgId, const void *src);
@ -146,7 +146,7 @@ void PrepareAffineAnimInTaskData(struct Task *task, u8 spriteId, const union Aff
bool8 RunAffineAnimFromTaskData(struct Task *task); bool8 RunAffineAnimFromTaskData(struct Task *task);
void AnimThrowProjectile(struct Sprite *sprite); void AnimThrowProjectile(struct Sprite *sprite);
void GetBgDataForTransform(struct BattleAnimBgData *dest, u8 battlerId); void GetBgDataForTransform(struct BattleAnimBgData *dest, u8 battlerId);
u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId, bool32 ignoreDeoxysForm); u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId, bool32 ignoreDeoxysForm);
void ResetSpriteRotScale_PreserveAffine(struct Sprite *sprite); void ResetSpriteRotScale_PreserveAffine(struct Sprite *sprite);
void TradeMenuBouncePartySprites(struct Sprite *sprite); void TradeMenuBouncePartySprites(struct Sprite *sprite);
void DestroyAnimVisualTaskAndDisableBlend(u8 taskId); void DestroyAnimVisualTaskAndDisableBlend(u8 taskId);
@ -181,7 +181,7 @@ enum
u8 GetBattlerSpriteCoord(u8 battlerId, u8 attributeId); u8 GetBattlerSpriteCoord(u8 battlerId, u8 attributeId);
bool8 IsBattlerSpritePresent(u8 battlerId); bool8 IsBattlerSpritePresent(u8 battlerId);
void ClearBattleAnimBg(u32 arg0); void ClearBattleAnimBg(u32 bgId);
u8 GetAnimBattlerSpriteId(u8 wantedBattler); u8 GetAnimBattlerSpriteId(u8 wantedBattler);
bool8 IsDoubleBattle(void); bool8 IsDoubleBattle(void);
u8 GetBattleBgPaletteNum(void); u8 GetBattleBgPaletteNum(void);
@ -209,11 +209,11 @@ void AnimTask_HorizontalShake(u8 taskId);
void TryShinyAnimation(u8 battler, struct Pokemon *mon); void TryShinyAnimation(u8 battler, struct Pokemon *mon);
u8 ItemIdToBallId(u16 itemId); u8 ItemIdToBallId(u16 itemId);
u8 AnimateBallOpenParticles(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId); u8 AnimateBallOpenParticles(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId);
u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 battlerId, u32 selectedPalettes, u8 ballId); u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 spritePalNum, u32 selectedPalettes, u8 ballId);
// battle_anim_utility_funcs.c // battle_anim_utility_funcs.c
void InitStatsChangeAnimation(u8); void InitStatsChangeAnimation(u8);
void StartMonScrollingBgMask(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5, u8 arg6, u8 arg7, const u32 *arg8, const u32 *arg9, const u32 *palette); void StartMonScrollingBgMask(u8 taskId, int unused, u16 scrollSpeed, u8 battler, bool8 includePartner, u8 numFadeSteps, u8 fadeStepDelay, u8 duration, const u32 *gfx, const u32 *tilemap, const u32 *palette);
// battle_anim_effects_1.c // battle_anim_effects_1.c
void SetSpriteNextToMonHead(u8 battler, struct Sprite* sprite); void SetSpriteNextToMonHead(u8 battler, struct Sprite* sprite);
@ -227,9 +227,9 @@ void AnimWaterPulseRing(struct Sprite *sprite);
void DestroyAnimSpriteAfterTimer(struct Sprite *sprite); void DestroyAnimSpriteAfterTimer(struct Sprite *sprite);
// battle_anim_smokescreen.c // battle_anim_smokescreen.c
u8 SmokescreenImpact(s16 x, s16 y, u8 a3); u8 SmokescreenImpact(s16 x, s16 y, bool8 persist);
u32 UnpackSelectedBattleBgPalettes(s16); u32 UnpackSelectedBattlePalettes(s16);
u8 GetBattlerSpriteFinal_Y(u8, u16, u8); u8 GetBattlerSpriteFinal_Y(u8, u16, u8);

View File

@ -222,7 +222,7 @@ void BtlController_EmitPrintSelectionString(u8 bufferId, u16 stringId);
void BtlController_EmitChooseAction(u8 bufferId, u8 action, u16 itemId); void BtlController_EmitChooseAction(u8 bufferId, u8 action, u16 itemId);
void BtlController_EmitYesNoBox(u8 bufferId); void BtlController_EmitYesNoBox(u8 bufferId);
void BtlController_EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData); void BtlController_EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData);
void BtlController_EmitChooseItem(u8 bufferId, u8* arg1); void BtlController_EmitChooseItem(u8 bufferId, u8* battlePartyOrder);
void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abilityId, u8* data); void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abilityId, u8* data);
void BtlController_EmitCmd23(u8 bufferId); // unused void BtlController_EmitCmd23(u8 bufferId); // unused
void BtlController_EmitHealthBarUpdate(u8 bufferId, u16 hpValue); void BtlController_EmitHealthBarUpdate(u8 bufferId, u16 hpValue);
@ -233,11 +233,11 @@ void BtlController_EmitStatusXor(u8 bufferId, u8 b); // unused
void BtlController_EmitDataTransfer(u8 bufferId, u16 size, void *data); void BtlController_EmitDataTransfer(u8 bufferId, u16 size, void *data);
void BtlController_EmitDMA3Transfer(u8 bufferId, void *dst, u16 size, void *data); // unused void BtlController_EmitDMA3Transfer(u8 bufferId, void *dst, u16 size, void *data); // unused
void BtlController_EmitPlayBGM(u8 bufferId, u16 songId, void *data); // unused void BtlController_EmitPlayBGM(u8 bufferId, u16 songId, void *data); // unused
void BtlController_EmitCmd32(u8 bufferId, u16 size, void *c); // unused void BtlController_EmitCmd32(u8 bufferId, u16 size, void *data); // unused
void BtlController_EmitTwoReturnValues(u8 bufferId, u8 arg1, u16 arg2); void BtlController_EmitTwoReturnValues(u8 bufferId, u8 ret8, u16 ret16);
void BtlController_EmitChosenMonReturnValue(u8 bufferId, u8 b, u8 *c); void BtlController_EmitChosenMonReturnValue(u8 bufferId, u8 partyId, u8 *battlePartyOrder);
void BtlController_EmitOneReturnValue(u8 bufferId, u16 arg1); void BtlController_EmitOneReturnValue(u8 bufferId, u16 ret);
void BtlController_EmitOneReturnValue_Duplicate(u8 bufferId, u16 b); void BtlController_EmitOneReturnValue_Duplicate(u8 bufferId, u16 ret);
void BtlController_EmitClearUnkVar(u8 bufferId); // unused void BtlController_EmitClearUnkVar(u8 bufferId); // unused
void BtlController_EmitSetUnkVar(u8 bufferId, u8 b); // unused void BtlController_EmitSetUnkVar(u8 bufferId, u8 b); // unused
void BtlController_EmitClearUnkFlag(u8 bufferId); // unused void BtlController_EmitClearUnkFlag(u8 bufferId); // unused
@ -254,7 +254,7 @@ void BtlController_EmitHidePartyStatusSummary(u8 bufferId);
void BtlController_EmitEndBounceEffect(u8 bufferId); void BtlController_EmitEndBounceEffect(u8 bufferId);
void BtlController_EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible); void BtlController_EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible);
void BtlController_EmitBattleAnimation(u8 bufferId, u8 animationId, u16 argument); void BtlController_EmitBattleAnimation(u8 bufferId, u8 animationId, u16 argument);
void BtlController_EmitLinkStandbyMsg(u8 bufferId, u8 arg1, bool32 record); void BtlController_EmitLinkStandbyMsg(u8 bufferId, u8 mode, bool32 record);
void BtlController_EmitResetActionMoveSelection(u8 bufferId, u8 caseId); void BtlController_EmitResetActionMoveSelection(u8 bufferId, u8 caseId);
void BtlController_EmitEndLinkBattle(u8 bufferId, u8 battleOutcome); void BtlController_EmitEndLinkBattle(u8 bufferId, u8 battleOutcome);

View File

@ -19,7 +19,7 @@ void DecompressTrainerBackPic(u16 backPicId, u8 battlerId);
void BattleGfxSfxDummy3(u8 gender); void BattleGfxSfxDummy3(u8 gender);
void FreeTrainerFrontPicPalette(u16 frontPicId); void FreeTrainerFrontPicPalette(u16 frontPicId);
bool8 BattleLoadAllHealthBoxesGfx(u8 state); bool8 BattleLoadAllHealthBoxesGfx(u8 state);
void LoadBattleBarGfx(u8 arg0); void LoadBattleBarGfx(u8 unused);
bool8 BattleInitAllSprites(u8 *state1, u8 *battlerId); bool8 BattleInitAllSprites(u8 *state1, u8 *battlerId);
void ClearSpritesHealthboxAnimData(void); void ClearSpritesHealthboxAnimData(void);
void CopyAllBattleSpritesInvisibilities(void); void CopyAllBattleSpritesInvisibilities(void);

View File

@ -71,10 +71,10 @@ void UpdateOamPriorityInAllHealthboxes(u8 priority);
void InitBattlerHealthboxCoords(u8 battler); void InitBattlerHealthboxCoords(u8 battler);
void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent); void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent);
void SwapHpBarsWithHpText(void); void SwapHpBarsWithHpText(void);
u8 CreatePartyStatusSummarySprites(u8 battler, struct HpAndStatus *partyInfo, u8 arg2, bool8 isBattleStart); u8 CreatePartyStatusSummarySprites(u8 battler, struct HpAndStatus *partyInfo, bool8 skipPlayer, bool8 isBattleStart);
void Task_HidePartyStatusSummary(u8 taskId); void Task_HidePartyStatusSummary(u8 taskId);
void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elementId); void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elementId);
s32 MoveBattleBar(u8 battler, u8 healthboxSpriteId, u8 whichBar, u8 arg3); s32 MoveBattleBar(u8 battler, u8 healthboxSpriteId, u8 whichBar, u8 unused);
u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale); u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale);
u8 GetHPBarLevel(s16 hp, s16 maxhp); u8 GetHPBarLevel(s16 hp, s16 maxhp);

View File

@ -22,9 +22,6 @@ struct MultiPartnerMenuPokemon
/*0x1D*/ u8 language; /*0x1D*/ u8 language;
}; };
#define TYPE_NAME_LENGTH 6
#define ABILITY_NAME_LENGTH 12
// defines for the u8 array gTypeEffectiveness // defines for the u8 array gTypeEffectiveness
#define TYPE_EFFECT_ATK_TYPE(i)((gTypeEffectiveness[i + 0])) #define TYPE_EFFECT_ATK_TYPE(i)((gTypeEffectiveness[i + 0]))
#define TYPE_EFFECT_DEF_TYPE(i)((gTypeEffectiveness[i + 1])) #define TYPE_EFFECT_DEF_TYPE(i)((gTypeEffectiveness[i + 1]))

View File

@ -28,7 +28,7 @@ void BattleSetup_StartLegendaryBattle(void);
void StartGroudonKyogreBattle(void); void StartGroudonKyogreBattle(void);
void StartRegiBattle(void); void StartRegiBattle(void);
u8 BattleSetup_GetTerrainId(void); u8 BattleSetup_GetTerrainId(void);
u8 GetSpecialBattleTransition(s32 arg0); u8 GetSpecialBattleTransition(s32 id);
void ChooseStarter(void); void ChooseStarter(void);
void ResetTrainerOpponentIds(void); void ResetTrainerOpponentIds(void);
void SetMapVarsToTrainer(void); void SetMapVarsToTrainer(void);

View File

@ -66,7 +66,7 @@ void PressurePPLoseOnUsingPerishSong(u8 attacker);
void PressurePPLoseOnUsingImprison(u8 attacker); void PressurePPLoseOnUsingImprison(u8 attacker);
void MarkAllBattlersForControllerExec(void); // unused void MarkAllBattlersForControllerExec(void); // unused
void MarkBattlerForControllerExec(u8 battlerId); void MarkBattlerForControllerExec(u8 battlerId);
void MarkBattlerReceivedLinkData(u8 arg0); void MarkBattlerReceivedLinkData(u8 battlerId);
void CancelMultiTurnMoves(u8 battlerId); void CancelMultiTurnMoves(u8 battlerId);
bool8 WasUnableToUseMove(u8 battlerId); bool8 WasUnableToUseMove(u8 battlerId);
void PrepareStringBattle(u16 stringId, u8 battlerId); void PrepareStringBattle(u16 stringId, u8 battlerId);

View File

@ -319,7 +319,7 @@
#define B_WIN_TYPE_NORMAL 0 #define B_WIN_TYPE_NORMAL 0
#define B_WIN_TYPE_ARENA 1 #define B_WIN_TYPE_ARENA 1
// Window Ids for gStandardBattleWindowTemplates / gBattleArenaWindowTemplates // Window Ids for sStandardBattleWindowTemplates / sBattleArenaWindowTemplates
#define B_WIN_MSG 0 #define B_WIN_MSG 0
#define B_WIN_ACTION_PROMPT 1 // "What will {x} do?" #define B_WIN_ACTION_PROMPT 1 // "What will {x} do?"
#define B_WIN_ACTION_MENU 2 // "Fight/Pokémon/Bag/Run" menu #define B_WIN_ACTION_MENU 2 // "Fight/Pokémon/Bag/Run" menu

View File

@ -413,4 +413,21 @@
#define ANIM_WEATHER_SANDSTORM 3 #define ANIM_WEATHER_SANDSTORM 3
#define ANIM_WEATHER_HAIL 4 #define ANIM_WEATHER_HAIL 4
// Flags given to various functions to indicate which palettes to consider.
// Handled by UnpackSelectedBattlePalettes
#define F_PAL_BG (1 << 0)
#define F_PAL_ATTACKER (1 << 1)
#define F_PAL_TARGET (1 << 2)
#define F_PAL_ATK_PARTNER (1 << 3)
#define F_PAL_DEF_PARTNER (1 << 4)
#define F_PAL_ANIM_1 (1 << 5) // Palette set for GetBattleAnimBg1Data/GetBgDataForTransform. Only used (ineffectually?) by Aromatherapy.
#define F_PAL_ANIM_2 (1 << 6) // Palette set for GetBattleAnimBgData/GetBgDataForTransform. Unused.
#define F_PAL_ATK_SIDE (F_PAL_ATTACKER | F_PAL_ATK_PARTNER)
#define F_PAL_DEF_SIDE (F_PAL_TARGET | F_PAL_DEF_PARTNER)
#define F_PAL_BATTLERS (F_PAL_ATK_SIDE | F_PAL_DEF_SIDE)
// The below are only used by AnimTask_BlendBattleAnimPal to get battler sprite palettes by position rather than by role.
// It's redundant with F_PAL_BATTLERS, because they're only ever used together to refer to all the battlers at once.
#define F_PAL_BATTLERS_2 (1 << 7 | 1 << 8 | 1 << 9 | 1 << 10)
#endif // GUARD_CONSTANTS_BATTLE_ANIM_H #endif // GUARD_CONSTANTS_BATTLE_ANIM_H

View File

@ -1,6 +1,8 @@
#ifndef GUARD_CONSTANTS_BATTLE_FRONTIER_H #ifndef GUARD_CONSTANTS_BATTLE_FRONTIER_H
#define GUARD_CONSTANTS_BATTLE_FRONTIER_H #define GUARD_CONSTANTS_BATTLE_FRONTIER_H
#include "constants/pokemon.h"
#define FRONTIER_CHALLENGE(facility, mode) ((facility << 8) + mode) #define FRONTIER_CHALLENGE(facility, mode) ((facility << 8) + mode)
// Battle Frontier facility ids. // Battle Frontier facility ids.
@ -46,6 +48,14 @@
#define MAX_BATTLE_FRONTIER_POINTS 9999 #define MAX_BATTLE_FRONTIER_POINTS 9999
#define MAX_STREAK 9999 #define MAX_STREAK 9999
#define FRONTIER_MAX_LEVEL_50 50
#define FRONTIER_MIN_LEVEL_OPEN 60
#define FRONTIER_MAX_LEVEL_OPEN MAX_LEVEL
// This is the default number of battles (or floors, in Battle Pyramid) per challenge.
// There are 2 facilities that differ: Battle Dome (DOME_ROUNDS_COUNT) and Battle Pike (NUM_PIKE_ROOMS).
#define FRONTIER_STAGES_PER_CHALLENGE 7
// These sets of facility ids would be redundant if the order was consistent // These sets of facility ids would be redundant if the order was consistent
// The order is important for this set so that all the non-link records can be continuous // The order is important for this set so that all the non-link records can be continuous
#define RANKING_HALL_TOWER_SINGLES 0 #define RANKING_HALL_TOWER_SINGLES 0

View File

@ -1,6 +1,8 @@
#ifndef GUARD_CONSTANTS_BATTLE_PIKE_H #ifndef GUARD_CONSTANTS_BATTLE_PIKE_H
#define GUARD_CONSTANTS_BATTLE_PIKE_H #define GUARD_CONSTANTS_BATTLE_PIKE_H
#define NUM_PIKE_ROOMS 14
#define PIKE_ROOM_SINGLE_BATTLE 0 #define PIKE_ROOM_SINGLE_BATTLE 0
#define PIKE_ROOM_HEAL_FULL 1 #define PIKE_ROOM_HEAL_FULL 1
#define PIKE_ROOM_NPC 2 #define PIKE_ROOM_NPC 2

View File

@ -14,6 +14,13 @@
#define HINT_EXIT_FAR_REMAINING_TRAINERS 7 #define HINT_EXIT_FAR_REMAINING_TRAINERS 7
#define HINT_EXIT_FAR_REMAINING_ITEMS 8 #define HINT_EXIT_FAR_REMAINING_ITEMS 8
#define MAX_PYRAMID_TRAINERS 8
// Each floor of the Battle Pyramid is 32x32 metatiles, subdivided into a 4x4 grid of 8x8 metatile squares
#define PYRAMID_FLOOR_SQUARES_WIDE 4
#define PYRAMID_FLOOR_SQUARES_HIGH 4
#define NUM_PYRAMID_FLOOR_SQUARES (PYRAMID_FLOOR_SQUARES_WIDE * PYRAMID_FLOOR_SQUARES_HIGH)
#define OBJ_TRAINERS 0 #define OBJ_TRAINERS 0
#define OBJ_ITEMS 1 #define OBJ_ITEMS 1

View File

@ -599,4 +599,6 @@
#define B_MSG_REF_DRAW 7 #define B_MSG_REF_DRAW 7
#define B_MSG_REF_COMMENCE_BATTLE 8 #define B_MSG_REF_COMMENCE_BATTLE 8
#define NUM_TRAPPING_MOVES 6
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H #endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H

View File

@ -1,6 +1,12 @@
#ifndef GUARD_CONSTANTS_BATTLE_TENT_H #ifndef GUARD_CONSTANTS_BATTLE_TENT_H
#define GUARD_CONSTANTS_BATTLE_TENT_H #define GUARD_CONSTANTS_BATTLE_TENT_H
#define TENT_MIN_LEVEL 30
// The number of battles in each Battle Tent challenge.
// Battle Tent equivalent of FRONTIER_STAGES_PER_CHALLENGE.
#define TENT_STAGES_PER_CHALLENGE 3
#define VERDANTURF_TENT_FUNC_INIT 0 #define VERDANTURF_TENT_FUNC_INIT 0
#define VERDANTURF_TENT_FUNC_GET_PRIZE 1 #define VERDANTURF_TENT_FUNC_GET_PRIZE 1
#define VERDANTURF_TENT_FUNC_SET_PRIZE 2 #define VERDANTURF_TENT_FUNC_SET_PRIZE 2

View File

@ -241,6 +241,15 @@
#define OBJ_EVENT_GFX_LUGIA 237 #define OBJ_EVENT_GFX_LUGIA 237
#define OBJ_EVENT_GFX_HOOH 238 #define OBJ_EVENT_GFX_HOOH 238
// NOTE: By default, the max value for NUM_OBJ_EVENT_GFX is 239.
//
// Object event graphics ids are 1 byte in size (max value of 255), and the dynamic
// graphics ids that start after NUM_OBJ_EVENT_GFX reach this limit. No graphics id
// uses the value 239 itself, so removing the "+ 1" in OBJ_EVENT_GFX_VARS would
// allow increasing NUM_OBJ_EVENT_GFX to 240. There are also a handful of unused
// object graphics that can be removed. If more graphics are needed, anything that
// stores graphics ids will need to be increased in size. See wiki entry below:
// https://github.com/pret/pokeemerald/wiki/Feature-Branches#overworld-expansion
#define NUM_OBJ_EVENT_GFX 239 #define NUM_OBJ_EVENT_GFX 239

View File

@ -1634,7 +1634,7 @@
#define FLAGS_COUNT (DAILY_FLAGS_END + 1) #define FLAGS_COUNT (DAILY_FLAGS_END + 1)
// Special Flags (Stored in EWRAM (gSpecialFlags), not in the SaveBlock) // Special Flags (Stored in EWRAM (sSpecialFlags), not in the SaveBlock)
#define SPECIAL_FLAGS_START 0x4000 #define SPECIAL_FLAGS_START 0x4000
#define FLAG_HIDE_MAP_NAME_POPUP (SPECIAL_FLAGS_START + 0x0) #define FLAG_HIDE_MAP_NAME_POPUP (SPECIAL_FLAGS_START + 0x0)
#define FLAG_DONT_TRANSITION_MUSIC (SPECIAL_FLAGS_START + 0x1) #define FLAG_DONT_TRANSITION_MUSIC (SPECIAL_FLAGS_START + 0x1)

View File

@ -101,6 +101,8 @@
#define WONDER_NEWS_TEXT_LENGTH 40 #define WONDER_NEWS_TEXT_LENGTH 40
#define WONDER_CARD_BODY_TEXT_LINES 4 #define WONDER_CARD_BODY_TEXT_LINES 4
#define WONDER_NEWS_BODY_TEXT_LINES 10 #define WONDER_NEWS_BODY_TEXT_LINES 10
#define TYPE_NAME_LENGTH 6
#define ABILITY_NAME_LENGTH 12
#define MAX_STAMP_CARD_STAMPS 7 #define MAX_STAMP_CARD_STAMPS 7

View File

@ -99,6 +99,7 @@
#define METATILE_PetalburgGym_SlidingDoor_Frame2 0x21A #define METATILE_PetalburgGym_SlidingDoor_Frame2 0x21A
#define METATILE_PetalburgGym_SlidingDoor_Frame3 0x21B #define METATILE_PetalburgGym_SlidingDoor_Frame3 0x21B
#define METATILE_PetalburgGym_SlidingDoor_Frame4 0x21C #define METATILE_PetalburgGym_SlidingDoor_Frame4 0x21C
#define METATILE_PetalburgGym_Door 0x224
// gTileset_MossdeepGym from R/S // gTileset_MossdeepGym from R/S
#define METATILE_RS_MossdeepGym_RedArrow_Right 0x204 #define METATILE_RS_MossdeepGym_RedArrow_Right 0x204
@ -128,7 +129,6 @@
// gTileset_BattleFrontier // gTileset_BattleFrontier
#define METATILE_BattleFrontier_Door_Elevator 0x20E #define METATILE_BattleFrontier_Door_Elevator 0x20E
#define METATILE_BattleFrontier_Door_Corridor 0x224
#define METATILE_BattleFrontier_Door_MultiCorridor 0x2AD #define METATILE_BattleFrontier_Door_MultiCorridor 0x2AD
#define METATILE_BattleFrontier_CorridorOpenDoor_Top 0x207 #define METATILE_BattleFrontier_CorridorOpenDoor_Top 0x207
#define METATILE_BattleFrontier_CorridorOpenDoor_Bottom 0x20F #define METATILE_BattleFrontier_CorridorOpenDoor_Bottom 0x20F

View File

@ -359,4 +359,7 @@
#define MOVES_COUNT 355 #define MOVES_COUNT 355
// Used for checks for moves affected by Disable, Mimic, etc.
#define MOVE_UNAVAILABLE 0xFFFF
#endif // GUARD_CONSTANTS_MOVES_H #endif // GUARD_CONSTANTS_MOVES_H

View File

@ -274,4 +274,21 @@
#define SMARTSHOPPER_NUM_ITEMS 3 #define SMARTSHOPPER_NUM_ITEMS 3
// TV Show states for Bravo Trainer's Battle Tower interview
#define BRAVOTOWER_STATE_INTRO 0
#define BRAVOTOWER_STATE_NEW_RECORD 1
#define BRAVOTOWER_STATE_LOST 2
#define BRAVOTOWER_STATE_WON 3
#define BRAVOTOWER_STATE_LOST_FINAL 4
#define BRAVOTOWER_STATE_SATISFIED 5
#define BRAVOTOWER_STATE_UNSATISFIED 6
#define BRAVOTOWER_STATE_UNUSED_1 7
#define BRAVOTOWER_STATE_UNUSED_2 8
#define BRAVOTOWER_STATE_UNUSED_3 9
#define BRAVOTOWER_STATE_UNUSED_4 10
#define BRAVOTOWER_STATE_RESPONSE 11
#define BRAVOTOWER_STATE_RESPONSE_SATISFIED 12
#define BRAVOTOWER_STATE_RESPONSE_UNSATISFIED 13
#define BRAVOTOWER_STATE_OUTRO 14
#endif //GUARD_CONSTANTS_TV_H #endif //GUARD_CONSTANTS_TV_H

View File

@ -11,6 +11,8 @@
#define UNION_ROOM_SPAWN_IN 1 #define UNION_ROOM_SPAWN_IN 1
#define UNION_ROOM_SPAWN_OUT 2 #define UNION_ROOM_SPAWN_OUT 2
#define UNION_ROOM_MAX_LEVEL 30
#define ACTIVITY_NONE 0 #define ACTIVITY_NONE 0
#define ACTIVITY_BATTLE_SINGLE 1 #define ACTIVITY_BATTLE_SINGLE 1
#define ACTIVITY_BATTLE_DOUBLE 2 #define ACTIVITY_BATTLE_DOUBLE 2

View File

@ -324,7 +324,6 @@ extern u16 gSpecialVar_ContestRank;
extern u8 gNumLinkContestPlayers; extern u8 gNumLinkContestPlayers;
extern u8 gHighestRibbonRank; extern u8 gHighestRibbonRank;
extern struct ContestResources *gContestResources; extern struct ContestResources *gContestResources;
extern u8 sContestBgCopyFlags;
extern struct ContestWinner gCurContestWinner; extern struct ContestWinner gCurContestWinner;
extern u8 gCurContestWinnerIsForArtist; extern u8 gCurContestWinnerIsForArtist;
extern u8 gCurContestWinnerSaveIdx; extern u8 gCurContestWinnerSaveIdx;
@ -340,11 +339,11 @@ void SetLinkAIContestants(u8 contestType, u8 rank, bool32 isPostgame);
u8 GetContestEntryEligibility(struct Pokemon *pkmn); u8 GetContestEntryEligibility(struct Pokemon *pkmn);
void CalculateRound1Points(u8 contestCategory); void CalculateRound1Points(u8 contestCategory);
bool8 IsSpeciesNotUnown(u16 species); bool8 IsSpeciesNotUnown(u16 species);
bool8 Contest_IsMonsTurnDisabled(u8 a); bool8 Contest_IsMonsTurnDisabled(u8 contestant);
void SaveLinkContestResults(void); void SaveLinkContestResults(void);
void SortContestants(bool8 a); void SortContestants(bool8 useRanking);
void SetContestantEffectStringID(u8 a, u8 b); void SetContestantEffectStringID(u8 contestant, u8 effectStringId);
void SetContestantEffectStringID2(u8 a, u8 b); void SetContestantEffectStringID2(u8 contestant, u8 effectStringId);
void SetStartledString(u8 contestant, u8 jam); void SetStartledString(u8 contestant, u8 jam);
void MakeContestantNervous(u8 p); void MakeContestantNervous(u8 p);
s8 Contest_GetMoveExcitement(u16 move); s8 Contest_GetMoveExcitement(u16 move);

View File

@ -13,7 +13,7 @@ void LoadCompressedSpriteSheetOverrideBuffer(const struct CompressedSpriteSheet
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet* src); bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet* src);
void LoadCompressedSpritePalette(const struct CompressedSpritePalette *src); void LoadCompressedSpritePalette(const struct CompressedSpritePalette *src);
void LoadCompressedSpritePaletteOverrideBuffer(const struct CompressedSpritePalette *a, void *buffer); void LoadCompressedSpritePaletteOverrideBuffer(const struct CompressedSpritePalette *src, void *buffer);
bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette *src); bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette *src);
void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffer, s32 species); void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffer, s32 species);

View File

@ -18,9 +18,9 @@ struct DigitObjUtilTemplate
bool32 DigitObjUtil_Init(u32 count); bool32 DigitObjUtil_Init(u32 count);
void DigitObjUtil_Free(void); void DigitObjUtil_Free(void);
bool32 DigitObjUtil_CreatePrinter(u32 id, s32 num, const struct DigitObjUtilTemplate *template); bool32 DigitObjUtil_CreatePrinter(u32 id, s32 num, const struct DigitObjUtilTemplate *template);
void DigitObjUtil_PrintNumOn(u32 id, s32 arg1); void DigitObjUtil_PrintNumOn(u32 id, s32 num);
void DigitObjUtil_DeletePrinter(u32 id); void DigitObjUtil_DeletePrinter(u32 id);
void DigitObjUtil_HideOrShow(u32 id, bool32 arg1); void DigitObjUtil_HideOrShow(u32 id, bool32 hide);
u8 GetTilesPerImage(u32 shape, u32 size); u8 GetTilesPerImage(u32 shape, u32 size);
#endif // GUARD_DIGIT_OBJ_UTIL_H #endif // GUARD_DIGIT_OBJ_UTIL_H

View File

@ -21,21 +21,21 @@ extern const u8 gTVBravoTrainerText05[];
extern const u8 gTVBravoTrainerText06[]; extern const u8 gTVBravoTrainerText06[];
extern const u8 gTVBravoTrainerText07[]; extern const u8 gTVBravoTrainerText07[];
extern const u8 gTVBravoTrainerText08[]; extern const u8 gTVBravoTrainerText08[];
extern const u8 gTVBravoTrainerBattleTowerText00[]; extern const u8 BravoTrainerBattleTower_Text_Intro[];
extern const u8 gTVBravoTrainerBattleTowerText01[]; extern const u8 BravoTrainerBattleTower_Text_NewRecord[];
extern const u8 gTVBravoTrainerBattleTowerText02[]; extern const u8 BravoTrainerBattleTower_Text_Lost[];
extern const u8 gTVBravoTrainerBattleTowerText03[]; extern const u8 BravoTrainerBattleTower_Text_Won[];
extern const u8 gTVBravoTrainerBattleTowerText04[]; extern const u8 BravoTrainerBattleTower_Text_LostFinal[];
extern const u8 gTVBravoTrainerBattleTowerText05[]; extern const u8 BravoTrainerBattleTower_Text_Satisfied[];
extern const u8 gTVBravoTrainerBattleTowerText06[]; extern const u8 BravoTrainerBattleTower_Text_Unsatisfied[];
extern const u8 gTVBravoTrainerBattleTowerText07[]; extern const u8 BravoTrainerBattleTower_Text_None1[];
extern const u8 gTVBravoTrainerBattleTowerText08[]; extern const u8 BravoTrainerBattleTower_Text_None2[];
extern const u8 gTVBravoTrainerBattleTowerText09[]; extern const u8 BravoTrainerBattleTower_Text_None3[];
extern const u8 gTVBravoTrainerBattleTowerText10[]; extern const u8 BravoTrainerBattleTower_Text_None4[];
extern const u8 gTVBravoTrainerBattleTowerText11[]; extern const u8 BravoTrainerBattleTower_Text_Response[];
extern const u8 gTVBravoTrainerBattleTowerText12[]; extern const u8 BravoTrainerBattleTower_Text_ResponseSatisfied[];
extern const u8 gTVBravoTrainerBattleTowerText13[]; extern const u8 BravoTrainerBattleTower_Text_ResponseUnsatisfied[];
extern const u8 gTVBravoTrainerBattleTowerText14[]; extern const u8 BravoTrainerBattleTower_Text_Outro[];
extern const u8 gTVFanClubOpinionsText00[]; extern const u8 gTVFanClubOpinionsText00[];
extern const u8 gTVFanClubOpinionsText01[]; extern const u8 gTVFanClubOpinionsText01[];
extern const u8 gTVFanClubOpinionsText02[]; extern const u8 gTVFanClubOpinionsText02[];

View File

@ -3,7 +3,7 @@
void LoadEvoSparkleSpriteAndPal(void); void LoadEvoSparkleSpriteAndPal(void);
u8 EvolutionSparkles_SpiralUpward(u16 arg0); u8 EvolutionSparkles_SpiralUpward(u16 palNum);
u8 EvolutionSparkles_ArcDown(void); u8 EvolutionSparkles_ArcDown(void);
u8 EvolutionSparkles_CircleInward(void); u8 EvolutionSparkles_CircleInward(void);
u8 EvolutionSparkles_SprayAndFlash(u16 species); u8 EvolutionSparkles_SprayAndFlash(u16 species);

View File

@ -17,14 +17,14 @@ extern u16 gTotalCameraPixelOffsetY;
void DrawWholeMapView(void); void DrawWholeMapView(void);
void CurrentMapDrawMetatileAt(int x, int y); void CurrentMapDrawMetatileAt(int x, int y);
void GetCameraOffsetWithPan(s16 *a0, s16 *a1); void GetCameraOffsetWithPan(s16 *x, s16 *y);
void DrawDoorMetatileAt(int x, int y, u16 *arr); void DrawDoorMetatileAt(int x, int y, u16 *arr);
void ResetFieldCamera(void); void ResetFieldCamera(void);
void ResetCameraUpdateInfo(void); void ResetCameraUpdateInfo(void);
u32 InitCameraUpdateCallback(u8 a); u32 InitCameraUpdateCallback(u8 trackedSpriteId);
void CameraUpdate(void); void CameraUpdate(void);
void SetCameraPanningCallback(void (*a)(void)); void SetCameraPanningCallback(void (*callback)(void));
void SetCameraPanning(s16 a, s16 b); void SetCameraPanning(s16 horizontal, s16 vertical);
void InstallCameraPanAheadCallback(void); void InstallCameraPanAheadCallback(void);
void UpdateCameraPanning(void); void UpdateCameraPanning(void);
void FieldUpdateBgTilemapScroll(void); void FieldUpdateBgTilemapScroll(void);

View File

@ -11,29 +11,29 @@ void PlayerGetDestCoords(s16 *, s16 *);
u8 GetPlayerFacingDirection(void); u8 GetPlayerFacingDirection(void);
u8 GetPlayerMovementDirection(void); u8 GetPlayerMovementDirection(void);
u8 PlayerGetCopyableMovement(void); u8 PlayerGetCopyableMovement(void);
void PlayerWalkNormal(u8); void PlayerWalkNormal(u8 direction);
void PlayerWalkFast(u8); void PlayerWalkFast(u8 direction);
void PlayerRideWaterCurrent(u8); void PlayerRideWaterCurrent(u8 direction);
void PlayerWalkFaster(u8); void PlayerWalkFaster(u8 direction);
void PlayerOnBikeCollide(u8); void PlayerOnBikeCollide(u8 direction);
void PlayerFaceDirection(u8 a); void PlayerFaceDirection(u8 direction);
void PlayerTurnInPlace(u8 a); void PlayerTurnInPlace(u8 direction);
void PlayerJumpLedge(u8 a); void PlayerJumpLedge(u8 direction);
void PlayerIdleWheelie(u8 a); void PlayerIdleWheelie(u8 direction);
void PlayerStartWheelie(u8 a); void PlayerStartWheelie(u8 direction);
void PlayerEndWheelie(u8 a); void PlayerEndWheelie(u8 direction);
void PlayerStandingHoppingWheelie(u8 a); void PlayerStandingHoppingWheelie(u8 direction);
void PlayerMovingHoppingWheelie(u8 a); void PlayerMovingHoppingWheelie(u8 direction);
void PlayerLedgeHoppingWheelie(u8 a); void PlayerLedgeHoppingWheelie(u8 direction);
void PlayerAcroTurnJump(u8 a); void PlayerAcroTurnJump(u8 direction);
void PlayerSetAnimId(u8 a, u8 b); void PlayerSetAnimId(u8 movementActionId, u8 copyableMovement);
bool8 IsPlayerCollidingWithFarawayIslandMew(u8 direction); bool8 IsPlayerCollidingWithFarawayIslandMew(u8 direction);
void PlayerOnBikeCollideWithFarawayIslandMew(u8 direction); void PlayerOnBikeCollideWithFarawayIslandMew(u8 direction);
u8 CheckForObjectEventCollision(struct ObjectEvent *a, s16 b, s16 c, u8 d, u8 e); u8 CheckForObjectEventCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior);
u8 PlayerGetElevation(void); u8 PlayerGetElevation(void);
void SetPlayerAvatarTransitionFlags(u16 a); void SetPlayerAvatarTransitionFlags(u16 transitionFlags);
void CancelPlayerForcedMovement(void); void CancelPlayerForcedMovement(void);
void InitPlayerAvatar(s16 a, s16 b, u8 c, u8 d); void InitPlayerAvatar(s16 x, s16 y, u8 direction, u8 gender);
void PlayerFreeze(void); void PlayerFreeze(void);
void StopPlayerAvatar(void); void StopPlayerAvatar(void);
void SetSpinStartFacingDir(u8); void SetSpinStartFacingDir(u8);
@ -41,8 +41,8 @@ void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr);
u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8, u8); u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8, u8);
void SetPlayerAvatarFieldMove(void); void SetPlayerAvatarFieldMove(void);
u8 GetPlayerAvatarGraphicsIdByCurrentState(void); u8 GetPlayerAvatarGraphicsIdByCurrentState(void);
void SetPlayerAvatarStateMask(u8 a); void SetPlayerAvatarStateMask(u8 flags);
u8 GetPlayerAvatarGraphicsIdByStateId(u8 a); u8 GetPlayerAvatarGraphicsIdByStateId(u8 state);
u8 GetJumpSpecialMovementAction(u32); u8 GetJumpSpecialMovementAction(u32);
bool8 PartyHasMonWithSurf(void); bool8 PartyHasMonWithSurf(void);
bool8 IsPlayerFacingSurfableFishableWater(void); bool8 IsPlayerFacingSurfableFishableWater(void);

View File

@ -1,14 +1,8 @@
#ifndef GUARD_FIELD_SPECIAL_SCENE_H #ifndef GUARD_FIELD_SPECIAL_SCENE_H
#define GUARD_FIELD_SPECIAL_SCENE_H #define GUARD_FIELD_SPECIAL_SCENE_H
s16 GetTruckCameraBobbingY(int a1);
s16 GetTruckBoxMovement(int a1);
void Task_Truck1(u8 taskId);
void Task_Truck2(u8 taskId);
void Task_Truck3(u8 taskId);
void Task_HandleTruckSequence(u8 taskId);
void ExecuteTruckSequence(void); void ExecuteTruckSequence(void);
void EndTruckSequence(u8); void EndTruckSequence(u8 taskId);
void FieldCB_ShowPortholeView(void); void FieldCB_ShowPortholeView(void);
#endif // GUARD_FIELD_SPECIAL_SCENE_H #endif // GUARD_FIELD_SPECIAL_SCENE_H

View File

@ -25,8 +25,8 @@ void ChooseMonForSoftboiled(u8 taskId);
// flash // flash
bool8 SetUpFieldMove_Flash(void); bool8 SetUpFieldMove_Flash(void);
void CB2_DoChangeMap(void); void CB2_DoChangeMap(void);
bool8 GetMapPairFadeToType(u8 a1, u8 a2); bool8 GetMapPairFadeToType(u8 _fromType, u8 _toType);
bool8 GetMapPairFadeFromType(u8 a1, u8 a2); bool8 GetMapPairFadeFromType(u8 _fromType, u8 _toType);
// strength // strength
bool8 SetUpFieldMove_Strength(void); bool8 SetUpFieldMove_Strength(void);

View File

@ -1,8 +1,8 @@
#ifndef GUARD_FLDEFF_MISC_H #ifndef GUARD_FLDEFF_MISC_H
#define GUARD_FLDEFF_MISC_H #define GUARD_FLDEFF_MISC_H
void ComputerScreenOpenEffect(u16 a0, u16 a1, u8 a2); void ComputerScreenOpenEffect(u16 increment, u16 unused, u8 priority);
void ComputerScreenCloseEffect(u16 a0, u16 a1, u8 a2); void ComputerScreenCloseEffect(u16 increment, u16 unused, u8 priority);
bool8 IsComputerScreenOpenEffectActive(void); bool8 IsComputerScreenOpenEffectActive(void);
bool8 IsComputerScreenCloseEffectActive(void); bool8 IsComputerScreenCloseEffectActive(void);
bool8 SetUpFieldMove_SecretPower(void); bool8 SetUpFieldMove_SecretPower(void);
@ -22,7 +22,7 @@ void PlaySecretBaseMusicNoteMatSound(s16 metatileId);
void DoSecretBaseGlitterMatSparkle(void); void DoSecretBaseGlitterMatSparkle(void);
bool8 FldEff_SandPillar(void); bool8 FldEff_SandPillar(void);
void InteractWithShieldOrTVDecoration(void); void InteractWithShieldOrTVDecoration(void);
bool8 IsLargeBreakableDecoration(u16 arg0, u8 arg1); bool8 IsLargeBreakableDecoration(u16 metatileId, bool8 checkBase);
void FldEffPoison_Start(void); void FldEffPoison_Start(void);
bool32 FldEffPoison_IsActive(void); bool32 FldEffPoison_IsActive(void);
void DoWateringBerryTreeAnim(void); void DoWateringBerryTreeAnim(void);

View File

@ -423,7 +423,7 @@ void Clear64byte(void *addr);
void SoundInit(struct SoundInfo *soundInfo); void SoundInit(struct SoundInfo *soundInfo);
void MPlayExtender(struct CgbChannel *cgbChans); void MPlayExtender(struct CgbChannel *cgbChans);
void m4aSoundMode(u32 mode); void m4aSoundMode(u32 mode);
void MPlayOpen(struct MusicPlayerInfo *mplayInfo, struct MusicPlayerTrack *track, u8 a3); void MPlayOpen(struct MusicPlayerInfo *mplayInfo, struct MusicPlayerTrack *tracks, u8 trackCount);
void CgbSound(void); void CgbSound(void);
void CgbOscOff(u8); void CgbOscOff(u8);
void CgbModVol(struct CgbChannel *chan); void CgbModVol(struct CgbChannel *chan);

View File

@ -136,6 +136,10 @@
#define NUM_FLAG_BYTES ROUND_BITS_TO_BYTES(FLAGS_COUNT) #define NUM_FLAG_BYTES ROUND_BITS_TO_BYTES(FLAGS_COUNT)
#define NUM_ADDITIONAL_PHRASE_BYTES ROUND_BITS_TO_BYTES(NUM_ADDITIONAL_PHRASES) #define NUM_ADDITIONAL_PHRASE_BYTES ROUND_BITS_TO_BYTES(NUM_ADDITIONAL_PHRASES)
// This produces an error at compile-time if expr is zero.
// It looks like file.c:line: size of array `id' is negative
#define STATIC_ASSERT(expr, id) typedef char id[(expr) ? 1 : -1];
struct Coords8 struct Coords8
{ {
s8 x; s8 x;
@ -406,7 +410,7 @@ struct BattleFrontier
/*0xE1A*/ u16 pyramidWinStreaks[FRONTIER_LVL_MODE_COUNT]; /*0xE1A*/ u16 pyramidWinStreaks[FRONTIER_LVL_MODE_COUNT];
/*0xE1E*/ u16 pyramidRecordStreaks[FRONTIER_LVL_MODE_COUNT]; /*0xE1E*/ u16 pyramidRecordStreaks[FRONTIER_LVL_MODE_COUNT];
/*0xE22*/ u16 pyramidRandoms[4]; /*0xE22*/ u16 pyramidRandoms[4];
/*0xE2A*/ u8 pyramidTrainerFlags; /*0xE2A*/ u8 pyramidTrainerFlags; // 1 bit for each trainer (MAX_PYRAMID_TRAINERS)
/*0xE2C*/ struct PyramidBag pyramidBag; /*0xE2C*/ struct PyramidBag pyramidBag;
/*0xE68*/ u8 pyramidLightRadius; /*0xE68*/ u8 pyramidLightRadius;
/*0xE6A*/ u16 verdanturfTentPrize; /*0xE6A*/ u16 verdanturfTentPrize;

View File

@ -33,11 +33,11 @@ extern const struct CompressedSpriteSheet gSpriteSheet_CreditsRivalBrendan[];
extern const struct CompressedSpriteSheet gSpriteSheet_CreditsRivalMay[]; extern const struct CompressedSpriteSheet gSpriteSheet_CreditsRivalMay[];
extern const struct SpritePalette gSpritePalettes_Credits[]; extern const struct SpritePalette gSpritePalettes_Credits[];
void LoadIntroPart2Graphics(u8 scene); void LoadIntroPart2Graphics(u8 scenery);
void SetIntroPart2BgCnt(u8 a); void SetIntroPart2BgCnt(u8 scenery);
void LoadCreditsSceneGraphics(u8); void LoadCreditsSceneGraphics(u8);
void SetCreditsSceneBgCnt(u8); void SetCreditsSceneBgCnt(u8);
u8 CreateBicycleBgAnimationTask(u8 a, u16 b, u16 c, u16 d); u8 CreateBicycleBgAnimationTask(u8 mode, u16 bg1Speed, u16 bg2Speed, u16 bg3Speed);
void CycleSceneryPalette(u8); void CycleSceneryPalette(u8);
u8 CreateIntroBrendanSprite(s16 x, s16 y); u8 CreateIntroBrendanSprite(s16 x, s16 y);
u8 CreateIntroMaySprite(s16 x, s16 y); u8 CreateIntroMaySprite(s16 x, s16 y);

View File

@ -300,7 +300,7 @@ void LocalLinkPlayerToBlock(void);
void LinkPlayerFromBlock(u32 who); void LinkPlayerFromBlock(u32 who);
bool32 Link_AnyPartnersPlayingFRLG_JP(void); bool32 Link_AnyPartnersPlayingFRLG_JP(void);
void ResetLinkPlayerCount(void); void ResetLinkPlayerCount(void);
void SaveLinkPlayers(u8 a0); void SaveLinkPlayers(u8 playerCount);
void SetWirelessCommType0(void); void SetWirelessCommType0(void);
bool32 IsLinkRecvQueueAtOverworldMax(void); bool32 IsLinkRecvQueueAtOverworldMax(void);

View File

@ -98,9 +98,9 @@ struct CursorStruct
extern struct ScrollArrowsTemplate gTempScrollArrowTemplate; extern struct ScrollArrowsTemplate gTempScrollArrowTemplate;
extern struct ListMenuTemplate gMultiuseListMenuTemplate; extern struct ListMenuTemplate gMultiuseListMenuTemplate;
s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum); s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 drawMode, u16 tileNum, u16 palNum);
u8 ListMenuInit(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 selectedRow); u8 ListMenuInit(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 selectedRow);
u8 ListMenuInitInRect(struct ListMenuTemplate *listMenuTemplate, struct ListMenuWindowRect *arg1, u16 scrollOffset, u16 selectedRow); u8 ListMenuInitInRect(struct ListMenuTemplate *listMenuTemplate, struct ListMenuWindowRect *rect, u16 scrollOffset, u16 selectedRow);
s32 ListMenu_ProcessInput(u8 listTaskId); s32 ListMenu_ProcessInput(u8 listTaskId);
void DestroyListMenuTask(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow); void DestroyListMenuTask(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow);
void RedrawListMenu(u8 listTaskId); void RedrawListMenu(u8 listTaskId);
@ -111,10 +111,10 @@ void ListMenuGetCurrentItemArrayId(u8 listTaskId, u16 *arrayId);
void ListMenuGetScrollAndRow(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow); void ListMenuGetScrollAndRow(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow);
u16 ListMenuGetYCoordForPrintingArrowCursor(u8 listTaskId); u16 ListMenuGetYCoordForPrintingArrowCursor(u8 listTaskId);
void ListMenuOverrideSetColors(u8 cursorPal, u8 fillValue, u8 cursorShadowPal); void ListMenuOverrideSetColors(u8 cursorPal, u8 fillValue, u8 cursorShadowPal);
void ListMenuDefaultCursorMoveFunc(s32 arg0, u8 arg1, struct ListMenu *list); void ListMenuDefaultCursorMoveFunc(s32 itemIndex, u8 onInit, struct ListMenu *list);
s32 ListMenuGetUnkIndicatorsStructFields(u8 taskId, u8 field); s32 ListMenuGetUnkIndicatorsStructFields(u8 taskId, u8 field);
void ListMenuSetUnkIndicatorsStructField(u8 taskId, u8 field, s32 value); void ListMenuSetUnkIndicatorsStructField(u8 taskId, u8 field, s32 value);
u8 AddScrollIndicatorArrowPair(const struct ScrollArrowsTemplate *arrowInfo, u16 *arg1); u8 AddScrollIndicatorArrowPair(const struct ScrollArrowsTemplate *arrowInfo, u16 *scrollOffset);
u8 AddScrollIndicatorArrowPairParameterized(u32 arrowType, s32 commonPos, s32 firstPos, s32 secondPos, s32 fullyDownThreshold, s32 tileTag, s32 palTag, u16 *currItemPtr); u8 AddScrollIndicatorArrowPairParameterized(u32 arrowType, s32 commonPos, s32 firstPos, s32 secondPos, s32 fullyDownThreshold, s32 tileTag, s32 palTag, u16 *currItemPtr);
void RemoveScrollIndicatorArrowPair(u8 taskId); void RemoveScrollIndicatorArrowPair(u8 taskId);
void Task_ScrollIndicatorArrowPairOnMainMenu(u8 taskId); void Task_ScrollIndicatorArrowPairOnMainMenu(u8 taskId);

View File

@ -2,6 +2,6 @@
#define GUARD_MAIN_MENU_H #define GUARD_MAIN_MENU_H
void CB2_InitMainMenu(void); void CB2_InitMainMenu(void);
void CreateYesNoMenuParameterized(u8 a, u8 b, u16 c, u16 d, u8 e, u8 f); void CreateYesNoMenuParameterized(u8 x, u8 y, u16 baseTileNum, u16 baseBlock, u8 yesNoPalNum, u8 winPalNum);
#endif // GUARD_MAIN_MENU_H #endif // GUARD_MAIN_MENU_H

View File

@ -7,8 +7,8 @@ void SetMauvilleOldMan(void);
u8 GetCurrentMauvilleOldMan(void); u8 GetCurrentMauvilleOldMan(void);
void SetMauvilleOldManObjEventGfx(void); void SetMauvilleOldManObjEventGfx(void);
void SanitizeMauvilleOldManForRuby(OldMan *dest); void SanitizeMauvilleOldManForRuby(OldMan *dest);
void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 r1, u32 r6); void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language);
void SanitizeReceivedEmeraldOldMan(union OldMan * oldMan, u32 unused, u32 a2); void SanitizeReceivedEmeraldOldMan(union OldMan * oldMan, u32 version, u32 language);
void ResetMauvilleOldManFlag(void); void ResetMauvilleOldManFlag(void);
#endif // GUARD_MAUVILLE_OLD_MAN_H #endif // GUARD_MAUVILLE_OLD_MAN_H

View File

@ -56,9 +56,9 @@ void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram);
void DisplayYesNoMenuDefaultYes(void); void DisplayYesNoMenuDefaultYes(void);
u32 GetPlayerTextSpeed(void); u32 GetPlayerTextSpeed(void);
u8 GetPlayerTextSpeedDelay(void); u8 GetPlayerTextSpeedDelay(void);
void Menu_LoadStdPalAt(u16 arg0); void Menu_LoadStdPalAt(u16 offset);
void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextPrinterTemplate *, u16)); void AddTextPrinterWithCallbackForMessage(bool8 canSpeedUp, void (*callback)(struct TextPrinterTemplate *, u16));
void BgDmaFill(u32 bg, u8 a1, int a2, int a3); void BgDmaFill(u32 bg, u8 value, int offset, int size);
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str); void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str);
void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram); void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock); void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);
@ -69,7 +69,7 @@ u8 InitMenuInUpperLeftCornerNormal(u8 windowId, u8 numItems, u8 initialCursorPos
u8 Menu_GetCursorPos(void); u8 Menu_GetCursorPos(void);
s8 Menu_ProcessInput(void); s8 Menu_ProcessInput(void);
s8 Menu_ProcessInputNoWrap(void); s8 Menu_ProcessInputNoWrap(void);
void BlitMenuInfoIcon(u8 winId, u8 a2, u16 x, u16 y); void BlitMenuInfoIcon(u8 windowId, u8 iconId, u16 x, u16 y);
void ResetTempTileDataBuffers(void); void ResetTempTileDataBuffers(void);
void *DecompressAndCopyTileDataToVram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode); void *DecompressAndCopyTileDataToVram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
bool8 FreeTempTileDataBuffersIfPossible(void); bool8 FreeTempTileDataBuffersIfPossible(void);
@ -81,14 +81,14 @@ s8 ProcessMenuInput_other(void);
void DoScheduledBgTilemapCopiesToVram(void); void DoScheduledBgTilemapCopiesToVram(void);
void ClearScheduledBgCopiesToVram(void); void ClearScheduledBgCopiesToVram(void);
void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str); void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str);
void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 a2, u8 a3); void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 tileNum, u8 paletteNum);
void PrintMenuActionTextsInUpperLeftCorner(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds); void PrintMenuActionTextsInUpperLeftCorner(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds);
void ClearDialogWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram); void ClearDialogWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
void *malloc_and_decompress(const void *src, u32 *sizeOut); void *malloc_and_decompress(const void *src, u32 *sizeOut);
u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode); u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode);
void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress); void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress);
void PrintMenuActionTexts(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineHeight, u8 itemCount, const struct MenuAction *strs, const u8 *a8); void PrintMenuActionTexts(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds);
void PrintMenuActionGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 itemCount, u8 itemCount2, const struct MenuAction *strs, const u8 *a8); void PrintMenuActionGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth, u8 horizontalCount, u8 verticalCount, const struct MenuAction *menuActions, const u8 *actionIds);
u8 InitMenuActionGrid(u8 windowId, u8 optionWidth, u8 columns, u8 rows, u8 initialCursorPos); u8 InitMenuActionGrid(u8 windowId, u8 optionWidth, u8 columns, u8 rows, u8 initialCursorPos);
u8 ChangeMenuGridCursorPosition(s8 deltaX, s8 deltaY); u8 ChangeMenuGridCursorPosition(s8 deltaX, s8 deltaY);
u8 GetStartMenuWindowId(void); u8 GetStartMenuWindowId(void);

View File

@ -18,11 +18,11 @@ struct YesNoFuncTable
void ResetVramOamAndBgCntRegs(void); void ResetVramOamAndBgCntRegs(void);
void ResetAllBgsCoordinates(void); void ResetAllBgsCoordinates(void);
void SetVBlankHBlankCallbacksToNull(void); void SetVBlankHBlankCallbacksToNull(void);
void DisplayMessageAndContinueTask(u8 taskId, u8 windowId, u16 arg2, u8 arg3, u8 fontId, u8 textSpeed, const u8 *string, void *taskFunc); void DisplayMessageAndContinueTask(u8 taskId, u8 windowId, u16 tileNum, u8 paletteNum, u8 fontId, u8 textSpeed, const u8 *string, void *taskFunc);
bool16 RunTextPrintersRetIsActive(u8 textPrinterId); bool16 RunTextPrintersRetIsActive(u8 textPrinterId);
void DoYesNoFuncWithChoice(u8 taskId, const struct YesNoFuncTable *data); void DoYesNoFuncWithChoice(u8 taskId, const struct YesNoFuncTable *data);
void CreateYesNoMenuWithCallbacks(u8 taskId, const struct WindowTemplate *template, u8 arg2, u8 arg3, u8 arg4, u16 tileStart, u8 palette, const struct YesNoFuncTable *yesNo); void CreateYesNoMenuWithCallbacks(u8 taskId, const struct WindowTemplate *template, u8 unused1, u8 unused2, u8 unused3, u16 tileStart, u8 palette, const struct YesNoFuncTable *yesNo);
bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1); bool8 AdjustQuantityAccordingToDPadInput(s16 *quantity, u16 max);
u8 GetLRKeysPressed(void); u8 GetLRKeysPressed(void);
u8 GetLRKeysPressedAndHeld(void); u8 GetLRKeysPressedAndHeld(void);
bool8 IsHoldingItemAllowed(u16 itemId); bool8 IsHoldingItemAllowed(u16 itemId);

View File

@ -95,7 +95,7 @@ void ConditionGraph_Draw(struct ConditionGraph *graph);
bool8 ConditionGraph_TryUpdate(struct ConditionGraph *graph); bool8 ConditionGraph_TryUpdate(struct ConditionGraph *graph);
void ConditionGraph_Update(struct ConditionGraph *graph); void ConditionGraph_Update(struct ConditionGraph *graph);
void ConditionGraph_CalcPositions(u8 *conditions, struct UCoords16 *positions); void ConditionGraph_CalcPositions(u8 *conditions, struct UCoords16 *positions);
void ConditionGraph_SetNewPositions(struct ConditionGraph *graph, struct UCoords16 *arg1, struct UCoords16 *arg2); void ConditionGraph_SetNewPositions(struct ConditionGraph *graph, struct UCoords16 *old, struct UCoords16 *new);
// Condition menu // Condition menu
bool8 ConditionMenu_UpdateMonEnter(struct ConditionGraph *graph, s16 *x); bool8 ConditionMenu_UpdateMonEnter(struct ConditionGraph *graph, s16 *x);

View File

@ -77,7 +77,7 @@ void SetWarpDestinationToMapWarp(s8 mapGroup, s8 mapNum, s8 warpId);
void SetDynamicWarp(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId); void SetDynamicWarp(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId);
void SetDynamicWarpWithCoords(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void SetDynamicWarpWithCoords(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void SetWarpDestinationToDynamicWarp(u8 unused); void SetWarpDestinationToDynamicWarp(u8 unused);
void SetWarpDestinationToHealLocation(u8 a1); void SetWarpDestinationToHealLocation(u8 healLocationId);
void SetWarpDestinationToLastHealLocation(void); void SetWarpDestinationToLastHealLocation(void);
void SetLastHealLocationWarp(u8 healLocationId); void SetLastHealLocationWarp(u8 healLocationId);
void UpdateEscapeWarp(s16 x, s16 y); void UpdateEscapeWarp(s16 x, s16 y);
@ -86,7 +86,7 @@ void SetWarpDestinationToEscapeWarp(void);
void SetFixedDiveWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void SetFixedDiveWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void SetFixedHoleWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void SetFixedHoleWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void SetWarpDestinationToFixedHoleWarp(s16 x, s16 y); void SetWarpDestinationToFixedHoleWarp(s16 x, s16 y);
void SetContinueGameWarpToHealLocation(u8 a1); void SetContinueGameWarpToHealLocation(u8 healLocationId);
void SetContinueGameWarpToDynamicWarp(int unused); void SetContinueGameWarpToDynamicWarp(int unused);
const struct MapConnection *GetMapConnection(u8 dir); const struct MapConnection *GetMapConnection(u8 dir);
bool8 SetDiveWarpEmerge(u16 x, u16 y); bool8 SetDiveWarpEmerge(u16 x, u16 y);
@ -130,7 +130,7 @@ void CB1_Overworld(void);
void CB2_OverworldBasic(void); void CB2_OverworldBasic(void);
void CB2_Overworld(void); void CB2_Overworld(void);
void SetMainCallback1(void (*cb)(void)); void SetMainCallback1(void (*cb)(void));
void SetUnusedCallback(void *a0); void SetUnusedCallback(void *func);
void CB2_NewGame(void); void CB2_NewGame(void);
void CB2_WhiteOut(void); void CB2_WhiteOut(void);
void CB2_LoadMap(void); void CB2_LoadMap(void);

View File

@ -49,8 +49,8 @@ extern const struct SpriteTemplate gBallSpriteTemplates[];
#define POKEBALL_OPPONENT_SENDOUT 0xFE #define POKEBALL_OPPONENT_SENDOUT 0xFE
u8 DoPokeballSendOutAnimation(s16 pan, u8 kindOfThrow); u8 DoPokeballSendOutAnimation(s16 pan, u8 kindOfThrow);
void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 battler, u8 x, u8 y, u8 oamPriority, u8 subpriortiy, u8 g, u32 h, u16 species); void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 monPalNum, u8 x, u8 y, u8 oamPriority, u8 subpriortiy, u8 delay, u32 fadePalettes, u16 species);
u8 CreateTradePokeballSprite(u8 a, u8 b, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 g, u32 h); u8 CreateTradePokeballSprite(u8 monSpriteId, u8 monPalNum, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 delay, u32 fadePalettes);
void StartHealthboxSlideIn(u8 battler); void StartHealthboxSlideIn(u8 battler);
void DoHitAnimHealthboxEffect(u8 battler); void DoHitAnimHealthboxEffect(u8 battler);
void LoadBallGfx(u8 ballId); void LoadBallGfx(u8 ballId);

Some files were not shown because too many files have changed in this diff Show More