16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 15:59:18 +02:00

build 210303. vehicle control hint system, virtual trainman toggle, configurable diesel engine rpm deceleration rate, vehicle repair enhancement, debug panel enhancements, customizable vehicle displays refresh rate, idling compressor sound, traction ac motor sound, braking sound enhancement, sky state enhancement, minor bug fixes

This commit is contained in:
tmj-fstate
2021-03-04 03:41:53 +01:00
parent 4b38395cb6
commit 517c9c89f8
33 changed files with 5836 additions and 3783 deletions

View File

@@ -461,12 +461,20 @@ len_common_prefix( std::string const &Left, std::string const &Right ) {
// returns true if provided string ends with another provided string
bool
ends_with( std::string const &String, std::string const &Suffix ) {
ends_with( std::string_view String, std::string_view Suffix ) {
return ( String.size() >= Suffix.size() )
&& ( 0 == String.compare( String.size() - Suffix.size(), Suffix.size(), Suffix ) );
}
// returns true if provided string begins with another provided string
bool
starts_with( std::string_view const String, std::string_view Prefix ) {
return ( String.size() >= Prefix.size() )
&& ( 0 == String.compare( 0, Prefix.size(), Prefix ) );
}
// helper, restores content of a 3d vector from provided input stream
// TODO: review and clean up the helper routines, there's likely some redundant ones
glm::dvec3 LoadPoint( cParser &Input ) {