This repository has been archived on 2024-06-01. You can view files and clone it, but cannot push or open issues or pull requests.
cathook/include/visual/EffectChams.hpp
2017-12-02 17:47:47 +03:00

60 lines
1.2 KiB
C++

/*
* EffectChams.hpp
*
* Created on: Apr 16, 2017
* Author: nullifiedcat
*/
#ifndef EFFECTCHAMS_HPP_
#define EFFECTCHAMS_HPP_
#include "common.hpp"
#include "sdk/ScreenSpaceEffects.h"
#include "sdk.hpp"
namespace effect_chams
{
class EffectChams : public IScreenSpaceEffect
{
public:
virtual void Init();
inline virtual void Shutdown(){};
inline virtual void SetParameters(KeyValues *params){};
virtual void Render(int x, int y, int w, int h);
inline virtual void Enable(bool bEnable)
{
enabled = bEnable;
};
inline virtual bool IsEnabled()
{
return enabled;
};
rgba_t ChamsColor(IClientEntity *entity);
bool ShouldRenderChams(IClientEntity *entity);
void RenderChams(int idx);
void BeginRenderChams();
void EndRenderChams();
void RenderChamsRecursive(IClientEntity *entity);
public:
bool init{ false };
bool drawing{ false };
bool enabled;
float orig_modulation[3];
CMaterialReference mat_unlit;
CMaterialReference mat_unlit_z;
CMaterialReference mat_lit;
CMaterialReference mat_lit_z;
};
extern EffectChams g_EffectChams;
extern CScreenSpaceEffectRegistration *g_pEffectChams;
}
#endif /* EFFECTCHAMS_HPP_ */