From abe646e0ebc21d874a2be2cc4efb4bff00ec8584 Mon Sep 17 00:00:00 2001 From: Joshalosh Date: Sat, 30 Sep 2023 23:27:19 +1000 Subject: [PATCH] Add smoochie smooch --- Data/Audio/club_terry.wav | 3 +++ Data/Audio/smooch.mp3 | 3 +++ feely_pona.cpp | 3 +++ feely_pona_game.h | 1 + 4 files changed, 10 insertions(+) create mode 100644 Data/Audio/club_terry.wav create mode 100644 Data/Audio/smooch.mp3 diff --git a/Data/Audio/club_terry.wav b/Data/Audio/club_terry.wav new file mode 100644 index 0000000..2bfe86b --- /dev/null +++ b/Data/Audio/club_terry.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2ddcb74009caa5bf7d9a1fce5431bdbe4a893850f3ac6b66f878e9466abed06 +size 151820 diff --git a/Data/Audio/smooch.mp3 b/Data/Audio/smooch.mp3 new file mode 100644 index 0000000..6978ce0 --- /dev/null +++ b/Data/Audio/smooch.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96b5c68fb4349b44b663e97a4849de9a0ea736efcf1727b99a62417d7c4f5825 +size 19692 diff --git a/feely_pona.cpp b/feely_pona.cpp index d04be6c..57f77ea 100644 --- a/feely_pona.cpp +++ b/feely_pona.cpp @@ -390,6 +390,7 @@ void TELY_DLL_Init(void *user_data) game->jetbrains_mono_font = platform->func_load_font(assets, DQN_STRING8("JetBrains Mono NL (Regular)"), DQN_STRING8("Data/JetBrainsMonoNL-Regular.ttf"), font_size); game->audio[FP_GameAudio_TestAudio] = platform->func_load_audio(assets, DQN_STRING8("Test Audio"), DQN_STRING8("Data/Audio/Purrple Cat - Moonwinds.qoa")); game->audio[FP_GameAudio_TerryHit] = platform->func_load_audio(assets, DQN_STRING8("Terry Hit"), DQN_STRING8("Data/Audio/terry_hit.ogg")); + game->audio[FP_GameAudio_Smooch] = platform->func_load_audio(assets, DQN_STRING8("Smooch"), DQN_STRING8("Data/Audio/smooch.mp3")); } void FP_EntityActionStateMachine(FP_Game *game, TELY_Audio *audio, TELY_PlatformInput *input, FP_GameEntity *entity, Dqn_V2 dir_vector) @@ -593,6 +594,8 @@ void FP_EntityActionStateMachine(FP_Game *game, TELY_Audio *audio, TELY_Platform TELY_AssetAnimatedSprite sprite = TELY_Asset_MakeAnimatedSprite(sheet, g_anim_names.smoochie_attack_down, TELY_AssetFlip_No); uint64_t duration_ms = sprite.anim->count * sprite.anim->ms_per_frame; FP_Game_EntityActionReset(game, entity->handle, duration_ms, sprite); + // NOTE: Deal with this further down with the gameplay attack code. + TELY_Audio_Play(audio, game->audio[FP_GameAudio_Smooch], 1.f); } // NOTE: Check if the heart animation is playing diff --git a/feely_pona_game.h b/feely_pona_game.h index b8d8f2e..164d7c1 100644 --- a/feely_pona_game.h +++ b/feely_pona_game.h @@ -207,6 +207,7 @@ enum FP_GameAudio { FP_GameAudio_TestAudio, FP_GameAudio_TerryHit, + FP_GameAudio_Smooch, FP_GameAudio_Count, };