diff options
| author | untodesu <kirill@untode.su> | 2025-12-26 23:17:56 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-12-26 23:17:56 +0500 |
| commit | 0f111cf51b00c4e884b7e53b4fd7ff6e38d8af5e (patch) | |
| tree | 90ddefa28b40b6384dd9618bb7573704de2733a9 /src/game/shared/game.cc | |
| parent | 6bb4233d5b2a1688e63c947542e92ec5d5a857a6 (diff) | |
| download | voxelius-0f111cf51b00c4e884b7e53b4fd7ff6e38d8af5e.tar.bz2 voxelius-0f111cf51b00c4e884b7e53b4fd7ff6e38d8af5e.zip | |
Add include guards and header comments to sources
Diffstat (limited to 'src/game/shared/game.cc')
| -rw-r--r-- | src/game/shared/game.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/game/shared/game.cc b/src/game/shared/game.cc index e839e6a..bac92fb 100644 --- a/src/game/shared/game.cc +++ b/src/game/shared/game.cc @@ -1,3 +1,8 @@ +// SPDX-License-Identifier: BSD-2-Clause +// Copyright (c) 2025 Kirill Dmitrievich +// File: game.cc +// Description: Shared initialization logic + #include "shared/pch.hh" #include "shared/game.hh" @@ -81,7 +86,7 @@ void shared_game::init(int argc, char** argv, std::string_view logfile) logger->flush(); if(!PHYSFS_init(argv[0])) { - spdlog::critical("physfs: init failed: {}", physfs_error()); + spdlog::critical("physfs: init failed: {}", physfs::last_error()); std::terminate(); } @@ -96,17 +101,17 @@ void shared_game::init(int argc, char** argv, std::string_view logfile) std::filesystem::create_directories(userpath, ignore_error); if(!PHYSFS_mount(gamepath.string().c_str(), nullptr, false)) { - spdlog::critical("physfs: mount {} failed: {}", gamepath.string(), physfs_error()); + spdlog::critical("physfs: mount {} failed: {}", gamepath.string(), physfs::last_error()); std::terminate(); } if(!PHYSFS_mount(userpath.string().c_str(), nullptr, false)) { - spdlog::critical("physfs: mount {} failed: {}", userpath.string(), physfs_error()); + spdlog::critical("physfs: mount {} failed: {}", userpath.string(), physfs::last_error()); std::terminate(); } if(!PHYSFS_setWriteDir(userpath.string().c_str())) { - spdlog::critical("physfs: setwritedir {} failed: {}", userpath.string(), physfs_error()); + spdlog::critical("physfs: setwritedir {} failed: {}", userpath.string(), physfs::last_error()); std::terminate(); } @@ -121,7 +126,7 @@ void shared_game::shutdown(void) enet_deinitialize(); if(!PHYSFS_deinit()) { - spdlog::critical("physfs: deinit failed: {}", physfs_error()); + spdlog::critical("physfs: deinit failed: {}", physfs::last_error()); std::terminate(); } } |
