Commit Graph

76 Commits

Author SHA1 Message Date
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -07:00
MrThatKid 921a617a64 Added nITG's Tangent Modifiers (#1495)
* Implemented nITG's TanDrunk modifiers.

RageMath functions added:
RageFastTan
RageFastCsc
Modifers added:
GlitchyTan
TanDrunk
TanDrunkSpeed
TanDrunkOffset
TanDrunkPeriod
TanDrunkZ
TanDrunkZSpeed
TanDrunkZOffset
TanDrunkZPeriod

* Implemented nITG's TanTipsy and TanTornado mods

Also, the Drunk code and Tipsy update code was deduplicated.
Modifiers Added:
TanTipsy
TanTipsySpeed
TanTipsyOffset
TanTornado
TanTornadoPeriod
TanTornadoOffset
TanTornadoZ
TanTornadoZPeriod
TanTornadoZOffset

* Implemented nITG's remaining tan mods.

Modifiers added:
TanExpand
TanExpandPeriod
TanBumpy
TanBumpyPeriod
TanBumpyOffset
TanBumpyX
TanBumpyXPeriod
TanBumpyXOffset
TanDigital
TanDigitalPeriod
TanDigitalSteps
TanDigitalOffset
TanDigitalZ
TanDigitalZPeriod
TanDigitalZSteps
TanDigitalZOffset

* Updated luadocs to reference new modifiers

