Added camera operations and better input handling
This commit is contained in:
@@ -25,7 +25,6 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
//While application is running
|
||||
bool quit = false;
|
||||
SDL_Event e;
|
||||
DarkRP2D resA(gWindow);
|
||||
resA.create();
|
||||
unsigned int lastTime = SDL_GetTicks(), currentTime, elapsedTime;
|
||||
@@ -33,16 +32,7 @@ int main(int argc, char *argv[]) {
|
||||
currentTime = SDL_GetTicks();
|
||||
elapsedTime = currentTime - lastTime;
|
||||
lastTime = currentTime;
|
||||
if(SDL_PollEvent(&e) != 0) {
|
||||
if(e.type == SDL_QUIT) {
|
||||
quit = true;
|
||||
break;
|
||||
}
|
||||
resA.loop(&e,elapsedTime);
|
||||
} else {
|
||||
resA.loop(NULL,elapsedTime);
|
||||
}
|
||||
|
||||
resA.loop(elapsedTime);
|
||||
}
|
||||
|
||||
dispose();
|
||||
|
||||
Reference in New Issue
Block a user