Commit Graph

127 Commits

Author SHA1 Message Date
Thai Pangsakulyanont 248504f275 escape # in first keysound entry, fixed ADPCM reader and make PMS load more correctly.
- [NoteField] fix build warnings, and change the maximum number of displayed notes
  after the receptor to 64.
- [Player] fix build warnings.
- [NotesLoaderSSC, NotesWriterSSC] The MSD file reader seems to treat # that comes
  directly after : as new tag, and as many PMS and BMS files has keysounds which filename
  starts with #, so it looks like this: #KEYSOUNDS:#bgm.wav,01.wav,02.wav,..
  The MSD parser will see it as 2 different tags. So I added a backslash in front of the
  # sign if it's at the start when saving and remove it when loading.
- [RageSoundReader_WAV] ADPCM now works very well and doesn't return error when
  end of file is reached anymore.
- [Steps] Use BMS loader when loading the note data.
2011-11-11 18:40:34 +07:00
Thai Pangsakulyanont 61a69fe457 prepwork: also generate a data structure for note statistics that can
determine the number of notes to display from any beat to any beat in
O(log n) [n = number of non-empty rows].

it might be used to determine the first displayed beat or last displayed
beat based on number of notes on screen (instead of fixed beats),
if this can be implemented properly, then notes will no longer disappear
or appear during a long slow scrolls/speeds [as long as the number of
notes to display is in our limit].
2011-09-16 22:27:56 +07:00
Mark Cannon 8099e25dcc stage 3 of TimingData changes: changed external interface, enforce encapsulation more strictly 2011-09-15 03:28:58 +00: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
AJ Kelly 0c40652436 [Player] Make keysounds respect volume preference. Fixes issue 344. 2011-08-20 03:03:10 -05:00
Thai Pangsakulyanont 4dfed45103 Mute the keysound immediately when letting go of hold note.
Don't know if that last formula change is intentional or not, so restoring this
old formula. Back this out if it's actually intentional.
2011-08-08 00:40:14 +07:00
Jason Felds 2961d4532b No need for hopo checking. 2011-07-30 15:43:22 -04:00
Jason Felds dbdab4759e [Xcode4] May as well fix switch warnings.
Still need some assistance for the linker error.
2011-07-20 11:11:04 -04:00
Jason Felds 3e260fca48 [default -> timing] Bring up to date for test. 2011-07-17 10:54:42 -04:00
Jason Felds b545c7d6d3 Revert Quantize*.
Ended up being finicky and only working with some files.

