From ba1bca775b69bbf69e8c3fb34f1413ab4171aace Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 7 Mar 2021 15:30:48 +0100 Subject: [PATCH] Move T6 string arrays to CommonT6 header --- src/Common/Game/T6/CommonT6.h | 260 ++++++++++++++++++ .../T6/AssetDumpers/AssetDumperTracer.cpp | 7 +- .../T6/AssetDumpers/AssetDumperVehicle.cpp | 32 +-- .../T6/AssetDumpers/AssetDumperWeapon.cpp | 224 --------------- 4 files changed, 263 insertions(+), 260 deletions(-) diff --git a/src/Common/Game/T6/CommonT6.h b/src/Common/Game/T6/CommonT6.h index 81a8976b..df8cc385 100644 --- a/src/Common/Game/T6/CommonT6.h +++ b/src/Common/Game/T6/CommonT6.h @@ -2,6 +2,230 @@ 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[] { "none", @@ -71,6 +295,42 @@ namespace T6 "rope", "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 diff --git a/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperTracer.cpp b/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperTracer.cpp index d75320a1..92760468 100644 --- a/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperTracer.cpp +++ b/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperTracer.cpp @@ -3,6 +3,7 @@ #include #include +#include "Game/T6/CommonT6.h" #include "Game/T6/InfoStringT6.h" using namespace T6; @@ -44,12 +45,6 @@ cspField_t AssetDumperTracer::tracer_fields[] namespace T6 { - const char* tracerTypeNames[] - { - "Laser", - "Smoke" - }; - class InfoStringFromTracerConverter final : public InfoStringFromStructConverter { protected: diff --git a/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperVehicle.cpp b/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperVehicle.cpp index edefb2bc..a1063bb4 100644 --- a/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperVehicle.cpp +++ b/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperVehicle.cpp @@ -3,6 +3,8 @@ #include #include + +#include "Game/T6/CommonT6.h" #include "Game/T6/InfoStringT6.h" using namespace T6; @@ -569,36 +571,6 @@ cspField_t AssetDumperVehicle::vehicle_fields[] 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 { protected: diff --git a/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperWeapon.cpp b/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperWeapon.cpp index ffdf26fe..2d0ec8aa 100644 --- a/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperWeapon.cpp +++ b/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperWeapon.cpp @@ -1042,230 +1042,6 @@ cspField_t AssetDumperWeapon::weapon_fields[] 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 { protected: