summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorscnorton <scnorton@biociphers.org>2017-06-13 10:19:12 -0400
committerscnorton <scnorton@biociphers.org>2017-06-13 10:19:12 -0400
commitbf5ee99db06cbd805058cc4c2f0fcb4ccf9506da (patch)
tree5d55b2504c4ebc3d0108b4eb9c495e189fc485cb /include
parent175d4724a33bbb34e1a5ee609584a45ab9685058 (diff)
parentdb6818ca9149304463e5e2219ec90993a3af53b2 (diff)
Merge branch 'field_effect'
Diffstat (limited to 'include')
-rwxr-xr-x[-rw-r--r--]include/asm.inc.h6
-rwxr-xr-x[-rw-r--r--]include/field_effect.h103
-rw-r--r--include/field_weather.h2
-rwxr-xr-x[-rw-r--r--]include/gba/defines.h3
-rw-r--r--include/gba/types.h2
-rwxr-xr-x[-rw-r--r--]include/global.h10
-rwxr-xr-x[-rw-r--r--]include/rom4.h4
7 files changed, 124 insertions, 6 deletions
diff --git a/include/asm.inc.h b/include/asm.inc.h
index 7c090dec2..3837af64b 100644..100755
--- a/include/asm.inc.h
+++ b/include/asm.inc.h
@@ -207,9 +207,9 @@ void sub_8083A84(TaskFunc);
s32 sub_8083BF4(u8 id);
// asm/field_effect.o
-u8 CreateTrainerSprite_BirchSpeech(u8, u16, u16, u8, void *);
-void LoadTrainerGfx_TrainerCard(u8 gender, int, void *);
-u8 CreateBirchSprite(u8, u8, u8);
+u8 CreateTrainerSprite_BirchSpeech(u8, s16, s16, u8, u8 *);
+void LoadTrainerGfx_TrainerCard(u8 gender, u16, u8 *);
+u8 CreateBirchSprite(s16, s16, u8);
// asm/unknown_task.o
void remove_some_task(void);
diff --git a/include/field_effect.h b/include/field_effect.h
index a46c048cb..6306b81ac 100644..100755
--- a/include/field_effect.h
+++ b/include/field_effect.h
@@ -3,6 +3,85 @@
#include "sprite.h"
+enum FieldEffectScriptIdx
+{
+ FLDEFF_EXCLAMATION_MARK_ICON_1,
+ FLDEFF_USE_CUT_ON_GRASS,
+ FLDEFF_USE_CUT_ON_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E_GYM_WARP,
+ FLDEFF_SWEET_SCENT,
+ FLDEFF_SAND_PILLAR,
+ FLDEFF_BUBBLES,
+ FLDEFF_SPARKLE,
+ FLDEFF_SECRET_POWER_CAVE,
+ FLDEFF_SECRET_POWER_TREE,
+ FLDEFF_SECRET_POWER_SHRUB,
+ FLDEFF_CUT_GRASS,
+ FLDEFF_FIELD_MOVE_SHOW_MON_INIT,
+ FLDEFF_USE_FLY_ANCIENT_TOMB,
+ FLDEFF_PCTURN_ON,
+ FLDEFF_HALL_OF_FAME_RECORD,
+ FLDEFF_USE_TELEPORT
+};
+
+extern const struct SpritePalette gTrainerFrontPicPaletteTable[2];
+extern const struct SpritePalette gUnknown_0839F114;
+extern const struct SpriteSheet gTrainerFrontPicTable[2];
+extern const struct SpriteTemplate gSpriteTemplate_839F128;
+extern const struct OamData gOamData_839F0F4;
+extern struct SpriteTemplate gUnknown_02024E8C;
+
+extern const struct SpritePalette *sub_80409C8(u16, u32, u32);
+
+extern u8 gLastFieldPokeMenuOpened;
+
u32 FieldEffectStart(u8 id);
bool8 FieldEffectCmd_loadtiles(u8 **script, u32 *val);
bool8 FieldEffectCmd_loadfadedpal(u8 **script, u32 *val);
@@ -25,5 +104,29 @@ void FieldEffectActiveListClear(void);
void FieldEffectActiveListAdd(u8 id);
void FieldEffectActiveListRemove(u8 id);
bool8 FieldEffectActiveListContains(u8 id);
+void sub_807DE38(u8 index);
+
+void SpriteCB_PokeballGlow(struct Sprite *);
+void SpriteCB_PokecenterMonitor(struct Sprite *);
+void SpriteCB_HallOfFameMonitor(struct Sprite *);
+
+void PokecenterHealEffect_0(struct Task *);
+void PokecenterHealEffect_1(struct Task *);
+void PokecenterHealEffect_2(struct Task *);
+void PokecenterHealEffect_3(struct Task *);
+
+void HallOfFameRecordEffect_0(struct Task *);
+void HallOfFameRecordEffect_1(struct Task *);
+void HallOfFameRecordEffect_2(struct Task *);
+void HallOfFameRecordEffect_3(struct Task *);
+
+void PokeballGlowEffect_0(struct Sprite *);
+void PokeballGlowEffect_1(struct Sprite *);
+void PokeballGlowEffect_2(struct Sprite *);
+void PokeballGlowEffect_3(struct Sprite *);
+void PokeballGlowEffect_4(struct Sprite *);
+void PokeballGlowEffect_5(struct Sprite *);
+void PokeballGlowEffect_6(struct Sprite *);
+void PokeballGlowEffect_7(struct Sprite *);
#endif // GUARD_FIELD_EFFECT_H
diff --git a/include/field_weather.h b/include/field_weather.h
index af07c970d..df216aea7 100644
--- a/include/field_weather.h
+++ b/include/field_weather.h
@@ -31,6 +31,8 @@ void sub_807D874(u8);
// ...
void sub_807DB64(u8, u8);
// ...
+void sub_807DE68(void);
+// ...
void PlayRainSoundEffect(void);
// ...
void SetSav1Weather(u32);
diff --git a/include/gba/defines.h b/include/gba/defines.h
index 0f7f06755..e88d2da8b 100644..100755
--- a/include/gba/defines.h
+++ b/include/gba/defines.h
@@ -58,4 +58,7 @@
#define WIN_RANGE(a, b) (((a) << 8) | (b))
+#define min(a, b) (a >= b ? a : b)
+#define max(a, b) (a <= b ? a : b)
+
#endif // GUARD_GBA_DEFINES
diff --git a/include/gba/types.h b/include/gba/types.h
index fd8a20a4c..96e057ab7 100644
--- a/include/gba/types.h
+++ b/include/gba/types.h
@@ -34,7 +34,7 @@ struct PlttData
u16 g:5; // green
u16 b:5; // blue
u16 unused_15:1;
-};
+} /*__attribute__((packed))*/;
struct OamData
{
diff --git a/include/global.h b/include/global.h
index 716aae15f..13db2620f 100644..100755
--- a/include/global.h
+++ b/include/global.h
@@ -10,6 +10,16 @@
// to help in decompiling
#define asm_comment(x) asm volatile("@ -- " x " -- ")
+#define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided\n")
+
+#define nonmatching(fndec, x) {\
+__attribute__((naked))\
+fndec\
+{\
+ asm_unified(x);\
+}\
+}
+
#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))
#define POKEMON_NAME_LENGTH 10
diff --git a/include/rom4.h b/include/rom4.h
index 476a0e103..9bfb9a51f 100644..100755
--- a/include/rom4.h
+++ b/include/rom4.h
@@ -18,7 +18,7 @@ struct LinkPlayerMapObject
};
// sub_8052F5C
-// flag_var_implications_of_teleport_
+void flag_var_implications_of_teleport_(void);
void new_game(void);
void sub_8053014(void);
void sub_8053050(void);
@@ -52,7 +52,7 @@ void sub_8053570(void);
void sub_8053588(u8);
void sub_80535C4(s16 a1, s16 a2);
void sub_805363C(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
-// sub_8053678
+void sub_8053678(void);
void sub_8053690(s8, s8, s8, s8, s8);
// warp1_set_to_warp2
void sub_80536E4(s8, s8, s8, s8, s8);