Perhaps some ups needed downs or vice~versa.
2011-07-17 01:22:59 -04:00
Jason Felds 6f5ab98dec [timing] More respect of pointers.
Again going to trust virtual functions to do the right thing.
2011-07-14 23:15:48 -04:00
Jason Felds 228c1b793c ...right. We need telekenesis now. 2011-07-13 23:40:52 -04:00
Jason Felds f77107ea78 Whoops: wrong direction. Thanks vyhd! 2011-07-13 23:39:39 -04:00
Jason Felds c875b3cf5f Use better code. 2011-07-13 23:11:47 -04:00
Jason Felds 2eeed0cea0 Un-needed cast. 2011-07-13 17:00:09 -04:00
Jason Felds 2d8f130771 Revert these. It was only needed in score.
I apologize for the recompilation of about 180 files.
2011-07-09 13:21:08 -04:00
Jason Felds 187415bc70 Add some .result hooks.
Have to find the other place to grab them.
2011-07-09 12:54:13 -04:00
Jason Felds c139537ce6 Add metric access for MinScores.
This will most likely be needed for my goal.
2011-07-09 12:37:01 -04:00
Jason Felds 2726f6df82 NOW Mini and Tiny are swapped properly. 2011-07-05 16:50:06 -04:00
Jason Felds b115a875de Fix the other mMod corner case. 2011-07-03 13:57:22 -04:00
Jason Felds 2038606a30 New metric, MModHighCap. Can fix Tsuhsuixamush.
Set to 0 or less to remove the cap.
2011-07-03 13:43:30 -04:00
Jason Felds 1574de2c25 Deal with corner case.
The hardcoded 600 will soon become a metric.
2011-07-03 13:35:00 -04:00
Jason Felds b84fa62579 Tag team by freem and myself: mmods working 90%.
The remaining 10%? Dealing with Tsuhsuixamush.
2011-07-03 13:15:31 -04:00
Jason Felds b15322a87a Most issues fixed for MMods.
Present problem: trying to assign the scroll
speed in a "read only structure". Is mPlayerOptions.GetCurrent()
a set in disguise?
2011-07-03 10:26:00 -04:00
Colby Klein 07a2bd6da7 Port OpenITG's M-Mods. Example: m600 to set target BPM of 600, on a 200BPM song this means 3x. Works with custom speed mods. Note: the block in Player.cpp needs to be fixed for these to be usable, do this before releasing PR2. 2011-07-03 00:08:56 -07:00
Jason Felds ba5bef76b5 Make holds and rolls use the same timing.
Players may have to update their Preferences.ini file manually.
2011-06-29 20:26:05 -04:00
Jason Felds 2d6c94e70e Revert parts of RandomVanish code.
It was never the logic that was busted.
Just the noteskins.
2011-06-27 13:26:32 -04:00
Jason Felds 16d58dc0a4 Fix editor crash if you don't save a new chart. 2011-06-24 01:09:37 -04:00
Jason Felds a72241666d Ensure AutoPlay doesn't cause ANY combo increase.
AutoPlayCPU can, however.
2011-06-13 15:00:21 -04:00
Jason Felds c3c8753620 More prototype warning stuff.
I know these should be in the .h files,
but we can cover that later.
2011-06-12 19:20:43 -04:00
Jason Felds 4036ee89c2 Last bit of warnings for tonight. 2011-06-12 03:55:48 -04:00
Jason Felds cff72f7dab Minor cleanup. 2011-06-11 16:15:18 -04:00
Jason Felds d90c8cfe07 Add GetPlayerTimingData lua binding...for now.
This may be removed if it fails its purpose.
2011-06-11 15:17:48 -04:00
Jason Felds 493a49f55e Missed a fix spot. Checkpoints... 2011-06-10 15:18:08 -04:00
Jason Felds 1486b72e23 AutoPlay shouldn't hit unjudgable notes. 2011-06-10 11:02:02 -04:00
Jason Felds 0fa0d42549 Minor updates.
The extra padded space is for planning.
Going to try to take care of another Pump thing.
2011-06-08 23:05:28 -04:00
Jason Felds 5216d6be45 Simplify checks for unjudgable rows.
This way, we can add more segments later
and now have to change the logic in many places.
2011-06-08 13:03:07 -04:00
Jason Felds 0a7b9ce170 Some respect for OOP. (MasterPlayerNumber) 2011-06-06 20:40:11 -04:00
Jason Felds b1eab10594 Time Signatures, the other big one. :D 2011-05-31 14:27:55 -04:00
Jason Felds 0d4f95eda1 Added the BattleRaveMirror metric.
If you guys want your battles to not be mirrored/turned,
this is the metric to change. By default, it's on ITG
behavior.
2011-05-31 01:33:56 -04:00
Thai Pangsakulyanont 372540e3a4 Bringing Thai's fix in for Warps and Delays. 2011-05-26 01:12:41 +07:00
Jason Felds c5bbeb69ca Empty notes don't get judged (RandomVanish). 2011-05-24 22:14:59 -04:00
Jason Felds b3cebd2aaf No need to swap if it's the same column.
Still busted, but still stumped.
Doing what I can to optimize.
2011-05-24 21:29:51 -04:00
Jason Felds 2afdaf6705 Don't define a variable until it's needed.
Still suspect there's an issue here, but can't identify what.
2011-05-24 21:15:59 -04:00
Jason Felds 161ccdeb68 [splittiming] Implement Fake Segments...already?
This was a bit fast I think.
2011-05-16 11:42:58 -04:00
Flameshadowxeroshin f4684b8cc3 use player timing for autoplay row check 2011-05-13 23:37:07 -05:00
Thai Pangsakulyanont ab8b76b3b8 [splittiming] NoteDisplay, NoteField, Player, PlayerState (182) 2011-05-10 20:27:12 +07:00
Thai Pangsakulyanont 38a4852180 [splittiming] Fix Player.cpp (198) 2011-05-10 20:18:17 +07:00
Thai Pangsakulyanont 241738c18b [splittiming] Let's break things again! (222)
We introduced a new class, called "SongPosition", that replaces some instance variables in the GameState class. (GameState::m_Position).
Then, you also have it in PlayerState class which keeps track of the position based on their steps. (PlayerState::m_Position).

Fixing the build errors:
- GAMESTATE->m_fSomething should now be:
  - GAMESTATE->m_Position.m_fSomething
  - pPlayerState->m_Position.m_fSomething (or m_pPlayerState for some instance!)
2011-05-10 19:54:05 +07:00
Thai Pangsakulyanont 285f227851 [splittiming] tie Step's TimingData to player. 2011-05-10 13:27:35 +07:00