Merge branch 'master' of https://github.com/pret/pokeemerald into ui-standardize
This commit is contained in:
+19
-19
@@ -81,7 +81,7 @@ static const u8 sCastformBackSpriteYCoords[NUM_CASTFORM_FORMS] =
|
||||
#define TAG_MOVE_EFFECT_MON_1 55125
|
||||
#define TAG_MOVE_EFFECT_MON_2 55126
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_MoveEffectMons[] =
|
||||
static const struct SpriteTemplate sSpriteTemplates_MoveEffectMons[] =
|
||||
{
|
||||
{
|
||||
.tileTag = TAG_MOVE_EFFECT_MON_1,
|
||||
@@ -103,7 +103,7 @@ static const struct SpriteTemplate sSpriteTemplate_MoveEffectMons[] =
|
||||
}
|
||||
};
|
||||
|
||||
static const struct SpriteSheet sSpriteSheet_MoveEffectMons[] =
|
||||
static const struct SpriteSheet sSpriteSheets_MoveEffectMons[] =
|
||||
{
|
||||
{ gMiscBlank_Gfx, MON_PIC_SIZE, TAG_MOVE_EFFECT_MON_1, },
|
||||
{ gMiscBlank_Gfx, MON_PIC_SIZE, TAG_MOVE_EFFECT_MON_2, },
|
||||
@@ -440,7 +440,7 @@ void SetCallbackToStoredInData6(struct Sprite *sprite)
|
||||
#define sAmplitudeX sAmplitude
|
||||
#define sAmplitudeY data[4]
|
||||
|
||||
// TranslateSpriteInWavePattern
|
||||
// TranslateSpriteInLissajousCurve
|
||||
#define sCirclePosX sCirclePos
|
||||
#define sCircleSpeedX sCircleSpeed
|
||||
#define sCirclePosY data[4]
|
||||
@@ -487,7 +487,7 @@ void TranslateSpriteInGrowingCircle(struct Sprite *sprite)
|
||||
|
||||
// Unused
|
||||
// Exact shape depends on arguments. Can move in a figure-8-like pattern, or circular, etc.
|
||||
static void TranslateSpriteInWavePattern(struct Sprite *sprite)
|
||||
static void TranslateSpriteInLissajousCurve(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->sDuration)
|
||||
{
|
||||
@@ -495,7 +495,7 @@ static void TranslateSpriteInWavePattern(struct Sprite *sprite)
|
||||
sprite->y2 = Cos(sprite->sCirclePosY, sprite->sAmplitude);
|
||||
sprite->sCirclePosX += sprite->sCircleSpeedX;
|
||||
sprite->sCirclePosY += sprite->sCircleSpeedY;
|
||||
|
||||
|
||||
if (sprite->sCirclePosX >= 0x100)
|
||||
sprite->sCirclePosX -= 0x100;
|
||||
else if (sprite->sCirclePosX < 0)
|
||||
@@ -857,7 +857,7 @@ u8 GetBattlerSide(u8 battlerId)
|
||||
|
||||
u8 GetBattlerPosition(u8 battlerId)
|
||||
{
|
||||
return GET_BATTLER_POSITION(battlerId);
|
||||
return gBattlerPositions[battlerId];
|
||||
}
|
||||
|
||||
u8 GetBattlerAtPosition(u8 position)
|
||||
@@ -1508,13 +1508,13 @@ u32 GetBattleMonSpritePalettesMask(u8 playerLeft, u8 playerRight, u8 opponentLef
|
||||
return selectedPalettes;
|
||||
}
|
||||
|
||||
// Presumably something commented here, just returns arg
|
||||
u8 AnimDummyReturnArg(u8 battler)
|
||||
u8 GetSpritePalIdxByBattler(u8 battler)
|
||||
{
|
||||
return battler;
|
||||
}
|
||||
|
||||
static u8 GetBattlerAtPosition_(u8 position)
|
||||
// Unused
|
||||
static u8 GetSpritePalIdxByPosition(u8 position)
|
||||
{
|
||||
return GetBattlerAtPosition(position);
|
||||
}
|
||||
@@ -1552,20 +1552,20 @@ void AnimSpriteOnMonPos(struct Sprite *sprite)
|
||||
// arg 5: lower 8 bits = location on attacking mon, upper 8 bits = location on target mon pick to target
|
||||
void TranslateAnimSpriteToTargetMonLocation(struct Sprite *sprite)
|
||||
{
|
||||
bool8 v1;
|
||||
bool8 respectMonPicOffsets;
|
||||
u8 coordType;
|
||||
|
||||
if (!(gBattleAnimArgs[5] & 0xff00))
|
||||
v1 = TRUE;
|
||||
respectMonPicOffsets = TRUE;
|
||||
else
|
||||
v1 = FALSE;
|
||||
respectMonPicOffsets = FALSE;
|
||||
|
||||
if (!(gBattleAnimArgs[5] & 0xff))
|
||||
coordType = BATTLER_COORD_Y_PIC_OFFSET;
|
||||
else
|
||||
coordType = BATTLER_COORD_Y;
|
||||
|
||||
InitSpritePosToAnimAttacker(sprite, v1);
|
||||
InitSpritePosToAnimAttacker(sprite, respectMonPicOffsets);
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||
|
||||
@@ -2097,8 +2097,8 @@ u8 GetBattlerSpriteBGPriorityRank(u8 battlerId)
|
||||
u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId, bool32 ignoreDeoxysForm)
|
||||
{
|
||||
u8 spriteId;
|
||||
u16 sheet = LoadSpriteSheet(&sSpriteSheet_MoveEffectMons[id]);
|
||||
u16 palette = AllocSpritePalette(sSpriteTemplate_MoveEffectMons[id].paletteTag);
|
||||
u16 sheet = LoadSpriteSheet(&sSpriteSheets_MoveEffectMons[id]);
|
||||
u16 palette = AllocSpritePalette(sSpriteTemplates_MoveEffectMons[id].paletteTag);
|
||||
|
||||
if (gMonSpritesGfxPtr != NULL && gMonSpritesGfxPtr->buffer == NULL)
|
||||
gMonSpritesGfxPtr->buffer = AllocZeroed(0x2000);
|
||||
@@ -2139,9 +2139,9 @@ u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16
|
||||
FREE_AND_SET_NULL(gMonSpritesGfxPtr->buffer);
|
||||
|
||||
if (!isBackpic)
|
||||
spriteId = CreateSprite(&sSpriteTemplate_MoveEffectMons[id], x, y + gMonFrontPicCoords[species].y_offset, subpriority);
|
||||
spriteId = CreateSprite(&sSpriteTemplates_MoveEffectMons[id], x, y + gMonFrontPicCoords[species].y_offset, subpriority);
|
||||
else
|
||||
spriteId = CreateSprite(&sSpriteTemplate_MoveEffectMons[id], x, y + gMonBackPicCoords[species].y_offset, subpriority);
|
||||
spriteId = CreateSprite(&sSpriteTemplates_MoveEffectMons[id], x, y + gMonBackPicCoords[species].y_offset, subpriority);
|
||||
|
||||
if (IsContest())
|
||||
{
|
||||
@@ -2519,7 +2519,7 @@ void AnimWeatherBallUp(struct Sprite *sprite)
|
||||
{
|
||||
sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2);
|
||||
sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET);
|
||||
if (!GetBattlerSide(gBattleAnimAttacker))
|
||||
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER)
|
||||
sprite->data[0] = 5;
|
||||
else
|
||||
sprite->data[0] = -10;
|
||||
@@ -2545,7 +2545,7 @@ void AnimWeatherBallDown(struct Sprite *sprite)
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
sprite->data[2] = sprite->x + gBattleAnimArgs[4];
|
||||
sprite->data[4] = sprite->y + gBattleAnimArgs[5];
|
||||
if (!GetBattlerSide(gBattleAnimTarget))
|
||||
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
|
||||
{
|
||||
x = (u16)gBattleAnimArgs[4] + 30;
|
||||
sprite->x += x;
|
||||
|
||||
Reference in New Issue
Block a user