Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
StealthEffectClass.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#ifndef TT_INCLUDE__STEALTHEFFECTCLASS_H
13#define TT_INCLUDE__STEALTHEFFECTCLASS_H
14
15#include "MaterialEffectClass.h"
16#include "Vector2.h"
17class MatrixMapperClass;
18class MaterialPassClass;
19class ChunkSaveClass;
20class ChunkLoadClass;
21class StealthEffectClass : public MaterialEffectClass
22{
23public:
24 StealthEffectClass(void);
25 ~StealthEffectClass(void);
26 virtual void Timestep(float dt);
27 virtual void Render_Push(RenderInfoClass & rinfo,PhysClass * obj);
28 virtual void Render_Pop(RenderInfoClass & rinfo);
29 void Enable_Stealth(bool onoff);
30 void Set_Friendly(bool onoff);
31 void Set_Broken(bool onoff);
32 bool Is_Stealth_Enabled(void) { return IsStealthEnabled; }
33 bool Is_Friendly(void) { return IsFriendly; }
34 bool Is_Broken(void) { return IsBroken; }
35 bool Is_Stealthed(void) const { return CurrentFraction > 0.5f; }
36 void Set_Fade_Distance(float d) { FadeDistance = d; }
37 float Get_Fade_Distance(void) const { return FadeDistance; }
38 void Set_Current_State( float percent ) { CurrentFraction = percent; }
39 void Set_Target_State( float percent ) { TargetFraction = percent; }
40 void Damage_Occured(void);
41 bool Save(ChunkSaveClass & csave);
42 bool Load(ChunkLoadClass & cload);
43
44 static const char* Get_Stealth_Shader_Name() { return StealthShaderName; };
45 static void Set_Stealth_Shader_Name(const char* new_name);
46protected:
47 void Update_Target_Fraction(void);
48 bool IsStealthEnabled; //20
49 bool IsFriendly; //21
50 bool IsBroken; //22
51 float FadeDistance; //24
52 float CurrentFraction; //28
53 float TargetFraction; //32
54 Vector2 UVRate; //36
55 bool RenderBaseMaterial; //44
56 bool RenderStealthMaterial; //45
57 float IntensityScale; //48
58 Vector2 UVOffset; //52
59 MatrixMapperClass * Mapper; //60
60 MaterialPassClass * MaterialPass; //64
61
62 static char StealthShaderName[64];
63};
64
65
66#endif