Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

63 lines
1.8 KiB

//====== Copyright © 1996-2004, Valve Corporation, All rights reserved. =======
//
// Purpose:
//
//=============================================================================
#ifndef DMEMATERIALOVERLAYFXCLIP_H
#define DMEMATERIALOVERLAYFXCLIP_H
#ifdef _WIN32
#pragma once
#endif
#include "movieobjects/dmeclip.h"
#include "materialsystem/materialsystemutil.h"
#include "datamodel/dmelementfactoryhelper.h"
//-----------------------------------------------------------------------------
// An effect clip
//-----------------------------------------------------------------------------
class CDmeMaterialOverlayFXClip : public CDmeFXClip
{
DEFINE_ELEMENT( CDmeMaterialOverlayFXClip, CDmeFXClip );
public:
// All effects must be able to apply their effect
virtual void ApplyEffect( DmeTime_t time, Rect_t &currentRect, Rect_t &totalRect, ITexture *pTextures[MAX_FX_INPUT_TEXTURES] );
// Resolves changes
virtual void Resolve();
// Sets the overlay material
void SetOverlayEffect( const char *pMaterialName );
void SetAlpha( float flAlpha );
bool HasOpaqueOverlay();
IMaterial *GetMaterial();
float GetAlpha();
private:
CDmaString m_Material;
CDmaColor m_Color;
CDmaVar<int> m_nLeft;
CDmaVar<int> m_nTop;
CDmaVar<int> m_nWidth;
CDmaVar<int> m_nHeight;
CDmaVar<bool> m_bFullScreen;
CDmaVar<bool> m_bUseSubRect;
CDmaVar<int> m_nSubRectLeft;
CDmaVar<int> m_nSubRectTop;
CDmaVar<int> m_nSubRectWidth;
CDmaVar<int> m_nSubRectHeight;
CDmaVar<float> m_flMovementAngle;
CDmaVar<float> m_flMovementSpeed;
CMaterialReference m_OverlayMaterial;
CMaterialReference m_BltMaterial;
void DrawQuad( int x, int y, int w, int h, float u0, float v0, float u1, float v1 );
void DrawOneToOneQuad( int nWidth, int nHeight );
};
#endif // DMEMATERIALOVERLAYFXCLIP_H