mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 12:48:16 +00:00
MORPHOS: MorphOS Support
This commit is contained in:
parent
a9c6885ec0
commit
d70b4bcbf1
87
backends/platform/sdl/morphos/morphos-main.cpp
Normal file
87
backends/platform/sdl/morphos/morphos-main.cpp
Normal file
@ -0,0 +1,87 @@
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/scummsys.h"
|
||||
|
||||
#if defined(__MORPHOS__)
|
||||
|
||||
#include "backends/fs/morphos/morphos-fs.h"
|
||||
#include "backends/platform/sdl/morphos/morphos.h"
|
||||
#include "backends/plugins/sdl/sdl-provider.h"
|
||||
#include "base/main.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
// The following will gather the application name and add the install path
|
||||
// to a variable in AmigaOS4's ENV(ARC) system. It will be placed in AppPaths
|
||||
// so that ScummVM can become AmiUpdate aware
|
||||
//const char *const appname = "ScummVM";
|
||||
|
||||
/*BPTR lock;
|
||||
APTR oldwin;
|
||||
|
||||
// Obtain a lock to the home directory
|
||||
if ((lock = IDOS->GetProgramDir())) {
|
||||
TEXT progpath[2048];
|
||||
TEXT apppath[1024] = "AppPaths";
|
||||
|
||||
if (IDOS->DevNameFromLock(lock,
|
||||
progpath,
|
||||
sizeof(progpath),
|
||||
DN_FULLPATH)) {
|
||||
|
||||
// Stop any "Insert volume..." type requesters
|
||||
oldwin = IDOS->SetProcWindow((APTR)-1);
|
||||
|
||||
// Finally, set the variable to the path the executable was run from
|
||||
IDOS->AddPart( apppath, appname, 1024);
|
||||
IDOS->SetVar( apppath, progpath, -1, GVF_GLOBAL_ONLY|GVF_SAVE_VAR );
|
||||
|
||||
// Turn system requesters back on
|
||||
IDOS->SetProcWindow( oldwin );
|
||||
}
|
||||
}*/
|
||||
|
||||
// Set up a stack cookie to avoid crashes from a stack set too low
|
||||
static const char *stack_cookie __attribute__((used)) = "$STACK: 600000";
|
||||
|
||||
// Create our OSystem instance
|
||||
g_system = new OSystem_MorphOS();
|
||||
assert(g_system);
|
||||
|
||||
// Pre initialize the backend
|
||||
((OSystem_MorphOS *)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
|
||||
g_system->destroy();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif
|
38
backends/platform/sdl/morphos/morphos.cpp
Normal file
38
backends/platform/sdl/morphos/morphos.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/scummsys.h"
|
||||
|
||||
#ifdef __MORPHOS__
|
||||
|
||||
#include "backends/platform/sdl/morphos/morphos.h"
|
||||
#include "backends/fs/morphos/morphos-fs-factory.h"
|
||||
|
||||
void OSystem_MorphOS::init() {
|
||||
// Initialze File System Factory
|
||||
_fsFactory = new MorphOSFilesystemFactory();
|
||||
|
||||
// Invoke parent implementation of this method
|
||||
OSystem_SDL::init();
|
||||
}
|
||||
|
||||
#endif
|
36
backends/platform/sdl/morphos/morphos.h
Normal file
36
backends/platform/sdl/morphos/morphos.h
Normal file
@ -0,0 +1,36 @@
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_SDL_MORPHOS_H
|
||||
#define PLATFORM_SDL_MORPHOS_H
|
||||
|
||||
#include "backends/platform/sdl/sdl.h"
|
||||
|
||||
class OSystem_MorphOS : public OSystem_SDL {
|
||||
public:
|
||||
OSystem_MorphOS() {}
|
||||
virtual ~OSystem_MorphOS() {}
|
||||
|
||||
virtual void init();
|
||||
};
|
||||
|
||||
#endif
|
24
backends/platform/sdl/morphos/morphos.mk
Normal file
24
backends/platform/sdl/morphos/morphos.mk
Normal file
@ -0,0 +1,24 @@
|
||||
# Special target to create an MorphOS snapshot installation
|
||||
amigaosdist: $(EXECUTABLE)
|
||||
mkdir -p $(MORPHOSPATH)
|
||||
mkdir -p $(MORPHOSPATH)themes
|
||||
mkdir -p $(MORPHOSPATH)extras
|
||||
$(STRIP) $(EXECUTABLE) -o $(MORPHOSPATH)$(EXECUTABLE)
|
||||
cp ${srcdir}/icons/scummvm_drawer.info $(MORPHOSPATH).info
|
||||
cp ${srcdir}/icons/scummvm.info $(MORPHOSPATH)$(EXECUTABLE).info
|
||||
cp $(DIST_FILES_THEMES) $(MORPHOSPATH)themes/
|
||||
ifdef DIST_FILES_ENGINEDATA
|
||||
cp $(DIST_FILES_ENGINEDATA) $(MORPHOSPATH)extras/
|
||||
endif
|
||||
cat ${srcdir}/README | sed -f ${srcdir}/dists/amiga/convertRM.sed > README.conv
|
||||
# MorphOS's shell is not happy with indented comments, thus don't do it.
|
||||
# AREXX seems to have problems when ${srcdir} is '.'. It will break with a
|
||||
# "Program not found" error. Therefore we copy the script to the cwd and
|
||||
# remove it again, once it has finished.
|
||||
cp ${srcdir}/dists/amiga/RM2AG.rx .
|
||||
rx RM2AG.rx README.conv
|
||||
cp README.guide $(MORPHOSPATH)
|
||||
rm RM2AG.rx
|
||||
rm README.conv
|
||||
rm README.guide
|
||||
cp $(DIST_FILES_DOCS) $(MORPHOSPATH)
|
Loading…
x
Reference in New Issue
Block a user