Port/decompile field_control_avatar
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_BATTLE_FRONTIER_1_H
|
||||
#define GUARD_BATTLE_FRONTIER_1_H
|
||||
|
||||
bool32 sub_8196034(void);
|
||||
|
||||
#endif // GUARD_BATTLE_FRONTIER_1_H
|
||||
@@ -501,7 +501,7 @@
|
||||
#define FLAG_0x1F1 0x1F1
|
||||
#define FLAG_0x1F2 0x1F2
|
||||
#define FLAG_0x1F3 0x1F3
|
||||
#define FLAG_0x1F4 0x1F4
|
||||
#define FLAG_HIDDEN_ITEMS_START 0x1F4
|
||||
#define FLAG_0x1F5 0x1F5
|
||||
#define FLAG_0x1F6 0x1F6
|
||||
#define FLAG_0x1F7 0x1F7
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ void TriggerPendingDaycareEgg(void);
|
||||
void RejectEggFromDayCare(void);
|
||||
void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation);
|
||||
void GiveEggFromDaycare(void);
|
||||
bool8 DoEggActions_CheckHatch(void);
|
||||
bool8 ShouldEggHatch(void);
|
||||
u16 GetSelectedMonNickAndSpecies(void);
|
||||
void GetDaycareMonNicknames(void);
|
||||
u8 GetDaycareState(void);
|
||||
|
||||
@@ -19,8 +19,8 @@ extern const u8 EventScript_TryDoDoubleTrainerBattle[];
|
||||
extern const u8 EventScript_271362[];
|
||||
extern const u8 EventScript_TryDoDoubleRematchBattle[];
|
||||
extern const u8 EventScript_2713D1[];
|
||||
extern const u8 EventScript_2766A2[];
|
||||
extern const u8 EventScript_2766A6[];
|
||||
extern const u8 EventScript_SecretPower1[];
|
||||
extern const u8 EventScript_SecretPower2[];
|
||||
|
||||
|
||||
extern const u8 gTVBravoTrainerText00[];
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
|
||||
struct FieldInput
|
||||
{
|
||||
u8 pressedAButton:1;
|
||||
u8 input_field_0_1:1;
|
||||
u8 pressedStartButton:1;
|
||||
u8 pressedSelectButton:1;
|
||||
u8 input_field_0_4:1;
|
||||
u8 input_field_0_5:1;
|
||||
u8 input_field_0_6:1;
|
||||
u8 pressedBButton:1;
|
||||
u8 input_field_1_0:1;
|
||||
u8 input_field_1_1:1;
|
||||
u8 input_field_1_2:1;
|
||||
u8 input_field_1_3:1;
|
||||
u8 input_field_1_4:1;
|
||||
u8 input_field_1_5:1;
|
||||
u8 input_field_1_6:1;
|
||||
u8 input_field_1_7:1;
|
||||
bool8 pressedAButton:1;
|
||||
bool8 checkStandardWildEncounter:1;
|
||||
bool8 pressedStartButton:1;
|
||||
bool8 pressedSelectButton:1;
|
||||
bool8 input_field_0_4:1;
|
||||
bool8 input_field_0_5:1;
|
||||
bool8 tookStep:1;
|
||||
bool8 pressedBButton:1;
|
||||
bool8 input_field_1_0:1;
|
||||
bool8 input_field_1_1:1;
|
||||
bool8 input_field_1_2:1;
|
||||
bool8 input_field_1_3:1;
|
||||
bool8 input_field_1_4:1;
|
||||
bool8 input_field_1_5:1;
|
||||
bool8 input_field_1_6:1;
|
||||
bool8 input_field_1_7:1;
|
||||
u8 dpadDirection;
|
||||
u8 input_field_3;
|
||||
};
|
||||
@@ -28,15 +28,15 @@ void FieldGetPlayerInput(struct FieldInput *pStruct, u16 keys, u16 heldKeys);
|
||||
int sub_809C014(struct FieldInput *pStruct);
|
||||
u8 *sub_80682A8(struct MapPosition *, u8, u8);
|
||||
void overworld_poison_timer_set(void);
|
||||
void prev_quest_postbuffer_cursor_backup_reset(void);
|
||||
void RestartWildEncounterImmunitySteps(void);
|
||||
u8 *sub_8068E24(struct MapPosition *);
|
||||
u8 *GetEventObjectScriptPointerPlayerFacing(void);
|
||||
bool8 mapheader_trigger_activate_at__run_now(struct MapPosition *);
|
||||
const u8 *GetEventObjectScriptPointerPlayerFacing(void);
|
||||
bool8 sub_8068870(u16 a);
|
||||
bool8 sub_8068894(void);
|
||||
bool8 sub_8068A64(struct MapPosition *, u16);
|
||||
u8 sub_8068F18(void);
|
||||
bool8 dive_warp(struct MapPosition *position, u16 b);
|
||||
void sub_809D2BC(void);
|
||||
int SetCableClubWarp(void);
|
||||
u8 TrySetDiveWarp(void);
|
||||
|
||||
#endif // GUARD_FIELDCONTROLAVATAR_H
|
||||
|
||||
@@ -44,6 +44,9 @@ u8 GetPlayerAvatarGraphicsIdByCurrentState(void);
|
||||
void SetPlayerAvatarStateMask(u8 a);
|
||||
u8 GetPlayerAvatarGraphicsIdByStateId(u8 a);
|
||||
u8 GetJumpSpecialMovementAction(u32);
|
||||
bool8 PartyHasMonWithSurf(void);
|
||||
bool8 IsPlayerFacingSurfableFishableWater(void);
|
||||
bool8 IsPlayerSurfingNorth(void);
|
||||
|
||||
bool8 ForcedMovement_None(void);
|
||||
bool8 ForcedMovement_Slip(void);
|
||||
|
||||
@@ -14,6 +14,6 @@ enum {
|
||||
};
|
||||
|
||||
void sub_80F972C(void);
|
||||
unsigned int overworld_poison(void);
|
||||
int DoPoisonFieldEffect(void);
|
||||
|
||||
#endif //GUARD_FIELD_POISON_H
|
||||
|
||||
@@ -16,5 +16,9 @@ void sub_80AC3E4(void);
|
||||
void PreservePaletteInWeather(u8);
|
||||
void sub_80AF128(void);
|
||||
void sub_80AB104(u8);
|
||||
void sub_80AF80C(u8);
|
||||
void sub_80AF828(void);
|
||||
void sub_80AF838(void);
|
||||
void sub_80B0268(void);
|
||||
|
||||
#endif //GUARD_FIELD_SCREEN_H
|
||||
|
||||
@@ -6,5 +6,14 @@ u8 sub_813B260(void);
|
||||
u16 get_unknown_box_id(void);
|
||||
bool8 InMultiBattleRoom(void);
|
||||
void sub_813BF10(void);
|
||||
void increment_var_x4026_on_birth_island_modulo_100(void);
|
||||
bool8 sub_813B3B0(void);
|
||||
bool8 ShouldDoBrailleRegicePuzzle(void);
|
||||
bool32 is_tile_that_overrides_player_control(void);
|
||||
bool32 sub_8138120(void);
|
||||
bool32 sub_8138168(void);
|
||||
bool32 sub_81381B0(void);
|
||||
bool32 sub_81381F8(void);
|
||||
bool32 CountSSTidalStep(u16 delta);
|
||||
|
||||
#endif // GUARD_FIELD_SPECIALS_H
|
||||
|
||||
@@ -12,6 +12,8 @@ void sub_80FA794(s16 x, s16 y);
|
||||
void CreateRecordMixingSprite(void);
|
||||
void DestroyRecordMixingSprite(void);
|
||||
void overworld_poison_effect(void);
|
||||
void sub_80FA970(s16);
|
||||
void sub_80FA9D0(void);
|
||||
bool8 sub_80FADE4(u16, u8);
|
||||
|
||||
#endif //GUARD_FLDEFF_80F9BCC_H
|
||||
|
||||
@@ -63,17 +63,16 @@ struct EventObjectTemplate
|
||||
struct WarpEvent
|
||||
{
|
||||
s16 x, y;
|
||||
s8 warpId;
|
||||
u8 mapGroup;
|
||||
u8 elevation;
|
||||
u8 warpId;
|
||||
u8 mapNum;
|
||||
u8 unk7;
|
||||
u8 mapGroup;
|
||||
};
|
||||
|
||||
struct CoordEvent
|
||||
{
|
||||
s16 x, y;
|
||||
u8 unk4;
|
||||
u8 filler_5;
|
||||
u8 elevation;
|
||||
u16 trigger;
|
||||
u16 index;
|
||||
u8 filler_A[0x2];
|
||||
@@ -83,16 +82,15 @@ struct CoordEvent
|
||||
struct BgEvent
|
||||
{
|
||||
u16 x, y;
|
||||
u8 unk4;
|
||||
u8 elevation;
|
||||
u8 kind;
|
||||
// 0x2 padding for the union beginning.
|
||||
union { // carried over from diego's FR/LG work, seems to be the same struct
|
||||
// in gen 3, "kind" (0x3 in BgEvent struct) determines the method to read the union.
|
||||
u8 *script;
|
||||
|
||||
// hidden item type probably
|
||||
// hidden item type
|
||||
struct {
|
||||
u8 filler6[0x2];
|
||||
u16 item;
|
||||
u16 hiddenItemId; // flag offset to determine flag lookup
|
||||
} hiddenItem;
|
||||
|
||||
|
||||
@@ -58,5 +58,6 @@ void sub_81AAC28(void);
|
||||
void bag_menu_mail_related(void);
|
||||
void CB2_BagMenuFromStartMenu(void);
|
||||
u8 sub_81ABB2C(u8 pocketId);
|
||||
bool8 UseRegisteredKeyItemOnField(void);
|
||||
|
||||
#endif //GUARD_item_menu_H
|
||||
|
||||
@@ -50,7 +50,7 @@ bool8 MetatileBehavior_IsSecretBaseCave(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseTree(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseShrub(u8);
|
||||
bool8 MetatileBehavior_IsSecretBasePC(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseRegisterPC(u8);
|
||||
bool8 MetatileBehavior_IsRecordMixingSecretBasePC(u8);
|
||||
bool8 MetatileBehavior_IsMB_B2(u8);
|
||||
bool8 MetatileBehavior_IsBlockDecoration(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseImpassable(u8);
|
||||
@@ -67,7 +67,7 @@ bool8 MetatileBehavior_IsSecretBaseBreakableDoor(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseSoundMat(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseGlitterMat(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseSandOrnament(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseTvOrShield(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseShieldOrToyTV(u8);
|
||||
bool8 MetatileBehavior_IsPlayerRoomPCOn(u8);
|
||||
bool8 MetatileBehavior_HasRipples(u8);
|
||||
bool8 MetatileBehavior_IsPuddle(u8);
|
||||
@@ -106,14 +106,14 @@ bool8 MetatileBehavior_IsPacifilogHorizontalLog2(u8);
|
||||
bool8 MetatileBehavior_IsPacifidlogLog(u8);
|
||||
bool8 MetatileBehavior_IsTrickHousePuzzleDoor(u8);
|
||||
bool8 MetatileBehavior_IsRegionMap(u8);
|
||||
bool8 MetatileBehavior_IsClosedSootopolisGymDoor(u8);
|
||||
bool8 MetatileBehavior_IsClosedSootopolisDoor(u8);
|
||||
bool8 MetatileBehavior_IsUnknownClosedDoor(u8);
|
||||
bool8 MetatileBehavior_IsRoulette(u8);
|
||||
bool8 MetatileBehavior_IsPokeblockFeeder(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseJumpMat(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseSpinMat(u8);
|
||||
bool8 MetatileBehavior_IsLavaridgeB1FWarp(u8);
|
||||
bool8 MetatileBehavior_IsLavaridgeB1FWarp(u8);
|
||||
bool8 MetatileBehavior_IsLavaridge1FWarp(u8);
|
||||
bool8 MetatileBehavior_IsAquaHideoutWarp(u8);
|
||||
bool8 MetatileBehavior_IsWarpOrBridge(u8);
|
||||
bool8 MetatileBehavior_IsMossdeepGymWarp(u8);
|
||||
@@ -130,7 +130,7 @@ bool8 MetatileBehavior_IsHorizontalRail(u8);
|
||||
bool8 MetatileBehavior_IsSeaweed(u8);
|
||||
bool8 MetatileBehavior_IsRunningDisallowed(u8);
|
||||
bool8 MetatileBehavior_IsCuttableGrass(u8);
|
||||
bool8 MetatileBehavior_IsRunningShoesInstruction(u8);
|
||||
bool8 MetatileBehavior_IsRunningShoesManual(u8);
|
||||
bool8 MetatileBehavior_IsPictureBookShelf(u8);
|
||||
bool8 MetatileBehavior_IsBookShelf(u8);
|
||||
bool8 MetatileBehavior_IsPokeCenterBookShelf(u8);
|
||||
|
||||
+41
-2
@@ -94,6 +94,8 @@
|
||||
#define MON_DATA_SPATK2 87
|
||||
#define MON_DATA_SPDEF2 88
|
||||
|
||||
#define MAX_LEVEL 100
|
||||
|
||||
#define OT_ID_RANDOM_NO_SHINY 2
|
||||
#define OT_ID_PRESET 1
|
||||
#define OT_ID_PLAYER_ID 0
|
||||
@@ -110,10 +112,47 @@
|
||||
#define MON_FEMALE 0xFE
|
||||
#define MON_GENDERLESS 0xFF
|
||||
|
||||
#define TYPE_NORMAL 0x00
|
||||
#define TYPE_FIGHTING 0x01
|
||||
#define TYPE_FLYING 0x02
|
||||
#define TYPE_POISON 0x03
|
||||
#define TYPE_GROUND 0x04
|
||||
#define TYPE_ROCK 0x05
|
||||
#define TYPE_BUG 0x06
|
||||
#define TYPE_GHOST 0x07
|
||||
#define TYPE_STEEL 0x08
|
||||
#define TYPE_MYSTERY 0x09
|
||||
#define TYPE_FIRE 0x0a
|
||||
#define TYPE_WATER 0x0b
|
||||
#define TYPE_GRASS 0x0c
|
||||
#define TYPE_ELECTRIC 0x0d
|
||||
#define TYPE_PSYCHIC 0x0e
|
||||
#define TYPE_ICE 0x0f
|
||||
#define TYPE_DRAGON 0x10
|
||||
#define TYPE_DARK 0x11
|
||||
|
||||
#define FRIENDSHIP_EVENT_GROW_LEVEL 0x0
|
||||
#define FRIENDSHIP_EVENT_VITAMIN 0x1 // unused
|
||||
#define FRIENDSHIP_EVENT_BATTLE_ITEM 0x2 // unused
|
||||
#define FRIENDSHIP_EVENT_LEAGUE_BATTLE 0x3
|
||||
#define FRIENDSHIP_EVENT_LEARN_TMHM 0x4
|
||||
#define FRIENDSHIP_EVENT_WALKING 0x5
|
||||
#define FRIENDSHIP_EVENT_FAINT_SMALL 0x6
|
||||
#define FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE 0x7
|
||||
#define FRIENDSHIP_EVENT_FAINT_LARGE 0x8
|
||||
|
||||
#define STATUS_PRIMARY_NONE 0x0
|
||||
#define STATUS_PRIMARY_POISON 0x1
|
||||
#define STATUS_PRIMARY_PARALYSIS 0x2
|
||||
#define STATUS_PRIMARY_SLEEP 0x3
|
||||
#define STATUS_PRIMARY_FREEZE 0x4
|
||||
#define STATUS_PRIMARY_BURN 0x5
|
||||
#define STATUS_PRIMARY_POKERUS 0x6
|
||||
#define STATUS_PRIMARY_FAINTED 0x7
|
||||
|
||||
#define MAX_TOTAL_EVS 510
|
||||
#define NUM_STATS 6
|
||||
#define UNOWN_FORM_COUNT 28
|
||||
#define MAX_MON_LEVEL 100
|
||||
|
||||
struct PokemonSubstruct0
|
||||
{
|
||||
@@ -421,7 +460,7 @@ extern const u8 gFacilityClassToTrainerClass[];
|
||||
extern const struct BaseStats gBaseStats[];
|
||||
extern const u8 *const gItemEffectTable[];
|
||||
extern const struct Evolution gEvolutionTable[][EVOS_PER_MON];
|
||||
extern const u32 gExperienceTables[][MAX_MON_LEVEL + 1];
|
||||
extern const u32 gExperienceTables[][MAX_LEVEL + 1];
|
||||
extern const u16 *const gLevelUpLearnsets[];
|
||||
extern const u8 gUnknown_08329D22[];
|
||||
extern const u8 gUnknown_08329D26[];
|
||||
|
||||
@@ -28,5 +28,13 @@ u16 sub_81D2C3C(void);
|
||||
void sub_81D2C50(void);
|
||||
u8 sub_81D28C8(const struct ListMenuItem *items, u16 numChoices);
|
||||
void sub_81D2824(u16);
|
||||
bool32 InTrainerHill(void);
|
||||
bool8 EventObjectIsFarawayIslandMew(struct EventObject *);
|
||||
u32 sub_81D427C(void);
|
||||
void sub_81D4998(void);
|
||||
u8 GetCurrentTrainerHillMapId(void);
|
||||
u8 sub_81D6490(void);
|
||||
const struct WarpEvent *sub_81D6120(void);
|
||||
const struct WarpEvent *sub_81D6134(u8);
|
||||
|
||||
#endif //GUARD_POKENAV_H
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
//
|
||||
// Created by Scott Norton on 9/6/17.
|
||||
//
|
||||
|
||||
#ifndef GUARD_ROM_81BE66C_H
|
||||
#define GUARD_ROM_81BE66C_H
|
||||
|
||||
bool32 InTrainerHill(void);
|
||||
bool8 EventObjectIsFarawayIslandMew(struct EventObject *);
|
||||
u32 sub_81D427C(void);
|
||||
|
||||
#endif //GUARD_ROM_81BE66C_H
|
||||
+2
-2
@@ -55,8 +55,8 @@ bool8 mapheader_run_first_tag2_script_list_match(void);
|
||||
void mapheader_run_first_tag4_script_list_match(void);
|
||||
u32 CalculateRamScriptChecksum(void);
|
||||
void ClearRamScript(void);
|
||||
bool8 InitRamScript(u8 *script, u16 scriptSize, u8 mapGroup, u8 mapNum, u8 objectId);
|
||||
u8 *GetRamScript(u8 objectId, u8 *script);
|
||||
bool8 InitRamScript(const u8 *script, u16 scriptSize, u8 mapGroup, u8 mapNum, u8 objectId);
|
||||
const u8 *GetRamScript(u8 objectId, const u8 *script);
|
||||
bool32 sub_80991F8(void);
|
||||
u8 *sub_8099244(void);
|
||||
void sub_80992A0(u8 *script, u16 scriptSize);
|
||||
|
||||
@@ -16,5 +16,11 @@ void sub_80E8EE0(struct MapEvents const *events);
|
||||
void sub_80E9238(u8 flagIn);
|
||||
bool8 CurrentMapIsSecretBase(void);
|
||||
void sub_80EA3E4(u8 taskId);
|
||||
bool8 sub_80E9680(void);
|
||||
void sub_80EB498(void);
|
||||
void sub_80EB56C(void);
|
||||
void sub_80EB9E0(void);
|
||||
void sub_80EBB28(void);
|
||||
void sub_80E9668(const struct MapPosition *position, const struct MapEvents *events);
|
||||
|
||||
#endif //GUARD_SECRET_BASE_H
|
||||
|
||||
Reference in New Issue
Block a user