mirror of
https://github.com/pret/pokeruby.git
synced 2026-08-23 10:54:31 -05:00
Merge branch 'field_effect'
This commit is contained in:
7738
asm/field_effect.s
7738
asm/field_effect.s
File diff suppressed because it is too large
Load Diff
6
include/asm.inc.h
Normal file → Executable file
6
include/asm.inc.h
Normal file → Executable file
@@ -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);
|
||||
|
||||
103
include/field_effect.h
Normal file → Executable file
103
include/field_effect.h
Normal file → Executable file
@@ -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,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
|
||||
|
||||
@@ -31,6 +31,8 @@ void sub_807D874(u8);
|
||||
// ...
|
||||
void sub_807DB64(u8, u8);
|
||||
// ...
|
||||
void sub_807DE68(void);
|
||||
// ...
|
||||
void PlayRainSoundEffect(void);
|
||||
// ...
|
||||
void SetSav1Weather(u32);
|
||||
|
||||
3
include/gba/defines.h
Normal file → Executable file
3
include/gba/defines.h
Normal file → Executable file
@@ -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
|
||||
|
||||
@@ -34,7 +34,7 @@ struct PlttData
|
||||
u16 g:5; // green
|
||||
u16 b:5; // blue
|
||||
u16 unused_15:1;
|
||||
};
|
||||
} /*__attribute__((packed))*/;
|
||||
|
||||
struct OamData
|
||||
{
|
||||
|
||||
10
include/global.h
Normal file → Executable file
10
include/global.h
Normal file → Executable file
@@ -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
|
||||
|
||||
4
include/rom4.h
Normal file → Executable file
4
include/rom4.h
Normal file → Executable file
@@ -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);
|
||||
|
||||
@@ -134,7 +134,6 @@ SECTIONS {
|
||||
src/trainer_see.o(.text);
|
||||
src/wild_encounter.o(.text);
|
||||
src/field_effect.o(.text);
|
||||
asm/field_effect.o(.text);
|
||||
asm/unknown_task.o(.text);
|
||||
asm/pokemon_menu.o(.text);
|
||||
src/option_menu.o(.text);
|
||||
|
||||
2847
src/field_effect.c
Normal file → Executable file
2847
src/field_effect.c
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
@@ -615,7 +615,7 @@ static u8 UpdateFastPaletteFade(void)
|
||||
if (b < b0)
|
||||
b = b0;
|
||||
|
||||
gPlttBufferFaded[i] = r | (g << 5) | (b << 10);
|
||||
gPlttBufferFaded[i] = RGB(r, g, b);
|
||||
}
|
||||
break;
|
||||
case FAST_FADE_OUT_TO_WHTIE:
|
||||
@@ -633,7 +633,7 @@ static u8 UpdateFastPaletteFade(void)
|
||||
if (b > 31)
|
||||
b = 31;
|
||||
|
||||
gPlttBufferFaded[i] = r | (g << 5) | (b << 10);
|
||||
gPlttBufferFaded[i] = RGB(r, g, b);
|
||||
}
|
||||
break;
|
||||
case FAST_FADE_IN_FROM_BLACK:
|
||||
@@ -659,7 +659,7 @@ static u8 UpdateFastPaletteFade(void)
|
||||
if (b > b0)
|
||||
b = b0;
|
||||
|
||||
gPlttBufferFaded[i] = r | (g << 5) | (b << 10);
|
||||
gPlttBufferFaded[i] = RGB(r, g, b);
|
||||
}
|
||||
break;
|
||||
case FAST_FADE_OUT_TO_BLACK:
|
||||
@@ -677,7 +677,7 @@ static u8 UpdateFastPaletteFade(void)
|
||||
if (b < 0)
|
||||
b = 0;
|
||||
|
||||
gPlttBufferFaded[i] = r | (g << 5) | (b << 10);
|
||||
gPlttBufferFaded[i] = RGB(r, g, b);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user