[Scummvm-cvs-logs] SF.net SVN: scummvm: [23888] scummvm/trunk/engines
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Sep 16 17:01:32 CEST 2006
Revision: 23888
http://svn.sourceforge.net/scummvm/?rev=23888&view=rev
Author: fingolfin
Date: 2006-09-16 08:01:14 -0700 (Sat, 16 Sep 2006)
Log Message:
-----------
Reduce code duplication
Modified Paths:
--------------
scummvm/trunk/engines/agi/agi.cpp
scummvm/trunk/engines/agi/agi.h
scummvm/trunk/engines/cine/cine.cpp
scummvm/trunk/engines/cine/cine.h
scummvm/trunk/engines/gob/gob.cpp
scummvm/trunk/engines/gob/gob.h
scummvm/trunk/engines/kyra/kyra.cpp
scummvm/trunk/engines/kyra/kyra.h
scummvm/trunk/engines/lure/debugger.cpp
scummvm/trunk/engines/lure/debugger.h
scummvm/trunk/engines/lure/lure.cpp
scummvm/trunk/engines/lure/lure.h
scummvm/trunk/engines/saga/saga.cpp
scummvm/trunk/engines/saga/saga.h
scummvm/trunk/engines/sword1/sword1.cpp
scummvm/trunk/engines/sword1/sword1.h
Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/agi/agi.cpp 2006-09-16 15:01:14 UTC (rev 23888)
@@ -560,10 +560,6 @@
delete _console;
}
-void AgiEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
int AgiEngine::init() {
// Initialize backend
_system->beginGFXTransaction();
Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/agi/agi.h 2006-09-16 15:01:14 UTC (rev 23888)
@@ -229,8 +229,6 @@
class AgiEngine : public ::Engine {
int _gameId;
- void errorString(const char *buf_input, char *buf_output);
-
protected:
int init();
int go();
Modified: scummvm/trunk/engines/cine/cine.cpp
===================================================================
--- scummvm/trunk/engines/cine/cine.cpp 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/cine/cine.cpp 2006-09-16 15:01:14 UTC (rev 23888)
@@ -167,10 +167,6 @@
CineEngine::~CineEngine() {
}
-void CineEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
int CineEngine::init() {
// Initialize backend
_system->beginGFXTransaction();
Modified: scummvm/trunk/engines/cine/cine.h
===================================================================
--- scummvm/trunk/engines/cine/cine.h 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/cine/cine.h 2006-09-16 15:01:14 UTC (rev 23888)
@@ -55,8 +55,6 @@
class CineEngine : public Engine {
int _gameId;
- void errorString(const char *buf_input, char *buf_output);
-
protected:
int init();
int go();
Modified: scummvm/trunk/engines/gob/gob.cpp
===================================================================
--- scummvm/trunk/engines/gob/gob.cpp 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/gob/gob.cpp 2006-09-16 15:01:14 UTC (rev 23888)
@@ -204,10 +204,6 @@
delete[] _startTot0;
}
-void GobEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
int GobEngine::go() {
_init->initGame(0);
Modified: scummvm/trunk/engines/gob/gob.h
===================================================================
--- scummvm/trunk/engines/gob/gob.h 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/gob/gob.h 2006-09-16 15:01:14 UTC (rev 23888)
@@ -82,8 +82,6 @@
};
class GobEngine : public Engine {
- void errorString(const char *buf_input, char *buf_output);
-
protected:
int go();
int init();
Modified: scummvm/trunk/engines/kyra/kyra.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra.cpp 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/kyra/kyra.cpp 2006-09-16 15:01:14 UTC (rev 23888)
@@ -411,10 +411,6 @@
}
-void KyraEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
int KyraEngine::go() {
if (_features & GF_FLOPPY && !(_features & GF_AMIGA)) {
Modified: scummvm/trunk/engines/kyra/kyra.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra.h 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/kyra/kyra.h 2006-09-16 15:01:14 UTC (rev 23888)
@@ -252,8 +252,6 @@
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; }
Modified: scummvm/trunk/engines/lure/debugger.cpp
===================================================================
--- scummvm/trunk/engines/lure/debugger.cpp 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/lure/debugger.cpp 2006-09-16 15:01:14 UTC (rev 23888)
@@ -46,7 +46,7 @@
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;
Modified: scummvm/trunk/engines/lure/debugger.h
===================================================================
--- scummvm/trunk/engines/lure/debugger.h 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/lure/debugger.h 2006-09-16 15:01:14 UTC (rev 23888)
@@ -30,8 +30,6 @@
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
Modified: scummvm/trunk/engines/lure/lure.cpp
===================================================================
--- scummvm/trunk/engines/lure/lure.cpp 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/lure/lure.cpp 2006-09-16 15:01:14 UTC (rev 23888)
@@ -314,10 +314,6 @@
return 0;
}
-void LureEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
void LureEngine::quitGame() {
_system->quit();
}
Modified: scummvm/trunk/engines/lure/lure.h
===================================================================
--- scummvm/trunk/engines/lure/lure.h 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/lure/lure.h 2006-09-16 15:01:14 UTC (rev 23888)
@@ -60,7 +60,6 @@
virtual int init();
virtual int go();
- virtual void errorString(const char *buf_input, char *buf_output);
void quitGame();
uint32 features() { return _features; }
Modified: scummvm/trunk/engines/saga/saga.cpp
===================================================================
--- scummvm/trunk/engines/saga/saga.cpp 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/saga/saga.cpp 2006-09-16 15:01:14 UTC (rev 23888)
@@ -142,10 +142,6 @@
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;
Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/saga/saga.h 2006-09-16 15:01:14 UTC (rev 23888)
@@ -250,8 +250,6 @@
class SagaEngine : public Engine {
friend class Scene;
- void errorString(const char *buf_input, char *buf_output);
-
protected:
int go();
int init();
Modified: scummvm/trunk/engines/sword1/sword1.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sword1.cpp 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/sword1/sword1.cpp 2006-09-16 15:01:14 UTC (rev 23888)
@@ -131,10 +131,6 @@
SystemVars SwordEngine::_systemVars;
-void SwordEngine::errorString(const char *buf1, char *buf2) {
- strcpy(buf2, buf1);
-}
-
SwordEngine::SwordEngine(OSystem *syst)
: Engine(syst) {
Modified: scummvm/trunk/engines/sword1/sword1.h
===================================================================
--- scummvm/trunk/engines/sword1/sword1.h 2006-09-16 14:36:53 UTC (rev 23887)
+++ scummvm/trunk/engines/sword1/sword1.h 2006-09-16 15:01:14 UTC (rev 23888)
@@ -68,7 +68,6 @@
};
class SwordEngine : public Engine {
- void errorString(const char *buf_input, char *buf_output);
public:
SwordEngine(OSystem *syst);
virtual ~SwordEngine();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list