A few bugs fixed. Very very rough draft of pet system. Hopefully it works, maybe it doesn't.
This commit is contained in:
+12
-4
@@ -25,6 +25,7 @@ sound_pool p(300);
|
||||
#include "src/world_state.nvgt"
|
||||
#include "src/ui.nvgt"
|
||||
#include "src/inventory.nvgt"
|
||||
#include "src/pet_system.nvgt"
|
||||
#include "src/quest_system.nvgt"
|
||||
#include "src/environment.nvgt"
|
||||
#include "src/combat.nvgt"
|
||||
@@ -115,6 +116,7 @@ int run_main_menu() {
|
||||
while(true) {
|
||||
wait(5);
|
||||
mainMenuMusic.loop();
|
||||
handle_global_volume_keys();
|
||||
|
||||
if (key_pressed(KEY_DOWN)) {
|
||||
play_menu_move_sound();
|
||||
@@ -157,10 +159,12 @@ void run_game()
|
||||
// Configure sound pool for better spatial audio
|
||||
p.volume_step = AUDIO_VOLUME_STEP / float(AUDIO_TILE_SCALE); // Default falloff in audio units
|
||||
p.pan_step = AUDIO_PAN_STEP; // Panning strength for scaled tile distances
|
||||
init_master_volume();
|
||||
|
||||
show_window("Draugnorak");
|
||||
init_flying_creature_configs();
|
||||
init_item_registry();
|
||||
init_pet_sounds();
|
||||
init_search_pools();
|
||||
|
||||
while (true) {
|
||||
@@ -200,10 +204,11 @@ void run_game()
|
||||
}
|
||||
}
|
||||
|
||||
while (game_started) {
|
||||
wait(5);
|
||||
while (game_started) {
|
||||
wait(5);
|
||||
handle_global_volume_keys();
|
||||
|
||||
if (return_to_main_menu_requested) {
|
||||
if (return_to_main_menu_requested) {
|
||||
game_paused = false;
|
||||
menuBackgroundUpdatesEnabled = true;
|
||||
p.resume_all();
|
||||
@@ -232,7 +237,9 @@ void run_game()
|
||||
if (game_paused) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
check_pet_call_key();
|
||||
|
||||
if(key_pressed(KEY_ESCAPE))
|
||||
{
|
||||
int really_exit = ui_question("", "Really exit?");
|
||||
@@ -256,6 +263,7 @@ void run_game()
|
||||
update_flying_creatures();
|
||||
update_weapon_range_audio_all();
|
||||
update_world_drops();
|
||||
update_pets();
|
||||
update_blessings();
|
||||
update_notifications();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user