diff options
| author | untodesu <kirill@untode.su> | 2025-09-14 19:16:44 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-09-14 19:16:44 +0500 |
| commit | 8bcbd2729388edc63c82d77d314b583af1447c49 (patch) | |
| tree | 460c2b509372077f6adf95d72c4245988a580aed /game/shared/game.cc | |
| parent | 7fc7fdb001bea8674fe0dbc1b962f3ec2702debb (diff) | |
| download | voxelius-8bcbd2729388edc63c82d77d314b583af1447c49.tar.bz2 voxelius-8bcbd2729388edc63c82d77d314b583af1447c49.zip | |
Cleanup math with qfengine ports again
Diffstat (limited to 'game/shared/game.cc')
| -rw-r--r-- | game/shared/game.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/game/shared/game.cc b/game/shared/game.cc index f7b9da4..91bc3bc 100644 --- a/game/shared/game.cc +++ b/game/shared/game.cc @@ -3,6 +3,7 @@ #include "shared/game.hh"
#include "core/io/cmdline.hh"
+#include "core/io/physfs.hh"
static std::filesystem::path get_gamepath(void)
{
@@ -77,7 +78,7 @@ void shared_game::init(int argc, char** argv) logger->flush();
if(!PHYSFS_init(argv[0])) {
- spdlog::critical("physfs: init failed: {}", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
+ spdlog::critical("physfs: init failed: {}", io::physfs_error());
std::terminate();
}
@@ -92,17 +93,17 @@ void shared_game::init(int argc, char** argv) std::filesystem::create_directories(userpath, ignore_error);
if(!PHYSFS_mount(gamepath.string().c_str(), nullptr, false)) {
- spdlog::critical("physfs: mount {} failed: {}", gamepath.string(), PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
+ spdlog::critical("physfs: mount {} failed: {}", gamepath.string(), io::physfs_error());
std::terminate();
}
if(!PHYSFS_mount(userpath.string().c_str(), nullptr, false)) {
- spdlog::critical("physfs: mount {} failed: {}", userpath.string(), PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
+ spdlog::critical("physfs: mount {} failed: {}", userpath.string(), io::physfs_error());
std::terminate();
}
if(!PHYSFS_setWriteDir(userpath.string().c_str())) {
- spdlog::critical("physfs: setwritedir {} failed: {}", userpath.string(), PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
+ spdlog::critical("physfs: setwritedir {} failed: {}", userpath.string(), io::physfs_error());
std::terminate();
}
@@ -117,7 +118,7 @@ void shared_game::shutdown(void) enet_deinitialize();
if(!PHYSFS_deinit()) {
- spdlog::critical("physfs: deinit failed: {}", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
+ spdlog::critical("physfs: deinit failed: {}", io::physfs_error());
std::terminate();
}
}
|
