summaryrefslogtreecommitdiff
path: root/src/graphic
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-13 14:32:36 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-13 14:32:36 +0000
commit4b2a028c8002609bd9256d1f8fd73aceee5c44fc (patch)
tree7fea11c221b5bd44a8c3cbf17643a3637e229493 /src/graphic
parent821732ebbc2760ec98e0097f38a962c67285d421 (diff)
downloadmana-client-4b2a028c8002609bd9256d1f8fd73aceee5c44fc.tar.gz
mana-client-4b2a028c8002609bd9256d1f8fd73aceee5c44fc.tar.bz2
mana-client-4b2a028c8002609bd9256d1f8fd73aceee5c44fc.tar.xz
mana-client-4b2a028c8002609bd9256d1f8fd73aceee5c44fc.zip
No need to keep track of mouse position ourselves. Also put default startup
mode to windowed.
Diffstat (limited to 'src/graphic')
-rw-r--r--src/graphic/graphic.cpp6
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 +