mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 14:54:53 -04:00
Improve ASSERT macro, fix linux file paths in Taskfile and hopefully fix the windows release (#1295)
* ci: fix windows releases (hopefully) * scripts: fix Taskfile file references for linux * asserts: add `ASSERT_MSG` macro and ensure `stdout` is flushed before `abort`ing * asserts: refactor all `assert(false);` with a preceeding message instances * lint: format * temp... * fix compiler errors * assert: allow for string literals in `ASSERT_MSG` * lint: formatting * revert temp change for testing
This commit is contained in:
@@ -236,9 +236,8 @@ void Texture::serialize(Serializer& ser) {
|
||||
void Level::serialize(Serializer& ser) {
|
||||
ser.from_ptr(&version);
|
||||
if (ser.is_loading() && version != TFRAG3_VERSION) {
|
||||
fmt::print("version mismatch when loading tfrag3 data. Got {}, expected {}\n", version,
|
||||
TFRAG3_VERSION);
|
||||
ASSERT(false);
|
||||
ASSERT_MSG(false, fmt::format("version mismatch when loading tfrag3 data. Got {}, expected {}",
|
||||
version, TFRAG3_VERSION));
|
||||
}
|
||||
|
||||
ser.from_str(&level_name);
|
||||
@@ -285,9 +284,9 @@ void Level::serialize(Serializer& ser) {
|
||||
|
||||
ser.from_ptr(&version2);
|
||||
if (ser.is_loading() && version2 != TFRAG3_VERSION) {
|
||||
fmt::print("version mismatch when loading tfrag3 data (at end). Got {}, expected {}\n",
|
||||
version2, TFRAG3_VERSION);
|
||||
ASSERT(false);
|
||||
ASSERT_MSG(false, fmt::format(
|
||||
"version mismatch when loading tfrag3 data (at end). Got {}, expected {}",
|
||||
version2, TFRAG3_VERSION));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user