Add nITG's various path shape & other modifiers - V2 (#1435)

* Implemented nITG's Square modifiers

Modifiers added:
Square
SquareOffset
SquarePeriod
SquareZ
SquareZOffset
SquareZPeriod

* Implemented nITG's BumpyX Modifiers

Also fixes up some tiny bits pertaining to the square modifiers.
Modifiers Added:
BumpyX
BumpyXPeriod
BumpyXOffset

* Implemented nITG's TornadoZ Modifiers

Modifiers Added:
TornadoZ
TornadoZPeriod
TornadoZOffset

Another commit is needed to update fallback's metrics

* Update fallback's metrics to accommodate TornadoX

* Implemented nITG's Parabola Modifiers

Modifiers Added:
ParabolaX
ParabolaY
ParabolaZ

* Implemented nITG's Sawtooth Modifiers

Modifiers Added:
Sawtooth
SawtoothPeriod
SawtoothZ
SawtoothZPeriod

* Implemented nITG's Zigzag Modifiers

Modifiers Added:
Zigzag
ZigzagPeriod
ZigzagOffset
ZigzagZ
ZigzagZPeriod
ZigzagZOffset

* Implemented nITG's ModTimer modifiers

Modifiers Added:
ModTimer (Lua method name is ModTimerSetting (takes enums. Ex: 'ModTimerType_Song'). Can be activated with mod strings 'modtimer(song/beat/game/default)' )
ModTimerOffset
ModTimerMult

* Remove Log use from ArrowEffects::GetTime()

* Accidentally removed a CPY(m_BatteryLives)

* Implemented nITG's DrunkZ modifiers

Modifiers added:
drunkz
drunkzspeed
drunkzoffset
drunkzperiod

Another commit is needed to update fallback's metrics

* Update fallback's metrics to accommodate DrunkZ

* Implemented nITG's BeatY & BeatZ Modifers

Modifiers Added:
beaty
beatyoffset
beatyperiod
beatymult	
beatz
beatzoffset
beatzperiod
beatzmult

Another commit is needed to update fallback's metrics

* Updated fallback's metrics to accommodate ...

the new Beat modifiers.

* Implemented nITG's Digital Modifiers

Modifers Added:
digital
digitalsteps
digitalperiod
digitaloffset
digitalz
digitalzsteps
digitalzperiod
digitalzoffset

* Removed duplicate zbuffer check.

* Updated Luadocs with the new modifiers

* Removed accidental duplicate Mini from Luadocs

* Split up long modifier lines.

Hopefully, this makes it a bit easier to read.

* Remove accidental commit to root of repo.

* Split up long modifier lines

Hopefully, this makes it easier to read.

* Redid Square functions to not use FastSin

This implementation is based off of 5.2's square_wave function from ModValue.

* Redid zigzag functions to not use FastSin

This implementation is based off of 5.2's triangle_wave function from ModValue.

* Moved square & zigzag calculation to RageMath.

New RageMath functions:
RageSquare
RageTriangle

* Made Square & Digital have the same period...

as Zigzag and Sawtooth.

* Deduplicate tornado calculations.

* Fixed typo in UpdateTornado, and moved UpdateTornado logic to ArrowEffects::Init because it doesn't depend on anything that changes every frame.  Tornado metrics are also loaded in ArrowEffects::Init.

* Deduplicated Beat mod update logic.

The logic is now placed into a function called UpdateBeat.
The m_fBeatFactor members are now a 1D array, similar to m_MaxTornado and m_MinTornado.
This commit is contained in:
MrThatKid
2017-05-13 11:34:34 -07:00
committed by Colby Klein
parent 31e99dc457
commit e15e0e68be
10 changed files with 801 additions and 97 deletions
+5 -2
View File
@@ -2,6 +2,7 @@
#define ARROWEFFECTS_H
#include "RageTypes.h"
#include "PlayerNumber.h"
class PlayerState;
class PlayerOptions;
@@ -9,6 +10,8 @@ class PlayerOptions;
class ArrowEffects
{
public:
static void Init(PlayerNumber pn);
static float GetTime();
static void Update();
// SetCurrentOptions and the hidden static variable it set exists so that
// ArrowEffects doesn't have to reach through the PlayerState to check
@@ -31,7 +34,7 @@ public:
{
ret.x= GetMoveX(col) + GetXPos(player_state, col, y_offset);
ret.y= GetMoveY(col) + GetYPos(col, y_offset, y_reverse_offset, with_reverse);
ret.z= GetMoveZ(col) + GetZPos(col, y_offset);
ret.z= GetMoveZ(col) + GetZPos(player_state, col, y_offset);
}
/**
@@ -80,7 +83,7 @@ public:
* @param iCol the specific arrow column.
* @param fYPos the Y position of the arrow.
* @return the Z position. */
static float GetZPos(int iCol, float fYPos);
static float GetZPos( const PlayerState* pPlayerState, int iCol, float fYPos);
// Enable this if any ZPos effects are enabled.
static bool NeedZBuffer();