From 83d7f52f2cadd4232ee674947a93e93fc18e483a Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sun, 9 Apr 2017 01:05:20 +0000 Subject: finish decompiling item_use.c (#244) * nonmatching sub_80C9720 and decompile sub_80C9838 * finish decompiling Itemfinder functions. * decompile ItemUseOutOfBattle_PokeblockCase and ItemUseOutOfBattle_CoinCase * rename field_doortransition * rename weather file * decompile more of item_use.c * decompile up to repel code * decompile up to stat increase code * finish decompiling item_use.c * remove item_use from ld_script --- include/berry.h | 4 ++-- include/field_map_obj_helpers.h | 1 + include/field_screeneffect.h | 43 +++++++++++++++++++++++++++++++++++++++++ include/pokemon.h | 2 ++ include/weather.h | 43 ----------------------------------------- 5 files changed, 48 insertions(+), 45 deletions(-) create mode 100644 include/field_screeneffect.h delete mode 100644 include/weather.h (limited to 'include') diff --git a/include/berry.h b/include/berry.h index f17799870..0013b4dba 100644 --- a/include/berry.h +++ b/include/berry.h @@ -18,8 +18,8 @@ bool32 IsEnigmaBerryValid(void); const struct Berry *GetBerryInfo(u8 berry); struct BerryTree *GetBerryTreeInfo(u8 id); bool32 FieldObjectInteractionWaterBerryTree(void); -bool32 IsPlayerFacingPlantedBerryTree(void); -u8 TryToWaterBerryTree(void); +bool8 IsPlayerFacingPlantedBerryTree(void); +bool8 TryToWaterBerryTree(void); void ClearBerryTrees(void); bool32 BerryTreeGrow(struct BerryTree *tree); void BerryTreeTimeUpdate(int time); diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h index 5498bde12..daae74ae9 100644 --- a/include/field_map_obj_helpers.h +++ b/include/field_map_obj_helpers.h @@ -7,5 +7,6 @@ void FreezeMapObjectsExceptOne(u8); void UnfreezeMapObjects(void); void sub_806487C(struct Sprite *sprite, bool8 invisible); void sub_8064990(u8, u8); +void UnfreezeMapObject(struct MapObject *mapObject); #endif diff --git a/include/field_screeneffect.h b/include/field_screeneffect.h new file mode 100644 index 000000000..af07c970d --- /dev/null +++ b/include/field_screeneffect.h @@ -0,0 +1,43 @@ +#ifndef GUARD_WEATHER_H +#define GUARD_WEATHER_H + +void sub_807C828(void); +void DoWeatherEffect(u8 effect); +void sub_807C988(u8 effect); +void sub_807C9B4(u8 effect); +void sub_807C9E4(u8); +void sub_807CA34(u8); +void sub_807CAE8(void); +void nullsub_38(void); +u32 sub_807CB0C(void); +void sub_807CB10(void); +void sub_807CC24(void); +void sub_807CCAC(void); +u8 sub_807CDC4(void); +u8 sub_807CE24(void); +u8 sub_807CE7C(void); +void nullsub_39(void); + +// ASM +void sub_807CEBC(u8, u8, s8); +void sub_807D1BC(u8, u8, u8, u8, u16); +void sub_807D304(int, u8, u16); +void sub_807D424(u8, u16); +// ... +void fade_screen(u8, u8); +// ... +void sub_807D78C(u8 tag); +void sub_807D874(u8); +// ... +void sub_807DB64(u8, u8); +// ... +void PlayRainSoundEffect(void); +// ... +void SetSav1Weather(u32); +u8 GetSav1Weather(void); +void sub_80806E4(void); +// ... +void DoCurrentWeather(void); +void sub_8080750(); + +#endif // GUARD_WEATHER_H diff --git a/include/pokemon.h b/include/pokemon.h index 3987bada6..e0ad7136c 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -455,4 +455,6 @@ u16 nature_stat_mod(u8 nature, u16 n, u8 statIndex); void sub_8040B1C(void *); +u8 *sub_803F378(u16 itemId); + #endif // GUARD_POKEMON_H diff --git a/include/weather.h b/include/weather.h deleted file mode 100644 index af07c970d..000000000 --- a/include/weather.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef GUARD_WEATHER_H -#define GUARD_WEATHER_H - -void sub_807C828(void); -void DoWeatherEffect(u8 effect); -void sub_807C988(u8 effect); -void sub_807C9B4(u8 effect); -void sub_807C9E4(u8); -void sub_807CA34(u8); -void sub_807CAE8(void); -void nullsub_38(void); -u32 sub_807CB0C(void); -void sub_807CB10(void); -void sub_807CC24(void); -void sub_807CCAC(void); -u8 sub_807CDC4(void); -u8 sub_807CE24(void); -u8 sub_807CE7C(void); -void nullsub_39(void); - -// ASM -void sub_807CEBC(u8, u8, s8); -void sub_807D1BC(u8, u8, u8, u8, u16); -void sub_807D304(int, u8, u16); -void sub_807D424(u8, u16); -// ... -void fade_screen(u8, u8); -// ... -void sub_807D78C(u8 tag); -void sub_807D874(u8); -// ... -void sub_807DB64(u8, u8); -// ... -void PlayRainSoundEffect(void); -// ... -void SetSav1Weather(u32); -u8 GetSav1Weather(void); -void sub_80806E4(void); -// ... -void DoCurrentWeather(void); -void sub_8080750(); - -#endif // GUARD_WEATHER_H -- cgit v1.2.3