Move T6 string arrays to CommonT6 header

This commit is contained in:
Jan 2021-03-07 15:30:48 +01:00
parent 5db7eaeec3
commit ba1bca775b
4 changed files with 263 additions and 260 deletions

View File

@ -2,6 +2,230 @@
namespace T6 namespace T6
{ {
inline const char* szWeapTypeNames[]
{
"bullet",
"grenade",
"projectile",
"binoculars",
"gas",
"bomb",
"mine",
"melee",
"riotshield"
};
inline const char* szWeapClassNames[]
{
"rifle",
"mg",
"smg",
"spread",
"pistol",
"grenade",
"rocketlauncher",
"turret",
"non-player",
"gas",
"item",
"melee",
"Killstreak Alt Stored Weapon",
"pistol spread"
};
inline const char* szWeapOverlayReticleNames[]
{
"none",
"crosshair"
};
inline const char* szWeapInventoryTypeNames[]
{
"primary",
"offhand",
"item",
"altmode",
"melee",
"dwlefthand"
};
inline const char* szWeapClipTypeNames[]
{
"bottom",
"top",
"left",
"dp28",
"ptrs",
"lmg"
};
inline const char* barrelTypeNames[]
{
"Single",
"Dual Barrel",
"Dual Barrel Alternate",
"Quad Barrel",
"Quad Barrel Alternate",
"Quad Barrel Double Alternate"
};
inline const char* impactTypeNames[]
{
"none",
"bullet_small",
"bullet_large",
"bullet_ap",
"bullet_xtreme",
"shotgun",
"grenade_bounce",
"grenade_explode",
"rifle_grenade",
"rocket_explode",
"rocket_explode_xtreme",
"projectile_dud",
"mortar_shell",
"tank_shell",
"bolt",
"blade"
};
inline const char* szWeapStanceNames[]
{
"stand",
"duck",
"prone"
};
inline const char* szProjectileExplosionNames[]
{
"grenade",
"rocket",
"flashbang",
"none",
"dud",
"smoke",
"heavy explosive",
"fire",
"napalmblob",
"bolt",
"shrapnel span"
};
inline const char* offhandClassNames[]
{
"None",
"Frag Grenade",
"Smoke Grenade",
"Flash Grenade",
"Gear",
"Supply Drop Marker"
};
inline const char* offhandSlotNames[]
{
"None",
"Lethal grenade",
"Tactical grenade",
"Equipment",
"Specific use"
};
inline const char* playerAnimTypeNames[]
{
"none",
"default",
"other",
"sniper",
"m203",
"hold",
"briefcase",
"reviver",
"radio",
"dualwield",
"remotecontrol",
"crossbow",
"minigun",
"beltfed",
"g11",
"rearclip",
"handleclip",
"rearclipsniper",
"ballisticknife",
"singleknife",
"nopump",
"hatchet",
"grimreaper",
"zipline",
"riotshield",
"tablet",
"turned",
"screecher",
"staff"
};
inline const char* activeReticleNames[]
{
"None",
"Pip-On-A-Stick",
"Bouncing Diamond",
"Missile Lock"
};
inline const char* guidedMissileNames[]
{
"None",
"Sidewinder",
"Hellfire",
"Javelin",
"Ballistic",
"WireGuided",
"TVGuided",
"Drone",
"HeatSeeking"
};
inline const char* stickinessNames[]
{
"Don't stick",
"Stick to all",
"Stick to all, except ai and clients",
"Stick to ground",
"Stick to ground, maintain yaw",
"Stick to flesh"
};
inline const char* rotateTypeNames[]
{
"Rotate both axis, grenade style",
"Rotate one axis, blade style",
"Rotate like a cylinder"
};
inline const char* overlayInterfaceNames[]
{
"None",
"Javelin",
"Turret Scope"
};
inline const char* ammoCounterClipNames[]
{
"None",
"Magazine",
"ShortMagazine",
"Shotgun",
"Rocket",
"Beltfed",
"AltWeapon"
};
inline const char* weapIconRatioNames[]
{
"1:1",
"2:1",
"4:1"
};
inline const char* szAttachmentTypeNames[] inline const char* szAttachmentTypeNames[]
{ {
"none", "none",
@ -71,6 +295,42 @@ namespace T6
"rope", "rope",
"light", "light",
}; };
inline const char* s_vehicleClassNames[]
{
"4 wheel",
"motorcycle",
"tank",
"plane",
"boat",
"artillery",
"helicopter",
};
inline const char* s_vehicleCameraModes[]
{
"first",
"chase",
"view",
"strafe",
"horse",
"oldtank",
"hover",
"vtol",
};
inline const char* s_tractionTypeNames[]
{
"TRACTION_TYPE_FRONT",
"TRACTION_TYPE_BACK",
"TRACTION_TYPE_ALL_WD",
};
inline const char* tracerTypeNames[]
{
"Laser",
"Smoke"
};
} }
class CommonT6 class CommonT6

View File

