From 0f111cf51b00c4e884b7e53b4fd7ff6e38d8af5e Mon Sep 17 00:00:00 2001 From: untodesu Date: Fri, 26 Dec 2025 23:17:56 +0500 Subject: Add include guards and header comments to sources --- src/game/shared/game.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/game/shared/game.cc') 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(); } } -- cgit