Commit Graph

2589 Commits

Author SHA1 Message Date
Jason Felds e1ccf9be94 How long must we support this "hack"? 2011-09-24 15:25:17 -04:00
AJ Kelly dbba5bd934 fix visual studio 2008 compile; will check other vs versions soonish 2011-09-24 01:57:19 -05:00
Jason Felds cdcb917e76 Stop some beat 0 crash bugs in the editor.
I suspect that the removal of shifting timing changes at beat 0
will stay in regardless. It is the removal of converting measures
to stops/delays that may be fought against. That is fine.

The bugs attached to these issues, 415 and 525, will only be
resolved when enough devs agree this is a fair fix.
2011-09-24 02:01:46 -04:00
Jason Felds 041d59f315 Anyone recall WHY I had this code?
Remove forced timing data copying if only one Step.
2011-09-23 22:51:06 -04:00
Jason Felds c6fff60998 Finish the 3 decimal write out.
Observation: we have two ways of writing out timing tags in
NotesWriterSSC. Perhaps these should be unified soon.
2011-09-23 22:33:46 -04:00
Jason Felds 83c3899c00 Fix loading of steps from .sm files.
Some files were using non standard difficulty names
that weren't being caught properly.
2011-09-23 22:06:43 -04:00
Jason Felds 3bd53a5cb4 Hopefully linux is caught up. 2011-09-23 19:43:05 -04:00
Jason Felds 79aefde204 These windows builds...well, hopefully are good. 2011-09-23 19:41:54 -04:00
Jason Felds b04438a546 These Windows builds should be good. 2011-09-23 19:41:46 -04:00
Colby Klein 69431604e3 Remove the old files. (also I am very sorry for nuking the line by line history, this has been pissing me off for ages) 2011-09-23 15:44:01 -07:00
Colby Klein 6fed94a210 Move Actors into a folder. The very beginning of organizing things. This WILL break compile. 2011-09-23 15:39:54 -07:00
AJ Kelly a8031d4b11 attempt to fix the resolution problem by going back to the old code 2011-09-23 16:00:23 -05:00
AJ Kelly d782518c14 [ScreenEvaluation] Added RollingNumbersMaxComboClass metric. (also removed unused MaxComboNumDigits metric from C++-side) 2011-09-23 01:26:53 -05:00
AJ Kelly 8d528625de [LoadingWindow_Win32] Make the StepMania window gain focus after the loading window closes. Fixes issue 424. 2011-09-22 20:19:27 -05:00
AJ Kelly 8ae8bab984 [ScreenDebugOverlay] Replaced hardcoded toggle command with ButtonTextToggledCommand metric. 2011-09-22 19:09:58 -05:00
Mark Cannon 561bdeeeb8 fix unnecessary vector copy 2011-09-22 09:19:20 -04:00
AJ Kelly 9b4c2a4b71 [FadingBanner] Added LoadRandom(), LoadRoulette(), LoadFallback(), LoadCourseFallback(), GetBanner(int) Lua bindings. 2011-09-21 22:24:32 -05:00
Marcio Barrientos 6d4b5c8e76 Add one new Lua binding to add one more stage to player (bonus)
AddStageToPlayer(pn)
2011-09-21 16:21:23 -06:00
AJ Kelly d3634e343f remove unneeded logging 2011-09-20 17:40:07 -05:00
AJ Kelly 7edab29ad7 small formatting changes 2011-09-18 21:02:29 -05:00
AJ Kelly 145d2ebf0f remove duplicated comment 2011-09-18 20:35:10 -05:00
Mark Cannon f0880d6fd2 fix memory leak in TimingData, remove unnecessary structure copies in ScoreKeeperNormal 2011-09-18 19:07:39 +00:00
Jason Felds 9243c78fce Thanks vyhd. 2011-09-18 14:41:44 -04:00
Jason Felds a67ee09abf Added two new Lua bindings to Song.
GetSampleStart()
  GetSampleLength()
