Skip to content

Commit

Permalink
Merge pull request #2264 from AsparagusEduardo/RHH_pretMerge20220826
Browse files Browse the repository at this point in the history
Friday Night Mergin' (weekly merge)
  • Loading branch information
DizzyEggg authored Aug 29, 2022
2 parents 78c44b5 + 7c86bd5 commit b9babd9
Show file tree
Hide file tree
Showing 28 changed files with 172 additions and 182 deletions.
20 changes: 10 additions & 10 deletions data/battle_anim_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -14698,14 +14698,14 @@ Move_DOUBLE_EDGE:
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -10, 0, ANIM_TARGET, 0
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -32, 0, 0, 3
waitforvisualfinish
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, 0, 0
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, 1, 0
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_ATTACKER, 0
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_TARGET, 0
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 4, 0, 12, 1
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 4, 0, 12, 1
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG, 2, 16, 0, RGB_WHITE
waitforvisualfinish
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, 0, 1
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, 1, 1
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_ATTACKER, 1
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_TARGET, 1
waitforvisualfinish
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 5
delay 3
Expand Down Expand Up @@ -16342,7 +16342,7 @@ Move_HORN_ATTACK:
Move_FURY_ATTACK:
loadspritegfx ANIM_TAG_IMPACT
loadspritegfx ANIM_TAG_HORN_HIT
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 4, 256, 0, 2
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 4, 256, ANIM_ATTACKER, 2
choosetwoturnanim FuryAttackRight, FuryAttackLeft
FuryAttackContinue:
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 6, 1
Expand Down Expand Up @@ -16491,7 +16491,7 @@ Move_LOW_KICK:
createsprite gSlidingKickSpriteTemplate, ANIM_TARGET, 2, -24, 28, 40, 8, 160, 0
delay 4
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -8, 8, ANIM_TARGET, 2
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 6, 384, 1, 2
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 6, 384, ANIM_TARGET, 2
playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET
waitforvisualfinish
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 4
Expand Down Expand Up @@ -16736,7 +16736,7 @@ SkullBashSetUpHeadDown:
createsprite gSlideMonToOffsetAndBackSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, -24, 0, 0, 10, 0
playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER
waitforvisualfinish
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 16, 96, 0, 2
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 16, 96, ANIM_ATTACKER, 2
waitforvisualfinish
createsprite gSlideMonToOffsetAndBackSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 24, 0, 0, 10, 1
waitforvisualfinish
Expand Down Expand Up @@ -17855,7 +17855,7 @@ Move_MIST_BALL:
createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, F_PAL_BG, 1, 1, RGB(23, 16, 31), 16, RGB_WHITE, 16
delay 0
playsewithpan SE_M_HAZE, 0
createvisualtask AnimTask_LoadMistTiles, 5
createvisualtask AnimTask_MistBallFog, 5
createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_TARGET, 3, 0, 16, RGB_WHITE
delay 8
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 4, 0, 70, 0
Expand Down Expand Up @@ -22455,14 +22455,14 @@ Move_ARM_THRUST:
loadspritegfx ANIM_TAG_IMPACT
splitbgprio ANIM_TARGET
setalpha 12, 8
createvisualtask AnimTask_RotateMonSpriteToSide, 5, 8, 5, 0, 0
createvisualtask AnimTask_RotateMonSpriteToSide, 5, 8, 5, ANIM_ATTACKER, 0
delay 6
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 3
delay 4
playsewithpan SE_M_SWAGGER, SOUND_PAN_TARGET
createsprite gArmThrustHandSpriteTemplate, ANIM_TARGET, 2, 10, -8, 14, 3
waitforvisualfinish
createvisualtask AnimTask_RotateMonSpriteToSide, 5, 8, 5, 0, 1
createvisualtask AnimTask_RotateMonSpriteToSide, 5, 8, 5, ANIM_ATTACKER, 1
playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET
choosetwoturnanim ArmThrustRight, ArmThrustLeft
ArmThrustContinue:
Expand Down
2 changes: 1 addition & 1 deletion data/maps/OldaleTown/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"y": 9,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "OldaleTown_EventScript_CitySign"
"script": "OldaleTown_EventScript_TownSign"
},
{
"type": "sign",
Expand Down
6 changes: 3 additions & 3 deletions data/maps/OldaleTown/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ OldaleTown_EventScript_MoveMartEmployee::
setobjectmovementtype LOCALID_MART_EMPLOYEE, MOVEMENT_TYPE_FACE_DOWN
return

OldaleTown_EventScript_CitySign::
msgbox OldaleTown_Text_CitySign, MSGBOX_SIGN
OldaleTown_EventScript_TownSign::
msgbox OldaleTown_Text_TownSign, MSGBOX_SIGN
end

OldaleTown_EventScript_Girl::
Expand Down Expand Up @@ -395,7 +395,7 @@ OldaleTown_Text_BrendanLetsGoBack:
.string "LAB now.\l"
.string "{PLAYER}, you should hustle back, too.$"

OldaleTown_Text_CitySign:
OldaleTown_Text_TownSign:
.string "OLDALE TOWN\n"
.string "“Where things start off scarce.”$"

4 changes: 2 additions & 2 deletions data/maps/PacifidlogTown_House2/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ PacifidlogTown_House2_EventScript_FanClubYoungerBrother::
call_if_unset FLAG_MET_FANCLUB_YOUNGER_BROTHER, PacifidlogTown_House2_EventScript_FirstMonAssessment
setflag FLAG_MET_FANCLUB_YOUNGER_BROTHER
specialvar VAR_RESULT, GetLeadMonFriendshipScore
goto_if_ge VAR_RESULT, 4, PacifidlogTown_House2_EventScript_GiveReturn
goto_if_ge VAR_RESULT, FRIENDSHIP_150_TO_199, PacifidlogTown_House2_EventScript_GiveReturn
specialvar VAR_RESULT, GetLeadMonFriendshipScore
goto_if_ge VAR_RESULT, 2, PacifidlogTown_House2_EventScript_PutInEffort
goto_if_ge VAR_RESULT, FRIENDSHIP_50_TO_99, PacifidlogTown_House2_EventScript_PutInEffort
goto PacifidlogTown_House2_EventScript_GiveFrustration
end

Expand Down
2 changes: 1 addition & 1 deletion data/maps/SlateportCity_PokemonFanClub/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ SlateportCity_PokemonFanClub_EventScript_SootheBellWoman::
goto_if_set FLAG_RECEIVED_SOOTHE_BELL, SlateportCity_PokemonFanClub_EventScript_ReceivedSootheBell
msgbox SlateportCity_PokemonFanClub_Text_ShowMePokemonThatLoveYou, MSGBOX_DEFAULT
specialvar VAR_RESULT, GetLeadMonFriendshipScore
goto_if_ge VAR_RESULT, 4, SlateportCity_PokemonFanClub_EventScript_GiveSootheBell
goto_if_ge VAR_RESULT, FRIENDSHIP_150_TO_199, SlateportCity_PokemonFanClub_EventScript_GiveSootheBell
release
end

Expand Down
14 changes: 7 additions & 7 deletions data/maps/VerdanturfTown_FriendshipRatersHouse/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ VerdanturfTown_FriendshipRatersHouse_EventScript_FriendshipRater::
msgbox VerdanturfTown_FriendshipRatersHouse_Text_SeeHowMuchPokemonLikesYou, MSGBOX_DEFAULT
specialvar VAR_RESULT, GetLeadMonFriendshipScore
switch VAR_RESULT
case 0, VerdanturfTown_FriendshipRatersHouse_EventScript_DetestsYou
case 1, VerdanturfTown_FriendshipRatersHouse_EventScript_VeryWary
case 2, VerdanturfTown_FriendshipRatersHouse_EventScript_NotUsedToYou
case 3, VerdanturfTown_FriendshipRatersHouse_EventScript_GettingUsedToYou
case 4, VerdanturfTown_FriendshipRatersHouse_EventScript_LikesYouQuiteALot
case 5, VerdanturfTown_FriendshipRatersHouse_EventScript_VeryHappy
case 6, VerdanturfTown_FriendshipRatersHouse_EventScript_AdoresYou
case FRIENDSHIP_NONE, VerdanturfTown_FriendshipRatersHouse_EventScript_DetestsYou
case FRIENDSHIP_1_TO_49, VerdanturfTown_FriendshipRatersHouse_EventScript_VeryWary
case FRIENDSHIP_50_TO_99, VerdanturfTown_FriendshipRatersHouse_EventScript_NotUsedToYou
case FRIENDSHIP_100_TO_149, VerdanturfTown_FriendshipRatersHouse_EventScript_GettingUsedToYou
case FRIENDSHIP_150_TO_199, VerdanturfTown_FriendshipRatersHouse_EventScript_LikesYouQuiteALot
case FRIENDSHIP_200_TO_254, VerdanturfTown_FriendshipRatersHouse_EventScript_VeryHappy
case FRIENDSHIP_MAX, VerdanturfTown_FriendshipRatersHouse_EventScript_AdoresYou
release
end

Expand Down
2 changes: 1 addition & 1 deletion include/battle_anim.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void PrepareBattlerSpriteForRotScale(u8 spriteId, u8 objMode);
void SetBattlerSpriteYOffsetFromRotation(u8 spriteId);
u32 GetBattlePalettesMask(bool8 battleBackground, bool8 attacker, bool8 target, bool8 attackerPartner, bool8 targetPartner, bool8 anim1, bool8 anim2);
u32 GetBattleMonSpritePalettesMask(u8 playerLeft, u8 playerRight, u8 opponentLeft, u8 opponentRight);
u8 AnimDummyReturnArg(u8 battler);
u8 GetSpritePalIdxByBattler(u8 battler);
s16 CloneBattlerSpriteWithBlend(u8);
void DestroySpriteWithActiveSheet(struct Sprite *);
u8 CreateInvisibleSpriteCopy(int, u8, int);
Expand Down
15 changes: 9 additions & 6 deletions include/battle_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,25 @@ enum
#define TAG_HEALTHBAR_PLAYER2_TILE 0xD706
#define TAG_HEALTHBAR_OPPONENT2_TILE 0xD707

#define TAG_HEALTHBOX_PALS_1 0xD709
#define TAG_HEALTHBOX_PALS_2 0xD70A
#define TAG_HEALTHBOX_SAFARI_TILE 0xD70B

#define TAG_STATUS_SUMMARY_BAR_TILE 0xD70C

#define TAG_STATUS_SUMMARY_BAR_PAL 0xD710
#define TAG_STATUS_SUMMARY_BALLS_PAL 0xD712

#define TAG_STATUS_SUMMARY_BALLS_TILE 0xD714

#define TAG_HEALTHBAR_PAL TAG_HEALTHBAR_PLAYER1_TILE
#define TAG_HEALTHBOX_PAL TAG_HEALTHBOX_PLAYER1_TILE

#define TAG_MEGA_TRIGGER_TILE 0xD777
#define TAG_MEGA_INDICATOR_TILE 0xD778
#define TAG_ALPHA_INDICATOR_TILE 0xD779
#define TAG_OMEGA_INDICATOR_TILE 0xD77A
#define TAG_ZMOVE_TRIGGER_TILE 0xD77B

#define TAG_HEALTHBOX_PAL 0xD6FF
#define TAG_HEALTHBAR_PAL 0xD704
#define TAG_STATUS_SUMMARY_BAR_PAL 0xD710
#define TAG_STATUS_SUMMARY_BALLS_PAL 0xD712

#define TAG_MEGA_TRIGGER_PAL 0xD777
#define TAG_MEGA_INDICATOR_PAL 0xD778
#define TAG_ALPHA_INDICATOR_PAL 0xD779
Expand Down
16 changes: 8 additions & 8 deletions src/battle_anim_effects_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static void AnimProtect_Step(struct Sprite *);
static void AnimMilkBottle(struct Sprite *);
static void AnimMilkBottle_Step1(struct Sprite *);
static void AnimMilkBottle_Step2(struct Sprite *, int, int);
static void AnimSparkingStars(struct Sprite *);
static void AnimSparklingStars(struct Sprite *);
static void AnimBubbleBurst(struct Sprite *);
static void AnimBubbleBurst_Step(struct Sprite *);
static void AnimSleepLetterZ(struct Sprite *);
Expand Down Expand Up @@ -1696,7 +1696,7 @@ const struct SpriteTemplate gSparklingStarsSpriteTemplate =
.anims = gGrantingStarsAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimSparkingStars,
.callback = AnimSparklingStars,
};

