mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 12:12:16 +00:00
Reduce code duplication
svn-id: r23888
This commit is contained in:
parent
250133baf0
commit
a2dc897fe5
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
||||
|
@ -82,8 +82,6 @@ enum {
|
||||
};
|
||||
|
||||
class GobEngine : public Engine {
|
||||
void errorString(const char *buf_input, char *buf_output);
|
||||
|
||||
protected:
|
||||
int go();
|
||||
int init();
|
||||
|
@ -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)) {
|
||||
|
@ -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; }
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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; }
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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) {
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user