From a681ebad7d4cdb83e976d1afd383ad6c42a04221 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 3 Jun 2006 01:05:09 +0000 Subject: More maemo port development svn-id: r22849 --- backends/maemo/Makefile | 18 ++++++++++++++++-- backends/maemo/maemo-sdl.cpp | 42 ++++++++++++++++++++++++++++++++++++++++++ backends/maemo/maemo-sdl.h | 41 +++++++++++++++++++++++++++++++++++++++++ backends/maemo/main.cpp | 4 ++-- 4 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 backends/maemo/maemo-sdl.cpp create mode 100644 backends/maemo/maemo-sdl.h (limited to 'backends/maemo') diff --git a/backends/maemo/Makefile b/backends/maemo/Makefile index dbe62fc59a..75ae01c430 100644 --- a/backends/maemo/Makefile +++ b/backends/maemo/Makefile @@ -5,13 +5,27 @@ #control build DISABLE_HQ_SCALERS = true +#DISABLE_SCUMM = 1 +#DISABLE_HE = 1 +DISABLE_SIMON = 1 +DISABLE_SKY = 1 +DISABLE_SWORD1 = 1 +DISABLE_SWORD2 = 1 +DISABLE_QUEEN = 1 +DISABLE_KYRA = 1 +DISABLE_SAGA = 1 +DISABLE_GOB = 1 +DISABLE_LURE = 1 +DISABLE_CINE = 1 +DISABLE_AGI = 1 + srcdir = ../.. VPATH = $(srcdir) CXX := g++ EXECUTABLE := scummvm -INCDIR = ../../ +INCDIR = ../../ . $(srcdir)/engines/ CXXFLAGS := -g -ansi -W -Wno-unused-parameter CXXFLAGS += `pkg-config --cflags gconf-2.0 hildon-libs gtk+-2.0 libosso gdk-2.0` @@ -40,7 +54,7 @@ RM := rm -f RM_REC := rm -f -r CP := cp -OBJS := main.o +OBJS := main.o maemo-sdl.o MODULE_DIRS += . diff --git a/backends/maemo/maemo-sdl.cpp b/backends/maemo/maemo-sdl.cpp new file mode 100644 index 0000000000..d53ff3c15b --- /dev/null +++ b/backends/maemo/maemo-sdl.cpp @@ -0,0 +1,42 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2001-2006 The ScummVM project + * + * 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$ + * + */ + +#include "common/stdafx.h" +#include "backends/maemo/maemo-sdl.h" + + +void OSystem_MAEMO::loadGFXMode() { + if (_fullscreen || _screenHeight > 400) { + _overlayWidth = 800; + _overlayHeight = 480; + + _fullscreen = true; + } else { + _overlayWidth = 720; + _overlayHeight = 400; + } + + if (_screenHeight != 200) + _adjustAspectRatio = false; + + OSystem_SDL::loadGFXMode(); +} diff --git a/backends/maemo/maemo-sdl.h b/backends/maemo/maemo-sdl.h new file mode 100644 index 0000000000..eff02df21f --- /dev/null +++ b/backends/maemo/maemo-sdl.h @@ -0,0 +1,41 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2001-2006 The ScummVM project + * + * 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 MAEMO_SDL_H +#define MAEMO_SDL_H + +#include "common/stdafx.h" +#include "backends/sdl/sdl-common.h" + +//#include "CEkeys.h" + +#include + + +class OSystem_MAEMO : public OSystem_SDL { +public: + OSystem_MAEMO() {}; + + void loadGFXMode(); +}; + +#endif diff --git a/backends/maemo/main.cpp b/backends/maemo/main.cpp index 968641c0cc..2631d35000 100644 --- a/backends/maemo/main.cpp +++ b/backends/maemo/main.cpp @@ -28,7 +28,7 @@ #include #include -#include "backends/sdl/sdl-common.h" +#include "backends/maemo/maemo-sdl.h" #include "base/main.h" #include #include @@ -65,7 +65,7 @@ int main(int argc, char *argv[]) { set_doubling(0); - g_system = new OSystem_SDL(); + g_system = new OSystem_MAEMO(); assert(g_system); // Invoke the actual ScummVM main entry point: -- cgit v1.2.3