aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
authorAlejandro Marzini2010-08-23 18:37:17 +0000
committerAlejandro Marzini2010-08-23 18:37:17 +0000
commit6164d1c0cbff4ec0426409d7f6d1a2cc202a3609 (patch)
tree2d003b3f7d78bdb460d035e09c38d74951ffd85b /backends/platform/sdl
parent942e104e3305e60e11bbcd6aac956c2d62c5a605 (diff)
downloadscummvm-rg350-6164d1c0cbff4ec0426409d7f6d1a2cc202a3609.tar.gz
scummvm-rg350-6164d1c0cbff4ec0426409d7f6d1a2cc202a3609.tar.bz2
scummvm-rg350-6164d1c0cbff4ec0426409d7f6d1a2cc202a3609.zip
AMIGAOS: Fix build.
svn-id: r52303
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/amigaos/amigaos-main.cpp54
-rw-r--r--backends/platform/sdl/amigaos/amigaos.cpp39
-rw-r--r--backends/platform/sdl/amigaos/amigaos.h39
-rw-r--r--backends/platform/sdl/module.mk5
4 files changed, 137 insertions, 0 deletions
diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp
new file mode 100644
index 0000000000..db4598e879
--- /dev/null
+++ b/backends/platform/sdl/amigaos/amigaos-main.cpp
@@ -0,0 +1,54 @@
+/* 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(__amigaos4__)
+
+#include "backends/platform/sdl/amigaos/amigaos.h"
+#include "backends/plugins/sdl/sdl-provider.h"
+#include "base/main.h"
+
+int main(int argc, char *argv[]) {
+
+ // Create our OSystem instance
+ g_system = new OSystem_AmigaOS();
+ assert(g_system);
+
+ // Pre initialize the backend
+ ((OSystem_AmigaOS *)g_system)->init();
+
+#ifdef DYNAMIC_MODULES
+ PluginManager::instance().addPluginProvider(new SDLPluginProvider());
+#endif
+
+ // Invoke the actual ScummVM main entry point:
+ int res = scummvm_main(argc, argv);
+
+ // Free OSystem
+ delete (OSystem_AmigaOS *)g_system;
+
+ return res;
+}
+
+#endif
diff --git a/backends/platform/sdl/amigaos/amigaos.cpp b/backends/platform/sdl/amigaos/amigaos.cpp
new file mode 100644
index 0000000000..d2924445a3
--- /dev/null
+++ b/backends/platform/sdl/amigaos/amigaos.cpp
@@ -0,0 +1,39 @@
+/* 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$
+ *
+ */
+
+#ifdef __amigaos4__
+
+#include "backends/platform/sdl/amigaos/amigaos.h"
+#include "backends/fs/amigaos4/amigaos4-fs-factory.h"
+
+void OSystem_AmigaOS::init() {
+ // Initialze File System Factory
+ _fsFactory = new AmigaOSFilesystemFactory();
+
+ // Invoke parent implementation of this method
+ OSystem_SDL::init();
+}
+
+#endif
diff --git a/backends/platform/sdl/amigaos/amigaos.h b/backends/platform/sdl/amigaos/amigaos.h
new file mode 100644
index 0000000000..92232ec98a
--- /dev/null
+++ b/backends/platform/sdl/amigaos/amigaos.h
@@ -0,0 +1,39 @@
+/* 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$
+ *
+ */
+
+#ifndef PLATFORM_SDL_AMIGAOS_H
+#define PLATFORM_SDL_AMIGAOS_H
+
+#include "backends/platform/sdl/sdl.h"
+
+class OSystem_AmigaOS : public OSystem_SDL {
+public:
+ OSystem_AmigaOS() {}
+ virtual ~OSystem_AmigaOS() {}
+
+ virtual void init();
+};
+
+#endif
diff --git a/backends/platform/sdl/module.mk b/backends/platform/sdl/module.mk
index a26c57f46c..ce360667d2 100644
--- a/backends/platform/sdl/module.mk
+++ b/backends/platform/sdl/module.mk
@@ -19,6 +19,11 @@ MODULE_OBJS += \
win32/win32.o
endif
+ifdef AMIGAOS
+ amigaos/amigaos-main.o \
+ amigaos/amigaos.o
+endif
+
# We don't use the rules.mk here on purpose
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
OBJS := $(MODULE_OBJS) $(OBJS)