fp: Add more sfx
This commit is contained in:
parent
0736314600
commit
2102ffa094
BIN
Data/Audio/ching.ogg
(Stored with Git LFS)
BIN
Data/Audio/ching.ogg
(Stored with Git LFS)
Binary file not shown.
BIN
Data/Audio/church.ogg
(Stored with Git LFS)
Normal file
BIN
Data/Audio/church.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Data/Audio/woosh.ogg
(Stored with Git LFS)
Normal file
BIN
Data/Audio/woosh.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Data/Audio/woosh.wav
(Stored with Git LFS)
BIN
Data/Audio/woosh.wav
(Stored with Git LFS)
Binary file not shown.
@ -522,6 +522,10 @@ void TELY_DLL_Init(void *user_data)
|
||||
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"));
|
||||
game->audio[FP_GameAudio_Woosh] = platform->func_load_audio(assets, DQN_STRING8("Woosh"), DQN_STRING8("Data/Audio/woosh.ogg"));
|
||||
game->audio[FP_GameAudio_Woosh] = platform->func_load_audio(assets, DQN_STRING8("Woosh"), DQN_STRING8("Data/Audio/woosh.ogg"));
|
||||
game->audio[FP_GameAudio_Ching] = platform->func_load_audio(assets, DQN_STRING8("Ching"), DQN_STRING8("Data/Audio/ching.ogg"));
|
||||
game->audio[FP_GameAudio_Church] = platform->func_load_audio(assets, DQN_STRING8("Church"), DQN_STRING8("Data/Audio/church.ogg"));
|
||||
}
|
||||
|
||||
struct FP_GetClosestPortalMonkeyResult
|
||||
@ -701,6 +705,7 @@ void FP_EntityActionStateMachine(FP_Game *game, TELY_Audio *audio, TELY_Platform
|
||||
*acceleration_meters_per_s *= 35.f;
|
||||
|
||||
entity->stamina -= FP_TERRY_DASH_STAMINA_COST;
|
||||
TELY_Audio_Play(audio, game->audio[FP_GameAudio_Woosh], 1.f);
|
||||
|
||||
#if 0
|
||||
FP_GameRenderSprite *cosmetic_sprite = Dqn_FArray_Make(&entity->extra_cosmetic_anims, Dqn_ZeroMem_Yes);
|
||||
@ -1344,7 +1349,7 @@ void FP_EntityActionStateMachine(FP_Game *game, TELY_Audio *audio, TELY_Platform
|
||||
}
|
||||
}
|
||||
|
||||
void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input)
|
||||
void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input, TELY_Audio *audio)
|
||||
{
|
||||
Dqn_Profiler_ZoneScopeWithIndex("FP_Update", FP_ProfileZone_FPUpdate);
|
||||
|
||||
@ -1858,6 +1863,7 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input
|
||||
FP_Entity_CreateClubTerry(game, placement_pos, "Club Terry");
|
||||
} else if (placeable_building.type == FP_EntityType_ChurchTerry) {
|
||||
FP_Entity_CreateChurchTerry(game, placement_pos, "Church Terry");
|
||||
TELY_Audio_Play(audio, game->audio[FP_GameAudio_Church], 1.f);
|
||||
} else if (placeable_building.type == FP_EntityType_AirportTerry) {
|
||||
FP_Entity_CreateAirportTerry(game, placement_pos, "Airport Terry");
|
||||
} else {
|
||||
@ -2084,7 +2090,7 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input
|
||||
Dqn_Profiler_EndZone(update_zone);
|
||||
}
|
||||
|
||||
void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *renderer)
|
||||
void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *renderer, TELY_Audio *audio)
|
||||
{
|
||||
Dqn_Profiler_ZoneScopeWithIndex("FP_Render", FP_ProfileZone_FPRender);
|
||||
TELY_PlatformInput *input = &platform->input;
|
||||
@ -2486,6 +2492,7 @@ void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *renderer)
|
||||
if (game->clock_ms > game->player_trigger_purchase_building_timestamp) {
|
||||
if (mapping.inventory_count) {
|
||||
player->coins -= *mapping.building_base_price;
|
||||
TELY_Audio_Play(audio, game->audio[FP_GameAudio_Ching], 1.f);
|
||||
*mapping.building_base_price *= 2;
|
||||
|
||||
// NOTE: Raise the prices of everything else
|
||||
@ -2572,6 +2579,7 @@ void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *renderer)
|
||||
if (game->clock_ms > game->player_trigger_purchase_upgrade_timestamp) {
|
||||
player->coins -= *mapping.upgrade_base_price;
|
||||
*mapping.upgrade_base_price *= 2;
|
||||
TELY_Audio_Play(audio, game->audio[FP_GameAudio_Ching], 1.f);
|
||||
|
||||
if (mapping.merchant == game->merchant_terry) {
|
||||
// TODO(doyle): Attack damage? Or increase attack range?
|
||||
@ -3111,10 +3119,10 @@ void TELY_DLL_FrameUpdate(void *user_data)
|
||||
for (game->delta_s_accumulator += DQN_CAST(Dqn_f32)input->delta_s;
|
||||
game->delta_s_accumulator > PHYSICS_STEP;
|
||||
game->delta_s_accumulator -= PHYSICS_STEP) {
|
||||
FP_Update(platform, game, input);
|
||||
FP_Update(platform, game, input, audio);
|
||||
}
|
||||
|
||||
FP_Render(game, platform, renderer);
|
||||
FP_Render(game, platform, renderer, audio);
|
||||
|
||||
TELY_RFui_Flush(rfui, renderer, input, assets);
|
||||
TELY_Audio_MixPlaybackSamples(audio, assets);
|
||||
|
@ -459,7 +459,7 @@ static FP_GameEntityHandle FP_Entity_CreateTerry(FP_Game *game, Dqn_V2 pos, DQN_
|
||||
entity->local_hit_box_size = FP_Game_MetersToPixelsNx2(game, 0.5f, entity->sprite_height.meters * .6f);
|
||||
entity->hp_cap = FP_DEFAULT_DAMAGE * 3;
|
||||
entity->hp = entity->hp_cap;
|
||||
entity->coins = 0;//1'000'000;
|
||||
entity->coins = 1'000'000;
|
||||
FP_Entity_AddDebugEditorFlags(game, result);
|
||||
entity->flags |= FP_GameEntityFlag_NonTraversable;
|
||||
entity->flags |= FP_GameEntityFlag_Attackable;
|
||||
|
@ -260,6 +260,9 @@ enum FP_GameAudio
|
||||
FP_GameAudio_TestAudio,
|
||||
FP_GameAudio_TerryHit,
|
||||
FP_GameAudio_Smooch,
|
||||
FP_GameAudio_Woosh,
|
||||
FP_GameAudio_Ching,
|
||||
FP_GameAudio_Church,
|
||||
FP_GameAudio_Count,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user