Commit Graph
60 Commits
Author SHA1 Message Date
Martin Natano 78fb2e9fc3 Decouple <cstddef> 2023-04-20 11:21:29 +02:00
Crash Cringleandteejusb efaf38b8ed Fix for "10th score" leaderboard bug, Reduce load from GAMESTATE::StoreRankingName()
- Fixes bug where 10th scores get erased when two players play the same song multiple times and rank on the leaderboard more than once
- Only clamping leaderboards and deduping high scores for songs/courses once overall instead of once per player
- Instead of looping through every song and course on the machine multiple times -> Only loop through the songs/course played in the past session
2023-03-16 18:19:09 -07:00
Michael SundqvistandMartin Natano 0cba3579de Remove global "using namespace std;" declarations, use "std::" prefixes on all std elements
Fix whitespace changes
2022-07-31 22:14:38 +02:00
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -07:00
KyzentunandColby Klein 2aee27a276 Backport custom song support. Prefs are CustomSongsEnable, CustomSongsMaxCount, CustomSongsLoadTimeout, CustomSongsMaxSeconds, CustomSongsMaxMegabytes. Metrics are NumProfileSongGroupColors and the colors with it. Profile custom load function is passed PlayerNumber now. Stepmania must run as root to save USB profile scores. (#1470) 2017-06-06 05:30:06 -07:00
Kyzentun Keeslala f182a04780 Fixed pausing on ScreenGameplay by making GameState have a pause variable and not force the song position forward if the game is paused. Implementing a working pause button that the player can press is left as an exercise for the reader. 2015-09-03 14:39:57 -06:00
Kyzentun 846f79879c Added MUSIC tag to note data to allow each chart in a simfile to use a different music file. 2015-03-02 18:44:01 -07:00
Kyzentun c69cf1ef4e Special case kickbox autogen added. GameState now has a member for passing args from the theme to the autogen, only used by kickbox for kick recovery time. 2015-01-26 19:43:15 -07:00
Kyzentun f4a718a824 SetCompatibleStylesForPlayers and ForceSharedSidesMatch added to GameState for SSM to use to fix style mismatch problems.
StyleInputToGameInput changed to take a vector to return values in to handle multiple inputs mapped to a single column.  Associated adjustments to everything that uses it.
Player no longer drops holds in columns that have multiple inputs mapped to them if the wrong one is held.
Running out of stage tokens changed from assert to error.
2015-01-17 21:15:15 -07:00
Kyzentun 3fb36af157 Separate styles for players. Notefields positioned between margins. Edit mode works for kickbox. 2014-12-09 22:27:00 -07:00
Kyzentun 2f37e9d8a9 Merge branch 'DefaultHeart' of https://github.com/kyzentun/stepmania 2014-09-14 21:07:54 -06:00
Kyzentun 1dbdca6b0a Merge branch 'StageDispFixes' of https://github.com/kyzentun/stepmania 2014-09-14 21:06:27 -06:00
Kyzentun f87afa8a4b Added ScreenHeartEntry to default theme. 2014-09-12 15:07:46 -06:00
Kyzentun bcb2589114 Fixed endless courses to make them repick on repeats and not crash after repeating. 2014-09-10 02:44:49 -06:00
Kyzentun 2199e7aafb Fixed GAMESTATE:GetCurrentStage to use correct logic for determining if all human players are on final stage.
THEME:GetPath lua functions can now pass true for the third arg if the element is optional.
Fixes to various StageDisplay things in default.
thify_number and thified_curstage_index lua functions added to default/Scripts/04 Other.lua.
2014-09-07 04:05:10 -06:00
sigatrevandJonathan Payne 52c2801503 UpdateSongPositions
It is useful to have Player SongPositions update off of ScreenGameplay
for use with things like ArrowEffects.

ScreenGameplay, ScreenHowToPlay, and ScreenEdit stop GameSoundManager
from running GameState:UpdateSongPosition and do it themselves, so this
has no impact on the screen classes that cared about, and thus updated,
player SongPositions.
2014-08-02 00:38:43 -07:00
Kyzentun afc090ca73 Changed GAMESTATE:SetCurrentSteps and GAMESTATE:SetCurrentTrail to attempt to set a compatible style if AutoSetStyle is true. 2014-06-27 20:20:50 -06:00
Kyzentun 3a788651e5 Fixed bug that caused global fail setting to override setting the fail type from song options. Added GAMESTATE:SetFailTypeExplicitlySet so that a theme with a custom song options screen can protect its fail setting from being overridden the same way the engine ScreenSongOptions does. 2014-06-20 13:54:56 -06:00
Kyzentun 421a9be57b Ripped out existing PlayerOptions Lua interface and replaced it wholesale. Removed PrefsManager's DefaultFailType enum. Moved PlayerOptions::FailType enum to GameConstantsAndTypes and made it Lua accessible. Changed ModsLevel enum to include ModsLevel_Current to make accessing that ModsLevel easier to access. Rearranged ModsGroup appropriately. Added non-const Get functions to ModsGroup. Removed PlayerOptions.m_bSetTiltOrSkew because it had no reason to exist. Moved 200.0f to the const CMOD_DEFAULT because it was being used in more than one place. 2014-05-01 23:23:20 -06:00
Ben "root" Anderson db7110feb1 Apparently MSVC is convinced that there's an important, linking-breaking difference between classes and structs. (Bug#1093, Thanks root670 for the patch!) 2013-12-23 11:06:14 -06:00
Ben "root" Anderson 1dde840059 spelling 2013-11-29 23:59:32 -06:00
Devin J. Pohly 1220dbe085 Revert "Round 2-2 of this."
This reverts commit 0ae4183f7b.
2013-06-04 23:47:22 -04:00
Jason Felds 25c3c7d4f1 Change our auto_ptr's to unique_ptr's.
auto_ptr is deprecated in c++11.
2013-05-04 14:11:47 -04:00
Jason Felds 0ae4183f7b Round 2-2 of this. 2013-04-16 00:16:02 -04:00
Colby Klein bfba3a6fe8 (mostly) Fix arrow stuttering from repeated positions from audio drivers.
As far as I could tell, this fixed any issues I was having with PulseAudio,
it should also fix up DSound on Windows although I've yet to test that.
2012-12-17 16:43:31 -08:00
Jason Felds bbec5842f6 Add the ResetPlayerOptions lua binding. 2011-10-29 11:43:49 -04: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 fb2a63ca16 [GameState] Added GetEarnedExtraStage() Lua binding. 2011-09-07 23:48:04 -05:00
AJ Kelly ebe832a142 Move the expanded section name into GameState 2011-08-03 23:56:04 -05:00
Jason Felds 3d155c9970 NOW I start moving prototypes to headers?
I need to be more consistent...gah, hungry.
2011-06-12 19:35:24 -04:00
Jason Felds fec932e153 More prep work for better radar calculations. 2011-06-08 15:02:54 -04:00
Jason Felds 9ac07e1e2e Prepare for a place to process timing data.
Hopefully what I'm thinking of won't cause too much slowdown.
2011-06-08 14:43:59 -04:00
Jason Felds 0a7b9ce170 Some respect for OOP. (MasterPlayerNumber) 2011-06-06 20:40:11 -04:00
Jason Felds 963cc9d4f1 Fix a Player 2 assist tick / clap bug. 2011-06-06 20:23:23 -04:00
Jason Felds 1a41c32dd9 [splittiming] Better variable name.
ArrowEffects had a minor change, but the intent isn't up yet.
It needs to be so that when you go from the editor to the chart
for playing in Song Timing, it doesn't use the Step Timing.
2011-05-17 00:07:43 -04:00
Jason Felds 7c9b54e9f0 [splittiming] Fix ArrowEffects 1c4b21b.
Almost had this one right...just needed more vars.
2011-05-13 23:32:14 -04:00
Jason Felds 29e0bd3d2f [splittiming] Prepare timing bool switch.
This is needed in GAMESTATE due to it
also going to be called in NoteField.
2011-05-12 22:24:25 -04:00
Thai Pangsakulyanont eda727ddf9 [splittiming]
- load split timing from BMS files
- fix a crash because autogen'd steps don't inherit the timing from parent
- be more verbose in UpdateSongPosition
2011-05-12 16:44:24 +07:00
Thai Pangsakulyanont 1bf99bd528 [splittiming] make screenedit work with the steps' timing. 2011-05-11 20:53:40 +07:00
Thai Pangsakulyanont e1e605b736 [splittiming] move bogus variables back to GameState (210) 2011-05-10 20:03:51 +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
Jason Felds 92e3ab338d [warps] More consistent naming.
Now to make changes...
2011-03-25 01:52:14 -04:00
Jason Felds a085d0d1da Line endings...be normalized! 2011-03-17 01:47:30 -04:00
Jason Felds d1272b001c Another batch of these.
I think I need to look into adding a feature soon.
Either that, or take a minor break.
2011-03-14 21:42:07 -04:00
AJ Kelly 319efa9060 o
o                     _____,
                                  .iiiii>`
        ()                      .=ii||i+`                        .,
                               =iii|ii|;                          =_
                              _-~~~~~~~`                          -|i
  o                    .__=iiii|i|i|i||=_______                    ii|
                  ._iiiiiiiii||i|i|i|iiiililiiiii|=_               i|i|;
           o   .=iiii|||i|i|i|i|i|i|i||i|i|i|i|i|iiii__            i|i|;
              _iii|i|iii|i|i|i|i|i|i|ii|i|i|i|i|i|i||ii=,          i|i|i;
        _ac, ~~ii|i|i|||i|i|i|i|i|i|i|i|i|i|i|i|i|i|i|iii=_.      .i|i|i;
       ]P\awQQma/+i|i|ii|i|i|i|i|i|i|i|i|i|i|i|i|i|i|i||iii=      =|i|i|;
       ?4QQQQQQWW6/i|i|i|i|i|i|i|i|i|i|i|i|i|i|i|i|i|i|i||i|_    .=i|i|i;
       ')4P?QQQQQQQ_"i|i|i|i|i|i|i|i|i|i|i|i|i|i|i|i|i|iii|ii__._=li|i|i;
   ()       QQQQQQQQ i|i|i|i|i|i|i+~_ ~i|i|i|i|i|i|i|i|i||i||iiiiii|i|i;
       ,    QQQQQQQH i|i|i|i|i|i+==ii| <|i|i|i|i|i|i|i|i|i|ii|i|i|i|i|i`
       )46ajQQQQQQ@ i|i|i|i|i|i:=ii|i|| :i|i|i|i|i|i|i|i|i|i|i|i|i|i|i|
       -` )??QQ@P\=ii|i_,-~<|i|iii|i|i| =|i|i|i|i|i|i|i|i|i|i|i|i|i|i|i;
           -~___=|i||i|+||=/||i+i|i|i| :i|i|i|i|i|i|i|i|i|ii|i|i|i|i|i|;
       _,               -<|||i|=/+|i|~ =ii|i|i|i|i|ii|ii|i|i|i|i|i|i|i|=,
       ]f]ggS ..   _____,-=ii|ii|==~~ _ii|i|i|i|i|i|i|i|i|i|i~~~+|i|i|ii;
       ]f]QQS __=l|iiiii=,:|i|i|iiii__ii|i|i|i|i+~~~i|i|i|i|     :i|i|i|;
       ]f]QQS iii>~_i|i|i=,:i|i|i|i|iii|i|i|i|i|i|i|_______,      =|i|i|;
       ]f]QQS    .=ii|i|ii==ii|i|i|i|i|i|i|i|_~i|i|iiiiiiii>      -|i|i;
       )']QQX  iiiii|i|>+|iii|i|i|i|i|i|i|ii|ii=/+i|i|i|>`         i|i|;
         ]QQX  -~<||i|~:i|i|i|i|i|i|i|i|i|i|i|ii|=/||i~`           i|i|`
          )?"          i|i|i|i|i|i|i|i|i|i|i|i||i+` ~              i|i~
                         -~<|i|i|i|i|i|i|i|+~~~                   .i~
                              ~~~~~~~~~`                          -
2011-03-09 17:27:28 -06:00
AJ Kelly 7567d21a9e moving some stuff out of here 2011-03-02 14:37:05 -06:00
AJ Kelly d0059135c4 whiny piece of junk 2011-02-27 22:05:22 -06:00
Jason Felds d9a195d4c2 More docs. 2011-02-27 21:36:34 -05:00
AJ Kelly b0e0097bbc cleanup/comment stuff 2011-02-27 18:37:40 -06:00
Jason Felds 2d76ee1023 Move some top comments to above the class.
The original attempt was not working for doxygen purposes.
2011-02-18 21:24:00 -05:00