aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/module.mk7
-rw-r--r--backends/plugins/ds/ds-provider.cpp45
-rw-r--r--backends/plugins/ds/ds-provider.h15
-rw-r--r--backends/plugins/elf32.h6
-rw-r--r--backends/plugins/ps2/ps2-provider.cpp44
-rw-r--r--backends/plugins/ps2/ps2-provider.h15
-rw-r--r--backends/plugins/psp/psp-provider.cpp44
-rw-r--r--backends/plugins/psp/psp-provider.h14
-rw-r--r--base/plugins.cpp2
9 files changed, 47 insertions, 145 deletions
diff --git a/backends/module.mk b/backends/module.mk
index c0457d8062..922abc2afd 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -49,8 +49,7 @@ endif
ifeq ($(BACKEND),ds)
MODULE_OBJS += \
fs/ds/ds-fs-factory.o \
- fs/ds/ds-fs.o \
- plugins/ds/ds-provider.o
+ fs/ds/ds-fs.o
endif
ifeq ($(BACKEND),n64)
@@ -61,15 +60,13 @@ endif
ifeq ($(BACKEND),ps2)
MODULE_OBJS += \
- fs/ps2/ps2-fs-factory.o \
- plugins/ps2/ps2-provider.o
+ fs/ps2/ps2-fs-factory.o
endif
ifeq ($(BACKEND),psp)
MODULE_OBJS += \
fs/psp/psp-fs-factory.o \
fs/psp/psp-stream.o \
- plugins/psp/psp-provider.o \
saves/psp/psp-saves.o \
timer/psp/timer.o
endif
diff --git a/backends/plugins/ds/ds-provider.cpp b/backends/plugins/ds/ds-provider.cpp
deleted file mode 100644
index 7365a2e6e9..0000000000
--- a/backends/plugins/ds/ds-provider.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#if defined(DYNAMIC_MODULES) && defined(__DS__)
-
-#include "backends/plugins/arm-loader.h"
-#include "backends/plugins/elf-provider.h"
-#include "backends/plugins/ds/ds-provider.h"
-
-
-class DSPlugin : public ELFPlugin {
-public:
- DSPlugin(const Common::String &filename) : ELFPlugin(filename) {}
-
- DLObject *makeDLObject() { return new ARMDLObject(); }
-};
-
-Plugin* DSPluginProvider::createPlugin(const Common::FSNode &node) const {
- return new DSPlugin(node.getPath());
-}
-
-#endif // defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
-
diff --git a/backends/plugins/ds/ds-provider.h b/backends/plugins/ds/ds-provider.h
index 2a3e731d1c..0013145358 100644
--- a/backends/plugins/ds/ds-provider.h
+++ b/backends/plugins/ds/ds-provider.h
@@ -26,9 +26,20 @@
#if defined(DYNAMIC_MODULES) && defined(__DS__)
#include "backends/plugins/elf-provider.h"
+#include "backends/plugins/arm-loader.h"
class DSPluginProvider : public ELFPluginProvider {
- Plugin* createPlugin(const Common::FSNode &node) const;
+ class DSPlugin : public ELFPlugin {
+ public:
+ DSPlugin(const Common::String &filename) : ELFPlugin(filename) {}
+
+ DLObject *makeDLObject() { return new ARMDLObject(); }
+ };
+
+public:
+ Plugin* createPlugin(const Common::FSNode &node) const {
+ return new DSPlugin(node.getPath());
+ }
};
-#endif // defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
+#endif // defined(DYNAMIC_MODULES) && defined(__DS__)
diff --git a/backends/plugins/elf32.h b/backends/plugins/elf32.h
index 5dec1d2e58..ef6b714a5e 100644
--- a/backends/plugins/elf32.h
+++ b/backends/plugins/elf32.h
@@ -26,7 +26,11 @@
#ifndef BACKENDS_ELF_H
#define BACKENDS_ELF_H
-/* ELF stuff */
+/**
+ * ELF stuff:
+ * The contents of this file were gathered mainly from the SYSTEM V APPLICATION BINARY INTERFACE.
+ * Processor-specific things were garnered from processor-specific supplements to the abi.
+ */
typedef unsigned short Elf32_Half, Elf32_Section;
typedef unsigned int Elf32_Word, Elf32_Addr, Elf32_Off;
diff --git a/backends/plugins/ps2/ps2-provider.cpp b/backends/plugins/ps2/ps2-provider.cpp
deleted file mode 100644
index 096c6d4050..0000000000
--- a/backends/plugins/ps2/ps2-provider.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#if defined(DYNAMIC_MODULES) && defined(__PLAYSTATION2__)
-
-#include "backends/plugins/mips-loader.h"
-#include "backends/plugins/elf-provider.h"
-#include "backends/plugins/ps2/ps2-provider.h"
-
-
-class PS2Plugin : public ELFPlugin {
-public:
- PS2Plugin(const Common::String &filename) : ELFPlugin(filename) {}
-
- DLObject *makeDLObject() { return new MIPSDLObject(); }
-};
-
-Plugin* PS2PluginProvider::createPlugin(const Common::FSNode &node) const {
- return new PS2Plugin(node.getPath());
-}
-
-#endif // defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
diff --git a/backends/plugins/ps2/ps2-provider.h b/backends/plugins/ps2/ps2-provider.h
index 4833b9a281..dfadfffc29 100644
--- a/backends/plugins/ps2/ps2-provider.h
+++ b/backends/plugins/ps2/ps2-provider.h
@@ -26,10 +26,21 @@
#if defined(DYNAMIC_MODULES) && defined(__PLAYSTATION2__)
#include "backends/plugins/elf-provider.h"
+#include "backends/plugins/mips-loader.h"
class PS2PluginProvider : public ELFPluginProvider {
- Plugin* createPlugin(const Common::FSNode &node) const;
+ class PS2Plugin : public ELFPlugin {
+ public:
+ PS2Plugin(const Common::String &filename) : ELFPlugin(filename) {}
+
+ DLObject *makeDLObject() { return new MIPSDLObject(); }
+ };
+
+public:
+ Plugin* PS2PluginProvider::createPlugin(const Common::FSNode &node) const {
+ return new PS2Plugin(node.getPath());
+ }
};
-#endif // defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
+#endif // defined(DYNAMIC_MODULES) && defined(__PLAYSTATION2__)
diff --git a/backends/plugins/psp/psp-provider.cpp b/backends/plugins/psp/psp-provider.cpp
deleted file mode 100644
index 99aa33c123..0000000000
--- a/backends/plugins/psp/psp-provider.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#if defined(DYNAMIC_MODULES) && defined(__PSP__)
-
-#include "backends/plugins/mips-loader.h"
-#include "backends/plugins/elf-provider.h"
-#include "backends/plugins/psp/psp-provider.h"
-
-
-class PSPPlugin : public ELFPlugin {
-public:
- PSPPlugin(const Common::String &filename) : ELFPlugin(filename) {}
-
- DLObject *makeDLObject() { return new MIPSDLObject(); }
-};
-
-Plugin* PSPPluginProvider::createPlugin(const Common::FSNode &node) const {
- return new PSPPlugin(node.getPath());
-}
-
-#endif // defined(DYNAMIC_MODULES) && defined(__PSP__)
diff --git a/backends/plugins/psp/psp-provider.h b/backends/plugins/psp/psp-provider.h
index 4662f875b7..efe62ecf2c 100644
--- a/backends/plugins/psp/psp-provider.h
+++ b/backends/plugins/psp/psp-provider.h
@@ -29,9 +29,21 @@
#define BACKENDS_PLUGINS_PSP_PSP_PROVIDER_H
#include "backends/plugins/elf-provider.h"
+#include "backends/plugins/mips-loader.h"
class PSPPluginProvider : public ELFPluginProvider {
- Plugin* createPlugin(const Common::FSNode &node) const;
+ class PSPPlugin : public ELFPlugin {
+ public:
+ PSPPlugin(const Common::String &filename) : ELFPlugin(filename) {}
+
+ DLObject *makeDLObject() { return new MIPSDLObject(); }
+ };
+
+public:
+ Plugin* PSPPluginProvider::createPlugin(const Common::FSNode &node) const {
+ return new PSPPlugin(node.getPath());
+ }
+}
};
#endif /* BACKENDS_PLUGINS_PSP_PSP_PROVIDER_H */
diff --git a/base/plugins.cpp b/base/plugins.cpp
index a7e0036bac..fc5f1f4046 100644
--- a/base/plugins.cpp
+++ b/base/plugins.cpp
@@ -329,7 +329,7 @@ void PluginManager::loadFirstPlugin() { //TODO: rename? It's not quite clear tha
//this loop is for loading all non-engine plugins and the first engine plugin.
while (true) {
assert(tryLoadPlugin(*_currentPlugin));
- if ((*_currentPlugin)->getType() == PLUGIN_TYPE_ENGINE) {
+ if ((*_currentPlugin)->getType() == PLUGIN_TYPE_ENGINE) { //TODO: This assumes all non-engine plugins will precede the first engine plugin!
break;
}
_nonEnginePlugs++;