Merge pull request #148 from kyzentun/player_options_fix

Player options fix
This commit is contained in:
AJ Kelly
2014-05-02 02:51:41 -05:00
19 changed files with 811 additions and 1055 deletions
+97 -151
View File
@@ -971,159 +971,98 @@
<Function name='GetStepsQueueWrapped'/>
</Class>
<Class name='PlayerOptions'>
<Function name='GetAlternate'/>
<Function name='GetAttackMines'/>
<Function name='GetBMRize'/>
<Function name='GetBackwards'/>
<Function name='GetBeat'/>
<Function name='GetBig'/>
<Function name='GetBlind'/>
<Function name='GetBlink'/>
<Function name='GetBoomerang'/>
<Function name='GetBoost'/>
<Function name='GetBrake'/>
<Function name='GetBumpy'/>
<Function name='GetCMod'/>
<Function name='GetCentered'/>
<Function name='GetConfusion'/>
<Function name='GetCover'/>
<Function name='GetCross'/>
<Function name='GetDark'/>
<Function name='GetDizzy'/>
<Function name='GetDrunk'/>
<Function name='GetEcho'/>
<Function name='GetExpand'/>
<Function name='GetFlip'/>
<Function name='GetFloored'/>
<Function name='GetHidden'/>
<Function name='GetHiddenOffset'/>
<Function name='GetHoldRolls'/>
<Function name='GetInvert'/>
<Function name='GetLeft'/>
<Function name='GetLittle'/>
<Function name='GetMMod'/>
<Function name='GetMines'/>
<Function name='GetMini'/>
<Function name='GetMirror'/>
<Function name='GetMuteOnError'/>
<Function name='GetNoAttacks'/>
<Function name='GetNoFakes'/>
<Function name='GetNoHands'/>
<Function name='GetNoHolds'/>
<Function name='GetNoJumps'/>
<Function name='GetNoLifts'/>
<Function name='GetNoMines'/>
<Function name='GetNoQuads'/>
<Function name='GetNoRolls'/>
<Function name='GetNoStretch'/>
<Function name='GetNoteSkin'/>
<Function name='GetPassmark'/>
<Function name='GetPlanted'/>
<Function name='GetQuick'/>
<Function name='GetRandomAttacks'/>
<Function name='GetRandomSpeed'/>
<Function name='GetRandomVanish'/>
<Function name='GetReverse'/>
<Function name='GetReversePercentForColumn'/>
<Function name='GetRight'/>
<Function name='GetRoll'/>
<Function name='GetShuffle'/>
<Function name='GetSkew'/>
<Function name='GetSkippy'/>
<Function name='GetSoftShuffle'/>
<Function name='GetSongAttacks'/>
<Function name='GetSplit'/>
<Function name='GetStealth'/>
<Function name='GetStepAttacks'/>
<Function name='GetStomp'/>
<Function name='GetSudden'/>
<Function name='GetSuddenOffset'/>
<Function name='GetSuperShuffle'/>
<Function name='GetTiny'/>
<Function name='GetTipsy'/>
<Function name='GetTornado'/>
<Function name='GetTwirl'/>
<Function name='GetTwister'/>
<Function name='GetWave'/>
<Function name='GetWide'/>
<Function name='GetXMod'/>
<Function name='GetXMode'/>
<Function name='IsEasierForCourseAndTrail'/>
<Function name='IsEasierForSongAndSteps'/>
<Function name='SetAlternate'/>
<Function name='SetAttackMines'/>
<Function name='SetBMRize'/>
<Function name='SetBackwards'/>
<Function name='SetBeat'/>
<Function name='SetBig'/>
<Function name='SetBlind'/>
<Function name='SetBlink'/>
<Function name='SetBoomerang'/>
<Function name='SetBoost'/>
<Function name='SetBrake'/>
<Function name='SetBumpy'/>
<Function name='SetCMod'/>
<Function name='SetCentered'/>
<Function name='SetConfusion'/>
<Function name='SetCover'/>
<Function name='SetCross'/>
<Function name='SetDark'/>
<Function name='SetDizzy'/>
<Function name='SetDrunk'/>
<Function name='SetEcho'/>
<Function name='SetExpand'/>
<Function name='SetFlip'/>
<Function name='SetFloored'/>
<Function name='SetHidden'/>
<Function name='SetHiddenOffset'/>
<Function name='SetHoldRolls'/>
<Function name='SetInvert'/>
<Function name='SetLeft'/>
<Function name='SetLittle'/>
<Function name='SetMMod'/>
<Function name='SetMines'/>
<Function name='SetMini'/>
<Function name='SetMirror'/>
<Function name='SetMuteOnError'/>
<Function name='SetNoFakes'/>
<Function name='SetNoHands'/>
<Function name='SetNoHolds'/>
<Function name='SetNoJumps'/>
<Function name='SetNoLifts'/>
<Function name='SetNoMines'/>
<Function name='SetNoQuads'/>
<Function name='SetNoRolls'/>
<Function name='SetNoStretch'/>
<Function name='SetNoteSkin'/>
<Function name='SetPassmark'/>
<Function name='SetPlanted'/>
<Function name='SetQuick'/>
<Function name='SetRandomAttacks'/>
<Function name='SetRandomSpeed'/>
<Function name='SetRandomVanish'/>
<Function name='SetReverse'/>
<Function name='SetRight'/>
<Function name='SetRoll'/>
<Function name='SetShuffle'/>
<Function name='SetSkew'/>
<Function name='SetSkippy'/>
<Function name='SetSoftShuffle'/>
<Function name='SetSplit'/>
<Function name='SetStealth'/>
<Function name='SetStomp'/>
<Function name='SetSudden'/>
<Function name='SetSuddenOffset'/>
<Function name='SetSuperShuffle'/>
<Function name='SetTiny'/>
<Function name='SetTipsy'/>
<Function name='SetTornado'/>
<Function name='SetTwirl'/>
<Function name='SetTwister'/>
<Function name='SetWave'/>
<Function name='SetWide'/>
<Function name='SetXMod'/>
<Function name='SetXMode'/>
<Function name='IsEasierForCourseAndTrail'/>
<Function name='TimeSpacing'/>
<Function name='MaxScrollBPM'/>
<Function name='ScrollSpeed'/>
<Function name='ScrollBPM'/>
<Function name='Boost'/>
<Function name='Brake'/>
<Function name='Wave'/>
<Function name='Expand'/>
<Function name='Boomerang'/>
<Function name='Drunk'/>
<Function name='Dizzy'/>
<Function name='Confusion'/>
<Function name='Mini'/>
<Function name='Tiny'/>
<Function name='Flip'/>
<Function name='Invert'/>
<Function name='Tornado'/>
<Function name='Tipsy'/>
<Function name='Bumpy'/>
<Function name='Beat'/>
<Function name='Xmode'/>
<Function name='Twirl'/>
<Function name='Roll'/>
<Function name='Hidden'/>
<Function name='HIddenOffset'/>
<Function name='Sudden'/>
<Function name='SuddenOffset'/>
<Function name='Stealth'/>
<Function name='Blink'/>
<Function name='RandomVanish'/>
<Function name='Reverse'/>
<Function name='Split'/>
<Function name='Alternate'/>
<Function name='Cross'/>
<Function name='Centered'/>
<Function name='Dark'/>
<Function name='Blind'/>
<Function name='Cover'/>
<Function name='RandAttack'/>
<Function name='NoAttack'/>
<Function name='PlayerAutoPlay'/>
<Function name='Tilt'/>
<Function name='Skew'/>
<Function name='Passmark'/>
<Function name='RandomSpeed'/>
<Function name='TurnNone'/>
<Function name='Mirror'/>
<Function name='Backwards'/>
<Function name='Left'/>
<Function name='Right'/>
<Function name='Shuffle'/>
<Function name='SoftShuffle'/>
<Function name='SuperShuffle'/>
<Function name='NoHolds'/>
<Function name='NoRolls'/>
<Function name='NoMines'/>
<Function name='Little'/>
<Function name='Wide'/>
<Function name='Big'/>
<Function name='Quick'/>
<Function name='BMRize'/>
<Function name='Skippy'/>
<Function name='Mines'/>
<Function name='AttackMines'/>
<Function name='Echo'/>
<Function name='Stomp'/>
<Function name='Planted'/>
<Function name='Floored'/>
<Function name='Twister'/>
<Function name='HoldRolls'/>
<Function name='NoJumps'/>
<Function name='NoHands'/>
<Function name='NoLifts'/>
<Function name='NoFakes'/>
<Function name='NoQuads'/>
<Function name='NoStretch'/>
<Function name='MuteOnError'/>
<Function name='NoteSkin'/>
<Function name='FailSetting'/>
<Function name='CMod'/>
<Function name='XMod'/>
<Function name='MMod'/>
<Function name='Overhead'/>
<Function name='Incoming'/>
<Function name='Space'/>
<Function name='Hallway'/>
<Function name='Distant'/>
<Function name='UsingReverse'/>
<Function name='GetReversePercentForColumn'/>
<Function name='GetStepAttacks'/>
</Class>
<Class name='PlayerStageStats'>
<Function name='FailPlayer'/>
@@ -1919,6 +1858,12 @@
<EnumValue name='&apos;EditState_RecordPaused&apos;' value='2'/>
<EnumValue name='&apos;EditState_Playing&apos;' value='3'/>
</Enum>
<Enum name='FailType'>
<EnumValue name='&apos;FailType_Immediate&apos;' value='0'/>
<EnumValue name='&apos;FailType_ImmediateContinue&apos;' value='0'/>
<EnumValue name='&apos;FailType_EndOfSong&apos;' value='0'/>
<EnumValue name='&apos;FailType_Off&apos;' value='0'/>
</Enum>
<Enum name='FileType'>
<EnumValue name='&apos;FileType_Bitmap&apos;' value='0'/>
<EnumValue name='&apos;FileType_Sound&apos;' value='1'/>
@@ -2035,6 +1980,7 @@
<EnumValue name='&apos;ModsLevel_Preferred&apos;' value='0'/>
<EnumValue name='&apos;ModsLevel_Stage&apos;' value='1'/>
<EnumValue name='&apos;ModsLevel_Song&apos;' value='2'/>
<EnumValue name='&apos;ModsLevel_Current&apos;' value='2'/>
</Enum>
<Enum name='Month'>
<EnumValue name='&apos;Month_January&apos;' value='0'/>
+177 -450
View File
@@ -2829,466 +2829,193 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='PlayerOptions'>
<Function name='GetAlternate' return='float' arguments=''>
Returns the value of the Alternate modifier.
</Function>
<Function name='SetAlternate' return='void' arguments='float fAlternate'>
Sets the value of the Alternate modifier.
</Function>
<Function name='GetAttackMines' return='bool' arguments=''>
Returns the status of the Attack Mines modifier.
</Function>
<Function name='SetAttackMines' return='void' arguments='bool bAttackMines'>
Sets the Attack Mines modifier.
</Function>
<Function name='GetBackwards' return='bool' arguments=''>
Returns <code>true</code> if the Backwards modifier is applied.
</Function>
<Function name='SetBackwards' return='void' arguments='bool bBackwards'>
Sets the Backwards modifier.
</Function>
<Function name='GetBeat' return='float' arguments=''>
Returns the value of the Beat modifier.
</Function>
<Function name='SetBeat' return='void' arguments='float fBeat'>
Sets the value for the Beat modifier.
</Function>
<Function name='GetBig' return='bool' arguments=''>
Returns the status of the Big modifier.
</Function>
<Function name='SetBig' return='void' arguments='bool bBig'>
Sets the Big modifier.
</Function>
<Function name='GetBlind' return='float' arguments=''>
Returns the value of the Blind modifier.
</Function>
<Function name='SetBlind' return='void' arguments='float fBlind'>
Sets the value for the Blind modifier.
</Function>
<Function name='GetBlink' return='float' arguments=''>
Returns the value of the Blink modifier.
</Function>
<Function name='SetBlink' return='void' arguments='float fBlink'>
Sets the value for the Blink modifier.
</Function>
<Function name='GetBMRize' return='bool' arguments=''>
Returns the status of the BMRize modifier.
</Function>
<Function name='SetBMRize' return='void' arguments='bool bBMRize'>
Sets the BMRize modifier.
</Function>
<Function name='GetBoomerang' return='float' arguments=''>
Returns the value of the Boomerang modifier.
</Function>
<Function name='SetBoomerang' return='void' arguments='float fBoomerang'>
Sets the value for the Boomerang modifier.
</Function>
<Function name='GetBoost' return='float' arguments=''>
Returns the value of the Boost modifier.
</Function>
<Function name='SetBoost' return='void' arguments='float fBoost'>
Sets the value for the Boost modifier.
</Function>
<Function name='GetBrake' return='float' arguments=''>
Returns the value of the Brake modifier.
</Function>
<Function name='SetBrake' return='void' arguments='float fBrake'>
Sets the value for the Brake modifier.
</Function>
<Function name='GetBumpy' return='float' arguments=''>
Returns the value of the Bumpy modifier.
</Function>
<Function name='SetBumpy' return='void' arguments='float fBumpy'>
Sets the value for the Bumpy modifier.
</Function>
<Function name='GetCentered' return='float' arguments=''>
Returns the value of the Centered modifier.
</Function>
<Function name='SetCentered' return='void' arguments='float fCentered'>
Sets the value for the Centered modifier.
</Function>
<Function name='GetCMod' return='float' arguments=''>
Returns the player's C-mod.
</Function>
<Function name='SetCMod' return='void' arguments='float fCmod'>
Sets the player's C-mod to <code>fCmod</code>.
</Function>
<Function name='GetConfusion' return='float' arguments=''>
Returns the value of the Confusion modifier.
</Function>
<Function name='SetConfusion' return='void' arguments='float fConfusion'>
Sets the value for the Confusion modifier.
</Function>
<Function name='GetCover' return='float' arguments=''>
Returns the value of the Cover modifier.
</Function>
<Function name='SetCover' return='void' arguments='float fCover'>
Sets the value for the Cover modifier.
</Function>
<Function name='GetCross' return='float' arguments=''>
Returns the value of the Cross modifier.
</Function>
<Function name='SetCross' return='void' arguments='float fCross'>
Sets the value for the Cross modifier.
</Function>
<Function name='GetDark' return='float' arguments=''>
Returns the value of the Dark modifier.
</Function>
<Function name='SetDark' return='void' arguments='float fDark'>
Sets the value for the Dark modifier.
</Function>
<Function name='GetDizzy' return='float' arguments=''>
Returns the value of the Dizzy modifier.
</Function>
<Function name='SetDizzy' return='void' arguments='float fDizzy'>
Sets the value for the Dizzy modifier.
</Function>
<Function name='GetDrunk' return='float' arguments=''>
Returns the value of the Drunk modifier.
</Function>
<Function name='SetDrunk' return='void' arguments='float fDrunk'>
Sets the value for the Drunk modifier.
</Function>
<Function name='GetEcho' return='bool' arguments=''>
Returns the status of the Echo modifier.
</Function>
<Function name='SetEcho' return='void' arguments='bool bEcho'>
Sets the Echo modifier.
</Function>
<Function name='GetExpand' return='float' arguments=''>
Returns the value of the Expand modifier.
</Function>
<Function name='SetExpand' return='void' arguments='float fExpand'>
Sets the value for the Expand modifier.
</Function>
<Function name='GetFlip' return='float' arguments=''>
Returns the value of the Flip modifier.
</Function>
<Function name='SetFlip' return='void' arguments='float fFlip'>
Sets the value for the Flip modifier.
</Function>
<Function name='GetFloored' return='bool' arguments=''>
Returns the status of the Floored modifier.
</Function>
<Function name='SetFloored' return='void' arguments='bool bFloored'>
Sets the Floored modifier.
</Function>
<Function name='GetHidden' return='float' arguments=''>
Returns the value of the Hidden modifier.
</Function>
<Function name='SetHidden' return='void' arguments='float fHidden'>
Sets the value for the Hidden modifier.
</Function>
<Function name='GetHiddenOffset' return='float' arguments=''>
Returns the value of the Hidden Offset modifier.
</Function>
<Function name='SetHiddenOffset' return='void' arguments='float fHiddenOffset'>
Sets the value for the Hidden Offset modifier.
</Function>
<Function name='GetHoldRolls' return='bool' arguments=''>
Returns <code>true</code> if Holds will be converted to Rolls.
</Function>
<Function name='SetHoldRolls' return='void' arguments='bool bHoldsRolls'>
If <code>true</code>, Holds will be converted to Rolls.
</Function>
<Function name='GetInvert' return='float' arguments=''>
Returns the value of the Invert modifier.
</Function>
<Function name='SetInvert' return='void' arguments='float fInvert'>
Sets the value for the Invert modifier.
</Function>
<Function name='GetLeft' return='bool' arguments=''>
Returns the status of the Left modifier.
</Function>
<Function name='SetLeft' return='void' arguments='bool bLeft'>
Sets the Left modifier.
</Function>
<Function name='GetLittle' return='bool' arguments=''>
Returns the status of the Little modifier.
</Function>
<Function name='SetLittle' return='void' arguments='bool bLittle'>
Sets the Little modifier.
</Function>
<Function name='GetMines' return='bool' arguments=''>
Returns the status of the Mines modifier.
</Function>
<Function name='SetMines' return='void' arguments='bool bMines'>
Sets the Mines modifier.
</Function>
<Function name='GetMini' return='float' arguments=''>
Returns the value of the Mini modifier.
</Function>
<Function name='SetMini' return='void' arguments='float fMini'>
Sets the value for the Mini modifier.
</Function>
<Function name='GetMirror' return='bool' arguments=''>
Returns <code>true</code> if the Mirror modifier is applied.
</Function>
<Function name='SetMirror' return='void' arguments='bool bMirror'>
Sets the Mirror modifier.
</Function>
<Function name='GetMMod' return='float' arguments=''>
Returns the player's M-mod.
</Function>
<Function name='SetMMod' return='void' arguments='float fMmod'>
Sets the player's M-mod to <code>fMmod</code>.
</Function>
<Function name='GetMuteOnError' return='bool' arguments=''>
Returns <code>true</code> if the game mutes an instrument track on errors.
</Function>
<Function name='SetMuteOnError' return='void' arguments='bool bMuteOnError'>
Sets the Mute on Error modifier.
</Function>
<Function name='GetNoAttacks' return='float' arguments=''>
Returns the value of the No Attacks modifier.
</Function>
<Function name='GetNoFakes' return='bool' arguments=''>
Returns the status of the No Fakes modifier.
</Function>
<Function name='SetNoFakes' return='void' arguments='bool bNoFakes'>
Sets the No Fakes modifier, removing all Fakes.
</Function>
<Function name='GetNoHands' return='bool' arguments=''>
Returns the status of the No Hands modifier.
</Function>
<Function name='SetNoHands' return='void' arguments='bool bNoHands'>
Sets the No Hands modifier, removing all Hands.
</Function>
<Function name='GetNoHolds' return='bool' arguments=''>
Returns the status of the No Holds modifier.
</Function>
<Function name='SetNoHolds' return='void' arguments='bool bNoHolds'>
Sets the No Holds modifier, removing all Holds.
</Function>
<Function name='GetNoJumps' return='bool' arguments=''>
Returns the status of the No Jumps modifier.
</Function>
<Function name='SetNoJumps' return='void' arguments='bool bNoJumps'>
Sets the No Jumps modifier, removing all Jumps.
</Function>
<Function name='GetNoLifts' return='bool' arguments=''>
Returns the status of the No Lifts modifier.
</Function>
<Function name='SetNoLifts' return='void' arguments='bool bNoLifts'>
Sets the No Lifts modifier, removing all Lifts.
</Function>
<Function name='GetNoMines' return='bool' arguments=''>
Returns the status of the No Mines modifier.
</Function>
<Function name='SetNoMines' return='void' arguments='bool bNoMines'>
Sets the No Mines modifier, removing all Mines.
</Function>
<Function name='GetNoQuads' return='bool' arguments=''>
Returns the status of the No Quads modifier.
</Function>
<Function name='SetNoQuads' return='void' arguments='bool bNoQuads'>
Sets the No Quads modifier, removing all Quads.
</Function>
<Function name='GetNoRolls' return='bool' arguments=''>
Returns the status of the No Rolls modifier.
</Function>
<Function name='SetNoRolls' return='void' arguments='bool bNoRolls'>
Sets the No Rolls modifier, removing all Rolls.
</Function>
<Function name='GetNoStretch' return='bool' arguments=''>
Returns the status of the No Stretch modifier.
</Function>
<Function name='SetNoStretch' return='void' arguments='bool bNoStretch'>
Sets the No Stretch modifier, removing all step combinations that require a large stretch.
</Function>
<Function name='GetNoteSkin' return='string' arguments=''>
Returns the current NoteSkin set in the PlayerOptions.
</Function>
<Function name='SetNoteSkin' return='void' arguments='string noteskin'>
Changes the player's noteskin to <code>noteskin</code>.
</Function>
<Function name='GetPassmark' return='float' arguments=''>
Returns the value of the Passmark.
</Function>
<Function name='SetPassmark' return='void' arguments='float fPassmark'>
Sets the value for the Passmark.
</Function>
<Function name='GetPlanted' return='bool' arguments=''>
Returns the status of the Planted modifier.
</Function>
<Function name='SetPlanted' return='void' arguments='bool bPlanted'>
Sets the Planted modifier.
</Function>
<Function name='GetQuick' return='bool' arguments=''>
Returns the status of the Quick modifier.
</Function>
<Function name='SetQuick' return='void' arguments='bool bQuick'>
Sets the Quick modifier.
</Function>
<Function name='GetRandomAttacks' return='float' arguments=''>
Returns the value of the Random Attacks modifier.
</Function>
<Function name='SetRandomAttacks' return='void' arguments='float fRandomAttacks'>
Sets the value for the Random Attacks modifier.
</Function>
<Function name='GetRandomSpeed' return='float' arguments=''>
Returns the value of the Random Speed modifier.
</Function>
<Function name='SetRandomSpeed' return='void' arguments='float fRandomSpeed'>
Sets the value for the Random Speed modifier.
</Function>
<Function name='GetRandomVanish' return='float' arguments=''>
Returns the value of the Random Vanish modifier.
</Function>
<Function name='SetRandomVanish' return='void' arguments='float fRandomVanish'>
Sets the value for the Random Vanish modifier.
</Function>
<Function name='GetReverse' return='float' arguments=''>
Returns the value of the Reverse modifier.
</Function>
<Function name='SetReverse' return='void' arguments='float fReverse'>
Sets the value for the Reverse modifier.
</Function>
<Function name='GetReversePercentForColumn' return='float' arguments='int col'>
Returns the amount of reverse applied to the specified column.
</Function>
<Function name='GetRight' return='bool' arguments=''>
Returns the status of the Right modifier.
</Function>
<Function name='SetRight' return='void' arguments='bool bRght'>
Sets the Right modifier.
</Function>
<Function name='GetRoll' return='float' arguments=''>
Returns the value of the Roll modifier.
</Function>
<Function name='SetRoll' return='void' arguments='float fRoll'>
Sets the value for the Roll modifier.
</Function>
<Function name='GetShuffle' return='bool' arguments=''>
Returns the status of the Shuffle modifier.
</Function>
<Function name='SetShuffle' return='void' arguments='bool bShuffle'>
Sets the Shuffle modifier.
</Function>
<Function name='GetSkew' return='float' arguments=''>
Returns the value of the NoteField skew.
</Function>
<Function name='SetSkew' return='void' arguments='float fSkew'>
Sets the NoteField skew. This is used to replicate the various
views. (Distant, Hallway, etc.)
</Function>
<Function name='GetSkippy' return='bool' arguments=''>
Returns the status of the Skippy modifier.
</Function>
<Function name='SetSkippy' return='void' arguments='bool bSkippy'>
Sets the Skippy modifier.
</Function>
<Function name='GetSoftShuffle' return='bool' arguments=''>
Returns the status of the Soft Shuffle modifier.
</Function>
<Function name='SetSoftShuffle' return='void' arguments='bool bSoftShuffle'>
Sets the Soft Shuffle modifier.
</Function>
<Function name='GetSongAttacks' return='float' arguments=''>
This function is deprecated. Please use GetStepAttacks() instead.
</Function>
<Function name='GetStepAttacks' return='float' arguments=''>
</Function>
<Function name='GetSplit' return='float' arguments=''>
Returns the value of the Split modifier.
</Function>
<Function name='SetSplit' return='void' arguments='float fSplit'>
Sets the value for the Split modifier.
</Function>
<Function name='GetStealth' return='float' arguments=''>
Returns the value of the Stealth modifier.
</Function>
<Function name='SetStealth' return='void' arguments='float fStealth'>
Sets the value for the Stealth modifier.
</Function>
<Function name='GetStomp' return='bool' arguments=''>
Returns the status of the Stomp modifier.
</Function>
<Function name='SetStomp' return='void' arguments='bool bStomp'>
Sets the Stomp modifier.
</Function>
<Function name='GetSudden' return='float' arguments=''>
Returns the value of the Sudden modifier.
</Function>
<Function name='SetSudden' return='void' arguments='float fSudden'>
Sets the value for the Sudden modifier.
</Function>
<Function name='GetSuddenOffset' return='float' arguments=''>
Returns the value of the Sudden Offset modifier.
</Function>
<Function name='SetSuddenOffset' return='void' arguments='float fSuddenOffset'>
Sets the value for the Sudden Offset modifier.
</Function>
<Function name='GetSuperShuffle' return='bool' arguments=''>
Returns the status of the Super Shuffle modifier.
</Function>
<Function name='SetSuperShuffle' return='void' arguments='bool bSuperShuffle'>
Sets the Super Shuffle modifier.
</Function>
<Function name='GetTiny' return='float' arguments=''>
Returns the value of the Tiny modifier.
</Function>
<Function name='SetTiny' return='void' arguments='float fTiny'>
Sets the value for the Tiny modifier.
</Function>
<Function name='GetTipsy' return='float' arguments=''>
Returns the value of the Tipsy modifier.
</Function>
<Function name='SetTipsy' return='void' arguments='float fTipsy'>
Sets the value for the Tipsy modifier.
</Function>
<Function name='GetTornado' return='float' arguments=''>
Returns the value of the Tornado modifier.
</Function>
<Function name='SetTornado' return='void' arguments='float fTornado'>
Sets the value for the Tornado modifier.
</Function>
<Function name='GetTwirl' return='float' arguments=''>
Returns the value of the Twirl modifier.
</Function>
<Function name='SetTwirl' return='void' arguments='float fTwirl'>
Sets the value for the Twirl modifier.
</Function>
<Function name='GetTwister' return='bool' arguments=''>
Returns the status of the Twister modifier.
</Function>
<Function name='SetTwister' return='void' arguments='bool bTwister'>
Sets the Twister modifier.
</Function>
<Function name='GetWave' return='float' arguments=''>
Returns the value of the Wave modifier.
</Function>
<Function name='SetWave' return='void' arguments='float fWave'>
Sets the value for the Wave modifier.
</Function>
<Function name='GetWide' return='bool' arguments=''>
Returns the status of the Wide modifier.
</Function>
<Function name='SetWide' return='void' arguments='bool bWide'>
Sets the Wide modifier.
</Function>
<Function name='GetXMod' return='float' arguments=''>
Returns the player's X-mod.
</Function>
<Function name='SetXMod' return='void' arguments='float fXmod'>
Sets the player's X-mod to <code>fXmod</code>.
</Function>
<Function name='GetXMode' return='float' arguments=''>
Returns the value of X Mode.
</Function>
<Description>
Most options fall into one of two types: float or bool.<br />
Float type options have this interface:<br />
Option(value, approach_speed)<br />
If value is a float, sets the TimeSpacing modifier to value.<br />
If approach_speed is a float, sets the speed of the transition to approach_speed. Returns the previous values of both.<br />
approach_speed is in units of n per second. value will be approached at the rate of approach_speed per second.<br />
Note that the value and the approach speed arguments are both independently optional.<br />
Example:<br />
a,b= options:Boost() -- Sets a to the current value and b to the current approach_speed.<br />
a,b= options:Boost(5, .5) -- Stores the previous values in a and b, NOT to 5 and .5. Sets the value to 5 and the approach speed to .5.<br />
a,b= options:Boost(5) -- Sets a and b to the previous values, NOT to 5 and .5. Sets the value to 5 and leaves the approach speed at whatever it was.<br />
<br />
Setting the approach speed only matters when modifying the PlayerOptions from ModsLevel_Song.<br />
Bool type options have an almost identical interface, the difference is that they can not have an approach speed.<br />
For brevity, the functions are only given a description if the option requires careful handling or does not follow the float or bool interfaces.<br />
</Description>
<Function name='IsEasierForCourseAndTrail' return='bool' arguments='Course c, Trail t'>
Returns <code>true</code> if the current PlayerOptions makes the current Course/Trail easier.
</Function>
<Function name='IsEasierForSongAndSteps' return='bool' arguments='Song so, Steps st'>
Returns <code>true</code> if the current PlayerOptions makes the current Song/Steps easier.
</Function>
<Function name='SetXMode' return='void' arguments='float fXModeVal'>
Sets the X Mode percentage to <code>fXModeVal</code>.
<Function name='TimeSpacing' return='float, float' arguments='float value, float approach_speed'>
TimeSpacing is one of the variables for controlling the speed mod.<br />
Use CMod, XMod, or MMod to set the speed mod unless you have a good reason not to.<br />
It controls whether the speed mod is in X mode or C mode. It should only be set to 0 or 1, and is only a float value to allow tweening between the two states.
</Function>
<Function name='MaxScrollBPM' return='float, float' arguments='float value, float approach_speed'>
MaxScrollBPM is one of the variables for controlling the speed mod.<br />
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 MMod.<br />
MMods are not tweenable or settable on ScreenGameplay. Use XMods if you need such an effect.
</Function>
<Function name='ScrollSpeed' return='float, float' arguments='float value, float approach_speed'>
ScrollSpeed is one of the variables for controlling the speed mod.<br />
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='ScrollBPM' return='float, float' arguments='float value, float approach_speed'>
ScrollBPM is one of the variables for controlling the speed mod.<br />
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 CMod.
</Function>
<Function name='Boost' 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='Wave' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Expand' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Boomerang' 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='Dizzy' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Confusion' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Mini' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Tiny' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Flip' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Invert' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Tornado' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Tipsy' 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='Beat' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Xmode' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Twirl' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Roll' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Hidden' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='HiddenOffset' return='float, float' arguments='float value, float approach_speed'> </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>
<Function name='Stealth' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Blink' 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='Split' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Alternate' 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='Centered' 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='Blind' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Cover' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='RandAttack' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='NoAttack' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='PlayerAutoPlay' return='float, float' arguments='float value, float approach_speed'> </Function>
<Function name='Tilt' return='float, float' arguments='float value, float approach_speed'>
Tilt 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 />
Tilt tilts the note field forward and back.
</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 />
Skew moves the vanishing point for the note field away from the center of the screen.<br />
Skew has no effect in single mode if Center1Player is true.<br />
Skew has no effect in double mode.<br />
</Function>
<Function name='Passmark' 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='TurnNone' return='bool' arguments='bool value'> </Function>
<Function name='Mirror' return='bool' arguments='bool value'> </Function>
<Function name='Backwards' return='bool' arguments='bool value'> </Function>
<Function name='Left' return='bool' arguments='bool value'> </Function>
<Function name='Right' return='bool' arguments='bool value'> </Function>
<Function name='Shuffle' return='bool' arguments='bool value'> </Function>
<Function name='SoftShuffle' return='bool' arguments='bool value'> </Function>
<Function name='SuperShuffle' return='bool' arguments='bool value'> </Function>
<Function name='NoHolds' return='bool' arguments='bool value'> </Function>
<Function name='NoRolls' return='bool' arguments='bool value'> </Function>
<Function name='NoMines' return='bool' arguments='bool value'> </Function>
<Function name='Little' return='bool' arguments='bool value'> </Function>
<Function name='Wide' return='bool' arguments='bool value'> </Function>
<Function name='Big' return='bool' arguments='bool value'> </Function>
<Function name='Quick' return='bool' arguments='bool value'> </Function>
<Function name='BMRize' return='bool' arguments='bool value'> </Function>
<Function name='Skippy' return='bool' arguments='bool value'> </Function>
<Function name='Mines' return='bool' arguments='bool value'> </Function>
<Function name='AttackMines' return='bool' arguments='bool value'> </Function>
<Function name='Echo' return='bool' arguments='bool value'> </Function>
<Function name='Stomp' return='bool' arguments='bool value'> </Function>
<Function name='Planted' return='bool' arguments='bool value'> </Function>
<Function name='Floored' return='bool' arguments='bool value'> </Function>
<Function name='Twister' return='bool' arguments='bool value'> </Function>
<Function name='HoldRolls' return='bool' arguments='bool value'> </Function>
<Function name='NoJumps' return='bool' arguments='bool value'> </Function>
<Function name='NoHands' return='bool' arguments='bool value'> </Function>
<Function name='NoLifts' return='bool' arguments='bool value'> </Function>
<Function name='NoFakes' return='bool' arguments='bool value'> </Function>
<Function name='NoQuads' return='bool' arguments='bool value'> </Function>
<Function name='NoStretch' return='bool' arguments='bool value'> </Function>
<Function name='MuteOnError' return='bool' arguments='bool value'> </Function>
<Function name='UsingReverse' return='bool' arguments=''>
Returns <code>true</code> if the player is using reverse. (equivalent to <code>GetReverse() == 1.0</code>)
</Function>
<Function name='NoteSkin' return='string, bool' arguments='string name'>
Sets the NoteSkin to the named noteskin, unless name is nil or the noteskin does not exist. Returns the name of the previous noteskin and whether the set attempt succeeded.<br />
Changing the noteskin during a song is not supported.<br />
Example:<br />
note_name= options:NoteSkin() -- Sets note_name to the player's current noteskin.<br />
prev_note_name, succeeded= options:NoteSkin("cel") -- Sets prev_note_name to the noteskin the player had set, changes the current noteskin to "cel", sets succeeded to true if the the "cel" noteskin exists.<br />
</Function>
<Function name='FailSetting' return='FailType' arguments='FailType'>
Sets the <Link class='ENUM' function='FailType' /> for the player, if the optional argument is provided. Returns the <Link class='ENUM' function='FailType' /> that was previously set.
</Function>
<Function name='CMod' return='float, float' arguments='float value, float approach_speed'>
If the player has a CMod set, returns the value of that CMod and its associated approach speed. Returns nil otherwise.<br />
If the optional first argument is passed, sets the CMod to the value and disables any XMod or MMod that is set.<br />
If the optional second argument is passed, sets the speed at which the transition occurs.
</Function>
<Function name='XMod' return='float, float' arguments='float value, float approach_speed'>
If the player has a XMod set, returns the value of that XMod and its associated approach speed. Returns nil otherwise.<br />
If the optional first argument is passed, sets the XMod to the value and disables any CMod or MMod that is set.<br />
If the optional second argument is passed, sets the speed at which the transition occurs.
</Function>
<Function name='MMod' return='float, float' arguments='float value, float approach_speed'>
If the player has a MMod set, returns the value of that MMod and its associated approach speed. Returns nil otherwise.<br />
If the optional first argument is passed, sets the MMod to the value and disables any CMod or XMod that is set.<br />
If the optional second argument is passed, sets the speed at which the transition occurs.<br />
MMods are not tweenable or settable on ScreenGameplay. Use XMods if you need such an effect.
</Function>
<Function name='Overhead' return='bool' arguments='bool'>
If the player is using Overhead (0 tilt, 0 skew), returns true.<br />
If true is passed, sets the tilt and skew to 0.
</Function>
<Function name='Incoming' return='float, float' arguments='float value, float approach_speed'>
If the player is using Incoming ((positive skew and negative tilt) or (negative skew and positive tilt)), returns the value of skew and its approach_speed.<br />
Returns nil otherwise.<br />
If the optional first argument is passed, sets tilt to negative value and skew to value.<br />
Pass in a positive value for the familiar meaning of Incoming.<br />
If the optional second argument is passed, sets the approach_speed for skew and tilt to it.
</Function>
<Function name='Space' return='float, float' arguments='float value, float approach_speed'>
If the player is using Space ((positive skew and positive tilt) or (negative skew and negative tilt)), returns the value of skew and its approach_speed.<br />
Returns nil otherwise.<br />
If the optional first argument is passed, sets tilt to value and skew to value.<br />
If the optional second argument is passed, sets the approach_speed for skew and tilt to it.
</Function>
<Function name='Hallway' return='float, float' arguments='float value, float approach_speed'>
If the player is using Hallway (zero skew and negative tilt), returns the value of tilt and its approach_speed.<br />
Returns nil otherwise.<br />
If the optional first argument is passed, sets tilt to negative value and skew to zero.<br />
Pass in a positive value for the familiar meaning of Hallway.<br />
If the optional second argument is passed, sets the approach_speed for skew and tilt to it.
</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 />
If the optional first argument is passed, sets tilt to value and skew to zero.<br />
If the optional second argument is passed, sets the approach_speed for skew and tilt to it.
</Function>
<Function name='GetStepAttacks' return='bool' argument=''>
Returns true if step attacks or random attacks are enabled.
</Function>
</Class>
<Class name='PlayerStageStats'>
<Function name='FailPlayer' return='bool' arguments=''>
+1 -1
View File
@@ -868,7 +868,7 @@ bool BackgroundImpl::IsDangerAllVisible()
{
// The players are never in danger in FAIL_OFF.
FOREACH_PlayerNumber( p )
if( GAMESTATE->GetPlayerFailType(GAMESTATE->m_pPlayerState[p]) == PlayerOptions::FAIL_OFF )
if( GAMESTATE->GetPlayerFailType(GAMESTATE->m_pPlayerState[p]) == FailType_Off )
return false;
if( !g_bShowDanger )
return false;
+9 -1
View File
@@ -491,7 +491,15 @@ XToLocalizedString( CourseType );
LuaXType( CourseType );
LuaFunction( CourseTypeToLocalizedString, CourseTypeToLocalizedString( Enum::Check<CourseType>( L, 1 ) ) );
static const char *FailTypeNames[] = {
"Immediate",
"ImmediateContinue",
"EndOfSong",
"Off",
};
XToString( FailType );
XToLocalizedString( FailType );
LuaXType( FailType );
/*
* (c) 2001-2004 Chris Danford
+15
View File
@@ -686,6 +686,21 @@ const RString& CourseTypeToString( CourseType i );
const RString& CourseTypeToLocalizedString( CourseType i );
LuaDeclareType( CourseType );
/** @brief How can the Player fail a song? */
enum FailType
{
FailType_Immediate, /**< fail immediately when life touches 0 */
FailType_ImmediateContinue, /**< Same as above, but allow playing the rest of the song */
FailType_EndOfSong, /**< fail if life is at 0 when the song ends */
FailType_Off, /**< never fail */
NUM_FailType,
FailType_Invalid
};
const RString& FailTypeToString( FailType cat );
const RString& FailTypeToLocalizedString( FailType cat );
LuaDeclareType( FailType );
#endif
+7 -7
View File
@@ -1534,10 +1534,10 @@ void setmax( T &a, const T &b )
a = max(a, b);
}
PlayerOptions::FailType GameState::GetPlayerFailType( const PlayerState *pPlayerState ) const
FailType GameState::GetPlayerFailType( const PlayerState *pPlayerState ) const
{
PlayerNumber pn = pPlayerState->m_PlayerNumber;
PlayerOptions::FailType ft = pPlayerState->m_PlayerOptions.GetCurrent().m_FailType;
FailType ft = pPlayerState->m_PlayerOptions.GetCurrent().m_FailType;
// If the player changed the fail mode explicitly, leave it alone.
if( m_bChangedFailTypeOnScreenSongOptions )
@@ -1546,7 +1546,7 @@ PlayerOptions::FailType GameState::GetPlayerFailType( const PlayerState *pPlayer
if( IsCourseMode() )
{
if( PREFSMAN->m_bMinimum1FullSongInCourses && GetCourseSongIndex()==0 )
ft = max( ft, PlayerOptions::FAIL_IMMEDIATE_CONTINUE ); // take the least harsh of the two FailTypes
ft = max( ft, FailType_ImmediateContinue ); // take the least harsh of the two FailTypes
}
else
{
@@ -1560,18 +1560,18 @@ PlayerOptions::FailType GameState::GetPlayerFailType( const PlayerState *pPlayer
// Easy and beginner are never harder than FAIL_IMMEDIATE_CONTINUE.
if( dc <= Difficulty_Easy )
setmax( ft, PlayerOptions::FAIL_IMMEDIATE_CONTINUE );
setmax( ft, FailType_ImmediateContinue );
if( dc <= Difficulty_Easy && bFirstStage && PREFSMAN->m_bFailOffForFirstStageEasy )
setmax( ft, PlayerOptions::FAIL_OFF );
setmax( ft, FailType_Off );
/* If beginner's steps were chosen, and this is the first stage,
* turn off failure completely. */
if( dc == Difficulty_Beginner && bFirstStage )
setmax( ft, PlayerOptions::FAIL_OFF );
setmax( ft, FailType_Off );
if( dc == Difficulty_Beginner && PREFSMAN->m_bFailOffInBeginner )
setmax( ft, PlayerOptions::FAIL_OFF );
setmax( ft, FailType_Off );
}
return ft;
+1 -1
View File
@@ -306,7 +306,7 @@ public:
bool CurrentOptionsDisqualifyPlayer( PlayerNumber pn );
bool PlayerIsUsingModifier( PlayerNumber pn, const RString &sModifier );
PlayerOptions::FailType GetPlayerFailType( const PlayerState *pPlayerState ) const;
FailType GetPlayerFailType( const PlayerState *pPlayerState ) const;
// character stuff
Character* m_pCurCharacters[NUM_PLAYERS];
+1
View File
@@ -7,6 +7,7 @@ static const char *ModsLevelNames[] = {
"Preferred",
"Stage",
"Song",
"Current",
};
XToString( ModsLevel );
LuaXType( ModsLevel );
+22 -17
View File
@@ -9,6 +9,7 @@ enum ModsLevel
ModsLevel_Preferred, // user-chosen player options. Does not include any forced mods.
ModsLevel_Stage, // Preferred + forced stage mods
ModsLevel_Song, // Stage + forced attack mods
ModsLevel_Current, // Approaches Song
NUM_ModsLevel,
ModsLevel_Invalid
};
@@ -30,7 +31,6 @@ class ModsGroup
{
T m_[NUM_ModsLevel];
RageTimer m_Timer;
T m_Current; // approaches ModsLevel_Song
public:
void Init()
@@ -43,15 +43,15 @@ public:
// Don't let the mod approach speed be affected by Tab.
// TODO: Find a more elegant way of handling this.
fDelta = m_Timer.GetDeltaTime();
m_Current.Approach( m_[ModsLevel_Song], fDelta );
m_[ModsLevel_Current].Approach( m_[ModsLevel_Song], fDelta );
}
template<typename U>
inline void Assign( ModsLevel level, U T::*member, const U &val )
{
if( level != ModsLevel_Song )
m_Current.*member = val;
for( ; level < NUM_ModsLevel; enum_add(level, 1) )
m_[ModsLevel_Current].*member = val;
for( ; level < ModsLevel_Current; enum_add(level, 1) )
m_[level].*member = val;
}
@@ -60,45 +60,50 @@ public:
{
DEBUG_ASSERT( index < n );
if( level != ModsLevel_Song )
(m_Current.*member)[index] = val;
for( ; level < NUM_ModsLevel; enum_add(level, 1) )
(m_[ModsLevel_Current].*member)[index] = val;
for( ; level < ModsLevel_Current; enum_add(level, 1) )
(m_[level].*member)[index] = val;
}
void Assign( ModsLevel level, const T &val )
{
if( level != ModsLevel_Song )
m_Current = val;
for( ; level < NUM_ModsLevel; enum_add(level, 1) )
m_[ModsLevel_Current] = val;
for( ; level < ModsLevel_Current; enum_add(level, 1) )
m_[level] = val;
}
void Call( ModsLevel level, void (T::*fun)() )
{
if( level != ModsLevel_Song )
(m_Current.*fun)();
for( ; level < NUM_ModsLevel; enum_add(level, 1) )
(m_[ModsLevel_Current].*fun)();
for( ; level < ModsLevel_Current; enum_add(level, 1) )
(m_[level].*fun)();
}
void FromString( ModsLevel level, const RString &str )
{
if( level != ModsLevel_Song )
m_Current.FromString( str );
for( ; level < NUM_ModsLevel; enum_add(level, 1) )
m_[ModsLevel_Current].FromString( str );
for( ; level < ModsLevel_Current; enum_add(level, 1) )
m_[level].FromString( str );
}
void SetCurrentToLevel( ModsLevel level )
{
m_Current = m_[level];
m_[ModsLevel_Current] = m_[level];
}
const T &Get( ModsLevel l ) const { return m_[l]; }
const T &GetPreferred() const { return m_[ModsLevel_Preferred]; }
const T &GetStage() const { return m_[ModsLevel_Stage]; }
const T &GetSong() const { return m_[ModsLevel_Song]; }
const T &GetCurrent() const { return m_Current; }
const T &GetPreferred() const { return m_[ModsLevel_Preferred]; }
const T &GetStage() const { return m_[ModsLevel_Stage]; }
const T &GetSong() const { return m_[ModsLevel_Song]; }
const T &GetCurrent() const { return m_[ModsLevel_Current]; }
T &Get( ModsLevel l ) { return m_[l]; }
T &GetPreferred() { return m_[ModsLevel_Preferred]; }
T &GetStage() { return m_[ModsLevel_Stage]; }
T &GetSong() { return m_[ModsLevel_Song]; }
T &GetCurrent() { return m_[ModsLevel_Current]; }
};
#endif
+458 -373
View File
@@ -23,13 +23,19 @@ ThemeMetric<float> RANDOM_EFFECT_CHANCE ( "PlayerOptions", "RandomEffectChance"
ThemeMetric<float> RANDOM_HIDDEN_CHANCE ( "PlayerOptions", "RandomHiddenChance" );
ThemeMetric<float> RANDOM_SUDDEN_CHANCE ( "PlayerOptions", "RandomSuddenChance" );
static const float CMOD_DEFAULT= 200.0f;
// Is there a better place for this?
// It needs to be a named constant because it's used in several places in
// this file, but nothing else has a named constant for its default value.
// -Kyz
void PlayerOptions::Init()
{
m_bSetScrollSpeed = false;
m_fMaxScrollBPM = 0; m_SpeedfMaxScrollBPM = 1.0f;
m_fTimeSpacing = 0; m_SpeedfTimeSpacing = 1.0f;
m_fScrollSpeed = 1.0f; m_SpeedfScrollSpeed = 1.0f;
m_fScrollBPM = 200; m_SpeedfScrollBPM = 1.0f;
m_fScrollBPM = CMOD_DEFAULT; m_SpeedfScrollBPM = 1.0f;
ZERO( m_fAccels ); ONE( m_SpeedfAccels );
ZERO( m_fEffects ); ONE( m_SpeedfEffects );
ZERO( m_fAppearances ); ONE( m_SpeedfAppearances );
@@ -40,7 +46,6 @@ void PlayerOptions::Init()
m_fRandAttack = 0; m_SpeedfRandAttack = 1.0f;
m_fNoAttack = 0; m_SpeedfNoAttack = 1.0f;
m_fPlayerAutoPlay = 0; m_SpeedfPlayerAutoPlay = 1.0f;
m_bSetTiltOrSkew = false;
m_fPerspectiveTilt = 0; m_SpeedfPerspectiveTilt = 1.0f;
m_fSkew = 0; m_SpeedfSkew = 1.0f;
m_fPassmark = 0; m_SpeedfPassmark = 1.0f;
@@ -48,7 +53,7 @@ void PlayerOptions::Init()
ZERO( m_bTurns );
ZERO( m_bTransforms );
m_bMuteOnError = false;
m_FailType = FAIL_IMMEDIATE;
m_FailType = FailType_Immediate;
m_sNoteSkin = "";
}
@@ -83,7 +88,6 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
APPROACH( fRandomSpeed );
DO_COPY( m_bSetScrollSpeed );
DO_COPY( m_bSetTiltOrSkew );
for( int i=0; i<NUM_TURNS; i++ )
DO_COPY( m_bTurns[i] );
for( int i=0; i<NUM_TRANSFORMS; i++ )
@@ -229,15 +233,18 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
switch( m_FailType )
{
case FAIL_IMMEDIATE: break;
case FAIL_IMMEDIATE_CONTINUE: AddTo.push_back("FailImmediateContinue"); break;
case FAIL_AT_END: AddTo.push_back("FailAtEnd"); break;
case FAIL_OFF: AddTo.push_back("FailOff"); break;
case FailType_Immediate: break;
case FailType_ImmediateContinue: AddTo.push_back("FailImmediateContinue"); break;
case FailType_EndOfSong: AddTo.push_back("FailAtEnd"); break;
case FailType_Off: AddTo.push_back("FailOff"); break;
default:
FAIL_M(ssprintf("Invalid FailType: %i", m_FailType));
}
if( m_fSkew==0 && m_fPerspectiveTilt==0 ) { if( m_bSetTiltOrSkew ) AddTo.push_back( "Overhead" ); }
if( m_fSkew==0 && m_fPerspectiveTilt==0 )
{
AddTo.push_back( "Overhead" );
}
else if( m_fSkew == 0 )
{
if( m_fPerspectiveTilt > 0 )
@@ -346,7 +353,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
else if( sscanf( sBit, "c%f", &level ) == 1 )
{
if( !isfinite(level) || level <= 0.0f )
level = 200.0f; // Just pick some value.
level = CMOD_DEFAULT;
SET_FLOAT( fScrollBPM )
SET_FLOAT( fTimeSpacing )
m_fTimeSpacing = 1;
@@ -359,7 +366,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
// OpenITG doesn't have this block:
/*
if( !isfinite(level) || level <= 0.0f )
level = 200.0f;
level = CMOD_DEFAULT;
*/
SET_FLOAT( fMaxScrollBPM )
m_fTimeSpacing = 0;
@@ -376,7 +383,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
SET_FLOAT(fTimeSpacing);
level= 1.0f;
SET_FLOAT(fScrollSpeed);
level= 200.0f;
level= CMOD_DEFAULT;
SET_FLOAT(fScrollBPM)
}
else if( sBit == "boost" ) SET_FLOAT( fAccels[ACCEL_BOOST] )
@@ -448,20 +455,20 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
else if( sBit == "noattacks" ) SET_FLOAT( fNoAttack )
else if( sBit == "playerautoplay" ) SET_FLOAT( fPlayerAutoPlay )
else if( sBit == "passmark" ) SET_FLOAT( fPassmark )
else if( sBit == "overhead" ) { m_bSetTiltOrSkew = true; m_fSkew = 0; m_fPerspectiveTilt = 0; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
else if( sBit == "incoming" ) { m_bSetTiltOrSkew = true; m_fSkew = level; m_fPerspectiveTilt = -level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
else if( sBit == "space" ) { m_bSetTiltOrSkew = true; m_fSkew = level; m_fPerspectiveTilt = +level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
else if( sBit == "hallway" ) { m_bSetTiltOrSkew = true; m_fSkew = 0; m_fPerspectiveTilt = -level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
else if( sBit == "distant" ) { m_bSetTiltOrSkew = true; m_fSkew = 0; m_fPerspectiveTilt = +level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
else if( sBit == "overhead" ) { m_fSkew = 0; m_fPerspectiveTilt = 0; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
else if( sBit == "incoming" ) { m_fSkew = level; m_fPerspectiveTilt = -level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
else if( sBit == "space" ) { m_fSkew = level; m_fPerspectiveTilt = +level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
else if( sBit == "hallway" ) { m_fSkew = 0; m_fPerspectiveTilt = -level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
else if( sBit == "distant" ) { m_fSkew = 0; m_fPerspectiveTilt = +level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
else if( NOTESKIN && NOTESKIN->DoesNoteSkinExist(sBit) ) m_sNoteSkin = sBit;
else if( sBit == "noteskin" && !on ) /* "no noteskin" */ m_sNoteSkin = CommonMetrics::DEFAULT_NOTESKIN_NAME;
else if( sBit == "randomspeed" ) SET_FLOAT( fRandomSpeed )
else if( sBit == "failarcade" ||
sBit == "failimmediate" ) m_FailType = FAIL_IMMEDIATE;
sBit == "failimmediate" ) m_FailType = FailType_Immediate;
else if( sBit == "failendofsong" ||
sBit == "failimmediatecontinue" ) m_FailType = FAIL_IMMEDIATE_CONTINUE;
else if( sBit == "failatend" ) m_FailType = FAIL_AT_END;
else if( sBit == "failoff" ) m_FailType = FAIL_OFF;
sBit == "failimmediatecontinue" ) m_FailType = FailType_ImmediateContinue;
else if( sBit == "failatend" ) m_FailType = FailType_EndOfSong;
else if( sBit == "failoff" ) m_FailType = FailType_Off;
else if( sBit == "faildefault" )
{
PlayerOptions po;
@@ -916,133 +923,381 @@ public:
return 1;
}
static float CheckedApproachSpeed(lua_State* L, float s)
{
if(s <= 0)
{
luaL_error(L, "Approach speed must be greater than zero.");
}
return s;
}
// Functions are designed to combine Get and Set into one, to be less clumsy to use. -Kyz
// If a valid arg is passed, the value is set.
// The previous value is returned.
#define FLOAT_INTERFACE(func_name, member) \
static int func_name(T* p, lua_State* L) \
{ \
lua_pushnumber(L, p->m_f ## member); \
lua_pushnumber(L, p->m_Speedf ## member); \
if(lua_isnumber(L, 1)) \
{ \
p->m_f ## member = FArg(1); \
} \
if(lua_isnumber(L, 2)) \
{ \
p->m_Speedf ## member = CheckedApproachSpeed(L, FArg(2)); \
} \
return 2; \
}
#define BOOL_INTERFACE(func_name, member) \
static int func_name(T* p, lua_State* L) \
{ \
lua_pushboolean(L, p->m_b ## member); \
if(lua_isboolean(L, 1)) \
{ \
p->m_b ## member = BArg(1); \
} \
return 1; \
}
// Direct control functions, for themes that can handle it.
FLOAT_INTERFACE(TimeSpacing, TimeSpacing);
FLOAT_INTERFACE(MaxScrollBPM, MaxScrollBPM);
FLOAT_INTERFACE(ScrollSpeed, ScrollSpeed);
FLOAT_INTERFACE(ScrollBPM, ScrollBPM);
FLOAT_INTERFACE(Boost, Accels[PlayerOptions::ACCEL_BOOST]);
FLOAT_INTERFACE(Brake, Accels[PlayerOptions::ACCEL_BRAKE]);
FLOAT_INTERFACE(Wave, Accels[PlayerOptions::ACCEL_WAVE]);
FLOAT_INTERFACE(Expand, Accels[PlayerOptions::ACCEL_EXPAND]);
FLOAT_INTERFACE(Boomerang, Accels[PlayerOptions::ACCEL_BOOMERANG]);
FLOAT_INTERFACE(Drunk, Effects[PlayerOptions::EFFECT_DRUNK]);
FLOAT_INTERFACE(Dizzy, Effects[PlayerOptions::EFFECT_DIZZY]);
FLOAT_INTERFACE(Confusion, Effects[PlayerOptions::EFFECT_CONFUSION]);
FLOAT_INTERFACE(Mini, Effects[PlayerOptions::EFFECT_MINI]);
FLOAT_INTERFACE(Tiny, Effects[PlayerOptions::EFFECT_TINY]);
FLOAT_INTERFACE(Flip, Effects[PlayerOptions::EFFECT_FLIP]);
FLOAT_INTERFACE(Invert, Effects[PlayerOptions::EFFECT_INVERT]);
FLOAT_INTERFACE(Tornado, Effects[PlayerOptions::EFFECT_TORNADO]);
FLOAT_INTERFACE(Tipsy, Effects[PlayerOptions::EFFECT_TIPSY]);
FLOAT_INTERFACE(Bumpy, Effects[PlayerOptions::EFFECT_BUMPY]);
FLOAT_INTERFACE(Beat, Effects[PlayerOptions::EFFECT_BEAT]);
FLOAT_INTERFACE(Xmode, Effects[PlayerOptions::EFFECT_XMODE]);
FLOAT_INTERFACE(Twirl, Effects[PlayerOptions::EFFECT_TWIRL]);
FLOAT_INTERFACE(Roll, Effects[PlayerOptions::EFFECT_ROLL]);
FLOAT_INTERFACE(Hidden, Appearances[PlayerOptions::APPEARANCE_HIDDEN]);
FLOAT_INTERFACE(HiddenOffset, Appearances[PlayerOptions::APPEARANCE_HIDDEN_OFFSET]);
FLOAT_INTERFACE(Sudden, Appearances[PlayerOptions::APPEARANCE_SUDDEN]);
FLOAT_INTERFACE(SuddenOffset, Appearances[PlayerOptions::APPEARANCE_SUDDEN_OFFSET]);
FLOAT_INTERFACE(Stealth, Appearances[PlayerOptions::APPEARANCE_STEALTH]);
FLOAT_INTERFACE(Blink, Appearances[PlayerOptions::APPEARANCE_BLINK]);
FLOAT_INTERFACE(RandomVanish, Appearances[PlayerOptions::APPEARANCE_RANDOMVANISH]);
FLOAT_INTERFACE(Reverse, Scrolls[PlayerOptions::SCROLL_REVERSE]);
FLOAT_INTERFACE(Split, Scrolls[PlayerOptions::SCROLL_SPLIT]);
FLOAT_INTERFACE(Alternate, Scrolls[PlayerOptions::SCROLL_ALTERNATE]);
FLOAT_INTERFACE(Cross, Scrolls[PlayerOptions::SCROLL_CROSS]);
FLOAT_INTERFACE(Centered, Scrolls[PlayerOptions::SCROLL_CENTERED]);
FLOAT_INTERFACE(Dark, Dark);
FLOAT_INTERFACE(Blind, Blind);
FLOAT_INTERFACE(Cover, Cover);
FLOAT_INTERFACE(RandAttack, RandAttack);
FLOAT_INTERFACE(NoAttack, NoAttack);
FLOAT_INTERFACE(PlayerAutoPlay, PlayerAutoPlay);
FLOAT_INTERFACE(Skew, Skew);
FLOAT_INTERFACE(Tilt, PerspectiveTilt);
FLOAT_INTERFACE(Passmark, Passmark); // Passmark is not sanity checked to the [0, 1] range because LifeMeterBar::IsFailing is the only thing that uses it, and it's used in a <= test. Any theme passing a value outside the [0, 1] range probably expects the result they get. -Kyz
FLOAT_INTERFACE(RandomSpeed, RandomSpeed);
BOOL_INTERFACE(TurnNone, Turns[PlayerOptions::TURN_NONE]);
BOOL_INTERFACE(Mirror, Turns[PlayerOptions::TURN_MIRROR]);
BOOL_INTERFACE(Backwards, Turns[PlayerOptions::TURN_BACKWARDS]);
BOOL_INTERFACE(Left, Turns[PlayerOptions::TURN_LEFT]);
BOOL_INTERFACE(Right, Turns[PlayerOptions::TURN_RIGHT]);
BOOL_INTERFACE(Shuffle, Turns[PlayerOptions::TURN_SHUFFLE]);
BOOL_INTERFACE(SoftShuffle, Turns[PlayerOptions::TURN_SOFT_SHUFFLE]);
BOOL_INTERFACE(SuperShuffle, Turns[PlayerOptions::TURN_SUPER_SHUFFLE]);
BOOL_INTERFACE(NoHolds, Transforms[PlayerOptions::TRANSFORM_NOHOLDS]);
BOOL_INTERFACE(NoRolls, Transforms[PlayerOptions::TRANSFORM_NOROLLS]);
BOOL_INTERFACE(NoMines, Transforms[PlayerOptions::TRANSFORM_NOMINES]);
BOOL_INTERFACE(Little, Transforms[PlayerOptions::TRANSFORM_LITTLE]);
BOOL_INTERFACE(Wide, Transforms[PlayerOptions::TRANSFORM_WIDE]);
BOOL_INTERFACE(Big, Transforms[PlayerOptions::TRANSFORM_BIG]);
BOOL_INTERFACE(Quick, Transforms[PlayerOptions::TRANSFORM_QUICK]);
BOOL_INTERFACE(BMRize, Transforms[PlayerOptions::TRANSFORM_BMRIZE]);
BOOL_INTERFACE(Skippy, Transforms[PlayerOptions::TRANSFORM_SKIPPY]);
BOOL_INTERFACE(Mines, Transforms[PlayerOptions::TRANSFORM_MINES]);
BOOL_INTERFACE(AttackMines, Transforms[PlayerOptions::TRANSFORM_ATTACKMINES]);
BOOL_INTERFACE(Echo, Transforms[PlayerOptions::TRANSFORM_ECHO]);
BOOL_INTERFACE(Stomp, Transforms[PlayerOptions::TRANSFORM_STOMP]);
BOOL_INTERFACE(Planted, Transforms[PlayerOptions::TRANSFORM_PLANTED]);
BOOL_INTERFACE(Floored, Transforms[PlayerOptions::TRANSFORM_FLOORED]);
BOOL_INTERFACE(Twister, Transforms[PlayerOptions::TRANSFORM_TWISTER]);
BOOL_INTERFACE(HoldRolls, Transforms[PlayerOptions::TRANSFORM_HOLDROLLS]);
BOOL_INTERFACE(NoJumps, Transforms[PlayerOptions::TRANSFORM_NOJUMPS]);
BOOL_INTERFACE(NoHands, Transforms[PlayerOptions::TRANSFORM_NOHANDS]);
BOOL_INTERFACE(NoLifts, Transforms[PlayerOptions::TRANSFORM_NOLIFTS]);
BOOL_INTERFACE(NoFakes, Transforms[PlayerOptions::TRANSFORM_NOFAKES]);
BOOL_INTERFACE(NoQuads, Transforms[PlayerOptions::TRANSFORM_NOQUADS]);
BOOL_INTERFACE(NoStretch, Transforms[PlayerOptions::TRANSFORM_NOSTRETCH]);
BOOL_INTERFACE(MuteOnError, MuteOnError);
#undef FLOAT_INTERFACE
#undef BOOL_INTERFACE
// NoteSkins
static int GetNoteSkin( T *p, lua_State *L )
static int NoteSkin(T* p, lua_State* L)
{
if( p->m_sNoteSkin.empty() )
{
lua_pushstring( L, CommonMetrics::DEFAULT_NOTESKIN_NAME.GetValue() );
}
else
{
lua_pushstring( L, p->m_sNoteSkin );
}
if(lua_isstring(L, 1))
{
if(NOTESKIN->DoesNoteSkinExist(SArg(1)))
{
p->m_sNoteSkin = SArg(1);
lua_pushboolean(L, true);
}
}
return 2;
}
static int FailSetting(T* p, lua_State* L)
{
Enum::Push(L, p->m_FailType);
if(lua_isstring(L, 1))
{
p->m_FailType= Enum::Check<FailType>(L, 1);
}
return 1;
}
static int SetNoteSkin( T *p, lua_State *L )
static void SetSpeedModApproaches(T* p, float speed)
{
if( NOTESKIN->DoesNoteSkinExist(SArg(1)) )
p->m_sNoteSkin = SArg(1);
return 0;
p->m_SpeedfScrollBPM= speed;
p->m_SpeedfScrollSpeed= speed;
p->m_SpeedfMaxScrollBPM= speed;
p->m_SpeedfTimeSpacing= speed;
}
// Speed Mods
static int GetCMod( T *p, lua_State *L )
// Sanity checked functions for speed mods, for themes that want to use the
// engine's enforcement of sane separation between speed mod types.
static int CMod(T* p, lua_State* L)
{
if( p->m_fTimeSpacing )
lua_pushnumber( L, p->m_fScrollBPM );
if(p->m_fTimeSpacing)
{
lua_pushnumber(L, p->m_fScrollBPM);
lua_pushnumber(L, p->m_SpeedfScrollBPM);
}
else
{
lua_pushnil(L);
return 1;
}
static int SetCMod( T *p, lua_State *L )
{
p->m_fTimeSpacing = FArg(1);
p->m_fTimeSpacing = 1;
p->m_fMaxScrollBPM = 0;
return 0;
lua_pushnil(L);
}
if(lua_isnumber(L, 1))
{
float speed= FArg(1);
if(!isfinite(speed) || speed <= 0.0f)
{
luaL_error(L, "CMod speed must be finite and greater than 0.");
}
p->m_fScrollBPM= speed;
p->m_fTimeSpacing = 1;
p->m_fScrollSpeed = 1;
p->m_fMaxScrollBPM = 0;
}
if(lua_isnumber(L, 2))
{
SetSpeedModApproaches(p, CheckedApproachSpeed(L, FArg(2)));
}
return 2;
}
static int GetXMod( T *p, lua_State *L )
static int XMod(T* p, lua_State* L)
{
if( !p->m_fTimeSpacing )
lua_pushnumber( L, p->m_fScrollSpeed );
if(!p->m_fTimeSpacing)
{
lua_pushnumber(L, p->m_fScrollSpeed);
lua_pushnumber(L, p->m_SpeedfScrollSpeed);
}
else
{
lua_pushnil(L);
return 1;
}
static int SetXMod( T *p, lua_State *L )
{
p->m_fScrollSpeed = FArg(1);
p->m_fTimeSpacing = 0;
p->m_fMaxScrollBPM = 0;
return 0;
lua_pushnil(L);
}
if(lua_isnumber(L, 1))
{
p->m_fScrollSpeed = FArg(1);
p->m_fTimeSpacing = 0;
p->m_fScrollBPM= CMOD_DEFAULT;
p->m_fMaxScrollBPM = 0;
}
if(lua_isnumber(L, 2))
{
SetSpeedModApproaches(p, CheckedApproachSpeed(L, FArg(2)));
}
return 2;
}
static int GetMMod( T *p, lua_State *L )
static int MMod(T* p, lua_State* L)
{
if( !p->m_fTimeSpacing && p->m_fMaxScrollBPM )
if(!p->m_fTimeSpacing && p->m_fMaxScrollBPM)
{
lua_pushnumber(L, p->m_fMaxScrollBPM);
lua_pushnumber(L, p->m_SpeedfMaxScrollBPM);
}
else
{
lua_pushnil(L);
lua_pushnil(L);
}
if(lua_isnumber(L, 1))
{
float speed= FArg(1);
if(!isfinite(speed) || speed <= 0.0f)
{
luaL_error(L, "MMod speed must be finite and greater than 0.");
}
p->m_fScrollBPM= CMOD_DEFAULT;
p->m_fTimeSpacing = 0;
p->m_fScrollSpeed= 1;
p->m_fMaxScrollBPM = speed;
}
if(lua_isnumber(L, 2))
{
SetSpeedModApproaches(p, CheckedApproachSpeed(L, FArg(2)));
}
return 2;
}
static void SetPerspectiveApproach(T* p, lua_State* L, float speed)
{
p->m_SpeedfPerspectiveTilt= speed;
p->m_SpeedfSkew= speed;
}
static int Overhead(T* p, lua_State* L)
{
lua_pushboolean(L, (p->m_fPerspectiveTilt == 0.0f && p->m_fSkew == 0.0f));
if(lua_toboolean(L, 1))
{
p->m_fPerspectiveTilt= 0;
p->m_fSkew= 0;
}
if(lua_isnumber(L, 2))
{
SetPerspectiveApproach(p, L, CheckedApproachSpeed(L, FArg(2)));
}
return 1;
}
static int SetMMod( T *p, lua_State *L )
static int Incoming(T* p, lua_State* L)
{
p->m_fMaxScrollBPM = FArg(1);
p->m_fTimeSpacing = 0;
return 0;
if((p->m_fSkew > 0.0f && p->m_fPerspectiveTilt < 0.0f) ||
(p->m_fSkew < 0.0f && p->m_fPerspectiveTilt > 0.0f))
{
lua_pushnumber(L, p->m_fSkew);
lua_pushnumber(L, p->m_SpeedfSkew);
}
else
{
lua_pushnil(L);
lua_pushnil(L);
}
if(lua_isnumber(L, 1))
{
float value= FArg(1);
p->m_fPerspectiveTilt= -value;
p->m_fSkew= value;
}
if(lua_isnumber(L, 2))
{
SetPerspectiveApproach(p, L, CheckedApproachSpeed(L, FArg(2)));
}
return 2;
}
// Accel
DEFINE_METHOD( GetBoost, m_fAccels[PlayerOptions::ACCEL_BOOST] )
static int SetBoost( T *p, lua_State *L ){ p->m_fAccels[PlayerOptions::ACCEL_BOOST] = FArg(1); return 0; }
DEFINE_METHOD( GetBrake, m_fAccels[PlayerOptions::ACCEL_BRAKE] )
static int SetBrake( T *p, lua_State *L ){ p->m_fAccels[PlayerOptions::ACCEL_BRAKE] = FArg(1); return 0; }
DEFINE_METHOD( GetWave, m_fAccels[PlayerOptions::ACCEL_WAVE] )
static int SetWave( T *p, lua_State *L ){ p->m_fAccels[PlayerOptions::ACCEL_WAVE] = FArg(1); return 0; }
DEFINE_METHOD( GetExpand, m_fAccels[PlayerOptions::ACCEL_EXPAND] )
static int SetExpand( T *p, lua_State *L ){ p->m_fAccels[PlayerOptions::ACCEL_EXPAND] = FArg(1); return 0; }
DEFINE_METHOD( GetBoomerang, m_fAccels[PlayerOptions::ACCEL_BOOMERANG] )
static int SetBoomerang( T *p, lua_State *L ){ p->m_fAccels[PlayerOptions::ACCEL_BOOMERANG] = FArg(1); return 0; }
static int Space(T* p, lua_State* L)
{
if((p->m_fSkew > 0.0f && p->m_fPerspectiveTilt > 0.0f) ||
(p->m_fSkew < 0.0f && p->m_fPerspectiveTilt < 0.0f))
{
lua_pushnumber(L, p->m_fSkew);
lua_pushnumber(L, p->m_SpeedfSkew);
}
else
{
lua_pushnil(L);
lua_pushnil(L);
}
if(lua_isnumber(L, 1))
{
float value= FArg(1);
p->m_fPerspectiveTilt= value;
p->m_fSkew= value;
}
if(lua_isnumber(L, 2))
{
SetPerspectiveApproach(p, L, CheckedApproachSpeed(L, FArg(2)));
}
return 2;
}
// Effect
DEFINE_METHOD( GetDrunk, m_fEffects[PlayerOptions::EFFECT_DRUNK] ) // MoonGyuHyuk
static int SetDrunk( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_DRUNK] = FArg(1); return 0; }
DEFINE_METHOD( GetDizzy, m_fEffects[PlayerOptions::EFFECT_DIZZY] )
static int SetDizzy( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_DIZZY] = FArg(1); return 0; }
DEFINE_METHOD( GetConfusion, m_fEffects[PlayerOptions::EFFECT_CONFUSION] )
static int SetConfusion( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_CONFUSION] = FArg(1); return 0; }
DEFINE_METHOD( GetMini, m_fEffects[PlayerOptions::EFFECT_MINI] )
static int SetMini( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_MINI] = FArg(1); return 0; }
DEFINE_METHOD( GetTiny, m_fEffects[PlayerOptions::EFFECT_TINY] )
static int SetTiny( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_TINY] = FArg(1); return 0; }
DEFINE_METHOD( GetFlip, m_fEffects[PlayerOptions::EFFECT_FLIP] )
static int SetFlip( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_FLIP] = FArg(1); return 0; }
DEFINE_METHOD( GetInvert, m_fEffects[PlayerOptions::EFFECT_INVERT] )
static int SetInvert( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_INVERT] = FArg(1); return 0; }
DEFINE_METHOD( GetTornado, m_fEffects[PlayerOptions::EFFECT_TORNADO] )
static int SetTornado( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_TORNADO] = FArg(1); return 0; }
DEFINE_METHOD( GetTipsy, m_fEffects[PlayerOptions::EFFECT_TIPSY] )
static int SetTipsy( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_TIPSY] = FArg(1); return 0; }
DEFINE_METHOD( GetBumpy, m_fEffects[PlayerOptions::EFFECT_BUMPY] )
static int SetBumpy( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_BUMPY] = FArg(1); return 0; }
DEFINE_METHOD( GetBeat, m_fEffects[PlayerOptions::EFFECT_BEAT] )
static int SetBeat( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_BEAT] = FArg(1); return 0; }
DEFINE_METHOD( GetXMode, m_fEffects[PlayerOptions::EFFECT_XMODE] )
static int SetXMode( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_XMODE] = FArg(1); return 0; }
DEFINE_METHOD( GetTwirl, m_fEffects[PlayerOptions::EFFECT_TWIRL] )
static int SetTwirl( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_TWIRL] = FArg(1); return 0; }
DEFINE_METHOD( GetRoll, m_fEffects[PlayerOptions::EFFECT_ROLL] )
static int SetRoll( T *p, lua_State *L ){ p->m_fEffects[PlayerOptions::EFFECT_ROLL] = FArg(1); return 0; }
static int Hallway(T* p, lua_State* L)
{
if(p->m_fSkew == 0.0f && p->m_fPerspectiveTilt < 0.0f)
{
lua_pushnumber(L, -p->m_fPerspectiveTilt);
lua_pushnumber(L, p->m_SpeedfPerspectiveTilt);
}
else
{
lua_pushnil(L);
lua_pushnil(L);
}
if(lua_isnumber(L, 1))
{
p->m_fPerspectiveTilt= -FArg(1);
p->m_fSkew= 0;
}
if(lua_isnumber(L, 2))
{
SetPerspectiveApproach(p, L, CheckedApproachSpeed(L, FArg(2)));
}
return 2;
}
static int Distant(T* p, lua_State* L)
{
if(p->m_fSkew == 0.0f && p->m_fPerspectiveTilt > 0.0f)
{
lua_pushnumber(L, p->m_fPerspectiveTilt);
lua_pushnumber(L, p->m_SpeedfPerspectiveTilt);
}
else
{
lua_pushnil(L);
lua_pushnil(L);
}
if(lua_isnumber(L, 1))
{
p->m_fPerspectiveTilt= FArg(1);
p->m_fSkew= 0;
}
if(lua_isnumber(L, 2))
{
SetPerspectiveApproach(p, L, CheckedApproachSpeed(L, FArg(2)));
}
return 2;
}
// Appearance
DEFINE_METHOD( GetHidden, m_fAppearances[PlayerOptions::APPEARANCE_HIDDEN] )
static int SetHidden( T *p, lua_State *L ){ p->m_fAppearances[PlayerOptions::APPEARANCE_HIDDEN] = FArg(1); return 0; }
DEFINE_METHOD( GetHiddenOffset, m_fAppearances[PlayerOptions::APPEARANCE_HIDDEN_OFFSET] )
static int SetHiddenOffset( T *p, lua_State *L ){ p->m_fAppearances[PlayerOptions::APPEARANCE_HIDDEN_OFFSET] = FArg(1); return 0; }
DEFINE_METHOD( GetSudden, m_fAppearances[PlayerOptions::APPEARANCE_SUDDEN] )
static int SetSudden( T *p, lua_State *L ){ p->m_fAppearances[PlayerOptions::APPEARANCE_SUDDEN] = FArg(1); return 0; }
DEFINE_METHOD( GetSuddenOffset, m_fAppearances[PlayerOptions::APPEARANCE_SUDDEN_OFFSET] )
static int SetSuddenOffset( T *p, lua_State *L ){ p->m_fAppearances[PlayerOptions::APPEARANCE_SUDDEN_OFFSET] = FArg(1); return 0; }
DEFINE_METHOD( GetStealth, m_fAppearances[PlayerOptions::APPEARANCE_STEALTH] )
static int SetStealth( T *p, lua_State *L ){ p->m_fAppearances[PlayerOptions::APPEARANCE_STEALTH] = FArg(1); return 0; }
DEFINE_METHOD( GetBlink, m_fAppearances[PlayerOptions::APPEARANCE_BLINK] )
static int SetBlink( T *p, lua_State *L ){ p->m_fAppearances[PlayerOptions::APPEARANCE_BLINK] = FArg(1); return 0; }
DEFINE_METHOD( GetRandomVanish, m_fAppearances[PlayerOptions::APPEARANCE_RANDOMVANISH] )
static int SetRandomVanish( T *p, lua_State *L ){ p->m_fAppearances[PlayerOptions::APPEARANCE_RANDOMVANISH] = FArg(1); return 0; }
DEFINE_METHOD( UsingReverse, m_fScrolls[PlayerOptions::SCROLL_REVERSE] == 1.0f );
// Scroll
DEFINE_METHOD( GetReverse, m_fScrolls[PlayerOptions::SCROLL_REVERSE] )
static int SetReverse( T *p, lua_State *L ){ p->m_fScrolls[PlayerOptions::SCROLL_REVERSE] = FArg(1); return 0; }
DEFINE_METHOD( UsingReverse, m_fScrolls[PlayerOptions::SCROLL_REVERSE] == 1.0f )
static int GetReversePercentForColumn( T *p, lua_State *L )
{
const int colNum = IArg(1);
@@ -1056,284 +1311,114 @@ public:
return 1;
}
DEFINE_METHOD( GetSplit, m_fScrolls[PlayerOptions::SCROLL_SPLIT] )
static int SetSplit( T *p, lua_State *L ){ p->m_fScrolls[PlayerOptions::SCROLL_SPLIT] = FArg(1); return 0; }
DEFINE_METHOD( GetAlternate, m_fScrolls[PlayerOptions::SCROLL_ALTERNATE] )
static int SetAlternate( T *p, lua_State *L ){ p->m_fScrolls[PlayerOptions::SCROLL_ALTERNATE] = FArg(1); return 0; }
DEFINE_METHOD( GetCross, m_fScrolls[PlayerOptions::SCROLL_CROSS] )
static int SetCross( T *p, lua_State *L ){ p->m_fScrolls[PlayerOptions::SCROLL_CROSS] = FArg(1); return 0; }
DEFINE_METHOD( GetCentered, m_fScrolls[PlayerOptions::SCROLL_CENTERED] )
static int SetCentered( T *p, lua_State *L ){ p->m_fScrolls[PlayerOptions::SCROLL_CENTERED] = FArg(1); return 0; }
// Turns
DEFINE_METHOD( GetMirror, m_bTurns[PlayerOptions::TURN_MIRROR] )
static int SetMirror( T *p, lua_State *L ){ p->m_bTurns[PlayerOptions::TURN_MIRROR] = BArg(1); return 0; }
DEFINE_METHOD( GetBackwards, m_bTurns[PlayerOptions::TURN_BACKWARDS] )
static int SetBackwards( T *p, lua_State *L ){ p->m_bTurns[PlayerOptions::TURN_BACKWARDS] = BArg(1); return 0; }
DEFINE_METHOD( GetLeft, m_bTurns[PlayerOptions::TURN_LEFT] )
static int SetLeft( T *p, lua_State *L ){ p->m_bTurns[PlayerOptions::TURN_LEFT] = BArg(1); return 0; }
DEFINE_METHOD( GetRight, m_bTurns[PlayerOptions::TURN_RIGHT] )
static int SetRight( T *p, lua_State *L ){ p->m_bTurns[PlayerOptions::TURN_RIGHT] = BArg(1); return 0; }
DEFINE_METHOD( GetShuffle, m_bTurns[PlayerOptions::TURN_SHUFFLE] )
static int SetShuffle( T *p, lua_State *L ){ p->m_bTurns[PlayerOptions::TURN_SHUFFLE] = BArg(1); return 0; }
DEFINE_METHOD( GetSoftShuffle, m_bTurns[PlayerOptions::TURN_SOFT_SHUFFLE] )
static int SetSoftShuffle( T *p, lua_State *L ){ p->m_bTurns[PlayerOptions::TURN_SOFT_SHUFFLE] = BArg(1); return 0; }
DEFINE_METHOD( GetSuperShuffle, m_bTurns[PlayerOptions::TURN_SUPER_SHUFFLE] )
static int SetSuperShuffle( T *p, lua_State *L ){ p->m_bTurns[PlayerOptions::TURN_SUPER_SHUFFLE] = BArg(1); return 0; }
// Transform
DEFINE_METHOD( GetNoHolds, m_bTransforms[PlayerOptions::TRANSFORM_NOHOLDS] )
static int SetNoHolds( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_NOHOLDS] = BArg(1); return 0; }
DEFINE_METHOD( GetNoRolls, m_bTransforms[PlayerOptions::TRANSFORM_NOROLLS] )
static int SetNoRolls( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_NOROLLS] = BArg(1); return 0; }
DEFINE_METHOD( GetNoMines, m_bTransforms[PlayerOptions::TRANSFORM_NOMINES] )
static int SetNoMines( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_NOMINES] = BArg(1); return 0; }
DEFINE_METHOD( GetLittle, m_bTransforms[PlayerOptions::TRANSFORM_LITTLE] )
static int SetLittle( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_LITTLE] = BArg(1); return 0; }
DEFINE_METHOD( GetWide, m_bTransforms[PlayerOptions::TRANSFORM_WIDE] )
static int SetWide( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_WIDE] = BArg(1); return 0; }
DEFINE_METHOD( GetBig, m_bTransforms[PlayerOptions::TRANSFORM_BIG] )
static int SetBig( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_BIG] = BArg(1); return 0; }
DEFINE_METHOD( GetQuick, m_bTransforms[PlayerOptions::TRANSFORM_QUICK] )
static int SetQuick( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_QUICK] = BArg(1); return 0; }
DEFINE_METHOD( GetBMRize, m_bTransforms[PlayerOptions::TRANSFORM_BMRIZE] )
static int SetBMRize( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_BMRIZE] = BArg(1); return 0; }
DEFINE_METHOD( GetSkippy, m_bTransforms[PlayerOptions::TRANSFORM_SKIPPY] )
static int SetSkippy( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_SKIPPY] = BArg(1); return 0; }
DEFINE_METHOD( GetMines, m_bTransforms[PlayerOptions::TRANSFORM_MINES] )
static int SetMines( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_MINES] = BArg(1); return 0; }
DEFINE_METHOD( GetAttackMines, m_bTransforms[PlayerOptions::TRANSFORM_ATTACKMINES] )
static int SetAttackMines( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_ATTACKMINES] = BArg(1); return 0; }
DEFINE_METHOD( GetEcho, m_bTransforms[PlayerOptions::TRANSFORM_ECHO] )
static int SetEcho( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_ECHO] = BArg(1); return 0; }
DEFINE_METHOD( GetStomp, m_bTransforms[PlayerOptions::TRANSFORM_STOMP] )
static int SetStomp( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_STOMP] = BArg(1); return 0; }
DEFINE_METHOD( GetPlanted, m_bTransforms[PlayerOptions::TRANSFORM_PLANTED] )
static int SetPlanted( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_PLANTED] = BArg(1); return 0; }
DEFINE_METHOD( GetFloored, m_bTransforms[PlayerOptions::TRANSFORM_FLOORED] )
static int SetFloored( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_FLOORED] = BArg(1); return 0; }
DEFINE_METHOD( GetTwister, m_bTransforms[PlayerOptions::TRANSFORM_TWISTER] )
static int SetTwister( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_TWISTER] = BArg(1); return 0; }
DEFINE_METHOD( GetHoldRolls, m_bTransforms[PlayerOptions::TRANSFORM_HOLDROLLS] )
static int SetHoldRolls( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_HOLDROLLS] = BArg(1); return 0; }
DEFINE_METHOD( GetNoJumps, m_bTransforms[PlayerOptions::TRANSFORM_NOJUMPS] )
static int SetNoJumps( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_NOJUMPS] = BArg(1); return 0; }
DEFINE_METHOD( GetNoHands, m_bTransforms[PlayerOptions::TRANSFORM_NOHANDS] )
static int SetNoHands( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_NOHANDS] = BArg(1); return 0; }
DEFINE_METHOD( GetNoLifts, m_bTransforms[PlayerOptions::TRANSFORM_NOLIFTS] )
static int SetNoLifts( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_NOLIFTS] = BArg(1); return 0; }
DEFINE_METHOD( GetNoFakes, m_bTransforms[PlayerOptions::TRANSFORM_NOFAKES] )
static int SetNoFakes( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_NOFAKES] = BArg(1); return 0; }
DEFINE_METHOD( GetNoQuads, m_bTransforms[PlayerOptions::TRANSFORM_NOQUADS] )
static int SetNoQuads( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_NOQUADS] = BArg(1); return 0; }
DEFINE_METHOD( GetNoStretch, m_bTransforms[PlayerOptions::TRANSFORM_NOSTRETCH] )
static int SetNoStretch( T *p, lua_State *L ){ p->m_bTransforms[PlayerOptions::TRANSFORM_NOSTRETCH] = BArg(1); return 0; }
// Others
DEFINE_METHOD( GetDark, m_fDark )
static int SetDark( T *p, lua_State *L ) { p->m_fDark = FArg(1); return 0; }
DEFINE_METHOD( GetBlind, m_fBlind )
static int SetBlind( T *p, lua_State *L ) { p->m_fBlind = FArg(1); return 0; }
DEFINE_METHOD( GetCover, m_fCover )
static int SetCover( T *p, lua_State *L ) { p->m_fCover = FArg(1); return 0; }
DEFINE_METHOD( GetRandomAttacks, m_fRandAttack )
static int SetRandomAttacks( T *p, lua_State *L ) { p->m_fRandAttack = FArg(1); return 0; }
DEFINE_METHOD( GetMuteOnError, m_bMuteOnError)
static int SetMuteOnError( T *p, lua_State *L ) { p->m_bMuteOnError = BArg(1); return 0; }
static int GetStepAttacks( T *p, lua_State *L )
{
lua_pushnumber(L,
(p->m_fNoAttack > 0 || p->m_fRandAttack > 0 ? 0 : 1 ));
(p->m_fNoAttack > 0 || p->m_fRandAttack > 0 ? false : true ));
return 1;
}
// This one is deprecated.
static int GetSongAttacks( T *p, lua_State *L ) { return GetStepAttacks(p, L); }
DEFINE_METHOD( GetNoAttacks, m_fNoAttack )
DEFINE_METHOD( GetSkew, m_fSkew )
static int SetSkew( T *p, lua_State *L ) { p->m_fSkew = FArg(1); return 0; }
DEFINE_METHOD( GetPassmark, m_fPassmark )
static int SetPassmark( T *p, lua_State *L ) {
const float fPassmark = FArg(1);
if( !(fPassmark < 0.00f) && fPassmark <= 1.0f )
p->m_fPassmark = fPassmark;
return 0;
}
DEFINE_METHOD( GetRandomSpeed, m_fRandomSpeed )
static int SetRandomSpeed( T *p, lua_State *L ){ p->m_fRandomSpeed = FArg(1); return 0; }
LunaPlayerOptions()
{
ADD_METHOD( IsEasierForSongAndSteps );
ADD_METHOD( IsEasierForCourseAndTrail );
ADD_METHOD( GetDark );
ADD_METHOD( SetDark );
ADD_METHOD( GetBlind );
ADD_METHOD( SetBlind );
ADD_METHOD( GetCover );
ADD_METHOD( SetCover );
ADD_METHOD( GetMuteOnError );
ADD_METHOD( SetMuteOnError );
ADD_METHOD( GetNoteSkin );
ADD_METHOD( SetNoteSkin );
// GetPerspectiveTilt, SetPerspectiveTilt
ADD_METHOD( GetPassmark );
ADD_METHOD( SetPassmark );
ADD_METHOD( GetRandomAttacks );
ADD_METHOD( SetRandomAttacks );
ADD_METHOD( GetRandomSpeed );
ADD_METHOD( SetRandomSpeed );
ADD_METHOD( GetSkew );
ADD_METHOD( SetSkew );
ADD_METHOD( GetSongAttacks );
ADD_METHOD( GetStepAttacks );
ADD_METHOD( GetNoAttacks );
ADD_METHOD(TimeSpacing);
ADD_METHOD(MaxScrollBPM);
ADD_METHOD(ScrollSpeed);
ADD_METHOD(ScrollBPM);
ADD_METHOD(Boost);
ADD_METHOD(Brake);
ADD_METHOD(Wave);
ADD_METHOD(Expand);
ADD_METHOD(Boomerang);
ADD_METHOD(Drunk);
ADD_METHOD(Dizzy);
ADD_METHOD(Confusion);
ADD_METHOD(Mini);
ADD_METHOD(Tiny);
ADD_METHOD(Flip);
ADD_METHOD(Invert);
ADD_METHOD(Tornado);
ADD_METHOD(Tipsy);
ADD_METHOD(Bumpy);
ADD_METHOD(Beat);
ADD_METHOD(Xmode);
ADD_METHOD(Twirl);
ADD_METHOD(Roll);
ADD_METHOD(Hidden);
ADD_METHOD(HiddenOffset);
ADD_METHOD(Sudden);
ADD_METHOD(SuddenOffset);
ADD_METHOD(Stealth);
ADD_METHOD(Blink);
ADD_METHOD(RandomVanish);
ADD_METHOD(Reverse);
ADD_METHOD(Split);
ADD_METHOD(Alternate);
ADD_METHOD(Cross);
ADD_METHOD(Centered);
ADD_METHOD(Dark);
ADD_METHOD(Blind);
ADD_METHOD(Cover);
ADD_METHOD(RandAttack);
ADD_METHOD(NoAttack);
ADD_METHOD(PlayerAutoPlay);
ADD_METHOD(Tilt);
ADD_METHOD(Skew);
ADD_METHOD(Passmark);
ADD_METHOD(RandomSpeed);
ADD_METHOD(TurnNone);
ADD_METHOD(Mirror);
ADD_METHOD(Backwards);
ADD_METHOD(Left);
ADD_METHOD(Right);
ADD_METHOD(Shuffle);
ADD_METHOD(SoftShuffle);
ADD_METHOD(SuperShuffle);
ADD_METHOD(NoHolds);
ADD_METHOD(NoRolls);
ADD_METHOD(NoMines);
ADD_METHOD(Little);
ADD_METHOD(Wide);
ADD_METHOD(Big);
ADD_METHOD(Quick);
ADD_METHOD(BMRize);
ADD_METHOD(Skippy);
ADD_METHOD(Mines);
ADD_METHOD(AttackMines);
ADD_METHOD(Echo);
ADD_METHOD(Stomp);
ADD_METHOD(Planted);
ADD_METHOD(Floored);
ADD_METHOD(Twister);
ADD_METHOD(HoldRolls);
ADD_METHOD(NoJumps);
ADD_METHOD(NoHands);
ADD_METHOD(NoLifts);
ADD_METHOD(NoFakes);
ADD_METHOD(NoQuads);
ADD_METHOD(NoStretch);
ADD_METHOD(MuteOnError);
ADD_METHOD(NoteSkin);
ADD_METHOD(FailSetting);
// Speed
ADD_METHOD( GetCMod );
ADD_METHOD( SetCMod );
ADD_METHOD( GetXMod );
ADD_METHOD( SetXMod );
ADD_METHOD( GetMMod );
ADD_METHOD( SetMMod );
ADD_METHOD( CMod );
ADD_METHOD( XMod );
ADD_METHOD( MMod );
// Accel
ADD_METHOD( GetBoost );
ADD_METHOD( SetBoost );
ADD_METHOD( GetBrake );
ADD_METHOD( SetBrake );
ADD_METHOD( GetWave );
ADD_METHOD( SetWave );
ADD_METHOD( GetExpand );
ADD_METHOD( SetExpand );
ADD_METHOD( GetBoomerang );
ADD_METHOD( SetBoomerang );
ADD_METHOD(Overhead);
ADD_METHOD(Incoming);
ADD_METHOD(Space);
ADD_METHOD(Hallway);
ADD_METHOD(Distant);
// Effect
ADD_METHOD( GetDrunk );
ADD_METHOD( SetDrunk );
ADD_METHOD( GetDizzy );
ADD_METHOD( SetDizzy );
ADD_METHOD( GetConfusion );
ADD_METHOD( SetConfusion );
ADD_METHOD( GetMini );
ADD_METHOD( SetMini );
ADD_METHOD( GetTiny );
ADD_METHOD( SetTiny );
ADD_METHOD( GetFlip );
ADD_METHOD( SetFlip );
ADD_METHOD( GetInvert );
ADD_METHOD( SetInvert );
ADD_METHOD( GetTornado );
ADD_METHOD( SetTornado );
ADD_METHOD( GetTipsy );
ADD_METHOD( SetTipsy );
ADD_METHOD( GetBumpy );
ADD_METHOD( SetBumpy );
ADD_METHOD( GetBeat );
ADD_METHOD( SetBeat );
ADD_METHOD( GetXMode );
ADD_METHOD( SetXMode );
ADD_METHOD( GetTwirl );
ADD_METHOD( SetTwirl );
ADD_METHOD( GetRoll );
ADD_METHOD( SetRoll );
// Appearance
ADD_METHOD( GetHidden );
ADD_METHOD( SetHidden );
ADD_METHOD( GetHiddenOffset );
ADD_METHOD( SetHiddenOffset );
ADD_METHOD( GetSudden );
ADD_METHOD( SetSudden );
ADD_METHOD( GetSuddenOffset );
ADD_METHOD( SetSuddenOffset );
ADD_METHOD( GetStealth );
ADD_METHOD( SetStealth );
ADD_METHOD( GetBlink );
ADD_METHOD( SetBlink );
ADD_METHOD( GetRandomVanish );
ADD_METHOD( SetRandomVanish );
// Scroll
ADD_METHOD( GetReverse );
ADD_METHOD( SetReverse );
ADD_METHOD( UsingReverse );
ADD_METHOD( GetReversePercentForColumn );
ADD_METHOD( GetSplit );
ADD_METHOD( SetSplit );
ADD_METHOD( GetAlternate );
ADD_METHOD( SetAlternate );
ADD_METHOD( GetCross );
ADD_METHOD( SetCross );
ADD_METHOD( GetCentered );
ADD_METHOD( SetCentered );
// Turns
ADD_METHOD( GetMirror );
ADD_METHOD( SetMirror );
ADD_METHOD( GetBackwards );
ADD_METHOD( SetBackwards );
ADD_METHOD( GetLeft );
ADD_METHOD( SetLeft );
ADD_METHOD( GetRight );
ADD_METHOD( SetRight );
ADD_METHOD( GetShuffle );
ADD_METHOD( SetShuffle );
ADD_METHOD( GetSoftShuffle );
ADD_METHOD( SetSoftShuffle );
ADD_METHOD( GetSuperShuffle );
ADD_METHOD( SetSuperShuffle );
// Transform
ADD_METHOD( GetNoHolds );
ADD_METHOD( SetNoHolds );
ADD_METHOD( GetNoRolls );
ADD_METHOD( SetNoRolls );
ADD_METHOD( GetNoMines );
ADD_METHOD( SetNoMines );
ADD_METHOD( GetLittle );
ADD_METHOD( SetLittle );
ADD_METHOD( GetWide );
ADD_METHOD( SetWide );
ADD_METHOD( GetBig );
ADD_METHOD( SetBig );
ADD_METHOD( GetQuick );
ADD_METHOD( SetQuick );
ADD_METHOD( GetBMRize );
ADD_METHOD( SetBMRize );
ADD_METHOD( GetSkippy );
ADD_METHOD( SetSkippy );
ADD_METHOD( GetMines );
ADD_METHOD( SetMines );
ADD_METHOD( GetAttackMines );
ADD_METHOD( SetAttackMines );
ADD_METHOD( GetEcho );
ADD_METHOD( SetEcho );
ADD_METHOD( GetStomp );
ADD_METHOD( SetStomp );
ADD_METHOD( GetPlanted );
ADD_METHOD( SetPlanted );
ADD_METHOD( GetFloored );
ADD_METHOD( SetFloored );
ADD_METHOD( GetTwister );
ADD_METHOD( SetTwister );
ADD_METHOD( GetHoldRolls );
ADD_METHOD( SetHoldRolls );
ADD_METHOD( GetNoJumps );
ADD_METHOD( SetNoJumps );
ADD_METHOD( GetNoHands );
ADD_METHOD( SetNoHands );
ADD_METHOD( GetNoLifts );
ADD_METHOD( SetNoLifts );
ADD_METHOD( GetNoFakes );
ADD_METHOD( SetNoFakes );
ADD_METHOD( GetNoQuads );
ADD_METHOD( SetNoQuads );
ADD_METHOD( GetNoStretch );
ADD_METHOD( SetNoStretch );
ADD_METHOD( GetStepAttacks );
}
};
+1 -10
View File
@@ -30,12 +30,11 @@ public:
m_fRandAttack(0), m_SpeedfRandAttack(1.0f),
m_fNoAttack(0), m_SpeedfNoAttack(1.0f),
m_fPlayerAutoPlay(0), m_SpeedfPlayerAutoPlay(1.0f),
m_bSetTiltOrSkew(false),
m_fPerspectiveTilt(0), m_SpeedfPerspectiveTilt(1.0f),
m_fSkew(0), m_SpeedfSkew(1.0f),
m_fPassmark(0), m_SpeedfPassmark(1.0f),
m_fRandomSpeed(0), m_SpeedfRandomSpeed(1.0f),
m_bMuteOnError(false), m_FailType(FAIL_IMMEDIATE)
m_bMuteOnError(false), m_FailType(FailType_Immediate)
{
m_sNoteSkin = "";
ZERO( m_fAccels ); ONE( m_SpeedfAccels );
@@ -172,7 +171,6 @@ public:
float m_fRandAttack, m_SpeedfRandAttack;
float m_fNoAttack, m_SpeedfNoAttack;
float m_fPlayerAutoPlay, m_SpeedfPlayerAutoPlay;
bool m_bSetTiltOrSkew; // true if the tilt or skew was set by FromString
float m_fPerspectiveTilt, m_SpeedfPerspectiveTilt; // -1 = near, 0 = overhead, +1 = space
float m_fSkew, m_SpeedfSkew; // 0 = vanish point is in center of player, 1 = vanish point is in center of screen
@@ -185,13 +183,6 @@ public:
bool m_bTurns[NUM_TURNS];
bool m_bTransforms[NUM_TRANSFORMS];
bool m_bMuteOnError;
/** @brief How can the Player fail a song? */
enum FailType {
FAIL_IMMEDIATE=0, /**< fail immediately when life touches 0 */
FAIL_IMMEDIATE_CONTINUE, /**< Same as above, but allow playing the rest of the song */
FAIL_AT_END, /**< fail if life is at 0 when the song ends */
FAIL_OFF /**< never fail */
};
/** @brief The method for which a player can fail a song. */
FailType m_FailType;
+1 -2
View File
@@ -232,8 +232,7 @@ public:
static int GetPlayerOptions( T* p, lua_State *L )
{
ModsLevel m = Enum::Check<ModsLevel>( L, 1 );
PlayerOptions po = p->m_PlayerOptions.Get(m);
po.PushSelf(L);
p->m_PlayerOptions.Get(m).PushSelf(L);
return 1;
}
static int GetPlayerOptionsArray( T* p, lua_State *L )
-11
View File
@@ -125,17 +125,6 @@ XToString( CourseSortOrders );
StringToX( CourseSortOrders );
LuaXType( CourseSortOrders );
// XXX: Fix fail bug?
/* static const char *DefaultFailTypeNames[] = {
"Immediate",
"ImmediateContinue",
"EndOfSong",
"Off",
};
XToString( DefaultFailType );
StringToX( DefaultFailType );
LuaXType( DefaultFailType ); */
bool g_bAutoRestart = false;
#ifdef DEBUG
# define TRUE_IF_DEBUG true
-10
View File
@@ -112,16 +112,6 @@ enum CourseSortOrders
CourseSortOrders_Invalid
};
enum DefaultFailType
{
FAIL_IMMEDIATE,
FAIL_IMMEDIATECONTINUE,
FAIL_ENDOFSONG,
FAIL_OFF,
NUM_DefaultFailType,
DefaultFailType_Invalid
};
/** @brief Holds user-chosen preferences that are saved between sessions. */
class PrefsManager
{
+1 -1
View File
@@ -297,7 +297,7 @@ void ScreenEvaluation::Init()
vector<RString> v;
PlayerOptions po = GAMESTATE->m_pPlayerState[p]->m_PlayerOptions.GetPreferred();
if( PLAYER_OPTIONS_HIDE_FAIL_TYPE )
po.m_FailType = (PlayerOptions::FailType)0; // blank out the fail type so that it won't show in the mods list
po.m_FailType = (FailType)0; // blank out the fail type so that it won't show in the mods list
po.GetLocalizedMods( v );
RString sPO = join( PLAYER_OPTIONS_SEPARATOR, v );
m_textPlayerOptions[p].SetText( sPO );
+13 -13
View File
@@ -1085,7 +1085,7 @@ void ScreenGameplay::LoadNextSong()
if( GAMESTATE->m_SongOptions.GetCurrent().m_LifeType == SongOptions::LIFE_BATTERY )
{
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
PO_GROUP_ASSIGN( pi->GetPlayerState()->m_PlayerOptions, ModsLevel_Song, m_FailType, PlayerOptions::FAIL_IMMEDIATE );
PO_GROUP_ASSIGN( pi->GetPlayerState()->m_PlayerOptions, ModsLevel_Song, m_FailType, FailType_Immediate );
}
m_textSongOptions.SetText( GAMESTATE->m_SongOptions.GetCurrent().GetString() );
@@ -1579,7 +1579,7 @@ void ScreenGameplay::Update( float fDeltaTime )
{
HealthState &hs = pi->GetPlayerState()->m_HealthState;
HealthState OldHealthState = hs;
if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != PlayerOptions::FAIL_OFF &&
if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != FailType_Off &&
pi->m_pLifeMeter && pi->m_pLifeMeter->IsFailing() )
{
hs = HealthState_Dead;
@@ -1588,7 +1588,7 @@ void ScreenGameplay::Update( float fDeltaTime )
{
hs = HealthState_Hot;
}
else if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != PlayerOptions::FAIL_OFF &&
else if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != FailType_Off &&
pi->m_pLifeMeter && pi->m_pLifeMeter->IsInDanger() )
{
hs = HealthState_Danger;
@@ -1633,10 +1633,10 @@ void ScreenGameplay::Update( float fDeltaTime )
{
PlayerNumber pn = pi->GetStepsAndTrailIndex();
PlayerOptions::FailType ft = GAMESTATE->GetPlayerFailType( pi->GetPlayerState() );
FailType ft = GAMESTATE->GetPlayerFailType( pi->GetPlayerState() );
SongOptions::LifeType lt = GAMESTATE->m_SongOptions.GetCurrent().m_LifeType;
if( ft == PlayerOptions::FAIL_OFF || ft == PlayerOptions::FAIL_AT_END )
if( ft == FailType_Off || ft == FailType_EndOfSong )
continue;
// check for individual fail
@@ -1663,7 +1663,7 @@ void ScreenGameplay::Update( float fDeltaTime )
default:
break;
}
if( bAllowOniDie && ft == PlayerOptions::FAIL_IMMEDIATE )
if( bAllowOniDie && ft == FailType_Immediate )
{
if( !STATSMAN->m_CurStageStats.AllFailed() ) // if not the last one to fail
{
@@ -1681,18 +1681,18 @@ void ScreenGameplay::Update( float fDeltaTime )
bool bAllFailed = true;
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
{
PlayerOptions::FailType ft = GAMESTATE->GetPlayerFailType( pi->GetPlayerState() );
FailType ft = GAMESTATE->GetPlayerFailType( pi->GetPlayerState() );
switch( ft )
{
case PlayerOptions::FAIL_IMMEDIATE:
case FailType_Immediate:
if( pi->m_pLifeMeter == NULL || (pi->m_pLifeMeter && !pi->m_pLifeMeter->IsFailing()) )
bAllFailed = false;
break;
case PlayerOptions::FAIL_IMMEDIATE_CONTINUE:
case PlayerOptions::FAIL_AT_END:
case FailType_ImmediateContinue:
case FailType_EndOfSong:
bAllFailed = false; // wait until the end of the song to fail.
break;
case PlayerOptions::FAIL_OFF:
case FailType_Off:
bAllFailed = false; // never fail.
break;
default:
@@ -1812,7 +1812,7 @@ void ScreenGameplay::Update( float fDeltaTime )
bool bAllHumanHaveBigMissCombo = true;
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
{
if (pi->GetPlayerState()->m_PlayerOptions.GetCurrent().m_FailType == PlayerOptions::FAIL_OFF ||
if (pi->GetPlayerState()->m_PlayerOptions.GetCurrent().m_FailType == FailType_Off ||
pi->GetPlayerState()->m_HealthState < HealthState_Dead )
{
bAllHumanHaveBigMissCombo = false;
@@ -2434,7 +2434,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
{
// Mark failure.
if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != PlayerOptions::FAIL_OFF &&
if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != FailType_Off &&
(pi->m_pLifeMeter && pi->m_pLifeMeter->IsFailing()) )
pi->GetPlayerStageStats()->m_bFailed = true;
+1 -1
View File
@@ -221,7 +221,7 @@ void ScreenJukebox::Init()
GAMESTATE->m_SongOptions.Assign( ModsLevel_Stage, so );
FOREACH_EnabledPlayer( p )
PO_GROUP_ASSIGN( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions, ModsLevel_Stage, m_FailType, PlayerOptions::FAIL_OFF );
PO_GROUP_ASSIGN( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions, ModsLevel_Stage, m_FailType, FailType_Off );
GAMESTATE->m_bDemonstrationOrJukebox = true;
+5 -5
View File
@@ -500,14 +500,14 @@ static void DefaultFailType( int &sel, bool ToSel, const ConfOption *pConfOption
switch( sel )
{
case 0: po.m_FailType = PlayerOptions::FAIL_IMMEDIATE; break;
case 1: po.m_FailType = PlayerOptions::FAIL_IMMEDIATE_CONTINUE; break;
case 2: po.m_FailType = PlayerOptions::FAIL_AT_END; break;
case 3: po.m_FailType = PlayerOptions::FAIL_OFF; break;
case 0: po.m_FailType = FailType_Immediate; break;
case 1: po.m_FailType = FailType_ImmediateContinue; break;
case 2: po.m_FailType = FailType_EndOfSong; break;
case 3: po.m_FailType = FailType_Off; break;
default:
{
LOG->Warn("Invalid fail type %d! Going to use the default...", sel);
po.m_FailType = PlayerOptions::FAIL_IMMEDIATE; break;
po.m_FailType = FailType_Immediate; break;
}
}
+1 -1
View File
@@ -25,7 +25,7 @@ void ScreenSongOptions::ExportOptions( int iRow, const vector<PlayerNumber> &vpn
{
PlayerNumber pn = GAMESTATE->GetMasterPlayerNumber();
PlayerState *pPS = GAMESTATE->m_pPlayerState[pn];
const PlayerOptions::FailType ft = pPS->m_PlayerOptions.GetPreferred().m_FailType;
const FailType ft = pPS->m_PlayerOptions.GetPreferred().m_FailType;
ScreenOptionsMaster::ExportOptions( iRow, vpns );