Added nITG's various column specific & other misc modifiers (#1468)
* Added stealth control, ZBuffer & DizzyHolds mod Modifiers added: StealthPastReceptors DizzyHolds StealthType ZBuffer * Removed theme metrics that are now mods. Removed metrics: DrawHiddenNotesAfterReceptor DizzyHoldHeads * Implemented nITG's Shrink modifiers Modifiers Added: ShrinkLinear ShrinkMult * Implemented nITG's Attenuate mods. Modifiers added: AttenuateX AttenuateY AttenuateZ * Implemented nITG's pulse modifiers Modifiers added: PulseInner PulseOuter PulsePeriod PulseOffset * Implemented nITG's DrawSize and Bounce modifiers. Modifiers Added: Bounce BouncePeriod BounceOffset BounceZ BounceZPeriod BounceZOffset DrawSize DrawSizeBack * Added nITG's column specific Dark & Stealth mods Modifiers added: Stealth<1-n> Dark<1-n> * Finish adding nITG's column specific mods Modifiers added: ConfusionXOffset<1-n> ConfusionYOffset<1-n> ConfusionzOffset<1-n> Reverse<1-n> Tiny<1-n> Bumpy<1-n> * Documented new modififers * Changelog housekeeping Fixed a typo and added this branch's PR into the changelog. * Last bit of clean up. (#3) * Fixed up one line of the changelog * Add MrThatKid to credits.
This commit is contained in:
@@ -7,6 +7,7 @@ ________________________________________________________________________________
|
||||
----------
|
||||
* [General] Backport custom song support. [kyzentun]
|
||||
* [ScreenDebugOverlay] Entry in the debug menu that reloads preferences. [kyzentun]
|
||||
* [Modifiers] Added nITG's various column specific & other misc modifiers [mrthatkid]
|
||||
|
||||
2017/05/27
|
||||
----------
|
||||
@@ -23,7 +24,7 @@ ________________________________________________________________________________
|
||||
2017/05/24
|
||||
----------
|
||||
* [EzSockets] EzSockets: Don't leak WinAPI everywhere this gets included. Fixes #1455 [shakesoda]
|
||||
* [RageDisplay] Removed explicitly giving up CPU time for other threds under Windows (STOP ARGUING ABOUT THIS) [shakesoda]
|
||||
* [RageDisplay] Removed explicitly giving up CPU time for other threads under Windows (STOP ARGUING ABOUT THIS) [shakesoda]
|
||||
* [GraphicsWindow] Call DwmFlush on VSync (might help with stuttering). [shakesoda]
|
||||
|
||||
2017/05/23
|
||||
@@ -73,7 +74,7 @@ ________________________________________________________________________________
|
||||
|
||||
2016/11/29
|
||||
----------
|
||||
* [Actor] Backport commit cd5df01 from master branch [mrthatkid]
|
||||
* [Actor] Backport 'Don't use static temp state for actor effects' from master branch [mrthatkid]
|
||||
|
||||
2016/11/24
|
||||
----------
|
||||
|
||||
@@ -1111,6 +1111,9 @@
|
||||
<Class name='PlayerOptions'>
|
||||
<Function name='Alternate'/>
|
||||
<Function name='AttackMines'/>
|
||||
<Function name='AttenuateX'/>
|
||||
<Function name='AttenuateY'/>
|
||||
<Function name='AttenuateZ'/>
|
||||
<Function name='Backwards'/>
|
||||
<Function name='BatteryLives'/>
|
||||
<Function name='Beat'/>
|
||||
@@ -1130,9 +1133,16 @@
|
||||
<Function name='Blink'/>
|
||||
<Function name='Boomerang'/>
|
||||
<Function name='Boost'/>
|
||||
<Function name='Bounce'/>
|
||||
<Function name='BouncePeriod'/>
|
||||
<Function name='BounceOffset'/>
|
||||
<Function name='BounceZ'/>
|
||||
<Function name='BounceZPeriod'/>
|
||||
<Function name='BounceZOffset'/>
|
||||
<Function name='BMRize'/>
|
||||
<Function name='Brake'/>
|
||||
<Function name='Bumpy'/>
|
||||
<Function name='Bumpyn'/>
|
||||
<Function name='BumpyOffset'/>
|
||||
<Function name='BumpyPeriod'/>
|
||||
<Function name='BumpyX'/>
|
||||
@@ -1142,13 +1152,17 @@
|
||||
<Function name='CMod'/>
|
||||
<Function name='Confusion'/>
|
||||
<Function name='ConfusionOffset'/>
|
||||
<Function name='ConfusionOffsetn'/>
|
||||
<Function name='ConfusionX'/>
|
||||
<Function name='ConfusionXOffset'/>
|
||||
<Function name='ConfusionXOffsetn'/>
|
||||
<Function name='ConfusionY'/>
|
||||
<Function name='ConfusionYOffset'/>
|
||||
<Function name='ConfusionYOffsetn'/>
|
||||
<Function name='Cover'/>
|
||||
<Function name='Cross'/>
|
||||
<Function name='Dark'/>
|
||||
<Function name='Darkn'/>
|
||||
<Function name='Digital'/>
|
||||
<Function name='DigitalOffset'/>
|
||||
<Function name='DigitalPeriod'/>
|
||||
@@ -1158,8 +1172,11 @@
|
||||
<Function name='DigitalZPeriod'/>
|
||||
<Function name='DigitalZSteps'/>
|
||||
<Function name='Dizzy'/>
|
||||
<Function name='DizzyHolds'/>
|
||||
<Function name='Distant'/>
|
||||
<Function name='DrainSetting'/>
|
||||
<Function name='DrawSize'/>
|
||||
<Function name='DrawSizeBack'/>
|
||||
<Function name='Drunk'/>
|
||||
<Function name='DrunkOffset'/>
|
||||
<Function name='DrunkPeriod'/>
|
||||
@@ -1218,11 +1235,16 @@
|
||||
<Function name='Passmark'/>
|
||||
<Function name='Planted'/>
|
||||
<Function name='PlayerAutoPlay'/>
|
||||
<Function name='PulseInner'/>
|
||||
<Function name='PulseOffset'/>
|
||||
<Function name='PulseOuter'/>
|
||||
<Function name='PulsePeriod'/>
|
||||
<Function name='Quick'/>
|
||||
<Function name='RandAttack'/>
|
||||
<Function name='RandomSpeed'/>
|
||||
<Function name='RandomVanish'/>
|
||||
<Function name='Reverse'/>
|
||||
<Function name='Reversen'/>
|
||||
<Function name='Right'/>
|
||||
<Function name='Roll'/>
|
||||
<Function name='Sawtooth'/>
|
||||
@@ -1231,6 +1253,8 @@
|
||||
<Function name='SawtoothZPeriod'/>
|
||||
<Function name='ScrollBPM'/>
|
||||
<Function name='ScrollSpeed'/>
|
||||
<Function name='ShrinkLinear'/>
|
||||
<Function name='ShrinkMult'/>
|
||||
<Function name='Shuffle'/>
|
||||
<Function name='Skew'/>
|
||||
<Function name='Skippy'/>
|
||||
@@ -1244,6 +1268,9 @@
|
||||
<Function name='SquareZOffset'/>
|
||||
<Function name='SquareZPeriod'/>
|
||||
<Function name='Stealth'/>
|
||||
<Function name='Stealthn'/>
|
||||
<Function name='StealthPastReceptors'/>
|
||||
<Function name='StealthType'/>
|
||||
<Function name='Stomp'/>
|
||||
<Function name='Sudden'/>
|
||||
<Function name='SuddenOffset'/>
|
||||
@@ -1251,6 +1278,7 @@
|
||||
<Function name='TimeSpacing'/>
|
||||
<Function name='Tilt'/>
|
||||
<Function name='Tiny'/>
|
||||
<Function name='Tinyn'/>
|
||||
<Function name='Tipsy'/>
|
||||
<Function name='TipsyOffset'/>
|
||||
<Function name='TipsySpeed'/>
|
||||
@@ -1269,6 +1297,7 @@
|
||||
<Function name='Wide'/>
|
||||
<Function name='XMod'/>
|
||||
<Function name='Xmode'/>
|
||||
<Function name='ZBuffer'/>
|
||||
<Function name='Zigzag'/>
|
||||
<Function name='ZigzagOffset'/>
|
||||
<Function name='ZigzagPeriod'/>
|
||||
|
||||
@@ -736,7 +736,7 @@ save yourself some time, copy this for undocumented things:
|
||||
</Function>
|
||||
<Function name='GetRotationZ' return='float' arguments='PlayerState ps, float fNoteBeat, bool bIsHoldHead'>
|
||||
Returns the Z rotation of a note at beat <code>fNoteBeat</code> for the provided PlayerState.<br/>
|
||||
<code>bIsHoldHead</code> is an optional argument which defaults to false. If true, this function will return <code>0</code> if the [ArrowEffects] metric <code>DizzyHoldHeads</code> is false.
|
||||
<code>bIsHoldHead</code> is an optional argument which defaults to false. If true, this function will return <code>0</code> if the [PlayerOptions] modifier <code>DizzyHolds</code> is off.
|
||||
</Function>
|
||||
<Function name='ReceptorGetRotationZ' return='float' arguments='PlayerState ps'>
|
||||
Returns the Z rotation of the receptors for the provided PlayerState.
|
||||
@@ -3429,6 +3429,9 @@ save yourself some time, copy this for undocumented things:
|
||||
</Description>
|
||||
<Function name='Alternate' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='AttackMines' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='AttenuateX' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='AttenuateY' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='AttenuateZ' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='BatteryLives' return='int' arguments='int num'> </Function>
|
||||
<Function name='Backwards' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='Beat' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
@@ -3449,8 +3452,17 @@ save yourself some time, copy this for undocumented things:
|
||||
<Function name='BMRize' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='Boomerang' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Boost' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Bounce' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='BouncePeriod' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='BounceOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='BounceZ' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='BounceZPeriod' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='BounceZOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Brake' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Bumpy' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Bumpyn' return= 'float, float' arguments='float value, float approach_speed'>
|
||||
Use 1-16 in place of 'n' to apply Bumpy on a specific column.
|
||||
</Function>
|
||||
<Function name='BumpyOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='BumpyPeriod' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='BumpyX' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
@@ -3464,13 +3476,25 @@ save yourself some time, copy this for undocumented things:
|
||||
</Function>
|
||||
<Function name='Confusion' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='ConfusionOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='ConfusionOffsetn' return= 'float, float' arguments='float value, float approach_speed'>
|
||||
Use 1-16 in place of 'n' to apply ConfusionOffset on a specific column.
|
||||
</Function>
|
||||
<Function name='ConfusionX' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='ConfusionXOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='ConfusionXOffsetn' return= 'float, float' arguments='float value, float approach_speed'>
|
||||
Use 1-16 in place of 'n' to apply ConfusionXOffset on a specific column.
|
||||
</Function>
|
||||
<Function name='ConfusionY' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='ConfusionYOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='ConfusionYOffsetn' return= 'float, float' arguments='float value, float approach_speed'>
|
||||
Use 1-16 in place of 'n' to apply ConfusionYOffset on a specific column.
|
||||
</Function>
|
||||
<Function name='Cover' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Cross' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Dark' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Darkn' return= 'float, float' arguments='float value, float approach_speed'>
|
||||
Use 1-16 in place of 'n' to apply Dark on a specific column.
|
||||
</Function>
|
||||
<Function name='Digital' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='DigitalOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='DigitalPeriod' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
@@ -3480,6 +3504,7 @@ save yourself some time, copy this for undocumented things:
|
||||
<Function name='DigitalZPeriod' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='DigitalZSteps' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Dizzy' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='DizzyHolds' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='Distant' return='float, float' arguments='float value, float approach_speed'>
|
||||
If the player is using Distant (zero skew and positive tilt), returns the value of tilt and its approach_speed.<br />
|
||||
Returns nil otherwise.<br />
|
||||
@@ -3487,6 +3512,8 @@ save yourself some time, copy this for undocumented things:
|
||||
If the optional second argument is passed, sets the approach_speed for skew and tilt to it.
|
||||
</Function>
|
||||
<Function name='DrainSetting' return= 'DrainType' arguments='DrainType type'> </Function>
|
||||
<Function name='DrawSize' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='DrawSizeBack' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Drunk' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='DrunkOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='DrunkPeriod' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
@@ -3593,11 +3620,18 @@ save yourself some time, copy this for undocumented things:
|
||||
<Function name='Passmark' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Planted' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='PlayerAutoPlay' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='PulseInner' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='PulseOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='PulseOuter' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='PulsePeriod' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Quick' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='RandAttack' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='RandomSpeed' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='RandomVanish' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Reverse' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Reversen' return= 'float, float' arguments='float value, float approach_speed'>
|
||||
Use 1-16 in place of 'n' to apply Reverse on a specific column.
|
||||
</Function>
|
||||
<Function name='Right' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='Roll' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Sawtooth' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
@@ -3614,6 +3648,8 @@ save yourself some time, copy this for undocumented things:
|
||||
Use CMod, XMod, or MMod to set the speed mod unless you have a good reason not to.<br />
|
||||
It is the setting for the XMod.
|
||||
</Function>
|
||||
<Function name='ShrinkMult' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='ShrinkLinear' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Shuffle' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='Skew' return='float, float' arguments='float value, float approach_speed'>
|
||||
Skew is one of the mods for controlling the perspective. Use Overhead, Distant, Incoming, Space, Distant, or Hallway for controlling the perspective in the old way.<br />
|
||||
@@ -3637,6 +3673,11 @@ save yourself some time, copy this for undocumented things:
|
||||
<Function name='SquareZOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='SquareZPeriod' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Stealth' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Stealthn' return= 'float, float' arguments='float value, float approach_speed'>
|
||||
Use 1-16 in place of 'n' to apply Stealth on a specific column.
|
||||
</Function>
|
||||
<Function name='StealthPastReceptors' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='StealthType' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='Stomp' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='Sudden' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='SuddenOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
@@ -3651,6 +3692,9 @@ save yourself some time, copy this for undocumented things:
|
||||
Tilt tilts the note field forward and back.
|
||||
</Function>
|
||||
<Function name='Tiny' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='Tinyn' return= 'float, float' arguments='float value, float approach_speed'>
|
||||
Use 1-16 in place of 'n' to apply Tiny on a specific column.
|
||||
</Function>
|
||||
<Function name='Tipsy' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='TipsyOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='TipsySpeed' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
@@ -3675,6 +3719,7 @@ save yourself some time, copy this for undocumented things:
|
||||
If the optional second argument is passed, sets the speed at which the transition occurs.
|
||||
</Function>
|
||||
<Function name='Xmode' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='ZBuffer' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='Zigzag' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='ZigzagOffset' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='ZigzagPeriod' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
|
||||
@@ -87,6 +87,7 @@ local stepmania_credits= {
|
||||
{logo= "kyzentun", name= "Kyzentun"}, -- new lua bindings, theme documentation
|
||||
"Mad Matt", -- new lua bindings
|
||||
"Matt McCutchen", -- minor fix for some dance pads on linux
|
||||
"MrThatKid", -- nitg modifiers
|
||||
"NitroX72", -- pump/frame noteskin
|
||||
"nixtrix", -- various BMS features and other fixes
|
||||
"Petriform", -- default theme music
|
||||
|
||||
@@ -189,7 +189,6 @@ FrameWidthEffectsMaxMultiplier=1.2
|
||||
FrameWidthLockEffectsToOverlapping=false
|
||||
FrameWidthLockEffectsTweenPixels=25
|
||||
ArrowSpacing=64
|
||||
DrawHiddenNotesAfterReceptor=true
|
||||
BlinkModFrequency=0.3333
|
||||
BoostModMinClamp=-400
|
||||
BoostModMaxClamp=400
|
||||
@@ -244,7 +243,6 @@ MiniPercentBase=0.5
|
||||
MiniPercentGate=1
|
||||
TinyPercentBase=0.5
|
||||
TinyPercentGate=1
|
||||
DizzyHoldHeads=false
|
||||
QuantizeArrowYPosition=false
|
||||
|
||||
[Background]
|
||||
|
||||
+159
-44
@@ -18,7 +18,6 @@ static char const dimension_names[4]= "XYZ";
|
||||
|
||||
static ThemeMetric<float> ARROW_SPACING( "ArrowEffects", "ArrowSpacing" );
|
||||
static ThemeMetric<bool> QUANTIZE_ARROW_Y( "ArrowEffects", "QuantizeArrowYPosition");
|
||||
static ThemeMetric<bool> HIDDEN_SUDDEN_PAST_RECEPTOR( "ArrowEffects", "DrawHiddenNotesAfterReceptor");
|
||||
|
||||
/* For better or for worse, allow the themes to modify the various mod
|
||||
* effects for the different mods. In general, it is recommended to not
|
||||
@@ -78,11 +77,10 @@ static ThemeMetric<float> BEAT_Z_PI_HEIGHT( "ArrowEffects", "BeatZPIHeight" );
|
||||
|
||||
static ThemeMetric<float> TINY_PERCENT_BASE( "ArrowEffects", "TinyPercentBase" );
|
||||
static ThemeMetric<float> TINY_PERCENT_GATE( "ArrowEffects", "TinyPercentGate" );
|
||||
static ThemeMetric<bool> DIZZY_HOLD_HEADS( "ArrowEffects", "DizzyHoldHeads" );
|
||||
|
||||
static const PlayerOptions* curr_options= NULL;
|
||||
|
||||
float ArrowGetPercentVisible(float fYPosWithoutReverse);
|
||||
float ArrowGetPercentVisible(float fYPosWithoutReverse, int iCol, float fYOffset);
|
||||
|
||||
static float GetNoteFieldHeight()
|
||||
{
|
||||
@@ -548,7 +546,7 @@ static void ArrowGetReverseShiftAndScale(int iCol, float fYReverseOffsetPixels,
|
||||
fScaleOut = SCALE( fPercentReverse, 0.f, 1.f, 1.f, -1.f );
|
||||
}
|
||||
|
||||
float ArrowEffects::GetYPos(int iCol, float fYOffset, float fYReverseOffsetPixels, bool WithReverse)
|
||||
float ArrowEffects::GetYPos( const PlayerState* pPlayerState, int iCol, float fYOffset, float fYReverseOffsetPixels, bool WithReverse)
|
||||
{
|
||||
float f = fYOffset;
|
||||
|
||||
@@ -561,12 +559,23 @@ float ArrowEffects::GetYPos(int iCol, float fYOffset, float fYReverseOffsetPixel
|
||||
f += fShift;
|
||||
}
|
||||
|
||||
// TODO: Don't index by PlayerNumber.
|
||||
const Style* pStyle = GAMESTATE->GetCurrentStyle(pPlayerState->m_PlayerNumber);
|
||||
const Style::ColumnInfo* pCols = pStyle->m_ColumnInfo[pPlayerState->m_PlayerNumber];
|
||||
const float* fEffects = curr_options->m_fEffects;
|
||||
|
||||
// Doing the math with a precalculated result of 0 should be faster than
|
||||
// checking whether tipsy is on. -Kyz
|
||||
// TODO: Don't index by PlayerNumber.
|
||||
PerPlayerData& data= g_EffectData[curr_options->m_pn];
|
||||
f+= fEffects[PlayerOptions::EFFECT_TIPSY] * data.m_tipsy_result[iCol];
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_ATTENUATE_Y] != 0 )
|
||||
{
|
||||
const float fXOffset = pCols[iCol].fXOffset;
|
||||
f += fEffects[PlayerOptions::EFFECT_ATTENUATE_Y] * (fYOffset/ARROW_SIZE) * (fYOffset/ARROW_SIZE) * (fXOffset/ARROW_SIZE);
|
||||
}
|
||||
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_BEAT_Y] != 0 )
|
||||
{
|
||||
@@ -666,6 +675,12 @@ float ArrowEffects::GetXPos( const PlayerState* pPlayerState, int iColNum, float
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_PARABOLA_X] != 0 )
|
||||
fPixelOffsetFromCenter += fEffects[PlayerOptions::EFFECT_PARABOLA_X] * (fYOffset/ARROW_SIZE) * (fYOffset/ARROW_SIZE);
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_ATTENUATE_X] != 0 )
|
||||
{
|
||||
const float fXOffset = pCols[iColNum].fXOffset;
|
||||
fPixelOffsetFromCenter += fEffects[PlayerOptions::EFFECT_ATTENUATE_X] * (fYOffset/ARROW_SIZE) * (fYOffset/ARROW_SIZE) * (fXOffset/ARROW_SIZE);
|
||||
}
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_DIGITAL] != 0 )
|
||||
fPixelOffsetFromCenter += (fEffects[PlayerOptions::EFFECT_DIGITAL] * ARROW_SIZE * 0.5f) *
|
||||
@@ -681,6 +696,14 @@ float ArrowEffects::GetXPos( const PlayerState* pPlayerState, int iColNum, float
|
||||
fPixelOffsetFromCenter += (fEffects[PlayerOptions::EFFECT_SQUARE] * ARROW_SIZE * 0.5f) * fResult;
|
||||
}
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_BOUNCE] != 0 )
|
||||
{
|
||||
float fBounceAmt = fabsf( RageFastSin( ( (fYOffset + (1.0f * (fEffects[PlayerOptions::EFFECT_BOUNCE_OFFSET]) ) ) /
|
||||
( 60 + (fEffects[PlayerOptions::EFFECT_BOUNCE_PERIOD]*60) ) ) ) );
|
||||
|
||||
fPixelOffsetFromCenter += fEffects[PlayerOptions::EFFECT_BOUNCE] * ARROW_SIZE * 0.5f * fBounceAmt;
|
||||
}
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_XMODE] != 0 )
|
||||
{
|
||||
// based off of code by v1toko for StepNXA, except it should work on
|
||||
@@ -726,12 +749,14 @@ float ArrowEffects::GetXPos( const PlayerState* pPlayerState, int iColNum, float
|
||||
return fPixelOffsetFromCenter;
|
||||
}
|
||||
|
||||
float ArrowEffects::GetRotationX(const PlayerState* pPlayerState, float fYOffset, bool bIsHoldCap)
|
||||
float ArrowEffects::GetRotationX(const PlayerState* pPlayerState, float fYOffset, bool bIsHoldCap, int iCol)
|
||||
{
|
||||
const float* fEffects = curr_options->m_fEffects;
|
||||
float fRotation = 0;
|
||||
if( fEffects[PlayerOptions::EFFECT_CONFUSION_X] != 0 || fEffects[PlayerOptions::EFFECT_CONFUSION_X_OFFSET] != 0 )
|
||||
fRotation += ReceptorGetRotationX( pPlayerState );
|
||||
if( fEffects[PlayerOptions::EFFECT_CONFUSION_X] != 0 || fEffects[PlayerOptions::EFFECT_CONFUSION_X_OFFSET] != 0 ||
|
||||
curr_options->m_fConfusionX[iCol] != 0
|
||||
)
|
||||
fRotation += ReceptorGetRotationX( pPlayerState, iCol );
|
||||
if( fEffects[PlayerOptions::EFFECT_ROLL] != 0 && !bIsHoldCap )
|
||||
{
|
||||
fRotation += fEffects[PlayerOptions::EFFECT_ROLL] * fYOffset/2;
|
||||
@@ -739,12 +764,14 @@ float ArrowEffects::GetRotationX(const PlayerState* pPlayerState, float fYOffset
|
||||
return fRotation;
|
||||
}
|
||||
|
||||
float ArrowEffects::GetRotationY(const PlayerState* pPlayerState, float fYOffset)
|
||||
float ArrowEffects::GetRotationY(const PlayerState* pPlayerState, float fYOffset, int iCol)
|
||||
{
|
||||
const float* fEffects = curr_options->m_fEffects;
|
||||
float fRotation = 0;
|
||||
if( fEffects[PlayerOptions::EFFECT_CONFUSION_Y] != 0 || fEffects[PlayerOptions::EFFECT_CONFUSION_Y_OFFSET] != 0 )
|
||||
fRotation += ReceptorGetRotationY( pPlayerState );
|
||||
if( fEffects[PlayerOptions::EFFECT_CONFUSION_Y] != 0 || fEffects[PlayerOptions::EFFECT_CONFUSION_Y_OFFSET] != 0 ||
|
||||
curr_options->m_fConfusionY[iCol] != 0
|
||||
)
|
||||
fRotation += ReceptorGetRotationY( pPlayerState, iCol );
|
||||
if( fEffects[PlayerOptions::EFFECT_TWIRL] != 0 )
|
||||
{
|
||||
fRotation += fEffects[PlayerOptions::EFFECT_TWIRL] * fYOffset/2;
|
||||
@@ -752,15 +779,17 @@ float ArrowEffects::GetRotationY(const PlayerState* pPlayerState, float fYOffset
|
||||
return fRotation;
|
||||
}
|
||||
|
||||
float ArrowEffects::GetRotationZ( const PlayerState* pPlayerState, float fNoteBeat, bool bIsHoldHead )
|
||||
float ArrowEffects::GetRotationZ( const PlayerState* pPlayerState, float fNoteBeat, bool bIsHoldHead, int iCol )
|
||||
{
|
||||
const float* fEffects = curr_options->m_fEffects;
|
||||
float fRotation = 0;
|
||||
if( fEffects[PlayerOptions::EFFECT_CONFUSION] != 0 || fEffects[PlayerOptions::EFFECT_CONFUSION_OFFSET] != 0 )
|
||||
fRotation += ReceptorGetRotationZ( pPlayerState );
|
||||
if( fEffects[PlayerOptions::EFFECT_CONFUSION] != 0 || fEffects[PlayerOptions::EFFECT_CONFUSION_OFFSET] != 0 ||
|
||||
curr_options->m_fConfusionZ[iCol] != 0
|
||||
)
|
||||
fRotation += ReceptorGetRotationZ( pPlayerState, iCol );
|
||||
|
||||
// As usual, enable dizzy hold heads at your own risk. -Wolfman2000
|
||||
if( fEffects[PlayerOptions::EFFECT_DIZZY] != 0 && ( DIZZY_HOLD_HEADS || !bIsHoldHead ) )
|
||||
if( fEffects[PlayerOptions::EFFECT_DIZZY] != 0 && ( curr_options->m_bDizzyHolds || !bIsHoldHead ) )
|
||||
{
|
||||
const float fSongBeat = pPlayerState->m_Position.m_fSongBeatVisible;
|
||||
float fDizzyRotation = fNoteBeat - fSongBeat;
|
||||
@@ -772,11 +801,14 @@ float ArrowEffects::GetRotationZ( const PlayerState* pPlayerState, float fNoteBe
|
||||
return fRotation;
|
||||
}
|
||||
|
||||
float ArrowEffects::ReceptorGetRotationZ( const PlayerState* pPlayerState )
|
||||
float ArrowEffects::ReceptorGetRotationZ( const PlayerState* pPlayerState, int iCol )
|
||||
{
|
||||
const float* fEffects = curr_options->m_fEffects;
|
||||
float fRotation = 0;
|
||||
|
||||
if( curr_options->m_fConfusionZ[iCol] != 0 )
|
||||
fRotation += curr_options->m_fConfusionZ[iCol] * 180.0f/PI;
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_CONFUSION_OFFSET] != 0 )
|
||||
fRotation += fEffects[PlayerOptions::EFFECT_CONFUSION_OFFSET] * 180.0f/PI;
|
||||
|
||||
@@ -792,11 +824,14 @@ float ArrowEffects::ReceptorGetRotationZ( const PlayerState* pPlayerState )
|
||||
return fRotation;
|
||||
}
|
||||
|
||||
float ArrowEffects::ReceptorGetRotationX( const PlayerState* pPlayerState )
|
||||
float ArrowEffects::ReceptorGetRotationX( const PlayerState* pPlayerState, int iCol )
|
||||
{
|
||||
const float* fEffects = curr_options->m_fEffects;
|
||||
float fRotation = 0;
|
||||
|
||||
|
||||
if( curr_options->m_fConfusionX[iCol] != 0 )
|
||||
fRotation += curr_options->m_fConfusionX[iCol] * 180.0f/PI;
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_CONFUSION_X_OFFSET] != 0 )
|
||||
fRotation += fEffects[PlayerOptions::EFFECT_CONFUSION_X_OFFSET] * 180.0f/PI;
|
||||
|
||||
@@ -812,11 +847,14 @@ float ArrowEffects::ReceptorGetRotationX( const PlayerState* pPlayerState )
|
||||
return fRotation;
|
||||
}
|
||||
|
||||
float ArrowEffects::ReceptorGetRotationY( const PlayerState* pPlayerState )
|
||||
float ArrowEffects::ReceptorGetRotationY( const PlayerState* pPlayerState, int iCol )
|
||||
{
|
||||
const float* fEffects = curr_options->m_fEffects;
|
||||
float fRotation = 0;
|
||||
|
||||
if( curr_options->m_fConfusionY[iCol] != 0 )
|
||||
fRotation += curr_options->m_fConfusionY[iCol] * 180.0f/PI;
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_CONFUSION_Y_OFFSET] != 0 )
|
||||
fRotation += fEffects[PlayerOptions::EFFECT_CONFUSION_Y_OFFSET] * 180.0f/PI;
|
||||
|
||||
@@ -919,11 +957,18 @@ static float GetSuddenStartLine()
|
||||
}
|
||||
|
||||
// used by ArrowGetAlpha and ArrowGetGlow below
|
||||
float ArrowGetPercentVisible(float fYPosWithoutReverse)
|
||||
float ArrowGetPercentVisible(float fYPosWithoutReverse, int iCol, float fYOffset)
|
||||
{
|
||||
const float fDistFromCenterLine = fYPosWithoutReverse - GetCenterLine();
|
||||
|
||||
if( fYPosWithoutReverse < 0 && HIDDEN_SUDDEN_PAST_RECEPTOR) // past Gray Arrows
|
||||
float fYPos;
|
||||
if( curr_options->m_bStealthType )
|
||||
fYPos = fYOffset;
|
||||
else
|
||||
fYPos = fYPosWithoutReverse;
|
||||
|
||||
|
||||
if( fYPos < 0 && curr_options->m_bStealthPastReceptors == false) // past Gray Arrows
|
||||
return 1; // totally visible
|
||||
|
||||
const float* fAppearances = curr_options->m_fAppearances;
|
||||
@@ -932,19 +977,22 @@ float ArrowGetPercentVisible(float fYPosWithoutReverse)
|
||||
|
||||
if( fAppearances[PlayerOptions::APPEARANCE_HIDDEN] != 0 )
|
||||
{
|
||||
float fHiddenVisibleAdjust = SCALE( fYPosWithoutReverse, GetHiddenStartLine(), GetHiddenEndLine(), 0, -1 );
|
||||
float fHiddenVisibleAdjust = SCALE( fYPos, GetHiddenStartLine(), GetHiddenEndLine(), 0, -1 );
|
||||
CLAMP( fHiddenVisibleAdjust, -1, 0 );
|
||||
fVisibleAdjust += fAppearances[PlayerOptions::APPEARANCE_HIDDEN] * fHiddenVisibleAdjust;
|
||||
}
|
||||
if( fAppearances[PlayerOptions::APPEARANCE_SUDDEN] != 0 )
|
||||
{
|
||||
float fSuddenVisibleAdjust = SCALE( fYPosWithoutReverse, GetSuddenStartLine(), GetSuddenEndLine(), -1, 0 );
|
||||
float fSuddenVisibleAdjust = SCALE( fYPos, GetSuddenStartLine(), GetSuddenEndLine(), -1, 0 );
|
||||
CLAMP( fSuddenVisibleAdjust, -1, 0 );
|
||||
fVisibleAdjust += fAppearances[PlayerOptions::APPEARANCE_SUDDEN] * fSuddenVisibleAdjust;
|
||||
}
|
||||
|
||||
if( fAppearances[PlayerOptions::APPEARANCE_STEALTH] != 0 )
|
||||
fVisibleAdjust -= fAppearances[PlayerOptions::APPEARANCE_STEALTH];
|
||||
if( curr_options->m_fStealth[iCol] != 0 ){
|
||||
fVisibleAdjust -= curr_options->m_fStealth[iCol];
|
||||
}
|
||||
if( fAppearances[PlayerOptions::APPEARANCE_BLINK] != 0 )
|
||||
{
|
||||
float f = RageFastSin(ArrowEffects::GetTime()*10);
|
||||
@@ -961,12 +1009,12 @@ float ArrowGetPercentVisible(float fYPosWithoutReverse)
|
||||
return clamp( 1+fVisibleAdjust, 0, 1 );
|
||||
}
|
||||
|
||||
float ArrowEffects::GetAlpha(int iCol, float fYOffset, float fPercentFadeToFail, float fYReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar)
|
||||
float ArrowEffects::GetAlpha( const PlayerState* pPlayerState, int iCol, float fYOffset, float fPercentFadeToFail, float fYReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar)
|
||||
{
|
||||
// Get the YPos without reverse (that is, factor in EFFECT_TIPSY).
|
||||
float fYPosWithoutReverse = ArrowEffects::GetYPos(iCol, fYOffset, fYReverseOffsetPixels, false );
|
||||
float fYPosWithoutReverse = ArrowEffects::GetYPos(pPlayerState, iCol, fYOffset, fYReverseOffsetPixels, false );
|
||||
|
||||
float fPercentVisible = ArrowGetPercentVisible(fYPosWithoutReverse);
|
||||
float fPercentVisible = ArrowGetPercentVisible(fYPosWithoutReverse, iCol, fYOffset);
|
||||
|
||||
if( fPercentFadeToFail != -1 )
|
||||
fPercentVisible = 1 - fPercentFadeToFail;
|
||||
@@ -981,12 +1029,12 @@ float ArrowEffects::GetAlpha(int iCol, float fYOffset, float fPercentFadeToFail,
|
||||
return (fPercentVisible>0.5f) ? 1.0f : 0.0f;
|
||||
}
|
||||
|
||||
float ArrowEffects::GetGlow(int iCol, float fYOffset, float fPercentFadeToFail, float fYReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar)
|
||||
float ArrowEffects::GetGlow( const PlayerState* pPlayerState, int iCol, float fYOffset, float fPercentFadeToFail, float fYReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar)
|
||||
{
|
||||
// Get the YPos without reverse (that is, factor in EFFECT_TIPSY).
|
||||
float fYPosWithoutReverse = ArrowEffects::GetYPos(iCol, fYOffset, fYReverseOffsetPixels, false );
|
||||
float fYPosWithoutReverse = ArrowEffects::GetYPos(pPlayerState, iCol, fYOffset, fYReverseOffsetPixels, false );
|
||||
|
||||
float fPercentVisible = ArrowGetPercentVisible(fYPosWithoutReverse );
|
||||
float fPercentVisible = ArrowGetPercentVisible(fYPosWithoutReverse, iCol, fYOffset);
|
||||
|
||||
if( fPercentFadeToFail != -1 )
|
||||
fPercentVisible = 1 - fPercentFadeToFail;
|
||||
@@ -1030,6 +1078,9 @@ float ArrowEffects::GetZPos( const PlayerState* pPlayerState, int iCol, float fY
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_BUMPY] != 0 )
|
||||
fZPos += fEffects[PlayerOptions::EFFECT_BUMPY] * 40*RageFastSin( (fYOffset+(100.0f*fEffects[PlayerOptions::EFFECT_BUMPY_OFFSET]) )/((fEffects[PlayerOptions::EFFECT_BUMPY_PERIOD]*16.0f)+16.0f) );
|
||||
|
||||
if( curr_options->m_fBumpy[iCol] != 0 )
|
||||
fZPos += curr_options->m_fBumpy[iCol] * 40*RageFastSin( (fYOffset+(100.0f*(fEffects[PlayerOptions::EFFECT_BUMPY_OFFSET])))/((fEffects[PlayerOptions::EFFECT_BUMPY_PERIOD]*16.0f)+16.0f) );
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_ZIGZAG_Z] != 0 )
|
||||
{
|
||||
@@ -1046,6 +1097,12 @@ float ArrowEffects::GetZPos( const PlayerState* pPlayerState, int iCol, float fY
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_PARABOLA_Z] != 0 )
|
||||
fZPos += fEffects[PlayerOptions::EFFECT_PARABOLA_Z] * (fYOffset/ARROW_SIZE) * (fYOffset/ARROW_SIZE);
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_ATTENUATE_Z] != 0 )
|
||||
{
|
||||
const float fXOffset = pCols[iCol].fXOffset;
|
||||
fZPos += fEffects[PlayerOptions::EFFECT_ATTENUATE_Z] * (fYOffset/ARROW_SIZE) * (fYOffset/ARROW_SIZE) * (fXOffset/ARROW_SIZE);
|
||||
}
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_DRUNK_Z] != 0 )
|
||||
fZPos += fEffects[PlayerOptions::EFFECT_DRUNK_Z] *
|
||||
@@ -1071,6 +1128,14 @@ float ArrowEffects::GetZPos( const PlayerState* pPlayerState, int iCol, float fY
|
||||
fZPos += (fEffects[PlayerOptions::EFFECT_SQUARE_Z] * ARROW_SIZE * 0.5f) * fResult;
|
||||
}
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_BOUNCE_Z] != 0 )
|
||||
{
|
||||
float fBounceAmt = fabsf( RageFastSin( ( (fYOffset + (1.0f * (fEffects[PlayerOptions::EFFECT_BOUNCE_Z_OFFSET]) ) ) /
|
||||
( 60 + (fEffects[PlayerOptions::EFFECT_BOUNCE_Z_PERIOD]*60) ) ) ) );
|
||||
|
||||
fZPos += fEffects[PlayerOptions::EFFECT_BOUNCE_Z] * ARROW_SIZE * 0.5f * fBounceAmt;
|
||||
}
|
||||
|
||||
return fZPos;
|
||||
}
|
||||
|
||||
@@ -1086,20 +1151,32 @@ bool ArrowEffects::NeedZBuffer()
|
||||
}
|
||||
if( fEffects[PlayerOptions::EFFECT_BEAT_Z] != 0 ||
|
||||
fEffects[PlayerOptions::EFFECT_DIGITAL_Z] != 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if( fEffects[PlayerOptions::EFFECT_ZIGZAG_Z] != 0 ||
|
||||
fEffects[PlayerOptions::EFFECT_SAWTOOTH_Z] != 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if( fEffects[PlayerOptions::EFFECT_PARABOLA_Z] != 0 )
|
||||
if( fEffects[PlayerOptions::EFFECT_PARABOLA_Z] != 0 ||
|
||||
fEffects[PlayerOptions::EFFECT_SQUARE_Z] != 0 )
|
||||
{
|
||||
return true;
|
||||
if( fEffects[PlayerOptions::EFFECT_SQUARE_Z] != 0 )
|
||||
}
|
||||
if( curr_options->m_bZBuffer ||
|
||||
fEffects[PlayerOptions::EFFECT_ATTENUATE_Z] != 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if( fEffects[PlayerOptions::EFFECT_BOUNCE_Z] != 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
float ArrowEffects::GetZoom( const PlayerState* pPlayerState )
|
||||
float ArrowEffects::GetZoom( const PlayerState* pPlayerState, float fYOffset, int iCol )
|
||||
{
|
||||
float fZoom = 1.0f;
|
||||
// Design change: Instead of having a flag in the style that toggles a
|
||||
@@ -1107,6 +1184,8 @@ float ArrowEffects::GetZoom( const PlayerState* pPlayerState )
|
||||
// calculates a zoom factor to apply to the notefield and puts it in the
|
||||
// PlayerState. -Kyz
|
||||
fZoom*= pPlayerState->m_NotefieldZoom;
|
||||
|
||||
fZoom = GetZoomVariable( fYOffset, iCol, fZoom);
|
||||
|
||||
float fTinyPercent = curr_options->m_fEffects[PlayerOptions::EFFECT_TINY];
|
||||
if( fTinyPercent != 0 )
|
||||
@@ -1114,9 +1193,45 @@ float ArrowEffects::GetZoom( const PlayerState* pPlayerState )
|
||||
fTinyPercent = powf( 0.5f, fTinyPercent );
|
||||
fZoom *= fTinyPercent;
|
||||
}
|
||||
if( curr_options->m_fTiny[iCol] != 0 )
|
||||
{
|
||||
fTinyPercent = powf( 0.5f, curr_options->m_fTiny[iCol] );
|
||||
fZoom *= fTinyPercent;
|
||||
}
|
||||
return fZoom;
|
||||
}
|
||||
|
||||
float ArrowEffects::GetZoomVariable( float fYOffset, int iCol, float fCurZoom )
|
||||
{
|
||||
float fZoom = fCurZoom;
|
||||
if( curr_options->m_fEffects[PlayerOptions::EFFECT_PULSE_INNER] != 0 || curr_options->m_fEffects[PlayerOptions::EFFECT_PULSE_OUTER] != 0 )
|
||||
{
|
||||
float sine = RageFastSin(((fYOffset+(100.0f*(curr_options->m_fEffects[PlayerOptions::EFFECT_PULSE_OFFSET])))/(0.4f*(ARROW_SIZE+(curr_options->m_fEffects[PlayerOptions::EFFECT_PULSE_PERIOD]*ARROW_SIZE)))));
|
||||
|
||||
fZoom *= (sine*(curr_options->m_fEffects[PlayerOptions::EFFECT_PULSE_OUTER]*0.5f))+GetPulseInner();
|
||||
}
|
||||
if( curr_options->m_fEffects[PlayerOptions::EFFECT_SHRINK_TO_MULT] !=0 && fYOffset >= 0 )
|
||||
fZoom *= 1/(1+(fYOffset*(curr_options->m_fEffects[PlayerOptions::EFFECT_SHRINK_TO_MULT]/100.0f)));
|
||||
|
||||
if( curr_options->m_fEffects[PlayerOptions::EFFECT_SHRINK_TO_LINEAR] !=0 && fYOffset >= 0 )
|
||||
fZoom += fYOffset*(0.5f*curr_options->m_fEffects[PlayerOptions::EFFECT_SHRINK_TO_LINEAR]/ARROW_SIZE);
|
||||
return fZoom;
|
||||
}
|
||||
|
||||
float ArrowEffects::GetPulseInner()
|
||||
{
|
||||
float fPulseInner = 1.0f;
|
||||
if( curr_options->m_fEffects[PlayerOptions::EFFECT_PULSE_INNER] != 0 || curr_options->m_fEffects[PlayerOptions::EFFECT_PULSE_OUTER] != 0 )
|
||||
{
|
||||
fPulseInner = ((curr_options->m_fEffects[PlayerOptions::EFFECT_PULSE_INNER]*0.5f)+1);
|
||||
if (fPulseInner == 0)
|
||||
{
|
||||
fPulseInner = 0.01f;
|
||||
}
|
||||
}
|
||||
return fPulseInner;
|
||||
}
|
||||
|
||||
static ThemeMetric<float> FRAME_WIDTH_EFFECTS_PIXELS_PER_SECOND( "ArrowEffects", "FrameWidthEffectsPixelsPerSecond" );
|
||||
static ThemeMetric<float> FRAME_WIDTH_EFFECTS_MIN_MULTIPLIER( "ArrowEffects", "FrameWidthEffectsMinMultiplier" );
|
||||
static ThemeMetric<float> FRAME_WIDTH_EFFECTS_MAX_MULTIPLIER( "ArrowEffects", "FrameWidthEffectsMaxMultiplier" );
|
||||
@@ -1194,7 +1309,7 @@ namespace
|
||||
PlayerState *ps = Luna<PlayerState>::check( L, 1 );
|
||||
float fYReverseOffsetPixels = YReverseOffset( L, 4 );
|
||||
ArrowEffects::SetCurrentOptions(&ps->m_PlayerOptions.GetCurrent());
|
||||
lua_pushnumber(L, ArrowEffects::GetYPos(IArg(2)-1, FArg(3), fYReverseOffsetPixels));
|
||||
lua_pushnumber(L, ArrowEffects::GetYPos(ps, IArg(2)-1, FArg(3), fYReverseOffsetPixels));
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1226,26 +1341,26 @@ namespace
|
||||
return 1;
|
||||
}
|
||||
|
||||
// ( PlayerState ps, float fYOffset )
|
||||
// ( PlayerState ps, float fYOffset, int iCol )
|
||||
int GetRotationX( lua_State *L )
|
||||
{
|
||||
PlayerState *ps = Luna<PlayerState>::check( L, 1 );
|
||||
ArrowEffects::SetCurrentOptions(&ps->m_PlayerOptions.GetCurrent());
|
||||
bool bIsHoldCap = false;
|
||||
lua_pushnumber(L, ArrowEffects::GetRotationX(ps,FArg(2), bIsHoldCap));
|
||||
lua_pushnumber(L, ArrowEffects::GetRotationX(ps,FArg(2), bIsHoldCap, IArg(3)-1));
|
||||
return 1;
|
||||
}
|
||||
|
||||
// ( PlayerState ps, float fYOffset )
|
||||
// ( PlayerState ps, float fYOffset, int iCol )
|
||||
int GetRotationY( lua_State *L )
|
||||
{
|
||||
PlayerState *ps = Luna<PlayerState>::check( L, 1 );
|
||||
ArrowEffects::SetCurrentOptions(&ps->m_PlayerOptions.GetCurrent());
|
||||
lua_pushnumber(L, ArrowEffects::GetRotationY(ps,FArg(2)));
|
||||
lua_pushnumber(L, ArrowEffects::GetRotationY(ps, FArg(2), IArg(3)-1));
|
||||
return 1;
|
||||
}
|
||||
|
||||
// ( PlayerState ps, float fNoteBeat, bool bIsHoldHead )
|
||||
// ( PlayerState ps, float fNoteBeat, bool bIsHoldHead, int iCol )
|
||||
int GetRotationZ( lua_State *L )
|
||||
{
|
||||
PlayerState *ps = Luna<PlayerState>::check( L, 1 );
|
||||
@@ -1256,16 +1371,16 @@ namespace
|
||||
{
|
||||
bIsHoldHead = BArg(3);
|
||||
}
|
||||
lua_pushnumber( L, ArrowEffects::GetRotationZ( ps, FArg(2), bIsHoldHead ) );
|
||||
lua_pushnumber( L, ArrowEffects::GetRotationZ( ps, FArg(2), bIsHoldHead, IArg(4)-1 ) );
|
||||
return 1;
|
||||
}
|
||||
|
||||
// ( PlayerState ps )
|
||||
// ( PlayerState ps, int iCol )
|
||||
int ReceptorGetRotationZ( lua_State *L )
|
||||
{
|
||||
PlayerState *ps = Luna<PlayerState>::check( L, 1 );
|
||||
ArrowEffects::SetCurrentOptions(&ps->m_PlayerOptions.GetCurrent());
|
||||
lua_pushnumber( L, ArrowEffects::ReceptorGetRotationZ( ps ) );
|
||||
lua_pushnumber( L, ArrowEffects::ReceptorGetRotationZ( ps, IArg(2)-1 ) );
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1291,7 +1406,7 @@ namespace
|
||||
{
|
||||
fFadeInPercentOfDrawFar = FArg(7);
|
||||
}
|
||||
lua_pushnumber(L, ArrowEffects::GetAlpha(IArg(2)-1, FArg(3), fPercentFadeToFail, fYReverseOffsetPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar));
|
||||
lua_pushnumber(L, ArrowEffects::GetAlpha(ps, IArg(2)-1, FArg(3), fPercentFadeToFail, fYReverseOffsetPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar));
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1318,7 +1433,7 @@ namespace
|
||||
{
|
||||
fFadeInPercentOfDrawFar = FArg(7);
|
||||
}
|
||||
lua_pushnumber( L, ArrowEffects::GetGlow(IArg(2)-1, FArg(3), fPercentFadeToFail, fYReverseOffsetPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar ) );
|
||||
lua_pushnumber( L, ArrowEffects::GetGlow(ps, IArg(2)-1, FArg(3), fPercentFadeToFail, fYReverseOffsetPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar ) );
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1340,12 +1455,12 @@ namespace
|
||||
return 1;
|
||||
}
|
||||
|
||||
// ( PlayerState ps )
|
||||
// ( PlayerState ps, float fYOffset, int iCol )
|
||||
int GetZoom( lua_State *L )
|
||||
{
|
||||
PlayerState *ps = Luna<PlayerState>::check( L, 1 );
|
||||
ArrowEffects::SetCurrentOptions(&ps->m_PlayerOptions.GetCurrent());
|
||||
lua_pushnumber( L, ArrowEffects::GetZoom( ps ) );
|
||||
lua_pushnumber( L, ArrowEffects::GetZoom( ps, FArg(2), IArg(3)-1 ) );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+13
-11
@@ -33,7 +33,7 @@ public:
|
||||
static void GetXYZPos(const PlayerState* player_state, int col, float y_offset, float y_reverse_offset, RageVector3& ret, bool with_reverse= true)
|
||||
{
|
||||
ret.x= GetMoveX(col) + GetXPos(player_state, col, y_offset);
|
||||
ret.y= GetMoveY(col) + GetYPos(col, y_offset, y_reverse_offset, with_reverse);
|
||||
ret.y= GetMoveY(col) + GetYPos(player_state, col, y_offset, y_reverse_offset, with_reverse);
|
||||
ret.z= GetMoveZ(col) + GetZPos(player_state, col, y_offset);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
* @param fYReverseOffsetPixels the amount offset due to reverse.
|
||||
* @param WithReverse a flag to see if the Reverse mod is on.
|
||||
* @return the actual display position. */
|
||||
static float GetYPos(int iCol, float fYOffset, float fYReverseOffsetPixels, bool WithReverse = true );
|
||||
static float GetYPos(const PlayerState* pPlayerState, int iCol, float fYOffset, float fYReverseOffsetPixels, bool WithReverse = true );
|
||||
|
||||
// Inverse of ArrowGetYPos (YPos -> fYOffset).
|
||||
static float GetYOffsetFromYPos(int iCol, float YPos, float fYReverseOffsetPixels);
|
||||
@@ -55,16 +55,16 @@ public:
|
||||
// fRotation is Z rotation of an arrow. This will depend on the column of
|
||||
// the arrow and possibly the Arrow effect and the fYOffset (in the case of
|
||||
// EFFECT_DIZZY).
|
||||
static float GetRotationZ( const PlayerState* pPlayerState, float fNoteBeat, bool bIsHoldHead );
|
||||
static float ReceptorGetRotationZ( const PlayerState* pPlayerState );
|
||||
static float GetRotationZ( const PlayerState* pPlayerState, float fNoteBeat, bool bIsHoldHead, int iCol );
|
||||
static float ReceptorGetRotationZ( const PlayerState* pPlayerState, int iCol );
|
||||
|
||||
// Due to the handling logic for holds on Twirl, we need to use an offset instead.
|
||||
// It's more intuitive for Roll to be based off offset, so use an offset there too.
|
||||
static float GetRotationX(const PlayerState* pPlayerState, float fYOffset, bool bIsHoldCap);
|
||||
static float GetRotationY(const PlayerState* pPlayerState, float fYOffset);
|
||||
static float GetRotationX(const PlayerState* pPlayerState, float fYOffset, bool bIsHoldCap, int iCol);
|
||||
static float GetRotationY(const PlayerState* pPlayerState, float fYOffset, int iCol);
|
||||
|
||||
static float ReceptorGetRotationX( const PlayerState* pPlayerState);
|
||||
static float ReceptorGetRotationY( const PlayerState* pPlayerState);
|
||||
static float ReceptorGetRotationX( const PlayerState* pPlayerState, int iCol);
|
||||
static float ReceptorGetRotationY( const PlayerState* pPlayerState, int iCol);
|
||||
|
||||
static float GetMoveX(int iCol);
|
||||
static float GetMoveY(int iCol);
|
||||
@@ -90,11 +90,11 @@ public:
|
||||
|
||||
// fAlpha is the transparency of the arrow. It depends on fYPos and the
|
||||
// AppearanceType.
|
||||
static float GetAlpha(int iCol, float fYPos, float fPercentFadeToFail, float fYReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar);
|
||||
static float GetAlpha(const PlayerState* pPlayerState, int iCol, float fYPos, float fPercentFadeToFail, float fYReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar);
|
||||
|
||||
// fAlpha is the transparency of the arrow. It depends on fYPos and the
|
||||
// AppearanceType.
|
||||
static float GetGlow(int iCol, float fYPos, float fPercentFadeToFail, float fYReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar );
|
||||
static float GetGlow(const PlayerState* pPlayerState, int iCol, float fYPos, float fPercentFadeToFail, float fYReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar );
|
||||
|
||||
/**
|
||||
* @brief Retrieve the current brightness.
|
||||
@@ -106,7 +106,9 @@ public:
|
||||
static float GetBrightness( const PlayerState* pPlayerState, float fNoteBeat );
|
||||
|
||||
// This is the zoom of the individual tracks, not of the whole Player.
|
||||
static float GetZoom( const PlayerState* pPlayerState );
|
||||
static float GetZoom( const PlayerState* pPlayerState, float fYOffset, int iCol );
|
||||
static float GetZoomVariable( float fYOffset, int iCol, float fCurZoom );
|
||||
static float GetPulseInner();
|
||||
|
||||
static float GetFrameWidthScale( const PlayerState* pPlayerState, float fYOffset, float fOverlappedTime );
|
||||
};
|
||||
|
||||
+38
-31
@@ -365,15 +365,15 @@ void NoteColumnRenderArgs::spae_pos_for_beat(const PlayerState* player_state,
|
||||
}
|
||||
}
|
||||
void NoteColumnRenderArgs::spae_zoom_for_beat(const PlayerState* state, float beat,
|
||||
RageVector3& sp_zoom, RageVector3& ae_zoom) const
|
||||
RageVector3& sp_zoom, RageVector3& ae_zoom, int col_num, float y_offset) const
|
||||
{
|
||||
switch(zoom_handler->m_spline_mode)
|
||||
{
|
||||
case NCSM_Disabled:
|
||||
ae_zoom.x= ae_zoom.y= ae_zoom.z= ArrowEffects::GetZoom(state);
|
||||
ae_zoom.x= ae_zoom.y= ae_zoom.z= ArrowEffects::GetZoom(state, y_offset, col_num);
|
||||
break;
|
||||
case NCSM_Offset:
|
||||
ae_zoom.x= ae_zoom.y= ae_zoom.z= ArrowEffects::GetZoom(state);
|
||||
ae_zoom.x= ae_zoom.y= ae_zoom.z= ArrowEffects::GetZoom(state, y_offset, col_num);
|
||||
zoom_handler->EvalForBeat(song_beat, beat, sp_zoom);
|
||||
break;
|
||||
case NCSM_Position:
|
||||
@@ -697,9 +697,9 @@ Sprite *NoteDisplay::GetHoldSprite( NoteColorSprite ncs[NUM_HoldType][NUM_Active
|
||||
static float ArrowGetAlphaOrGlow( bool bGlow, const PlayerState* pPlayerState, int iCol, float fYOffset, float fPercentFadeToFail, float fYReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar )
|
||||
{
|
||||
if( bGlow )
|
||||
return ArrowEffects::GetGlow(iCol, fYOffset, fPercentFadeToFail, fYReverseOffsetPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar);
|
||||
return ArrowEffects::GetGlow(pPlayerState, iCol, fYOffset, fPercentFadeToFail, fYReverseOffsetPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar);
|
||||
else
|
||||
return ArrowEffects::GetAlpha(iCol, fYOffset, fPercentFadeToFail, fYReverseOffsetPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar);
|
||||
return ArrowEffects::GetAlpha(pPlayerState, iCol, fYOffset, fPercentFadeToFail, fYReverseOffsetPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar);
|
||||
}
|
||||
|
||||
struct StripBuffer
|
||||
@@ -743,7 +743,7 @@ void NoteDisplay::DrawHoldPart(vector<Sprite*> &vpSpr,
|
||||
{
|
||||
ASSERT(!vpSpr.empty());
|
||||
|
||||
float ae_zoom= ArrowEffects::GetZoom(m_pPlayerState);
|
||||
float ae_zoom= ArrowEffects::GetZoom(m_pPlayerState, 0, column_args.column);
|
||||
Sprite *pSprite = vpSpr.front();
|
||||
|
||||
// draw manually in small segments
|
||||
@@ -838,6 +838,8 @@ void NoteDisplay::DrawHoldPart(vector<Sprite*> &vpSpr,
|
||||
|
||||
const float fYOffset= ArrowEffects::GetYOffsetFromYPos(column_args.column, fY, m_fYReverseOffsetPixels);
|
||||
|
||||
ae_zoom = ArrowEffects::GetZoom(m_pPlayerState, fYOffset, column_args.column);
|
||||
|
||||
float cur_beat= part_args.top_beat;
|
||||
if(part_args.top_beat != part_args.bottom_beat)
|
||||
{
|
||||
@@ -937,10 +939,10 @@ void NoteDisplay::DrawHoldPart(vector<Sprite*> &vpSpr,
|
||||
{
|
||||
case NCSM_Disabled:
|
||||
// XXX: Actor rotations use degrees, Math uses radians. Convert here.
|
||||
ae_rot.y= ArrowEffects::GetRotationY(m_pPlayerState, fYOffset) * PI_180;
|
||||
ae_rot.y= ArrowEffects::GetRotationY(m_pPlayerState, fYOffset, column_args.column) * PI_180;
|
||||
break;
|
||||
case NCSM_Offset:
|
||||
ae_rot.y= ArrowEffects::GetRotationY(m_pPlayerState, fYOffset) * PI_180;
|
||||
ae_rot.y= ArrowEffects::GetRotationY(m_pPlayerState, fYOffset, column_args.column) * PI_180;
|
||||
column_args.rot_handler->EvalForBeat(column_args.song_beat, cur_beat, sp_rot);
|
||||
break;
|
||||
case NCSM_Position:
|
||||
@@ -984,8 +986,13 @@ void NoteDisplay::DrawHoldPart(vector<Sprite*> &vpSpr,
|
||||
const RageVector3 right_vert(center_vert.x - render_left.x,
|
||||
center_vert.y - render_left.y, center_vert.z - render_left.z);
|
||||
|
||||
// Hack: because some mods mess with the zoom, we need to compensate accordingly,
|
||||
// or else hold ends don't look right.
|
||||
const float fPulseInnerAdj = ArrowEffects::GetPulseInner();
|
||||
const float fVariableZoom = ArrowEffects::GetZoomVariable(fYOffset, column_args.column, 1) / fPulseInnerAdj;
|
||||
|
||||
const float fDistFromTop = (fY - y_start_pos) / ae_zoom;
|
||||
float fTexCoordTop = SCALE(fDistFromTop, 0, unzoomed_frame_height, rect.top, rect.bottom);
|
||||
float fTexCoordTop = SCALE(fDistFromTop, 0, unzoomed_frame_height, rect.top, rect.bottom * fVariableZoom);
|
||||
fTexCoordTop += add_to_tex_coord;
|
||||
|
||||
const float fAlpha = ArrowGetAlphaOrGlow(glow, m_pPlayerState, column_args.column, fYOffset, part_args.percent_fade_to_fail, m_fYReverseOffsetPixels, field_args.draw_pixels_before_targets, field_args.fade_before_targets);
|
||||
@@ -1116,13 +1123,13 @@ void NoteDisplay::DrawHoldBody(const TapNote& tn,
|
||||
y_tail += cache->m_iStopDrawingHoldBodyOffsetFromTail;
|
||||
}
|
||||
|
||||
float ae_zoom= ArrowEffects::GetZoom(m_pPlayerState);
|
||||
float ae_zoom= ArrowEffects::GetZoom(m_pPlayerState, 0, column_args.column);
|
||||
const float frame_height_top= pSpriteTop->GetUnzoomedHeight() * ae_zoom;
|
||||
const float frame_height_bottom= pSpriteBottom->GetUnzoomedHeight() * ae_zoom;
|
||||
|
||||
part_args.y_start_pos= ArrowEffects::GetYPos(column_args.column,
|
||||
part_args.y_start_pos= ArrowEffects::GetYPos(m_pPlayerState, column_args.column,
|
||||
field_args.draw_pixels_after_targets, m_fYReverseOffsetPixels);
|
||||
part_args.y_end_pos= ArrowEffects::GetYPos(column_args.column,
|
||||
part_args.y_end_pos= ArrowEffects::GetYPos(m_pPlayerState, column_args.column,
|
||||
field_args.draw_pixels_before_targets, m_fYReverseOffsetPixels);
|
||||
if(reverse)
|
||||
{
|
||||
@@ -1190,8 +1197,8 @@ void NoteDisplay::DrawHold(const TapNote& tn,
|
||||
if( bReverse )
|
||||
swap( fStartYOffset, fEndYOffset );
|
||||
|
||||
const float fYHead= ArrowEffects::GetYPos(column_args.column, fStartYOffset, m_fYReverseOffsetPixels);
|
||||
const float fYTail= ArrowEffects::GetYPos(column_args.column, fEndYOffset, m_fYReverseOffsetPixels);
|
||||
const float fYHead= ArrowEffects::GetYPos(m_pPlayerState, column_args.column, fStartYOffset, m_fYReverseOffsetPixels);
|
||||
const float fYTail= ArrowEffects::GetYPos(m_pPlayerState, column_args.column, fEndYOffset, m_fYReverseOffsetPixels);
|
||||
|
||||
const float fColorScale = SCALE( tn.HoldResult.fLife, 0.0f, 1.0f, cache->m_fHoldLetGoGrayPercent, 1.0f );
|
||||
|
||||
@@ -1247,8 +1254,8 @@ void NoteDisplay::DrawActor(const TapNote& tn, Actor* pActor, NotePart part,
|
||||
float spline_beat= fBeat;
|
||||
if(is_being_held) { spline_beat= column_args.song_beat; }
|
||||
|
||||
const float fAlpha= ArrowEffects::GetAlpha(column_args.column, fYOffset, fPercentFadeToFail, m_fYReverseOffsetPixels, field_args.draw_pixels_before_targets, field_args.fade_before_targets);
|
||||
const float fGlow= ArrowEffects::GetGlow(column_args.column, fYOffset, fPercentFadeToFail, m_fYReverseOffsetPixels, field_args.draw_pixels_before_targets, field_args.fade_before_targets);
|
||||
const float fAlpha= ArrowEffects::GetAlpha(m_pPlayerState, column_args.column, fYOffset, fPercentFadeToFail, m_fYReverseOffsetPixels, field_args.draw_pixels_before_targets, field_args.fade_before_targets);
|
||||
const float fGlow= ArrowEffects::GetGlow(m_pPlayerState, column_args.column, fYOffset, fPercentFadeToFail, m_fYReverseOffsetPixels, field_args.draw_pixels_before_targets, field_args.fade_before_targets);
|
||||
const RageColor diffuse = RageColor(
|
||||
column_args.diffuse.r * fColorScale,
|
||||
column_args.diffuse.g * fColorScale,
|
||||
@@ -1291,14 +1298,14 @@ void NoteDisplay::DrawActor(const TapNote& tn, Actor* pActor, NotePart part,
|
||||
switch(column_args.rot_handler->m_spline_mode)
|
||||
{
|
||||
case NCSM_Disabled:
|
||||
ae_rot.x= ArrowEffects::GetRotationX(m_pPlayerState, fYOffset, bIsHoldCap);
|
||||
ae_rot.y= ArrowEffects::GetRotationY(m_pPlayerState, fYOffset);
|
||||
ae_rot.z= ArrowEffects::GetRotationZ(m_pPlayerState, fBeat, bIsHoldHead);
|
||||
ae_rot.x= ArrowEffects::GetRotationX(m_pPlayerState, fYOffset, bIsHoldCap, column_args.column);
|
||||
ae_rot.y= ArrowEffects::GetRotationY(m_pPlayerState, fYOffset, column_args.column);
|
||||
ae_rot.z= ArrowEffects::GetRotationZ(m_pPlayerState, fBeat, bIsHoldHead, column_args.column);
|
||||
break;
|
||||
case NCSM_Offset:
|
||||
ae_rot.x= ArrowEffects::GetRotationX(m_pPlayerState, fYOffset, bIsHoldCap);
|
||||
ae_rot.y= ArrowEffects::GetRotationY(m_pPlayerState, fYOffset);
|
||||
ae_rot.z= ArrowEffects::GetRotationZ(m_pPlayerState, fBeat, bIsHoldHead);
|
||||
ae_rot.x= ArrowEffects::GetRotationX(m_pPlayerState, fYOffset, bIsHoldCap, column_args.column);
|
||||
ae_rot.y= ArrowEffects::GetRotationY(m_pPlayerState, fYOffset, column_args.column);
|
||||
ae_rot.z= ArrowEffects::GetRotationZ(m_pPlayerState, fBeat, bIsHoldHead, column_args.column);
|
||||
column_args.rot_handler->EvalForBeat(column_args.song_beat, spline_beat, sp_rot);
|
||||
break;
|
||||
case NCSM_Position:
|
||||
@@ -1307,7 +1314,7 @@ void NoteDisplay::DrawActor(const TapNote& tn, Actor* pActor, NotePart part,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
column_args.spae_zoom_for_beat(m_pPlayerState, spline_beat, sp_zoom, ae_zoom);
|
||||
column_args.spae_zoom_for_beat(m_pPlayerState, spline_beat, sp_zoom, ae_zoom, column_args.column, fYOffset);
|
||||
column_args.SetPRZForActor(pActor, sp_pos, ae_pos, sp_rot, ae_rot, sp_zoom, ae_zoom);
|
||||
// [AJ] this two lines (and how they're handled) piss off many people:
|
||||
pActor->SetDiffuse( diffuse );
|
||||
@@ -1459,14 +1466,14 @@ void NoteColumnRenderer::UpdateReceptorGhostStuff(Actor* receptor) const
|
||||
switch(NCR_current.m_rot_handler.m_spline_mode)
|
||||
{
|
||||
case NCSM_Disabled:
|
||||
ae_rot.z= ArrowEffects::ReceptorGetRotationZ(player_state);
|
||||
ae_rot.x= ArrowEffects::ReceptorGetRotationX(player_state);
|
||||
ae_rot.y= ArrowEffects::ReceptorGetRotationY(player_state);
|
||||
ae_rot.z= ArrowEffects::ReceptorGetRotationZ(player_state, m_column);
|
||||
ae_rot.x= ArrowEffects::ReceptorGetRotationX(player_state, m_column);
|
||||
ae_rot.y= ArrowEffects::ReceptorGetRotationY(player_state, m_column);
|
||||
break;
|
||||
case NCSM_Offset:
|
||||
ae_rot.z= ArrowEffects::ReceptorGetRotationZ(player_state);
|
||||
ae_rot.x= ArrowEffects::ReceptorGetRotationX(player_state);
|
||||
ae_rot.y= ArrowEffects::ReceptorGetRotationY(player_state);
|
||||
ae_rot.z= ArrowEffects::ReceptorGetRotationZ(player_state, m_column);
|
||||
ae_rot.x= ArrowEffects::ReceptorGetRotationX(player_state, m_column);
|
||||
ae_rot.y= ArrowEffects::ReceptorGetRotationY(player_state, m_column);
|
||||
NCR_current.m_rot_handler.EvalForReceptor(song_beat, sp_rot);
|
||||
break;
|
||||
case NCSM_Position:
|
||||
@@ -1478,10 +1485,10 @@ void NoteColumnRenderer::UpdateReceptorGhostStuff(Actor* receptor) const
|
||||
switch(NCR_current.m_zoom_handler.m_spline_mode)
|
||||
{
|
||||
case NCSM_Disabled:
|
||||
ae_zoom.x= ae_zoom.y= ae_zoom.z= ArrowEffects::GetZoom(player_state);
|
||||
ae_zoom.x= ae_zoom.y= ae_zoom.z= ArrowEffects::GetZoom(player_state, 0, m_column);
|
||||
break;
|
||||
case NCSM_Offset:
|
||||
ae_zoom.x= ae_zoom.y= ae_zoom.z= ArrowEffects::GetZoom(player_state);
|
||||
ae_zoom.x= ae_zoom.y= ae_zoom.z= ArrowEffects::GetZoom(player_state, 0, m_column);
|
||||
NCR_current.m_zoom_handler.EvalForReceptor(song_beat, sp_zoom);
|
||||
break;
|
||||
case NCSM_Position:
|
||||
|
||||
+1
-1
@@ -157,7 +157,7 @@ struct NoteColumnRenderArgs
|
||||
float beat, float y_offset, float y_reverse_offset,
|
||||
RageVector3& sp_pos, RageVector3& ae_pos) const;
|
||||
void spae_zoom_for_beat(const PlayerState* state, float beat,
|
||||
RageVector3& sp_zoom, RageVector3& ae_zoom) const;
|
||||
RageVector3& sp_zoom, RageVector3& ae_zoom, int col_num, float y_offset) const;
|
||||
void SetPRZForActor(Actor* actor,
|
||||
const RageVector3& sp_pos, const RageVector3& ae_pos,
|
||||
const RageVector3& sp_rot, const RageVector3& ae_rot,
|
||||
|
||||
+12
-12
@@ -323,7 +323,7 @@ void NoteField::Update( float fDeltaTime )
|
||||
if( !bTweeningOn && m_fCurrentBeatLastUpdate != -1 )
|
||||
{
|
||||
const float fYOffsetLast = ArrowEffects::GetYOffset(m_pPlayerState, 0, m_fCurrentBeatLastUpdate);
|
||||
const float fYPosLast= ArrowEffects::GetYPos(0, fYOffsetLast, m_fYReverseOffsetPixels);
|
||||
const float fYPosLast= ArrowEffects::GetYPos(m_pPlayerState, 0, fYOffsetLast, m_fYReverseOffsetPixels);
|
||||
const float fPixelDifference = fYPosLast - m_fYPosCurrentBeatLastUpdate;
|
||||
|
||||
//LOG->Trace( "speed = %f, %f, %f, %f, %f, %f", fSpeed, fYOffsetAtCurrent, fYOffsetAtNext, fSecondsAtCurrent, fSecondsAtNext, fPixelDifference, fSecondsDifference );
|
||||
@@ -333,7 +333,7 @@ void NoteField::Update( float fDeltaTime )
|
||||
}
|
||||
m_fCurrentBeatLastUpdate = fCurrentBeat;
|
||||
const float fYOffsetCurrent = ArrowEffects::GetYOffset( m_pPlayerState, 0, m_fCurrentBeatLastUpdate );
|
||||
m_fYPosCurrentBeatLastUpdate= ArrowEffects::GetYPos(0, fYOffsetCurrent, m_fYReverseOffsetPixels);
|
||||
m_fYPosCurrentBeatLastUpdate= ArrowEffects::GetYPos(m_pPlayerState, 0, fYOffsetCurrent, m_fYReverseOffsetPixels);
|
||||
|
||||
m_rectMarkerBar.Update( fDeltaTime );
|
||||
|
||||
@@ -365,7 +365,7 @@ float NoteField::GetWidth() const
|
||||
// TODO: Remove use of PlayerNumber.
|
||||
pStyle->GetMinAndMaxColX( m_pPlayerState->m_PlayerNumber, fMinX, fMaxX );
|
||||
|
||||
const float fYZoom = ArrowEffects::GetZoom( m_pPlayerState );
|
||||
const float fYZoom = ArrowEffects::GetZoom( m_pPlayerState, 0, 0 );
|
||||
return (fMaxX - fMinX + ARROW_SIZE) * fYZoom;
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ void NoteField::DrawBeatBar( const float fBeat, BeatBarType type, int iMeasureIn
|
||||
bool bIsMeasure = type == measure;
|
||||
|
||||
const float fYOffset = ArrowEffects::GetYOffset( m_pPlayerState, 0, fBeat );
|
||||
const float fYPos= ArrowEffects::GetYPos(0, fYOffset, m_fYReverseOffsetPixels);
|
||||
const float fYPos= ArrowEffects::GetYPos(m_pPlayerState, 0, fYOffset, m_fYReverseOffsetPixels);
|
||||
|
||||
float fAlpha;
|
||||
int iState;
|
||||
@@ -453,7 +453,7 @@ void NoteField::DrawBoard( int iDrawDistanceAfterTargetsPixels, int iDrawDistanc
|
||||
{
|
||||
// Draw the board centered on fYPosAt0 so that the board doesn't slide as
|
||||
// the draw distance changes with modifiers.
|
||||
const float fYPosAt0= ArrowEffects::GetYPos(0, 0, m_fYReverseOffsetPixels);
|
||||
const float fYPosAt0= ArrowEffects::GetYPos(m_pPlayerState, 0, 0, m_fYReverseOffsetPixels);
|
||||
|
||||
RectF rect = *pSprite->GetCurrentTextureCoordRect();
|
||||
const float fBoardGraphicHeightPixels = pSprite->GetUnzoomedHeight();
|
||||
@@ -480,7 +480,7 @@ void NoteField::DrawMarkerBar( int iBeat )
|
||||
{
|
||||
float fBeat = NoteRowToBeat( iBeat );
|
||||
const float fYOffset = ArrowEffects::GetYOffset( m_pPlayerState, 0, fBeat );
|
||||
const float fYPos = ArrowEffects::GetYPos(0, fYOffset, m_fYReverseOffsetPixels);
|
||||
const float fYPos = ArrowEffects::GetYPos(m_pPlayerState, 0, fYOffset, m_fYReverseOffsetPixels);
|
||||
|
||||
m_rectMarkerBar.StretchTo( RectF(-GetWidth()/2, fYPos-ARROW_SIZE/2, GetWidth()/2, fYPos+ARROW_SIZE/2) );
|
||||
m_rectMarkerBar.Draw();
|
||||
@@ -492,9 +492,9 @@ void NoteField::DrawAreaHighlight( int iStartBeat, int iEndBeat )
|
||||
float fStartBeat = NoteRowToBeat( iStartBeat );
|
||||
float fEndBeat = NoteRowToBeat( iEndBeat );
|
||||
float fDrawDistanceAfterTargetsPixels = ArrowEffects::GetYOffset( m_pPlayerState, 0, fStartBeat );
|
||||
float fYStartPos = ArrowEffects::GetYPos(0, fDrawDistanceAfterTargetsPixels, m_fYReverseOffsetPixels);
|
||||
float fYStartPos = ArrowEffects::GetYPos(m_pPlayerState, 0, fDrawDistanceAfterTargetsPixels, m_fYReverseOffsetPixels);
|
||||
float fDrawDistanceBeforeTargetsPixels = ArrowEffects::GetYOffset( m_pPlayerState, 0, fEndBeat );
|
||||
float fYEndPos= ArrowEffects::GetYPos(0, fDrawDistanceBeforeTargetsPixels, m_fYReverseOffsetPixels);
|
||||
float fYEndPos= ArrowEffects::GetYPos(m_pPlayerState, 0, fDrawDistanceBeforeTargetsPixels, m_fYReverseOffsetPixels);
|
||||
|
||||
// The caller should have clamped these to reasonable values
|
||||
ASSERT( fYStartPos > -1000 );
|
||||
@@ -546,8 +546,8 @@ void NoteField::set_text_measure_number_for_draw(
|
||||
const float horiz_align, const RageColor& color, const RageColor& glow)
|
||||
{
|
||||
const float y_offset= ArrowEffects::GetYOffset(m_pPlayerState, 0, beat);
|
||||
const float y_pos= ArrowEffects::GetYPos(0, y_offset, m_fYReverseOffsetPixels);
|
||||
const float zoom= ArrowEffects::GetZoom(m_pPlayerState);
|
||||
const float y_pos= ArrowEffects::GetYPos(m_pPlayerState, 0, y_offset, m_fYReverseOffsetPixels);
|
||||
const float zoom= ArrowEffects::GetZoom(m_pPlayerState, y_offset, 0);
|
||||
const float x_base= GetWidth() * .5f;
|
||||
x_offset*= zoom;
|
||||
|
||||
@@ -723,7 +723,7 @@ void NoteField::CalcPixelsBeforeAndAfterTargets()
|
||||
{
|
||||
const PlayerOptions& curr_options= m_pPlayerState->m_PlayerOptions.GetCurrent();
|
||||
// Adjust draw range depending on some effects
|
||||
m_FieldRenderArgs.draw_pixels_after_targets= m_iDrawDistanceAfterTargetsPixels;
|
||||
m_FieldRenderArgs.draw_pixels_after_targets= m_iDrawDistanceAfterTargetsPixels * (1.f + curr_options.m_fDrawSizeBack);
|
||||
// HACK: If boomerang and centered are on, then we want to draw much
|
||||
// earlier so that the notes don't pop on screen.
|
||||
float centered_times_boomerang=
|
||||
@@ -732,7 +732,7 @@ void NoteField::CalcPixelsBeforeAndAfterTargets()
|
||||
m_FieldRenderArgs.draw_pixels_after_targets +=
|
||||
int(SCALE(centered_times_boomerang, 0.f, 1.f, 0.f, -SCREEN_HEIGHT/2));
|
||||
m_FieldRenderArgs.draw_pixels_before_targets =
|
||||
m_iDrawDistanceBeforeTargetsPixels;
|
||||
m_iDrawDistanceBeforeTargetsPixels * (1.f + curr_options.m_fDrawSize);
|
||||
|
||||
float draw_scale= 1;
|
||||
draw_scale*= 1 + 0.5f * fabsf(curr_options.m_fPerspectiveTilt);
|
||||
|
||||
+398
-20
@@ -85,13 +85,27 @@ void PlayerOptions::Init()
|
||||
m_fRandomSpeed = 0; m_SpeedfRandomSpeed = 1.0f;
|
||||
m_fModTimerMult = 0; m_SpeedfModTimerMult = 1.0f;
|
||||
m_fModTimerOffset = 0; m_SpeedfModTimerOffset = 1.0f;
|
||||
m_fDrawSize = 0; m_SpeedfDrawSize = 1.0f;
|
||||
m_fDrawSizeBack = 0; m_SpeedfDrawSizeBack = 1.0f;
|
||||
ZERO( m_bTurns );
|
||||
ZERO( m_bTransforms );
|
||||
m_bMuteOnError = false;
|
||||
m_bStealthType = false;
|
||||
m_bStealthPastReceptors = false;
|
||||
m_bDizzyHolds = false;
|
||||
m_bZBuffer = false;
|
||||
m_sNoteSkin = "";
|
||||
ZERO( m_fMovesX ); ONE( m_SpeedfMovesX );
|
||||
ZERO( m_fMovesY ); ONE( m_SpeedfMovesY );
|
||||
ZERO( m_fMovesZ ); ONE( m_SpeedfMovesZ );
|
||||
ZERO( m_fConfusionX ); ONE( m_SpeedfConfusionX );
|
||||
ZERO( m_fConfusionY ); ONE( m_SpeedfConfusionY );
|
||||
ZERO( m_fConfusionZ ); ONE( m_SpeedfConfusionZ );
|
||||
ZERO( m_fDarks ); ONE( m_SpeedfDarks );
|
||||
ZERO( m_fStealth ); ONE( m_SpeedfStealth );
|
||||
ZERO( m_fTiny ); ONE( m_SpeedfTiny );
|
||||
ZERO( m_fBumpy ); ONE( m_SpeedfBumpy );
|
||||
ZERO( m_fReverse ); ONE( m_SpeedfReverse );
|
||||
|
||||
}
|
||||
|
||||
@@ -108,6 +122,8 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
|
||||
DO_COPY( m_BatteryLives );
|
||||
APPROACH( fModTimerMult );
|
||||
APPROACH( fModTimerOffset );
|
||||
APPROACH( fDrawSize );
|
||||
APPROACH( fDrawSizeBack );
|
||||
APPROACH( fTimeSpacing );
|
||||
APPROACH( fScrollSpeed );
|
||||
APPROACH( fMaxScrollBPM );
|
||||
@@ -136,6 +152,22 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
|
||||
APPROACH( fMovesY[i] );
|
||||
for( int i=0; i<16; i++)
|
||||
APPROACH( fMovesZ[i] );
|
||||
for( int i=0; i<16; i++)
|
||||
APPROACH( fConfusionX[i] );
|
||||
for( int i=0; i<16; i++)
|
||||
APPROACH( fConfusionY[i] );
|
||||
for( int i=0; i<16; i++)
|
||||
APPROACH( fConfusionZ[i] );
|
||||
for( int i=0; i<16; i++)
|
||||
APPROACH( fDarks[i] );
|
||||
for( int i=0; i<16; i++)
|
||||
APPROACH( fStealth[i] );
|
||||
for( int i=0; i<16; i++)
|
||||
APPROACH( fTiny[i] );
|
||||
for( int i=0; i<16; i++)
|
||||
APPROACH( fBumpy[i] );
|
||||
for( int i=0; i<16; i++)
|
||||
APPROACH( fReverse[i] );
|
||||
|
||||
DO_COPY( m_bSetScrollSpeed );
|
||||
for( int i=0; i<NUM_TURNS; i++ )
|
||||
@@ -143,6 +175,10 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
|
||||
for( int i=0; i<NUM_TRANSFORMS; i++ )
|
||||
DO_COPY( m_bTransforms[i] );
|
||||
DO_COPY( m_bMuteOnError );
|
||||
DO_COPY( m_bStealthType );
|
||||
DO_COPY( m_bStealthPastReceptors );
|
||||
DO_COPY( m_bDizzyHolds );
|
||||
DO_COPY( m_bZBuffer );
|
||||
DO_COPY( m_FailType );
|
||||
DO_COPY( m_MinTNSToHideNotes );
|
||||
DO_COPY( m_sNoteSkin );
|
||||
@@ -260,6 +296,15 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
||||
AddPart( AddTo, m_fEffects[EFFECT_DRUNK_Z_SPEED], "DrunkZSpeed" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_DRUNK_Z_OFFSET], "DrunkZOffset" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_DRUNK_Z_PERIOD], "DrunkZPeriod" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_SHRINK_TO_LINEAR], "ShrinkLinear" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_SHRINK_TO_MULT], "ShrinkMult" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_PULSE_INNER], "PulseInner" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_PULSE_OUTER], "PulseOuter" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_PULSE_PERIOD], "PulsePeriod" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_PULSE_OFFSET], "PulseOffset" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_ATTENUATE_X], "AttenuateX" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_ATTENUATE_Y], "AttenuateY" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_ATTENUATE_Z], "AttenuateZ" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_DIZZY], "Dizzy" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_CONFUSION], "Confusion" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_CONFUSION_OFFSET], "ConfusionOffset" );
|
||||
@@ -267,6 +312,12 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
||||
AddPart( AddTo, m_fEffects[EFFECT_CONFUSION_X_OFFSET], "ConfusionXOffset" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_CONFUSION_Y], "ConfusionY" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_CONFUSION_Y_OFFSET], "ConfusionYOffset" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_BOUNCE], "Bounce" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_BOUNCE_PERIOD], "BouncePeriod" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_BOUNCE_OFFSET], "BounceOffset" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_BOUNCE_Z], "BounceZ" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_BOUNCE_Z_PERIOD], "BounceZPeriod" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_BOUNCE_Z_OFFSET], "BounceZOffset" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_MINI], "Mini" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_TINY], "Tiny" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_FLIP], "Flip" );
|
||||
@@ -328,6 +379,10 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
||||
AddPart( AddTo, m_fEffects[EFFECT_XMODE], "XMode" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_TWIRL], "Twirl" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_ROLL], "Roll" );
|
||||
AddPart( AddTo, m_bStealthType, "StealthType" );
|
||||
AddPart( AddTo, m_bStealthPastReceptors, "StealthPastReceptors");
|
||||
AddPart( AddTo, m_bDizzyHolds, "DizzyHolds");
|
||||
AddPart( AddTo, m_bZBuffer, "ZBuffer");
|
||||
|
||||
for( int i=0; i<16; i++)
|
||||
{
|
||||
@@ -338,6 +393,22 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
||||
AddPart( AddTo, m_fMovesY[i], s );
|
||||
s = ssprintf( "MoveZ%d", i+1 );
|
||||
AddPart( AddTo, m_fMovesZ[i], s );
|
||||
s = ssprintf( "ConfusionOffset%d", i+1);
|
||||
AddPart( AddTo, m_fConfusionX[i], s );
|
||||
s = ssprintf( "ConfusionYOffset%d", i+1 );
|
||||
AddPart( AddTo, m_fConfusionY[i], s );
|
||||
s = ssprintf( "ConfusionZOffset%d", i+1 );
|
||||
AddPart( AddTo, m_fConfusionZ[i], s );
|
||||
s = ssprintf( "Dark%d", i+1 );
|
||||
AddPart( AddTo, m_fDarks[i], s );
|
||||
s = ssprintf( "Stealth%d", i+1 );
|
||||
AddPart( AddTo, m_fStealth[i], s );
|
||||
s = ssprintf( "Tiny%d", i+1 );
|
||||
AddPart( AddTo, m_fTiny[i], s );
|
||||
s = ssprintf( "Bumpy%d", i+1 );
|
||||
AddPart( AddTo, m_fBumpy[i], s );
|
||||
s = ssprintf( "Reverse%d", i+1 );
|
||||
AddPart( AddTo, m_fReverse[i], s );
|
||||
}
|
||||
|
||||
AddPart( AddTo, m_fAppearances[APPEARANCE_HIDDEN], "Hidden" );
|
||||
@@ -356,6 +427,8 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
||||
|
||||
AddPart( AddTo, m_fModTimerMult, "ModTimerMult" );
|
||||
AddPart( AddTo, m_fModTimerOffset, "ModTimerOffset" );
|
||||
AddPart( AddTo, m_fDrawSize, "DrawSize" );
|
||||
AddPart( AddTo, m_fDrawSizeBack, "DrawSizeBack" );
|
||||
|
||||
AddPart( AddTo, m_fDark, "Dark" );
|
||||
|
||||
@@ -469,6 +542,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
ASSERT_M( NOTESKIN != NULL, "The Noteskin Manager must be loaded in order to process mods." );
|
||||
|
||||
RString sBit = sOneMod;
|
||||
RString sMod = "";
|
||||
sBit.MakeLower();
|
||||
Trim( sBit );
|
||||
|
||||
@@ -580,6 +654,11 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
else if( sBit == "modtimermult" ) SET_FLOAT( fModTimerMult )
|
||||
else if( sBit == "modtimeroffset" ) SET_FLOAT( fModTimerOffset )
|
||||
}
|
||||
else if( sBit.find("drawsize") != sBit.npos)
|
||||
{
|
||||
if( sBit == "drawsize" ) SET_FLOAT( fDrawSize )
|
||||
else if( sBit == "drawsizeback" ) SET_FLOAT( fDrawSizeBack )
|
||||
}
|
||||
else if( sBit == "bar" ) { m_LifeType= LifeType_Bar; }
|
||||
else if( sBit == "battery" ) { m_LifeType= LifeType_Battery; }
|
||||
else if( sBit == "lifetime" ) { m_LifeType= LifeType_Time; }
|
||||
@@ -610,18 +689,100 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
else if( sBit == "drunkzoffset" ) SET_FLOAT( fEffects[EFFECT_DRUNK_Z_OFFSET] )
|
||||
else if( sBit == "drunkzperiod" ) SET_FLOAT( fEffects[EFFECT_DRUNK_Z_PERIOD] )
|
||||
}
|
||||
else if( sBit == "dizzy" ) SET_FLOAT( fEffects[EFFECT_DIZZY] )
|
||||
else if( sBit.find("shrink") != sBit.npos)
|
||||
{
|
||||
if( sBit == "shrinklinear" ) SET_FLOAT( fEffects[EFFECT_SHRINK_TO_LINEAR] )
|
||||
else if( sBit == "shrinkmult" ) SET_FLOAT( fEffects[EFFECT_SHRINK_TO_MULT] )
|
||||
}
|
||||
else if( sBit.find("pulse") != sBit.npos)
|
||||
{
|
||||
if( sBit == "pulseinner" ) SET_FLOAT( fEffects[EFFECT_PULSE_INNER] )
|
||||
else if( sBit == "pulseouter" ) SET_FLOAT( fEffects[EFFECT_PULSE_OUTER] )
|
||||
else if( sBit == "pulseoffset" ) SET_FLOAT( fEffects[EFFECT_PULSE_OFFSET] )
|
||||
else if( sBit == "pulseperiod" ) SET_FLOAT( fEffects[EFFECT_PULSE_PERIOD] )
|
||||
}
|
||||
else if( sBit.find("dizzy") != sBit.npos)
|
||||
{
|
||||
if( sBit == "dizzy" ) SET_FLOAT( fEffects[EFFECT_DIZZY] )
|
||||
else if( sBit == "dizzyholds" ) m_bDizzyHolds = on;
|
||||
}
|
||||
else if( sBit.find("confusion") != sBit.npos)
|
||||
{
|
||||
if( sBit.find("x") != sBit.npos)
|
||||
{
|
||||
if( sBit == "confusionx" ) SET_FLOAT( fEffects[EFFECT_CONFUSION_X] )
|
||||
else if( sBit == "confusionxoffset" ) SET_FLOAT( fEffects[EFFECT_CONFUSION_X_OFFSET] )
|
||||
else
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
sMod = ssprintf( "confusionxoffset%d", i+1 );
|
||||
if( sBit == sMod)
|
||||
{
|
||||
SET_FLOAT( fConfusionX[i] )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( sBit.find("y") != sBit.npos)
|
||||
{
|
||||
if( sBit == "confusiony" ) SET_FLOAT( fEffects[EFFECT_CONFUSION_Y] )
|
||||
else if( sBit == "confusionyoffset" ) SET_FLOAT( fEffects[EFFECT_CONFUSION_Y_OFFSET] )
|
||||
else
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
sMod = ssprintf( "confusionyoffset%d", i+1 );
|
||||
if( sBit == sMod)
|
||||
{
|
||||
SET_FLOAT( fConfusionY[i] )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if( sBit == "confusion" ) SET_FLOAT( fEffects[EFFECT_CONFUSION] )
|
||||
else if( sBit == "confusionoffset" ) SET_FLOAT( fEffects[EFFECT_CONFUSION_OFFSET] )
|
||||
else if( sBit == "confusionx" ) SET_FLOAT( fEffects[EFFECT_CONFUSION_X] )
|
||||
else if( sBit == "confusionxoffset" ) SET_FLOAT( fEffects[EFFECT_CONFUSION_X_OFFSET] )
|
||||
else if( sBit == "confusiony" ) SET_FLOAT( fEffects[EFFECT_CONFUSION_Y] )
|
||||
else if( sBit == "confusionyoffset" ) SET_FLOAT( fEffects[EFFECT_CONFUSION_Y_OFFSET] )
|
||||
else
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
sMod = ssprintf( "confusionoffset%d", i+1 );
|
||||
if( sBit == sMod)
|
||||
{
|
||||
SET_FLOAT( fConfusionZ[i] )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( sBit.find("bounce") != sBit.npos)
|
||||
{
|
||||
if( sBit == "bounce" ) SET_FLOAT( fEffects[EFFECT_BOUNCE] )
|
||||
else if( sBit == "bounceperiod" ) SET_FLOAT( fEffects[EFFECT_BOUNCE_PERIOD] )
|
||||
else if( sBit == "bounceoffset" ) SET_FLOAT( fEffects[EFFECT_BOUNCE_OFFSET] )
|
||||
else if( sBit == "bouncez" ) SET_FLOAT( fEffects[EFFECT_BOUNCE_Z] )
|
||||
else if( sBit == "bouncezperiod" ) SET_FLOAT( fEffects[EFFECT_BOUNCE_Z_PERIOD] )
|
||||
else if( sBit == "bouncezoffset" ) SET_FLOAT( fEffects[EFFECT_BOUNCE_Z_OFFSET] )
|
||||
}
|
||||
else if( sBit == "mini" ) SET_FLOAT( fEffects[EFFECT_MINI] )
|
||||
else if( sBit == "tiny" ) SET_FLOAT( fEffects[EFFECT_TINY] )
|
||||
else if ( sBit.find("tiny") != sBit.npos)
|
||||
{
|
||||
if( sBit == "tiny" ) SET_FLOAT( fEffects[EFFECT_TINY] )
|
||||
else
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
sMod = ssprintf( "tiny%d", i+1 );
|
||||
if( sBit == sMod)
|
||||
{
|
||||
SET_FLOAT( fTiny[i] )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( sBit == "flip" ) SET_FLOAT( fEffects[EFFECT_FLIP] )
|
||||
else if( sBit == "invert" ) SET_FLOAT( fEffects[EFFECT_INVERT] )
|
||||
else if( sBit.find("tornado") != sBit.npos)
|
||||
@@ -647,6 +808,18 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
else if( sBit == "bumpyx" ) SET_FLOAT( fEffects[EFFECT_BUMPY_X] )
|
||||
else if( sBit == "bumpyxoffset" ) SET_FLOAT( fEffects[EFFECT_BUMPY_X_OFFSET] )
|
||||
else if( sBit == "bumpyxperiod" ) SET_FLOAT( fEffects[EFFECT_BUMPY_X_PERIOD] )
|
||||
else
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
sMod = ssprintf( "bumpy%d", i+1 );
|
||||
if( sBit == sMod)
|
||||
{
|
||||
SET_FLOAT( fBumpy[i] )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( sBit.find("beat") != sBit.npos)
|
||||
{
|
||||
@@ -705,6 +878,12 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
else if( sBit == "parabolay" ) SET_FLOAT( fEffects[EFFECT_PARABOLA_Y] )
|
||||
else if( sBit == "parabolaz" ) SET_FLOAT( fEffects[EFFECT_PARABOLA_Z] )
|
||||
}
|
||||
else if( sBit.find("attenuate") != sBit.npos)
|
||||
{
|
||||
if( sBit == "attenuatex" ) SET_FLOAT( fEffects[EFFECT_ATTENUATE_X] )
|
||||
else if( sBit == "attenuatey" ) SET_FLOAT( fEffects[EFFECT_ATTENUATE_Y] )
|
||||
else if( sBit == "attenuatez" ) SET_FLOAT( fEffects[EFFECT_ATTENUATE_Z] )
|
||||
}
|
||||
else if( sBit == "xmode" ) SET_FLOAT( fEffects[EFFECT_XMODE] )
|
||||
else if( sBit == "twirl" ) SET_FLOAT( fEffects[EFFECT_TWIRL] )
|
||||
else if( sBit == "roll" ) SET_FLOAT( fEffects[EFFECT_ROLL] )
|
||||
@@ -712,7 +891,24 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
else if( sBit == "hiddenoffset" ) SET_FLOAT( fAppearances[APPEARANCE_HIDDEN_OFFSET] )
|
||||
else if( sBit == "sudden" ) SET_FLOAT( fAppearances[APPEARANCE_SUDDEN] )
|
||||
else if( sBit == "suddenoffset" ) SET_FLOAT( fAppearances[APPEARANCE_SUDDEN_OFFSET] )
|
||||
else if( sBit == "stealth" ) SET_FLOAT( fAppearances[APPEARANCE_STEALTH] )
|
||||
else if ( sBit.find("stealth") != sBit.npos)
|
||||
{
|
||||
if( sBit == "stealth" ) SET_FLOAT( fAppearances[APPEARANCE_STEALTH] )
|
||||
else if( sBit == "stealthtype" ) m_bStealthType = on;
|
||||
else if( sBit == "stealthpastreceptors" ) m_bStealthPastReceptors = on;
|
||||
else
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
sMod = ssprintf( "stealth%d", i+1 );
|
||||
if( sBit == sMod)
|
||||
{
|
||||
SET_FLOAT( fStealth[i] )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( sBit == "blink" ) SET_FLOAT( fAppearances[APPEARANCE_BLINK] )
|
||||
else if( sBit == "randomvanish" ) SET_FLOAT( fAppearances[APPEARANCE_RANDOMVANISH] )
|
||||
else if( sBit == "turn" && !on ) ZERO( m_bTurns ); /* "no turn" */
|
||||
@@ -740,7 +936,22 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
else if( sBit == "nojumps" ) m_bTransforms[TRANSFORM_NOJUMPS] = on;
|
||||
else if( sBit == "nohands" ) m_bTransforms[TRANSFORM_NOHANDS] = on;
|
||||
else if( sBit == "noquads" ) m_bTransforms[TRANSFORM_NOQUADS] = on;
|
||||
else if( sBit == "reverse" ) SET_FLOAT( fScrolls[SCROLL_REVERSE] )
|
||||
else if ( sBit.find("reverse") != sBit.npos)
|
||||
{
|
||||
if( sBit == "reverse" ) SET_FLOAT( fScrolls[SCROLL_REVERSE] )
|
||||
else
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
sMod = ssprintf( "reverse%d", i+1 );
|
||||
if( sBit == sMod)
|
||||
{
|
||||
SET_FLOAT( fReverse[i] )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( sBit == "split" ) SET_FLOAT( fScrolls[SCROLL_SPLIT] )
|
||||
else if( sBit == "alternate" ) SET_FLOAT( fScrolls[SCROLL_ALTERNATE] )
|
||||
else if( sBit == "cross" ) SET_FLOAT( fScrolls[SCROLL_CROSS] )
|
||||
@@ -751,7 +962,22 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
else if( sBit == "nostretch" ) m_bTransforms[TRANSFORM_NOSTRETCH] = on;
|
||||
else if( sBit == "nolifts" ) m_bTransforms[TRANSFORM_NOLIFTS] = on;
|
||||
else if( sBit == "nofakes" ) m_bTransforms[TRANSFORM_NOFAKES] = on;
|
||||
else if( sBit == "dark" ) SET_FLOAT( fDark )
|
||||
else if( sBit.find("dark") != sBit.npos )
|
||||
{
|
||||
if( sBit == "dark" ) SET_FLOAT( fDark )
|
||||
else
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
sMod = ssprintf( "dark%d", i+1 );
|
||||
if( sBit == sMod)
|
||||
{
|
||||
SET_FLOAT( fDarks[i] )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( sBit == "blind" ) SET_FLOAT( fBlind )
|
||||
else if( sBit == "cover" ) SET_FLOAT( fCover )
|
||||
else if( sBit == "randomattacks" ) SET_FLOAT( fRandAttack )
|
||||
@@ -791,17 +1017,44 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
|
||||
else if( sBit.find("move") != sBit.npos)
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
if (sBit.find("x") != sBit.npos)
|
||||
{
|
||||
RString s = ssprintf( "movex%d", i+1 );
|
||||
if( sBit == s) SET_FLOAT( fMovesX[i] )
|
||||
s = ssprintf( "movey%d", i+1 );
|
||||
if( sBit == s) SET_FLOAT( fMovesY[i] )
|
||||
s = ssprintf( "movez%d", i+1 );
|
||||
if( sBit == s) SET_FLOAT( fMovesZ[i] )
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
sMod = ssprintf( "movex%d", i+1 );
|
||||
if( sBit == sMod)
|
||||
{
|
||||
SET_FLOAT( fMovesX[i] )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sBit.find("y") != sBit.npos)
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
sMod = ssprintf( "movey%d", i+1 );
|
||||
if( sBit == sMod)
|
||||
{
|
||||
SET_FLOAT( fMovesY[i] )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sBit.find("z") != sBit.npos)
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
sMod = ssprintf( "movez%d", i+1 );
|
||||
if( sBit == sMod)
|
||||
{
|
||||
SET_FLOAT( fMovesZ[i] )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if( sBit == "zbuffer" ) m_bZBuffer = on;
|
||||
// deprecated mods/left in for compatibility
|
||||
else if( sBit == "converge" ) SET_FLOAT( fScrolls[SCROLL_CENTERED] )
|
||||
// end of the list
|
||||
@@ -987,6 +1240,7 @@ float PlayerOptions::GetReversePercentForColumn( int iCol ) const
|
||||
int iNumCols = GAMESTATE->GetCurrentStyle(m_pn)->m_iColsPerPlayer;
|
||||
|
||||
f += m_fScrolls[SCROLL_REVERSE];
|
||||
f += m_fReverse[iCol];
|
||||
|
||||
if( iCol >= iNumCols/2 )
|
||||
f += m_fScrolls[SCROLL_SPLIT];
|
||||
@@ -1014,6 +1268,8 @@ bool PlayerOptions::operator==( const PlayerOptions &other ) const
|
||||
COMPARE(m_ModTimerType);
|
||||
COMPARE(m_fModTimerMult);
|
||||
COMPARE(m_fModTimerOffset);
|
||||
COMPARE(m_fDrawSize);
|
||||
COMPARE(m_fDrawSizeBack);
|
||||
COMPARE(m_BatteryLives);
|
||||
COMPARE(m_fTimeSpacing);
|
||||
COMPARE(m_fScrollSpeed);
|
||||
@@ -1023,6 +1279,10 @@ bool PlayerOptions::operator==( const PlayerOptions &other ) const
|
||||
COMPARE(m_FailType);
|
||||
COMPARE(m_MinTNSToHideNotes);
|
||||
COMPARE(m_bMuteOnError);
|
||||
COMPARE(m_bStealthType);
|
||||
COMPARE(m_bStealthPastReceptors);
|
||||
COMPARE(m_bDizzyHolds);
|
||||
COMPARE(m_bZBuffer);
|
||||
COMPARE(m_fDark);
|
||||
COMPARE(m_fBlind);
|
||||
COMPARE(m_fCover);
|
||||
@@ -1057,6 +1317,22 @@ bool PlayerOptions::operator==( const PlayerOptions &other ) const
|
||||
COMPARE(m_fMovesY[i]);
|
||||
for( int i = 0; i < 16; ++i )
|
||||
COMPARE(m_fMovesZ[i]);
|
||||
for( int i = 0; i < 16; ++i )
|
||||
COMPARE(m_fConfusionX[i]);
|
||||
for( int i = 0; i < 16; ++i )
|
||||
COMPARE(m_fConfusionY[i]);
|
||||
for( int i = 0; i < 16; ++i )
|
||||
COMPARE(m_fConfusionZ[i]);
|
||||
for( int i = 0; i < 16; ++i )
|
||||
COMPARE(m_fDarks[i]);
|
||||
for( int i = 0; i < 16; ++i )
|
||||
COMPARE(m_fStealth[i]);
|
||||
for( int i = 0; i < 16; ++i )
|
||||
COMPARE(m_fTiny[i]);
|
||||
for( int i = 0; i < 16; ++i )
|
||||
COMPARE(m_fBumpy[i]);
|
||||
for( int i = 0; i < 16; ++i )
|
||||
COMPARE(m_fReverse[i]);
|
||||
#undef COMPARE
|
||||
return true;
|
||||
}
|
||||
@@ -1072,6 +1348,8 @@ PlayerOptions& PlayerOptions::operator=(PlayerOptions const& other)
|
||||
CPY(m_ModTimerType);
|
||||
CPY_SPEED(fModTimerMult);
|
||||
CPY_SPEED(fModTimerOffset);
|
||||
CPY_SPEED(fDrawSize);
|
||||
CPY_SPEED(fDrawSizeBack);
|
||||
CPY(m_BatteryLives);
|
||||
CPY_SPEED(fTimeSpacing);
|
||||
CPY_SPEED(fScrollSpeed);
|
||||
@@ -1081,6 +1359,10 @@ PlayerOptions& PlayerOptions::operator=(PlayerOptions const& other)
|
||||
CPY(m_FailType);
|
||||
CPY(m_MinTNSToHideNotes);
|
||||
CPY(m_bMuteOnError);
|
||||
CPY(m_bStealthType);
|
||||
CPY(m_bStealthPastReceptors);
|
||||
CPY(m_bDizzyHolds);
|
||||
CPY(m_bZBuffer);
|
||||
CPY_SPEED(fDark);
|
||||
CPY_SPEED(fBlind);
|
||||
CPY_SPEED(fCover);
|
||||
@@ -1120,15 +1402,47 @@ PlayerOptions& PlayerOptions::operator=(PlayerOptions const& other)
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY(m_fMovesX[i]);
|
||||
CPY_SPEED(fMovesX[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY(m_fMovesY[i]);
|
||||
CPY_SPEED(fMovesY[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY(m_fMovesZ[i]);
|
||||
CPY_SPEED(fMovesZ[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY_SPEED(fConfusionX[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY_SPEED(fConfusionY[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY_SPEED(fConfusionZ[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY_SPEED(fDarks[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY_SPEED(fStealth[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY_SPEED(fTiny[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY_SPEED(fBumpy[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY_SPEED(fReverse[i]);
|
||||
}
|
||||
#undef CPY
|
||||
#undef CPY_SPEED
|
||||
@@ -1311,6 +1625,12 @@ void PlayerOptions::ResetPrefs( ResetPrefsType type )
|
||||
CPY(m_ModTimerType);
|
||||
CPY(m_fModTimerMult);
|
||||
CPY(m_fModTimerOffset);
|
||||
CPY(m_fDrawSize);
|
||||
CPY(m_fDrawSizeBack);
|
||||
CPY(m_bStealthType);
|
||||
CPY(m_bStealthPastReceptors);
|
||||
CPY(m_bDizzyHolds);
|
||||
CPY(m_bZBuffer);
|
||||
CPY(m_MinTNSToHideNotes);
|
||||
|
||||
CPY( m_fPerspectiveTilt );
|
||||
@@ -1361,6 +1681,8 @@ public:
|
||||
INT_INTERFACE(BatteryLives, BatteryLives);
|
||||
FLOAT_INTERFACE(ModTimerMult, ModTimerMult, true);
|
||||
FLOAT_INTERFACE(ModTimerOffset, ModTimerOffset, true);
|
||||
FLOAT_INTERFACE(DrawSize, DrawSize, true);
|
||||
FLOAT_INTERFACE(DrawSizeBack, DrawSizeBack, true);
|
||||
FLOAT_INTERFACE(TimeSpacing, TimeSpacing, true);
|
||||
FLOAT_INTERFACE(MaxScrollBPM, MaxScrollBPM, true);
|
||||
FLOAT_INTERFACE(ScrollSpeed, ScrollSpeed, true);
|
||||
@@ -1381,12 +1703,27 @@ public:
|
||||
FLOAT_INTERFACE(DrunkZOffset, Effects[PlayerOptions::EFFECT_DRUNK_Z_OFFSET], true);
|
||||
FLOAT_INTERFACE(DrunkZPeriod, Effects[PlayerOptions::EFFECT_DRUNK_Z_PERIOD], true);
|
||||
FLOAT_INTERFACE(Dizzy, Effects[PlayerOptions::EFFECT_DIZZY], true);
|
||||
FLOAT_INTERFACE(AttenuateX, Effects[PlayerOptions::EFFECT_ATTENUATE_X], true);
|
||||
FLOAT_INTERFACE(AttenuateY, Effects[PlayerOptions::EFFECT_ATTENUATE_Y], true);
|
||||
FLOAT_INTERFACE(AttenuateZ, Effects[PlayerOptions::EFFECT_ATTENUATE_Z], true);
|
||||
FLOAT_INTERFACE(ShrinkLinear, Effects[PlayerOptions::EFFECT_SHRINK_TO_LINEAR], true);
|
||||
FLOAT_INTERFACE(ShrinkMult, Effects[PlayerOptions::EFFECT_SHRINK_TO_MULT], true);
|
||||
FLOAT_INTERFACE(PulseInner, Effects[PlayerOptions::EFFECT_PULSE_INNER], true);
|
||||
FLOAT_INTERFACE(PulseOuter, Effects[PlayerOptions::EFFECT_PULSE_OUTER], true);
|
||||
FLOAT_INTERFACE(PulsePeriod, Effects[PlayerOptions::EFFECT_PULSE_PERIOD], true);
|
||||
FLOAT_INTERFACE(PulseOffset, Effects[PlayerOptions::EFFECT_PULSE_OFFSET], true);
|
||||
FLOAT_INTERFACE(Confusion, Effects[PlayerOptions::EFFECT_CONFUSION], true);
|
||||
FLOAT_INTERFACE(ConfusionOffset, Effects[PlayerOptions::EFFECT_CONFUSION_OFFSET], true);
|
||||
FLOAT_INTERFACE(ConfusionX, Effects[PlayerOptions::EFFECT_CONFUSION_X], true);
|
||||
FLOAT_INTERFACE(ConfusionXOffset, Effects[PlayerOptions::EFFECT_CONFUSION_X_OFFSET], true);
|
||||
FLOAT_INTERFACE(ConfusionY, Effects[PlayerOptions::EFFECT_CONFUSION_Y], true);
|
||||
FLOAT_INTERFACE(ConfusionYOffset, Effects[PlayerOptions::EFFECT_CONFUSION_Y_OFFSET], true);
|
||||
FLOAT_INTERFACE(Bounce, Effects[PlayerOptions::EFFECT_BOUNCE], true);
|
||||
FLOAT_INTERFACE(BouncePeriod, Effects[PlayerOptions::EFFECT_BOUNCE_PERIOD], true);
|
||||
FLOAT_INTERFACE(BounceOffset, Effects[PlayerOptions::EFFECT_BOUNCE_OFFSET], true);
|
||||
FLOAT_INTERFACE(BounceZ, Effects[PlayerOptions::EFFECT_BOUNCE_Z], true);
|
||||
FLOAT_INTERFACE(BounceZPeriod, Effects[PlayerOptions::EFFECT_BOUNCE_Z_PERIOD], true);
|
||||
FLOAT_INTERFACE(BounceZOffset, Effects[PlayerOptions::EFFECT_BOUNCE_Z_OFFSET], true);
|
||||
FLOAT_INTERFACE(Mini, Effects[PlayerOptions::EFFECT_MINI], true);
|
||||
FLOAT_INTERFACE(Tiny, Effects[PlayerOptions::EFFECT_TINY], true);
|
||||
FLOAT_INTERFACE(Flip, Effects[PlayerOptions::EFFECT_FLIP], true);
|
||||
@@ -1474,7 +1811,19 @@ public:
|
||||
MULTICOL_FLOAT_INTERFACE(MoveX, MovesX, true);
|
||||
MULTICOL_FLOAT_INTERFACE(MoveY, MovesY, true);
|
||||
MULTICOL_FLOAT_INTERFACE(MoveZ, MovesZ, true);
|
||||
MULTICOL_FLOAT_INTERFACE(ConfusionXOffset, ConfusionX, true);
|
||||
MULTICOL_FLOAT_INTERFACE(ConfusionYOffset, ConfusionY, true);
|
||||
MULTICOL_FLOAT_INTERFACE(ConfusionOffset, ConfusionZ, true);
|
||||
MULTICOL_FLOAT_INTERFACE(Dark, Darks, true);
|
||||
MULTICOL_FLOAT_INTERFACE(Stealth, Stealth, true);
|
||||
MULTICOL_FLOAT_INTERFACE(Tiny, Tiny, true);
|
||||
MULTICOL_FLOAT_INTERFACE(Bumpy, Bumpy, true);
|
||||
MULTICOL_FLOAT_INTERFACE(Reverse, Reverse, true);
|
||||
|
||||
BOOL_INTERFACE(StealthType, StealthType);
|
||||
BOOL_INTERFACE(StealthPastReceptors, StealthPastReceptors);
|
||||
BOOL_INTERFACE(DizzyHolds, DizzyHolds);
|
||||
BOOL_INTERFACE(ZBuffer, ZBuffer);
|
||||
BOOL_INTERFACE(TurnNone, Turns[PlayerOptions::TURN_NONE]);
|
||||
BOOL_INTERFACE(Mirror, Turns[PlayerOptions::TURN_MIRROR]);
|
||||
BOOL_INTERFACE(Backwards, Turns[PlayerOptions::TURN_BACKWARDS]);
|
||||
@@ -1818,6 +2167,8 @@ public:
|
||||
ADD_METHOD(ModTimerSetting);
|
||||
ADD_METHOD(ModTimerMult);
|
||||
ADD_METHOD(ModTimerOffset);
|
||||
ADD_METHOD(DrawSize);
|
||||
ADD_METHOD(DrawSizeBack);
|
||||
ADD_METHOD(BatteryLives);
|
||||
ADD_METHOD(TimeSpacing);
|
||||
ADD_METHOD(MaxScrollBPM);
|
||||
@@ -1839,12 +2190,27 @@ public:
|
||||
ADD_METHOD(DrunkZOffset);
|
||||
ADD_METHOD(DrunkZPeriod);
|
||||
ADD_METHOD(Dizzy);
|
||||
ADD_METHOD(ShrinkLinear);
|
||||
ADD_METHOD(ShrinkMult);
|
||||
ADD_METHOD(PulseInner);
|
||||
ADD_METHOD(PulseOuter);
|
||||
ADD_METHOD(PulseOffset);
|
||||
ADD_METHOD(PulsePeriod);
|
||||
ADD_METHOD(AttenuateX);
|
||||
ADD_METHOD(AttenuateY);
|
||||
ADD_METHOD(AttenuateZ);
|
||||
ADD_METHOD(Confusion);
|
||||
ADD_METHOD(ConfusionOffset);
|
||||
ADD_METHOD(ConfusionX);
|
||||
ADD_METHOD(ConfusionXOffset);
|
||||
ADD_METHOD(ConfusionY);
|
||||
ADD_METHOD(ConfusionYOffset);
|
||||
ADD_METHOD(Bounce);
|
||||
ADD_METHOD(BouncePeriod);
|
||||
ADD_METHOD(BounceOffset);
|
||||
ADD_METHOD(BounceZ);
|
||||
ADD_METHOD(BounceZPeriod);
|
||||
ADD_METHOD(BounceZOffset);
|
||||
ADD_METHOD(Mini);
|
||||
ADD_METHOD(Tiny);
|
||||
ADD_METHOD(Flip);
|
||||
@@ -1921,6 +2287,10 @@ public:
|
||||
ADD_METHOD(Dark);
|
||||
ADD_METHOD(Blind);
|
||||
ADD_METHOD(Cover);
|
||||
ADD_METHOD(StealthType);
|
||||
ADD_METHOD(StealthPastReceptors);
|
||||
ADD_METHOD(DizzyHolds);
|
||||
ADD_METHOD(ZBuffer);
|
||||
ADD_METHOD(RandAttack);
|
||||
ADD_METHOD(NoAttack);
|
||||
ADD_METHOD(PlayerAutoPlay);
|
||||
@@ -1964,6 +2334,14 @@ public:
|
||||
ADD_MULTICOL_METHOD(MoveX);
|
||||
ADD_MULTICOL_METHOD(MoveY);
|
||||
ADD_MULTICOL_METHOD(MoveZ);
|
||||
ADD_MULTICOL_METHOD(ConfusionOffset);
|
||||
ADD_MULTICOL_METHOD(ConfusionXOffset);
|
||||
ADD_MULTICOL_METHOD(ConfusionYOffset);
|
||||
ADD_MULTICOL_METHOD(Dark);
|
||||
ADD_MULTICOL_METHOD(Stealth);
|
||||
ADD_MULTICOL_METHOD(Tiny);
|
||||
ADD_MULTICOL_METHOD(Bumpy);
|
||||
ADD_MULTICOL_METHOD(Reverse);
|
||||
|
||||
|
||||
ADD_METHOD(NoteSkin);
|
||||
|
||||
@@ -78,7 +78,11 @@ public:
|
||||
m_fRandomSpeed(0), m_SpeedfRandomSpeed(1.0f),
|
||||
m_fModTimerMult(0), m_SpeedfModTimerMult(1.0f),
|
||||
m_fModTimerOffset(0), m_SpeedfModTimerOffset(1.0f),
|
||||
m_fDrawSize(0), m_SpeedfDrawSize(1.0f),
|
||||
m_fDrawSizeBack(0), m_SpeedfDrawSizeBack(1.0f),
|
||||
m_bMuteOnError(false), m_FailType(FailType_Immediate),
|
||||
m_bStealthType(false), m_bStealthPastReceptors(false),
|
||||
m_bDizzyHolds(false), m_bZBuffer(false),
|
||||
m_MinTNSToHideNotes(PREFSMAN->m_MinTNSToHideNotes)
|
||||
{
|
||||
m_sNoteSkin = "";
|
||||
@@ -90,6 +94,14 @@ public:
|
||||
ZERO( m_fMovesX ); ONE( m_SpeedfMovesX );
|
||||
ZERO( m_fMovesY ); ONE( m_SpeedfMovesY );
|
||||
ZERO( m_fMovesZ ); ONE( m_SpeedfMovesZ );
|
||||
ZERO( m_fConfusionX ); ONE( m_SpeedfConfusionX );
|
||||
ZERO( m_fConfusionY ); ONE( m_SpeedfConfusionY );
|
||||
ZERO( m_fConfusionZ ); ONE( m_SpeedfConfusionZ );
|
||||
ZERO( m_fDarks ); ONE( m_SpeedfDarks );
|
||||
ZERO( m_fStealth ); ONE( m_SpeedfStealth );
|
||||
ZERO( m_fTiny ); ONE( m_SpeedfTiny );
|
||||
ZERO( m_fBumpy ); ONE( m_SpeedfBumpy );
|
||||
ZERO( m_fReverse ); ONE( m_SpeedfReverse );
|
||||
};
|
||||
void Init();
|
||||
void Approach( const PlayerOptions& other, float fDeltaSeconds );
|
||||
@@ -138,12 +150,27 @@ public:
|
||||
EFFECT_DRUNK_Z_OFFSET,
|
||||
EFFECT_DRUNK_Z_PERIOD,
|
||||
EFFECT_DIZZY,
|
||||
EFFECT_ATTENUATE_X,
|
||||
EFFECT_ATTENUATE_Y,
|
||||
EFFECT_ATTENUATE_Z,
|
||||
EFFECT_SHRINK_TO_MULT,
|
||||
EFFECT_SHRINK_TO_LINEAR,
|
||||
EFFECT_PULSE_INNER,
|
||||
EFFECT_PULSE_OUTER,
|
||||
EFFECT_PULSE_OFFSET,
|
||||
EFFECT_PULSE_PERIOD,
|
||||
EFFECT_CONFUSION,
|
||||
EFFECT_CONFUSION_OFFSET,
|
||||
EFFECT_CONFUSION_X,
|
||||
EFFECT_CONFUSION_X_OFFSET,
|
||||
EFFECT_CONFUSION_Y,
|
||||
EFFECT_CONFUSION_Y_OFFSET,
|
||||
EFFECT_BOUNCE,
|
||||
EFFECT_BOUNCE_PERIOD,
|
||||
EFFECT_BOUNCE_OFFSET,
|
||||
EFFECT_BOUNCE_Z,
|
||||
EFFECT_BOUNCE_Z_PERIOD,
|
||||
EFFECT_BOUNCE_Z_OFFSET,
|
||||
EFFECT_MINI,
|
||||
EFFECT_TINY,
|
||||
EFFECT_FLIP,
|
||||
@@ -300,14 +327,28 @@ public:
|
||||
float m_fRandomSpeed, m_SpeedfRandomSpeed;
|
||||
float m_fModTimerMult, m_SpeedfModTimerMult;
|
||||
float m_fModTimerOffset, m_SpeedfModTimerOffset;
|
||||
float m_fDrawSize, m_SpeedfDrawSize;
|
||||
float m_fDrawSizeBack, m_SpeedfDrawSizeBack;
|
||||
/* The maximum column number is 16.*/
|
||||
float m_fMovesX[16], m_SpeedfMovesX[16];
|
||||
float m_fMovesY[16], m_SpeedfMovesY[16];
|
||||
float m_fMovesZ[16], m_SpeedfMovesZ[16];
|
||||
float m_fConfusionX[16], m_SpeedfConfusionX[16];
|
||||
float m_fConfusionY[16], m_SpeedfConfusionY[16];
|
||||
float m_fConfusionZ[16], m_SpeedfConfusionZ[16];
|
||||
float m_fDarks[16], m_SpeedfDarks[16];
|
||||
float m_fStealth[16], m_SpeedfStealth[16];
|
||||
float m_fTiny[16], m_SpeedfTiny[16];
|
||||
float m_fBumpy[16], m_SpeedfBumpy[16];
|
||||
float m_fReverse[16], m_SpeedfReverse[16];
|
||||
|
||||
bool m_bTurns[NUM_TURNS];
|
||||
bool m_bTransforms[NUM_TRANSFORMS];
|
||||
bool m_bMuteOnError;
|
||||
bool m_bStealthType;
|
||||
bool m_bStealthPastReceptors;
|
||||
bool m_bDizzyHolds;
|
||||
bool m_bZBuffer;
|
||||
/** @brief The method for which a player can fail a song. */
|
||||
FailType m_FailType;
|
||||
TapNoteScore m_MinTNSToHideNotes;
|
||||
|
||||
@@ -62,7 +62,9 @@ void ReceptorArrowRow::Update( float fDeltaTime )
|
||||
for( unsigned c=0; c<m_ReceptorArrow.size(); c++ )
|
||||
{
|
||||
// m_fDark==1 or m_fFadeToFailPercent==1 should make fBaseAlpha==0
|
||||
float fBaseAlpha = (1 - m_pPlayerState->m_PlayerOptions.GetCurrent().m_fDark);
|
||||
float fBaseAlpha = (1 - m_pPlayerState->m_PlayerOptions.GetCurrent().m_fDark
|
||||
- m_pPlayerState->m_PlayerOptions.GetCurrent().m_fDarks[c]
|
||||
);
|
||||
if( m_fFadeToFailPercent != -1 )
|
||||
{
|
||||
fBaseAlpha *= (1 - m_fFadeToFailPercent);
|
||||
|
||||
Reference in New Issue
Block a user