Compare commits
No commits in common. "50d62714136c1c7a132342c8de77962fa525ca91" and "b03c6c3e56fca889692ff22f3309a3dcf922d3cb" have entirely different histories.
50d6271413
...
b03c6c3e56
2
External/tely
vendored
2
External/tely
vendored
@ -1 +1 @@
|
|||||||
Subproject commit f6c96fb65331e2829a43e0375cb8fc1bd0969c06
|
Subproject commit 9f8b905eab0c7a60084790f340488d858821adcc
|
@ -2015,18 +2015,16 @@ static void FP_Update(TELY_OS *os, FP_Game *game, TELY_OSInput *input, TELY_Audi
|
|||||||
// haven't given the player cooldown yet, so we assign a timestamp for that
|
// haven't given the player cooldown yet, so we assign a timestamp for that
|
||||||
if (game->play.wave_cooldown_timestamp_ms == 0) {
|
if (game->play.wave_cooldown_timestamp_ms == 0) {
|
||||||
game->play.wave_cooldown_timestamp_ms = game->play.clock_ms + FP_COOLDOWN_WAVE_TIME_MS;
|
game->play.wave_cooldown_timestamp_ms = game->play.clock_ms + FP_COOLDOWN_WAVE_TIME_MS;
|
||||||
TELY_Audio_Fade(audio, game->bg_music1, TELY_AudioEffectFade_Out, 2000 /*fade_duration_ms*/);
|
TELY_Audio_Stop(audio, game->audio[FP_GameAudio_Music1]);
|
||||||
game->bg_music2 = TELY_Audio_Play(audio, game->audio[FP_GameAudio_Music2], 1.f);
|
TELY_Audio_Play(audio, game->audio[FP_GameAudio_Music2], 1.f);
|
||||||
TELY_Audio_Fade(audio, game->bg_music2, TELY_AudioEffectFade_In, 2000 /*fade_duration_ms*/);
|
|
||||||
} else {
|
} else {
|
||||||
// NOTE: Check if cooldown has elapsed, the next wave can start if so
|
// NOTE: Check if cooldown has elapsed, the next wave can start if so
|
||||||
if (game->play.clock_ms > game->play.wave_cooldown_timestamp_ms) {
|
if (game->play.clock_ms > game->play.wave_cooldown_timestamp_ms) {
|
||||||
game->play.enemies_per_wave = DQN_MAX(5 * DQN_CAST(uint32_t)game->play.mob_spawners.size, DQN_CAST(uint32_t)(game->play.enemies_per_wave * 1.5));
|
game->play.enemies_per_wave = DQN_MAX(5 * DQN_CAST(uint32_t)game->play.mob_spawners.size, DQN_CAST(uint32_t)(game->play.enemies_per_wave * 1.5));
|
||||||
game->play.enemies_spawned_this_wave = 0; // Important! Reset the spawn count
|
game->play.enemies_spawned_this_wave = 0; // Important! Reset the spawn count
|
||||||
game->play.wave_cooldown_timestamp_ms = 0; // Important! We reset the timestamp for the next wave
|
game->play.wave_cooldown_timestamp_ms = 0; // Important! We reset the timestamp for the next wave
|
||||||
TELY_Audio_Fade(audio, game->bg_music2, TELY_AudioEffectFade_Out, 2000 /*fade_duration_ms*/);
|
TELY_Audio_Stop(audio, game->audio[FP_GameAudio_Music2]);
|
||||||
game->bg_music1 = TELY_Audio_Play(audio, game->audio[FP_GameAudio_Music1], 1.f);
|
TELY_Audio_Play(audio, game->audio[FP_GameAudio_Music1], 1.f);
|
||||||
TELY_Audio_Fade(audio, game->bg_music1, TELY_AudioEffectFade_In, 2000 /*fade_duration_ms*/);
|
|
||||||
|
|
||||||
if (monkey_spawn && game->play.current_wave != 0) {
|
if (monkey_spawn && game->play.current_wave != 0) {
|
||||||
// NOTE: We spawn a monkey at these wave intervals;
|
// NOTE: We spawn a monkey at these wave intervals;
|
||||||
@ -4461,6 +4459,16 @@ void TELY_OS_DLLFrameUpdate(TELY_OS *os)
|
|||||||
|
|
||||||
// =============================================================================================
|
// =============================================================================================
|
||||||
|
|
||||||
|
TELY_Audio *audio = &os->audio;
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
if (audio->playback_size == 0) {
|
||||||
|
//TELY_Audio_Play(audio, game->audio[FP_GameAudio_Music2], 1.f /*volume*/);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// =============================================================================================
|
||||||
|
|
||||||
if (game->play.state == FP_GameState_Play || game->play.state == FP_GameState_Tutorial) {
|
if (game->play.state == FP_GameState_Play || game->play.state == FP_GameState_Tutorial) {
|
||||||
if (TELY_OSInput_KeyWasDown(input->mouse_left) && TELY_OSInput_KeyIsDown(input->mouse_left)) {
|
if (TELY_OSInput_KeyWasDown(input->mouse_left) && TELY_OSInput_KeyIsDown(input->mouse_left)) {
|
||||||
if (game->play.prev_active_entity.id)
|
if (game->play.prev_active_entity.id)
|
||||||
@ -4490,7 +4498,6 @@ void TELY_OS_DLLFrameUpdate(TELY_OS *os)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TELY_Audio *audio = &os->audio;
|
|
||||||
for (game->play.delta_s_accumulator += DQN_CAST(Dqn_f32)input->delta_s;
|
for (game->play.delta_s_accumulator += DQN_CAST(Dqn_f32)input->delta_s;
|
||||||
game->play.delta_s_accumulator > FP_GAME_PHYSICS_STEP;
|
game->play.delta_s_accumulator > FP_GAME_PHYSICS_STEP;
|
||||||
game->play.delta_s_accumulator -= FP_GAME_PHYSICS_STEP) {
|
game->play.delta_s_accumulator -= FP_GAME_PHYSICS_STEP) {
|
||||||
|
@ -481,17 +481,15 @@ struct FP_Game
|
|||||||
TELY_AssetFontHandle jetbrains_mono_font;
|
TELY_AssetFontHandle jetbrains_mono_font;
|
||||||
TELY_AssetFontHandle talkco_font;
|
TELY_AssetFontHandle talkco_font;
|
||||||
|
|
||||||
TELY_AssetAudioHandle audio[FP_GameAudio_Count];
|
TELY_AssetAudioHandle audio[FP_GameAudio_Count];
|
||||||
TELY_AudioPlaybackHandle bg_music1;
|
TELY_AssetSpriteSheet atlas_sprite_sheet;
|
||||||
TELY_AudioPlaybackHandle bg_music2;
|
TELY_RFui rfui;
|
||||||
TELY_AssetSpriteSheet atlas_sprite_sheet;
|
FP_GamePlay play;
|
||||||
TELY_RFui rfui;
|
Dqn_Arena *frame_arena;
|
||||||
FP_GamePlay play;
|
uint16_t font_size;
|
||||||
Dqn_Arena *frame_arena;
|
uint16_t large_font_size;
|
||||||
uint16_t font_size;
|
uint16_t large_talkco_font_size;
|
||||||
uint16_t large_font_size;
|
uint16_t xlarge_talkco_font_size;
|
||||||
uint16_t large_talkco_font_size;
|
|
||||||
uint16_t xlarge_talkco_font_size;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FP_GameAStarNode
|
struct FP_GameAStarNode
|
||||||
|
BIN
project.rdbg
BIN
project.rdbg
Binary file not shown.
Loading…
Reference in New Issue
Block a user