diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-05-03 13:38:20 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-05-03 13:38:20 +0000 |
commit | c74ed8da3751f85b4bfb235b055f404f5340eae7 (patch) | |
tree | 56462755320b0bd98cb826e533fecfbbe3d3e0b1 /src/main.cpp | |
parent | 3297165f99f0dac7a453f180e1bef05782da2c6e (diff) | |
download | mana-c74ed8da3751f85b4bfb235b055f404f5340eae7.tar.gz mana-c74ed8da3751f85b4bfb235b055f404f5340eae7.tar.bz2 mana-c74ed8da3751f85b4bfb235b055f404f5340eae7.tar.xz mana-c74ed8da3751f85b4bfb235b055f404f5340eae7.zip |
Increased fps limit granularity and cleaned some code, fixed some xml library name in Dev-C++ project file, switched version to 0.0.20.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/main.cpp b/src/main.cpp index d067d3c9..985a2ba4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -93,7 +93,6 @@ SERVER_INFO **server_info; unsigned char state; std::string errorMessage; unsigned char screen_mode; -volatile int framesToDraw = 0; Sound sound; Music *bgm; @@ -101,18 +100,6 @@ Music *bgm; Configuration config; /**< Xml file configuration reader */ Logger *logger; /**< Log object */ -/** - * Allows the next frame to be drawn (part of framerate limiting) - */ -Uint32 nextFrame(Uint32 interval, void *param) -{ - if (framesToDraw < 10) - { - framesToDraw++; - } - return interval; -} - namespace { struct ErrorListener : public gcn::ActionListener { @@ -275,9 +262,6 @@ void init_engine() hairset.push_back(tmp); } } - /*hairset = resman->createSpriteset( - "graphics/sprites/player_male_hair.png", 29, 29); - if (!hairset) logger->error("Couldn't load hair spriteset!");*/ gui = new Gui(graphics); state = UPDATE_STATE; /**< Initial game state */ @@ -295,15 +279,6 @@ void init_engine() errorMessage = err; logger->log("Warning: %s", err); } - - // Set frame counter when using fps limit - int fpsLimit = (int)config.getValue("fpslimit", 0); - if (fpsLimit) - { - if (fpsLimit < 10) fpsLimit = 10; - if (fpsLimit > 200) fpsLimit = 200; - SDL_AddTimer(1000 / fpsLimit, nextFrame, NULL); - } } /** Clear the engine */ |