Fix linking issues with CDamageVulnerability

This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-02 01:06:20 +03:00
parent c261ee7bb9
commit 882cebb9b3
No known key found for this signature in database
GPG Key ID: E224F951761145F8
2 changed files with 11 additions and 26 deletions

View File

@ -4,7 +4,6 @@
#include "MetroidPrime/Weapons/WeaponTypes.hpp"
#include "types.h"
enum EVulnerability {
kVN_Weak,
kVN_Normal,
@ -36,17 +35,6 @@ public:
EVulnerability enemyWp4, EVulnerability v1, EVulnerability v2,
EDeflectionType deflectType);
CDamageVulnerability(EVulnerability power, EVulnerability ice, EVulnerability wave,
EVulnerability plasma, EVulnerability bomb, EVulnerability powerBomb,
EVulnerability missile, EVulnerability boostBall, EVulnerability phazon,
EVulnerability enemyWp1, EVulnerability enemyWp2, EVulnerability enemyWp3,
EVulnerability enemyWp4, EVulnerability v1, EVulnerability v2,
EVulnerability chargedPower, EVulnerability chargedIce,
EVulnerability chargedWave, EVulnerability chargedPlasma,
EVulnerability superMissile, EVulnerability iceSpreader,
EVulnerability waveBuster, EVulnerability flameThrower,
EDeflectionType deflected);
EDeflectionType GetDeflectionType(const CWeaponMode& mode) const;
bool WeaponHurts(const CWeaponMode&, int ignoreDirect) const;

View File

@ -4,28 +4,25 @@
#include "rstl/math.hpp"
const CDamageVulnerability CDamageVulnerability::sNormalVulnerability(
kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal,
kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal,
kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal, kVN_Normal, kDT_None);
const CDamageVulnerability CDamageVulnerability::sImmuneVulnerability(
kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect,
kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect,
kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect,
kVN_Deflect, kVN_Deflect, kDT_None);
const CDamageVulnerability
CDamageVulnerability::sImmuneVulnerability(kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect,
kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect,
kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect,
kVN_Deflect, kVN_Deflect, kVN_Deflect, kDT_None);
const CDamageVulnerability CDamageVulnerability::sReflectVulnerability(
kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect,
kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect,
kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect,
kVN_Deflect, kVN_Deflect, kDT_One);
const CDamageVulnerability
CDamageVulnerability::sReflectVulnerability(kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect,
kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect,
kVN_Deflect, kVN_Deflect, kVN_Deflect, kVN_Deflect,
kVN_Deflect, kVN_Deflect, kVN_Deflect, kDT_One);
const CDamageVulnerability CDamageVulnerability::sPassThroughVulnerability(
kVN_PassThrough, kVN_PassThrough, kVN_PassThrough, kVN_PassThrough, kVN_PassThrough,
kVN_PassThrough, kVN_PassThrough, kVN_PassThrough, kVN_PassThrough, kVN_PassThrough,
kVN_PassThrough, kVN_PassThrough, kVN_PassThrough, kVN_PassThrough, kVN_PassThrough,
kVN_PassThrough, kVN_PassThrough, kVN_PassThrough, kVN_PassThrough, kVN_PassThrough,
kVN_PassThrough, kVN_PassThrough, kVN_PassThrough, kDT_None);
kVN_PassThrough, kVN_PassThrough, kVN_PassThrough, kVN_PassThrough, kVN_PassThrough, kDT_None);
static inline bool is_deflect_direct(EVulnerability vuln) {
return vuln == kVN_Deflect || (EVulnerability(u32(vuln) - u32(kVN_DirectWeak)) < kVN_Deflect) ||