SAFE_DELETE -> RageUtil::SafeDelete
SAFE_DELETE_ARRAY -> RageUtil::SafeDeleteArray
Update JsonUtil.h to include RageUtil.h - MSVC doesn't need it included for some reason, but GCC and XCode does.
- Use fast data types where possible so the compiler can optimize for speed based on platform
- for example, 128 bits might be fastest on ARM
- good future-proofing
- Refactor GetTimeSinceStart() to be a bit faster
- multiplication is much faster than division
- Implement a RageTimer method to get the seconds value as a plain int, for the places which cast the seconds value to an int
- Changing from GetTimeSinceStartFast() to GetTimeSinceStart() where accuracy is important
- Changing from GetTimeSinceStart() to GetUsecsSinceStart() for timestamp diffs
- Adjust RageThreads to accomodate an unsigned timestamp value
- a constant for the maximum value of `uint_fast64_t` replaces `-1` to accommodate the change from signed to unsigned for the `locked_at` variable
- i have separate constants for `std::numeric_limits<std::uint_fast64_t>::max()` and `static_cast<std::uint_fast64_t>(-1)`, so the reader understands -1 represents an error code, though they evaluate to the same value, so i could remove one of the two
- Add two methods to calculate the MMSSMsMs / MMSSMsMsMs time value from usecs directly instead of inferring it from a seconds value, in RageUtil
- Use a similar counter/modulo based method for WheelNotifyIcon, similar to what i did for text_glow in NoteField in 2eeee03
- Make `g_iStartTime` static const for safety
Rename two timer functions:
GetUsecsSinceStart -> GetTimeSinceStartMicroseconds
GetMicrosecondsSinceStart -> GetSystemTimeAsMicroseconds
Remove std prefix from uint_fast64_t
- Remove checking for standard functions from the build system
- Prefix all invocations with std::
- Replace suffixed functions with unprefixed versions
- Include <cmath> in all files that use it and remove the global include
e.g. floorf(x) -> std::floor(x)
* Avoid crash in ~LightsDriver_SystemMessage
This will avoid a crash caused by the fact LIGHTSMAN is destroyed
after the other MAN objects
* Rework code path for turning lights off on exit
Calls to LightsDriver::reset removed from each driver to avoid any crashes
LightsDriver::reset renamed to Rest to match surrounding style
Added LightsManager::TurnOffAllLights, called before XXXMAN objects are deleted
StyleInputToGameInput changed to take a vector to return values in to handle multiple inputs mapped to a single column. Associated adjustments to everything that uses it.
Player no longer drops holds in columns that have multiple inputs mapped to them if the wrong one is held.
Running out of stage tokens changed from assert to error.
- states are zeroed at the beginning of Update(); anything not set true must be false, so don't re-zero or set false states unnecessarily
- minor readability improvements, e.g. setting a CabinetLight in switch and assignint it outside of it
- LightsMode_Menu variants now use song beat for lighting instead of GetTimeSinceStart
- reformatted switch statements to be generally more readable
- LightsMode_Demonstration now lights the pad arrows if enabled, similar to gameplay
- Pressing custom gamebuttons during attract mode will light them