diff options
| author | Max Horn | 2006-04-02 00:08:22 +0000 |
|---|---|---|
| committer | Max Horn | 2006-04-02 00:08:22 +0000 |
| commit | 587431f8e838bd08d081d65f18b1f9b8f04566b8 (patch) | |
| tree | b0d258b1c28ed19887de121773e723b966369e00 /base | |
| parent | a2c4795f326e62fe8ff74ce0e29e0174d4dab330 (diff) | |
| download | scummvm-rg350-587431f8e838bd08d081d65f18b1f9b8f04566b8.tar.gz scummvm-rg350-587431f8e838bd08d081d65f18b1f9b8f04566b8.tar.bz2 scummvm-rg350-587431f8e838bd08d081d65f18b1f9b8f04566b8.zip | |
Fully and officially renamed our main function to scummvm_main, thus making
various backend specific hacks unnecessary. As a consequence, it is now the
responsibility of the backend to define main. Hence I adapted the SDL backend
accordingly.
svn-id: r21542
Diffstat (limited to 'base')
| -rw-r--r-- | base/main.cpp | 10 | ||||
| -rw-r--r-- | base/main.h | 38 |
2 files changed, 39 insertions, 9 deletions
diff --git a/base/main.cpp b/base/main.cpp index a7eb30aff5..b3aff49641 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -155,12 +155,6 @@ const char* stackCookie = "$STACK: 655360\0"; extern "C" int main(int argc, char *argv[]); #endif -#if defined(MACOSX) || defined(QTOPIA) || defined(__SYMBIAN32__) -#include <SDL.h> -#elif !defined(__MORPHOS__) && !defined(__DC__) && !defined(__GP32__) -#undef main -#endif - #if defined (ALLEGRO_BACKEND) #include "allegro.h" #endif @@ -344,10 +338,8 @@ static int runGame(GameDetector &detector, OSystem &system, const Common::String #ifdef _WIN32_WCE extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]) { -#elif defined(__PLAYSTATION2__) || defined(__PSP__) || defined(__GP32__) || defined(__MAEMO__) -extern "C" int scummvm_main(int argc, char *argv[]) { #else -extern "C" int main(int argc, char *argv[]) { +extern "C" int scummvm_main(int argc, char *argv[]) { #endif char *cfgFilename = NULL; Common::String specialDebug = ""; diff --git a/base/main.h b/base/main.h new file mode 100644 index 0000000000..06b7e2cb5f --- /dev/null +++ b/base/main.h @@ -0,0 +1,38 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2001 Ludvig Strigeus + * 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: scummsys.h 21500 2006-03-29 15:59:37Z fingolfin $ + * + */ + +#ifndef BASE_MAIN_H +#define BASE_MAIN_H + +#include "common/scummsys.h" + +// +// The scummvm main entry point, to be invoked by ports +// +#ifdef _WIN32_WCE +extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]); +#else +extern "C" int scummvm_main(int argc, char *argv[]); +#endif + +#endif |
