From acd08a46a52bca689914d018430777bd6e2710d6 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Wed, 17 May 2017 17:40:04 -0500 Subject: fill holes in party_menu.c and add battle_interface.h header --- include/asm.inc.h | 2 +- include/battle_interface.h | 36 ++++++++++++++++++++++++++++++++++++ include/menu.h | 2 +- include/songs.h | 4 ++-- 4 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 include/battle_interface.h (limited to 'include') diff --git a/include/asm.inc.h b/include/asm.inc.h index 3c1d52ffe..3db79b128 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -158,7 +158,7 @@ bool8 pokemon_has_move(struct Pokemon *, u16); void sub_806FA18(u8 taskId); // src/party_menu.o -void sub_806E834(); +u8 sub_806E834(const u8 *message, u8 arg1); // src/rom_8077ABC.o u8 battle_side_get_owner(u8); diff --git a/include/battle_interface.h b/include/battle_interface.h new file mode 100644 index 000000000..e85f87a30 --- /dev/null +++ b/include/battle_interface.h @@ -0,0 +1,36 @@ +#ifndef GUARD_BATTLE_INTERFACE_H +#define GUARD_BATTLE_INTERFACE_H + +struct BattleInterfaceStruct1 +{ + s32 unk0; + s32 unk4; + s32 unk8; + u32 unkC_0:5; + u32 unk10; +}; + +struct BattleInterfaceStruct2 +{ + u16 unk0; + u32 unk4; +}; + +u8 battle_make_oam_normal_battle(u8); +u8 battle_make_oam_safari_battle(void); +void sub_8043D84(u8, u8, u32, u32, u32); +void sub_8043DB0(u8); +void sub_8043DFC(u8); +void nullsub_11(); +void sub_8043EB4(u8); +void sub_8043F44(u8); +void sub_804454C(void); +u8 sub_8044804(u8, const struct BattleInterfaceStruct2 *, u8, u8); +void sub_8044CA0(u8); +void sub_8045A5C(u8, struct Pokemon *, u8); +s32 sub_8045C78(u8, u8, u8, u8); +s16 sub_80460C8(struct BattleInterfaceStruct1 *, int *, void *, int); +u8 GetScaledHPFraction(s16, s16, u8); +int GetHPBarLevel(s16, s16); + +#endif // GUARD_BATTLE_INTERFACE_H diff --git a/include/menu.h b/include/menu.h index c3dcbc969..6a11ffdc2 100644 --- a/include/menu.h +++ b/include/menu.h @@ -49,7 +49,7 @@ void PrintMenuItemsReordered(u8, u8, u8, const struct MenuAction[], u8*); void InitYesNoMenu(u8, u8, u8); void DisplayYesNoMenu(u8, u8, u32); s8 ProcessMenuInputNoWrap_(void); -u8 MenuPrint_PixelCoords(u8 *, u8, u16, u8); +u8 MenuPrint_PixelCoords(const u8 *, u8, u16, u8); u8 sub_8072A18(u8 *, u8, u16, u8, u32); u8 unref_sub_8072A5C(u8 *, u8 *, u8, u16, u8, u32); int sub_8072AB0(u8 *, u8, u16, u8, u8, u32); diff --git a/include/songs.h b/include/songs.h index 244bb9808..c465ac562 100644 --- a/include/songs.h +++ b/include/songs.h @@ -120,7 +120,7 @@ enum /*0x72*/ SE_TB_START, /*0x73*/ SE_TB_KON, /*0x74*/ SE_TB_KARA, - SE_BIDORO, + /*0x75*/ SE_BIDORO, SE_W085, SE_W085B, SE_W231, @@ -269,7 +269,7 @@ enum BGM_GIM, BGM_NAMINORI, BGM_DAN01, - BGM_FANFA1, + /*0x16F*/ BGM_FANFA1, BGM_ME_ASA, BGM_ME_BACHI, BGM_FANFA4, -- cgit v1.2.3 From 8ba066d303825722a78ffbc67cecc0f4598f6f1e Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 21 May 2017 11:37:35 +0200 Subject: Remove duplicate strings.h declarations --- include/menu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/menu.h b/include/menu.h index 6a11ffdc2..5b0f35a27 100644 --- a/include/menu.h +++ b/include/menu.h @@ -5,7 +5,7 @@ struct MenuAction { - u8 *text; + const u8 *text; u8 (*func)(); }; @@ -50,7 +50,7 @@ void InitYesNoMenu(u8, u8, u8); void DisplayYesNoMenu(u8, u8, u32); s8 ProcessMenuInputNoWrap_(void); u8 MenuPrint_PixelCoords(const u8 *, u8, u16, u8); -u8 sub_8072A18(u8 *, u8, u16, u8, u32); +u8 sub_8072A18(const u8 *, u8, u16, u8, u32); u8 unref_sub_8072A5C(u8 *, u8 *, u8, u16, u8, u32); int sub_8072AB0(u8 *, u8, u16, u8, u8, u32); void MenuPrint_RightAligned(u8 *, u8, u8); @@ -59,7 +59,7 @@ void sub_8072BD8(u8 *, u8, u8, u16); u8 *sub_8072C14(u8 *, s32, u8, u8); u8 *sub_8072C44(u8 *, s32, u8, u8); u8 *sub_8072C74(u8 *, const u8 *, u8, u8); -u8 sub_8072CA4(u8 *s); +u8 sub_8072CA4(const u8 *s); u8 sub_8072CBC(void); void sub_8072CD4(u8 *, u8 *, u8 *); u32 MenuUpdateWindowText_OverrideLineLength(u8); -- cgit v1.2.3 From 17d352b0f8f2e17c02fac0b8e3e2238b7cd44f37 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 21 May 2017 12:46:28 +0200 Subject: Add strings2.h --- include/menu.h | 4 +- include/strings2.h | 322 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 324 insertions(+), 2 deletions(-) create mode 100644 include/strings2.h (limited to 'include') diff --git a/include/menu.h b/include/menu.h index 5b0f35a27..cb5efa448 100644 --- a/include/menu.h +++ b/include/menu.h @@ -23,7 +23,7 @@ void MenuZeroFillWindowRect(u8, u8, u8, u8); void MenuFillWindowRectWithBlankTile(u8, u8, u8, u8); void MenuZeroFillScreen(void); void MenuDrawTextWindow(u8, u8, u8, u8); -void sub_8071F40(u8 *); +void sub_8071F40(const u8 *); void sub_8071F60(u8, u8, u8, u8); u16 unref_sub_8071F98(u8, u8); void unref_sub_8071FBC(u16, u8, u8, u8, u8); @@ -55,7 +55,7 @@ u8 unref_sub_8072A5C(u8 *, u8 *, u8, u16, u8, u32); int sub_8072AB0(u8 *, u8, u16, u8, u8, u32); void MenuPrint_RightAligned(u8 *, u8, u8); void sub_8072B80(u8 *, u8, u8, u8 *); -void sub_8072BD8(u8 *, u8, u8, u16); +void sub_8072BD8(const u8 *, u8, u8, u16); u8 *sub_8072C14(u8 *, s32, u8, u8); u8 *sub_8072C44(u8 *, s32, u8, u8); u8 *sub_8072C74(u8 *, const u8 *, u8, u8); diff --git a/include/strings2.h b/include/strings2.h new file mode 100644 index 000000000..600bb2d31 --- /dev/null +++ b/include/strings2.h @@ -0,0 +1,322 @@ +#ifndef GUARD_STRINGS2_H +#define GUARD_STRINGS2_H + +// ??? +extern const u8 gOtherText_TopSpeed[]; + +// berry_blender +extern const u8 gMultiText_BerryBlenderMaxSpeedRecord[]; +extern const u8 gMultiText_2P3P4P[]; +extern const u8 gMultiText_Saving[]; + +// link +extern const u8 gMultiText_LinkError[]; + +// option_menu +extern const u8 gSystemText_OptionMenu[]; +extern const u8 gSystemText_TextSpeed[]; +extern const u8 gSystemText_BattleScene[]; +extern const u8 gSystemText_BattleStyle[]; +extern const u8 gSystemText_Sound[]; +extern const u8 gSystemText_Frame[]; +extern const u8 gSystemText_Cancel[]; +extern const u8 gSystemText_ButtonMode[]; +extern const u8 gSystemText_Slow[]; +extern const u8 gSystemText_Mid[]; +extern const u8 gSystemText_Fast[]; +extern const u8 gSystemText_On[]; +extern const u8 gSystemText_Off[]; +extern const u8 gSystemText_Shift[]; +extern const u8 gSystemText_Set[]; +extern const u8 gSystemText_Mono[]; +extern const u8 gSystemText_Stereo[]; +extern const u8 gSystemText_Type[]; +extern const u8 gSystemText_Terminator[]; +extern const u8 gSystemText_Normal[]; +extern const u8 gSystemText_LR[]; +extern const u8 gSystemText_LA[]; + +// start_menu +extern const u8 SystemText_Pokedex[]; +extern const u8 SystemText_Pokemon[]; +extern const u8 SystemText_BAG[]; +extern const u8 SystemText_Pokenav[]; +extern const u8 SystemText_Player[]; +extern const u8 SystemText_Save[]; +extern const u8 SystemText_Option[]; +extern const u8 SystemText_Exit[]; +extern const u8 SystemText_Retire[]; +extern const u8 gOtherText_SafariStock[]; + +// mystery_event_menu +extern const u8 gSystemText_LinkStandby[]; +extern const u8 gSystemText_LoadEventPressA[]; +extern const u8 gSystemText_LoadingEvent[]; +extern const u8 gSystemText_DontCutLink[]; +extern const u8 gSystemText_EventLoadSuccess[]; +extern const u8 gSystemText_LoadingError[]; + +// field_region_map +extern const u8 gOtherText_Hoenn[]; + +// field_player_avatar +extern const u8 gOtherText_OhABite[]; +extern const u8 gOtherText_PokeOnHook[]; +extern const u8 gOtherText_NotEvenANibble[]; +extern const u8 gOtherText_ItGotAway[]; + +// trade +extern const u8 gTradeText_WillBeSent[]; +extern const u8 gTradeText_ByeBye[]; +extern const u8 gTradeText_SentOverPoke[]; +extern const u8 gTradeText_TakeGoodCare[]; +extern const u8 TradeText_Cancel[]; +extern const u8 TradeText_ChoosePoke[]; +extern const u8 TradeText_Summary1[]; +extern const u8 TradeText_Trade1[]; +extern const u8 TradeText_CancelTradePrompt[]; +extern const u8 TradeText_PressBToExit[]; +extern const u8 TradeText_Summary2[]; +extern const u8 TradeText_Trade2[]; +extern const u8 TradeText_LinkStandby[]; +extern const u8 TradeText_TradeCancelled[]; +extern const u8 TradeText_OnlyPoke[]; +extern const u8 TradeText_NonTradablePoke[]; +extern const u8 TradeText_WaitingForFriend[]; +extern const u8 TradeText_WantToTrade[]; +extern const u8 gTradeText_TradeOkayPrompt[]; +extern const u8 gOtherText_Terminator2[]; +extern const u8 gOtherText_ControlAndMiscText[]; +extern const u8 gOtherText_FourQuestions[]; + +// easy_chat +extern const u8 gEasyChatGroupName_Pokemon[]; +extern const u8 gEasyChatGroupName_Trainer[]; +extern const u8 gEasyChatGroupName_Status[]; +extern const u8 gEasyChatGroupName_Battle[]; +extern const u8 gEasyChatGroupName_Greetings[]; +extern const u8 gEasyChatGroupName_People[]; +extern const u8 gEasyChatGroupName_Voices[]; +extern const u8 gEasyChatGroupName_Speech[]; +extern const u8 gEasyChatGroupName_Endings[]; +extern const u8 gEasyChatGroupName_Feelings[]; +extern const u8 gEasyChatGroupName_Conditions[]; +extern const u8 gEasyChatGroupName_Actions[]; +extern const u8 gEasyChatGroupName_Lifestyle[]; +extern const u8 gEasyChatGroupName_Hobbies[]; +extern const u8 gEasyChatGroupName_Time[]; +extern const u8 gEasyChatGroupName_Misc[]; +extern const u8 gEasyChatGroupName_Adjectives[]; +extern const u8 gEasyChatGroupName_Events[]; +extern const u8 gEasyChatGroupName_Move1[]; +extern const u8 gEasyChatGroupName_Move2[]; +extern const u8 gEasyChatGroupName_TrendySaying[]; +extern const u8 gEasyChatGroupName_Pokemon2[]; +extern const u8 gOtherText_ThreeQuestions[]; + +// mail +extern const u8 gOtherText_From[]; + +// record_mixing +extern const u8 gOtherText_MixingRecordsWithFriend[]; +extern const u8 gOtherText_MixingComplete[]; + +// trainer_card +extern const u8 gOtherText_TrainersTrainerCard[]; +extern const u8 gOtherText_FirstHOF[]; +extern const u8 gOtherText_LinkCableBattles[]; +extern const u8 gOtherText_BattleTowerWinRecord[]; +extern const u8 gOtherText_ContestRecord[]; +extern const u8 gOtherText_MixingRecord[]; +extern const u8 gOtherText_TradeRecord[]; +extern const u8 gOtherText_Boy[]; +extern const u8 gOtherText_Girl[]; + +// save_menu_util +extern const u8 gOtherText_Player[]; +extern const u8 gOtherText_Badges[]; +extern const u8 gOtherText_Pokedex[]; +extern const u8 gOtherText_PlayTime[]; + +// naming_screen +extern const u8 gOtherText_SentToPC[]; +extern const u8 OtherText_YourName[]; +extern const u8 OtherText_BoxName[]; +extern const u8 OtherText_PokeName[]; + +// pokemon_size_record +extern const u8 gOtherText_Marco[]; + +// roulette +extern const u8 gOtherText_Coins[]; + +// battle_records +extern const u8 gOtherText_BattleResults[]; +extern const u8 gOtherText_WinRecord[]; +extern const u8 gOtherText_WinLoseDraw[]; +extern const u8 gOtherText_SevenDashes[]; +extern const u8 gOtherText_FourDashes[]; +extern const u8 gOtherText_BattleTowerResults[]; +extern const u8 gOtherText_Lv50[]; +extern const u8 gOtherText_Lv100[]; +extern const u8 gOtherText_WinStreak[]; +extern const u8 gOtherText_Current[]; +extern const u8 gOtherText_Record[]; +extern const u8 gOtherText_Prev[]; + +// slot_machine +extern const u8 gOtherText_QuitGamePrompt[]; +extern const u8 gOtherText_MaxCoins[]; +extern const u8 gOtherText_OutOfCoins[]; +extern const u8 gOtherText_DontHaveThreeCoins[]; +extern const u8 gOtherText_ReelTime[]; + +// daycare +extern const u8 DaycareText_GetAlongVeryWell[]; +extern const u8 DaycareText_GetAlong[]; +extern const u8 DaycareText_DontLikeOther[]; +extern const u8 DaycareText_PlayOther[]; +extern const u8 gOtherText_NewLine2[]; +extern const u8 gOtherText_CancelAndLv[]; + +// pokemon_2 +extern const u8 gEggNickname[]; + +// egg_hatch +extern const u8 gOtherText_HatchedFromEgg[]; +extern const u8 gOtherText_NickHatchPrompt[]; + +// learn_move +extern const u8 OtherText_Battle[]; +extern const u8 OtherText_Contest[]; + +// ??? +extern const u8 OtherText_Type[]; +extern const u8 OtherText_PP[]; + +// learn_move +extern const u8 OtherText_Power[]; +extern const u8 OtherText_Accuracy[]; +extern const u8 OtherText_Appeal[]; +extern const u8 OtherText_Jam[]; +extern const u8 gOtherText_TeachWhichMove[]; +extern const u8 gOtherText_TeachSpecificMove[]; +extern const u8 gOtherText_PokeLearnedMove[]; +extern const u8 gOtherText_DeleteOlderMove[]; +extern const u8 gOtherText_StopLearningMove[]; +extern const u8 gOtherText_ForgotMove123[]; +extern const u8 gOtherText_ForgotOrDidNotLearnMove[]; +extern const u8 gOtherText_GiveUpTeachingMove[]; +extern const u8 gOtherText_WhichMoveToForget[]; + +// clear_save_data_menu +extern const u8 gSystemText_ClearAllSaveDataPrompt[]; +extern const u8 gSystemText_ClearingData[]; + +// contest_link_80C2020 +extern const u8 gContestText_AnnounceResults[]; +extern const u8 gContestText_PreliminaryResults[]; +extern const u8 gContestText_Round2Results[]; +extern const u8 gContestText_PokeWon[]; +extern const u8 gOtherText_LinkStandby[]; + +// landmark +extern const u8 gLandmarkName_FlowerShop[]; +extern const u8 gLandmarkName_PetalburgWoods[]; +extern const u8 gLandmarkName_MrBrineysCottage[]; +extern const u8 gLandmarkName_AbandonedShip[]; +extern const u8 gLandmarkName_SeashoreHouse[]; +extern const u8 gLandmarkName_SlateportBeach[]; +extern const u8 gLandmarkName_CyclingRoad[]; +extern const u8 gLandmarkName_NewMauville[]; +extern const u8 gLandmarkName_TrickHouse[]; +extern const u8 gLandmarkName_OldLadysRestShop[]; +extern const u8 gLandmarkName_Desert[]; +extern const u8 gLandmarkName_WinstrateFamily[]; +extern const u8 gLandmarkName_CableCar[]; +extern const u8 gLandmarkName_GlassWorkshop[]; +extern const u8 gLandmarkName_WeatherInstitute[]; +extern const u8 gLandmarkName_MeteorFalls[]; +extern const u8 gLandmarkName_TunnelersRestHouse[]; +extern const u8 gLandmarkName_RusturfTunnel[]; +extern const u8 gLandmarkName_PokemonDayCare[]; +extern const u8 gLandmarkName_SafariZoneEntrance[]; +extern const u8 gLandmarkName_MtPyre[]; +extern const u8 gLandmarkName_ShoalCave[]; +extern const u8 gLandmarkName_SeafloorCavern[]; +extern const u8 gLandmarkName_GraniteCave[]; +extern const u8 gLandmarkName_OceanCurrent[]; +extern const u8 gLandmarkName_LanettesHouse[]; +extern const u8 gLandmarkName_FieryPath[]; +extern const u8 gLandmarkName_JaggedPass[]; +extern const u8 gLandmarkName_SkyPillar[]; +extern const u8 gLandmarkName_BerryMastersHouse[]; +extern const u8 gLandmarkName_IslandCave[]; +extern const u8 gLandmarkName_DesertRuins[]; +extern const u8 gLandmarkName_ScorchedSlab[]; +extern const u8 gLandmarkName_AncientTomb[]; +extern const u8 gLandmarkName_SealedChamber[]; +extern const u8 gLandmarkName_FossilManiacsHouse[]; +extern const u8 gLandmarkName_HuntersHouse[]; + +// pokemon_summary_screen +extern const u8 gOtherText_Terminator4[]; +extern const u8 gOtherText_Nature[]; +extern const u8 gOtherText_Comma[]; +extern const u8 gOtherText_Met[]; +extern const u8 gOtherText_Egg2[]; +extern const u8 gOtherText_ObtainedInTrade[]; +extern const u8 gOtherText_FatefulEncounter[]; +extern const u8 gOtherText_Met2[]; +extern const u8 gOtherText_EggDayCare[]; +extern const u8 gOtherText_EggNicePlace[]; +extern const u8 gOtherText_EggObtainedInTrade[]; +extern const u8 gOtherText_EggHotSprings[]; + +// evolution_scene, trade +extern const u8 gOtherText_LinkStandby2[]; + +// evolution_scene +extern const u8 gOtherText_YesNoAndPlayer[]; + +// diploma +extern const u8 gOtherText_HoennDex[]; +extern const u8 gOtherText_NationalDex[]; +extern const u8 gOtherText_DiplomaCertificationGameFreak[]; + +// cable_club +extern const u8 gOtherText_PLink[]; + +// berry_blender +extern const u8 gOtherText_YesNoTerminating[]; +extern const u8 gOtherText_LinkNotFound[]; +extern const u8 gOtherText_BlenderChooseBerry[]; +extern const u8 gOtherText_PokeBlockMade[]; +extern const u8 gOtherText_PressAToStart[]; +extern const u8 gOtherText_PleaseWait[]; +extern const u8 gOtherText_LinkStandby3[]; +extern const u8 gOtherText_BlendAnotherBerryPrompt[]; +extern const u8 gOtherText_OutOfBerries[]; +extern const u8 gOtherText_CaseIsFull[]; +extern const u8 gOtherText_NoBerriesForBlend[]; +extern const u8 gOtherText_OtherCaseIsFull[]; +extern const u8 gOtherText_ResultsOfBlending[]; +extern const u8 gOtherText_Berry[]; +extern const u8 gOtherText_RequiredTime[]; +extern const u8 gOtherText_Min[]; +extern const u8 gOtherText_Sec[]; +extern const u8 gOtherText_MaxSpeed[]; +extern const u8 gOtherText_RPM[]; +extern const u8 gOtherText_Ranking[]; +extern const u8 gOtherText_BlockLevelIs[]; +extern const u8 gOtherText_BlockFeelIs[]; +extern const u8 gOtherText_Period[]; + +// reset_rtc_screen +extern const u8 gOtherText_Day[]; +extern const u8 gOtherText_OK[]; + +// wallclock +extern const u8 gOtherText_CorrectTimePrompt[]; + +#endif // GUARD_STRINGS2_H -- cgit v1.2.3 From ca6485a3b23102c96bf046bfacb3b994d83f9555 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 21 May 2017 13:25:26 +0200 Subject: Add data2 header --- include/data2.h | 46 +++++++++++++++++++++++++++++++++++++++++++ include/script_pokemon_80C4.h | 5 ----- 2 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 include/data2.h (limited to 'include') diff --git a/include/data2.h b/include/data2.h new file mode 100644 index 000000000..987c7cb2e --- /dev/null +++ b/include/data2.h @@ -0,0 +1,46 @@ +#ifndef GUARD_DATA2_H +#define GUARD_DATA2_H + +#include "sprite.h" + +struct UnknownStructD2 { + u32 unk0; + u32 unk4; + u32 unk8; +}; + +struct MonCoords +{ + // This would use a bitfield, but sub_8079F44 + // uses it as a u8 and casting won't match. + u8 coords; // u8 x:4, y:4; + u8 y_offset; +}; + +extern const union AffineAnimCmd *const gSpriteAffineAnimTable_81E7C18; +extern const union AnimCmd *const gSpriteAnimTable_81E7C64[]; +extern struct MonCoords gMonFrontPicCoords[]; +extern struct MonCoords gMonBackPicCoords[]; +extern struct SpriteSheet gMonFrontPicTable[]; +extern struct SpriteSheet gMonBackPicTable[]; +extern const struct SpritePalette gMonPaletteTable[]; +extern const struct SpritePalette gMonShinyPaletteTable[]; +extern const union AnimCmd *const *const gUnknown_081EC2A4[]; +extern const union AnimCmd *const *const gUnknown_081ECACC[]; +extern struct MonCoords gTrainerBackPicCoords[]; +extern struct SpriteSheet gTrainerBackPicTable[]; +extern struct SpritePalette gTrainerBackPicPaletteTable[]; +extern u8 gEnemyMonElevation[]; +extern const u8 gTrainerClassNames[][13]; +extern const struct Trainer gTrainers[]; +extern u8 gSpeciesNames[][11]; +extern u8 gMoveNames[][13]; +extern const struct UnknownStructD2 gUnknown_081F9674; +extern const u8 gUnknown_081F96C8[]; +extern struct SpriteSheet gUnknown_081FAEA4; +extern struct SpritePalette gUnknown_081FAEAC; +extern const struct SpriteTemplate gSpriteTemplate_81FAF0C; +extern void *gUnknown_081FAF4C[]; +extern struct BattleMove gBattleMoves[]; + +#endif // GUARD_DATA2_H diff --git a/include/script_pokemon_80C4.h b/include/script_pokemon_80C4.h index 6d4e689b5..629980a2d 100644 --- a/include/script_pokemon_80C4.h +++ b/include/script_pokemon_80C4.h @@ -1,11 +1,6 @@ #ifndef GUARD_SCRIPTPOKE80C4_H #define GUARD_SCRIPTPOKE80C4_H -struct MonCoords -{ - u8 x, y; -}; - void sub_80C5190(u8); void sub_80C5580(void); void SetBattleTowerPlayerParty(void); -- cgit v1.2.3 From 6508197cbbd6a10226958d4e4b6bebb4fc754cad Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 21 May 2017 13:31:26 +0200 Subject: Define gSineTable in trig.h --- include/trig.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/trig.h b/include/trig.h index 5a948e1ef..03d8c453e 100644 --- a/include/trig.h +++ b/include/trig.h @@ -1,6 +1,8 @@ #ifndef GUARD_TRIG_H #define GUARD_TRIG_H +extern s16 gSineTable[]; + s16 Sin(s16 index, s16 amplitude); s16 Cos(s16 index, s16 amplitude); s16 Sin2(u16 angle); -- cgit v1.2.3 From 6a02a6f6e5f90ae5ddf38bd69c90734a50d9142b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 21 May 2017 11:30:23 -0400 Subject: sub_805CE0C and helpers --- include/field_map_obj.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/field_map_obj.h b/include/field_map_obj.h index dfc41d38b..ca0852a96 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -6,6 +6,6 @@ void sub_805C058(struct MapObject *mapObject, s16 a, s16 b); void FieldObjectSetDirection(struct MapObject *pObject, u8 unk_18); void MoveCoords(u8 direction, s16 *x, s16 *y); -void meta_step(struct MapObject *pObject, struct Sprite *pSprite, u32 (*d8)()); +void meta_step(struct MapObject *pObject, struct Sprite *pSprite, u8 (*d8)()); #endif // GUARD_FIELD_MAP_OBJ_H -- cgit v1.2.3 From 42e6ed382f1e9fdf3f28e2dd048fc99bbd56b347 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 22 May 2017 08:34:47 -0400 Subject: sub_805E174 --- include/field_map_obj.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'include') diff --git a/include/field_map_obj.h b/include/field_map_obj.h index ca0852a96..4c2d4c705 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -8,4 +8,35 @@ void FieldObjectSetDirection(struct MapObject *pObject, u8 unk_18); void MoveCoords(u8 direction, s16 *x, s16 *y); void meta_step(struct MapObject *pObject, struct Sprite *pSprite, u8 (*d8)()); +extern const u8 gUnknown_08375240[4]; +extern u8 (*const gUnknown_08375244[])(s16 a0, s16 a1, s16 a2, s16 a3); + +extern u8 (*const gUnknown_08375270[])(struct MapObject *mapObject, struct Sprite *sprite); +extern u8 (*const gUnknown_08375284[])(struct MapObject *mapObject, struct Sprite *sprite); +extern const u8 gUnknown_083752A0[2]; +extern u8 (*const gUnknown_083752A4[])(struct MapObject *mapObject, struct Sprite *sprite); +extern const u8 gUnknown_083752C0[2]; +extern u8 (*const gUnknown_083752C4[])(struct MapObject *mapObject, struct Sprite *sprite); +extern u8 (*const gUnknown_083752D0[])(struct MapObject *mapObject, struct Sprite *sprite); +extern u8 (*const gUnknown_083752E4[])(struct MapObject *mapObject, struct Sprite *sprite); +extern u8 (*const gUnknown_083752F8[])(struct MapObject *mapObject, struct Sprite *sprite); +extern u8 (*const gUnknown_0837530C[])(struct MapObject *mapObject, struct Sprite *sprite); +extern const u8 gUnknown_08375320[2]; +extern u8 (*const gUnknown_08375324[])(struct MapObject *mapObject, struct Sprite *sprite); +extern const u8 gUnknown_08375338[2]; +extern u8 (*const gUnknown_0837533C[])(struct MapObject *mapObject, struct Sprite *sprite); +extern const u8 gUnknown_08375350[2]; +extern u8 (*const gUnknown_08375354[])(struct MapObject *mapObject, struct Sprite *sprite); +extern const u8 gUnknown_08375368[2]; +extern u8 (*const gUnknown_0837536C[])(struct MapObject *mapObject, struct Sprite *sprite); +extern const u8 gUnknown_08375380[2]; +extern u8 (*const gUnknown_08375384[])(struct MapObject *mapObject, struct Sprite *sprite); +extern const u8 gUnknown_08375398[2]; +extern u8 (*const gUnknown_0837539C[])(struct MapObject *mapObject, struct Sprite *sprite); +extern const u8 gUnknown_083753B0[2]; +extern u8 (*const gUnknown_083753B4[])(struct MapObject *mapObject, struct Sprite *sprite); +extern const u8 gUnknown_083753C8[2]; +extern u8 (*const gUnknown_083753CC[])(struct MapObject *mapObject, struct Sprite *sprite); +extern const u8 gUnknown_083753DC[5]; + #endif // GUARD_FIELD_MAP_OBJ_H -- cgit v1.2.3 From 4c42206a7f63b2045eae85ad2b4a60a630178d4c Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 22 May 2017 14:40:21 -0400 Subject: Create and propagate field map object callback declaration macro --- include/field_map_obj.h | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) (limited to 'include') diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 4c2d4c705..00fda8358 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -3,40 +3,49 @@ #include "sprite.h" +#define fieldmap_object_cb(setup, callback, table) \ +extern u8 (*const table[])(struct MapObject *, struct Sprite *);\ +static u8 callback(struct MapObject *, struct Sprite *);\ +void setup(struct Sprite *sprite)\ +{\ + meta_step(&gMapObjects[sprite->data0], sprite, callback);\ +}\ +static u8 callback(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + return table[sprite->data1](mapObject, sprite);\ +} + +#define fieldmap_object_null_cb(setup, callback) \ +static u8 callback(struct MapObject *, struct Sprite *);\ +void setup(struct Sprite *sprite)\ +{\ + meta_step(&gMapObjects[sprite->data0], sprite, callback);\ +}\ +static u8 callback(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + return 0;\ +} + void sub_805C058(struct MapObject *mapObject, s16 a, s16 b); void FieldObjectSetDirection(struct MapObject *pObject, u8 unk_18); void MoveCoords(u8 direction, s16 *x, s16 *y); -void meta_step(struct MapObject *pObject, struct Sprite *pSprite, u8 (*d8)()); +void meta_step(struct MapObject *pObject, struct Sprite *pSprite, u8 (*d8)(struct MapObject *, struct Sprite *)); +void npc_reset(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_08375240[4]; extern u8 (*const gUnknown_08375244[])(s16 a0, s16 a1, s16 a2, s16 a3); -extern u8 (*const gUnknown_08375270[])(struct MapObject *mapObject, struct Sprite *sprite); -extern u8 (*const gUnknown_08375284[])(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_083752A0[2]; -extern u8 (*const gUnknown_083752A4[])(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_083752C0[2]; -extern u8 (*const gUnknown_083752C4[])(struct MapObject *mapObject, struct Sprite *sprite); -extern u8 (*const gUnknown_083752D0[])(struct MapObject *mapObject, struct Sprite *sprite); -extern u8 (*const gUnknown_083752E4[])(struct MapObject *mapObject, struct Sprite *sprite); -extern u8 (*const gUnknown_083752F8[])(struct MapObject *mapObject, struct Sprite *sprite); -extern u8 (*const gUnknown_0837530C[])(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_08375320[2]; -extern u8 (*const gUnknown_08375324[])(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_08375338[2]; -extern u8 (*const gUnknown_0837533C[])(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_08375350[2]; -extern u8 (*const gUnknown_08375354[])(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_08375368[2]; -extern u8 (*const gUnknown_0837536C[])(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_08375380[2]; -extern u8 (*const gUnknown_08375384[])(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_08375398[2]; -extern u8 (*const gUnknown_0837539C[])(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_083753B0[2]; -extern u8 (*const gUnknown_083753B4[])(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_083753C8[2]; -extern u8 (*const gUnknown_083753CC[])(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_083753DC[5]; +extern const u8 gUnknown_083753F4[5]; #endif // GUARD_FIELD_MAP_OBJ_H -- cgit v1.2.3 From abe5f5053624f876ea17c44370b203c0a4ace86b Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 22 May 2017 17:21:17 -0400 Subject: Another chunk of library-like functions --- include/field_ground_effect.h | 10 ++++++++++ include/field_map_obj.h | 4 ++++ include/fieldmap.h | 4 ++++ 3 files changed, 18 insertions(+) create mode 100644 include/field_ground_effect.h (limited to 'include') diff --git a/include/field_ground_effect.h b/include/field_ground_effect.h new file mode 100644 index 000000000..590923041 --- /dev/null +++ b/include/field_ground_effect.h @@ -0,0 +1,10 @@ +// +// Created by Scott Norton on 5/22/17. +// + +#ifndef POKERUBY_FIELD_GROUND_EFFECT_H +#define POKERUBY_FIELD_GROUND_EFFECT_H + +bool8 IsZCoordMismatchAt(u8 z, s16 x, s16 y); + +#endif //POKERUBY_FIELD_GROUND_EFFECT_H diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 00fda8358..4f611aab2 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -26,6 +26,8 @@ static u8 callback(struct MapObject *mapObject, struct Sprite *sprite)\ return 0;\ } +bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *mapObject, s16 x, s16 y); + void sub_805C058(struct MapObject *mapObject, s16 a, s16 b); void FieldObjectSetDirection(struct MapObject *pObject, u8 unk_18); void MoveCoords(u8 direction, s16 *x, s16 *y); @@ -48,4 +50,6 @@ extern const u8 gUnknown_083753C8[2]; extern const u8 gUnknown_083753DC[5]; extern const u8 gUnknown_083753F4[5]; +extern const u8 gUnknown_0837567B[9]; + #endif // GUARD_FIELD_MAP_OBJ_H diff --git a/include/fieldmap.h b/include/fieldmap.h index 936d27b4a..87f113122 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -1,6 +1,10 @@ #ifndef GUARD_FIELDMAP2_H #define GUARD_FIELDMAP2_H +#include "field_map_obj.h" struct MapHeader *mapconnection_get_mapheader(struct MapConnection *connection); +int GetMapBorderIdAt(int x, int y); +bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 y, u8 direction); +int CanCameraMoveInDirection(int direction); #endif -- cgit v1.2.3 From b087d8a909925baf772aa0d631318fb17667067c Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 22 May 2017 19:31:47 -0400 Subject: IsCoordOutsideFieldObjectMovementRect and others --- include/asm.inc.h | 8 ++++++++ include/field_map_obj.h | 1 - include/fieldmap.h | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm.inc.h b/include/asm.inc.h index 3db79b128..8921d14cd 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -1,6 +1,14 @@ // src/rom3.o void sub_800C35C(void); +struct UnkStruct8060024 { + u8 outsideMovementRect:1; + u8 tileIsImpassable:1; + u8 elevationMismatch:1; + u8 pathBlockedByObject:1; + u8 pad_04:4; +}; + // asm/battle_2.o void sub_800E7C4(void); u8 b_first_side(u8, u8, u8); diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 4f611aab2..c160f1c72 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -26,7 +26,6 @@ static u8 callback(struct MapObject *mapObject, struct Sprite *sprite)\ return 0;\ } -bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *mapObject, s16 x, s16 y); void sub_805C058(struct MapObject *mapObject, s16 a, s16 b); void FieldObjectSetDirection(struct MapObject *pObject, u8 unk_18); diff --git a/include/fieldmap.h b/include/fieldmap.h index 87f113122..530e15798 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -4,7 +4,7 @@ struct MapHeader *mapconnection_get_mapheader(struct MapConnection *connection); int GetMapBorderIdAt(int x, int y); -bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 y, u8 direction); +extern bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 y, u8 direction); int CanCameraMoveInDirection(int direction); #endif -- cgit v1.2.3 From 5b4191d55480021c5a26a11a0acbd26b8e3f4053 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 22 May 2017 22:30:35 -0400 Subject: Halfway mark on asm/field_map_obj.s --- include/field_map_obj.h | 4 ++++ 1 file changed, 4 insertions(+) mode change 100644 => 100755 include/field_map_obj.h (limited to 'include') diff --git a/include/field_map_obj.h b/include/field_map_obj.h old mode 100644 new mode 100755 index c160f1c72..e66ffa28f --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -48,6 +48,10 @@ extern const u8 gUnknown_083753B0[2]; extern const u8 gUnknown_083753C8[2]; extern const u8 gUnknown_083753DC[5]; extern const u8 gUnknown_083753F4[5]; +extern const u8 gUnknown_08375418[4]; +extern const u8 gUnknown_08375428[4]; +extern const u8 gUnknown_08375438[4]; +extern const u8 gUnknown_08375448[4]; extern const u8 gUnknown_0837567B[9]; -- cgit v1.2.3 From 9c3a25305cfa90021caae4f3a64e5de5ebc6cd45 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 23 May 2017 08:52:21 -0400 Subject: Knock off twenty more field object callbacks --- include/field_map_obj.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include') diff --git a/include/field_map_obj.h b/include/field_map_obj.h index e66ffa28f..559183cd3 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -52,6 +52,26 @@ extern const u8 gUnknown_08375418[4]; extern const u8 gUnknown_08375428[4]; extern const u8 gUnknown_08375438[4]; extern const u8 gUnknown_08375448[4]; +extern const u8 gUnknown_08375458[4]; +extern const u8 gUnknown_08375468[4]; +extern const u8 gUnknown_08375240[4]; +extern const u8 gUnknown_08375484[4]; +extern const u8 gUnknown_08375494[4]; +extern const u8 gUnknown_083754A4[4]; +extern const u8 gUnknown_083754B4[4]; +extern const u8 gUnknown_083754C4[4]; +extern const u8 gUnknown_083754D4[4]; +extern const u8 gUnknown_083754E4[4]; +extern const u8 gUnknown_083754F4[4]; +extern const u8 gUnknown_08375504[4]; +extern const u8 gUnknown_08375514[4]; +extern const u8 gUnknown_08375524[4]; +extern const u8 gUnknown_08375534[4]; +extern const u8 gUnknown_08375544[4]; +extern const u8 gUnknown_08375554[4]; +extern const u8 gUnknown_08375564[4]; +extern const u8 gUnknown_08375574[4]; +extern const u8 gUnknown_08375584[4]; extern const u8 gUnknown_0837567B[9]; -- cgit v1.2.3 From 48a3b78f82095fb2bd77db7c1c296158deacd76e Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 23 May 2017 10:16:08 -0400 Subject: IsMetatileDirectionallyImpassable, CheckForCollisionBetweenFieldObjects --- include/field_ground_effect.h | 1 + include/field_map_obj.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/field_ground_effect.h b/include/field_ground_effect.h index 590923041..8a69426b3 100644 --- a/include/field_ground_effect.h +++ b/include/field_ground_effect.h @@ -6,5 +6,6 @@ #define POKERUBY_FIELD_GROUND_EFFECT_H bool8 IsZCoordMismatchAt(u8 z, s16 x, s16 y); +bool8 AreZCoordsCompatible(u8 z1, u8 z2); #endif //POKERUBY_FIELD_GROUND_EFFECT_H diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 559183cd3..80add1403 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -35,6 +35,8 @@ void npc_reset(struct MapObject *mapObject, struct Sprite *sprite); extern const u8 gUnknown_08375240[4]; extern u8 (*const gUnknown_08375244[])(s16 a0, s16 a1, s16 a2, s16 a3); +extern bool8 (*const gUnknown_08375684[4])(u8); +extern bool8 (*const gUnknown_08375694[4])(u8); extern const u8 gUnknown_083752A0[2]; extern const u8 gUnknown_083752C0[2]; -- cgit v1.2.3 From 8155a807befd4f55f31a38a4535225221708783d Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 23 May 2017 11:13:36 -0400 Subject: Another set of functions related to adjusting coordinates --- include/field_map_obj.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 80add1403..3a56ed636 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -77,4 +77,6 @@ extern const u8 gUnknown_08375584[4]; extern const u8 gUnknown_0837567B[9]; +extern const struct Coords16 gDirectionToVector[]; + #endif // GUARD_FIELD_MAP_OBJ_H -- cgit v1.2.3 From 9684b862198f763e66a4f6348cc1f1cdef075ec0 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 23 May 2017 12:06:33 -0400 Subject: Some more functions related to FMO camera and special anims --- include/field_camera.h | 10 ++++++++++ include/field_map_obj.h | 4 ++++ 2 files changed, 14 insertions(+) (limited to 'include') diff --git a/include/field_camera.h b/include/field_camera.h index 51c370d0a..9021b579e 100644 --- a/include/field_camera.h +++ b/include/field_camera.h @@ -1,6 +1,16 @@ #ifndef GUARD_FIELD_CAMERA_H #define GUARD_FIELD_CAMERA_H +struct CameraSomething +{ + void (*callback)(struct CameraSomething *); + u32 unk4; + s32 unk8; + s32 unkC; + s32 unk10; + s32 unk14; +}; + void move_tilemap_camera_to_upper_left_corner(void); void sub_8057A58(void); void sub_8057B14(u16 *a, u16 *b); diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 3a56ed636..44212ac47 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -79,4 +79,8 @@ extern const u8 gUnknown_0837567B[9]; extern const struct Coords16 gDirectionToVector[]; +extern struct CameraSomething gUnknown_03004880; +extern s16 gUnknown_03004898; +extern s16 gUnknown_0300489C; + #endif // GUARD_FIELD_MAP_OBJ_H -- cgit v1.2.3 From f678fe263da7deeeb060672a3520b4b1d71ce848 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 23 May 2017 13:50:14 -0400 Subject: Another chunk of largely-identical FMO functions --- include/asm.inc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm.inc.h b/include/asm.inc.h index 8921d14cd..9bd8324ad 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -128,7 +128,7 @@ u8 sub_80608D0(u8); u8 GetStepInPlaceDelay32AnimId(u8 a); u8 GetStepInPlaceDelay16AnimId(u8); u8 GetStepInPlaceDelay8AnimId(u8 a); -u8 FieldObjectFaceOppositeDirection(void *, u8); +u8 FieldObjectFaceOppositeDirection(struct MapObject *, u8); u8 sub_80609D8(u8); u8 sub_8060A04(u8); u8 sub_8060A30(u8); -- cgit v1.2.3 From 39e0ce9f6d6dab0f9d72f967ba6fef23398bb342 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 23 May 2017 14:27:22 -0400 Subject: up through state_to_direction, which is nonmatching (help, registers are misbehaving) --- include/field_map_obj.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 44212ac47..07aba90e5 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -76,6 +76,10 @@ extern const u8 gUnknown_08375574[4]; extern const u8 gUnknown_08375584[4]; extern const u8 gUnknown_0837567B[9]; +extern const u8 gUnknown_0837574F[8]; + +extern const u8 gUnknown_08375757[4][4]; +extern const u8 gUnknown_08375767[4][4]; extern const struct Coords16 gDirectionToVector[]; -- cgit v1.2.3 From d44cefb06d4d2e160db450a27b74a739753d24dd Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 23 May 2017 15:26:25 -0400 Subject: Some more field map object functions; asm/field_map_obj.s down to 7k lines --- include/field_map_obj.h | 2 ++ include/field_map_obj_helpers.h | 1 + 2 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 07aba90e5..8b8ef78ea 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -83,6 +83,8 @@ extern const u8 gUnknown_08375767[4][4]; extern const struct Coords16 gDirectionToVector[]; +extern u8 (**const gUnknown_08375778[])(struct MapObject *, struct Sprite *); + extern struct CameraSomething gUnknown_03004880; extern s16 gUnknown_03004898; extern s16 gUnknown_0300489C; diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h index daae74ae9..2481e143d 100644 --- a/include/field_map_obj_helpers.h +++ b/include/field_map_obj_helpers.h @@ -8,5 +8,6 @@ void UnfreezeMapObjects(void); void sub_806487C(struct Sprite *sprite, bool8 invisible); void sub_8064990(u8, u8); void UnfreezeMapObject(struct MapObject *mapObject); +void oamt_npc_ministep_reset(struct Sprite *sprite, u8 a2, u8 a3); #endif -- cgit v1.2.3 From d60a59a62738c9c56119b607f6a875556723d0bb Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 23 May 2017 19:21:07 -0400 Subject: Another chunk of functions with similar (and, in some cases, identical) decompilation --- include/field_map_obj_helpers.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h index 2481e143d..a61dcc63c 100644 --- a/include/field_map_obj_helpers.h +++ b/include/field_map_obj_helpers.h @@ -9,5 +9,7 @@ void sub_806487C(struct Sprite *sprite, bool8 invisible); void sub_8064990(u8, u8); void UnfreezeMapObject(struct MapObject *mapObject); void oamt_npc_ministep_reset(struct Sprite *sprite, u8 a2, u8 a3); +void sub_806467C(struct Sprite *sprite, u8 direction); +bool8 sub_806468C(struct Sprite *sprite); #endif -- cgit v1.2.3 From 4fe02ea081863fcdc6022ca8e608875265645326 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 23 May 2017 20:38:42 -0400 Subject: Fix building --- include/field_map_obj.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 8b8ef78ea..2bd875f17 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -86,7 +86,7 @@ extern const struct Coords16 gDirectionToVector[]; extern u8 (**const gUnknown_08375778[])(struct MapObject *, struct Sprite *); extern struct CameraSomething gUnknown_03004880; -extern s16 gUnknown_03004898; -extern s16 gUnknown_0300489C; +extern u16 gUnknown_03004898; +extern u16 gUnknown_0300489C; #endif // GUARD_FIELD_MAP_OBJ_H -- cgit v1.2.3 From 5b525b279413b08bc5841255d390f6e95187d787 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Sun, 21 May 2017 22:17:31 +0200 Subject: Identify gUnknown_3001764 --- include/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/main.h b/include/main.h index aef55a182..e0cb09370 100644 --- a/include/main.h +++ b/include/main.h @@ -43,7 +43,7 @@ struct Main /*0x43D*/ u8 inBattle:1; }; -extern u8 gUnknown_3001764; +extern u8 gLinkTransferringData; extern struct Main gMain; extern bool8 gSoftResetDisabled; extern bool8 gLinkVSyncDisabled; -- cgit v1.2.3 From fe2090c222eab31db62c9d599e6e95f6898c8ebc Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Sun, 21 May 2017 23:40:08 +0200 Subject: Various intro naming --- include/intro.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/intro.h b/include/intro.h index 7fdbd9cb0..6d4d2daf3 100644 --- a/include/intro.h +++ b/include/intro.h @@ -1,8 +1,8 @@ #ifndef GUARD_INTRO_H #define GUARD_INTRO_H -void c2_copyright_1(void); -void CB2_InitCopyrightScreen(void); +void CB2_InitCopyrightScreenAfterBootup(void); +void CB2_InitCopyrightScreenAfterTitleScreen(void); void sub_813CE30(u16, u16, u16, u16); #endif // GUARD_INTRO_H -- cgit v1.2.3 From 6bfb9af365db91947ee65ceaa15ad0c2dba4147d Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 24 May 2017 15:59:43 -0400 Subject: sub_806113C --- include/field_map_obj_helpers.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h index a61dcc63c..f8554587c 100644 --- a/include/field_map_obj_helpers.h +++ b/include/field_map_obj_helpers.h @@ -11,5 +11,6 @@ void UnfreezeMapObject(struct MapObject *mapObject); void oamt_npc_ministep_reset(struct Sprite *sprite, u8 a2, u8 a3); void sub_806467C(struct Sprite *sprite, u8 direction); bool8 sub_806468C(struct Sprite *sprite); +void sub_80646E4(struct Sprite *sprite, u8 a2, u8 a3, u8 a4); #endif -- cgit v1.2.3 From 3a1e42f8f1929d5c74ee931de511d7f481db9756 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 24 May 2017 16:12:44 -0400 Subject: maybe_shadow_1 --- include/field_map_obj_helpers.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h index f8554587c..0280dc502 100644 --- a/include/field_map_obj_helpers.h +++ b/include/field_map_obj_helpers.h @@ -12,5 +12,6 @@ void oamt_npc_ministep_reset(struct Sprite *sprite, u8 a2, u8 a3); void sub_806467C(struct Sprite *sprite, u8 direction); bool8 sub_806468C(struct Sprite *sprite); void sub_80646E4(struct Sprite *sprite, u8 a2, u8 a3, u8 a4); +void DoShadowFieldEffect(struct MapObject *mapObject); #endif -- cgit v1.2.3 From 0cb48e9bb08b4efd157748d7e2446c12450b9b46 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 24 May 2017 17:10:40 -0400 Subject: A couple more functions in FMO --- include/field_map_obj_helpers.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h index 0280dc502..119cdd5f8 100644 --- a/include/field_map_obj_helpers.h +++ b/include/field_map_obj_helpers.h @@ -13,5 +13,7 @@ void sub_806467C(struct Sprite *sprite, u8 direction); bool8 sub_806468C(struct Sprite *sprite); void sub_80646E4(struct Sprite *sprite, u8 a2, u8 a3, u8 a4); void DoShadowFieldEffect(struct MapObject *mapObject); +u8 sub_8064704(struct Sprite *); +u8 sub_806478C(struct Sprite *); #endif -- cgit v1.2.3 From 4e3874a3febde4ba5f8c247004b4f84bf098bc9c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 24 May 2017 20:19:30 -0400 Subject: Swiss cheese to put off these functions for later --- include/field_map_obj.h | 1 + include/field_player_avatar.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 include/field_player_avatar.h (limited to 'include') diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 2bd875f17..67d96012d 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -89,4 +89,5 @@ extern struct CameraSomething gUnknown_03004880; extern u16 gUnknown_03004898; extern u16 gUnknown_0300489C; +int state_to_direction(u8, u8, u8); #endif // GUARD_FIELD_MAP_OBJ_H diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h old mode 100644 new mode 100755 index d3e4b9132..fc21c4e3c --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -33,7 +33,7 @@ void SetPlayerAvatarTransitionFlags(u16 a); // PlayerAvatarTransition_Underwater // sub_80591F4 void sub_8059204(void); -// player_get_x22 +u8 player_get_x22(void); void PlayerSetAnimId(u8 a, u8 b); void PlayerGoSpeed0(u8 a); void sub_80593C4(u8 a); -- cgit v1.2.3 From fc8cc3767f0e424fbc590e24852a1ca73f89d9a9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 25 May 2017 08:46:38 -0400 Subject: A couple more map object callbacks --- include/field_map_obj.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 67d96012d..0347b90d4 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -89,5 +89,7 @@ extern struct CameraSomething gUnknown_03004880; extern u16 gUnknown_03004898; extern u16 gUnknown_0300489C; +extern u32 gUnknown_0202FF84[]; + int state_to_direction(u8, u8, u8); #endif // GUARD_FIELD_MAP_OBJ_H -- cgit v1.2.3 From 9ad379c53b64ad7592490f10c324d21064e8863b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 25 May 2017 10:56:39 -0400 Subject: Finish field map object callbacks (except functions known or predicted not to match) --- include/asm.inc.h | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 include/asm.inc.h (limited to 'include') diff --git a/include/asm.inc.h b/include/asm.inc.h old mode 100644 new mode 100755 index 9bd8324ad..dbd3f0820 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -128,6 +128,7 @@ u8 sub_80608D0(u8); u8 GetStepInPlaceDelay32AnimId(u8 a); u8 GetStepInPlaceDelay16AnimId(u8); u8 GetStepInPlaceDelay8AnimId(u8 a); +u8 GetStepInPlaceDelay4AnimId(u8 a); u8 FieldObjectFaceOppositeDirection(struct MapObject *, u8); u8 sub_80609D8(u8); u8 sub_8060A04(u8); -- cgit v1.2.3 From ae24650fbd7814f28d50365881ff388ba9b576b6 Mon Sep 17 00:00:00 2001 From: scnorton Date: Thu, 25 May 2017 16:00:29 -0400 Subject: Decompile another group of functions --- include/field_map_obj_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h index 119cdd5f8..5dceec595 100644 --- a/include/field_map_obj_helpers.h +++ b/include/field_map_obj_helpers.h @@ -15,5 +15,5 @@ void sub_80646E4(struct Sprite *sprite, u8 a2, u8 a3, u8 a4); void DoShadowFieldEffect(struct MapObject *mapObject); u8 sub_8064704(struct Sprite *); u8 sub_806478C(struct Sprite *); - +void obj_anim_image_set_and_seek(struct Sprite *sprite, u8 a2, u8 a3); #endif -- cgit v1.2.3 From a349844cf1dd164cb309438b53deff4cf1fc8b0a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 25 May 2017 21:19:46 -0400 Subject: Another set of fns --- include/field_effect_helpers.h | 11 +++++++++++ include/trainer_see.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 include/field_effect_helpers.h mode change 100644 => 100755 include/trainer_see.h (limited to 'include') diff --git a/include/field_effect_helpers.h b/include/field_effect_helpers.h new file mode 100755 index 000000000..62f492bdc --- /dev/null +++ b/include/field_effect_helpers.h @@ -0,0 +1,11 @@ +// +// Created by scott on 5/25/2017. +// + +#ifndef POKERUBY_FIELD_EFFECT_HELPERS_H +#define POKERUBY_FIELD_EFFECT_HELPERS_H + +void sub_812869C(struct MapObject *); +bool8 sub_81286C4(struct MapObject *); + +#endif //POKERUBY_FIELD_EFFECT_HELPERS_H diff --git a/include/trainer_see.h b/include/trainer_see.h old mode 100644 new mode 100755 index 0113143b6..b80a41641 --- a/include/trainer_see.h +++ b/include/trainer_see.h @@ -28,7 +28,7 @@ s8 sub_80845FC(u8 taskId, struct Task *task, struct MapObject *trainerObj); s8 sub_8084654(u8 taskId, struct Task *task, struct MapObject *trainerObj); s8 sub_80846C8(u8 taskId, struct Task *task, struct MapObject *trainerObj); void sub_80846E4(u8 taskId); -void sub_8084794(u32 var); +void sub_8084794(struct MapObject *var); void sub_80847C8(void); void sub_80847D8(u8); void sub_8084894(struct Sprite *sprite, u16 a2, u8 a3); -- cgit v1.2.3