summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm.inc.h8
-rw-r--r--[-rwxr-xr-x]include/decoration.h0
-rw-r--r--include/decoration_inventory.h8
-rw-r--r--include/field_effect.h209
-rw-r--r--include/field_weather.h2
-rwxr-xr-x[-rw-r--r--]include/gba/defines.h0
-rw-r--r--include/gba/types.h2
-rwxr-xr-x[-rw-r--r--]include/global.h25
-rw-r--r--include/record_mixing.h4
-rw-r--r--include/rom4.h4
-rw-r--r--include/sprite.h2
11 files changed, 251 insertions, 13 deletions
diff --git a/include/asm.inc.h b/include/asm.inc.h
index dcc6190cc..1a5e9447f 100644
--- a/include/asm.inc.h
+++ b/include/asm.inc.h
@@ -42,7 +42,7 @@ void LoadWordFromTwoHalfwords(u16 *, u32 *);
u8 Daycare_CountPokemon(struct BoxPokemon *);
// asm/daycare.o
-void sub_8041324(struct BoxPokemon *, void *);
+void sub_8041324(struct BoxPokemon *, struct RecordMixing_UnknownStruct *);
void sub_8041790(int i);
u16 sub_8041870(u16);
void sub_8041940(void);
@@ -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/decoration.h b/include/decoration.h
index 01a00ee91..01a00ee91 100755..100644
--- a/include/decoration.h
+++ b/include/decoration.h
diff --git a/include/decoration_inventory.h b/include/decoration_inventory.h
new file mode 100644
index 000000000..dd87e7239
--- /dev/null
+++ b/include/decoration_inventory.h
@@ -0,0 +1,8 @@
+//
+// Created by Scott Norton on 6/5/17.
+//
+
+#ifndef POKERUBY_DECORATION_INVENTORY_H
+#define POKERUBY_DECORATION_INVENTORY_H
+
+#endif //POKERUBY_DECORATION_INVENTORY_H
diff --git a/include/field_effect.h b/include/field_effect.h
index a46c048cb..2cf7f0c7a 100644
--- 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_TREE,
+ FLDEFF_SHADOW,
+ FLDEFF_TALL_GRASS,
+ FLDEFF_RIPPLE,
+ FLDEFF_FIELD_MOVE_SHOW_MON,
+ FLDEFF_ASH,
+ FLDEFF_SURF_BLOB,
+ FLDEFF_USE_SURF,
+ FLDEFF_DUST,
+ FLDEFF_USE_SECRET_POWER_CAVE,
+ FLDEFF_JUMP_TALL_GRASS,
+ FLDEFF_SAND_FOOTPRINTS,
+ FLDEFF_JUMP_BIG_SPLASH,
+ FLDEFF_SPLASH,
+ FLDEFF_JUMP_SMALL_SPLASH,
+ FLDEFF_LONG_GRASS,
+ FLDEFF_JUMP_LONG_GRASS,
+ FLDEFF_UNKNOWN_19,
+ FLDEFF_UNKNOWN_20,
+ FLDEFF_UNKNOWN_21,
+ FLDEFF_UNKNOWN_22,
+ FLDEFF_BERRY_TREE_GROWTH_SPARKLE,
+ FLDEFF_DEEP_SAND_FOOTPRINTS,
+ FLDEFF_POKECENTER_HEAL,
+ FLDEFF_USE_SECRET_POWER_TREE,
+ FLDEFF_USE_SECRET_POWER_SHRUB,
+ FLDEFF_TREE_DISGUISE,
+ FLDEFF_MOUNTAIN_DISGUISE,
+ FLDEFF_NPCFLY_OUT,
+ FLDEFF_USE_FLY,
+ FLDEFF_FLY_IN,
+ FLDEFF_EXCLAMATION_MARK_ICON_2,
+ FLDEFF_FEET_IN_FLOWING_WATER,
+ FLDEFF_BIKE_TIRE_TRACKS,
+ FLDEFF_SAND_DISGUISE,
+ FLDEFF_USE_ROCK_SMASH,
+ FLDEFF_USE_DIG,
+ FLDEFF_SAND_PILE,
+ FLDEFF_USE_STRENGTH,
+ FLDEFF_SHORT_GRASS,
+ FLDEFF_HOT_SPRINGS_WATER,
+ FLDEFF_USE_WATERFALL,
+ FLDEFF_USE_DIVE,
+ FLDEFF_POKEBALL,
+ FLDEFF_HEART_ICON,
+ FLDEFF_NOP_47,
+ FLDEFF_NOP_48,
+ FLDEFF_POP_OUT_OF_ASH,
+ FLDEFF_LAVARIDGE_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,135 @@ 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 *);
+
+bool8 sub_80867AC(struct Task *);
+bool8 sub_8086854(struct Task *);
+bool8 sub_8086870(struct Task *);
+bool8 sub_80868E4(struct Task *);
+bool8 sub_808699C(struct Task *);
+bool8 sub_80869B8(struct Task *);
+bool8 sub_80869F8(struct Task *);
+
+bool8 sub_8086AA0(struct Task *);
+bool8 sub_8086AC0(struct Task *);
+bool8 sub_8086B30(struct Task *);
+bool8 sub_8086B54(struct Task *);
+bool8 sub_8086B64(struct Task *);
+bool8 sub_8086B88(struct Task *);
+
+bool8 sub_8086CF4(struct Task *);
+bool8 sub_8086D70(struct Task *);
+bool8 sub_8086DB0(struct Task *);
+bool8 sub_8086E10(struct Task *);
+bool8 sub_8086E50(struct Task *);
+bool8 sub_8086EB0(struct Task *);
+bool8 sub_8086ED4(struct Task *);
+
+bool8 sub_8086FB0(struct Task *, struct MapObject *);
+bool8 waterfall_1_do_anim_probably(struct Task *, struct MapObject *);
+bool8 waterfall_2_wait_anim_finish_probably(struct Task *, struct MapObject *);
+bool8 sub_8087030(struct Task *, struct MapObject *);
+bool8 sub_8087058(struct Task *, struct MapObject *);
+
+bool8 sub_8087124(struct Task *);
+bool8 dive_2_unknown(struct Task *);
+bool8 dive_3_unknown(struct Task *);
+
+bool8 sub_808722C(struct Task *, struct MapObject *, struct Sprite *);
+bool8 sub_8087264(struct Task *, struct MapObject *, struct Sprite *);
+bool8 sub_8087298(struct Task *, struct MapObject *, struct Sprite *);
+bool8 sub_80872E4(struct Task *, struct MapObject *, struct Sprite *);
+bool8 sub_80873D8(struct Task *, struct MapObject *, struct Sprite *);
+bool8 sub_80873F4(struct Task *, struct MapObject *, struct Sprite *);
+
+bool8 sub_80874CC(struct Task *, struct MapObject *, struct Sprite *);
+bool8 sub_80874FC(struct Task *, struct MapObject *, struct Sprite *);
+bool8 sub_8087548(struct Task *, struct MapObject *, struct Sprite *);
+bool8 sub_808759C(struct Task *, struct MapObject *, struct Sprite *);
+
+bool8 sub_80876C8(struct Task *, struct MapObject *, struct Sprite *);
+bool8 sub_80876F8(struct Task *, struct MapObject *, struct Sprite *);
+bool8 sub_8087774(struct Task *, struct MapObject *, struct Sprite *);
+bool8 sub_80877AC(struct Task *, struct MapObject *, struct Sprite *);
+bool8 sub_80877D4(struct Task *, struct MapObject *, struct Sprite *);
+
+void sub_80878F4(struct Task *);
+void sub_8087914(struct Task *);
+
+void sub_8087AA4(struct Task *);
+void sub_8087AC8(struct Task *);
+
+void sub_8087BEC(struct Task *);
+void sub_8087C14(struct Task *);
+void sub_8087CA4(struct Task *);
+void sub_8087D78(struct Task *);
+
+void sub_8087E4C(struct Task *);
+void sub_8087ED8(struct Task *);
+void sub_8087FDC(struct Task *);
+
+void sub_8088150(struct Task *);
+void sub_80881C0(struct Task *);
+void sub_8088228(struct Task *);
+void sub_80882B4(struct Task *);
+void sub_80882E4(struct Task *);
+void sub_8088338(struct Task *);
+void sub_8088380(struct Task *);
+
+void sub_80884AC(struct Task *);
+void sub_80884E8(struct Task *);
+void sub_8088554(struct Task *);
+void sub_80885A8(struct Task *);
+void sub_80885D8(struct Task *);
+void sub_808860C(struct Task *);
+void sub_808862C(struct Task *);
+
+void sub_8088984(struct Task *);
+void sub_80889E4(struct Task *);
+void sub_8088A30(struct Task *);
+void sub_8088A78(struct Task *);
+void sub_8088AF4(struct Task *);
+
+void sub_8088CA0(struct Task *);
+void sub_8088CF8(struct Task *);
+void sub_8088D3C(struct Task *);
+void sub_8088D94(struct Task *);
+void sub_8088DD8(struct Task *);
+void sub_8088E2C(struct Task *);
+void sub_8088EB4(struct Task *);
+void sub_8088F10(struct Task *);
+void sub_8088F30(struct Task *);
+
+void sub_80892A0(struct Task *);
+void sub_8089354(struct Task *);
+void sub_80893C0(struct Task *);
+void sub_8089414(struct Task *);
+void sub_808948C(struct Task *);
+void sub_80894C4(struct Task *);
+void fishE(struct Task *);
#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..0f7f06755 100644..100755
--- a/include/gba/defines.h
+++ b/include/gba/defines.h
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 c4c78e65d..0e7c43437 100644..100755
--- a/include/global.h
+++ b/include/global.h
@@ -10,11 +10,24 @@
// 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
#define OT_NAME_LENGTH 7
+#define min(a, b) (a >= b ? a : b)
+#define max(a, b) (a <= b ? a : b)
+
enum
{
VERSION_SAPPHIRE = 1,
@@ -472,10 +485,16 @@ struct GabbyAndTyData {
/*2b1b*/ u8 valB_5:3;
};
-struct RecordMixing_UnknownStruct {
+struct RecordMixing_UnknownStructSub {
u8 data[0x38];
};
+struct RecordMixing_UnknownStruct {
+ struct RecordMixing_UnknownStructSub data[2];
+ u32 unk70;
+ u16 unk74[0x2];
+};
+
struct SaveBlock1 /* 0x02025734 */
{
/*0x00*/ struct Coords16 pos;
@@ -551,8 +570,8 @@ struct SaveBlock1 /* 0x02025734 */
/*0x2DFC*/ u8 filler_2DFC[0x8];
/*0x2E04*/ SB_Struct sbStruct;
/*0x2F9C*/ struct BoxPokemon daycareData[2];
- /*0x303C*/ struct RecordMixing_UnknownStruct filler_303C[2];
- /*0x30AC*/ u8 filler_30AC[0xA];
+ /*0x303C*/ struct RecordMixing_UnknownStruct filler_303C;
+ /*0x30AC*/ u8 filler_30B4[0x2];
/*0x30B6*/ u8 filler_30B6;
/*0x30B7*/ u8 filler_30B7[1];
/*0x30B8*/ u8 linkBattleRecords[5][16];
diff --git a/include/record_mixing.h b/include/record_mixing.h
index 72a089ca1..103f5ad64 100644
--- a/include/record_mixing.h
+++ b/include/record_mixing.h
@@ -23,11 +23,11 @@ void sub_80B9A88(u8 *a);
void sub_80B9B1C(u8 *a, size_t size, u8 index);
void sub_80B9B70(u8 *a, size_t size, u8 index);
u8 sub_80B9BBC(u16 *a);
-void sub_80B9BC4(u32 a, u32 b, u32 c, u32 d);
+void sub_80B9BC4(struct RecordMixing_UnknownStruct *, size_t, u8 [][2], u8, u8);
u8 sub_80B9C4C(u8 *a);
// ASM
-void sub_80B9C6C(void *, u32, u8, void *);
+void sub_80B9C6C(struct RecordMixing_UnknownStruct *, u32, u8, void *);
void sub_80B9F3C(void *, u8);
void sub_80BA00C(u8);
diff --git a/include/rom4.h b/include/rom4.h
index 476a0e103..9bfb9a51f 100644
--- 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);
diff --git a/include/sprite.h b/include/sprite.h
index 13c03ab51..dd9d5efb7 100644
--- a/include/sprite.h
+++ b/include/sprite.h
@@ -133,7 +133,7 @@ struct Subsprite
struct SubspriteTable
{
u8 subspriteCount;
- struct Subsprite *subsprites;
+ const struct Subsprite *subsprites;
};
struct Sprite;