Commit Graph
100 Commits
Author SHA1 Message Date
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
Steve Checkoway 0b8e8f8512 Use a PlayerStageStats rather than indexing into STATSMAN with a PlayerNumber. 2006-07-10 00:02:07 +00:00
Steve Checkoway c090130108 Fix splitting composite NoteData. 2006-07-09 23:51:40 +00:00
Steve Checkoway eb764177f1 Overlapping NoteFields is not an option. Revert. 2006-07-09 21:51:04 +00:00
Steve Checkoway 18e26f35aa Use multiple PlayerInfos. Have them share the master player's NoteField. Pass input to the Player closest to the note. 2006-07-09 20:21:47 +00:00
Steve Checkoway 3d83bdf906 Allow one Player to share the NoteField of another Player. Also calculate the distance to the closest note or -1 if no note is close. 2006-07-09 20:20:57 +00:00
Steve Checkoway 04ad8b5a73 Allow NoteField sharing. The semantics of this is simple. In game play, everything but note data is handled by the shared NoteField. Only the NoteData for the field is drawn but it is drawn using the shared NoteField. 2006-07-09 20:19:54 +00:00
Steve Checkoway a92d8a244d Remove all notes except for that player's. 2006-07-09 20:15:51 +00:00
Steve Checkoway 4a324be6dd GetPlayerInfoForInput allows mapping inputs to PlayerInfos rather than just PlayerNumbers to PlayerInfos. 2006-07-09 20:14:06 +00:00
Steve Checkoway 025997d453 Removes all tap notes except for those with PLAYER_INVALID and those matching that player. 2006-07-09 20:11:46 +00:00
Steve Checkoway 392753bc22 Remove warning. (Adding -prune would have worked equally well.) 2006-07-08 19:35:48 +00:00
Steve Checkoway 9c045e6eb9 Comment. 2006-07-08 08:05:14 +00:00
Steve Checkoway d2429cb63b Fix standard deviation calculation. This could probably be done using accumulate, multiplies, minus, bind2nd, distance, and compose2, but that's probably less clear.
Something like
float fMean = calc_mean( pStart, pEnd );
return sqrtf( accumulate(pStart, pEnd, 0.0f, compose2(multiplies<float>(), bind2nd(minus<float>(), fMean), bind2nd(minus<float>(), fMean))) / distance(pStart, pEnd) );
These are easily templated too, if necessary.
2006-07-08 07:49:42 +00:00
Steve Checkoway 8c9577ffe9 Unneeded. Vectors are a type of EqualityComparable.
http://www.sgi.com/tech/stl/EqualityComparable.html
If a particular implementation of the stl isn't c++98 compliant, a global
template<typename T>
bool operator==( const vector<T> &a, const vector<T> &b)
can be written (and operator!= of course).
2006-07-08 07:10:13 +00:00
Steve Checkoway a942c021c7 Cleanup. 2006-07-08 07:07:50 +00:00
Steve Checkoway f66cb8c03c Simplify. Vectors are a type of EqualityComparable.
http://www.sgi.com/tech/stl/EqualityComparable.html
2006-07-08 07:07:37 +00:00
Steve Checkoway 6a67028283 Simplify and fix comment to reflect what's actually happening. 2006-07-08 06:43:18 +00:00
Steve Checkoway f7dd1a9a87 Cleanup. 2006-07-08 06:37:40 +00:00
Steve Checkoway 5afc2c41b9 Oops, readded removed comments. (No more coding while sick for me tonight, probably.) 2006-07-08 06:15:26 +00:00
Steve Checkoway 4130874a41 Disallow nonpositive tick counts and negative difficulties. (I'm not sure if the latter should be positive or merely nonnegative.) 2006-07-08 06:07:54 +00:00
Steve Checkoway 5774a0a70d Cleanup. 2006-07-08 06:00:37 +00:00
Steve Checkoway 46611abb9a Don't crash on invalid ksf files.
00...
40...
00...
becomes
00...
10...
00...
2006-07-08 00:58:43 +00:00
Steve Checkoway fa4b293f83 Simplify. 2006-07-07 19:42:28 +00:00
Steve Checkoway 161aa4a035 cleanup 2006-07-07 19:34:51 +00:00
Steve Checkoway e73050e6a3 Cleanup. 2006-07-05 23:18:20 +00:00
Steve Checkoway af860e6ccc Fix parameter. This worked before because it was being called with an argument of l. 2006-07-05 21:53:12 +00:00
Steve Checkoway 9a24232ec3 Cleanup. 2006-07-05 21:52:08 +00:00
Steve Checkoway ed46fef871 Dump avcodec version and build info. 2006-07-04 19:27:10 +00:00
Steve Checkoway cfebcf7b90 Case. 2006-07-04 18:42:55 +00:00
Steve Checkoway 6f27069ac0 Simplify. 2006-07-03 06:45:14 +00:00
Steve Checkoway 3712277c6a CancelStage when backing out of ScreenStage. This fixes backing out of final stage early goes to extra stage and backing out of extra stage early goes to extra stage 2. 2006-07-03 06:18:18 +00:00
Steve Checkoway e620035b29 Make min stay alive during sudden death themeable. 2006-07-03 04:31:58 +00:00
Steve Checkoway ea1ec405e5 Make the minimum score to stay alive be themeable. 2006-07-03 04:30:20 +00:00
Steve Checkoway 227d2d1575 Add StringTo<TapNoteScore>. (Normally this would be part of the StringToX macro. 2006-07-03 04:29:41 +00:00
Steve Checkoway 16a1301fae Cleanup. 2006-07-03 04:05:32 +00:00
Steve Checkoway fae99b18f1 Fix getting another extra stage if pick extra stage is on and you play the chosen song. 2006-07-03 03:46:34 +00:00
Steve Checkoway 14b91aea37 Don't add random entries (pSong = NULL) to vSongs. Assert that pSong is never NULL. 2006-07-02 22:02:59 +00:00
Steve Checkoway a2dca95d01 Use native endian. Now Alsa works for powerpc linux. 2006-06-29 03:22:29 +00:00
Steve Checkoway 7e3622464a Missed commit. 2006-06-29 01:11:10 +00:00
Steve Checkoway cc10b4f368 Fix crash when canceling (probably closing the dialog box or something). 2006-06-27 18:27:51 +00:00
Steve Checkoway 1eeb14cd5a Do not dereference if later = fLifeRecord.end(). 2006-06-27 15:49:37 +00:00
Steve Checkoway d43538bcc3 People keep trying to use newer versions of ffmpeg and it is failing either to compile (in which case they just patch our code to get it to compile) or it crashes when trying to play movies. Check for two things. First, check that the version and build numbers reported in the headers match those returned by the library which should prevent any header/lib mismatch crashes. Second, check for exactly the version/build numbers that we know work are are used in both windows and OS X and worked correctly for ppc linux. If a large number of reports come in with header/lib mismatches, I'll consider removing the check for exactly the version/build numbers. 2006-06-26 23:29:54 +00:00
Steve Checkoway 80698277cf Don't use rand()%n. The function specified by the ANSI committee is a terrible linear congruential generator. In fact, it's so bad that the low order bit alternates. The algorithm implemented as RandomFloat() seems to be Park and Miller's "minimum standard" generator which is better (but not great). [See Knuth for more information.]
Any place where you would use rand()%n, use RandomInt(0, n) instead.
2006-06-26 12:14:30 +00:00
Steve Checkoway d2d24ceb4b Cleanup. 2006-06-26 11:36:10 +00:00
Steve Checkoway 4524010d56 Apply RemoveSimultaneousNotes to each part of a composite NoteData. 2006-06-26 11:35:52 +00:00
Steve Checkoway 78eb52a75c Add missing header. 2006-06-26 10:57:26 +00:00
Steve Checkoway 0279fd908f CombineCompositeNoteData(). This will not let you place a note inside a hold note that already exists. Use this when loading from a string as well. 2006-06-26 10:57:10 +00:00
Steve Checkoway 4240ac6393 Update release script. 2006-06-26 10:42:47 +00:00
Steve Checkoway 8129d943ba It's hard to maintain this information when using begin() and end() so rather than wrapping the iterators, just check each time IsComposite() is called since it doesn't happen _that_ often. Just don't call IsComposite() often. 2006-06-26 09:33:11 +00:00
Steve Checkoway 477a2c99b3 I do not have time to fix these tests since they do not compile, but libresample is no longer in the repository. 2006-06-25 05:12:06 +00:00
Steve Checkoway 5b6028c73e No more libresample thanks to Glenn's Herculean effort to rewrite that code. 2006-06-25 04:57:35 +00:00