mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 19:07:44 +00:00
string_view refactor
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
namespace urde
|
||||
{
|
||||
|
||||
CBeamProjectile::CBeamProjectile(const TToken<CWeaponDescription>& wDesc, const std::string& name, EWeaponType wType,
|
||||
CBeamProjectile::CBeamProjectile(const TToken<CWeaponDescription>& wDesc, std::string_view name, EWeaponType wType,
|
||||
const zeus::CTransform& xf, int flags, float f1, float f2, EMaterialTypes matType,
|
||||
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
||||
EProjectileAttrib attribs, bool b1)
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace urde
|
||||
class CBeamProjectile : public CGameProjectile
|
||||
{
|
||||
public:
|
||||
CBeamProjectile(const TToken<CWeaponDescription>& wDesc, const std::string& name, EWeaponType wType,
|
||||
CBeamProjectile(const TToken<CWeaponDescription>& wDesc, std::string_view name, EWeaponType wType,
|
||||
const zeus::CTransform& xf, int flags, float f1, float f2, EMaterialTypes matType,
|
||||
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
||||
EProjectileAttrib attribs, bool b1);
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace urde
|
||||
{
|
||||
const zeus::CVector3f CFlameThrower::kLightOffset(0, 3.f, 2.f);
|
||||
|
||||
CFlameThrower::CFlameThrower(const TToken<CWeaponDescription>& wDesc, const std::string& name, EWeaponType wType,
|
||||
CFlameThrower::CFlameThrower(const TToken<CWeaponDescription>& wDesc, std::string_view name, EWeaponType wType,
|
||||
const CFlameInfo& flameInfo, const zeus::CTransform& xf, EMaterialTypes matType,
|
||||
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aId, TUniqueId owner,
|
||||
EProjectileAttrib attribs, u32 w2, s16 sId, u32 w3)
|
||||
|
||||
@@ -25,7 +25,7 @@ class CFlameThrower : public CGameProjectile
|
||||
};
|
||||
|
||||
public:
|
||||
CFlameThrower(const TToken<CWeaponDescription>& wDesc, const std::string& name, EWeaponType wType,
|
||||
CFlameThrower(const TToken<CWeaponDescription>& wDesc, std::string_view name, EWeaponType wType,
|
||||
const CFlameInfo& flameInfo, const zeus::CTransform& xf, EMaterialTypes matType,
|
||||
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aId, TUniqueId owner, EProjectileAttrib attribs,
|
||||
u32 w2, s16 sId, u32 w3);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
namespace urde
|
||||
{
|
||||
CGameProjectile::CGameProjectile(bool active, const TToken<CWeaponDescription>&, const std::string& name,
|
||||
CGameProjectile::CGameProjectile(bool active, const TToken<CWeaponDescription>&, std::string_view name,
|
||||
EWeaponType wType, const zeus::CTransform& xf, EMaterialTypes matType,
|
||||
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
||||
TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater,
|
||||
@@ -72,7 +72,7 @@ void CGameProjectile::DeleteProjectileLight(CStateManager& mgr)
|
||||
}
|
||||
}
|
||||
|
||||
void CGameProjectile::CreateProjectileLight(const std::string& name, const CLight& light, CStateManager& mgr)
|
||||
void CGameProjectile::CreateProjectileLight(std::string_view name, const CLight& light, CStateManager& mgr)
|
||||
{
|
||||
DeleteProjectileLight(mgr);
|
||||
x2c8_projectileLight = mgr.AllocateUniqueId();
|
||||
|
||||
@@ -31,7 +31,7 @@ class CGameProjectile : public CWeapon
|
||||
};
|
||||
};
|
||||
public:
|
||||
CGameProjectile(bool active, const TToken<CWeaponDescription>&, const std::string& name,
|
||||
CGameProjectile(bool active, const TToken<CWeaponDescription>&, std::string_view name,
|
||||
EWeaponType wType, const zeus::CTransform& xf, EMaterialTypes matType,
|
||||
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
||||
TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater, const zeus::CVector3f& scale,
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager &);
|
||||
static EProjectileAttrib GetBeamAttribType(EWeaponType wType);
|
||||
void DeleteProjectileLight(CStateManager&);
|
||||
void CreateProjectileLight(const std::string&, const CLight&, CStateManager&);
|
||||
void CreateProjectileLight(std::string_view, const CLight&, CStateManager&);
|
||||
void Chase(float, CStateManager&);
|
||||
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
||||
const CWeaponMode&, int) const
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
namespace urde
|
||||
{
|
||||
|
||||
CNewFlameThrower::CNewFlameThrower(const TToken<CWeaponDescription>& desc, const std::string& name, EWeaponType wType,
|
||||
CNewFlameThrower::CNewFlameThrower(const TToken<CWeaponDescription>& desc, std::string_view name, EWeaponType wType,
|
||||
const CAssetId resInfo[8], const zeus::CTransform& xf, EMaterialTypes matType,
|
||||
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
||||
EProjectileAttrib attribs)
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
// NFTSecondaryFire
|
||||
// NFTSecondarySparks
|
||||
// <invalid>
|
||||
CNewFlameThrower(const TToken<CWeaponDescription>& desc, const std::string& name, EWeaponType wType,
|
||||
CNewFlameThrower(const TToken<CWeaponDescription>& desc, std::string_view name, EWeaponType wType,
|
||||
const CAssetId resInfo[8], const zeus::CTransform& xf, EMaterialTypes matType,
|
||||
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner, EProjectileAttrib attribs);
|
||||
void StartFiring(const zeus::CTransform& xf, CStateManager& mgr);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
namespace urde
|
||||
{
|
||||
|
||||
CPlasmaProjectile::CPlasmaProjectile(const TToken<CWeaponDescription>& wDesc, const std::string& name,
|
||||
CPlasmaProjectile::CPlasmaProjectile(const TToken<CWeaponDescription>& wDesc, std::string_view name,
|
||||
EWeaponType wType, const CBeamInfo& bInfo, const zeus::CTransform& xf,
|
||||
EMaterialTypes matType, const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid,
|
||||
TUniqueId owner, u32 w1, bool b1, EProjectileAttrib attribs)
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace urde
|
||||
class CPlasmaProjectile : public CBeamProjectile
|
||||
{
|
||||
public:
|
||||
CPlasmaProjectile(const TToken<CWeaponDescription>& wDesc, const std::string& name,
|
||||
CPlasmaProjectile(const TToken<CWeaponDescription>& wDesc, std::string_view name,
|
||||
EWeaponType wType, const CBeamInfo& bInfo, const zeus::CTransform& xf,
|
||||
EMaterialTypes matType, const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid,
|
||||
TUniqueId owner, u32 w1, bool b1, EProjectileAttrib attribs);
|
||||
|
||||
@@ -959,7 +959,7 @@ void CPlayerGun::ChangeWeapon(const CPlayerState& playerState, CStateManager& mg
|
||||
x678_morph.StartWipe(CGunMorph::EDir::In);
|
||||
}
|
||||
|
||||
void CPlayerGun::GetLctrWithShake(zeus::CTransform& xfOut, const CModelData& mData, const std::string& lctrName,
|
||||
void CPlayerGun::GetLctrWithShake(zeus::CTransform& xfOut, const CModelData& mData, std::string_view lctrName,
|
||||
bool shake, bool dyn)
|
||||
{
|
||||
if (dyn)
|
||||
|
||||
@@ -337,7 +337,7 @@ private:
|
||||
void ReturnArmAndGunToDefault(CStateManager& mgr, bool returnToDefault);
|
||||
void ReturnToRestPose();
|
||||
void ChangeWeapon(const CPlayerState& playerState, CStateManager& mgr);
|
||||
void GetLctrWithShake(zeus::CTransform& xfOut, const CModelData& mData, const std::string& lctrName,
|
||||
void GetLctrWithShake(zeus::CTransform& xfOut, const CModelData& mData, std::string_view lctrName,
|
||||
bool shake, bool dyn);
|
||||
void UpdateLeftArmTransform(const CModelData& mData, const CStateManager& mgr);
|
||||
void ProcessGunMorph(float dt, CStateManager& mgr);
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace urde
|
||||
{
|
||||
|
||||
CWeapon::CWeapon(TUniqueId uid, TAreaId aid, bool active, TUniqueId owner, EWeaponType type,
|
||||
const std::string& name, const zeus::CTransform& xf, const CMaterialFilter& filter,
|
||||
std::string_view name, const zeus::CTransform& xf, const CMaterialFilter& filter,
|
||||
const CMaterialList& mList, const CDamageInfo&, EProjectileAttrib attribs, CModelData&& mData)
|
||||
: CActor(uid, active, name, CEntityInfo(aid, CEntity::NullConnectionList), xf, std::move(mData), mList,
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
|
||||
@@ -44,7 +44,7 @@ private:
|
||||
float x154_interferenceDuration;
|
||||
public:
|
||||
CWeapon(TUniqueId uid, TAreaId aid, bool active, TUniqueId owner, EWeaponType type,
|
||||
const std::string& name, const zeus::CTransform& xf, const CMaterialFilter& filter,
|
||||
std::string_view name, const zeus::CTransform& xf, const CMaterialFilter& filter,
|
||||
const CMaterialList& mList, const CDamageInfo&, EProjectileAttrib attribs, CModelData&& mData);
|
||||
|
||||
virtual void Accept(IVisitor &visitor);
|
||||
|
||||
Reference in New Issue
Block a user