* Rename GlitchyTan to Cosecant (#4)

* Rename GlitchyTan to Cosecant

* Update luadocs to reflect change
2017-07-14 22:32:58 -07:00
MrThatKid a3eab2e7ab Added nITG's various column specific & other misc modifiers (#1468)
* Added stealth control, ZBuffer & DizzyHolds mod

Modifiers added:
StealthPastReceptors
DizzyHolds
StealthType
ZBuffer

* Removed theme metrics that are now mods.

Removed metrics:
DrawHiddenNotesAfterReceptor
DizzyHoldHeads

* Implemented nITG's Shrink modifiers

Modifiers Added:
ShrinkLinear
ShrinkMult

* Implemented nITG's Attenuate mods.

Modifiers added:
AttenuateX
AttenuateY
AttenuateZ

* Implemented nITG's pulse modifiers

Modifiers added:
PulseInner
PulseOuter
PulsePeriod
PulseOffset

* Implemented nITG's DrawSize and Bounce modifiers.

Modifiers Added:
Bounce
BouncePeriod
BounceOffset
BounceZ
BounceZPeriod
BounceZOffset
DrawSize
DrawSizeBack

* Added nITG's column specific Dark & Stealth mods

Modifiers added:
Stealth<1-n>
Dark<1-n>

* Finish adding nITG's column specific mods

Modifiers added:
ConfusionXOffset<1-n>
ConfusionYOffset<1-n>
ConfusionzOffset<1-n>
Reverse<1-n>
Tiny<1-n>
Bumpy<1-n>

* Documented new modififers

* Changelog housekeeping

Fixed a typo and added this branch's PR into the changelog.

* Last bit of clean up. (#3)

* Fixed up one line of the changelog

* Add MrThatKid to credits.
2017-06-09 21:10:17 -07:00
MrThatKid e15e0e68be Add nITG's various path shape & other modifiers - V2 (#1435)
* Implemented nITG's Square modifiers

Modifiers added:
Square
SquareOffset
SquarePeriod
SquareZ
SquareZOffset
SquareZPeriod

* Implemented nITG's BumpyX Modifiers

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

* Implemented nITG's TornadoZ Modifiers

Modifiers Added:
TornadoZ
TornadoZPeriod
TornadoZOffset

Another commit is needed to update fallback's metrics

* Update fallback's metrics to accommodate TornadoX

* Implemented nITG's Parabola Modifiers

Modifiers Added:
ParabolaX
ParabolaY
ParabolaZ

* Implemented nITG's Sawtooth Modifiers

Modifiers Added:
Sawtooth
SawtoothPeriod
SawtoothZ
SawtoothZPeriod

* Implemented nITG's Zigzag Modifiers

Modifiers Added:
Zigzag
ZigzagPeriod
ZigzagOffset
ZigzagZ
ZigzagZPeriod
ZigzagZOffset

* Implemented nITG's ModTimer modifiers

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

* Remove Log use from ArrowEffects::GetTime()

* Accidentally removed a CPY(m_BatteryLives)

* Implemented nITG's DrunkZ modifiers

Modifiers added:
drunkz
drunkzspeed
drunkzoffset
drunkzperiod

Another commit is needed to update fallback's metrics

* Update fallback's metrics to accommodate DrunkZ

* Implemented nITG's BeatY & BeatZ Modifers

Modifiers Added:
beaty
beatyoffset
beatyperiod
beatymult	
beatz
beatzoffset
beatzperiod
beatzmult

Another commit is needed to update fallback's metrics

* Updated fallback's metrics to accommodate ...

the new Beat modifiers.

* Implemented nITG's Digital Modifiers

Modifers Added:
digital
digitalsteps
digitalperiod
digitaloffset
digitalz
digitalzsteps
digitalzperiod
digitalzoffset

* Removed duplicate zbuffer check.

* Updated Luadocs with the new modifiers

* Removed accidental duplicate Mini from Luadocs

* Split up long modifier lines.

Hopefully, this makes it a bit easier to read.

* Remove accidental commit to root of repo.

* Split up long modifier lines

Hopefully, this makes it easier to read.

* Redid Square functions to not use FastSin

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

* Redid zigzag functions to not use FastSin

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

* Moved square & zigzag calculation to RageMath.

New RageMath functions:
RageSquare
RageTriangle

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

as Zigzag and Sawtooth.

* Deduplicate tornado calculations.

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

* Deduplicated Beat mod update logic.

The logic is now placed into a function called UpdateBeat.
The m_fBeatFactor members are now a 1D array, similar to m_MaxTornado and m_MinTornado.
2017-05-13 11:34:34 -07:00
MrThatKid 86dbab0100 Added nITG's various sub-modifiers (#1419)
* Added nITG's Bumpy sub-mods and ...

reorganized PlayerOptions::FromOneModString's Confusion checks
This is to help avoid the nesting level of 128 under Windows

* Added nITG's Tipsy sub-mods

Modifiers added:
TipsySpeed
TipsyOffset

* Add nITG's Drunk sub-mods

Modifiers added:
DrunkSpeed
DrunkOffset
DrunkPeriod

* Added nITG's Wave & Expand sub-mods

Modifiers added:
WavePeriod
ExpandPeriod

* Added nITG's Tornado sub-mods

Modifiers Added:
TornadoPeriod
TornadoOffset

* Added nITG's Beat sub-mods

Modifiers added:
BeatOffset
BeatPeriod
BeatMult

* Documented the new sub-mods
2017-03-14 03:27:18 -07:00
MrThatKid 1c9227db22 Add nITG's new Move modifiers (#1411)
* Implemented NITG's MoveX/Y/Z modifiers

Added modifiers:
MoveX1-n: Moves a column in the x direction, 100% = move left one arrow size. 
MoveY1-n: Moves a column in the y direction
MoveZ1-n: Moves a column in the z direction.
2017-02-25 15:48:03 -08:00
MrThatKid 388d4ac8ea Add nITG's new Confusion modifiers (#1395)
* Implemented nITG's Confusion modifiers.

Modifiers added:
ConfusionOffset
ConfusionX
ConfusionXOffset
ConfusionY
ConfusionYOffset

* Documented new Confusion modifiers.

* Make ConfusionX mods apply to hold heads
2017-02-08 05:44:33 -08:00
Kyzentun Keeslala 86470b7977 Reinstate RageFastSin because it's faster on Windows. 2016-02-07 21:04:10 -07:00
Kyzentun Keeslala acda44238d Replace RageFastSin and RageFastCos with standard library versions because the standard library is faster. Use fmod in spline evaluation. 2016-02-07 15:35:05 -07:00
Kyzentun 2656123464 RageTextureManager now keeps a map of textures by pointer for quicker lookup when deleting.
RageTextureManager now keeps a map of textures that need updating, which is none of them because I couldn't find a class that inherits from RageTexture that doesn't have an empty Update function.
ArrowEffects now requires setting the current PlayerOptions before calling any functions.  This might make moving to per-column mods easier, and reduces the direct usage of PlayerState.
Tipsy calculations for each column are done in ArrowEffects::Update instead of GetYPos and GetYOffset.
DrawHold changed to only call DrawHoldBody once.  DrawHoldBody now does the normal and glow passes together instead of needing to be called twice.
DrawHoldPart changed to take most of its args in a struct.
Giant copy paste mess that NoteField was using to draw timing segment text replaced with a couple functions and a macro.
Selection glow for notefield is only calculated if a section is selected.
Added RageVector3 functions to CubicSplineN for NoteDisplay to use.
Actor effect period is cached now.  Sprites and Models cache their animation length now.
ReceptorArrowRow no longer calls ArrowEffects::Update in gameplay.
2015-04-24 15:55:54 -06:00
Kyzentun 3fb36af157 Separate styles for players. Notefields positioned between margins. Edit mode works for kickbox. 2014-12-09 22:27:00 -07:00
sigatrev 466718e016 created ArrowEffects namespace
and exposed all arrow effects functions. This can allow themed elements
to move with columns during gameplay, such as column specific judgments,
flashes, or whatever else.
2014-06-28 01:26:57 -05:00
Kyzentun b756386fda Changed GetYOffset to make CMods an MMods compensate for music rate. 2014-06-17 03:14:17 -06:00
Kyzentun 2b9982f505 Added Mmod compensation to ArrowEffects::GetYOffset. 2014-05-08 03:07:02 -06:00
Devin J. Pohly b423268568 Further simplify GetYOffset
And add a comment.  *pats self on back*

No-op.
2013-07-18 15:52:56 -04:00
Devin J. Pohly 5c8d021e6e Simplify logic in GetYOffset for arrows
No-op.
2013-07-18 14:40:16 -04:00
Devin J. Pohly bcd90324c7 editor: show scroll segments in song timing
They function anyway in gameplay; there's no reason they should be
special-cased out of the editor.
2013-07-18 14:35:53 -04:00
Devin J. Pohly ce507b9800 use empty TimingData in Steps to signify fallback on Song timing.
This required using the new Steps::GetTimingData function and the allowEmpty
parameter to TimingData::TidyUpData when appropriate, as well as clearing the
TimingData to remove step timing rather than coping the song timing over it.

Fixes some odd editor behavior when changing song timing, and is overall a
slightly less hacky way of doing things.
2013-01-23 14:51:18 -05:00
Jason Felds 4fee57442c In during commit. ;) 2011-11-01 15:25:05 -04:00
Jason Felds 1c28a06bb6 Fix Expand, possibly other mods, for 2nd player. 2011-11-01 15:20:20 -04:00
Thai Pangsakulyanont d285c80a72 Some optimizations with the scroll segments.
Scroll segments seem to cause the lag when there's a lot of segment
in the steps, say, 165. On my Mac, it drops the frame-rate down by about
30 FPS in the end.

This is because the way the the game tries to determine the exact position
of the note, it has to go through all the scroll segments from the
beginning until it finds the currently active scroll segment and keep
track of the beat to display instead.

And each frame, the game needs to determine the position for each note,
and also when figuring out the first beat and last beat to display. This
makes the game slow even with just 165 scroll segments.

The approach is that at every game update, we create an optimized data
structure that can calculate the displayed beat from real song beat
in O(log n) time. So in this approach we iterate through EVERY scroll
segments each frame instead of iterating through the scroll segments
for each note for each frame. This eliminates the lag on this side.

The data structure is recomputed each update because I assume that the
timing segments can change at any time, but not during draws.

A similar problem is: when using Cmods, GetElapsedTimeFromBeat()
is also called very often (say, for each note and also in FindFirst/Last
DisplayedBeat), we may as well have to make these queries faster for songs
that has hundreds of BPM changes or stops or delays to prevent the game
from lagging.
2011-09-14 23:48:24 +07:00
Thai Pangsakulyanont 8fdf42e2bb Add PlayerState::GetDisplayedPosition() and PlayerState::GetDisplayedTiming()
which returns the dispalyed position and timing (based on the timing display
switch in the editor), so less copy n paste in ArrowEffects and NoteField.
2011-09-14 12:20:42 +07:00
Jason Felds b3d1dd7a50 Well, that was a thing. 2011-07-05 17:04:20 -04:00
Jason Felds 2726f6df82 NOW Mini and Tiny are swapped properly. 2011-07-05 16:50:06 -04:00
Colby Klein df4bde7563 Fix metric naming 2011-07-05 12:50:01 -07:00
Colby Klein e9c23c0b83 revert changes, swap mini<->tiny when loading as a temp solution. 2011-07-05 12:22:23 -07:00
Colby Klein ae8d923bec Another attempt at Mini <-> Tiny. This one should be much closer or working. 2011-07-05 11:17:12 -07:00
Jason Felds 2ab5a4ddb8 Mostly 64 - 32 float warning fixes. 2011-06-12 03:37:10 -04:00
Thai Pangsakulyanont 8f35c048b8 [scroll] mergefix 2011-05-25 23:48:34 +07:00
Thai Pangsakulyanont d9f936190a [default -> scroll] merge 2011-05-25 22:56:26 +07:00
Thai Pangsakulyanont fe9573975c [scroll] 90% of scroll segments 2011-05-25 22:44:41 +07:00
Thai Pangsakulyanont aa0eb7f5d7 GetSpeedMultiplier in ArrowEffects becomes TimingData::GetDisplayedSpeedPercent.
We might need to use it later in other parts (NoteField).
2011-05-24 11:43:08 +07:00
Jason Felds c26da983e4 [splittiming] Right idea, wrong place.
Song Timing respected when needed, included SpeedSegments.
2011-05-17 14:16:58 -04:00
Jason Felds 1a41c32dd9 [splittiming] Better variable name.
ArrowEffects had a minor change, but the intent isn't up yet.
It needs to be so that when you go from the editor to the chart
for playing in Song Timing, it doesn't use the Step Timing.
2011-05-17 00:07:43 -04:00
Thai Pangsakulyanont 5deed76e37 [splittiming] add a special case for lengthed speed change at beat 0. 2011-05-17 00:02:15 +07:00
Thai Pangsakulyanont f8f47c002b [splittiming] speed segment changes:
- allow first speed segment to take effect
- make speed segments take effect before delays
- make speed segments not affect cmods
2011-05-16 12:17:54 +07:00
Jason Felds e2766cf644 [splittiming] SpeedSegments run on Seconds now.
ScreenEdit's code probably needs to be redone.
At least, someone find a way to remove "Beats"
or "Seconds" from the text entry area.
2011-05-15 23:48:03 -04:00
Jason Felds 275bb63ca0 [splittiming] Don't show SPEEDS in pure editor. 2011-05-15 21:24:39 -04:00
Jason Felds f36121e647 [splittiming] Remember transitions to 1x. 2011-05-15 19:39:14 -04:00
Jason Felds 183e745534 [splittiming] Of course...negative inverse. 2011-05-15 18:57:04 -04:00
Jason Felds eb5ae94f07 [splittiming] Follow Daisu's lua a little more. 2011-05-15 18:33:47 -04:00
Jason Felds e9bcdc5568 [splittiming] Kind of getting there... 2011-05-15 18:15:52 -04:00
Jason Felds 300360a612 [splittiming] Setup for math fun.
Feels like we're doing trig or calculus here.
2011-05-15 17:45:21 -04:00
Jason Felds 231f9433c3 [splittiming] Speed Changes working...somewhat.
There needs to be some more math involving the beats.
2011-05-15 17:39:57 -04:00
Jason Felds 87ac80c33f [splittiming] We know this doesn't work.
Time to find what does.
2011-05-15 17:14:18 -04:00
Jason Felds 6db40f034a [splittiming] Core lines set for #SPEEDS.
Let's see how badly this breaks.
2011-05-15 16:07:18 -04:00
Jason Felds 7c9b54e9f0 [splittiming] Fix ArrowEffects 1c4b21b.
Almost had this one right...just needed more vars.
2011-05-13 23:32:14 -04:00
Thai Pangsakulyanont 1c4b21b181 [splittiming] ok, now it displays properly. 2011-05-13 15:19:42 +07:00
Thai Pangsakulyanont 1bf99bd528 [splittiming] make screenedit work with the steps' timing. 2011-05-11 20:53:40 +07:00
Thai Pangsakulyanont 2c87c34899 [splittiming] ArrowEffects, BPMDisplay, Inventory, MeterDisplay 2011-05-10 21:44:25 +07:00