Skip to content

Commit

Permalink
Added audio
Browse files Browse the repository at this point in the history
  • Loading branch information
optus23 committed May 17, 2019
1 parent 4f57774 commit 43c8994
Show file tree
Hide file tree
Showing 18 changed files with 16 additions and 1 deletion.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9650,7 +9650,7 @@
<object id="86" name="white_rock" type="static" x="432" y="272" width="32" height="32"/>
</objectgroup>
<objectgroup color="#ffff7f" id="9" name="entities">
<object id="53" name="enemy" type="Frozen" x="352" y="256" width="15.9688" height="16.0156"/>
<object id="53" name="enemy" type="Frozen" x="352" y="272" width="15.9688" height="16.0156"/>
<object id="60" name="player" type="nextA" x="352" y="400" width="15.9688" height="16.0156">
<properties>
<property name="free_movement" type="bool" value="false"/>
Expand Down
1 change: 1 addition & 0 deletions Final_Fantasy_Mystery_World/e1Drop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ bool e1Drop::Update(float adt)
{
App->scene->player->stats.num_hp_potions++;
App->map->quest_rooms->DeleteDrop(actual_tile, drop_type);
App->audio->PlayFx(App->scene->fx_pick_up_poti);
to_delete = true;
break;
}
Expand Down
4 changes: 4 additions & 0 deletions Final_Fantasy_Mystery_World/e1Enemy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ e1Enemy::e1Enemy(const int &x, const int &y) : e1DynamicEntity(x,y)
fx_enemy_hit = App->audio->LoadFx("assets/audio/sfx/Enemy_hit.wav");
fx_dragon_attack = App->audio->LoadFx("assets/audio/sfx/Dragon_attack.wav");
fx_dragon_knockback = App->audio->LoadFx("assets/audio/sfx/Dragon_knockback.wav");
fx_ice_queen_hit = App->audio->LoadFx("assets/audio/sfx/Ice_Queen_hit.wav");
fx_ice_queen_tp = App->audio->LoadFx("assets/audio/sfx/Ice_Queen_tp.wav");
fx_ice_queen_summon = App->audio->LoadFx("assets/audio/sfx/Ice_Queen_summon.wav");
fx_frog_jump = App->audio->LoadFx("assets/audio/sfx/Frog_jump.wav");


}
Expand Down
4 changes: 4 additions & 0 deletions Final_Fantasy_Mystery_World/e1Enemy.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ class e1Enemy : public e1DynamicEntity
Mix_Chunk* fx_enemy_hit;
Mix_Chunk* fx_dragon_attack;
Mix_Chunk* fx_dragon_knockback;
Mix_Chunk* fx_ice_queen_hit;
Mix_Chunk* fx_ice_queen_tp;
Mix_Chunk* fx_ice_queen_summon;
Mix_Chunk* fx_frog_jump;

};

Expand Down
3 changes: 3 additions & 0 deletions Final_Fantasy_Mystery_World/e1Frozen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ bool e1Frozen::PreUpdate()
{
if (state != State::DEATH) {
if (phase == Phase::NORMAL && stats.live <= stats.max_live * 0.5F) {
App->audio->PlayFx(fx_ice_queen_hit);
phase = Phase::HARD;
tp_last_number_hit = times_hitted;
DoTeleport();
Expand Down Expand Up @@ -116,6 +117,7 @@ void e1Frozen::AfterSpecialAttack1()
void e1Frozen::SummomBlueSlimes()
{
if (!App->entity_manager->IsInEntitiesVector(slime_1)) {
App->audio->PlayFx(fx_ice_queen_summon);
if (App->map->IsWalkable(actual_tile + iPoint{ 0,1 }, false) && App->scene->player->actual_tile != actual_tile + iPoint{ 0,1 } && (slime_2 == nullptr || (slime_2 != nullptr &&slime_2->actual_tile != actual_tile + iPoint{ 0,1 }))) {
slime_1 = (e1BlueSlime*)App->entity_manager->CreateEntity(e1Entity::EntityType::BLUE_SLIME, App->map->MapToWorld(actual_tile.x, actual_tile.y + 1).x, App->map->MapToWorld(actual_tile.x, actual_tile.y + 1).y, "BlueSlime");
slime_1->turn_done = true;
Expand Down Expand Up @@ -192,6 +194,7 @@ void e1Frozen::DoTeleport()
tp_timer.Start();
drawable = false;
tp_done = true;
App->audio->PlayFx(fx_ice_queen_tp);
App->particles->CreateExplosion(nullptr, nullptr, GetPosition() + iPoint{ 0,-10 }, { 0,0,2,2 }, RANDOM, { 20,20 }, { 40,10 }, { 15,5 }, P_NON, 200, 5);
}
else {
Expand Down
1 change: 1 addition & 0 deletions Final_Fantasy_Mystery_World/e1SuperPurpleFrog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ e1SuperPurpleFrog::~e1SuperPurpleFrog()
void e1SuperPurpleFrog::PrepareBasicAttack()
{
if (distance_to_travel != 1) {
App->audio->PlayFx(fx_frog_jump);
switch (direction) {
case Direction::DOWN_LEFT:
App->easing_splines->CreateSpline(&position.x, position.x - ((App->map->data.tile_width / 4) * distance_to_travel), 1000, EASE_OUT_QUINT);
Expand Down
1 change: 1 addition & 0 deletions Final_Fantasy_Mystery_World/m1Scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ bool m1Scene::Start()
fx_ability3 = App->audio->LoadFx("assets/audio/sfx/Ability3.wav");
fx_ability3_hit = App->audio->LoadFx("assets/audio/sfx/Ability3_hit.wav");
fx_burn = App->audio->LoadFx("assets/audio/sfx/burn.wav");
fx_pick_up_poti = App->audio->LoadFx("assets/audio/sfx/pick_up_poti.wav");

mus_game_over = App->audio->LoadMusic("assets/audio/music/35.Final Fantasy TA - Judge.ogg");

Expand Down
1 change: 1 addition & 0 deletions Final_Fantasy_Mystery_World/m1Scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class m1Scene : public m1Module
Mix_Chunk* fx_ability3;
Mix_Chunk* fx_ability3_hit;
Mix_Chunk* fx_burn;
Mix_Chunk* fx_pick_up_poti;

Mix_Music* mus_game_over;

Expand Down

0 comments on commit 43c8994

Please sign in to comment.