Commit Graph

105 Commits

Author SHA1 Message Date
Chris Danford d377c2b1a4 MENU_BUTTON_ -> GAME_BUTTON_ 2008-05-21 05:36:09 +00:00
Steve Checkoway 521c1c23e5 GAMEMAN-> to GameManager:: 2008-03-24 12:50:16 +00:00
Glenn Maynard 3e36a05c5f fix song.h!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2008-03-09 01:51:34 +00:00
Vecais Dumais Laacis c33fc5e62f no double LoadAllCommands 2007-08-07 11:24:27 +00:00
Glenn Maynard e23153c03e metric bResetGameState 2007-06-03 22:27:27 +00:00
Glenn Maynard 6c9c99091f m_vpPlayedSteps is identical to the beginning of m_vpPossibleSteps.
Change to m_iStepsPlayed to avoid the duplicate information.
2007-05-31 04:48:42 +00:00
Glenn Maynard 713c95b2b0 Stage refactoring:
- m_iPlayerCurrentStageIndexForCurrentCredit is changed to m_iPlayerStageTokens,
   counting the number of stages left.  This can be incremented and decremented
   (as a bonus or penalty) with no weird side-effects; it is not used to determine
   whether the player is on an extra stage.  This is less brittle; it eliminates
   special cases to avoid incrementing the counter and skipping into an extra stage.
 - Stage tokens are subtracted for each song played, and a player is unjoined
   when he runs out.
 - Stage tokens are subtracted at the start of gameplay.  If the player cancels,
   they're "refunded".  This differs from before, where the stage was incremented
   at the end of gameplay.  This makes the stage token counter meaningful during
   gameplay; if this is done at the end, then it would be too high during gameplay.
 - IsFinalStage is gone.  If needed, use GetSmallestNumStagesLeftForAnyHumanPlayer.
 - Extra stages are awarded by adding a stage token and incrementing
   m_iAwardedExtraStages.  If m_iAwardedExtraStages is 1, the player is
   on his first extra stage; if 2, his second.
2007-04-25 03:50:17 +00:00
Glenn Maynard 5318d0670d Previously, BeginStage was called in SGameplay and FinishStage was called
in each place gameplay exits.  This incremented the stage number in SSM,
and was brittle: FinishStage was sprinkled in many odd places.  Do both
in SGameplay.

This increments the stage number as soon as gameplay ends.  This only
affects evaluation.  Use the stage number from StageStats there, instead
of the current stage, and adjust branches.  During evaluation, the
game is on the upcoming stage and displaying old data for the last
stage, instead of the stage continuing through evaluation.

