aboutsummaryrefslogtreecommitdiff
path: root/engines/testbed/graphics.cpp
diff options
context:
space:
mode:
authorNeeraj Kumar2010-06-03 03:55:08 +0000
committerNeeraj Kumar2010-06-03 03:55:08 +0000
commitfababbe205395b6b8c812b458df3af65e3f5e01c (patch)
tree4239006dcd55d7c0677e81c41e8d2591777615ae /engines/testbed/graphics.cpp
parent91a8d25cea4eb44e55ac5e966b21c89bd044bc49 (diff)
downloadscummvm-rg350-fababbe205395b6b8c812b458df3af65e3f5e01c.tar.gz
scummvm-rg350-fababbe205395b6b8c812b458df3af65e3f5e01c.tar.bz2
scummvm-rg350-fababbe205395b6b8c812b458df3af65e3f5e01c.zip
able to display rectangle on screen using grabPalette() and copyRectToScreen, will use it to test palettes and autocomputeDirtyRects features
svn-id: r49404
Diffstat (limited to 'engines/testbed/graphics.cpp')
-rw-r--r--engines/testbed/graphics.cpp39
1 files changed, 8 insertions, 31 deletions
diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp
index a2b6a8657b..67176683ee 100644
--- a/engines/testbed/graphics.cpp
+++ b/engines/testbed/graphics.cpp
@@ -1,41 +1,17 @@
#include "testbed/graphics.h"
+#include "testbed/gfxtests.h"
namespace Testbed {
-bool testFullScreenMode() {
-
- printf("Testing fullscreen mode\n");
- bool isFeaturePresent;
- bool isFeatureEnabled;
-
- isFeaturePresent = g_system->hasFeature(OSystem::kFeatureFullscreenMode);
- isFeatureEnabled = g_system->getFeatureState(OSystem::kFeatureFullscreenMode);
-
- printf("Testing Feature Presence.. \n");
- if (isFeaturePresent) {
- //Toggle
- printf("Supported\n");
-
- g_system->beginGFXTransaction();
- g_system->setFeatureState(OSystem::kFeatureFullscreenMode, !isFeatureEnabled);
- g_system->endGFXTransaction();
-
- g_system->delayMillis(1000);
-
- g_system->beginGFXTransaction();
- g_system->setFeatureState(OSystem::kFeatureFullscreenMode, isFeatureEnabled);
- g_system->endGFXTransaction();
- }
-
- return true;
-}
-
GFXTestSuite::GFXTestSuite() {
- addTest("FullScreenMode", &testFullScreenMode);
+ //addTest("FullScreenMode", &testFullScreenMode);
+ addTest("AspectRatio", &testAspectRatio);
}
GFXTestSuite::~GFXTestSuite() {
- printf("Cleanup\n");
+ for (Common::Array<Test*>::iterator i = _testsToExecute.begin(); i != _testsToExecute.end(); ++i) {
+ delete (*i);
+ }
}
const char *GFXTestSuite::getName() {
@@ -46,10 +22,11 @@ int GFXTestSuite::execute() {
//TODO: Implement the method
for (Common::Array<Test*>::iterator i = _testsToExecute.begin(); i != _testsToExecute.end(); ++i) {
printf("Executing Test:%s\n", ((*i)->featureName).c_str());
- printf("Result:%d",(*i)->driver());
+ printf("Result:%d\n",(*i)->driver());
}
return 1;
}
+
}