summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDizzyEggg <jajkodizzy@wp.pl>2017-10-21 17:32:35 +0200
committerDizzyEggg <jajkodizzy@wp.pl>2017-10-21 17:32:35 +0200
commit3d1c16523e277b0b4044e685aa118c15aaaeffe9 (patch)
tree5e1561b2ee508383dc50e3cc7fc473edfb21b2d2 /include
parentafd42c8e145c77fbf07799a54aec405766eed45c (diff)
start working on battle controllers, especially player
Diffstat (limited to 'include')
-rw-r--r--include/battle.h14
-rw-r--r--include/battle_2.h3
-rw-r--r--include/battle_controllers.h2
-rw-r--r--include/battle_interface.h6
-rw-r--r--include/battle_script_commands.h4
-rw-r--r--include/gba/io_reg.h2
-rw-r--r--include/pokemon.h1
7 files changed, 28 insertions, 4 deletions
diff --git a/include/battle.h b/include/battle.h
index 8ea1b78f4..a67442f85 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -856,6 +856,8 @@ void SetBankEnemyShadowSpriteCallback(u8 bank, u16 species);
void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 bank);
void BattleLoadOpponentMonSpriteGfx(struct Pokemon *mon, u8 bank);
void BattleLoadSubstituteSpriteGfx(u8 bank, bool8 arg1);
+void nullsub_24(u16 arg0);
+void nullsub_25(u8 arg0);
enum
{
@@ -910,7 +912,17 @@ struct BattleHealthboxInfo
u8 flag_x4 : 1;
u8 flag_x8 : 1;
u8 flag_x10 : 1;
- u8 field_1;
+ u8 flag_x20 : 1;
+ u8 flag_x40 : 1;
+ u8 flag_x80 : 1;
+ u8 field_1_x1 : 1;
+ u8 field_1_x2 : 1;
+ u8 field_1_x4 : 1;
+ u8 field_1_x8 : 1;
+ u8 field_1_x10 : 1;
+ u8 field_1_x20 : 1;
+ u8 field_1_x40 : 1;
+ u8 field_1_x80 : 1;
u8 field_2;
u8 field_3;
u8 field_4;
diff --git a/include/battle_2.h b/include/battle_2.h
index ceec2aa00..0d4bcbc67 100644
--- a/include/battle_2.h
+++ b/include/battle_2.h
@@ -13,10 +13,13 @@ u8 IsRunningFromBattleImpossible(void);
u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves);
void SwapTurnOrder(u8 id1, u8 id2);
void BattleTurnPassed(void);
+void sub_8038D64(void);
void RunBattleScriptCommands_PopCallbacksStack(void);
void RunBattleScriptCommands(void);
u32 sub_80397C4(u32 setId, u32 tableId);
void sub_8039E9C(struct Sprite *sprite);
+void sub_8039B2C(struct Sprite *sprite);
+void sub_8039AD8(struct Sprite *sprite);
void nullsub_20(void);
void BeginBattleIntro(void);
diff --git a/include/battle_controllers.h b/include/battle_controllers.h
index 4bc6b7b84..1c076b3e0 100644
--- a/include/battle_controllers.h
+++ b/include/battle_controllers.h
@@ -107,7 +107,7 @@ enum
CONTROLLER_56
};
-#define LAST_CONTROLLER_CMD_ID CONTROLLER_56 + 1
+#define CONTOLLER_CMDS_COUNT CONTROLLER_56 + 1
// general functions
void HandleLinkBattleSetup(void);
diff --git a/include/battle_interface.h b/include/battle_interface.h
index 05ea1c021..0980b0002 100644
--- a/include/battle_interface.h
+++ b/include/battle_interface.h
@@ -3,6 +3,12 @@
#include "battle_controllers.h"
+enum
+{
+ HP_CURRENT,
+ HP_MAX
+};
+
#define TAG_HEALTHBOX_PLAYER1_TILE 0xD6FF
#define TAG_HEALTHBOX_PLAYER2_TILE 0xD700
#define TAG_HEALTHBOX_OPPONENT1_TILE 0xD701
diff --git a/include/battle_script_commands.h b/include/battle_script_commands.h
index 590944f02..6d3563c3d 100644
--- a/include/battle_script_commands.h
+++ b/include/battle_script_commands.h
@@ -46,8 +46,8 @@ u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef);
u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility);
u8 BankGetTurnOrder(u8 bank);
void SetMoveEffect(bool8 primary, u8 certain);
-void BattleDestroyCursorAt(u8 cursorPosition);
-void BattleCreateCursorAt(u8 cursorPosition);
+void BattleDestroyYesNoCursorAt(u8 cursorPosition);
+void BattleCreateYesNoCursorAt(u8 cursorPosition);
void BufferMoveToLearnIntoBattleTextBuff2(void);
void sub_8056A3C(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags);
bool8 UproarWakeUpCheck(u8 bank);
diff --git a/include/gba/io_reg.h b/include/gba/io_reg.h
index f8c89fdbd..a2be31975 100644
--- a/include/gba/io_reg.h
+++ b/include/gba/io_reg.h
@@ -622,6 +622,8 @@
#define KEY_OR_INTR 0x0000
#define KEY_AND_INTR 0x8000
+#define DPAD_ANY ((DPAD_RIGHT | DPAD_LEFT | DPAD_UP | DPAD_DOWN))
+
// interrupt flags
#define INTR_FLAG_VBLANK (1 << 0)
#define INTR_FLAG_HBLANK (1 << 1)
diff --git a/include/pokemon.h b/include/pokemon.h
index c26c28afa..5048c1e4c 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -643,6 +643,7 @@ void PartySpreadPokerus(struct Pokemon *party);
s8 GetMonFlavourRelation(struct Pokemon *mon, u8 a2);
s8 GetFlavourRelationByPersonality(u32 personality, u8 a2);
u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit);
+u8 GetDefaultMoveTarget(u8 atkBank);
#include "sprite.h"