Add CPlayerState (#5)

* Start CPlayerState

* CPlayerState::CalculateHealth symbol rename

* Add inline constructor for CHealthInfo

* Add skeleton for the rest of CPlayerState

* Match CPlayerState::DecrPickUp

* Match more methods in CPlayerState

* Run formatting

* Fix function order

* Improving the constants

Former-commit-id: 1e30daa096
This commit is contained in:
Henrique Gemignani Passos Lima
2022-10-01 17:08:15 +03:00
committed by GitHub
parent ba75752e14
commit bb86f3dc01
7 changed files with 603 additions and 36 deletions

View File

@@ -5,8 +5,9 @@
class CHealthInfo {
public:
CHealthInfo(f32 hp, f32 resist);
// TODO
CHealthInfo(f32 hp, f32 resist) : x0_health(hp), x4_knockbackResistance(resist) {}
void SetHP(float hp) { x0_health = hp; }
float GetHP() const { return x0_health; }
private:
f32 x0_health;