You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Gems/Maestro/Code/Source/Cinematics/AnimScreenFaderNode.h

80 lines
2.2 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_CRYMOVIE_ANIMSCREENFADERNODE_H
#define CRYINCLUDE_CRYMOVIE_ANIMSCREENFADERNODE_H
#pragma once
#include "AnimNode.h"
class CScreenFaderTrack;
class CAnimScreenFaderNode
: public CAnimNode
{
public:
AZ_CLASS_ALLOCATOR(CAnimScreenFaderNode, AZ::SystemAllocator, 0);
AZ_RTTI(CAnimScreenFaderNode, "{C24D5F2D-B17A-4350-8381-539202A99FDD}", CAnimNode);
//-----------------------------------------------------------------------------
//!
CAnimScreenFaderNode(const int id);
CAnimScreenFaderNode();
~CAnimScreenFaderNode();
static void Initialize();
//-----------------------------------------------------------------------------
//! Overrides from CAnimNode
void Animate(SAnimContext& ac) override;
void CreateDefaultTracks() override;
void OnReset() override;
void Activate(bool bActivate) override;
void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override;
//-----------------------------------------------------------------------------
//! Overrides from IAnimNode
unsigned int GetParamCount() const override;
CAnimParamType GetParamType(unsigned int nIndex) const override;
void SetFlags(int flags) override;
void Render() override;
bool IsAnyTextureVisible() const;
static void Reflect(AZ::ReflectContext* context);
protected:
bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const override;
bool NeedToRender() const override { return true; }
private:
CAnimScreenFaderNode(const CAnimScreenFaderNode&);
CAnimScreenFaderNode& operator = (const CAnimScreenFaderNode&);
private:
//-----------------------------------------------------------------------------
//!
void PrecacheTexData();
Vec4 m_startColor;
bool m_bActive;
float m_screenWidth, m_screenHeight;
int m_lastActivatedKey;
bool m_texPrecached;
};
#endif // CRYINCLUDE_CRYMOVIE_ANIMSCREENFADERNODE_H