diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt
index 33512ebde7..eb21d1eb8a 100644
--- a/Docs/Changelog_sm5.txt
+++ b/Docs/Changelog_sm5.txt
@@ -4,10 +4,22 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes
from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
________________________________________________________________________________
+2015/01/06
+----------
+* [ActorMultiVertex] GetSpline and SetVertsFromSplines functions added.
+ [kyzentun]
+* [NoteColumnRenderer] Functions for fetching the spline handlers for the
+ column added. [kyzentun]
+* [NCSplineHandler] New class for setting various parameters of a spline used
+ by a NoteColumnRenderer and containing the spline. [kyzentun]
+* [CubicSplineN] New class that provides spline functionality. [kyzentun]
+
2014/12/26
----------
* [NoteField] Columns turned into actors that can be fetched with
- GetColumnActors. [kyzentun]
+ get_column_actors. [kyzentun]
+ Tiny boost in fps when there is a large number of notes on screen.
+* [NoteColumnRenderer] New class for controlling one column. [kyzentun]
2014/12/20
----------
diff --git a/Docs/Luadoc/Lua.xml b/Docs/Luadoc/Lua.xml
index 675690c28a..f8438e7d55 100644
--- a/Docs/Luadoc/Lua.xml
+++ b/Docs/Luadoc/Lua.xml
@@ -496,6 +496,7 @@
+
@@ -506,6 +507,7 @@
+
@@ -678,6 +680,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -967,16 +994,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -2215,6 +2258,11 @@
+
+
+
+
+
diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml
index 88266af252..c1b5f6698a 100644
--- a/Docs/Luadoc/LuaDocumentation.xml
+++ b/Docs/Luadoc/LuaDocumentation.xml
@@ -112,6 +112,9 @@ save yourself some time, copy this for undocumented things:
Tries to connect to the server at sAddress.
+
+ Creates a CubicSplineN for you to use. Make sure you destroy the CubicSplineN when you're done with it, or you will have a memory leak.
+
[02 Colors.lua]
@@ -1521,6 +1524,22 @@ save yourself some time, copy this for undocumented things:
Sets multiple vertices at once. The elements of vertices should themselves be tables, of the form provided to SetVertex. If vertices is the first argument it will start from vertex 1. If an integer is provided before vertices it will start from that vertex. It will add vertices as necessary.
Example: self:SetVertices( { { { x1, y1, z1 } , { r1,g1,b1,a1 } , { tcx1,tcy1 } }; { { x2, y2, z2 } , { r2,g2,b2,a2 } , { tcx2,tcy2 } } } )
+
+ Sets all the drawn verts of the ActorMultiVertex by evaluating the splines.
+ ("all the drawn verts" means all the verts between FirstToDraw and NumToDraw, the verts that are set to draw in the current tween state.)
+ The parts of the ActorMultiVertex are evenly spaced along the spline in terms of t value.
+ The exact behavior depends on the draw mode.
+ DrawMode_Quads uses all 4 splines, one for each corner.
+ DrawMode_QuadStrip and DrawMode_Strip use 2 splines, one for each edge of the strip.
+ DrawMode_Fan uses one spline, for the edge verts of the fan. The first vert is not touched because it is the center.
+ DrawMode_Triangles uses 3 splines, one for each corner.
+ DrawMode_SymmetricQuadStrip uses 3 splines, one on each edge and one in the center.
+ DrawMode_LineStrip uses 1 spline.
+
+
+ Returns the requested spline. Spline indices range from 1 to 4.
+ ActorMultiVertex splines are not inside the tween state, and will not change the verts until you call SetVertsFromSplines.
+
Sets the number of vertices.
@@ -2062,6 +2081,92 @@ save yourself some time, copy this for undocumented things:
Returns the SHA-1 hash for s.
+
+
+ All functions in this class have camel case equivalents, use whichever naming style you prefer.
+ This spline implementation is a cubic spline.
+ A spline is a line calculated from a small set of points with mathematical smooting applied.
+ Splines can have any number of dimensions, but splines owned by actors (the ones inside NCSplineHandler and ActorMultiVertex) always have 3 dimensions.
+
+
+ Solves the spline, setting the coefficients.
+
+
+ Evaluates the spline at the given t value, returning a table of the results for each dimension of the spline.
+ t can range from 0 to the value returned by get_max_t().
+ A normal spline will return its starting point for any t value less than 0 and its end point for any t value greater than the max.
+ A looped spline adjust the t value to be within the its range by adding or subtracting the max t as needed. (so if the max t is 4 and you evaluate at 5, it will return the same as if you evaluated at 1.)
+
+
+ Evaluates the derivative at t.
+
+
+ Evaluates the second derivative at t.
+
+
+ Evaluates the third derivative at t.
+ Second and third derivative functions exist because they're possible, not because they're expected to be useful. The fourth derivative would be 0 because the equation for evaluating the spline is "a + (b*t) + (c*t^2) + (d*t^3)".
+
+
+ Sets point i of the spline to the position specified by the table p.
+
+
+ Sets the coefficients of the spline at point i.
+ Each table must contain a value for each dimension of the spline.
+ Solving the spline normally should cover all normal usage, this is for people that want a spline with an abnormal behavior, so if you set the coefficients directly, expect to end up with an unsmooth shape.
+
+
+ Returns a table containing the tables of coefficients for the point i.
+
+
+ Sets the spatial extent of dimension d of the spline to e.
+ The spatial extent exists to handle numbers that exist in a finite looped space, instead of the flat infinite space.
+ To put it more concretely, spatial extent exists to allow a spline to control rotation with wrapping behavior at 0.0 and 2pi, instead of suddenly jerking from 2pi to 0.0.
+
+
+ Returns the spatial extent of dimension d of the spline.
+
+
+ Returns the max t value the spline extends to. For a normal spline, this will be size()-1. For a looped spline, this will be size().
+
+
+ Sets the number of points in the spline. You must set the number of points before trying to set the position of any point.
+
+
+ Returns the number of points in the spline.
+
+
+ Sets the number of dimensions the spline has.
+ Splines that are owned by actors (the ones inside ActorMultiVertex and NCSplineHandler) cannot have their number of dimensions changed because the actors require them to have 3 dimensions.
+
+
+ Returns the number of dimensions the spline has.
+
+
+ Returns true of the spline has zero points, or false if it has more than zero points.
+
+
+ Sets whether the spline is looped. A looped spline is one where the end point is connected to the start point.
+
+
+ Returns whether the spline is looped.
+
+
+ Sets whether the spline is polygonal. If the spline is polygonal, then it will have straight lines between the points instead of curves.
+
+
+ Returns whether the spline is polygonal.
+
+
+ Sets whether the spline is dirty. A dirty spline is one that has been changed in some way that affects its shape. When solve() is called, the spline will only be solved if it is dirty. The dirty flag is automatically set by everything, so you should never have to call this function.
+
+
+ Returns whether the spline is currently dirty.
+
+
+ Destroys the spline, freeing the memory allocated for it. This can only be called on splines created with create_spline().
+
+
Sets the DifficultyIcon's state from the difficulty passed in.
@@ -2950,44 +3055,102 @@ save yourself some time, copy this for undocumented things:
Returns a table of noteskin names for the current gametype.
+
+
+ All functions in this class have camel case equivalents, use whichever naming style you prefer.
+ The spline handler holds info on how the spline is used by the engine.
+ Each get/set pair of functions in this class is for a different aspect of the spline's behavior.
+
+
+ Returns the spline for this handler.
+
+
+ Returns the beats per t value of the spline. If the beats_per_t is 4, then a note must be on screen for 4 beats to traverse from one point on the spline to the next.
+
+
+ Sets the beats per t value for the spline.
+
+
+ Returns the t value that receptors are evaluated at.
+
+
+ the t value that receptors are evaluated at.
+
+
+ Returns the mode the spline is set to.
+ "NoteColumnSplineMode_Disabled" means the spline will not affect the notes or receptors at all.
+ "NoteColumnSplineMode_Offset" means the spline will added to the effects from the mods.
+ "NoteColumnSplineMode_Position" means only the spline affect the notes and mods will be ignored. (but only mods that affect the same aspect of the note as the spline will be disabled. So a rotation spline won't disable Mini or Tiny, but a zoom spline will, and a zoom spline won't disable Dizzy, Twirl, or Roll, but a rotation spline will.)
+
+
+ Sets the current spline mode for this handler.
+
+
+ Returns whether the current song beat is subtracted from a note's beat when calculating the t value to use on the spline.
+
+
+ Sets whether the current song beat is subtracted from a note's beat when calculating the t value to use on the spline.
+
+
+
+
+ All functions in this class have camel case equivalents, use whichever naming style you prefer.
+ Position, rotation, and zoom each have separate spline handlers to allow them to have separate independent behavior.
+ It is important to note that the spline handlers are inside the tween state, so whenever you start a new tween on the actor, you need to refetch the spline handlers.
+
+
+ Returns the handler for the position spline.
+
+
+ Returns the handler for the rotation spline.
+ The rotation applied by the rotation spline is in radians.
+ For convenience, the spatial extent of the rotation spline defaults to 2pi.
+
+
+ Returns the handler for the zoom spline.
+
+
-
+
+ All functions in this class have camel case equivalents, use whichever naming style you prefer.
+
+
Makes the NoteField act as if a hold note was hit in the column, with the given score and bright setting.
- The callback for DidHoldNote will not be called.
+ The callback for did_hold_note will not be called.
-
+
Makes the NoteField act as if a tap note was hit in the column, with the given score and bright setting.
- The callback for DidTapNote will not be called.
+ The callback for did_tap_note will not be called.
-
- Returns a table of the actors for the columns.
+
+ Returns a table of the actors for the columns. This means that each column is an actor, so you can move it around or animate it like an actor. See the NoteColumnRenderer class for a list of special functions for the column's actor.
-
+
Same as SetDidTapNoteCallback, but for hold notes. Uses HoldNoteScore instead of TapNoteScore.
-
+
Sets the function that the NoteField will call whenever a tap note is hit.
The callback function is passed the column, the TapNoteScore, and whether the explosion will be bright.
The callback function can return changed values for the NoteField to use instead of the ones that were passed.
Pass nil instead of a function to clear the callback.
-
+
Makes the NoteField act as if a press occurred in the column.
- The callback for SetPressed will not be called.
+ The callback for set_pressed will not be called.
-
+
Sets the function that the NoteField will call whenever a press occurs.
The callback function is passed the column for the press.
The callback function can return changed values for the NoteField to use instead of the ones that were passed.
Pass nil instead of a function to clear the callback.
-
+
Sets the function that the NoteField will call whenever a step occurs.
The callback function is passed the column and the TapNoteScore for the step.
The callback function can return changed values for the NoteField to use instead of the ones that were passed.
Pass nil instead of a function to clear the callback.
-
+
Makes the NoteField act as if a step occurred in the column with the given score.
The callback for Step will not be called.
diff --git a/Themes/_fallback/Scripts/01 alias.lua b/Themes/_fallback/Scripts/01 alias.lua
index 507d09dd2c..3ab5d577f9 100644
--- a/Themes/_fallback/Scripts/01 alias.lua
+++ b/Themes/_fallback/Scripts/01 alias.lua
@@ -33,6 +33,7 @@ function alias_one(class, main_name, alt_name)
lua.ReportScriptError("Alias name of function must be a string.")
return
end
+ if class[alt_name] then return end
class[alt_name]= class[main_name]
end
diff --git a/src/ActorMultiVertex.cpp b/src/ActorMultiVertex.cpp
index e93ba2a21e..7794d069c4 100644
--- a/src/ActorMultiVertex.cpp
+++ b/src/ActorMultiVertex.cpp
@@ -63,9 +63,12 @@ ActorMultiVertex::ActorMultiVertex()
_EffectMode = EffectMode_Normal;
_TextureMode = TextureMode_Modulate;
- _using_spline= false;
- _spline.redimension(3);
- _spline.m_owned_by_actor= true;
+ _splines.resize(num_vert_splines);
+ for(size_t i= 0; i < num_vert_splines; ++i)
+ {
+ _splines[i].redimension(3);
+ _splines[i].m_owned_by_actor= true;
+ }
}
ActorMultiVertex::~ActorMultiVertex()
@@ -77,13 +80,12 @@ ActorMultiVertex::ActorMultiVertex( const ActorMultiVertex &cpy ):
Actor( cpy )
{
#define CPY(a) a = cpy.a
- CPY( _spline );
- CPY( _using_spline );
CPY( AMV_Tweens );
CPY( AMV_current );
CPY( AMV_start );
CPY( _EffectMode );
CPY( _TextureMode );
+ CPY( _splines );
#undef CPY
if( cpy._Texture != NULL )
@@ -200,71 +202,6 @@ void ActorMultiVertex::SetVertexCoords( int index, float TexCoordX, float TexCoo
AMV_DestTweenState().vertices[index].t = RageVector2( TexCoordX, TexCoordY );
}
-bool ActorMultiVertex::GetUseSpline()
-{
- return _using_spline;
-}
-
-void ActorMultiVertex::SetUseSpline(bool use)
-{
- _using_spline= use;
-}
-
-void ActorMultiVertex::SplineSetPoint(size_t i, float x , float y , float z)
-{
- vector v(3);
- v[0]= x; v[1]= y; v[2]= z;
- _spline.set_point(i, v);
-}
-
-void ActorMultiVertex::SplineResize(size_t s)
-{
- _spline.resize(s);
-}
-
-size_t ActorMultiVertex::SplineSize()
-{
- return _spline.size();
-}
-
-void ActorMultiVertex::SplineSolve()
-{
- if(_spline.empty())
- {
- return;
- }
- _spline.solve();
- float num_parts= 0.0f;
- size_t num_verts= GetNumVertices();
- switch(GetDestDrawMode())
- {
- case DrawMode_Quads:
- break;
- case DrawMode_QuadStrip:
- break;
- case DrawMode_Fan:
- break;
- case DrawMode_Strip:
- break;
- case DrawMode_Triangles:
- break;
- case DrawMode_LineStrip:
- {
- float conversion= static_cast(_spline.size()-1) / static_cast(num_verts-1);
- for(size_t i= 0; i < num_verts; ++i)
- {
- float t= i * conversion;
- vector p;
- _spline.evaluate(t, p);
- SetVertexPos(i, p[0], p[1], p[2]);
- }
- }
- break;
- case DrawMode_SymmetricQuadStrip:
- break;
- }
-}
-
void ActorMultiVertex::DrawPrimitives()
{
Actor::SetGlobalRenderStates(); // set Actor-specified render states
@@ -380,6 +317,61 @@ bool ActorMultiVertex::EarlyAbortDraw() const
return false;
}
+void ActorMultiVertex::SetVertsFromSplinesInternal(size_t num_splines, size_t offset)
+{
+ vector& verts= AMV_DestTweenState().vertices;
+ size_t first= AMV_DestTweenState().FirstToDraw + offset;
+ size_t num_verts= AMV_DestTweenState().GetSafeNumToDraw(AMV_DestTweenState()._DrawMode, AMV_DestTweenState().NumToDraw);
+ float tper[num_splines]= {0.0f};
+ float num_parts= static_cast(num_verts - offset) /
+ static_cast(num_splines);
+ for(size_t i= 0; i < num_splines; ++i)
+ {
+ tper[i]= _splines[i].get_max_t() / num_parts;
+ }
+ for(size_t v= 0; v < num_verts; ++v)
+ {
+ vector pos;
+ const int spi= v%num_splines;
+ _splines[spi].evaluate(static_cast(v) * tper[spi], pos);
+ verts[v+first].p.x= pos[0];
+ verts[v+first].p.y= pos[1];
+ verts[v+first].p.z= pos[2];
+ }
+}
+
+void ActorMultiVertex::SetVertsFromSplines()
+{
+ if(AMV_DestTweenState().vertices.empty()) { return; }
+ switch(AMV_DestTweenState()._DrawMode)
+ {
+ case DrawMode_Quads:
+ SetVertsFromSplinesInternal(4, 0);
+ break;
+ case DrawMode_QuadStrip:
+ case DrawMode_Strip:
+ SetVertsFromSplinesInternal(2, 0);
+ break;
+ case DrawMode_Fan:
+ // Skip the first vert because it is the center of the fan. -Kyz
+ SetVertsFromSplinesInternal(1, 1);
+ break;
+ case DrawMode_Triangles:
+ case DrawMode_SymmetricQuadStrip:
+ SetVertsFromSplinesInternal(3, 0);
+ break;
+ case DrawMode_LineStrip:
+ SetVertsFromSplinesInternal(1, 0);
+ break;
+ }
+}
+
+CubicSplineN* ActorMultiVertex::GetSpline(size_t i)
+{
+ ASSERT(i < num_vert_splines);
+ return &(_splines[i]);
+}
+
void ActorMultiVertex::SetCurrentTweenStart()
{
AMV_start= AMV_current;
@@ -709,6 +701,23 @@ public:
COMMON_RETURN_SELF;
}
+ static int GetSpline(T* p, lua_State* L)
+ {
+ size_t i= static_cast(IArg(1)-1);
+ if(i >= ActorMultiVertex::num_vert_splines)
+ {
+ luaL_error(L, "Spline index must be greater than 0 and less than or equal to %zu.", ActorMultiVertex::num_vert_splines);
+ }
+ p->GetSpline(i)->PushSelf(L);
+ return 1;
+ }
+
+ static int SetVertsFromSplines(T* p, lua_State* L)
+ {
+ p->SetVertsFromSplines();
+ COMMON_RETURN_SELF;
+ }
+
static int SetTexture( T* p, lua_State *L )
{
RageTexture *Texture = Luna::check(L, 1);
@@ -729,42 +738,6 @@ public:
}
return 1;
}
- DEFINE_METHOD(GetUseSpline, GetUseSpline());
- static int SplineSize(T* p, lua_State* L)
- {
- lua_pushnumber(L, p->SplineSize());
- return 1;
- }
- static int SetUseSpline(T* p, lua_State* L)
- {
- p->SetUseSpline(lua_toboolean(L, 1));
- COMMON_RETURN_SELF;
- }
- static int SplineSetPoint(T* p, lua_State* L)
- {
- size_t i= IArg(1)-1;
- if(i >= p->SplineSize())
- {
- luaL_error(L, "Spline point index greater than the number of points.");
- }
- p->SplineSetPoint(i, FArg(2), FArg(3), FArg(4));
- COMMON_RETURN_SELF;
- }
- static int SplineResize(T* p, lua_State* L)
- {
- int s= IArg(1);
- if(s < 0)
- {
- luaL_error(L, "Negative spline size not allowed.");
- }
- p->SplineResize(static_cast(s));
- COMMON_RETURN_SELF;
- }
- static int SplineSolve(T* p, lua_State* L)
- {
- p->SplineSolve();
- COMMON_RETURN_SELF;
- }
LunaActorMultiVertex()
{
@@ -786,12 +759,8 @@ public:
ADD_METHOD( GetCurrFirstToDraw );
ADD_METHOD( GetCurrNumToDraw );
- ADD_METHOD(GetUseSpline);
- ADD_METHOD(SetUseSpline);
- ADD_METHOD(SplineSize);
- ADD_METHOD(SplineResize);
- ADD_METHOD(SplineSetPoint);
- ADD_METHOD(SplineSolve);
+ ADD_METHOD( GetSpline );
+ ADD_METHOD( SetVertsFromSplines );
// Copy from RageTexture
ADD_METHOD( SetTexture );
diff --git a/src/ActorMultiVertex.h b/src/ActorMultiVertex.h
index 3742bee269..5b598cb310 100644
--- a/src/ActorMultiVertex.h
+++ b/src/ActorMultiVertex.h
@@ -28,6 +28,7 @@ class RageTexture;
class ActorMultiVertex: public Actor
{
public:
+ static const size_t num_vert_splines= 4;
ActorMultiVertex();
ActorMultiVertex( const ActorMultiVertex &cpy );
virtual ~ActorMultiVertex();
@@ -37,7 +38,9 @@ public:
struct AMV_TweenState
{
- AMV_TweenState(): _DrawMode(DrawMode_Invalid), FirstToDraw(0), NumToDraw(-1), line_width(1.0f) {}
+ AMV_TweenState(): _DrawMode(DrawMode_Invalid), FirstToDraw(0),
+ NumToDraw(-1), line_width(1.0f)
+ {}
static void MakeWeightedAverage(AMV_TweenState& average_out, const AMV_TweenState& ts1, const AMV_TweenState& ts2, float percent_between);
bool operator==(const AMV_TweenState& other) const;
bool operator!=(const AMV_TweenState& other) const { return !operator==(other); }
@@ -104,21 +107,15 @@ public:
void SetVertexColor( int index , RageColor c );
void SetVertexCoords( int index , float TexCoordX , float TexCoordY );
- bool GetUseSpline();
- void SetUseSpline(bool use);
- void SplineSetPoint(size_t i, float x , float y , float z);
- void SplineResize(size_t s);
- size_t SplineSize();
- void SplineSolve();
+ inline void SetVertsFromSplinesInternal(size_t num_splines, size_t start_vert);
+ void SetVertsFromSplines();
+ CubicSplineN* GetSpline(size_t i);
virtual void PushSelf( lua_State *L );
private:
RageTexture* _Texture;
- CubicSplineN _spline;
- bool _using_spline;
-
vector _Vertices;
vector AMV_Tweens;
AMV_TweenState AMV_current;
@@ -129,6 +126,10 @@ private:
EffectMode _EffectMode;
TextureMode _TextureMode;
+
+ // Four splines for controlling vert positions, because quads drawmode
+ // requires four. -Kyz
+ vector _splines;
};
/**
diff --git a/src/CubicSpline.cpp b/src/CubicSpline.cpp
index 5a20f34e4d..142f305aa0 100644
--- a/src/CubicSpline.cpp
+++ b/src/CubicSpline.cpp
@@ -35,7 +35,7 @@ private:
list looped_diagonals;
};
-size_t const solution_cache_limit= 16;
+const size_t solution_cache_limit= 16;
bool SplineSolutionCache::find_in_cache(list& cache, vector& outd, vector& outm)
{
@@ -111,7 +111,7 @@ void SplineSolutionCache::solve_diagonals_straight(vector& diagonals, vec
for(size_t i= 1; i < last-1; ++i)
{
// Operation: Add row[i] / -[ri][ci] to row[i+1] to zero [ri+1][ci].
- float const diag_recip= 1.0f / diagonals[i];
+ const float diag_recip= 1.0f / diagonals[i];
diagonals[i+1]-= diag_recip;
multiples.push_back(diag_recip);
}
@@ -173,7 +173,7 @@ void SplineSolutionCache::solve_diagonals_looped(vector& diagonals, vecto
for(size_t i= 0; i < last-2; ++i)
{
// Operation: Add row[i] / -[ri][ci] to row[i+1] to zero [ri+1][ci].
- float const diag_recip= 1.0f / diagonals[i];
+ const float diag_recip= 1.0f / diagonals[i];
diagonals[i+1]-= diag_recip;
right_column[i+1]-= right_column[i] * diag_recip;
multiples.push_back(diag_recip);
@@ -181,7 +181,7 @@ void SplineSolutionCache::solve_diagonals_looped(vector& diagonals, vecto
// Last step of stage one needs special handling for right_column.
// Operation: Add row[l-2] / [rl-2][cl-2] to row[l-1] to zero [rl-1][cl-2].
{
- float const diag_recip= 1.0f / diagonals[last-2];
+ const float diag_recip= 1.0f / diagonals[last-2];
diagonals[last-1]-= right_column[last-2] * diag_recip;
multiples.push_back(diag_recip);
}
@@ -189,19 +189,19 @@ void SplineSolutionCache::solve_diagonals_looped(vector& diagonals, vecto
for(size_t i= last-2; i > 0; --i)
{
// Operation: Add row[i] / -[ri][ci] to row[i-1] to zero [ri-1][ci].
- float const diag_recip= 1.0f / diagonals[i];
+ const float diag_recip= 1.0f / diagonals[i];
right_column[i-1]-= right_column[i] * diag_recip;
multiples.push_back(diag_recip);
}
// Last step of stage two.
{
// Operation: Add row[0] / [r0][c0] to row[l-1] to zero [rl-1][c0].
- float const diag_recip= 1.0f / diagonals[0];
+ const float diag_recip= 1.0f / diagonals[0];
right_column[0]-= right_column[1] * diag_recip;
multiples.push_back(diag_recip);
}
// Stage three.
- size_t const end= last-1;
+ const size_t end= last-1;
for(size_t i= 0; i < end; ++i)
{
// Operation: Add row[e] * (right_column[i] / [re][ce]) to row[i] to
@@ -223,13 +223,13 @@ SplineSolutionCache solution_cache;
float loop_space_difference(float a, float b, float spatial_extent);
float loop_space_difference(float a, float b, float spatial_extent)
{
- float const norm_diff= a - b;
+ const float norm_diff= a - b;
if(spatial_extent == 0.0f) { return norm_diff; }
- float const plus_diff= a - (b + spatial_extent);
- float const minus_diff= a - (b - spatial_extent);
- float const abs_norm_diff= abs(norm_diff);
- float const abs_plus_diff= abs(plus_diff);
- float const abs_minus_diff= abs(minus_diff);
+ const float plus_diff= a - (b + spatial_extent);
+ const float minus_diff= a - (b - spatial_extent);
+ const float abs_norm_diff= abs(norm_diff);
+ const float abs_plus_diff= abs(plus_diff);
+ const float abs_minus_diff= abs(minus_diff);
if(abs_norm_diff < abs_plus_diff)
{
if(abs_norm_diff < abs_minus_diff)
@@ -287,7 +287,7 @@ void CubicSpline::solve_looped()
results[last-1]-= results[0] * multiples[next_mult];
++next_mult;
// Stage three.
- size_t const end= last-1;
+ const size_t end= last-1;
for(size_t i= 0; i < end; ++i)
{
// Operation: Add row[e] * -multiples[nm] to row[i].
@@ -532,7 +532,7 @@ bool CubicSpline::empty() const
}
void CubicSplineN::weighted_average(CubicSplineN& out,
- CubicSplineN const& from, CubicSplineN const& to, float between)
+ const CubicSplineN& from, CubicSplineN const& to, float between)
{
ASSERT_M(out.dimension() == from.dimension() &&
to.dimension() == from.dimension(),
@@ -552,8 +552,8 @@ void CubicSplineN::weighted_average(CubicSplineN& out,
// Behavior for splines of different sizes: Use a size between the two.
// Points that exist in both will be averaged.
// Points that only exist in one will come only from that one.
- size_t const from_size= from.size();
- size_t const to_size= to.size();
+ const size_t from_size= from.size();
+ const size_t to_size= to.size();
size_t out_size= to_size;
size_t limit= to_size;
if(from_size < to_size)
@@ -666,7 +666,7 @@ CSN_EVAL_SOMETHING(evaluate_third_derivative);
#undef CSN_EVAL_SOMETHING
-void CubicSplineN::set_point(size_t i, vector const& v)
+void CubicSplineN::set_point(size_t i, const vector& v)
{
ASSERT_M(v.size() == m_splines.size(), "CubicSplineN::set_point requires the passed point to be the same dimension as the spline.");
for(size_t n= 0; n < m_splines.size(); ++n)
@@ -676,8 +676,8 @@ void CubicSplineN::set_point(size_t i, vector const& v)
m_dirty= true;
}
-void CubicSplineN::set_coefficients(size_t i, vector const& b,
- vector const& c, vector const& d)
+void CubicSplineN::set_coefficients(size_t i, const vector& b,
+ const vector& c, const vector& d)
{
ASSERT_M(b.size() == c.size() && c.size() == d.size() &&
d.size() == m_splines.size(), "CubicSplineN: coefficient vectors must be "
@@ -904,7 +904,7 @@ struct LunaCubicSplineN : Luna
}
static int get_max_t(T* p, lua_State* L)
{
- lua_pushnumber(L, p->size() - 1 + p->get_loop());
+ lua_pushnumber(L, p->get_max_t());
return 1;
}
static int set_size(T* p, lua_State* L)
diff --git a/src/CubicSpline.h b/src/CubicSpline.h
index f19c2d8855..aae6e702e9 100644
--- a/src/CubicSpline.h
+++ b/src/CubicSpline.h
@@ -42,16 +42,16 @@ struct CubicSplineN
CubicSplineN()
:m_owned_by_actor(false), m_loop(false), m_polygonal(false), m_dirty(true)
{}
- static void weighted_average(CubicSplineN& out, CubicSplineN const& from,
- CubicSplineN const& to, float between);
+ static void weighted_average(CubicSplineN& out, const CubicSplineN& from,
+ const CubicSplineN& to, float between);
void solve();
void evaluate(float t, vector& v) const;
void evaluate_derivative(float t, vector& v) const;
void evaluate_second_derivative(float t, vector& v) const;
void evaluate_third_derivative(float t, vector& v) const;
- void set_point(size_t i, vector const& v);
- void set_coefficients(size_t i, vector const& b,
- vector const& c, vector const& d);
+ void set_point(size_t i, const vector& v);
+ void set_coefficients(size_t i, const vector& b,
+ const vector& c, const vector& d);
void get_coefficients(size_t i, vector& b,
vector& c, vector& d);
void set_spatial_extent(size_t i, float extent);
@@ -61,6 +61,10 @@ struct CubicSplineN
void redimension(size_t d);
size_t dimension() const;
bool empty() const;
+ float get_max_t() const {
+ if(m_loop) { return static_cast(size()); }
+ else { return static_cast(size()-1); }
+ }
typedef vector spline_cont_t;
void set_loop(bool l);
bool get_loop() const;
diff --git a/src/NoteDisplay.cpp b/src/NoteDisplay.cpp
index ae4ef898e3..22718ad273 100644
--- a/src/NoteDisplay.cpp
+++ b/src/NoteDisplay.cpp
@@ -326,7 +326,7 @@ void NCSplineHandler::EvalForReceptor(float song_beat, vector& ret) const
}
void NCSplineHandler::MakeWeightedAverage(NCSplineHandler& out,
- NCSplineHandler const& from, NCSplineHandler const& to, float between)
+ const NCSplineHandler& from, const NCSplineHandler& to, float between)
{
#define BOOLS_FROM_CLOSEST(closest) \
out.m_spline_mode= closest.m_spline_mode; \
@@ -344,7 +344,7 @@ void NCSplineHandler::MakeWeightedAverage(NCSplineHandler& out,
between);
}
-void NoteColumnRenderArgs::spae_pos_for_beat(PlayerState const* state,
+void NoteColumnRenderArgs::spae_pos_for_beat(const PlayerState* state,
float beat, float y_offset, float y_reverse_offset,
vector& sp_pos, vector& ae_pos) const
{
@@ -367,7 +367,7 @@ void NoteColumnRenderArgs::spae_pos_for_beat(PlayerState const* state,
break;
}
}
-void NoteColumnRenderArgs::spae_zoom_for_beat(PlayerState const* state, float beat,
+void NoteColumnRenderArgs::spae_zoom_for_beat(const PlayerState* state, float beat,
vector& sp_zoom, vector& ae_zoom) const
{
switch(zoom_handler->m_spline_mode)
@@ -387,9 +387,9 @@ void NoteColumnRenderArgs::spae_zoom_for_beat(PlayerState const* state, float be
}
}
void NoteColumnRenderArgs::SetPRZForActor(Actor* actor,
- vector const& sp_pos, vector const& ae_pos,
- vector const& sp_rot, vector const& ae_rot,
- vector const& sp_zoom, vector const& ae_zoom) const
+ const vector& sp_pos, const vector& ae_pos,
+ const vector& sp_rot, const vector& ae_rot,
+ const vector& sp_zoom, const vector& ae_zoom) const
{
actor->SetX(sp_pos[0] + ae_pos[0]);
actor->SetY(sp_pos[1] + ae_pos[1]);
@@ -468,16 +468,16 @@ bool NoteDisplay::IsOnScreen( float fBeat, int iCol, int iDrawDistanceAfterTarge
return true;
}
-bool NoteDisplay::DrawHoldsInRange(NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args,
- vector const& tap_set)
+bool NoteDisplay::DrawHoldsInRange(const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args,
+ const vector& tap_set)
{
bool any_upcoming = false;
for(vector::const_iterator tapit=
tap_set.begin(); tapit != tap_set.end(); ++tapit)
{
- TapNote const& tn= (*tapit)->second;
- HoldNoteResult const& result= tn.HoldResult;
+ const TapNote& tn= (*tapit)->second;
+ const HoldNoteResult& result= tn.HoldResult;
int start_row= (*tapit)->first;
int end_row = start_row + tn.iDuration;
@@ -536,9 +536,9 @@ bool NoteDisplay::DrawHoldsInRange(NoteFieldRenderArgs const& field_args,
return any_upcoming;
}
-bool NoteDisplay::DrawTapsInRange(NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args,
- vector const& tap_set)
+bool NoteDisplay::DrawTapsInRange(const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args,
+ const vector& tap_set)
{
bool any_upcoming= false;
// draw notes from furthest to closest
@@ -546,7 +546,7 @@ bool NoteDisplay::DrawTapsInRange(NoteFieldRenderArgs const& field_args,
tap_set.begin(); tapit != tap_set.end(); ++tapit)
{
int tap_row= (*tapit)->first;
- TapNote const& tn= (*tapit)->second;
+ const TapNote& tn= (*tapit)->second;
// TRICKY: If boomerang is on, then all notes in the range
// [first_row,last_row] aren't necessarily visible.
@@ -736,8 +736,8 @@ struct StripBuffer
};
void NoteDisplay::DrawHoldPart(vector &vpSpr,
- NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args, int fYStep,
+ const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args, int fYStep,
float fPercentFadeToFail, float fColorScale, bool bGlow,
float fOverlappedTime, float fYTop, float fYBottom, float fYStartPos,
float fYEndPos, bool bWrapping, bool bAnchorToTop,
@@ -793,8 +793,8 @@ void NoteDisplay::DrawHoldPart(vector &vpSpr,
const float fTexCoordCenter = (fTexCoordLeft+fTexCoordRight)/2;
// pos_z_vec will be used later to orient the hold. Read below. -Kyz
- static RageVector3 const pos_z_vec(0.0f, 0.0f, 1.0f);
- static RageVector3 const pos_y_vec(0.0f, 1.0f, 0.0f);
+ static const RageVector3 pos_z_vec(0.0f, 0.0f, 1.0f);
+ static const RageVector3 pos_y_vec(0.0f, 1.0f, 0.0f);
StripBuffer queue;
for( float fY = fYStartPos; !bLast; fY += fYStep )
@@ -946,9 +946,9 @@ void NoteDisplay::DrawHoldPart(vector &vpSpr,
render_left.y*= half_width;
render_left.z*= half_width;
- RageVector3 const left_vert(center_vert.x + render_left.x,
+ const RageVector3 left_vert(center_vert.x + render_left.x,
center_vert.y + render_left.y, center_vert.z + render_left.z);
- RageVector3 const right_vert(center_vert.x - render_left.x,
+ const RageVector3 right_vert(center_vert.x - render_left.x,
center_vert.y - render_left.y, center_vert.z - render_left.z);
const float fDistFromTop = fY - fYTop;
@@ -990,8 +990,8 @@ void NoteDisplay::DrawHoldPart(vector &vpSpr,
}
void NoteDisplay::DrawHoldBody(const TapNote& tn,
- NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args, float fBeat,
+ const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args, float fBeat,
bool bIsBeingHeld, float fYHead, float fYTail, bool bIsAddition,
float fPercentFadeToFail, float fColorScale, bool bGlow,
float top_beat, float bottom_beat)
@@ -1087,8 +1087,8 @@ void NoteDisplay::DrawHoldBody(const TapNote& tn,
}
void NoteDisplay::DrawHold(const TapNote& tn,
- NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args, int iRow, bool bIsBeingHeld,
+ const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args, int iRow, bool bIsBeingHeld,
const HoldNoteResult &Result, bool bIsAddition, float fPercentFadeToFail)
{
int iEndRow = iRow + tn.iDuration;
@@ -1173,7 +1173,7 @@ void NoteDisplay::DrawHold(const TapNote& tn,
}
void NoteDisplay::DrawActor(const TapNote& tn, Actor* pActor, NotePart part,
- NoteFieldRenderArgs const& field_args, NoteColumnRenderArgs const& column_args, float fYOffset, float fBeat,
+ const NoteFieldRenderArgs& field_args, const NoteColumnRenderArgs& column_args, float fYOffset, float fBeat,
bool bIsAddition, float fPercentFadeToFail, float fColorScale,
bool is_being_held)
{
@@ -1266,8 +1266,8 @@ void NoteDisplay::DrawActor(const TapNote& tn, Actor* pActor, NotePart part,
}
void NoteDisplay::DrawTap(const TapNote& tn,
- NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args, float fBeat,
+ const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args, float fBeat,
bool bOnSameRowAsHoldStart, bool bOnSameRowAsRollStart,
bool bIsAddition, float fPercentFadeToFail)
{
@@ -1351,7 +1351,7 @@ void NoteDisplay::DrawTap(const TapNote& tn,
void NoteColumnRenderer::UpdateReceptorGhostStuff(Actor* receptor) const
{
- PlayerState const* player_state= m_field_render_args->player_state;
+ const PlayerState* player_state= m_field_render_args->player_state;
float song_beat= player_state->GetDisplayedPosition().m_fSongBeatVisible;
// sp_* will be filled with the settings from the splines.
// ae_* will be filled with the settings from ArrowEffects.
@@ -1436,7 +1436,7 @@ void NoteColumnRenderer::DrawPrimitives()
m_field_render_args->first_row, m_field_render_args->last_row+1, begin, end);
for(; begin != end; ++begin)
{
- TapNote const& tn= begin->second;
+ const TapNote& tn= begin->second;
switch(tn.type)
{
case TapNoteType_Empty:
@@ -1525,8 +1525,15 @@ void NoteColumnRenderer::FinishTweening()
Actor::FinishTweening();
}
+NoteColumnRenderer::NCR_TweenState::NCR_TweenState()
+{
+ m_rot_handler.m_spline.set_spatial_extent(0, PI*2.0f);
+ m_rot_handler.m_spline.set_spatial_extent(1, PI*2.0f);
+ m_rot_handler.m_spline.set_spatial_extent(2, PI*2.0f);
+}
+
void NoteColumnRenderer::NCR_TweenState::MakeWeightedAverage(
- NCR_TweenState& out, NCR_TweenState const& from, NCR_TweenState const& to,
+ NCR_TweenState& out, const NCR_TweenState& from, const NCR_TweenState& to,
float between)
{
#define WEIGHT_FOR_ME(me) \
diff --git a/src/NoteDisplay.h b/src/NoteDisplay.h
index b9d5ff5827..df34bb82db 100644
--- a/src/NoteDisplay.h
+++ b/src/NoteDisplay.h
@@ -100,11 +100,11 @@ enum NoteColumnSplineMode
// NoteDisplay during rendering.
struct NoteFieldRenderArgs
{
- PlayerState const* player_state; // to look up PlayerOptions
+ const PlayerState* player_state; // to look up PlayerOptions
float reverse_offset_pixels;
ReceptorArrowRow* receptor_row;
GhostArrowRow* ghost_row;
- NoteData const* note_data;
+ const NoteData* note_data;
float first_beat;
float last_beat;
int first_row;
@@ -137,7 +137,7 @@ struct NCSplineHandler
void EvalDerivForBeat(float song_beat, float note_beat, vector& ret) const;
void EvalForReceptor(float song_beat, vector& ret) const;
static void MakeWeightedAverage(NCSplineHandler& out,
- NCSplineHandler const& from, NCSplineHandler const& to, float between);
+ const NCSplineHandler& from, const NCSplineHandler& to, float between);
CubicSplineN m_spline;
NoteColumnSplineMode m_spline_mode;
@@ -150,18 +150,18 @@ struct NCSplineHandler
struct NoteColumnRenderArgs
{
- void spae_pos_for_beat(PlayerState const* state,
+ void spae_pos_for_beat(const PlayerState* state,
float beat, float y_offset, float y_reverse_offset,
vector& sp_pos, vector& ae_pos) const;
- void spae_zoom_for_beat(PlayerState const* state, float beat,
+ void spae_zoom_for_beat(const PlayerState* state, float beat,
vector& sp_zoom, vector& ae_zoom) const;
void SetPRZForActor(Actor* actor,
- vector const& sp_pos, vector const& ae_pos,
- vector const& sp_rot, vector const& ae_rot,
- vector const& sp_zoom, vector const& ae_zoom) const;
- NCSplineHandler const* pos_handler;
- NCSplineHandler const* rot_handler;
- NCSplineHandler const* zoom_handler;
+ const vector& sp_pos, const vector& ae_pos,
+ const vector& sp_rot, const vector& ae_rot,
+ const vector& sp_zoom, const vector& ae_zoom) const;
+ const NCSplineHandler* pos_handler;
+ const NCSplineHandler* rot_handler;
+ const NCSplineHandler* zoom_handler;
float song_beat;
int column;
};
@@ -179,12 +179,12 @@ public:
bool IsOnScreen( float fBeat, int iCol, int iDrawDistanceAfterTargetsPixels, int iDrawDistanceBeforeTargetsPixels ) const;
- bool DrawHoldsInRange(NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args,
- vector const& tap_set);
- bool DrawTapsInRange(NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args,
- vector const& tap_set);
+ bool DrawHoldsInRange(const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args,
+ const vector& tap_set);
+ bool DrawTapsInRange(const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args,
+ const vector& tap_set);
/**
* @brief Draw the TapNote onto the NoteField.
* @param tn the TapNote in question.
@@ -198,12 +198,12 @@ public:
* @param fDrawDistanceAfterTargetsPixels how much to draw after the receptors.
* @param fDrawDistanceBeforeTargetsPixels how much ot draw before the receptors.
* @param fFadeInPercentOfDrawFar when to start fading in. */
- void DrawTap(const TapNote& tn, NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args, float fBeat,
+ void DrawTap(const TapNote& tn, const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args, float fBeat,
bool bOnSameRowAsHoldStart,
bool bOnSameRowAsRollBeat, bool bIsAddition, float fPercentFadeToFail);
- void DrawHold(const TapNote& tn, NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args, int iRow, bool bIsBeingHeld,
+ void DrawHold(const TapNote& tn, const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args, int iRow, bool bIsBeingHeld,
const HoldNoteResult &Result,
bool bIsAddition, float fPercentFadeToFail);
@@ -217,18 +217,18 @@ private:
Sprite *GetHoldSprite( NoteColorSprite ncs[NUM_HoldType][NUM_ActiveType], NotePart part, float fNoteBeat, bool bIsRoll, bool bIsBeingHeld );
void DrawActor(const TapNote& tn, Actor* pActor, NotePart part,
- NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args, float fYOffset, float fBeat,
+ const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args, float fYOffset, float fBeat,
bool bIsAddition, float fPercentFadeToFail, float fColorScale,
bool is_being_held);
- void DrawHoldBody(const TapNote& tn, NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args, float fBeat, bool bIsBeingHeld,
+ void DrawHoldBody(const TapNote& tn, const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args, float fBeat, bool bIsBeingHeld,
float fYHead, float fYTail,
bool bIsAddition, float fPercentFadeToFail, float fColorScale,
bool bGlow, float top_beat, float bottom_beat);
void DrawHoldPart(vector &vpSpr,
- NoteFieldRenderArgs const& field_args,
- NoteColumnRenderArgs const& column_args, int fYStep,
+ const NoteFieldRenderArgs& field_args,
+ const NoteColumnRenderArgs& column_args, int fYStep,
float fPercentFadeToFail, float fColorScale, bool bGlow,
float fOverlappedTime, float fYTop, float fYBottom, float fYStartPos,
float fYEndPos, bool bWrapping, bool bAnchorToTop,
@@ -275,13 +275,14 @@ struct NoteColumnRenderer : public Actor
struct NCR_TweenState
{
+ NCR_TweenState();
NCSplineHandler m_pos_handler;
NCSplineHandler m_rot_handler;
NCSplineHandler m_zoom_handler;
static void MakeWeightedAverage(NCR_TweenState& out,
- NCR_TweenState const& from, NCR_TweenState const& to, float between);
- bool operator==(NCR_TweenState const& other) const;
- bool operator!=(NCR_TweenState const& other) const { return !operator==(other); }
+ const NCR_TweenState& from, const NCR_TweenState& to, float between);
+ bool operator==(const NCR_TweenState& other) const;
+ bool operator!=(const NCR_TweenState& other) const { return !operator==(other); }
};
NCR_TweenState& NCR_DestTweenState()
@@ -291,7 +292,7 @@ struct NoteColumnRenderer : public Actor
else
{ return NCR_Tweens.back(); }
}
- NCR_TweenState const& NCR_DestTweenState() const { return const_cast(this)->NCR_DestTweenState(); }
+ const NCR_TweenState& NCR_DestTweenState() const { return const_cast(this)->NCR_DestTweenState(); }
virtual void SetCurrentTweenStart();
virtual void EraseHeadTween();
diff --git a/src/NoteField.cpp b/src/NoteField.cpp
index 97dd4e976b..59d60fe54b 100644
--- a/src/NoteField.cpp
+++ b/src/NoteField.cpp
@@ -1397,10 +1397,10 @@ public:
} \
return 0; \
}
- SET_CALLBACK_GENERIC(SetStepCallback, m_StepCallback);
- SET_CALLBACK_GENERIC(SetSetPressedCallback, m_SetPressedCallback);
- SET_CALLBACK_GENERIC(SetDidTapNoteCallback, m_DidTapNoteCallback);
- SET_CALLBACK_GENERIC(SetDidHoldNoteCallback, m_DidHoldNoteCallback);
+ SET_CALLBACK_GENERIC(set_step_callback, m_StepCallback);
+ SET_CALLBACK_GENERIC(set_set_pressed_callback, m_SetPressedCallback);
+ SET_CALLBACK_GENERIC(set_did_tap_note_callback, m_DidTapNoteCallback);
+ SET_CALLBACK_GENERIC(set_did_hold_note_callback, m_DidHoldNoteCallback);
#undef SET_CALLBACK_GENERIC
static int check_column(lua_State* L, int index)
@@ -1416,7 +1416,7 @@ public:
return col;
}
- static int Step(T* p, lua_State* L)
+ static int step(T* p, lua_State* L)
{
int col= check_column(L, 1);
TapNoteScore tns= Enum::Check(L, 2);
@@ -1424,14 +1424,14 @@ public:
return 0;
}
- static int SetPressed(T* p, lua_State* L)
+ static int set_pressed(T* p, lua_State* L)
{
int col= check_column(L, 1);
p->SetPressed(col, true);
return 0;
}
- static int DidTapNote(T* p, lua_State* L)
+ static int did_tap_note(T* p, lua_State* L)
{
int col= check_column(L, 1);
TapNoteScore tns= Enum::Check(L, 2);
@@ -1440,7 +1440,7 @@ public:
return 0;
}
- static int DidHoldNote(T* p, lua_State* L)
+ static int did_hold_note(T* p, lua_State* L)
{
int col= check_column(L, 1);
HoldNoteScore hns= Enum::Check(L, 2);
@@ -1462,14 +1462,14 @@ public:
LunaNoteField()
{
- ADD_METHOD(SetStepCallback);
- ADD_METHOD(SetSetPressedCallback);
- ADD_METHOD(SetDidTapNoteCallback);
- ADD_METHOD(SetDidHoldNoteCallback);
- ADD_METHOD(Step);
- ADD_METHOD(SetPressed);
- ADD_METHOD(DidTapNote);
- ADD_METHOD(DidHoldNote);
+ ADD_METHOD(set_step_callback);
+ ADD_METHOD(set_set_pressed_callback);
+ ADD_METHOD(set_did_tap_note_callback);
+ ADD_METHOD(set_did_hold_note_callback);
+ ADD_METHOD(step);
+ ADD_METHOD(set_pressed);
+ ADD_METHOD(did_tap_note);
+ ADD_METHOD(did_hold_note);
ADD_METHOD(get_column_actors);
}
};