Fix IWeaponRenderer and link

This commit is contained in:
Phillip Stephens 2022-08-12 02:18:28 -07:00
parent 6bf68f9808
commit e418784c51
3 changed files with 6 additions and 4 deletions

View File

@ -3,8 +3,8 @@
#include "Kyoto/Math/CTransform4f.hpp" #include "Kyoto/Math/CTransform4f.hpp"
#include "Kyoto/Math/CVector3f.hpp" #include "Kyoto/Math/CVector3f.hpp"
#include "Kyoto/Math/CColor.hpp"
#include "Kyoto/Math/CAABox.hpp" #include "Kyoto/Math/CAABox.hpp"
#include "Kyoto/Graphics/CColor.hpp"
#include "Kyoto/Graphics/CLight.hpp" #include "Kyoto/Graphics/CLight.hpp"
class CWarp; class CWarp;

View File

@ -6,16 +6,18 @@
class IWeaponRenderer { class IWeaponRenderer {
public: public:
virtual ~IWeaponRenderer() {}; virtual ~IWeaponRenderer()=0;
virtual void AddParticleGen(const CParticleGen& gen) = 0; virtual void AddParticleGen(const CParticleGen& gen) = 0;
static void SetRenderer(IWeaponRenderer* renderer) { sWeaponRenderer = renderer; } static void SetRenderer(IWeaponRenderer* renderer) { sWeaponRenderer = renderer; }
private: private:
static IWeaponRenderer* sWeaponRenderer; static IWeaponRenderer* sWeaponRenderer;
}; };
inline IWeaponRenderer::~IWeaponRenderer() {}
class CDefaultWeaponRenderer : public IWeaponRenderer { class CDefaultWeaponRenderer : public IWeaponRenderer {
public: public:
virtual ~CDefaultWeaponRenderer() {}; ~CDefaultWeaponRenderer() {}
void AddParticleGen(const CParticleGen& gen) { gen.Render(); } void AddParticleGen(const CParticleGen& gen) { gen.Render(); }
}; };

View File

@ -380,7 +380,7 @@ WEAPONS :=\
$(BUILD_DIR)/asm/Weapons/CProjectileWeapon.o\ $(BUILD_DIR)/asm/Weapons/CProjectileWeapon.o\
$(BUILD_DIR)/asm/Weapons/CProjectileWeaponDataFactory.o\ $(BUILD_DIR)/asm/Weapons/CProjectileWeaponDataFactory.o\
$(BUILD_DIR)/asm/Weapons/CCollisionResponseData.o\ $(BUILD_DIR)/asm/Weapons/CCollisionResponseData.o\
$(BUILD_DIR)/asm/Weapons/IWeaponRenderer.o\ $(BUILD_DIR)/src/Weapons/IWeaponRenderer.o\
$(BUILD_DIR)/asm/Weapons/CDecalDataFactory.o\ $(BUILD_DIR)/asm/Weapons/CDecalDataFactory.o\
$(BUILD_DIR)/asm/Weapons/CDecal.o\ $(BUILD_DIR)/asm/Weapons/CDecal.o\
$(BUILD_DIR)/asm/Weapons/CWeaponDescription.o\ $(BUILD_DIR)/asm/Weapons/CWeaponDescription.o\