static const union AnimCmd sAnim_BubbleBurst[] =
Expand Down Expand Up @@ -4290,14 +4290,14 @@ static void AnimItemSteal_Step3(struct Sprite *sprite)

sprite->y2 = Sin(sprite->data[0] + 0x80, 30 - sprite->data[1] * 8);
if (sprite->y2 == 0)
PlaySE12WithPanning(SE_M_BUBBLE2, BattleAnimAdjustPanning(63));
PlaySE12WithPanning(SE_M_BUBBLE2, BattleAnimAdjustPanning(SOUND_PAN_TARGET));

if (moveAlongLinearPath(sprite))
{
sprite->y2 = 0;
sprite->data[0] = 0;
sprite->callback = AnimItemSteal_Step2;
PlaySE12WithPanning(SE_M_BUBBLE2, BattleAnimAdjustPanning(-64));
PlaySE12WithPanning(SE_M_BUBBLE2, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER));
}
}

Expand Down Expand Up @@ -5243,7 +5243,7 @@ void AnimGrantingStars(struct Sprite *sprite)
sprite->callback = TranslateSpriteLinearFixedPoint;
}

static void AnimSparkingStars(struct Sprite *sprite)
static void AnimSparklingStars(struct Sprite *sprite)
{
u8 battler;
if (!gBattleAnimArgs[2])
Expand Down Expand Up @@ -5370,7 +5370,7 @@ static void AnimLockOnTarget_Step1(struct Sprite *sprite)
sprite->callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(sprite, AnimLockOnTarget_Step2);
sprite->data[5] += 0x100;
PlaySE12WithPanning(SE_M_LOCK_ON, BattleAnimAdjustPanning(63));
PlaySE12WithPanning(SE_M_LOCK_ON, BattleAnimAdjustPanning(SOUND_PAN_TARGET));
break;
}