This also moves a bunch of scoring-related stuff out of SEvaluation,
to the end of gameplay, where it belongs.  Eval is almost const, and things
won't break like they would before if Eval is not used.
2007-04-24 01:35:32 +00:00
Chris Danford 43ef38383d separate CurrentStageIndex into separate number per game and per player. This allowed for staggered join periods. 2007-03-25 09:37:14 +00:00
Chris Danford 599db61b62 Always call LoadAllCommands explicitly.
The hack to LoadAllCommands when playing a command was leading to weird interactions: If a theme element contained an OnCommand, it would cause the rest of the commands defined in metrics to not be loaded.
2007-02-19 09:30:07 +00:00
Chris Danford f7fc9ceaa5 remove Set/GetHidden, leave *Visible
remove hidden from ActorCommands eventually
2007-02-13 06:32:26 +00:00
Glenn Maynard 0db4a096e5 ScreenWithMenuElements::BeginScreen calls SortByDrawOrder 2006-11-21 04:32:59 +00:00
Chris Danford 2f7ac6aa3c Add m_ to StageStats and PlayerStageStats members. There are several methods of these classes with local variable names that are similar to the member names. m_ helps distinguish between those two types. 2006-11-14 11:13:21 +00:00
Glenn Maynard 880f20b443 don't add command manually 2006-10-03 04:01:19 +00:00
Glenn Maynard 0b45f5dd0a use SetCurrentStyle 2006-09-30 22:22:26 +00:00
Glenn Maynard 3a57dca6c4 ActorCommands -> ActorUtil::ParseActorCommands 2006-09-21 02:24:22 +00:00
Glenn Maynard 8548f1cb33 simplify ActorCommands 2006-09-21 01:39:38 +00:00
Glenn Maynard e7fdfa2132 prefer GAMESTATE->JoinPlayer to setting GAMESTATE->m_bSideIsJoined manually 2006-09-15 05:56:43 +00:00
Glenn Maynard c7dfb9f2ec MenuInput -> MenuButton 2006-09-14 20:52:34 +00:00
Glenn Maynard f1cd95828e remove MenuInput.IsValid(); if invalid, the button is simply MenuButton_INVALID 2006-09-14 20:31:46 +00:00
Steve Checkoway 0cb22fb806 Apparently VC doesn't like using (group).GroupType as a type (and frankly, I couldn't get g++ to accept it outside of StepMania, either) so use the macros with PO and SO prefixes for PlayerOptions and SongOptions, respectively. Also, pointers to data members can't point to elements of an array (no idea why gcc was allowing it before) so use Assign_n and pass the index separately. (Very annoying, typeof() should really be in the standard.) 2006-08-05 08:02:49 +00:00
Steve Checkoway 1802e603b3 Update to use the new ModsGroup api. 2006-08-05 04:47:01 +00:00
Chris Danford 7ac45c24e4 save Preferred, Stage, Song, and Current modifiers separately. This eliminates the fragile mods store/restore. 2006-08-05 02:38:05 +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
Glenn Maynard b3884dbb01 cleanup (and don't ignore m_Cancel) 2006-03-15 21:41:26 +00:00
Chris Danford 0df6972287 remove stats text - use Lua instead 2006-03-15 01:31:55 +00:00
Glenn Maynard 181ffaafdc remove untranslated "songs", "courses" text. We'd have to worry about
word ordering here, I think, and this seems clear enough.
2006-03-09 22:02:19 +00:00
Glenn Maynard 347218429f cleanup 2006-03-09 21:59:05 +00:00
Chris Danford cd2fb443d0 metric to make ScreenEnding use machine's Profile instead of player's Profile 2006-02-27 19:53:11 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Glenn Maynard a87993bcb1 finish ctor transition 2006-01-15 20:46:15 +00:00
Glenn Maynard 1c5b3c9002 Transition away from Screen(sName). 2006-01-15 19:18:57 +00:00
Chris Danford 44225ad379 XToThemedString -> XToLocalizedString 2006-01-07 04:11:29 +00:00
Chris Danford 36c7d8e0ed enum name cleanup 2005-12-01 03:20:25 +00:00
Chris Danford 8b8fa8aad3 move CommonMetrics into a namespace so that it's clear where they're coming from when used. 2005-10-27 05:16:19 +00:00
Chris Danford feb1bfb0fc naming cleanup: rename scoring "Tier1"s to "W1"s (short for "Window 1")
add Preference1D so that we can index into the grading and life values
2005-10-09 04:30:59 +00:00
Chris Danford b6cf3477b4 Use generic names for TapNoteScore values since they are treated genericly by the code.
Theme changes coming...
2005-10-08 00:57:40 +00:00
Glenn Maynard 781017c4c0 ChooseRandomMofifiers -> ChooseRandomModifiers 2005-09-08 01:06:01 +00:00
Chris Danford bb10c7c21f pass around InputEventPlus in Screen::Input instead of multiple input structures 2005-09-05 02:26:50 +00:00
Chris Danford 48ebc53549 return NULL -> return CString() for clarity and efficiency 2005-09-04 16:55:21 +00:00
Chris Danford e439ae2a96 return "" -> return NULL 2005-09-02 00:14:07 +00:00
Chris Danford 881001b6c6 broadcast on PlayMode changed 2005-07-25 03:59:24 +00:00
Glenn Maynard 6ac51af9c2 header 2005-07-20 09:48:19 +00:00
Glenn Maynard bb8af41cb1 missing headers 2005-07-01 05:07:22 +00:00
Glenn Maynard b5f82fe4ae remove nops, cleanup 2005-06-25 09:07:11 +00:00
Glenn Maynard 59a99ec624 remove nop 2005-06-25 09:03:29 +00:00
Chris Danford e504fb4e98 broadcast on changed course/trail 2005-05-18 07:14:19 +00:00
Chris Danford fb1d69add3 rename: IsUsingProfile -> IsPersistentProfile
Don't require IsPersistentProfile in some places related to fitness mode where a non-persistent Profile will suffice
2005-05-09 08:44:01 +00:00
Chris Danford 16818e54c8 broadcast on style change 2005-05-07 08:34:20 +00:00
Glenn Maynard 57e4649de3 fix draw order 2005-05-06 06:34:18 +00:00