You know the drill.
This commit is contained in:
+14
-6
@@ -1,4 +1,4 @@
|
||||
/* RollingNumbers - animates from one number to another by scrolling its digits. */
|
||||
/** @brief RollingNumbers - animates from one number to another by scrolling its digits. */
|
||||
|
||||
#ifndef RollingNumbers_H
|
||||
#define RollingNumbers_H
|
||||
@@ -17,6 +17,9 @@ public:
|
||||
virtual void DrawPrimitives();
|
||||
virtual void Update( float fDeltaTime );
|
||||
|
||||
/**
|
||||
* @brief Set the new target number to be reached.
|
||||
* @param fTargetNumber the new target number. */
|
||||
void SetTargetNumber( float fTargetNumber );
|
||||
|
||||
void UpdateText();
|
||||
@@ -30,15 +33,20 @@ private:
|
||||
ThemeMetric<bool> COMMIFY;
|
||||
ThemeMetric<RageColor> LEADING_ZERO_MULTIPLY_COLOR;
|
||||
|
||||
float m_fCurrentNumber; // currently showing this
|
||||
float m_fTargetNumber; // approach this
|
||||
float m_fScoreVelocity; // approach target at this speed
|
||||
/** @brief The currently showing number. */
|
||||
float m_fCurrentNumber;
|
||||
/** @brief The number we are trying to approach. */
|
||||
float m_fTargetNumber;
|
||||
/** @brief The speed we are trying to reach the target number. */
|
||||
float m_fScoreVelocity;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford
|
||||
/**
|
||||
* @file
|
||||
* @author Chris Danford (c) 2001-2004
|
||||
* @section LICENSE
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
|
||||
+16
-7
@@ -1,4 +1,4 @@
|
||||
/* Sprite - A bitmap Actor that animates and moves around. */
|
||||
/** @brief Sprite - A bitmap Actor that animates and moves around. */
|
||||
|
||||
#ifndef SPRITE_H
|
||||
#define SPRITE_H
|
||||
@@ -61,8 +61,12 @@ public:
|
||||
void SetEffectMode( EffectMode em ) { m_EffectMode = em; }
|
||||
|
||||
void SetTexCoordVelocity(float fVelX, float fVelY);
|
||||
// Scale the Sprite maintaining the aspect ratio so that it fits
|
||||
// within (fWidth,fHeight) and is clipped to (fWidth,fHeight).
|
||||
/**
|
||||
* @brief Scale the Sprite while maintaining the aspect ratio.
|
||||
*
|
||||
* It has to fit within and become clipped to the given parameters.
|
||||
* @param fWidth the new width.
|
||||
* @param fHeight the new height. */
|
||||
void ScaleToClipped( float fWidth, float fHeight );
|
||||
void CropTo( float fWidth, float fHeight );
|
||||
static bool IsDiagonalBanner( int iWidth, int iHeight );
|
||||
@@ -82,14 +86,17 @@ private:
|
||||
|
||||
RageTexture* m_pTexture;
|
||||
|
||||
/** @brief The Sprite's present state. */
|
||||
struct State
|
||||
{
|
||||
RectF rect;
|
||||
float fDelay; // "seconds to show"
|
||||
/** @brief The number of "seconds to show". */
|
||||
float fDelay;
|
||||
};
|
||||
vector<State> m_States;
|
||||
int m_iCurState;
|
||||
float m_fSecsIntoState; // number of seconds that have elapsed since we switched to this frame
|
||||
/** @brief The number of seconds that have elapsed since we switched to this frame. */
|
||||
float m_fSecsIntoState;
|
||||
|
||||
EffectMode m_EffectMode;
|
||||
bool m_bUsingCustomTexCoords;
|
||||
@@ -106,8 +113,10 @@ private:
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford
|
||||
/**
|
||||
* @file
|
||||
* @author Chris Danford (c) 2001-2004
|
||||
* @section LICENSE
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
|
||||
+18
-9
@@ -1,4 +1,4 @@
|
||||
/* ITween - Interface for simple interpolation. */
|
||||
/** @brief ITween - Interface for simple interpolation. */
|
||||
|
||||
#ifndef TWEEN_H
|
||||
#define TWEEN_H
|
||||
@@ -8,22 +8,29 @@
|
||||
struct lua_State;
|
||||
typedef lua_State Lua;
|
||||
|
||||
/** @brief The different tweening types available. */
|
||||
enum TweenType
|
||||
{
|
||||
TWEEN_LINEAR,
|
||||
TWEEN_ACCELERATE,
|
||||
TWEEN_DECELERATE,
|
||||
TWEEN_SPRING,
|
||||
TWEEN_BEZIER,
|
||||
NUM_TweenType,
|
||||
TWEEN_LINEAR, /**< A linear tween. */
|
||||
TWEEN_ACCELERATE, /**< An accelerating tween. */
|
||||
TWEEN_DECELERATE, /**< A decelerating tween. */
|
||||
TWEEN_SPRING, /**< A spring tween. */
|
||||
TWEEN_BEZIER, /**< A bezier tween. */
|
||||
NUM_TweenType, /**< The number of tween types. */
|
||||
TweenType_Invalid
|
||||
};
|
||||
/** @brief A custom foreach loop iterating through the tween types. */
|
||||
#define FOREACH_TweenType( tt ) FOREACH_ENUM( TweenType, tt )
|
||||
LuaDeclareType( TweenType );
|
||||
|
||||
/**
|
||||
* @brief The interface for simple interpolation.
|
||||
*
|
||||
* Funny enough, this is a class. */
|
||||
class ITween
|
||||
{
|
||||
public:
|
||||
/** @brief Create the initial interface. */
|
||||
virtual ~ITween() { }
|
||||
virtual float Tween( float f ) const = 0;
|
||||
virtual ITween *Copy() const = 0;
|
||||
@@ -34,8 +41,10 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2006 Glenn Maynard
|
||||
/**
|
||||
* @file
|
||||
* @author Glenn Maynard (c) 2006
|
||||
* @section LICENSE
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
|
||||
Reference in New Issue
Block a user