diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-07-14 00:41:48 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-07-14 00:41:48 +0000 |
commit | 06111415b117fc47b5b8bf6396d855616778f3b0 (patch) | |
tree | 54d21336701541b77750554e248b9a92dcba95c6 /src/graphics.cpp | |
parent | 4ecc89dcc6516b10c6dab8b79dcaa435ec9e1435 (diff) | |
download | mana-06111415b117fc47b5b8bf6396d855616778f3b0.tar.gz mana-06111415b117fc47b5b8bf6396d855616778f3b0.tar.bz2 mana-06111415b117fc47b5b8bf6396d855616778f3b0.tar.xz mana-06111415b117fc47b5b8bf6396d855616778f3b0.zip |
Committed resource manager cleanup patch by Doener, and properly implemented
the custom mouse cursor option, which is now also dynamically changeable
through the setup window.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r-- | src/graphics.cpp | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index 16b8f67b..5eae65bf 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -31,8 +31,7 @@ extern volatile int framesToDraw; SDL_Surface *screen; -Graphics::Graphics(): - mouseCursor(NULL) +Graphics::Graphics() { if (useOpenGL) { #ifdef USE_OPENGL @@ -53,19 +52,6 @@ Graphics::Graphics(): #endif } - if (config.getValue("cursor", 1) == 1) - { - // Hide the system mouse cursor - SDL_ShowCursor(SDL_DISABLE); - - // Load the mouse cursor - ResourceManager *resman = ResourceManager::getInstance(); - mouseCursor = resman->getImage("graphics/gui/mouse.png"); - if (!mouseCursor) { - logger->error("Unable to load mouse cursor."); - } - } - // Initialize for drawing _beginDraw(); } @@ -74,8 +60,6 @@ Graphics::~Graphics() { // Deinitialize for drawing _endDraw(); - - mouseCursor->decRef(); } int Graphics::getWidth() @@ -140,17 +124,6 @@ void Graphics::drawImageRect( void Graphics::updateScreen() { - int mouseX, mouseY; - Uint8 button = SDL_GetMouseState(&mouseX, &mouseY); - - if (SDL_GetAppState() & SDL_APPMOUSEFOCUS || button & SDL_BUTTON(1)) - { - // Draw mouse before flipping - if (mouseCursor != NULL) { - mouseCursor->draw(screen, mouseX - 5, mouseY - 2); - } - } - if (useOpenGL) { #ifdef USE_OPENGL glFlush(); |