mirror of https://github.com/pret/pokefirered
Sync battle anim - scripts
This commit is contained in:
parent
a3c2108af7
commit
17b2faa182
|
|
@ -14,7 +14,7 @@
|
|||
.byte 0x02
|
||||
.4byte \template
|
||||
.if \anim_battler == ANIM_TARGET
|
||||
.byte 0x80 | (\subpriority_offset & 0x7F)
|
||||
.byte ANIMSPRITE_IS_TARGET | (\subpriority_offset & 0x7F)
|
||||
.else
|
||||
.byte (\subpriority_offset & 0x7F)
|
||||
.endif
|
||||
|
|
@ -34,20 +34,20 @@
|
|||
.Lcreatetask_\@_2:
|
||||
.endm
|
||||
|
||||
.macro delay param0:req
|
||||
.macro delay frames:req
|
||||
.byte 0x4
|
||||
.byte \param0
|
||||
.byte \frames
|
||||
.endm
|
||||
|
||||
.macro waitforvisualfinish
|
||||
.byte 0x5
|
||||
.endm
|
||||
|
||||
.macro hang1
|
||||
.macro nop
|
||||
.byte 0x6
|
||||
.endm
|
||||
|
||||
.macro hang2
|
||||
.macro nop2
|
||||
.byte 0x7
|
||||
.endm
|
||||
|
||||
|
|
@ -79,30 +79,30 @@
|
|||
.byte 0xd
|
||||
.endm
|
||||
|
||||
.macro call param0:req
|
||||
.macro call ptr:req
|
||||
.byte 0xe
|
||||
.4byte \param0
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro return
|
||||
.byte 0xf
|
||||
.endm
|
||||
|
||||
.macro setarg param0:req, param1:req
|
||||
.macro setarg argId:req, value:req
|
||||
.byte 0x10
|
||||
.byte \param0
|
||||
.2byte \param1
|
||||
.byte \argId
|
||||
.2byte \value
|
||||
.endm
|
||||
|
||||
.macro choosetwoturnanim param0:req, param1:req
|
||||
.macro choosetwoturnanim ptr1:req, ptr2:req
|
||||
.byte 0x11
|
||||
.4byte \param0
|
||||
.4byte \param1
|
||||
.4byte \ptr1
|
||||
.4byte \ptr2
|
||||
.endm
|
||||
|
||||
.macro jumpifmoveturn param0:req, ptr:req
|
||||
.macro jumpifmoveturn value:req, ptr:req
|
||||
.byte 0x12
|
||||
.byte \param0
|
||||
.byte \value
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
|
@ -144,13 +144,13 @@
|
|||
.byte \pan
|
||||
.endm
|
||||
|
||||
.macro panse_1B se:req, param1:req, param2:req, param3:req, param4:req
|
||||
.macro panse se:req, currentPan:req, targetPan:req, incrementPan:req, delay:req
|
||||
.byte 0x1b
|
||||
.2byte \se
|
||||
.byte \param1
|
||||
.byte \param2
|
||||
.byte \param3
|
||||
.byte \param4
|
||||
.byte \currentPan
|
||||
.byte \targetPan
|
||||
.byte \incrementPan
|
||||
.byte \delay
|
||||
.endm
|
||||
|
||||
.macro loopsewithpan se:req, pan:req, wait:req, times:req
|
||||
|
|
@ -168,9 +168,9 @@
|
|||
.byte \wait
|
||||
.endm
|
||||
|
||||
.macro setbldcnt param0:req
|
||||
.macro setbldcnt bldcnt:req
|
||||
.byte 0x1e
|
||||
.2byte \param0
|
||||
.2byte \bldcnt
|
||||
.endm
|
||||
|
||||
.macro createsoundtask addr:req, argv:vararg
|
||||
|
|
@ -186,19 +186,19 @@
|
|||
.byte 0x20
|
||||
.endm
|
||||
|
||||
.macro jumpargeq param0:req, param1:req, ptr:req
|
||||
.macro jumpargeq argId:req, value:req, ptr:req
|
||||
.byte 0x21
|
||||
.byte \param0
|
||||
.2byte \param1
|
||||
.byte \argId
|
||||
.2byte \value
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro monbg_22 battler:req
|
||||
.macro monbg_static battler:req
|
||||
.byte 0x22
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro clearmonbg_23 battler:req
|
||||
.macro clearmonbg_static battler:req
|
||||
.byte 0x23
|
||||
.byte \battler
|
||||
.endm
|
||||
|
|
@ -208,41 +208,41 @@
|
|||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro fadetobgfromset param0:req, param1:req, param2:req
|
||||
.macro fadetobgfromset bgOpponent:req, bgPlayer:req, bgContest:req
|
||||
.byte 0x25
|
||||
.byte \param0
|
||||
.byte \param1
|
||||
.byte \param2
|
||||
.byte \bgOpponent
|
||||
.byte \bgPlayer
|
||||
.byte \bgContest
|
||||
.endm
|
||||
|
||||
.macro panse_26 se:req, param1:req, param2:req, param3:req, param4:req
|
||||
.macro panse_adjustnone se:req, currentPan:req, targetPan:req, incrementPan:req, delay:req
|
||||
.byte 0x26
|
||||
.2byte \se
|
||||
.byte \param1
|
||||
.byte \param2
|
||||
.byte \param3
|
||||
.byte \param4
|
||||
.byte \currentPan
|
||||
.byte \targetPan
|
||||
.byte \incrementPan
|
||||
.byte \delay
|
||||
.endm
|
||||
|
||||
.macro panse_27 se:req, param1:req, param2:req, param3:req, param4:req
|
||||
.macro panse_adjustall se:req, currentPan:req, targetPan:req, incrementPan:req, delay:req
|
||||
.byte 0x27
|
||||
.2byte \se
|
||||
.byte \param1
|
||||
.byte \param2
|
||||
.byte \param3
|
||||
.byte \param4
|
||||
.byte \currentPan
|
||||
.byte \targetPan
|
||||
.byte \incrementPan
|
||||
.byte \delay
|
||||
.endm
|
||||
|
||||
.macro monbgprio_28 battler:req
|
||||
.macro splitbgprio battler:req
|
||||
.byte 0x28
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro monbgprio_29
|
||||
.macro splitbgprio_all
|
||||
.byte 0x29
|
||||
.endm
|
||||
|
||||
.macro monbgprio_2A battler:req
|
||||
.macro splitbgprio_foes battler:req
|
||||
.byte 0x2a
|
||||
.byte \battler
|
||||
.endm
|
||||
|
|
@ -257,12 +257,12 @@
|
|||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro doublebattle_2D battler:req
|
||||
.macro teamattack_moveback battler:req
|
||||
.byte 0x2d
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro doublebattle_2E battler:req
|
||||
.macro teamattack_movefwd battler:req
|
||||
.byte 0x2e
|
||||
.byte \battler
|
||||
.endm
|
||||
|
|
|
|||
|
|
@ -488,3 +488,26 @@
|
|||
.set OAM_SIZE_8x32, OAM_SIZE_1 | OAM_V_RECTANGLE
|
||||
.set OAM_SIZE_16x32, OAM_SIZE_2 | OAM_V_RECTANGLE
|
||||
.set OAM_SIZE_32x64, OAM_SIZE_3 | OAM_V_RECTANGLE
|
||||
|
||||
@ BLDCNT
|
||||
|
||||
.set BLDCNT_TGT1_BG0, 1 << 0
|
||||
.set BLDCNT_TGT1_BG1, 1 << 1
|
||||
.set BLDCNT_TGT1_BG2, 1 << 2
|
||||
.set BLDCNT_TGT1_BG3, 1 << 3
|
||||
.set BLDCNT_TGT1_OBJ, 1 << 4
|
||||
.set BLDCNT_TGT1_BD, 1 << 5
|
||||
.set BLDCNT_TGT1_ALL, BLDCNT_TGT1_BG0 | BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD
|
||||
|
||||
.set BLDCNT_EFFECT_NONE, 0 << 6
|
||||
.set BLDCNT_EFFECT_BLEND, 1 << 6
|
||||
.set BLDCNT_EFFECT_LIGHTEN, 2 << 6
|
||||
.set BLDCNT_EFFECT_DARKEN, 3 << 6
|
||||
|
||||
.set BLDCNT_TGT2_BG0, 1 << 8
|
||||
.set BLDCNT_TGT2_BG1, 1 << 9
|
||||
.set BLDCNT_TGT2_BG2, 1 << 10
|
||||
.set BLDCNT_TGT2_BG3, 1 << 11
|
||||
.set BLDCNT_TGT2_OBJ, 1 << 12
|
||||
.set BLDCNT_TGT2_BD, 1 << 13
|
||||
.set BLDCNT_TGT2_ALL, BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -346,59 +346,62 @@
|
|||
#define BG_SOLAR_BEAM_PLAYER 25
|
||||
#define BG_SOLAR_BEAM_CONTESTS 26
|
||||
|
||||
// table ids for general animations
|
||||
#define B_ANIM_CASTFORM_CHANGE 0x0
|
||||
#define B_ANIM_STATS_CHANGE 0x1
|
||||
#define B_ANIM_SUBSTITUTE_FADE 0x2
|
||||
#define B_ANIM_SUBSTITUTE_APPEAR 0x3
|
||||
#define B_ANIM_BAIT_THROW 0x4
|
||||
#define B_ANIM_ITEM_KNOCKOFF 0x5
|
||||
#define B_ANIM_TURN_TRAP 0x6
|
||||
#define B_ANIM_HELD_ITEM_EFFECT 0x7
|
||||
#define B_ANIM_SMOKEBALL_ESCAPE 0x8
|
||||
#define B_ANIM_FOCUS_BAND 0x9
|
||||
#define B_ANIM_RAIN_CONTINUES 0xA
|
||||
#define B_ANIM_SUN_CONTINUES 0xB
|
||||
#define B_ANIM_SANDSTORM_CONTINUES 0xC
|
||||
#define B_ANIM_HAIL_CONTINUES 0xD
|
||||
#define B_ANIM_LEECH_SEED_DRAIN 0xE
|
||||
#define B_ANIM_MON_HIT 0xF
|
||||
#define B_ANIM_ITEM_STEAL 0x10
|
||||
#define B_ANIM_SNATCH_MOVE 0x11
|
||||
#define B_ANIM_FUTURE_SIGHT_HIT 0x12
|
||||
#define B_ANIM_DOOM_DESIRE_HIT 0x13
|
||||
#define B_ANIM_FOCUS_PUNCH_SETUP 0x14
|
||||
#define B_ANIM_INGRAIN_HEAL 0x15
|
||||
#define B_ANIM_WISH_HEAL 0x16
|
||||
#define B_ANIM_MON_SCARED 0x17
|
||||
#define B_ANIM_GHOST_GET_OUT 0x18
|
||||
#define B_ANIM_SILPH_SCOPED 0x19
|
||||
#define B_ANIM_ROCK_THROW 0x1A
|
||||
#define B_ANIM_SAFARI_REACTION 0x1B
|
||||
// table ids for general animations (gBattleAnims_General)
|
||||
#define B_ANIM_CASTFORM_CHANGE 0
|
||||
#define B_ANIM_STATS_CHANGE 1
|
||||
#define B_ANIM_SUBSTITUTE_FADE 2
|
||||
#define B_ANIM_SUBSTITUTE_APPEAR 3
|
||||
#define B_ANIM_BAIT_THROW 4
|
||||
#define B_ANIM_ITEM_KNOCKOFF 5
|
||||
#define B_ANIM_TURN_TRAP 6
|
||||
#define B_ANIM_HELD_ITEM_EFFECT 7
|
||||
#define B_ANIM_SMOKEBALL_ESCAPE 8
|
||||
#define B_ANIM_FOCUS_BAND 9
|
||||
#define B_ANIM_RAIN_CONTINUES 10
|
||||
#define B_ANIM_SUN_CONTINUES 11
|
||||
#define B_ANIM_SANDSTORM_CONTINUES 12
|
||||
#define B_ANIM_HAIL_CONTINUES 13
|
||||
#define B_ANIM_LEECH_SEED_DRAIN 14
|
||||
#define B_ANIM_MON_HIT 15
|
||||
#define B_ANIM_ITEM_STEAL 16
|
||||
#define B_ANIM_SNATCH_MOVE 17
|
||||
#define B_ANIM_FUTURE_SIGHT_HIT 18
|
||||
#define B_ANIM_DOOM_DESIRE_HIT 19
|
||||
#define B_ANIM_FOCUS_PUNCH_SETUP 20
|
||||
#define B_ANIM_INGRAIN_HEAL 21
|
||||
#define B_ANIM_WISH_HEAL 22
|
||||
#define B_ANIM_MON_SCARED 23
|
||||
#define B_ANIM_GHOST_GET_OUT 24
|
||||
#define B_ANIM_SILPH_SCOPED 25
|
||||
#define B_ANIM_ROCK_THROW 26
|
||||
#define B_ANIM_SAFARI_REACTION 27
|
||||
|
||||
// special animations table
|
||||
#define B_ANIM_LVL_UP 0x0
|
||||
#define B_ANIM_SWITCH_OUT_PLAYER_MON 0x1
|
||||
#define B_ANIM_SWITCH_OUT_OPPONENT_MON 0x2
|
||||
#define B_ANIM_BALL_THROW 0x3
|
||||
#define B_ANIM_SAFARI_BALL_THROW 0x4
|
||||
#define B_ANIM_SUBSTITUTE_TO_MON 0x5
|
||||
#define B_ANIM_MON_TO_SUBSTITUTE 0x6
|
||||
// special animations table (gBattleAnims_Special)
|
||||
#define B_ANIM_LVL_UP 0
|
||||
#define B_ANIM_SWITCH_OUT_PLAYER_MON 1
|
||||
#define B_ANIM_SWITCH_OUT_OPPONENT_MON 2
|
||||
#define B_ANIM_BALL_THROW 3
|
||||
#define B_ANIM_BALL_THROW_WITH_TRAINER 4
|
||||
#define B_ANIM_SUBSTITUTE_TO_MON 5
|
||||
#define B_ANIM_MON_TO_SUBSTITUTE 6
|
||||
|
||||
// status animation table
|
||||
#define B_ANIM_STATUS_PSN 0x0
|
||||
#define B_ANIM_STATUS_CONFUSION 0x1
|
||||
#define B_ANIM_STATUS_BRN 0x2
|
||||
#define B_ANIM_STATUS_INFATUATION 0x3
|
||||
#define B_ANIM_STATUS_SLP 0x4
|
||||
#define B_ANIM_STATUS_PRZ 0x5
|
||||
#define B_ANIM_STATUS_FRZ 0x6
|
||||
#define B_ANIM_STATUS_CURSED 0x7
|
||||
#define B_ANIM_STATUS_NIGHTMARE 0x8
|
||||
#define B_ANIM_STATUS_WRAPPED 0x9 // does not actually exist
|
||||
// status animation table (gBattleAnims_StatusConditions)
|
||||
#define B_ANIM_STATUS_PSN 0
|
||||
#define B_ANIM_STATUS_CONFUSION 1
|
||||
#define B_ANIM_STATUS_BRN 2
|
||||
#define B_ANIM_STATUS_INFATUATION 3
|
||||
#define B_ANIM_STATUS_SLP 4
|
||||
#define B_ANIM_STATUS_PRZ 5
|
||||
#define B_ANIM_STATUS_FRZ 6
|
||||
#define B_ANIM_STATUS_CURSED 7
|
||||
#define B_ANIM_STATUS_NIGHTMARE 8
|
||||
#define B_ANIM_STATUS_WRAPPED 9 // does not actually exist
|
||||
|
||||
// Most tasks return a value to gBattleAnimArgs[7].
|
||||
#define ARG_RET_ID 0x7
|
||||
#define ARG_RET_ID 7
|
||||
|
||||
// For createsprite macro to use internally
|
||||
#define ANIMSPRITE_IS_TARGET (1 << 7)
|
||||
|
||||
// Trapping Wrap-like moves end turn animation.
|
||||
#define TRAP_ANIM_BIND 0
|
||||
|
|
@ -415,6 +418,22 @@
|
|||
#define ANIM_WEATHER_SANDSTORM 3
|
||||
#define ANIM_WEATHER_HAIL 4
|
||||
|
||||
// Flags given to various functions to indicate which palettes to consider.
|
||||
// Handled by UnpackSelectedBattlePalettes
|
||||
#define F_PAL_BG (1 << 0)
|
||||
#define F_PAL_ATTACKER (1 << 1)
|
||||
#define F_PAL_TARGET (1 << 2)
|
||||
#define F_PAL_ATK_PARTNER (1 << 3)
|
||||
#define F_PAL_DEF_PARTNER (1 << 4)
|
||||
#define F_PAL_ANIM_1 (1 << 5) // Palette set for GetBattleAnimBg1Data/GetBattleAnimBgDataByPriorityRank. Only used (ineffectually?) by Aromatherapy.
|
||||
#define F_PAL_ANIM_2 (1 << 6) // Palette set for GetBattleAnimBgData/GetBattleAnimBgDataByPriorityRank. Unused.
|
||||
#define F_PAL_ATK_SIDE (F_PAL_ATTACKER | F_PAL_ATK_PARTNER)
|
||||
#define F_PAL_DEF_SIDE (F_PAL_TARGET | F_PAL_DEF_PARTNER)
|
||||
#define F_PAL_BATTLERS (F_PAL_ATK_SIDE | F_PAL_DEF_SIDE)
|
||||
// The below are only used by AnimTask_BlendBattleAnimPal to get battler sprite palettes by position rather than by role.
|
||||
// It's redundant with F_PAL_BATTLERS, because they're only ever used together to refer to all the battlers at once.
|
||||
#define F_PAL_BATTLERS_2 (1 << 7 | 1 << 8 | 1 << 9 | 1 << 10)
|
||||
|
||||
// Battle mon back animations.
|
||||
#define BACK_ANIM_NONE 0x00
|
||||
#define BACK_ANIM_H_SLIDE_QUICK 0x01
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef GUARD_RGB_H
|
||||
#define GUARD_RGB_H
|
||||
|
||||
#define GET_R(color) ((color) & 0x1F)
|
||||
#define GET_G(color) (((color) >> 5) & 0x1F)
|
||||
#define GET_B(color) (((color) >> 10) & 0x1F)
|
||||
|
||||
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
||||
#define RGB2(r, g, b) (((b) << 10) | ((g) << 5) | (r))
|
||||
#define _RGB(r, g, b) ((((b) & 0x1F) << 10) + (((g) & 0x1F) << 5) + ((r) & 0x1F))
|
||||
|
||||
#define RGB_ALPHA (1 << 15)
|
||||
#define IS_ALPHA(color) ((color) & RGB_ALPHA)
|
||||
|
||||
#define RGB_BLACK RGB(0, 0, 0)
|
||||
#define RGB_WHITE RGB(31, 31, 31)
|
||||
#define RGB_RED RGB(31, 0, 0)
|
||||
#define RGB_GREEN RGB(0, 31, 0)
|
||||
#define RGB_BLUE RGB(0, 0, 31)
|
||||
#define RGB_YELLOW RGB(31, 31, 0)
|
||||
#define RGB_MAGENTA RGB(31, 0, 31)
|
||||
#define RGB_CYAN RGB(0, 31, 31)
|
||||
#define RGB_WHITEALPHA (RGB_WHITE | RGB_ALPHA)
|
||||
|
||||
#endif // GUARD_RGB_H
|
||||
|
|
@ -79,20 +79,6 @@
|
|||
|
||||
#define TOTAL_OBJ_TILE_COUNT 1024
|
||||
|
||||
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
||||
#define RGB2(r, g, b) (((b) << 10) | ((g) << 5) | (r))
|
||||
#define _RGB(r, g, b) ((((b) & 0x1F) << 10) + (((g) & 0x1F) << 5) + ((r) & 0x1F))
|
||||
|
||||
#define RGB_BLACK RGB(0, 0, 0)
|
||||
#define RGB_WHITE RGB(31, 31, 31)
|
||||
#define RGB_RED RGB(31, 0, 0)
|
||||
#define RGB_GREEN RGB(0, 31, 0)
|
||||
#define RGB_BLUE RGB(0, 0, 31)
|
||||
#define RGB_YELLOW RGB(31, 31, 0)
|
||||
#define RGB_MAGENTA RGB(31, 0, 31)
|
||||
#define RGB_CYAN RGB(0, 31, 31)
|
||||
#define RGB_WHITEALPHA (RGB_WHITE | 0x8000)
|
||||
|
||||
// Some functions are strictly inline asm
|
||||
#define NAKED __attribute__((naked))
|
||||
#define UNUSED __attribute__((unused))
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "constants/vars.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/easy_chat.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
// Prevent cross-jump optimization.
|
||||
#define BLOCK_CROSS_JUMP asm("");
|
||||
|
|
|
|||
|
|
@ -866,7 +866,7 @@ static void AnimTask_MetallicShine_Step(u8 taskId)
|
|||
// Changes battler's palette to either greyscale or original.
|
||||
// arg0: which battler
|
||||
// arg1: 0 grayscale, 1 original
|
||||
void AnimTask_SetGreyscaleOrOriginalPal(u8 taskId)
|
||||
void AnimTask_SetGrayscaleOrOriginalPal(u8 taskId)
|
||||
{
|
||||
u8 spriteId, battler;
|
||||
bool8 calcSpriteId = FALSE;
|
||||
|
|
|
|||
|
|
@ -516,7 +516,7 @@ const struct SpriteTemplate gRazorLeafParticleSpriteTemplate =
|
|||
.callback = AnimRazorLeafParticle,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gTwisterLeafParticleSpriteTemplate =
|
||||
const struct SpriteTemplate gTwisterLeafSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_LEAF,
|
||||
.paletteTag = ANIM_TAG_LEAF,
|
||||
|
|
@ -1362,7 +1362,7 @@ static const struct SpriteTemplate sCirclingMusicNoteSpriteTemplate =
|
|||
.callback = AnimCirclingMusicNote,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gProtectWallSpriteTemplate =
|
||||
const struct SpriteTemplate gProtectSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_PROTECT,
|
||||
.paletteTag = ANIM_TAG_PROTECT,
|
||||
|
|
@ -5034,10 +5034,10 @@ static void AnimMoonlightSparkle_Step(struct Sprite* sprite)
|
|||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
void AnimTask_FadeScreenBlue_Step(u8);
|
||||
void AnimTask_MoonlightEndFade_Step(u8);
|
||||
|
||||
|
||||
void AnimTask_FadeScreenBlue(u8 taskId)
|
||||
void AnimTask_MoonlightEndFade(u8 taskId)
|
||||
{
|
||||
int a = GetBattlePalettesMask(TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) & 0xFFFF;
|
||||
int b;
|
||||
|
|
@ -5060,11 +5060,11 @@ void AnimTask_FadeScreenBlue(u8 taskId)
|
|||
b = b | (0x10000 << IndexOfSpritePaletteTag(ANIM_TAG_MOON));
|
||||
d = IndexOfSpritePaletteTag(ANIM_TAG_GREEN_SPARKLE);
|
||||
BeginNormalPaletteFade((0x10000 << d) | b, 0, 0, 16, RGB(27, 29, 31));
|
||||
gTasks[taskId].func = AnimTask_FadeScreenBlue_Step;
|
||||
gTasks[taskId].func = AnimTask_MoonlightEndFade_Step;
|
||||
gTasks[taskId].func(taskId);
|
||||
}
|
||||
|
||||
void AnimTask_FadeScreenBlue_Step(u8 taskId)
|
||||
void AnimTask_MoonlightEndFade_Step(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ static void AnimGuillotinePincer(struct Sprite *);
|
|||
static void AnimGuillotinePincer_Step1(struct Sprite *);
|
||||
static void AnimGuillotinePincer_Step2(struct Sprite *);
|
||||
static void AnimGuillotinePincer_Step3(struct Sprite *);
|
||||
static void AnimTask_GrowAndGreyscale_Step(u8);
|
||||
static void AnimTask_GrowAndGrayscale_Step(u8);
|
||||
static void AnimTask_Minimize_Step1(u8);
|
||||
static void CreateMinimizeSprite(struct Task *, u8);
|
||||
static void ClonedMinizeSprite_Step(struct Sprite *);
|
||||
|
|
@ -301,7 +301,7 @@ static const union AffineAnimCmd *const sWaterPulseRingAffineAnimTable[] =
|
|||
sWaterPulseRingAffineAnimCmds,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gSupersonicWaveSpriteTemplate =
|
||||
const struct SpriteTemplate gSupersonicRingSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_GOLD_RING,
|
||||
.paletteTag = ANIM_TAG_GOLD_RING,
|
||||
|
|
@ -312,7 +312,7 @@ const struct SpriteTemplate gSupersonicWaveSpriteTemplate =
|
|||
.callback = TranslateAnimSpriteToTargetMonLocation,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gScreechWaveSpriteTemplate =
|
||||
const struct SpriteTemplate gScreechRingSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_PURPLE_RING,
|
||||
.paletteTag = ANIM_TAG_PURPLE_RING,
|
||||
|
|
@ -2005,7 +2005,7 @@ static void AnimGuillotinePincer_Step3(struct Sprite *sprite)
|
|||
// Scales up the target mon sprite, and sets the palette to greyscale.
|
||||
// Used in MOVE_DISABLE.
|
||||
// No args.
|
||||
void AnimTask_GrowAndGreyscale(u8 taskId)
|
||||
void AnimTask_GrowAndGrayscale(u8 taskId)
|
||||
{
|
||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET);
|
||||
|
||||
|
|
@ -2013,10 +2013,10 @@ void AnimTask_GrowAndGreyscale(u8 taskId)
|
|||
SetSpriteRotScale(spriteId, 0xD0, 0xD0, 0);
|
||||
SetGreyscaleOrOriginalPalette(gSprites[spriteId].oam.paletteNum + 16, FALSE);
|
||||
gTasks[taskId].data[0] = 80;
|
||||
gTasks[taskId].func = AnimTask_GrowAndGreyscale_Step;
|
||||
gTasks[taskId].func = AnimTask_GrowAndGrayscale_Step;
|
||||
}
|
||||
|
||||
static void AnimTask_GrowAndGreyscale_Step(u8 taskId)
|
||||
static void AnimTask_GrowAndGrayscale_Step(u8 taskId)
|
||||
{
|
||||
if (--gTasks[taskId].data[0] == -1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -792,7 +792,7 @@ void AnimTask_RotateMonSpriteToSide(u8 taskId)
|
|||
gTasks[taskId].data[7] = 1;
|
||||
else
|
||||
{
|
||||
if (gBattleAnimArgs[2] == 0)
|
||||
if (gBattleAnimArgs[2] == ANIM_ATTACKER)
|
||||
gTasks[taskId].data[7] = GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER ? 1 : 0;
|
||||
else
|
||||
gTasks[taskId].data[7] = GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER ? 1 : 0;
|
||||
|
|
|
|||
|
|
@ -2037,7 +2037,7 @@ void AnimTask_IsAttackerBehindSubstitute(u8 taskId)
|
|||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void AnimTask_TargetToEffectBattler(u8 taskId)
|
||||
void AnimTask_SetTargetToEffectBattler(u8 taskId)
|
||||
{
|
||||
gBattleAnimTarget = gEffectBattler;
|
||||
DestroyAnimVisualTask(taskId);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ const u8 gBattleIntroRegOffsBgCnt[] = { REG_OFFSET_BG0CNT, REG_OFFSET_BG1CNT, RE
|
|||
// 8: Player battler right
|
||||
// 9: Enemy battler left
|
||||
// 10: Enemy battler right
|
||||
void AnimTask_BlendSelected(u8 taskId)
|
||||
void AnimTask_BlendBattleAnimPal(u8 taskId)
|
||||
{
|
||||
u32 selectedPalettes = UnpackSelectedBattlePalettes(gBattleAnimArgs[0]);
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ void AnimTask_BlendSelected(u8 taskId)
|
|||
// 5: Blend all
|
||||
// 6: Neither bg nor attacker's partner
|
||||
// 7: Neither bg nor target's partner
|
||||
void AnimTask_BlendExcept(u8 taskId)
|
||||
void AnimTask_BlendBattleAnimPalExclude(u8 taskId)
|
||||
{
|
||||
u8 battler;
|
||||
u32 selectedPalettes;
|
||||
|
|
|
|||
|
|
@ -1662,7 +1662,7 @@ static void OakOldManHandleSuccessBallThrowAnim(void)
|
|||
{
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = BALL_3_SHAKES_SUCCESS;
|
||||
gDoingBattleAnim = TRUE;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_SAFARI_BALL_THROW);
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone;
|
||||
}
|
||||
|
||||
|
|
@ -1672,7 +1672,7 @@ static void OakOldManHandleBallThrowAnim(void)
|
|||
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = ballThrowCaseId;
|
||||
gDoingBattleAnim = TRUE;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_SAFARI_BALL_THROW);
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ static void SafariHandleSuccessBallThrowAnim(void)
|
|||
{
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = BALL_3_SHAKES_SUCCESS;
|
||||
gDoingBattleAnim = TRUE;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_SAFARI_BALL_THROW);
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone;
|
||||
}
|
||||
|
||||
|
|
@ -386,7 +386,7 @@ static void SafariHandleBallThrowAnim(void)
|
|||
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = ballThrowCaseId;
|
||||
gDoingBattleAnim = TRUE;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_SAFARI_BALL_THROW);
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue