From a8d9aeb24eec8101ef39ed48b07d72df687e79f8 Mon Sep 17 00:00:00 2001 From: gewlitys Date: Sat, 18 Oct 2008 17:35:09 +0000 Subject: [PATCH] Added ogg and addon support for Symbian. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3096 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/INSTALL.symbian | 33 ++++++++++++++++++----------- sc2/build/unix/config_proginfo_host | 2 +- sc2/src/symbian/uqm.cfg | 4 ++-- sc2/src/symbian/uqm.mmp | 4 +++- sc2/src/symbian/uqmapp.cpp | 32 +++++++++++++++++++++++++--- 5 files changed, 56 insertions(+), 19 deletions(-) diff --git a/sc2/INSTALL.symbian b/sc2/INSTALL.symbian index 3be572199..cd7ff0a1f 100644 --- a/sc2/INSTALL.symbian +++ b/sc2/INSTALL.symbian @@ -6,12 +6,11 @@ unclear. If you encounter any problems or have suggestions how to improve this document, please report them to our Bugzilla at http://bugs.uqm.stack.nl/ -UQM's Symbian support is currently at experimental stage and is tested only on -Nokia N73, which has too little memory to run it reliably for long time. -Reports of successes and failures on other devices are very welcome. +UQM's Symbian support is currently at experimental stage. Development is +being done on Nokia N73, which has too little memory for longer playing +sessions. Reports of successes and failures on other devices are very welcome. Known problems: -- No OGG support so voices and 3DO music are not available. - No netmelee. @@ -40,6 +39,9 @@ Prerequisites: - SDL for S60 3rd ed. * Download from http://koti.mbnet.fi/mertama/sdl.html * You also need the sources from http://www.libsdl.org/ + +- Tremor + * Check out from SVN repository at http://svn.xiph.org/trunk/Tremor/ Building: --------- @@ -51,7 +53,7 @@ Building: 2) Subst your Symbian SDK to a new drive along the following example: subst z: C:\Symbian\9.1\S60_3rd_MR_2 -3) Put UQM sources inside the substed drive, if not already there. +3) Put UQM sources and Tremor inside the substed drive, if not already there. 4) Install and build SDL, instructions are inside the package. @@ -60,10 +62,17 @@ Building: cd png\group bldmake bldfiles abld build + +6) Build Tremor. First apply a patch found from UQM SVN repository + at trunk/symbian/tremor: + cd Tremor + patch -p0 #include #include +#include #include #include #include @@ -84,6 +85,7 @@ private: void DoExit(TInt aErr); void HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination); void HandleResourceChangeL(TInt aType); + void AddCmdLineParamsL(CDesC8Array& aArgs); private: CExitWait* iWait; CSDLWin* iSDLWin; @@ -163,8 +165,10 @@ void CSdlAppUi::ConstructL() iSdl->DisableKeyBlocking(*this); iWait = new (ELeave) CExitWait(*this); - CDesC8ArrayFlat* args = new (ELeave)CDesC8ArrayFlat(10); - iSdl->CallMainL(iWait->iStatus, *args, CSDL::ENoParamFlags, 81920); + CDesC8ArrayFlat* args = new (ELeave)CDesC8ArrayFlat(10); + AddCmdLineParamsL(*args); + + iSdl->CallMainL(iWait->iStatus, *args, CSDL::ENoFlags, 81920); delete args; iWait->Start(); @@ -217,7 +221,29 @@ void CSdlAppUi::HandleResourceChangeL(TInt aType) } } } - + +void CSdlAppUi::AddCmdLineParamsL(CDesC8Array& aArgs) + { + _LIT8(KAddonParam, "--addondir=?:\\uqm-addons"); + _LIT16(KTestFolder, "?:\\uqm-addons"); + RFs fs; + + fs.Connect(); + for (TInt8 c = 'e'; c < 'z'; ++c) + { + TBuf16<32> buf(KTestFolder); + buf[0] = c; + if (BaflUtils::FolderExists(fs, buf)) + { + TBuf8<32> arg(KAddonParam); + arg[11] = c; + aArgs.AppendL(arg); + break; + } + } + fs.Close(); + } + CSdlAppUi::~CSdlAppUi() { if(iWait != NULL)