Merge branch 'master' of https://github.com/pret/pokeemerald into decompile_pokedex

This commit is contained in:
golem galvanize
2018-03-30 16:49:08 -04:00
223 changed files with 24430 additions and 43349 deletions

View File

@@ -3,9 +3,9 @@
// should they be included here or included individually by every file?
#include "constants/battle.h"
#include "battle_main.h"
#include "battle_util.h"
#include "battle_script_commands.h"
#include "battle_main.h"
#include "battle_ai_switch_items.h"
#include "battle_gfx_sfx_util.h"
#include "battle_util2.h"
@@ -66,29 +66,14 @@
#define MSG_DISPLAY 0x7
#define BATTLE_COMMUNICATION_ENTRIES_COUNT 0x8
#define MOVE_TARGET_SELECTED 0x0
#define MOVE_TARGET_DEPENDS 0x1
#define MOVE_TARGET_USER 0x2
#define MOVE_TARGET_RANDOM 0x4
#define MOVE_TARGET_x10 0x10
#define MOVE_TARGET_BOTH 0x8
#define MOVE_TARGET_FOES_AND_ALLY 0x20
#define MOVE_TARGET_OPPONENTS_FIELD 0x40
// defines for the u8 array gTypeEffectiveness
#define TYPE_EFFECT_ATK_TYPE(i)((gTypeEffectiveness[i + 0]))
#define TYPE_EFFECT_DEF_TYPE(i)((gTypeEffectiveness[i + 1]))
#define TYPE_EFFECT_MULTIPLIER(i)((gTypeEffectiveness[i + 2]))
// defines for the gTypeEffectiveness multipliers
#define TYPE_MUL_NO_EFFECT 0
#define TYPE_MUL_NOT_EFFECTIVE 5
#define TYPE_MUL_NORMAL 10
#define TYPE_MUL_SUPER_EFFECTIVE 20
// special type table Ids
#define TYPE_FORESIGHT 0xFE
#define TYPE_ENDTABLE 0xFF
#define MOVE_TARGET_SELECTED 0x0
#define MOVE_TARGET_DEPENDS 0x1
#define MOVE_TARGET_USER_OR_SELECTED 0x2
#define MOVE_TARGET_RANDOM 0x4
#define MOVE_TARGET_BOTH 0x8
#define MOVE_TARGET_USER 0x10
#define MOVE_TARGET_FOES_AND_ALLY 0x20
#define MOVE_TARGET_OPPONENTS_FIELD 0x40
#define BATTLE_BUFFER_LINK_SIZE 0x1000
@@ -368,6 +353,91 @@ struct BattleResults
u8 catchAttempts[11]; // 0x36
};
struct BattleTv_Side
{
u32 spikesMonId:3;
u32 reflectMonId:3;
u32 lightScreenMonId:3;
u32 safeguardMonId:3;
u32 mistMonId:3;
u32 futureSightMonId:3;
u32 doomDesireMonId:3;
u32 perishSongMonId:3;
u32 wishMonId:3;
u32 grudgeMonId:3;
u32 usedMoveSlot:2;
u32 spikesMoveSlot:2;
u32 reflectMoveSlot:2;
u32 lightScreenMoveSlot:2;
u32 safeguardMoveSlot:2;
u32 mistMoveSlot:2;
u32 futureSightMoveSlot:2;
u32 doomDesireMoveSlot:2;
u32 perishSongMoveSlot:2;
u32 wishMoveSlot:2;
u32 grudgeMoveSlot:2;
u32 destinyBondMonId:3;
u32 destinyBondMoveSlot:2;
u32 faintCause:4;
u32 faintCauseMonId:3;
u32 explosion:1;
u32 explosionMoveSlot:2;
u32 explosionMonId:3;
u32 perishSong:1;
};
struct BattleTv_Position
{
u32 curseMonId:3;
u32 leechSeedMonId:3;
u32 nightmareMonId:3;
u32 wrapMonId:3;
u32 attractMonId:3;
u32 confusionMonId:3;
u32 curseMoveSlot:2;
u32 leechSeedMoveSlot:2;
u32 nightmareMoveSlot:2;
u32 wrapMoveSlot:2;
u32 attractMoveSlot:2;
u32 confusionMoveSlot:2;
u32 waterSportMoveSlot:2;
u32 waterSportMonId:3;
u32 mudSportMonId:3;
u32 mudSportMoveSlot:2;
u32 ingrainMonId:3;
u32 ingrainMoveSlot:2;
u32 attackedByMonId:3;
u32 attackedByMoveSlot:2;
};
struct BattleTv_Mon
{
u32 psnMonId:3;
u32 badPsnMonId:3;
u32 brnMonId:3;
u32 prlzMonId:3;
u32 slpMonId:3;
u32 frzMonId:3;
u32 psnMoveSlot:2;
u32 badPsnMoveSlot:2;
u32 brnMoveSlot:2;
u32 prlzMoveSlot:2;
u32 slpMoveSlot:2;
u32 frzMoveSlot:2;
};
struct BattleTv
{
struct BattleTv_Mon mon[2][6]; // [side][partyId]
struct BattleTv_Position pos[2][2]; // [side][flank]
struct BattleTv_Side side[2]; // [side]
};
struct BattleTvMovePoints
{
s16 points[2][PARTY_SIZE * 4];
};
struct BattleStruct
{
u8 turnEffectsTracker;
@@ -447,7 +517,7 @@ struct BattleStruct
u8 field_B0;
u8 hpScale;
u8 synchronizeMoveEffect;
u8 field_B3;
bool8 anyMonHasTransformed;
void (*savedCallback)(void);
u16 usedHeldItems[MAX_BATTLERS_COUNT];
u8 chosenItem[4]; // why is this an u8?
@@ -472,9 +542,9 @@ struct BattleStruct
u8 wishPerishSongBattlerId;
bool8 overworldWeatherDone;
u8 atkCancellerTracker;
u8 field_1A4[96];
u8 field_204[104];
u8 field_26C[40];
struct BattleTvMovePoints tvMovePoints;
struct BattleTv tv;
u8 notSureWhatFieldLol[0x28];
u8 AI_monToSwitchIntoId[MAX_BATTLERS_COUNT];
u8 field_298[8];
u8 field_2A0;
@@ -493,6 +563,15 @@ struct BattleStruct
#define IS_MOVE_PHYSICAL(moveType)(moveType < TYPE_MYSTERY)
#define IS_MOVE_SPECIAL(moveType)(moveType > TYPE_MYSTERY)
#define TARGET_TURN_DAMAGED ((gSpecialStatuses[gBattlerTarget].physicalDmg != 0 || gSpecialStatuses[gBattlerTarget].specialDmg != 0))
#define IS_BATTLER_OF_TYPE(battlerId, type)((gBattleMons[battlerId].type1 == type || gBattleMons[battlerId].type2 == type))
#define SET_BATTLER_TYPE(battlerId, type) \
{ \
gBattleMons[battlerId].type1 = type; \
gBattleMons[battlerId].type2 = type; \
}
#define GET_STAT_BUFF_ID(n)((n & 0xF)) // first four bits 0x1, 0x2, 0x4, 0x8
#define GET_STAT_BUFF_VALUE(n)(((n >> 4) & 7)) // 0x10, 0x20, 0x40
#define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit

View File

@@ -2,6 +2,7 @@
#define GUARD_BATTLE_FRONTIER_1_H
bool32 sub_8196094(void);
void sub_8197080(u8 *);
void sub_8196080(const u8 *str);
#endif // GUARD_BATTLE_FRONTIER_1_H

View File

@@ -1,11 +0,0 @@
#ifndef GUARD_BATTLE_LINK_817C95C_H
#define GUARD_BATTLE_LINK_817C95C_H
void sub_817C95C(u16 stringId);
void sub_817E0FC(u16 move, u16 weatherFlags, struct DisableStruct *disableStructPtr);
void sub_817E32C(u8 animationId);
void sub_817E3F4(void);
void sub_817F2A8(void);
u8 GetBattlerMoveSlotId(u8 bank, u16 move);
#endif // GUARD_BATTLE_LINK_817C95C_H

View File

@@ -1,6 +1,30 @@
#ifndef GUARD_BATTLE_MAIN_H
#define GUARD_BATTLE_MAIN_H
struct TrainerMoney
{
u8 classId;
u8 value;
};
#define TYPE_NAME_LENGTH 6
#define ABILITY_NAME_LENGTH 12
// defines for the u8 array gTypeEffectiveness
#define TYPE_EFFECT_ATK_TYPE(i)((gTypeEffectiveness[i + 0]))
#define TYPE_EFFECT_DEF_TYPE(i)((gTypeEffectiveness[i + 1]))
#define TYPE_EFFECT_MULTIPLIER(i)((gTypeEffectiveness[i + 2]))
// defines for the gTypeEffectiveness multipliers
#define TYPE_MUL_NO_EFFECT 0
#define TYPE_MUL_NOT_EFFECTIVE 5
#define TYPE_MUL_NORMAL 10
#define TYPE_MUL_SUPER_EFFECTIVE 20
// special type table Ids
#define TYPE_FORESIGHT 0xFE
#define TYPE_ENDTABLE 0xFF
void CB2_InitBattle(void);
void BattleMainCB2(void);
void CB2_QuitRecordedBattle(void);
@@ -42,6 +66,12 @@ void RunBattleScriptCommands_PopCallbacksStack(void);
void RunBattleScriptCommands(void);
bool8 TryRunFromBattle(u8 battlerId);
extern const u8 gTypeEffectiveness[336];
extern const u8 gTypeNames[][TYPE_NAME_LENGTH + 1];
extern const struct TrainerMoney gTrainerMoneyTable[];
extern const u8 gAbilityNames[][ABILITY_NAME_LENGTH + 1];
extern const u8 *const gAbilityDescriptionPointers[];
extern const u8 gStatusConditionString_PoisonJpn[8];
extern const u8 gStatusConditionString_SleepJpn[8];
extern const u8 gStatusConditionString_ParalysisJpn[8];

View File

@@ -229,13 +229,62 @@ extern const u8* const gPokeblockWasTooXStringTable[];
extern const u8* const gRefereeStringsTable[];
extern const u8* const gStatNamesTable2[];
extern const u8 gText_PkmnIsEvolving[];
extern const u8 gText_CongratsPkmnEvolved[];
extern const u8 gText_PkmnStoppedEvolving[];
extern const u8 gText_EllipsisQuestionMark[];
extern const u8 gText_WhatWillPkmnDo[];
extern const u8 gText_WhatWillPkmnDo2[];
extern const u8 gText_WhatWillWallyDo[];
extern const u8 gText_LinkStandby[];
extern const u8 gText_BattleMenu[];
extern const u8 gText_SafariZoneMenu[];
extern const u8 gText_MoveInterfacePP[];
extern const u8 gText_MoveInterfaceType[];
extern const u8 gText_MoveInterfacePpType[];
extern const u8 gText_MoveInterfaceDynamicColors[];
extern const u8 gText_WhichMoveToForget4[];
extern const u8 gText_BattleYesNoChoice[];
extern const u8 gText_BattleSwitchWhich[];
extern const u8 gText_BattleSwitchWhich2[];
extern const u8 gText_BattleSwitchWhich3[];
extern const u8 gText_BattleSwitchWhich4[];
extern const u8 gText_BattleSwitchWhich5[];
extern const u8 gText_SafariBalls[];
extern const u8 gText_SafariBallLeft[];
extern const u8 gText_SpaceAndSpace[];
extern const u8 gText_CommaSpace[];
extern const u8 gText_Space2[];
extern const u8 gText_ScrollTextUp[];
extern const u8 gText_NewLine[];
extern const u8 gText_Are[];
extern const u8 gText_Are2[];
extern const u8 gText_BadEgg[];
extern const u8 gText_BattleWallyName[];
extern const u8 gText_Win[];
extern const u8 gText_Loss[];
extern const u8 gText_Draw[];
extern const u8 gText_StatRose[];
extern const u8 gText_PkmnsStatChanged2[];
extern const u8 gText_PkmnGettingPumped[];
extern const u8 gText_PkmnShroudedInMist[];
extern const u8 gText_BattleWallyName[];
extern const u8 gText_PkmnsXPreventsSwitching[];
extern const u8 gText_TheGreatNewHope[];
extern const u8 gText_WillChampinshipDreamComeTrue[];
extern const u8 gText_AFormerChampion[];
extern const u8 gText_ThePreviousChampion[];
extern const u8 gText_TheUnbeatenChampion[];
extern const u8 gText_PlayerMon1Name[];
extern const u8 gText_Vs[];
extern const u8 gText_OpponentMon1Name[];
extern const u8 gText_Mind[];
extern const u8 gText_Skill[];
extern const u8 gText_Body[];
extern const u8 gText_Judgement[];
extern const u8 gText_EmptyString3[];
extern const u8 gText_RecordBattleToPass[];
extern const u8 gText_BattleRecordedOnPass[];
extern const u8 gText_BattleTourney[];
extern const u16 gMissStringIds[];
extern const u16 gTrappingMoves[];

View File

@@ -4,16 +4,16 @@
#define WINDOW_CLEAR 0x1
#define WINDOW_x80 0x80
void AI_CalcDmg(u8 bankAtk, u8 bankDef);
u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef);
void AI_CalcDmg(u8 battlerIdAtk, u8 battlerIdDef);
u8 TypeCalc(u16 move, u8 battlerIdAtk, u8 battlerIdDef);
u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility);
u8 GetBattlerTurnOrderNum(u8 bank);
u8 GetBattlerTurnOrderNum(u8 battlerId);
void SetMoveEffect(bool8 primary, u8 certain);
void BattleDestroyYesNoCursorAt(u8 cursorPosition);
void BattleCreateYesNoCursorAt(u8 cursorPosition);
void BufferMoveToLearnIntoBattleTextBuff2(void);
void HandleBattleWindow(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags);
bool8 UproarWakeUpCheck(u8 bank);
bool8 UproarWakeUpCheck(u8 battlerId);
extern void (* const gBattleScriptingCommandsTable[])(void);
extern const u8 gUnknown_0831C494[][4];