@ -3,6 +3,7 @@
#include <cassert> #include <cassert>
#include <type_traits> #include <type_traits>
#include "Game/T6/CommonT6.h"
#include "Game/T6/InfoStringT6.h" #include "Game/T6/InfoStringT6.h"
using namespace T6; using namespace T6;
@ -44,12 +45,6 @@ cspField_t AssetDumperTracer::tracer_fields[]
namespace T6 namespace T6
{ {
const char* tracerTypeNames[]
{
"Laser",
"Smoke"
};
class InfoStringFromTracerConverter final : public InfoStringFromStructConverter class InfoStringFromTracerConverter final : public InfoStringFromStructConverter
{ {
protected: protected:

View File

@ -3,6 +3,8 @@
#include <cassert> #include <cassert>
#include <type_traits> #include <type_traits>
#include "Game/T6/CommonT6.h"
#include "Game/T6/InfoStringT6.h" #include "Game/T6/InfoStringT6.h"
using namespace T6; using namespace T6;
@ -569,36 +571,6 @@ cspField_t AssetDumperVehicle::vehicle_fields[]
namespace T6 namespace T6
{ {
const char* s_vehicleClassNames[]
{
"4 wheel",
"motorcycle",
"tank",
"plane",
"boat",
"artillery",
"helicopter",
};
const char* s_vehicleCameraModes[]
{
"first",
"chase",
"view",
"strafe",
"horse",
"oldtank",
"hover",
"vtol",
};
const char* s_tractionTypeNames[]
{
"TRACTION_TYPE_FRONT",
"TRACTION_TYPE_BACK",
"TRACTION_TYPE_ALL_WD",
};
class InfoStringFromVehicleConverter final : public InfoStringFromStructConverter class InfoStringFromVehicleConverter final : public InfoStringFromStructConverter
{ {
protected: protected:

View File

@ -1042,230 +1042,6 @@ cspField_t AssetDumperWeapon::weapon_fields[]
namespace T6 namespace T6
{ {
const char* szWeapTypeNames[]
{
"bullet",
"grenade",
"projectile",
"binoculars",
"gas",
"bomb",
"mine",
"melee",
"riotshield"
};
const char* szWeapClassNames[]
{
"rifle",
"mg",
"smg",
"spread",
"pistol",
"grenade",
"rocketlauncher",
"turret",
"non-player",
"gas",
"item",
"melee",
"Killstreak Alt Stored Weapon",
"pistol spread"
};
const char* szWeapOverlayReticleNames[]
{
"none",
"crosshair"
};
const char* szWeapInventoryTypeNames[]
{
"primary",
"offhand",
"item",
"altmode",
"melee",
"dwlefthand"
};
const char* szWeapClipTypeNames[]
{
"bottom",
"top",
"left",
"dp28",
"ptrs",
"lmg"
};
const char* barrelTypeNames[]
{
"Single",
"Dual Barrel",
"Dual Barrel Alternate",
"Quad Barrel",
"Quad Barrel Alternate",
"Quad Barrel Double Alternate"
};
const char* impactTypeNames[]
{
"none",
"bullet_small",
"bullet_large",
"bullet_ap",
"bullet_xtreme",
"shotgun",
"grenade_bounce",
"grenade_explode",
"rifle_grenade",
"rocket_explode",
"rocket_explode_xtreme",
"projectile_dud",
"mortar_shell",
"tank_shell",
"bolt",
"blade"
};
const char* szWeapStanceNames[]
{
"stand",
"duck",
"prone"
};
const char* szProjectileExplosionNames[]
{
"grenade",
"rocket",
"flashbang",
"none",
"dud",
"smoke",
"heavy explosive",
"fire",
"napalmblob",
"bolt",
"shrapnel span"
};
const char* offhandClassNames[]
{
"None",
"Frag Grenade",
"Smoke Grenade",
"Flash Grenade",
"Gear",
"Supply Drop Marker"
};
const char* offhandSlotNames[]
{
"None",
"Lethal grenade",
"Tactical grenade",
"Equipment",
"Specific use"
};
const char* playerAnimTypeNames[]
{
"none",
"default",
"other",
"sniper",
"m203",
"hold",
"briefcase",
"reviver",
"radio",
"dualwield",
"remotecontrol",
"crossbow",
"minigun",
"beltfed",
"g11",
"rearclip",
"handleclip",
"rearclipsniper",
"ballisticknife",
"singleknife",
"nopump",
"hatchet",
"grimreaper",
"zipline",
"riotshield",
"tablet",
"turned",
"screecher",
"staff"
};
const char* activeReticleNames[]
{
"None",
"Pip-On-A-Stick",
"Bouncing Diamond",
"Missile Lock"
};
const char* guidedMissileNames[]
{
"None",
"Sidewinder",
"Hellfire",
"Javelin",
"Ballistic",
"WireGuided",
"TVGuided",
"Drone",
"HeatSeeking"
};
const char* stickinessNames[]
{
"Don't stick",
"Stick to all",
"Stick to all, except ai and clients",
"Stick to ground",
"Stick to ground, maintain yaw",
"Stick to flesh"
};
const char* rotateTypeNames[]
{
"Rotate both axis, grenade style",
"Rotate one axis, blade style",
"Rotate like a cylinder"
};
const char* overlayInterfaceNames[]
{
"None",
"Javelin",
"Turret Scope"
};
const char* ammoCounterClipNames[]
{
"None",
"Magazine",
"ShortMagazine",
"Shotgun",
"Rocket",
"Beltfed",
"AltWeapon"
};
const char* weapIconRatioNames[]
{
"1:1",
"2:1",
"4:1"
};
class InfoStringFromWeaponConverter final : public InfoStringFromStructConverter class InfoStringFromWeaponConverter final : public InfoStringFromStructConverter
{ {
protected: protected: