aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/testbed/config.cpp3
-rw-r--r--engines/testbed/detection.cpp2
-rw-r--r--engines/testbed/graphics.cpp21
-rw-r--r--engines/testbed/graphics.h2
-rw-r--r--engines/testbed/savegame.cpp4
-rw-r--r--engines/testbed/sound.h4
-rw-r--r--engines/testbed/testsuite.cpp5
-rw-r--r--engines/testbed/testsuite.h6
8 files changed, 20 insertions, 27 deletions
diff --git a/engines/testbed/config.cpp b/engines/testbed/config.cpp
index 467d28ad56..2ffd1b2050 100644
--- a/engines/testbed/config.cpp
+++ b/engines/testbed/config.cpp
@@ -159,7 +159,7 @@ void TestbedInteractionDialog::addList(uint x, uint y, uint w, uint h, const Com
_yOffset += h;
}
-void TestbedInteractionDialog::addButtonXY(uint x, uint y, uint w, uint h, const Common::String name, uint32 cmd) {
+void TestbedInteractionDialog::addButtonXY(uint x, uint /* y */, uint w, uint h, const Common::String name, uint32 cmd) {
_buttonArray.push_back(new GUI::ButtonWidget(this, x, _yOffset, w, h, name, 0, cmd));
}
@@ -174,7 +174,6 @@ void TestbedConfigManager::initDefaultConfiguration() {
}
void TestbedConfigManager::writeTestbedConfigToStream(Common::WriteStream *ws) {
- Common::String wStr;
for (Common::Array<Testsuite *>::const_iterator i = _testsuiteList.begin(); i < _testsuiteList.end(); i++) {
_configFileInterface.setKey("this", (*i)->getName(), boolToString((*i)->isEnabled()));
const Common::Array<Test *> &testList = (*i)->getTestList();
diff --git a/engines/testbed/detection.cpp b/engines/testbed/detection.cpp
index 91518b2b8e..13af0f1584 100644
--- a/engines/testbed/detection.cpp
+++ b/engines/testbed/detection.cpp
@@ -83,7 +83,7 @@ public:
return "Copyright (C) ScummVM";
}
- virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription * /* desc */) const {
// Instantiate Engine even if the game data is not found.
*engine = new Testbed::TestbedEngine(syst);
return true;
diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp
index b7f6857c9f..5b30b3c6ee 100644
--- a/engines/testbed/graphics.cpp
+++ b/engines/testbed/graphics.cpp
@@ -186,7 +186,7 @@ void GFXtests::HSVtoRGB(int &rComp, int &gComp, int &bComp, int hue, int sat, in
bComp = (int)(b * 255);
}
-Common::Rect GFXtests::drawCursor(bool cursorPaletteDisabled, const char *gfxModeName, int cursorTargetScale) {
+Common::Rect GFXtests::drawCursor(bool cursorPaletteDisabled, int cursorTargetScale) {
// Buffer initialized with yellow color
byte buffer[500];
memset(buffer, 2, sizeof(buffer));
@@ -249,7 +249,7 @@ void GFXtests::setupMouseLoop(bool disableCursorPalette, const char *gfxModeName
if (isFeaturePresent) {
- cursorRect = GFXtests::drawCursor(disableCursorPalette, gfxModeName, cursorTargetScale);
+ cursorRect = GFXtests::drawCursor(disableCursorPalette, cursorTargetScale);
Common::EventManager *eventMan = g_system->getEventManager();
Common::Event event;
@@ -741,7 +741,7 @@ TestExitStatus GFXtests::scaledCursors() {
if (isAspectRatioCorrected) {
info += "\nDisabling Aspect ratio correction, for letting cusors match exactly, will be restored after this test.";
}
-
+
if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) {
Testsuite::logPrintf("Info! Skipping test : Scaled Cursors\n");
return kTestSkipped;
@@ -753,7 +753,7 @@ TestExitStatus GFXtests::scaledCursors() {
}
- if (isAspectRatioCorrected) {
+ if (isAspectRatioCorrected) {
g_system->beginGFXTransaction();
g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, false);
g_system->endGFXTransaction();
@@ -766,7 +766,7 @@ TestExitStatus GFXtests::scaledCursors() {
// for every graphics mode display cursors for cursorTargetScale 1, 2 and 3
// Switch Graphics mode
// FIXME: Crashes with "3x" mode now.:
-
+
info = Common::String::format("Testing : Scaled cursors with GFX Mode %s\n", gfxMode->name);
if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) {
Testsuite::logPrintf("\tInfo! Skipping sub-test : Scaled Cursors :: GFX Mode %s\n", gfxMode->name);
@@ -779,7 +779,7 @@ TestExitStatus GFXtests::scaledCursors() {
Testsuite::logPrintf("Info! Explicit exit requested during scaling test, this test may be incomplete\n");
return kTestSkipped;
}
-
+
g_system->beginGFXTransaction();
bool isGFXModeSet = g_system->setGraphicsMode(gfxMode->id);
@@ -807,7 +807,7 @@ TestExitStatus GFXtests::scaledCursors() {
if (Testsuite::handleInteractiveInput(info, "Yes", "No", kOptionRight)) {
Testsuite::logPrintf("\tInfo! Failed sub-test : Scaled Cursors :: GFX Mode %s\n", gfxMode->name);
}
-
+
if (Engine::shouldQuit()) {
// Explicit exit requested
Testsuite::logPrintf("Info! Explicit exit requested during scaling test, this test may be incomplete\n");
@@ -824,7 +824,7 @@ TestExitStatus GFXtests::scaledCursors() {
if (isAspectRatioCorrected) {
g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, true);
}
-
+
OSystem::TransactionError gfxError = g_system->endGFXTransaction();
if (gfxError != OSystem::kTransactionSuccess || !isGFXModeSet) {
@@ -962,7 +962,7 @@ TestExitStatus GFXtests::paletteRotation() {
Testsuite::logPrintf("Info! Skipping test : palette Rotation\n");
return kTestSkipped;
}
- Common::Point pt(0, 10);
+
Testsuite::clearEntireScreen();
// Use 256 colors
@@ -1065,7 +1065,6 @@ TestExitStatus GFXtests::pixelFormats() {
}
Common::List<Graphics::PixelFormat> pfList = g_system->getSupportedFormats();
- Common::List<Graphics::PixelFormat>::const_iterator iter = pfList.begin();
int numFormatsTested = 0;
int numPassed = 0;
@@ -1073,7 +1072,7 @@ TestExitStatus GFXtests::pixelFormats() {
Testsuite::logDetailedPrintf("Testing Pixel Formats. Size of list : %d\n", pfList.size());
- for (iter = pfList.begin(); iter != pfList.end(); iter++) {
+ for (Common::List<Graphics::PixelFormat>::const_iterator iter = pfList.begin(); iter != pfList.end(); iter++) {
numFormatsTested++;
if (iter->bytesPerPixel == 1) {
// Palettes already tested
diff --git a/engines/testbed/graphics.h b/engines/testbed/graphics.h
index 07a68b5584..f3013fdf53 100644
--- a/engines/testbed/graphics.h
+++ b/engines/testbed/graphics.h
@@ -34,7 +34,7 @@ void setupMouseLoop(bool disableCursorPalette = false, const char *gfxModeName =
void initMousePalette();
Common::Rect computeSize(const Common::Rect &cursorRect, int scalingFactor, int cursorTargetScale);
void HSVtoRGB(int &rComp, int &gComp, int &bComp, int hue, int sat, int val);
-Common::Rect drawCursor(bool cursorPaletteDisabled = false, const char *gfxModeName = "", int cursorTargetScale = 1);
+Common::Rect drawCursor(bool cursorPaletteDisabled = false, int cursorTargetScale = 1);
// will contain function declarations for GFX tests
TestExitStatus cursorTrails();
diff --git a/engines/testbed/savegame.cpp b/engines/testbed/savegame.cpp
index b19c8e3872..b90c79aa11 100644
--- a/engines/testbed/savegame.cpp
+++ b/engines/testbed/savegame.cpp
@@ -158,11 +158,9 @@ TestExitStatus SaveGametests::testListingSavefile() {
}
}
return kTestPassed;
- } else {
- Testsuite::logDetailedPrintf("listing Savefiles failed!\n");
- return kTestFailed;
}
+ Testsuite::logDetailedPrintf("listing Savefiles failed!\n");
return kTestFailed;
}
diff --git a/engines/testbed/sound.h b/engines/testbed/sound.h
index 76d0c7bb61..fea7d9d45b 100644
--- a/engines/testbed/sound.h
+++ b/engines/testbed/sound.h
@@ -69,10 +69,6 @@ public:
const char *getDescription() const {
return "Sound Subsystem";
}
-
-private:
- bool _isTestDataFound;
-
};
} // End of namespace Testbed
diff --git a/engines/testbed/testsuite.cpp b/engines/testbed/testsuite.cpp
index 77211b3e64..655179aa74 100644
--- a/engines/testbed/testsuite.cpp
+++ b/engines/testbed/testsuite.cpp
@@ -113,7 +113,7 @@ bool Testsuite::handleInteractiveInput(const Common::String &textToDisplay, cons
return prompt.runModal() == result ? true : false;
}
-void Testsuite::displayMessage(const Common::String &textToDisplay, const char *defaultButton, const char *altButton) {
+void Testsuite::displayMessage(const Common::String &textToDisplay, const char *defaultButton) {
GUI::MessageDialog prompt(textToDisplay, defaultButton);
prompt.runModal();
}
@@ -214,10 +214,11 @@ uint Testsuite::parseEvents() {
return kSkipNext;
}
break;
+
case Common::EVENT_QUIT:
case Common::EVENT_RTL:
return kEngineQuit;
- break;
+
default:
break;
}
diff --git a/engines/testbed/testsuite.h b/engines/testbed/testsuite.h
index 3a3a78b9bb..dc159ce25f 100644
--- a/engines/testbed/testsuite.h
+++ b/engines/testbed/testsuite.h
@@ -112,7 +112,7 @@ public:
*/
static bool handleInteractiveInput(const Common::String &textToDisplay, const char *opt1 = "Yes", const char *opt2 = "No", OptionSelected result = kOptionLeft);
- static void displayMessage(const Common::String &textToDisplay, const char *defaultButton = "OK", const char *altButton = 0);
+ static void displayMessage(const Common::String &textToDisplay, const char *defaultButton = "OK");
static Common::Rect writeOnScreen(const Common::String &textToDisplay, const Common::Point &pt, bool flag = false);
static void clearScreen(const Common::Rect &rect);
static void clearEntireScreen() {
@@ -145,7 +145,7 @@ public:
static void logPrintf(const char *s, ...) GCC_PRINTF(1, 2);
static void logDetailedPrintf(const char *s, ...) GCC_PRINTF(1, 2);
-
+
// Progress bar (Information Display) related methods.
/**
* Display region is in the bottom. Probably 1/4th of the game screen.
@@ -180,7 +180,7 @@ protected:
bool _isTsEnabled;
private:
-
+
/**
* Used from the code to decide if the engine needs to exit
*/