mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-06-03 03:23:33 +02:00
UtilityClass: add a seconds() helper
This is intended to replace all those ugly magic frame numbers with ever so slightly less ugly magic second numbers. Basically, instead of saying: 150 /* 5 seconds */ we can now say seconds(5)
This commit is contained in:
parent
3f3ea6eac7
commit
6befae4eef
|
@ -55,6 +55,11 @@ const char *GCChar(SDL_GameControllerButton button)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int seconds(const int s)
|
||||||
|
{
|
||||||
|
return s * 30;
|
||||||
|
}
|
||||||
|
|
||||||
int ss_toi( std::string _s )
|
int ss_toi( std::string _s )
|
||||||
{
|
{
|
||||||
std::istringstream i(_s);
|
std::istringstream i(_s);
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
int seconds(const int s);
|
||||||
|
|
||||||
int ss_toi(std::string _s);
|
int ss_toi(std::string _s);
|
||||||
|
|
||||||
std::vector<std::string> split(const std::string &s, char delim, std::vector<std::string> &elems);
|
std::vector<std::string> split(const std::string &s, char delim, std::vector<std::string> &elems);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user