blob: dff4368228b8ed979ec1b03e00f45c4722ed42b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
void
game_update(Game *this)
{
if (TZR_IsKeyDown(SDL_SCANCODE_LEFT))
this->x -= 1;
if (TZR_IsKeyDown(SDL_SCANCODE_RIGHT))
this->x += 1;
if (TZR_IsKeyDown(SDL_SCANCODE_UP))
this->y -= 1;
if (TZR_IsKeyDown(SDL_SCANCODE_DOWN))
this->y += 1;
}
|