11
include/battle_tv.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef GUARD_BATTLE_TV_H
#define GUARD_BATTLE_TV_H
void BattleTv_SetDataBasedOnString(u16 stringId);
void BattleTv_SetDataBasedOnMove(u16 move, u16 weatherFlags, struct DisableStruct *disableStructPtr);
void BattleTv_SetDataBasedOnAnimation(u8 animationId);
void TryPutLinkBattleTvShowOnAir(void);
void BattleTv_ClearExplosionFaintCause(void);
u8 GetBattlerMoveSlotId(u8 battlerId, u16 moveId);
#endif // GUARD_BATTLE_TV_H

View File

@@ -49,36 +49,36 @@ void PressurePPLose(u8 bankDef, u8 bankAtk, u16 move);
void PressurePPLoseOnUsingPerishSong(u8 bankAtk);
void PressurePPLoseOnUsingImprision(u8 bankAtk);
void MarkAllBattlersForControllerExec(void); // unused
void MarkBattlerForControllerExec(u8 bank);
void MarkBattlerForControllerExec(u8 battlerId);
void sub_803F850(u8 arg0);
void CancelMultiTurnMoves(u8 bank);
bool8 WasUnableToUseMove(u8 bank);
void PrepareStringBattle(u16 stringId, u8 bank);
void CancelMultiTurnMoves(u8 battlerId);
bool8 WasUnableToUseMove(u8 battlerId);
void PrepareStringBattle(u16 stringId, u8 battlerId);
void ResetSentPokesToOpponentValue(void);
void sub_803F9EC(u8 bank);
void sub_803FA70(u8 bank);
void sub_803F9EC(u8 battlerId);
void sub_803FA70(u8 battlerId);
void BattleScriptPush(const u8* bsPtr);
void BattleScriptPushCursor(void);
void BattleScriptPop(void);
u8 TrySetCantSelectMoveBattleScript(void);
u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check);
u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check);
bool8 AreAllMovesUnusable(void);
u8 GetImprisonedMovesCount(u8 bank, u16 move);
u8 GetImprisonedMovesCount(u8 battlerId, u16 move);
u8 UpdateTurnCounters(void);
u8 TurnBasedEffects(void);
bool8 HandleWishPerishSongOnTurnEnd(void);
bool8 HandleFaintedMonActions(void);
void TryClearRageStatuses(void);
u8 AtkCanceller_UnableToUseMove(void);
bool8 sub_80423F4(u8 bank, u8 r1, u8 r2);
u8 CastformDataTypeChange(u8 bank);
u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg);
bool8 sub_80423F4(u8 battlerId, u8 r1, u8 r2);
u8 CastformDataTypeChange(u8 battlerId);
u8 AbilityBattleEffects(u8 caseID, u8 battlerId, u8 ability, u8 special, u16 moveArg);
void BattleScriptExecute(const u8* BS_ptr);
void BattleScriptPushCursorAndCallback(const u8* BS_ptr);
u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn);
void ClearFuryCutterDestinyBondGrudge(u8 bank);
u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn);
void ClearFuryCutterDestinyBondGrudge(u8 battlerId);
void HandleAction_RunBattleScript(void);
u8 GetMoveTarget(u16 move, u8 useMoveTarget);
u8 GetMoveTarget(u16 move, u8 setTarget);
u8 IsMonDisobedient(void);
#endif // GUARD_BATTLE_UTIL_H

10
include/blit.h Normal file
View File

@@ -0,0 +1,10 @@
#ifndef GUARD_BLIT_H
#define GUARD_BLIT_H
void BlitBitmapRect4BitWithoutColorKey(struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height);
void BlitBitmapRect4Bit(struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey);
void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue);
void BlitBitmapRect4BitTo8Bit(struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey, u8 paletteOffset);
void FillBitmapRect8Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue);
#endif // GUARD_BLIT_H

View File

@@ -0,0 +1,7 @@
#ifndef GUARD_BRAILLE_PUZZLES_H
#define GUARD_BRAILLE_PUZZLES_H
bool8 ShouldDoBrailleFlyEffect(void);
void sub_8179918(void);
#endif // GUARD_BRAILLE_PUZZLES_H

View File

@@ -5,4 +5,4 @@
void DoTimeBasedEvents(void);
#endif
#endif // GUARD_CLOCK_H

View File

@@ -151,7 +151,7 @@
#define EFFECT_EARTHQUAKE 147
#define EFFECT_FUTURE_SIGHT 148
#define EFFECT_GUST 149
#define EFFECT_FLINCH_HIT_2 150 // STOMP ASTONISH EXTRASENSORY NEEDLE_ARM
#define EFFECT_FLINCH_MINIMIZE_HIT 150 // STOMP ASTONISH EXTRASENSORY NEEDLE_ARM
#define EFFECT_SOLARBEAM 151
#define EFFECT_THUNDER 152
#define EFFECT_TELEPORT 153

View File

@@ -92,6 +92,6 @@
#define ATK48_STAT_NEGATIVE 0x1
#define ATK48_STAT_BY_TWO 0x2
#define ATK48_BIT_x4 0x4
#define ATK48_LOWER_FAIL_CHECK 0x8
#define ATK48_DONT_CHECK_LOWER 0x8
#endif // GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H

View File

@@ -91,7 +91,7 @@
#define FLAG_0x058 0x58
#define FLAG_0x059 0x59
#define FLAG_0x05A 0x5A
#define FLAG_0x05B 0x5B
#define FLAG_WATTSON_REMATCH_AVAILABLE 0x5B
#define FLAG_0x05C 0x5C
#define FLAG_0x05D 0x5D
#define FLAG_0x05E 0x5E
@@ -208,8 +208,8 @@
#define FLAG_0x0CD 0xCD
#define FLAG_0x0CE 0xCE
#define FLAG_0x0CF 0xCF
#define FLAG_0x0D0 0xD0
#define FLAG_0x0D1 0xD1
#define FLAG_GOT_BASEMENT_KEY_FROM_WATTSON 0xD0
#define FLAG_GOT_TM24_FROM_WATTSON 0xD1
#define FLAG_0x0D2 0xD2
#define FLAG_0x0D3 0xD3
#define FLAG_0x0D4 0xD4
@@ -348,6 +348,7 @@
#define FLAG_0x159 0x159
#define FLAG_0x15A 0x15A
#define FLAG_0x15B 0x15B
#define FLAG_MATCH_CALL_REGISTERED 0x15C
#define FLAG_0x15D 0x15D
#define FLAG_0x15E 0x15E
@@ -912,8 +913,8 @@
#define FLAG_0x38D 0x38D
#define FLAG_0x38E 0x38E
#define FLAG_0x38F 0x38F
#define FLAG_0x390 0x390
#define FLAG_0x391 0x391
#define FLAG_SPRITEVIS_MAUVILLE_CITY_WATTSON 0x390
#define FLAG_SPRITEVIS_MAUVILLE_GYM_WATTSON 0x391
#define FLAG_0x392 0x392
#define FLAG_0x393 0x393
#define FLAG_0x394 0x394
@@ -961,7 +962,7 @@
#define FLAG_0x3BE 0x3BE
#define FLAG_0x3BF 0x3BF
#define FLAG_0x3C0 0x3C0
#define FLAG_0x3C1 0x3C1
#define FLAG_SPRITEVIS_SLATEPORT_MUSEUM_POPULATION 0x3C1
#define FLAG_0x3C2 0x3C2
#define FLAG_0x3C3 0x3C3
#define FLAG_0x3C4 0x3C4

