summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-10-01 19:48:31 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2017-10-01 19:52:40 -0400
commit0685dd4920c64eae6bcfbc9f201854b4da91bfab (patch)
treef759feaf819167d436ab4fde480eca35ba591b04 /include
parentd0fbed6ad50c34593002c2b540c4e3e7f4c5cd16 (diff)
parent50dc4f429d4aa68e0365adc71d17e43a0dd7b843 (diff)
Merge branch 'master' into trade
Diffstat (limited to 'include')
-rw-r--r--include/battle.h7
-rw-r--r--include/battle_anim.h4
-rw-r--r--include/decompress.h2
-rw-r--r--include/global.h18
-rw-r--r--include/overworld.h42
-rw-r--r--include/pokedex.h12
-rw-r--r--include/pokemon.h12
-rw-r--r--include/rom_8077ABC.h16
8 files changed, 68 insertions, 45 deletions
diff --git a/include/battle.h b/include/battle.h
index 47cb7cf8e..7850a9dd6 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -243,12 +243,11 @@ struct BattleStruct /* 0x2000000 */
/*0x16001*/ u8 turnEffectsBank;
/*0x16002*/ u8 animTurn;
/*0x16003*/ u8 scriptingActive;
- /*0x16004*/ u8 wrappedMove1[4];
- /*0x16008*/ u8 wrappedMove2[4];
+ /*0x16004*/ u8 wrappedMove[8];
/*0x1600C*/ u8 cmd49StateTracker;
/*0x1600D*/ u8 unk1600D;
/*0x1600E*/ u8 turncountersTracker;
- /*0x1600F*/ u8 cmd23StateTracker;
+ /*0x1600F*/ u8 atk23StateTracker;
/*0x16010*/ u8 moveTarget[4];
/*0x16014*/ u8 unk16014;
/*0x16015*/ u8 unk16015;
@@ -796,7 +795,7 @@ void BattleTurnPassed(void);
// asm/battle_2.o
void sub_8012324(void);
void sub_8012FBC(u8, u8);
-u8 b_first_side(u8, u8, u8);
+u8 GetWhoStrikesFirst(u8, u8, u8);
void TurnValuesCleanUp(u8);
void SpecialStatusesClear(void);
void sub_80138F0(void);
diff --git a/include/battle_anim.h b/include/battle_anim.h
index 48ceece21..2386c515c 100644
--- a/include/battle_anim.h
+++ b/include/battle_anim.h
@@ -53,14 +53,14 @@ struct UnknownStruct3
};
void DoMoveAnim(const u8 *const moveAnims[], u16 b, u8 c);
-bool8 b_side_obj__get_some_boolean(u8 a);
+bool8 IsAnimBankSpriteVisible(u8 a);
void sub_8076034(u8, u8);
bool8 IsContest(void);
void battle_anim_clear_some_data(void);
void move_anim_8072740(struct Sprite *sprite);
void DestroyAnimVisualTask(u8 task);
void DestroyAnimVisualTask(u8 task);
-bool8 b_side_obj__get_some_boolean(u8);
+bool8 IsAnimBankSpriteVisible(u8);
u8 IsContest();
diff --git a/include/decompress.h b/include/decompress.h
index 84c1f29c0..01f66971c 100644
--- a/include/decompress.h
+++ b/include/decompress.h
@@ -3,7 +3,7 @@
#include "sprite.h"
-void sub_800D238(const void *src, void *dest);
+void LZDecompressWram(const void *src, void *dest);
void LZDecompressVram(const void *src, void *dest);
void LoadCompressedObjectPic(const struct CompressedSpriteSheet *a);
void LoadCompressedObjectPicOverrideBuffer(const struct CompressedSpriteSheet *a, void *buffer);
diff --git a/include/global.h b/include/global.h
index ffb6dc328..f0eb7401f 100644
--- a/include/global.h
+++ b/include/global.h
@@ -37,6 +37,7 @@ fndec\
#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))
+#define POKEMON_SLOTS_NUMBER 412
#define POKEMON_NAME_LENGTH 10
#define OT_NAME_LENGTH 7
@@ -613,15 +614,20 @@ struct RecordMixingGift
struct RecordMixingGiftData data;
};
+// there should be enough flags for all 412 slots
+// each slot takes up 8 flags
+// if the value is not divisible by 8, we need to account for the reminder as well
+#define DEX_FLAGS_NO ((POKEMON_SLOTS_NUMBER / 8) + ((POKEMON_SLOTS_NUMBER % 8) ? 1 : 0))
+
struct SaveBlock1 /* 0x02025734 */
{
/*0x00*/ struct Coords16 pos;
/*0x04*/ struct WarpData location;
/*0x0C*/ struct WarpData warp1;
/*0x14*/ struct WarpData warp2;
- /*0x1C*/ struct WarpData warp3;
+ /*0x1C*/ struct WarpData lastHealLocation;
/*0x24*/ struct WarpData warp4;
- /*0x2C*/ u16 battleMusic;
+ /*0x2C*/ u16 savedMusic;
/*0x2E*/ u8 weather;
/*0x2F*/ u8 filler_2F;
/*0x30*/ u8 flashLevel; // flash level on current map, 0 being normal and 4 being the darkest
@@ -639,7 +645,7 @@ struct SaveBlock1 /* 0x02025734 */
/*0x640*/ struct ItemSlot bagPocket_TMHM[64];
/*0x740*/ struct ItemSlot bagPocket_Berries[46];
/*0x7F8*/ struct Pokeblock pokeblocks[40];
- /*0x938*/ u8 unk938[52]; // pokedex related
+ /*0x938*/ u8 dexSeen2[DEX_FLAGS_NO];
/*0x96C*/ u16 berryBlenderRecords[3];
/*0x972*/ u8 filler_972[0x6];
/*0x978*/ u16 trainerRematchStepCounter;
@@ -695,7 +701,7 @@ struct SaveBlock1 /* 0x02025734 */
/*0x3160*/ struct EnigmaBerry enigmaBerry;
/*0x3690*/ struct RamScript ramScript;
/*0x3A7C*/ struct RecordMixingGift recordMixingGift;
- /*0x3A8C*/ u8 unk3A8C[52]; //pokedex related
+ /*0x3A8C*/ u8 dexSeen3[DEX_FLAGS_NO];
};
extern struct SaveBlock1 gSaveBlock1;
@@ -717,8 +723,8 @@ struct Pokedex
/*0x04*/ u32 unownPersonality; // set when you first see Unown
/*0x08*/ u32 spindaPersonality; // set when you first see Spinda
/*0x0C*/ u32 unknown3;
- /*0x10*/ u8 owned[52];
- /*0x44*/ u8 seen[52];
+ /*0x10*/ u8 owned[DEX_FLAGS_NO];
+ /*0x44*/ u8 seen[DEX_FLAGS_NO];
};
struct SaveBlock2_Sub
diff --git a/include/overworld.h b/include/overworld.h
index e11862ab8..0954f1b63 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -26,23 +26,23 @@ extern const struct UCoords32 gUnknown_0821664C[];
extern void (*gFieldCallback)(void);
// sub_8052F5C
-void flag_var_implications_of_teleport_(void);
+void Overworld_ResetStateAfterFly(void);
void Overworld_ResetStateAfterTeleport(void);
-void sub_8053014(void);
-void sub_8053050(void);
+void Overworld_ResetStateAfterDigEscRope(void);
+void Overworld_ResetStateAfterWhiteOut(void);
// sub_805308C
void ResetGameStats(void);
void IncrementGameStat(u8 index);
u32 GetGameStat(u8 index);
void SetGameStat(u8, u32);
-// sub_8053154
+// LoadMapObjTemplatesFromHeader
// LoadSaveblockMapObjScripts
-void Overworld_SaveMapObjCoords(u8, s16, s16);
-void Overworld_SaveMapObjMovementType(u8, u8);
+void Overworld_SetMapObjTemplateCoords(u8, s16, s16);
+void Overworld_SetMapObjTemplateMovementType(u8, u8);
// mapdata_load_assets_to_gpu_and_full_redraw
// get_mapdata_header
-// warp_shift
-// warp_set
+// ApplyCurrentWarp
+// SetWarpData
// warp_data_is_not_neg_1
struct MapHeader * const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum);
struct MapHeader * const warp1_get_mapheader(void);
@@ -50,14 +50,14 @@ struct MapHeader * const warp1_get_mapheader(void);
// LoadSaveblockMapHeader
// sub_80533CC
void warp_in(void);
-void warp1_set(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
+void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void warp1_set_2(s8 mapGroup, s8 mapNum, s8 warpId);
void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId);
void saved_warp2_set_2(int unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused);
void sub_8053538(u8);
-void sub_8053570(void);
-void sub_8053588(u8);
+void Overworld_SetWarpDestToLastHealLoc(void);
+void Overworld_SetHealLocationWarp(u8);
void sub_80535C4(s16 a1, s16 a2);
void sub_805363C(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void sub_8053678(void);
@@ -69,7 +69,7 @@ void sub_8053720(s16, s16);
// unref_sub_8053790
void sub_80537CC(u8);
void gpu_sync_bg_hide();
-// sub_8053818
+// GetMapConnection
// sub_8053850
bool8 sub_80538B0(u16 x, u16 y);
bool8 sub_80538D0(u16 x, u16 y);
@@ -81,7 +81,7 @@ void walkrun_find_lowest_active_bit_in_bitfield(void);
u8 sub_8053B00(struct UnkPlayerStruct *playerStruct, u16 a2, u8 a3);
u8 sub_8053B60(struct UnkPlayerStruct *playerStruct, u8, u16, u8);
u16 cur_mapdata_block_role_at_screen_center_acc_to_sav1(void);
-bool32 Overworld_IsBikeAllowedOnCurrentMap(void);
+bool32 Overworld_IsBikingAllowed(void);
void SetDefaultFlashLevel(void);
void Overworld_SetFlashLevel(s32 a1);
u8 Overworld_GetFlashLevel(void);
@@ -89,19 +89,19 @@ void sub_8053D14(u16);
// sub_8053D30
// sub_8053D6C
// GetLocationMusic
-// sav1_map_get_music
-// warp1_target_get_music
-// call_map_music_set_to_zero
-void sub_8053E90(void);
-void sav1_set_battle_music_maybe(u16);
-void sav1_reset_battle_music_maybe(void);
+// GetCurrLocationDefaultMusic
+// GetWarpDestinationMusic
+// Overworld_ResetMapMusic
+void Overworld_PlaySpecialMapMusic(void);
+void Overworld_SetSavedMusic(u16);
+void Overworld_ClearSavedMusic(void);
void sub_8053F0C(void);
-void sub_8053F84(void);
+void Overworld_ChangeMusicToDefault(void);
void Overworld_ChangeMusicTo(u16);
// GetMapMusicFadeoutSpeed
void sub_8053FF8(void);
bool8 sub_8054034(void);
-void sub_8054044(void);
+void Overworld_FadeOutMapMusic(void);
// PlayAmbientCry
void UpdateAmbientCry(s16 *, u16 *);
void ChooseAmbientCrySpecies(void);
diff --git a/include/pokedex.h b/include/pokedex.h
index 1bc63a4ff..c47494e1f 100644
--- a/include/pokedex.h
+++ b/include/pokedex.h
@@ -9,7 +9,17 @@ void CB2_InitPokedex(void);
u8 sub_809070C(u16 dexNum, u32 b, u32 c);
const u8 *GetPokemonCategory(u16);
u16 GetPokedexHeightWeight(u16 dexNum, u8 data);
-s8 GetNationalPokedexFlag(u16, u8);
+
+enum
+{
+ FLAG_GET_SEEN,
+ FLAG_GET_CAUGHT,
+ FLAG_SET_SEEN,
+ FLAG_SET_CAUGHT
+};
+
+s8 GetSetPokedexFlag(u16, u8);
+
u16 GetNationalPokedexCount(u8);
u16 GetHoennPokedexCount(u8);
bool8 sub_8090FC0(void);
diff --git a/include/pokemon.h b/include/pokemon.h
index a5f802f24..76728a5ee 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -393,7 +393,7 @@ struct BaseStats
/*0x17*/ u8 ability2;
/*0x18*/ u8 safariZoneFleeRate;
/*0x19*/ u8 bodyColor:7;
- u8 unk19_7:1;
+ u8 noFlip:1;
};
struct BattleMove
@@ -591,9 +591,9 @@ u8 sub_8040574(struct Pokemon *party);
void ClearBattleMonForms(void);
void sub_80408BC();
void current_map_music_set__default_for_battle(u16);
-const u8 *pokemon_get_pal(struct Pokemon *mon);
-const u8 *species_and_otid_get_pal(u16, u32, u32);
-const struct CompressedSpritePalette *sub_80409C8(u16, u32, u32);
+const u8 *GetMonSpritePal(struct Pokemon *mon);
+const u8 *GetMonSpritePalFromOtIdPersonality(u16, u32, u32);
+const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u16, u32, u32);
bool8 IsOtherTrainer(u32, u8 *);
void sub_8040B8C(void);
void SetWildMonHeldItem(void);
@@ -602,8 +602,8 @@ bool32 sub_8040D3C(u16 species, u8 *name, u8 language);
s8 sub_8040A54(struct Pokemon *, u8);
u16 GetMonEVCount(struct Pokemon *);
u16 GetEvolutionTargetSpecies(struct Pokemon *, u8, u16);
-const struct CompressedSpritePalette *sub_8040990(struct Pokemon *);
-bool8 sub_8040A3C(u16);
+const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *);
+bool8 IsPokeSpriteNotFlipped(u16);
u8 GetLevelUpMovesBySpecies(u16, u16 *);
u8 TryIncrementMonLevel(struct Pokemon *);
diff --git a/include/rom_8077ABC.h b/include/rom_8077ABC.h
index 34ad7b432..94e535df5 100644
--- a/include/rom_8077ABC.h
+++ b/include/rom_8077ABC.h
@@ -4,10 +4,18 @@
#include "sprite.h"
#include "task.h"
+enum
+{
+ ANIM_BANK_ATK,
+ ANIM_BANK_DEF,
+ ANIM_BANK_ATK_PARTNER,
+ ANIM_BANK_DEF_PARTNER
+};
+
u8 sub_8077ABC(u8, u8);
u8 sub_8077E44(u8 slot, u16 species, u8 a3);
-u8 obj_id_for_side_relative_to_move(u8 side);
-void oamt_set_x3A_32(struct Sprite *sprite, void(*callback)(struct Sprite *));
+u8 GetAnimBankSpriteId(u8 side);
+void StoreSpriteCallbackInData6(struct Sprite *sprite, void(*callback)(struct Sprite *));
void sub_8078314(struct Sprite *sprite);
void sub_8078364(struct Sprite *sprite);
void sub_8078458(struct Sprite *sprite);
@@ -22,8 +30,8 @@ u8 GetBankIdentity(u8 slot);
u8 GetBankByPlayerAI(u8);
u8 GetBankByPlayerAI(u8);
u8 GetBankByPlayerAI(u8 state);
-u8 sub_8078874(u8);
-bool8 sub_8078874(u8);
+u8 AnimBankSpriteExists(u8);
+bool8 AnimBankSpriteExists(u8);
bool8 IsDoubleBattle();
u8 IsDoubleBattle(void);
bool8 IsDoubleBattle(void);