diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-13 14:32:36 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-13 14:32:36 +0000 |
commit | 4b2a028c8002609bd9256d1f8fd73aceee5c44fc (patch) | |
tree | 7fea11c221b5bd44a8c3cbf17643a3637e229493 /src/graphic/graphic.cpp | |
parent | 821732ebbc2760ec98e0097f38a962c67285d421 (diff) | |
download | mana-4b2a028c8002609bd9256d1f8fd73aceee5c44fc.tar.gz mana-4b2a028c8002609bd9256d1f8fd73aceee5c44fc.tar.bz2 mana-4b2a028c8002609bd9256d1f8fd73aceee5c44fc.tar.xz mana-4b2a028c8002609bd9256d1f8fd73aceee5c44fc.zip |
No need to keep track of mouse position ourselves. Also put default startup
mode to windowed.
Diffstat (limited to 'src/graphic/graphic.cpp')
-rw-r--r-- | src/graphic/graphic.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index a0786e59..835698b4 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -222,6 +222,8 @@ void Graphics::drawImageRect( void Graphics::updateScreen() { // Draw mouse before flipping + int mouseX, mouseY; + SDL_GetMouseState(&mouseX, &mouseY); mouseCursor->draw(screen, mouseX - 5, mouseY - 2); SDL_Flip(screen); @@ -338,6 +340,10 @@ Engine::~Engine() void Engine::draw() { + // Get the current mouse position + int mouseX, mouseY; + SDL_GetMouseState(&mouseX, &mouseY); + map_x = (player_node->x - 13) * 32 + get_x_offset(player_node); map_y = (player_node->y - 9) * 32 + |