diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2008-09-08 22:18:28 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2008-09-08 22:18:28 +0200 |
commit | ef16dbc591bec9a8cc07f76d44d1b4e991c83b65 (patch) | |
tree | cc1adceb9b00fd168936c2b672bc6191a59a6e2d | |
parent | 7ce7e9f7904b9cfaedb735003e796456b9f6f3dc (diff) |
-rw-r--r-- | hdaps-tux.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hdaps-tux.c b/hdaps-tux.c index 1856040..9228883 100644 --- a/hdaps-tux.c +++ b/hdaps-tux.c @@ -99,15 +99,15 @@ int main(int argc, char *argv[]) SDL_SetColorKey(image, SDL_SRCCOLORKEY, SDL_MapRGB(image->format, 255, 255, 255)); /* Calculate and set initial position of tux (centre of the window) */ - tuxX = (W_WIDTH / 2) - (image->w / 2); - tuxY = (W_HEIGHT / 2) - (image->h / 2); + tuxX = (W_WIDTH - image->w) / 2; + tuxY = (W_HEIGHT - image->h) / 2; /* Get the hdaps position so we have something to start from */ get_pos(&hdapsX, &hdapsY); while (!done) { while (SDL_PollEvent(&event)) { - switch(event.type) { + switch (event.type) { case SDL_QUIT: done = 1; break; |