Experimental support for Symbian S60 3rd edition
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3064 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
||||
Changes towards version 0.7:
|
||||
- Pthread support - Gwl
|
||||
- Experimental support for Symbian S60 3rd edition - Mika & SvdB
|
||||
- Pthread support - Mika
|
||||
- Content Dirs completely reorganized; 3DO and PC segregation - Coredev
|
||||
- Voiceovers controlled by a synthetic '3dovoice' addon - Michael
|
||||
- CONVERSATION explicitly names text/voice/timestamps - Michael
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
UQM for Symbian S60 3rd ed.
|
||||
===========================
|
||||
|
||||
First some general notes. These instructions might be somewhat incomplete or
|
||||
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.
|
||||
|
||||
Known problems:
|
||||
- No OGG support so voices and 3DO music are not available.
|
||||
- No netmelee.
|
||||
|
||||
|
||||
Prerequisites:
|
||||
--------------
|
||||
|
||||
- Platform SDK for S60 3rd ed. (MR) / 3rd ed. FP1 / 3rd ed. FP2, depending on
|
||||
target hardware
|
||||
* Download from http://www.forum.nokia.com/
|
||||
|
||||
- Open C plugins (if SDK is other than FP2; in FP2 those should be included already)
|
||||
* Download from http://www.forum.nokia.com/main/resources/tools_and_sdks/openc_cpp/
|
||||
|
||||
- Carbide.c++ (if building for emulator)
|
||||
* Download from http://www.forum.nokia.com/
|
||||
* Command line compiling must be enabled
|
||||
|
||||
- ARM RealView compiler (if building for hardware)
|
||||
* Commercial, see http://www.arm.com/products/DevTools/
|
||||
|
||||
- MinGW and MSYS (for build scripts)
|
||||
* Download from http://www.mingw.org/
|
||||
|
||||
- Info-Zip (for building content package)
|
||||
* Download from http://www.info-zip.org/Zip.html
|
||||
|
||||
- SDL for S60 3rd ed.
|
||||
* Download from http://koti.mbnet.fi/mertama/sdl.html
|
||||
* You also need the sources from http://www.libsdl.org/
|
||||
|
||||
Building:
|
||||
---------
|
||||
|
||||
1) Set up platform SDK, compilers, Open C plugins and MinGW + MSYS.
|
||||
* Be sure zip and other tools are listed in path so they can be accessed
|
||||
directly from command line.
|
||||
|
||||
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.
|
||||
|
||||
4) Install and build SDL, instructions are inside the package.
|
||||
|
||||
5) Build a partial port of libpng and SDL_image, which are included
|
||||
in UQM SVN repository at trunk/symbian/png:
|
||||
cd png\group
|
||||
bldmake bldfiles
|
||||
abld build
|
||||
|
||||
6) Open MSYS terminal. All following steps are done inside it.
|
||||
|
||||
7) Two environment variables control the building, BUILD_EPOCROOT and BUILD_HOST.
|
||||
|
||||
Set BUILD_EPOCROOT to point to the substed drive:
|
||||
export BUILD_EPOCROOT=/z
|
||||
|
||||
Set BUILD_HOST to either WINSCW (emulator) or ARMV5 (hardware), depending
|
||||
for which target you want to build:
|
||||
export BUILD_HOST=ARMV5
|
||||
|
||||
8) Compile (you don't need to change any options from the interactive menu):
|
||||
./build.sh uqm
|
||||
|
||||
9) Install. It builds the content zip and puts everything to proper
|
||||
place (WINSCW) or creates a self-signed SIS package (ARMV5):
|
||||
./build.sh uqm install
|
||||
|
||||
10) If you built for ARMV5, you should now have uqm.sisx in the same directory
|
||||
from where you did the build. Remember to also install SDL SIS package and
|
||||
if not using FP2 SDK, Open C plugins before attempting to run UQM on actual
|
||||
device.
|
||||
+1
-1
@@ -10,7 +10,7 @@ else
|
||||
fi
|
||||
case "$HOST_SYSTEM" in
|
||||
ARMV5|WINSCW)
|
||||
uqm_NAME="$uqm_NAME.lib"
|
||||
uqm_NAME="uqm.lib"
|
||||
;;
|
||||
MINGW32*|CYGWIN*)
|
||||
uqm_NAME="$uqm_NAME.exe"
|
||||
|
||||
+120
-1
@@ -72,7 +72,7 @@ uqm_prepare_config()
|
||||
MENU_main_ITEMS="debug graphics sound mikmod ovcodec netplay joystick \
|
||||
ioformat accel threadlib"
|
||||
case "$HOST_SYSTEM" in
|
||||
Darwin)
|
||||
Darwin|WINSCW|ARMV5)
|
||||
# Installation directory not modifiable
|
||||
;;
|
||||
MINGW32*|cegcc)
|
||||
@@ -133,6 +133,14 @@ uqm_prepare_config()
|
||||
CHOICE_debug_OPTION_strictdebug_TITLE="Debug + strict compile checks"
|
||||
CHOICE_debug_OPTION_strictdebug_ACTION='strictdebug_action'
|
||||
strictdebug_action() {
|
||||
case "$HOST_SYSTEM" in
|
||||
WINSCW)
|
||||
CFLAGS="$CFLAGS -g -O0 -W all -d DEBUG -d _DEBUG"
|
||||
;;
|
||||
ARMV5)
|
||||
CFLAGS="$CFLAGS -g -O0 -DDEBUG -D_DEBUG"
|
||||
;;
|
||||
*)
|
||||
CFLAGS="$CFLAGS -O1" # This is needed for -Wunitialized
|
||||
CFLAGS="$CFLAGS -W -Wall \
|
||||
-Wbad-function-cast -Wcast-qual -Wmissing-prototypes \
|
||||
@@ -159,9 +167,19 @@ uqm_prepare_config()
|
||||
CFLAGS=`echo $CFLAGS`
|
||||
# Remove all the unnecessary spaces from $CFLAGS,
|
||||
# for more readable messages.
|
||||
;;
|
||||
esac
|
||||
DEBUG=1
|
||||
}
|
||||
case "$HOST_SYSTEM" in
|
||||
ARMV5|WINSCW)
|
||||
CHOICE_debug_DEFAULT=nodebug
|
||||
;;
|
||||
*)
|
||||
CHOICE_debug_DEFAULT=debug
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
CHOICE_graphics_OPTIONS="pure opengl"
|
||||
CHOICE_graphics_TITLE="OpenGL graphics support"
|
||||
@@ -253,7 +271,15 @@ uqm_prepare_config()
|
||||
CFLAGS="$CFLAGS -DHAVE_JOYSTICK"
|
||||
}
|
||||
CHOICE_joystick_OPTION_disabled_TITLE="disabled"
|
||||
case "$HOST_SYSTEM" in
|
||||
ARMV5|WINSCW)
|
||||
CHOICE_joystick_DEFAULT=disabled
|
||||
;;
|
||||
*)
|
||||
CHOICE_joystick_DEFAULT=enabled
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
CHOICE_netplay_OPTIONS="none full ipv4"
|
||||
CHOICE_netplay_TITLE="Network Supermelee support"
|
||||
@@ -449,6 +475,20 @@ uqm_post_build() {
|
||||
Darwin)
|
||||
$REZ "$RFORK" -o "$TARGET_FILE"
|
||||
;;
|
||||
ARMV5)
|
||||
cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/armv5/urel/"
|
||||
cd src/symbian
|
||||
cmd \\/C bldmake bldfiles armv5
|
||||
cmd \\/C abld build armv5 urel
|
||||
cd ../..
|
||||
;;
|
||||
WINSCW)
|
||||
cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/winscw/udeb/"
|
||||
cd src/symbian
|
||||
cmd \\/C bldmake bldfiles winscw
|
||||
cmd \\/C abld build winscw udeb
|
||||
cd ../..
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -469,6 +509,12 @@ uqm_install() {
|
||||
echo "No installation procedure available for Windows CE."
|
||||
echo "Read the manual for more information."
|
||||
;;
|
||||
WINSCW)
|
||||
uqm_install_winscw
|
||||
;;
|
||||
ARMV5)
|
||||
uqm_install_armv5
|
||||
;;
|
||||
*)
|
||||
generic_install
|
||||
;;
|
||||
@@ -543,11 +589,84 @@ uqm_install_osx() {
|
||||
cp $uqm_NAME "$INSTROOT/MacOS/The Ur-Quan Masters"
|
||||
}
|
||||
|
||||
uqm_install_winscw() {
|
||||
local PRIVATE_DIR
|
||||
|
||||
PRIVATE_DIR="$BUILD_EPOCROOT/epoc32/winscw/c/private/A000A0C3"
|
||||
|
||||
uqm_create_symbian_content_package
|
||||
|
||||
echo "Creating directory structure to $PRIVATE_DIR ..."
|
||||
mkdir "$PRIVATE_DIR"
|
||||
mkdir "$PRIVATE_DIR/content"
|
||||
mkdir "$PRIVATE_DIR/content/packages"
|
||||
mkdir "$PRIVATE_DIR/userdata"
|
||||
|
||||
echo "Copying data to $PRIVATE_DIR ..."
|
||||
cp content/version "$PRIVATE_DIR/content"
|
||||
cp content.uqm "$PRIVATE_DIR/content/packages"
|
||||
cp src/symbian/uqm.cfg "$PRIVATE_DIR/userdata"
|
||||
}
|
||||
|
||||
uqm_install_armv5() {
|
||||
uqm_create_symbian_content_package
|
||||
|
||||
cd src/symbian
|
||||
cmd \\/C makekeys -cert -password asdfgh -len 2048 -dname "CN=UQM OR=Ur-Quan Masters CO=FI" uqm.key uqm.cer
|
||||
cmd \\/C makesis uqm.pkg
|
||||
cmd \\/C signsis -v uqm.sis uqm.sisx uqm.cer uqm.key asdfgh
|
||||
mv uqm.sisx ../..
|
||||
cd ../..
|
||||
}
|
||||
|
||||
uqm_create_symbian_content_package() {
|
||||
if [ -e "content.uqm" ]; then
|
||||
echo "Content package already exists, skipping"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Creating content package..."
|
||||
cd content
|
||||
echo "Building file list..."
|
||||
find . -type f -not -path '*/CVS*' -not -path '*/.svn*' -not -path './addons*' -not -name "version" >../content.lst
|
||||
echo "Zipping..."
|
||||
zip -q ../content.uqm -r . -i@../content.lst
|
||||
cd ..
|
||||
rm content.lst
|
||||
}
|
||||
|
||||
uqm_clean() {
|
||||
case "$HOST_SYSTEM" in
|
||||
MINGW32*|CYGWIN*)
|
||||
rm -f "$BUILD_WORK/config_win.h"
|
||||
;;
|
||||
ARMV5)
|
||||
local TARGET_FILE
|
||||
eval TARGET_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_NAME}"
|
||||
|
||||
rm -f "$BUILD_WORK/config_unix.h"
|
||||
rm -f "$BUILD_EPOCROOT/epoc32/release/armv5/urel/$TARGET_FILE"
|
||||
rm -f $TARGET_FILE uqm.sisx content.uqm
|
||||
|
||||
cd src/symbian
|
||||
cmd \\/C abld reallyclean armv5
|
||||
cmd \\/C bldmake clean
|
||||
rm -f uqm.sis uqm.key uqm.cer
|
||||
cd ../..
|
||||
;;
|
||||
WINSCW)
|
||||
local TARGET_FILE
|
||||
eval TARGET_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_NAME}"
|
||||
|
||||
rm -f "$BUILD_WORK/config_unix.h"
|
||||
rm -f "$BUILD_EPOCROOT/epoc32/release/winscw/udeb/$TARGET_FILE"
|
||||
rm -f $TARGET_FILE content.uqm
|
||||
|
||||
cd src/symbian
|
||||
cmd \\/C abld reallyclean winscw
|
||||
cmd \\/C bldmake clean
|
||||
cd ../..
|
||||
;;
|
||||
*)
|
||||
rm -f "$BUILD_WORK/config_unix.h"
|
||||
;;
|
||||
|
||||
@@ -68,7 +68,7 @@ case "$HOST_SYSTEM" in
|
||||
useGccBuildTools
|
||||
;;
|
||||
WINSCW)
|
||||
EXTRA_WINSCW_FLAGS_COMPILE='-msgstyle gcc -gccinc -wchar_t off -align 4 -warnings on -w nohidevirtual,nounusedexpr -enum int -str pool -exc ms -trigraphs on -nostdinc -d _UNICODE -d __SYMBIAN32__ -d __SERIES60_30__ -d __SERIES60_3X__ -d __CW32__ -d __WINS__ -d __WINSCW__ -d __EXE__ -d __SUPPORT_CPP_EXCEPTIONS__ -I$BUILD_EPOCROOT/epoc32/include -I$BUILD_EPOCROOT/epoc32/include/stdapis -I$BUILD_EPOCROOT/epoc32/include/variant -include Symbian_OS_v9.1.hrh'
|
||||
EXTRA_WINSCW_FLAGS_COMPILE="-msgstyle gcc -gccinc -dialect c99 -relax_pointers -wchar_t off -align 4 -warnings on -w nohidevirtual,nounusedexpr -enum int -str pool -exc ms -trigraphs on -nostdinc -d _UNICODE -d __SYMBIAN32__ -d __SERIES60_30__ -d __SERIES60_3X__ -d __CW32__ -d __WINS__ -d __WINSCW__ -d __EXE__ -d __SUPPORT_CPP_EXCEPTIONS__ -I$BUILD_EPOCROOT/epoc32/include -I$BUILD_EPOCROOT/epoc32/include/stdapis -I$BUILD_EPOCROOT/epoc32/include/variant -include Symbian_OS_v9.1.hrh"
|
||||
EXTRA_WINSCW_FLAGS_LINK='-library -msgstyle gcc -stdlib -noimplib -search'
|
||||
|
||||
BUILDTOOL_PREPROC_C_COMMAND="\$PROG_mwccsym2_FILE -E $EXTRA_WINSCW_FLAGS_COMPILE"
|
||||
|
||||
@@ -67,6 +67,16 @@ case "$HOST_SYSTEM" in
|
||||
gcc -E -include SDL/SDL_version.h $LIB_SDL_CFLAGS - | \
|
||||
tail -1 | tr -d ' ')
|
||||
;;
|
||||
WINSCW)
|
||||
LIB_SDL_CFLAGS='-I$BUILD_EPOCROOT/epoc32/include/SDL'
|
||||
LIB_SDL_LDFLAGS=''
|
||||
LIB_SDL_VERSION='1.2.13'
|
||||
;;
|
||||
ARMV5)
|
||||
LIB_SDL_CFLAGS='-J$BUILD_EPOCROOT/epoc32/include/SDL'
|
||||
LIB_SDL_LDFLAGS=''
|
||||
LIB_SDL_VERSION='1.2.13'
|
||||
;;
|
||||
*)
|
||||
LIB_SDL_CFLAGS='$(sdl-config --cflags)'
|
||||
LIB_SDL_LDFLAGS='$(sdl-config --libs)'
|
||||
@@ -89,6 +99,10 @@ case "$HOST_SYSTEM" in
|
||||
LIB_SDL_image_CFLAGS=''
|
||||
LIB_SDL_image_LDFLAGS="-framework SDL_image"
|
||||
;;
|
||||
ARMV5|WINSCW)
|
||||
LIB_SDL_image_CFLAGS="$LIB_SDL_CFLAGS"
|
||||
LIB_SDL_image_LDFLAGS="$LIB_SDL_LDFLAGS"
|
||||
;;
|
||||
*)
|
||||
LIB_SDL_image_CFLAGS="$LIB_SDL_CFLAGS"
|
||||
LIB_SDL_image_LDFLAGS="$LIB_SDL_LDFLAGS -lSDL_image"
|
||||
@@ -135,6 +149,9 @@ case "$HOST_SYSTEM" in
|
||||
LIB_opengl_CFLAGS=""
|
||||
LIB_opengl_LDFLAGS="-framework OpenGL"
|
||||
;;
|
||||
ARMV5|WINSCW)
|
||||
LIB_opengl_DETECT="false"
|
||||
;;
|
||||
*)
|
||||
LIB_opengl_CFLAGS=""
|
||||
LIB_opengl_LDFLAGS="-lGL"
|
||||
@@ -148,6 +165,11 @@ LIB_vorbis_NAME="libvorbis"
|
||||
LIB_vorbis_CFLAGS=""
|
||||
LIB_vorbis_LDFLAGS="-lvorbis"
|
||||
LIB_vorbis_VERSION=""
|
||||
case "$HOST_SYSTEM" in
|
||||
ARMV5|WINSCW)
|
||||
LIB_vorbis_DETECT="false"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
### Vorbisfile ###
|
||||
@@ -175,8 +197,15 @@ case "$HOST_SYSTEM" in
|
||||
;;
|
||||
esac
|
||||
LIB_vorbisfile_VERSION=""
|
||||
LIB_vorbisfile_DETECT="try_pkgconfig_lib vorbisfile vorbisfile"
|
||||
LIB_vorbisfile_DEPEND_DETECT_BIN="pkgconfig"
|
||||
case "$HOST_SYSTEM" in
|
||||
ARMV5|WINSCW)
|
||||
LIB_vorbisfile_DETECT="false"
|
||||
;;
|
||||
*)
|
||||
LIB_vorbisfile_DETECT="try_pkgconfig_lib vorbisfile vorbisfile"
|
||||
LIB_vorbisfile_DEPEND_DETECT_BIN="pkgconfig"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
### Tremor ###
|
||||
@@ -191,6 +220,9 @@ case "$HOST_SYSTEM" in
|
||||
LIB_tremor_CFLAGS=""
|
||||
LIB_tremor_LDFLAGS="-framework Tremor"
|
||||
;;
|
||||
ARMV5|WINSCW)
|
||||
LIB_tremor_DETECT="false"
|
||||
;;
|
||||
*)
|
||||
LIB_tremor_CFLAGS=""
|
||||
LIB_tremor_LDFLAGS="-lvorbisidec"
|
||||
@@ -204,6 +236,11 @@ LIB_libmikmod_NAME="libmikmod"
|
||||
LIB_libmikmod_CFLAGS="$(libmikmod-config --cflags)"
|
||||
LIB_libmikmod_LDFLAGS="$(libmikmod-config --libs)"
|
||||
LIB_libmikmod_VERSION="$(libmikmod-config --version)"
|
||||
case "$HOST_SYSTEM" in
|
||||
ARMV5|WINSCW)
|
||||
LIB_libmikmod_DETECT="false"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
### zlib ###
|
||||
@@ -213,13 +250,24 @@ case "$HOST_SYSTEM" in
|
||||
MINGW32*|CYGWIN*|cegcc)
|
||||
LIB_zlib_LDFLAGS="-lzdll"
|
||||
;;
|
||||
ARMV5|WINSCW)
|
||||
LIB_zlib_LDFLAGS=""
|
||||
;;
|
||||
*)
|
||||
LIB_zlib_LDFLAGS="-lz"
|
||||
;;
|
||||
esac
|
||||
LIB_zlib_VERSION=""
|
||||
LIB_zlib_DETECT="try_pkgconfig_lib zlib zlib"
|
||||
LIB_zlib_DEPEND_DETECT_BIN="pkgconfig"
|
||||
case "$HOST_SYSTEM" in
|
||||
ARMV5|WINSCW)
|
||||
LIB_zlib_DETECT="true"
|
||||
;;
|
||||
*)
|
||||
LIB_zlib_DETECT="try_pkgconfig_lib zlib zlib"
|
||||
LIB_zlib_DEPEND_DETECT_BIN="pkgconfig"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
### pthread ###
|
||||
@@ -235,6 +283,11 @@ case "$HOST_SYSTEM" in
|
||||
LIB_pthread_LDFLAGS="$(pthread-config --ldflags)"
|
||||
LIB_pthread_VERSION="$(pthread-config --version)"
|
||||
;;
|
||||
WINSCW|ARMV5)
|
||||
LIB_pthread_CFLAGS=""
|
||||
LIB_pthread_LDFLAGS=""
|
||||
LIB_pthread_VERSION=""
|
||||
;;
|
||||
*)
|
||||
LIB_pthread_CFLAGS=""
|
||||
LIB_pthread_LDFLAGS="-lpthread"
|
||||
@@ -251,6 +304,9 @@ case "$HOST_SYSTEM" in
|
||||
LIB_netlibs_LDFLAGS="-lsocket"
|
||||
LIB_netlibs_VERSION=""
|
||||
;;
|
||||
ARMV5|WINSCW)
|
||||
LIB_netlibs_DETECT="false"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -265,6 +321,7 @@ SYMBOL_readdir_r_EXTRA="#include <dirent.h>"
|
||||
SYMBOL_setenv_EXTRA="#include <stdlib.h>"
|
||||
|
||||
SYMBOL_strcasecmp_EXTRA="#include <strings.h>"
|
||||
|
||||
SYMBOL_strcasecmp_DEFNAME="HAVE_STRCASECMP_UQM"
|
||||
# HAVE_STRCASECMP would conflict with SDL (SDL_config.h).
|
||||
|
||||
|
||||
@@ -8,6 +8,6 @@ define act_mkdep_c
|
||||
endef
|
||||
|
||||
define act_link
|
||||
$(LINK) --create "$@".lib $^ $(LDFLAGS)
|
||||
$(LINK) --create "$@" $^ $(LDFLAGS)
|
||||
endef
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
* If you want anything else than the defaults, you'll have to edit
|
||||
* that file manually. */
|
||||
# include "msvc++/config.h"
|
||||
#elif defined(__SYMBIAN32__)
|
||||
# include "symbian/config.h"
|
||||
#elif defined (__MINGW32__) || defined (__CYGWIN__)
|
||||
/* If we're compiling on MS Windows using build.sh, use
|
||||
* config_win.h, generated from src/config_win.h.in. */
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
// Compilation related
|
||||
#ifdef _MSC_VER
|
||||
# define inline __inline
|
||||
#elif defined(__SYMBIAN32__)
|
||||
#else
|
||||
# define inline __inline__
|
||||
# ifdef __MINGW32__
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
32bit Zoomer with optional anti-aliasing by bilinear interpolation.
|
||||
@@ -54,12 +56,22 @@ int zoomSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int smooth)
|
||||
/*
|
||||
* Allocate memory for row increments
|
||||
*/
|
||||
if ((sax = (int *) alloca((dst->w + 1) * sizeof(Uint32))) == NULL) {
|
||||
|
||||
#ifndef __SYMBIAN32__
|
||||
if ((sax = (int *) alloca((dst->w + 1) * sizeof(Uint32))) == NULL)
|
||||
return (-1);
|
||||
}
|
||||
if ((say = (int *) alloca((dst->h + 1) * sizeof(Uint32))) == NULL) {
|
||||
if ((say = (int *) alloca((dst->h + 1) * sizeof(Uint32))) == NULL)
|
||||
return (-1);
|
||||
#else
|
||||
if ((sax = (int *) HMalloc((dst->w + 1) * sizeof(Uint32))) == NULL)
|
||||
return (-1);
|
||||
if ((say = (int *) HMalloc((dst->h + 1) * sizeof(Uint32))) == NULL)
|
||||
{
|
||||
HFree(sax);
|
||||
return (-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Precalculate row increments
|
||||
@@ -196,6 +208,11 @@ int zoomSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int smooth)
|
||||
|
||||
}
|
||||
|
||||
#ifdef __SYMBIAN32__
|
||||
HFree(sax);
|
||||
HFree(say);
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -223,12 +240,20 @@ int zoomSurfaceY(SDL_Surface * src, SDL_Surface * dst)
|
||||
/*
|
||||
* Allocate memory for row increments
|
||||
*/
|
||||
if ((sax = (Uint32 *) alloca(dst->w * sizeof(Uint32))) == NULL) {
|
||||
#ifndef __SYMBIAN32__
|
||||
if ((sax = (Uint32 *) alloca(dst->w * sizeof(Uint32))) == NULL)
|
||||
return (-1);
|
||||
}
|
||||
if ((say = (Uint32 *) alloca(dst->h * sizeof(Uint32))) == NULL) {
|
||||
if ((say = (Uint32 *) alloca(dst->h * sizeof(Uint32))) == NULL)
|
||||
return (-1);
|
||||
#else
|
||||
if ((sax = (Uint32 *) HMalloc(dst->w * sizeof(Uint32))) == NULL)
|
||||
return (-1);
|
||||
if ((say = (Uint32 *) HMalloc(dst->h * sizeof(Uint32))) == NULL)
|
||||
{
|
||||
HFree(sax);
|
||||
return (-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Precalculate row increments
|
||||
@@ -303,6 +328,11 @@ int zoomSurfaceY(SDL_Surface * src, SDL_Surface * dst)
|
||||
dp += dgap;
|
||||
}
|
||||
|
||||
#ifdef __SYMBIAN32__
|
||||
HFree(sax);
|
||||
HFree(say);
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
@@ -260,7 +260,11 @@ moda_InitModule (int flags, const TFB_DecoderFormats* fmts)
|
||||
else if (flags & audio_QUALITY_LOW)
|
||||
{
|
||||
md_mode = DMODE_SOFT_MUSIC|DMODE_STEREO|DMODE_16BITS;
|
||||
#ifdef __SYMBIAN32__
|
||||
md_mixfreq = 11025;
|
||||
#else
|
||||
md_mixfreq = 22050;
|
||||
#endif
|
||||
md_reverb = 0;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -129,8 +129,13 @@ mixSDL_Init (audio_Driver *driver, sint32 flags)
|
||||
else if (flags & audio_QUALITY_LOW)
|
||||
{
|
||||
quality = MIX_QUALITY_LOW;
|
||||
#ifdef __SYMBIAN32__
|
||||
desired.freq = 11025;
|
||||
desired.samples = 4096;
|
||||
#else
|
||||
desired.freq = 22050;
|
||||
desired.samples = 2048;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1455,7 +1455,11 @@ TopoScale4x (BYTE *pDstTopo, BYTE *pSrcTopo, int num_faults, int fault_var)
|
||||
},
|
||||
};
|
||||
|
||||
#ifndef __SYMBIAN32__
|
||||
prevrow = (int *) alloca ((MAP_WIDTH * 4 + 1) * sizeof(prevrow[0]));
|
||||
#else
|
||||
prevrow = (int *) HMalloc ((MAP_WIDTH * 4 + 1) * sizeof(prevrow[0]));
|
||||
#endif
|
||||
|
||||
var_allow = (num_faults << SCALE_SHIFT) / AVG_VARIANCE;
|
||||
var_min = fault_var << SCALE_SHIFT;
|
||||
@@ -1592,6 +1596,10 @@ TopoScale4x (BYTE *pDstTopo, BYTE *pSrcTopo, int num_faults, int fault_var)
|
||||
// save last row point
|
||||
prow[0] = elev[4][4];
|
||||
}
|
||||
|
||||
#ifdef __SYMBIAN32__
|
||||
HFree(prevrow);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
+6
-6
@@ -235,17 +235,17 @@ main (int argc, char *argv[])
|
||||
}
|
||||
if (res_HasKey ("config.scaler"))
|
||||
{
|
||||
const char *optarg = res_GetString ("config.scaler");
|
||||
const char *arg = res_GetString ("config.scaler");
|
||||
|
||||
if (!strcmp (optarg, "bilinear"))
|
||||
if (!strcmp (arg, "bilinear"))
|
||||
options.gfxFlags |= TFB_GFXFLAGS_SCALE_BILINEAR;
|
||||
else if (!strcmp (optarg, "biadapt"))
|
||||
else if (!strcmp (arg, "biadapt"))
|
||||
options.gfxFlags |= TFB_GFXFLAGS_SCALE_BIADAPT;
|
||||
else if (!strcmp (optarg, "biadv"))
|
||||
else if (!strcmp (arg, "biadv"))
|
||||
options.gfxFlags |= TFB_GFXFLAGS_SCALE_BIADAPTADV;
|
||||
else if (!strcmp (optarg, "triscan"))
|
||||
else if (!strcmp (arg, "triscan"))
|
||||
options.gfxFlags |= TFB_GFXFLAGS_SCALE_TRISCAN;
|
||||
else if (!strcmp (optarg, "hq"))
|
||||
else if (!strcmp (arg, "hq"))
|
||||
options.gfxFlags |= TFB_GFXFLAGS_SCALE_HQXX;
|
||||
}
|
||||
if (res_HasKey ("config.scanlines") && res_GetBoolean ("config.scanlines"))
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
PRJ_PLATFORMS
|
||||
|
||||
|
||||
PRJ_EXPORTS
|
||||
|
||||
|
||||
PRJ_MMPFILES
|
||||
gnumakefile icons_scalable_dc.mk
|
||||
uqm.mmp
|
||||
@@ -0,0 +1,57 @@
|
||||
/* This file contains some compile-time configuration options for Symbian
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
|
||||
/* Directory where the UQM game data is located */
|
||||
#define CONTENTDIR "content"
|
||||
|
||||
/* Directory where game data will be stored */
|
||||
#define USERDIR "userdata"
|
||||
|
||||
/* Directory where config files will be stored */
|
||||
#define CONFIGDIR USERDIR
|
||||
|
||||
/* Directory where supermelee teams will be stored */
|
||||
#define MELEEDIR "userdata\\teams\\"
|
||||
|
||||
/* Directory where save games will be stored */
|
||||
#define SAVEDIR "userdata\\save\\"
|
||||
|
||||
/* Define if words are stored with the most significant byte first */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* Defined if your system has readdir_r of its own */
|
||||
#undef HAVE_READDIR_R
|
||||
|
||||
/* Defined if your system has setenv of its own */
|
||||
#define HAVE_SETENV
|
||||
|
||||
/* Defined if your system has strupr of its own */
|
||||
#undef HAVE_STRUPR
|
||||
|
||||
/* Defined if your system has strcasecmp of its own */
|
||||
#define HAVE_STRCASECMP_UQM
|
||||
// Not using "HAVE_STRCASECMP" as that conflicts with SDL.
|
||||
|
||||
/* Defined if your system has stricmp of its own */
|
||||
#undef HAVE_STRICMP
|
||||
|
||||
/* Defined if your system has getopt_long */
|
||||
#undef HAVE_GETOPT_LONG
|
||||
|
||||
/* Defined if your system has iswgraph of its own*/
|
||||
#define HAVE_ISWGRAPH
|
||||
|
||||
/* Defined if your system has wchar_t of its own */
|
||||
#define HAVE_WCHAR_T
|
||||
|
||||
/* Defined if your system has wint_t of its own */
|
||||
#define HAVE_WINT_T
|
||||
|
||||
#define HAVE__BOOL
|
||||
|
||||
#define PATH_MAX _POSIX_PATH_MAX
|
||||
|
||||
#endif /* _CONFIG_H */
|
||||
@@ -0,0 +1,37 @@
|
||||
ifeq (WINS,$(findstring WINS, $(PLATFORM)))
|
||||
ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z
|
||||
else
|
||||
ZDIR=$(EPOCROOT)epoc32\data\z
|
||||
endif
|
||||
|
||||
TARGETDIR=$(ZDIR)\resource\apps
|
||||
ICONTARGETFILENAME=$(TARGETDIR)\uqm_icon.mif
|
||||
|
||||
ICONDIR=
|
||||
|
||||
do_nothing :
|
||||
@rem do_nothing
|
||||
|
||||
MAKMAKE : do_nothing
|
||||
|
||||
BLD : do_nothing
|
||||
|
||||
CLEAN : do_nothing
|
||||
|
||||
LIB : do_nothing
|
||||
|
||||
CLEANLIB : do_nothing
|
||||
|
||||
RESOURCE :
|
||||
mifconv $(ICONTARGETFILENAME) \
|
||||
/c32 uqm.svg
|
||||
|
||||
FREEZE : do_nothing
|
||||
|
||||
SAVESPACE : do_nothing
|
||||
|
||||
RELEASABLES :
|
||||
@echo $(ICONTARGETFILENAME)
|
||||
|
||||
FINAL : do_nothing
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
config.textmenu = yes
|
||||
config.alwaysgl = no
|
||||
config.sfxvol = 20
|
||||
config.iconicscan = no
|
||||
config.pulseshield = no
|
||||
config.3domusic = no
|
||||
config.smoothmelee = no
|
||||
config.positionalsfx = no
|
||||
config.resheight = 240
|
||||
config.musicvol = 20
|
||||
config.textgradients = yes
|
||||
config.reswidth = 320
|
||||
config.scaler = no
|
||||
config.audiodriver = mixsdl
|
||||
config.fullscreen = no
|
||||
config.usegl = no
|
||||
config.player2control = 3
|
||||
config.player1control = 0
|
||||
config.subtitles = yes
|
||||
config.3domovies = yes
|
||||
config.scanlines = no
|
||||
config.showfps = no
|
||||
config.speechvol = 0
|
||||
config.remixmusic = no
|
||||
config.smoothscroll = no
|
||||
config.audioquality = low
|
||||
@@ -0,0 +1,43 @@
|
||||
TARGET uqm.exe
|
||||
TARGETTYPE exe
|
||||
UID 0 0xA000A0C3
|
||||
EPOCHEAPSIZE 1000000 50000000
|
||||
EPOCSTACKSIZE 0x13500
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include \epoc32\include\stdapis
|
||||
|
||||
SOURCEPATH .
|
||||
SOURCE uqmapp.cpp
|
||||
|
||||
START RESOURCE uqm.rss
|
||||
HEADER
|
||||
TARGETPATH resource\apps
|
||||
LANG SC
|
||||
END // RESOURCE
|
||||
|
||||
START RESOURCE uqm_reg.rss
|
||||
#ifdef WINSCW
|
||||
TARGETPATH \private\10003a3f\apps
|
||||
#else
|
||||
TARGETPATH \private\10003a3f\import\apps
|
||||
#endif
|
||||
END
|
||||
|
||||
OPTION_REPLACE ARMCC --cpu ARM926EJ-S -O3 -Otime
|
||||
ALWAYS_BUILD_AS_ARM
|
||||
|
||||
LIBRARY avkon.lib
|
||||
LIBRARY apparc.lib
|
||||
LIBRARY cone.lib
|
||||
LIBRARY eikcore.lib
|
||||
LIBRARY ws32.lib
|
||||
LIBRARY bafl.lib
|
||||
LIBRARY euser.lib
|
||||
LIBRARY sdl.lib
|
||||
LIBRARY libc.lib
|
||||
LIBRARY libm.lib
|
||||
LIBRARY libz.lib
|
||||
LIBRARY libpthread.lib
|
||||
|
||||
STATICLIBRARY SDL_image.lib
|
||||
STATICLIBRARY uqm.lib
|
||||
@@ -0,0 +1,26 @@
|
||||
;Language - standard language definitions
|
||||
&EN
|
||||
|
||||
; standard SIS file header
|
||||
#{"Ur-Quan Masters"},(0xA000A0C3),1,0,0
|
||||
|
||||
;Localised Vendor name
|
||||
%{"Interstellar Frungy League"}
|
||||
|
||||
;Unique Vendor name
|
||||
:"Interstellar Frungy League"
|
||||
|
||||
;Supports Series 60 v 3.0
|
||||
[0x101F7961], 0, 0, 0, {"Series60ProductID"}
|
||||
|
||||
*"uqm.key", "uqm.cer"
|
||||
|
||||
;Files to install
|
||||
;<source> <destination>
|
||||
"\Epoc32\release\Armv5\urel\uqm.exe" - "!:\sys\bin\uqm.exe"
|
||||
"\Epoc32\data\z\resource\apps\uqm.rsc" - "!:\resource\apps\uqm.rsc"
|
||||
"\Epoc32\data\z\resource\apps\uqm_icon.mif" - "!:\resource\apps\uqm_icon.mif"
|
||||
"\Epoc32\data\z\private\10003a3f\import\apps\uqm_reg.rsc" - "!:\private\10003a3f\import\apps\uqm_reg.rsc"
|
||||
"uqm.cfg" - "c:\private\A000A0C3\userdata\uqm.cfg"
|
||||
"..\..\content\version" - "c:\private\A000A0C3\content\version"
|
||||
"..\..\content.uqm" - "c:\private\A000A0C3\content\packages\content.uqm"
|
||||
@@ -0,0 +1,26 @@
|
||||
NAME UQM
|
||||
|
||||
#include <eikon.rh>
|
||||
#include <avkon.rh>
|
||||
#include <avkon.rsg>
|
||||
#include <avkon.hrh>
|
||||
#include <appinfo.rh>
|
||||
|
||||
RESOURCE RSS_SIGNATURE { }
|
||||
|
||||
RESOURCE TBUF { buf="UQM"; }
|
||||
|
||||
RESOURCE EIK_APP_INFO
|
||||
{
|
||||
}
|
||||
|
||||
RESOURCE LOCALISABLE_APP_INFO r_uqm_localisable_app_info
|
||||
{
|
||||
short_caption = "UQM";
|
||||
caption_and_icon = CAPTION_AND_ICON_INFO
|
||||
{
|
||||
caption = "UrQuanMasters";
|
||||
number_of_icons = 1;
|
||||
icon_file = "\\resource\\apps\\uqm_icon.mif";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="48px" height="48px" viewBox="0 0 48 48" enable-background="new 0 0 48 48" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<path fill="#5B5F54" d="M15,5c1.44,0.56,2.44,1.56,3,3c-0.81,0.19-0.997,1.003-2,1c-0.333,0-0.667,0-1,0
|
||||
c0.184-0.851-0.39-0.943-1-1C13.718,6.385,14.945,6.278,15,5z"/>
|
||||
<path fill="#5B5F54" d="M13,15c-0.586,3.511,4.727,3.289,2,6c-2.323,2.416-2.677-1.562-5-2c0-0.667,0-1.333,0-2
|
||||
C10.437,15.77,11.28,14.946,13,15z"/>
|
||||
<path fill="#B43905" d="M5,29c0.333,0,0.667,0,1,0c0.19,0.811,1.003,0.997,1,2c1.563,3.771,4.23,6.438,8,8
|
||||
c0.89,0.443,1.789,0.878,2,2c-4.236,0.236-5.083-2.917-8-4c0.184-0.852-0.39-0.943-1-1C7.549,33.118,4.461,32.872,5,29z"/>
|
||||
<path fill="#03D002" d="M9,31c5.35-2.9,9.348,4.807,9,8c-4.555-0.779-5.266-5.4-9-7C9,31.667,9,31.333,9,31z"/>
|
||||
<path fill="#5B5F54" d="M27,30c0.902,1.764,2.236,3.098,4,4c-0.238,1.428-1.646,1.688-2,3c-0.333,0-0.667,0-1,0
|
||||
c-0.902-1.764-2.236-3.098-4-4c0.239-1.428,1.646-1.688,2-3C26.333,30,26.667,30,27,30z"/>
|
||||
<path opacity="0" fill="#EAECE6" d="M4,14c3.582-4.418,7.582-8.418,12-12C12.418,6.418,8.418,10.418,4,14z"/>
|
||||
<path opacity="0" fill="#FFFFFF" d="M48,0c0,16,0,32,0,48c-16,0-32,0-48,0C0,32,0,16,0,0C16,0,32,0,48,0z M4,14
|
||||
c-0.634,3.699-2.713,5.953-2,11c4.654,0.943,6.093-6.516,10-3c-1.412,2.588-3.231,4.77-8,4c-0.664,5.33,0.582,8.751,4,10
|
||||
c0.61,0.057,1.184,0.148,1,1c0,0.333,0,0.667,0,1c2.853,1.813,4.086,5.247,10,4c0.792-3.339,2.546-9.477,7-6
|
||||
c-0.854,3.275-7.298,4.725-5,8c13.313,1.313,15.825-8.175,23-13c0.253-3.586-3.003-3.664-3-7C52.211,11.655,34.152-2.889,21,6
|
||||
c-1.286-1.714-2.068-3.932-5-4C11.582,5.582,7.582,9.582,4,14z"/>
|
||||
<path fill="#21351B" d="M4,14c4.418-3.582,8.418-7.582,12-12c2.932,0.068,3.714,2.286,5,4c13.152-8.889,31.211,5.655,20,18
|
||||
c-0.003,3.336,3.253,3.414,3,7c-7.175,4.825-9.688,14.313-23,13c-2.298-3.275,4.146-4.725,5-8c-4.454-3.477-6.208,2.661-7,6
|
||||
c-5.914,1.247-7.147-2.188-10-4c0-0.333,0-0.667,0-1c2.917,1.083,3.764,4.236,8,4c0.333,0,0.667,0,1,0
|
||||
c2.208-0.125,0.425-4.242,1-6c0.89,0.615,1.789,1.208,2,0c1.313-0.354,1.573-1.762,3-2c1.764,0.902,3.098,2.236,4,4
|
||||
c-0.797,1.072-7.094,4.348-2,5c6.992-0.341,10.803-3.863,13-9c-0.354-1.313-1.762-1.572-2-3c-3.512-0.178-3.289,3.378-6,4
|
||||
c-1.764-0.902-3.098-2.236-4-4c1.241-2.092,2.908-3.759,5-5c-1.436,2.951-5.811,4.049-2,7c2.748-1.131,12.85-8.146,3-7
|
||||
c1.807-3.096,3.063-0.534,7-1c3.793-2.643,2.902-15.629-2-16c-0.529-0.804-1.043-1.624-1-3c-4.564,0.435-11.012-1.011-14,1
|
||||
c3.873,11.531-9.844,12.351-12,21c-2,0-4,0-6,0c0,0.667,0,1.333,0,2c-0.539,3.872,2.549,4.118,3,7c-3.418-1.249-4.664-4.67-4-10
|
||||
c4.769,0.77,6.588-1.412,8-4c-3.907-3.516-5.346,3.943-10,3C1.287,19.953,3.366,17.699,4,14z M18,8c1.278,0.055,1.385,1.282,3,1
|
||||
c1.074-3.808-3.845-6.732-6-4c-0.055,1.278-1.282,1.385-1,3C8.369,11.035,3.757,15.09,3,23c2.951,2.451,4.049-3.356,7-4
|
||||
c2.323,0.438,2.677,4.416,5,2c2.727-2.711-2.586-2.489-2-6c2.039-0.294,1.961-2.706,4-3c0.043-1.376-0.471-2.196-1-3
|
||||
C17.003,9.003,17.19,8.19,18,8z M21,9c-1.546,2.867-8.463,4.297-5,9C19.536,17.498,24.081,12.798,21,9z M37,28
|
||||
c3.384-0.384,1.572,4.428,6,3C42.991,27.918,38.283,23.799,37,28z"/>
|
||||
<path fill="#65C11B" d="M34,6c1.725,3.276,5.275,4.724,7,8c-2.754-1.913-5.088-4.246-7-7c-1.758,0.575-5.875-1.208-6,1
|
||||
C22.684,5.654,30.9,5.834,34,6z"/>
|
||||
<path fill="#65C11B" d="M31,8c4.893,2.441,6.87,7.797,10,12c-4.051,1.688-3.527-9.783-9-10C31.811,9.19,30.997,9.003,31,8z"/>
|
||||
<path fill="#03D002" d="M16,9c0.529,0.804,1.043,1.624,1,3c-2.039,0.294-1.961,2.706-4,3c-1.72-0.054-2.563,0.77-3,2
|
||||
c-2.168,1.499-2.329,5.004-6,5c1.383-6.617,7.15-8.85,11-13C15.333,9,15.667,9,16,9z"/>
|
||||
<path fill="#038C01" d="M15,9c-3.85,4.15-9.617,6.383-11,13c3.671,0.004,3.832-3.501,6-5c0,0.667,0,1.333,0,2
|
||||
c-2.951,0.644-4.049,6.451-7,4c0.757-7.91,5.369-11.965,11-15C14.61,8.057,15.184,8.149,15,9z"/>
|
||||
<path opacity="0" fill="#FFFFFF" d="M16,18c-3.463-4.703,3.454-6.133,5-9C24.081,12.798,19.536,17.498,16,18z"/>
|
||||
<path fill="#03D002" d="M38,8c4.902,0.371,5.793,13.357,2,16c-3.938,0.466-5.193-2.096-7,1c-0.333,0-0.667,0-1,0
|
||||
c-2.092,1.241-3.759,2.908-5,5c-0.333,0-0.667,0-1,0c-0.354,1.313-1.761,1.572-2,3c-1.427,0.238-1.687,1.646-3,2
|
||||
c-0.333,0-0.667,0-1,0c-2.573-1.762-4.318-4.35-7-6c1.167-1.834,2.614-3.387,4-5c3.401,1.891-1.712,3.506-1,6
|
||||
c3.094-1.236,5.508-3.184,8,0c-1.317-2.684,0.114-8.114-5-7c2.849-4.484,8.209-6.458,9-13c1.333,0,2.667,0,4,0
|
||||
c5.473,0.217,4.949,11.688,9,10c0-2,0-4,0-6c-1.725-3.276-5.275-4.724-7-8C35.764,5.714,37.098,10.709,38,8z"/>
|
||||
<path fill="#038C01" d="M17,24c-1.386,1.613-2.833,3.166-4,5c2.682,1.65,4.427,4.238,7,6c0.333,0,0.667,0,1,0
|
||||
c-0.211,1.208-1.11,0.615-2,0c-0.575,1.758,1.208,5.875-1,6c0-0.667,0-1.333,0-2c0.348-3.193-3.65-10.9-9-8
|
||||
c-1.313-0.354-1.573-1.762-3-2c-0.333,0-0.667,0-1,0c0-0.667,0-1.333,0-2c2,0,4,0,6,0c2.156-8.649,15.873-9.469,12-21
|
||||
c2.988-2.011,9.436-0.565,14-1c-0.043,1.376,0.471,2.196,1,3c-0.902,2.709-2.236-2.286-4-2c-3.1-0.166-11.316-0.346-6,2
|
||||
c1,0,2,0,3,0c-0.003,1.003,0.811,1.19,1,2c-1.333,0-2.667,0-4,0c-0.791,6.542-6.151,8.516-9,13c-1.313-0.354-1.573-1.761-3-2
|
||||
C15.718,22.615,16.945,22.722,17,24z"/>
|
||||
<path fill="#E6C626" d="M19,23c5.114-1.114,3.683,4.316,5,7c-2.492-3.184-4.906-1.236-8,0c-0.712-2.494,4.401-4.109,1-6
|
||||
c-0.055-1.278-1.282-1.385-1-3C17.427,21.239,17.687,22.646,19,23z"/>
|
||||
<path opacity="0" fill="#FFFFFF" d="M33,25c9.85-1.146-0.252,5.869-3,7c-3.811-2.951,0.564-4.049,2-7C32.333,25,32.667,25,33,25z"
|
||||
/>
|
||||
<path fill="#B43905" d="M43,31c-4.428,1.428-2.616-3.384-6-3C38.283,23.799,42.991,27.918,43,31z"/>
|
||||
<path fill="#E6C626" d="M7,31c3.086,2.247,5.753,4.913,8,8C11.23,37.438,8.563,34.771,7,31z"/>
|
||||
<path fill="#65C11B" d="M15,39c-2.247-3.087-4.914-5.753-8-8c0.003-1.003-0.81-1.189-1-2c1.427,0.238,1.687,1.646,3,2
|
||||
c0,0.333,0,0.667,0,1c3.734,1.6,4.445,6.221,9,7c0,0.667,0,1.333,0,2c-0.333,0-0.667,0-1,0C16.789,39.878,15.89,39.443,15,39z"/>
|
||||
<path fill="#038C01" d="M31,34c2.711-0.622,2.488-4.178,6-4c0.238,1.428,1.646,1.688,2,3c-4.995-1.393-9.604,5.531-13,9
|
||||
c-5.094-0.652,1.203-3.928,2-5c0.333,0,0.667,0,1,0C29.354,35.688,30.762,35.428,31,34z"/>
|
||||
<path fill="#03D002" d="M39,33c-2.197,5.137-6.008,8.659-13,9C29.396,38.531,34.005,31.607,39,33z"/>
|
||||
<path fill="#B43905" d="M15,5c2.155-2.732,7.074,0.192,6,4c-1.615,0.282-1.722-0.945-3-1C17.44,6.56,16.44,5.56,15,5z"/>
|
||||
<path fill="#E6C626" d="M41,14c0,2,0,4,0,6c-3.13-4.203-5.107-9.559-10-12c-1,0-2,0-3,0c0.125-2.208,4.242-0.425,6-1
|
||||
C35.912,9.754,38.246,12.087,41,14z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
@@ -0,0 +1,12 @@
|
||||
#include <appinfo.rh>
|
||||
#include <uqm.rsg>
|
||||
|
||||
UID2 KUidAppRegistrationResourceFile
|
||||
UID3 0xA000A0C3
|
||||
|
||||
RESOURCE APP_REGISTRATION_INFO
|
||||
{
|
||||
app_file = "uqm";
|
||||
localisable_resource_file = "\\resource\\apps\\uqm";
|
||||
localisable_resource_id = R_UQM_LOCALISABLE_APP_INFO;
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
#include <coecntrl.h>
|
||||
#include <aknappui.h>
|
||||
#include <aknapp.h>
|
||||
#include <akndoc.h>
|
||||
#include <sdlepocapi.h>
|
||||
#include <aknnotewrappers.h>
|
||||
#include <eikstart.h>
|
||||
#include <badesca.h>
|
||||
#include <stdio.h>
|
||||
|
||||
const TUid KUidSdlApp={ 0xA000A0C3 };
|
||||
|
||||
|
||||
class CSDLObserver : public CBase, public MSDLObserver
|
||||
{
|
||||
public:
|
||||
TInt SdlEvent(TInt aEvent, TInt aParam);
|
||||
TInt SdlThreadEvent(TInt aEvent, TInt aParam);
|
||||
};
|
||||
|
||||
class MExitWait
|
||||
{
|
||||
public:
|
||||
virtual void DoExit(TInt aErr) = 0;
|
||||
};
|
||||
|
||||
class CExitWait : public CActive
|
||||
{
|
||||
public:
|
||||
CExitWait(MExitWait& aWait);
|
||||
void Start();
|
||||
~CExitWait();
|
||||
private:
|
||||
void RunL();
|
||||
void DoCancel();
|
||||
private:
|
||||
MExitWait& iWait;
|
||||
TRequestStatus* iStatusPtr;
|
||||
};
|
||||
|
||||
class CSDLWin : public CCoeControl
|
||||
{
|
||||
public:
|
||||
void ConstructL(const TRect& aRect);
|
||||
RWindow& GetWindow() const;
|
||||
void SetNoDraw();
|
||||
private:
|
||||
void Draw(const TRect& aRect) const;
|
||||
};
|
||||
|
||||
class CSdlApplication : public CAknApplication
|
||||
{
|
||||
private:
|
||||
// from CApaApplication
|
||||
CApaDocument* CreateDocumentL();
|
||||
TUid AppDllUid() const;
|
||||
};
|
||||
|
||||
|
||||
class CSdlAppDocument : public CAknDocument
|
||||
{
|
||||
public:
|
||||
CSdlAppDocument(CEikApplication& aApp): CAknDocument(aApp) { }
|
||||
private:
|
||||
CEikAppUi* CreateAppUiL();
|
||||
};
|
||||
|
||||
|
||||
class CSdlAppUi : public CAknAppUi, public MExitWait
|
||||
{
|
||||
public:
|
||||
void ConstructL();
|
||||
~CSdlAppUi();
|
||||
private:
|
||||
void HandleCommandL(TInt aCommand);
|
||||
void DoExit(TInt aErr);
|
||||
void HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination);
|
||||
void HandleResourceChangeL(TInt aType);
|
||||
private:
|
||||
CExitWait* iWait;
|
||||
CSDLWin* iSDLWin;
|
||||
CSDL* iSdl;
|
||||
CSDLObserver* iSdlObserver;
|
||||
TBool iExit;
|
||||
};
|
||||
|
||||
|
||||
CExitWait::CExitWait(MExitWait& aWait) : CActive(CActive::EPriorityStandard), iWait(aWait)
|
||||
{
|
||||
CActiveScheduler::Add(this);
|
||||
}
|
||||
|
||||
CExitWait::~CExitWait()
|
||||
{
|
||||
Cancel();
|
||||
}
|
||||
|
||||
void CExitWait::RunL()
|
||||
{
|
||||
if(iStatusPtr != NULL )
|
||||
iWait.DoExit(iStatus.Int());
|
||||
}
|
||||
|
||||
void CExitWait::DoCancel()
|
||||
{
|
||||
if(iStatusPtr != NULL )
|
||||
User::RequestComplete(iStatusPtr , KErrCancel);
|
||||
}
|
||||
|
||||
void CExitWait::Start()
|
||||
{
|
||||
SetActive();
|
||||
iStatusPtr = &iStatus;
|
||||
}
|
||||
|
||||
void CSDLWin:: ConstructL(const TRect& aRect)
|
||||
{
|
||||
CreateWindowL();
|
||||
SetRect(aRect);
|
||||
ActivateL();
|
||||
}
|
||||
|
||||
|
||||
RWindow& CSDLWin::GetWindow() const
|
||||
{
|
||||
return Window();
|
||||
}
|
||||
|
||||
|
||||
void CSDLWin::Draw(const TRect& /*aRect*/) const
|
||||
{
|
||||
CWindowGc& gc = SystemGc();
|
||||
gc.SetPenStyle(CGraphicsContext::ESolidPen);
|
||||
gc.SetPenColor(KRgbBlack);
|
||||
gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
|
||||
gc.SetBrushColor(0x000000);
|
||||
gc.DrawRect(Rect());
|
||||
}
|
||||
|
||||
void CSdlAppUi::ConstructL()
|
||||
{
|
||||
BaseConstructL(ENoScreenFurniture | EAppOrientationLandscape);
|
||||
|
||||
iSDLWin = new (ELeave) CSDLWin;
|
||||
iSDLWin->ConstructL(ApplicationRect());
|
||||
|
||||
iWait = new (ELeave) CExitWait(*this);
|
||||
|
||||
iSdl = CSDL::NewL(CSDL::ENoFlags);
|
||||
iSdlObserver = new (ELeave) CSDLObserver;
|
||||
|
||||
iSdl->SetContainerWindowL(
|
||||
iSDLWin->GetWindow(),
|
||||
iEikonEnv->WsSession(),
|
||||
*iEikonEnv->ScreenDevice());
|
||||
|
||||
iSdl->SetObserver(iSdlObserver);
|
||||
|
||||
CDesC8ArrayFlat* args = new (ELeave)CDesC8ArrayFlat(10);
|
||||
iSdl->CallMainL(iWait->iStatus, *args, 75000);
|
||||
delete args;
|
||||
|
||||
iWait->Start();
|
||||
}
|
||||
|
||||
void CSdlAppUi::HandleCommandL(TInt aCommand)
|
||||
{
|
||||
switch(aCommand)
|
||||
{
|
||||
case EAknCmdExit:
|
||||
case EAknSoftkeyExit:
|
||||
case EEikCmdExit:
|
||||
iExit = ETrue;
|
||||
if(iWait == NULL || !iWait->IsActive())
|
||||
Exit();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CSdlAppUi::DoExit(TInt aErr)
|
||||
{
|
||||
delete iSdl;
|
||||
iSdl = NULL;
|
||||
|
||||
if(iExit)
|
||||
Exit();
|
||||
}
|
||||
|
||||
void CSdlAppUi::HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination)
|
||||
{
|
||||
if(iSdl != NULL)
|
||||
iSdl->AppendWsEvent(aEvent);
|
||||
CAknAppUi::HandleWsEventL(aEvent, aDestination);
|
||||
}
|
||||
|
||||
void CSdlAppUi::HandleResourceChangeL(TInt aType)
|
||||
{
|
||||
CAknAppUi::HandleResourceChangeL(aType);
|
||||
|
||||
if(aType == KEikDynamicLayoutVariantSwitch)
|
||||
{
|
||||
iSDLWin->SetRect(ApplicationRect());
|
||||
if (iSdl)
|
||||
{
|
||||
iSdl->SetContainerWindowL(
|
||||
iSDLWin->GetWindow(),
|
||||
iEikonEnv->WsSession(),
|
||||
*iEikonEnv->ScreenDevice());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CSdlAppUi::~CSdlAppUi()
|
||||
{
|
||||
if(iWait != NULL)
|
||||
iWait->Cancel();
|
||||
delete iSdl;
|
||||
delete iWait;
|
||||
delete iSDLWin;
|
||||
delete iSdlObserver;
|
||||
}
|
||||
|
||||
CEikAppUi* CSdlAppDocument::CreateAppUiL()
|
||||
{
|
||||
return new(ELeave) CSdlAppUi();
|
||||
}
|
||||
|
||||
TUid CSdlApplication::AppDllUid() const
|
||||
{
|
||||
return KUidSdlApp;
|
||||
}
|
||||
|
||||
|
||||
CApaDocument* CSdlApplication::CreateDocumentL()
|
||||
{
|
||||
CSdlAppDocument* document = new (ELeave) CSdlAppDocument(*this);
|
||||
return document;
|
||||
}
|
||||
|
||||
LOCAL_C CApaApplication* NewApplication()
|
||||
{
|
||||
return new CSdlApplication;
|
||||
}
|
||||
|
||||
GLDEF_C TInt E32Main()
|
||||
{
|
||||
return EikStart::RunApplication(NewApplication);
|
||||
}
|
||||
|
||||
TInt CSDLObserver::SdlEvent(TInt aEvent, TInt aParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
TInt CSDLObserver::SdlThreadEvent(TInt aEvent, TInt aParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user