aboutsummaryrefslogtreecommitdiff
path: root/engines/testbed
diff options
context:
space:
mode:
Diffstat (limited to 'engines/testbed')
-rw-r--r--engines/testbed/config.cpp6
-rw-r--r--engines/testbed/config.h6
-rw-r--r--engines/testbed/graphics.cpp2
-rw-r--r--engines/testbed/graphics.h2
-rw-r--r--engines/testbed/misc.cpp2
-rw-r--r--engines/testbed/misc.h2
6 files changed, 10 insertions, 10 deletions
diff --git a/engines/testbed/config.cpp b/engines/testbed/config.cpp
index 6adf82952f..467d28ad56 100644
--- a/engines/testbed/config.cpp
+++ b/engines/testbed/config.cpp
@@ -150,7 +150,7 @@ void TestbedInteractionDialog::addButton(uint w, uint h, const Common::String na
_yOffset += h;
}
-void TestbedInteractionDialog::addList(uint x, uint y, uint w, uint h, Common::Array<Common::String> &strArray, GUI::ListWidget::ColorList *colors, uint yPadding) {
+void TestbedInteractionDialog::addList(uint x, uint y, uint w, uint h, const Common::Array<Common::String> &strArray, GUI::ListWidget::ColorList *colors, uint yPadding) {
_yOffset += yPadding;
GUI::ListWidget *list = new GUI::ListWidget(this, x, y, w, h);
list->setEditable(false);
@@ -186,13 +186,13 @@ void TestbedConfigManager::writeTestbedConfigToStream(Common::WriteStream *ws) {
ws->flush();
}
-Common::SeekableReadStream *TestbedConfigManager::getConfigReadStream() {
+Common::SeekableReadStream *TestbedConfigManager::getConfigReadStream() const {
// Look for config file using SearchMan
Common::SeekableReadStream *rs = SearchMan.createReadStreamForMember(_configFileName);
return rs;
}
-Common::WriteStream *TestbedConfigManager::getConfigWriteStream() {
+Common::WriteStream *TestbedConfigManager::getConfigWriteStream() const {
// Look for config file in game-path
const Common::String &path = ConfMan.get("path");
Common::WriteStream *ws;
diff --git a/engines/testbed/config.h b/engines/testbed/config.h
index c0df65ad32..fd5588aa31 100644
--- a/engines/testbed/config.h
+++ b/engines/testbed/config.h
@@ -50,8 +50,8 @@ public:
~TestbedConfigManager() {}
void selectTestsuites();
void setConfigFile(const Common::String fName) { _configFileName = fName; }
- Common::SeekableReadStream *getConfigReadStream();
- Common::WriteStream *getConfigWriteStream();
+ Common::SeekableReadStream *getConfigReadStream() const;
+ Common::WriteStream *getConfigWriteStream() const;
void writeTestbedConfigToStream(Common::WriteStream *ws);
Testsuite *getTestsuiteByName(const Common::String &name);
bool stringToBool(const Common::String str) { return str.equalsIgnoreCase("true") ? true : false; }
@@ -119,7 +119,7 @@ public:
void addButton(uint w, uint h, const Common::String name, uint32 cmd, uint xOffset = 0, uint yPadding = 8);
void addButtonXY(uint x, uint y, uint w, uint h, const Common::String name, uint32 cmd);
void addText(uint w, uint h, const Common::String text, Graphics::TextAlign textAlign, uint xOffset, uint yPadding = 8);
- void addList(uint x, uint y, uint w, uint h, Common::Array<Common::String> &strArray, GUI::ListWidget::ColorList *colors = 0, uint yPadding = 8);
+ void addList(uint x, uint y, uint w, uint h, const Common::Array<Common::String> &strArray, GUI::ListWidget::ColorList *colors = 0, uint yPadding = 8);
protected:
Common::Array<GUI::ButtonWidget *> _buttonArray;
uint _xOffset;
diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp
index d5b5da788a..b7f6857c9f 100644
--- a/engines/testbed/graphics.cpp
+++ b/engines/testbed/graphics.cpp
@@ -102,7 +102,7 @@ void GFXtests::initMousePalette() {
CursorMan.replaceCursorPalette(palette, 0, 3);
}
-Common::Rect GFXtests::computeSize(Common::Rect &cursorRect, int scalingFactor, int cursorTargetScale) {
+Common::Rect GFXtests::computeSize(const Common::Rect &cursorRect, int scalingFactor, int cursorTargetScale) {
if (cursorTargetScale == 1 || scalingFactor == 1) {
// Game data and cursor would be scaled equally.
// so dimensions would be same.
diff --git a/engines/testbed/graphics.h b/engines/testbed/graphics.h
index 7fa8f9d708..07a68b5584 100644
--- a/engines/testbed/graphics.h
+++ b/engines/testbed/graphics.h
@@ -32,7 +32,7 @@ namespace GFXtests {
void drawEllipse(int x, int y, int a, int b);
void setupMouseLoop(bool disableCursorPalette = false, const char *gfxModeName = "", int cursorTargetScale = 1);
void initMousePalette();
-Common::Rect computeSize(Common::Rect &cursorRect, int scalingFactor, int cursorTargetScale);
+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);
diff --git a/engines/testbed/misc.cpp b/engines/testbed/misc.cpp
index 642e0b8ae2..034d3eb27e 100644
--- a/engines/testbed/misc.cpp
+++ b/engines/testbed/misc.cpp
@@ -24,7 +24,7 @@
namespace Testbed {
-Common::String MiscTests::getHumanReadableFormat(TimeDate &td) {
+Common::String MiscTests::getHumanReadableFormat(const TimeDate &td) {
return Common::String::format("%d:%d:%d on %d/%d/%d (dd/mm/yyyy)", td.tm_hour, td.tm_min, td.tm_sec, td.tm_mday, td.tm_mon + 1, td.tm_year + 1900);
}
diff --git a/engines/testbed/misc.h b/engines/testbed/misc.h
index 415fe82903..3f0772c6e5 100644
--- a/engines/testbed/misc.h
+++ b/engines/testbed/misc.h
@@ -40,7 +40,7 @@ namespace MiscTests {
// Miscellaneous tests include testing datetime, timers and mutexes
// Helper functions for Misc tests
-Common::String getHumanReadableFormat(TimeDate &td);
+Common::String getHumanReadableFormat(const TimeDate &td);
void timerCallback(void *arg);
void criticalSection(void *arg);