Link CScriptVisorFlare

Former-commit-id: 0680d336c94b3649210ea66c77bf0509e06691db
This commit is contained in:
Luke Street 2023-10-17 23:06:15 -04:00
parent eb50706b1e
commit f2baf5dc28
3 changed files with 20 additions and 15 deletions

View File

@ -546,7 +546,7 @@ config.libs = [
Object(NonMatching, "MetroidPrime/ScriptObjects/CFishCloud.cpp"), Object(NonMatching, "MetroidPrime/ScriptObjects/CFishCloud.cpp"),
Object(Matching, "MetroidPrime/CHealthInfo.cpp"), Object(Matching, "MetroidPrime/CHealthInfo.cpp"),
Object(NonMatching, "MetroidPrime/Player/CGameState.cpp"), Object(NonMatching, "MetroidPrime/Player/CGameState.cpp"),
Object(NonMatching, "MetroidPrime/ScriptObjects/CScriptVisorFlare.cpp"), Object(Matching, "MetroidPrime/ScriptObjects/CScriptVisorFlare.cpp"),
Object( Object(
NonMatching, "MetroidPrime/ScriptObjects/CScriptWorldTeleporter.cpp" NonMatching, "MetroidPrime/ScriptObjects/CScriptWorldTeleporter.cpp"
), ),

View File

@ -1,11 +1,13 @@
#ifndef _CVISORFLARE #ifndef _CVISORFLARE
#define _CVISORFLARE #define _CVISORFLARE
#include "Kyoto/TToken.hpp"
#include "Kyoto/Graphics/CColor.hpp" #include "Kyoto/Graphics/CColor.hpp"
#include "Kyoto/TToken.hpp"
#include "rstl/vector.hpp"
#include "rstl/optional_object.hpp" #include "rstl/optional_object.hpp"
#include "rstl/vector.hpp"
class CTexture; class CTexture;
class CStateManager; class CStateManager;
@ -40,6 +42,14 @@ public:
float GetScale() const { return xc_scale; } float GetScale() const { return xc_scale; }
}; };
CVisorFlare(EBlendMode blendMode, bool, float, float, float, uint, uint,
const rstl::vector< CFlareDef >& flares);
~CVisorFlare() {}
void Update(float dt, const CVector3f& pos, const CActor* act, CStateManager& mgr);
void Render(const CVector3f& pos, const CStateManager& mgr) const;
static rstl::optional_object< CFlareDef > LoadFlareDef(CInputStream& in);
private: private:
EBlendMode x0_blendMode; EBlendMode x0_blendMode;
rstl::vector< CFlareDef > x4_flareDefs; rstl::vector< CFlareDef > x4_flareDefs;
@ -56,14 +66,6 @@ private:
void ResetTevSwapMode(const CStateManager& mgr) const; void ResetTevSwapMode(const CStateManager& mgr) const;
void DrawDirect(const CColor& color, float f1, float f2) const; void DrawDirect(const CColor& color, float f1, float f2) const;
void DrawStreamed(const CColor& color, float f1, float f2) const; void DrawStreamed(const CColor& color, float f1, float f2) const;
public:
CVisorFlare(EBlendMode blendMode, bool, float, float, float, uint, uint, const rstl::vector<CFlareDef>& flares);
~CVisorFlare() {}
void Update(float dt, const CVector3f& pos, const CActor* act, CStateManager& mgr);
void Render(const CVector3f& pos, const CStateManager& mgr) const;
static rstl::optional_object<CFlareDef> LoadFlareDef(CInputStream& in);
}; };
#endif // _CVISORFLARE #endif // _CVISORFLARE

View File

@ -4,6 +4,9 @@
#include "MetroidPrime/CStateManager.hpp" #include "MetroidPrime/CStateManager.hpp"
#include "MetroidPrime/Player/CPlayer.hpp" #include "MetroidPrime/Player/CPlayer.hpp"
// TODO inline depth hack
#pragma inline_max_size(200)
CScriptVisorFlare::CScriptVisorFlare(TUniqueId uid, const rstl::string& name, CScriptVisorFlare::CScriptVisorFlare(TUniqueId uid, const rstl::string& name,
const CEntityInfo& info, bool active, const CVector3f& pos, const CEntityInfo& info, bool active, const CVector3f& pos,
CVisorFlare::EBlendMode blendMode, bool b1, float f1, float f2, CVisorFlare::EBlendMode blendMode, bool b1, float f1, float f2,