123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- //===========================================================================//
- // Copyright (C) Microsoft Corporation. All rights reserved. //
- //===========================================================================//
- #pragma once
- #include "gosFX.hpp"
- #include "Singleton.hpp"
- #include <MLR\MLR.hpp>
- namespace MidLevelRenderer {class MLRCardCloud;}
- namespace gosFX
- {
- //############################################################################
- //######################## Card__Specification #############################
- //############################################################################
- class Card;
- class Card__Specification:
- public Singleton__Specification
- {
- friend class Card;
- //----------------------------------------------------------------------
- // Constructors/Destructors
- //
- protected:
- Card__Specification(
- Stuff::MemoryStream *stream,
- int gfx_version
- );
- public:
- Card__Specification();
- void
- Save(Stuff::MemoryStream *stream);
- void
- BuildDefaults();
-
- bool
- IsDataValid(bool fix_data=false);
- static Card__Specification*
- Make(
- Stuff::MemoryStream *stream,
- int gfx_version
- );
- void
- Copy(Card__Specification *spec);
- //-------------------------------------------------------------------------
- // FCurves
- //
- public:
- SeededCurveOf<ConstantCurve, ComplexCurve,Curve::e_ConstantComplexType>
- m_halfHeight,
- m_aspectRatio;
- SeededCurveOf<ComplexCurve, SplineCurve,Curve::e_ComplexSplineType>
- m_index;
- ConstantCurve
- m_UOffset,
- m_VOffset,
- m_USize,
- m_VSize;
- bool
- m_animated;
- BYTE
- m_width;
- void
- SetWidth();
- };
- //############################################################################
- //############################# Card #################################
- //############################################################################
- class Card : public Singleton
- {
- //----------------------------------------------------------------------------
- // Class Registration Support
- //
- public:
- static void InitializeClass();
- static void TerminateClass();
- typedef Card__Specification Specification;
- //----------------------------------------------------------------------------
- // Class Data Support
- //
- protected:
- Card(
- Specification *spec,
- unsigned flags
- );
- ~Card();
- Stuff::Scalar
- m_halfX,
- m_halfY;
- MidLevelRenderer::MLRCardCloud
- *m_cardCloud;
- Stuff::Point3D
- m_vertices[4];
- Stuff::RGBAColor
- m_colors[4];
- Stuff::Vector2DOf<Stuff::Scalar>
- m_uvs[4];
- const int
- m_cardCount;
- public:
- static Card*
- Make(
- Specification *spec,
- unsigned flags
- );
- Specification*
- GetSpecification()
- {
- Check_Object(this);
- return
- Cast_Object(Specification*, m_specification);
- }
- static ClassData
- *DefaultData;
- //----------------------------------------------------------------------------
- // Testing
- //
- public:
- void
- TestInstance() const;
- //----------------------------------------------------------------------------
- // API
- //
- public:
- void
- Start(ExecuteInfo *info);
- bool
- Execute(ExecuteInfo *info);
- void
- Draw(DrawInfo *info);
- void
- Kill();
- };
- }
|