11
include/credits.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef GUARD_CREDITS_H
#define GUARD_CREDITS_H
// Exported type declarations
// Exported RAM declarations
extern EWRAM_DATA bool8 gHasHallOfFameRecords;
// Exported ROM declarations
#endif //GUARD_CREDITS_H

3913
include/data/battle_moves.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,247 @@
#ifndef POKEEMERALD_DATA_TEXT_ABILITIES_H
#define POKEEMERALD_DATA_TEXT_ABILITIES_H
static const u8 gNoneAbilityDescription[] = _("No special ability.");
static const u8 gStenchAbilityDescription[] = _("Helps repel wild POKéMON.");
static const u8 gDrizzleAbilityDescription[] = _("Summons rain in battle.");
static const u8 gSpeedBoostAbilityDescription[] = _("Gradually boosts SPEED.");
static const u8 gBattleArmorAbilityDescription[] = _("Blocks critical hits.");
static const u8 gSturdyAbilityDescription[] = _("Negates 1-hit KO attacks.");
static const u8 gDampAbilityDescription[] = _("Prevents self-destruction.");
static const u8 gLimberAbilityDescription[] = _("Prevents paralysis.");
static const u8 gSandVeilAbilityDescription[] = _("Ups evasion in a sandstorm.");
static const u8 gStaticAbilityDescription[] = _("Paralyzes on contact.");
static const u8 gVoltAbsorbAbilityDescription[] = _("Turns electricity into HP.");
static const u8 gWaterAbsorbAbilityDescription[] = _("Changes water into HP.");
static const u8 gObliviousAbilityDescription[] = _("Prevents attraction.");
static const u8 gCloudNineAbilityDescription[] = _("Negates weather effects.");
static const u8 gCompoundEyesAbilityDescription[] = _("Raises accuracy.");
static const u8 gInsomniaAbilityDescription[] = _("Prevents sleep.");
static const u8 gColorChangeAbilityDescription[] = _("Changes type to foes move.");
static const u8 gImmunityAbilityDescription[] = _("Prevents poisoning.");
static const u8 gFlashFireAbilityDescription[] = _("Powers up if hit by fire.");
static const u8 gShieldDustAbilityDescription[] = _("Prevents added effects.");
static const u8 gOwnTempoAbilityDescription[] = _("Prevents confusion.");
static const u8 gSuctionCupsAbilityDescription[] = _("Firmly anchors the body.");
static const u8 gIntimidateAbilityDescription[] = _("Lowers the foes ATTACK.");
static const u8 gShadowTagAbilityDescription[] = _("Prevents the foes escape.");
static const u8 gRoughSkinAbilityDescription[] = _("Hurts to touch.");
static const u8 gWonderGuardAbilityDescription[] = _("“Super effective” hits.");
static const u8 gLevitateAbilityDescription[] = _("Not hit by GROUND attacks.");
static const u8 gEffectSporeAbilityDescription[] = _("Leaves spores on contact.");
static const u8 gSynchronizeAbilityDescription[] = _("Passes on status problems.");
static const u8 gClearBodyAbilityDescription[] = _("Prevents ability reduction.");
static const u8 gNaturalCureAbilityDescription[] = _("Heals upon switching out.");
static const u8 gLightningRodAbilityDescription[] = _("Draws electrical moves.");
static const u8 gSereneGraceAbilityDescription[] = _("Promotes added effects.");
static const u8 gSwiftSwimAbilityDescription[] = _("Raises SPEED in rain.");
static const u8 gChlorophyllAbilityDescription[] = _("Raises SPEED in sunshine.");
static const u8 gIlluminateAbilityDescription[] = _("Encounter rate increases.");
static const u8 gTraceAbilityDescription[] = _("Copies special ability.");
static const u8 gHugePowerAbilityDescription[] = _("Raises ATTACK.");
static const u8 gPoisonPointAbilityDescription[] = _("Poisons foe on contact.");
static const u8 gInnerFocusAbilityDescription[] = _("Prevents flinching.");
static const u8 gMagmaArmorAbilityDescription[] = _("Prevents freezing.");
static const u8 gWaterVeilAbilityDescription[] = _("Prevents burns.");
static const u8 gMagnetPullAbilityDescription[] = _("Traps STEEL-type POKéMON.");
static const u8 gSoundproofAbilityDescription[] = _("Avoids sound-based moves.");
static const u8 gRainDishAbilityDescription[] = _("Slight HP recovery in rain.");
static const u8 gSandStreamAbilityDescription[] = _("Summons a sandstorm.");
static const u8 gPressureAbilityDescription[] = _("Raises foes PP usage.");
static const u8 gThickFatAbilityDescription[] = _("Heat-and-cold protection.");
static const u8 gEarlyBirdAbilityDescription[] = _("Awakens quickly from sleep.");
static const u8 gFlameBodyAbilityDescription[] = _("Burns the foe on contact.");
static const u8 gRunAwayAbilityDescription[] = _("Makes escaping easier.");
static const u8 gKeenEyeAbilityDescription[] = _("Prevents loss of accuracy.");
static const u8 gHyperCutterAbilityDescription[] = _("Prevents ATTACK reduction.");
static const u8 gPickupAbilityDescription[] = _("May pick up items.");
static const u8 gTruantAbilityDescription[] = _("Moves only every two turns.");
static const u8 gHustleAbilityDescription[] = _("Trades accuracy for power.");
static const u8 gCuteCharmAbilityDescription[] = _("Infatuates on contact.");
static const u8 gPlusAbilityDescription[] = _("Powers up with MINUS.");
static const u8 gMinusAbilityDescription[] = _("Powers up with PLUS.");
static const u8 gForecastAbilityDescription[] = _("Changes with the weather.");
static const u8 gStickyHoldAbilityDescription[] = _("Prevents item theft.");
static const u8 gShedSkinAbilityDescription[] = _("Heals the body by shedding.");
static const u8 gGutsAbilityDescription[] = _("Ups ATTACK if suffering.");
static const u8 gMarvelScaleAbilityDescription[] = _("Ups DEFENSE if suffering.");
static const u8 gLiquidOozeAbilityDescription[] = _("Draining causes injury.");
static const u8 gOvergrowAbilityDescription[] = _("Ups GRASS moves in a pinch.");
static const u8 gBlazeAbilityDescription[] = _("Ups FIRE moves in a pinch.");
static const u8 gTorrentAbilityDescription[] = _("Ups WATER moves in a pinch.");
static const u8 gSwarmAbilityDescription[] = _("Ups BUG moves in a pinch.");
static const u8 gRockHeadAbilityDescription[] = _("Prevents recoil damage.");
static const u8 gDroughtAbilityDescription[] = _("Summons sunlight in battle.");
static const u8 gArenaTrapAbilityDescription[] = _("Prevents fleeing.");
static const u8 gVitalSpiritAbilityDescription[] = _("Prevents sleep.");
static const u8 gWhiteSmokeAbilityDescription[] = _("Prevents ability reduction.");
static const u8 gPurePowerAbilityDescription[] = _("Raises ATTACK.");
static const u8 gShellArmorAbilityDescription[] = _("Blocks critical hits.");
static const u8 gCacophonyAbilityDescription[] = _("Avoids sound-based moves.");
static const u8 gAirLockAbilityDescription[] = _("Negates weather effects.");
const u8 gAbilityNames[][ABILITY_NAME_LENGTH + 1] =
{
_("-------"),
_("STENCH"),
_("DRIZZLE"),
_("SPEED BOOST"),
_("BATTLE ARMOR"),
_("STURDY"),
_("DAMP"),
_("LIMBER"),
_("SAND VEIL"),
_("STATIC"),
_("VOLT ABSORB"),
_("WATER ABSORB"),
_("OBLIVIOUS"),
_("CLOUD NINE"),
_("COMPOUNDEYES"),
_("INSOMNIA"),
_("COLOR CHANGE"),
_("IMMUNITY"),
_("FLASH FIRE"),
_("SHIELD DUST"),
_("OWN TEMPO"),
_("SUCTION CUPS"),
_("INTIMIDATE"),
_("SHADOW TAG"),
_("ROUGH SKIN"),
_("WONDER GUARD"),
_("LEVITATE"),
_("EFFECT SPORE"),
_("SYNCHRONIZE"),
_("CLEAR BODY"),
_("NATURAL CURE"),
_("LIGHTNINGROD"),
_("SERENE GRACE"),
_("SWIFT SWIM"),
_("CHLOROPHYLL"),
_("ILLUMINATE"),
_("TRACE"),
_("HUGE POWER"),
_("POISON POINT"),
_("INNER FOCUS"),
_("MAGMA ARMOR"),
_("WATER VEIL"),
_("MAGNET PULL"),
_("SOUNDPROOF"),
_("RAIN DISH"),
_("SAND STREAM"),
_("PRESSURE"),
_("THICK FAT"),
_("EARLY BIRD"),
_("FLAME BODY"),
_("RUN AWAY"),
_("KEEN EYE"),
_("HYPER CUTTER"),
_("PICKUP"),
_("TRUANT"),
_("HUSTLE"),
_("CUTE CHARM"),
_("PLUS"),
_("MINUS"),
_("FORECAST"),
_("STICKY HOLD"),
_("SHED SKIN"),
_("GUTS"),
_("MARVEL SCALE"),
_("LIQUID OOZE"),
_("OVERGROW"),
_("BLAZE"),
_("TORRENT"),
_("SWARM"),
_("ROCK HEAD"),
_("DROUGHT"),
_("ARENA TRAP"),
_("VITAL SPIRIT"),
_("WHITE SMOKE"),
_("PURE POWER"),
_("SHELL ARMOR"),
_("CACOPHONY"),
_("AIR LOCK"),
};
const u8 *const gAbilityDescriptionPointers[] =
{
gNoneAbilityDescription,
gStenchAbilityDescription,
gDrizzleAbilityDescription,
gSpeedBoostAbilityDescription,
gBattleArmorAbilityDescription,
gSturdyAbilityDescription,
gDampAbilityDescription,
gLimberAbilityDescription,
gSandVeilAbilityDescription,
gStaticAbilityDescription,
gVoltAbsorbAbilityDescription,
gWaterAbsorbAbilityDescription,
gObliviousAbilityDescription,
gCloudNineAbilityDescription,
gCompoundEyesAbilityDescription,
gInsomniaAbilityDescription,
gColorChangeAbilityDescription,
gImmunityAbilityDescription,
gFlashFireAbilityDescription,
gShieldDustAbilityDescription,
gOwnTempoAbilityDescription,
gSuctionCupsAbilityDescription,
gIntimidateAbilityDescription,
gShadowTagAbilityDescription,
gRoughSkinAbilityDescription,
gWonderGuardAbilityDescription,
gLevitateAbilityDescription,
gEffectSporeAbilityDescription,
gSynchronizeAbilityDescription,
gClearBodyAbilityDescription,
gNaturalCureAbilityDescription,
gLightningRodAbilityDescription,
gSereneGraceAbilityDescription,
gSwiftSwimAbilityDescription,
gChlorophyllAbilityDescription,
gIlluminateAbilityDescription,
gTraceAbilityDescription,
gHugePowerAbilityDescription,
gPoisonPointAbilityDescription,
gInnerFocusAbilityDescription,
gMagmaArmorAbilityDescription,
gWaterVeilAbilityDescription,
gMagnetPullAbilityDescription,
gSoundproofAbilityDescription,
gRainDishAbilityDescription,
gSandStreamAbilityDescription,
gPressureAbilityDescription,
gThickFatAbilityDescription,
gEarlyBirdAbilityDescription,
gFlameBodyAbilityDescription,
gRunAwayAbilityDescription,
gKeenEyeAbilityDescription,
gHyperCutterAbilityDescription,
gPickupAbilityDescription,
gTruantAbilityDescription,
gHustleAbilityDescription,
gCuteCharmAbilityDescription,
gPlusAbilityDescription,
gMinusAbilityDescription,
gForecastAbilityDescription,
gStickyHoldAbilityDescription,
gShedSkinAbilityDescription,
gGutsAbilityDescription,
gMarvelScaleAbilityDescription,
gLiquidOozeAbilityDescription,
gOvergrowAbilityDescription,
gBlazeAbilityDescription,
gTorrentAbilityDescription,
gSwarmAbilityDescription,
gRockHeadAbilityDescription,
gDroughtAbilityDescription,
gArenaTrapAbilityDescription,
gVitalSpiritAbilityDescription,
gWhiteSmokeAbilityDescription,
gPurePowerAbilityDescription,
gShellArmorAbilityDescription,
gCacophonyAbilityDescription,
gAirLockAbilityDescription,
};
#endif // POKEEMERALD_DATA_TEXT_ABILITIES_H

