diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-12-24 12:31:02 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-12-24 12:31:02 +0000 |
commit | eaa16c5602d7f9081ef16c799f4492b68cc81a9c (patch) | |
tree | 5ff83fa26f7675dd6feb66c0bca2138a90ee4bf7 | |
parent | 3134c856230ad9d84a009ae7ed4d08a56aecaad7 (diff) | |
download | mana-client-eaa16c5602d7f9081ef16c799f4492b68cc81a9c.tar.gz mana-client-eaa16c5602d7f9081ef16c799f4492b68cc81a9c.tar.bz2 mana-client-eaa16c5602d7f9081ef16c799f4492b68cc81a9c.tar.xz mana-client-eaa16c5602d7f9081ef16c799f4492b68cc81a9c.zip |
Fringe layer draw fix and change in policy on when using OpenGL is the default.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | NEWS | 10 | ||||
-rw-r--r-- | src/main.cpp | 6 | ||||
-rw-r--r-- | src/map.cpp | 15 |
4 files changed, 27 insertions, 15 deletions
@@ -1,3 +1,10 @@ +2005-12-24 Bjørn Lindeijer <bjorn@lindeijer.nl> + + * src/map.cpp: Worked around fringe layer drawing bug at the bottom. + * src/main.cpp: When compiling with OpenGL support, it'll default to + using OpenGL on only Windows and Mac. These systems are known to have + stable acceleration most of the time. + 2005-12-20 Bjørn Lindeijer <bjorn@lindeijer.nl> * configure.ac: Changed version to 0.0.18. @@ -77,7 +84,7 @@ 2005-10-19 Duane Bailey <nayryeliab@gmail.com> - * data/help/index.txt: added SDL_net reference. + * data/help/index.txt: Added SDL_net reference. 2005-10-19 Yohann Ferreira <bertram@cegetel.net> @@ -121,7 +128,7 @@ 2005-10-16 Duane Bailey <nayryeliab@gmail.com> - * src/main.cpp: opengl is now default for mac, win, and those who + * src/main.cpp: OpenGL is now default for mac, win, and those who define USE_OPENGL * src/gui/setup.cpp: made it so those who use and go to fullscreen requires a restart (texture/context baddies) @@ -1,12 +1,12 @@ 0.0.18 (20 December 2005) -- Fixed setup window behaviour -- Enabled monster emotions - Added new items, npcs, tilesets, maps and monsters +- Non blocking connection at startup +- Enabled monster emotions - Client version is now displayed during login +- Fixed setup window behaviour - Fixed a Windows crash issue -- Fixed ScrollArea and BrowserBow behaviour -- Non blocking connection at startup -- Cleaned up a lot of code +- Fixed ScrollArea and BrowserBox behaviour +- Code cleanups 0.0.17 (10 October 2005) - Added remembering of window position and sizes diff --git a/src/main.cpp b/src/main.cpp index 03e6000f..7daba4bf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -181,11 +181,11 @@ void init_engine() config.setValue("host", "animesites.de"); config.setValue("port", 6901); config.setValue("hwaccel", 0); - #if defined __APPLE__ || defined WIN32 || defined USE_OPENGL +#if (defined __APPLE__ || defined WIN32) && defined USE_OPENGL config.setValue("opengl", 1); - #else +#else config.setValue("opengl", 0); - #endif +#endif config.setValue("screen", 0); config.setValue("sound", 1); config.setValue("guialpha", 0.8f); diff --git a/src/map.cpp b/src/map.cpp index 449f72e9..5150bcff 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -96,18 +96,23 @@ bool spriteCompare(const Sprite *a, const Sprite *b) void Map::draw(Graphics *graphics, int scrollX, int scrollY, int layer) { + int startX = scrollX / 32; + int startY = scrollY / 32; + int endX = (graphics->getWidth() + scrollX + 31) / 32; + int endY = (graphics->getHeight() + scrollY + 31) / 32; + // If drawing the fringe layer, make sure sprites are sorted Sprites::iterator si; if (layer == 1) { mSprites.sort(spriteCompare); si = mSprites.begin(); - } - int startX = scrollX / 32; - int startY = scrollY / 32; - int endX = (graphics->getWidth() + scrollX + 31) / 32; - int endY = (graphics->getHeight() + scrollY + 31) / 32; + // Increase endY to account for high fringe tiles + // TODO: Improve this hack so that it'll dynamically account for the + // highest tile. + endY += 2; + } if (startX < 0) startX = 0; if (startY < 0) startY = 0; |