2011-09-18 14:41:28 -04:00
Jason Felds 75d1c672c8 Added IsSongLocked() Lua binding.
To be honest, I'm wondering if this should be in SongManager
instead of or as well as UnlockManager.
2011-09-16 23:08:50 -04:00
Jason Felds 8d6ccfb098 Whitespace wars. Deal with it later. 2011-09-16 23:01:45 -04:00
Jason Felds 10f0fa54f2 Added GetNumLockedSongs() Lua binding.
This gets the number of songs that are locked for any reason.

I wonder why the unlocked songs functions say that songs locked
by unlock entries are counted there, but fair enough.
2011-09-16 21:52:27 -04:00
Mark Cannon 5f3a8c446a slightly saner formatting for this block of code 2011-09-16 23:22:16 +00: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
Thai Pangsakulyanont 9164eccfde oops, it did not erase, but it did not skip. 2011-09-16 21:15:47 +07:00
Thai Pangsakulyanont a03e6f0efa - use a straightforward binary search for GetSegmentIndexAtBeat
- fix a bug where adding a segment with the same value as the old one
  removes the old one [it should just skip adding the new segment].
2011-09-16 21:03:06 +07:00
Mark Cannon d2ed01b94c compilation fixes for Visual Studio 2011-09-15 18:59:07 +00: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
Thai Pangsakulyanont be3094b5af merge.
a bit more about autokeysounds: when I add this RageSoundReader_Extend,
I'm not sure whether the "autokeysounds are delayed" bug will come back
or not. Someone on Windows please test it.
2011-09-14 12:28:16 +07:00
Thai Pangsakulyanont 3a8203085b Wrap the autokeysound chain with RageSoundReader_Extend,
quite a simple fix, but the song now no longer stops scrolling
when there are no more auto keysounds to play, which is what I've
been trying to fix for a long time.

It's now possible to play BMS which the BGM track is a bit too short
that in previous versions, the notes stop scrolling because there's
nothing more to play and it's impossible to finish the level.

It's also now possible to play BMS file which does not have any
autokeysounds at all, and also it's now possible to edit BMS files
(but the editor is very un-intuitive, but at least you can now add
timing changes to songs loaded from BMS files, such as speed segments
and scroll segments [they will be saved as .ssc file by the way]).
2011-09-14 12:26:01 +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 51725c188a Fix label segments not loading right. 2011-09-12 22:28:07 -04:00
Jason Felds 16916a7d67 Right, display the goods on song timing.
Maybe we need to adjust the metrics used here.
2011-09-12 19:47:43 -04:00
Jason Felds 047bc7a5dc Allow all timing tags regardless of timing. 2011-09-12 19:43:41 -04:00
AJ Kelly c7f41eb9d8 small cleanup craps 2011-09-12 11:38:49 -05:00
Jason Felds 48ca50940a Update the cache due to previous commit. 2011-09-12 00:12:55 -04:00
Jason Felds 7004959972 We're even vyhd. I've eaten my words. ;) 2011-09-12 00:03:29 -04:00
AJ Kelly cebec8485b [Banner] Added "Banner group fallback" graphic. 2011-09-11 17:23:07 -05:00
Mark Cannon df9c4d8142 segment renovation stage 2: redefine TimingSegments as simple structs, standardize names and functions, use only rows for constructors (we'll limit allocation through TimingData::AddSegment in the near future) 2011-09-11 17:13:10 +00:00
Mark Cannon a8f22ef178 fix undeclared function and typo (seriously, please at least try to compile your code before committing) 2011-09-11 17:12:09 +00:00
AJ Kelly 2fba8d6426 work in progress ScreenMapControllers2 because I'm sick of working on it 2011-09-11 12:03:02 -05:00
Flameshadowxeroshin 64f418c5d7 fix course bug 2011-09-11 15:47:11 +00:00
Flameshadowxeroshin d70c141dcc this is part of the solution, nvm 2011-09-11 15:41:48 +00:00
Flameshadowxeroshin 93e449553d look i know what you guys were going for but it just screws things up. 2011-09-11 14:41:51 +00:00