Expand Down Expand Up @@ -5456,7 +5456,7 @@ static void AnimLockOnTarget_Step4(struct Sprite *sprite)
sprite->data[2]++;
pal = sprite->oam.paletteNum;
LoadPalette(&gPlttBufferUnfaded[0x108 + pal * 16], pal * 16 | 0x101, 4);
PlaySE12WithPanning(SE_M_LEER, BattleAnimAdjustPanning(63));
PlaySE12WithPanning(SE_M_LEER, BattleAnimAdjustPanning(SOUND_PAN_TARGET));
}
else if (sprite->data[1] == 0)
{
Expand Down Expand Up @@ -5918,7 +5918,7 @@ static void AnimSharpenSphere(struct Sprite *sprite)
sprite->data[2] = 0;
sprite->data[3] = 0;
sprite->data[4] = 0;
sprite->data[5] = BattleAnimAdjustPanning(-64);
sprite->data[5] = BattleAnimAdjustPanning(SOUND_PAN_ATTACKER);
sprite->callback = AnimSharpenSphere_Step;
}

Expand Down
13 changes: 5 additions & 8 deletions src/battle_anim_effects_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@ static void AirCutterProjectileStep1(u8 taskId)
gTasks[taskId].data[gTasks[taskId].data[1] + 13] = spriteId;
gTasks[taskId].data[0] = gTasks[taskId].data[3];
gTasks[taskId].data[1]++;
PlaySE12WithPanning(SE_M_BLIZZARD2, BattleAnimAdjustPanning(-63));
PlaySE12WithPanning(SE_M_BLIZZARD2, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER + 1));
if (gTasks[taskId].data[1] > 2)
gTasks[taskId].func = AirCutterProjectileStep2;
}
Expand Down Expand Up @@ -1875,7 +1875,7 @@ static void AnimBulletSeed_Step1(struct Sprite *sprite)
int i;
u16 rand;
s16 *ptr;
PlaySE12WithPanning(SE_M_HORN_ATTACK, BattleAnimAdjustPanning(63));
PlaySE12WithPanning(SE_M_HORN_ATTACK, BattleAnimAdjustPanning(SOUND_PAN_TARGET));
sprite->x += sprite->x2;
sprite->y += sprite->y2;
sprite->y2 = 0;
Expand Down Expand Up @@ -2521,7 +2521,7 @@ static void AnimPencil(struct Sprite *sprite)
sprite->data[3] = 16;
sprite->data[4] = 0;
sprite->data[5] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_HEIGHT) + 2;
sprite->data[6] = BattleAnimAdjustPanning(63);
sprite->data[6] = BattleAnimAdjustPanning(SOUND_PAN_TARGET);
sprite->callback = AnimPencil_Step;
}

Expand Down Expand Up @@ -3079,9 +3079,7 @@ void AnimTask_FreeMusicNotesPals(u8 taskId)

static void SetMusicNotePalette(struct Sprite *sprite, u8 a, u8 b)
{
u8 tile;
tile = (b & 1);
tile = ((-tile | tile) >> 31) & 32;
u8 tile = (b & 1) ? 32 : 0;
sprite->oam.tileNum += tile + (a << 2);
sprite->oam.paletteNum = IndexOfSpritePaletteTag(sMusicNotePaletteTagsTable[b >> 1]);
}
Expand Down Expand Up @@ -3828,8 +3826,7 @@ static void AnimPerishSongMusicNote_Step2(struct Sprite *sprite)

if (sprite->data[4] > 3)
{
int var1 = sprite->data[2];
sprite->invisible = var1 - (((s32)(var1 + ((u32)var1 >> 31)) >> 1) << 1);
sprite->invisible = sprite->data[2] % 2;
DestroyAnimSprite(sprite);
}

Expand Down
Loading

0 comments on commit b9babd9

Please sign in to comment.