mirror of https://github.com/PrimeDecomp/prime.git
parent
7e940d50d7
commit
85358450a7
|
@ -280,7 +280,7 @@ LIBS = [
|
|||
"MetroidPrime/HUD/CHudBallInterface",
|
||||
"MetroidPrime/Tweaks/CTweakGuiColors",
|
||||
"MetroidPrime/ScriptObjects/CFishCloud",
|
||||
"MetroidPrime/CHealthInfo",
|
||||
["MetroidPrime/CHealthInfo", True],
|
||||
"MetroidPrime/Player/CGameState",
|
||||
"MetroidPrime/ScriptObjects/CScriptVisorFlare",
|
||||
"MetroidPrime/ScriptObjects/CScriptWorldTeleporter",
|
||||
|
|
|
@ -3,9 +3,12 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
class CInputStream;
|
||||
class CHealthInfo {
|
||||
public:
|
||||
CHealthInfo(float hp, float resist) : x0_health(hp), x4_knockbackResistance(resist) {}
|
||||
explicit CHealthInfo(CInputStream&);
|
||||
|
||||
void SetHP(float hp) { x0_health = hp; }
|
||||
void SetKnockbackResistance(float resist) { x4_knockbackResistance = resist; }
|
||||
float GetHP() const { return x0_health; }
|
||||
|
|
|
@ -247,7 +247,7 @@ METROIDPRIME :=\
|
|||
$(BUILD_DIR)/asm/MetroidPrime/HUD/CHudBallInterface.o\
|
||||
$(BUILD_DIR)/asm/MetroidPrime/Tweaks/CTweakGuiColors.o\
|
||||
$(BUILD_DIR)/asm/MetroidPrime/ScriptObjects/CFishCloud.o\
|
||||
$(BUILD_DIR)/asm/MetroidPrime/CHealthInfo.o\
|
||||
$(BUILD_DIR)/src/MetroidPrime/CHealthInfo.o\
|
||||
$(BUILD_DIR)/asm/MetroidPrime/Player/CGameState.o\
|
||||
$(BUILD_DIR)/asm/MetroidPrime/ScriptObjects/CScriptVisorFlare.o\
|
||||
$(BUILD_DIR)/asm/MetroidPrime/ScriptObjects/CScriptWorldTeleporter.o\
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#include "MetroidPrime/CHealthInfo.hpp"
|
||||
|
||||
#include "Kyoto/Streams/CInputStream.hpp"
|
||||
|
||||
CHealthInfo::CHealthInfo(CInputStream& in)
|
||||
{
|
||||
in.ReadLong();
|
||||
x0_health = in.ReadFloat();
|
||||
x4_knockbackResistance = in.ReadFloat();
|
||||
}
|
Loading…
Reference in New Issue