View File

@@ -14,8 +14,6 @@ extern struct MonCoords gTrainerFrontPicCoords[];
extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1];
extern const u8 gMoveNames[][13];
extern const u8 gAbilityNames[][13];
extern const u8 gTypeNames[][7];
extern struct CompressedSpriteSheet gUnknown_0831C620;
extern struct CompressedSpritePalette gUnknown_0831C628;
extern const struct SpriteTemplate gUnknown_0831C688;

View File

@@ -28,7 +28,6 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32
void LoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic);
void LoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic);
extern u8 gDecompressionBuffer[];
u32 sub_8034974(const u8 *ptr);
#endif // GUARD_DECOMPRESS_H

View File

@@ -69,5 +69,6 @@ extern EWRAM_DATA u8 gCurDecorationIndex;
void sub_8126968(void);
void sub_8126AD8(u8 taskId);
void sub_8127D38(u16 mapX, u16 mapY, u16 decor);
void sub_8126B2C(u8 taskId);
#endif //GUARD_DECORATION_H

View File

@@ -22,6 +22,7 @@ extern const u8 EventScript_2713D1[];
extern const u8 EventScript_2766A2[];
extern const u8 EventScript_2766A6[];
extern const u8 gTVBravoTrainerText00[];
extern const u8 gTVBravoTrainerText01[];
extern const u8 gTVBravoTrainerText02[];
@@ -381,6 +382,15 @@ extern const u8 SecretBase_RedCave1_Text_2751E1[];
extern const u8 SecretBase_RedCave1_Text_2754F6[];
extern const u8 SecretBase_RedCave1_Text_2758CC[];
extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88[];
//field effects
extern const u8 FieryPath_EventScript_2908FD[];
extern const u8 EventScript_290CAE[];
extern const u8 EventScript_2926F8[];
//player pc
extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_1F863F[];
extern const u8 LittlerootTown_MaysHouse_2F_EventScript_1F958F[];
#endif //GUARD_EVENT_SCRIPTS_H

View File

@@ -1,7 +0,0 @@
#ifndef GUARD_FLDEFF_GROUNDSHAKE_H
#define GUARD_FLDEFF_GROUNDSHAKE_H
void sub_81BE6B8(void);
void sub_81BE72C(void);
#endif // GUARD_FLDEFF_GROUNDSHAKE_H

View File

@@ -624,23 +624,6 @@
#define TIMER_INTR_ENABLE 0x40
#define TIMER_ENABLE 0x80
// BGCNT
#define BGCNT_PRIORITY(n) (n) // Values 0 - 3. Lower priority BGs will be drawn on top of higher priority BGs.
#define BGCNT_CHARBASE(n) ((n) << 2) // Values 0 - 3. Base block for tile pixel data.
#define BGCNT_MOSAIC 0x0040
#define BGCNT_16COLOR 0x0000 // 4 bits per pixel
#define BGCNT_256COLOR 0x0080 // 8 bits per pixel
#define BGCNT_SCREENBASE(n) ((n) << 8) // Values 0 - 31. Base block for tile map.
#define BGCNT_WRAP 0x2000 // Only affects affine BGs. Text BGs wrap by default.
#define BGCNT_TXT256x256 0x0000 // Internal screen size size of text mode BG in pixels.
#define BGCNT_TXT512x256 0x4000
#define BGCNT_TXT256x512 0x8000
#define BGCNT_TXT512x512 0xC000
#define BGCNT_AFF128x128 0x0000 // Internal screen size size of affine mode BG in pixels.
#define BGCNT_AFF256x256 0x4000
#define BGCNT_AFF512x512 0x8000
#define BGCNT_AFF1024x1024 0xC000
// serial
#define SIO_ID 0x0030 // Communication ID

View File

@@ -35,6 +35,12 @@
// Converts a number to Q4.12 fixed-point format
#define Q_4_12(n) ((s16)((n) * 4096))
// Converts a Q8.8 fixed-point format number to a regular integer
#define Q_8_8_TO_INT(n) ((int)((n) / 256))
// Converts a Q4.12 fixed-point format number to a regular integer
#define Q_4_12_TO_INT(n) ((int)((n) / 4096))
#define PARTY_SIZE 6
#define POKEMON_SLOTS_NUMBER 412

View File

