feat: templated vehicle loading and dumping for IW4 and IW5 (#929)

* feat: templated vehicle loading and dumping for IW4 and IW5

* chore: restructure vehicle tests into separate files

---------

Co-authored-by: Jan Laupetin <[email protected]>
This commit is contained in:
mo
2026-07-26 00:28:44 +02:00
committed by GitHub
co-authored by Jan Laupetin
parent f8415e33cc
commit 76e5bb17a2
26 changed files with 1741 additions and 65 deletions
@@ -0,0 +1,33 @@
#pragma once
#include "Game/IW5/IW5.h"
namespace IW5
{
inline const char* s_vehicleClassNames[]{
"4 wheel",
"tank",
"plane",
"boat",
"artillery",
"helicopter",
"snowmobile",
"submarine",
"ugv",
};
static_assert(std::extent_v<decltype(s_vehicleClassNames)> == VEH_TYPE_COUNT);
inline const char* s_vehicleAxleTypeNames[]{
"front",
"rear",
"all",
};
static_assert(std::extent_v<decltype(s_vehicleAxleTypeNames)> == VEH_AXLE_COUNT);
inline const char* s_vehicleCameraZOffsetModeNames[]{
"world",
"vehicle",
"view",
};
static_assert(std::extent_v<decltype(s_vehicleCameraZOffsetModeNames)> == VEHCAM_ZMODE_COUNT);
} // namespace IW5