summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bg.h7
-rw-r--r--include/constants/pokemon.h4
-rw-r--r--include/link.h1
-rw-r--r--include/link_rfu.h2
-rw-r--r--include/pokemon_jump.h115
-rw-r--r--include/random.h5
-rw-r--r--include/task.h1
-rw-r--r--include/window.h2
8 files changed, 23 insertions, 114 deletions
diff --git a/include/bg.h b/include/bg.h
index f6c307146..ca6264ca8 100644
--- a/include/bg.h
+++ b/include/bg.h
@@ -39,6 +39,13 @@ enum
BG_ATTR_BASETILE = 10
};
+// Modes for ChangeBgX / ChangeBgY
+enum {
+ BG_COORD_SET,
+ BG_COORD_ADD,
+ BG_COORD_SUB,
+};
+
enum AdjustBgMosaicMode
{
BG_MOSAIC_SET,
diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h
index 43a6231ca..43a3a59d4 100644
--- a/include/constants/pokemon.h
+++ b/include/constants/pokemon.h
@@ -225,6 +225,10 @@
#define EVO_MODE_ITEM_USE 2
#define EVO_MODE_ITEM_CHECK 3 // If an Everstone is being held, still want to show that the stone *could* be used on that Pokémon to evolve
+#define MON_PIC_WIDTH 64
+#define MON_PIC_HEIGHT 64
+#define MON_PIC_SIZE (MON_PIC_WIDTH * MON_PIC_HEIGHT / 2)
+
// used by ShouldIgnoreDeoxysForm
#define DEOXYS_CHECK_BATTLE_SPRITE 1
#define DEOXYS_CHECK_TRADE_MAIN 3
diff --git a/include/link.h b/include/link.h
index e009c2724..e7dafadf6 100644
--- a/include/link.h
+++ b/include/link.h
@@ -58,6 +58,7 @@
#define LINKCMD_0x5FFF 0x5FFF
#define LINKCMD_0x6666 0x6666
#define LINKCMD_0x7777 0x7777
+#define LINKCMD_COUNTDOWN 0x7FFF
#define LINKCMD_CONT_BLOCK 0x8888
#define LINKCMD_0xAAAA 0xAAAA
#define LINKCMD_0xAAAB 0xAAAB
diff --git a/include/link_rfu.h b/include/link_rfu.h
index 6d7e54129..7dac12fbb 100644
--- a/include/link_rfu.h
+++ b/include/link_rfu.h
@@ -6,6 +6,8 @@
#include "link.h"
#include "AgbRfu_LinkManager.h"
+#define RFUCMD_MASK 0xFF00
+
#define RFUCMD_SEND_PACKET 0x2F00
#define RFUCMD_READY_CLOSE_LINK 0x5f00
#define RFUCMD_READY_EXIT_STANDBY 0x6600
diff --git a/include/pokemon_jump.h b/include/pokemon_jump.h
index 83e28d2fd..20f96ec10 100644
--- a/include/pokemon_jump.h
+++ b/include/pokemon_jump.h
@@ -2,122 +2,9 @@
#define GUARD_POKEMON_JUMP_H
#include "main.h"
-#include "link.h"
-struct PokemonJump1_MonInfo
-{
- u16 species;
- u32 otId;
- u32 personality;
-};
-
-struct PokemonJump1_82E4
-{
- int unk0;
- int unk4;
- u8 filler8[0x4];
- u16 unkC;
- u16 unkE;
- u16 unk10;
- u16 unk12;
- int unk14;
- int unk18;
- u8 unk1C[11];
-};
-
-struct PokemonJump2
-{
- int unk0;
- u16 unk4;
- u8 unk6;
- u8 filler7[0xa - 0x7];
- u8 unkA;
- u8 unkB;
- u8 unkC;
- u8 unkD;
- u8 unkE;
- u8 unkF;
- u16 filler10;
- u16 unk12;
- u16 unk14;
- u32 unk18;
- u16 unk1C[5];
- u8 txtBuff[2][0x40];
- u8 strBuff[0x100];
- u16 tilemapBuffer[0x4000]; // Bug: way larger than it should be
- struct Sprite *unk81A8[MAX_RFU_PLAYERS];
- struct Sprite *unk81BC[MAX_RFU_PLAYERS];
- struct Sprite *unk81D0[8];
- u8 filler81F0[0xC];
- u8 unk81FC[MAX_RFU_PLAYERS];
-};
-
-struct PokemonJump1Sub
-{
- u8 unk0;
- u8 unk1;
- u16 unk2;
- u16 unk4;
- u32 unk8;
-};
-
-void ResetPokeJumpResults(void);
+void ResetPokemonJumpRecords(void);
bool32 IsSpeciesAllowedInPokemonJump(u16 species);
void StartPokemonJump(u16 species, MainCallback callback);
-u16 sub_81499A4(void);
-u16 sub_81499B4(void);
-struct PokemonJump1_MonInfo *sub_81499C0(u8 multiplayerId);
-u8 *sub_81499E0(u8 multiplayerId);
-
-void sub_814A95C(int id);
-void sub_8149CEC(struct PokemonJump2 *);
-void sub_8149D24(void);
-void sub_8149D40(int);
-bool32 sub_8149D68(void);
-void sub_814A3E4(void);
-bool32 sub_814A408(void);
-void sub_814A468(u16 itemId, u16 quantity);
-void sub_814A53C(u16 itemId);
-void sub_814A5B4(u16 itemId);
-bool32 sub_814A62C(void);
-void sub_814A6CC(void);
-void sub_814A940(u32 id, s16 y);
-void sub_814AA48(u8 multiplayerId);
-bool32 sub_814A6FC(void);
-void sub_814AA24(int);
-s8 sub_814A744(void);
-int sub_814A98C(u8 flags);
-void sub_814AA34(u16);
-void sub_814AA60(u8 multiplayerId);
-int sub_814AA78(int multiplayerId);
-void sub_814AA8C(void);
-void sub_814AAA0(void);
-void sub_814AAB4(int);
-int sub_814AAC8(void);
-void sub_8149A6C(struct PokemonJump1_MonInfo *arg0);
-bool32 sub_8149A90(int multiplayerId, struct PokemonJump1_MonInfo *arg0);
-void sub_8149AF8(struct PokemonJump1_82E4 *arg0, struct PokemonJump1Sub *arg1);
-bool32 sub_8149B7C(struct PokemonJump1_82E4 *arg0, struct PokemonJump1Sub *arg1);
-void sub_8149BF4(struct PokemonJump1_82E4 *arg0, u8 arg1, u16 arg2);
-bool32 sub_8149C24(struct PokemonJump1_82E4 *arg0, int multiplayerId, u8 *arg2, u16 *arg3);
-bool32 sub_8149C90(struct PokemonJump1_82E4 *arg0, int multiplayerId);
-bool32 sub_814B494(u32 jumpScore, u16 jumpsInRow, u16 excellentsInRow);
-void sub_814B4E8(void);
-
-void sub_814AD6C(struct PokemonJump2 *);
-void sub_814B294(struct PokemonJump2 *);
-void sub_814B43C(struct PokemonJump2 *);
-bool32 sub_814B460(void);
-void sub_814B348(struct PokemonJump2 *, int);
-void sub_814AF0C(struct PokemonJump2 *, int);
-void sub_814ADCC(struct PokemonJump2 *, struct PokemonJump1_MonInfo *,s16, s16, u8);
-void sub_814B240(struct PokemonJump2 *,s16, s16, u8);
-void sub_814AFE8(struct PokemonJump2 *, int multiplayerId);
-void sub_814B080(struct PokemonJump2 *, int multiplayerId);
-bool32 sub_814B010(struct PokemonJump2 *, int multiplayerId);
-void sub_814B0A8(struct PokemonJump2 *);
-void sub_814B134(struct PokemonJump2 *);
-void sub_814B168(struct PokemonJump2 *, int multiplayerId);
-bool32 sub_814B190(struct PokemonJump2 *);
#endif // GUARD_POKEMON_JUMP_H
diff --git a/include/random.h b/include/random.h
index 139316f9d..bf4af42d0 100644
--- a/include/random.h
+++ b/include/random.h
@@ -13,6 +13,11 @@ u16 Random2(void);
//Returns a 32-bit pseudorandom number
#define Random32() (Random() | (Random() << 16))
+// The number 1103515245 comes from the example implementation of rand and srand
+// in the ISO C standard.
+#define ISO_RANDOMIZE1(val)(1103515245 * (val) + 24691)
+#define ISO_RANDOMIZE2(val)(1103515245 * (val) + 12345)
+
//Sets the initial seed value of the pseudorandom number generator
void SeedRng(u16 seed);
void SeedRng2(u16 seed);
diff --git a/include/task.h b/include/task.h
index fd7f5a4e1..2f9f1c0d8 100644
--- a/include/task.h
+++ b/include/task.h
@@ -5,6 +5,7 @@
#define HEAD_SENTINEL 0xFE
#define TAIL_SENTINEL 0xFF
+#define TASK_NONE TAIL_SENTINEL
#define NUM_TASKS 16
#define NUM_TASK_DATA 16
diff --git a/include/window.h b/include/window.h
index 3cb904626..1c3d9be9c 100644
--- a/include/window.h
+++ b/include/window.h
@@ -41,6 +41,8 @@ struct WindowTemplate
0, \
}
+#define WINDOW_NONE 0xFF
+
struct Window
{
struct WindowTemplate window;