summaryrefslogtreecommitdiff
path: root/src/test/testlauncher.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-05-19 22:35:59 +0300
committerAndrei Karas <akaras@inbox.ru>2012-05-19 23:27:56 +0300
commitc58b0c2963a45b5e8bc15cad66409634a9270ce1 (patch)
treed2a03317d2b1c76d3fca9c8082975866cd27dd3c /src/test/testlauncher.cpp
parentf0a7d551bad15085c1f72df38b6a216c8bf3127d (diff)
downloadManaVerse-c58b0c2963a45b5e8bc15cad66409634a9270ce1.tar.gz
ManaVerse-c58b0c2963a45b5e8bc15cad66409634a9270ce1.tar.bz2
ManaVerse-c58b0c2963a45b5e8bc15cad66409634a9270ce1.tar.xz
ManaVerse-c58b0c2963a45b5e8bc15cad66409634a9270ce1.zip
Improve fps test.
Diffstat (limited to 'src/test/testlauncher.cpp')
-rw-r--r--src/test/testlauncher.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp
index 84caf5afd..59b98d754 100644
--- a/src/test/testlauncher.cpp
+++ b/src/test/testlauncher.cpp
@@ -125,15 +125,16 @@ int TestLauncher::testFps()
Wallpaper::loadWallpapers();
Wallpaper::getWallpaper(800, 600);
- Image *img[4];
+ Image *img[5];
img[0] = Theme::getImageFromTheme("graphics/sprites/arrow_up.gif");
- img[1] = Theme::getImageFromTheme("graphics/sprites/arrow_down.gif");
- img[2] = Theme::getImageFromTheme("graphics/sprites/arrow_left.gif");
- img[3] = Theme::getImageFromTheme("graphics/sprites/arrow_right.gif");
+ img[1] = Theme::getImageFromTheme("graphics/gui/target-cursor-normal-l.png");
+ img[2] = Theme::getImageFromTheme("themes/wood/window.png");
+ img[3] = Theme::getImageFromTheme("themes/pink/window.png");
+ img[4] = Theme::getImageFromTheme("graphics/images/login_wallpaper.png");
int idx = 0;
- int cnt = 500;
+ int cnt = 20;
gettimeofday(&start, nullptr);
for (int k = 0; k < cnt; k ++)
@@ -144,7 +145,11 @@ int TestLauncher::testFps()
{
mainGraphics->drawImage(img[idx], x, y);
idx ++;
- if (idx > 3)
+ if (idx > 4)
+ idx = 0;
+ mainGraphics->drawImage(img[idx], x, y);
+ idx ++;
+ if (idx > 4)
idx = 0;
}
}