28 static auto NewBlankSprite() ->
Sprite*;
30 void InitState()
override;
32 void LoadFromNode(
const XNode* pNode)
override;
33 [[nodiscard]]
auto Copy() const ->
Sprite* override;
37 void Update(
float fDeltaTime) override;
40 UpdateAnimationState();
52 [[nodiscard]] auto GetTexture() const ->
RageTexture*
57 void EnableAnimation(
bool bEnable)
override;
59 [[nodiscard]]
auto GetNumStates() const ->
int override;
60 void SetState(
int iNewState) override;
61 [[nodiscard]] auto GetState() const ->
int {
return m_iCurState; }
63 [[nodiscard]]
auto GetAnimationLengthSeconds() const ->
float override
65 return m_animation_length_seconds;
67 virtual void RecalcAnimationLengthSeconds();
68 void SetSecondsIntoAnimation(
float fSeconds)
override;
69 void SetStateProperties(
const std::vector<State>& new_states)
71 m_States = new_states;
72 RecalcAnimationLengthSeconds();
76 [[nodiscard]]
auto GetTexturePath() const -> std::
string;
78 void SetCustomTextureRect(const
RectF& new_texcoord_frect);
79 void SetCustomTextureCoords(
float fTexCoords[8]);
80 void SetCustomImageRect(
RectF rectImageCoords);
81 void SetCustomImageCoords(
float fImageCoords[8]);
82 void SetCustomPosCoords(
float fPosCoords[8]);
83 [[nodiscard]] auto GetCurrentTextureCoordRect() const -> const
RectF*;
84 [[nodiscard]] auto GetTextureCoordRectForState(
int iState) const
86 void StopUsingCustomCoords();
87 void StopUsingCustomPosCoords();
88 void GetActiveTextureCoords(
float fTexCoordsOut[8]) const;
89 void StretchTexCoords(
float fX,
float fY);
90 void AddImageCoords(
float fX,
float fY);
91 void SetEffectMode(EffectMode em) { m_EffectMode = em; }
93 void LoadFromCached(
const std::string& sDir,
const std::string& sPath);
94 void SetTexCoordVelocity(
float fVelX,
float fVelY);
102 void CropTo(
float fWidth,
float fHeight);
105 void PushSelf(lua_State* L)
override;
107 void SetAllStateDelays(
float fDelay);
111 bool m_use_effect_clock_for_texcoords;
117 void LoadStatesFromTexture();
119 void DrawTexture(
const TweenState* state);
123 std::vector<State> m_States;
127 float m_fSecsIntoState;
128 float m_animation_length_seconds;
130 EffectMode m_EffectMode;
131 bool m_bUsingCustomTexCoords;
132 bool m_bUsingCustomPosCoords;
133 bool m_bSkipNextUpdate;
140 float m_CustomTexCoords[8];
150 float m_CustomPosCoords[8];
154 float m_fRememberedClipWidth, m_fRememberedClipHeight;
156 float m_fTexCoordVelocityX;
157 float m_fTexCoordVelocityY;
Definition RageTexture.h:14
void ScaleToClipped(float fWidth, float fHeight)
Scale the Sprite while maintaining the aspect ratio.
Definition Sprite.cpp:1096
Definition RageTextureID.h:12