Commit Graph

157 Commits

Author SHA1 Message Date
Kyzentun 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
Tyler Brekke 8f332653e1 Persistent Coins (#1405)
On Coin Insert, a file Save/Coin.ini is created if it does not exist, which stores the number of coins currrently in m_iCoins. Whenever m_iCoins is update, the Coin.ini is updated.

On boot, Coin.ini is read and m_iCoins is set to that value. If coins in coin.ini file is greater then MAX_NUM_CREDITS then reset the value to 0.
2017-02-17 08:21:38 -08:00
Jason Felds bec18a0d36 Fix minor windows pedantic warnings. 2016-03-27 22:03:15 -04:00
Flameshadowxeroshin d329c80ad3 remove guitar cruft
There was a bunch of code for handling guitar-specific input such as hammer-ons/pull-offs and strumming. Given that guitar was removed, and as far as I understand, will not be added back into SM5, it makes sense to remove code that had no other use.
2015-12-05 11:12:17 -06: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
Jason Felds 80542a5a7d Require reasons for checkpoints. 2015-06-08 18:37:13 -04:00
Kyzentun Keeslala c155ccffbc Change ForceOtherPlayersToCompatibleSteps to treat NULL steps as a failed match. 2015-05-20 23:22:51 -06:00
Kyzentun Keeslala cc2e166c18 Change JoinPlayer to look directly at SideIsJoined to avoid style-dependent logic in GetNumPlayersEnabled. 2015-05-20 22:26:47 -06:00
Kyzentun Keeslala e6e0dcff44 PlayersCanJoin does not check style anymore, see comment. IsHumanPlayer doesn't try to use PlayersCanJoin to guess the current screen anymore. 2015-05-19 21:58:56 -06:00
Kyzentun 9d1ba50c23 Fixed logic mistake in PlayersCanJoin. 2015-05-04 19:56:30 -06:00
Kyzentun 236947b346 Changed GetFirstCompatibleStyle to not crash SM so it can be used to check whether joining is allowed. JoinPlayer and PlayersCanJoin now use GetFirstCompatibleStyle to check whether there will be a style to change to. Changed logic in PlayersCanJoin to return false at the first failed requirement. 2015-05-02 23:36:28 -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 65a1551c6d Changed SetCurrentStyle to unjoin other player when setting OnePlayerTwoSides to fix crash from second joining on SSS and picking double. Changed MusicWheel FilterWheelItemDatas to clear the vector it's putting the filtered data in instead of appending to the end. Updated Polish translation. 2015-02-08 10:33:51 -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 b6e9d188c3 Added special case to JoinPlayer's style changing logic, see comment in code. Fixed mistake in hold logic that made holds never drop. 2015-01-22 12:37:48 -07:00
Kyzentun aeaead95c9 Changed default ScreenSelecStyle to use functions for choice names and positions instead of metrics. _fallback SSS remains the same for compatibility. Fixed style stomping bug in SetCompatibleStylesForPlayers. 2015-01-20 18:40:59 -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 1890445ab3 Added SetStepsForEditMode lua function. 2014-12-09 22:27:00 -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 c9a17dc48e Added metrics for setting the screens Edit Mode uses for setting mods. Added functions for apply ModsLevel_Preferred to the other levels. 2014-12-09 21:59:01 -07:00
Kyzentun 4f95bf08ad Function chaining for actors and singletons. 2014-12-01 22:31:30 -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
Dan Guzek d1ec94bcd7 touch up style to InsertCredit and InsertCoin
Third time's the charm.
2014-09-01 20:26:55 -04:00
Dan Guzek 6ccbbb4f6f update InsertCoin and InsertCredit functions
These should now agree with kyzentun's suggestions.
2014-09-01 20:03:45 -04:00
Dan Guzek eae5fcb3ba expose InsertCoin and InsertCredit to Lua
This commit exposes InsertCoin() and InsertCredit() to Lua under GAMESTATE.  It adds a check to ensure overall credits don't become negative when deducting and only plays sounds if credits are being added.

Themers are instructed to deduct credits by passing negative values to InsertCoin.
2014-09-01 19:00:00 -04:00
sigatrev 81080ce9ce Add SetCurrentPlayMode and SetCurrentStyle methods
because there needs to be a way other than using antiquated GameCommands
2014-08-13 22:04:54 -05:00
sigatrev acd3340c57 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-07-24 19:45:17 -05:00
Kyzentun 0f72d7cc6b Changed NoteSkinManager to use new error reporting and avoid crashing. Fixed DoChangeTheme to switch to the InitialScreen if the screen doesn't exist in the theme being changed to. Fixed error reporting in MeterDisplay. 2014-07-15 13:28:06 -06:00
Kyzentun fb1a251b7a Changed many places that used RageException to use ReportScriptError instead. Wrote ScreenOptionsExample.ini as documentation example for the OptionRow system. Rewrote gamecommands.txt to include all GameCommands. Fixed Commands::GetOriginalCommandString to insert the semicolons that separated the original commands. Changed nonsensical boolean |= true statements in GameCommand.cpp to just use =. Added protection to ReportScriptError to keep it from recursing through itself when an error occurs in error reporting. Added UseAbort option to ReportScriptError for places that want to use an AbortRetryIgnore dialog to query the user. Added ScriptErrorMessage for places that need to handle the warning/dialog part separately. Added logging flag to MESSAGEMAN so that all messages broadcast can be logged when desired. Changed OptionRowHandler::LoadInternal to return a boolean success value as part of error handling. 2014-07-12 14:59:10 -06:00
Kyzentun 026f968fa4 Changed many uses of Dialog::OK and LOG->Warn to use ReportScriptError. 2014-07-07 00:39:27 -06:00
Kyzentun 6cb9dec854 Changed SetCompatibleStyle to only change when incompatible. 2014-06-27 21:11:34 -06: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 e4f1682964 ASSERT broken into two lines, as per shakesoda's suggestion. 2014-06-16 23:05:31 -06:00
sigatrev 8fc5ae2cd4 fix GAMESTATE:SetCurrentSteps
assert was causing crash if steps were set to nil/null.
2014-06-01 19:23:56 -05:00
Kyzentun c8476738f5 Exposed GAMESTATE:StoreRankingName and Profile:SetLastUsedHighScoreName to Lua. StoreRankingName no longer forces uppercase. 2014-05-12 22:01:22 -06:00
Kyzentun 0dfb131291 Created SongOptions Lua interface with a similar design to the PlayerOptions interface. Moved enums that were inside SongOptions out and made them Lua accessible. Removed sAutosyncType and associated things from AdjustSync.cpp because it was unused. Added DefaultNilArgs and FArgGTEZero to LuaBinding as helpers. Moved INTERFACE defines from PlayerOptions.cpp to OptionsBinding.h. 2014-05-03 19:27:32 -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
Colby Klein b6570936f8 Merge pull request #123 from sigatrev/double-broadcast
removed SetCurrentSteps double-broadcast
2014-04-23 04:16:42 -07:00
sigatrev 7e5b651f1a removed SetCurrentSteps double-broadcast 2014-04-20 11:26:15 -05:00
sigatrev 99ba67acc7 spaces to tabs 2014-04-15 12:09:03 -05:00
Colby Klein 509f725d7e Merge pull request #96 from kyzentun/UnloadProfile_optimization
Unload profile optimization
2014-04-08 15:57:41 -07:00
sigatrev d059118935 Save/LoadProfiles
ScreenProfileLoad and ScreenProfileSave do nothing except use their own
lua methods to run GameState functions. Those functions might as well be
available as GameState methods.
2014-04-02 18:09:21 -05:00
Kyzentun 27dc958970 Changed GameState::UnjoinPlayer to actually follow its own comment and unjoin the player from STATSMAN first, instead of unjoining from PROFILEMAN, then STATSMAN, then PROFILEMAN again. Changed ProfileManager::UnloadProfile to skip unloading if the profile wasn't actually loaded in the first place. 2014-03-10 21:54:53 -06:00
Devin J. Pohly bb1b6a81c6 Special case player number 1/2 in ApplyGameCommand
This function, oddly, used to take a 1 or 2 for the player number where
other nearby functions (e.g. IsPlayerEnabled) would take the proper enum
value, 0 or 1.  If the old-style syntax (raw number) is used, also use
the old-style interpretation.
2014-02-23 16:41:19 -05:00
Colby Klein 5e52c4f37e Merge branch 'ComboContinuesBetweenSongs_readd' of https://github.com/kyzentun/stepmania into kyzentun-ComboContinuesBetweenSongs_readd 2014-02-17 14:41:33 -08:00