@@ -188,11 +188,11 @@ typedef union // size = 0x24
struct {
/*0x00*/ u8 kind;
/*0x01*/ bool8 active;
/*0x02*/ u16 species;
/*0x02*/ u16 speciesOpponent;
/*0x04*/ u8 playerName[8];
/*0x0C*/ u8 linkOpponentName[8];
/*0x14*/ u16 move;
/*0x16*/ u16 species2;
/*0x16*/ u16 speciesPlayer;
/*0x18*/ u8 battleType;
/*0x19*/ u8 language;
/*0x1A*/ u8 linkOpponentLanguage;

View File

@@ -2728,10 +2728,149 @@ extern const u16 gFireRedMenuElements2_Pal[16];
extern const u16 gFireRedMenuElements3_Pal[16];
extern const u8 gFireRedMenuElements_Gfx[];
//item menu graphics
// item menu graphics
extern const u8 gBagScreen_Gfx[];
extern const u16 gBagScreenFemale_Pal[];
extern const u16 gBagScreenMale_Pal[];
extern const u8 gBagMenuHMIcon_Gfx[];
// item menu icons graphics
extern const u8 gBagMaleTiles[];
extern const u8 gBagFemaleTiles[];
extern const u8 gBagPalette[];
extern const u8 gBerryCheckCircle_Gfx[];
//intro graphics
extern const u8 gIntro1SparkleGfx[];
extern const u8 gIntro1FlygonGfx[];
extern const u16 gIntro3LightningPal[];
extern const u8 gIntroCopyright_Gfx[];
extern const u8 gIntroCopyright_Tilemap[];
extern const u16 gIntroCopyright_Pal[16];
extern const u8 gIntro2VolbeatGfx[];
extern const u8 gIntro2TorchicGfx[];
extern const u8 gIntro2ManectricGfx[];
extern const u16 gIntro2VolbeatPal[];
extern const u16 gIntro2TorchicPal[];
extern const u16 gIntro2ManectricPal[];
extern const u8 gIntro2BubblesGfx[];
extern const u16 gIntro2BubblesPal[];
extern const u8 gIntro3LightningGfx[];
extern const u8 gIntro3GroudonGfx[];
extern const u8 gIntro3GroudonTilemap[];
extern const u8 gIntro3LegendBgGfx[];
extern const u8 gIntro3GroudonBgTilemap[];
extern const u8 gIntro3GroudonBgTilemap[];
extern const u8 gIntro3BgPal[0x200];
extern const u8 gIntro3KyogreGfx[];
extern const u8 gIntro3KyogreTilemap[];
extern const u8 gIntro3KyogreBgTilemap[];
extern const u8 gIntro3CloudsGfx[];
extern const u8 gIntro3Clouds1Tilemap[];
extern const u8 gIntro3Clouds2Tilemap[];
extern const u8 gIntro3Clouds3Tilemap[];
extern const u8 gIntro3Clouds4Tilemap[];
extern const u8 gIntro3RayquazaTilemap[];
extern const u8 gIntro3RayquazaGfx[];
extern const u8 gIntro3Clouds2Gfx[];
extern const u16 gIntro1GameFreakTextFadePal[];
//intro/credits graphics
extern const u8 gIntro2BrendanNoTurnGfx[];
extern const u8 gIntro2MayNoTurnGfx[];
extern const u16 gIntro2BrendanNoTurnPal[];
extern const u16 gIntro2FlygonPal[];
extern const u8 gIntro2FlygonGfx[];
// berry pics
extern const u8 gBerryPic_Cheri[];
extern const u8 gBerryPalette_Cheri[];
extern const u8 gBerryPic_Chesto[];
extern const u8 gBerryPalette_Chesto[];
extern const u8 gBerryPic_Pecha[];
extern const u8 gBerryPalette_Pecha[];
extern const u8 gBerryPic_Rawst[];
extern const u8 gBerryPalette_Rawst[];
extern const u8 gBerryPic_Aspear[];
extern const u8 gBerryPalette_Aspear[];
extern const u8 gBerryPic_Leppa[];
extern const u8 gBerryPalette_Leppa[];
extern const u8 gBerryPic_Oran[];
extern const u8 gBerryPalette_Oran[];
extern const u8 gBerryPic_Persim[];
extern const u8 gBerryPalette_Persim[];
extern const u8 gBerryPic_Lum[];
extern const u8 gBerryPalette_Lum[];
extern const u8 gBerryPic_Sitrus[];
extern const u8 gBerryPalette_Sitrus[];
extern const u8 gBerryPic_Figy[];
extern const u8 gBerryPalette_Figy[];
extern const u8 gBerryPic_Wiki[];
extern const u8 gBerryPalette_Wiki[];
extern const u8 gBerryPic_Mago[];
extern const u8 gBerryPalette_Mago[];
extern const u8 gBerryPic_Aguav[];
extern const u8 gBerryPalette_Aguav[];
extern const u8 gBerryPic_Iapapa[];
extern const u8 gBerryPalette_Iapapa[];
extern const u8 gBerryPic_Razz[];
extern const u8 gBerryPalette_Razz[];
extern const u8 gBerryPic_Bluk[];
extern const u8 gBerryPalette_Bluk[];
extern const u8 gBerryPic_Nanab[];
extern const u8 gBerryPalette_Nanab[];
extern const u8 gBerryPic_Wepear[];
extern const u8 gBerryPalette_Wepear[];
extern const u8 gBerryPic_Pinap[];
extern const u8 gBerryPalette_Pinap[];
extern const u8 gBerryPic_Pomeg[];
extern const u8 gBerryPalette_Pomeg[];
extern const u8 gBerryPic_Kelpsy[];
extern const u8 gBerryPalette_Kelpsy[];
extern const u8 gBerryPic_Qualot[];
extern const u8 gBerryPalette_Qualot[];
extern const u8 gBerryPic_Hondew[];
extern const u8 gBerryPalette_Hondew[];
extern const u8 gBerryPic_Grepa[];
extern const u8 gBerryPalette_Grepa[];
extern const u8 gBerryPic_Tamato[];
extern const u8 gBerryPalette_Tamato[];
extern const u8 gBerryPic_Cornn[];
extern const u8 gBerryPalette_Cornn[];
extern const u8 gBerryPic_Magost[];
extern const u8 gBerryPalette_Magost[];
extern const u8 gBerryPic_Rabuta[];
extern const u8 gBerryPalette_Rabuta[];
extern const u8 gBerryPic_Nomel[];
extern const u8 gBerryPalette_Nomel[];
extern const u8 gBerryPic_Spelon[];
extern const u8 gBerryPalette_Spelon[];
extern const u8 gBerryPic_Pamtre[];
extern const u8 gBerryPalette_Pamtre[];
extern const u8 gBerryPic_Watmel[];
extern const u8 gBerryPalette_Watmel[];
extern const u8 gBerryPic_Durin[];
extern const u8 gBerryPalette_Durin[];
extern const u8 gBerryPic_Belue[];
extern const u8 gBerryPalette_Belue[];
extern const u8 gBerryPic_Liechi[];
extern const u8 gBerryPalette_Liechi[];
extern const u8 gBerryPic_Ganlon[];
extern const u8 gBerryPalette_Ganlon[];
extern const u8 gBerryPic_Salac[];
extern const u8 gBerryPalette_Salac[];
extern const u8 gBerryPic_Petaya[];
extern const u8 gBerryPalette_Petaya[];
extern const u8 gBerryPic_Apicot[];
extern const u8 gBerryPalette_Apicot[];
extern const u8 gBerryPic_Lansat[];
extern const u8 gBerryPalette_Lansat[];
extern const u8 gBerryPic_Starf[];
extern const u8 gBerryPalette_Starf[];
extern const u8 gBerryPic_Enigma[];
extern const u8 gBerryPalette_Enigma[];
//credits
extern const u8 gCreditsCopyrightEnd_Gfx[];
#endif //GUARD_GRAPHICS_H

View File

@@ -0,0 +1,87 @@
#ifndef GUARD_TRAINER_REMATCH_H
#define GUARD_TRAINER_REMATCH_H
enum {
REMATCH_ROSE,
REMATCH_ANDRES,
REMATCH_DUSTY,
REMATCH_LOLA,
REMATCH_RICKY,
REMATCH_LILA_AND_ROY,
REMATCH_CRISTIN,
REMATCH_BROOKE,
REMATCH_WILTON,
REMATCH_VALERIE,
REMATCH_CINDY,
REMATCH_THALIA,
REMATCH_JESSICA,
REMATCH_WINSTON,
REMATCH_STEVE,
REMATCH_TONY,
REMATCH_NOB,
REMATCH_KOJI,
REMATCH_FERNANDO,
REMATCH_DALTON,
REMATCH_BERNIE,
REMATCH_ETHAN,
REMATCH_JOHN_AND_JAY,
REMATCH_JEFFREY,
REMATCH_CAMERON,
REMATCH_JACKI,
REMATCH_WALTER,
REMATCH_KAREN,
REMATCH_JERRY,
REMATCH_ANNA_AND_MEG,
REMATCH_ISABEL,
REMATCH_MIGUEL,
REMATCH_TIMOTHY,
REMATCH_SHELBY,
REMATCH_CALVIN,
REMATCH_ELLIOT,
REMATCH_ISAIAH,
REMATCH_MARIA,
REMATCH_ABIGAIL,
REMATCH_DYLAN,
REMATCH_KATELYN,
REMATCH_BENJAMIN,
REMATCH_PABLO,
REMATCH_NICOLAS,
REMATCH_ROBERT,
REMATCH_LAO,
REMATCH_CYNDY,
REMATCH_MADELINE,
REMATCH_JENNY,
REMATCH_DIANA,
REMATCH_AMY_AND_LIV,
REMATCH_ERNEST,
REMATCH_CORY,
REMATCH_EDWIN,
REMATCH_LYDIA,
REMATCH_ISAAC,
REMATCH_GABRIELLE,
REMATCH_CATHERINE,
REMATCH_JACKSON,
REMATCH_HALEY,
REMATCH_JAMES,
REMATCH_TRENT,
REMATCH_SAWYER,
REMATCH_KIRA_AND_DAN,
REMATCH_WALLY_3,
REMATCH_ROXANNE,
REMATCH_BRAWLY,
REMATCH_WATTSON,
REMATCH_FLANNERY,
REMATCH_NORMAN,
REMATCH_WINONA,
REMATCH_TATE_AND_LIZA,
REMATCH_JUAN,
REMATCH_SIDNEY,
REMATCH_PHOEBE,
REMATCH_GLACIA,
REMATCH_DRAKE,
REMATCH_WALLACE
};
void UpdateGymLeaderRematch(void);
#endif //GUARD_TRAINER_REMATCH_H

View File

@@ -10,12 +10,12 @@ s32 GetStringRightAlignXOffset(s32 fontId, const u8 *str, s32 totalWidth);
s32 GetStringCenterAlignXOffsetWithLetterSpacing(s32 fontId, const u8 *str, s32 totalWidth, s32 letterSpacing);
s32 GetStringWidthDifference(s32 fontId, const u8 *str, s32 totalWidth, s32 letterSpacing);
s32 GetMaxWidthInMenuTable(const struct MenuAction *str, s32 arg1);
s32 sub_81DB3D8(const struct MenuAction *str, u8* arg1, s32 arg2);
s32 sub_81DB3D8(const struct MenuAction *str, const u8* arg1, s32 arg2);
// sub_81DB41C
// CopyMonCategoryText
// sub_81DB494
void PadNameString(u8 *dst, u8 padWith);
// sub_81DB554
void sub_81DB554(u8 *, u8);
// sub_81DB5AC
u32 sub_81DB604(const u8 *);
// sub_81DB620

View File

@@ -6,7 +6,7 @@
// Exported RAM declarations
// Exported ROM declarations
void c2_copyright_1(void);
void CB2_InitCopyrightScreenAfterBootup(void);
void CB2_InitCopyrightScreenAfterBootup(void);
void CB2_InitCopyrightScreenAfterTitleScreen(void);
void sub_816F2A8(u16, u16, u16, u16);

View File

@@ -0,0 +1,30 @@
#ifndef GUARD_INTRO_CREDITS_GRAPHICS_H
#define GUARD_INTRO_CREDITS_GRAPHICS_H
extern u16 gUnknown_0203BD24;
extern s16 gUnknown_0203BD26;
extern s16 gUnknown_0203BD28;
extern const struct CompressedSpriteSheet gIntro2BrendanSpriteSheet[];
extern const struct CompressedSpriteSheet gIntro2MaySpriteSheet[];
extern const struct CompressedSpriteSheet gIntro2BicycleSpriteSheet[];
extern const struct CompressedSpriteSheet gIntro2FlygonSpriteSheet[];
extern const struct SpritePalette gUnknown_085F530C[];
extern const struct CompressedSpriteSheet gUnknown_085F5334[];
extern const struct CompressedSpriteSheet gUnknown_085F5344[];
extern const struct CompressedSpriteSheet gUnknown_085F5354[];
extern const struct CompressedSpriteSheet gUnknown_085F53AC[];
extern const struct CompressedSpriteSheet gUnknown_085F53BC[];
extern const struct SpritePalette gUnknown_085F5384[];
void load_intro_part2_graphics(u8 a);
void sub_817B150(u8 a);
void sub_817B1C8(u8);
void sub_817B3A8(u8);
u8 sub_817B3DC(u8 a, u16 b, u16 c, u16 d);
void sub_817B540(u8);
u8 intro_create_brendan_sprite(s16 a, s16 b);
u8 intro_create_may_sprite(s16 a, s16 b);
u8 intro_create_flygon_sprite(s16 a, s16 b);
#endif // GUARD_INTRO_CREDITS_GRAPHICS_H

View File

@@ -64,5 +64,9 @@ u16 BagGetItemIdByPocketPosition(u8 pocketId, u16 pocketPos);
void sub_80D6FB4(struct BagPocket*);
void sub_80D6F64(struct BagPocket*);
void sub_80D702C(struct ItemSlot*, s16, u16);
u8 sub_80D6CE4();
bool8 itemid_is_unique(u16 itemId);
void sub_80D6E48(u8, u16);
void sub_80D6E84(void);
#endif // ITEM_H

View File

@@ -4,24 +4,58 @@
// Exported type declarations
struct BagStruct
{
void *func;
u8 unk4;
void (*bagCallback)(void);
u8 location;
u8 pocket;
u8 unk6[2];
u16 unk8[5];
u16 unk12[5];
void *unk1C;
u16 cursorPosition[5];
u16 scrollPosition[5];
};
extern struct BagStruct gUnknown_0203CE58;
struct UnkBagStruct
{
void (*unk0)(void);
u8 unk4[0x800];
u8 unk804[12];
u8 unk810[7];
u8 unk817;
u8 unk818;
u8 unk819;
u8 unk81A;
u8 unk81B:4;
u8 unk81B_1:2;
u8 unk81B_3:1;
u8 unk81B_2:1;
u8 filler3[2];
u8 unk81E;
u8 unk81F;
const u8* unk820;
u8 unk824;
u8 unk825;
u8 filler[2];
u8 unk828;
u8 unk829[5];
u8 unk82E[6];
s16 unk834;
u8 filler4[0xE];
u8 unk844[32][32];
u8 filler2[4];
};
extern struct UnkBagStruct *gUnknown_0203CE54;
// Exported RAM declarations
extern u16 gSpecialVar_ItemId;
// Exported ROM declarations
void sub_81AAC14(void);
void sub_81AAC50(void);
void sub_81AAC70(void);
void bag_menu_mail_related(void);
void CB2_BagMenuFromStartMenu(void);
#endif //GUARD_item_menu_H

View File

@@ -1,16 +1,25 @@
#ifndef GUARD_ITEM_MENU_ICONS
#define GUARD_ITEM_MENU_ICONS
extern const struct CompressedSpriteSheet gUnknown_0857FB34;
extern const struct CompressedSpriteSheet gUnknown_0857FB3C;
extern const struct CompressedSpritePalette gUnknown_0857FB44;
extern const struct CompressedSpriteSheet gUnknown_0857FDEC;
extern const struct CompressedSpritePalette gUnknown_0857FDF4;
u8 sub_80D511C(u8 a0, u8 a1, u8 a2, u8 a3);
void RemoveBagSprite(u8 id);
void AddBagVisualSprite(u8 bagPocketId);
void SetBagVisualPocketId(u8 bagPocketId, bool8 isSwitchingPockets);
void ShakeBagVisual(void);
void AddSwitchPocketRotatingBallSprite(s16 rotationDirection);
void AddBagItemIconSprite(u16 itemId, u8 id);
void RemoveBagItemIconSprite(u8 id);
void sub_80D4FAC(void);
void sub_80D4FC8(u8 arg0);
void sub_80D4FEC(u8 arg0);
u8 CreateBerryTagSprite(u8 id, s16 x, s16 y);
void FreeBerryTagSpritePalette(void);
u8 sub_80D511C(u8 berryId, u8 x, u8 y, bool8 startAffine);
u8 CreateBerryFlavorCircleSprite(s16 x);
void sub_80D4FAC(void);
void RemoveBagItemIconObject(u8);
void sub_80D4FEC(u8);
void sub_80D4FC8(u8);
#endif // GUARD_ITEM_MENU_ICONS

17
include/libgcnmultiboot.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef GUARD_LIBGCMMULTIBOOT_H
#define GUARD_LIBGCNMULTIBOOT_H
struct GcmbStruct
{
u16 gcmb_field_0;
vu8 gcmb_field_2;
u8 filler3[0x2C - 0x3];
};
void GameCubeMultiBoot_Main(struct GcmbStruct *pStruct);
void GameCubeMultiBoot_ExecuteProgram(struct GcmbStruct *pStruct);
void GameCubeMultiBoot_Init(struct GcmbStruct *pStruct);
void GameCubeMultiBoot_HandleSerialInterrupt(struct GcmbStruct *pStruct);
void GameCubeMultiBoot_Quit(void);
#endif // GUARD_LIBGCNMULTIBOOT_H

View File

@@ -257,6 +257,7 @@ void sub_800AAF4(void);
void sub_800AF18(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, u8 unk_06);
void sub_800B348(void);
void sub_800B3A4(u32 who);
bool32 sub_800A07C(void);
extern u16 gLinkPartnersHeldKeys[6];
extern u32 gLinkDebugSeed;

View File

@@ -4,9 +4,11 @@
#define LIST_NOTHING_CHOSEN -1
#define LIST_B_PRESSED -2
// Exported type declarations
#define LIST_NO_MULTIPLE_SCROLL 0
#define LIST_MULTIPLE_SCROLL_DPAD 1
#define LIST_MULTIPLE_SCROLL_L_R 2
// Exported RAM declarations
struct ListMenu;
struct ListMenuItem
{
@@ -14,33 +16,31 @@ struct ListMenuItem
s32 id;
};
struct ListMenu;
struct ListMenuTemplate
{
const struct ListMenuItem *items;
void (* moveCursorFunc)(u32, bool8, struct ListMenu *);
void (* unk_08)(u8, s32, u8);
void (* moveCursorFunc)(s32, bool8, struct ListMenu *);
void (* unk_08)(u8 windowId, s32 itemId, u8 y);
u16 totalItems;
u16 maxShowed;
u8 unk_10;
u8 windowId;
u8 unk_11;
u8 unk_12;
u8 cursor_Y;
u32 upText_Y:4; // x1, x2, x4, x8 = xF
u32 cursorColor:4; // x10, x20, x40, x80 = xF0
u32 fillColor:4; // x100, x200, x400, x800 = xF00
u32 cursorShadowColor:4; // x1000, x2000, x4000, x8000 = xF000
u32 unk_16_0:1; // x10000
u32 spaceBetweenItems:6; // x20000, x40000, x80000, x100000, x200000, x400000 = x7E0000
u32 unk_16_7:1; // x800000
u32 unk_17_0:6; // x1000000, x2000000, x4000000, x8000000, x10000000, x20000000 = x3F000000
u32 cursorKind:2; // x40000000, x80000000
u8 cursor_X;
u8 upText_Y:4; // x1, x2, x4, x8 = xF
u8 cursorPal:4; // x10, x20, x40, x80 = xF0
u8 fillValue:4; // x1, x2, x4, x8 = xF
u8 cursorShadowPal:4; // x10, x20, x40, x80 = xF0
u8 lettersSpacing:3;
u8 unk_16_3:3;
u8 scrollMultiple:2; // x40, x80 = xC0
u8 fontId:6; // x1, x2, x4, x8, x10, x20 = x3F
u8 cursorKind:2; // x40, x80
};
struct ListMenu
{
struct ListMenuTemplate _template;
struct ListMenuTemplate template;
u16 scrollOffset;
u16 selectedRow;
u8 unk_1C;
@@ -49,14 +49,30 @@ struct ListMenu
u8 unk_1F;
};
struct UnknownListMenuWindowStruct
{
u8 x;
u8 y;
u8 width;
u8 height;
u8 palNum;
};
extern struct ListMenuTemplate gMultiuseListMenuTemplate;
// Exported ROM declarations
u8 ListMenuInit(struct ListMenuTemplate *template, u16 cursorPage, u16 cursorPosition);
s32 DoMysteryGiftListMenu(struct WindowTemplate *windowTemplate, struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum);
u8 ListMenuInit(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 selectedRow);
u8 ListMenuInitWithWindows(struct ListMenuTemplate *listMenuTemplate, struct UnknownListMenuWindowStruct *arg1, u16 scrollOffset, u16 selectedRow);
s32 ListMenuHandleInputGetItemId(u8 listTaskId);
void sub_81AE860(u8 listTaskId, u16 *a1, u16 *a2);
void sub_81AE6C8(u8 listTaskId, u16 *a1, u16 *a2);
u8 ListMenuGetYCoordForPrintingArrowCursor(u8);
void DestroyListMenuTask(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow);
void sub_81AE70C(u8 listTaskId);
void ChangeListMenuPals(u8 listTaskId, u8 cursorPal, u8 fillValue, u8 cursorShadowPal);
void ChangeListMenuCoords(u8 listTaskId, u8 x, u8 y);
s32 ListMenuTestInput(struct ListMenuTemplate *template, u32 scrollOffset, u32 selectedRow, u16 keys, u16 *newScrollOffset, u16 *newSelectedRow);
void ListMenuGetCurrentItemArrayId(u8 listTaskId, u16 *arrayId);
void ListMenuGetScrollAndRow(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow);
u16 ListMenuGetYCoordForPrintingArrowCursor(u8 listTaskId);
void sub_81AF028(u8 cursorPal, u8 fillValue, u8 cursorShadowPal);
void sub_81AF078(s32 arg0, u8 arg1, struct ListMenu *list);
#endif //GUARD_LIST_MENU_H

View File

@@ -21,5 +21,7 @@ void LoadSerializedGame(void);
void LoadPlayerBag(void);
void SavePlayerBag(void);
void SetSaveBlocksPointers(u16);
void sub_8076D5C(void);
void sav2_gender2_inplace_and_xFE(void);
#endif // GUARD_LOAD_SAVE_H

13
include/match_call.h Normal file
View File

@@ -0,0 +1,13 @@
#ifndef GUARD_MATCH_CALL_H
#define GUARD_MATCH_CALL_H
enum {
MATCH_CALL_TYPE_NON_TRAINER,
MATCH_CALL_TYPE_TRAINER,
MATCH_CALL_TYPE_WALLY,
MATCH_CALL_TYPE_BIRCH,
MATCH_CALL_TYPE_MAY_BRENDAN,
MATCH_CALL_TYPE_GYMLEADER_ELITEFOUR
};
#endif //GUARD_MATCH_CALL_H

View File

@@ -1,3 +1,4 @@
#ifndef GUARD_MENU_H
#define GUARD_MENU_H
@@ -27,8 +28,9 @@ void NewMenuHelpers_DrawDialogueFrame(u8, u8);
void sub_819746C(u8 windowId, bool8 copyToVram);
void NewMenuHelpers_DrawStdWindowFrame(u8, u8);
u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
void PrintPlayerNameOnWindow(u8, const u8*, u16, u16);
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
void sub_8197434(u8 a0, u8 a1);
void sub_8197434(u8 windowId, bool8 copyToVram);
void SetStandardWindowBorderStyle(u8 a0, u8 a1);
void sub_8197930(void);
u8 GetPlayerTextSpeed(void);
@@ -53,6 +55,7 @@ struct WindowTemplate sub_8198A50(u8, u8, u8, u8, u8, u8, u16);
void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos);
void copy_decompressed_tile_data_to_vram_autofree(u8 bgId, const void *src, int size, u16 offset, u8 mode);
s8 ProcessMenuInputNoWrap_(void);
s8 ProcessMenuInput_other(void);
void do_scheduled_bg_tilemap_copies_to_vram(void);
void clear_scheduled_bg_copies_to_vram(void);
void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str);
@@ -67,6 +70,16 @@ void AddItemMenuActionTextPrinters (u8, u8, u8, u8, u8, u8, u8, const struct Men
void sub_8198DBC(u8, u8, u8, u8, u8, u8, u8, const struct MenuAction*, const u8*);
u8 sub_8199944(u8, u8, u8, u8, u8);
u8 sub_8199134(s8, s8);
u8 GetStartMenuWindowId(void);
void sub_819A2BC(u8, u8);
u8 MoveMenuCursor(s8 cursorDelta);
void NewMenuHelpers_DrawStdWindowFrame(u8 windowId, bool8 CopyToVram);
u8 sub_81979C4(u8 a1);
u8 sub_81983AC(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos);
void sub_819786C(u8 windowId, bool8 copyToVram);
void AddTextPrinterForMessage_2(bool8 allowSkippingDelayWithButtonPress);
void RemoveStartMenuWindow(void);
void sub_8197948(u8 initialCursorPos);
void sub_819A344(u8 a0, u8 *dest, u8 color);
#endif // GUARD_MENU_H

View File

@@ -14,7 +14,7 @@ struct YesNoFuncTable
// Exported RAM declarations
// Exported ROM declarations
void sub_812220C(struct ItemSlot *, u8, u8 *, u8 *, u8);
void sub_812225C(u16 *, u16 *, u8, u8);
void sub_8122298(u16 *, u16 *, u8, u8, u8);
void sub_8121F68(u8 taskId, const struct YesNoFuncTable *data);
@@ -24,7 +24,8 @@ void ResetVramOamAndBgCntRegs(void);
void SetVBlankHBlankCallbacksToNull(void);
void ResetAllBgsCoordinates(void);
bool16 RunTextPrintersRetIsActive(u8 textPrinterId);
void sub_8122344(void *arg0, u8 arg1);
void sub_8122344(u8 *arg0, u8 arg1);
void sub_81223B0(u8 *arg0, u8 arg1);
void LoadListMenuArrowsGfx(void);
void sub_81223FC(u8 *a0, u8 count, u8 a2);
void sub_8122448(u8 *a0, u8 count, u16 x, u16 y);

View File

@@ -7,16 +7,31 @@
// Exported ROM declarations
struct ArrowStruct {
struct ArrowStruct
{
u8 unk0[6];
u16 unk6[4];
u8 unkE;
};
struct CursorStruct
{
u8 unk0;
u8 unk1;
u16 unk2;
u16 unk4;
u16 unk6;
u16 unk8;
u8 unkA;
};
void Task_ScrollIndicatorArrowPairOnMainMenu(u8);
u8 AddScrollIndicatorArrowPairParametrized(u8, u8, u8, u8, s32, u16, u16, u16 *);
void RemoveScrollIndicatorArrowPair(u8);
u8 AddScrollIndicatorArrowPair(const struct ArrowStruct*, void*);
void sub_81AF15C(u8, u8, u8);
void ListMenuRemoveCursorObject(u8 taskId, u32 cursorKind);
void ListMenuUpdateCursorObject(u8 taskId, u16 x, u16 y, u32 cursorKind);
u8 ListMenuAddCursorObjectInternal(struct CursorStruct *cursor, u32 cursorKind);
#endif //GUARD_MENU_INDICATORS_H

View File

@@ -0,0 +1,6 @@
#ifndef GUARD_MULTIBOOT_POKEMON_COLOSSEUM_H
#define GUARD_MULTIBOOT_POKEMON_COLOSSEUM_H
extern const u16 gMultiBootProgram_PokemonColosseum_Start[0x14000];
#endif // GUARD_MULTIBOOT_POKEMON_COLOSSEUM_H

View File

@@ -1,6 +1,6 @@
#ifndef GUARD_PARTY_MENU_H
#define GUARD_PARTY_MENU_H
#include "task.h"
enum
{
AILMENT_NONE,
@@ -11,6 +11,17 @@ enum
AILMENT_BRN
};
struct Struct203CEC8
{
u8 filler[0x9];
s8 unk9;
s8 unkA;
u8 unkB;
u8 filler2[0x2];
};
extern struct Struct203CEC8 gUnknown_0203CEC8;
bool8 pokemon_has_move(struct Pokemon *, u16);
void sub_81B58A8(void);
void DoWallyTutorialBagMenu(void);
@@ -20,4 +31,12 @@ u8 GetCursorSelectionMonId(void);
bool8 FieldCallback_Teleport(void);
void sub_81B7F60(void);
void sub_81B0FCC(u8 partyIdx, u8 a);
void sub_81B1370(u8 taskId);
void display_pokemon_menu_message(u8 windowId);
void sub_81B1F18(u8 taskId, u8 pokemonIdx, s8 a, s16 hp, TaskFunc func);
void sub_81B1B5C(void *a, u8 b);
u8 sub_81B1BD4();
void sub_81B8448();
#endif // GUARD_PARTY_MENU_H

View File

@@ -1,13 +1,88 @@
#ifndef GUARD_PLAYER_PC_H
#define GUARD_PLAYER_PC_H
// local task defines
#define PAGE_INDEX data[0]
#define ITEMS_ABOVE_TOP data[1]
#define NUM_ITEMS data[1]
#define NUM_QUANTITY_ROLLER data[3]
#define NUM_PAGE_ITEMS data[4]
// not used
#define CURRENT_ITEM_STORAGE_MENU data[3]
// not used
#define SWAP_ITEM_INDEX data[8]
#define SWITCH_MODE_ACTIVE data[9]
// this is potentially an ewram access occuring in high ewram. TODO: investigate this further.
#define NEW_GAME_PC_ITEMS(i, type) ((u16)((u16 *)gNewGamePCItems + type)[i * 2])
// defined and used in the above macro
enum
{
PC_ITEM_ID,
PC_QUANTITY
};
// player PC menu options
enum
{
PLAYERPC_MENU_ITEMSTORAGE,
PLAYERPC_MENU_MAILBOX,
PLAYERPC_MENU_DECORATION,
PLAYERPC_MENU_TURNOFF
};
// item storage menus
enum
{
ITEMPC_MENU_WITHDRAW,
ITEMPC_MENU_DEPOSIT,
ITEMPC_MENU_TOSS,
ITEMPC_MENU_EXIT
};
// mailbox mail options
enum
{
MAILBOX_READ,
MAILBOX_MOVE_TO_BAG,
MAILBOX_GIVE,
MAILBOX_CANCEL,
};
// special item description handlers
enum
{
ITEMPC_SWITCH_WHICH_ITEM = 0xFFF7,
ITEMPC_OKAY_TO_THROW_AWAY,
ITEMPC_TOO_IMPORTANT,
ITEMPC_NO_MORE_ROOM,
ITEMPC_THREW_AWAY_ITEM,
ITEMPC_HOW_MANY_TO_TOSS,
ITEMPC_WITHDREW_THING,
ITEMPC_HOW_MANY_TO_WITHDRAW,
ITEMPC_GO_BACK_TO_PREV
};
struct PlayerPCItemPageStruct
{
u16 cursorPos;
u16 itemsAbove;
u8 pageItems;
u8 count;
u8 filler[3];
u8 scrollIndicatorId;
};
// Exported type declarations
// Exported RAM declarations
extern struct PlayerPCItemPageStruct playerPCItemPageInfo;
// Exported ROM declarations
extern const struct MenuAction gMailboxMailOptions[];
void sub_816B060(u8 taskId);
void ReshowPlayerPC(u8 taskId);
void sub_816B31C(void);
#endif //GUARD_PLAYER_PC_H

View File

@@ -17,7 +17,6 @@ enum
};
s8 GetSetPokedexFlag(u16 nationalNum, u8 caseId);
u16 GetNationalPokedexCount(u8);
u16 GetHoennPokedexCount(u8);
u16 sub_80C0E9C(u16, s16, s16, u16);
#endif // GUARD_POKEDEX_H

View File

@@ -468,6 +468,7 @@ extern struct Pokemon gEnemyParty[PARTY_SIZE];
extern struct SpriteTemplate gUnknown_0202499C;
extern struct PokemonStorage* gPokemonStoragePtr;
extern const struct BattleMove gBattleMoves[];
extern const u8 gFacilityClassToPicIndex[];
extern const u8 gFacilityClassToTrainerClass[];
extern const struct BaseStats gBaseStats[];

View File

@@ -1,5 +1,6 @@
#ifndef GUARD_POKENAV_H
#define GUARD_POKENAV_H
#include "player_pc.h"
bool8 sub_81D5C18(void);
bool8 sub_81D20BC(void *arg0);
@@ -13,5 +14,12 @@ void sub_81D3480(void *arg0, u8 arg1);
void sub_81D2754(void *arg0, void *arg1);
void sub_81D1F84(void *arg0, void *arg1, void *arg2);
const u8 *sub_81D62AC(void);
u8 sub_81D1C84(u8);
u8 sub_81D1DC0(struct PlayerPCItemPageStruct *);
void sub_81D1E90(struct PlayerPCItemPageStruct *);
void sub_81D1EC0(void);
void sub_81D1D04(u8);
bool8 sub_81D1C44(u8);
#endif //GUARD_POKENAV_H

17
include/roulette_util.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef GUARD_ROULETTE_UTIL_H
#define GUARD_ROULETTE_UTIL_H
// structures
struct InnerStruct203CF18
{
u8 filler[0xC4];
};
void sub_8151B68(struct InnerStruct203CF18 *, const u8*);
void sub_8151B3C(struct InnerStruct203CF18 *);
void sub_8151CA8(struct InnerStruct203CF18 *, u8, u8);
void sub_8151C50(struct InnerStruct203CF18 *, u8, u8);
void sub_8151D28(struct InnerStruct203CF18 *, u8, u8);
void sub_8151E50(struct InnerStruct203CF18 *);
#endif // GUARD_ROULETTE_UTIL_H

View File

@@ -47,19 +47,19 @@ enum
// Do save types
enum
{
NORMAL_SAVE,
LINK_SAVE,
//EREADER_SAVE, // depreciated in Emerald
LINK2_SAVE, // unknown 2nd link save
HOF_SAVE,
DIFFERENT_FILE_SAVE,
HOF_DELETE_SAVE // unused
SAVE_NORMAL,
SAVE_LINK,
//EREADER_SAVE, // deprecated in Emerald
SAVE_LINK2, // unknown 2nd link save
SAVE_HALL_OF_FAME,
SAVE_OVERWRITE_DIFFERENT_FILE,
SAVE_HALL_OF_FAME_ERASE_BEFORE // unused
};
#define SECTION_ID_RECORDED_BATTLE 31
void ClearSaveData(void);
void ResetSaveCounters(void);
void Save_ResetSaveCounters(void);
bool32 SetDamagedSectorBits(u8 op, u8 bit);
u8 save_write_to_flash(u16 a1, const struct SaveSectionLocation *location);
u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location);
@@ -88,7 +88,7 @@ u8 sub_81533E0(void);
u8 sub_8153408(void);
u8 sub_8153430(void);
bool8 sub_8153474(void);
u8 sub_81534D0(u8 a1);
u8 Save_LoadGameData(u8 a1);
u16 sub_815355C(void);
u32 TryCopySpecialSaveSection(u8 sector, u8* dst);
u32 sub_8153634(u8 sector, u8* src);

