diff options
author | Lars Persson | 2005-12-03 21:29:13 +0000 |
---|---|---|
committer | Lars Persson | 2005-12-03 21:29:13 +0000 |
commit | 6ed67205ec31305ad19f2e4469de27e7a93c51e8 (patch) | |
tree | d32eeffc50c1a9a4d6d3db6c29e1f1774d441f63 /backends/epoc/S60 | |
parent | 02f5921cbeca2352df9fa84628d3e835df15cc2a (diff) | |
download | scummvm-rg350-6ed67205ec31305ad19f2e4469de27e7a93c51e8.tar.gz scummvm-rg350-6ed67205ec31305ad19f2e4469de27e7a93c51e8.tar.bz2 scummvm-rg350-6ed67205ec31305ad19f2e4469de27e7a93c51e8.zip |
1. New build structure for Symbian builds to allow easier build and project updates
2. Updated framework files for new structure
3. Uncommented Debug statements in vorbis.cpp (Should probably be removed alltogether.
4. Incorporated Sevs code formatting changes in the new Symbian source structure.
5. Removed/Changed EScummVM to ScummVM instead, hopefully most cases covered.
6. Beginning vibration support to be used for Scumm shake effects (Work ongoing by SumthinWicked)
7. Replaced the ScummVM icon for the FavIcon and upscaled the icon to 32x32. I think it looks ok, comments are welcome.
8. Built for S60V1 and UIQ2 targets from the cvs
9. Updated Readme with new build instructions.
Any comments are welcome. Hopefully the other builds are not affected by this and all Sevs code updates are also incorporated.
svn-id: r19739
Diffstat (limited to 'backends/epoc/S60')
-rw-r--r-- | backends/epoc/S60/ScummVMApp.cpp | 165 | ||||
-rw-r--r-- | backends/epoc/S60/ScummVMApp.h | 84 | ||||
-rw-r--r-- | backends/epoc/S60/ScummVMS60.rss | 62 | ||||
-rw-r--r-- | backends/epoc/S60/ScummVM_S60_App.mmp | 49 | ||||
-rw-r--r-- | backends/epoc/S60/scummvm-CVS-SymbianS60v1.pkg | 34 | ||||
-rw-r--r-- | backends/epoc/S60/scummvm-CVS-SymbianS60v2.pkg | 34 |
6 files changed, 428 insertions, 0 deletions
diff --git a/backends/epoc/S60/ScummVMApp.cpp b/backends/epoc/S60/ScummVMApp.cpp new file mode 100644 index 0000000000..bf263fea39 --- /dev/null +++ b/backends/epoc/S60/ScummVMApp.cpp @@ -0,0 +1,165 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL + * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System + * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer + * Copyright (C) 2005 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Header$ + */ + +#include "ScummVMapp.h" +#include <scummvms60.rsg> +#include <apgcli.h> +#include <eikdll.h> + +EXPORT_C CApaApplication *NewApplication() { + return (new CScummVM); +} + +CScummVM::CScummVM() { +} + +CScummVM::~CScummVM() { +} + +CApaDocument *CScummVM::CreateDocumentL() { + return new (ELeave)CScummVMDoc(*this); +} + +TUid CScummVM::AppDllUid() const { + return TUid::Uid(0x101f9b57); +} + +CScummVMDoc::CScummVMDoc(CEikApplication &aApp) : CAknDocument(aApp) { +} + +CScummVMDoc::~CScummVMDoc() { +} + +CEikAppUi *CScummVMDoc::CreateAppUiL() { + return new (ELeave)CScummVMUi; +} + +void CScummVMUi::HandleForegroundEventL(TBool aForeground) { + if (aForeground) { + BringUpEmulatorL(); + } +} + +CScummVMUi::CScummVMUi() { +} + +CScummVMUi::~CScummVMUi() { + if(iWatcher) { + iThreadWatch.LogonCancel(iWatcher->iStatus); + iWatcher->Cancel(); + } + delete iWatcher; + + iThreadWatch.Close(); +} + +void CScummVMUi::ConstructL() { + BaseConstructL(); + TApaTaskList taskList(iEikonEnv->WsSession()); + TApaTask myTask=taskList.FindApp(TUid::Uid(0x101f9b57)); + myTask.SendToBackground(); + + TBuf<128> startFile; + startFile = iEikonEnv->EikAppUi()->Application()->AppFullName(); + TParse parser; + parser.Set(startFile, NULL, NULL); + + startFile = parser.DriveAndPath(); +#ifndef __WINS__ + startFile.Append( _L("ScummVM.exe")); +#else + startFile.Append( _L("ScummVM.dll")); +#endif + CApaCommandLine *cmdLine = CApaCommandLine::NewLC(startFile); + RApaLsSession lsSession; + + lsSession.Connect(); + CleanupClosePushL(lsSession); + lsSession.StartApp(*cmdLine, iThreadId); + CleanupStack::PopAndDestroy(); //close lsSession + CleanupStack::PopAndDestroy(cmdLine); + + User::After(500000); // Let the application start + + TApaTask exeTask=taskList.FindByPos(0); + iExeWgId=exeTask.WgId(); + + if(iExeWgId == myTask.WgId()) { // Should n't be the same + Exit(); + } + + if(iThreadWatch.Open(iThreadId) == KErrNone) { + iWatcher = new (ELeave)CScummWatcher; + iWatcher->iAppUi=this; + iThreadWatch.Logon(iWatcher->iStatus); + } +} + +CScummWatcher::CScummWatcher():CActive(EPriorityStandard) { + CActiveScheduler::Add(this); + iStatus=KRequestPending; + SetActive(); +} + +CScummWatcher::~CScummWatcher() { +} + +void CScummWatcher::DoCancel() { +} + +void CScummWatcher::RunL() { + iAppUi->HandleCommandL(EEikCmdExit); +} + +void CScummVMUi::BringUpEmulatorL() { + RThread thread; + + if (thread.Open(iThreadId) == KErrNone) { + thread.Close(); + TApaTask apaTask(iEikonEnv->WsSession()); + apaTask.SetWgId(iExeWgId); + apaTask.BringToForeground(); + } else { + iExeWgId = -1; + } +} + +void CScummVMUi::HandleCommandL(TInt aCommand) { + switch(aCommand) { + case EEikCmdExit: + { + RThread thread; + + if(thread.Open(iThreadId) == KErrNone) { + thread.Terminate(0); + thread.Close(); + } + Exit(); + } + break; + } +} + +GLDEF_C TInt E32Dll(TDllReason) { + return KErrNone; +} diff --git a/backends/epoc/S60/ScummVMApp.h b/backends/epoc/S60/ScummVMApp.h new file mode 100644 index 0000000000..21478ba089 --- /dev/null +++ b/backends/epoc/S60/ScummVMApp.h @@ -0,0 +1,84 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL + * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System + * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer + * Copyright (C) 2005 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Header$ + */ + +#ifndef ScummVMapps60h +#define ScummVMapps60h + +#include <aknapp.h> +#include <eikapp.h> +#include <e32base.h> +#include <coecntrl.h> +#include <eikenv.h> +#include <coeview.h> +#include <eikappui.h> + +class CScummVM:public CEikApplication { +public: + CScummVM(); + ~CScummVM(); + + CApaDocument *CreateDocumentL(); + TUid AppDllUid() const; +}; + + +#include <AKNdoc.h> + +class CScummVMDoc:public CAknDocument { +public: + CScummVMDoc(CEikApplication &aApplicaiton); + ~CScummVMDoc(); + + CEikAppUi *CreateAppUiL(); + void ConstructL(); +}; + +#include <aknappui.h> +class CScummVMUi; +class CScummWatcher : public CActive { +public: + CScummWatcher(); + ~CScummWatcher(); + + void DoCancel(); + void RunL(); + CScummVMUi *iAppUi; +}; + +class CScummVMUi : public CAknAppUi { +public: + CScummVMUi(); + ~CScummVMUi(); + + void ConstructL(); + void HandleCommandL(TInt aCommand); + void HandleForegroundEventL(TBool aForeground); + void BringUpEmulatorL(); + +private: + TThreadId iThreadId; + TInt iExeWgId; + RThread iThreadWatch; + CScummWatcher *iWatcher; +}; +#endif diff --git a/backends/epoc/S60/ScummVMS60.rss b/backends/epoc/S60/ScummVMS60.rss new file mode 100644 index 0000000000..0b699ea305 --- /dev/null +++ b/backends/epoc/S60/ScummVMS60.rss @@ -0,0 +1,62 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL + * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System + * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer + * Copyright (C) 2005 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. + * + * $Header: + */ + +// ScummVM.RSS + +NAME SCUM + +// Include definitions of resource STRUCTS used by this +// resource script +#include <eikon.rh> +#include "..\src\Scummvm.hrh" +// Include the standard Eikon resource ids +#include <eikon.rsg> + + +RESOURCE RSS_SIGNATURE + { + } + +RESOURCE TBUF16 { buf=""; } + +RESOURCE EIK_APP_INFO + { + menubar = r_scum_menubar; + } + +RESOURCE MENU_BAR r_scum_menubar // *** Menu bar +{ + titles = + { + MENU_TITLE { menu_pane = r_scum_menu; txt = "ScummVM"; } + }; +} + +RESOURCE MENU_PANE r_scum_menu // *** Submenu +{ + items = + { + + MENU_ITEM{command = EEikCmdExit;txt = "Exit";} + }; +} diff --git a/backends/epoc/S60/ScummVM_S60_App.mmp b/backends/epoc/S60/ScummVM_S60_App.mmp new file mode 100644 index 0000000000..44bbf1a2a0 --- /dev/null +++ b/backends/epoc/S60/ScummVM_S60_App.mmp @@ -0,0 +1,49 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL + * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System + * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer + * Copyright (C) 2005 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. + * + * $Header: + */ + +// +// MAKEFILE.MMP S60 ScummVM Launcher +// + +TARGET ScummVMS60.app +TARGETPATH system\apps\ScummVMS60 +TARGETTYPE app + +UID 0x100039ce 0x101f9b57 +RESOURCE SCUMMVMS60.rss + +SOURCEPATH . +USERINCLUDE . +SYSTEMINCLUDE \epoc32\include \epoc32\include\libc + +// app source +SOURCE ScummVMApp.cpp + +sourcepath .. +AIF ScummVmS60.Aif ..\res\ ScummVmAif.rss c16 ScummL.bmp ScummLM.bmp ScummS.bmp ScummSM.bmp + +// libraries +LIBRARY cone.lib EIKCORE.lib +LIBRARY euser.lib apparc.lib +LIBRARY efsrv.lib apgrfx.lib +LIBRARY avkon.lib diff --git a/backends/epoc/S60/scummvm-CVS-SymbianS60v1.pkg b/backends/epoc/S60/scummvm-CVS-SymbianS60v1.pkg new file mode 100644 index 0000000000..5392b857d7 --- /dev/null +++ b/backends/epoc/S60/scummvm-CVS-SymbianS60v1.pkg @@ -0,0 +1,34 @@ +;;; +;;; ScummVM .PKG file for .SIS gegeration +;;; + +; Languages +;&EN + +; UID is the app's UID +#{"ScummVM S60"},(0x101f9b57),0,80,0 + +; Platform type +(0x101F6F88), 0, 0, 0, {"Series60ProductID"} + +; Application file Launcher and actual exe +"\epoc32\release\armi\urel\ScummVMS60.app"-"!:\system\apps\ScummVMS60\ScummVMS60.app" +"\epoc32\release\armi\urel\ScummVM.exe"-"!:\system\apps\ScummVMS60\ScummVM.exe" + +; AIF application information file +"\epoc32\release\armi\urel\ScummVMS60.aif"-"!:\system\apps\ScummVMS60\ScummVMS60.aif" + +; Resource file +"\epoc32\release\armi\urel\ScummVMS60.rsc"-"!:\system\apps\ScummVMS60\ScummVMS60.rsc" + +; Empty .placeholder file, ensures creation of c:\documents\ScummVM\ for future file saves +"..\.placeholder"-"c:\documents\ScummVM\.placeholder" + +; Config/log files: 'empty' will automagically be removed on uninstall +""-"c:\documents\ScummVM\scummvm.ini",FILENULL +""-"c:\documents\ScummVM\scummvm.stdout.txt",FILENULL +""-"c:\documents\ScummVM\scummvm.stderr.txt",FILENULL +""-"!:\system\apps\ScummVM\sdl.ini",FILENULL + +; This install layout will let you upgrade to newer versions wihout loss of scummvm.ini. +; It will remove the config file, std***.txt files & dirs on uninstall.
\ No newline at end of file diff --git a/backends/epoc/S60/scummvm-CVS-SymbianS60v2.pkg b/backends/epoc/S60/scummvm-CVS-SymbianS60v2.pkg new file mode 100644 index 0000000000..17aa77ef15 --- /dev/null +++ b/backends/epoc/S60/scummvm-CVS-SymbianS60v2.pkg @@ -0,0 +1,34 @@ +;;; +;;; ScummVM .PKG file for .SIS gegeration +;;; + +; Languages +;&EN + +; UID is the app's UID +#{"ScummVM S60"},(0x101f9b57),0,80,3 + +; Platform type +(0x101F6F88), 0, 0, 0, {"Series60ProductID"} + +; Application file Launcher and actual exe +"\epoc32\release\armi\urel\ScummVMS60.app"-"!:\system\apps\ScummVMS60\ScummVMS60.app" +"\epoc32\release\armi\urel\ScummVM.exe"-"!:\system\apps\ScummVMS60\ScummVM.exe" + +; AIF application information file +"\epoc32\data\z\system\apps\ScummVMS60\ScummVMS60.aif"-"!:\system\apps\ScummVMS60\ScummVMS60.aif" + +; Resource file +"\epoc32\data\z\system\apps\ScummVMS60\ScummVMS60.rsc"-"!:\system\apps\ScummVMS60\ScummVMS60.rsc" + +; Empty .placeholder file, ensures creation of c:\documents\ScummVM\ for future file saves +"..\.placeholder"-"c:\documents\ScummVM\.placeholder" + +; Config/log files: 'empty' will automagically be removed on uninstall +""-"c:\documents\ScummVM\scummvm.ini",FILENULL +""-"c:\documents\ScummVM\scummvm.stdout.txt",FILENULL +""-"c:\documents\ScummVM\scummvm.stderr.txt",FILENULL +""-"!:\system\apps\ScummVM\sdl.ini",FILENULL + +; This install layout will let you upgrade to newer versions wihout loss of scummvm.ini. +; It will remove the config file, std***.txt files & dirs on uninstall.
\ No newline at end of file |