1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-18 10:38:31 +02:00

Rename time to time_

This is needed for the next step. I want to put all the loop stuff in
their own functions so the code isn't one huge blob, but to do that I'll
need to make 'time' a global variable, but I can't do that because
actually 'time' is already a function, apparently, and you're only
allowed to shadow variables when already inside a function.
This commit is contained in:
Misa 2020-06-14 11:43:28 -07:00 committed by Ethan Lee
parent f151cff34d
commit 3d674a6550

View File

@ -303,7 +303,7 @@ int main(int argc, char *argv[])
}
#endif
volatile Uint32 time = 0;
volatile Uint32 time_ = 0;
volatile Uint32 timePrev = 0;
volatile Uint32 accumulator = 0;
volatile Uint32 f_time = 0;
@ -334,8 +334,8 @@ int main(int argc, char *argv[])
f_accumulator = fmodf(f_accumulator, 34);
}
timePrev = time;
time = SDL_GetTicks();
timePrev = time_;
time_ = SDL_GetTicks();
game.infocus = key.isActive;
@ -343,7 +343,7 @@ int main(int argc, char *argv[])
NETWORK_update();
//timestep limit to 30
const float rawdeltatime = static_cast<float>(time - timePrev);
const float rawdeltatime = static_cast<float>(time_ - timePrev);
accumulator += rawdeltatime;
Uint32 timesteplimit;