View File

@@ -1,6 +1,16 @@
#ifndef GUARD_START_MENU_H
#define GUARD_START_MENU_H
extern bool8 (*gMenuCallback)(void); // Defined in sym_common.txt
void sub_809FA18(void);
void sub_809FA34(u8 taskId);
void ShowStartMenu(void);
void sub_809FDD4(void);
void SaveGame(void);
void sub_80A0514(void);
void sub_80A08CC(void);
void HideStartMenu(void);
void AppendToList(u8* list, u8* pos, u8 newEntry);
#endif // GUARD_START_MENU_H

View File

@@ -1,6 +1,11 @@
#ifndef GUARD_STARTER_CHOOSE_H
#define GUARD_STARTER_CHOOSE_H
extern const u16 gBirchBagGrassPal[2][16];
extern const u8 gBirchBagTilemap[];
extern const u8 gBirchGrassTilemap[];
extern const u8 gBirchHelpGfx[];
u16 GetStarterPokemon(u16 chosenStarterId);
void CB2_ChooseStarter(void);

View File

@@ -112,9 +112,6 @@ extern const u8 gText_Cancel4[];
extern const u8 gText_IsThisTheCorrectTime[];
extern const u8 gText_PkmnFainted3[];
extern const u8 gText_Coins[];
extern const u8 gText_Draw[];
extern const u8 gText_Loss[];
extern const u8 gText_Win[];
extern const u8 gText_Var1AteTheVar2[];
extern const u8 gText_Var1HappilyAteVar2[];
@@ -200,6 +197,23 @@ extern const u8 gText_Peak[];
extern const u8 gText_SafariBallStock[];
extern const u8 gText_BattlePyramidFloor[];
// save menu texts
extern const u8 gText_ConfirmSave[];
extern const u8 gText_DifferentSaveFile[];
extern const u8 gText_AlreadySavedFile[];
extern const u8 gText_SavingDontTurnOff[];
extern const u8 gText_PlayerSavedGame[];
extern const u8 gText_SaveError[];
extern const u8 gText_SavingDontTurnOffPower[];
extern const u8 gText_SavingPlayer[];
extern const u8 gText_SavingBadges[];
extern const u8 gText_SavingPokedex[];
extern const u8 gText_SavingTime[];
// Battle pyramid menu texts
extern const u8 gText_BattlePyramidConfirmRest[];
extern const u8 gText_BattlePyramidConfirmRetire[];
// option menu texts
extern const u8 gText_TextSpeedSlow[];
extern const u8 gText_TextSpeedMid[];
@@ -348,6 +362,11 @@ extern const u8 gText_DepositedVar2Var1s[];
extern const u8 gText_NoRoomForItems[];
extern const u8 gText_ThreeDashes[];
//party menu text
extern const u8 gText_PkmnHPRestoredByVar2[];
extern const u8 gText_CantBeUsedOnPkmn[];
//birch dex rating text
extern const u8 gBirchDexRatingText_LessThan10[];
extern const u8 gBirchDexRatingText_LessThan20[];
extern const u8 gBirchDexRatingText_LessThan30[];
@@ -370,4 +389,45 @@ extern const u8 gBirchDexRatingText_LessThan190[];
extern const u8 gBirchDexRatingText_LessThan200[];
extern const u8 gBirchDexRatingText_DexCompleted[];
//player pc text
extern const u8 gText_WhatWouldYouLike[];
extern const u8 gText_NoMailHere[];
extern const u8 gText_TakeOutItemsFromPC[];
extern const u8 gText_StoreItemsInPC[];
extern const u8 gText_ThrowAwayItemsInPC[];
extern const u8 gText_GoBackPrevMenu[];
extern const u8 gText_ItemStorage[];
extern const u8 gText_Mailbox[];
extern const u8 gText_Decoration[];
extern const u8 gText_TurnOff[];
extern const u8 gText_WithdrawItem[];
extern const u8 gText_DepositItem[];
extern const u8 gText_TossItem[];
extern const u8 gText_Cancel[];
extern const u8 gText_Read[];
extern const u8 gText_MoveToBag[];
extern const u8 gText_Give2[];
extern const u8 gText_Cancel2[];
extern const u8 gText_NoItems[];
extern const u8 gText_WhatToDoWithVar1sMail[];
extern const u8 gText_MessageWillBeLost[];
extern const u8 gText_BagIsFull[];
extern const u8 gText_MailToBagMessageErased[];
extern const u8 gText_GoBackPrevMenu[];
extern const u8 gText_WithdrawHowManyItems[];
extern const u8 gText_WithdrawXItems[];
extern const u8 gText_TossHowManyVar1s[];
extern const u8 gText_ThrewAwayVar2Var1s[];
extern const u8 gText_NoRoomInBag[];
extern const u8 gText_TooImportantToToss[];
extern const u8 gText_ConfirmTossItems[];
extern const u8 gText_MoveVar1Where[];
#endif //GUARD_STRINGS_H

