2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-11-22 20:43:16 +00:00
|
|
|
|
2019-09-23 19:00:23 +00:00
|
|
|
#include "Runtime/Weapon/WeaponCommon.hpp"
|
2016-11-22 20:43:16 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2018-12-08 05:30:43 +00:00
|
|
|
class CWeaponMode {
|
|
|
|
EWeaponType x0_weaponType = EWeaponType::None;
|
2020-04-20 04:57:50 +00:00
|
|
|
bool x4_24_charged : 1 = false;
|
|
|
|
bool x4_25_comboed : 1 = false;
|
|
|
|
bool x4_26_instantKill : 1 = false;
|
2017-08-29 13:17:52 +00:00
|
|
|
|
2016-11-22 20:43:16 +00:00
|
|
|
public:
|
2020-04-20 04:57:50 +00:00
|
|
|
constexpr CWeaponMode() = default;
|
2020-01-24 04:02:42 +00:00
|
|
|
constexpr explicit CWeaponMode(EWeaponType type, bool charged = false, bool comboed = false, bool instaKill = false)
|
2018-12-08 05:30:43 +00:00
|
|
|
: x0_weaponType(type), x4_24_charged(charged), x4_25_comboed(comboed), x4_26_instantKill(instaKill) {}
|
2020-01-24 04:02:42 +00:00
|
|
|
constexpr EWeaponType GetType() const { return x0_weaponType; }
|
2016-11-22 20:43:16 +00:00
|
|
|
|
2020-01-24 04:02:42 +00:00
|
|
|
constexpr bool IsCharged() const { return x4_24_charged; }
|
|
|
|
constexpr bool IsComboed() const { return x4_25_comboed; }
|
|
|
|
constexpr bool IsInstantKill() const { return x4_26_instantKill; }
|
2016-11-22 20:43:16 +00:00
|
|
|
|
2020-01-24 04:02:42 +00:00
|
|
|
static constexpr CWeaponMode Invalid() { return CWeaponMode(EWeaponType::None); }
|
|
|
|
static constexpr CWeaponMode Phazon() { return CWeaponMode(EWeaponType::Phazon); }
|
|
|
|
static constexpr CWeaponMode Plasma() { return CWeaponMode(EWeaponType::Plasma); }
|
|
|
|
static constexpr CWeaponMode Wave() { return CWeaponMode(EWeaponType::Wave); }
|
|
|
|
static constexpr CWeaponMode BoostBall() { return CWeaponMode(EWeaponType::BoostBall); }
|
|
|
|
static constexpr CWeaponMode Ice() { return CWeaponMode(EWeaponType::Ice); }
|
|
|
|
static constexpr CWeaponMode Power() { return CWeaponMode(EWeaponType::Power); }
|
|
|
|
static constexpr CWeaponMode Bomb() { return CWeaponMode(EWeaponType::Bomb); }
|
|
|
|
static constexpr CWeaponMode PowerBomb() { return CWeaponMode(EWeaponType::PowerBomb); }
|
2016-11-22 20:43:16 +00:00
|
|
|
};
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|