From 428105b2d393b17e750893556040d665b3fb1c9a Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Mon, 3 Oct 2011 12:38:42 +0100 Subject: GPH: Minor cleanup (and rename header from gph-sdl.h to gph.h). --- backends/platform/gph/build/gp2xwiz-bundle.sh | 10 ++++++ backends/platform/gph/gph-backend.cpp | 11 +++--- backends/platform/gph/gph-main.cpp | 2 +- backends/platform/gph/gph-sdl.h | 51 --------------------------- backends/platform/gph/gph.h | 51 +++++++++++++++++++++++++++ 5 files changed, 66 insertions(+), 59 deletions(-) delete mode 100644 backends/platform/gph/gph-sdl.h create mode 100644 backends/platform/gph/gph.h (limited to 'backends/platform/gph') diff --git a/backends/platform/gph/build/gp2xwiz-bundle.sh b/backends/platform/gph/build/gp2xwiz-bundle.sh index 579e2dc77b..2182f207c3 100644 --- a/backends/platform/gph/build/gp2xwiz-bundle.sh +++ b/backends/platform/gph/build/gp2xwiz-bundle.sh @@ -2,6 +2,16 @@ echo Quick script to make building a distribution of the GP2X Wiz backend more consistent. +# Set the paths up here to support the build. + +export PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin:$PATH +export PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin:$PATH +export CXX=arm-open2x-linux-g++ +export CC=arm-open2x-linux-gcc +export CXXFLAGS=-march=armv4t +export LDFLAGS=-static +export ASFLAGS=-mfloat-abi=soft + cd ../../../.. echo Building ScummVM for GP2X Wiz. diff --git a/backends/platform/gph/gph-backend.cpp b/backends/platform/gph/gph-backend.cpp index ae3466b836..8ee84ed6c0 100644 --- a/backends/platform/gph/gph-backend.cpp +++ b/backends/platform/gph/gph-backend.cpp @@ -25,10 +25,9 @@ #include "backends/platform/sdl/sdl-sys.h" -// #include "backends/platform/gph/gph-options.h" #include "backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h" #include "backends/platform/gph/gph-hw.h" -#include "backends/platform/gph/gph-sdl.h" +#include "backends/platform/gph/gph.h" #include "backends/plugins/posix/posix-provider.h" #include "backends/saves/default/default-saves.h" #include "backends/timer/default/default-timer.h" @@ -105,8 +104,9 @@ void OSystem_GPH::initBackend() { _savefileManager = new DefaultSaveFileManager(savePath); #ifdef DUMP_STDOUT - // The GP2X Wiz has a serial console on the breakout board but most users do not use this so we - // output all our STDOUT and STDERR to files for debug purposes. + // The GPH devices have a serial console on the breakout board + // but most users do not use this so we output all our STDOUT + // and STDERR to files for debug purposes. char STDOUT_FILE[PATH_MAX+1]; char STDERR_FILE[PATH_MAX+1]; @@ -169,9 +169,6 @@ void OSystem_GPH::initBackend() { /* Make sure SDL knows that we have a joystick we want to use. */ ConfMan.setInt("joystick_num", 0); - /* Now setup any device specific user options (Left handed mode, that sort of thing). */ - // GPH::setOptions(); - /* Pass to POSIX method to do the heavy lifting */ OSystem_POSIX::initBackend(); diff --git a/backends/platform/gph/gph-main.cpp b/backends/platform/gph/gph-main.cpp index 1a8c6686ca..4f290f71ed 100644 --- a/backends/platform/gph/gph-main.cpp +++ b/backends/platform/gph/gph-main.cpp @@ -20,7 +20,7 @@ * */ -#include "backends/platform/gph/gph-sdl.h" +#include "backends/platform/gph/gph.h" #include "backends/plugins/posix/posix-provider.h" #include "base/main.h" diff --git a/backends/platform/gph/gph-sdl.h b/backends/platform/gph/gph-sdl.h deleted file mode 100644 index 8b943f98f3..0000000000 --- a/backends/platform/gph/gph-sdl.h +++ /dev/null @@ -1,51 +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. - * - */ - -#ifndef GPH_H -#define GPH_H - -#if defined(GPH_DEVICE) - -#include "backends/base-backend.h" -#include "backends/platform/sdl/sdl.h" -#include "backends/platform/sdl/posix/posix.h" -#include "backends/events/gph/gph-events.h" -#include "backends/graphics/gph/gph-graphics.h" - -#define __GP2XWIZ__ - -#ifndef PATH_MAX - #define PATH_MAX 255 -#endif - -class OSystem_GPH : public OSystem_POSIX { -public: - OSystem_GPH(); - - /* Platform Setup Stuff */ - void addSysArchivesToSearchSet(Common::SearchSet &s, int priority); - void initBackend(); - void quit(); -}; - -#endif -#endif //GPH_H diff --git a/backends/platform/gph/gph.h b/backends/platform/gph/gph.h new file mode 100644 index 0000000000..8b943f98f3 --- /dev/null +++ b/backends/platform/gph/gph.h @@ -0,0 +1,51 @@ +/* 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 GPH_H +#define GPH_H + +#if defined(GPH_DEVICE) + +#include "backends/base-backend.h" +#include "backends/platform/sdl/sdl.h" +#include "backends/platform/sdl/posix/posix.h" +#include "backends/events/gph/gph-events.h" +#include "backends/graphics/gph/gph-graphics.h" + +#define __GP2XWIZ__ + +#ifndef PATH_MAX + #define PATH_MAX 255 +#endif + +class OSystem_GPH : public OSystem_POSIX { +public: + OSystem_GPH(); + + /* Platform Setup Stuff */ + void addSysArchivesToSearchSet(Common::SearchSet &s, int priority); + void initBackend(); + void quit(); +}; + +#endif +#endif //GPH_H -- cgit v1.2.3