View File

@@ -82,6 +82,12 @@
#define TEXT_COLOR_TRANSPARENT 0x0
#define TEXT_COLOR_WHITE 0x1
#define TEXT_COLOR_DARK_GREY 0x2
// 0x3
#define TEXT_COLOR_RED 0x4
// 0x5
#define TEXT_COLOR_GREEN 0x6
// 0x7
#define TEXT_COLOR_BLUE 0x8
// battle placeholders are located in battle_message.h

View File

@@ -4,17 +4,46 @@
extern u8 *const gTVStringVarPtrs[3];
void ClearTVShowData(void);
void PutPokemonTodayCaughtOnAir(void);
void sub_80EE184(void);
void sub_80EE35C(u16 foeSpecies, u16 species, u8 moveIdx, const u16 *movePtr, u16 betterMove);
void sub_80EE8C8(u16 winStreak, u8 facility);
void DoTVShow(void);
void DoTVShowInSearchOfTrainers(void);
void sub_80EDCE8(void);
void sub_80EE2CC(void);
void sub_80EE72C(void);
void sub_80EED10(void);
void sub_80EED34(void);
void sub_80EED60(u16 delta);
void sub_80F01B8(void);
void sub_80F01E8(void *src, u32 size, u8 masterIdx);
void sub_80EE4DC(struct Pokemon *pokemon, u8 ribbonMonDataIdx);
u32 GetPlayerIDAsU32(void);
bool8 GetPriceReduction(u8 newsKind);
u8 GetRibbonCount(struct Pokemon *pokemon);
void TV_PutSecretBaseVisitOnTheAir(void);
void sub_80EE184(void);
void sub_80EEA70(void);
void sub_80F14F8(TVShow *shows);
size_t sub_80EF370(int value);
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 unused, u8 sheen, u8 language);
size_t CountDigits(int value);
u8 GetRibbonCount(struct Pokemon *pokemon);
void sub_80EDE70(u16 nCoinsSpent);
void sub_80EDE84(u16 nCoinsSpent);
void sub_80EDD78(u16 nCoinsPaidOut);
void sub_80EEA70(void);
void sub_80EDB44(void);
void sub_80EDC60(const u16 *words);
void sub_80EDA80(void);
void sub_80F0C7C(void *src, u32 size, u8 masterIdx);
void sub_80F0BB8(void);
void sub_80ED950(bool8 flag);
void sub_80EEC80(void);
void sub_80EECA4(void);
void sub_80EECC8(void);
void sub_80EECEC(void);
void sub_80F1208(TVShow *shows);
void sub_80EE44C(u8 nMonsCaught, u8 nPkblkUsed);
void SetPokemonAnglerSpecies(u16 species);
void UpdateTVShowsPerDay(u16 days);
void PutPokemonTodayCaughtOnAir(void);
void TV_PutSecretBaseVisitOnTheAir(void);
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 unused, u8 sheen, u8 language);
void PutBattleUpdateOnTheAir(u8 opponentLinkPlayerId, u16 move, u16 speciesPlayer, u16 speciesOpponent);
#endif //GUARD_TV_H