diff -Nru stepmania-5.0.10+dfsg/.appveyor.yml stepmania-5.0.11+dfsg/.appveyor.yml --- stepmania-5.0.10+dfsg/.appveyor.yml 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/.appveyor.yml 2016-03-30 16:08:58.000000000 +0000 @@ -35,7 +35,7 @@ - cmd: >- cd Build - cmake -G "Visual Studio 14 2015" -DWITH_IRC_POST_HOOK=ON .. + cmake -G "Visual Studio 14 2015" -T "v140_xp" -DWITH_IRC_POST_HOOK=ON .. build: project: C:\Repos\wolfmania\Build\StepMania.sln verbosity: normal diff -Nru stepmania-5.0.10+dfsg/Build/README.md stepmania-5.0.11+dfsg/Build/README.md --- stepmania-5.0.10+dfsg/Build/README.md 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Build/README.md 2016-03-30 16:08:58.000000000 +0000 @@ -51,6 +51,8 @@ Replace {YourGeneratorHere} with one of the generator choices from `cmake --help`. As an example, Mac OS X users that want to have Xcode used would run `cmake -G Xcode .. && cmake ..` on their Terminal program. +If you are building on Windows and expecting your final executable to be able to run on Windows XP, append an additional parameter `-T "v140_xp"` (or `-T "v120_xp"`, depending on which version of Visual Studio you have installed) to your command line. + If any cmake project file changes, you can just run `cmake .. && cmake ..` to get up to date. If this by itself doesn't work, you may have to clean the cmake cache. Use `rm -rf CMakeCache.txt CMakeScripts/ CMakeFiles/ cmake_install.txt` to do that, and then run the generator command again as specified above. diff -Nru stepmania-5.0.10+dfsg/CMake/CPackSetup.cmake stepmania-5.0.11+dfsg/CMake/CPackSetup.cmake --- stepmania-5.0.10+dfsg/CMake/CPackSetup.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/CMake/CPackSetup.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -14,6 +14,7 @@ set(CPACK_NSIS_HELP_LINK "https://github.com/stepmania/stepmania/issues") set(CPACK_NSIS_PACKAGE_NAME "${SM_EXE_NAME} ${NSIS_VERSION_FINAL}") set(CPACK_NSIS_URL_INFO_ABOUT "http://www.stepmania.com/") +set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) set(CPACK_RESOURCE_FILE_README "${SM_ROOT_DIR}/README.md") set(CPACK_RESOURCE_FILE_LICENSE "${SM_CMAKE_DIR}/license_install.txt") set(CPACK_PACKAGE_EXECUTABLES diff -Nru stepmania-5.0.10+dfsg/CMake/DefineOptions.cmake stepmania-5.0.11+dfsg/CMake/DefineOptions.cmake --- stepmania-5.0.10+dfsg/CMake/DefineOptions.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/CMake/DefineOptions.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -38,6 +38,9 @@ # Turn this option off to disable using OGG files with the game. option(WITH_OGG "Build with OGG/Vorbis Support." ON) +# Turn this option on to log every segment added or removed. +option(WITH_LOGGING_TIMING_DATA "Build with logging all Add and Erase Segment calls." OFF) + if(NOT MSVC) # Turn this option off to disable using FFMEPG. option(WITH_FFMPEG "Build with FFMPEG." ON) @@ -58,6 +61,7 @@ # Builder beware: later versions of ffmpeg may break! option(WITH_SYSTEM_FFMPEG "Build with the system's FFMPEG, disabled build with bundled's FFMPEG" OFF) option(WITH_CRYSTALHD_DISABLED "Build FFMPEG without Crystal HD support." OFF) + option(WITH_MINIMAID "Build with Minimaid Lights Support." ON) option(WITH_TTY "Build with Linux TTY Input Support." OFF) option(WITH_PROFILING "Build with Profiling Support." OFF) option(WITH_GLES2 "Build with OpenGL ES 2.0 Support." ON) diff -Nru stepmania-5.0.10+dfsg/CMake/SetupFfmpeg.cmake stepmania-5.0.11+dfsg/CMake/SetupFfmpeg.cmake --- stepmania-5.0.10+dfsg/CMake/SetupFfmpeg.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/CMake/SetupFfmpeg.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -22,6 +22,10 @@ "--enable-static" ) +if(CMAKE_POSITION_INDEPENDENT_CODE) + list(APPEND FFMPEG_CONFIGURE "--enable-pic") +endif() + if(MACOSX) # TODO: Remove these two items when Mac OS X StepMania builds in 64-bit. list(APPEND FFMPEG_CONFIGURE diff -Nru stepmania-5.0.10+dfsg/CMake/SMDefs.cmake stepmania-5.0.11+dfsg/CMake/SMDefs.cmake --- stepmania-5.0.10+dfsg/CMake/SMDefs.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/CMake/SMDefs.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -1,7 +1,7 @@ # Set up version numbers according to the new scheme. set(SM_VERSION_MAJOR 5) set(SM_VERSION_MINOR 0) -set(SM_VERSION_PATCH 10) +set(SM_VERSION_PATCH 11) set(SM_VERSION_TRADITIONAL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}") execute_process(COMMAND git rev-parse --short HEAD diff -Nru stepmania-5.0.10+dfsg/debian/changelog stepmania-5.0.11+dfsg/debian/changelog --- stepmania-5.0.10+dfsg/debian/changelog 2015-12-16 04:55:29.000000000 +0000 +++ stepmania-5.0.11+dfsg/debian/changelog 2016-04-03 02:38:08.000000000 +0000 @@ -1,4 +1,4 @@ -stepmania (5.0.10+dfsg-6build4) wily; urgency=low +stepmania (5.0.11+dfsg-0build1+ubuntu15.10) wily; urgency=low * new upstream release diff -Nru stepmania-5.0.10+dfsg/debian/control stepmania-5.0.11+dfsg/debian/control --- stepmania-5.0.10+dfsg/debian/control 2015-12-15 12:36:31.000000000 +0000 +++ stepmania-5.0.11+dfsg/debian/control 2016-04-03 02:38:14.000000000 +0000 @@ -2,7 +2,7 @@ Section: games Priority: extra Maintainer: kakurasan -Build-Depends: debhelper (>= 9), cmake, yasm, libgl1-mesa-dev, libgles2-mesa-dev, libglu1-mesa-dev, libglew-dev, libxtst-dev, libxrandr-dev, libpng12-dev, libjpeg-dev, zlib1g-dev, libbz2-dev, libogg-dev, libvorbis-dev, libmad0-dev, libasound2-dev, libgtk2.0-dev, libpulse-dev, libjack-jackd2-dev, libpcre3-dev, libva-dev, ffmpeg, libavcodec-ffmpeg-dev, libavdevice-ffmpeg-dev, libavfilter-ffmpeg-dev, libavformat-ffmpeg-dev, libavresample-ffmpeg-dev, libavutil-ffmpeg-dev, libpostproc-ffmpeg-dev, libswresample-ffmpeg-dev, libswscale-ffmpeg-dev +Build-Depends: debhelper (>= 9), cmake, yasm, libgl1-mesa-dev, libgles2-mesa-dev, libglu1-mesa-dev, libglew-dev, libxtst-dev, libxrandr-dev, libpng12-dev, libjpeg-dev, zlib1g-dev, libbz2-dev, libogg-dev, libvorbis-dev, libmad0-dev, libasound2-dev, libgtk2.0-dev, libpulse-dev, libjack-jackd2-dev, libpcre3-dev, libva-dev, libudev-dev, ffmpeg, libavcodec-ffmpeg-dev, libavdevice-ffmpeg-dev, libavfilter-ffmpeg-dev, libavformat-ffmpeg-dev, libavresample-ffmpeg-dev, libavutil-ffmpeg-dev, libpostproc-ffmpeg-dev, libswresample-ffmpeg-dev, libswscale-ffmpeg-dev Standards-Version: 3.9.5 Homepage: http://www.stepmania.com/ diff -Nru stepmania-5.0.10+dfsg/debian/patches/32bit.patch stepmania-5.0.11+dfsg/debian/patches/32bit.patch --- stepmania-5.0.10+dfsg/debian/patches/32bit.patch 1970-01-01 00:00:00.000000000 +0000 +++ stepmania-5.0.11+dfsg/debian/patches/32bit.patch 2016-04-02 17:30:05.000000000 +0000 @@ -0,0 +1,17 @@ +Index: stepmania-5.0.11/src/CMakeLists.txt +=================================================================== +--- stepmania-5.0.11.orig/src/CMakeLists.txt 2016-04-03 01:25:39.038751007 +0800 ++++ stepmania-5.0.11/src/CMakeLists.txt 2016-04-03 01:30:00.194756966 +0800 +@@ -295,11 +295,9 @@ + if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + message("Host processor is 64bit") + sm_add_compile_definition("${SM_EXE_NAME}" CPU_X86_64) +- elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86" OR CMAKE_SYSTEM_PROCESSOR MATCHES "i686") ++ else() + message("Host processor is 32bit") + sm_add_compile_definition("${SM_EXE_NAME}" CPU_X86) +- else() +- message("Unrecognized host processor type") + endif() + endif() + if (${HAS_FFMPEG}) diff -Nru stepmania-5.0.10+dfsg/debian/patches/fix-32bit.patch stepmania-5.0.11+dfsg/debian/patches/fix-32bit.patch --- stepmania-5.0.10+dfsg/debian/patches/fix-32bit.patch 2015-12-15 09:41:07.000000000 +0000 +++ stepmania-5.0.11+dfsg/debian/patches/fix-32bit.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Index: stepmania-5.0.10/src/CMakeLists.txt -=================================================================== ---- stepmania-5.0.10.orig/src/CMakeLists.txt 2015-12-15 00:15:17.266073716 +0800 -+++ stepmania-5.0.10/src/CMakeLists.txt 2015-12-15 17:41:00.969708563 +0800 -@@ -295,11 +295,9 @@ - if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") - message("Host processor is 64bit") - sm_add_compile_definition("${SM_EXE_NAME}" CPU_X86_64) -- elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86") -+ else() - message("Host processor is 32bit") - sm_add_compile_definition("${SM_EXE_NAME}" CPU_X86) -- else() -- message("Unrecognized host processor type") - endif() - endif() - if (${HAS_FFMPEG}) diff -Nru stepmania-5.0.10+dfsg/debian/patches/fixversion-5011.patch stepmania-5.0.11+dfsg/debian/patches/fixversion-5011.patch --- stepmania-5.0.10+dfsg/debian/patches/fixversion-5011.patch 1970-01-01 00:00:00.000000000 +0000 +++ stepmania-5.0.11+dfsg/debian/patches/fixversion-5011.patch 2016-04-02 17:38:47.000000000 +0000 @@ -0,0 +1,28 @@ +Index: stepmania-5.0.11/CMake/SMDefs.cmake +=================================================================== +--- stepmania-5.0.11.orig/CMake/SMDefs.cmake 2016-04-03 01:32:01.000000000 +0800 ++++ stepmania-5.0.11/CMake/SMDefs.cmake 2016-04-03 01:34:08.682762635 +0800 +@@ -13,7 +13,7 @@ + + if(NOT (ret STREQUAL "0")) + message(WARNING "git was not found on your path. If you collect bug reports, please add git to your path and rerun cmake.") +- set(SM_VERSION_GIT_HASH "UNKNOWN") ++ set(SM_VERSION_GIT_HASH "11") + set(SM_VERSION_FULL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-${SM_VERSION_GIT_HASH}") + set(SM_VERSION_GIT "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-${SM_VERSION_GIT_HASH}") + else() +Index: stepmania-5.0.11/src/CMakeLists.txt +=================================================================== +--- stepmania-5.0.11.orig/src/CMakeLists.txt 2016-04-03 01:32:01.000000000 +0800 ++++ stepmania-5.0.11/src/CMakeLists.txt 2016-04-03 01:38:40.778768844 +0800 +@@ -68,8 +68,8 @@ + endif() + + # Configure generated files here. +-configure_file("${SM_XCODE_DIR}/Info.plist.in.xml" "${SM_XCODE_DIR}/Info.StepMania.plist") +-configure_file("${SM_XCODE_DIR}/plistHelper.in.hpp" "${SM_XCODE_DIR}/plistHelper.hpp") ++#configure_file("${SM_XCODE_DIR}/Info.plist.in.xml" "${SM_XCODE_DIR}/Info.StepMania.plist") ++#configure_file("${SM_XCODE_DIR}/plistHelper.in.hpp" "${SM_XCODE_DIR}/plistHelper.hpp") + + # TODO: Make this actually be data and not an executable. + if(APPLE) diff -Nru stepmania-5.0.10+dfsg/debian/patches/fix-version.patch stepmania-5.0.11+dfsg/debian/patches/fix-version.patch --- stepmania-5.0.10+dfsg/debian/patches/fix-version.patch 2015-12-16 04:18:01.000000000 +0000 +++ stepmania-5.0.11+dfsg/debian/patches/fix-version.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -Index: stepmania-5.0.10/CMake/SMDefs.cmake -=================================================================== ---- stepmania-5.0.10.orig/CMake/SMDefs.cmake 2015-12-15 00:15:17.262073716 +0800 -+++ stepmania-5.0.10/CMake/SMDefs.cmake 2015-12-16 12:17:17.524128009 +0800 -@@ -13,9 +13,9 @@ - - if(NOT (ret STREQUAL "0")) - message(WARNING "git was not found on your path. If you collect bug reports, please add git to your path and rerun cmake.") -- set(SM_VERSION_GIT_HASH "UNKNOWN") -- set(SM_VERSION_FULL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-${SM_VERSION_GIT_HASH}") -- set(SM_VERSION_GIT "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}-${SM_VERSION_GIT_HASH}") -+ set(SM_VERSION_GIT_HASH "10") -+ set(SM_VERSION_FULL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_GIT_HASH}") -+ set(SM_VERSION_GIT "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_GIT_HASH}") - else() - if (WITH_FULL_RELEASE) - set(SM_VERSION_FULL "${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}") -Index: stepmania-5.0.10/src/CMakeLists.txt -=================================================================== ---- stepmania-5.0.10.orig/src/CMakeLists.txt 2015-12-15 17:41:00.969708563 +0800 -+++ stepmania-5.0.10/src/CMakeLists.txt 2015-12-16 04:40:36.656191549 +0800 -@@ -68,8 +68,8 @@ - endif() - - # Configure generated files here. --configure_file("${SM_XCODE_DIR}/Info.plist.in.xml" "${SM_XCODE_DIR}/Info.StepMania.plist") --configure_file("${SM_XCODE_DIR}/plistHelper.in.hpp" "${SM_XCODE_DIR}/plistHelper.hpp") -+# configure_file("${SM_XCODE_DIR}/Info.plist.in.xml" "${SM_XCODE_DIR}/Info.StepMania.plist") -+# configure_file("${SM_XCODE_DIR}/plistHelper.in.hpp" "${SM_XCODE_DIR}/plistHelper.hpp") - - # TODO: Make this actually be data and not an executable. - if(APPLE) diff -Nru stepmania-5.0.10+dfsg/debian/patches/series stepmania-5.0.11+dfsg/debian/patches/series --- stepmania-5.0.10+dfsg/debian/patches/series 2015-12-15 18:41:19.000000000 +0000 +++ stepmania-5.0.11+dfsg/debian/patches/series 2016-04-02 17:32:29.000000000 +0000 @@ -1,3 +1,3 @@ stepmania-5.0.7-debian.patch -fix-32bit.patch -fix-version.patch +32bit.patch +fixversion-5011.patch diff -Nru stepmania-5.0.10+dfsg/Docs/Changelog_language.txt stepmania-5.0.11+dfsg/Docs/Changelog_language.txt --- stepmania-5.0.10+dfsg/Docs/Changelog_language.txt 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Docs/Changelog_language.txt 2016-03-30 16:08:58.000000000 +0000 @@ -16,6 +16,10 @@ This means that three strings were added to the "ScreenDebugOverlay" section, "Mute actions", "Mute actions on", and "Mute actions off". +2016/01/18 +---------- +* [ScreenEdit] Clear timing in region + 2015/10/02 ---------- * [ScreenEdit] save_success_no_sm_split_timing diff -Nru stepmania-5.0.10+dfsg/Docs/Changelog_sm5.txt stepmania-5.0.11+dfsg/Docs/Changelog_sm5.txt --- stepmania-5.0.10+dfsg/Docs/Changelog_sm5.txt 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Docs/Changelog_sm5.txt 2016-03-30 16:08:58.000000000 +0000 @@ -4,6 +4,149 @@ from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt. ________________________________________________________________________________ +2016/03/22 +---------- +* [Prefs] Added DisableUploadDir preference to skip saving a score entry to + Save/Upload every time a song is played. Generating the unique filename + can take several seconds when there are years of scores accumulated, and it + clutters the disk. This preference defaults to false. [kyzentun] + +2016/03/17 +---------- +* [Actor] Added get and set_tween_uses_effect_delta lua functions to make an + Actor use the effect clock for tweening. [kyzentun] + +2016/03/15 +---------- +* [ProfileManager] Added GetStatsPrefix and SetStatsPrefix lua functions for + separating scores into different stats files. [kyzentun] + (this is kind of a stop gap, I'd really like to rewrite scoring to save + more data so that a score earned with one set of timing windows and weights + can be converted to the equivalent score with different timing windows) + +2016/03/14 +---------- +* [Online] Stepmania will force disconnection from the SMO server when + entering the jukebox or sync calibration screens to avoid crash. [kyzentun] + +2016/03/05 +---------- +* [global] get_sound_driver_list lua function added. [kyzentun] + +2016/03/02 +---------- +* [Gameplay] Fixed No Fakes mod to remove fakes inside warps. [kyzentun] +* [Keymaps] Added special name for colon key so it can be bound. [medmig] + +2016/02/20 +---------- +* [Language] Bahasa Indonesian translation added to default theme. [JOELwindows7] + +2016/02/15 +---------- +* [Input] Linux event devices now start at JOY10 instead of JOY1. Without + this change, if one dance pad is a joystick device, and the other is an + event device, they will both be JOY1, and stepmania will think they are the + same dance pad. If you use Linux, assume that you have to remap your dance + pad. [kyzentun] + +2016/02/13 +---------- +* [Lights] Minimaid driver added for Linux. This is practically identical to + the Windows minimaid driver that pkgingo wrote. +* [Gameplay] When checking for the first second in a song, AutoKeysound notes + are now ignored, being treated as if they were background music. This + allows the intro of BMS files to play as soon as ScreenGameplay is loaded, + while still having a delay before the real notes come in. [nixtrix] + +2016/02/04 +---------- +* [Course] In an Endless course, songs will only be repeated after all songs + in the group have been played. [blindbox] + +2016/02/03 +---------- +* [ScreenManager] Added PlayInvalidSound, PlayStartSound, PlayCoinSound, + PlayCancelSound, and PlayScreenshotSound lua bindings. [kyzentun] + Added get_input_redirected and set_input_redirected to allow the theme to + disable the normal input functions. (Example: a custom lua menu on + Select Music. When the menu is up, the theme doesn't want the player's + input to move the music wheel.) This is in SCREENMAN so that it will work + on all screens. [kyzentun] +* [ScreenSelectMusic] Added CanOpenOptionsList lua binding. OpenOptionsList + will do nothing if CanOpenOptionsList returns false. [kyzentun] + +2016/01/18 +---------- +* [Edit Mode] Added "Clear timing in region" to timing menu. [kyzentun] + Fixed crash that occurs when "Paste timing data" is used after copying a + region of timing data that only contains stops. [kyzentun] + +2016/01/14 +---------- +* [Gameplay] Added pause menu to default theme. Activated by pressing + Select, or Back twice without pressing something else. Has options for + restarting or forfeiting the current song in normal play. Course mode has + options for skipping the current song or ending the course or forfeiting. + [kyzentun] +* [Graphics] When fetching the list of resolutions, only 32bpp modes are + tested because less than 32bpp is not supported on Windows 8 and newer, and + because the bpp doesn't matter when fetching a list of resolutions. This + speeds up the load time of the Graphics/Sound option screen. [kyzentun] + +2016/01/10 +---------- +* [RageFile] Lua functions for RageFile should now emit an error when the + file was not opened correctly instead of crashing. [kyzentun] + +2016/01/05 +---------- +* [Linux] Disable DPMS on startup and restore setting on exit. [kyzentun] + +2015/12/27 +---------- +* [RageFileManager] Ignore OS X special files in GetDirListing. [kyzentun] + +2015/12/20 +---------- +* [Fonts] Fixed crash bug in Texture Font Generator. [drewbarbs] + +2015/12/16 +---------- +* [Player] ChangeLife and SetLife functions added. [kyzentun] + +2015/12/13 +---------- +* [popn] Judgment levels in popn game mode now use W1 to W5. [parashep] + +2015/12/05 +---------- +* [Player] Guitar mode cruft removed from Player. [tertu] + +2015/12/04 +---------- +* [NoteField] Changed DrawBeatBar to check the M-mod so that smaller beat + bars are drawn when M-mods are used in edit mode. [kyzentun] + +2015/11/09 +---------- +* [Gameplay] BG Brightness is no longer forced to 100% on songs that only + have a beginner chart. [kyzentun] + +2015/11/08 +---------- +* [ScreenSelectMusic] Using lua music files for the section music and similar + things works now. [kyzentun] + +2015/11/05 +---------- +* [PlayerOptions] Fixed bug that was clearing the noteskin back to default. + [kyzentun] + +================================================================================ +StepMania 5.0.10 | 20151031 +-------------------------------------------------------------------------------- + 2015/10/29 ---------- * [Language] French translation updated. [Arvaneth] diff -Nru stepmania-5.0.10+dfsg/Docs/Luadoc/LuaDocumentation.xml stepmania-5.0.11+dfsg/Docs/Luadoc/LuaDocumentation.xml --- stepmania-5.0.10+dfsg/Docs/Luadoc/LuaDocumentation.xml 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Docs/Luadoc/LuaDocumentation.xml 2016-03-30 16:08:58.000000000 +0000 @@ -215,6 +215,9 @@ Returns the length of the music file found at path.
If you are loading the sound into an ActorSound, ActorSound:get to get its RageSound then use RageSound's get_length function instead to avoid loading the file twice. + + Returns a table of the names of the sound drivers available. If the SoundDriver preference is set to something that is not in this list, StepMania WILL NOT START UP. Changes to the SoundDriver preference do not take effect until the next time StepMania starts up. + Returns a string representing the name of the operating system being used. (e.g. "Windows", "Linux", "Mac, "Unknown") @@ -1222,6 +1225,9 @@ Returns the zoomed width of an Actor. + + Returns true if this actor is currently set to use the effect delta for tweening. + Sets the Actor's glow color. @@ -1331,6 +1337,9 @@ Sets the width of the Actor. + + Use this to make the actor use the effect clock to tween instead of using the global frame delta. + Sets the shadow's color to c. @@ -2863,7 +2872,7 @@ Saves the bookkeeping and machine profile data. - + Save profiles. @@ -3366,6 +3375,12 @@ + + Changes the life value by delta. This will broadcast a LifeChangedMessageCommand, to allow custom life bars to update to the new value. Do not call ChangeLife from within LifeChangedMessageCommand. + + + Sets the life to value. This will broadcast a LifeChangedMessageCommand, to allow custom life bars to update to the new value. Do not call SetLife from within LifeChangedMessageCommand. + Returns the current TimingData for this player. @@ -4005,6 +4020,9 @@ Returns the number of times Song s has been played with the specified ProfileSlot. + + Returns the current stats prefix. + Returns true if player pn's profile is persistent. @@ -4035,6 +4053,9 @@ Saves the profile for player pn. + + Sets the current stats prefix. The stats prefix is prepended to the Stats.xml file when loading or saving a profile. SetStatsPrefix will reload all profiles from the Stats.xml that has the given prefix. In general, score entries are the only thing not preserved when changing the stats prefix. Profile::HandleStatsPrefixChange in Profile.cpp lists the fields that are preserved. + @@ -4301,6 +4322,9 @@ Sets the NextScreen value to name. + + Sets the PrevScreen value to name. + [02 Other.lua] Gets a string from the current Screen in the current language. @@ -4316,6 +4340,9 @@ + + This should behave identically to the normal back button behavior. This function is for the pause menu to use when the player forfeits or restarts, so that a score isn't saved. + Returns true if a single has its NoteField centered. @@ -4377,6 +4404,24 @@ Gets the screen at the top of the screen stack. + + Returns whether the input for the player has been redirected away from the normal screen input function. Input that has been redirected is only sent to lua input callbacks. + + + Plays the invalid sound. + + + Plays the start sound. + + + Plays the coin sound. + + + Plays the cancel sound. + + + Plays the screenshot sound. + Reloads any loaded overlay screens. @@ -4389,6 +4434,10 @@ Sets the next screen to s. + + Sets whether the input for the player has been redirected away from the normal screen input function. Input that has been redirected is only sent to lua input callbacks.
+ This can be useful when putting a custom menu on a screen, and you want to disable the built in actors while the menu is open. Then you handle input through an input callback until the player closes the menu. +
Broadcasts a system message. @@ -4470,6 +4519,9 @@
+ + Returns false if the options list is already open or the UseOptionsList metric is false. + Returns true if the player is going to the options screen. diff -Nru stepmania-5.0.10+dfsg/Docs/Luadoc/Lua.xml stepmania-5.0.11+dfsg/Docs/Luadoc/Lua.xml --- stepmania-5.0.10+dfsg/Docs/Luadoc/Lua.xml 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Docs/Luadoc/Lua.xml 2016-03-30 16:08:58.000000000 +0000 @@ -222,6 +222,7 @@ + @@ -385,6 +386,7 @@ + @@ -417,6 +419,7 @@ + @@ -1096,6 +1099,8 @@ + + @@ -1350,6 +1355,7 @@ + @@ -1359,6 +1365,7 @@ + @@ -1453,6 +1460,7 @@ + @@ -1464,6 +1472,7 @@ + @@ -1484,10 +1493,17 @@ + + + + + + + @@ -1525,6 +1541,7 @@ + diff -Nru stepmania-5.0.10+dfsg/extern/CMakeProject-glew.cmake stepmania-5.0.11+dfsg/extern/CMakeProject-glew.cmake --- stepmania-5.0.10+dfsg/extern/CMakeProject-glew.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/extern/CMakeProject-glew.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -2,7 +2,7 @@ source_group("" FILES ${GLEW_SRC}) -add_library("glew" ${GLEW_SRC}) +add_library("glew" STATIC ${GLEW_SRC}) set_property(TARGET "glew" PROPERTY FOLDER "External Libraries") diff -Nru stepmania-5.0.10+dfsg/extern/CMakeProject-json.cmake stepmania-5.0.11+dfsg/extern/CMakeProject-json.cmake --- stepmania-5.0.10+dfsg/extern/CMakeProject-json.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/extern/CMakeProject-json.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -16,7 +16,7 @@ source_group("" FILES ${JSON_SRC} ${JSON_HPP}) -add_library("jsoncpp" ${JSON_SRC} ${JSON_HPP}) +add_library("jsoncpp" STATIC ${JSON_SRC} ${JSON_HPP}) set_property(TARGET "jsoncpp" PROPERTY FOLDER "External Libraries") diff -Nru stepmania-5.0.10+dfsg/extern/CMakeProject-lua.cmake stepmania-5.0.11+dfsg/extern/CMakeProject-lua.cmake --- stepmania-5.0.10+dfsg/extern/CMakeProject-lua.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/extern/CMakeProject-lua.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -58,7 +58,7 @@ source_group("" FILES ${LUA_SRC}) source_group("" FILES ${LUA_HPP}) -add_library("lua-5.1" ${LUA_SRC} ${LUA_HPP}) +add_library("lua-5.1" STATIC ${LUA_SRC} ${LUA_HPP}) set_property(TARGET "lua-5.1" PROPERTY FOLDER "External Libraries") diff -Nru stepmania-5.0.10+dfsg/extern/CMakeProject-mad.cmake stepmania-5.0.11+dfsg/extern/CMakeProject-mad.cmake --- stepmania-5.0.10+dfsg/extern/CMakeProject-mad.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/extern/CMakeProject-mad.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -43,7 +43,7 @@ source_group("Header Files" FILES ${MAD_HPP}) source_group("Data Files" FILES ${MAD_DAT}) -add_library("mad" ${MAD_SRC} ${MAD_HPP} ${MAD_DAT}) +add_library("mad" STATIC ${MAD_SRC} ${MAD_HPP} ${MAD_DAT}) set_property(TARGET "mad" PROPERTY FOLDER "External Libraries") diff -Nru stepmania-5.0.10+dfsg/extern/CMakeProject-mmmagic.cmake stepmania-5.0.11+dfsg/extern/CMakeProject-mmmagic.cmake --- stepmania-5.0.10+dfsg/extern/CMakeProject-mmmagic.cmake 1970-01-01 00:00:00.000000000 +0000 +++ stepmania-5.0.11+dfsg/extern/CMakeProject-mmmagic.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -0,0 +1,15 @@ +if(LINUX) + if(WITH_MINIMAID) + if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + list(APPEND SMDATA_LINK_LIB + "${SM_EXTERN_DIR}/libmmmagic/linux-64bit/libmmmagic.a" + "udev" + ) + else() + list(APPEND SMDATA_LINK_LIB + "${SM_EXTERN_DIR}/libmmmagic/linux-32bit/libmmmagic.a" + "udev" + ) + endif() + endif() +endif() diff -Nru stepmania-5.0.10+dfsg/extern/CMakeProject-ogg.cmake stepmania-5.0.11+dfsg/extern/CMakeProject-ogg.cmake --- stepmania-5.0.10+dfsg/extern/CMakeProject-ogg.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/extern/CMakeProject-ogg.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -14,7 +14,7 @@ source_group("Source Files" FILES ${OGG_SRC}) source_group("Header Files" FILES ${OGG_HPP}) -add_library("ogg" ${OGG_SRC} ${OGG_HPP} ${OGG_DAT}) +add_library("ogg" STATIC ${OGG_SRC} ${OGG_HPP} ${OGG_DAT}) set_property(TARGET "ogg" PROPERTY FOLDER "External Libraries") diff -Nru stepmania-5.0.10+dfsg/extern/CMakeProject-png.cmake stepmania-5.0.11+dfsg/extern/CMakeProject-png.cmake --- stepmania-5.0.10+dfsg/extern/CMakeProject-png.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/extern/CMakeProject-png.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -30,7 +30,7 @@ source_group("" FILES ${PNG_SRC}) source_group("" FILES ${PNG_HPP}) -add_library("png" ${PNG_SRC} ${PNG_HPP}) +add_library("png" STATIC ${PNG_SRC} ${PNG_HPP}) set_property(TARGET "png" PROPERTY FOLDER "External Libraries") diff -Nru stepmania-5.0.10+dfsg/extern/CMakeProject-tomcrypt.cmake stepmania-5.0.11+dfsg/extern/CMakeProject-tomcrypt.cmake --- stepmania-5.0.10+dfsg/extern/CMakeProject-tomcrypt.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/extern/CMakeProject-tomcrypt.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -265,7 +265,7 @@ source_group("headers" FILES ${TOMCRYPT_HPP}) -add_library("tomcrypt" ${TOMCRYPT_SRC} ${TOMCRYPT_HPP}) +add_library("tomcrypt" STATIC ${TOMCRYPT_SRC} ${TOMCRYPT_HPP}) set_property(TARGET "tomcrypt" PROPERTY FOLDER "External Libraries") diff -Nru stepmania-5.0.10+dfsg/extern/CMakeProject-tommath.cmake stepmania-5.0.11+dfsg/extern/CMakeProject-tommath.cmake --- stepmania-5.0.10+dfsg/extern/CMakeProject-tommath.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/extern/CMakeProject-tommath.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -131,7 +131,7 @@ source_group("" FILES ${TOMMATH_SRC}) source_group("" FILES ${TOMMATH_HPP}) -add_library("tommath" ${TOMMATH_SRC} ${TOMMATH_HPP}) +add_library("tommath" STATIC ${TOMMATH_SRC} ${TOMMATH_HPP}) set_property(TARGET "tommath" PROPERTY FOLDER "External Libraries") Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/extern/libmmmagic/linux-32bit/libmmmagic.a and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/extern/libmmmagic/linux-32bit/libmmmagic.a differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/extern/libmmmagic/linux-64bit/libmmmagic.a and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/extern/libmmmagic/linux-64bit/libmmmagic.a differ diff -Nru stepmania-5.0.10+dfsg/extern/libmmmagic/mmmagic.h stepmania-5.0.11+dfsg/extern/libmmmagic/mmmagic.h --- stepmania-5.0.10+dfsg/extern/libmmmagic/mmmagic.h 1970-01-01 00:00:00.000000000 +0000 +++ stepmania-5.0.11+dfsg/extern/libmmmagic/mmmagic.h 2016-03-30 16:08:58.000000000 +0000 @@ -0,0 +1,75 @@ +/* +IMPORTANT NOTE FOR *NIX USERS: +You must add permissions to access the minimaid as a user! Either do this through udev or manually or something.The below should work but fuck if it works for me :/ + + +sudo -i +echo SUBSYSTEM==\"usb\", ATTR{idVendor}==\"beef\", ATTR{idProduct}==\"5730\", MODE=\"0666\" > /etc/udev/rules.d/50-minimaid + + + +*/ + +#ifndef MMMAGIC_H +#define MMMAGIC_H + +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +/*Minimaid bit identifiers*/ +//CANINET_LIGHTS +#define DDR_DOUBLE_BASS_LIGHTS 0 //unknown but guessed +#define DDR_DOUBLE_PLAYER1_PANEL 2 +#define DDR_DOUBLE_PLAYER2_PANEL 3 +#define DDR_DOUBLE_MARQUEE_LOWER_RIGHT 4 +#define DDR_DOUBLE_MARQUEE_UPPER_RIGHT 5 +#define DDR_DOUBLE_MARQUEE_LOWER_LEFT 6 +#define DDR_DOUBLE_MARQUEE_UPPER_LEFT 7 + +//PADX_LIGHTS +#define DDR_DOUBLE_PAD_UP 0 +#define DDR_DOUBLE_PAD_DOWN 1 +#define DDR_DOUBLE_PAD_LEFT 2 +#define DDR_DOUBLE_PAD_RIGHT 3 +#define DDR_DOUBLE_PAD_RESET 4 + +#define BIT(i) (1<<(i)) +#define BIT_IS_SET(v,i) ((v&BIT(i))!=0) +static bool __bitValid(int bit); + + +//minimaid prototypes +void mm_setDDRPad1Light(int, int); +void mm_setDDRPad2Light(int, int); +void mm_setDDRCabinetLight(int, int); +void mm_setDDRBassLight(int, int); + + +bool mm_connect_minimaid(); +bool mm_setKB(bool val); + +void mm_setDDRAllOn(); +void mm_setDDRAllOff(); + +void mm_setBlueLED(unsigned char value); +void mm_setMMOutputReports(unsigned char a, unsigned char b, unsigned char c, unsigned char d); +bool mm_sendDDRMiniMaidUpdate(); +static void mm_init(); +static unsigned char mm_turnON(unsigned char set, int bit); +static unsigned char mm_turnOFF(unsigned char set, int bit); + + + +//void mm_input_callback(void *ctx); + +#ifdef __cplusplus +} +#endif + +#endif diff -Nru stepmania-5.0.10+dfsg/README.md stepmania-5.0.11+dfsg/README.md --- stepmania-5.0.10+dfsg/README.md 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/README.md 2016-03-30 16:08:58.000000000 +0000 @@ -5,33 +5,40 @@ Advanced cross-platform rhythm game for home and arcade use. -##Installing from Setup/Installer## +[![Build Status](https://travis-ci.org/stepmania/stepmania.svg?branch=master)](https://travis-ci.org/stepmania/stepmania) +[![Build status](https://ci.appveyor.com/api/projects/status/e932dk2o3anki27p?svg=true)](https://ci.appveyor.com/project/wolfman2000/stepmania-wm87c) + +## Installation +### From Packages For those that do not wish to compile the game on their own and use a binary right away, be aware of the following issues: -* Windows users are expected to have installed the [Microsoft Visual C++ x86 Redistributable for Visual Studio 2015](http://www.microsoft.com/en-us/download/details.aspx?id=48145) prior to running the game. For those on a 64-bit operating system, grab the x64 redistributable as well. Windows 7 is the minimum supported version. +* Windows users are expected to have installed the [Microsoft Visual C++ x86 Redistributable for Visual Studio 2015](http://www.microsoft.com/en-us/download/details.aspx?id=48145) prior to running the game. For those on a 64-bit operating system, grab the x64 redistributable as well. [DirectX End-User Runtimes (June 2010)](http://www.microsoft.com/en-us/download/details.aspx?id=8109) is also required. Windows 7 is the minimum supported version. * Mac OS X users need to have Mac OS X 10.6.8 or higher to run StepMania. * Linux users should receive all they need from the package manager of their choice. -##Installing from Source## +### From Source StepMania can be compiled using [CMake](http://www.cmake.org/). More information about using CMake can be found in both the `Build` directory and CMake's documentation. -##Build Status## +## Resources + +* Website: http://www.stepmania.com/ +* IRC: irc.freenode.net/#stepmania-devs +* Lua for SM5: https://dguzek.github.io/Lua-For-SM5/ +* Lua API Documentation can be found in the Docs folder. -We currently have two integration servers in place. Their statuses are listed below. +## Licensing Terms -* Travis (Linux): [![Build Status](https://travis-ci.org/stepmania/stepmania.svg?branch=master)](https://travis-ci.org/stepmania/stepmania) -* AppVeyor (Windows): [![Build status](https://ci.appveyor.com/api/projects/status/e932dk2o3anki27p?svg=true)](https://ci.appveyor.com/project/wolfman2000/stepmania-wm87c) +In short- you can do anything you like with the game (including sell products made with it), provided you *do not*: -##Resources## +1. Sell the game *with the included songs* +2. Claim to have created the engine yourself or remove the credits +3. Not provide source code for any build which differs from any official release which includes MP3 support. -* Website: http://www.stepmania.com/ -* IRC: irc.freenode.net/#stepmania-devs -* Theming Wiki: http://goo.gl/SO7W5 -* Lua Documentation for Themes: http://goo.gl/XNiov +(It's not required, but we would also appreciate it if you link back to http://www.stepmania.com/) -##Licensing Terms## +For specific information/legalese: * All of the our source code is under the [MIT license](http://opensource.org/licenses/MIT). * Any songs that are included within this repository are under the [CC-NC license](https://creativecommons.org/). diff -Nru stepmania-5.0.10+dfsg/src/Actor.cpp stepmania-5.0.11+dfsg/src/Actor.cpp --- stepmania-5.0.10+dfsg/src/Actor.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Actor.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -536,13 +536,13 @@ break; case bounce: { - float fPercentOffset = RageFastSin( fPercentThroughEffect*PI ); + float fPercentOffset = RageFastSin( fPercentThroughEffect*PI ); tempState.pos += m_vEffectMagnitude * fPercentOffset; } break; case bob: { - float fPercentOffset = RageFastSin( fPercentThroughEffect*PI*2 ); + float fPercentOffset = RageFastSin( fPercentThroughEffect*PI*2 ); tempState.pos += m_vEffectMagnitude * fPercentOffset; } break; @@ -550,7 +550,7 @@ { float fMinZoom = m_vEffectMagnitude[0]; float fMaxZoom = m_vEffectMagnitude[1]; - float fPercentOffset = RageFastSin( fPercentThroughEffect*PI ); + float fPercentOffset = RageFastSin( fPercentThroughEffect*PI ); float fZoom = SCALE( fPercentOffset, 0.f, 1.f, fMinZoom, fMaxZoom ); tempState.scale *= fZoom; @@ -723,8 +723,25 @@ } +void Actor::CalcPercentThroughTween() +{ + TweenState &TS = m_Tweens[0]->state; + TweenInfo &TI = m_Tweens[0]->info; + const float percent_through = 1-(TI.m_fTimeLeftInTween / TI.m_fTweenTime); + // distort the percentage if appropriate + float percent_along = TI.m_pTween->Tween(percent_through); + TweenState::MakeWeightedAverage(m_current, m_start, TS, percent_along); + UpdatePercentThroughTween(percent_along); +} + void Actor::UpdateTweening( float fDeltaTime ) { + if(fDeltaTime < 0.0 && !m_Tweens.empty()) + { + m_Tweens[0]->info.m_fTimeLeftInTween-= fDeltaTime; + CalcPercentThroughTween(); + return; + } while( !m_Tweens.empty() // something to do && fDeltaTime > 0 ) // something will change { @@ -757,12 +774,7 @@ } else // in the middle of tweening. Recalcute the current position. { - const float fPercentThroughTween = 1-(TI.m_fTimeLeftInTween / TI.m_fTweenTime); - - // distort the percentage if appropriate - float fPercentAlongPath = TI.m_pTween->Tween( fPercentThroughTween ); - TweenState::MakeWeightedAverage( m_current, m_start, TS, fPercentAlongPath ); - UpdatePercentThroughTween(fPercentAlongPath); + CalcPercentThroughTween(); } if( bBeginning ) @@ -884,6 +896,10 @@ default: break; } + if(m_tween_uses_effect_delta) + { + delta_time= m_fEffectDelta; + } this->UpdateTweening(delta_time); } @@ -1739,6 +1755,7 @@ static int effectclock( T* p, lua_State *L ) { p->SetEffectClockString(SArg(1)); COMMON_RETURN_SELF; } static int effectmagnitude( T* p, lua_State *L ) { p->SetEffectMagnitude( RageVector3(FArg(1),FArg(2),FArg(3)) ); COMMON_RETURN_SELF; } static int geteffectmagnitude( T* p, lua_State *L ) { RageVector3 v = p->GetEffectMagnitude(); lua_pushnumber(L, v[0]); lua_pushnumber(L, v[1]); lua_pushnumber(L, v[2]); return 3; } + GETTER_SETTER_BOOL_METHOD(tween_uses_effect_delta); static int scaletocover( T* p, lua_State *L ) { p->ScaleToCover( RectF(FArg(1), FArg(2), FArg(3), FArg(4)) ); COMMON_RETURN_SELF; } static int scaletofit( T* p, lua_State *L ) { p->ScaleToFitInside( RectF(FArg(1), FArg(2), FArg(3), FArg(4)) ); COMMON_RETURN_SELF; } static int animate( T* p, lua_State *L ) { p->EnableAnimation(BIArg(1)); COMMON_RETURN_SELF; } @@ -2023,6 +2040,7 @@ ADD_METHOD( effectclock ); ADD_METHOD( effectmagnitude ); ADD_METHOD( geteffectmagnitude ); + ADD_GET_SET_METHODS(tween_uses_effect_delta); ADD_METHOD( scaletocover ); ADD_METHOD( scaletofit ); ADD_METHOD( animate ); diff -Nru stepmania-5.0.10+dfsg/src/Actor.h stepmania-5.0.11+dfsg/src/Actor.h --- stepmania-5.0.10+dfsg/src/Actor.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Actor.h 2016-03-30 16:08:58.000000000 +0000 @@ -281,10 +281,13 @@ virtual void Update( float fDeltaTime ); // this can short circuit UpdateInternal virtual void UpdateInternal( float fDeltaTime ); // override this void UpdateTweening( float fDeltaTime ); + void CalcPercentThroughTween(); // These next functions should all be overridden by a derived class that has its own tweening states to handle. virtual void SetCurrentTweenStart() {} virtual void EraseHeadTween() {} virtual void UpdatePercentThroughTween( float PercentThroughTween ) {} + bool get_tween_uses_effect_delta() { return m_tween_uses_effect_delta; } + void set_tween_uses_effect_delta(bool t) { m_tween_uses_effect_delta= t; } /** * @brief Retrieve the Actor's name. @@ -700,6 +703,7 @@ // -Kyz float m_effect_period; EffectClock m_EffectClock; + bool m_tween_uses_effect_delta; /* This can be used in lieu of the fDeltaTime parameter to Update() to * follow the effect clock. Actor::Update must be called first. */ diff -Nru stepmania-5.0.10+dfsg/src/ActorMultiVertex.cpp stepmania-5.0.11+dfsg/src/ActorMultiVertex.cpp --- stepmania-5.0.10+dfsg/src/ActorMultiVertex.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ActorMultiVertex.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -326,6 +326,8 @@ DISPLAY->DrawSymmetricQuadStrip( &TS->vertices[FirstToDraw], NumToDraw ); break; } + default: + break; } DISPLAY->SetEffectMode( EffectMode_Normal ); @@ -387,6 +389,8 @@ case DrawMode_LineStrip: SetVertsFromSplinesInternal(1, 0); break; + default: + break; } } @@ -553,6 +557,8 @@ } } break; + default: + break; } } #undef STATE_ID diff -Nru stepmania-5.0.10+dfsg/src/arch/arch_default.h stepmania-5.0.11+dfsg/src/arch/arch_default.h --- stepmania-5.0.10+dfsg/src/arch/arch_default.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/arch_default.h 2016-03-30 16:08:58.000000000 +0000 @@ -9,7 +9,7 @@ #include "MemoryCard/MemoryCardDriverThreaded_Windows.h" #define DEFAULT_INPUT_DRIVER_LIST "DirectInput,Pump,Para" #define DEFAULT_MOVIE_DRIVER_LIST "FFMpeg,DShow,Null" -#define DEFAULT_SOUND_DRIVER_LIST "DirectSound-sw,WDMKS,WaveOut,Null" +#define DEFAULT_SOUND_DRIVER_LIST "WaveOut,DirectSound-sw,WDMKS,Null" #elif defined(MACOSX) diff -Nru stepmania-5.0.10+dfsg/src/arch/InputHandler/InputHandler_Linux_Event.cpp stepmania-5.0.11+dfsg/src/arch/InputHandler/InputHandler_Linux_Event.cpp --- stepmania-5.0.10+dfsg/src/arch/InputHandler/InputHandler_Linux_Event.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/InputHandler/InputHandler_Linux_Event.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -272,7 +272,7 @@ InputHandler_Linux_Event::InputHandler_Linux_Event() { - m_NextDevice = DEVICE_JOY1; + m_NextDevice = DEVICE_JOY10; m_bDevicesChanged = false; if(LINUXINPUT == NULL) LINUXINPUT = new LinuxInputManager; diff -Nru stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_Export.cpp stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_Export.cpp --- stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_Export.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_Export.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -1,7 +1,7 @@ #include "global.h" #include "LightsDriver_Export.h" -REGISTER_SOUND_DRIVER_CLASS(Export); +REGISTER_LIGHTS_DRIVER_CLASS(Export); RageMutex LightsDriver_Export::m_Lock( "LightsDriver_Export"); LightsState LightsDriver_Export::m_State; diff -Nru stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver.h stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver.h --- stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver.h 2016-03-30 16:08:58.000000000 +0000 @@ -18,9 +18,9 @@ virtual void Set( const LightsState *ls ) = 0; }; -#define REGISTER_SOUND_DRIVER_CLASS2( name, x ) \ +#define REGISTER_LIGHTS_DRIVER_CLASS2( name, x ) \ static RegisterRageDriver register_##x( &LightsDriver::m_pDriverList, #name, CreateClass ) -#define REGISTER_SOUND_DRIVER_CLASS( name ) REGISTER_SOUND_DRIVER_CLASS2( name, name ) +#define REGISTER_LIGHTS_DRIVER_CLASS( name ) REGISTER_LIGHTS_DRIVER_CLASS2( name, name ) #endif diff -Nru stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_LinuxMinimaid.cpp stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_LinuxMinimaid.cpp --- stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_LinuxMinimaid.cpp 1970-01-01 00:00:00.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_LinuxMinimaid.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -0,0 +1,100 @@ +// LightsDriver_LinuxMinimaid - driver for lights on the Minimaid with libmmmagic +/* To use, StepMania must be run with root permissions, or udev rule for the + * device must be made something like this (but it's not quite right): + * echo SUBSYSTEM==\"usb\", ATTR{idVendor}==\"beef\", ATTR{idProduct}==\"5730\", MODE=\"0666\" > /etc/udev/rules.d/50-minimaid + */ + +#include "global.h" +#include "LightsDriver_LinuxMinimaid.h" +#include "../../../extern/libmmmagic/mmmagic.h" + +REGISTER_LIGHTS_DRIVER_CLASS( LinuxMinimaid ); + +LightsDriver_LinuxMinimaid::LightsDriver_LinuxMinimaid() +{ + // libmmmagic is actually statically linked in, so there's no wrapper + // initializing to do. -Kyz + _mmmagic_loaded= true; + mm_connect_minimaid(); + mm_setKB(true); +} + +LightsDriver_LinuxMinimaid::~LightsDriver_LinuxMinimaid() +{ + // libmmmagic is actually statically linked in, so there's no wrapper + // destruction to do. -Kyz +} + +void LightsDriver_LinuxMinimaid::Set(LightsState const* ls) +{ + if(_mmmagic_loaded) + { + mm_setDDRAllOff(); + + // Set the cabinet light values + if(ls->m_bCabinetLights[LIGHT_MARQUEE_UP_LEFT]) + { + mm_setDDRCabinetLight(DDR_DOUBLE_MARQUEE_UPPER_LEFT, 1); + } + if(ls->m_bCabinetLights[LIGHT_MARQUEE_UP_RIGHT]) + { + mm_setDDRCabinetLight(DDR_DOUBLE_MARQUEE_UPPER_RIGHT, 1); + } + if(ls->m_bCabinetLights[LIGHT_MARQUEE_LR_LEFT]) + { + mm_setDDRCabinetLight(DDR_DOUBLE_MARQUEE_LOWER_LEFT, 1); + } + if(ls->m_bCabinetLights[LIGHT_MARQUEE_LR_RIGHT]) + { + mm_setDDRCabinetLight(DDR_DOUBLE_MARQUEE_LOWER_RIGHT, 1); + } + if(ls->m_bCabinetLights[LIGHT_BASS_LEFT] || ls->m_bCabinetLights[LIGHT_BASS_RIGHT]) + { + mm_setDDRBassLight(DDR_DOUBLE_BASS_LIGHTS, 1); + } + + if(ls->m_bGameButtonLights[GameController_1][DANCE_BUTTON_LEFT]) + { + mm_setDDRPad1Light(DDR_DOUBLE_PAD_LEFT, 1); + } + if(ls->m_bGameButtonLights[GameController_1][DANCE_BUTTON_RIGHT]) + { + mm_setDDRPad1Light(DDR_DOUBLE_PAD_RIGHT, 1); + } + if(ls->m_bGameButtonLights[GameController_1][DANCE_BUTTON_UP]) + { + mm_setDDRPad1Light(DDR_DOUBLE_PAD_UP, 1); + } + if(ls->m_bGameButtonLights[GameController_1][DANCE_BUTTON_DOWN]) + { + mm_setDDRPad1Light(DDR_DOUBLE_PAD_DOWN, 1); + } + if(ls->m_bGameButtonLights[GameController_1][GAME_BUTTON_START]) + { + mm_setDDRCabinetLight(DDR_DOUBLE_PLAYER1_PANEL, 1); + } + if(ls->m_bGameButtonLights[GameController_2][DANCE_BUTTON_LEFT]) + { + mm_setDDRPad2Light(DDR_DOUBLE_PAD_LEFT, 1); + } + if(ls->m_bGameButtonLights[GameController_2][DANCE_BUTTON_RIGHT]) + { + mm_setDDRPad2Light(DDR_DOUBLE_PAD_RIGHT, 1); + } + if(ls->m_bGameButtonLights[GameController_2][DANCE_BUTTON_UP]) + { + mm_setDDRPad2Light(DDR_DOUBLE_PAD_UP, 1); + } + if(ls->m_bGameButtonLights[GameController_2][DANCE_BUTTON_DOWN]) + { + mm_setDDRPad2Light(DDR_DOUBLE_PAD_DOWN, 1); + } + if(ls->m_bGameButtonLights[GameController_2][GAME_BUTTON_START]) + { + mm_setDDRCabinetLight(DDR_DOUBLE_PLAYER2_PANEL, 1); + } + + // Output the information + mm_sendDDRMiniMaidUpdate(); + } +} diff -Nru stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_LinuxMinimaid.h stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_LinuxMinimaid.h --- stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_LinuxMinimaid.h 1970-01-01 00:00:00.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_LinuxMinimaid.h 2016-03-30 16:08:58.000000000 +0000 @@ -0,0 +1,37 @@ +/* LightsDriver_LinuxMinimaid - Minimaid based lights with libmmmagic */ + +#ifndef LightsDriver_LinuxMinimaid_H +#define LightsDriver_LinuxMinimaid_H + +#include "LightsDriver.h" + +#define DDR_DOUBLE_BASS_LIGHTS 0 //unknown but guessed +#define DDR_DOUBLE_PLAYER1_PANEL 2 +#define DDR_DOUBLE_PLAYER2_PANEL 3 +#define DDR_DOUBLE_MARQUEE_LOWER_RIGHT 4 +#define DDR_DOUBLE_MARQUEE_UPPER_RIGHT 5 +#define DDR_DOUBLE_MARQUEE_LOWER_LEFT 6 +#define DDR_DOUBLE_MARQUEE_UPPER_LEFT 7 + +//PADX_LIGHTS +#define DDR_DOUBLE_PAD_UP 0 +#define DDR_DOUBLE_PAD_DOWN 1 +#define DDR_DOUBLE_PAD_LEFT 2 +#define DDR_DOUBLE_PAD_RIGHT 3 +#define DDR_DOUBLE_PAD_RESET 4 + +#define BIT(i) (1<<(i)) +#define BIT_IS_SET(v,i) ((v&BIT(i))!=0) + +static bool _mmmagic_loaded=false; + +class LightsDriver_LinuxMinimaid : public LightsDriver +{ +public: + LightsDriver_LinuxMinimaid(); + + virtual ~LightsDriver_LinuxMinimaid(); + virtual void Set( const LightsState *ls ); +}; + +#endif diff -Nru stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_LinuxParallel.cpp stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_LinuxParallel.cpp --- stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_LinuxParallel.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_LinuxParallel.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -13,7 +13,7 @@ static const int PORT_ADDRESS = 0x378; static const bool SCREEN_DEBUG = false; -REGISTER_SOUND_DRIVER_CLASS(LinuxParallel); +REGISTER_LIGHTS_DRIVER_CLASS(LinuxParallel); LightsDriver_LinuxParallel::LightsDriver_LinuxParallel() { diff -Nru stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_Linux_PIUIO.cpp stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_Linux_PIUIO.cpp --- stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_Linux_PIUIO.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_Linux_PIUIO.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -16,7 +16,7 @@ #include "Game.h" #include "RageLog.h" -REGISTER_SOUND_DRIVER_CLASS2(PIUIO, Linux_PIUIO); +REGISTER_LIGHTS_DRIVER_CLASS2(PIUIO, Linux_PIUIO); LightsDriver_Linux_PIUIO::LightsDriver_Linux_PIUIO() { diff -Nru stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_Linux_PIUIO_Leds.cpp stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_Linux_PIUIO_Leds.cpp --- stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_Linux_PIUIO_Leds.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_Linux_PIUIO_Leds.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -16,7 +16,7 @@ #include "Game.h" #include "RageLog.h" -REGISTER_SOUND_DRIVER_CLASS2(PIUIO_Leds, Linux_PIUIO_Leds); +REGISTER_LIGHTS_DRIVER_CLASS2(PIUIO_Leds, Linux_PIUIO_Leds); namespace { const char *cabinet_leds[NUM_CabinetLight] = { diff -Nru stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_LinuxWeedTech.cpp stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_LinuxWeedTech.cpp --- stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_LinuxWeedTech.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_LinuxWeedTech.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -15,7 +15,7 @@ #include "LightsDriver_LinuxWeedTech.h" #include "RageLog.h" -REGISTER_SOUND_DRIVER_CLASS(LinuxWeedTech); +REGISTER_LIGHTS_DRIVER_CLASS(LinuxWeedTech); // Begin serial driver static int fd = -1; diff -Nru stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_SextetStream.cpp stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_SextetStream.cpp --- stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_SextetStream.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_SextetStream.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -227,7 +227,7 @@ // LightsDriver_SextetStreamToFile implementation -REGISTER_SOUND_DRIVER_CLASS(SextetStreamToFile); +REGISTER_LIGHTS_DRIVER_CLASS(SextetStreamToFile); #if defined(_WINDOWS) #define DEFAULT_OUTPUT_FILENAME "\\\\.\\pipe\\StepMania-Lights-SextetStream" diff -Nru stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_SystemMessage.cpp stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_SystemMessage.cpp --- stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_SystemMessage.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_SystemMessage.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -4,7 +4,7 @@ #include "InputMapper.h" #include "PrefsManager.h" -REGISTER_SOUND_DRIVER_CLASS(SystemMessage); +REGISTER_LIGHTS_DRIVER_CLASS(SystemMessage); LightsDriver_SystemMessage::LightsDriver_SystemMessage() { diff -Nru stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_Win32Minimaid.cpp stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_Win32Minimaid.cpp --- stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_Win32Minimaid.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_Win32Minimaid.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -8,7 +8,7 @@ #include "LightsDriver_Win32Minimaid.h" #include "windows.h" -REGISTER_SOUND_DRIVER_CLASS( Win32Minimaid ); +REGISTER_LIGHTS_DRIVER_CLASS( Win32Minimaid ); HINSTANCE hMMMAGICDLL = NULL; diff -Nru stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_Win32Parallel.cpp stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_Win32Parallel.cpp --- stepmania-5.0.10+dfsg/src/arch/Lights/LightsDriver_Win32Parallel.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Lights/LightsDriver_Win32Parallel.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -3,7 +3,7 @@ #include "windows.h" #include "RageUtil.h" -REGISTER_SOUND_DRIVER_CLASS(Win32Parallel); +REGISTER_LIGHTS_DRIVER_CLASS(Win32Parallel); HINSTANCE hDLL = NULL; diff -Nru stepmania-5.0.10+dfsg/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp stepmania-5.0.11+dfsg/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp --- stepmania-5.0.10+dfsg/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -365,7 +365,7 @@ char* errbuf = new char[errbuf_size]; avcodec::av_strerror(err, errbuf, errbuf_size); RString Error = ssprintf("%i: %s", err, errbuf); - delete errbuf; + delete[] errbuf; return s + " (" + Error + ")"; } diff -Nru stepmania-5.0.10+dfsg/src/arch/Sound/RageSoundDriver.cpp stepmania-5.0.11+dfsg/src/arch/Sound/RageSoundDriver.cpp --- stepmania-5.0.10+dfsg/src/arch/Sound/RageSoundDriver.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Sound/RageSoundDriver.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -36,6 +36,11 @@ return NULL; } +RString RageSoundDriver::GetDefaultSoundDriverList() +{ + return DEFAULT_SOUND_DRIVER_LIST; +} + /* * (c) 2002-2006 Glenn Maynard, Steve Checkoway * All rights reserved. diff -Nru stepmania-5.0.10+dfsg/src/arch/Sound/RageSoundDriver.h stepmania-5.0.11+dfsg/src/arch/Sound/RageSoundDriver.h --- stepmania-5.0.10+dfsg/src/arch/Sound/RageSoundDriver.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/arch/Sound/RageSoundDriver.h 2016-03-30 16:08:58.000000000 +0000 @@ -18,6 +18,7 @@ /* Pass an empty string to get the default sound driver list. */ static RageSoundDriver *Create( const RString &sDrivers ); static DriverList m_pDriverList; + static RString GetDefaultSoundDriverList(); friend class RageSoundManager; diff -Nru stepmania-5.0.10+dfsg/src/archutils/Darwin/JoystickDevice.cpp stepmania-5.0.11+dfsg/src/archutils/Darwin/JoystickDevice.cpp --- stepmania-5.0.10+dfsg/src/archutils/Darwin/JoystickDevice.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/archutils/Darwin/JoystickDevice.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -6,13 +6,13 @@ using __gnu_cxx::hash_map; Joystick::Joystick() : id( InputDevice_Invalid ), - x_axis( 0 ), x_min( 0 ), x_max( 0 ), - y_axis( 0 ), y_min( 0 ), y_max( 0 ), - z_axis( 0 ), z_min( 0 ), z_max( 0 ), - x_rot( 0 ), rx_min( 0 ), rx_max( 0 ), - y_rot( 0 ), ry_min( 0 ), ry_max( 0 ), - z_rot( 0 ), rz_min( 0 ), rz_max( 0 ), - hat( 0 ), hat_min( 0 ), hat_max( 0 ) + x_axis( 0 ), y_axis( 0 ), z_axis( 0 ), + x_rot( 0 ), y_rot( 0 ), z_rot( 0 ), hat( 0 ), + x_min( 0 ), x_max( 0 ), y_min( 0 ), + y_max( 0 ), z_min( 0 ), z_max( 0 ), + rx_min( 0 ), rx_max( 0 ), ry_min( 0 ), + ry_max( 0 ), rz_min( 0 ), rz_max( 0 ), + hat_min( 0 ), hat_max( 0 ) { } diff -Nru stepmania-5.0.10+dfsg/src/archutils/Darwin/MouseDevice.cpp stepmania-5.0.11+dfsg/src/archutils/Darwin/MouseDevice.cpp --- stepmania-5.0.10+dfsg/src/archutils/Darwin/MouseDevice.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/archutils/Darwin/MouseDevice.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -4,9 +4,9 @@ using __gnu_cxx::hash_map; Mouse::Mouse() : id( InputDevice_Invalid ), - x_axis( 0 ), x_min( 0 ), x_max( 0 ), - y_axis( 0 ), y_min( 0 ), y_max( 0 ), - z_axis( 0 ), z_min( 0 ), z_max( 0 ) + x_axis( 0 ), y_axis( 0 ), z_axis( 0 ), + x_min( 0 ), x_max( 0 ), y_min( 0 ), + y_max( 0 ), z_min( 0 ), z_max( 0 ) { } diff -Nru stepmania-5.0.10+dfsg/src/archutils/Unix/X11Helper.cpp stepmania-5.0.11+dfsg/src/archutils/Unix/X11Helper.cpp --- stepmania-5.0.10+dfsg/src/archutils/Unix/X11Helper.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/archutils/Unix/X11Helper.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -5,6 +5,8 @@ #include "Preference.h" #include "PrefsManager.h" // XXX: only used for m_bShowMouseCursor -aj +#include + Display *X11Helper::Dpy = NULL; Window X11Helper::Win = None; @@ -13,6 +15,9 @@ static Preference g_XWMName( "XWMName", PRODUCT_ID ); +static bool display_supports_dpms_extension= false; +static bool dpms_state_at_startup= false; + bool X11Helper::OpenXConnection() { DEBUG_ASSERT( Dpy == NULL && Win == None ); @@ -22,11 +27,43 @@ XSetIOErrorHandler( FatalCallback ); XSetErrorHandler( ErrorCallback ); + int event_base, error_base; + display_supports_dpms_extension= DPMSQueryExtension(Dpy, &event_base, &error_base); + if(display_supports_dpms_extension) + { + LOG->Trace("DPMSQueryExtension returned true. Stepmania will disable power management, and restore the original state on exit."); + CARD16 power_level; + BOOL state; + if(DPMSInfo(Dpy, &power_level, &state)) + { + dpms_state_at_startup= state; + DPMSDisable(Dpy); + } + else + { + LOG->Trace("DPMSInfo returned false. Stepmania will not be able to disable power management."); + } + } + else + { + LOG->Trace("DPMSQueryExtension returned false, which means this display does not support the DPMS extension. Stepmania will not be able to disable power management."); + } return true; } void X11Helper::CloseXConnection() { + if(display_supports_dpms_extension) + { + if(dpms_state_at_startup) + { + DPMSEnable(Dpy); + } + else + { + DPMSDisable(Dpy); + } + } // The window should have been shut down DEBUG_ASSERT( Dpy != NULL ); DEBUG_ASSERT( Win == None ); diff -Nru stepmania-5.0.10+dfsg/src/archutils/Win32/GraphicsWindow.cpp stepmania-5.0.11+dfsg/src/archutils/Win32/GraphicsWindow.cpp --- stepmania-5.0.10+dfsg/src/archutils/Win32/GraphicsWindow.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/archutils/Win32/GraphicsWindow.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -519,10 +519,20 @@ int i=0; while(EnumDisplaySettings(NULL, i++, &dm)) { - if(ChangeDisplaySettings(&dm, CDS_TEST)==DISP_CHANGE_SUCCESSFUL) + // Windows 8 and later don't support less than 32bpp, so don't even test + // for them. GetDisplayResolutions is only for resolutions anyway. -Kyz + if(dm.dmBitsPerPel < 32) { - DisplayResolution res = { dm.dmPelsWidth, dm.dmPelsHeight }; - out.insert( res ); + continue; + } + DisplayResolution res = { dm.dmPelsWidth, dm.dmPelsHeight }; + std::set::iterator entry= out.find(res); + if(entry == out.end()) + { + if(ChangeDisplaySettings(&dm, CDS_TEST)==DISP_CHANGE_SUCCESSFUL) + { + out.insert(res); + } } } } diff -Nru stepmania-5.0.10+dfsg/src/ArrowEffects.cpp stepmania-5.0.11+dfsg/src/ArrowEffects.cpp --- stepmania-5.0.10+dfsg/src/ArrowEffects.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ArrowEffects.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -396,7 +396,7 @@ // TODO: Don't index by PlayerNumber. PerPlayerData &data = g_EffectData[pPlayerState->m_PlayerNumber]; - float fExpandMultiplier = SCALE( RageFastCos(data.m_fExpandSeconds*EXPAND_MULTIPLIER_FREQUENCY), + float fExpandMultiplier = SCALE( RageFastCos(data.m_fExpandSeconds*EXPAND_MULTIPLIER_FREQUENCY), EXPAND_MULTIPLIER_SCALE_FROM_LOW, EXPAND_MULTIPLIER_SCALE_FROM_HIGH, EXPAND_MULTIPLIER_SCALE_TO_LOW, EXPAND_MULTIPLIER_SCALE_TO_HIGH ); fScrollSpeed *= SCALE( fAccels[PlayerOptions::ACCEL_EXPAND], @@ -495,7 +495,7 @@ float fRads = acosf( fPositionBetween ); fRads += fYOffset * TORNADO_OFFSET_FREQUENCY / SCREEN_HEIGHT; - const float fAdjustedPixelOffset = SCALE( RageFastCos(fRads), TORNADO_OFFSET_SCALE_FROM_LOW, TORNADO_OFFSET_SCALE_FROM_HIGH, + const float fAdjustedPixelOffset = SCALE( RageFastCos(fRads), TORNADO_OFFSET_SCALE_FROM_LOW, TORNADO_OFFSET_SCALE_FROM_HIGH, data.m_fMinTornadoX[iColNum], data.m_fMaxTornadoX[iColNum] ); fPixelOffsetFromCenter += (fAdjustedPixelOffset - fRealPixelOffset) * fEffects[PlayerOptions::EFFECT_TORNADO]; diff -Nru stepmania-5.0.10+dfsg/src/Background.cpp stepmania-5.0.11+dfsg/src/Background.cpp --- stepmania-5.0.10+dfsg/src/Background.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Background.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -939,9 +939,14 @@ float fBaseBGBrightness = g_fBGBrightness; + // Revision: Themes that implement a training mode should handle the + // brightness for it. The engine should not force the brightness for + // anything. -Kyz + /* // HACK: Always show training in full brightness if( GAMESTATE->m_pCurSong && GAMESTATE->m_pCurSong->IsTutorial() ) fBaseBGBrightness = 1.0f; + */ fLeftBrightness *= fBaseBGBrightness; fRightBrightness *= fBaseBGBrightness; diff -Nru stepmania-5.0.10+dfsg/src/BannerCache.cpp stepmania-5.0.11+dfsg/src/BannerCache.cpp --- stepmania-5.0.10+dfsg/src/BannerCache.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/BannerCache.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -129,7 +129,7 @@ { /* The file doesn't exist. It's possible that the banner cache file is * missing, so try to create it. Don't do this first, for efficiency. */ - LOG->Trace( "Cached banner load of '%s' ('%s') failed, trying to cache ...", sBannerPath.c_str(), sCachePath.c_str() ); + //LOG->Trace( "Cached banner load of '%s' ('%s') failed, trying to cache ...", sBannerPath.c_str(), sCachePath.c_str() ); /* Skip the up-to-date check; it failed to load, so it can't be up * to date. */ @@ -138,7 +138,7 @@ } else { - LOG->Trace( "Cached banner load of '%s' ('%s') failed", sBannerPath.c_str(), sCachePath.c_str() ); + //LOG->Trace( "Cached banner load of '%s' ('%s') failed", sBannerPath.c_str(), sCachePath.c_str() ); return; } } @@ -272,7 +272,7 @@ if( sBannerPath == "" ) return ID; - LOG->Trace( "BannerCache::LoadCachedBanner(%s): %s", sBannerPath.c_str(), ID.filename.c_str() ); + //LOG->Trace( "BannerCache::LoadCachedBanner(%s): %s", sBannerPath.c_str(), ID.filename.c_str() ); /* Hack: make sure Banner::Load doesn't change our return value and end up * reloading. */ @@ -282,7 +282,10 @@ if( g_BannerPathToImage.find(sBannerPath) == g_BannerPathToImage.end() ) { /* Oops, the image is missing. Warn and continue. */ - LOG->Warn( "Banner cache for '%s' wasn't loaded", sBannerPath.c_str() ); + if(PREFSMAN->m_BannerCache != BNCACHE_OFF) + { + LOG->Warn( "Banner cache for '%s' wasn't loaded", sBannerPath.c_str() ); + } return ID; } @@ -305,8 +308,8 @@ if( TEXTUREMAN->IsTextureRegistered(ID) ) return ID; /* It's all set. */ - LOG->Trace( "Loading banner texture %s; src %ix%i; image %ix%i", - ID.filename.c_str(), iSourceWidth, iSourceHeight, pImage->w, pImage->h ); + //LOG->Trace( "Loading banner texture %s; src %ix%i; image %ix%i", + // ID.filename.c_str(), iSourceWidth, iSourceHeight, pImage->w, pImage->h ); RageTexture *pTexture = new BannerTexture( ID, pImage, iSourceWidth, iSourceHeight ); ID.Policy = RageTextureID::TEX_VOLATILE; diff -Nru stepmania-5.0.10+dfsg/src/CMakeData-arch.cmake stepmania-5.0.11+dfsg/src/CMakeData-arch.cmake --- stepmania-5.0.10+dfsg/src/CMakeData-arch.cmake 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/CMakeData-arch.cmake 2016-03-30 16:08:58.000000000 +0000 @@ -319,6 +319,14 @@ "arch/Lights/LightsDriver_LinuxParallel.h" ) endif() + if (WITH_MINIMAID) + list(APPEND SMDATA_ARCH_LIGHTS_SRC + "arch/Lights/LightsDriver_LinuxMinimaid.cpp" + ) + list(APPEND SMDATA_ARCH_LIGHTS_HPP + "arch/Lights/LightsDriver_LinuxMinimaid.h" + ) + endif() endif() endif(WIN32) endif(NOT APPLE) diff -Nru stepmania-5.0.10+dfsg/src/CMakeLists.txt stepmania-5.0.11+dfsg/src/CMakeLists.txt --- stepmania-5.0.10+dfsg/src/CMakeLists.txt 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/CMakeLists.txt 2016-03-30 16:08:58.000000000 +0000 @@ -295,7 +295,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") message("Host processor is 64bit") sm_add_compile_definition("${SM_EXE_NAME}" CPU_X86_64) - elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86" OR CMAKE_SYSTEM_PROCESSOR MATCHES "i686") message("Host processor is 32bit") sm_add_compile_definition("${SM_EXE_NAME}" CPU_X86) else() @@ -331,6 +331,7 @@ "glew" "jpeg" ) +include(../extern/CMakeProject-mmmagic.cmake) if (HAS_MP3) list(FIND SMDATA_LINK_LIB "jsoncpp" JSON_INDEX) diff -Nru stepmania-5.0.10+dfsg/src/CombinedLifeMeter.h stepmania-5.0.11+dfsg/src/CombinedLifeMeter.h --- stepmania-5.0.10+dfsg/src/CombinedLifeMeter.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/CombinedLifeMeter.h 2016-03-30 16:08:58.000000000 +0000 @@ -26,6 +26,8 @@ * @param hns the hold note score recently received. * @param tns the score from the initial TapNote. */ virtual void ChangeLife( PlayerNumber pn, HoldNoteScore hns, TapNoteScore tns ) = 0; + virtual void ChangeLife(PlayerNumber pn, float delta) = 0; + virtual void SetLife(PlayerNumber pn, float value) = 0; virtual void HandleTapScoreNone( PlayerNumber pn ) = 0; }; diff -Nru stepmania-5.0.10+dfsg/src/CombinedLifeMeterTug.cpp stepmania-5.0.11+dfsg/src/CombinedLifeMeterTug.cpp --- stepmania-5.0.10+dfsg/src/CombinedLifeMeterTug.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/CombinedLifeMeterTug.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -137,6 +137,21 @@ } } +void CombinedLifeMeterTug::SetLife(PlayerNumber pn, float value) +{ + switch(pn) + { + case PLAYER_1: + GAMESTATE->m_fTugLifePercentP1= value; + break; + case PLAYER_2: + GAMESTATE->m_fTugLifePercentP1= 1-value; + break; + default: + FAIL_M(ssprintf("Invalid player number: %i", pn)); + } +} + /* * (c) 2003-2004 Chris Danford * All rights reserved. diff -Nru stepmania-5.0.10+dfsg/src/CombinedLifeMeterTug.h stepmania-5.0.11+dfsg/src/CombinedLifeMeterTug.h --- stepmania-5.0.10+dfsg/src/CombinedLifeMeterTug.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/CombinedLifeMeterTug.h 2016-03-30 16:08:58.000000000 +0000 @@ -13,10 +13,11 @@ virtual void ChangeLife( PlayerNumber pn, TapNoteScore score ); virtual void ChangeLife( PlayerNumber pn, HoldNoteScore score, TapNoteScore tscore ); + virtual void ChangeLife( PlayerNumber pn, float fPercentToMove ); + virtual void SetLife(PlayerNumber pn, float value); virtual void HandleTapScoreNone( PlayerNumber pn ); protected: - void ChangeLife( PlayerNumber pn, float fPercentToMove ); MeterDisplay m_Stream[NUM_PLAYERS]; AutoActor m_sprSeparator; diff -Nru stepmania-5.0.10+dfsg/src/config.in.hpp stepmania-5.0.11+dfsg/src/config.in.hpp --- stepmania-5.0.10+dfsg/src/config.in.hpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/config.in.hpp 2016-03-30 16:08:58.000000000 +0000 @@ -135,6 +135,9 @@ /* Defined to 1 if building on a windows system, and thus uses the windows loading window. */ #cmakedefine NEED_WINDOWS_LOADING_WINDOW 1 +/* Defined to 1 if logging timing segment additions and removals. */ +#cmakedefine WITH_LOGGING_TIMING_DATA 1 + /* Defined to 1 if the PBS_MARQUEE symbol was found. */ #cmakedefine HAVE_PBS_MARQUEE 1 diff -Nru stepmania-5.0.10+dfsg/src/Course.cpp stepmania-5.0.11+dfsg/src/Course.cpp --- stepmania-5.0.10+dfsg/src/Course.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Course.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -445,15 +445,226 @@ // Set to true if CourseDifficulty is able to change something. bool bCourseDifficultyIsSignificant = (cd == Difficulty_Medium); - vector vpAllPossibleSongs; - vector vSongAndSteps; + // Resolve each entry to a Song and Steps. + if( trail.m_CourseType == COURSE_TYPE_ENDLESS ) + { + GetTrailUnsortedEndless(entries, trail, st, cd, rnd, bCourseDifficultyIsSignificant); + } + else + { + vector vSongAndSteps; + FOREACH_CONST( CourseEntry, entries, e ) + { + SongAndSteps resolved; // fill this in + SongCriteria soc = e->songCriteria; + + Song *pSong = e->songID.ToSong(); + if( pSong ) + { + soc.m_bUseSongAllowedList = true; + soc.m_vpSongAllowedList.push_back( pSong ); + } + soc.m_Tutorial = SongCriteria::Tutorial_No; + soc.m_Locked = SongCriteria::Locked_Unlocked; + if( !soc.m_bUseSongAllowedList ) + soc.m_iMaxStagesForSong = 1; + + StepsCriteria stc = e->stepsCriteria; + stc.m_st = st; + stc.m_Locked = StepsCriteria::Locked_Unlocked; + + const bool bSameSongCriteria = e != entries.begin() && ( e - 1 )->songCriteria == soc; + const bool bSameStepsCriteria = e != entries.begin() && ( e - 1 )->stepsCriteria == stc; + + if( pSong ) + { + StepsUtil::GetAllMatching( pSong, stc, vSongAndSteps ); + } + else if( vSongAndSteps.empty() || !( bSameSongCriteria && bSameStepsCriteria ) ) + { + vSongAndSteps.clear(); + StepsUtil::GetAllMatching( soc, stc, vSongAndSteps ); + } + + // It looks bad to have the same song 2x in a row in a randomly generated course. + // Don't allow the same song to be played 2x in a row, unless there's only + // one song in vpPossibleSongs. + if( trail.m_vEntries.size() > 0 && vSongAndSteps.size() > 1 ) + { + const TrailEntry &teLast = trail.m_vEntries.back(); + RemoveIf( vSongAndSteps, SongIsEqual( teLast.pSong ) ); + } + + // if there are no songs to choose from, abort this CourseEntry + if( vSongAndSteps.empty() ) + continue; + + vector vpSongs; + typedef vector StepsVector; + map mapSongToSteps; + FOREACH_CONST( SongAndSteps, vSongAndSteps, sas ) + { + StepsVector &v = mapSongToSteps[ sas->pSong ]; + + v.push_back( sas->pSteps ); + if( v.size() == 1 ) + vpSongs.push_back( sas->pSong ); + } + + CourseSortSongs( e->songSort, vpSongs, rnd ); + + ASSERT( e->iChooseIndex >= 0 ); + if( e->iChooseIndex < int( vSongAndSteps.size() ) ) + { + resolved.pSong = vpSongs[ e->iChooseIndex ]; + const vector &mappedSongs = mapSongToSteps[ resolved.pSong ]; + resolved.pSteps = mappedSongs[ RandomInt( mappedSongs.size() ) ]; + } + else + { + continue; + } + + /* If we're not COURSE_DIFFICULTY_REGULAR, then we should be choosing steps that are + * either easier or harder than the base difficulty. If no such steps exist, then + * just use the one we already have. */ + Difficulty dc = resolved.pSteps->GetDifficulty(); + int iLowMeter = e->stepsCriteria.m_iLowMeter; + int iHighMeter = e->stepsCriteria.m_iHighMeter; + if( cd != Difficulty_Medium && !e->bNoDifficult ) + { + Difficulty new_dc = ( Difficulty )( dc + cd - Difficulty_Medium ); + new_dc = clamp( new_dc, ( Difficulty )0, ( Difficulty )( Difficulty_Edit - 1 ) ); + /* + // re-edit this code to work using the metric. + Difficulty new_dc; + if( INCLUDE_BEGINNER_STEPS ) + { + // don't factor in the course difficulty if we're including + // beginner steps -aj + new_dc = clamp( dc, Difficulty_Beginner, (Difficulty)(Difficulty_Edit-1) ); + } + else + { + new_dc = (Difficulty)(dc + cd - Difficulty_Medium); + new_dc = clamp( new_dc, (Difficulty)0, (Difficulty)(Difficulty_Edit-1) ); + } + */ + + bool bChangedDifficulty = false; + if( new_dc != dc ) + { + Steps* pNewSteps = SongUtil::GetStepsByDifficulty( resolved.pSong, st, new_dc ); + if( pNewSteps ) + { + dc = new_dc; + resolved.pSteps = pNewSteps; + bChangedDifficulty = true; + bCourseDifficultyIsSignificant = true; + } + } + + /* Hack: We used to adjust low_meter/high_meter above while searching for + * songs. However, that results in a different song being chosen for + * difficult courses, which is bad when LockCourseDifficulties is disabled; + * each player can end up with a different song. Instead, choose based + * on the original range, bump the steps based on course difficulty, and + * then retroactively tweak the low_meter/high_meter so course displays + * line up. */ + if( e->stepsCriteria.m_difficulty == Difficulty_Invalid && bChangedDifficulty ) + { + /* Minimum and maximum to add to make the meter range contain the actual + * meter: */ + int iMinDist = resolved.pSteps->GetMeter() - iHighMeter; + int iMaxDist = resolved.pSteps->GetMeter() - iLowMeter; + + /* Clamp the possible adjustments to try to avoid going under 1 or over + * MAX_BOTTOM_RANGE. */ + iMinDist = min( max( iMinDist, -iLowMeter + 1 ), iMaxDist ); + iMaxDist = max( min( iMaxDist, MAX_BOTTOM_RANGE - iHighMeter ), iMinDist ); + + int iAdd; + if( iMaxDist == iMinDist ) + iAdd = iMaxDist; + else + iAdd = rnd( iMaxDist - iMinDist ) + iMinDist; + iLowMeter += iAdd; + iHighMeter += iAdd; + } + } + + TrailEntry te; + te.pSong = resolved.pSong; + te.pSteps = resolved.pSteps; + te.Modifiers = e->sModifiers; + te.Attacks = e->attacks; + te.bSecret = e->bSecret; + te.iLowMeter = iLowMeter; + te.iHighMeter = iHighMeter; + + /* If we chose based on meter (not difficulty), then store Difficulty_Invalid, so + * other classes can tell that we used meter. */ + if( e->stepsCriteria.m_difficulty == Difficulty_Invalid ) + { + te.dc = Difficulty_Invalid; + } + else + { + /* Otherwise, store the actual difficulty we got (post-course-difficulty). + * This may or may not be the same as e.difficulty. */ + te.dc = dc; + } + trail.m_vEntries.push_back( te ); + + // LOG->Trace( "Chose: %s, %d", te.pSong->GetSongDir().c_str(), te.pSteps->GetMeter() ); + + if( IsAnEdit() && MAX_SONGS_IN_EDIT_COURSE > 0 && + int( trail.m_vEntries.size() ) >= MAX_SONGS_IN_EDIT_COURSE ) + { + break; + } + } + } + + /* Hack: If any entry was non-FIXED, or m_bShuffle is set, then radar values + * for this trail will be meaningless as they'll change every time. Pre-cache + * empty data. XXX: How can we do this cleanly, without propagating lots of + * otherwise unnecessary data (course entry types, m_bShuffle) to Trail, or + * storing a Course pointer in Trail (yuck)? */ + if( !AllSongsAreFixed() || m_bShuffle ) + { + trail.m_bRadarValuesCached = true; + trail.m_CachedRadarValues = RadarValues(); + } + + /* If we have a manually-entered meter for this difficulty, use it. */ + if( m_iCustomMeter[cd] != -1 ) + trail.m_iSpecifiedMeter = m_iCustomMeter[cd]; + + /* If the course difficulty never actually changed anything, then this difficulty + * is equivalent to Difficulty_Medium; it doesn't exist. */ + return bCourseDifficultyIsSignificant && trail.m_vEntries.size() > 0; +} + +void Course::GetTrailUnsortedEndless( const vector &entries, Trail &trail, StepsType &st, + CourseDifficulty &cd, RandomGen &rnd, bool &bCourseDifficultyIsSignificant ) const +{ + vector vpAllPossibleSongs; + vector vSongAndSteps; + vector vpSongs; + typedef vector StepsVector; + map mapSongToSteps; + int songIndex = 0; + bool vpSongsSorted = false; FOREACH_CONST( CourseEntry, entries, e ) { + SongAndSteps resolved; // fill this in SongCriteria soc = e->songCriteria; + Song *pSong = e->songID.ToSong(); if( pSong ) { @@ -469,81 +680,79 @@ stc.m_st = st; stc.m_Locked = StepsCriteria::Locked_Unlocked; - const bool bSameSongCriteria = e != entries.begin() && (e-1)->songCriteria == soc; - const bool bSameStepsCriteria = e != entries.begin() && (e-1)->stepsCriteria == stc; + const bool bSameSongCriteria = e != entries.begin() && ( e - 1 )->songCriteria == soc; + const bool bSameStepsCriteria = e != entries.begin() && ( e - 1 )->stepsCriteria == stc; if( pSong ) { - StepsUtil::GetAllMatching( pSong, stc, vSongAndSteps ); + StepsUtil::GetAllMatchingEndless( pSong, stc, vSongAndSteps ); } - else if( vSongAndSteps.empty() || !(bSameSongCriteria && bSameStepsCriteria) ) + else if( vSongAndSteps.empty() || !( bSameSongCriteria && bSameStepsCriteria ) ) { vSongAndSteps.clear(); StepsUtil::GetAllMatching( soc, stc, vSongAndSteps ); } - // It looks bad to have the same song 2x in a row in a randomly generated course. - // Don't allow the same song to be played 2x in a row, unless there's only - // one song in vpPossibleSongs. - if( trail.m_vEntries.size() > 0 && vSongAndSteps.size() > 1 ) - { - const TrailEntry &teLast = trail.m_vEntries.back(); - RemoveIf( vSongAndSteps, SongIsEqual(teLast.pSong) ); - } - // if there are no songs to choose from, abort this CourseEntry if( vSongAndSteps.empty() ) continue; - vector vpSongs; - typedef vector StepsVector; - map mapSongToSteps; - FOREACH_CONST( SongAndSteps, vSongAndSteps, sas ) - { - StepsVector &v = mapSongToSteps[sas->pSong]; - - v.push_back( sas->pSteps ); - if( v.size() == 1 ) - vpSongs.push_back( sas->pSong ); + if( !vpSongsSorted && !vSongAndSteps.empty() ) { + FOREACH_CONST( SongAndSteps, vSongAndSteps, sas ) + { + StepsVector &v = mapSongToSteps[ sas->pSong ]; + v.push_back( sas->pSteps ); + if( v.size() == 1 ) + vpSongs.push_back( sas->pSong ); + } + vpSongsSorted = true; + CourseSortSongs( e->songSort, vpSongs, rnd ); + songIndex = 0; } - CourseSortSongs( e->songSort, vpSongs, rnd ); - ASSERT( e->iChooseIndex >= 0 ); - if( e->iChooseIndex < int(vSongAndSteps.size()) ) + if( e->iChooseIndex < int( vSongAndSteps.size() ) ) { - resolved.pSong = vpSongs[e->iChooseIndex]; - const vector &mappedSongs = mapSongToSteps[resolved.pSong]; - resolved.pSteps = mappedSongs[ RandomInt(mappedSongs.size()) ]; + if( songIndex >= vpSongs.size() ) { + songIndex = 0; + } + resolved.pSong = vpSongs[ songIndex ]; + const vector &mappedSongs = mapSongToSteps[ resolved.pSong ]; + songIndex++; + resolved.pSteps = mappedSongs[ RandomInt( mappedSongs.size() ) ]; } else { continue; } - /* If we're not COURSE_DIFFICULTY_REGULAR, then we should be choosing steps that are - * either easier or harder than the base difficulty. If no such steps exist, then - * just use the one we already have. */ + /* If we're not COURSE_DIFFICULTY_REGULAR, then we should be choosing steps that are + * either easier or harder than the base difficulty. If no such steps exist, then + * just use the one we already have. */ Difficulty dc = resolved.pSteps->GetDifficulty(); int iLowMeter = e->stepsCriteria.m_iLowMeter; int iHighMeter = e->stepsCriteria.m_iHighMeter; if( cd != Difficulty_Medium && !e->bNoDifficult ) { - Difficulty new_dc = (Difficulty)(dc + cd - Difficulty_Medium); - new_dc = clamp( new_dc, (Difficulty)0, (Difficulty)(Difficulty_Edit-1) ); + Difficulty new_dc = ( Difficulty )( dc + cd - Difficulty_Medium ); + if( dc != Difficulty_Medium ) + { + new_dc = cd; + } + new_dc = clamp( new_dc, ( Difficulty )0, ( Difficulty )( Difficulty_Edit - 1 ) ); /* // re-edit this code to work using the metric. Difficulty new_dc; if( INCLUDE_BEGINNER_STEPS ) { - // don't factor in the course difficulty if we're including - // beginner steps -aj - new_dc = clamp( dc, Difficulty_Beginner, (Difficulty)(Difficulty_Edit-1) ); + // don't factor in the course difficulty if we're including + // beginner steps -aj + new_dc = clamp( dc, Difficulty_Beginner, (Difficulty)(Difficulty_Edit-1) ); } else { - new_dc = (Difficulty)(dc + cd - Difficulty_Medium); - new_dc = clamp( new_dc, (Difficulty)0, (Difficulty)(Difficulty_Edit-1) ); + new_dc = (Difficulty)(dc + cd - Difficulty_Medium); + new_dc = clamp( new_dc, (Difficulty)0, (Difficulty)(Difficulty_Edit-1) ); } */ @@ -561,29 +770,29 @@ } /* Hack: We used to adjust low_meter/high_meter above while searching for - * songs. However, that results in a different song being chosen for - * difficult courses, which is bad when LockCourseDifficulties is disabled; - * each player can end up with a different song. Instead, choose based - * on the original range, bump the steps based on course difficulty, and - * then retroactively tweak the low_meter/high_meter so course displays - * line up. */ + * songs. However, that results in a different song being chosen for + * difficult courses, which is bad when LockCourseDifficulties is disabled; + * each player can end up with a different song. Instead, choose based + * on the original range, bump the steps based on course difficulty, and + * then retroactively tweak the low_meter/high_meter so course displays + * line up. */ if( e->stepsCriteria.m_difficulty == Difficulty_Invalid && bChangedDifficulty ) { /* Minimum and maximum to add to make the meter range contain the actual - * meter: */ + * meter: */ int iMinDist = resolved.pSteps->GetMeter() - iHighMeter; int iMaxDist = resolved.pSteps->GetMeter() - iLowMeter; /* Clamp the possible adjustments to try to avoid going under 1 or over - * MAX_BOTTOM_RANGE. */ - iMinDist = min( max( iMinDist, -iLowMeter+1 ), iMaxDist ); - iMaxDist = max( min( iMaxDist, MAX_BOTTOM_RANGE-iHighMeter ), iMinDist ); + * MAX_BOTTOM_RANGE. */ + iMinDist = min( max( iMinDist, -iLowMeter + 1 ), iMaxDist ); + iMaxDist = max( min( iMaxDist, MAX_BOTTOM_RANGE - iHighMeter ), iMinDist ); int iAdd; if( iMaxDist == iMinDist ) iAdd = iMaxDist; else - iAdd = rnd(iMaxDist-iMinDist) + iMinDist; + iAdd = rnd( iMaxDist - iMinDist ) + iMinDist; iLowMeter += iAdd; iHighMeter += iAdd; } @@ -599,7 +808,7 @@ te.iHighMeter = iHighMeter; /* If we chose based on meter (not difficulty), then store Difficulty_Invalid, so - * other classes can tell that we used meter. */ + * other classes can tell that we used meter. */ if( e->stepsCriteria.m_difficulty == Difficulty_Invalid ) { te.dc = Difficulty_Invalid; @@ -607,38 +816,24 @@ else { /* Otherwise, store the actual difficulty we got (post-course-difficulty). - * This may or may not be the same as e.difficulty. */ + * This may or may not be the same as e.difficulty. */ te.dc = dc; } - trail.m_vEntries.push_back( te ); + trail.m_vEntries.push_back( te ); + if( trail.m_vEntries.size() > 0 && te.dc != cd ) + { + trail.m_vEntries.reserve( trail.m_vEntries.size() - 1 ); + trail.m_vEntries.resize( trail.m_vEntries.size() - 1 ); + } // LOG->Trace( "Chose: %s, %d", te.pSong->GetSongDir().c_str(), te.pSteps->GetMeter() ); if( IsAnEdit() && MAX_SONGS_IN_EDIT_COURSE > 0 && - int(trail.m_vEntries.size()) >= MAX_SONGS_IN_EDIT_COURSE ) + int( trail.m_vEntries.size() ) >= MAX_SONGS_IN_EDIT_COURSE ) { break; } } - - /* Hack: If any entry was non-FIXED, or m_bShuffle is set, then radar values - * for this trail will be meaningless as they'll change every time. Pre-cache - * empty data. XXX: How can we do this cleanly, without propagating lots of - * otherwise unnecessary data (course entry types, m_bShuffle) to Trail, or - * storing a Course pointer in Trail (yuck)? */ - if( !AllSongsAreFixed() || m_bShuffle ) - { - trail.m_bRadarValuesCached = true; - trail.m_CachedRadarValues = RadarValues(); - } - - /* If we have a manually-entered meter for this difficulty, use it. */ - if( m_iCustomMeter[cd] != -1 ) - trail.m_iSpecifiedMeter = m_iCustomMeter[cd]; - - /* If the course difficulty never actually changed anything, then this difficulty - * is equivalent to Difficulty_Medium; it doesn't exist. */ - return bCourseDifficultyIsSignificant && trail.m_vEntries.size() > 0; } void Course::GetTrails( vector &AddTo, StepsType st ) const diff -Nru stepmania-5.0.10+dfsg/src/Course.h stepmania-5.0.11+dfsg/src/Course.h --- stepmania-5.0.10+dfsg/src/Course.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Course.h 2016-03-30 16:08:58.000000000 +0000 @@ -150,6 +150,8 @@ void CalculateRadarValues(); bool GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) const; + void GetTrailUnsortedEndless( const vector &entries, Trail &trail, StepsType &st, + CourseDifficulty &cd, RandomGen &rnd, bool &bCourseDifficultyIsSignificant ) const; bool GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) const; bool IsAnEdit() const { return m_LoadedFromProfile != ProfileSlot_Invalid; } diff -Nru stepmania-5.0.10+dfsg/src/CourseUtil.cpp stepmania-5.0.11+dfsg/src/CourseUtil.cpp --- stepmania-5.0.10+dfsg/src/CourseUtil.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/CourseUtil.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -552,20 +552,31 @@ Course *CourseID::ToCourse() const { - // HACK for backwards compatibility: - // Re-add the leading "/". 2005/05/21 file layer changes added a leading slash. - RString sPath2 = sPath; - if( sPath2.Left(1) != "/" ) - sPath2 = "/" + sPath2; - Course *pCourse = NULL; - if( m_Cache.Get(&pCourse) ) + if(m_Cache.Get(&pCourse)) + { return pCourse; - if( pCourse == NULL && !sPath2.empty() ) - pCourse = SONGMAN->GetCourseFromPath( sPath2 ); + } + if(!sPath.empty()) + { + // HACK for backwards compatibility: + // Re-add the leading "/". 2005/05/21 file layer changes added a leading slash. + RString slash_path = sPath; + if(slash_path.Left(1) != "/") + { + slash_path = "/" + slash_path; + } + + if(pCourse == NULL) + { + pCourse = SONGMAN->GetCourseFromPath(slash_path); + } + } if( pCourse == NULL && !sFullTitle.empty() ) + { pCourse = SONGMAN->GetCourseFromName( sFullTitle ); + } m_Cache.Set( pCourse ); return pCourse; diff -Nru stepmania-5.0.10+dfsg/src/CreateZip.cpp stepmania-5.0.11+dfsg/src/CreateZip.cpp --- stepmania-5.0.10+dfsg/src/CreateZip.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/CreateZip.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -103,7 +103,7 @@ #define ZR_ENDED 0x00050000 // the zip creation has already been closed #define ZR_MISSIZE 0x00060000 // the indicated input file size turned out mistaken #define ZR_PARTIALUNZ 0x00070000 // the file had already been partially unzipped -#define ZR_ZMODE 0x00080000 // tried to mix creating/opening a zip +#define ZR_ZMODE 0x00080000 // tried to mix creating/opening a zip // The following come from bugs within the zip library itself #define ZR_BUGMASK 0xFF000000 #define ZR_NOTINITED 0x01000000 // initialisation didn't work @@ -112,12 +112,12 @@ #define ZR_FLATE 0x05000000 // an internal error in the de/inflation code RString FormatZipMessageZ(ZRESULT code) - { + { const char *msg="unknown zip result code"; switch (code) { case ZR_OK: msg="Success"; break; - case ZR_NODUPH: msg="Culdn't duplicate handle"; break; + case ZR_NODUPH: msg="Couldn't duplicate handle"; break; case ZR_NOFILE: msg="Couldn't create/open file"; break; case ZR_NOALLOC: msg="Failed to allocate memory"; break; case ZR_WRITE: msg="Error writing to file"; break; @@ -541,7 +541,7 @@ class TZip -{ +{ public: TZip() : pfout(NULL),ooffset(0),oerr(false),writ(0),hasputcen(false),zfis(0),hfin(0) { @@ -600,8 +600,8 @@ ZRESULT TZip::Start(RageFile *f) -{ - if (pfout!=0 || writ!=0 || oerr!=ZR_OK || hasputcen) +{ + if (pfout!=0 || writ!=0 || oerr!=ZR_OK || hasputcen) return ZR_NOTINITED; // pfout = f; @@ -623,13 +623,13 @@ unsigned TZip::swrite(void *param,const char *buf, unsigned size) { // static - if (size==0) + if (size==0) return 0; TZip *zip=(TZip*)param; return zip->write(buf,size); } unsigned int TZip::write(const char *buf,unsigned int size) -{ +{ const char *srcbuf=buf; if (pfout != NULL) { @@ -641,8 +641,8 @@ } bool TZip::oseek(unsigned int pos) -{ - oerr=ZR_SEEK; +{ + oerr=ZR_SEEK; return false; } @@ -650,9 +650,9 @@ { // if the directory hadn't already been added through a call to GetMemory, // then we do it now - ZRESULT res=ZR_OK; - if (!hasputcen) - res=AddCentral(); + ZRESULT res=ZR_OK; + if (!hasputcen) + res=AddCentral(); hasputcen=true; pfout->Close(); return res; @@ -672,9 +672,9 @@ #define ZIP_ATTR_EXECUTABLE 0x00400000 ZRESULT TZip::open_file(const TCHAR *fn) -{ +{ hfin=0; bufin=0; crc=CRCVAL_INITIAL; isize=0; csize=0; ired=0; - if (fn==0) + if (fn==0) return ZR_ARGS; hfin = new RageFile(); if( !hfin->Open(fn) ) @@ -688,7 +688,7 @@ } ZRESULT TZip::open_dir() -{ +{ hfin=0; bufin=0; crc=CRCVAL_INITIAL; isize=0; csize=0; ired=0; attr= ZIP_ATTR_DIRECTORY2 | ZIP_ATTR_READABLE | ZIP_ATTR_WRITEABLE | ZIP_ATTR_DIRECTORY; isize = 0; @@ -697,7 +697,7 @@ void filetime2dosdatetime(const tm st, unsigned short *dosdate,unsigned short *dostime) -{ +{ // date: bits 0-4 are day of month 1-31. Bits 5-8 are month 1..12. Bits 9-15 are year-1980 // time: bits 0-4 are seconds/2, bits 5-10 are minute 0..59. Bits 11-15 are hour 0..23 *dosdate = (unsigned short)(((st.tm_year+1900-1980)&0x7f) << 9); @@ -715,7 +715,7 @@ time ( &rawtime ); ptm = localtime ( &rawtime ); - unsigned short dosdate,dostime; + unsigned short dosdate,dostime; filetime2dosdatetime(*ptm,&dosdate,&dostime); times.atime = time(NULL); times.mtime = times.atime; @@ -725,12 +725,12 @@ } unsigned TZip::read(char *buf, unsigned size) -{ +{ if (bufin!=0) - { + { if (posin>=lenin) return 0; // end of input ulg red = lenin-posin; - if (red>size) + if (red>size) red=size; memcpy(buf, bufin+posin, red); posin += red; @@ -739,7 +739,7 @@ return red; } else if (hfin!=0) - { + { int red = hfin->Read(buf,size); if (red <= 0) return 0; @@ -749,34 +749,34 @@ } else { - oerr=ZR_NOTINITED; + oerr=ZR_NOTINITED; return 0; } } ZRESULT TZip::iclose() -{ +{ if (hfin!=0) - SAFE_DELETE( hfin); + SAFE_DELETE( hfin); bool mismatch = (isize!=-1 && isize!=ired); isize=ired; // and crc has been being updated anyway - if (mismatch) + if (mismatch) return ZR_MISSIZE; - else + else return ZR_OK; } ZRESULT TZip::istore() -{ +{ ulg size=0; for (;;) { - unsigned int cin=read(buf,16384); - if (cin<=0 || cin==(unsigned int)EOF) + unsigned int cin=read(buf,16384); + if (cin<=0 || cin==(unsigned int)EOF) break; - unsigned int cout = write(buf,cin); - if (cout!=cin) + unsigned int cout = write(buf,cin); + if (cout!=cin) return ZR_MISSIZE; size += cin; } @@ -798,13 +798,13 @@ // zip has its own notion of what its names should look like: i.e. dir/file.stuff TCHAR dstzn[MAX_PATH]; _tcscpy(dstzn,odstzn); - if (*dstzn==0) + if (*dstzn==0) return ZR_ARGS; - TCHAR *d=dstzn; + TCHAR *d=dstzn; while (*d!=0) { - if (*d=='\\') - *d='/'; + if (*d=='\\') + *d='/'; d++; } bool isdir = (flags==ZIP_FOLDER); @@ -813,13 +813,13 @@ // now open whatever was our input source: ZRESULT openres; - if (flags==ZIP_FILENAME) + if (flags==ZIP_FILENAME) openres=open_file(src); - else if (flags==ZIP_FOLDER) + else if (flags==ZIP_FOLDER) openres=open_dir(); - else + else return ZR_ARGS; - if (openres!=ZR_OK) + if (openres!=ZR_OK) return openres; // A zip "entry" consists of a local header (which includes the file name), @@ -836,7 +836,7 @@ zfi.nam=strlen(zfi.iname); if (needs_trailing_slash) { - strcat(zfi.iname,"/"); + strcat(zfi.iname,"/"); zfi.nam++; } strcpy(zfi.zname,""); @@ -887,9 +887,9 @@ // (1) Start by writing the local header: int r = putlocal(&zfi,swrite,this); - if (r!=ZE_OK) + if (r!=ZE_OK) { - iclose(); + iclose(); return ZR_WRITE; } writ += 4 + LOCHEAD + (unsigned int)zfi.nam + (unsigned int)zfi.ext; @@ -901,15 +901,15 @@ //(2) Write stored file to zip file ZRESULT writeres=ZR_OK; - if (!isdir && method==STORE) + if (!isdir && method==STORE) writeres=istore(); - else if (isdir) + else if (isdir) csize=0; else FAIL_M("deflate removed"); iclose(); writ += csize; - if (oerr!=ZR_OK) + if (oerr!=ZR_OK) return oerr; if (writeres!=ZR_OK) return ZR_WRITE; @@ -920,11 +920,11 @@ zfi.siz = csize; zfi.len = isize; // (4) ... or put an updated header at the end - if (zfi.how != (ush) method) + if (zfi.how != (ush) method) return ZR_NOCHANGE; - if (method==STORE && !first_header_has_size_right) + if (method==STORE && !first_header_has_size_right) return ZR_NOCHANGE; - if ((r = putextended(&zfi, swrite,this)) != ZE_OK) + if ((r = putextended(&zfi, swrite,this)) != ZE_OK) return ZR_WRITE; writ += 16L; zfi.flg = zfi.lflg; // if flg modified by inflate, for the central index @@ -935,13 +935,13 @@ // Keep a copy of the zipfileinfo, for our end-of-zip directory char *cextra = new char[zfi.cext]; memcpy(cextra,zfi.cextra,zfi.cext); zfi.cextra=cextra; TZipFileInfo *pzfi = new TZipFileInfo; memcpy(pzfi,&zfi,sizeof(zfi)); - if (zfis==NULL) + if (zfis==NULL) zfis=pzfi; - else + else { - TZipFileInfo *z=zfis; - while (z->nxt!=NULL) - z=z->nxt; + TZipFileInfo *z=zfis; + while (z->nxt!=NULL) + z=z->nxt; z->nxt=pzfi; } return ZR_OK; @@ -959,7 +959,7 @@ if (okay) { int res = putcentral(zfi, swrite,this); - if (res!=ZE_OK) + if (res!=ZE_OK) okay=false; } writ += 4 + CENHEAD + (unsigned int)zfi->nam + (unsigned int)zfi->cext + (unsigned int)zfi->com; @@ -974,13 +974,13 @@ } ulg center_size = writ - pos_at_start_of_central; if (okay) - { + { int res = putend(numentries, center_size, pos_at_start_of_central+ooffset, 0, NULL, swrite,this); if (res!=ZE_OK) okay=false; writ += 4 + ENDHEAD + 0; } - if (!okay) + if (!okay) return ZR_WRITE; return ZR_OK; } @@ -1020,7 +1020,7 @@ return lasterrorZ == ZR_OK; } bool CreateZip::Finish() -{ +{ lasterrorZ = hz->Close(); return lasterrorZ == ZR_OK; } diff -Nru stepmania-5.0.10+dfsg/src/CubicSpline.cpp stepmania-5.0.11+dfsg/src/CubicSpline.cpp --- stepmania-5.0.10+dfsg/src/CubicSpline.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/CubicSpline.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -413,8 +413,8 @@ if(loop) { float max_t= static_cast(m_points.size()); - while(t >= max_t) { t-= max_t; } - while(t < 0.0f) { t+= max_t; } + t= std::fmod(t, max_t); + if(t < 0.0f) { t+= max_t; } p= static_cast(t); tfrac= t - static_cast(p); } diff -Nru stepmania-5.0.10+dfsg/src/Font.cpp stepmania-5.0.11+dfsg/src/Font.cpp --- stepmania-5.0.10+dfsg/src/Font.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Font.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -610,7 +610,7 @@ { LuaHelpers::ReportScriptErrorFmt( "The font definition \"%s\" tries to assign line %i, " - "but the font is only %i characters high." + "but the font is only %i characters high. " "Line numbers start at 0.", ini.GetPath().c_str(), first_frame, num_frames_high); continue; diff -Nru stepmania-5.0.10+dfsg/src/GameConstantsAndTypes.h stepmania-5.0.11+dfsg/src/GameConstantsAndTypes.h --- stepmania-5.0.10+dfsg/src/GameConstantsAndTypes.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/GameConstantsAndTypes.h 2016-03-30 16:08:58.000000000 +0000 @@ -321,9 +321,7 @@ enum GameButtonType { GameButtonType_Step, - GameButtonType_Fret, - GameButtonType_Strum, - GameButtonType_INVALID + GameButtonType_Menu }; /** @brief The list of judge types for the tap note scores. */ diff -Nru stepmania-5.0.10+dfsg/src/Game.cpp stepmania-5.0.11+dfsg/src/Game.cpp --- stepmania-5.0.10+dfsg/src/Game.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Game.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -17,17 +17,17 @@ static const Game::PerButtonInfo g_CommonButtonInfo[] = { - { GameButtonType_INVALID }, // GAME_BUTTON_MENULEFT - { GameButtonType_INVALID }, // GAME_BUTTON_MENURIGHT - { GameButtonType_INVALID }, // GAME_BUTTON_MENUUP - { GameButtonType_INVALID }, // GAME_BUTTON_MENUDOWN - { GameButtonType_INVALID }, // GAME_BUTTON_START - { GameButtonType_INVALID }, // GAME_BUTTON_SELECT - { GameButtonType_INVALID }, // GAME_BUTTON_BACK - { GameButtonType_INVALID }, // GAME_BUTTON_COIN - { GameButtonType_INVALID }, // GAME_BUTTON_OPERATOR - { GameButtonType_INVALID }, // GAME_BUTTON_EFFECT_UP - { GameButtonType_INVALID }, // GAME_BUTTON_EFFECT_DOWN + { GameButtonType_Menu }, // GAME_BUTTON_MENULEFT + { GameButtonType_Menu }, // GAME_BUTTON_MENURIGHT + { GameButtonType_Menu }, // GAME_BUTTON_MENUUP + { GameButtonType_Menu }, // GAME_BUTTON_MENUDOWN + { GameButtonType_Menu }, // GAME_BUTTON_START + { GameButtonType_Menu }, // GAME_BUTTON_SELECT + { GameButtonType_Menu }, // GAME_BUTTON_BACK + { GameButtonType_Menu }, // GAME_BUTTON_COIN + { GameButtonType_Menu }, // GAME_BUTTON_OPERATOR + { GameButtonType_Menu }, // GAME_BUTTON_EFFECT_UP + { GameButtonType_Menu }, // GAME_BUTTON_EFFECT_DOWN }; const Game::PerButtonInfo *Game::GetPerButtonInfo( GameButton gb ) const diff -Nru stepmania-5.0.10+dfsg/src/GameLoop.cpp stepmania-5.0.11+dfsg/src/GameLoop.cpp --- stepmania-5.0.10+dfsg/src/GameLoop.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/GameLoop.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -169,6 +169,10 @@ new_screen= after_screen; } } + if(!SCREENMAN->IsScreenNameValid(new_screen)) + { + new_screen= "ScreenInitialScreenIsInvalid"; + } SCREENMAN->SetNewScreen(new_screen); g_NewTheme = RString(); diff -Nru stepmania-5.0.10+dfsg/src/GameManager.cpp stepmania-5.0.11+dfsg/src/GameManager.cpp --- stepmania-5.0.10+dfsg/src/GameManager.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/GameManager.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -2714,11 +2714,11 @@ { GameButtonType_Step }, { GameButtonType_Step }, }, - TNS_W2, // m_mapW1To - TNS_W2, // m_mapW2To - TNS_W3, // m_mapW3To - TNS_W3, // m_mapW4To - TNS_Miss, // m_mapW5To + TNS_W1, // m_mapW1To + TNS_W2, // m_mapW2To + TNS_W3, // m_mapW3To + TNS_W4, // m_mapW4To + TNS_W5, // m_mapW5To }; /** Lights *******************************************************************/ diff -Nru stepmania-5.0.10+dfsg/src/GameSoundManager.cpp stepmania-5.0.11+dfsg/src/GameSoundManager.cpp --- stepmania-5.0.10+dfsg/src/GameSoundManager.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/GameSoundManager.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -18,6 +18,8 @@ #include "SongUtil.h" #include "LuaManager.h" +#include "arch/Sound/RageSoundDriver.h" + GameSoundManager *SOUND = NULL; /* @@ -869,7 +871,22 @@ } }; -LUA_REGISTER_CLASS( GameSoundManager ) +LUA_REGISTER_CLASS(GameSoundManager); + +int LuaFunc_get_sound_driver_list(lua_State* L); +int LuaFunc_get_sound_driver_list(lua_State* L) +{ + vector driver_names; + split(RageSoundDriver::GetDefaultSoundDriverList(), ",", driver_names, true); + lua_createtable(L, driver_names.size(), 0); + for(size_t n= 0; n < driver_names.size(); ++n) + { + lua_pushstring(L, driver_names[n].c_str()); + lua_rawseti(L, -2, n+1); + } + return 1; +} +LUAFUNC_REGISTER_COMMON(get_sound_driver_list); /* diff -Nru stepmania-5.0.10+dfsg/src/GameState.cpp stepmania-5.0.11+dfsg/src/GameState.cpp --- stepmania-5.0.10+dfsg/src/GameState.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/GameState.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -1188,7 +1188,6 @@ FOREACH_PlayerNumber( p ) { - m_pPlayerState[p]->ClearHopoState(); m_pPlayerState[p]->m_Position.Reset(); } } diff -Nru stepmania-5.0.10+dfsg/src/InputMapper.cpp stepmania-5.0.11+dfsg/src/InputMapper.cpp --- stepmania-5.0.10+dfsg/src/InputMapper.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/InputMapper.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -898,6 +898,10 @@ bool InputMapper::IsBeingPressed( const GameInput &GameI, MultiPlayer mp, const DeviceInputList *pButtonState ) const { + if(GameI.button == GameButton_Invalid) + { + return false; + } for( int i=0; i GameI; MenuToGame( MenuI, pn, GameI ); for( size_t i=0; i GameI; MenuToGame( MenuI, pn, GameI ); for( size_t i=0; i GameI; @@ -986,6 +1010,10 @@ void InputMapper::ResetKeyRepeat( const GameInput &GameI ) { + if(GameI.button == GameButton_Invalid) + { + return; + } for( int i=0; i GameI; MenuToGame( MenuI, pn, GameI ); for( size_t i=0; i GameI; MenuToGame( MenuI, pn, GameI ); diff -Nru stepmania-5.0.10+dfsg/src/irc/appveyor.cpp stepmania-5.0.11+dfsg/src/irc/appveyor.cpp --- stepmania-5.0.10+dfsg/src/irc/appveyor.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/irc/appveyor.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -10,7 +10,7 @@ char const *owner = "wolfman2000"; char const *nick = "appveyor-sm5"; char const *server = "irc.freenode.net"; -char const *channel = "#stepmania-devs"; +char const *channel = "#stepmania"; bool startsWithPing(char const *buffer) { diff -Nru stepmania-5.0.10+dfsg/src/LifeMeterBar.cpp stepmania-5.0.11+dfsg/src/LifeMeterBar.cpp --- stepmania-5.0.10+dfsg/src/LifeMeterBar.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/LifeMeterBar.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -249,6 +249,13 @@ AfterLifeChanged(); } +void LifeMeterBar::SetLife(float value) +{ + m_fLifePercentage= value; + CLAMP( m_fLifePercentage, 0, LIFE_MULTIPLIER ); + AfterLifeChanged(); +} + extern ThemeMetric PENALIZE_TAP_SCORE_NONE; void LifeMeterBar::HandleTapScoreNone() { diff -Nru stepmania-5.0.10+dfsg/src/LifeMeterBar.h stepmania-5.0.11+dfsg/src/LifeMeterBar.h --- stepmania-5.0.10+dfsg/src/LifeMeterBar.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/LifeMeterBar.h 2016-03-30 16:08:58.000000000 +0000 @@ -22,6 +22,7 @@ virtual void ChangeLife( TapNoteScore score ); virtual void ChangeLife( HoldNoteScore score, TapNoteScore tscore ); virtual void ChangeLife( float fDeltaLifePercent ); + virtual void SetLife(float value); virtual void HandleTapScoreNone(); virtual void AfterLifeChanged(); virtual bool IsInDanger() const; diff -Nru stepmania-5.0.10+dfsg/src/LifeMeterBattery.cpp stepmania-5.0.11+dfsg/src/LifeMeterBattery.cpp --- stepmania-5.0.10+dfsg/src/LifeMeterBattery.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/LifeMeterBattery.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -169,13 +169,7 @@ bSubtract = true; } } - - Message msg( "LifeChanged" ); - msg.SetParam( "Player", m_pPlayerState->m_PlayerNumber ); - msg.SetParam( "LifeMeter", LuaReference::CreateFromPush(*this) ); - msg.SetParam( "LivesLeft", GetLivesLeft() ); - msg.SetParam( "LostLife", bSubtract ); - MESSAGEMAN->Broadcast( msg ); + BroadcastLifeChanged(bSubtract); } void LifeMeterBattery::ChangeLife( HoldNoteScore score, TapNoteScore tscore ) @@ -191,13 +185,25 @@ SubtractLives(LET_GO_SUBTRACT_LIVES); bSubtract = true; } + BroadcastLifeChanged(bSubtract); +} + +void LifeMeterBattery::SetLife(float value) +{ + int new_lives= static_cast(value); + bool lost= (new_lives < m_iLivesLeft); + m_iLivesLeft= new_lives; + BroadcastLifeChanged(lost); +} - Message msg( "LifeChanged" ); - msg.SetParam( "Player", m_pPlayerState->m_PlayerNumber ); - msg.SetParam( "LifeMeter", LuaReference::CreateFromPush(*this) ); - msg.SetParam( "LivesLeft", GetLivesLeft() ); - msg.SetParam( "LostLife", bSubtract ); - MESSAGEMAN->Broadcast( msg ); +void LifeMeterBattery::BroadcastLifeChanged(bool lost_life) +{ + Message msg("LifeChanged"); + msg.SetParam("Player", m_pPlayerState->m_PlayerNumber); + msg.SetParam("LifeMeter", LuaReference::CreateFromPush(*this)); + msg.SetParam("LivesLeft", GetLivesLeft()); + msg.SetParam("LostLife", lost_life); + MESSAGEMAN->Broadcast(msg); } void LifeMeterBattery::HandleTapScoreNone() diff -Nru stepmania-5.0.10+dfsg/src/LifeMeterBattery.h stepmania-5.0.11+dfsg/src/LifeMeterBattery.h --- stepmania-5.0.10+dfsg/src/LifeMeterBattery.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/LifeMeterBattery.h 2016-03-30 16:08:58.000000000 +0000 @@ -23,6 +23,7 @@ virtual void ChangeLife( TapNoteScore score ); virtual void ChangeLife( HoldNoteScore score, TapNoteScore tscore ); virtual void ChangeLife( float fDeltaLifePercent ); + virtual void SetLife(float value); virtual void HandleTapScoreNone(); virtual bool IsInDanger() const; virtual bool IsHot() const; @@ -30,6 +31,8 @@ virtual float GetLife() const; virtual int GetRemainingLives() const; + virtual void BroadcastLifeChanged(bool lost_life); + void Refresh(); int GetLivesLeft() { return m_iLivesLeft; } int GetTotalLives(); diff -Nru stepmania-5.0.10+dfsg/src/LifeMeter.h stepmania-5.0.11+dfsg/src/LifeMeter.h --- stepmania-5.0.10+dfsg/src/LifeMeter.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/LifeMeter.h 2016-03-30 16:08:58.000000000 +0000 @@ -34,6 +34,8 @@ * @param hns the hold note grade in question. * @param tns the score received for the initial tap note. */ virtual void ChangeLife( HoldNoteScore hns, TapNoteScore tns ) = 0; + virtual void ChangeLife(float delta) = 0; + virtual void SetLife(float value) = 0; virtual void HandleTapScoreNone() = 0; virtual bool IsInDanger() const = 0; virtual bool IsHot() const = 0; diff -Nru stepmania-5.0.10+dfsg/src/LifeMeterTime.cpp stepmania-5.0.11+dfsg/src/LifeMeterTime.cpp --- stepmania-5.0.10+dfsg/src/LifeMeterTime.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/LifeMeterTime.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -178,6 +178,20 @@ SendLifeChangedMessage( fOldLife, tns, hns ); } +void LifeMeterTime::ChangeLife(float delta) +{ + float old_life= m_fLifeTotalLostSeconds; + m_fLifeTotalLostSeconds-= delta; + SendLifeChangedMessage(old_life, TapNoteScore_Invalid, HoldNoteScore_Invalid); +} + +void LifeMeterTime::SetLife(float value) +{ + float old_life= m_fLifeTotalLostSeconds; + m_fLifeTotalLostSeconds= value; + SendLifeChangedMessage(old_life, TapNoteScore_Invalid, HoldNoteScore_Invalid); +} + void LifeMeterTime::HandleTapScoreNone() { // do nothing. diff -Nru stepmania-5.0.10+dfsg/src/LifeMeterTime.h stepmania-5.0.11+dfsg/src/LifeMeterTime.h --- stepmania-5.0.10+dfsg/src/LifeMeterTime.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/LifeMeterTime.h 2016-03-30 16:08:58.000000000 +0000 @@ -25,6 +25,8 @@ virtual void OnLoadSong(); virtual void ChangeLife( TapNoteScore score ); virtual void ChangeLife( HoldNoteScore score, TapNoteScore tscore ); + virtual void ChangeLife(float delta); + virtual void SetLife(float value); virtual void HandleTapScoreNone(); virtual bool IsInDanger() const; virtual bool IsHot() const; diff -Nru stepmania-5.0.10+dfsg/src/LocalizedString.cpp stepmania-5.0.11+dfsg/src/LocalizedString.cpp --- stepmania-5.0.10+dfsg/src/LocalizedString.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/LocalizedString.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -45,6 +45,17 @@ CreateImpl(); } +LocalizedString::LocalizedString(LocalizedString const& other) +{ + m_Subscribers.Subscribe(this); + + m_sGroup = other.m_sGroup; + m_sName = other.m_sName; + m_pImpl = NULL; + + CreateImpl(); +} + LocalizedString::~LocalizedString() { m_Subscribers.Unsubscribe( this ); diff -Nru stepmania-5.0.10+dfsg/src/LocalizedString.h stepmania-5.0.11+dfsg/src/LocalizedString.h --- stepmania-5.0.10+dfsg/src/LocalizedString.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/LocalizedString.h 2016-03-30 16:08:58.000000000 +0000 @@ -13,6 +13,7 @@ { public: LocalizedString( const RString& sGroup = "", const RString& sName = "" ); + LocalizedString(LocalizedString const& other); ~LocalizedString(); void Load( const RString& sGroup, const RString& sName ); operator const RString &() const { return GetValue(); } diff -Nru stepmania-5.0.10+dfsg/src/NoteData.cpp stepmania-5.0.11+dfsg/src/NoteData.cpp --- stepmania-5.0.10+dfsg/src/NoteData.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NoteData.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -422,7 +422,7 @@ for( int t=0; t < GetNumTracks(); t++ ) { int iRow = -1; - if( !GetNextTapNoteRowForTrack( t, iRow ) ) + if( !GetNextTapNoteRowForTrack( t, iRow, true ) ) continue; if( iEarliestRowFoundSoFar == -1 ) @@ -972,7 +972,7 @@ return viTracks.size(); } -bool NoteData::GetNextTapNoteRowForTrack( int track, int &rowInOut ) const +bool NoteData::GetNextTapNoteRowForTrack( int track, int &rowInOut, bool ignoreAutoKeysounds ) const { const TrackMap &mapTrack = m_TapNotes[track]; @@ -987,6 +987,14 @@ return false; ASSERT( iter->first > rowInOut ); + + // If we want to ignore autokeysounds, keep going until we find a real note. + if(ignoreAutoKeysounds) { + while(iter->second.type == TapNoteType_AutoKeysound) { + iter++; + if(iter==mapTrack.end()) return false; + } + } rowInOut = iter->first; return true; } diff -Nru stepmania-5.0.10+dfsg/src/NoteData.h stepmania-5.0.11+dfsg/src/NoteData.h --- stepmania-5.0.10+dfsg/src/NoteData.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NoteData.h 2016-03-30 16:08:58.000000000 +0000 @@ -243,7 +243,7 @@ /* Returns the row of the first TapNote on the track that has a row greater than rowInOut. */ - bool GetNextTapNoteRowForTrack( int track, int &rowInOut ) const; + bool GetNextTapNoteRowForTrack( int track, int &rowInOut, bool ignoreKeySounds=false ) const; bool GetNextTapNoteRowForAllTracks( int &rowInOut ) const; bool GetPrevTapNoteRowForTrack( int track, int &rowInOut ) const; bool GetPrevTapNoteRowForAllTracks( int &rowInOut ) const; diff -Nru stepmania-5.0.10+dfsg/src/NoteDataUtil.cpp stepmania-5.0.11+dfsg/src/NoteDataUtil.cpp --- stepmania-5.0.10+dfsg/src/NoteDataUtil.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NoteDataUtil.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -932,6 +932,8 @@ this_limb= prev_limb_used == left_fist ? right_fist : left_fist; } break; + default: + break; } size_t this_panel= prev_limb_panels[this_limb]; if(panel_repeat_counts[this_limb] + 1 > panel_repeat_goals[this_limb]) @@ -1117,6 +1119,8 @@ case TapNoteType_Fake: ++out[RadarCategory_Fakes]; break; + default: + break; } } else @@ -1252,28 +1256,45 @@ RemoveSimultaneousNotes( inout, 3, iStartIndex, iEndIndex ); } -void NoteDataUtil::RemoveSpecificTapNotes( NoteData &inout, TapNoteType tn, int iStartIndex, int iEndIndex ) +void NoteDataUtil::RemoveSpecificTapNotes(NoteData &inout, TapNoteType tn, int iStartIndex, int iEndIndex) { - for( int t=0; t(), false); } -void NoteDataUtil::RemoveMines( NoteData &inout, int iStartIndex, int iEndIndex ) +void NoteDataUtil::RemoveMines(NoteData &inout, int iStartIndex, int iEndIndex) { - RemoveSpecificTapNotes( inout, TapNoteType_Mine, iStartIndex, iEndIndex ); + RemoveSpecificTapNotes(inout, TapNoteType_Mine, iStartIndex, iEndIndex); } -void NoteDataUtil::RemoveLifts( NoteData &inout, int iStartIndex, int iEndIndex ) +void NoteDataUtil::RemoveLifts(NoteData &inout, int iStartIndex, int iEndIndex) { - RemoveSpecificTapNotes( inout, TapNoteType_Lift, iStartIndex, iEndIndex ); + RemoveSpecificTapNotes(inout, TapNoteType_Lift, iStartIndex, iEndIndex); } -void NoteDataUtil::RemoveFakes( NoteData &inout, int iStartIndex, int iEndIndex ) +void NoteDataUtil::RemoveFakes(NoteData &inout, TimingData const& timing_data, int iStartIndex, int iEndIndex) { - RemoveSpecificTapNotes( inout, TapNoteType_Fake, iStartIndex, iEndIndex ); + RemoveSpecificTapNotes(inout, TapNoteType_Fake, iStartIndex, iEndIndex); + for(int t=0; t(), false); } void NoteDataUtil::RemoveAllButOneTap( NoteData &inout, int row ) @@ -2692,7 +2713,7 @@ inout.RevalidateATIs(vector(), false); } -void NoteDataUtil::TransformNoteData( NoteData &nd, const AttackArray &aa, StepsType st, Song* pSong ) +void NoteDataUtil::TransformNoteData(NoteData &nd, TimingData const& timing_data, const AttackArray &aa, StepsType st, Song* pSong) { FOREACH_CONST( Attack, aa, a ) { @@ -2703,12 +2724,12 @@ float fStartBeat, fEndBeat; a->GetAttackBeats( pSong, fStartBeat, fEndBeat ); - NoteDataUtil::TransformNoteData( nd, po, st, BeatToNoteRow(fStartBeat), BeatToNoteRow(fEndBeat) ); + NoteDataUtil::TransformNoteData(nd, timing_data, po, st, BeatToNoteRow(fStartBeat), BeatToNoteRow(fEndBeat) ); } } } -void NoteDataUtil::TransformNoteData( NoteData &nd, const PlayerOptions &po, StepsType st, int iStartIndex, int iEndIndex ) +void NoteDataUtil::TransformNoteData( NoteData &nd, TimingData const& timing_data, const PlayerOptions &po, StepsType st, int iStartIndex, int iEndIndex ) { // Apply remove transforms before others so that we don't go removing // notes we just inserted. Apply TRANSFORM_NOROLLS before TRANSFORM_NOHOLDS, @@ -2719,7 +2740,7 @@ if( po.m_bTransforms[PlayerOptions::TRANSFORM_NOMINES] ) NoteDataUtil::RemoveMines( nd, iStartIndex, iEndIndex ); if( po.m_bTransforms[PlayerOptions::TRANSFORM_NOJUMPS] ) NoteDataUtil::RemoveJumps( nd, iStartIndex, iEndIndex ); if( po.m_bTransforms[PlayerOptions::TRANSFORM_NOLIFTS] ) NoteDataUtil::RemoveLifts( nd, iStartIndex, iEndIndex ); - if( po.m_bTransforms[PlayerOptions::TRANSFORM_NOFAKES] ) NoteDataUtil::RemoveFakes( nd, iStartIndex, iEndIndex ); + if( po.m_bTransforms[PlayerOptions::TRANSFORM_NOFAKES] ) NoteDataUtil::RemoveFakes( nd, timing_data, iStartIndex, iEndIndex ); if( po.m_bTransforms[PlayerOptions::TRANSFORM_NOHANDS] ) NoteDataUtil::RemoveHands( nd, iStartIndex, iEndIndex ); if( po.m_bTransforms[PlayerOptions::TRANSFORM_NOQUADS] ) NoteDataUtil::RemoveQuads( nd, iStartIndex, iEndIndex ); if( po.m_bTransforms[PlayerOptions::TRANSFORM_NOSTRETCH] ) NoteDataUtil::RemoveStretch( nd, st, iStartIndex, iEndIndex ); @@ -3006,34 +3027,6 @@ return true; } -extern Preference g_fTimingWindowHopo; - - -void NoteDataUtil::SetHopoPossibleFlags( const Song *pSong, NoteData& ndInOut ) -{ - float fLastRowMusicSeconds = -1; - int iLastTapTrackOfLastRow = -1; - FOREACH_NONEMPTY_ROW_ALL_TRACKS( ndInOut, r ) - { - float fBeat = NoteRowToBeat( r ); - float fSeconds = pSong->m_SongTiming.GetElapsedTimeFromBeat( fBeat ); - - int iLastTapTrack = ndInOut.GetLastTrackWithTapOrHoldHead( r ); - if( iLastTapTrack != -1 && fSeconds <= fLastRowMusicSeconds + g_fTimingWindowHopo ) - { - int iNumNotesInRow = ndInOut.GetNumTapNotesInRow( r ); - TapNote &tn = ndInOut.FindTapNote( iLastTapTrack, r )->second; - - if( iNumNotesInRow == 1 && iLastTapTrack != iLastTapTrackOfLastRow ) - { - tn.bHopoPossible = true; - } - } - - fLastRowMusicSeconds = fSeconds; - iLastTapTrackOfLastRow = iLastTapTrack; - } -} unsigned int NoteDataUtil::GetTotalHoldTicks( NoteData* nd, const TimingData* td ) { diff -Nru stepmania-5.0.10+dfsg/src/NoteDataUtil.h stepmania-5.0.11+dfsg/src/NoteDataUtil.h --- stepmania-5.0.10+dfsg/src/NoteDataUtil.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NoteDataUtil.h 2016-03-30 16:08:58.000000000 +0000 @@ -74,25 +74,25 @@ * @param tn the TapNote Type to remove. * @param iStartIndex the starting point for transforming. * @param iEndIndex the ending point for transforming. */ - void RemoveSpecificTapNotes( NoteData &inout, TapNoteType tn, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ); + void RemoveSpecificTapNotes(NoteData &inout, TapNoteType tn, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW); /** * @brief Remove all of the mines from the chart. * @param inout the Notedata to be transformed. * @param iStartIndex the starting point for transforming. * @param iEndIndex the ending point for transforming. */ - void RemoveMines( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ); + void RemoveMines(NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW); /** * @brief Remove all of the lifts from the chart. * @param inout the Notedata to be transformed. * @param iStartIndex the starting point for transforming. * @param iEndIndex the ending point for transforming. */ - void RemoveLifts( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ); + void RemoveLifts(NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW); /** * @brief Remove all of the fakes from the chart. * @param inout the Notedata to be transformed. * @param iStartIndex the starting point for transforming. * @param iEndIndex the ending point for transforming. */ - void RemoveFakes( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ); + void RemoveFakes(NoteData &inout, TimingData const& timing_data, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW); void RemoveStretch( NoteData &inout, StepsType st, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ); void RemoveAllButOneTap( NoteData &inout, int row ); void RemoveAllButPlayer( NoteData &inout, PlayerNumber pn ); @@ -163,8 +163,10 @@ // True if no notes in row that aren't true in the mask bool RowPassesValidMask( NoteData &inout, int row, const bool bValidMask[] ); - void TransformNoteData( NoteData &nd, const AttackArray &aa, StepsType st, Song* pSong ); - void TransformNoteData( NoteData &nd, const PlayerOptions &po, StepsType st, + void TransformNoteData(NoteData &nd, TimingData const& timing_data, + const AttackArray &aa, StepsType st, Song* pSong); + void TransformNoteData(NoteData &nd, TimingData const& timing_data, + const PlayerOptions &po, StepsType st, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ); void AddTapAttacks( NoteData &nd, Song* pSong ); @@ -182,8 +184,6 @@ bool GetNextEditorPosition( const NoteData& in, int &rowInOut ); bool GetPrevEditorPosition( const NoteData& in, int &rowInOut ); - - void SetHopoPossibleFlags( const Song *pSong, NoteData& ndInOut ); /** @brief Count the number of hold ticks that will fire, assuming that tickholds are on. * @param td The TimingData from the relevant Steps. */ diff -Nru stepmania-5.0.10+dfsg/src/NoteDataWithScoring.cpp stepmania-5.0.11+dfsg/src/NoteDataWithScoring.cpp --- stepmania-5.0.10+dfsg/src/NoteDataWithScoring.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NoteDataWithScoring.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -373,6 +373,7 @@ state.mines_avoided+= (curr_note->result.tns == TNS_AvoidMine); break; case TapNoteType_Fake: + default: break; } } diff -Nru stepmania-5.0.10+dfsg/src/NoteDisplay.cpp stepmania-5.0.11+dfsg/src/NoteDisplay.cpp --- stepmania-5.0.10+dfsg/src/NoteDisplay.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NoteDisplay.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -360,6 +360,8 @@ case NCSM_Position: pos_handler->EvalForBeat(song_beat, beat, sp_pos); break; + default: + break; } } void NoteColumnRenderArgs::spae_zoom_for_beat(const PlayerState* state, float beat, @@ -377,6 +379,8 @@ case NCSM_Position: zoom_handler->EvalForBeat(song_beat, beat, sp_zoom); break; + default: + break; } } void NoteColumnRenderArgs::SetPRZForActor(Actor* actor, @@ -501,8 +505,6 @@ } bool is_addition = (tn.source == TapNoteSource_Addition); - bool hopo_possible = (tn.bHopoPossible); - bool use_addition_coloring = is_addition || hopo_possible; const bool hold_ghost_showing = tn.HoldResult.bActive && tn.HoldResult.fLife > 0; const bool is_holding = tn.HoldResult.bHeld; if(hold_ghost_showing) @@ -520,7 +522,7 @@ } DrawHold(tn, field_args, column_args, start_row, is_holding, result, - use_addition_coloring, + is_addition, in_selection_range ? field_args.selection_glow : field_args.fail_fade); bool note_upcoming = NoteRowToBeat(start_row) > @@ -602,12 +604,10 @@ } bool is_addition = (tn.source == TapNoteSource_Addition); - bool hopo_possible = (tn.bHopoPossible); - bool use_addition_coloring = is_addition || hopo_possible; DrawTap(tn, field_args, column_args, NoteRowToVisibleBeat(m_pPlayerState, tap_row), hold_begins_on_this_beat, roll_begins_on_this_beat, - use_addition_coloring, + is_addition, in_selection_range ? field_args.selection_glow : field_args.fail_fade); any_upcoming |= NoteRowToBeat(tap_row) > @@ -897,6 +897,8 @@ column_args.pos_handler->EvalDerivForBeat(column_args.song_beat, cur_beat, sp_pos_forward); RageVec3Normalize(&sp_pos_forward, &sp_pos_forward); break; + default: + break; } render_forward.x+= sp_pos_forward.x; @@ -922,6 +924,8 @@ column_args.zoom_handler->EvalForBeat(column_args.song_beat, cur_beat, sp_zoom); render_width= fFrameWidth * sp_zoom.x; break; + default: + break; } const float fFrameWidthScale = ArrowEffects::GetFrameWidthScale(m_pPlayerState, fYOffset, part_args.overlapped_time); @@ -942,6 +946,8 @@ case NCSM_Position: column_args.rot_handler->EvalForBeat(column_args.song_beat, cur_beat, sp_rot); break; + default: + break; } RageVector3 center_vert(sp_pos.x + ae_pos.x, @@ -1304,6 +1310,8 @@ case NCSM_Position: column_args.rot_handler->EvalForBeat(column_args.song_beat, spline_beat, sp_rot); break; + default: + break; } column_args.spae_zoom_for_beat(m_pPlayerState, spline_beat, sp_zoom, ae_zoom); column_args.SetPRZForActor(pActor, sp_pos, ae_pos, sp_rot, ae_rot, sp_zoom, ae_zoom); @@ -1451,6 +1459,8 @@ case NCSM_Position: NCR_current.m_pos_handler.EvalForReceptor(song_beat, sp_pos); break; + default: + break; } switch(NCR_current.m_rot_handler.m_spline_mode) { @@ -1464,6 +1474,8 @@ case NCSM_Position: NCR_current.m_rot_handler.EvalForReceptor(song_beat, sp_rot); break; + default: + break; } switch(NCR_current.m_zoom_handler.m_spline_mode) { @@ -1477,6 +1489,8 @@ case NCSM_Position: NCR_current.m_zoom_handler.EvalForReceptor(song_beat, sp_zoom); break; + default: + break; } m_column_render_args.SetPRZForActor(receptor, sp_pos, ae_pos, sp_rot, ae_rot, sp_zoom, ae_zoom); receptor->SetInternalDiffuse(m_column_render_args.diffuse); @@ -1528,6 +1542,8 @@ holds[tn.pn].push_back(begin); } break; + default: + break; } } #define DTS_INNER(pn, tap_set, draw_func, disp) \ diff -Nru stepmania-5.0.10+dfsg/src/NoteField.cpp stepmania-5.0.11+dfsg/src/NoteField.cpp --- stepmania-5.0.10+dfsg/src/NoteField.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NoteField.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -375,9 +375,16 @@ } else { - float fScrollSpeed = m_pPlayerState->m_PlayerOptions.GetCurrent().m_fScrollSpeed; - if( m_pPlayerState->m_PlayerOptions.GetCurrent().m_fTimeSpacing > 0 ) + PlayerOptions const& curr_ops= m_pPlayerState->m_PlayerOptions.GetCurrent(); + float fScrollSpeed = curr_ops.m_fScrollSpeed; + if(curr_ops.m_fTimeSpacing > 0) + { fScrollSpeed = 4; + } + else if(curr_ops.m_fMaxScrollBPM != 0) + { + fScrollSpeed= curr_ops.m_fMaxScrollBPM / m_pPlayerState->m_fReadBPM; + } switch( type ) { DEFAULT_FAIL( type ); diff -Nru stepmania-5.0.10+dfsg/src/NoteSkinManager.cpp stepmania-5.0.11+dfsg/src/NoteSkinManager.cpp --- stepmania-5.0.10+dfsg/src/NoteSkinManager.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NoteSkinManager.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -397,6 +397,8 @@ RageException::Throw("%s", message.c_str()); case Dialog::ignore: return ""; + default: + break; } } @@ -439,6 +441,8 @@ RageException::Throw("%s", message.c_str()); case Dialog::ignore: return ""; + default: + break; } } diff -Nru stepmania-5.0.10+dfsg/src/NotesLoaderBMS.cpp stepmania-5.0.11+dfsg/src/NotesLoaderBMS.cpp --- stepmania-5.0.10+dfsg/src/NotesLoaderBMS.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NotesLoaderBMS.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -1118,7 +1118,6 @@ TimingData td; td.m_fBeat0OffsetInSeconds = out->m_Timing.m_fBeat0OffsetInSeconds; - nd.SetNumTracks( tracks ); td.SetBPMAtRow( 0, currentBPM = initialBPM ); @@ -1456,9 +1455,9 @@ } } - delete transform; - delete holdStart; - delete lastNote; + delete[] transform; + delete[] holdStart; + delete[] lastNote; td.TidyUpData( false ); out->SetNoteData(nd); diff -Nru stepmania-5.0.10+dfsg/src/NotesLoaderSM.cpp stepmania-5.0.11+dfsg/src/NotesLoaderSM.cpp --- stepmania-5.0.10+dfsg/src/NotesLoaderSM.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NotesLoaderSM.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -1102,7 +1102,7 @@ bool SMLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCache ) { - LOG->Trace( "Song::LoadFromSMFile(%s)", sPath.c_str() ); + //LOG->Trace( "Song::LoadFromSMFile(%s)", sPath.c_str() ); MsdFile msd; if( !msd.ReadFile( sPath, true ) ) // unescape diff -Nru stepmania-5.0.10+dfsg/src/NotesLoaderSSC.cpp stepmania-5.0.11+dfsg/src/NotesLoaderSSC.cpp --- stepmania-5.0.10+dfsg/src/NotesLoaderSSC.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NotesLoaderSSC.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -912,6 +912,7 @@ out.SetSMNoteData(matcher); out.TidyUpData(); return true; + default: break; } } @@ -927,6 +928,8 @@ case LNDID_notedata: tryingSteps = true; break; + default: + break; } } } @@ -940,7 +943,7 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCache ) { - LOG->Trace( "Song::LoadFromSSCFile(%s)", sPath.c_str() ); + //LOG->Trace( "Song::LoadFromSSCFile(%s)", sPath.c_str() ); MsdFile msd; if( !msd.ReadFile( sPath, true ) ) diff -Nru stepmania-5.0.10+dfsg/src/NotesWriterDWI.cpp stepmania-5.0.11+dfsg/src/NotesWriterDWI.cpp --- stepmania-5.0.10+dfsg/src/NotesWriterDWI.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NotesWriterDWI.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -367,18 +367,20 @@ f.PutLine( ssprintf("#CDTITLE:%s;", DwiEscape(out.m_sCDTitleFile).c_str()) ); switch( out.m_DisplayBPMType ) { - case DISPLAY_BPM_ACTUAL: - // write nothing - break; - case DISPLAY_BPM_SPECIFIED: - if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax ) - f.PutLine( ssprintf("#DISPLAYBPM:%i;\n", (int) out.m_fSpecifiedBPMMin) ); - else - f.PutLine( ssprintf("#DISPLAYBPM:%i..%i;\n", (int) out.m_fSpecifiedBPMMin, (int) out.m_fSpecifiedBPMMax) ); - break; - case DISPLAY_BPM_RANDOM: - f.PutLine( "#DISPLAYBPM:*" ); - break; + case DISPLAY_BPM_ACTUAL: + // write nothing + break; + case DISPLAY_BPM_SPECIFIED: + if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax ) + f.PutLine( ssprintf("#DISPLAYBPM:%i;\n", (int) out.m_fSpecifiedBPMMin) ); + else + f.PutLine( ssprintf("#DISPLAYBPM:%i..%i;\n", (int) out.m_fSpecifiedBPMMin, (int) out.m_fSpecifiedBPMMax) ); + break; + case DISPLAY_BPM_RANDOM: + f.PutLine( "#DISPLAYBPM:*" ); + break; + default: + break; } // TODO: Also check for delays, add them as stops minus one row? diff -Nru stepmania-5.0.10+dfsg/src/NotesWriterSM.cpp stepmania-5.0.11+dfsg/src/NotesWriterSM.cpp --- stepmania-5.0.10+dfsg/src/NotesWriterSM.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NotesWriterSM.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -59,19 +59,21 @@ switch( out.m_DisplayBPMType ) { - case DISPLAY_BPM_ACTUAL: - // write nothing - break; - case DISPLAY_BPM_SPECIFIED: - if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax ) - f.PutLine( ssprintf( "#DISPLAYBPM:%.6f;", out.m_fSpecifiedBPMMin ) ); - else - f.PutLine( ssprintf( "#DISPLAYBPM:%.6f:%.6f;", - out.m_fSpecifiedBPMMin, out.m_fSpecifiedBPMMax ) ); - break; - case DISPLAY_BPM_RANDOM: - f.PutLine( ssprintf( "#DISPLAYBPM:*;" ) ); - break; + case DISPLAY_BPM_ACTUAL: + // write nothing + break; + case DISPLAY_BPM_SPECIFIED: + if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax ) + f.PutLine( ssprintf( "#DISPLAYBPM:%.6f;", out.m_fSpecifiedBPMMin ) ); + else + f.PutLine( ssprintf( "#DISPLAYBPM:%.6f:%.6f;", + out.m_fSpecifiedBPMMin, out.m_fSpecifiedBPMMax ) ); + break; + case DISPLAY_BPM_RANDOM: + f.PutLine( ssprintf( "#DISPLAYBPM:*;" ) ); + break; + default: + break; } diff -Nru stepmania-5.0.10+dfsg/src/NotesWriterSSC.cpp stepmania-5.0.11+dfsg/src/NotesWriterSSC.cpp --- stepmania-5.0.10+dfsg/src/NotesWriterSSC.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NotesWriterSSC.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -259,18 +259,20 @@ switch( out.m_DisplayBPMType ) { - case DISPLAY_BPM_ACTUAL: - // write nothing - break; - case DISPLAY_BPM_SPECIFIED: - if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax ) - f.PutLine( ssprintf( "#DISPLAYBPM:%.6f;", out.m_fSpecifiedBPMMin ) ); - else - f.PutLine( ssprintf( "#DISPLAYBPM:%.6f:%.6f;", out.m_fSpecifiedBPMMin, out.m_fSpecifiedBPMMax ) ); - break; - case DISPLAY_BPM_RANDOM: - f.PutLine( ssprintf( "#DISPLAYBPM:*;" ) ); - break; + case DISPLAY_BPM_ACTUAL: + // write nothing + break; + case DISPLAY_BPM_SPECIFIED: + if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax ) + f.PutLine( ssprintf( "#DISPLAYBPM:%.6f;", out.m_fSpecifiedBPMMin ) ); + else + f.PutLine( ssprintf( "#DISPLAYBPM:%.6f:%.6f;", out.m_fSpecifiedBPMMin, out.m_fSpecifiedBPMMax ) ); + break; + case DISPLAY_BPM_RANDOM: + f.PutLine( ssprintf( "#DISPLAYBPM:*;" ) ); + break; + default: + break; } WriteTimingTags( f, out.m_SongTiming, true ); @@ -409,6 +411,8 @@ case DISPLAY_BPM_RANDOM: lines.push_back( ssprintf( "#DISPLAYBPM:*;" ) ); break; + default: + break; } if (bSavingCache) { diff -Nru stepmania-5.0.10+dfsg/src/NoteTypes.h stepmania-5.0.11+dfsg/src/NoteTypes.h --- stepmania-5.0.10+dfsg/src/NoteTypes.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/NoteTypes.h 2016-03-30 16:08:58.000000000 +0000 @@ -138,8 +138,6 @@ TapNoteResult result; /** @brief The Player that is supposed to hit this note. This is mainly for Routine Mode. */ PlayerNumber pn; - /** @brief Can this note be hammered on or pulled off? This is set before gameplay begins. */ - bool bHopoPossible; // used only if Type == attack: RString sAttackModifiers; @@ -160,16 +158,14 @@ void PushSelf( lua_State *L ); TapNote(): type(TapNoteType_Empty), subType(TapNoteSubType_Invalid), - source(TapNoteSource_Original), result(), pn(PLAYER_INVALID), - bHopoPossible(false), sAttackModifiers(""), fAttackDurationSeconds(0), - iKeysoundIndex(-1), iDuration(0), HoldResult() {} + source(TapNoteSource_Original), result(), pn(PLAYER_INVALID), sAttackModifiers(""), + fAttackDurationSeconds(0), iKeysoundIndex(-1), iDuration(0), HoldResult() {} void Init() { type = TapNoteType_Empty; subType = TapNoteSubType_Invalid; source = TapNoteSource_Original; pn = PLAYER_INVALID, - bHopoPossible = false; fAttackDurationSeconds = 0.f; iKeysoundIndex = -1; iDuration = 0; @@ -182,8 +178,7 @@ float fAttackDurationSeconds_, int iKeysoundIndex_ ): type(type_), subType(subType_), source(source_), result(), - pn(PLAYER_INVALID), bHopoPossible(false), - sAttackModifiers(sAttackModifiers_), + pn(PLAYER_INVALID), sAttackModifiers(sAttackModifiers_), fAttackDurationSeconds(fAttackDurationSeconds_), iKeysoundIndex(iKeysoundIndex_), iDuration(0), HoldResult() { diff -Nru stepmania-5.0.10+dfsg/src/OptionRowHandler.cpp stepmania-5.0.11+dfsg/src/OptionRowHandler.cpp --- stepmania-5.0.10+dfsg/src/OptionRowHandler.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/OptionRowHandler.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -203,7 +203,7 @@ } else { - LuaHelpers::ReportScriptErrorFmt("Unknown row flag \"%s\".", sName.c_str()); + LuaHelpers::ReportScriptErrorFmt("Unknown row flag \"%s\" on row %s.", sName.c_str(), m_Def.m_sName.c_str()); } } for( int col = 0; col < NumCols; ++col ) diff -Nru stepmania-5.0.10+dfsg/src/Player.cpp stepmania-5.0.11+dfsg/src/Player.cpp --- stepmania-5.0.10+dfsg/src/Player.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Player.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -150,8 +150,6 @@ static Preference g_bEnableAttackSoundPlayback ( "EnableAttackSounds", true ); static Preference g_bEnableMineSoundPlayback ( "EnableMineHitSound", true ); -Preference g_fTimingWindowHopo ( "TimingWindowHopo", 0.25 ); // max time between notes in a hopo chain -Preference g_fTimingWindowStrum ( "TimingWindowStrum", 0.1f ); // max time between strum and when the frets must match /** @brief How much life is in a hold note when you start on it? */ ThemeMetric INITIAL_HOLD_LIFE ( "Player", "InitialHoldLife" ); /** @@ -237,6 +235,7 @@ { m_drawing_notefield_board= false; m_bLoaded = false; + m_inside_lua_set_life= false; m_pPlayerState = NULL; m_pPlayerStageStats = NULL; @@ -671,13 +670,13 @@ // if( m_pScore ) // m_pScore->Init( pn ); + m_Timing = GAMESTATE->m_pCurSteps[pn]->GetTimingData(); + /* Apply transforms. */ - NoteDataUtil::TransformNoteData( m_NoteData, m_pPlayerState->m_PlayerOptions.GetStage(), GAMESTATE->GetCurrentStyle(GetPlayerState()->m_PlayerNumber)->m_StepsType ); + NoteDataUtil::TransformNoteData(m_NoteData, *m_Timing, m_pPlayerState->m_PlayerOptions.GetStage(), GAMESTATE->GetCurrentStyle(GetPlayerState()->m_PlayerNumber)->m_StepsType); const Song* pSong = GAMESTATE->m_pCurSong; - m_Timing = GAMESTATE->m_pCurSteps[pn]->GetTimingData(); - // Generate some cache data structure. GenerateCacheDataStructure(m_pPlayerState, m_NoteData); @@ -692,7 +691,7 @@ // workaround, but since only DDR has ever really implemented those // modes, it's stayed like this. -aj StepsType st = GAMESTATE->GetCurrentStyle(GetPlayerState()->m_PlayerNumber)->m_StepsType; - NoteDataUtil::TransformNoteData( m_NoteData, m_pPlayerState->m_PlayerOptions.GetStage(), st ); + NoteDataUtil::TransformNoteData(m_NoteData, *m_Timing, m_pPlayerState->m_PlayerOptions.GetStage(), st); if (BATTLE_RAVE_MIRROR) { @@ -937,13 +936,6 @@ if( m_bPaused ) return; - // Check for a strum miss - if( m_pPlayerState->m_fLastStrumMusicSeconds != -1 && - m_pPlayerState->m_fLastStrumMusicSeconds + g_fTimingWindowStrum < m_pPlayerState->m_Position.m_fMusicSeconds ) - { - DoStrumMiss(); - } - // update pressed flag const int iNumCols = GAMESTATE->GetCurrentStyle(GetPlayerState()->m_PlayerNumber)->m_iColsPerPlayer; ASSERT_M( iNumCols <= MAX_COLS_PER_PLAYER, ssprintf("%i > %i", iNumCols, MAX_COLS_PER_PLAYER) ); @@ -1512,7 +1504,7 @@ // if re-adding noteskin changes, this is one place to edit -aj - NoteDataUtil::TransformNoteData( m_NoteData, po, GAMESTATE->GetCurrentStyle(GetPlayerState()->m_PlayerNumber)->m_StepsType, BeatToNoteRow(fStartBeat), BeatToNoteRow(fEndBeat) ); + NoteDataUtil::TransformNoteData(m_NoteData, *m_Timing, po, GAMESTATE->GetCurrentStyle(GetPlayerState()->m_PlayerNumber)->m_StepsType, BeatToNoteRow(fStartBeat), BeatToNoteRow(fEndBeat)); } m_pPlayerState->m_ModsToApply.clear(); } @@ -1693,6 +1685,44 @@ ChangeLifeRecord(); } +void Player::ChangeLife(float delta) +{ + // If ChangeLifeRecord is not called before the change, then the life graph + // will show a gradual change from the time of the previous step (or + // change) to the time of this change, instead of the sharp change that + // actually occurred. -Kyz + ChangeLifeRecord(); + PlayerNumber pn = m_pPlayerState->m_PlayerNumber; + if(m_pLifeMeter) + { + m_pLifeMeter->ChangeLife(delta); + } + if(m_pCombinedLifeMeter) + { + m_pCombinedLifeMeter->ChangeLife(pn, delta); + } + ChangeLifeRecord(); +} + +void Player::SetLife(float value) +{ + // If ChangeLifeRecord is not called before the change, then the life graph + // will show a gradual change from the time of the previous step (or + // change) to the time of this change, instead of the sharp change that + // actually occurred. -Kyz + ChangeLifeRecord(); + PlayerNumber pn = m_pPlayerState->m_PlayerNumber; + if(m_pLifeMeter) + { + m_pLifeMeter->SetLife(value); + } + if(m_pCombinedLifeMeter) + { + m_pCombinedLifeMeter->SetLife(pn, value); + } + ChangeLifeRecord(); +} + void Player::ChangeLifeRecord() { PlayerNumber pn = m_pPlayerState->m_PlayerNumber; @@ -1843,124 +1873,6 @@ return m_pPlayerState->m_PlayerOptions.GetStage().m_LifeType == LifeType_Battery && m_pPlayerStageStats && m_pPlayerStageStats->m_bFailed; } -void Player::Fret( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease ) -{ - if( IsOniDead() ) - return; - - DEBUG_ASSERT_M( col >= 0 && col <= m_NoteData.GetNumTracks(), ssprintf("%i, %i", col, m_NoteData.GetNumTracks()) ); - - m_vbFretIsDown[ col ] = !bRelease; - - - // Handle changing fret during a strum - if( m_pPlayerState->m_fLastStrumMusicSeconds != -1 ) - { - LOG->Trace( "StrumTry" ); - StepStrumHopo( col, row, tm, bHeld, bRelease, ButtonType_StrumFretsChanged ); - } - - // Handle hammer-ons and pull-offs - const float fPositionSeconds = m_pPlayerState->m_Position.m_fMusicSeconds - tm.Ago(); - int iHopoCol = -1; - bool bDoHopo = - m_pPlayerState->m_fLastHopoNoteMusicSeconds != -1 && - fPositionSeconds <= m_pPlayerState->m_fLastHopoNoteMusicSeconds + g_fTimingWindowHopo; - if( bDoHopo ) - { - // do a Hopo: - // - on pressed fret is no higher fret is held - // - on next lowest held fret when the highest held fret is released - bool bHigherFretIsDown = false; - for( int i=col+1; i=0; i-- ) - { - if( m_vbFretIsDown[i] ) - { - iHopoCol = i; - break; - } - } - if( iHopoCol == -1 ) - bDoHopo = false; - } - } - - if( bDoHopo ) - Hopo( iHopoCol, row, tm, bHeld, bRelease ); - - // Check if this fret breaks all active holds. - if( !bRelease ) - { - const float fSongBeat = m_pPlayerState->m_Position.m_fSongBeat; - const int iSongRow = BeatToNoteRow( fSongBeat ); - - int iMaxHoldCol = -1; - int iNumColsHeld = 0; - - // Score all active holds to NotHeld - for( int iTrack=0; iTracksecond; - if( tn.HoldResult.bActive ) - { - iMaxHoldCol = iTrack; - iNumColsHeld++; - } - } - } - - // Any frets to the right of an active hold will break the hold. - if( col > iMaxHoldCol || iNumColsHeld >= 2 ) - ScoreAllActiveHoldsLetGo(); - } -} - - -void Player::Strum( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease ) -{ - if( bRelease ) - return; - - if( m_pPlayerState->m_fLastStrumMusicSeconds != -1 ) - { - DoStrumMiss(); - } - - m_pPlayerState->m_fLastStrumMusicSeconds = m_pPlayerState->m_Position.m_fMusicSeconds; - - StepStrumHopo( col, row, tm, bHeld, bRelease, ButtonType_StrumFretsChanged ); -} - void Player::DoTapScoreNone() { Message msg( "ScoreNone" ); @@ -1992,14 +1904,6 @@ } } -void Player::DoStrumMiss() -{ - m_pPlayerState->m_fLastStrumMusicSeconds = -1; - DoTapScoreNone(); - - ScoreAllActiveHoldsLetGo(); -} - void Player::ScoreAllActiveHoldsLetGo() { if( PENALIZE_TAP_SCORE_NONE ) @@ -2062,7 +1966,7 @@ } } -void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease, Player::ButtonType pbt ) +void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease ) { if( IsOniDead() ) return; @@ -2073,18 +1977,6 @@ const float fPositionSeconds = m_pPlayerState->m_Position.m_fMusicSeconds - tm.Ago(); const float fTimeSinceStep = tm.Ago(); - switch( pbt ) - { - DEFAULT_FAIL(pbt); - case ButtonType_Step: - break; - case ButtonType_StrumFretsChanged: - case ButtonType_Hopo: - // releasing should hit regular notes, not lifts - bRelease = false; - break; - } - float fSongBeat = m_pPlayerState->m_Position.m_fSongBeat; if( GAMESTATE->m_pCurSong ) @@ -2227,19 +2119,7 @@ ) + ROWS_PER_BEAT; int iRowOfOverlappingNoteOrRow = row; if( row == -1 ) - { - switch( pbt ) - { - DEFAULT_FAIL(pbt); - case ButtonType_StrumFretsChanged: - iRowOfOverlappingNoteOrRow = GetClosestNonEmptyRow( iSongRow, iStepSearchRows, iStepSearchRows, false ); - break; - case ButtonType_Hopo: - case ButtonType_Step: - iRowOfOverlappingNoteOrRow = GetClosestNote( col, iSongRow, iStepSearchRows, iStepSearchRows, false ); - break; - } - } + iRowOfOverlappingNoteOrRow = GetClosestNote( col, iSongRow, iStepSearchRows, iStepSearchRows, false ); // calculate TapNoteScore TapNoteScore score = TNS_None; @@ -2277,19 +2157,9 @@ TapNote tnDummy = TAP_ORIGINAL_TAP; TapNote *pTN = NULL; - switch( pbt ) - { - DEFAULT_FAIL(pbt); - case ButtonType_StrumFretsChanged: - pTN = &tnDummy; - break; - case ButtonType_Hopo: - case ButtonType_Step: - NoteData::iterator iter = m_NoteData.FindTapNote( col, iRowOfOverlappingNoteOrRow ); - DEBUG_ASSERT( iter!= m_NoteData.end(col) ); - pTN = &iter->second; - break; - } + NoteData::iterator iter = m_NoteData.FindTapNote( col, iRowOfOverlappingNoteOrRow ); + DEBUG_ASSERT( iter!= m_NoteData.end(col) ); + pTN = &iter->second; switch( m_pPlayerState->m_PlayerController ) { @@ -2451,99 +2321,6 @@ FAIL_M(ssprintf("Invalid player controller type: %i", m_pPlayerState->m_PlayerController)); } - switch( pbt ) - { - DEFAULT_FAIL(pbt); - case ButtonType_StrumFretsChanged: - { - bool bNoteRowMatchesFrets = true; - int iFirstNoteCol = -1; - for( int i=0; iGetCurrentStyle(GetPlayerState()->m_PlayerNumber)->m_iColsPerPlayer; i++ ) - { - const TapNote &tn = m_NoteData.GetTapNote( i, iRowOfOverlappingNoteOrRow ); - bool bIsNote = (tn.type != TapNoteType_Empty); - if( iFirstNoteCol == -1 && bIsNote ) - iFirstNoteCol = i; - - // Extra notes to the left (higher up on the string) can be held without penalty. It's necessary to hold - // the extra frets or pull-offs. - if( iFirstNoteCol == -1 ) - continue; - - bool bNoteMatchesFret = m_vbFretIsDown[i] == bIsNote; - if( !bNoteMatchesFret ) - { - bNoteRowMatchesFrets = false; - break; - } - } - ASSERT( iFirstNoteCol != -1 ); - if( !bNoteRowMatchesFrets ) - { - score = TNS_None; - } - else - { - int iLastNoteCol = -1; - for( int i=GAMESTATE->GetCurrentStyle(GetPlayerState()->m_PlayerNumber)->m_iColsPerPlayer-1; i>=0; i-- ) - { - const TapNote &tn = m_NoteData.GetTapNote( i, iRowOfOverlappingNoteOrRow ); - bool bIsNote = (tn.type != TapNoteType_Empty); - if( bIsNote ) - { - iLastNoteCol = i; - break; - } - } - - m_pPlayerState->m_fLastHopoNoteMusicSeconds = fStepSeconds; - m_pPlayerState->m_iLastHopoNoteCol = iLastNoteCol; - } - } - break; - case ButtonType_Hopo: - { - // only can hopo on a row with one note - if( m_NoteData.GetNumTapNotesInRow(iRowOfOverlappingNoteOrRow) != 1 ) - { - score = TNS_None; - break; - } - - // con't hopo on the same note 2x in a row - if( col == m_pPlayerState->m_iLastHopoNoteCol ) - { - score = TNS_None; - break; - } - - const TapNote &tn = m_NoteData.GetTapNote( col, iRowOfOverlappingNoteOrRow ); - ASSERT( tn.type != TapNoteType_Empty ); - - int iRowsAgoLastNote = 100000; // TODO: find more reasonable value based on HOPO_CHAIN_SECONDS? - NoteData::all_tracks_reverse_iterator iter = m_NoteData.GetTapNoteRangeAllTracksReverse( iRowsAgoLastNote-iRowsAgoLastNote, iRowOfOverlappingNoteOrRow-1 ); - ASSERT( !iter.IsAtEnd() ); // there must have been a note that started the hopo - if( !NoteDataWithScoring::IsRowCompletelyJudged(m_NoteData, iter.Row()) ) - { - score = TNS_None; - break; - } - - const TapNoteResult &lastTNR = NoteDataWithScoring::LastTapNoteWithResult( m_NoteData, iter.Row() ).result; - if( lastTNR.tns <= TNS_Miss ) - { - score = TNS_None; - break; - } - - m_pPlayerState->m_fLastHopoNoteMusicSeconds = fStepSeconds; - m_pPlayerState->m_iLastHopoNoteCol = col; - } - break; - case ButtonType_Step: - break; - } - // handle attack notes if( pTN->type == TapNoteType_Attack && score == TNS_W2 ) { @@ -2586,27 +2363,8 @@ if( score != TNS_None ) { - switch( pbt ) - { - DEFAULT_FAIL(pbt); - case ButtonType_StrumFretsChanged: - for( int t=0; tresult.tns = score; - pTN->result.fTapNoteOffset = -fNoteOffset; - break; - } + pTN->result.tns = score; + pTN->result.fTapNoteOffset = -fNoteOffset; } m_LastTapNoteScore = score; @@ -2630,42 +2388,8 @@ } } - // check for hopo end - if( score <= TNS_Miss ) - { - m_pPlayerState->ClearHopoState(); - } - - // check for strum end - if( score != TNS_None ) - { - switch( pbt ) - { - DEFAULT_FAIL(pbt); - case ButtonType_Step: - break; - case ButtonType_StrumFretsChanged: - m_pPlayerState->m_fLastStrumMusicSeconds = -1; - break; - case ButtonType_Hopo: - break; - } - } - if( score == TNS_None ) - { - switch( pbt ) - { - DEFAULT_FAIL(pbt); - case ButtonType_Step: - DoTapScoreNone(); - break; - case ButtonType_StrumFretsChanged: - case ButtonType_Hopo: - break; - } - - } + DoTapScoreNone(); if( !bRelease ) { @@ -2694,23 +2418,8 @@ } if( iRowOfOverlappingNoteOrRow != -1 ) { - switch( pbt ) - { - DEFAULT_FAIL(pbt); - case ButtonType_StrumFretsChanged: - for( int i=0; iStep( iLastFret, score ); - } - break; - case ButtonType_Step: - m_pNoteField->Step( col, score ); - break; - case ButtonType_Hopo: - // no animation - break; - } + m_pNoteField->Step( col, score ); } Message msg( "Step" ); msg.SetParam( "PlayerNumber", m_pPlayerState->m_PlayerNumber ); @@ -3590,6 +3277,28 @@ class LunaPlayer: public Luna { public: + static int SetLife(T* p, lua_State* L) + { + if(p->m_inside_lua_set_life) + { + luaL_error(L, "Do not call SetLife from inside LifeChangedMessageCommand because SetLife causes a LifeChangedMessageCommand."); + } + p->m_inside_lua_set_life= true; + p->SetLife(FArg(1)); + p->m_inside_lua_set_life= false; + COMMON_RETURN_SELF; + } + static int ChangeLife(T* p, lua_State* L) + { + if(p->m_inside_lua_set_life) + { + luaL_error(L, "Do not call ChangeLife from inside LifeChangedMessageCommand because ChangeLife causes a LifeChangedMessageCommand."); + } + p->m_inside_lua_set_life= true; + p->ChangeLife(FArg(1)); + p->m_inside_lua_set_life= false; + COMMON_RETURN_SELF; + } static int SetActorWithJudgmentPosition( T* p, lua_State *L ) { Actor *pActor = Luna::check(L, 1); @@ -3610,6 +3319,8 @@ LunaPlayer() { + ADD_METHOD(SetLife); + ADD_METHOD(ChangeLife); ADD_METHOD( SetActorWithJudgmentPosition ); ADD_METHOD( SetActorWithComboPosition ); ADD_METHOD( GetPlayerTimingData ); diff -Nru stepmania-5.0.10+dfsg/src/Player.h stepmania-5.0.11+dfsg/src/Player.h --- stepmania-5.0.10+dfsg/src/Player.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Player.h 2016-03-30 16:08:58.000000000 +0000 @@ -103,23 +103,10 @@ return *(this->m_Timing); } - // Called when a fret, step, or strum type button changes - void Fret( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease ); - - // Called when the strum bar is pressed down - void Strum( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease ); - - // Called when the strum window passes without a row being hit - void DoStrumMiss(); void ScoreAllActiveHoldsLetGo(); void DoTapScoreNone(); - enum ButtonType { ButtonType_Step, ButtonType_StrumFretsChanged, ButtonType_Hopo }; - void StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease, ButtonType gbt ); - void Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease ) { StepStrumHopo(col, row, tm, bHeld, bRelease, ButtonType_Step); } - - // called by Fret for Hammer-ons and Pull-offs - void Hopo( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease ) { StepStrumHopo(col, row, tm, bHeld, bRelease, ButtonType_Hopo); } + void Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease ); void FadeToFail(); void CacheAllUsedNoteSkins(); @@ -141,6 +128,9 @@ virtual void PushSelf( lua_State *L ); PlayerState * GetPlayerState() { return this->m_pPlayerState; } + void ChangeLife(float delta); + void SetLife(float value); + bool m_inside_lua_set_life; protected: void UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat ); diff -Nru stepmania-5.0.10+dfsg/src/PlayerOptions.cpp stepmania-5.0.11+dfsg/src/PlayerOptions.cpp --- stepmania-5.0.10+dfsg/src/PlayerOptions.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/PlayerOptions.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -150,9 +150,15 @@ case LifeType_Bar: switch(m_DrainType) { - case DrainType_Normal: break; - case DrainType_NoRecover: AddTo.push_back("NoRecover"); break; - case DrainType_SuddenDeath: AddTo.push_back("SuddenDeath"); break; + case DrainType_NoRecover: + AddTo.push_back("NoRecover"); + break; + case DrainType_SuddenDeath: + AddTo.push_back("SuddenDeath"); + break; + case DrainType_Normal: + default: + break; } break; case LifeType_Battery: @@ -524,10 +530,16 @@ else if( sBit == "space" ) { m_fSkew = level; m_fPerspectiveTilt = +level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; } else if( sBit == "hallway" ) { m_fSkew = 0; m_fPerspectiveTilt = -level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; } else if( sBit == "distant" ) { m_fSkew = 0; m_fPerspectiveTilt = +level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; } - else if( NOTESKIN && NOTESKIN->DoesNoteSkinExist(sBit) ) m_sNoteSkin = sBit; + else if( NOTESKIN && NOTESKIN->DoesNoteSkinExist(sBit) ) + { + m_sNoteSkin = sBit; + } else if( sBit == "skew" ) SET_FLOAT( fSkew ) else if( sBit == "tilt" ) SET_FLOAT( fPerspectiveTilt ) - else if( sBit == "noteskin" && !on ) /* "no noteskin" */ m_sNoteSkin = CommonMetrics::DEFAULT_NOTESKIN_NAME; + else if( sBit == "noteskin" && !on ) /* "no noteskin" */ + { + m_sNoteSkin = CommonMetrics::DEFAULT_NOTESKIN_NAME; + } else if( sBit == "randomspeed" ) SET_FLOAT( fRandomSpeed ) else if( sBit == "failarcade" || sBit == "failimmediate" ) m_FailType = FailType_Immediate; @@ -769,7 +781,14 @@ COMPARE(m_fPlayerAutoPlay); COMPARE(m_fPerspectiveTilt); COMPARE(m_fSkew); - COMPARE(m_sNoteSkin); + // The noteskin name needs to be compared case-insensitively because the + // manager forces lowercase, but some obscure part of PlayerOptions + // uppercases the first letter. The previous code that used != probably + // relied on RString::operator!= misbehaving. -Kyz + if(strcasecmp(m_sNoteSkin, other.m_sNoteSkin) != 0) + { + return false; + } for( int i = 0; i < PlayerOptions::NUM_ACCELS; ++i ) COMPARE(m_fAccels[i]); for( int i = 0; i < PlayerOptions::NUM_EFFECTS; ++i ) diff -Nru stepmania-5.0.10+dfsg/src/PlayerState.cpp stepmania-5.0.11+dfsg/src/PlayerState.cpp --- stepmania-5.0.10+dfsg/src/PlayerState.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/PlayerState.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -23,9 +23,6 @@ m_HealthState = HealthState_Alive; - m_fLastHopoNoteMusicSeconds = -1; - m_iLastHopoNoteCol = -1; - m_PlayerController = PC_HUMAN; m_iCpuSkill = 5; @@ -46,8 +43,6 @@ for( int i=0; i m_iMaxHighScoresPerListForMachine; Preference m_iMaxHighScoresPerListForPlayer; Preference m_bAllowMultipleHighScoreWithSameName; + Preference m_DisableUploadDir; Preference m_bCelShadeModels; Preference m_bPreferredSortUsesGroups; Preference m_fDebounceCoinInputTime; // allow users to apply a distinct debounce to coin input diff -Nru stepmania-5.0.10+dfsg/src/Profile.cpp stepmania-5.0.11+dfsg/src/Profile.cpp --- stepmania-5.0.10+dfsg/src/Profile.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Profile.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -1065,6 +1065,72 @@ LUA->Release(L); } + +void Profile::HandleStatsPrefixChange(RString dir, bool require_signature) +{ + // Temp variables to preserve stuff across the reload. + // Some stuff intentionally left out because the original reason for the + // stats prefix was to allow scores from different game types to coexist. + RString display_name= m_sDisplayName; + RString character_id= m_sCharacterID; + RString last_high_score_name= m_sLastUsedHighScoreName; + int weight= m_iWeightPounds; + float voomax= m_Voomax; + int birth_year= m_BirthYear; + bool ignore_step_cal= m_IgnoreStepCountCalories; + bool male= m_IsMale; + ProfileType type= m_Type; + int priority= m_ListPriority; + RString guid= m_sGuid; + map default_mods= m_sDefaultModifiers; + SortOrder sort_order= m_SortOrder; + Difficulty last_diff= m_LastDifficulty; + CourseDifficulty last_course_diff= m_LastCourseDifficulty; + StepsType last_stepstype= m_LastStepsType; + SongID last_song= m_lastSong; + CourseID last_course= m_lastCourse; + int total_sessions= m_iTotalSessions; + int total_session_seconds= m_iTotalSessionSeconds; + int total_gameplay_seconds= m_iTotalGameplaySeconds; + float total_calories_burned= m_fTotalCaloriesBurned; + LuaTable user_table= m_UserTable; + bool need_to_create_file= false; + if(IsAFile(dir + PROFILEMAN->GetStatsPrefix() + STATS_XML)) + { + LoadAllFromDir(dir, require_signature); + } + else + { + ClearStats(); + need_to_create_file= true; + } + m_sDisplayName= display_name; + m_sCharacterID= character_id; + m_sLastUsedHighScoreName= last_high_score_name; + m_iWeightPounds= weight; + m_Voomax= voomax; + m_BirthYear= birth_year; + m_IgnoreStepCountCalories= ignore_step_cal; + m_IsMale= male; + m_Type= type; + m_ListPriority= priority; + m_sGuid= guid; + m_sDefaultModifiers= default_mods; + m_SortOrder= sort_order; + m_LastDifficulty= last_diff; + m_LastCourseDifficulty= last_course_diff; + m_LastStepsType= last_stepstype; + m_lastSong= last_song; + m_iTotalSessions= total_sessions; + m_iTotalSessionSeconds= total_session_seconds; + m_iTotalGameplaySeconds= total_gameplay_seconds; + m_fTotalCaloriesBurned= total_calories_burned; + m_UserTable= user_table; + if(need_to_create_file) + { + SaveAllToDir(dir, require_signature); + } +} ProfileLoadResult Profile::LoadAllFromDir( RString sDir, bool bRequireSignature ) { @@ -1078,88 +1144,96 @@ // Not critical if this fails LoadEditableDataFromDir( sDir ); + ProfileLoadResult ret= LoadStatsFromDir(sDir, bRequireSignature); + if (ret != ProfileLoadResult_Success) + return ret; + + LoadCustomFunction( sDir ); + + return ProfileLoadResult_Success; +} + +ProfileLoadResult Profile::LoadStatsFromDir(RString dir, bool require_signature) +{ + dir= dir + PROFILEMAN->GetStatsPrefix(); // Check for the existance of stats.xml - RString fn = sDir + STATS_XML; - bool bCompressed = false; - if( !IsAFile(fn) ) + RString fn = dir + STATS_XML; + bool compressed = false; + if(!IsAFile(fn)) { // Check for the existance of stats.xml.gz - fn = sDir + STATS_XML_GZ; - bCompressed = true; - if( !IsAFile(fn) ) + fn = dir + STATS_XML_GZ; + compressed = true; + if(!IsAFile(fn)) + { return ProfileLoadResult_FailedNoProfile; + } } int iError; - auto_ptr pFile( FILEMAN->Open(fn, RageFile::READ, iError) ); - if( pFile.get() == NULL ) + auto_ptr pFile(FILEMAN->Open(fn, RageFile::READ, iError)); + if(pFile.get() == NULL) { - LOG->Trace( "Error opening %s: %s", fn.c_str(), strerror(iError) ); + LOG->Trace("Error opening %s: %s", fn.c_str(), strerror(iError)); return ProfileLoadResult_FailedTampered; } - if( bCompressed ) + if(compressed) { RString sError; uint32_t iCRC32; - RageFileObjInflate *pInflate = GunzipFile( pFile.release(), sError, &iCRC32 ); - if( pInflate == NULL ) + RageFileObjInflate *pInflate = GunzipFile(pFile.release(), sError, &iCRC32); + if(pInflate == NULL) { - LOG->Trace( "Error opening %s: %s", fn.c_str(), sError.c_str() ); + LOG->Trace("Error opening %s: %s", fn.c_str(), sError.c_str()); return ProfileLoadResult_FailedTampered; } - pFile.reset( pInflate ); + pFile.reset(pInflate); } // Don't load unreasonably large stats.xml files. - if( !IsMachine() ) // only check stats coming from the player + if(!IsMachine()) // only check stats coming from the player { int iBytes = pFile->GetFileSize(); - if( iBytes > MAX_PLAYER_STATS_XML_SIZE_BYTES ) + if(iBytes > MAX_PLAYER_STATS_XML_SIZE_BYTES) { - LuaHelpers::ReportScriptErrorFmt( "The file '%s' is unreasonably large. It won't be loaded.", fn.c_str() ); + LuaHelpers::ReportScriptErrorFmt("The file '%s' is unreasonably large. It won't be loaded.", fn.c_str()); return ProfileLoadResult_FailedTampered; } } - if( bRequireSignature ) + if(require_signature) { RString sStatsXmlSigFile = fn+SIGNATURE_APPEND; - RString sDontShareFile = sDir + DONT_SHARE_SIG; + RString sDontShareFile = dir + DONT_SHARE_SIG; - LOG->Trace( "Verifying don't share signature \"%s\" against \"%s\"", sDontShareFile.c_str(), sStatsXmlSigFile.c_str() ); + LOG->Trace("Verifying don't share signature \"%s\" against \"%s\"", sDontShareFile.c_str(), sStatsXmlSigFile.c_str()); // verify the stats.xml signature with the "don't share" file - if( !CryptManager::VerifyFileWithFile(sStatsXmlSigFile, sDontShareFile) ) + if(!CryptManager::VerifyFileWithFile(sStatsXmlSigFile, sDontShareFile)) { - LuaHelpers::ReportScriptErrorFmt( "The don't share check for '%s' failed. Data will be ignored.", sStatsXmlSigFile.c_str() ); + LuaHelpers::ReportScriptErrorFmt("The don't share check for '%s' failed. Data will be ignored.", sStatsXmlSigFile.c_str()); return ProfileLoadResult_FailedTampered; } - LOG->Trace( "Done." ); + LOG->Trace("Done."); // verify stats.xml - LOG->Trace( "Verifying stats.xml signature" ); - if( !CryptManager::VerifyFileWithFile(fn, sStatsXmlSigFile) ) + LOG->Trace("Verifying stats.xml signature"); + if(!CryptManager::VerifyFileWithFile(fn, sStatsXmlSigFile)) { - LuaHelpers::ReportScriptErrorFmt( "The signature check for '%s' failed. Data will be ignored.", fn.c_str() ); + LuaHelpers::ReportScriptErrorFmt("The signature check for '%s' failed. Data will be ignored.", fn.c_str()); return ProfileLoadResult_FailedTampered; } - LOG->Trace( "Done." ); + LOG->Trace("Done."); } - LOG->Trace( "Loading %s", fn.c_str() ); + LOG->Trace("Loading %s", fn.c_str()); XNode xml; - if( !XmlFileUtil::LoadFromFileShowErrors(xml, *pFile.get()) ) + if(!XmlFileUtil::LoadFromFileShowErrors(xml, *pFile.get())) return ProfileLoadResult_FailedTampered; - LOG->Trace( "Done." ); + LOG->Trace("Done."); - ProfileLoadResult ret = LoadStatsXmlFromNode(&xml); - if (ret != ProfileLoadResult_Success) - return ret; - - LoadCustomFunction( sDir ); - - return ProfileLoadResult_Success; + return LoadStatsXmlFromNode(&xml); } void Profile::LoadTypeFromDir(RString dir) @@ -1299,6 +1373,7 @@ LOG->Trace( "SaveStatsXmlToDir: %s", sDir.c_str() ); auto_ptr xml( SaveStatsXmlCreateNode() ); + sDir= sDir + PROFILEMAN->GetStatsPrefix(); // Save stats.xml RString fn = sDir + (g_bProfileDataCompress? STATS_XML_GZ:STATS_XML); @@ -2095,7 +2170,7 @@ } } -void Profile::SaveStatsWebPageToDir( RString sDir ) const +void Profile::SaveStatsWebPageToDir( RString ) const { ASSERT( PROFILEMAN != NULL ); } diff -Nru stepmania-5.0.10+dfsg/src/Profile.h stepmania-5.0.11+dfsg/src/Profile.h --- stepmania-5.0.10+dfsg/src/Profile.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Profile.h 2016-03-30 16:08:58.000000000 +0000 @@ -390,7 +390,9 @@ void swap(Profile& other); // Loading and saving + void HandleStatsPrefixChange(RString dir, bool require_signature); ProfileLoadResult LoadAllFromDir( RString sDir, bool bRequireSignature ); + ProfileLoadResult LoadStatsFromDir(RString dir, bool require_signature); void LoadTypeFromDir(RString dir); void LoadCustomFunction( RString sDir ); bool SaveAllToDir( RString sDir, bool bSignData ) const; diff -Nru stepmania-5.0.10+dfsg/src/ProfileManager.cpp stepmania-5.0.11+dfsg/src/ProfileManager.cpp --- stepmania-5.0.10+dfsg/src/ProfileManager.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ProfileManager.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -73,6 +73,7 @@ ProfileManager::ProfileManager() + :m_stats_prefix("") { m_pMachineProfile = new Profile; FOREACH_PlayerNumber(pn) @@ -1004,6 +1005,24 @@ return g_vLocalProfile.size(); } +void ProfileManager::SetStatsPrefix(RString const& prefix) +{ + m_stats_prefix= prefix; + for(size_t i= 0; i < g_vLocalProfile.size(); ++i) + { + g_vLocalProfile[i].profile.HandleStatsPrefixChange(g_vLocalProfile[i].sDir, PREFSMAN->m_bSignProfileData); + } + FOREACH_PlayerNumber(pn) + { + if(ProfileWasLoadedFromMemoryCard(pn)) + { + // This probably runs into a problem if the memory card has been removed. -Kyz + GetProfile(pn)->HandleStatsPrefixChange(m_sProfileDir[pn], PREFSMAN->m_bSignProfileData); + } + } + m_pMachineProfile->HandleStatsPrefixChange(MACHINE_PROFILE_DIR, false); +} + // lua start #include "LuaBinding.h" @@ -1011,6 +1030,17 @@ class LunaProfileManager: public Luna { public: + static int GetStatsPrefix(T* p, lua_State* L) + { + lua_pushstring(L, p->GetStatsPrefix().c_str()); + return 1; + } + static int SetStatsPrefix(T* p, lua_State* L) + { + RString prefix= SArg(1); + p->SetStatsPrefix(prefix); + COMMON_RETURN_SELF; + } static int IsPersistentProfile( T* p, lua_State *L ) { lua_pushboolean(L, p->IsPersistentProfile(Enum::Check(L, 1)) ); return 1; } static int GetProfile( T* p, lua_State *L ) { PlayerNumber pn = Enum::Check(L, 1); Profile* pP = p->GetProfile(pn); ASSERT(pP != NULL); pP->PushSelf(L); return 1; } static int GetMachineProfile( T* p, lua_State *L ) { p->GetMachineProfile()->PushSelf(L); return 1; } @@ -1088,6 +1118,8 @@ LunaProfileManager() { + ADD_METHOD(GetStatsPrefix); + ADD_METHOD(SetStatsPrefix); ADD_METHOD( IsPersistentProfile ); ADD_METHOD( GetProfile ); ADD_METHOD( GetMachineProfile ); diff -Nru stepmania-5.0.10+dfsg/src/ProfileManager.h stepmania-5.0.11+dfsg/src/ProfileManager.h --- stepmania-5.0.10+dfsg/src/ProfileManager.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ProfileManager.h 2016-03-30 16:08:58.000000000 +0000 @@ -43,6 +43,8 @@ int GetLocalProfileIndexFromID( RString sProfileID ) const; int GetNumLocalProfiles() const; + RString GetStatsPrefix() { return m_stats_prefix; } + void SetStatsPrefix(RString const& prefix); bool LoadFirstAvailableProfile( PlayerNumber pn, bool bLoadEdits = true ); // memory card or local profile bool LoadLocalProfileFromMachine( PlayerNumber pn ); @@ -119,6 +121,8 @@ // MemoryCardProfileImportSubdirs name, if the profile was imported. RString m_sProfileDirImportedFrom[NUM_PLAYERS]; + RString m_stats_prefix; + bool m_bWasLoadedFromMemoryCard[NUM_PLAYERS]; bool m_bLastLoadWasTamperedOrCorrupt[NUM_PLAYERS]; // true if Stats.xml was present, but failed to load (probably because of a signature failure) bool m_bLastLoadWasFromLastGood[NUM_PLAYERS]; // if true, then m_bLastLoadWasTamperedOrCorrupt is also true diff -Nru stepmania-5.0.10+dfsg/src/RageBitmapTexture.cpp stepmania-5.0.11+dfsg/src/RageBitmapTexture.cpp --- stepmania-5.0.10+dfsg/src/RageBitmapTexture.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/RageBitmapTexture.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -348,10 +348,10 @@ if( actualID.bStretch ) sProperties += "stretch "; if( actualID.bDither ) sProperties += "dither "; sProperties.erase( sProperties.size()-1 ); - LOG->Trace( "RageBitmapTexture: Loaded '%s' (%ux%u); %s, source %d,%d; image %d,%d.", - actualID.filename.c_str(), GetTextureWidth(), GetTextureHeight(), - sProperties.c_str(), m_iSourceWidth, m_iSourceHeight, - m_iImageWidth, m_iImageHeight ); + //LOG->Trace( "RageBitmapTexture: Loaded '%s' (%ux%u); %s, source %d,%d; image %d,%d.", + // actualID.filename.c_str(), GetTextureWidth(), GetTextureHeight(), + // sProperties.c_str(), m_iSourceWidth, m_iSourceHeight, + // m_iImageWidth, m_iImageHeight ); } void RageBitmapTexture::Destroy() diff -Nru stepmania-5.0.10+dfsg/src/RageDisplay_OGL.cpp stepmania-5.0.11+dfsg/src/RageDisplay_OGL.cpp --- stepmania-5.0.10+dfsg/src/RageDisplay_OGL.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/RageDisplay_OGL.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -1619,35 +1619,37 @@ switch( tm ) { - case TextureMode_Modulate: - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); - break; - case TextureMode_Add: - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD ); - break; - case TextureMode_Glow: - // the below function is glowmode,brighten: - if (!GLEW_ARB_texture_env_combine && !GLEW_EXT_texture_env_combine) - { - /* This is changing blend state, instead of texture state, which - * isn't great, but it's better than doing nothing. */ - glBlendFunc( GL_SRC_ALPHA, GL_ONE ); - return; - } - - // and this is glowmode,whiten: - // Source color is the diffuse color only: - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); - glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_COMBINE_RGB_EXT), GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE0_RGB_EXT), GL_PRIMARY_COLOR_EXT); - - // Source alpha is texture alpha * diffuse alpha: - glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_COMBINE_ALPHA_EXT), GL_MODULATE); - glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_OPERAND0_ALPHA_EXT), GL_SRC_ALPHA); - glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE0_ALPHA_EXT), GL_PRIMARY_COLOR_EXT); - glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_OPERAND1_ALPHA_EXT), GL_SRC_ALPHA); - glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE1_ALPHA_EXT), GL_TEXTURE); - break; + case TextureMode_Modulate: + glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); + break; + case TextureMode_Add: + glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD ); + break; + case TextureMode_Glow: + // the below function is glowmode,brighten: + if (!GLEW_ARB_texture_env_combine && !GLEW_EXT_texture_env_combine) + { + /* This is changing blend state, instead of texture state, which + * isn't great, but it's better than doing nothing. */ + glBlendFunc( GL_SRC_ALPHA, GL_ONE ); + return; + } + + // and this is glowmode,whiten: + // Source color is the diffuse color only: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_COMBINE_RGB_EXT), GL_REPLACE); + glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE0_RGB_EXT), GL_PRIMARY_COLOR_EXT); + + // Source alpha is texture alpha * diffuse alpha: + glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_COMBINE_ALPHA_EXT), GL_MODULATE); + glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_OPERAND0_ALPHA_EXT), GL_SRC_ALPHA); + glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE0_ALPHA_EXT), GL_PRIMARY_COLOR_EXT); + glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_OPERAND1_ALPHA_EXT), GL_SRC_ALPHA); + glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE1_ALPHA_EXT), GL_TEXTURE); + break; + default: + break; } } @@ -1691,15 +1693,35 @@ GLhandleARB hShader = 0; switch (effect) { - case EffectMode_Normal: hShader = 0; break; - case EffectMode_Unpremultiply: hShader = g_bUnpremultiplyShader; break; - case EffectMode_ColorBurn: hShader = g_bColorBurnShader; break; - case EffectMode_ColorDodge: hShader = g_bColorDodgeShader; break; - case EffectMode_VividLight: hShader = g_bVividLightShader; break; - case EffectMode_HardMix: hShader = g_hHardMixShader; break; - case EffectMode_Overlay: hShader = g_hOverlayShader; break; - case EffectMode_Screen: hShader = g_hScreenShader; break; - case EffectMode_YUYV422: hShader = g_hYUYV422Shader; break; + case EffectMode_Normal: + hShader = 0; + break; + case EffectMode_Unpremultiply: + hShader = g_bUnpremultiplyShader; + break; + case EffectMode_ColorBurn: + hShader = g_bColorBurnShader; + break; + case EffectMode_ColorDodge: + hShader = g_bColorDodgeShader; + break; + case EffectMode_VividLight: + hShader = g_bVividLightShader; + break; + case EffectMode_HardMix: + hShader = g_hHardMixShader; + break; + case EffectMode_Overlay: + hShader = g_hOverlayShader; + break; + case EffectMode_Screen: + hShader = g_hScreenShader; + break; + case EffectMode_YUYV422: + hShader = g_hYUYV422Shader; + break; + default: + break; } DebugFlushGLErrors(); @@ -1726,18 +1748,27 @@ { switch( effect ) { - case EffectMode_Normal: return true; - case EffectMode_Unpremultiply: return g_bUnpremultiplyShader != 0; - case EffectMode_ColorBurn: return g_bColorBurnShader != 0; - case EffectMode_ColorDodge: return g_bColorDodgeShader != 0; - case EffectMode_VividLight: return g_bVividLightShader != 0; - case EffectMode_HardMix: return g_hHardMixShader != 0; - case EffectMode_Overlay: return g_hOverlayShader != 0; - case EffectMode_Screen: return g_hScreenShader != 0; - case EffectMode_YUYV422: return g_hYUYV422Shader != 0; + case EffectMode_Normal: + return true; + case EffectMode_Unpremultiply: + return g_bUnpremultiplyShader != 0; + case EffectMode_ColorBurn: + return g_bColorBurnShader != 0; + case EffectMode_ColorDodge: + return g_bColorDodgeShader != 0; + case EffectMode_VividLight: + return g_bVividLightShader != 0; + case EffectMode_HardMix: + return g_hHardMixShader != 0; + case EffectMode_Overlay: + return g_hOverlayShader != 0; + case EffectMode_Screen: + return g_hScreenShader != 0; + case EffectMode_YUYV422: + return g_hYUYV422Shader != 0; + default: + return false; } - - return false; } void RageDisplay_Legacy::SetBlendMode( BlendMode mode ) diff -Nru stepmania-5.0.10+dfsg/src/RageFile.cpp stepmania-5.0.11+dfsg/src/RageFile.cpp --- stepmania-5.0.10+dfsg/src/RageFile.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/RageFile.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -320,6 +320,29 @@ class LunaRageFile: public Luna { public: + static void safely_opened(T* p, lua_State* L) + { + if(!p->IsOpen()) + { + luaL_error(L, "File '%s' is not open.", p->GetPath().c_str()); + } + } + static void can_safely_read(T* p, lua_State* L) + { + safely_opened(p, L); + if(!(p->GetMode()&RageFile::READ)) + { + luaL_error(L, "File '%s' is not open for reading.", p->GetPath().c_str()); + } + } + static void can_safely_write(T* p, lua_State* L) + { + safely_opened(p, L); + if(!(p->GetMode()&RageFile::WRITE)) + { + luaL_error(L, "File '%s' is not open for writing.", p->GetPath().c_str()); + } + } static int destroy( T* p, lua_State *L ) { SAFE_DELETE(p); @@ -340,6 +363,7 @@ static int Write( T* p, lua_State *L ) { + can_safely_write(p, L); lua_pushinteger( L, p->Write( SArg(1) ) ); return 1; } @@ -352,6 +376,7 @@ static int Read( T* p, lua_State *L ) { + can_safely_read(p, L); RString string; p->Read(string); lua_pushstring( L, string ); @@ -360,6 +385,7 @@ static int ReadBytes( T* p, lua_State *L ) { + can_safely_read(p, L); RString string; p->Read( string, IArg(1) ); lua_pushstring( L, string ); @@ -368,18 +394,21 @@ static int Seek( T* p, lua_State *L ) { + can_safely_read(p, L); lua_pushinteger( L, p->Seek( IArg(1) ) ); return 1; } static int Tell( T* p, lua_State *L ) { + can_safely_read(p, L); lua_pushinteger( L, p->Tell() ); return 1; } static int GetLine( T* p, lua_State *L ) { + can_safely_read(p, L); RString string; p->GetLine(string); lua_pushstring( L, string ); @@ -388,6 +417,7 @@ static int PutLine( T* p, lua_State *L ) { + can_safely_write(p, L); lua_pushinteger( L, p->PutLine( SArg(1) ) ); return 1; } @@ -408,6 +438,7 @@ static int AtEOF( T* p, lua_State *L ) { + can_safely_read(p, L); lua_pushboolean( L, p->AtEOF() ); return 1; } diff -Nru stepmania-5.0.10+dfsg/src/RageFile.h stepmania-5.0.11+dfsg/src/RageFile.h --- stepmania-5.0.10+dfsg/src/RageFile.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/RageFile.h 2016-03-30 16:08:58.000000000 +0000 @@ -46,6 +46,7 @@ bool Open( const RString& path, int mode = READ ); void Close(); bool IsOpen() const { return m_File != NULL; } + int GetMode() const { return m_Mode; } bool AtEOF() const; RString GetError() const; diff -Nru stepmania-5.0.10+dfsg/src/RageFileManager.cpp stepmania-5.0.11+dfsg/src/RageFileManager.cpp --- stepmania-5.0.10+dfsg/src/RageFileManager.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/RageFileManager.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -432,6 +432,10 @@ UnreferenceAllDrivers( apDriverList ); + // Remove files that start with ._ from the list because these are special + // OS X files that cause interference on other platforms. -Kyz + StripMacResourceForks(AddTo); + if( iDriversThatReturnedFiles > 1 ) { /* More than one driver returned files. Remove duplicates (case-insensitively). */ diff -Nru stepmania-5.0.10+dfsg/src/RageInputDevice.cpp stepmania-5.0.11+dfsg/src/RageInputDevice.cpp --- stepmania-5.0.10+dfsg/src/RageInputDevice.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/RageInputDevice.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -26,6 +26,7 @@ g_mapNamesToString[KEY_PERIOD] = "period"; g_mapNamesToString[KEY_COMMA] = "comma"; + g_mapNamesToString[KEY_COLON] = "colon"; g_mapNamesToString[KEY_SPACE] = "space"; g_mapNamesToString[KEY_DEL] = "delete"; g_mapNamesToString[KEY_BACKSLASH] = "backslash"; diff -Nru stepmania-5.0.10+dfsg/src/RageMath.cpp stepmania-5.0.11+dfsg/src/RageMath.cpp --- stepmania-5.0.10+dfsg/src/RageMath.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/RageMath.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -595,60 +595,47 @@ pOut->m[j][i] = pIn->m[i][j]; } -float RageFastSin( float x ) +static const unsigned int sine_table_size= 1024; +static const unsigned int sine_index_mod= sine_table_size * 2; +static const double sine_table_index_mult= static_cast(sine_index_mod) / (PI*2); +static float sine_table[sine_table_size]; +struct sine_initter { - // from 0 to PI - // sizeof(table) == 4096 == one page of memory in Windows - static float table[1024]; - - static bool bInited = false; - if( !bInited ) + sine_initter() { - bInited = true; - for( unsigned i=0; i=0 && fRemainder<=1 ); - - float fValue[ARRAYLEN(iSampleIndex)]; - for( unsigned i=0; i= int(ARRAYLEN(table)) ) // PI <= iSample < 2*PI - { - // sin(x) == -sin(PI+x) - iSample -= ARRAYLEN(table); - DEBUG_ASSERT( iSample>=0 && iSample(index); + int second_index= (first_index + 1) % sine_index_mod; + float remainder= index - first_index; + first_index%= sine_index_mod; + float first= 0.0f; + float second= 0.0f; +#define SET_SAMPLE(sample) \ + if(sample##_index >= sine_table_size) \ + { \ + sample= -sine_table[sample##_index - sine_table_size]; \ + } \ + else \ + { \ + sample= sine_table[sample##_index]; \ } - - return SCALE( fRemainder, 0.0f, 1.0f, fValue[0], fValue[1] ); + SET_SAMPLE(first); + SET_SAMPLE(second); +#undef SET_SAMPLE + float result= lerp(remainder, first, second); + return result; } float RageFastCos( float x ) diff -Nru stepmania-5.0.10+dfsg/src/RageSound.cpp stepmania-5.0.11+dfsg/src/RageSound.cpp --- stepmania-5.0.10+dfsg/src/RageSound.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/RageSound.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -86,7 +86,10 @@ m_bPlaying = false; m_bDeleteWhenFinished = false; - delete m_pSource; + if(m_pSource != NULL) + { + delete m_pSource; + } if( cpy.m_pSource ) m_pSource = cpy.m_pSource->Copy(); else @@ -104,7 +107,10 @@ LockMut(m_Mutex); - delete m_pSource; + if(m_pSource != NULL) + { + delete m_pSource; + } m_pSource = NULL; m_sFilePath = ""; diff -Nru stepmania-5.0.10+dfsg/src/RageSoundReader_Vorbisfile.cpp stepmania-5.0.11+dfsg/src/RageSoundReader_Vorbisfile.cpp --- stepmania-5.0.10+dfsg/src/RageSoundReader_Vorbisfile.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/RageSoundReader_Vorbisfile.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -46,6 +46,11 @@ RString errstr; switch( err ) { + // OV_FALSE, OV_EOF, and OV_HOLE were added to this switch because + // OV_EOF cases were being reported as unknown. -Kyz + case OV_FALSE: errstr = "OV_FALSE"; break; + case OV_EOF: errstr = "OV_EOF"; break; + case OV_HOLE: errstr = "OV_HOLE"; break; /* XXX: In the case of OV_EREAD, can we snoop at errno? */ case OV_EREAD: errstr = "Read error"; break; case OV_EFAULT: errstr = "Internal error"; break; @@ -123,7 +128,7 @@ if(ret < 0) { /* Returns OV_EINVAL on EOF. */ - if( ret == OV_EINVAL ) + if( ret == OV_EINVAL || ret == OV_EOF) { eof = true; return 0; diff -Nru stepmania-5.0.10+dfsg/src/RageSurface_Save_PNG.cpp stepmania-5.0.11+dfsg/src/RageSurface_Save_PNG.cpp --- stepmania-5.0.10+dfsg/src/RageSurface_Save_PNG.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/RageSurface_Save_PNG.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -90,7 +90,7 @@ png_info *pInfo = png_create_info_struct(pPng); if( pInfo == NULL ) { - png_destroy_read_struct( &pPng, NULL, NULL ); + png_destroy_write_struct( &pPng, NULL ); if( bDeleteImg ) delete pImg; sprintf( szErrorbuf, "creating png_create_info_struct failed"); @@ -99,7 +99,7 @@ if( setjmp(png_jmpbuf(pPng)) ) { - png_destroy_read_struct( &pPng, &pInfo, NULL ); + png_destroy_write_struct( &pPng, &pInfo ); return false; } diff -Nru stepmania-5.0.10+dfsg/src/RageTextureManager.cpp stepmania-5.0.11+dfsg/src/RageTextureManager.cpp --- stepmania-5.0.10+dfsg/src/RageTextureManager.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/RageTextureManager.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -233,7 +233,7 @@ void RageTextureManager::DeleteTexture( RageTexture *t ) { ASSERT( t->m_iRefCount == 0 ); - LOG->Trace( "RageTextureManager: deleting '%s'.", t->GetID().filename.c_str() ); + //LOG->Trace( "RageTextureManager: deleting '%s'.", t->GetID().filename.c_str() ); map::iterator id_entry= m_texture_ids_by_pointer.find(t); diff -Nru stepmania-5.0.10+dfsg/src/ScoreKeeperNormal.cpp stepmania-5.0.11+dfsg/src/ScoreKeeperNormal.cpp --- stepmania-5.0.10+dfsg/src/ScoreKeeperNormal.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScoreKeeperNormal.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -79,7 +79,7 @@ /* Compute RadarValues before applying any user-selected mods. Apply * Course mods and count them in the "pre" RadarValues because they're * forced and not chosen by the user. */ - NoteDataUtil::TransformNoteData( ndPre, aa, pSteps->m_StepsType, pSong ); + NoteDataUtil::TransformNoteData(ndPre, *(pSteps->GetTimingData()), aa, pSteps->m_StepsType, pSong ); /* Apply user transforms to find out how the notes will really look. * @@ -89,7 +89,7 @@ * the last call to StoreSelectedOptions and the modifiers list, but that'd * mean moving the queues in ScreenGameplay to GameState ... */ NoteData ndPost = ndPre; - NoteDataUtil::TransformNoteData( ndPost, m_pPlayerState->m_PlayerOptions.GetStage(), pSteps->m_StepsType ); + NoteDataUtil::TransformNoteData(ndPost, *(pSteps->GetTimingData()), m_pPlayerState->m_PlayerOptions.GetStage(), pSteps->m_StepsType); GAMESTATE->SetProcessedTimingData(pSteps->GetTimingData()); // XXX: Not sure why but NoteDataUtil::CalculateRadarValues segfaults without this iTotalPossibleDancePoints += this->GetPossibleDancePoints( &ndPre, &ndPost, pSteps->GetTimingData(), pSong->m_fMusicLengthSeconds ); diff -Nru stepmania-5.0.10+dfsg/src/Screen.cpp stepmania-5.0.11+dfsg/src/Screen.cpp --- stepmania-5.0.10+dfsg/src/Screen.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Screen.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -273,6 +273,11 @@ m_sNextScreen= name; } +void Screen::SetPrevScreenName(RString const& name) +{ + m_sPrevScreen= name; +} + RString Screen::GetPrevScreen() const { if( !m_sPrevScreen.empty() ) @@ -411,6 +416,7 @@ static int GetNextScreenName( T* p, lua_State *L ) { lua_pushstring(L, p->GetNextScreenName() ); return 1; } static int SetNextScreenName( T* p, lua_State *L ) { p->SetNextScreenName(SArg(1)); COMMON_RETURN_SELF; } static int GetPrevScreenName( T* p, lua_State *L ) { lua_pushstring(L, p->GetPrevScreen() ); return 1; } + static int SetPrevScreenName( T* p, lua_State *L ) { p->SetPrevScreenName(SArg(1)); COMMON_RETURN_SELF; } static int lockinput( T* p, lua_State *L ) { p->SetLockInputSecs(FArg(1)); COMMON_RETURN_SELF; } DEFINE_METHOD( GetScreenType, GetScreenType() ) @@ -447,6 +453,7 @@ ADD_METHOD( GetNextScreenName ); ADD_METHOD( SetNextScreenName ); ADD_METHOD( GetPrevScreenName ); + ADD_METHOD( SetPrevScreenName ); ADD_METHOD( PostScreenMessage ); ADD_METHOD( lockinput ); ADD_METHOD( GetScreenType ); diff -Nru stepmania-5.0.10+dfsg/src/ScreenEdit.cpp stepmania-5.0.11+dfsg/src/ScreenEdit.cpp --- stepmania-5.0.10+dfsg/src/ScreenEdit.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenEdit.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -4,6 +4,7 @@ #include "ScreenEdit.h" #include "ActorUtil.h" #include "AdjustSync.h" +#include "ArrowEffects.h" #include "BackgroundUtil.h" #include "CommonMetrics.h" #include "Foreach.h" @@ -1050,7 +1051,15 @@ true, EditMode_Full, true, true, 0, NULL ) ); - +// Ugh, I don't like making this global pointer to clipboardFullTiming, but +// it's the only way to make it visible to EnabledIfClipboardTimingIsSafe for +// making sure it's safe to paste as the timing data for the Steps/Song. -Kyz +static TimingData* clipboard_full_timing= NULL; +static bool EnabledIfClipboardTimingIsSafe(); +static bool EnabledIfClipboardTimingIsSafe() +{ + return clipboard_full_timing != NULL && clipboard_full_timing->IsSafeFullTiming(); +} static MenuDef g_TimingDataInformation( "ScreenMiniMenuTimingDataInformation", MenuRowDef(ScreenEdit::beat_0_offset, @@ -1101,6 +1110,9 @@ MenuRowDef(ScreenEdit::copy_timing_in_region, "Copy timing in region", true, EditMode_Full, true, true, 0, NULL), + MenuRowDef(ScreenEdit::clear_timing_in_region, + "Clear timing in region", + true, EditMode_Full, true, true, 0, NULL), MenuRowDef(ScreenEdit::paste_timing_from_clip, "Paste timing from clipboard", true, EditMode_Full, true, true, 0, NULL), @@ -1109,7 +1121,7 @@ true, EditMode_Full, true, true, 0, NULL ), MenuRowDef(ScreenEdit::paste_full_timing, "Paste timing data", - true, EditMode_Full, true, true, 0, NULL ), + EnabledIfClipboardTimingIsSafe, EditMode_Full, true, true, 0, NULL ), MenuRowDef(ScreenEdit::erase_step_timing, "Erase step timing", true, EditMode_Full, true, true, 0, NULL ) @@ -1501,6 +1513,7 @@ m_Clipboard.SetNumTracks( m_NoteDataEdit.GetNumTracks() ); clipboardFullTiming = GAMESTATE->m_pCurSong->m_SongTiming; // always have a backup. + clipboard_full_timing= &clipboardFullTiming; m_bHasUndo = false; m_Undo.SetNumTracks( m_NoteDataEdit.GetNumTracks() ); @@ -1711,6 +1724,7 @@ // if( m_EditState == STATE_RECORDING || m_EditState == STATE_PLAYING ) { + ArrowEffects::Update(); /* * If any arrow is being held, continue for up to half a second after * the end marker. This makes it possible to start a hold note near @@ -3222,13 +3236,6 @@ if( iCol != -1 ) m_Player->Step( iCol, -1, input.DeviceI.ts, false, bRelease ); return true; - case GameButtonType_Fret: - if( iCol != -1 ) - m_Player->Fret( iCol, -1, input.DeviceI.ts, false, bRelease ); - return true; - case GameButtonType_Strum: - m_Player->Strum( iCol, -1, input.DeviceI.ts, false, bRelease ); - return true; default: break; } @@ -3237,7 +3244,7 @@ } } - if( gbt == GameButtonType_INVALID && input.type == IET_FIRST_PRESS ) + if( gbt == GameButtonType_Menu && input.type == IET_FIRST_PRESS ) { switch( EditB ) { @@ -4413,6 +4420,12 @@ void ScreenEdit::SetDirty(bool dirty) { + if(EDIT_MODE.GetValue() != EditMode_Full) + { + m_dirty= false; + m_next_autosave_time= -1.0f; + return; + } if(dirty) { if(!m_dirty) @@ -5882,17 +5895,21 @@ break; } case shift_timing_in_region_down: - m_timing_is_being_copied= false; + m_timing_change_menu_purpose= menu_is_for_shifting; m_timing_rows_being_shitted= GetRowsFromAnswers(c, iAnswers); DisplayTimingChangeMenu(); break; case shift_timing_in_region_up: - m_timing_is_being_copied= false; + m_timing_change_menu_purpose= menu_is_for_shifting; m_timing_rows_being_shitted= -GetRowsFromAnswers(c, iAnswers); DisplayTimingChangeMenu(); break; case copy_timing_in_region: - m_timing_is_being_copied= true; + m_timing_change_menu_purpose= menu_is_for_copying; + DisplayTimingChangeMenu(); + break; + case clear_timing_in_region: + m_timing_change_menu_purpose= menu_is_for_clearing; DisplayTimingChangeMenu(); break; case paste_timing_from_clip: @@ -5905,7 +5922,7 @@ } case paste_full_timing: { - if (GAMESTATE->m_bIsUsingStepTiming) + if(GAMESTATE->m_bIsUsingStepTiming) { GAMESTATE->m_pCurSteps[PLAYER_1]->m_Timing = clipboardFullTiming; } @@ -5977,14 +5994,19 @@ { end= MAX_NOTE_ROW; } - if(m_timing_is_being_copied) + switch(m_timing_change_menu_purpose) { - clipboardFullTiming.Clear(); - GetAppropriateTiming().CopyRange(begin, end, change_type, 0, clipboardFullTiming); - } - else - { - GetAppropriateTimingForUpdate().ShiftRange(begin, end, change_type, m_timing_rows_being_shitted); + case menu_is_for_copying: + clipboardFullTiming.Clear(); + GetAppropriateTiming().CopyRange(begin, end, change_type, 0, clipboardFullTiming); + break; + case menu_is_for_shifting: + GetAppropriateTimingForUpdate().ShiftRange(begin, end, change_type, m_timing_rows_being_shitted); + break; + case menu_is_for_clearing: + GetAppropriateTimingForUpdate().ClearRange(begin, end, change_type); + break; + default: break; } } diff -Nru stepmania-5.0.10+dfsg/src/ScreenEdit.h stepmania-5.0.11+dfsg/src/ScreenEdit.h --- stepmania-5.0.10+dfsg/src/ScreenEdit.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenEdit.h 2016-03-30 16:08:58.000000000 +0000 @@ -268,7 +268,13 @@ /** @brief Display the TimingData menu for editing song and step timing. */ void DisplayTimingMenu(); - bool m_timing_is_being_copied; // Instead of being shifted. + enum TimingChangeMenuPurpose + { + menu_is_for_copying, + menu_is_for_shifting, + menu_is_for_clearing + }; + TimingChangeMenuPurpose m_timing_change_menu_purpose; int m_timing_rows_being_shitted; // How far the timing is being shitted. void DisplayTimingChangeMenu(); @@ -610,6 +616,7 @@ shift_timing_in_region_down, shift_timing_in_region_up, copy_timing_in_region, + clear_timing_in_region, paste_timing_from_clip, copy_full_timing, paste_full_timing, diff -Nru stepmania-5.0.10+dfsg/src/ScreenGameplay.cpp stepmania-5.0.11+dfsg/src/ScreenGameplay.cpp --- stepmania-5.0.10+dfsg/src/ScreenGameplay.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenGameplay.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -1959,9 +1959,7 @@ pi->GetPlayerStageStats()->m_bFailed |= bAllHumanHaveBigMissCombo; pi->GetPlayerStageStats()->m_bDisqualified |= bGiveUpTimerFired; // Don't disqualify if failing for miss combo. The player should still be eligable for a high score on courses. } - ResetGiveUpTimers(false); - if(GIVING_UP_GOES_TO_PREV_SCREEN && !m_skipped_song) { BeginBackingOutFromGameplay(); @@ -2568,19 +2566,12 @@ GameButtonType gbt = GAMESTATE->m_pCurGame->GetPerButtonInfo(input.GameI.button)->m_gbt; switch( gbt ) { - case GameButtonType_INVALID: + case GameButtonType_Menu: return false; case GameButtonType_Step: if( iCol != -1 ) pi.m_pPlayer->Step( iCol, -1, input.DeviceI.ts, false, bRelease ); return true; - case GameButtonType_Fret: - if( iCol != -1 ) - pi.m_pPlayer->Fret( iCol, -1, input.DeviceI.ts, false, bRelease ); - return true; - case GameButtonType_Strum: - pi.m_pPlayer->Strum( iCol, -1, input.DeviceI.ts, false, bRelease ); - return true; } } } @@ -3274,6 +3265,11 @@ FLOAT_TABLE_INTERFACE(HasteAddAmounts, HasteAddAmounts, AddAmountsValid); FLOAT_NO_SPEED_INTERFACE(HasteTimeBetweenUpdates, HasteTimeBetweenUpdates, (v > 0)); FLOAT_NO_SPEED_INTERFACE(HasteLifeSwitchPoint, HasteLifeSwitchPoint, (v >= 0 && v <= 1)); + static int begin_backing_out(T* p, lua_State* L) + { + p->BeginBackingOutFromGameplay(); + COMMON_RETURN_SELF; + } static int GetTrueBPS(T* p, lua_State* L) { PlayerNumber pn= Enum::Check(L, 1); @@ -3300,6 +3296,7 @@ ADD_METHOD( HasteAddAmounts ); ADD_METHOD( HasteTimeBetweenUpdates ); ADD_METHOD( HasteLifeSwitchPoint ); + ADD_METHOD(begin_backing_out); ADD_METHOD( GetTrueBPS ); } }; diff -Nru stepmania-5.0.10+dfsg/src/ScreenGameplay.h stepmania-5.0.11+dfsg/src/ScreenGameplay.h --- stepmania-5.0.10+dfsg/src/ScreenGameplay.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenGameplay.h 2016-03-30 16:08:58.000000000 +0000 @@ -176,6 +176,7 @@ void FailFadeRemovePlayer(PlayerInfo* pi); void FailFadeRemovePlayer(PlayerNumber pn); + void BeginBackingOutFromGameplay(); vector m_HasteTurningPoints; // Values at which the meaning of GAMESTATE->m_fHasteRate changes. vector m_HasteAddAmounts; // Amounts that are added to speed depending on what turning point has been passed. @@ -225,7 +226,6 @@ void PlayAnnouncer( const RString &type, float fSeconds ) { PlayAnnouncer(type, fSeconds, &m_fTimeSinceLastDancingComment); } void UpdateLights(); void SendCrossedMessages(); - void BeginBackingOutFromGameplay(); void PlayTicks(); void UpdateSongPosition( float fDeltaTime ); diff -Nru stepmania-5.0.10+dfsg/src/ScreenGameplaySyncMachine.cpp stepmania-5.0.11+dfsg/src/ScreenGameplaySyncMachine.cpp --- stepmania-5.0.10+dfsg/src/ScreenGameplaySyncMachine.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenGameplaySyncMachine.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -16,6 +16,8 @@ void ScreenGameplaySyncMachine::Init() { m_bForceNoNetwork = true; + // The server crashes if syncing is attempted while connected to SMO. -Kyz + NSMAN->CloseConnection(); GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR ); GAMESTATE->SetCurrentStyle( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame), PLAYER_INVALID ); diff -Nru stepmania-5.0.10+dfsg/src/Screen.h stepmania-5.0.11+dfsg/src/Screen.h --- stepmania-5.0.10+dfsg/src/Screen.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Screen.h 2016-03-30 16:08:58.000000000 +0000 @@ -124,6 +124,7 @@ RString GetNextScreenName() const; RString GetPrevScreen() const; void SetNextScreenName(RString const& name); + void SetPrevScreenName(RString const& name); bool PassInputToLua(const InputEventPlus& input); void AddInputCallbackFromStack(lua_State* L); diff -Nru stepmania-5.0.10+dfsg/src/ScreenJukebox.cpp stepmania-5.0.11+dfsg/src/ScreenJukebox.cpp --- stepmania-5.0.10+dfsg/src/ScreenJukebox.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenJukebox.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -173,6 +173,8 @@ static LocalizedString NO_MATCHING_STEPS("ScreenJukebox", "NoMatchingSteps"); void ScreenJukebox::Init() { + // The server crashes if syncing is attempted while connected to SMO. -Kyz + NSMAN->CloseConnection(); // ScreenJukeboxMenu must set this ASSERT( GAMESTATE->GetCurrentStyle(PLAYER_INVALID) != NULL ); GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR ); diff -Nru stepmania-5.0.10+dfsg/src/ScreenManager.cpp stepmania-5.0.11+dfsg/src/ScreenManager.cpp --- stepmania-5.0.10+dfsg/src/ScreenManager.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenManager.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -72,6 +72,7 @@ #include "ScreenDimensions.h" #include "Foreach.h" #include "ActorUtil.h" +#include "InputEventPlus.h" ScreenManager* SCREENMAN = NULL; // global and accessible from anywhere in our program @@ -366,6 +367,24 @@ return false; } +bool ScreenManager::get_input_redirected(PlayerNumber pn) +{ + if(pn >= m_input_redirected.size()) + { + return false; + } + return m_input_redirected[pn]; +} + +void ScreenManager::set_input_redirected(PlayerNumber pn, bool redir) +{ + while(pn >= m_input_redirected.size()) + { + m_input_redirected.push_back(false); + } + m_input_redirected[pn]= redir; +} + /* Pop the top screen off the stack, sending SM_LoseFocus messages and * returning the message the popped screen wants sent to the new top * screen. Does not send SM_GainFocus. */ @@ -534,7 +553,10 @@ if( g_ScreenStack.empty() ) return; - g_ScreenStack.back().m_pScreen->Input( input ); + if(!get_input_redirected(input.pn)) + { + g_ScreenStack.back().m_pScreen->Input( input ); + } g_ScreenStack.back().m_pScreen->PassInputToLua( input ); } @@ -620,7 +642,7 @@ } */ - TEXTUREMAN->DiagnosticOutput(); + //TEXTUREMAN->DiagnosticOutput(); } void ScreenManager::GroupScreen( const RString &sScreenName ) @@ -945,6 +967,32 @@ //static int GetScreenStackSize( T* p, lua_State *L ) { lua_pushnumber( L, ScreenManagerUtil::g_ScreenStack.size() ); return 1; } static int ReloadOverlayScreens( T* p, lua_State *L ) { p->ReloadOverlayScreens(); COMMON_RETURN_SELF; } + static int get_input_redirected(T* p, lua_State* L) + { + PlayerNumber pn= Enum::Check(L, 1); + lua_pushboolean(L, p->get_input_redirected(pn)); + return 1; + } + static int set_input_redirected(T* p, lua_State* L) + { + PlayerNumber pn= Enum::Check(L, 1); + p->set_input_redirected(pn, BArg(2)); + COMMON_RETURN_SELF; + } + +#define SCRMAN_PLAY_SOUND(sound_name) \ + static int Play##sound_name(T* p, lua_State* L) \ + { \ + p->Play##sound_name(); \ + COMMON_RETURN_SELF; \ + } + SCRMAN_PLAY_SOUND(InvalidSound); + SCRMAN_PLAY_SOUND(StartSound); + SCRMAN_PLAY_SOUND(CoinSound); + SCRMAN_PLAY_SOUND(CancelSound); + SCRMAN_PLAY_SOUND(ScreenshotSound); +#undef SCRMAN_PLAY_SOUND + LunaScreenManager() { ADD_METHOD( SetNewScreen ); @@ -955,6 +1003,12 @@ ADD_METHOD( AddNewScreenToTop ); //ADD_METHOD( GetScreenStackSize ); ADD_METHOD( ReloadOverlayScreens ); + ADD_METHOD(PlayInvalidSound); + ADD_METHOD(PlayStartSound); + ADD_METHOD(PlayCoinSound); + ADD_METHOD(PlayCancelSound); + ADD_METHOD(PlayScreenshotSound); + ADD_GET_SET_METHODS(input_redirected); } }; diff -Nru stepmania-5.0.10+dfsg/src/ScreenManager.h stepmania-5.0.11+dfsg/src/ScreenManager.h --- stepmania-5.0.10+dfsg/src/ScreenManager.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenManager.h 2016-03-30 16:08:58.000000000 +0000 @@ -3,6 +3,7 @@ #include "ScreenMessage.h" #include "RageSound.h" +#include "PlayerNumber.h" class Actor; class Screen; @@ -64,6 +65,9 @@ * @return true if it's on the stack while not on the bottom, or false otherwise. */ bool IsStackedScreen( const Screen *pScreen ) const; + bool get_input_redirected(PlayerNumber pn); + void set_input_redirected(PlayerNumber pn, bool redir); + // Lua void PushSelf( lua_State *L ); @@ -86,6 +90,13 @@ // It's "AfterInput" because the debug overlay carries out actions in Input. bool m_bReloadOverlayScreensAfterInput; + // m_input_redirected exists to allow the theme to prevent input being + // passed to the normal Screen::Input function, on a per-player basis. + // Input is still passed to lua callbacks, so it's intended for the case + // where someone has a custom menu on a screen and needs to disable normal + // input for navigating the custom menu to work. -Kyz + std::vector m_input_redirected; + Screen *MakeNewScreen( const RString &sName ); void LoadDelayedScreen(); bool ActivatePreparedScreenAndBackground( const RString &sScreenName ); diff -Nru stepmania-5.0.10+dfsg/src/ScreenOptionsMasterPrefs.cpp stepmania-5.0.11+dfsg/src/ScreenOptionsMasterPrefs.cpp --- stepmania-5.0.10+dfsg/src/ScreenOptionsMasterPrefs.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenOptionsMasterPrefs.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -248,12 +248,19 @@ *s = THEME->GetThemeDisplayName( *s ); } -static void DisplayResolutionChoices( vector &out ) +static DisplayResolutions display_resolution_list; +static void cache_display_resolution_list() { - DisplayResolutions d; - DISPLAY->GetDisplayResolutions( d ); + if(display_resolution_list.empty()) + { + DISPLAY->GetDisplayResolutions(display_resolution_list); + } +} - FOREACHS_CONST( DisplayResolution, d, iter ) +static void DisplayResolutionChoices( vector &out ) +{ + cache_display_resolution_list(); + FOREACHS_CONST( DisplayResolution, display_resolution_list, iter ) { RString s = ssprintf("%dx%d", iter->iWidth, iter->iHeight); out.push_back( s ); @@ -574,18 +581,19 @@ static void DisplayResolutionM( int &sel, bool ToSel, const ConfOption *pConfOption ) { - vector v; + static vector res_choices; - DisplayResolutions d; - DISPLAY->GetDisplayResolutions( d ); - - FOREACHS_CONST( DisplayResolution, d, iter ) + if(res_choices.empty()) { - v.push_back( res_t(iter->iWidth, iter->iHeight) ); + cache_display_resolution_list(); + FOREACHS_CONST(DisplayResolution, display_resolution_list, iter) + { + res_choices.push_back(res_t(iter->iWidth, iter->iHeight)); + } } res_t sel_res( PREFSMAN->m_iDisplayWidth, PREFSMAN->m_iDisplayHeight ); - MoveMap( sel, sel_res, ToSel, &v[0], v.size() ); + MoveMap( sel, sel_res, ToSel, &res_choices[0], res_choices.size()); if( !ToSel ) { PREFSMAN->m_iDisplayWidth.Set( sel_res.w ); @@ -702,6 +710,11 @@ if( !g_ConfOptions.empty() ) return; + // Clear the display_resolution_list so that we don't get problems from + // caching it. If the DisplayResolution option row is on the screen, it'll + // recache the list. -Kyz + display_resolution_list.clear(); + // There are a couple ways of getting the current preference column or turning // a new choice in the interface into a new preference. The easiest is when // the interface choices are an exact mapping to the values the preference diff -Nru stepmania-5.0.10+dfsg/src/ScreenSelectMusic.cpp stepmania-5.0.11+dfsg/src/ScreenSelectMusic.cpp --- stepmania-5.0.10+dfsg/src/ScreenSelectMusic.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenSelectMusic.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -379,7 +379,7 @@ g_bSampleMusicWaiting = false; GameSoundManager::PlayMusicParams PlayParams; - PlayParams.sFile = m_sSampleMusicToPlay; + PlayParams.sFile = HandleLuaMusicFile(m_sSampleMusicToPlay); PlayParams.pTiming = m_pSampleMusicTimingData; PlayParams.bForceLoop = SAMPLE_MUSIC_LOOPS; PlayParams.fStartSecond = m_fSampleStartSeconds; @@ -1859,6 +1859,11 @@ case SampleMusicPreviewMode_LastSong: // fall through // play the sample music m_sSampleMusicToPlay = pSong->GetPreviewMusicPath(); + if(!m_sSampleMusicToPlay.empty() && ActorUtil::GetFileType(m_sSampleMusicToPlay) != FT_Sound) + { + LuaHelpers::ReportScriptErrorFmt("Music file %s for song is not a sound file, ignoring.", m_sSampleMusicToPlay.c_str()); + m_sSampleMusicToPlay= ""; + } m_pSampleMusicTimingData = &pSong->m_SongTiming; m_fSampleStartSeconds = pSong->GetPreviewStartSeconds(); m_fSampleLengthSeconds = pSong->m_fMusicSampleLengthSeconds; @@ -1995,6 +2000,23 @@ m_pSongAwaitingDeletionConfirmation = NULL; } +bool ScreenSelectMusic::can_open_options_list(PlayerNumber pn) +{ + if(!USE_OPTIONS_LIST) + { + return false; + } + if(pn >= NUM_PLAYERS) + { + return false; + } + if(m_OptionsList[pn].IsOpened()) + { + return false; + } + return true; +} + // lua start #include "LuaBinding.h" @@ -2008,13 +2030,28 @@ p->GetMusicWheel()->PushSelf(L); return 1; } - static int OpenOptionsList( T* p, lua_State *L ) { PlayerNumber pn = Enum::Check(L, 1); p->OpenOptionsList(pn); COMMON_RETURN_SELF; } + static int OpenOptionsList( T* p, lua_State *L ) + { + PlayerNumber pn = Enum::Check(L, 1); + if(p->can_open_options_list(pn)) + { + p->OpenOptionsList(pn); + } + COMMON_RETURN_SELF; + } + static int CanOpenOptionsList( T* p, lua_State *L ) + { + PlayerNumber pn = Enum::Check(L, 1); + lua_pushboolean(L, p->can_open_options_list(pn)); + return 1; + } LunaScreenSelectMusic() { ADD_METHOD( GetGoToOptions ); ADD_METHOD( GetMusicWheel ); ADD_METHOD( OpenOptionsList ); + ADD_METHOD( CanOpenOptionsList ); } }; diff -Nru stepmania-5.0.10+dfsg/src/ScreenSelectMusic.h stepmania-5.0.11+dfsg/src/ScreenSelectMusic.h --- stepmania-5.0.10+dfsg/src/ScreenSelectMusic.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenSelectMusic.h 2016-03-30 16:08:58.000000000 +0000 @@ -50,6 +50,8 @@ void OpenOptionsList( PlayerNumber pn ); void OnConfirmSongDeletion(); + bool can_open_options_list(PlayerNumber pn); + // Lua virtual void PushSelf( lua_State *L ); diff -Nru stepmania-5.0.10+dfsg/src/ScreenTextEntry.cpp stepmania-5.0.11+dfsg/src/ScreenTextEntry.cpp --- stepmania-5.0.10+dfsg/src/ScreenTextEntry.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenTextEntry.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -214,10 +214,14 @@ { switch( input.type ) { - case IET_FIRST_PRESS: - bLCtrl = true; break; - case IET_RELEASE: - bLCtrl = false; break; + case IET_FIRST_PRESS: + bLCtrl = true; + break; + case IET_RELEASE: + bLCtrl = false; + break; + default: + break; } } @@ -225,10 +229,14 @@ { switch( input.type ) { - case IET_FIRST_PRESS: - bRCtrl = true; break; - case IET_RELEASE: - bRCtrl = false; break; + case IET_FIRST_PRESS: + bRCtrl = true; + break; + case IET_RELEASE: + bRCtrl = false; + break; + default: + break; } } diff -Nru stepmania-5.0.10+dfsg/src/ScreenWithMenuElements.cpp stepmania-5.0.11+dfsg/src/ScreenWithMenuElements.cpp --- stepmania-5.0.10+dfsg/src/ScreenWithMenuElements.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenWithMenuElements.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -178,74 +178,72 @@ this->HandleMessage( msg ); } -void ScreenWithMenuElements::StartPlayingMusic() +RString ScreenWithMenuElements::HandleLuaMusicFile(RString const& path) { - /* Some screens should leave the music alone (eg. ScreenPlayerOptions music - * sample left over from ScreenSelectMusic). */ - if( PLAY_MUSIC ) + FileType ft= ActorUtil::GetFileType(path); + RString ret= path; + if(ft == FT_Lua) { - GameSoundManager::PlayMusicParams pmp; - FileType ft = ActorUtil::GetFileType( m_sPathToMusic ); - /* If m_sPathToMusic points to a Lua file, parse it and make sure it - * returns a string pointing to a sound. Otherwise, if it points to - * a normal music file, use the normal playback code. -aj - * TODO: Make Lua music files accept playback params. - */ - if( ft == FT_Lua ) + RString script; + RString error= "Lua runtime error: "; + if(GetFileContents(path, script)) { - RString Script; - RString Error= "Lua runtime error: "; - if( GetFileContents(m_sPathToMusic, Script) ) + Lua* L= LUA->Get(); + if(!LuaHelpers::RunScript(L, script, "@"+path, error, 0, 1, true)) { - Lua *L = LUA->Get(); - - if( !LuaHelpers::RunScript(L, Script, "@"+m_sPathToMusic, Error, 0, 1, true) ) + ret= ""; + } + else + { + // there are two possible ways to load a music file via Lua. + // 1) return the path to the sound + // (themer has to use THEME:GetPathS()) + RString music_path_from_lua; + LuaHelpers::Pop(L, music_path_from_lua); + if(!music_path_from_lua.empty()) { - LUA->Release( L ); - return; + ret= music_path_from_lua; } else { - // there are two possible ways to load a music file via Lua. - // 1) return the path to the sound - // (themer has to use THEME:GetPathS()) - RString sMusicPathFromLua; - LuaHelpers::Pop(L, sMusicPathFromLua); - - if( !sMusicPathFromLua.empty() ) - { - pmp.sFile = sMusicPathFromLua; - pmp.bAlignBeat = MUSIC_ALIGN_BEAT; - - // TODO: load other params into pmp here -aj - if( DELAY_MUSIC_SECONDS > 0.0f ) - pmp.fStartSecond = -DELAY_MUSIC_SECONDS; - - SOUND->PlayMusic( pmp ); - } - else - { - // 2) perhaps it's a table with some params? unsure if I want to support - // this just yet. -aj - LOG->Trace("Lua music script did not return a path to a sound."); - } - LUA->Release( L ); + // 2) perhaps it's a table with some params? unsure if I want to support + // this just yet. -aj + LOG->Trace("Lua music script did not return a path to a sound."); + ret= ""; } } - else - { - LOG->Trace("run script failed hardcore, lol"); - } + LUA->Release(L); } else { - pmp.sFile = m_sPathToMusic; - pmp.bAlignBeat = MUSIC_ALIGN_BEAT; + LOG->Trace("run script failed hardcore, lol"); + ret= ""; + } + } + else if(ft != FT_Sound) + { + LuaHelpers::ReportScriptErrorFmt("Music file %s is not a sound file.", path.c_str()); + ret= ""; + } + return ret; +} - if( DELAY_MUSIC_SECONDS > 0.0f ) +void ScreenWithMenuElements::StartPlayingMusic() +{ + /* Some screens should leave the music alone (eg. ScreenPlayerOptions music + * sample left over from ScreenSelectMusic). */ + if( PLAY_MUSIC ) + { + GameSoundManager::PlayMusicParams pmp; + pmp.sFile= HandleLuaMusicFile(m_sPathToMusic); + if(!pmp.sFile.empty()) + { + pmp.bAlignBeat = MUSIC_ALIGN_BEAT; + if(DELAY_MUSIC_SECONDS > 0.0f) + { pmp.fStartSecond = -DELAY_MUSIC_SECONDS; - - SOUND->PlayMusic( pmp ); + } + SOUND->PlayMusic(pmp); } } } diff -Nru stepmania-5.0.10+dfsg/src/ScreenWithMenuElements.h stepmania-5.0.11+dfsg/src/ScreenWithMenuElements.h --- stepmania-5.0.10+dfsg/src/ScreenWithMenuElements.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ScreenWithMenuElements.h 2016-03-30 16:08:58.000000000 +0000 @@ -38,6 +38,7 @@ bool m_bShouldAllowLateJoin; // So that it can be exposed to Lua. protected: + RString HandleLuaMusicFile(RString const& path); virtual void StartPlayingMusic(); void SetHelpText( RString s ); diff -Nru stepmania-5.0.10+dfsg/src/SongUtil.cpp stepmania-5.0.11+dfsg/src/SongUtil.cpp --- stepmania-5.0.10+dfsg/src/SongUtil.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/SongUtil.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -1132,14 +1132,17 @@ Song *pRet = NULL; if( !m_Cache.Get(&pRet) ) { - // HACK for backwards compatibility: Re-add the leading "/". - // 2005/05/21 file layer changes added a leading slash. - RString sDir2 = sDir; - if( sDir2.Left(1) != "/" ) - sDir2 = "/" + sDir2; - - if( !sDir2.empty() ) - pRet = SONGMAN->GetSongFromDir( sDir2 ); + if(!sDir.empty()) + { + // HACK for backwards compatibility: Re-add the leading "/". + // 2005/05/21 file layer changes added a leading slash. + RString sDir2 = sDir; + if(sDir2.Left(1) != "/") + { + sDir2 = "/" + sDir2; + } + pRet = SONGMAN->GetSongFromDir(sDir2); + } m_Cache.Set( pRet ); } return pRet; diff -Nru stepmania-5.0.10+dfsg/src/StatsManager.cpp stepmania-5.0.11+dfsg/src/StatsManager.cpp --- stepmania-5.0.10+dfsg/src/StatsManager.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/StatsManager.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -230,8 +230,12 @@ } } - // Save recent scores + // Not sure what the Save/Upload folder was originally for, but the files + // in it just accumulate uselessly, wasting several seconds when finishing + // a song. So this pref disables it. -Kyz + if(!PREFSMAN->m_DisableUploadDir) { + // Save recent scores auto_ptr xml( new XNode("Stats") ); xml->AppendChild( "MachineGuid", PROFILEMAN->GetMachineProfile()->m_sGuid ); diff -Nru stepmania-5.0.10+dfsg/src/StepsUtil.cpp stepmania-5.0.11+dfsg/src/StepsUtil.cpp --- stepmania-5.0.10+dfsg/src/StepsUtil.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/StepsUtil.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -61,6 +61,42 @@ out.push_back( SongAndSteps(pSong, *st) ); } +void StepsUtil::GetAllMatchingEndless( Song *pSong, const StepsCriteria &stc, vector &out ) +{ + const vector &vSteps = ( stc.m_st == StepsType_Invalid ? pSong->GetAllSteps() : + pSong->GetStepsByStepsType( stc.m_st ) ); + int previousSize = out.size(); + int successful = false; + + GetAllMatching( pSong, stc, out ); + if( out.size() != previousSize ) + { + successful = true; + } + + if( !successful ) + { + Difficulty difficulty = ( *( vSteps.begin() ) )->GetDifficulty(); + Difficulty previousDifficulty = difficulty; + int lowestDifficultyIndex = 0; + vector difficulties; + FOREACH_CONST( Steps*, vSteps, st ) + { + previousDifficulty = difficulty; + difficulty = ( *st )->GetDifficulty(); + if( ( st - vSteps.begin() ) == 0 ) + { + continue; + } + if( difficulty < previousDifficulty ) + { + lowestDifficultyIndex = st - vSteps.begin(); + } + } + out.push_back( SongAndSteps( pSong, vSteps.at( lowestDifficultyIndex ) ) ); + } +} + bool StepsUtil::HasMatching( const SongCriteria &soc, const StepsCriteria &stc ) { const RString &sGroupName = soc.m_sGroupName.empty()? GROUP_ALL:soc.m_sGroupName; diff -Nru stepmania-5.0.10+dfsg/src/StepsUtil.h stepmania-5.0.11+dfsg/src/StepsUtil.h --- stepmania-5.0.10+dfsg/src/StepsUtil.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/StepsUtil.h 2016-03-30 16:08:58.000000000 +0000 @@ -118,7 +118,7 @@ * @param stc the StepsCriteria to look for. * @param out the SongsAndSteps that match. */ - void GetAllMatching( const SongCriteria &soc, const StepsCriteria &stc, vector &out ); // look up in SONGMAN + void GetAllMatching( const SongCriteria &soc, const StepsCriteria &stc, vector &out); // look up in SONGMAN /** * @brief Retrieve all of the Steps that match the criteria. * @param pSong the Song we're checking in. @@ -127,6 +127,13 @@ */ void GetAllMatching( Song *pSong, const StepsCriteria &stc, vector &out ); /** + * @brief Retrieve all of the Steps that match the criteria, for Endless mode only. + * @param pSong the Song we're checking in. + * @param stc the StepsCriteria to look for. + * @param out the SongsAndSteps that match. + */ + void GetAllMatchingEndless( Song *pSong, const StepsCriteria &stc, vector &out ); + /** * @brief Is there a Step * that matches the criteria? * @param soc the SongCriteria to look for. diff -Nru stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2005.sln stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2005.sln --- stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2005.sln 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2005.sln 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Texture Font Generator", "Texture Font Generator-net2005.vcproj", "{8B04E112-0CFE-4934-B085-AAD9E95DA5BB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB}.Debug|Win32.Build.0 = Debug|Win32 - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB}.Release|Win32.ActiveCfg = Release|Win32 - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff -Nru stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2005.vcproj stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2005.vcproj --- stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2005.vcproj 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2005.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2008.sln stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2008.sln --- stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2008.sln 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2008.sln 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Texture Font Generator", "Texture Font Generator-net2008.vcproj", "{8B04E112-0CFE-4934-B085-AAD9E95DA5BB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB}.Debug|Win32.Build.0 = Debug|Win32 - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB}.Release|Win32.ActiveCfg = Release|Win32 - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff -Nru stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2008.vcproj stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2008.vcproj --- stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2008.vcproj 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2008.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,314 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2010.sln stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2010.sln --- stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2010.sln 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2010.sln 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Texture Font Generator", "Texture Font Generator-net2010.vcxproj", "{8B04E112-0CFE-4934-B085-AAD9E95DA5BB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB}.Debug|Win32.Build.0 = Debug|Win32 - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB}.Release|Win32.ActiveCfg = Release|Win32 - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff -Nru stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2010.vcxproj stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2010.vcxproj --- stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2010.vcxproj 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2010.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,187 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Template - Win32 - - - - Texture Font Generator - {8B04E112-0CFE-4934-B085-AAD9E95DA5BB} - Texture Font Generator - MFCProj - - - - Application - Dynamic - MultiByte - - - Application - Dynamic - MultiByte - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(TargetDir)../../Program/ - $(SolutionDir)/build-$(SolutionName)/$(ProjectName)/$(ConfigurationName) - true - $(TargetDir)../../Program/ - $(SolutionDir)/build-$(SolutionName)/$(ProjectName)/$(ConfigurationName) - false - true - true - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - $(ProjectName)-debug - - - - _DEBUG;%(PreprocessorDefinitions) - false - $(IntDir)$(ProjectName).tlb - - - Disabled - ..\..\extern\libpng\include;..\..\extern\zlib;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDLL - true - Use - Level3 - EditAndContinue - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - $(IntDir);%(AdditionalIncludeDirectories) - - - ..\..\extern\libpng\lib\libpng.lib;..\..\extern\zlib\zdll.lib;%(AdditionalDependencies) - ..\..\Program\$(ProjectName)-debug.exe - ..\libpng\lib;..\zlib;%(AdditionalLibraryDirectories) - true - Windows - false - - - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - false - $(IntDir)$(ProjectName).tlb - - - MaxSpeed - OnlyExplicitInline - true - ..\..\extern\libpng\include;..\..\extern\zlib;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - true - true - Use - Level3 - ProgramDatabase - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - $(IntDir);%(AdditionalIncludeDirectories) - - - ..\..\extern\libpng\lib\libpng.lib;..\..\extern\zlib\zdll.lib;%(AdditionalDependencies) - ..\..\Program\$(ProjectName).exe - ..\libpng\lib;..\zlib;%(AdditionalLibraryDirectories) - true - Windows - true - true - false - - - MachineX86 - true - - - - - - - - - %(Outputs) - - - - - %(Outputs) - - - - - - - - - - Create - Create - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2010.vcxproj.filters stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2010.vcxproj.filters --- stepmania-5.0.10+dfsg/src/Texture Font Generator/Texture Font Generator-net2010.vcxproj.filters 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Texture Font Generator/Texture Font Generator-net2010.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ - - - - - {798bef6a-6032-4330-8164-79cea4b06189} - cpp;c;cxx;def;odl;idl;hpj;bat;asm - - - {54d14325-e310-42e5-bdec-b026127aafa0} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - Resource Files - - - - - Resource Files - - - - - Source Files - - - \ No newline at end of file diff -Nru stepmania-5.0.10+dfsg/src/Texture Font Generator/Utils.cpp stepmania-5.0.11+dfsg/src/Texture Font Generator/Utils.cpp --- stepmania-5.0.10+dfsg/src/Texture Font Generator/Utils.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Texture Font Generator/Utils.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -162,14 +162,14 @@ png_info *pInfo = png_create_info_struct(pPng); if( pInfo == NULL ) { - png_destroy_read_struct( &pPng, NULL, NULL ); + png_destroy_write_struct( &pPng, NULL ); sprintf( szErrorbuf, "creating png_create_info_struct failed"); return false; } if( setjmp(png_jmpbuf(pPng)) ) { - png_destroy_read_struct( &pPng, &pInfo, NULL ); + png_destroy_write_struct( &pPng, &pInfo ); return false; } @@ -180,7 +180,6 @@ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE ); png_write_info( pPng, pInfo ); - png_set_filler( pPng, 0, PNG_FILLER_AFTER ); png_byte *pixels = (png_byte *) pSurf->pRGBA; for( int y = 0; y < pSurf->iHeight; y++ ) diff -Nru stepmania-5.0.10+dfsg/src/ThemeManager.cpp stepmania-5.0.11+dfsg/src/ThemeManager.cpp --- stepmania-5.0.10+dfsg/src/ThemeManager.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/ThemeManager.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -688,14 +688,15 @@ switch( LuaHelpers::ReportScriptError(message, "", true) ) { - case Dialog::abort: - RageException::Throw( "%s", message.c_str() ); - break; - case Dialog::retry: - ReloadMetrics(); - return GetPathInfoToRaw( out, sThemeName_, category, sMetricsGroup_, sElement_ ); - case Dialog::ignore: - break; + case Dialog::abort: + RageException::Throw( "%s", message.c_str() ); + break; + case Dialog::retry: + ReloadMetrics(); + return GetPathInfoToRaw( out, sThemeName_, category, sMetricsGroup_, sElement_ ); + case Dialog::ignore: + default: + break; } } @@ -733,15 +734,15 @@ switch(LuaHelpers::ReportScriptError(sMessage, "", true)) { - case Dialog::retry: - ReloadMetrics(); - return GetPathInfoToRaw( out, sThemeName_, category, sMetricsGroup_, sElement_ ); - case Dialog::ignore: - GetPathInfo( out, category, "", "_missing" ); - return true; + case Dialog::retry: + ReloadMetrics(); + return GetPathInfoToRaw( out, sThemeName_, category, sMetricsGroup_, sElement_ ); + case Dialog::ignore: + GetPathInfo( out, category, "", "_missing" ); + return true; + default: + RageException::Throw( "%s", sMessage.c_str() ); } - - RageException::Throw( "%s", sMessage.c_str() ); } bool ThemeManager::GetPathInfoToAndFallback( PathInfo &out, ElementCategory category, const RString &sMetricsGroup_, const RString &sElement ) diff -Nru stepmania-5.0.10+dfsg/src/TimingData.cpp stepmania-5.0.11+dfsg/src/TimingData.cpp --- stepmania-5.0.10+dfsg/src/TimingData.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/TimingData.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -50,6 +50,30 @@ } } +bool TimingData::IsSafeFullTiming() +{ + static vector needed_segments; + if(needed_segments.empty()) + { + needed_segments.push_back(SEGMENT_BPM); + needed_segments.push_back(SEGMENT_TIME_SIG); + needed_segments.push_back(SEGMENT_TICKCOUNT); + needed_segments.push_back(SEGMENT_COMBO); + needed_segments.push_back(SEGMENT_LABEL); + needed_segments.push_back(SEGMENT_SPEED); + needed_segments.push_back(SEGMENT_SCROLL); + } + vector *segs = m_avpTimingSegments; + for(size_t s= 0; s < needed_segments.size(); ++s) + { + if(segs[needed_segments[s]].empty()) + { + return false; + } + } + return true; +} + TimingData::~TimingData() { Clear(); @@ -301,6 +325,32 @@ } } +void TimingData::ClearRange(int start_row, int end_row, TimingSegmentType clear_type) +{ + FOREACH_TimingSegmentType(seg_type) + { + if(seg_type == clear_type || clear_type == TimingSegmentType_Invalid) + { + vector& segs= GetTimingSegments(seg_type); + int first_affected= GetSegmentIndexAtRow(seg_type, start_row); + int last_affected= GetSegmentIndexAtRow(seg_type, end_row); + if(first_affected == INVALID_INDEX) + { + continue; + } + for(int index= last_affected; index >= first_affected; --index) + { + int seg_row= segs[index]->GetRow(); + if(segs.size() > 1 && seg_row > 0 && seg_row >= start_row && + seg_row <= end_row) + { + EraseSegment(segs, index, segs[index]); + } + } + } + } +} + void TimingData::GetActualBPM( float &fMinBPMOut, float &fMaxBPMOut, float highest ) const { fMinBPMOut = FLT_MAX; @@ -535,7 +585,7 @@ static void EraseSegment( vector &vSegs, int index, TimingSegment *cur ) { -#ifdef DEBUG +#ifdef WITH_LOGGING_TIMING_DATA LOG->Trace( "EraseSegment(%d, %p)", index, cur ); cur->DebugPrint(); #endif @@ -548,7 +598,7 @@ // so we must deep-copy it (with ::Copy) for new allocations. void TimingData::AddSegment( const TimingSegment *seg ) { -#ifdef DEBUG +#ifdef WITH_LOGGING_TIMING_DATA LOG->Trace( "AddSegment( %s )", TimingSegmentTypeToString(seg->GetType()).c_str() ); seg->DebugPrint(); #endif @@ -662,12 +712,14 @@ } break; } + default: + break; } // the segment at or before this row is equal to the new one; ignore it if( bOnSameRow && (*cur) == (*seg) ) { -#if defined(DEBUG) +#ifdef WITH_LOGGING_TIMING_DATA LOG->Trace( "equals previous segment, ignoring" ); #endif return; @@ -1100,7 +1152,7 @@ if( speeds.size() == 0 ) { #ifdef DEBUG - LOG->Trace("No speed segments"); + LOG->Trace("No speed segments found: using default value."); #endif return 1.0f; } diff -Nru stepmania-5.0.10+dfsg/src/TimingData.h stepmania-5.0.11+dfsg/src/TimingData.h --- stepmania-5.0.10+dfsg/src/TimingData.h 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/TimingData.h 2016-03-30 16:08:58.000000000 +0000 @@ -67,6 +67,7 @@ void Copy( const TimingData &other ); void Clear(); + bool IsSafeFullTiming(); TimingData( const TimingData &cpy ) { Copy(cpy); } TimingData& operator=( const TimingData &cpy ) { Copy(cpy); return *this; } @@ -151,6 +152,7 @@ void CopyRange(int start_row, int end_row, TimingSegmentType copy_type, int dest_row, TimingData& dest) const; void ShiftRange(int start_row, int end_row, TimingSegmentType shift_type, int shift_amount); + void ClearRange(int start_row, int end_row, TimingSegmentType clear_type); /** * @brief Gets the actual BPM of the song, * while respecting a limit. diff -Nru stepmania-5.0.10+dfsg/src/TimingSegments.cpp stepmania-5.0.11+dfsg/src/TimingSegments.cpp --- stepmania-5.0.10+dfsg/src/TimingSegments.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/TimingSegments.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -211,7 +211,7 @@ + "f=%.0" + IntToString(dec) + "f=%.0" + IntToString(dec) + "f=%u"; return ssprintf(str.c_str(), GetBeat(), GetRatio(), - GetDelay(), GetUnit()); + GetDelay(), static_cast(GetUnit())); } vector SpeedSegment::GetValues() const diff -Nru stepmania-5.0.10+dfsg/src/Trail.cpp stepmania-5.0.11+dfsg/src/Trail.cpp --- stepmania-5.0.10+dfsg/src/Trail.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/Trail.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -120,8 +120,10 @@ PlayerOptions po; po.FromString( e->Modifiers ); if( po.ContainsTransformOrTurn() ) - NoteDataUtil::TransformNoteData( nd, po, pSteps->m_StepsType ); - NoteDataUtil::TransformNoteData( nd, e->Attacks, pSteps->m_StepsType, e->pSong ); + { + NoteDataUtil::TransformNoteData(nd, *(pSteps->GetTimingData()), po, pSteps->m_StepsType); + } + NoteDataUtil::TransformNoteData(nd, *(pSteps->GetTimingData()), e->Attacks, pSteps->m_StepsType, e->pSong); RadarValues transformed_rv; NoteDataUtil::CalculateRadarValues( nd, e->pSong->m_fMusicLengthSeconds, transformed_rv ); GAMESTATE->SetProcessedTimingData(NULL); diff -Nru stepmania-5.0.10+dfsg/src/XmlToLua.cpp stepmania-5.0.11+dfsg/src/XmlToLua.cpp --- stepmania-5.0.10+dfsg/src/XmlToLua.cpp 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/src/XmlToLua.cpp 2016-03-30 16:08:58.000000000 +0000 @@ -596,6 +596,8 @@ store_field("Bones", this_relative, false); handled_level= 2; break; + default: + break; } if(!handled_level) { diff -Nru stepmania-5.0.10+dfsg/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua stepmania-5.0.11+dfsg/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua --- stepmania-5.0.10+dfsg/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua 2016-03-30 16:08:58.000000000 +0000 @@ -65,4 +65,15 @@ InitCommand=cmd(hide_if,not GAMESTATE:IsPlayerEnabled(PLAYER_2);x,WideScale(math.floor(SCREEN_CENTER_X*1.7)+8,math.floor(SCREEN_CENTER_X*1.5)+8);y,SCREEN_CENTER_Y-20); CreateStats( PLAYER_2 ); }; + +if gameplay_pause_count > 0 then + t[#t+1]= Def.BitmapText{ + Font= "Common Normal", + Text= THEME:GetString("PauseMenu", "pause_count") .. ": " .. gameplay_pause_count, + InitCommand= function(self) + self:xy(_screen.cx, 375):diffuse(Color.White):zoom(.75) + end + } +end + return t diff -Nru stepmania-5.0.10+dfsg/Themes/default/BGAnimations/ScreenGameplay overlay.lua stepmania-5.0.11+dfsg/Themes/default/BGAnimations/ScreenGameplay overlay.lua --- stepmania-5.0.10+dfsg/Themes/default/BGAnimations/ScreenGameplay overlay.lua 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Themes/default/BGAnimations/ScreenGameplay overlay.lua 2016-03-30 16:08:58.000000000 +0000 @@ -37,4 +37,5 @@ end; end; t.InitCommand=cmd(SetUpdateFunction,UpdateTime); +t[#t+1]= LoadActor(THEME:GetPathG("", "pause_menu")) return t diff -Nru stepmania-5.0.10+dfsg/Themes/default/Graphics/pause_menu.lua stepmania-5.0.11+dfsg/Themes/default/Graphics/pause_menu.lua --- stepmania-5.0.10+dfsg/Themes/default/Graphics/pause_menu.lua 1970-01-01 00:00:00.000000000 +0000 +++ stepmania-5.0.11+dfsg/Themes/default/Graphics/pause_menu.lua 2016-03-30 16:08:58.000000000 +0000 @@ -0,0 +1,240 @@ +gameplay_pause_count= 0 +course_stopped_by_pause_menu= false + +local pause_buttons= {Start= false, Select= true, Back= true} +local pause_double_tap_time= 1 +local tap_debounce_time= .1 +local pause_press_times= {} +local screen_gameplay= false +local menu_items= {[PLAYER_1]= {}, [PLAYER_2]= {}} +local menu_frames= {} +local menu_choices= { + "continue_playing", + "restart_song", + "forfeit_song", +} +if GAMESTATE:IsCourseMode() then + menu_choices= { + "continue_playing", + "skip_song", + "forfeit_course", + "end_course", + } +end +local menu_spacing= 32 +local menu_bg_width= _screen.w * .4 +local menu_text_width= _screen.w * .35 +local menu_x= {[PLAYER_1]= _screen.w*.25, [PLAYER_2]= _screen.w*.75} +local menu_y= _screen.cy - (#menu_choices * .5 * menu_spacing) +local current_menu_choice= {} +local menu_is_showing= {} +local enabled_players= {} + +local function create_menu_item(pn, x, y, item_name) + return Def.BitmapText{ + Font= "Common Normal", Text= THEME:GetString("PauseMenu", item_name), + InitCommand= function(self) + self:xy(x, y) + table.insert(menu_items[pn], self) + self:playcommand("LoseFocus") + end, + LoseFocusCommand= function(self) + self:stopeffect():rotationz(0) + end, + GainFocusCommand= function(self) + self:wag():effectperiod(2):effectmagnitude(0, 0, 5) + end, + } +end + +local function create_menu_frame(pn, x, y) + local frame= Def.ActorFrame{ + InitCommand= function(self) + self:xy(x, y):playcommand("Hide") + menu_frames[pn]= self + end, + ShowCommand= function(self) + self:visible(true) + end, + HideCommand= function(self) + self:visible(false) + end, + Def.Quad{ + InitCommand= function(self) + self:setsize(menu_bg_width, menu_spacing * (#menu_choices + 1)) + :y(-menu_spacing):vertalign(top) + :diffuse{0, 0, 0, .25} + :playcommand("Hide") + end, + }, + } + for i, choice in ipairs(menu_choices) do + frame[#frame+1]= create_menu_item(pn, 0, (i-1)*menu_spacing, choice) + end + return frame +end + +local function backout(screen) + screen_gameplay:SetPrevScreenName(screen):begin_backing_out() +end + +local function show_menu(pn) + menu_frames[pn]:playcommand("Show") + for i, item in ipairs(menu_items[pn]) do + item:playcommand("LoseFocus") + end + current_menu_choice[pn]= 1 + menu_items[pn][current_menu_choice[pn]]:playcommand("GainFocus") + menu_is_showing[pn]= true +end + +local function close_menu(pn) + menu_frames[pn]:playcommand("Hide") + menu_is_showing[pn]= false + local stay_paused= false + for pn, showing in pairs(menu_is_showing) do + if showing then + stay_paused= true + end + end + if not stay_paused then + local fg= screen_gameplay:GetChild("SongForeground") + if fg then fg:visible(old_fg_visible) end + screen_gameplay:PauseGame(false) + end +end + +local choice_actions= { + continue_playing= function(pn) + close_menu(pn) + end, + restart_song= function(pn) + backout("ScreenStageInformation") + end, + forfeit_song= function(pn) + backout(SelectMusicOrCourse()) + end, + skip_song= function(pn) + screen_gameplay:PostScreenMessage("SM_NotesEnded", 0) + end, + forfeit_course= function(pn) + backout(SelectMusicOrCourse()) + end, + end_course= function(pn) + course_stopped_by_pause_menu= true + screen_gameplay:PostScreenMessage("SM_NotesEnded", 0) + end, +} + +local menu_actions= { + Start= function(pn) + local choice_name= menu_choices[current_menu_choice[pn]] + if choice_actions[choice_name] then + choice_actions[choice_name](pn) + end + end, + Left= function(pn) + if current_menu_choice[pn] > 1 then + menu_items[pn][current_menu_choice[pn]]:playcommand("LoseFocus") + current_menu_choice[pn]= current_menu_choice[pn] - 1 + menu_items[pn][current_menu_choice[pn]]:playcommand("GainFocus") + end + end, + Right= function(pn) + if current_menu_choice[pn] < #menu_choices then + menu_items[pn][current_menu_choice[pn]]:playcommand("LoseFocus") + current_menu_choice[pn]= current_menu_choice[pn] + 1 + menu_items[pn][current_menu_choice[pn]]:playcommand("GainFocus") + end + end, +} +menu_actions.Up= menu_actions.Left +menu_actions.Down= menu_actions.Right +menu_actions.MenuLeft= menu_actions.Left +menu_actions.MenuRight= menu_actions.Right +menu_actions.MenuUp= menu_actions.Up +menu_actions.MenuDown= menu_actions.Down + +local down_status= {} + +local function detect_lr_press() + return down_status.MenuLeft and down_status.MenuRight +end + +local function pause_and_show(pn) + gameplay_pause_count= gameplay_pause_count + 1 + screen_gameplay:PauseGame(true) + local fg= screen_gameplay:GetChild("SongForeground") + if fg then + old_fg_visible= fg:GetVisible() + fg:visible(false) + end + local prompt_text= screen_gameplay:GetChild("Debug") + if prompt_text then + prompt_text:playcommand("TweenOff") + end + show_menu(pn) +end + +local function input(event) + local pn= event.PlayerNumber + if not enabled_players[pn] then return end + local button= event.GameButton + if not button then return end + if event.type == "InputEventType_Release" then + down_status[event.button]= false + return + end + down_status[event.button]= true + if screen_gameplay:GetName() == "ScreenGameplaySyncMachine" then return end + local is_paused= screen_gameplay:IsPaused() + if is_paused then + if menu_is_showing[pn] then + if menu_actions[button] then + menu_actions[button](pn) + return + end + else + if pause_buttons[button] or detect_lr_press() then + show_menu(pn) + return + end + end + else + button= event.button + if event.type ~= "InputEventType_FirstPress" then return end + if detect_lr_press() then + pause_and_show(pn) + elseif pause_buttons[button] then + if GAMESTATE:GetCoinMode() == "CoinMode_Pay" then return end + if pause_press_times[pn] then + local time_since_press= GetTimeSinceStart() - pause_press_times[pn] + if time_since_press > tap_debounce_time then + if time_since_press <= pause_double_tap_time then + pause_and_show(pn) + else + pause_press_times[pn]= GetTimeSinceStart() + end + end + else + pause_press_times[pn]= GetTimeSinceStart() + end + else + pause_press_times[pn]= nil + end + end +end + +local frame= Def.ActorFrame{ + OnCommand= function(self) + screen_gameplay= SCREENMAN:GetTopScreen() + screen_gameplay:AddInputCallback(input) + end, +} + +for i, pn in ipairs(GAMESTATE:GetEnabledPlayers()) do + enabled_players[pn]= true + frame[#frame+1]= create_menu_frame(pn, menu_x[pn], menu_y) +end + +return frame diff -Nru stepmania-5.0.10+dfsg/Themes/default/Languages/en.ini stepmania-5.0.11+dfsg/Themes/default/Languages/en.ini --- stepmania-5.0.10+dfsg/Themes/default/Languages/en.ini 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Themes/default/Languages/en.ini 2016-03-30 16:08:58.000000000 +0000 @@ -83,8 +83,21 @@ HelpText= [ScreenGameplay] +GiveUpAbortedText= +GiveUpStartText=Double tap &START; to access menu +GiveUpBackText=Double tap &BACK; to access menu +SkipSongText=Double tap &SELECT; to access menu HelpText= +[PauseMenu] +continue_playing=Continue Playing +end_course=End Course +forfeit_course=Forfeit Course +forfeit_song=Forfeit Song +pause_count=Pause Count +restart_song=Restart Song +skip_song=Skip Song + [ScreenHeartEntry] Enter Heart Rate=Enter Heart Rate Song Length=Song Length diff -Nru stepmania-5.0.10+dfsg/Themes/default/Languages/id.ini stepmania-5.0.11+dfsg/Themes/default/Languages/id.ini --- stepmania-5.0.10+dfsg/Themes/default/Languages/id.ini 1970-01-01 00:00:00.000000000 +0000 +++ stepmania-5.0.11+dfsg/Themes/default/Languages/id.ini 2016-03-30 16:08:58.000000000 +0000 @@ -0,0 +1,266 @@ +[Screen] +HelpText=&BACK; Keluar &START; Select &SELECT; Pilihan &MENULEFT;&MENURIGHT;&MENUUP;&MENUDOWN; Pindah + +[ScreenWithMenuElements] +HelpText=&BACK; Keluar &START; Select &MENULEFT;&MENURIGHT; Pindah +StageCounter=%s Stage +EventStageCounter=Stage %03i + +[ScreenTitleMenu] +HelpText=&BACK; Keluar &START; Select &MENUUP;&MENUDOWN; Pindah +Network OK=Jaringan OK +Offline=Luring +Connected to %s=Tersambung ke %s +CurrentGametype=Sedang bermain: %s +LifeDifficulty=Kesulitan Nyawa: %s +TimingDifficulty=Kesulitan Timing: %s +%i Lagu (%i Grup), %i Courses=%i Lagu (%i Grup), %i Kursus + +[ScreenTitleJoin] +HelpText=Tekan &START; untuk Bermain +HelpTextJoin=Tekan &START; untuk Bermain +HelpTextWait=Masukan Kredit! +EventMode=Modus Acara +JointPremiumMain=Joint Premium +JointPremiumSecondary=Dua pemain dapat bermain dengan satu kredit! +DoublesPremiumMain=Premium Dobel +DoublesPremiumSecondary=Bermain Dobel untuk satu kredit! + +[ScreenCaution] +HelpText=&START; Lanjut + +[ScreenDemonstration] +Demonstration=Demonstrasi +%s - %s [dari %s]=%s - %s\n[dari %s] + +[ScreenQuickSetupOverview] +Explanation=Setup Cepat memberikan cara mudah untuk mengatur ubahan-umum dan preferensi-preferensi berguna. + +[ScreenProfileLoad] +HelpText=... Memuat profile, silahkan tunggu ... + +[ScreenSelectProfile] +%d Lagu Dimainkan=%d Lagu telah dimainkan +%d Lagu Dimainkan=%d Lagu telah dimainkan +PressStart=Tekan &START; untuk bergabung. +HelpText=&MENUUP;&MENUDOWN; Ganti Profil &START; Pilih/Gabung &BACK; Cabut + +[ScreenSelectMaster] +HelpText=&BACK; Keluar &START; Pilih / Gabung &MENULEFT;&MENURIGHT; Pindah + +[ScreenSelectPlayMode] +HelpText=&BACK; Keluar &START; Pilih / Gabung &MENULEFT;&MENURIGHT; Pindah +EasyExplanation=Sebuah modus untuk Pemula. +HardExplanation= Untuk ahli. +OldNormalExplanation=Tak terlalu gampang, tak terlalu sulit. +NormalExplanation=Mainkan semua lagu favorit-mu! +RaveExplanation=Bertarung antar teman atau musuh. +NonstopExplanation=Beberapa lagu berturut-turut +OniExplanation=Sebuah tes skil yang sejati. +EndlessExplanation=Tak berhenti, terus berjalan. + +[ScreenSelectPlayStyle] +HelpText=&BACK; Keluar &START; Pilih &MENULEFT;&MENURIGHT; Pindah + +[ScreenGameInformation] +HelpText=&BACK; Keluar &START; Lewati + +[ScreenSelectMusic] +NEW!=BARU! +Press Start For Options=Tekan &START; untuk Pilihan +Entering Options=Memasuki Pilihan +HelpText=&BACK; Keluar &START; Pilih / Gabung &SELECT; Kode Ajaib &MENULEFT;&MENURIGHT; Pindah::&AUXWHITE;+[KEY] Sortir ke [KEY] +AlternateHelpText=&SELECT;+&MENULEFT;&MENURIGHT; Ubah Kesulitan &SELECT;+&START; Sortir Cepat + +[ScreenSelectCourse] +HelpText=&BACK; Keluar &START; Pilih / Gabung &SELECT; Kode Ajaib &MENULEFT;&MENURIGHT; Pindah::&UP;&DOWN;&UP;&DOWN; untuk tipe course yang lain + +[ScreenOptions] +HelpText=&BACK; Keluar &START; Pilih &SELECT; Ke Atas &MENULEFT;&MENURIGHT;&MENUUP;&MENUDOWN; Pindah +Disqualified=Skor akan didiskualifikasi! + +[ScreenStageInformation] +HelpText= + +[ScreenGameplay] +GiveUpAbortedText= +GiveUpStartText=Tekan dua kali &START; untuk mengakses menu +GiveUpBackText=Tekan dua kali &BACK; untuk mengakses menu +SkipSongText=Tekan dua kali &SELECT; untuk mengakses menu +HelpText= + +[PauseMenu] +continue_playing=Lanjutkan Bermain +end_course=Akhiri Course +forfeit_course=Tinggalkan Course +forfeit_song=Tinggalkan lagu +pause_count=Hitungan Tunda +restart_song=Mulai ulang Lagu +skip_song=Lewati Lagu + +[ScreenHeartEntry] +Enter Heart Rate=Masukan Detak Jantung +Song Length=Panjang Lagu +Heart Rate=Detak Jantung + +[ScreenEvaluation] +HelpText=&BACK; Keluar &START; Lanjutkan &MENULEFT;+&MENURIGHT; atau &SELECT; Ambil Gambar +LifeDifficulty=Kesulitan Nyawa: %s +TimingDifficulty=Kesulitan Timing: %s +MachineRecord=Rekor Mesin #%i! +PersonalRecord=Rekor Personal #%i! +ITG DP:=ITG DP: +MIGS DP:=MIGS DP: + +[ScreenContinue] +HelpText=&START; Advance Timer + +[OptionTitles] +AutoSetStyle=Auto Set Style +NotePosition=Posisi Not +ComboOnRolls=Rolls Increment Combo +ComboUnderField=Combo Under Field + +GameplayShowScore=Tunjukan Skor +GameplayShowStepsDisplay=Tunjukan Steps +ShowLotsaOptions=Kepadatan Opsi +LongFail=Panjang Kegagalan +FlashyCombo=Kombo Berkedip-kedip +GameplayFooter=Gameplay Footer +FancyUIBG=Latar Belakang UI Indah +TimingDisplay=Layar Timing + +[OptionExplanations] +AutoSetStyle=Memperbolehkan game untuk mengumpulan seluruh modus 1P dan 2P daripada satu style saja. Ini mungkin membutuhkan mulai ulang Stepmania (atau tekan Shift+F2). +NotePosition=Menentukan dimana reseptor panah diletakan pada saat bermain. +ComboOnRolls=Pilih apabila Gulir (Rolls) akan menambah Kombo atau tidak. Jika Anda mengubah pilihan ini, Anda butuh memuat ulang metrics-nya (via Shift+F2) supaya efek ini berlaku. +ComboUnderField=Menentukan Apabila Kombo harus terletak dibawah not atau tidak. + +GameplayShowScore=Tunjukan atau Sembunyikan layar skor saat bermain. +GameplayShowStepsDisplay=Tunjukan atau Sembunyikan Informasi step saat bermain. +ShowLotsaOptions=Pilih Berapa banyak garis/baris pilihan untuk dipilih dari. &oq;Few&cq; Tetapkan daftar menjadi minimal. &oq;Many&cq; tambah berbagai mod-mod pamer. +LongFail=Pilih antara gagal sm-scc "Panjang" orisinil atau gagal "Pendek" diadopsi nanti. +FlashyCombo=Menentukan apabila kilat kombo harus ditunjukan atau tidak. +GameplayFooter=Jika menyala, Munculkan footer yang menghalangi penglihatan akan datangnya panah untuk di beberapa negara (Bingkai skor DDR). +FancyUIBG=Mati/Nyalakan latar belakang UI indah. "Mati (Off)" disarankan untuk komputer yang lama. Ubahan akan berlaku pada layar awal. +TimingDisplay=Mati/Nyalakan layar segmen timing pada meteran progres lagu. + +ScoringType=Menetapkan metode skoring mana untuk digunakan. Jika Istimewa dipilih, Anda dapat memilih Modus Penskoran Istimewa (Special Scoring Mode) pada Opsi Tema. + +Speed=Atur kelajuan panah berjalan terhadap target. +Accel=Ubah cara panah mendekati target. +Effect=Ubah ukuran atau gerakan dari panah dan/atau target. +Appearance=Kontrol penglihatan dari panah. +Turn=Ubah koreografi step dengan mengatur posisi panah. +Insert=Tambah not injak kedalam koreografi step. +Holds=Ubah beberapa not injak menjadi not tahan. +Mines=Tambah atau singkirkan not ranjau. +PlayerAutoPlay=Notefield bermain dengan sendirinya. +ScoreDisplay=Ubah cara skor terlihat. +ProTiming=Ubah cara Judgement terlihat. +Scroll=Atur arah aliran panah untuk menemui target. +NoteSkins=Pilih tampilan panah-panah yang berbeda. +Handicap=Menyingkirkan not-not. Penggunaan ini akan membatalkan skor tertinggi. +Hide=Gelap (Dark) menyembunyikan reseptor. Buta (Blind) menyembunyikan judgement. Tirai (Cover) menyembunyikan latar belakang. +Persp=Ubah sudut pandang dari aliran panah. +Steps=Atur tingkat kesulitan dari step-step. +Characters=Orang-orang berdansa. +SaveToProfileHelp=Membutuhkan profil atau kartu memori (memory card). +MusicRateHelp=Mainkan musik pada tingkat yang lebih cepat. + +[StepsListDisplayRow StepsType] +Dance_Single=4 +Dance_Double=8 +Dance_Couple=8 +Dance_Solo=6 +Dance_Routine=8 +Dance_Threepanel=3 +Pump_Single=5 +Pump_Double=10 +Pump_Halfdouble=6 +Pump_Couple=5 +Pump_Routine=10 +Kb7_Single=7 +Ez2_Single=ES +Ez2_Double=ED +Ez2_Real=ER +Para_Single=PS +Ds3ddx_Single=XS +Bm_Single5=5 +Bm_Double5=10 +Bm_Single7=7 +Bm_Double7=14 +Maniax_Single=MS +Maniax_Double=MD +Techno_Single4=4 +Techno_Single5=5 +Techno_Single8=8 +Techno_Double4=D4 +Techno_Double5=D5 +Techno_Double8=D8 +Pnm_Five=5 +Pnm_Nine=9 +Guitar_Five=5 +Karaoke=V +Lights_Cabinet=! + +[ScreenHowToInstallSongs] +BodyHeader=Cara Mendapatkan dan Memasang Lagu untuk Stepmania +Finding Songs=Dimana untuk Mencari Lagu +Installing Songs=Cara Memasang Lagu +Importing Songs=Mengimpor dari instalasi2 Stepmania yang ada +Reload Songs=Muat ulang Lagu +Exit=Kembali ke Menu Awal + +Explanation-WhereToFind=Luncurkan sebuah laman web dengan informasi dalam mencari lagu untuk digunakan pada Stepmania. +Explanation-HowToInstall=Luncurkan sebuah Laman web dengan instruksi-instruksi pemasangan lagu. +Explanation-AdditionalFolders=Apabila anda memiliki instalasi Stepmania yang lain, Anda dapat menggunakan preferensi AdditionalFolders untuk memuatnya pada Stepmania 5. +Explanation-ReloadSongs=Muat ulang lagu-lagu. Ini dibutuhkan apabila Anda telah menambahkan/mengubah/menghapus lagu selagi Stepmania sedang berjalan. +Explanation-Exit=Kembali ke menu awal. + +[OptionNames] +Custom=Istimewa (Special) +Many=Banyak (Many) +Few=Sedikit (Few) +Normal=Normal +Lower=Rendah (Lower) +Short=Pendek (Short) +Long=Panjang (Long) + +[ScreenTestInput] +HelpText=Tahan &BACK; atau &START; untuk Keluar. + +[PaneDisplay] +Taps=Injak +Jumps=Loncat +Holds=Tahan +Mines=Ranjau +Hands=Tangan +Rolls=Gulir +Lifts=Angkat +Fakes=Palsu +S=S +V=V +A=A +F=F +C=C + +[ScreenMapControllers] +Exit=Keluar + +[ScreenGameOver] +GAME OVER=GAME OVER (Permainan Tamat) +Play again soon!=Main lagi nanti! + +[ScreenHowToPlay] +How To Play StepMania=Cara bermain StepMania +Information=Informasi + +Feet=Kaki Anda digungakan untuk bermain! +Tap=Saat panah menaik pada titik ini,\ninjak panel yang sesuai. +Jump=Injak pada kedua panel jika dua panah\nberbeda muncul bersamaan! +Miss=Jika Anda kelewat step-nya berulang kali, meteran \ndance Anda akan berkurang sampai\npermainan sudah tamat (Game Over)! + + +[Protiming] +MS=MD diff -Nru stepmania-5.0.10+dfsg/Themes/default/metrics.ini stepmania-5.0.11+dfsg/Themes/default/metrics.ini --- stepmania-5.0.10+dfsg/Themes/default/metrics.ini 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Themes/default/metrics.ini 2016-03-30 16:08:58.000000000 +0000 @@ -1608,7 +1608,10 @@ ActiveAttackListP2OnCommand=visible,false ActiveAttackListP2OffCommand= # - +# Disable the normal start and select button actions to enable a custom pause +# menu +UnpauseWithStart=false +StopCourseEarly=check_stop_course_early() [ScreenGameplayShared] diff -Nru stepmania-5.0.10+dfsg/Themes/default/Scripts/04 Other.lua stepmania-5.0.11+dfsg/Themes/default/Scripts/04 Other.lua --- stepmania-5.0.10+dfsg/Themes/default/Scripts/04 Other.lua 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Themes/default/Scripts/04 Other.lua 2016-03-30 16:08:58.000000000 +0000 @@ -43,3 +43,7 @@ return ToEnumShortString(cur_stage) end end + +function check_stop_course_early() + return course_stopped_by_pause_menu +end diff -Nru stepmania-5.0.10+dfsg/Themes/_fallback/Languages/en.ini stepmania-5.0.11+dfsg/Themes/_fallback/Languages/en.ini --- stepmania-5.0.10+dfsg/Themes/_fallback/Languages/en.ini 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Themes/_fallback/Languages/en.ini 2016-03-30 16:08:58.000000000 +0000 @@ -384,8 +384,8 @@ Create New Course=Create a new course. Create New Profile=Create a new player profile. DancePointsForOni=Toggle whether the score in Oni mode displays Dance Points or the Percent Score. -DefaultFailType=IMMEDIATE stops play when all players run out of life. 30 MISSES stops play after 30 consecutive misses. END OF SONG stops play at the end of the song if all players have run out of life. OFF disables fail. -DefaultFailTypeNoOff=IMMEDIATE stops play when all players run out of life. 30 MISSES stops play after 30 consecutive misses. END OF SONG stops play at the end of the song if all players have run out of life. +DefaultFailType=IMMEDIATE stops play when all players run out of life. IMMEDIATE CONTINUE fails players when they run out of life, but allows play to continue. END OF SONG evaluates pass/fail at the end of the current stage. OFF disables fail. +DefaultFailTypeNoOff=IMMEDIATE stops play when all players run out of life. IMMEDIATE CONTINUE fails players when they run out of life, but allows play to continue. END OF SONG evaluates pass/fail at the end of the current stage. DefaultNoteSkin=Choose the default noteskin to use when playing. DelayedBack=If &oq;On&cq;, requires holding the Back button for 0.5 seconds to quit. Useful if you find yourself accidentally pressing the Back button on your controller. DelayedTextureDelete=Set to ON hold textures in memory instead of freeing them. This will eliminate the time needed to load the texture next from disk next time this is needed. Do not set to ON unless you have 128MB of memory or more. @@ -990,6 +990,7 @@ Clear USB edits=Clear USB edits Clear area=Clear area Clear clipboard=Clear clipboard +Clear timing in region=Clear timing in region CoinMode=Coin Mode CoinModeNoHome=Coin Mode CoinsPerCredit=Coins Per Credit diff -Nru stepmania-5.0.10+dfsg/Themes/_fallback/Languages/es.ini stepmania-5.0.11+dfsg/Themes/_fallback/Languages/es.ini --- stepmania-5.0.10+dfsg/Themes/_fallback/Languages/es.ini 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Themes/_fallback/Languages/es.ini 2016-03-30 16:08:58.000000000 +0000 @@ -558,6 +558,7 @@ Speed Increment Large=Tamaño de los incrementos superiores para ajustar la velocidad. StretchBackgrounds=Activa el estirado anamórfico de fondos. ThreeKeyNavigation=&oq;5teclas&oq;: Botones menú Iz/De/Ab/Ar y Start. &oq;3 teclas&oq;: Botones menú Iz/De y Start. + [OptionNames] 0=0 0.25x=0.25x @@ -709,15 +710,15 @@ HiddenOffset=Eq. oculto Hide=Ocultar High Quality=Alta calidad -Hold=Presión +Hold=Sostenido HoldsToRolls=Presión a Repes -Home=Inicio +Home=Casa Immediate=Inmediato ImmediateContinue=Continuar Incoming=Entrante Insanity=Locura Insert Entry=Insertar entrada -Instant=Instante +Instant=Instantáneo Invert=Invertir Justice=Justicia Left=Izquierda @@ -753,7 +754,7 @@ On (recommended)=Activado (recomendado) Only Dedicated Buttons=Solo botones dedicados Overhead=Por encima -Pay=Pagar +Pay=Pago Percent=Porcentaje Planted=Plantado Press Start=Pulsa Start @@ -902,7 +903,7 @@ FitInside=Ajustar dentro FitInsideAvoidLetter=Evitar bandas FitInsideAvoidPillar=Evitar pilares -Five Key Menu=Tecla5 +Five Key Menu=5 Teclas NextRow=&nextrow; RemoveCombinations=Eliminar RemoveFeatures=Eliminar @@ -918,7 +919,7 @@ TNS_W3=TNS_W3 TNS_W4=TNS_W4 TNS_W5=TNS_W5 -Three Key Menu=Tecla3 +Three Key Menu=3 Teclas [OptionsRowHandler] Off=Off @@ -947,7 +948,7 @@ AutoPlay=Autoreproducir AutogenGroupCourses=Autogen. grupo/cursos AutogenSteps=Autogenerar pasos -AxisFix=Axis Fix +AxisFix=Arreglar eje BGBrightness=Brillo Background=Fondo BarDrain=Drenado de barra @@ -1006,10 +1007,12 @@ DisplayAspectRatio=Relación aspecto DisplayColorDepth=Visualiz. de color DisplayResolution=Resolución pantalla +Display Options=Opciones de pantalla Duration seconds=Duración en segundos EasterEggs=Huevos de pascua Edit Songs/Steps=Editar canciones/pasos Genre=Género +HarshHotLifePenalty=Penalización grave de vida al tope Practice Songs/Steps=Practicar canciones/pasos Edit Courses=Editar cursos Edit BPM change=Editar cambio de BPM @@ -1065,7 +1068,7 @@ Force Effect=Forzar efecto Force Transition=Forzar transición Freeze=Congelar -Game=Game +Game=Juego GetRankingName=Nombre ránking Graphics/Sound Options=Opciones gráficas y de sonido Group=Grupo @@ -1075,6 +1078,7 @@ High Meter=Medidor alto HighResolutionTextures=Texturas alta res. Holds=Presión +InputOptions=Opciones de entrada Insert=Insertar Insert Credit=Inserta créditos Insert beat and shift down=Insertar compás y desacelerar diff -Nru stepmania-5.0.10+dfsg/Themes/_fallback/Languages/ja.ini stepmania-5.0.11+dfsg/Themes/_fallback/Languages/ja.ini --- stepmania-5.0.10+dfsg/Themes/_fallback/Languages/ja.ini 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Themes/_fallback/Languages/ja.ini 2016-03-30 16:08:58.000000000 +0000 @@ -402,8 +402,8 @@ BarDrain=Barゲージの挙動を設定します。No Recoverではゲージが回復しません。\nSudden DeathではGood以下の判定を出すと強制終了します。 BatLives=Batteryゲージのライフの数を設定します。\nこの数だけコンボを切ることが許されます。 Characters=ダンサーまたは2Dキャラクターを選択します。 -#DefaultFailType=IMMEDIATE stops play when all players run out of life. 30 MISSES stops play after 30 consecutive misses. END OF SONG stops play at the end of the song if all players have run out of life. OFF disables fail. -#DefaultFailTypeNoOff=IMMEDIATE stops play when all players run out of life. 30 MISSES stops play after 30 consecutive misses. END OF SONG stops play at the end of the song if all players have run out of life. +#DefaultFailType=IMMEDIATE stops play when all players run out of life. IMMEDIATE CONTINUE fails players when they run out of life, but allows play to continue. END OF SONG evaluates pass/fail at the end of the current stage. OFF disables fail. +#DefaultFailTypeNoOff=IMMEDIATE stops play when all players run out of life. IMMEDIATE CONTINUE fails players when they run out of life, but allows play to continue. END OF SONG evaluates pass/fail at the end of the current stage. Effect=ノートやレセプターの大きさや動き方を変更します。\nこのオプションは複数同時選択できます。 EffectsReceptor=ノートやレセプターの大きさや動き方を変更します。\nこのオプションは複数同時選択できます。 EffectsArrow=ノートやレセプターの大きさや動き方を変更します。\nこのオプションは複数同時選択できます。 @@ -544,8 +544,8 @@ AutogenGroupCourses=OnにするとExtendedモードとEndlessモードのコースが自動生成されます。 AutogenSteps=Onにすると他のゲームモードやスタイルから譜面が自動生成されます。 AxisFix=Onにすると方向キーを軸に割り当てるアダプタへの対応策を行います。\nMac OS XおよびLinux Joystickドライバは未対応です。 -DefaultFailType=IMMEDIATEはゲージが無くなると即終了します。\nDELAYEDはゲージがなくなってからもミスが続くと終了します。\n END OF SONGはゲージが切れても最後まで演奏が続きます。 -DefaultFailTypeNoOff=IMMEDIATEはゲージが無くなると即終了します。30 MISSESはゲージがなくなってから30ミスすると終了します。\n END OF SONGはゲージが切れても最後まで演奏が続きます。 +DefaultFailType=IMMEDIATEはゲージが無くなると即終了します。\nIMMEDIATE CONTINUEはゲージが無くなってもプレイを続けることが出来ます。\nEND OF SONGはプレイ終了時にゲージの残量でクリア判定されます。\nOFFはゲージの残量にかかわらずクリアになります。 +DefaultFailTypeNoOff=IMMEDIATEはゲージが無くなると即終了します。\nIMMEDIATE CONTINUEはゲージが無くなってもプレイを続けることが出来ます。\nEND OF SONGはプレイ終了時にゲージの残量でクリア判定されます。 EasterEggs=このオプションをOnにして、Perfect以上で250コンボ繋ぐと…? EditClearPromptThreshold=プロンプト画面を開かなくても削除されるノートの数を設定します。 FastLoad=Onにすると、起動時にSongs/Coursesフォルダのチェックを簡略化します。 diff -Nru stepmania-5.0.10+dfsg/Themes/_fallback/Scripts/04 CreditsHelpers.lua stepmania-5.0.11+dfsg/Themes/_fallback/Scripts/04 CreditsHelpers.lua --- stepmania-5.0.10+dfsg/Themes/_fallback/Scripts/04 CreditsHelpers.lua 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/Themes/_fallback/Scripts/04 CreditsHelpers.lua 2016-03-30 16:08:58.000000000 +0000 @@ -62,6 +62,8 @@ "Raymund Zacharias (German)", {type= "subsection", name= "5.0.10 update"}, "Milène Gauthier-Sabourin (Arvaneth) (French)", + {type= "subsection", name= "5.0.11 update"}, + "Joel Robert Justiawan (JOELwindows7) (Indonesian)", }, { name= "Other Contributors", @@ -119,6 +121,7 @@ "Ciera Boyd", -- you bet your ass I'm putting my girlfriend in the credits -shakesoda "#KBO", "Celestia Radio", -- LOVE AND TOLERANCE + "Perkedel Corporation", -- Joel's company. "You showed us... your ultimate dance", }, } Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/_common row.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/_common row.ogg differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/GameplayAssist clap.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/GameplayAssist clap.ogg differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/_MemoryCardManager disconnect.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/_MemoryCardManager disconnect.ogg differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/MemoryCardManager disconnect.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/MemoryCardManager disconnect.ogg differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/MemoryCardManager ready.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/MemoryCardManager ready.ogg differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/MenuTimer tick.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/MenuTimer tick.ogg differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/MusicWheel change.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/MusicWheel change.ogg differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/MusicWheel locked.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/MusicWheel locked.ogg differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/Player course attack ending.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/Player course attack ending.ogg differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/Player course attack launch.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/Player course attack launch.ogg differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/ScreenEdit save.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/ScreenEdit save.ogg differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/_switch down.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/_switch down.ogg differ Binary files /tmp/tmpQ9yxKb/uaKwYq7NQP/stepmania-5.0.10+dfsg/Themes/_fallback/Sounds/_switch up.ogg and /tmp/tmpQ9yxKb/nInmH2GPJE/stepmania-5.0.11+dfsg/Themes/_fallback/Sounds/_switch up.ogg differ diff -Nru stepmania-5.0.10+dfsg/.travis.yml stepmania-5.0.11+dfsg/.travis.yml --- stepmania-5.0.10+dfsg/.travis.yml 2015-10-30 06:55:52.000000000 +0000 +++ stepmania-5.0.11+dfsg/.travis.yml 2016-03-30 16:08:58.000000000 +0000 @@ -4,7 +4,7 @@ submodules: false notifications: email: false - irc: "chat.freenode.net#stepmania-devs" + irc: "chat.freenode.net#stepmania" matrix: include: @@ -18,6 +18,7 @@ - llvm-toolchain-precise-3.6 packages: - nasm + - libudev-dev - clang-3.6 - libmad0-dev - libgtk2.0-dev @@ -46,6 +47,7 @@ - ubuntu-toolchain-r-test packages: - nasm + - libudev-dev - gcc-5 - g++-5 - libmad0-dev @@ -68,9 +70,9 @@ - mkdir ${DEPS_DIR} - cd ${DEPS_DIR} # Use the binary for cmake instead of building it now. - - export CMAKE_URL=http://www.cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz + - export CMAKE_URL=https://cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz - mkdir cmake - - wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake + - wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake - export PATH=${PWD}/cmake/bin:${PATH} before_script: