2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-05 16:27:27 +00:00

refactor: template remaining xmodel files for iw5,t5,t6

This commit is contained in:
Jan
2025-07-09 21:57:22 +01:00
parent 1b8eff17f0
commit a9c693d04d
10 changed files with 99 additions and 235 deletions

View File

@@ -0,0 +1,53 @@
#options GAME (IW5, T5, T6)
#filename "Game/" + GAME + "/XModel/XModelConstants" + GAME + ".h"
#set GAME_HEADER "\"Game/" + GAME + "/" + GAME + ".h\""
#if GAME == "IW5"
#define FEATURE_IW5
#elif GAME == "T5"
#define FEATURE_T5
#elif GAME == "T6"
#define FEATURE_T6
#endif
// This file was templated.
// See JsonXModel.h.template.
// Do not modify, changes will be lost.
#pragma once
#set GAME_HEADER "\"Game/" + GAME + "/" + GAME + ".h\""
#include GAME_HEADER
namespace GAME
{
inline const char* HITLOC_NAMES[]{
"none",
"helmet",
"head",
"neck",
"torso_upper",
#if defined(FEATURE_T6)
"torso_middle",
#endif
"torso_lower",
"right_arm_upper",
"left_arm_upper",
"right_arm_lower",
"left_arm_lower",
"right_hand",
"left_hand",
"right_leg_upper",
"left_leg_upper",
"right_leg_lower",
"left_leg_lower",
"right_foot",
"left_foot",
"gun",
#if defined(FEATURE_IW5) || defined(FEATURE_T6)
"shield",
#endif
};
static_assert(std::extent_v<decltype(HITLOC_NAMES)> == HITLOC_COUNT);
} // namespace GAME