move iw4 string arrays to commoniw4 header

This commit is contained in:
Jan 2021-03-07 15:33:21 +01:00
parent ba1bca775b
commit 7e9dfe9127
3 changed files with 197 additions and 191 deletions

View File

@ -0,0 +1,195 @@
#pragma once
namespace IW4
{
inline const char* szWeapTypeNames[]
{
"bullet",
"grenade",
"projectile",
"riotshield",
};
inline const char* szWeapClassNames[]
{
"rifle",
"sniper",
"mg",
"smg",
"spread",
"pistol",
"grenade",
"rocketlauncher",
"turret",
"throwingknife",
"non-player",
"item",
};
inline const char* szWeapOverlayReticleNames[]
{
"none",
"crosshair",
};
inline const char* szWeapInventoryTypeNames[]
{
"primary",
"offhand",
"item",
"altmode",
"exclusive",
"scavenger",
};
inline const char* szWeapFireTypeNames[]
{
"Full Auto",
"Single Shot",
"2-Round Burst",
"3-Round Burst",
"4-Round Burst",
"Double Barrel",
};
inline const char* penetrateTypeNames[]
{
"none",
"small",
"medium",
"large",
};
inline const char* impactTypeNames[]
{
"none",
"bullet_small",
"bullet_large",
"bullet_ap",
"bullet_explode",
"shotgun",
"shotgun_explode",
"grenade_bounce",
"grenade_explode",
"rocket_explode",
"projectile_dud",
};
inline const char* szWeapStanceNames[]
{
"stand",
"duck",
"prone",
};
inline const char* szProjectileExplosionNames[]
{
"grenade",
"rocket",
"flashbang",
"none",
"dud",
"smoke",
"heavy explosive",
};
inline const char* offhandClassNames[]
{
"None",
"Frag Grenade",
"Smoke Grenade",
"Flash Grenade",
"Throwing Knife",
"Other",
};
inline const char* playerAnimTypeNames[]
{
"none",
"other",
"pistol",
"smg",
"autorifle",
"mg",
"sniper",
"rocketlauncher",
"explosive",
"grenade",
"turret",
"c4",
"m203",
"hold",
"briefcase",
"riotshield",
"laptop",
"throwingknife",
};
inline const char* activeReticleNames[]
{
"None",
"Pip-On-A-Stick",
"Bouncing diamond",
};
inline const char* guidedMissileNames[]
{
"None",
"Sidewinder",
"Hellfire",
"Javelin",
};
inline const char* stickinessNames[]
{
"Don't stick",
"Stick to all",
"Stick to all, orient to surface",
"Stick to ground",
"Stick to ground, maintain yaw",
"Knife",
};
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* s_vehicleClassNames[]
{
"4 wheel",
"tank",
"plane",
"boat",
"artillery",
"helicopter",
"snowmobile",
};
inline const char* s_vehicleAxleTypeNames[]
{
"front",
"rear",
"all",
};
}

View File

@ -4,6 +4,7 @@
#include <sstream> #include <sstream>
#include <type_traits> #include <type_traits>
#include "Game/IW4/CommonIW4.h"
#include "Game/IW4/InfoStringIW4.h" #include "Game/IW4/InfoStringIW4.h"
using namespace IW4; using namespace IW4;
@ -157,24 +158,6 @@ cspField_t AssetDumperVehicle::vehicle_fields[]
namespace IW4 namespace IW4
{ {
const char* s_vehicleClassNames[]
{
"4 wheel",
"tank",
"plane",
"boat",
"artillery",
"helicopter",
"snowmobile",
};
const char* s_vehicleAxleTypeNames[]
{
"front",
"rear",
"all",
};
class InfoStringFromVehicleConverter final : public InfoStringFromStructConverter class InfoStringFromVehicleConverter final : public InfoStringFromStructConverter
{ {
protected: protected:

View File

@ -5,6 +5,7 @@
#include <sstream> #include <sstream>
#include <type_traits> #include <type_traits>
#include "Game/IW4/CommonIW4.h"
#include "Game/IW4/InfoStringIW4.h" #include "Game/IW4/InfoStringIW4.h"
using namespace IW4; using namespace IW4;
@ -687,179 +688,6 @@ cspField_t AssetDumperWeapon::weapon_fields[]
namespace IW4 namespace IW4
{ {
const char* szWeapTypeNames[]
{
"bullet",
"grenade",
"projectile",
"riotshield",
};
const char* szWeapClassNames[]
{
"rifle",
"sniper",
"mg",
"smg",
"spread",
"pistol",
"grenade",
"rocketlauncher",
"turret",
"throwingknife",
"non-player",
"item",
};
const char* szWeapOverlayReticleNames[]
{
"none",
"crosshair",
};
const char* szWeapInventoryTypeNames[]
{
"primary",
"offhand",
"item",
"altmode",
"exclusive",
"scavenger",
};
const char* szWeapFireTypeNames[]
{
"Full Auto",
"Single Shot",
"2-Round Burst",
"3-Round Burst",
"4-Round Burst",
"Double Barrel",
};
const char* penetrateTypeNames[]
{
"none",
"small",
"medium",
"large",
};
const char* impactTypeNames[]
{
"none",
"bullet_small",
"bullet_large",
"bullet_ap",
"bullet_explode",
"shotgun",
"shotgun_explode",
"grenade_bounce",
"grenade_explode",
"rocket_explode",
"projectile_dud",
};
const char* szWeapStanceNames[]
{
"stand",
"duck",
"prone",
};
const char* szProjectileExplosionNames[]
{
"grenade",
"rocket",
"flashbang",
"none",
"dud",
"smoke",
"heavy explosive",
};
const char* offhandClassNames[]
{
"None",
"Frag Grenade",
"Smoke Grenade",
"Flash Grenade",
"Throwing Knife",
"Other",
};
const char* playerAnimTypeNames[]
{
"none",
"other",
"pistol",
"smg",
"autorifle",
"mg",
"sniper",
"rocketlauncher",
"explosive",
"grenade",
"turret",
"c4",
"m203",
"hold",
"briefcase",
"riotshield",
"laptop",
"throwingknife",
};
const char* activeReticleNames[]
{
"None",
"Pip-On-A-Stick",
"Bouncing diamond",
};
const char* guidedMissileNames[]
{
"None",
"Sidewinder",
"Hellfire",
"Javelin",
};
const char* stickinessNames[]
{
"Don't stick",
"Stick to all",
"Stick to all, orient to surface",
"Stick to ground",
"Stick to ground, maintain yaw",
"Knife",
};
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: