Steve Checkoway
787b5ad09a
Cleanup.
2006-07-25 06:17:14 +00:00
Steve Checkoway
f254abc777
Create one "now" RageTimer and just pass that around.
2006-07-25 05:31:22 +00:00
Steve Checkoway
ff3b8bacbc
Fix sscanf() overflow issues.
2006-07-24 09:57:13 +00:00
Steve Checkoway
e80defc8df
It doesn't take the null into account of the field width.
2006-07-24 09:54:47 +00:00
Steve Checkoway
5b3be8c9fa
Handle buffer overflow.
2006-07-24 09:49:39 +00:00
Steve Checkoway
ab978ef733
While I'm at it, remove leading and trailing slashes to make the cache files look like "Songs_foo" instead of "_Songs_foo_".
2006-07-24 08:35:33 +00:00
Steve Checkoway
9a21d52d0b
Replace invalid utf-8 characters with underscores. Bump cache version.
2006-07-24 08:25:55 +00:00
Steve Checkoway
88c8726834
Add/remove files.
2006-07-24 06:09:24 +00:00
Steve Checkoway
b9de4e9965
Specialize std::swap() for NoteData in terms of NoteData::swap() so that swap( a, b ) takes constant time.
2006-07-24 05:58:11 +00:00
Steve Checkoway
c72c23f035
Remove empty ctor and dtor. This class has no member variables. It would probably work just as well as a namespace but I don't know how that would interact with lua.
2006-07-24 05:56:16 +00:00
Steve Checkoway
52d48a1eac
CanAutoGenStepsType. For some reason lights cannot be autogenned. I've moved that from Song to GameManager. Whenever this restriction is lifted (I don't know why the restriction exists), it should be changed to ST_FLAGS_NONE.
2006-07-24 05:01:48 +00:00
Steve Checkoway
5da3ac8f36
Avoid copying TapNote where possible and implement some of these algorithms in terms of NoteData::iterators which take constant time to move to the next element rather than GetTapNote which takes logarithmic time.
2006-07-24 04:53:24 +00:00
Steve Checkoway
0cb3814965
Implement swap(). Instead of doing
...
foo( NoteData &inout )
{
NoteData temp;
/* some operation on temp involving inout. */
inout = temp;
}
which requires copying all of temp, replace the assignment with swap which takes constant time instead of linear (or likely n log n since they're in maps) in the number of notes.
2006-07-24 04:49:03 +00:00
Steve Checkoway
20b45c5243
TapNotes are not huge structures but there are generally a lot of them and they do contain at least one nontrivial ctor so avoid making copies of them when possible.
2006-07-24 04:42:08 +00:00
Steve Checkoway
1ca8ec0f11
-30 -> 30
2006-07-24 03:03:43 +00:00
Steve Checkoway
018d862f06
PlayerShared.
2006-07-24 01:12:40 +00:00
Steve Checkoway
b5665afe2a
Fix typo. Add JudgmentTransformSharedCommand.
2006-07-24 01:06:18 +00:00
Steve Checkoway
03f1e21df4
Spaces between arguments.
2006-07-24 00:14:04 +00:00
Steve Checkoway
73ce25c313
Spacing to make these easier to read.
2006-07-23 23:55:16 +00:00
Steve Checkoway
aef5009bfc
No, not really.
2006-07-23 23:49:52 +00:00
Steve Checkoway
d671011285
Show a combo if showing judgment, not if showing the note field.
2006-07-23 23:48:14 +00:00
Steve Checkoway
4a832e461f
Run the overlay's off command.
2006-07-23 22:43:28 +00:00
Steve Checkoway
36b1ff3df8
Don't make unnecessary copies.
2006-07-23 21:44:35 +00:00
Steve Checkoway
b0496fbcb6
Split out HideNote. Make fewer copies of TapNotes.
2006-07-23 21:35:41 +00:00
Steve Checkoway
1b2f2b9cec
Handle counting notes separately if the game type does that.
2006-07-23 21:12:39 +00:00
Steve Checkoway
c690814aad
Comment. I don't have time to fix this tonight.
2006-07-22 09:07:03 +00:00
Steve Checkoway
a8aeb38a57
Fix ghost arrow flashes by handling those at the actual step but handle the scores during Update.
2006-07-22 09:01:19 +00:00
Steve Checkoway
077f826afd
No need for friend. This only uses the public interface.
2006-07-21 08:03:13 +00:00
Steve Checkoway
9f1bb1e16f
Simplify.
2006-07-21 08:01:28 +00:00
Steve Checkoway
c299a7a4f7
GetTapNoteRangeAllTracks() returns an all_tracks_iterator which can be used to iterate over all of the tracks in all of the rows in the range. Also, you can specify a condition on the notes to be returned.
...
Simplify.
2006-07-21 07:59:41 +00:00
Steve Checkoway
28e8e9148e
GetTapNoteRangeAllTracks() returns an all_tracks_iterator which can be used to iterate over all of the tracks in all of the rows in the range.
2006-07-21 07:58:30 +00:00
Steve Checkoway
e8fc52e540
Simplify this.
2006-07-21 04:13:31 +00:00
Steve Checkoway
6124d987b1
Fix mine avoidance.
2006-07-21 04:07:19 +00:00
Steve Checkoway
df915a60ca
Show judgments for all players. (They currently overlap but I think that's just metrics.)
2006-07-20 08:51:59 +00:00
Steve Checkoway
66012f7a35
Cleanup.
2006-07-20 08:50:16 +00:00
Steve Checkoway
eb344e593b
Fix ghost arrow flashes for the other players with combined note fields.
2006-07-20 08:42:47 +00:00
Steve Checkoway
93d8db14c7
Fix mines. Now they explode again.
2006-07-20 08:15:10 +00:00
Steve Checkoway
705d929106
Handle avoided mines. Hit mines are still broken.
2006-07-20 07:31:39 +00:00
Steve Checkoway
8292201ad6
Step scores are now handled during Update so make sure all Steps happen in Update before we check the rows so that we don't have to wait for the next frame.
2006-07-20 07:16:06 +00:00
Steve Checkoway
232a3c10b0
Nudge these together.
2006-07-20 06:42:25 +00:00
Steve Checkoway
b38a2797ea
ScreenDemonstration falls back on ScreenJukebox. Set these for ScreenJukebox so that after the song, it just fades out and then the next one fades in.
2006-07-20 04:54:33 +00:00
Steve Checkoway
61624d6539
This is handled by ScreenJukebox.
2006-07-20 04:36:15 +00:00
Steve Checkoway
b8ab1f7393
Fix possible crash if Player accesses the NoteData in it's dtor and the Player is a PlayerPlus. Now just treat PlayerPlus as a smart pointer to a Player with the added Load( const NoteData& ) member function. This is only a connivence class anyway.
2006-07-20 02:19:03 +00:00
Steve Checkoway
29e6e796ba
Simplify and speed up loading (very very slightly). It would be fastest to add all BPM/stop segments to the array and then sort it once (n log n). It was sorting after every insertion (n^2 log n). This now does simple insertion sort so it's n^2 in the worst case but since upper_bound does a binary search, if the BPM segments are in order this will take n log n in the best case.
...
That said, you'll notice no difference unless you had thousands of BPM changes in a file.
2006-07-20 01:56:17 +00:00
Steve Checkoway
4f4e034af1
Ignore invalid BPM changes. No more nonpositive BPMs.
2006-07-20 01:46:01 +00:00
Steve Checkoway
a07e194cf1
Revert. Fixes Linux build.
2006-07-18 05:51:37 +00:00
Steve Checkoway
61739160fe
Handle the new clock api "correctly." At least differentiate CLOCK_MONOTONIC and CLOCK_REALTIME. Mac OS X uses the former for timers and is forced to use the latter for the pthread functions.
2006-07-18 04:39:30 +00:00
Steve Checkoway
df4d41da4a
Simplify. GetMicrosecondsSinceStart need not actually be set to the beginning of SM. That's handled elsewhere.
2006-07-18 04:19:25 +00:00
Steve Checkoway
bea4177222
Remove unneeded assert.
2006-07-18 03:57:31 +00:00
Steve Checkoway
4f8049377b
The default ctor gets the time. Avoid that since we're setting it to the value of the timeval.
2006-07-18 03:53:21 +00:00
Steve Checkoway
fbbdc5657a
Fix warning (although I think the compiler should really be able to figure this one out on its own).
2006-07-18 02:29:10 +00:00
Steve Checkoway
4efb7c4078
Fix misses count twice. Do not assume that rows are judged in order. Do not judge a row more than once. The JudgedRows class acts like an array of bools (more or less), one per note row but is implemented as a circular buffer (more or less). Note that m_JudgedRows[i] will only return false one time. After that, it is assumed to have been judged.
2006-07-18 00:26:37 +00:00
Steve Checkoway
79f3d0b76e
foo* bar -> foo *bar.
2006-07-17 03:01:49 +00:00
Steve Checkoway
00878e4ef9
Const.
2006-07-17 02:59:57 +00:00
Steve Checkoway
649cb46a15
Unused.
2006-07-17 02:59:35 +00:00
Steve Checkoway
8db5d63e1e
This is almost completely a ScoreKeeperNormal now. Perhaps this should be put in SKNormal and this calls can be removed.
2006-07-17 01:03:30 +00:00
Steve Checkoway
58847ff1b9
Use one ScoreKeeper per Player (as is normal) but share master player's NoteData with the other Players. Note that this means that multiple Players may be updating the same NoteData. This should not matter as the Player should only deal with notes it owns.
2006-07-17 01:02:31 +00:00
Steve Checkoway
8ab760a346
Put the NoteData into the PlayerInfo and use that for constructing Players. Use the Player's (new) interface GetNoteData() for everything except for loading where ScreenGameplay needs to actually modify the NoteData so do it directly via the PlayerInfo.
2006-07-17 00:58:33 +00:00
Steve Checkoway
8502fc3083
Use PlayerPlus (a Player plus a NoteData, this gives the old behavior of Player, i.e. calling Load( nd )).
2006-07-17 00:56:23 +00:00
Steve Checkoway
d46ec7136e
Pass in a PlayerNumber as well.
...
(This breaks other code, commits coming.)
2006-07-17 00:54:46 +00:00
Steve Checkoway
807e24827c
Keep a (nonconst) reference to a NoteData rather than owning the NoteData. Replace calls to Load( nd ) by making the changes to the underlying NoteData and calling Load().
...
(This breaks other code, commits coming.)
2006-07-17 00:54:19 +00:00
Steve Checkoway
b1d08d1f8b
This is still a work in progress (although I haven't worked on it in over a month).
2006-07-17 00:44:38 +00:00
Steve Checkoway
bd7422ef6e
Specialize on aligned loads for sse since misaligned loads are much slower.
2006-07-17 00:42:46 +00:00
Steve Checkoway
7be6e20fe3
Cleanup.
2006-07-16 18:34:56 +00:00
Steve Checkoway
108810fe14
No really, cleanup.
2006-07-16 07:23:57 +00:00
Steve Checkoway
ba8fb41231
Simplify.
2006-07-16 07:23:12 +00:00
Steve Checkoway
ad1e7b4afa
Cleanup.
2006-07-16 07:20:50 +00:00
Steve Checkoway
e1572442b3
cleanup
2006-07-16 03:14:26 +00:00
Steve Checkoway
90e9d6d57c
Don't clamp to 3 seconds.
2006-07-16 03:14:03 +00:00
Steve Checkoway
abaeb8b2f4
Missing metric.
2006-07-14 22:22:22 +00:00
Steve Checkoway
bd47324c0c
Add missing strings.
2006-07-14 22:20:35 +00:00
Steve Checkoway
6ee71e464b
It looks strange having the Background menu items have no text so add some defaults.
2006-07-14 22:00:12 +00:00
Steve Checkoway
84c50ccfdb
Cleanup.
2006-07-14 21:39:08 +00:00
Steve Checkoway
b8a3a8b0f0
Oops.
2006-07-14 21:34:17 +00:00
Steve Checkoway
39b27416b6
Don't theme file names.
2006-07-14 21:33:08 +00:00
Steve Checkoway
d873b24bfc
Resize the answers during load menu. Fixes the crash in ScreenEdit when 'b' is pressed.
2006-07-14 21:27:18 +00:00
Steve Checkoway
bf5deb1ee3
Add ScoreKeeper.cpp
2006-07-14 21:03:55 +00:00
Steve Checkoway
e65388190f
compile fix.
2006-07-14 04:21:09 +00:00
Steve Checkoway
3c8591fdbf
Add file.
2006-07-14 04:20:37 +00:00
Steve Checkoway
743d2b9697
Change the api to take a NoteData and a row. Let the score keepers decide what they want to do with the row.
2006-07-14 04:19:30 +00:00
Steve Checkoway
af1652ef28
Add a PlayerNumber. If pn = PLAYER_INVALID, then count all tap notes, irrespective of player. If tn.pn = PLAYER_INVALID, count it.
2006-07-14 04:14:51 +00:00
Steve Checkoway
753d33e752
Add files.
2006-07-13 08:39:03 +00:00
Steve Checkoway
cae6da3f7a
Use ScoreKeeperShared.
2006-07-13 08:38:21 +00:00
Steve Checkoway
b5a3c9867e
ScoreKeeper for use with multiple players but only one Player. It's not complete and something about this is giving each player the same number of each judgment (except for HNS_Held for some reason).
2006-07-13 08:38:08 +00:00
Steve Checkoway
365b370aae
Load the players ourself. Only show judgment for the master player.
2006-07-13 07:33:10 +00:00
Steve Checkoway
ccba1e80be
Assert.
2006-07-13 07:28:08 +00:00
Steve Checkoway
5c1e528e8b
Load hold judgments.
2006-07-13 07:27:47 +00:00
Steve Checkoway
e349c58ba9
Fix compile for systems that use pthreads but don't define UNIX and don't have clockid_t defined. If necessary, this can be redone in a more general way using configure.ac.
2006-07-13 06:31:10 +00:00
Steve Checkoway
10a3791564
Spacing.
2006-07-13 05:52:56 +00:00
Steve Checkoway
4aca830346
Missing metrics.
2006-07-10 05:23:41 +00:00
Steve Checkoway
81046111f4
Implement SaveStats and direct all input to the master player.
2006-07-10 05:18:35 +00:00
Steve Checkoway
1aa51dd1d1
Change ScoreKeeper's api to take TapNotes instead of the scores.
2006-07-10 05:15:52 +00:00
Steve Checkoway
5a01cb9c3f
Split out SaveStats to give more flexibility to subclasses that may wish to interact with the stats differently.
2006-07-10 04:32:33 +00:00
Steve Checkoway
017f1ae707
ScoreKeepers are not Actors, move them to DataStructures.
2006-07-10 04:29:55 +00:00
Steve Checkoway
c6ba8423b6
Change this interface to return the tap note itself, rather than just the result.
2006-07-10 04:29:19 +00:00
Steve Checkoway
746c21f44a
Use DEFAULT_FAIL.
2006-07-10 01:29:21 +00:00
Steve Checkoway
40a80c01d9
Spacing cleanup.
2006-07-10 01:24:36 +00:00
Steve Checkoway
bef808955d
Cleanup DataStructures a bit. Put actors into the correct groups.
2006-07-10 01:02:23 +00:00
Steve Checkoway
3f2877bf76
Simplify.
2006-07-10 00:47:59 +00:00
Steve Checkoway
ba99f1df55
Spacing cleanup.
2006-07-10 00:24:13 +00:00