aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2006-09-16 15:01:14 +0000
committerMax Horn2006-09-16 15:01:14 +0000
commita2dc897fe58e5521361a07b1e39a8b4c84d0dacf (patch)
tree623d9f98ca93a828bbe4fd05bf2f4735a181b950 /engines
parent250133baf0f665deca81d20631df1299ca571b81 (diff)
downloadscummvm-rg350-a2dc897fe58e5521361a07b1e39a8b4c84d0dacf.tar.gz
scummvm-rg350-a2dc897fe58e5521361a07b1e39a8b4c84d0dacf.tar.bz2
scummvm-rg350-a2dc897fe58e5521361a07b1e39a8b4c84d0dacf.zip
Reduce code duplication
svn-id: r23888
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/agi.cpp4
-rw-r--r--engines/agi/agi.h2
-rw-r--r--engines/cine/cine.cpp4
-rw-r--r--engines/cine/cine.h2
-rw-r--r--engines/gob/gob.cpp4
-rw-r--r--engines/gob/gob.h2
-rw-r--r--engines/kyra/kyra.cpp4
-rw-r--r--engines/kyra/kyra.h2
-rw-r--r--engines/lure/debugger.cpp2
-rw-r--r--engines/lure/debugger.h2
-rw-r--r--engines/lure/lure.cpp4
-rw-r--r--engines/lure/lure.h1
-rw-r--r--engines/saga/saga.cpp4
-rw-r--r--engines/saga/saga.h2
-rw-r--r--engines/sword1/sword1.cpp4
-rw-r--r--engines/sword1/sword1.h1
16 files changed, 1 insertions, 43 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 2c083959de..a12b83cd67 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -560,10 +560,6 @@ AgiEngine::~AgiEngine() {
delete _console;
}
-void AgiEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
int AgiEngine::init() {
// Initialize backend
_system->beginGFXTransaction();
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 424c402b36..6955ff3636 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -229,8 +229,6 @@ extern const char *_savePath;
class AgiEngine : public ::Engine {
int _gameId;
- void errorString(const char *buf_input, char *buf_output);
-
protected:
int init();
int go();
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index e02c04d7cf..2868f50c73 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -167,10 +167,6 @@ CineEngine::CineEngine(OSystem *syst) : Engine(syst) {
CineEngine::~CineEngine() {
}
-void CineEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
int CineEngine::init() {
// Initialize backend
_system->beginGFXTransaction();
diff --git a/engines/cine/cine.h b/engines/cine/cine.h
index 40e730fd70..40c23e4d69 100644
--- a/engines/cine/cine.h
+++ b/engines/cine/cine.h
@@ -55,8 +55,6 @@ enum CineGameId {
class CineEngine : public Engine {
int _gameId;
- void errorString(const char *buf_input, char *buf_output);
-
protected:
int init();
int go();
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index 739a55801e..43a4beb4ac 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -204,10 +204,6 @@ GobEngine::~GobEngine() {
delete[] _startTot0;
}
-void GobEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
int GobEngine::go() {
_init->initGame(0);
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index fce5dea35a..91a53ea050 100644
--- a/engines/gob/gob.h
+++ b/engines/gob/gob.h
@@ -82,8 +82,6 @@ enum {
};
class GobEngine : public Engine {
- void errorString(const char *buf_input, char *buf_output);
-
protected:
int go();
int init();
diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp
index 2fb57d29c1..28de21a792 100644
--- a/engines/kyra/kyra.cpp
+++ b/engines/kyra/kyra.cpp
@@ -411,10 +411,6 @@ KyraEngine_v1::~KyraEngine_v1() {
}
-void KyraEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
int KyraEngine::go() {
if (_features & GF_FLOPPY && !(_features & GF_AMIGA)) {
diff --git a/engines/kyra/kyra.h b/engines/kyra/kyra.h
index b3e6c3c061..e7e78ac272 100644
--- a/engines/kyra/kyra.h
+++ b/engines/kyra/kyra.h
@@ -252,8 +252,6 @@ public:
virtual int setupGameFlags() = 0;
- void errorString(const char *buf_input, char *buf_output);
-
Resource *resource() { return _res; }
Screen *screen() { return _screen; }
ScreenAnimator *animator() { return _animator; }
diff --git a/engines/lure/debugger.cpp b/engines/lure/debugger.cpp
index 3567c8cced..4c67176a27 100644
--- a/engines/lure/debugger.cpp
+++ b/engines/lure/debugger.cpp
@@ -46,7 +46,7 @@ Debugger::Debugger(): Common::Debugger<Debugger>() {
DCmd_Register("hotspot", &Debugger::cmd_hotspot);
}
-int Debugger::strToInt(const char *s) {
+static int strToInt(const char *s) {
if (!*s)
// No string at all
return 0;
diff --git a/engines/lure/debugger.h b/engines/lure/debugger.h
index df814db6ee..cfd48ec274 100644
--- a/engines/lure/debugger.h
+++ b/engines/lure/debugger.h
@@ -30,8 +30,6 @@ namespace Lure {
class KyraEngine;
class Debugger : public Common::Debugger<Debugger> {
-private:
- int strToInt(const char *s);
public:
Debugger();
virtual ~Debugger() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index 324ac8056b..deba78b698 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -314,10 +314,6 @@ int LureEngine::go() {
return 0;
}
-void LureEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
void LureEngine::quitGame() {
_system->quit();
}
diff --git a/engines/lure/lure.h b/engines/lure/lure.h
index 73434761cf..c1887c97fd 100644
--- a/engines/lure/lure.h
+++ b/engines/lure/lure.h
@@ -60,7 +60,6 @@ public:
virtual int init();
virtual int go();
- virtual void errorString(const char *buf_input, char *buf_output);
void quitGame();
uint32 features() { return _features; }
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index f952cdb60b..6094bc4387 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -142,10 +142,6 @@ SagaEngine::~SagaEngine() {
delete _resource;
}
-void SagaEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
int SagaEngine::init() {
_soundVolume = ConfMan.getInt("sfx_volume") / 25;
_musicVolume = ConfMan.getInt("music_volume") / 25;
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index c9edbe9d46..91af7e3a7d 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -250,8 +250,6 @@ inline uint16 objectIndexToId(int type, int index) {
class SagaEngine : public Engine {
friend class Scene;
- void errorString(const char *buf_input, char *buf_output);
-
protected:
int go();
int init();
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 137c9242b2..88c8063c08 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -131,10 +131,6 @@ namespace Sword1 {
SystemVars SwordEngine::_systemVars;
-void SwordEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
SwordEngine::SwordEngine(OSystem *syst)
: Engine(syst) {
diff --git a/engines/sword1/sword1.h b/engines/sword1/sword1.h
index 50c0150743..786bfc538e 100644
--- a/engines/sword1/sword1.h
+++ b/engines/sword1/sword1.h
@@ -68,7 +68,6 @@ struct SystemVars {
};
class SwordEngine : public Engine {
- void errorString(const char *buf_input, char *buf_output);
public:
SwordEngine(OSystem *syst);
virtual ~SwordEngine();