prime/include/MetroidPrime/CHealthInfo.hpp
Henrique Gemignani Passos Lima bb86f3dc01 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: 1e30daa096f8ab2c1df6431d50a385671a913bf0
2022-10-01 10:08:15 -04:00

19 lines
370 B
C++

#ifndef _CHEALTHINFO_HPP
#define _CHEALTHINFO_HPP
#include "types.h"
class CHealthInfo {
public:
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;
f32 x4_knockbackResistance;
};
CHECK_SIZEOF(CHealthInfo, 0x8)
#endif