summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-18 14:55:34 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-18 14:55:34 +0000
commit2f105505996510db2b462e15ef9c7cf77ab9bbb6 (patch)
tree59100bc7032b0bd4ead2cdab4321b990c194bbbe
parent2008dd972c0fee0c57d41770327059b817b3b142 (diff)
downloadmana-2f105505996510db2b462e15ef9c7cf77ab9bbb6.tar.gz
mana-2f105505996510db2b462e15ef9c7cf77ab9bbb6.tar.bz2
mana-2f105505996510db2b462e15ef9c7cf77ab9bbb6.tar.xz
mana-2f105505996510db2b462e15ef9c7cf77ab9bbb6.zip
Changed default depth to 32 and fixed window snapping by one pixel.
-rw-r--r--data/core/graphics/gui/dialog_right.pngbin606 -> 624 bytes
-rw-r--r--src/gui/window.cpp8
-rw-r--r--src/main.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/data/core/graphics/gui/dialog_right.png b/data/core/graphics/gui/dialog_right.png
index 9d34d2f5..42f46f80 100644
--- a/data/core/graphics/gui/dialog_right.png
+++ b/data/core/graphics/gui/dialog_right.png
Binary files differ
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 1429830d..0c15ab97 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -219,14 +219,14 @@ void Window::mouseMotion(int mx, int my)
// Keep guichan window inside window
if (x < 0) x = 0;
if (y < 0) y = 0;
- if (x + winWidth > 799) x = 799 - winWidth;
- if (y + winHeight > 599) y = 599 - winHeight;
+ if (x + winWidth > screen->w) x = screen->w - winWidth;
+ if (y + winHeight > screen->h) y = screen->h - winHeight;
// Snap window to edges
if (x < snapSize) x = 0;
if (y < snapSize) y = 0;
- if (x + winWidth + snapSize > 799) x = 799 - winWidth;
- if (y + winHeight + snapSize > 599) y = 599 - winHeight;
+ if (x + winWidth + snapSize > screen->w) x = screen->w - winWidth;
+ if (y + winHeight + snapSize > screen->h) y = screen->h - winHeight;
this->setPosition(x, y);
}
diff --git a/src/main.cpp b/src/main.cpp
index 758e18f3..9d128581 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -210,9 +210,9 @@ void init_engine() {
displayFlags |= SDL_SWSURFACE;
}
- screen = SDL_SetVideoMode(800, 600, 16, displayFlags);
+ screen = SDL_SetVideoMode(800, 600, 32, displayFlags);
if (screen == NULL) {
- std::cerr << "Couldn't set 800x600x16 video mode: " <<
+ std::cerr << "Couldn't set 800x600x32 video mode: " <<
SDL_GetError() << std::endl;
exit(1);
}