mirror of https://github.com/PrimeDecomp/prime.git
Match and link CHealthInfo
This commit is contained in:
parent
b923d9cb52
commit
a859570ce0
|
@ -280,7 +280,7 @@ LIBS = [
|
||||||
"MetroidPrime/HUD/CHudBallInterface",
|
"MetroidPrime/HUD/CHudBallInterface",
|
||||||
"MetroidPrime/Tweaks/CTweakGuiColors",
|
"MetroidPrime/Tweaks/CTweakGuiColors",
|
||||||
"MetroidPrime/ScriptObjects/CFishCloud",
|
"MetroidPrime/ScriptObjects/CFishCloud",
|
||||||
"MetroidPrime/CHealthInfo",
|
["MetroidPrime/CHealthInfo", True],
|
||||||
"MetroidPrime/Player/CGameState",
|
"MetroidPrime/Player/CGameState",
|
||||||
"MetroidPrime/ScriptObjects/CScriptVisorFlare",
|
"MetroidPrime/ScriptObjects/CScriptVisorFlare",
|
||||||
"MetroidPrime/ScriptObjects/CScriptWorldTeleporter",
|
"MetroidPrime/ScriptObjects/CScriptWorldTeleporter",
|
||||||
|
|
|
@ -3,9 +3,12 @@
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
class CInputStream;
|
||||||
class CHealthInfo {
|
class CHealthInfo {
|
||||||
public:
|
public:
|
||||||
CHealthInfo(float hp, float resist) : x0_health(hp), x4_knockbackResistance(resist) {}
|
CHealthInfo(float hp, float resist) : x0_health(hp), x4_knockbackResistance(resist) {}
|
||||||
|
explicit CHealthInfo(CInputStream&);
|
||||||
|
|
||||||
void SetHP(float hp) { x0_health = hp; }
|
void SetHP(float hp) { x0_health = hp; }
|
||||||
void SetKnockbackResistance(float resist) { x4_knockbackResistance = resist; }
|
void SetKnockbackResistance(float resist) { x4_knockbackResistance = resist; }
|
||||||
float GetHP() const { return x0_health; }
|
float GetHP() const { return x0_health; }
|
||||||
|
|
|
@ -247,7 +247,7 @@ METROIDPRIME :=\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/HUD/CHudBallInterface.o\
|
$(BUILD_DIR)/asm/MetroidPrime/HUD/CHudBallInterface.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/Tweaks/CTweakGuiColors.o\
|
$(BUILD_DIR)/asm/MetroidPrime/Tweaks/CTweakGuiColors.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/ScriptObjects/CFishCloud.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/Player/CGameState.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/ScriptObjects/CScriptVisorFlare.o\
|
$(BUILD_DIR)/asm/MetroidPrime/ScriptObjects/CScriptVisorFlare.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/ScriptObjects/CScriptWorldTeleporter.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