summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/battle.h10
-rw-r--r--include/battle_anim.h2
-rw-r--r--include/battle_interface.h2
-rw-r--r--include/battle_party_menu.h13
-rw-r--r--include/cable_club.h2
-rw-r--r--include/field_map_obj_helpers.h2
-rw-r--r--include/field_player_avatar.h2
-rw-r--r--include/field_weather.h2
-rw-r--r--include/fieldmap.h16
-rw-r--r--include/global.h2
-rw-r--r--include/item_menu.h2
-rw-r--r--include/mail_data.h2
-rw-r--r--include/menu_helpers.h2
-rw-r--r--include/party_menu.h30
-rw-r--r--include/pokemon.h6
-rw-r--r--include/pokemon_summary_screen.h2
-rw-r--r--include/rom3.h2
-rw-r--r--include/rom4.h2
-rw-r--r--include/rom_8077ABC.h9
-rw-r--r--include/rom_8094928.h2
-rw-r--r--include/starter_choose.h8
21 files changed, 69 insertions, 51 deletions
diff --git a/include/battle.h b/include/battle.h
index 57d7f1b4b..4520c97ca 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -1,6 +1,8 @@
#ifndef GUARD_BATTLE_H
#define GUARD_BATTLE_H
+#include "sprite.h"
+
#define BATTLE_TYPE_DOUBLE 0x0001
#define BATTLE_TYPE_LINK 0x0002
#define BATTLE_TYPE_WILD 0x0004
@@ -35,7 +37,7 @@ extern u8 unk_2000000[];
// to do: maybe try to reduce the defines needed to match?
#define BATTLE_STRUCT ((struct BattleStruct *)(unk_2000000))
#define AI_THINKING_STRUCT ((struct AI_ThinkingStruct *)(unk_2000000 + 0x16800))
-#define UNK_2016A00_STRUCT ((struct UnknownStruct1 *)(unk_2000000 + 0x16A00))
+#define UNK_2016A00_STRUCT ((struct UnknownStruct1B *)(unk_2000000 + 0x16A00))
#define AI_STACK ((struct AI_Stack *)(unk_2000000 + 0x16C00))
#define AI_ARRAY_160CC ((struct SmallItemStruct *)(unk_2000000 + 0x160CC))
@@ -61,7 +63,7 @@ struct Trainer
/*0x24*/ void *party;
};
-struct UnknownStruct1 // AI_Opponent_Info?
+struct UnknownStruct1B // AI_Opponent_Info?
{
/*0x00*/ u16 movesUsed[2][8]; // 0xFFFF means move not used (confuse self hit, etc)
/*0x20*/ u8 unk20[2];
@@ -119,7 +121,7 @@ struct BattleStruct /* 0x2000000 */
u8 filler2[0x72E];
/* 0x16800 */ struct AI_ThinkingStruct ai; /* 0x2016800 */
u8 filler1681C[0x1E4];
- /* 0x16A00 */ struct UnknownStruct1 unk_2016A00_2;
+ /* 0x16A00 */ struct UnknownStruct1B unk_2016A00_2;
};
struct UnknownStruct4
@@ -142,7 +144,7 @@ struct UnknownStruct4
/*0x17*/ u8 filler17[0x4];
};
-extern struct UnknownStruct1 unk_2016A00;
+extern struct UnknownStruct1B unk_2016A00;
extern struct UnknownStruct4 gUnknown_02024CA8[];
extern struct AI_ThinkingStruct gAIThinkingSpace;
diff --git a/include/battle_anim.h b/include/battle_anim.h
index 602afb5df..48ceece21 100644
--- a/include/battle_anim.h
+++ b/include/battle_anim.h
@@ -1,6 +1,8 @@
#ifndef GUARD_BATTLEANIM_H
#define GUARD_BATTLEANIM_H
+#include "sprite.h"
+
#define SCRIPT_READ_8(ptr) ((ptr)[0])
#define SCRIPT_READ_16(ptr) ((ptr)[0] | ((ptr)[1] << 8))
#define SCRIPT_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
diff --git a/include/battle_interface.h b/include/battle_interface.h
index 1567733ab..757bce529 100644
--- a/include/battle_interface.h
+++ b/include/battle_interface.h
@@ -32,6 +32,6 @@ s32 sub_8045C78(u8, u8, u8, u8);
s16 sub_80460C8(struct BattleInterfaceStruct1 *, int *, void *, int);
u8 GetScaledHPFraction(s16, s16, u8);
int GetHPBarLevel(s16, s16);
-void sub_80440EC();
+void sub_80440EC(u8 a, s16 b, u8 c);
#endif // GUARD_BATTLE_INTERFACE_H
diff --git a/include/battle_party_menu.h b/include/battle_party_menu.h
index b9c3ad707..afd616331 100644
--- a/include/battle_party_menu.h
+++ b/include/battle_party_menu.h
@@ -15,19 +15,6 @@ struct UnknownStruct1
s16 unk266;
};
-struct PartyMenuItem
-{
- const u8 *text;
- TaskFunc func;
-};
-
-struct PartyPopupMenu
-{
- u8 unk0;
- u8 unk1;
- const u8 *unk4;
-};
-
extern u8 unk_2000000[];
void SetUpBattlePokemonMenu(u8);
diff --git a/include/cable_club.h b/include/cable_club.h
index dd60d9b9f..9e6a703e3 100644
--- a/include/cable_club.h
+++ b/include/cable_club.h
@@ -1,6 +1,8 @@
#ifndef GUARD_CABLE_CLUB_H
#define GUARD_CABLE_CLUB_H
+#include "task.h"
+
void sub_8082D4C();
void sub_8082D60(u8, u8);
u16 sub_8082D9C(u8, u8);
diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h
index a61dcc63c..4c4df41d9 100644
--- a/include/field_map_obj_helpers.h
+++ b/include/field_map_obj_helpers.h
@@ -1,6 +1,8 @@
#ifndef GUARD_FIELDMAPOBJHELP_H
#define GUARD_FIELDMAPOBJHELP_H
+#include "sprite.h"
+
bool8 FreezeMapObject(struct MapObject *);
void FreezeMapObjects(void);
void FreezeMapObjectsExceptOne(u8);
diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h
index bc5f4c8d5..0a0989bd0 100644
--- a/include/field_player_avatar.h
+++ b/include/field_player_avatar.h
@@ -1,6 +1,8 @@
#ifndef GUARD_FIELD_PLAYER_AVATAR_H
#define GUARD_FIELD_PLAYER_AVATAR_H
+#include "task.h"
+
// sub_80587B4
void player_step(u8 a, u16 b, u16 c);
u8 ForcedMovement_None(void);
diff --git a/include/field_weather.h b/include/field_weather.h
index 837634a19..e91ed06a4 100644
--- a/include/field_weather.h
+++ b/include/field_weather.h
@@ -41,8 +41,6 @@ void DoCurrentWeather(void);
void sub_8080750();
u8 sub_807D770(void);
-const u8 sub_807D770(void);
-u8 sub_807D770(void);
bool8 sub_807DDFC(void);
void SetWeather(u32);
void UpdateWeatherPerDay(u16);
diff --git a/include/fieldmap.h b/include/fieldmap.h
index ba3ca6294..5ef292640 100644
--- a/include/fieldmap.h
+++ b/include/fieldmap.h
@@ -16,23 +16,23 @@ void fillSouthConnection(struct MapHeader *, struct MapHeader *, s32);
void fillNorthConnection(struct MapHeader *, struct MapHeader *, s32);
void fillWestConnection(struct MapHeader *, struct MapHeader *, s32);
void fillEastConnection(struct MapHeader *, struct MapHeader *, s32);
-u8 MapGridGetZCoordAt();
-bool8 MapGridIsImpassableAt(s16, s16);
-int MapGridGetMetatileIdAt(int, int);
+u16 MapGridGetZCoordAt(int s, int y);
+u16 MapGridIsImpassableAt(int, int);
+u16 MapGridGetMetatileIdAt(int, int);
u32 MapGridGetMetatileBehaviorAt(int x, int y); // return: (u8|u16|int) args: (int|s16|s32)
-u8 MapGridGetMetatileLayerTypeAt(/*TODO: arg types*/);
-void MapGridSetMetatileIdAt(u32, u32, u16);
+u16 MapGridGetMetatileLayerTypeAt(int, int);
+void MapGridSetMetatileIdAt(int, int, u16);
u32 GetBehaviorByMetatileId(u16 metatile);
void save_serialize_map(void);
void sub_8056670();
-int CameraMove(int, int);
+bool8 CameraMove(int, int);
struct MapConnection *sub_8056A64(u8 direction, int x, int y);
bool8 sub_8056ABC(u8 direction, int x, int y, struct MapConnection *connection);
bool8 sub_8056B20(int x, int src_width, int dest_width, int offset);
struct MapConnection *sub_8056BA0(s16 x, s16 y); // fieldmap.c
void sub_8056C50(u16, u16);
-void sav1_camera_get_focus_coords(s16 *x, s16 *y);
-void GetCameraCoords(s16*, s16*);
+void sav1_camera_get_focus_coords(u16 *x, u16 *y);
+void GetCameraCoords(u16*, u16*);
void sub_8056D28(struct MapData *pData);
void sub_8056D38(struct MapData *pData);
void apply_map_tileset2_palette(struct MapData *pData);
diff --git a/include/global.h b/include/global.h
index a24f98033..95dd640a9 100644
--- a/include/global.h
+++ b/include/global.h
@@ -5,6 +5,7 @@
#include "config.h"
// IDE support
+#ifdef __APPLE__
#define _(x) x
#define __(x) x
#define INCBIN_U8 {0}
@@ -16,6 +17,7 @@
void * memcpy (void *, const void *, size_t);
void * memset (void *, int, size_t);
int strcmp (const char *, const char *);
+#endif
// Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm("");
diff --git a/include/item_menu.h b/include/item_menu.h
index baee695b8..301836ac8 100644
--- a/include/item_menu.h
+++ b/include/item_menu.h
@@ -1,6 +1,8 @@
#ifndef GUARD_ITEM_MENU_H
#define GUARD_ITEM_MENU_H
+#include "string_util.h"
+
void sub_80A3684(void);
void ClearBag(void);
void sub_80A3E0C(void);
diff --git a/include/mail_data.h b/include/mail_data.h
index f139f1455..df4b385a1 100644
--- a/include/mail_data.h
+++ b/include/mail_data.h
@@ -6,7 +6,7 @@ void ClearMailStruct(struct MailStruct *);
void ClearMailStruct(struct MailStruct *);
u8 GiveMailToMon(struct Pokemon *, u16);
u16 SpeciesToMailSpecies(u16, u32);
-u16 MailSpeciesToSpecies(u16, u8 *);
+u16 MailSpeciesToSpecies(u16, u16 *);
u8 GiveMailToMon2(struct Pokemon *, struct MailStruct *);
void TakeMailFromMon(struct Pokemon *);
u8 TakeMailFromMon2(struct Pokemon *);
diff --git a/include/menu_helpers.h b/include/menu_helpers.h
index d43450e69..467f3db6d 100644
--- a/include/menu_helpers.h
+++ b/include/menu_helpers.h
@@ -1,6 +1,8 @@
#ifndef GUARD_MENU_HELPERS_H
#define GUARD_MENU_HELPERS_H
+#include "task.h"
+
struct YesNoFuncTable
{
void (*yesFunc)(u8);
diff --git a/include/party_menu.h b/include/party_menu.h
index c14c888e9..917d6a58c 100644
--- a/include/party_menu.h
+++ b/include/party_menu.h
@@ -1,6 +1,21 @@
#ifndef GUARD_PARTY_MENU_H
#define GUARD_PARTY_MENU_H
+#include "task.h"
+
+struct PartyMenuItem
+{
+ const u8 *text;
+ TaskFunc func;
+};
+
+struct PartyPopupMenu
+{
+ u8 unk0;
+ u8 unk1;
+ const u8 *unk4;
+};
+
void sub_806AEDC(void);
void sub_806AF4C();
void OpenPartyMenu(u8, u8);
@@ -52,7 +67,7 @@ void sub_8070968();
void sub_8070A20();
void Task_RareCandy3(u8);
void sub_8070C54();
-void DoEvolutionStoneItemEffect(u8);
+void DoEvolutionStoneItemEffect(u8, u16, TaskFunc);
u8 GetItemEffectType();
u8 sub_806E834(const u8 *message, u8 arg1);
void sub_806E8D0(u8 taskId, u16 b, TaskFunc c);
@@ -63,7 +78,7 @@ void DisplayTakeHeldItemMessage(u8, u16, u8);
void Task_ConfirmTakeHeldMail(u8);
u16 ItemIdToBattleMoveId(u16);
bool8 pokemon_has_move(struct Pokemon *, u16);
-void TeachMonTMMove(u8);
+void TeachMonTMMove(u8, u16, TaskFunc);
void Task_TeamMonTMMove(u8);
void Task_TeamMonTMMove2(u8);
void Task_TeamMonTMMove3(u8);
@@ -82,16 +97,15 @@ void sub_806FB44(u8);
void PartyMenuUpdateLevelOrStatus(struct Pokemon *, u8);
void GetMedicineItemEffectMessage(u16);
bool8 ExecuteTableBasedItemEffect__(u8, u16, u8);
-u8 ExecuteTableBasedItemEffect__(u8 u8, u16 u16, int i);
-void UseMedicine(u8);
+void UseMedicine(u8, u16, TaskFunc);
bool8 IsBlueYellowRedFlute(u16);
-void sub_8070048(u8);
+void sub_8070048(u8, u16, TaskFunc);
void sub_8070088(u8);
void sub_80701DC(u8 taskId);
-void DoPPRecoveryItemEffect(u8);
+void DoPPRecoveryItemEffect(u8, u16, TaskFunc);
void DoRecoverPP(u8);
-void DoPPUpItemEffect(u8);
-void DoRareCandyItemEffect(u8);
+void DoPPUpItemEffect(u8, u16, TaskFunc);
+void DoRareCandyItemEffect(u8, u16, TaskFunc);
void Task_RareCandy1(u8);
void Task_RareCandy2(u8);
void sub_8070848(u8 taskId);
diff --git a/include/pokemon.h b/include/pokemon.h
index 862ac10bc..3d97e2f3d 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -1,6 +1,8 @@
#ifndef GUARD_POKEMON_H
#define GUARD_POKEMON_H
+#include "sprite.h"
+
#define MON_DATA_PERSONALITY 0
#define MON_DATA_OT_ID 1
#define MON_DATA_NICKNAME 2
@@ -488,12 +490,12 @@ u8 sub_8040574(struct Pokemon *party);
void ClearBattleMonForms(void);
void sub_80408BC();
void current_map_music_set__default_for_battle(u16);
-void *species_and_otid_get_pal(u32, u32, u32);
+void *species_and_otid_get_pal(u16, u32, u32);
const struct SpritePalette *sub_80409C8(u16, u32, u32);
bool8 IsOtherTrainer(u32, u8 *);
void sub_8040B8C(void);
void SetWildMonHeldItem(void);
u8 *sub_8040D08();
-int sub_8040D3C();
+bool32 sub_8040D3C(u16 species, u8 *name, u8 language);
#endif // GUARD_POKEMON_H
diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h
index 6adc0ce53..3f7ed8fad 100644
--- a/include/pokemon_summary_screen.h
+++ b/include/pokemon_summary_screen.h
@@ -9,7 +9,7 @@ void sub_809D9F0(struct Pokemon *, u8, u8, void *, u32);
u8 sub_809FA30(void);
u8 pokemon_ailments_get_primary(u32);
u8 GetMonStatusAndPokerus();
-u8 *sub_80A1E9C(u8 *dest, u8 *src, u8);
+u8 *sub_80A1E9C(u8 *dest, const u8 *src, u8);
u8 *PokemonSummaryScreen_CopyPokemonLevel(u8 *dest, u8 level);
u8 PokemonSummaryScreen_CheckOT(struct Pokemon *pokemon);
diff --git a/include/rom3.h b/include/rom3.h
index afd09c107..a66162443 100644
--- a/include/rom3.h
+++ b/include/rom3.h
@@ -17,7 +17,7 @@ void dp01_build_cmdbuf_x04_4_4_4(u8 a);
void sub_800C704(u8, u8, u8);
void dp01_build_cmdbuf_x07_7_7_7(u8 a);
void dp01_build_cmdbuf_x12_a_bb(u8 a, u8 b, u16 c);
-void dp01_build_cmdbuf_x1D_1D_numargs_varargs(int, u16, void *);
+void dp01_build_cmdbuf_x1D_1D_numargs_varargs(u8, u16, u8 *);
void dp01_build_cmdbuf_x2E_a(u8 a, u8 b);
void dp01_build_cmdbuf_x2F_2F_2F_2F(u8 a);
void dp01_build_cmdbuf_x30_TODO(u8 a, u8 *b, u8 c);
diff --git a/include/rom4.h b/include/rom4.h
index 4caee3127..e41a8fa84 100644
--- a/include/rom4.h
+++ b/include/rom4.h
@@ -44,7 +44,7 @@ void update_saveblock1_field_object_movement_behavior(u8, u8);
// warp_set
// warp_data_is_not_neg_1
struct MapHeader * const get_mapheader_by_bank_and_number(u16 mapGroup, u16 mapNum);
-struct MapHeader *warp1_get_mapheader(void);
+struct MapHeader * const warp1_get_mapheader(void);
// set_current_map_header_from_sav1_save_old_name
// sub_805338C
// sub_80533CC
diff --git a/include/rom_8077ABC.h b/include/rom_8077ABC.h
index 2c1eea039..26c89d4cc 100644
--- a/include/rom_8077ABC.h
+++ b/include/rom_8077ABC.h
@@ -1,7 +1,10 @@
#ifndef GUARD_ROM_8077ABC_H
#define GUARD_ROM_8077ABC_H
-u8 sub_8077ABC();
+#include "sprite.h"
+#include "task.h"
+
+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 *));
@@ -32,7 +35,7 @@ void obj_translate_based_on_private_1_2_3_4(struct Sprite *sprite);
bool8 sub_8078B5C(struct Sprite *sprite);
void sub_8078BB8(struct Sprite *sprite);
void sub_8078D44(struct Sprite *sprite);
-void obj_id_set_rotscale(u8 sprite, int, int, u16);
+void obj_id_set_rotscale(u8 sprite, s16, s16, u16);
bool8 sub_8078E38();
void sub_8078E70(u8 sprite, u8);
void sub_8078F40(u8 sprite);
@@ -46,9 +49,7 @@ u16 sub_8079B10(u8 sprite);
void sub_8079BF4(s16 *bottom, s16 *top, void *ptr);
void *sub_8079BFC(s16 bottom, s16 top);
void sub_8079E24();
-u8 sub_8079E90();
u8 sub_8079E90(u8 slot);
-u8 battle_get_per_side_status_permutated();
u8 battle_get_per_side_status_permutated(u8 slot);
void sub_807A784(u8 taskId);
void sub_807A850(struct Task *task, u8 taskId);
diff --git a/include/rom_8094928.h b/include/rom_8094928.h
index fe313ff5e..aa1e42071 100644
--- a/include/rom_8094928.h
+++ b/include/rom_8094928.h
@@ -1,7 +1,7 @@
#ifndef GUARD_ROM_8094928_H
#define GUARD_ROM_8094928_H
-void sub_8094978(u8, int);
+void sub_8094978(u8, u8);
void sub_8094998(u8[3], u8);
void sub_8094A74(u8[3], u8, u32);
u8 sub_8094C20();
diff --git a/include/starter_choose.h b/include/starter_choose.h
index c835d9c59..44ca8c34c 100644
--- a/include/starter_choose.h
+++ b/include/starter_choose.h
@@ -3,10 +3,10 @@
#include "sprite.h"
-extern u16 gBirchBagGrassPal[32];
-extern u8 gBirchBagTilemap[];
-extern u8 gBirchGrassTilemap[];
-extern u8 gBirchHelpGfx[];
+extern const u16 gBirchBagGrassPal[2][16];
+extern const u8 gBirchBagTilemap[];
+extern const u8 gBirchGrassTilemap[];
+extern const u8 gBirchHelpGfx[];
u16 GetStarterPokemon(u16);
void CB2_ChooseStarter(void);