Decouple <cstddef>
This commit is contained in:
+24
-22
@@ -6,6 +6,8 @@
|
||||
#include "RageMath.h"
|
||||
#include "RageTextureID.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
enum DrawMode
|
||||
{
|
||||
DrawMode_Quads = 0,
|
||||
@@ -28,7 +30,7 @@ class RageTexture;
|
||||
class ActorMultiVertex: public Actor
|
||||
{
|
||||
public:
|
||||
static const size_t num_vert_splines= 4;
|
||||
static const std::size_t num_vert_splines= 4;
|
||||
ActorMultiVertex();
|
||||
ActorMultiVertex( const ActorMultiVertex &cpy );
|
||||
virtual ~ActorMultiVertex();
|
||||
@@ -49,7 +51,7 @@ public:
|
||||
int GetSafeNumToDraw( DrawMode dm, int num ) const;
|
||||
|
||||
std::vector<RageSpriteVertex> vertices;
|
||||
std::vector<size_t> quad_states;
|
||||
std::vector<std::size_t> quad_states;
|
||||
|
||||
DrawMode _DrawMode;
|
||||
int FirstToDraw;
|
||||
@@ -73,7 +75,7 @@ public:
|
||||
virtual bool EarlyAbortDraw() const override;
|
||||
virtual void DrawPrimitives() override;
|
||||
virtual void DrawInternal( const AMV_TweenState *TS );
|
||||
|
||||
|
||||
void SetCurrentTweenStart() override;
|
||||
void EraseHeadTween() override;
|
||||
void UpdatePercentThroughTween( float PercentThroughTween ) override;
|
||||
@@ -81,13 +83,13 @@ public:
|
||||
|
||||
void StopTweening() override;
|
||||
void FinishTweening() override;
|
||||
|
||||
|
||||
void SetTexture( RageTexture *Texture );
|
||||
RageTexture* GetTexture() { return _Texture; };
|
||||
void LoadFromTexture( RageTextureID ID );
|
||||
|
||||
void UnloadTexture();
|
||||
void SetNumVertices( size_t n );
|
||||
void SetNumVertices( std::size_t n );
|
||||
|
||||
void AddVertex();
|
||||
void AddVertices( int Add );
|
||||
@@ -104,15 +106,15 @@ public:
|
||||
DrawMode GetCurrDrawMode() const { return AMV_current._DrawMode; }
|
||||
int GetCurrFirstToDraw() const { return AMV_current.FirstToDraw; }
|
||||
int GetCurrNumToDraw() const { return AMV_current.NumToDraw; }
|
||||
size_t GetNumVertices() { return AMV_DestTweenState().vertices.size(); }
|
||||
|
||||
std::size_t GetNumVertices() { return AMV_DestTweenState().vertices.size(); }
|
||||
|
||||
void SetVertexPos( int index , float x , float y , float z );
|
||||
void SetVertexColor( int index , RageColor c );
|
||||
void SetVertexCoords( int index , float TexCoordX , float TexCoordY );
|
||||
|
||||
inline void SetVertsFromSplinesInternal(size_t num_splines, size_t start_vert);
|
||||
inline void SetVertsFromSplinesInternal(std::size_t num_splines, std::size_t start_vert);
|
||||
void SetVertsFromSplines();
|
||||
CubicSplineN* GetSpline(size_t i);
|
||||
CubicSplineN* GetSpline(std::size_t i);
|
||||
|
||||
struct State
|
||||
{
|
||||
@@ -121,12 +123,12 @@ public:
|
||||
};
|
||||
int GetNumStates() const override { return _states.size(); }
|
||||
void AddState(const State& new_state) { _states.push_back(new_state); }
|
||||
void RemoveState(size_t i)
|
||||
void RemoveState(std::size_t i)
|
||||
{ ASSERT(i < _states.size()); _states.erase(_states.begin()+i); }
|
||||
size_t GetState() { return _cur_state; }
|
||||
State& GetStateData(size_t i)
|
||||
std::size_t GetState() { return _cur_state; }
|
||||
State& GetStateData(std::size_t i)
|
||||
{ ASSERT(i < _states.size()); return _states[i]; }
|
||||
void SetStateData(size_t i, const State& s)
|
||||
void SetStateData(std::size_t i, const State& s)
|
||||
{ ASSERT(i < _states.size()); _states[i]= s; }
|
||||
void SetStateProperties(const std::vector<State>& new_states)
|
||||
{ _states= new_states; SetState(0); }
|
||||
@@ -135,15 +137,15 @@ public:
|
||||
float GetAnimationLengthSeconds() const override;
|
||||
void SetSecondsIntoAnimation(float seconds) override;
|
||||
void UpdateAnimationState(bool force_update= false);
|
||||
size_t GetNumQuadStates() const
|
||||
std::size_t GetNumQuadStates() const
|
||||
{ return AMV_DestTweenState().quad_states.size(); }
|
||||
void AddQuadState(size_t s)
|
||||
void AddQuadState(std::size_t s)
|
||||
{ AMV_DestTweenState().quad_states.push_back(s); }
|
||||
void RemoveQuadState(size_t i)
|
||||
void RemoveQuadState(std::size_t i)
|
||||
{ AMV_DestTweenState().quad_states.erase(AMV_DestTweenState().quad_states.begin()+i); }
|
||||
size_t GetQuadState(size_t i)
|
||||
std::size_t GetQuadState(std::size_t i)
|
||||
{ return AMV_DestTweenState().quad_states[i]; }
|
||||
void SetQuadState(size_t i, size_t s)
|
||||
void SetQuadState(std::size_t i, std::size_t s)
|
||||
{ AMV_DestTweenState().quad_states[i]= s; }
|
||||
bool _use_animation_state;
|
||||
bool _decode_movie;
|
||||
@@ -160,7 +162,7 @@ private:
|
||||
|
||||
// required to handle diffuse and glow
|
||||
AMV_TweenState *AMV_TempState;
|
||||
|
||||
|
||||
EffectMode _EffectMode;
|
||||
TextureMode _TextureMode;
|
||||
|
||||
@@ -170,7 +172,7 @@ private:
|
||||
|
||||
bool _skip_next_update;
|
||||
float _secs_into_state;
|
||||
size_t _cur_state;
|
||||
std::size_t _cur_state;
|
||||
std::vector<State> _states;
|
||||
};
|
||||
|
||||
@@ -179,7 +181,7 @@ private:
|
||||
* @author Matthew Gardner and Eric Reese (c) 2014
|
||||
* @section LICENSE
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -189,7 +191,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
Reference in New Issue
Block a user