aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/android/android.cpp2
-rw-r--r--backends/platform/dc/selector.cpp2
-rw-r--r--backends/platform/dingux/README.DINGUX16
-rw-r--r--backends/platform/dingux/dingux.mk2
-rw-r--r--backends/platform/ds/arm9/makefile2
-rw-r--r--backends/platform/ds/arm9/source/touchkeyboard.cpp8
-rw-r--r--backends/platform/gp2x/build/README-GP2X6
-rwxr-xr-xbackends/platform/gp2x/gp2x-bundle.mk12
-rw-r--r--backends/platform/gp2x/gp2x-common.h2
-rw-r--r--backends/platform/gph/build/README-GP2XWIZ8
-rwxr-xr-xbackends/platform/gph/build/config.sh2
-rwxr-xr-xbackends/platform/gph/build/scummvm-gdb.gpe2
-rwxr-xr-xbackends/platform/gph/build/scummvm.gpe2
-rwxr-xr-xbackends/platform/gph/caanoo-bundle.mk14
-rwxr-xr-xbackends/platform/gph/caanoo/config.sh2
-rwxr-xr-xbackends/platform/gph/caanoo/scummvm-gdb.gpe2
-rwxr-xr-xbackends/platform/gph/caanoo/scummvm.gpe2
-rwxr-xr-xbackends/platform/gph/gp2xwiz-bundle.mk16
-rw-r--r--backends/platform/iphone/iphone_main.m2
-rw-r--r--backends/platform/iphone/iphone_video.m10
-rw-r--r--backends/platform/iphone/osys_events.cpp4
-rw-r--r--backends/platform/iphone/osys_video.cpp4
-rw-r--r--backends/platform/linuxmoto/linuxmoto-events.cpp2
-rw-r--r--backends/platform/n64/Makefile4
-rw-r--r--backends/platform/n64/README.N646
-rw-r--r--backends/platform/n64/module.mk2
-rw-r--r--backends/platform/n64/osys_n64_base.cpp2
-rwxr-xr-xbackends/platform/openpandora/build/PXML.xml12
-rwxr-xr-xbackends/platform/openpandora/build/README-OPENPANDORA8
-rwxr-xr-xbackends/platform/openpandora/build/README-PND.txt14
-rwxr-xr-xbackends/platform/openpandora/build/pnd_make.sh24
-rwxr-xr-xbackends/platform/openpandora/module.mk4
-rwxr-xr-xbackends/platform/openpandora/op-bundle.mk22
-rw-r--r--backends/platform/ps2/Makefile.gdb8
-rw-r--r--backends/platform/ps2/Makefile.ps212
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst10
-rw-r--r--backends/platform/psp/Makefile2
-rw-r--r--backends/platform/psp/README.PSP14
-rw-r--r--backends/platform/psp/README.PSP.in14
-rw-r--r--backends/platform/psp/audio.cpp38
-rw-r--r--backends/platform/psp/audio.h8
-rw-r--r--backends/platform/psp/display_client.cpp4
-rw-r--r--backends/platform/psp/display_manager.cpp38
-rw-r--r--backends/platform/psp/display_manager.h4
-rw-r--r--backends/platform/psp/input.cpp106
-rw-r--r--backends/platform/psp/input.h30
-rw-r--r--backends/platform/psp/memory.cpp100
-rw-r--r--backends/platform/psp/memory.h10
-rw-r--r--backends/platform/psp/mp3.cpp86
-rw-r--r--backends/platform/psp/mp3.h20
-rw-r--r--backends/platform/psp/osys_psp.cpp40
-rw-r--r--backends/platform/psp/plugin.ld4
-rw-r--r--backends/platform/psp/png_loader.cpp32
-rw-r--r--backends/platform/psp/png_loader.h16
-rw-r--r--backends/platform/psp/powerman.cpp52
-rw-r--r--backends/platform/psp/psp_main.cpp6
-rw-r--r--backends/platform/psp/pspkeyboard.cpp10
-rw-r--r--backends/platform/psp/rtc.cpp30
-rw-r--r--backends/platform/psp/rtc.h4
-rw-r--r--backends/platform/psp/tests.cpp248
-rw-r--r--backends/platform/psp/tests.h6
-rw-r--r--backends/platform/psp/thread.cpp60
-rw-r--r--backends/platform/psp/thread.h6
-rw-r--r--backends/platform/sdl/sdl.h2
-rw-r--r--backends/platform/symbian/AdaptAllMMPs.pl136
-rw-r--r--backends/platform/symbian/BuildPackageUpload_AllVersions.pl88
-rw-r--r--backends/platform/symbian/BuildPackageUpload_LocalSettings.pl50
-rw-r--r--backends/platform/symbian/README4
-rw-r--r--backends/platform/symbian/S60/BLD.INF.in2
-rw-r--r--backends/platform/symbian/S60v3/BLD.INF.in2
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in4
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in4
-rw-r--r--backends/platform/symbian/S80/BLD.INF.in2
-rw-r--r--backends/platform/symbian/S90/BLD.INF.in2
-rw-r--r--backends/platform/symbian/UIQ2/BLD.INF.in2
-rw-r--r--backends/platform/symbian/UIQ3/BLD.INF.in4
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in2
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in2
78 files changed, 773 insertions, 773 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 449d27561e..dcc4e37458 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -1330,7 +1330,7 @@ static void ScummVM_enableZoning(JNIEnv* env, jobject self, jboolean enable) {
static void ScummVM_setSurfaceSize(JNIEnv* env, jobject self,
jint width, jint height) {
OSystem_Android* cpp_obj = OSystem_Android::fromJavaObject(env, self);
- cpp_obj->setSurfaceSize(width, height);
+ cpp_obj->setSurfaceSize(width, height);
}
const static JNINativeMethod gMethods[] = {
diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp
index 0d9b931d2c..8fd12d66bf 100644
--- a/backends/platform/dc/selector.cpp
+++ b/backends/platform/dc/selector.cpp
@@ -272,7 +272,7 @@ static int findGames(Game *games, int max, bool use_ini)
games[curr_game].dir,
games[curr_game].language,
games[curr_game].platform, games, curr_game)) {
-
+
strcpy(games[curr_game].text, ge->description().c_str());
#if 0
printf("Registered game <%s> (l:%d p:%d) in <%s> <%s> because of <%s> <*>\n",
diff --git a/backends/platform/dingux/README.DINGUX b/backends/platform/dingux/README.DINGUX
index 12289388de..d867e02f03 100644
--- a/backends/platform/dingux/README.DINGUX
+++ b/backends/platform/dingux/README.DINGUX
@@ -21,10 +21,10 @@ Controls
Installation from binaries
==============================
-Mount your dingux SD card in your pc, then copy the directory "scummvm" found in
-the release package to a directory inside /pathtosdcard/local/dirofyourchoice
+Mount your dingux SD card in your pc, then copy the directory "scummvm" found in
+the release package to a directory inside /pathtosdcard/local/dirofyourchoice
(on windows it would be SDLETTER:\local\dirofyourchoice).
-At this point is sufficient to point your launcher (eg. gmenu2x) to scummvm.gpe
+At this point is sufficient to point your launcher (eg. gmenu2x) to scummvm.gpe
file included into the scummvm directory you copied to the SD card, and then launch it.
Building from binaries
@@ -33,7 +33,7 @@ Building from binaries
Kernel and rootfs WARNINGS
==============================
-All the dingux root images (rootfs) i found floating on the net have
+All the dingux root images (rootfs) i found floating on the net have
broken tremor libraries, which make scummvm crash in a bad way.
One solution is to replace the libraries in your rootfs by injecting these fixed ones:
http://hkzlab.ipv7.net/files/misc/dingux/dingux_fixed_tremor_libs.zip
@@ -42,7 +42,7 @@ but this doesn't mean it will work perfectly:
non-opendingux kernels doesn't have lcd double buffering leading to a lot of annoying
tearing on screen.
-The best way to address all the problems in one shot, is to use an opendingux kernel for
+The best way to address all the problems in one shot, is to use an opendingux kernel for
your dingoo, which has some interesting advantages:
- The kernel gets updated and kept in sync with main linux tree
- Double buffering and centering of screen image
@@ -52,16 +52,16 @@ http://hkzlab.ipv7.net/files/misc/dingux/opendingux/opendingux_kernel_rootfs.zip
The kernel and rootfs images in the zip file is what i use for developing scummvm on dingux.
BTW, i have built images for the A330 and A320 with ILI9325 controllers too,
-but these version aren't tested (i have an A320 with ILI9331, but if someone wants to
+but these version aren't tested (i have an A320 with ILI9331, but if someone wants to
donate an A330 to a poor scummvm developer so i can try the port there too... :P)
If you need a launcher with opendingux cpu frequency scaler support, you can find gmenu2x here:
http://www.treewalker.org/dingux/cpufreq.html
-I've also prepared a rootfs image for use on normal dingux kernels (non-opendingux ones).
+I've also prepared a rootfs image for use on normal dingux kernels (non-opendingux ones).
It's based on elta's rootfs image with just the fixed libs replaced.
http://hkzlab.ipv7.net/files/misc/dingux/normal_dingux/rootfs_elta_fixtremor.zip
-I still raccomand the use of opendingux kernel + rootfs, but if you don't, this roofs
+I still raccomand the use of opendingux kernel + rootfs, but if you don't, this roofs
image plus another kernel (eg. SiENcE's one) should be do the job.
Enjoy
diff --git a/backends/platform/dingux/dingux.mk b/backends/platform/dingux/dingux.mk
index 0505dbdfd3..882078fe46 100644
--- a/backends/platform/dingux/dingux.mk
+++ b/backends/platform/dingux/dingux.mk
@@ -15,7 +15,7 @@ dingux-dist: all
$(MKDIR) $(bundle_name)
$(MKDIR) $(bundle_name)/saves
$(STRIP) $(EXECUTABLE) -o $(bundle_name)/scummvm.elf
- $(CP) $(DIST_FILES_THEMES) $(bundle_name)/
+ $(CP) $(DIST_FILES_THEMES) $(bundle_name)/
ifdef DIST_FILES_ENGINEDATA
$(CP) $(DIST_FILES_ENGINEDATA) $(bundle_name)/
endif
diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile
index 42cc6b13c9..bf9fc1d826 100644
--- a/backends/platform/ds/arm9/makefile
+++ b/backends/platform/ds/arm9/makefile
@@ -66,7 +66,7 @@ else
# TODO: Inherit the earth uses so much RAM that I have removed libmad in order to
# claw some back.
-
+
else
ifdef DS_BUILD_I
diff --git a/backends/platform/ds/arm9/source/touchkeyboard.cpp b/backends/platform/ds/arm9/source/touchkeyboard.cpp
index 71f4f93c27..581509f939 100644
--- a/backends/platform/ds/arm9/source/touchkeyboard.cpp
+++ b/backends/platform/ds/arm9/source/touchkeyboard.cpp
@@ -177,7 +177,7 @@ void drawText(int tx, int ty, const char *string, bool highlight) {
baseAddress[ty * 32 + tx + p] = baseValue | tile;
}
}
-
+
}
@@ -292,7 +292,7 @@ void drawAutoComplete() {
// When there's no completions on the bottom of the screen, it acts like a mouse pad
// so this text indicates that
drawText(11, 18, "MOUSE AREA", true);
-
+
} else {
@@ -303,10 +303,10 @@ void drawAutoComplete() {
for (int r = 0; r < autoCompleteCount; r++) {
int y = 12 + (r % 6) * 2;
int x = 0 + ((r / 6) * 16);
-
+
drawText(x, y, autoCompleteWord[r], selectedCompletion == r);
}
-
+
}
}
diff --git a/backends/platform/gp2x/build/README-GP2X b/backends/platform/gp2x/build/README-GP2X
index f95a974230..dc93a9f1c9 100644
--- a/backends/platform/gp2x/build/README-GP2X
+++ b/backends/platform/gp2x/build/README-GP2X
@@ -20,10 +20,10 @@ Contents:
Please refer to the:
-GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14>
-WiKi: <http://wiki.scummvm.org/index.php/GP2X>
+GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14>
+WiKi: <http://wiki.scummvm.org/index.php/GP2X>
-for the most current information on the port and any updates to this
+for the most current information on the port and any updates to this
documentation.
------------------------------------------------------------------------
diff --git a/backends/platform/gp2x/gp2x-bundle.mk b/backends/platform/gp2x/gp2x-bundle.mk
index c6fb72c1c3..67d22d1889 100755
--- a/backends/platform/gp2x/gp2x-bundle.mk
+++ b/backends/platform/gp2x/gp2x-bundle.mk
@@ -6,7 +6,7 @@ gp2x-bundle: $(EXECUTABLE)
$(MKDIR) "$(bundle_name)"
$(MKDIR) "$(bundle_name)/saves"
$(MKDIR) "$(bundle_name)/engine-data"
-
+
echo "Please put your save games in this dir" >> "$(bundle_name)/saves/PUT_SAVES_IN_THIS_DIR"
$(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.gpe $(bundle_name)/
@@ -28,13 +28,13 @@ ifdef DYNAMIC_MODULES
endif
tar -C $(bundle_name) -cvjf $(bundle_name).tar.bz2 .
- rm -R ./$(bundle_name)
+ rm -R ./$(bundle_name)
gp2x-bundle-debug: $(EXECUTABLE)
$(MKDIR) "$(bundle_name)"
$(MKDIR) "$(bundle_name)/saves"
$(MKDIR) "$(bundle_name)/engine-data"
-
+
echo "Please put your save games in this dir" >> "$(bundle_name)/saves/PUT_SAVES_IN_THIS_DIR"
$(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.gpe $(bundle_name)/
@@ -46,15 +46,15 @@ gp2x-bundle-debug: $(EXECUTABLE)
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/engine-data
$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)/
-
+
$(INSTALL) -c -m 777 $(srcdir)/$(EXECUTABLE) $(bundle_name)/$(EXECUTABLE)
ifdef DYNAMIC_MODULES
$(INSTALL) -d "$(bundle_name)/scummvm/plugins"
$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
endif
-
+
tar -C $(bundle_name) -cvjf $(bundle_name)-debug.tar.bz2 .
- rm -R ./$(bundle_name)
+ rm -R ./$(bundle_name)
.PHONY: gp2x-bundle gp2x-bundle-debug
diff --git a/backends/platform/gp2x/gp2x-common.h b/backends/platform/gp2x/gp2x-common.h
index 96d88b8fd4..1c8708a8b1 100644
--- a/backends/platform/gp2x/gp2x-common.h
+++ b/backends/platform/gp2x/gp2x-common.h
@@ -318,7 +318,7 @@ protected:
// Scroll lock state - since SDL doesn't track it
bool _scrollLock;
-
+
// joystick
SDL_Joystick *_joystick;
bool _stickBtn[32];
diff --git a/backends/platform/gph/build/README-GP2XWIZ b/backends/platform/gph/build/README-GP2XWIZ
index ec8142a6f3..269fa901c9 100644
--- a/backends/platform/gph/build/README-GP2XWIZ
+++ b/backends/platform/gph/build/README-GP2XWIZ
@@ -19,10 +19,10 @@ Contents:
Please refer to the:
-GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14>
-WiKi: <http://wiki.scummvm.org/index.php/GP2XWiz>
+GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14>
+WiKi: <http://wiki.scummvm.org/index.php/GP2XWiz>
-for the most current information on the port and any updates to this
+for the most current information on the port and any updates to this
documentation.
------------------------------------------------------------------------
@@ -112,7 +112,7 @@ Fancy button combos:
NOTE: To use button combos press and hold the Left Trigger then...
-Right Trigger: Display Virtual Keyboard
+Right Trigger: Display Virtual Keyboard
Menu: Bring up the Global main menu for ScummVM
Select: Exit ScummVM completely (and gracefully)
diff --git a/backends/platform/gph/build/config.sh b/backends/platform/gph/build/config.sh
index 54c4795298..25c3a83da0 100755
--- a/backends/platform/gph/build/config.sh
+++ b/backends/platform/gph/build/config.sh
@@ -17,6 +17,6 @@ export DEFINES=-DNDEBUG
# Edit the configure line to suit.
cd ../../../..
-./configure --backend=gp2xwiz --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-vkeybd --enable-plugins --default-dynamic
+./configure --backend=gp2xwiz --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-vkeybd --enable-plugins --default-dynamic
echo Generating config for GP2X Wiz complete. Check for errors.
diff --git a/backends/platform/gph/build/scummvm-gdb.gpe b/backends/platform/gph/build/scummvm-gdb.gpe
index 64b6c8b974..f486c288ee 100755
--- a/backends/platform/gph/build/scummvm-gdb.gpe
+++ b/backends/platform/gph/build/scummvm-gdb.gpe
@@ -6,7 +6,7 @@ export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
# Run ScummVM via GDB (so make sure you have a terminal open or serial).
# Oh, and GDB installed of course ;)
-gdb --args ./scummvm.wiz --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc
+gdb --args ./scummvm.wiz --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc
# Sync the SD card to check that everything is written.
sync
diff --git a/backends/platform/gph/build/scummvm.gpe b/backends/platform/gph/build/scummvm.gpe
index 42cc00a22a..2866825e91 100755
--- a/backends/platform/gph/build/scummvm.gpe
+++ b/backends/platform/gph/build/scummvm.gpe
@@ -5,7 +5,7 @@
export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
# Run ScummVM, important this bit.
-./scummvm.wiz --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc
+./scummvm.wiz --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc
# Sync the SD card to check that everything is written.
sync
diff --git a/backends/platform/gph/caanoo-bundle.mk b/backends/platform/gph/caanoo-bundle.mk
index 84b99c5c53..c411310688 100755
--- a/backends/platform/gph/caanoo-bundle.mk
+++ b/backends/platform/gph/caanoo-bundle.mk
@@ -11,14 +11,14 @@ caanoo-bundle: $(EXECUTABLE)
$(MKDIR) "$(bundle_name)/scummvm/saves"
$(MKDIR) "$(bundle_name)/scummvm/engine-data"
$(MKDIR) "$(bundle_name)/scummvm/lib"
-
+
echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
$(CP) $(srcdir)/backends/platform/gph/caanoo/scummvm.gpe $(bundle_name)/scummvm/
$(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
$(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
$(CP) $(srcdir)/backends/platform/gph/build/README-GP2XWIZ $(bundle_name)/scummvm/README-CAANOO
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
@@ -32,9 +32,9 @@ ifdef DYNAMIC_MODULES
$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
$(STRIP) $(bundle_name)/scummvm/plugins/*
endif
-
+
tar -C $(bundle_name) -cvjf $(bundle_name).tar.bz2 .
- rm -R ./$(bundle_name)
+ rm -R ./$(bundle_name)
caanoo-bundle-debug: $(EXECUTABLE)
$(MKDIR) "$(bundle_name)"
@@ -42,14 +42,14 @@ caanoo-bundle-debug: $(EXECUTABLE)
$(MKDIR) "$(bundle_name)/scummvm/saves"
$(MKDIR) "$(bundle_name)/scummvm/engine-data"
$(MKDIR) "$(bundle_name)/scummvm/lib"
-
+
echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
$(CP) $(srcdir)/backends/platform/gph/caanoo/scummvm-gdb.gpe $(bundle_name)/scummvm/scummvm.gpe
$(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
$(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
$(CP) $(srcdir)/backends/platform/gph/build/README-GP2XWIZ $(bundle_name)/scummvm/README-CAANOO
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
@@ -64,6 +64,6 @@ ifdef DYNAMIC_MODULES
endif
tar -C $(bundle_name) -cvjf $(bundle_name)-debug.tar.bz2 .
- rm -R ./$(bundle_name)
+ rm -R ./$(bundle_name)
.PHONY: caanoo-bundle caanoo-bundle-debug
diff --git a/backends/platform/gph/caanoo/config.sh b/backends/platform/gph/caanoo/config.sh
index 73ce5da624..82e3774dbf 100755
--- a/backends/platform/gph/caanoo/config.sh
+++ b/backends/platform/gph/caanoo/config.sh
@@ -11,6 +11,6 @@ export DEFINES=-DNDEBUG
# Edit the configure line to suit.
cd ../../../..
-./configure --backend=caanoo --disable-mt32emu --host=caanoo --disable-alsa --disable-flac --disable-nasm --disable-vorbis --disable-hq-scalers --with-sdl-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr/bin --with-mpeg2-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-tremor --with-tremor-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-zlib --with-zlib-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-mad --with-mad-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-vkeybd --enable-plugins --default-dynamic
+./configure --backend=caanoo --disable-mt32emu --host=caanoo --disable-alsa --disable-flac --disable-nasm --disable-vorbis --disable-hq-scalers --with-sdl-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr/bin --with-mpeg2-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-tremor --with-tremor-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-zlib --with-zlib-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-mad --with-mad-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-vkeybd --enable-plugins --default-dynamic
echo Generating config for GP2X Caanoo complete. Check for errors.
diff --git a/backends/platform/gph/caanoo/scummvm-gdb.gpe b/backends/platform/gph/caanoo/scummvm-gdb.gpe
index a8f2aae0fe..2d776f1bc3 100755
--- a/backends/platform/gph/caanoo/scummvm-gdb.gpe
+++ b/backends/platform/gph/caanoo/scummvm-gdb.gpe
@@ -6,7 +6,7 @@ export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
# Run ScummVM via GDB (so make sure you have a terminal open or serial).
# Oh, and GDB installed of course ;)
-gdb --args ./scummvm.caanoo --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc
+gdb --args ./scummvm.caanoo --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc
# Sync the SD card to check that everything is written.
sync
diff --git a/backends/platform/gph/caanoo/scummvm.gpe b/backends/platform/gph/caanoo/scummvm.gpe
index 8341ffc3d7..52bb7a98cd 100755
--- a/backends/platform/gph/caanoo/scummvm.gpe
+++ b/backends/platform/gph/caanoo/scummvm.gpe
@@ -5,7 +5,7 @@
export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
# Run ScummVM, important this bit.
-./scummvm.caanoo --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc
+./scummvm.caanoo --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc
# Sync the SD card to check that everything is written.
sync
diff --git a/backends/platform/gph/gp2xwiz-bundle.mk b/backends/platform/gph/gp2xwiz-bundle.mk
index 21fd0c74de..5ca6c0a9c7 100755
--- a/backends/platform/gph/gp2xwiz-bundle.mk
+++ b/backends/platform/gph/gp2xwiz-bundle.mk
@@ -11,14 +11,14 @@ gp2xwiz-bundle: $(EXECUTABLE)
$(MKDIR) "$(bundle_name)/scummvm/saves"
$(MKDIR) "$(bundle_name)/scummvm/engine-data"
$(MKDIR) "$(bundle_name)/scummvm/lib"
-
+
echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
$(CP) $(srcdir)/backends/platform/gph/build/scummvm.gpe $(bundle_name)/scummvm/
$(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
$(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
$(CP) $(srcdir)/backends/platform/gph/build/README-GP2XWIZ $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
@@ -32,12 +32,12 @@ ifdef DYNAMIC_MODULES
$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
$(STRIP) $(bundle_name)/scummvm/plugins/*
endif
-
+
$(CP) $(libloc)/../lib/libz.so.1.2.3 $(bundle_name)/scummvm/lib/libz.so.1
$(CP) $(libloc)/../lib/libvorbisidec.so.1.0.2 $(bundle_name)/scummvm/lib/libvorbisidec.so.1
tar -C $(bundle_name) -cvjf $(bundle_name).tar.bz2 .
- rm -R ./$(bundle_name)
+ rm -R ./$(bundle_name)
gp2xwiz-bundle-debug: $(EXECUTABLE)
$(MKDIR) "$(bundle_name)"
@@ -45,14 +45,14 @@ gp2xwiz-bundle-debug: $(EXECUTABLE)
$(MKDIR) "$(bundle_name)/scummvm/saves"
$(MKDIR) "$(bundle_name)/scummvm/engine-data"
$(MKDIR) "$(bundle_name)/scummvm/lib"
-
+
echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
$(CP) $(srcdir)/backends/platform/gph/build/scummvm-gdb.gpe $(bundle_name)/scummvm/scummvm.gpe
$(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
$(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
$(CP) $(srcdir)/backends/platform/gph/build/README-GP2XWIZ $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
@@ -65,11 +65,11 @@ ifdef DYNAMIC_MODULES
$(INSTALL) -d "$(bundle_name)/scummvm/plugins"
$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
endif
-
+
$(CP) $(libloc)/../lib/libz.so.1.2.3 $(bundle_name)/scummvm/lib/libz.so.1
$(CP) $(libloc)/../lib/libvorbisidec.so.1.0.2 $(bundle_name)/scummvm/lib/libvorbisidec.so.1
tar -C $(bundle_name) -cvjf $(bundle_name)-debug.tar.bz2 .
- rm -R ./$(bundle_name)
+ rm -R ./$(bundle_name)
.PHONY: gp2xwiz-bundle gp2xwiz-bundle-debug
diff --git a/backends/platform/iphone/iphone_main.m b/backends/platform/iphone/iphone_main.m
index 5a5ec95090..1fb2cc3788 100644
--- a/backends/platform/iphone/iphone_main.m
+++ b/backends/platform/iphone/iphone_main.m
@@ -122,7 +122,7 @@ int main(int argc, char** argv) {
- (void)applicationResume:(struct __GSEvent *)event {
[_view applicationResume];
-
+
// Workaround, need to "hide" and unhide the statusbar to properly remove it,
// since the Springboard has put it back without apparently flagging our application.
[self setStatusBarHidden:YES animated:YES];
diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m
index 9704b302fb..821d3de634 100644
--- a/backends/platform/iphone/iphone_video.m
+++ b/backends/platform/iphone/iphone_video.m
@@ -233,7 +233,7 @@ bool getLocalMouseCoords(CGPoint *point) {
if (_screenTexture)
free(_textureBuffer);
-
+
free(_overlayTexBuffer);
}
@@ -265,9 +265,9 @@ bool getLocalMouseCoords(CGPoint *point) {
}
[self updateMainSurface];
-
+
if (_overlayIsEnabled) {
- [self updateOverlaySurface];
+ [self updateOverlaySurface];
[self updateMouseSurface];
}
@@ -350,7 +350,7 @@ bool getLocalMouseCoords(CGPoint *point) {
}
- (void)updateMouseSurface {
-
+
int width = _mouseCursorWidth / (float)_backingWidth * _backingHeight;
int height = _mouseCursorHeight / (float)_backingHeight * _backingWidth;
@@ -378,7 +378,7 @@ bool getLocalMouseCoords(CGPoint *point) {
glBindTexture(GL_TEXTURE_2D, _mouseCursorTexture); printOpenGLError();
glEnable(GL_BLEND);
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); printOpenGLError();
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); printOpenGLError();
}
- (void)initSurface {
diff --git a/backends/platform/iphone/osys_events.cpp b/backends/platform/iphone/osys_events.cpp
index f1e3b9ba62..22f529dfac 100644
--- a/backends/platform/iphone/osys_events.cpp
+++ b/backends/platform/iphone/osys_events.cpp
@@ -74,7 +74,7 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
y = (int)((1.0 - xUnit) * _overlayHeight);
} else {
x = (int)(yUnit * _screenWidth);
- y = (int)((1.0 - xUnit) * _screenHeight);
+ y = (int)((1.0 - xUnit) * _screenHeight);
}
break;
case kScreenOrientationFlippedLandscape:
@@ -279,7 +279,7 @@ bool OSystem_IPHONE::handleEvent_mouseDragged(Common::Event &event, int x, int y
int widthCap = _overlayVisible ? _overlayWidth : _screenWidth;
int heightCap = _overlayVisible ? _overlayHeight : _screenHeight;
-
+
if (mouseNewPosX < 0)
mouseNewPosX = 0;
else if (mouseNewPosX > widthCap)
diff --git a/backends/platform/iphone/osys_video.cpp b/backends/platform/iphone/osys_video.cpp
index 18acb77524..d30a412a9f 100644
--- a/backends/platform/iphone/osys_video.cpp
+++ b/backends/platform/iphone/osys_video.cpp
@@ -266,7 +266,7 @@ void OSystem_IPHONE::drawDirtyRect(const Common::Rect& dirtyRect) {
void OSystem_IPHONE::drawDirtyOverlayRect(const Common::Rect& dirtyRect) {
// int h = dirtyRect.bottom - dirtyRect.top;
- //
+ //
// uint16 *src = (uint16 *)&_overlayBuffer[dirtyRect.top * _screenWidth + dirtyRect.left];
// uint16 *dst = &_fullscreen[dirtyRect.top * _screenWidth + dirtyRect.left];
// int x = (dirtyRect.right - dirtyRect.left) * 2;
@@ -275,7 +275,7 @@ void OSystem_IPHONE::drawDirtyOverlayRect(const Common::Rect& dirtyRect) {
// src += _screenWidth;
// dst += _screenWidth;
// }
- iPhone_updateOverlayRect(_overlayBuffer, dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom );
+ iPhone_updateOverlayRect(_overlayBuffer, dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom);
}
void OSystem_IPHONE::drawMouseCursorOnRectUpdate(const Common::Rect& updatedRect, const Common::Rect& mouseRect) {
diff --git a/backends/platform/linuxmoto/linuxmoto-events.cpp b/backends/platform/linuxmoto/linuxmoto-events.cpp
index 379e34b7ac..eb1bbc9394 100644
--- a/backends/platform/linuxmoto/linuxmoto-events.cpp
+++ b/backends/platform/linuxmoto/linuxmoto-events.cpp
@@ -128,7 +128,7 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) {
// VirtualKeyboard - Right Soft key
else if (ev.key.keysym.sym == SDLK_F11) {
ev.key.keysym.sym = SDLK_F7;
- }
+ }
#endif
// Joystick to Mouse
diff --git a/backends/platform/n64/Makefile b/backends/platform/n64/Makefile
index f80aa29262..cffe277312 100644
--- a/backends/platform/n64/Makefile
+++ b/backends/platform/n64/Makefile
@@ -15,7 +15,7 @@ AR = $(GCCN64PREFIX)ar cru
RANLIB = $(GCCN64PREFIX)ranlib
DEFINES += -D__N64__ -DLIMIT_FPS -DNONSTANDARD_PORT -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_FANCY_THEMES -DDISABLE_DOSBOX_OPL -DENABLE_VKEYBD -DUSE_ZLIB
-LIBS += -lpakfs -lframfs -ln64 -ln64utils -lromfs
+LIBS += -lpakfs -lframfs -ln64 -ln64utils -lromfs
#DEFINES += -D_ENABLE_DEBUG_
@@ -31,7 +31,7 @@ DEFINES += -DUSE_VORBIS -DUSE_TREMOR
LIBS += -lvorbisidec
endif
-LIBS += -lm -lstdc++ -lc -lgcc -lz -lnosys
+LIBS += -lm -lstdc++ -lc -lgcc -lz -lnosys
CXXFLAGS = -g -mno-extern-sdata -O2 --param max-inline-insns-auto=20 -fomit-frame-pointer -march=vr4300 -mtune=vr4300 -mhard-float -fno-rtti -fno-exceptions -Wno-multichar -Wshadow -I$(LIBN64PATH) -I$(TOOLPATH)/include -I./ -I$(srcdir) -I$(srcdir)/engines
LDFLAGS = -g -march=vr4300 -mtune=vr4300 -nodefaultlibs -nostartfiles -mno-crt0 -L$(LIBN64PATH) -L$(TOOLPATH)/lib $(LIBS) -T n64ld_cpp.x -Xlinker -Map -Xlinker scummvm.map
diff --git a/backends/platform/n64/README.N64 b/backends/platform/n64/README.N64
index c6ae6f021e..b47b239658 100644
--- a/backends/platform/n64/README.N64
+++ b/backends/platform/n64/README.N64
@@ -97,15 +97,15 @@ A - '.' / Skip dialogues in some games
C buttons - Numeric keypad keys
* Using a N64 Mouse:
-Used like a normal PC mouse.
+Used like a normal PC mouse.
Notes
=====
-- If virtual keyboard doesn't show up, you need to make sure you included
+- If virtual keyboard doesn't show up, you need to make sure you included
'vkeybd_default.zip' in the root of your romfs image.
-- In some games (mostly gob) cursor movement might be choppy, it's a known
+- In some games (mostly gob) cursor movement might be choppy, it's a known
problem and related on how N64 port manages screen updates.
diff --git a/backends/platform/n64/module.mk b/backends/platform/n64/module.mk
index 429b63802e..c8ceb32701 100644
--- a/backends/platform/n64/module.mk
+++ b/backends/platform/n64/module.mk
@@ -6,7 +6,7 @@ MODULE_OBJS := \
osys_n64_events.o \
osys_n64_utilities.o \
pakfs_save_manager.o \
- framfs_save_manager.o
+ framfs_save_manager.o
# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 5288ddbfce..8862693138 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -859,7 +859,7 @@ void OSystem_N64::getTimeAndDate(TimeDate &t) const {
// No RTC inside the N64, read mips timer to simulate
// passing of time, not a perfect solution, but can't think
// of anything better.
-
+
uint32 now = getMilliTick();
t.tm_sec = (now / 1000) % 60;
diff --git a/backends/platform/openpandora/build/PXML.xml b/backends/platform/openpandora/build/PXML.xml
index 57299a6cbd..f4d2e2a595 100755
--- a/backends/platform/openpandora/build/PXML.xml
+++ b/backends/platform/openpandora/build/PXML.xml
@@ -4,7 +4,7 @@
<application id="scummvm.djwillis.0001" appdata="scummvm">
<title lang="en_US">ScummVM</title>
-
+
<exec command="./runscummvm.sh"/>
<icon src="icon/scummvm.png"/>
@@ -13,20 +13,20 @@
</previewpics>
<info name="ScummVM Documentation" type="text/html" src="docs/index.html"/>
-
+
<description lang="en_US">Point & click game interpreter.</description>
-
+
<author name="DJWillis" website="http://www.scummvm.org/"/>
-
+
<version major="1" minor="1" release="1" build="1"/><!--This programs version-->
<osversion major="1" minor="0" release="0" build="0"/><!--The minimum OS version required-->
-
+
<categories>
<category name="Game"><!--category like "Games", "Graphics", "Internet" etc-->
<subcategory name="Adventure Games"/><!--subcategory, like "Board Games", "Strategy", "First Person Shooters"-->
</category>
</categories>
-
+
<clockspeed frequency="500"/><!--Frequency in Hz-->
</application>
diff --git a/backends/platform/openpandora/build/README-OPENPANDORA b/backends/platform/openpandora/build/README-OPENPANDORA
index 18bfd3be21..c909ed56a6 100755
--- a/backends/platform/openpandora/build/README-OPENPANDORA
+++ b/backends/platform/openpandora/build/README-OPENPANDORA
@@ -19,10 +19,10 @@ Contents:
Please refer to the:
-ScummVM Forum: <http://forums.scummvm.org/>
-WiKi: <http://wiki.scummvm.org/index.php/OpenPandora>
+ScummVM Forum: <http://forums.scummvm.org/>
+WiKi: <http://wiki.scummvm.org/index.php/OpenPandora>
-for the most current information on the port and any updates to this
+for the most current information on the port and any updates to this
documentation.
------------------------------------------------------------------------
@@ -112,7 +112,7 @@ Fancy button combos:
NOTE: To use button combos press and hold the Left Trigger then...
-Right Trigger: Display Virtual Keyboard
+Right Trigger: Display Virtual Keyboard
Menu: Bring up the Global main menu for ScummVM
Select: Exit ScummVM completely (and gracefully)
diff --git a/backends/platform/openpandora/build/README-PND.txt b/backends/platform/openpandora/build/README-PND.txt
index 38b22fc38d..942c3a43e2 100755
--- a/backends/platform/openpandora/build/README-PND.txt
+++ b/backends/platform/openpandora/build/README-PND.txt
@@ -3,16 +3,16 @@ ScummVM - OPENPANDORA README - HOW TO INSTALL
Please refer to the:
-ScummVM Forum: <http://forums.scummvm.org/>
-WiKi: <http://wiki.scummvm.org/index.php/OpenPandora>
+ScummVM Forum: <http://forums.scummvm.org/>
+WiKi: <http://wiki.scummvm.org/index.php/OpenPandora>
-for the most current information on the port and any updates to this
+for the most current information on the port and any updates to this
documentation.
------------------------------------------------------------------------
Installing:
-This archive contains ScummVM in a PND format ready to be copied to the
+This archive contains ScummVM in a PND format ready to be copied to the
OpenPandora and used.
To install just copy the .pnd file from this archive to your device.
@@ -20,13 +20,13 @@ To install just copy the .pnd file from this archive to your device.
You will need to place the .pnd file in a suitable location on your SD
card.
-/pandora/desktop <- place here if you wish the icon to show on the
+/pandora/desktop <- place here if you wish the icon to show on the
desktop. Documentation will show in the menu.
-/pandora/menu <- place here if you wish the icon to show on the
+/pandora/menu <- place here if you wish the icon to show on the
Xfce menu. Documentation will show in the menu.
-/pandora/apps <- place here if you wish the icon to show on the
+/pandora/apps <- place here if you wish the icon to show on the
desktop and in the menu. Documentation will show
in the menu.
diff --git a/backends/platform/openpandora/build/pnd_make.sh b/backends/platform/openpandora/build/pnd_make.sh
index dcdcaceecd..b19de87bb4 100755
--- a/backends/platform/openpandora/build/pnd_make.sh
+++ b/backends/platform/openpandora/build/pnd_make.sh
@@ -1,11 +1,11 @@
#!/bin/sh
-
+
######adjust path of genpxml.sh if you want to use that "feture"#####
-
+
TEMP=`getopt -o p:d:x:i:c -- "$@"`
-
+
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
-
+
eval set -- "$TEMP"
while true ; do
case "$1" in
@@ -18,25 +18,25 @@ while true ; do
*) echo "Error while parsing arguments! $2" ; exit 1 ;;
esac
done
-
+
rnd=$RANDOM; # random number for genpxml and index$rnd.xml
-
+
#generate pxml if guess or empty
if [ ! $PXML ] || [ $PXML = "guess" ] && [ $PNDNAME ] && [ $FOLDER ]; then
PXMLtxt=$(/home/user/libpnd/pandora-libraries/testdata/scripts/genpxml.sh $FOLDER $ICON)
PXML=$FOLDER/PXML.xml
echo "$PXMLtxt" > $FOLDER/PXML.xml
fi
-
+
#check arguments
if [ ! $PNDNAME ] || [ ! $FOLDER ] || [ ! $PXML ]; then
- echo " Usage: pnd_make.sh -p your.pnd -d folder/containing/your/app/ -x
+ echo " Usage: pnd_make.sh -p your.pnd -d folder/containing/your/app/ -x
your.pxml (or \"guess\" to try to generate it from the folder) -i icon.png"
exit 1
fi
if [ ! -d $FOLDER ]; then echo "$FOLDER doesnt exist"; exit 1; fi #check if folder actually exists
if [ ! -f $PXML ]; then echo "$PXML doesnt exist"; exit 1; fi #check if pxml actually exists
-
+
#make iso from folder
if [ ! $SQUASH ]; then
mkisofs -o $PNDNAME.iso -R $FOLDER
@@ -45,12 +45,12 @@ else
echo "your squashfs version is older then version 4, please upgrade to 4.0 or later"
exit 1
fi
- mksquashfs -no-recovery -nopad $FOLDER $PNDNAME.iso
+ mksquashfs -no-recovery -nopad $FOLDER $PNDNAME.iso
fi
#append pxml to iso
cat $PNDNAME.iso $PXML > $PNDNAME
rm $PNDNAME.iso #cleanup
-
+
#append icon if specified
if [ $ICON ]; then # check if we want to add an icon
if [ ! -f $ICON ]; then #does the icon actually exist?
@@ -61,5 +61,5 @@ if [ $ICON ]; then # check if we want to add an icon
rm $PNDNAME.tmp #cleanup
fi
fi
-
+
if [ $PXML = "guess" ];then rm $FOLDER/PXML.xml; fi #cleanup
diff --git a/backends/platform/openpandora/module.mk b/backends/platform/openpandora/module.mk
index c8a4b1b32d..867908c840 100755
--- a/backends/platform/openpandora/module.mk
+++ b/backends/platform/openpandora/module.mk
@@ -6,10 +6,10 @@ MODULE_OBJS := \
op-main.o
MODULE_DIRS += \
- backends/platform/openpandora/
+ backends/platform/openpandora/
# We don't use the rules.mk here on purpose
OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
# Hack to ensure the SDL backend is built so we can use OSystem_SDL.
--include $(srcdir)/backends/platform/sdl/module.mk \ No newline at end of file
+-include $(srcdir)/backends/platform/sdl/module.mk
diff --git a/backends/platform/openpandora/op-bundle.mk b/backends/platform/openpandora/op-bundle.mk
index a08d64a643..163f4711ce 100755
--- a/backends/platform/openpandora/op-bundle.mk
+++ b/backends/platform/openpandora/op-bundle.mk
@@ -22,10 +22,10 @@ op-bundle: $(EXECUTABLE)
$(CP) $(srcdir)/backends/platform/openpandora/build/README-OPENPANDORA $(bundle_name)/scummvm/docs/
- $(CP) $(srcdir)/backends/platform/openpandora/build/index.html $(bundle_name)/scummvm/docs/
+ $(CP) $(srcdir)/backends/platform/openpandora/build/index.html $(bundle_name)/scummvm/docs/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/docs/
-
+
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/data/
$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/scummvm/data/
@@ -36,10 +36,10 @@ ifdef DYNAMIC_MODULES
$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
$(STRIP) $(bundle_name)/scummvm/plugins/*
endif
-
+
$(CP) $(libloc)/../arm-angstrom-linux-gnueabi/usr/lib/libFLAC.so.8.2.0 $(bundle_name)/scummvm/lib/libFLAC.so.8
tar -C $(bundle_name) -cvjf $(bundle_name).tar.bz2 .
- rm -R ./$(bundle_name)
+ rm -R ./$(bundle_name)
op-pnd: $(EXECUTABLE)
$(MKDIR) "$(bundle_name)"
@@ -58,10 +58,10 @@ op-pnd: $(EXECUTABLE)
$(CP) $(srcdir)/backends/platform/openpandora/build/README-OPENPANDORA $(bundle_name)/scummvm/docs/
- $(CP) $(srcdir)/backends/platform/openpandora/build/index.html $(bundle_name)/scummvm/docs/
+ $(CP) $(srcdir)/backends/platform/openpandora/build/index.html $(bundle_name)/scummvm/docs/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/docs/
-
+
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/data/
$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/scummvm/data/
@@ -72,14 +72,14 @@ ifdef DYNAMIC_MODULES
$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
$(STRIP) $(bundle_name)/scummvm/plugins/*
endif
-
+
$(CP) $(libloc)/../arm-angstrom-linux-gnueabi/usr/lib/libFLAC.so.8.2.0 $(bundle_name)/scummvm/lib/libFLAC.so.8
-
+
$(srcdir)/backends/platform/openpandora/build/pnd_make.sh -p $(bundle_name).pnd -d $(bundle_name)/scummvm -x $(bundle_name)/scummvm/data/PXML.xml -i $(bundle_name)/scummvm/icon/scummvm.png
-
- $(CP) $(srcdir)/backends/platform/openpandora/build/README-PND.txt $(bundle_name)
+
+ $(CP) $(srcdir)/backends/platform/openpandora/build/README-PND.txt $(bundle_name)
tar -cvjf $(bundle_name)-pnd.tar.bz2 $(bundle_name).pnd $(bundle_name)/README-PND.txt
- rm -R ./$(bundle_name)
+ rm -R ./$(bundle_name)
# rm $(bundle_name).pnd
.PHONY: op-bundle op-pnd
diff --git a/backends/platform/ps2/Makefile.gdb b/backends/platform/ps2/Makefile.gdb
index 53646a9546..48dcebc1d4 100644
--- a/backends/platform/ps2/Makefile.gdb
+++ b/backends/platform/ps2/Makefile.gdb
@@ -51,7 +51,7 @@ INCDIR = ../../../
DEFINES = -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__ -D__PS2_DEBUG__ -g -Wall -Wno-multichar
-INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS))
+INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS))
INCLUDES += -I $(PS2GDB)/ee -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines
TARGET = elf/scummvm.elf
@@ -72,16 +72,16 @@ OBJS := backends/platform/ps2/DmaPipe.o \
backends/platform/ps2/ps2mutex.o \
backends/platform/ps2/ps2time.o \
backends/platform/ps2/ps2debug.o
-
+
MODULE_DIRS += .
BACKEND := ps2
include $(srcdir)/Makefile.common
-LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile
+LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile
LDFLAGS += -L $(PS2GDB)/lib -L $(PS2SDK)/ee/lib -L .
-LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS))
+LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS))
LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lps2gdbStub -lps2ip -ldebug -lkernel -lstdc++
all: $(TARGET)
diff --git a/backends/platform/ps2/Makefile.ps2 b/backends/platform/ps2/Makefile.ps2
index d2a8d210e4..472ba5ec3a 100644
--- a/backends/platform/ps2/Makefile.ps2
+++ b/backends/platform/ps2/Makefile.ps2
@@ -51,7 +51,7 @@ INCDIR = ../../../
DEFINES = -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__ -O2 -Wall -Wno-multichar
-INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS))
+INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS))
INCLUDES += -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines
TARGET = elf/scummvm.elf
@@ -72,18 +72,18 @@ OBJS := backends/platform/ps2/DmaPipe.o \
backends/platform/ps2/ps2mutex.o \
backends/platform/ps2/ps2time.o \
backends/platform/ps2/ps2debug.o
-
+
MODULE_DIRS += .
BACKEND := ps2
include $(srcdir)/Makefile.common
-LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile
+LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile
LDFLAGS += -L $(PS2SDK)/ee/lib -L .
-LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS))
-LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lkernel -lstdc++
-LDFLAGS += -s
+LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS))
+LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lkernel -lstdc++
+LDFLAGS += -s
all: $(TARGET)
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst b/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst
index d3ed3b0442..eb85e04462 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst
@@ -24,10 +24,10 @@ I_DelDrv
iomanX_IMPORTS_end
sifcmd_IMPORTS_start
-I_sceSifInitRpc
-I_sceSifSetRpcQueue
-I_sceSifRegisterRpc
-I_sceSifRpcLoop
+I_sceSifInitRpc
+I_sceSifSetRpcQueue
+I_sceSifRegisterRpc
+I_sceSifRpcLoop
sifcmd_IMPORTS_end
stdio_IMPORTS_start
@@ -59,7 +59,7 @@ thbase_IMPORTS_start
I_CreateThread
I_StartThread
I_GetThreadId
-I_DelayThread
+I_DelayThread
thbase_IMPORTS_end
diff --git a/backends/platform/psp/Makefile b/backends/platform/psp/Makefile
index b9a2b45013..7f9ae153eb 100644
--- a/backends/platform/psp/Makefile
+++ b/backends/platform/psp/Makefile
@@ -200,4 +200,4 @@ SCEkxploit: $(TARGET).elf $(PSP_EBOOT_SFO)
$(PACK_PBP) "%__SCE__$(TARGET)/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_PIC0) $(PSP_EBOOT_PIC1) \
$(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
-
+
diff --git a/backends/platform/psp/README.PSP b/backends/platform/psp/README.PSP
index fc49f3fd60..0849d68c78 100644
--- a/backends/platform/psp/README.PSP
+++ b/backends/platform/psp/README.PSP
@@ -32,9 +32,9 @@ Right trigger - Input letters: lowercase/uppercase (press to toggle)
Left trigger - Input numbers/symbols (press to toggle)
D-Pad - Select square of characters (up, down, left or right)
Buttons/Triggers - Choose a specific character in the square. The four center characters are chosen
- by the button in the corresponding position. The 2 top characters are chosen by the
+ by the button in the corresponding position. The 2 top characters are chosen by the
triggers.
-Analog - Moves in a direction (left/right/up/down) (Useful to keep moving
+Analog - Moves in a direction (left/right/up/down) (Useful to keep moving
while typing in AGI games among other things)
1st Person Game Mode (Can be ignored by most users)
@@ -49,9 +49,9 @@ Square - Is the modifier key instead of Right Trigger.
Left/Right Trigger - Strafe left/right
D-Pad Left/Right - Turn left/right
Square + D-Pad - F1/F2/F3/F4
-Square + Start - Esc (shows game menu)
+Square + Start - Esc (shows game menu)
+
-
Notes
=====
- Notice that you can switch between games! This is much faster than quitting
@@ -61,7 +61,7 @@ Notes
- The PSP version of ScummVM uses the Media Engine to accelerate decoding of MP3 files. This means
that if you have the choice of compressing using Ogg files or MP3 files, choose MP3 -- the game
will generally run faster.
-
+
- Plugin files are NOT interchangeable between ScummVM versions! You must copy ALL the
plugin files that come with every version of ScummVM. They sit in the /plugin
subdirectory. If you get a crash upon startup, try deleting all the existing
@@ -85,7 +85,7 @@ A: A PSP that can run homebrew and the necessary datafiles for the game you wan
Q: Can I run game X with this?
A: You can find the list of supported games on the compatibility page
at http://www.scummvm.org
- Note that ScummVM is NOT an emulator. The supported games engines have been painstakingly rewritten.
+ Note that ScummVM is NOT an emulator. The supported games engines have been painstakingly rewritten.
It's not easy to add support for a game you want that currently isn't supported.
Q: My Monkey Island 1 doesn't have any music, what gives?
@@ -128,7 +128,7 @@ To build ScummVM for PSP you need:
(*) = optional
Once you've installed these libraries (read their README.PSP for instructions),
-create a subdirectory in your ScummVM folder called 'builds/psp'. Then, in this folder, type
+create a subdirectory in your ScummVM folder called 'builds/psp'. Then, in this folder, type
'../../configure --host=psp --enable-plugins --default-dynamic'. If everything is installed
correctly, ScummVM will inform you as it finds the right components. Finally type 'make' to build.
diff --git a/backends/platform/psp/README.PSP.in b/backends/platform/psp/README.PSP.in
index 1d48780d3c..57058abd85 100644
--- a/backends/platform/psp/README.PSP.in
+++ b/backends/platform/psp/README.PSP.in
@@ -32,9 +32,9 @@ Right trigger - Input letters: lowercase/uppercase (press to toggle)
Left trigger - Input numbers/symbols (press to toggle)
D-Pad - Select square of characters (up, down, left or right)
Buttons/Triggers - Choose a specific character in the square. The four center characters are chosen
- by the button in the corresponding position. The 2 top characters are chosen by the
+ by the button in the corresponding position. The 2 top characters are chosen by the
triggers.
-Analog - Moves in a direction (left/right/up/down) (Useful to keep moving
+Analog - Moves in a direction (left/right/up/down) (Useful to keep moving
while typing in AGI games among other things)
1st Person Game Mode (Can be ignored by most users)
@@ -49,9 +49,9 @@ Square - Is the modifier key instead of Right Trigger.
Left/Right Trigger - Strafe left/right
D-Pad Left/Right - Turn left/right
Square + D-Pad - F1/F2/F3/F4
-Square + Start - Esc (shows game menu)
+Square + Start - Esc (shows game menu)
+
-
Notes
=====
- Notice that you can switch between games! This is much faster than quitting
@@ -61,7 +61,7 @@ Notes
- The PSP version of ScummVM uses the Media Engine to accelerate decoding of MP3 files. This means
that if you have the choice of compressing using Ogg files or MP3 files, choose MP3 -- the game
will generally run faster.
-
+
- Plugin files are NOT interchangeable between ScummVM versions! You must copy ALL the
plugin files that come with every version of ScummVM. They sit in the /plugin
subdirectory. If you get a crash upon startup, try deleting all the existing
@@ -85,7 +85,7 @@ A: A PSP that can run homebrew and the necessary datafiles for the game you wan
Q: Can I run game X with this?
A: You can find the list of supported games on the compatibility page
at http://www.scummvm.org
- Note that ScummVM is NOT an emulator. The supported games engines have been painstakingly rewritten.
+ Note that ScummVM is NOT an emulator. The supported games engines have been painstakingly rewritten.
It's not easy to add support for a game you want that currently isn't supported.
Q: My Monkey Island 1 doesn't have any music, what gives?
@@ -128,7 +128,7 @@ To build ScummVM for PSP you need:
(*) = optional
Once you've installed these libraries (read their README.PSP for instructions),
-create a subdirectory in your ScummVM folder called 'builds/psp'. Then, in this folder, type
+create a subdirectory in your ScummVM folder called 'builds/psp'. Then, in this folder, type
'../../configure --host=psp --enable-plugins --default-dynamic'. If everything is installed
correctly, ScummVM will inform you as it finds the right components. Finally type 'make' to build.
diff --git a/backends/platform/psp/audio.cpp b/backends/platform/psp/audio.cpp
index e540733162..d7487b0c1a 100644
--- a/backends/platform/psp/audio.cpp
+++ b/backends/platform/psp/audio.cpp
@@ -23,10 +23,10 @@
*
*/
-#include <pspthreadman.h>
+#include <pspthreadman.h>
#include <pspaudio.h>
-
-#include "common/scummsys.h"
+
+#include "common/scummsys.h"
#include "backends/platform/psp/audio.h"
//#define __PSP_DEBUG_FUNCS__ /* For debugging function calls */
@@ -39,37 +39,37 @@ bool PspAudio::open(uint32 freq, uint32 numOfChannels, uint32 numOfSamples, call
if (_init) {
PSP_ERROR("audio device already initialized\n");
return true;
- }
+ }
- PSP_DEBUG_PRINT("freq[%d], numOfChannels[%d], numOfSamples[%d], callback[%p], userData[%x]\n",
+ PSP_DEBUG_PRINT("freq[%d], numOfChannels[%d], numOfSamples[%d], callback[%p], userData[%x]\n",
freq, numOfChannels, numOfSamples, callback, (uint32)userData);
-
+
numOfSamples = PSP_AUDIO_SAMPLE_ALIGN(numOfSamples);
uint32 bufLen = numOfSamples * numOfChannels * NUM_BUFFERS * sizeof(uint16);
-
+
PSP_DEBUG_PRINT("total buffer size[%d]\n", bufLen);
-
+
_buffers[0] = (byte *)memalign(64, bufLen);
if (!_buffers[0]) {
PSP_ERROR("failed to allocate memory for audio buffers\n");
return false;
}
memset(_buffers[0], 0, bufLen); // clean the buffer
-
+
// Fill in the rest of the buffer pointers
byte *pBuffer = _buffers[0];
for (int i = 1; i < NUM_BUFFERS; i++) {
pBuffer += numOfSamples * numOfChannels * sizeof(uint16);
_buffers[i] = pBuffer;
}
-
+
// Reserve a HW channel for our audio
_pspChannel = sceAudioChReserve(PSP_AUDIO_NEXT_CHANNEL, numOfSamples, numOfChannels == 2 ? PSP_AUDIO_FORMAT_STEREO : PSP_AUDIO_FORMAT_MONO);
if (_pspChannel < 0) {
PSP_ERROR("failed to reserve audio channel\n");
return false;
}
-
+
PSP_DEBUG_PRINT("reserved channel[%d] for audio\n", _pspChannel);
// Save our data
@@ -80,17 +80,17 @@ bool PspAudio::open(uint32 freq, uint32 numOfChannels, uint32 numOfSamples, call
_userData = userData;
_bufferToFill = 0;
_bufferToPlay = 0;
-
+
_init = true;
_paused = true; // start in paused mode
-
+
threadCreateAndStart("audioThread", PRIORITY_AUDIO_THREAD, STACK_AUDIO_THREAD); // start the consumer thread
-
+
return true;
}
// The real thread function
-void PspAudio::threadFunction() {
+void PspAudio::threadFunction() {
assert(_callback);
PSP_DEBUG_PRINT_FUNC("audio thread started\n");
@@ -108,12 +108,12 @@ void PspAudio::threadFunction() {
PSP_DEBUG_PRINT("filling buffer[%d]\n", _bufferToFill);
_callback(_userData, _buffers[_bufferToFill], _bufferSize); // ask mixer to fill in data
nextBuffer(_bufferToFill);
-
+
PSP_DEBUG_PRINT("playing buffer[%d].\n", _bufferToPlay);
playBuffer();
nextBuffer(_bufferToPlay);
} // while _init
-
+
// destroy everything
free(_buffers[0]);
sceAudioChRelease(_pspChannel);
@@ -136,7 +136,7 @@ inline bool PspAudio::playBuffer() {
ret = sceAudioOutputBlocking(_pspChannel, PSP_AUDIO_VOLUME_MAX, _buffers[_bufferToPlay]);
else
ret = sceAudioOutputPannedBlocking(_pspChannel, PSP_AUDIO_VOLUME_MAX, PSP_AUDIO_VOLUME_MAX, _buffers[_bufferToPlay]);
-
+
if (ret < 0) {
PSP_ERROR("failed to output audio. Error[%d]\n", ret);
return false;
@@ -146,5 +146,5 @@ inline bool PspAudio::playBuffer() {
void PspAudio::close() {
PSP_DEBUG_PRINT("close has been called ***************\n");
- _init = false;
+ _init = false;
}
diff --git a/backends/platform/psp/audio.h b/backends/platform/psp/audio.h
index eeba598fed..ec9801185f 100644
--- a/backends/platform/psp/audio.h
+++ b/backends/platform/psp/audio.h
@@ -35,9 +35,9 @@ public:
FREQUENCY = 44100 /* only frequency we allow */
};
typedef void (* callbackFunc)(void *userData, byte *samples, int len); // audio callback to call
- PspAudio() : _pspChannel(0),
- _numOfChannels(0), _numOfSamples(0), _callback(0),
- _bufferToPlay(0), _bufferToFill(0),
+ PspAudio() : _pspChannel(0),
+ _numOfChannels(0), _numOfSamples(0), _callback(0),
+ _bufferToPlay(0), _bufferToFill(0),
_init(false), _paused(true) {
for (int i=0; i<NUM_BUFFERS; i++)
_buffers[i] = 0;
@@ -51,7 +51,7 @@ public:
void pause() { _paused = true; }
void unpause() { _paused = false; }
virtual void threadFunction(); // actual audio thread
-
+
private:
int _pspChannel; // chosen hardware output channel
uint32 _numOfChannels; // 1 for mono; 2 for stereo
diff --git a/backends/platform/psp/display_client.cpp b/backends/platform/psp/display_client.cpp
index 6cec6ad231..916b6c1aae 100644
--- a/backends/platform/psp/display_client.cpp
+++ b/backends/platform/psp/display_client.cpp
@@ -699,14 +699,14 @@ void GuRenderer::fillVertices(Vertex *vertices) {
// Save scaled offset on screen
float scaledOffsetOnScreenX = scaleSourceToOutputX(_offsetOnScreen.x);
float scaledOffsetOnScreenY = scaleSourceToOutputY(_offsetOnScreen.y);
-
+
float imageStartX, imageStartY, imageEndX, imageEndY;
imageStartX = gapX + scaledOffsetOnScreenX + (scaleSourceToOutputX(_maxTextureOffset.x));
imageStartY = gapY + scaledOffsetOnScreenY;
if (_fullScreen) { // shortcut
- imageEndX = PSP_SCREEN_WIDTH - gapX + scaledOffsetOnScreenX;
+ imageEndX = PSP_SCREEN_WIDTH - gapX + scaledOffsetOnScreenX;
imageEndY = PSP_SCREEN_HEIGHT - gapY + scaledOffsetOnScreenY; // needed for screen shake
} else { /* !fullScreen */
imageEndX = imageStartX + scaleSourceToOutputX(_drawSize.width);
diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp
index 72a0acb632..5d75ac531e 100644
--- a/backends/platform/psp/display_manager.cpp
+++ b/backends/platform/psp/display_manager.cpp
@@ -128,24 +128,24 @@ void VramAllocator::deallocate(void *address) {
void MasterGuRenderer::setupCallbackThread() {
DEBUG_ENTER_FUNC();
-
+
// start the thread that updates the display
- threadCreateAndStart("DisplayCbThread", PRIORITY_DISPLAY_THREAD, STACK_DISPLAY_THREAD);
+ threadCreateAndStart("DisplayCbThread", PRIORITY_DISPLAY_THREAD, STACK_DISPLAY_THREAD);
}
// this function gets called by PspThread when starting the new thread
void MasterGuRenderer::threadFunction() {
DEBUG_ENTER_FUNC();
-
+
// Create the callback. It should always get the pointer to MasterGuRenderer
_callbackId = sceKernelCreateCallback("Display Callback", guCallback, this);
if (_callbackId < 0) {
- PSP_ERROR("failed to create display callback\n");
+ PSP_ERROR("failed to create display callback\n");
}
-
+
PSP_DEBUG_PRINT("created callback. Going to sleep\n");
- sceKernelSleepThreadCB(); // sleep until we get a callback
+ sceKernelSleepThreadCB(); // sleep until we get a callback
}
// This callback is called when the render is finished. It swaps the buffers
@@ -153,12 +153,12 @@ int MasterGuRenderer::guCallback(int, int, void *__this) {
MasterGuRenderer *_this = (MasterGuRenderer *)__this;
- sceGuSync(0, 0); // make sure we wait for GU to finish
+ sceGuSync(0, 0); // make sure we wait for GU to finish
sceDisplayWaitVblankStartCB(); // wait for v-blank without eating main thread cycles
sceGuSwapBuffers(); // swap the back and front buffers
_this->_renderFinished = true; // Only this thread can set the variable to true
-
+
return 0;
}
@@ -214,7 +214,7 @@ inline void MasterGuRenderer::guPreRender() {
DEBUG_ENTER_FUNC();
_renderFinished = false; // set to synchronize with callback thread
-
+
#ifdef ENABLE_RENDER_MEASURE
_lastRenderTime = g_system->getMillis();
#endif /* ENABLE_RENDER_MEASURE */
@@ -243,7 +243,7 @@ inline void MasterGuRenderer::guPostRender() {
else
sceKernelNotifyCallback(_callbackId, 0); // notify the callback. Nothing extra to pass
#else
- sceGuSync(0, 0);
+ sceGuSync(0, 0);
#ifdef ENABLE_RENDER_MEASURE
uint32 now = g_system->getMillis();
@@ -253,7 +253,7 @@ inline void MasterGuRenderer::guPostRender() {
sceDisplayWaitVblankStart();
sceGuSwapBuffers();
_renderFinished = true;
-#endif /* !USE_DISPLAY_CALLBACK */
+#endif /* !USE_DISPLAY_CALLBACK */
}
void MasterGuRenderer::guShutDown() {
@@ -281,7 +281,7 @@ void DisplayManager::init() {
#ifdef USE_DISPLAY_CALLBACK
_masterGuRenderer.setupCallbackThread();
#endif
-
+
}
void DisplayManager::setSizeAndPixelFormat(uint width, uint height, const Graphics::PixelFormat *format) {
@@ -351,10 +351,10 @@ void DisplayManager::calculateScaleParams() {
break;
case KEEP_ASPECT_RATIO: { // maximize the height while keeping aspect ratio
float aspectRatio = (float)_displayParams.screenSource.width / (float)_displayParams.screenSource.height;
-
+
_displayParams.screenOutput.height = PSP_SCREEN_HEIGHT; // always full height
_displayParams.screenOutput.width = (uint32)(PSP_SCREEN_HEIGHT * aspectRatio);
-
+
if (_displayParams.screenOutput.width > PSP_SCREEN_WIDTH) // we can't have wider than the screen
_displayParams.screenOutput.width = PSP_SCREEN_WIDTH;
}
@@ -366,7 +366,7 @@ void DisplayManager::calculateScaleParams() {
default:
PSP_ERROR("Unsupported graphics mode[%d].\n", _graphicsMode);
}
-
+
// calculate scale factors for X and Y
_displayParams.scaleX = ((float)_displayParams.screenOutput.width) / _displayParams.screenSource.width;
_displayParams.scaleY = ((float)_displayParams.screenOutput.height) / _displayParams.screenSource.height;
@@ -381,9 +381,9 @@ bool DisplayManager::renderAll() {
if (!_masterGuRenderer.isRenderFinished()) {
PSP_DEBUG_PRINT("Callback render not finished.\n");
return false; // didn't render
- }
+ }
#endif /* USE_DISPLAY_CALLBACK */
-
+
// This is cheaper than checking time, so we do it first
if (!_screen->isDirty() &&
(!_overlay->isDirty()) &&
@@ -393,7 +393,7 @@ bool DisplayManager::renderAll() {
return true; // nothing to render
}
- if (!isTimeToUpdate())
+ if (!isTimeToUpdate())
return false; // didn't render
PSP_DEBUG_PRINT("screen[%s], overlay[%s], cursor[%s], keyboard[%s]\n",
@@ -425,7 +425,7 @@ bool DisplayManager::renderAll() {
_keyboard->setClean();
_masterGuRenderer.guPostRender();
-
+
return true; // rendered successfully
}
diff --git a/backends/platform/psp/display_manager.h b/backends/platform/psp/display_manager.h
index fa31fbcd40..00d3851243 100644
--- a/backends/platform/psp/display_manager.h
+++ b/backends/platform/psp/display_manager.h
@@ -81,7 +81,7 @@ public:
void guPostRender();
void guShutDown();
bool isRenderFinished() { return _renderFinished; }
- void setupCallbackThread();
+ void setupCallbackThread();
private:
virtual void threadFunction(); // for the display callback thread
static uint32 _displayList[];
@@ -89,7 +89,7 @@ private:
void guProgramDisplayBufferSizes();
static int guCallback(int, int, void *__this); // for the display callback
bool _renderFinished; // for sync with render callback
- int _callbackId; // to keep track of render callback
+ int _callbackId; // to keep track of render callback
};
class Screen;
diff --git a/backends/platform/psp/input.cpp b/backends/platform/psp/input.cpp
index 3ea2d4365d..ed868ef375 100644
--- a/backends/platform/psp/input.cpp
+++ b/backends/platform/psp/input.cpp
@@ -50,17 +50,17 @@ inline void Button::clear() {
_ascii = 0;
_flag = 0;
_pspEventDown.clear();
- _pspEventUp.clear();
+ _pspEventUp.clear();
}
-inline bool Button::getEvent(Common::Event &event, PspEvent &pspEvent, bool down) {
+inline bool Button::getEvent(Common::Event &event, PspEvent &pspEvent, bool down) {
if (down) {
if (!_pspEventDown.isEmpty())
pspEvent = _pspEventDown;
} else { // up
if (!_pspEventUp.isEmpty())
pspEvent = _pspEventUp;
- }
+ }
if (_key != Common::KEYCODE_INVALID) {
event.type = down ? Common::EVENT_KEYDOWN : Common::EVENT_KEYUP;
event.kbd.keycode = _key;
@@ -79,19 +79,19 @@ void Button::setPspEvent(PspEventType typeDown, uint32 dataDown, PspEventType ty
_pspEventDown.type = typeDown;
_pspEventDown.data = dataDown;
_pspEventUp.type = typeUp;
- _pspEventUp.data = dataUp;
-}
+ _pspEventUp.data = dataUp;
+}
// Translates bitfields to our constants
// We put combined bitfields first to make sure we pick up diagonals
const uint32 ButtonPad::_buttonMap[] = {
- PSP_CTRL_UP | PSP_CTRL_LEFT,
- PSP_CTRL_UP | PSP_CTRL_RIGHT,
+ PSP_CTRL_UP | PSP_CTRL_LEFT,
+ PSP_CTRL_UP | PSP_CTRL_RIGHT,
PSP_CTRL_DOWN | PSP_CTRL_RIGHT,
PSP_CTRL_DOWN | PSP_CTRL_LEFT,
PSP_CTRL_RIGHT, PSP_CTRL_DOWN, PSP_CTRL_LEFT, PSP_CTRL_UP,
- PSP_CTRL_CROSS, PSP_CTRL_CIRCLE, PSP_CTRL_TRIANGLE, PSP_CTRL_SQUARE,
- PSP_CTRL_LTRIGGER, PSP_CTRL_RTRIGGER, PSP_CTRL_START, PSP_CTRL_SELECT
+ PSP_CTRL_CROSS, PSP_CTRL_CIRCLE, PSP_CTRL_TRIANGLE, PSP_CTRL_SQUARE,
+ PSP_CTRL_LTRIGGER, PSP_CTRL_RTRIGGER, PSP_CTRL_START, PSP_CTRL_SELECT
};
ButtonPad::ButtonPad() : _prevButtonState(0), _shifted(UNSHIFTED), _padMode(PAD_MODE_NORMAL),
@@ -125,7 +125,7 @@ void ButtonPad::initButtonsNormalMode() {
DEBUG_ENTER_FUNC();
PSP_DEBUG_PRINT("initializing buttons for normal mode\n");
clearButtons();
-
+
// Dpad
_button[BTN_UP_LEFT][UNSHIFTED].setKey(Common::KEYCODE_KP7, '7');
_button[BTN_LEFT][SHIFTED].setKey(Common::KEYCODE_KP7, '7'); // same as up_left
@@ -139,7 +139,7 @@ void ButtonPad::initButtonsNormalMode() {
_button[BTN_DOWN][UNSHIFTED].setKey(Common::KEYCODE_KP2, '2');
_button[BTN_DOWN_RIGHT][UNSHIFTED].setKey(Common::KEYCODE_KP3, '3');
_button[BTN_RIGHT][SHIFTED].setKey(Common::KEYCODE_KP3, '3'); // same as down_right
-
+
// Other buttons
_button[BTN_CROSS][UNSHIFTED].setPspEvent(PSP_EVENT_LBUTTON, true, PSP_EVENT_LBUTTON, false);
_button[BTN_CIRCLE][UNSHIFTED].setPspEvent(PSP_EVENT_RBUTTON, true, PSP_EVENT_RBUTTON, false);
@@ -153,8 +153,8 @@ void ButtonPad::initButtonsNormalMode() {
_button[BTN_RTRIGGER][UNSHIFTED].setKey(Common::KEYCODE_INVALID, 0, Common::KBD_SHIFT);
_button[BTN_START][SHIFTED].setKey(Common::KEYCODE_F5, Common::ASCII_F5);
_button[BTN_START][UNSHIFTED].setKey(Common::KEYCODE_F5, Common::ASCII_F5, Common::KBD_CTRL);
- _button[BTN_SELECT][UNSHIFTED].setPspEvent(PSP_EVENT_SHOW_VIRTUAL_KB, true, PSP_EVENT_NONE, 0);
-}
+ _button[BTN_SELECT][UNSHIFTED].setPspEvent(PSP_EVENT_SHOW_VIRTUAL_KB, true, PSP_EVENT_NONE, 0);
+}
void ButtonPad::initButtonsLolMode() {
DEBUG_ENTER_FUNC();
@@ -166,12 +166,12 @@ void ButtonPad::initButtonsLolMode() {
_button[BTN_SQUARE][UNSHIFTED].setPspEvent(PSP_EVENT_SHIFT, true, PSP_EVENT_SHIFT, false);
_button[BTN_SQUARE][SHIFTED].clear();
_button[BTN_SQUARE][SHIFTED].setPspEvent(PSP_EVENT_SHIFT, true, PSP_EVENT_SHIFT, false);
-
+
// Dpad
_button[BTN_LEFT][UNSHIFTED].clear();
_button[BTN_LEFT][UNSHIFTED].setKey(Common::KEYCODE_KP7, '7');
_button[BTN_LEFT][SHIFTED].clear();
- _button[BTN_LEFT][SHIFTED].setKey(Common::KEYCODE_F1, Common::ASCII_F1);
+ _button[BTN_LEFT][SHIFTED].setKey(Common::KEYCODE_F1, Common::ASCII_F1);
_button[BTN_UP][SHIFTED].clear();
_button[BTN_UP][SHIFTED].setKey(Common::KEYCODE_F2, Common::ASCII_F2);
_button[BTN_RIGHT][UNSHIFTED].clear();
@@ -194,13 +194,13 @@ void ButtonPad::initButtonsLolMode() {
bool ButtonPad::getEvent(Common::Event &event, PspEvent &pspEvent, SceCtrlData &pad) {
DEBUG_ENTER_FUNC();
-
+
//PSP_DEBUG_PRINT("buttons[%x]\n", pad.Buttons);
uint32 curButtonState = PSP_ALL_BUTTONS & pad.Buttons; // we only care about these
-
- modifyButtonsForCombos(pad); // change buttons for combos
-
+
+ modifyButtonsForCombos(pad); // change buttons for combos
+
return getEventFromButtonState(event, pspEvent, curButtonState);
}
@@ -208,13 +208,13 @@ bool ButtonPad::getEventFromButtonState(Common::Event &event, PspEvent &pspEvent
DEBUG_ENTER_FUNC();
_buttonsChanged[_shifted] |= buttonState ^ _prevButtonState; // add any buttons that changed
_prevButtonState = buttonState;
-
+
for (int shiftState = UNSHIFTED; shiftState < SHIFTED_MODE_LAST; shiftState++) {
if (_buttonsChanged[shiftState]) { // any button to address?
PSP_DEBUG_PRINT("found changed buttons\n");
- ButtonType buttonType = BTN_LAST;
+ ButtonType buttonType = BTN_LAST;
bool buttonDown = false; // normally we release a button (as in when we're in a different shiftmode)
-
+
for (int i = BTN_UP_LEFT; i < BTN_LAST; i++) {
uint32 buttonCode = _buttonMap[i];
if ((_buttonsChanged[shiftState] & buttonCode) == buttonCode) { // check for this changed button
@@ -222,23 +222,23 @@ bool ButtonPad::getEventFromButtonState(Common::Event &event, PspEvent &pspEvent
_buttonsChanged[shiftState] &= ~buttonCode; // save the fact that we treated this button
if (shiftState == _shifted)
buttonDown = buttonState & buttonCode ? true : false; // pressed or released?
-
- PSP_DEBUG_PRINT("button[%i] pressed\n", i);
+
+ PSP_DEBUG_PRINT("button[%i] pressed\n", i);
break;
}
}
-
+
assert (buttonType < BTN_LAST);
bool haveEvent = _button[buttonType][shiftState].getEvent(event, pspEvent, buttonDown);
if (haveEvent)
PSP_DEBUG_PRINT("have event. key[%d] flag[%x] %s\n", event.kbd.ascii, event.kbd.flags, buttonDown ? "down" : "up");
return haveEvent;
}
- }
-
+ }
+
return false;
}
-
+
void ButtonPad::modifyButtonsForCombos(SceCtrlData &pad) {
if (DOWN(PSP_CTRL_RTRIGGER | PSP_CTRL_LTRIGGER)) {
if (!_comboMode) { // we're entering combo mode
@@ -262,24 +262,24 @@ void ButtonPad::modifyButtonsForCombos(SceCtrlData &pad) {
initButtons(); // reset the button configuration
_comboMode = false;
}
- }
+ }
}
-
+
bool Nub::getEvent(Common::Event &event, PspEvent &pspEvent, SceCtrlData &pad) {
DEBUG_ENTER_FUNC();
-
+
if (_dpadMode) { // Convert the nub to a D-Pad
uint32 buttonState;
translateToDpadState(pad.Lx, pad.Ly, buttonState);
return _buttonPad.getEventFromButtonState(event, pspEvent, buttonState);
}
-
+
int32 analogStepX = pad.Lx; // Goes up to 255.
int32 analogStepY = pad.Ly;
analogStepX = modifyNubAxisMotion(analogStepX);
analogStepY = modifyNubAxisMotion(analogStepY);
-
+
int32 oldX = _cursor->getX();
int32 oldY = _cursor->getY();
@@ -316,7 +316,7 @@ bool Nub::getEvent(Common::Event &event, PspEvent &pspEvent, SceCtrlData &pad) {
event.mouse.x = newX;
event.mouse.y = newY;
PSP_DEBUG_PRINT("Nub event. X[%d], Y[%d]\n", newX, newY);
- return true;
+ return true;
}
}
return false;
@@ -325,12 +325,12 @@ bool Nub::getEvent(Common::Event &event, PspEvent &pspEvent, SceCtrlData &pad) {
void Nub::translateToDpadState(int dpadX, int dpadY, uint32 &buttonState) {
#define MIN_NUB_POSITION 70
buttonState = 0;
-
+
if (dpadX > 127 + MIN_NUB_POSITION)
buttonState |= PSP_CTRL_RIGHT;
else if (dpadX < 127 - MIN_NUB_POSITION)
buttonState |= PSP_CTRL_LEFT;
-
+
if (dpadY > 127 + MIN_NUB_POSITION)
buttonState |= PSP_CTRL_DOWN;
else if (dpadY < 127 - MIN_NUB_POSITION)
@@ -353,11 +353,11 @@ inline int32 Nub::modifyNubAxisMotion(int32 input) {
return input;
}
-inline bool Nub::isButtonDown() {
+inline bool Nub::isButtonDown() {
if (_dpadMode) // only relevant in dpad mode
return _buttonPad.isButtonDown();
return false;
-}
+}
const char *InputHandler::_padModeText[] = {
"Normal Button Mode",
@@ -367,7 +367,7 @@ const char *InputHandler::_padModeText[] = {
void InputHandler::init() {
sceCtrlSetSamplingCycle(0); // set sampling to vsync. n = n usecs
sceCtrlSetSamplingMode(1); // analog
-
+
_buttonPad.initButtons();
}
@@ -386,7 +386,7 @@ bool InputHandler::getAllInputs(Common::Event &event) {
bool haveEvent;
//memset(&event, 0, sizeof(event));
-
+
haveEvent = getEvent(event, pad);
if (haveEvent) {
@@ -407,7 +407,7 @@ bool InputHandler::getEvent(Common::Event &event, SceCtrlData &pad) {
} else { // only process buttonpad if keyboard invisible
haveEvent = _buttonPad.getEvent(event, pspEvent, pad);
}
-
+
if (!haveEvent && pspEvent.isEmpty())
haveEvent = _nub.getEvent(event, pspEvent, pad);
@@ -417,20 +417,20 @@ bool InputHandler::getEvent(Common::Event &event, SceCtrlData &pad) {
pspEvent = _pendingPspEvent;
_pendingPspEvent.clear();
}
- }
-
+ }
+
// handle any PSP events we might have
if (!pspEvent.isEmpty())
haveEvent |= handlePspEvent(event, pspEvent); // overrides any event we might have
-
+
return haveEvent;
}
bool InputHandler::handlePspEvent(Common::Event &event, PspEvent &pspEvent) {
bool haveEvent = false;
-
+
PSP_DEBUG_PRINT("have pspEvent[%d] data[%d]\n", pspEvent.type, pspEvent.data);
-
+
switch (pspEvent.type) {
case PSP_EVENT_SHIFT:
handleShiftEvent((ShiftMode)pspEvent.data);
@@ -449,11 +449,11 @@ bool InputHandler::handlePspEvent(Common::Event &event, PspEvent &pspEvent) {
break;
case PSP_EVENT_RBUTTON:
haveEvent = true;
- if (pspEvent.data) // down
+ if (pspEvent.data) // down
handleMouseEvent(event, Common::EVENT_RBUTTONDOWN, "RButtonDown");
else
handleMouseEvent(event, Common::EVENT_RBUTTONUP, "RButtonUp");
- break;
+ break;
case PSP_EVENT_MODE_SWITCH:
handleModeSwitchEvent();
break;
@@ -464,7 +464,7 @@ bool InputHandler::handlePspEvent(Common::Event &event, PspEvent &pspEvent) {
PSP_ERROR("Unhandled PSP Event[%d]\n", pspEvent.type);
break;
}
-
+
return haveEvent;
}
@@ -490,10 +490,10 @@ void InputHandler::handleModeSwitchEvent() {
_padMode = (PspPadMode)(_padMode + 1);
if (_padMode >= PAD_MODE_LAST)
_padMode = PAD_MODE_NORMAL;
-
+
GUI::TimedMessageDialog dialog(_padModeText[_padMode], 1500);
dialog.runModal();
-
+
_buttonPad.setPadMode(_padMode);
_buttonPad.initButtons();
}
@@ -502,10 +502,10 @@ void InputHandler::handleModeSwitchEvent() {
/*
void InputHandler::handleSpeedChange(bool up) {
char *dialogMsg;
-
+
if (up) {
dialogMsg = "
-
+
GUI::TimedMessageDialog dialog(_padModeText[_padMode], 1500);
dialog.runModal();
}*/
diff --git a/backends/platform/psp/input.h b/backends/platform/psp/input.h
index 6991c50533..acca04f376 100644
--- a/backends/platform/psp/input.h
+++ b/backends/platform/psp/input.h
@@ -48,11 +48,11 @@ struct PspEvent {
PspEventType type;
uint32 data;
PspEvent() { clear(); }
- void clear() {
+ void clear() {
type = PSP_EVENT_NONE;
data = 0;
}
- bool isEmpty() { return type == PSP_EVENT_NONE; }
+ bool isEmpty() { return type == PSP_EVENT_NONE; }
};
enum PspPadMode {
@@ -75,7 +75,7 @@ private:
uint32 _flag;
PspEvent _pspEventDown; // event when we press
PspEvent _pspEventUp; // event when we release
-public:
+public:
Button();
void clear();
bool getEvent(Common::Event &event, PspEvent &pspEvent, bool buttonDown);
@@ -105,7 +105,7 @@ public:
BTN_LAST
};
-private:
+private:
Button _button[BTN_LAST][SHIFTED_MODE_LAST];
uint32 _buttonsChanged[SHIFTED_MODE_LAST]; // normal and shifted
uint32 _prevButtonState;
@@ -128,7 +128,7 @@ public:
bool isButtonDown() { return _prevButtonState; }
void initButtons();
};
-
+
class Nub {
private:
Cursor *_cursor; // to enable changing/getting cursor position
@@ -137,35 +137,35 @@ private:
ShiftMode _shifted;
bool _dpadMode;
-public:
+public:
Nub() : _shifted(UNSHIFTED), _dpadMode(false) { _buttonPad.initButtons(); }
- void setCursor(Cursor *cursor) { _cursor = cursor; }
+ void setCursor(Cursor *cursor) { _cursor = cursor; }
void setDpadMode(bool active) { _dpadMode = active; }
void setShifted(ShiftMode shifted) { _shifted = shifted; }
bool isButtonDown();
-
+
bool getEvent(Common::Event &event, PspEvent &pspEvent, SceCtrlData &pad);
int32 modifyNubAxisMotion(int32 input);
void translateToDpadState(int dpadX, int dpadY, uint32 &buttonState); // convert nub data to dpad data
-};
+};
class InputHandler {
public:
InputHandler() : _keyboard(0), _cursor(0), _padMode(PAD_MODE_NORMAL), _lastPadCheckTime(0) {}
void setKeyboard(PSPKeyboard *keyboard) { _keyboard = keyboard; }
void setCursor(Cursor *cursor) { _cursor = cursor; _nub.setCursor(cursor); }
-
- void init();
+
+ void init();
bool getAllInputs(Common::Event &event);
-
+
private:
PSPKeyboard *_keyboard;
Cursor *_cursor;
-
- Nub _nub;
+
+ Nub _nub;
ButtonPad _buttonPad;
-
+
PspPadMode _padMode; // whice mode we're in
PspEvent _pendingPspEvent; // an event that can't be handled yet
uint32 _lastPadCheckTime;
diff --git a/backends/platform/psp/memory.cpp b/backends/platform/psp/memory.cpp
index 1e08173286..924ab356e8 100644
--- a/backends/platform/psp/memory.cpp
+++ b/backends/platform/psp/memory.cpp
@@ -49,29 +49,29 @@ void PspMemory::copy(byte *dst, const byte *src, uint32 bytes) {
// align the destination pointer first
uint32 prefixDst = (((uint32)dst) & 0x3);
-
+
if (prefixDst) {
- prefixDst = 4 - prefixDst; // prefix only if we have address % 4 != 0
+ prefixDst = 4 - prefixDst; // prefix only if we have address % 4 != 0
PSP_DEBUG_PRINT("prefixDst[%d]\n", prefixDst);
bytes -= prefixDst; // remember we assume bytes >= 4
-
+
if (bytes < MIN_AMOUNT_FOR_COMPLEX_COPY) { // check if it's worthwhile to continue
copy8(dst, src, bytes + prefixDst);
#ifdef TEST_MEMORY_COPY
testCopy(debugDst, debugSrc, debugBytes);
-#endif
+#endif
return;
}
-
+
while (prefixDst--) {
*dst++ = *src++;
- }
+ }
}
-
+
// check the source pointer alignment now
uint32 alignSrc = (((uint32)src) & 0x3);
-
+
if (alignSrc) { // we'll need to realign our reads
copy32Misaligned((uint32 *)dst, src, bytes, alignSrc);
} else {
@@ -80,14 +80,14 @@ void PspMemory::copy(byte *dst, const byte *src, uint32 bytes) {
#ifdef TEST_MEMORY_COPY
testCopy(debugDst, debugSrc, debugBytes);
-#endif
+#endif
}
void PspMemory::copy32Aligned(uint32 *dst32, const uint32 *src32, uint32 bytes) {
PSP_DEBUG_PRINT("copy32Aligned(): dst32[%p], src32[%p], bytes[%d]\n", dst32, src32, bytes);
int words8 = bytes >> 5;
-
+
// try blocks of 8 words at a time
if (words8) {
while (words8--) {
@@ -110,11 +110,11 @@ void PspMemory::copy32Aligned(uint32 *dst32, const uint32 *src32, uint32 bytes)
dst32[7] = d;
dst32 += 8;
src32 += 8;
- }
+ }
}
-
+
int words4 = (bytes & 0x1F) >> 4;
-
+
// try blocks of 4 words at a time
if (words4) {
uint32 a, b, c, d;
@@ -129,10 +129,10 @@ void PspMemory::copy32Aligned(uint32 *dst32, const uint32 *src32, uint32 bytes)
dst32 += 4;
src32 += 4;
}
-
+
int bytesLeft = (bytes & 0xF); // only look at bytes left after we did the above
int wordsLeft = bytesLeft >> 2;
-
+
// now just do single words
while (wordsLeft) {
*dst32++ = *src32++;
@@ -145,7 +145,7 @@ void PspMemory::copy32Aligned(uint32 *dst32, const uint32 *src32, uint32 bytes)
byte *dst = (byte *)dst32;
byte *src = (byte *)src32;
-
+
while (bytesLeft--) {
*dst++ = *src++;
}
@@ -155,10 +155,10 @@ void PspMemory::copy32Aligned(uint32 *dst32, const uint32 *src32, uint32 bytes)
// Assume dst is aligned
void PspMemory::copy32Misaligned(uint32 *dst32, const byte *src, uint32 bytes, uint32 alignSrc) {
PSP_DEBUG_PRINT("copy32Misaligned: dst32[%p], src[%p], bytes[%d], alignSrc[%d]\n", dst32, src, bytes, alignSrc);
-
+
uint32 *src32 = (uint32 *)(((uint32)src) & 0xFFFFFFFC); // remove misalignment
uint32 shiftValue, lastShiftValue;
-
+
switch (alignSrc) {
case 1:
shiftValue = 8;
@@ -178,9 +178,9 @@ void PspMemory::copy32Misaligned(uint32 *dst32, const byte *src, uint32 bytes, u
// Try to do groups of 4 words
uint32 words4 = bytes >> 4;
-
+
srcWord = *src32; // preload 1st word so we read ahead
-
+
for (; words4; words4--) {
dstWord = srcWord >> shiftValue;
srcWord = src32[1];
@@ -201,12 +201,12 @@ void PspMemory::copy32Misaligned(uint32 *dst32, const byte *src, uint32 bytes, u
src32 += 4;
dst32 += 4;
}
-
+
uint32 words = (bytes & 0xF) >> 2; // now get remaining words
-
+
// we read one word ahead of what we write
// setup the first read
-
+
for (; words ;words--) {
dstWord = srcWord >> shiftValue;
srcWord = src32[1]; // we still go one ahead
@@ -214,9 +214,9 @@ void PspMemory::copy32Misaligned(uint32 *dst32, const byte *src, uint32 bytes, u
dstWord |= srcWord << lastShiftValue;
*dst32++ = dstWord;
}
-
+
uint32 bytesLeft = bytes & 3; // and remaining bytes
-
+
if (bytesLeft) {
byte *dst8 = (byte *)dst32;
byte *src8 = ((byte *)src32) + ((uint32)src & 0x3); // get exact location we should be at
@@ -228,7 +228,7 @@ void PspMemory::copy32Misaligned(uint32 *dst32, const byte *src, uint32 bytes, u
}
void PspMemory::testCopy(const byte *debugDst, const byte *debugSrc, uint32 debugBytes) {
-
+
bool mismatch = false;
PSP_INFO_PRINT("testing fastCopy...");
@@ -246,10 +246,10 @@ void PspMemory::testCopy(const byte *debugDst, const byte *debugSrc, uint32 debu
PSP_INFO_PRINT("\n");
} else {
PSP_INFO_PRINT("ok\n");
- }
+ }
}
-//
+//
// used to swap red and blue
void PspMemorySwap::swap(uint16 *dst16, const uint16 *src16, uint32 bytes, PSPPixelFormat &format) {
DEBUG_ENTER_FUNC();
@@ -258,45 +258,45 @@ void PspMemorySwap::swap(uint16 *dst16, const uint16 *src16, uint32 bytes, PSPPi
uint32 debugBytes = bytes;
const uint16 *debugDst = dst16, *debugSrc = src16;
#endif
-
+
// align the destination pointer first
uint32 prefixDst = (((uint32)dst16) & 0x3); // for swap, we can only have 2 or 0 as our prefix
-
+
if (prefixDst) {
bytes -= prefixDst; // remember we assume bytes > 4
*dst16++ = format.swapRedBlue16(*src16++);
-
+
if (bytes < MIN_AMOUNT_FOR_COMPLEX_COPY) { // check if it's worthwhile to continue
swap16(dst16, src16, bytes, format);
#ifdef TEST_MEMORY_COPY
testSwap(debugDst, debugSrc, debugBytes, format);
-#endif
+#endif
return;
}
}
-
+
// check the source pointer alignment now
uint32 alignSrc = (((uint32)src16) & 0x3);
-
+
if (alignSrc) { // we'll need to realign our reads
PSP_DEBUG_PRINT("misaligned copy of %u bytes from %p to %p\n", bytes, src16, dst16);
swap32Misaligned((uint32 *)dst16, src16, bytes, format);
} else {
swap32Aligned((uint32 *)dst16, (const uint32 *)src16, bytes, format);
}
-
+
#ifdef TEST_MEMORY_COPY
testSwap(debugDst, debugSrc, debugBytes, format);
-#endif
-
+#endif
+
}
void PspMemorySwap::testSwap(const uint16 *debugDst, const uint16 *debugSrc, uint32 debugBytes, PSPPixelFormat &format) {
-
+
bool mismatch = false;
PSP_INFO_PRINT("testing fastSwap...");
-
+
uint32 shorts = debugBytes >> 1;
for (uint32 i = 0; i < shorts; i++) {
@@ -313,13 +313,13 @@ void PspMemorySwap::testSwap(const uint16 *debugDst, const uint16 *debugSrc, uin
PSP_INFO_PRINT("\n");
} else {
PSP_INFO_PRINT("ok\n");
- }
+ }
}
void PspMemorySwap::swap32Aligned(uint32 *dst32, const uint32 *src32, uint32 bytes, PSPPixelFormat &format) {
DEBUG_ENTER_FUNC();
int words4 = bytes >> 4;
-
+
// try blocks of 4 words at a time
while (words4--) {
uint32 a, b, c, d;
@@ -337,14 +337,14 @@ void PspMemorySwap::swap32Aligned(uint32 *dst32, const uint32 *src32, uint32 byt
uint32 bytesLeft = bytes & 0xF;
uint32 words = bytesLeft >> 2;
-
+
// now just do words
while (words--) {
*dst32++ = format.swapRedBlue32(*src32++);
- }
+ }
bytesLeft = bytes & 0x3;
-
+
if (bytesLeft) { // for swap, can only be 1 short left
*((uint16 *)dst32) = format.swapRedBlue16(*((uint16 *)src32));
}
@@ -357,7 +357,7 @@ void PspMemorySwap::swap32Misaligned(uint32 *dst32, const uint16 *src16, uint32
const uint32 shiftValue = 16;
uint32 *src32 = (uint32 *)(((uint32)src16) & 0xFFFFFFFC); // remove misalignment
-
+
// Try to do groups of 4 words
uint32 words4 = bytes >> 4;
uint32 srcWord = src32[0]; // preload
@@ -382,15 +382,15 @@ void PspMemorySwap::swap32Misaligned(uint32 *dst32, const uint16 *src16, uint32
src32 += 4;
dst32 += 4;
}
-
+
uint32 words = (bytes & 0xF) >> 2;
-
+
// we read one word ahead of what we write
// setup the first read
if (words) {
//srcWord = *src32++; // don't need this. already loaded
src32++; // we already have the value loaded in
-
+
while (words--) {
uint32 dstWord = srcWord >> shiftValue;
srcWord = *src32++;
@@ -398,9 +398,9 @@ void PspMemorySwap::swap32Misaligned(uint32 *dst32, const uint16 *src16, uint32
*dst32++ = format.swapRedBlue32(dstWord);
}
}
-
+
uint32 bytesLeft = bytes & 3;
-
+
if (bytesLeft) { // for swap, can only be 1 short left
*((uint16 *)dst32) = format.swapRedBlue16((uint16)(srcWord >> shiftValue));
}
diff --git a/backends/platform/psp/memory.h b/backends/platform/psp/memory.h
index f54436fb99..54e9225b2e 100644
--- a/backends/platform/psp/memory.h
+++ b/backends/platform/psp/memory.h
@@ -40,7 +40,7 @@ inline void lwl_copy(byte *dst, const byte *src) {
asm volatile ("lwr %0,0(%1)\n\t"
"lwl %0,3(%1)\n\t"
: "=&r" (data) : "r" (src), "m" (*src));
-
+
asm volatile ("swr %1,0(%2)\n\t"
"swl %1,3(%2)\n\t"
: "=m" (*dst) : "r" (data), "r" (dst));
@@ -55,7 +55,7 @@ private:
static void copy(byte *dst, const byte *src, uint32 bytes);
static void copy32Aligned(uint32 *dst32, const uint32 *src32, uint32 bytes);
static void copy32Misaligned(uint32 *dst32, const byte *src, uint32 bytes, uint32 alignSrc);
-
+
static inline void copy8(byte *dst, const byte *src, int32 bytes) {
//PSP_DEBUG_PRINT("copy8 called with dst[%p], src[%p], bytes[%d]\n", dst, src, bytes);
uint32 words = bytes >> 2;
@@ -71,18 +71,18 @@ private:
}
}
-public:
+public:
// This is the interface to the outside world
static void *fastCopy(void *dstv, const void *srcv, int32 bytes) {
byte *dst = (byte *)dstv;
byte *src = (byte *)srcv;
-
+
if (bytes < MIN_AMOUNT_FOR_COMPLEX_COPY) {
copy8(dst, src, bytes);
} else { // go to more powerful copy
copy(dst, src, bytes);
}
-
+
return dstv;
}
};
diff --git a/backends/platform/psp/mp3.cpp b/backends/platform/psp/mp3.cpp
index 574cf0d719..0e88418f13 100644
--- a/backends/platform/psp/mp3.cpp
+++ b/backends/platform/psp/mp3.cpp
@@ -38,13 +38,13 @@
#include <pspsysmem.h>
#include <pspmodulemgr.h>
#include <psputility_avmodules.h>
-#include <mad.h>
+#include <mad.h>
#include "backends/platform/psp/mp3.h"
//#define DISABLE_PSP_MP3 // to make us use the regular MAD decoder instead
//#define __PSP_DEBUG_FUNCS__ /* For debugging the stack */
-//#define __PSP_DEBUG_PRINT__
+//#define __PSP_DEBUG_PRINT__
#include "backends/platform/psp/trace.h"
//#define PRINT_BUFFERS /* to debug MP3 buffers */
@@ -77,7 +77,7 @@ enum {
bool Mp3PspStream::initDecoder() {
DEBUG_ENTER_FUNC();
-
+
if (_decoderInit) {
PSP_ERROR("Already initialized!");
return true;
@@ -97,15 +97,15 @@ bool Mp3PspStream::initDecoder() {
PSP_ERROR("failed to load audiocodec.prx. ME cannot start.\n");
_decoderFail = true;
return false;
- }
- } else {
+ }
+ } else {
if (sceUtilityLoadAvModule(PSP_AV_MODULE_AVCODEC) < 0) {
PSP_ERROR("failed to load AVCODEC module. ME cannot start.\n");
_decoderFail = true;
return false;
}
}
-
+
PSP_DEBUG_PRINT("Using PSP's ME for MP3\n"); // important to know this is happening
_decoderInit = true;
@@ -114,10 +114,10 @@ bool Mp3PspStream::initDecoder() {
bool Mp3PspStream::stopDecoder() {
DEBUG_ENTER_FUNC();
-
+
if (!_decoderInit)
return true;
-
+
// Based on PSP firmware version, we need to do different things to do Media Engine processing
if (sceKernelDevkitVersion() == 0x01050001){ // TODO: how do we unload?
/* if (!unloadAudioModule("flash0:/kd/me_for_vsh.prx", PSP_MEMORY_PARTITION_KERNEL) ||
@@ -130,10 +130,10 @@ bool Mp3PspStream::stopDecoder() {
if (sceUtilityUnloadModule(PSP_MODULE_AV_AVCODEC) < 0) {
PSP_ERROR("failed to unload avcodec module\n");
return false;
- }
+ }
}
-
- _decoderInit = false;
+
+ _decoderInit = false;
return true;
}
@@ -176,27 +176,27 @@ Mp3PspStream::Mp3PspStream(Common::SeekableReadStream *inStream, DisposeAfterUse
_length(0, 1000),
_sampleRate(0),
_totalTime(mad_timer_zero) {
-
+
DEBUG_ENTER_FUNC();
assert(_decoderInit); // must be initialized by now
-
+
// let's leave the buffer guard -- who knows, it may be good?
memset(_buf, 0, sizeof(_buf));
memset(_codecInBuffer, 0, sizeof(_codecInBuffer));
-
+
initStream(); // init needed stuff for the stream
findValidHeader(); // get a first header so we can read basic stuff
-
+
_sampleRate = _header.samplerate; // copy it before it gets destroyed
_stereo = (MAD_NCHANNELS(&_header) == 2);
-
+
while (_state != MP3_STATE_EOS)
findValidHeader(); // get a first header so we can read basic stuff
-
+
_length = Timestamp(mad_timer_count(_totalTime, MAD_UNITS_MILLISECONDS), getRate());
-
+
deinitStream();
_state = MP3_STATE_INIT;
@@ -222,7 +222,7 @@ int Mp3PspStream::initStream() {
// Read the first few sample bytes into the buffer
readMP3DataIntoBuffer();
-
+
return true;
}
@@ -230,7 +230,7 @@ bool Mp3PspStream::initStreamME() {
// The following will eventually go into the thread
memset(_codecParams, 0, sizeof(_codecParams));
-
+
// Init the MP3 hardware
int ret = 0;
ret = sceAudiocodecCheckNeedMem(_codecParams, 0x1002);
@@ -245,22 +245,22 @@ bool Mp3PspStream::initStreamME() {
return false;
}
PSP_DEBUG_PRINT("sceAudioCodecGetEDRAM returned %d\n", ret);
-
+
PSP_DEBUG_PRINT("samplerate[%d]\n", _sampleRate);
_codecParams[10] = _sampleRate;
-
+
ret = sceAudiocodecInit(_codecParams, 0x1002);
if (ret < 0) {
PSP_ERROR("failed to init MP3 ME module. sceAudiocodecInit returned 0x%x.\n", ret);
return false;
}
-
+
return true;
}
Mp3PspStream::~Mp3PspStream() {
DEBUG_ENTER_FUNC();
-
+
deinitStream();
releaseStreamME(); // free the memory used for this stream
@@ -277,17 +277,17 @@ void Mp3PspStream::deinitStream() {
// Deinit MAD
mad_header_finish(&_header);
mad_stream_finish(&_stream);
-
+
_state = MP3_STATE_EOS;
}
void Mp3PspStream::releaseStreamME() {
sceAudiocodecReleaseEDRAM(_codecParams);
-}
+}
void Mp3PspStream::decodeMP3Data() {
DEBUG_ENTER_FUNC();
-
+
do {
if (_state == MP3_STATE_INIT) {
initStream();
@@ -296,17 +296,17 @@ void Mp3PspStream::decodeMP3Data() {
if (_state == MP3_STATE_EOS)
return;
-
+
findValidHeader(); // seach for next valid header
while (_state == MP3_STATE_READY) { // not a real 'while'. Just for easy flow
_stream.error = MAD_ERROR_NONE;
uint32 frame_size = _stream.next_frame - _stream.this_frame;
-
- updatePcmLength(); // Retrieve the number of PCM samples.
+
+ updatePcmLength(); // Retrieve the number of PCM samples.
// We seem to change this, so it needs to be dynamic
-
+
PSP_DEBUG_PRINT("MP3 frame size[%d]. pcmLength[%d]\n", frame_size, _pcmLength);
memcpy(_codecInBuffer, _stream.this_frame, frame_size); // we need it aligned
@@ -316,7 +316,7 @@ void Mp3PspStream::decodeMP3Data() {
_codecParams[8] = (unsigned long)_pcmSamples;
_codecParams[7] = frame_size;
_codecParams[9] = _pcmLength * 2; // x2 for stereo, though this one's not so important
-
+
// debug
#ifdef PRINT_BUFFERS
PSP_DEBUG_PRINT("mp3 frame:\n");
@@ -419,7 +419,7 @@ bool Mp3PspStream::seek(const Timestamp &where) {
// Important to release and re-init the ME
releaseStreamME();
initStreamME();
-
+
// Check if we need to rewind
if (_state != MP3_STATE_READY || mad_timer_compare(destination, _totalTime) < 0) {
initStream();
@@ -473,38 +473,38 @@ int Mp3PspStream::readBuffer(int16 *buffer, const int numSamples) {
DEBUG_ENTER_FUNC();
int samples = 0;
-#ifdef PRINT_BUFFERS
+#ifdef PRINT_BUFFERS
int16 *debugBuffer = buffer;
-#endif
-
+#endif
+
// Keep going as long as we have input available
while (samples < numSamples && _state != MP3_STATE_EOS) {
const int len = MIN(numSamples, samples + (int)(_pcmLength - _posInFrame) * MAD_NCHANNELS(&_header));
-
+
while (samples < len) {
*buffer++ = _pcmSamples[_posInFrame << 1];
samples++;
if (MAD_NCHANNELS(&_header) == 2) {
*buffer++ = _pcmSamples[(_posInFrame << 1) + 1];
samples++;
- }
+ }
_posInFrame++; // always skip an extra sample since ME always outputs stereo
}
-
+
if (_posInFrame >= _pcmLength) {
// We used up all PCM data in the current frame -- read & decode more
decodeMP3Data();
}
}
-
+
#ifdef PRINT_BUFFERS
PSP_INFO_PRINT("buffer:\n");
for (int i = 0; i<numSamples; i++)
PSP_INFO_PRINT("%d ", debugBuffer[i]);
PSP_INFO_PRINT("\n\n");
-#endif
-
+#endif
+
return samples;
}
-} // End of namespace Audio \ No newline at end of file
+} // End of namespace Audio
diff --git a/backends/platform/psp/mp3.h b/backends/platform/psp/mp3.h
index 71a248ad78..1d2fe5ec2f 100644
--- a/backends/platform/psp/mp3.h
+++ b/backends/platform/psp/mp3.h
@@ -53,9 +53,9 @@ protected:
Common::SeekableReadStream *_inStream;
DisposeAfterUse::Flag _disposeAfterUse;
-
+
uint32 _pcmLength; // how many pcm samples we have for this type of file (x2 this for stereo)
-
+
uint _posInFrame; // position in frame
State _state; // what state the stream is in
@@ -66,17 +66,17 @@ protected:
mad_timer_t _totalTime;
mad_stream _stream; //
mad_header _header; // This is all we need from libmad
-
+
static bool _decoderInit; // has the decoder been initialized
static bool _decoderFail; // has the decoder failed to load
-
+
enum {
BUFFER_SIZE = 5 * 8192
};
// This buffer contains a slab of input data
byte _buf[BUFFER_SIZE + MAD_BUFFER_GUARD];
-
+
void decodeMP3Data();
void readMP3DataIntoBuffer();
@@ -85,19 +85,19 @@ protected:
void findValidHeader();
void deinitStream();
void updatePcmLength();
-
+
// to init and uninit ME decoder
static bool initDecoder();
static bool stopDecoder();
-
+
// ME functions for stream
bool initStreamME();
void releaseStreamME();
-
+
public:
Mp3PspStream(Common::SeekableReadStream *inStream, DisposeAfterUse::Flag dispose);
~Mp3PspStream();
-
+
// This function avoids having to create streams when it's not possible
static inline bool isOkToCreateStream() {
if (_decoderFail) // fatal failure
@@ -105,7 +105,7 @@ public:
if (!_decoderInit) // if we're not initialized
if (!initDecoder()) // check if we failed init
return false;
- return true;
+ return true;
}
int readBuffer(int16 *buffer, const int numSamples);
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index b09d9c0c00..047ec1957f 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -67,7 +67,7 @@ void OSystem_PSP::initBackend() {
// Instantiate real time clock
PspRtc::instance();
-
+
_cursor.enableCursorPalette(false);
_cursor.setXY(PSP_SCREEN_WIDTH >> 1, PSP_SCREEN_HEIGHT >> 1); // Mouse in the middle of the screen
@@ -148,7 +148,7 @@ Common::List<Graphics::PixelFormat> OSystem_PSP::getSupportedFormats() const {
void OSystem_PSP::initSize(uint width, uint height, const Graphics::PixelFormat *format) {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
+ _pendingUpdate = false;
_displayManager.setSizeAndPixelFormat(width, height, format);
_cursor.setVisible(false);
@@ -167,7 +167,7 @@ int16 OSystem_PSP::getHeight() {
void OSystem_PSP::setPalette(const byte *colors, uint start, uint num) {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
+ _pendingUpdate = false;
_screen.setPartialPalette(colors, start, num);
_cursor.setScreenPalette(colors, start, num);
_cursor.clearKeyColor();
@@ -175,7 +175,7 @@ void OSystem_PSP::setPalette(const byte *colors, uint start, uint num) {
void OSystem_PSP::setCursorPalette(const byte *colors, uint start, uint num) {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
+ _pendingUpdate = false;
_cursor.setCursorPalette(colors, start, num);
_cursor.enableCursorPalette(true);
_cursor.clearKeyColor(); // Do we need this?
@@ -183,25 +183,25 @@ void OSystem_PSP::setCursorPalette(const byte *colors, uint start, uint num) {
void OSystem_PSP::disableCursorPalette(bool disable) {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
+ _pendingUpdate = false;
_cursor.enableCursorPalette(!disable);
}
void OSystem_PSP::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
+ _pendingUpdate = false;
_screen.copyFromRect(buf, pitch, x, y, w, h);
}
Graphics::Surface *OSystem_PSP::lockScreen() {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
+ _pendingUpdate = false;
return _screen.lockAndGetForEditing();
}
void OSystem_PSP::unlockScreen() {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
+ _pendingUpdate = false;
// The screen is always completely updated anyway, so we don't have to force a full update here.
_screen.unlock();
}
@@ -219,7 +219,7 @@ void OSystem_PSP::setShakePos(int shakeOffset) {
void OSystem_PSP::showOverlay() {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
+ _pendingUpdate = false;
_overlay.setVisible(true);
_cursor.setLimits(_overlay.getWidth(), _overlay.getHeight());
_cursor.useGlobalScaler(false); // mouse with overlay is 1:1
@@ -227,7 +227,7 @@ void OSystem_PSP::showOverlay() {
void OSystem_PSP::hideOverlay() {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
+ _pendingUpdate = false;
_overlay.setVisible(false);
_cursor.setLimits(_screen.getWidth(), _screen.getHeight());
_cursor.useGlobalScaler(true); // mouse needs to be scaled with screen
@@ -235,7 +235,7 @@ void OSystem_PSP::hideOverlay() {
void OSystem_PSP::clearOverlay() {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
+ _pendingUpdate = false;
_overlay.clearBuffer();
}
@@ -246,7 +246,7 @@ void OSystem_PSP::grabOverlay(OverlayColor *buf, int pitch) {
void OSystem_PSP::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
+ _pendingUpdate = false;
_overlay.copyFromRect(buf, pitch, x, y, w, h);
}
@@ -266,7 +266,7 @@ void OSystem_PSP::grabPalette(byte *colors, uint start, uint num) {
bool OSystem_PSP::showMouse(bool v) {
DEBUG_ENTER_FUNC();
_pendingUpdate = false;
-
+
PSP_DEBUG_PRINT("%s\n", v ? "true" : "false");
bool last = _cursor.isVisible();
_cursor.setVisible(v);
@@ -276,14 +276,14 @@ bool OSystem_PSP::showMouse(bool v) {
void OSystem_PSP::warpMouse(int x, int y) {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
+ _pendingUpdate = false;
_cursor.setXY(x, y);
}
void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) {
DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
-
+ _pendingUpdate = false;
+
PSP_DEBUG_PRINT("pbuf[%p], w[%u], h[%u], hotspot:X[%d], Y[%d], keycolor[%d], scale[%d], pformat[%p]\n", buf, w, h, hotspotX, hotspotY, keycolor, cursorTargetScale, format);
if (format) {
PSP_DEBUG_PRINT("format: bpp[%d], rLoss[%d], gLoss[%d], bLoss[%d], aLoss[%d], rShift[%d], gShift[%d], bShift[%d], aShift[%d]\n", format->bytesPerPixel, format->rLoss, format->gLoss, format->bLoss, format->aLoss, format->rShift, format->gShift, format->bShift, format->aShift);
@@ -310,16 +310,16 @@ bool OSystem_PSP::pollEvent(Common::Event &event) {
// Time between event polls is usually 5-10ms, so waiting for 4 calls before checking to update the screen should be fine
if (_pendingUpdate) {
_pendingUpdateCounter++;
-
+
if (_pendingUpdateCounter >= 4) {
PSP_DEBUG_PRINT("servicing pending update\n");
updateScreen();
if (!_pendingUpdate) // we handled the update
- _pendingUpdateCounter = 0;
+ _pendingUpdateCounter = 0;
}
- } else
+ } else
_pendingUpdateCounter = 0; // reset the counter, no pending
-
+
return _inputHandler.getAllInputs(event);
}
diff --git a/backends/platform/psp/plugin.ld b/backends/platform/psp/plugin.ld
index db4df45264..7534c15290 100644
--- a/backends/platform/psp/plugin.ld
+++ b/backends/platform/psp/plugin.ld
@@ -208,7 +208,7 @@ SECTIONS
.debug_varnames 0 : { *(.debug_varnames) }
/DISCARD/ : { *(.comment) *(.pdr) }
/DISCARD/ : { *(.note.GNU-stack) }
-
+
. = __plugin_hole_start;
.got : { *(.got.plt) *(.got) } : shorts
/* We want the small data sections together, so single-instruction offsets
@@ -235,5 +235,5 @@ SECTIONS
PROVIDE (___sbss_end = .);
}
-
+
}
diff --git a/backends/platform/psp/png_loader.cpp b/backends/platform/psp/png_loader.cpp
index 417c502e54..978db3eaf9 100644
--- a/backends/platform/psp/png_loader.cpp
+++ b/backends/platform/psp/png_loader.cpp
@@ -33,7 +33,7 @@ PngLoader::Status PngLoader::allocate() {
if (!findImageDimensions()) {
PSP_ERROR("failed to get image dimensions\n");
return BAD_FILE;
- }
+ }
PSP_DEBUG_PRINT("width[%d], height[%d], paletteSize[%d], bitDepth[%d]\n", _width, _height, _paletteSize, _bitDepth);
_buffer->setSize(_width, _height, _sizeBy);
@@ -65,7 +65,7 @@ PngLoader::Status PngLoader::allocate() {
return OUT_OF_MEMORY;
}
return OK;
-}
+}
bool PngLoader::load() {
// Try to load the image
@@ -74,8 +74,8 @@ bool PngLoader::load() {
if (!loadImageIntoBuffer()) {
PSP_DEBUG_PRINT("failed to load image\n");
return false;
- }
-
+ }
+
PSP_DEBUG_PRINT("succeded in loading image\n");
if (_paletteSize == 16) // 4-bit
@@ -99,11 +99,11 @@ void PngLoader::libReadFunc(png_structp pngPtr, png_bytep data, png_size_t lengt
bool PngLoader::basicImageLoad() {
_pngPtr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
- if (!_pngPtr)
+ if (!_pngPtr)
return false;
-
+
png_set_error_fn(_pngPtr, (png_voidp) NULL, (png_error_ptr) NULL, warningFn);
-
+
_infoPtr = png_create_info_struct(_pngPtr);
if (!_infoPtr) {
png_destroy_read_struct(&_pngPtr, png_infopp_NULL, png_infopp_NULL);
@@ -113,16 +113,16 @@ bool PngLoader::basicImageLoad() {
png_set_read_fn(_pngPtr, (void *)_file, libReadFunc);
unsigned int sig_read = 0;
-
+
png_set_sig_bytes(_pngPtr, sig_read);
png_read_info(_pngPtr, _infoPtr);
int interlaceType;
- png_get_IHDR(_pngPtr, _infoPtr, (png_uint_32 *)&_width, (png_uint_32 *)&_height, &_bitDepth,
+ png_get_IHDR(_pngPtr, _infoPtr, (png_uint_32 *)&_width, (png_uint_32 *)&_height, &_bitDepth,
&_colorType, &interlaceType, int_p_NULL, int_p_NULL);
if (_colorType & PNG_COLOR_MASK_PALETTE)
_paletteSize = _infoPtr->num_palette;
-
+
return true;
}
@@ -132,7 +132,7 @@ bool PngLoader::findImageDimensions() {
if (!basicImageLoad())
return false;
-
+
png_destroy_read_struct(&_pngPtr, &_infoPtr, png_infopp_NULL);
return true;
}
@@ -145,7 +145,7 @@ bool PngLoader::loadImageIntoBuffer() {
if (!basicImageLoad())
return false;
-
+
// Strip off 16 bit channels. Not really needed but whatever
png_set_strip_16(_pngPtr);
@@ -158,11 +158,11 @@ bool PngLoader::loadImageIntoBuffer() {
srcPal++;
}
} else { // Not a palettized image
- if (_colorType == PNG_COLOR_TYPE_GRAY && _bitDepth < 8)
+ if (_colorType == PNG_COLOR_TYPE_GRAY && _bitDepth < 8)
png_set_gray_1_2_4_to_8(_pngPtr); // Round up grayscale images
- if (png_get_valid(_pngPtr, _infoPtr, PNG_INFO_tRNS))
+ if (png_get_valid(_pngPtr, _infoPtr, PNG_INFO_tRNS))
png_set_tRNS_to_alpha(_pngPtr); // Convert trans channel to alpha for 32 bits
-
+
png_set_filler(_pngPtr, 0xff, PNG_FILLER_AFTER); // Filler for alpha?
}
@@ -172,7 +172,7 @@ bool PngLoader::loadImageIntoBuffer() {
PSP_ERROR("Couldn't allocate line\n");
return false;
}
-
+
for (size_t y = 0; y < _height; y++) {
png_read_row(_pngPtr, line, png_bytep_NULL);
_buffer->copyFromRect(line, _infoPtr->rowbytes, 0, y, _width, 1); // Copy into buffer
diff --git a/backends/platform/psp/png_loader.h b/backends/platform/psp/png_loader.h
index 5f2064bf96..6b0282621a 100644
--- a/backends/platform/psp/png_loader.h
+++ b/backends/platform/psp/png_loader.h
@@ -36,11 +36,11 @@ private:
static void warningFn(png_structp png_ptr, png_const_charp warning_msg);
static void libReadFunc(png_structp pngPtr, png_bytep data, png_size_t length);
-
+
Common::SeekableReadStream *_file;
Buffer *_buffer;
Palette *_palette;
-
+
uint32 _width;
uint32 _height;
uint32 _paletteSize;
@@ -49,7 +49,7 @@ private:
png_structp _pngPtr;
png_infop _infoPtr;
int _colorType;
-
+
public:
enum Status {
OK,
@@ -57,14 +57,14 @@ public:
BAD_FILE
};
- PngLoader(Common::SeekableReadStream *file, Buffer &buffer, Palette &palette,
+ PngLoader(Common::SeekableReadStream *file, Buffer &buffer, Palette &palette,
Buffer::HowToSize sizeBy = Buffer::kSizeByTextureSize) :
- _file(file), _buffer(&buffer), _palette(&palette),
- _width(0), _height(0), _paletteSize(0),
+ _file(file), _buffer(&buffer), _palette(&palette),
+ _width(0), _height(0), _paletteSize(0),
_bitDepth(0), _sizeBy(sizeBy), _pngPtr(0), _infoPtr(0), _colorType(0) {}
-
+
PngLoader::Status allocate();
- bool load();
+ bool load();
};
#endif /* PSP_PNG_IMAGE_H */
diff --git a/backends/platform/psp/powerman.cpp b/backends/platform/psp/powerman.cpp
index eaadad16c5..869d9b3023 100644
--- a/backends/platform/psp/powerman.cpp
+++ b/backends/platform/psp/powerman.cpp
@@ -84,7 +84,7 @@ bool PowerManager::unregisterForSuspend(Suspendable *item) {
// Unregister from stream list
_listMutex.lock();
-
+
_suspendList.remove(item);
_listCounter--;
@@ -114,11 +114,11 @@ PowerManager::~PowerManager() {
********************************************/
void PowerManager::pollPauseEngine() {
DEBUG_ENTER_FUNC();
-
-
+
+
bool pause = _pauseFlag; // We copy so as not to have multiple values
- if (pause != _pauseFlagOld) {
+ if (pause != _pauseFlagOld) {
if (g_engine) { // Check to see if we have an engine
if (pause && _pauseClientState == UNPAUSED) {
_pauseClientState = PAUSING; // Tell PM we're in the middle of pausing
@@ -147,7 +147,7 @@ bool PowerManager::beginCriticalSection() {
DEBUG_ENTER_FUNC();
bool ret = false;
-
+
_flagMutex.lock();
// Check the access flag
@@ -156,7 +156,7 @@ bool PowerManager::beginCriticalSection() {
PSP_DEBUG_PRINT("I got blocked. ThreadId[%x]\n", sceKernelGetThreadId());
debugPM();
-
+
_threadSleep.wait(_flagMutex);
PSP_DEBUG_PRINT_FUNC("I got released. ThreadId[%x]\n", sceKernelGetThreadId());
@@ -184,11 +184,11 @@ void PowerManager::endCriticalSection() {
if (_suspendFlag) { // If the PM is sleeping, this flag must be set
PSP_DEBUG_PRINT_FUNC("PM is asleep. Waking it up.\n");
debugPM();
-
+
_pmSleep.releaseAll();
-
+
PSP_DEBUG_PRINT_FUNC("Woke up the PM\n");
-
+
debugPM();
}
@@ -198,7 +198,7 @@ void PowerManager::endCriticalSection() {
}
}
- _flagMutex.unlock();
+ _flagMutex.unlock();
}
/*******************************************
@@ -209,7 +209,7 @@ void PowerManager::endCriticalSection() {
void PowerManager::suspend() {
DEBUG_ENTER_FUNC();
- if (_pauseFlag)
+ if (_pauseFlag)
return; // Very important - make sure we only suspend once
scePowerLock(0); // Also critical to make sure PSP doesn't suspend before we're done
@@ -232,9 +232,9 @@ void PowerManager::suspend() {
PspThread::delayMicros(50000); // We wait 50 msec at a time
}
- // It's possible that the polling thread missed our pause event, but there's
+ // It's possible that the polling thread missed our pause event, but there's
// nothing we can do about that.
- // We can't know if there's polling going on or not.
+ // We can't know if there's polling going on or not.
// It's usually not a critical thing anyway.
_PMStatus = kGettingFlagMutexSuspend;
@@ -249,12 +249,12 @@ void PowerManager::suspend() {
// Check if anyone is in a critical section. If so, we'll wait for them
if (_criticalCounter > 0) {
_PMStatus = kWaitCritSectionSuspend;
-
+
_pmSleep.wait(_flagMutex);
-
+
_PMStatus = kDoneWaitingCritSectionSuspend;
- }
-
+ }
+
_flagMutex.unlock();
_PMStatus = kGettingListMutexSuspend;
@@ -275,7 +275,7 @@ void PowerManager::suspend() {
_PMStatus = kDoneSuspend;
scePowerUnlock(0); // Allow the PSP to go to sleep now
-
+
_PMStatus = kDonePowerUnlock;
}
@@ -286,22 +286,22 @@ void PowerManager::suspend() {
********************************************/
void PowerManager::resume() {
DEBUG_ENTER_FUNC();
-
+
_PMStatus = kBeginResume;
// Make sure we can't get another suspend
scePowerLock(0);
_PMStatus = kCheckingPauseFlag;
-
- if (!_pauseFlag)
+
+ if (!_pauseFlag)
return; // Make sure we can only resume once
_PMStatus = kGettingListMutexResume;
// First we notify our Suspendables. Loop over list, calling resume()
_listMutex.lock();
-
+
_PMStatus = kIteratingListResume;
// Iterate
@@ -314,12 +314,12 @@ void PowerManager::resume() {
_PMStatus = kDoneIteratingListResume;
_listMutex.unlock();
-
+
_PMStatus = kGettingFlagMutexResume;
// Now we set the suspend flag to false
_flagMutex.lock();
-
+
_PMStatus = kGotFlagMutexResume;
_suspendFlag = false;
@@ -328,11 +328,11 @@ void PowerManager::resume() {
// Signal the threads to wake up
_threadSleep.releaseAll();
-
+
_PMStatus = kDoneSignallingSuspendedThreadsResume;
_flagMutex.unlock();
-
+
_PMStatus = kDoneResume;
_pauseFlag = false; // Signal engine to unpause -- no mutex needed
diff --git a/backends/platform/psp/psp_main.cpp b/backends/platform/psp/psp_main.cpp
index dba9a8fc2b..d24c614e33 100644
--- a/backends/platform/psp/psp_main.cpp
+++ b/backends/platform/psp/psp_main.cpp
@@ -104,7 +104,7 @@ int exit_callback(void) {
#ifdef ENABLE_PROFILING
gprof_cleanup();
-#endif
+#endif
sceKernelExitGame();
return 0;
@@ -171,12 +171,12 @@ int main(void) {
#endif
/* unit/speed tests */
-#if defined (PSP_ENABLE_UNIT_TESTS) || defined (PSP_ENABLE_SPEED_TESTS)
+#if defined (PSP_ENABLE_UNIT_TESTS) || defined (PSP_ENABLE_SPEED_TESTS)
PSP_INFO_PRINT("running tests\n");
psp_tests();
sceKernelSleepThread(); // that's it. That's all we're doing
#endif
-
+
int res = scummvm_main(argc, argv);
g_system->quit(); // TODO: Consider removing / replacing this!
diff --git a/backends/platform/psp/pspkeyboard.cpp b/backends/platform/psp/pspkeyboard.cpp
index be084d4d38..3dd5e9789b 100644
--- a/backends/platform/psp/pspkeyboard.cpp
+++ b/backends/platform/psp/pspkeyboard.cpp
@@ -299,7 +299,7 @@ bool PSPKeyboard::load() {
}
PngLoader image(file, _buffers[i], _palettes[i]);
-
+
if (image.allocate() != PngLoader::OK) {
PSP_ERROR("Failed to allocate memory for keyboard image %s\n", _guiStrings[i]);
goto ERROR;
@@ -308,7 +308,7 @@ bool PSPKeyboard::load() {
PSP_ERROR("Failed to load image from file %s\n", _guiStrings[i]);
goto ERROR;
}
-
+
delete file;
} /* for loop */
@@ -370,7 +370,7 @@ bool PSPKeyboard::processInput(Common::Event &event, PspEvent &pspEvent, SceCtrl
event.type = DOWN(PSP_CTRL_START) ? Common::EVENT_KEYDOWN : Common::EVENT_KEYUP;
haveEvent = true;
_dirty = true;
- if (UP(PSP_CTRL_START))
+ if (UP(PSP_CTRL_START))
havePspEvent = true;
}
// Check for being in state of moving the keyboard onscreen or pressing select
@@ -385,10 +385,10 @@ bool PSPKeyboard::processInput(Common::Event &event, PspEvent &pspEvent, SceCtrl
else if (_state == kLTriggerDown)
handleLTriggerDownState(pad); // Deal with trigger states
- if (havePspEvent) {
+ if (havePspEvent) {
pspEvent.type = PSP_EVENT_SHOW_VIRTUAL_KB; // tell the input handler we're off
pspEvent.data = false;
- }
+ }
_prevButtons = pad.Buttons;
return haveEvent;
diff --git a/backends/platform/psp/rtc.cpp b/backends/platform/psp/rtc.cpp
index 57edea7e49..f26e5770a6 100644
--- a/backends/platform/psp/rtc.cpp
+++ b/backends/platform/psp/rtc.cpp
@@ -23,13 +23,13 @@
*
*/
-#include <time.h>
+#include <time.h>
#include <psptypes.h>
#include <psprtc.h>
-
-#include "common/scummsys.h"
-#include "backends/platform/psp/rtc.h"
-
+
+#include "common/scummsys.h"
+#include "backends/platform/psp/rtc.h"
+
//#define __PSP_DEBUG_FUNCS__ /* For debugging function calls */
//#define __PSP_DEBUG_PRINT__ /* For debug printouts */
@@ -51,13 +51,13 @@ void PspRtc::init() { // init our starting ticks
#define MS_LOOP_AROUND 4294967 /* We loop every 2^32 / 1000 = 71 minutes */
#define MS_LOOP_CHECK 60000 /* Threading can cause weird mixups without this */
-// Note that after we fill up 32 bits ie 50 days we'll loop back to 0, which may cause
+// Note that after we fill up 32 bits ie 50 days we'll loop back to 0, which may cause
// unpredictable results
uint32 PspRtc::getMillis() {
uint32 ticks[2];
-
+
sceRtcGetCurrentTick((u64 *)ticks); // can introduce weird thread delays
-
+
uint32 millis = ticks[0]/1000;
millis -= _startMillis; // get ms since start of program
@@ -66,22 +66,22 @@ uint32 PspRtc::getMillis() {
_looped = true;
_milliOffset += MS_LOOP_AROUND; // add the needed offset
PSP_DEBUG_PRINT("looping around. last ms[%d], curr ms[%d]\n", _lastMillis, millis);
- }
+ }
} else {
_looped = false;
}
-
- _lastMillis = millis;
-
+
+ _lastMillis = millis;
+
return millis + _milliOffset;
}
uint32 PspRtc::getMicros() {
uint32 ticks[2];
-
+
sceRtcGetCurrentTick((u64 *)ticks);
ticks[0] -= _startMicros;
-
- return ticks[0];
+
+ return ticks[0];
}
diff --git a/backends/platform/psp/rtc.h b/backends/platform/psp/rtc.h
index 7c1a28474d..841d636e2b 100644
--- a/backends/platform/psp/rtc.h
+++ b/backends/platform/psp/rtc.h
@@ -27,7 +27,7 @@
#define _PSP_RTC_H_
#include "common/singleton.h"
-
+
class PspRtc : public Common::Singleton<PspRtc> {
private:
uint32 _startMillis;
@@ -47,4 +47,4 @@ public:
uint32 getMicros();
};
-#endif \ No newline at end of file
+#endif
diff --git a/backends/platform/psp/tests.cpp b/backends/platform/psp/tests.cpp
index f65c13ae83..4064ee1d98 100644
--- a/backends/platform/psp/tests.cpp
+++ b/backends/platform/psp/tests.cpp
@@ -23,13 +23,13 @@
*
*/
-// PSP speed and unit tests. Activate in tests.h
-// You may also want to build without any engines.
-
+// PSP speed and unit tests. Activate in tests.h
+// You may also want to build without any engines.
+
#include "backends/platform/psp/tests.h"
-#if defined (PSP_ENABLE_UNIT_TESTS) || defined (PSP_ENABLE_SPEED_TESTS)
-
+#if defined (PSP_ENABLE_UNIT_TESTS) || defined (PSP_ENABLE_SPEED_TESTS)
+
#include "common/scummsys.h"
#include <pspiofilemgr_fcntl.h>
#include <pspiofilemgr_stat.h>
@@ -49,16 +49,16 @@
#define UNCACHED(x) ((byte *)(((uint32)(x)) | 0x40000000)) /* make an uncached access */
#define CACHED(x) ((byte *)(((uint32)(x)) & 0xBFFFFFFF)) /* make an uncached access into a cached one */
-
+
//#define __PSP_DEBUG_FUNCS__
//#define __PSP_DEBUG_PRINT__
-
+
// Results: (333Mhz/222Mhz)
// Getting a tick: 1-2 us
// Getting a time structure: 9/14us
// ie. using a tick and just dividing by 1000 saves us time.
-
-#include "backends/platform/psp/trace.h"
+
+#include "backends/platform/psp/trace.h"
class PspSpeedTests {
public:
@@ -67,11 +67,11 @@ public:
void seekSpeed();
void msReadSpeed();
void threadFunctionsSpeed();
- void semaphoreSpeed();
+ void semaphoreSpeed();
static int threadFunc(SceSize args, void *argp);
void semaphoreManyThreadSpeed();
void fastCopySpeed();
-
+
private:
enum {
MEMCPY_BUFFER_SIZE = 8192
@@ -95,16 +95,16 @@ void PspSpeedTests::tickSpeed() {
uint32 currentTicks1[2];
uint32 currentTicks2[2];
-
+
sceRtcGetCurrentTick((u64 *)currentTicks1);
sceRtcGetCurrentTick((u64 *)currentTicks2);
PSP_INFO_PRINT("current tick[%x %x][%u %u]\n", currentTicks1[0], currentTicks1[1], currentTicks1[0], currentTicks1[1]);
PSP_INFO_PRINT("current tick[%x %x][%u %u]\n", currentTicks2[0], currentTicks2[1], currentTicks2[0], currentTicks2[1]);
-
+
pspTime time;
sceRtcSetTick(&time, (u64 *)currentTicks2);
- PSP_INFO_PRINT("current tick in time, year[%d] month[%d] day[%d] hour[%d] minutes[%d] seconds[%d] us[%d]\n", time.year, time.month, time.day, time.hour, time.minutes, time.seconds, time.microseconds);
-
+ PSP_INFO_PRINT("current tick in time, year[%d] month[%d] day[%d] hour[%d] minutes[%d] seconds[%d] us[%d]\n", time.year, time.month, time.day, time.hour, time.minutes, time.seconds, time.microseconds);
+
pspTime time1;
pspTime time2;
sceRtcGetCurrentClockLocalTime(&time1);
@@ -119,7 +119,7 @@ void PspSpeedTests::getMicrosSpeed() {
time2 = PspRtc::instance().getMicros();
time3 = PspRtc::instance().getMicros();
time4 = PspRtc::instance().getMicros();
-
+
PSP_INFO_PRINT("getMicros() times: %d, %d, %d\n", time4-time3, time3-time2, time2-time1);
}
@@ -128,8 +128,8 @@ void PspSpeedTests::readAndTime(uint32 bytes, char *buffer, FILE *file) {
// test minimal read
fread(buffer, bytes, 1, file);
uint32 time2 = PspRtc::instance().getMicros();
-
- PSP_INFO_PRINT("Reading %d byte takes %dus\n", bytes, time2-time1);
+
+ PSP_INFO_PRINT("Reading %d byte takes %dus\n", bytes, time2-time1);
}
/*
@@ -158,7 +158,7 @@ void PspSpeedTests::msReadSpeed() {
file = fopen("ms0:/psp/music/track1.mp3", "r");
char *buffer = (char *)malloc(2 * 1024 * 1024);
-
+
readAndTime(1, buffer, file);
readAndTime(10, buffer, file);
readAndTime(50, buffer, file);
@@ -170,32 +170,32 @@ void PspSpeedTests::msReadSpeed() {
readAndTime(6000, buffer, file);
readAndTime(7000, buffer, file);
readAndTime(8000, buffer, file);
- readAndTime(9000, buffer, file);
+ readAndTime(9000, buffer, file);
readAndTime(10000, buffer, file);
readAndTime(30000, buffer, file);
readAndTime(50000, buffer, file);
readAndTime(80000, buffer, file);
readAndTime(100000, buffer, file);
-
+
fclose(file);
- free(buffer);
+ free(buffer);
}
-
+
void PspSpeedTests::seekAndTime(int bytes, int origin, FILE *file) {
char buffer[1000];
-
+
uint32 time1 = PspRtc::instance().getMicros();
// test minimal read
fseek(file, bytes, origin);
uint32 time2 = PspRtc::instance().getMicros();
-
+
PSP_INFO_PRINT("Seeking %d byte from %d took %dus\n", bytes, origin, time2-time1);
time1 = PspRtc::instance().getMicros();
// test minimal read
fread(buffer, 1000, 1, file);
time2 = PspRtc::instance().getMicros();
-
+
PSP_INFO_PRINT("Reading 1000 bytes took %dus\n", time2-time1);
}
@@ -246,9 +246,9 @@ int PspSpeedTests::getThreadIdSpeed() {
uint32 time1 = PspRtc::instance().getMicros();
int threadId = sceKernelGetThreadId();
uint32 time2 = PspRtc::instance().getMicros();
-
+
PSP_INFO_PRINT("Getting thread ID %d took %dus\n", threadId, time2-time1);
-
+
return threadId;
}
@@ -257,7 +257,7 @@ void PspSpeedTests::getPrioritySpeed() {
uint32 time1 = PspRtc::instance().getMicros();
int priority = sceKernelGetThreadCurrentPriority();
uint32 time2 = PspRtc::instance().getMicros();
-
+
PSP_INFO_PRINT("Getting thread priority %d took %dus\n", priority, time2-time1);
}
@@ -266,7 +266,7 @@ void PspSpeedTests::changePrioritySpeed(int id, int priority) {
uint32 time1 = PspRtc::instance().getMicros();
sceKernelChangeThreadPriority(id, priority);
uint32 time2 = PspRtc::instance().getMicros();
-
+
PSP_INFO_PRINT("Changing thread priority to %d for id %d took %dus\n", priority, id, time2-time1);
}
@@ -280,53 +280,53 @@ void PspSpeedTests::threadFunctionsSpeed() {
changePrioritySpeed(id, 30);
changePrioritySpeed(id, 35);
changePrioritySpeed(id, 25);
-
+
// test context switch time
for (int i=0; i<10; i++) {
uint time1 = PspRtc::instance().getMicros();
PspThread::delayMicros(0);
uint time2 = PspRtc::instance().getMicros();
- PSP_INFO_PRINT("poll %d. context switch Time = %dus\n", i, time2-time1); // 10-15us
- }
+ PSP_INFO_PRINT("poll %d. context switch Time = %dus\n", i, time2-time1); // 10-15us
+ }
}
-
-void PspSpeedTests::semaphoreSpeed() {
+
+void PspSpeedTests::semaphoreSpeed() {
PspSemaphore sem(1);
-
+
uint32 time1 = PspRtc::instance().getMicros();
-
+
sem.take();
-
+
uint32 time2 = PspRtc::instance().getMicros();
-
+
PSP_INFO_PRINT("taking semaphore took %d us\n", time2-time1); // 10us
-
+
uint32 time3 = PspRtc::instance().getMicros();
-
+
sem.give();
-
+
uint32 time4 = PspRtc::instance().getMicros();
PSP_INFO_PRINT("releasing semaphore took %d us\n", time4-time3); //10us-55us
}
int PspSpeedTests::threadFunc(SceSize args, void *argp) {
PSP_INFO_PRINT("thread %x created.\n", sceKernelGetThreadId());
-
+
_sem.take();
-
+
PSP_INFO_PRINT("grabbed semaphore. Quitting thread\n");
-
+
return 0;
}
-void PspSpeedTests::semaphoreManyThreadSpeed() {
-
+void PspSpeedTests::semaphoreManyThreadSpeed() {
+
// create 4 threads
for (int i=0; i<4; i++) {
int thid = sceKernelCreateThread("my_thread", PspSpeedTests::threadFunc, 0x18, 0x10000, THREAD_ATTR_USER, NULL);
sceKernelStartThread(thid, 0, 0);
}
-
+
PSP_INFO_PRINT("main thread. created threads\n");
uint32 threads = _sem.numOfWaitingThreads();
@@ -334,10 +334,10 @@ void PspSpeedTests::semaphoreManyThreadSpeed() {
threads = _sem.numOfWaitingThreads();
PSP_INFO_PRINT("main thread: waiting threads[%d]\n", threads);
}
-
+
PSP_INFO_PRINT("main: semaphore value[%d]\n", _sem.getValue());
PSP_INFO_PRINT("main thread: waiting threads[%d]\n", _sem.numOfWaitingThreads());
-
+
_sem.give(4);
}
@@ -346,31 +346,31 @@ void PspSpeedTests::fastCopySpecificSize(byte *dst, byte *src, uint32 bytes) {
uint32 fastcopyTime, memcpyTime;
const int iterations = 2000;
int intc;
-
+
intc = pspSdkDisableInterrupts();
-
+
time1 = PspRtc::instance().getMicros();
for (int i=0; i<iterations; i++) {
PspMemory::fastCopy(dst, src, bytes);
- }
+ }
time2 = PspRtc::instance().getMicros();
-
+
pspSdkEnableInterrupts(intc);
-
+
fastcopyTime = time2-time1;
-
+
intc = pspSdkDisableInterrupts();
-
+
time1 = PspRtc::instance().getMicros();
for (int i=0; i<iterations; i++) {
memcpy(dst, src, bytes);
- }
+ }
time2 = PspRtc::instance().getMicros();
-
+
pspSdkEnableInterrupts(intc);
-
+
memcpyTime = time2-time1;
-
+
PSP_INFO_PRINT("%d bytes. memcpy[%d], fastcopy[%d]\n", bytes, memcpyTime, fastcopyTime);
}
@@ -397,16 +397,16 @@ void PspSpeedTests::fastCopySpeed() {
uint32 *bufferSrc32 = (uint32 *)memalign(16, MEMCPY_BUFFER_SIZE);
uint32 *bufferDst32 = (uint32 *)memalign(16, MEMCPY_BUFFER_SIZE);
-
+
// fill buffer 1
for (int i=0; i<MEMCPY_BUFFER_SIZE/4; i++)
bufferSrc32[i] = i | (((MEMCPY_BUFFER_SIZE/4)-i)<<16);
-
+
// print buffer
for (int i=0; i<50; i++)
PSP_INFO_PRINT("%x ", bufferSrc32[i]);
PSP_INFO_PRINT("\n");
-
+
byte *bufferSrc = ((byte *)bufferSrc32);
byte *bufferDst = ((byte *)bufferDst32);
@@ -415,7 +415,7 @@ void PspSpeedTests::fastCopySpeed() {
fastCopyDifferentSizes(bufferDst+1, bufferSrc+1);
fastCopyDifferentSizes(bufferDst, bufferSrc+1);
fastCopyDifferentSizes(bufferDst+1, bufferSrc);
-
+
PSP_INFO_PRINT("\n\ndst cached, src uncached: -----------------\n");
bufferSrc = UNCACHED(bufferSrc);
fastCopyDifferentSizes(bufferDst, bufferSrc);
@@ -429,7 +429,7 @@ void PspSpeedTests::fastCopySpeed() {
fastCopyDifferentSizes(bufferDst+1, bufferSrc+1);
fastCopyDifferentSizes(bufferDst, bufferSrc+1);
fastCopyDifferentSizes(bufferDst+1, bufferSrc);
-
+
PSP_INFO_PRINT("\n\ndst uncached, src cached: -------------------\n");
bufferSrc = CACHED(bufferSrc);
fastCopyDifferentSizes(bufferDst, bufferSrc);
@@ -437,7 +437,7 @@ void PspSpeedTests::fastCopySpeed() {
fastCopyDifferentSizes(bufferDst, bufferSrc+1);
fastCopyDifferentSizes(bufferDst+1, bufferSrc);
-
+
free(bufferSrc32);
free(bufferDst32);
}
@@ -453,11 +453,11 @@ private:
enum {
MEMCPY_BUFFER_SIZE = 8192
};
-
+
void fastCopySpecificSize(byte *dst, byte *src, uint32 bytes, bool swap = false);
void fastCopyDifferentSizes(byte *dst, byte *src, bool swap = false);
-
-};
+
+};
void PspUnitTests::testFastCopy() {
PSP_INFO_PRINT("running fastcopy unit test ***********\n");
@@ -465,19 +465,19 @@ void PspUnitTests::testFastCopy() {
uint32 *bufferSrc32 = (uint32 *)memalign(16, MEMCPY_BUFFER_SIZE);
uint32 *bufferDst32 = (uint32 *)memalign(16, MEMCPY_BUFFER_SIZE);
-
+
// fill buffer 1
for (int i=0; i<MEMCPY_BUFFER_SIZE/4; i++)
bufferSrc32[i] = i | (((MEMCPY_BUFFER_SIZE/4)-i)<<16);
-
+
// print buffer
for (int i=0; i<50; i++)
PSP_INFO_PRINT("%x ", bufferSrc32[i]);
PSP_INFO_PRINT("\n");
-
+
byte *bufferSrc = ((byte *)bufferSrc32);
byte *bufferDst = ((byte *)bufferDst32);
-
+
fastCopyDifferentSizes(bufferDst, bufferSrc, true);
fastCopyDifferentSizes(bufferDst+1, bufferSrc+1);
fastCopyDifferentSizes(bufferDst+2, bufferSrc+2, true);
@@ -491,12 +491,12 @@ void PspUnitTests::testFastCopy() {
fastCopyDifferentSizes(bufferDst+2, bufferSrc+1);
fastCopyDifferentSizes(bufferDst+2, bufferSrc+3);
fastCopyDifferentSizes(bufferDst+3, bufferSrc+1);
- fastCopyDifferentSizes(bufferDst+3, bufferSrc+2);
-
+ fastCopyDifferentSizes(bufferDst+3, bufferSrc+2);
+
free(bufferSrc32);
free(bufferDst32);
}
-
+
void PspUnitTests::fastCopyDifferentSizes(byte *dst, byte *src, bool swap) {
fastCopySpecificSize(dst, src, 1);
fastCopySpecificSize(dst, src, 2, swap);
@@ -509,7 +509,7 @@ void PspUnitTests::fastCopyDifferentSizes(byte *dst, byte *src, bool swap) {
fastCopySpecificSize(dst, src, 12, swap);
fastCopySpecificSize(dst, src, 13);
fastCopySpecificSize(dst, src, 14, swap);
- fastCopySpecificSize(dst, src, 15);
+ fastCopySpecificSize(dst, src, 15);
fastCopySpecificSize(dst, src, 16, swap);
fastCopySpecificSize(dst, src, 17);
fastCopySpecificSize(dst, src, 18, swap);
@@ -529,16 +529,16 @@ void PspUnitTests::fastCopyDifferentSizes(byte *dst, byte *src, bool swap) {
void PspUnitTests::fastCopySpecificSize(byte *dst, byte *src, uint32 bytes, bool swap) {
memset(dst, 0, bytes);
PspMemory::fastCopy(dst, src, bytes);
-
+
if (swap) { // test swap also
memset(dst, 0, bytes);
-
+
// pixelformat for swap
PSPPixelFormat format;
format.set(PSPPixelFormat::Type_4444, true);
-
+
PspMemory::fastSwap(dst, src, bytes, format);
- }
+ }
}
// This function leaks. For now I don't care
@@ -549,23 +549,23 @@ bool PspUnitTests::testFileSystem() {
int i;
Common::WriteStream *wrStream;
Common::SeekableReadStream *rdStream;
-
+
PSP_INFO_PRINT("testing fileSystem...\n");
-
+
// fill buffer
for (i=0; i<(int)BufSize; i += 4) {
buffer[i] = 'A';
buffer[i + 1] = 'B';
buffer[i + 2] = 'C';
buffer[i + 3] = 'D';
- }
-
+ }
+
// create a file
const char *path = "./file.test";
Common::FSNode file(path);
-
+
PSP_INFO_PRINT("creating write stream...\n");
-
+
wrStream = file.createWriteStream();
if (!wrStream) {
PSP_ERROR("%s couldn't be created.\n", path);
@@ -576,9 +576,9 @@ bool PspUnitTests::testFileSystem() {
char* index = buffer;
int32 totalLength = BufSize;
int32 curLength = 50;
-
+
PSP_INFO_PRINT("writing...\n");
-
+
while(totalLength - curLength > 0) {
if ((int)wrStream->write(index, curLength) != curLength) {
PSP_ERROR("couldn't write %d bytes\n", curLength);
@@ -595,22 +595,22 @@ bool PspUnitTests::testFileSystem() {
PSP_ERROR("couldn't write %d bytes\n", curLength);
return false;
}
-
+
delete wrStream;
-
+
PSP_INFO_PRINT("reading...\n");
-
+
rdStream = file.createReadStream();
if (!rdStream) {
PSP_ERROR("%s couldn't be created.\n", path);
return false;
}
-
+
// seek to beginning
if (!rdStream->seek(0, SEEK_SET)) {
PSP_ERROR("couldn't seek to the beginning after writing the file\n");
return false;
- }
+ }
// read the contents
char *readBuffer = new char[BufSize + 4];
@@ -619,96 +619,96 @@ bool PspUnitTests::testFileSystem() {
while (rdStream->read(index, 100) == 100) {
index += 100;
}
-
+
if (!rdStream->eos()) {
PSP_ERROR("didn't find EOS at end of stream\n");
- return false;
+ return false;
}
-
+
// compare
for (i=0; i<(int)BufSize; i++)
if (buffer[i] != readBuffer[i]) {
PSP_ERROR("reading/writing mistake at %x. Got %x instead of %x\n", i, readBuffer[i], buffer[i]);
return false;
}
-
+
// Check for exceeding limit
for (i=0; i<4; i++) {
if (readBuffer[BufSize + i]) {
PSP_ERROR("read exceeded limits. %d = %x\n", BufSize + i, readBuffer[BufSize + i]);
}
- }
-
+ }
+
delete rdStream;
-
+
PSP_INFO_PRINT("writing...\n");
-
+
wrStream = file.createWriteStream();
if (!wrStream) {
PSP_ERROR("%s couldn't be created.\n", path);
return false;
}
-
+
const char *phrase = "Jello is really fabulous";
uint32 phraseLen = strlen(phrase);
-
+
int ret;
if ((ret = wrStream->write(phrase, phraseLen)) != (int)phraseLen) {
PSP_ERROR("couldn't write phrase. Got %d instead of %d\n", ret, phraseLen);
return false;
}
-
+
PSP_INFO_PRINT("reading...\n");
-
+
delete wrStream;
rdStream = file.createReadStream();
if (!rdStream) {
PSP_ERROR("%s couldn't be created.\n", path);
return false;
}
-
+
char *readPhrase = new char[phraseLen + 2];
memset(readPhrase, 0, phraseLen + 2);
-
+
if ((ret = rdStream->read(readPhrase, phraseLen) != phraseLen)) {
PSP_ERROR("read error on phrase. Got %d instead of %d\n", ret, phraseLen);
return false;
}
-
+
for (i=0; i<(int)phraseLen; i++) {
if (readPhrase[i] != phrase[i]) {
PSP_ERROR("bad read/write in phrase. At %d, %x != %x\n", i, readPhrase[i], phrase[i]);
return false;
}
- }
-
+ }
+
// check for exceeding
if (readPhrase[i] != 0) {
PSP_ERROR("found excessive copy in phrase. %c at %d\n", readPhrase[i], i);
return false;
}
-
+
PSP_INFO_PRINT("trying to read end...\n");
-
+
// seek to end
if (!rdStream->seek(0, SEEK_END)) {
PSP_ERROR("couldn't seek to end for append\n");
return false;
};
-
+
// try to read
if (rdStream->read(readPhrase, 2) || !rdStream->eos()) {
PSP_ERROR("was able to read at end of file\n");
return false;
}
-
+
PSP_INFO_PRINT("ok\n");
return true;
}
void psp_tests() {
PSP_INFO_PRINT("in tests\n");
-
+
#ifdef PSP_ENABLE_SPEED_TESTS
// Speed tests
PspSpeedTests speedTests;
@@ -718,18 +718,18 @@ void psp_tests() {
speedTests.seekSpeed();
speedTests.msReadSpeed();
speedTests.threadFunctionsSpeed();
- speedTests.semaphoreSpeed();
+ speedTests.semaphoreSpeed();
speedTests.semaphoreManyThreadSpeed();
speedTests.fastCopySpeed();
-#endif
-
+#endif
+
#ifdef PSP_ENABLE_UNIT_TESTS
// Unit tests
PspUnitTests unitTests;
-
+
//unitTests.testFastCopy();
unitTests.testFileSystem();
-#endif
-}
+#endif
+}
-#endif /* (PSP_ENABLE_UNIT_TESTS) || defined (PSP_ENABLE_SPEED_TESTS) */ \ No newline at end of file
+#endif /* (PSP_ENABLE_UNIT_TESTS) || defined (PSP_ENABLE_SPEED_TESTS) */
diff --git a/backends/platform/psp/tests.h b/backends/platform/psp/tests.h
index 1518acfb4c..9af7ba8d7d 100644
--- a/backends/platform/psp/tests.h
+++ b/backends/platform/psp/tests.h
@@ -23,14 +23,14 @@
*
*/
-#ifndef _PSP_TESTS_H_
+#ifndef _PSP_TESTS_H_
#define _PSP_TESTS_H_
//#define PSP_ENABLE_UNIT_TESTS // run unit tests
//#define PSP_ENABLE_SPEED_TESTS // run speed tests
-#if defined (PSP_ENABLE_UNIT_TESTS) || defined (PSP_ENABLE_SPEED_TESTS)
+#if defined (PSP_ENABLE_UNIT_TESTS) || defined (PSP_ENABLE_SPEED_TESTS)
void psp_tests();
#endif
-#endif /* _PSP_TESTS_H_ */ \ No newline at end of file
+#endif /* _PSP_TESTS_H_ */
diff --git a/backends/platform/psp/thread.cpp b/backends/platform/psp/thread.cpp
index 916b1e553b..f9e497a342 100644
--- a/backends/platform/psp/thread.cpp
+++ b/backends/platform/psp/thread.cpp
@@ -23,12 +23,12 @@
*
*/
-#include <pspthreadman.h>
+#include <pspthreadman.h>
#include "backends/platform/psp/thread.h"
#include "backends/platform/psp/trace.h"
-
-// Class PspThreadable --------------------------------------------------
+
+// Class PspThreadable --------------------------------------------------
// Inherit this to create C++ threads easily
bool PspThreadable::threadCreateAndStart(const char *threadName, int priority, int stackSize, bool useVfpu /*= false*/) {
@@ -38,41 +38,41 @@ bool PspThreadable::threadCreateAndStart(const char *threadName, int priority, i
PSP_ERROR("thread already created!\n");
return false;
}
-
+
_threadId = sceKernelCreateThread(threadName, __threadCallback, priority, stackSize, THREAD_ATTR_USER, 0); // add VFPU support
if (_threadId < 0) {
PSP_ERROR("failed to create %s thread. Error code %d\n", threadName, _threadId);
return false;
}
-
+
// We want to pass the pointer to this, but we'll have to take address of this so use a little trick
PspThreadable *_this = this;
-
+
if (sceKernelStartThread(_threadId, sizeof(uint32 *), &_this) < 0) {
PSP_ERROR("failed to start %s thread id[%d]\n", threadName, _threadId);
return false;
}
-
- PSP_DEBUG_PRINT("Started %s thread with id[%x]\n", threadName, _threadId);
-
+
+ PSP_DEBUG_PRINT("Started %s thread with id[%x]\n", threadName, _threadId);
+
return true;
}
// Callback function to be called by PSP kernel
int PspThreadable::__threadCallback(SceSize, void *__this) {
DEBUG_ENTER_FUNC();
-
+
PspThreadable *_this = *(PspThreadable **)__this; // Dereference the copied value which was 'this'
-
+
_this->threadFunction(); // call the virtual function
-
+
return 0;
}
// PspThread class
// Utilities to access general thread functions
-
+
void PspThread::delayMillis(uint32 ms) {
sceKernelDelayThread(ms * 1000);
}
@@ -90,8 +90,8 @@ void PspThread::delayMicros(uint32 us) {
PspSemaphore::PspSemaphore(int initialValue, int maxValue/*=255*/) {
DEBUG_ENTER_FUNC();
_handle = 0;
- _handle = (uint32)sceKernelCreateSema("ScummVM Sema", 0 /* attr */,
- initialValue, maxValue,
+ _handle = (uint32)sceKernelCreateSema("ScummVM Sema", 0 /* attr */,
+ initialValue, maxValue,
0 /*option*/);
if (!_handle)
PSP_ERROR("failed to create semaphore.\n");
@@ -108,10 +108,10 @@ int PspSemaphore::numOfWaitingThreads() {
DEBUG_ENTER_FUNC();
SceKernelSemaInfo info;
info.numWaitThreads = 0;
-
+
if (sceKernelReferSemaStatus((SceUID)_handle, &info) < 0)
PSP_ERROR("failed to retrieve semaphore info for handle %d\n", _handle);
-
+
return info.numWaitThreads;
}
@@ -119,10 +119,10 @@ int PspSemaphore::getValue() {
DEBUG_ENTER_FUNC();
SceKernelSemaInfo info;
info.currentCount = 0;
-
+
if (sceKernelReferSemaStatus((SceUID)_handle, &info) < 0)
PSP_ERROR("failed to retrieve semaphore info for handle %d\n", _handle);
-
+
return info.currentCount;
}
@@ -130,18 +130,18 @@ bool PspSemaphore::pollForValue(int value) {
DEBUG_ENTER_FUNC();
if (sceKernelPollSema((SceUID)_handle, value) < 0)
return false;
-
+
return true;
}
// false: timeout or error
bool PspSemaphore::takeWithTimeOut(uint32 timeOut) {
DEBUG_ENTER_FUNC();
-
+
uint32 *pTimeOut = 0;
- if (timeOut)
+ if (timeOut)
pTimeOut = &timeOut;
-
+
if (sceKernelWaitSema(_handle, 1, pTimeOut) < 0) // we always wait for 1
return false;
return true;
@@ -149,9 +149,9 @@ bool PspSemaphore::takeWithTimeOut(uint32 timeOut) {
bool PspSemaphore::give(int num /*=1*/) {
DEBUG_ENTER_FUNC();
-
+
if (sceKernelSignalSema((SceUID)_handle, num) < 0)
- return false;
+ return false;
return true;
}
@@ -161,7 +161,7 @@ bool PspMutex::lock() {
DEBUG_ENTER_FUNC();
int threadId = sceKernelGetThreadId();
bool ret = true;
-
+
if (_ownerId == threadId) {
_recursiveCount++;
} else {
@@ -176,19 +176,19 @@ bool PspMutex::unlock() {
DEBUG_ENTER_FUNC();
int threadId = sceKernelGetThreadId();
bool ret = true;
-
+
if (_ownerId != threadId) {
PSP_ERROR("attempt to unlock mutex by thread[%x] as opposed to owner[%x]\n",
threadId, _ownerId);
return false;
}
-
+
if (_recursiveCount) {
_recursiveCount--;
} else {
_ownerId = 0;
ret = _semaphore.give(1);
- }
+ }
return ret;
}
@@ -200,7 +200,7 @@ void PspCondition::releaseAll() {
if (_waitingThreads > _signaledThreads) { // we have signals to issue
int numWaiting = _waitingThreads - _signaledThreads; // threads we haven't signaled
_signaledThreads = _waitingThreads;
-
+
_waitSem.give(numWaiting);
_mutex.unlock();
for (int i=0; i<numWaiting; i++) // wait for threads to tell us they're awake
diff --git a/backends/platform/psp/thread.h b/backends/platform/psp/thread.h
index de1c10a2aa..bbad2a9ead 100644
--- a/backends/platform/psp/thread.h
+++ b/backends/platform/psp/thread.h
@@ -34,7 +34,7 @@ class PspThreadable {
protected:
int _threadId;
virtual void threadFunction() = 0; // this function will be called when the thread starts
-public:
+public:
PspThreadable() : _threadId(-1) {} // constructor
virtual ~PspThreadable() {} // destructor
static int __threadCallback(SceSize, void *__this); // used to get called by sceKernelStartThread() Don't override
@@ -43,7 +43,7 @@ public:
// class for thread utils
class PspThread {
-public:
+public:
// static functions
static void delayMillis(uint32 ms); // delay the current thread
static void delayMicros(uint32 us);
@@ -106,7 +106,7 @@ enum StackSizes {
STACK_DISPLAY_THREAD = 2 * 1024,
STACK_POWER_THREAD = 4 * 1024
};
-
+
#endif /* PSP_THREADS_H */
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index 5c901ba711..e7f9a06d80 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -412,7 +412,7 @@ protected:
// Scroll lock state - since SDL doesn't track it
bool _scrollLock;
-
+
// joystick
SDL_Joystick *_joystick;
diff --git a/backends/platform/symbian/AdaptAllMMPs.pl b/backends/platform/symbian/AdaptAllMMPs.pl
index 8b7151c180..a81eab9af6 100644
--- a/backends/platform/symbian/AdaptAllMMPs.pl
+++ b/backends/platform/symbian/AdaptAllMMPs.pl
@@ -8,41 +8,41 @@ chdir("../../../");
@mmp_files = (
# Engine Project files
- "mmp/scummvm_agi.mmp",
- "mmp/scummvm_agos.mmp",
- "mmp/scummvm_cine.mmp",
- "mmp/scummvm_cruise.mmp",
- "mmp/scummvm_drascula.mmp",
- "mmp/scummvm_gob.mmp",
- "mmp/scummvm_groovie.mmp",
- "mmp/scummvm_kyra.mmp",
- "mmp/scummvm_lure.mmp",
+ "mmp/scummvm_agi.mmp",
+ "mmp/scummvm_agos.mmp",
+ "mmp/scummvm_cine.mmp",
+ "mmp/scummvm_cruise.mmp",
+ "mmp/scummvm_drascula.mmp",
+ "mmp/scummvm_gob.mmp",
+ "mmp/scummvm_groovie.mmp",
+ "mmp/scummvm_kyra.mmp",
+ "mmp/scummvm_lure.mmp",
"mmp/scummvm_m4.mmp",
"mmp/scummvm_made.mmp",
- "mmp/scummvm_parallaction.mmp",
- "mmp/scummvm_queen.mmp",
- "mmp/scummvm_saga.mmp",
- "mmp/scummvm_scumm.mmp",
- "mmp/scummvm_sky.mmp",
- "mmp/scummvm_sword1.mmp",
+ "mmp/scummvm_parallaction.mmp",
+ "mmp/scummvm_queen.mmp",
+ "mmp/scummvm_saga.mmp",
+ "mmp/scummvm_scumm.mmp",
+ "mmp/scummvm_sky.mmp",
+ "mmp/scummvm_sword1.mmp",
"mmp/scummvm_sword2.mmp",
- "mmp/scummvm_touche.mmp",
- "mmp/scummvm_tinsel.mmp",
- "mmp/scummvm_tucker.mmp",
- "mmp/scummvm_sci.mmp",
- "mmp/scummvm_draci.mmp",
- "mmp/scummvm_teenagent.mmp",
- "mmp/scummvm_mohawk.mmp",
- "mmp/scummvm_hugo.mmp",
+ "mmp/scummvm_touche.mmp",
+ "mmp/scummvm_tinsel.mmp",
+ "mmp/scummvm_tucker.mmp",
+ "mmp/scummvm_sci.mmp",
+ "mmp/scummvm_draci.mmp",
+ "mmp/scummvm_teenagent.mmp",
+ "mmp/scummvm_mohawk.mmp",
+ "mmp/scummvm_hugo.mmp",
# Target Platform Project Files
- "S60/ScummVM_S60.mmp",
- "S60v3/ScummVM_S60v3.mmp",
- "S60v3/ScummVM_A0000658_S60v3.mmp",
- "S80/ScummVM_S80.mmp",
+ "S60/ScummVM_S60.mmp",
+ "S60v3/ScummVM_S60v3.mmp",
+ "S60v3/ScummVM_A0000658_S60v3.mmp",
+ "S80/ScummVM_S80.mmp",
"S90/ScummVM_S90.mmp",
- "UIQ2/ScummVM_UIQ2.mmp",
+ "UIQ2/ScummVM_UIQ2.mmp",
"UIQ3/ScummVM_UIQ3.mmp",
- "UIQ3/ScummVM_A0000658_UIQ3.mmp"
+ "UIQ3/ScummVM_A0000658_UIQ3.mmp"
);
@@ -75,7 +75,7 @@ my @sections_kyra = ("", "ENABLE_LOL"); # special sections for engine KYRA
my @sections_agos = ("", "ENABLE_AGOS2"); # special sections for engine AGOS
# files excluded from build, case insensitive, will be matched in filename string only
-my @excludes_snd = (
+my @excludes_snd = (
"mt32.*",
"fluidsynth.cpp",
"i386.cpp",
@@ -86,14 +86,14 @@ my @excludes_snd = (
"rate.*" # not really needed, USE_ARM_SOUND_ASM currently not parsed correctly,
# "rate[_arm|_arm_asm].(cpp|s)" will be added later based on WINS/ARM build!
# These #defines for compile time are set in portdefs.h
-);
+);
-my @excludes_graphics = (
+my @excludes_graphics = (
"iff.cpp"
-);
+);
-my @excludes_gui = (
-);
+my @excludes_gui = (
+);
# the USE_ARM_* defines not parsed correctly, exclude manually:
my @excludes_scumm = (
@@ -147,7 +147,7 @@ Done. Enjoy :P
##################################################################################################################
##################################################################################################################
-# parses multiple sections per mmp/module
+# parses multiple sections per mmp/module
sub ParseModule
{
my ($mmp,$module,$sections,$exclusions) = @_;
@@ -172,7 +172,7 @@ sub CheckForModuleMK
if (-d $item)
{
#print "$item\n";
-
+
opendir DIR, $item;
#my @Files = readdir DIR;
my @Files = grep s/^([^\.].*)$/$1/, readdir DIR;
@@ -191,7 +191,7 @@ sub CheckForModuleMK
my $isenable;
my $ObjectsSelected = 0;
my $ObjectsTotal = 0;
-
+
print "$item for section '$section' ... ";
open FILE, $item;
@@ -200,14 +200,14 @@ sub CheckForModuleMK
my $count = @lines;
print "$count lines";
-
+
A: foreach $line (@lines)
{
# all things we need are inside #ifdef sections,
# there is nothing we need in #ifndef sections: so ignore these for now
-
- # found a section? reset
- if ($line =~ /^ifdef (.*)/)
+
+ # found a section? reset
+ if ($line =~ /^ifdef (.*)/)
{
$sec = $1;
$isenable = 1;
@@ -230,7 +230,7 @@ sub CheckForModuleMK
$line =~ s/ \\//; # remove possible trailing ' \'
$line =~ s/\//\\/g; # replace / with \
chop($line); # remove \n
-
+
# do we need to skip this file? According to our own @exclusions array
foreach $exclusion (@exclusions)
{
@@ -242,7 +242,7 @@ sub CheckForModuleMK
next A;
}
}
-
+
# do we need to do this file? According to MACROs in .MMPs
my $found = 0;
foreach $EnableDefine (@EnabledDefines)
@@ -270,7 +270,7 @@ sub CheckForModuleMK
$output .= "//SOURCE $line ($reason)\n";
next A;
}
-
+
$ObjectsSelected++;
#print "\n $line";
$output .= "SOURCE $line\n";
@@ -293,7 +293,7 @@ sub UpdateProjectFile
my $updated = " Updated @ ".localtime();
my $name;
my @mmp_files_plus_one = @mmp_files;
- unshift @mmp_files_plus_one, "mmp/scummvm_base.mmp";
+ unshift @mmp_files_plus_one, "mmp/scummvm_base.mmp";
foreach $name (@mmp_files_plus_one)
{
@@ -302,23 +302,23 @@ sub UpdateProjectFile
open FILE, "$file";
my @lines = <FILE>;
close FILE;
-
+
my $onestr = join("",@lines);
-
+
if ($onestr =~ /$n/)
{
print " - $name @ $n updating ... ";
-
+
$onestr =~ s/$a.*$b/$a$updated\n$output$b/s;
open FILE, ">$file";
print FILE $onestr;
close FILE;
-
+
print "done.\n";
}
}
-
+
$output = "";
}
@@ -328,7 +328,7 @@ sub UpdateSlaveMacros
{
my $updated = " Updated @ ".localtime();
- my $name = "mmp/scummvm_base.mmp";
+ my $name = "mmp/scummvm_base.mmp";
my $file = "$buildDir/$name";
print "Reading master MACROS from backends/symbian/$name ... ";
@@ -342,7 +342,7 @@ sub UpdateSlaveMacros
my $b = "\/\/STOP_$n\/\/";
$onestr =~ /$a(.*)$b/s;
my $macros = $1;
-
+
my $libs_first = "\n// automagically enabled static libs from macros above\n";
my $libs_second = "STATICLIBRARY scummvm_base.lib // must be above USE_* .libs\n";
my $macro_counter = 0;
@@ -355,7 +355,7 @@ sub UpdateSlaveMacros
if ($line =~ /^.*MACRO\s*([0-9A-Z_]*)\s*\/\/\s*LIB\:(.*)$/)
{
my $macro = $1; my $lib = $2;
-
+
# this macro enabled? then also add the .lib
if ($line =~ /^\s*MACRO\s*$macro/m)
{
@@ -366,7 +366,7 @@ sub UpdateSlaveMacros
if ($macro =~ /^ENABLE_/)
{
$libs_first .= "STATICLIBRARY $lib\n";
-
+
# add projects for BLD.INF's
my $projectname = substr("$lib",0,-4);
$projects .= "..\\mmp\\$projectname.mmp\n";
@@ -393,7 +393,7 @@ sub UpdateSlaveMacros
push @DisabledDefines, $macro; # used in CheckForModuleMK()!!
}
}
- }
+ }
print "$macro_counter macro lines.\n";
@@ -404,23 +404,23 @@ sub UpdateSlaveMacros
$m = "AUTO_PROJECTS";
$p = "\/\/START_$m\/\/";
$q = "\/\/STOP_$m\/\/";
-
+
foreach $name (@mmp_files)
{
$file = "$buildDir/$name";
$fileBLDINF = $buildDir .'/'. substr($name, 0, rindex($name, "/")) . "/BLD.INF";
print "Updating macros in $file ... ";
#print "Updating macros in backends/symbian/$name ... ";
-
+
open FILE, "$file"; @lines = <FILE>; close FILE;
$onestr = join("",@lines);
-
+
my $extralibs = ""; # output
# slash in name means it's a phone specific build file: add LIBs
$extralibs .= "$libs_first$libs_second" if (-e $fileBLDINF);
-
+
$onestr =~ s/$a.*$b/$a$updated$macros2$extralibs$b/s;
-
+
open FILE, ">$file"; print FILE $onestr; close FILE;
my $count = @lines;
@@ -434,13 +434,13 @@ sub UpdateSlaveMacros
open FILE, "$fileBLDINF"; @lines = <FILE>; close FILE;
$onestr = join("",@lines);
-
+
$onestr =~ s/$p.*$q/$p$updated$projects$q/s;
-
+
open FILE, ">$fileBLDINF"; print FILE $onestr; close FILE;
}
}
-}
+}
##################################################################################################################
@@ -448,10 +448,10 @@ sub ResetProjectFiles()
{
my $onestr, @lines;
my @mmp_files_plus_one = @mmp_files;
-# unshift @mmp_files_plus_one, "mmp/scummvm_base.mmp";
-
+# unshift @mmp_files_plus_one, "mmp/scummvm_base.mmp";
+
print "Resetting project files: ";
-
+
# we don't need to do mmp/scummvm_base.mmp", it was done in BuildPackageUpload.pl before the call to this script
foreach $name (@mmp_files_plus_one)
{
@@ -471,7 +471,7 @@ sub ResetProjectFiles()
$onestr = join("",@lines);
open FILE, ">$fileBLDINF"; print FILE $onestr; close FILE;
}
- }
+ }
print "... done.\n";
}
diff --git a/backends/platform/symbian/BuildPackageUpload_AllVersions.pl b/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
index 62fcef0275..3bdcede76a 100644
--- a/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
+++ b/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
@@ -17,7 +17,7 @@ $SDK_BuildDirs{'S60v3'} = "S60v3";
$SDK_BuildDirs{'S80'} = "S80";
$SDK_BuildDirs{'S90'} = "S90";
-# the target name inserted here: 'abld BUILD $SDK_TargetName UREL'
+# the target name inserted here: 'abld BUILD $SDK_TargetName UREL'
$SDK_TargetName{'UIQ2'} = "armi";
$SDK_TargetName{'UIQ3'} = "gcce";
$SDK_TargetName{'S60v1'}= "armi";
@@ -117,7 +117,7 @@ foreach $Library (sort keys(%PresentLibs))
# push @Packages, sprintf($file_tpl_sis, $version_tpl_sis, $SDK2, $Extra);
# $PackagesQueued++;
# }
-# }
+# }
# }
# else
# {
@@ -144,7 +144,7 @@ while( ($SDK, $Value) = each(%VariationSets) )
push @Packages, sprintf($file_tpl_sis, $version_tpl_sis, $SDK2, $Extra);
$PackagesQueued++;
}
- }
+ }
}
else
{
@@ -170,7 +170,7 @@ Preparing to Build, Package & Upload $PackagesQueued SymbianOS ScummVM variation
SDKs inst'd \t$SDKs ".( %SDK_LibraryDirs ? "
LIBs inst'd \t$LIBs " : "" )."
- $PackagesQueued Variations \t$PackagesStr
+ $PackagesQueued Variations \t$PackagesStr
DIR base \t$base_dir
build \t$build_dir
output \t$output_dir
@@ -178,7 +178,7 @@ Preparing to Build, Package & Upload $PackagesQueued SymbianOS ScummVM variation
FTP host \t$FTP_Host
user \t$FTP_User
pass \t"."*" x length($FTP_Pass)."
- dir \t$FTP_Dir
+ dir \t$FTP_Dir
" : "" )."
=======================================================================================
Press Ctrl-C to abort or enter to continue Build, Package & Upload $PackagesQueued Variations...
@@ -194,7 +194,7 @@ unlink($build_log_out);
unlink($build_log_err);
# init _base.mmp now, so we can start changing it without affecting the CVS version _base.mmp.in!
-my $name = "mmp/scummvm_base.mmp";
+my $name = "mmp/scummvm_base.mmp";
my $file = "$build_dir/$name";
open FILE, "$file.in"; @lines = <FILE>; close FILE;
my $onestr = join("",@lines);
@@ -219,7 +219,7 @@ while( ($SDK, $Value) = each(%SDK_LibraryDirs) )
$LibrariesQueued++;
DoLibrary($SDK2, $Library, $Path);
}
- }
+ }
}
else
{
@@ -252,7 +252,7 @@ while( ($SDK, $VariationsHash) = each(%SDK_Variations) )
{
DoVariation($SDK2, $Variation, $MacroBlock);
}
- }
+ }
}
else
{
@@ -277,7 +277,7 @@ while( ($SDK, $VariationsHash) = each(%VariationSets) )
{
DoVariation($SDK2, $Variation, $MacroBlock);
}
- }
+ }
}
else
{
@@ -335,7 +335,7 @@ print " SumthinWicked wishes you a ridiculously good and optimally happy d
sub MakeMppMacroDefs
{
my ($features) = @_;
-
+
my %EnabledFeatures = ();
foreach (split(/\W|\r|\n/, $features))
{
@@ -398,14 +398,14 @@ sub MakeMppMacroDefs
$MacroDefs .= "//MACRO ENABLE_$E\n";
}
}
-
+
#print "\n\n'$features' ==> $MacroDefs\n\n\n";
return $MacroDefs;
}
##################################################################################################################
-# Build, Package & Upload a single Variation
+# Build, Package & Upload a single Variation
sub DoLibrary
{
my ($SDK, $Library, $Path) = @_;
@@ -435,23 +435,23 @@ my $header = "
my $OK = 1;
PrepSdkPaths($SDK);
-
+
chdir($Path) or $OK=0;
PrintErrorMessage("Changing to $Path failed!") if (!$OK);
- return 0 if (!$OK);
+ return 0 if (!$OK);
PrintMessage("Cleaning for $Target") if (!$ReallyQuiet);
system("bldmake bldfiles > NUL 2> NUL");
PrintErrorMessage("'bldmake bldfiles' exited with value " . ($? >> 8)) if ($? >> 8);
system("abld MAKEFILE $TargetName > NUL 2> NUL");
- PrintErrorMessage("'abld MAKEFILE $TargetName' exited with value " . ($? >> 8)) if ($? >> 8);
+ PrintErrorMessage("'abld MAKEFILE $TargetName' exited with value " . ($? >> 8)) if ($? >> 8);
system("abld CLEAN $TargetName UREL > NUL 2> NUL");
- PrintErrorMessage("'abld CLEAN $TargetName urel' exited with value " . ($? >> 8)) if ($? >> 8);
+ PrintErrorMessage("'abld CLEAN $TargetName urel' exited with value " . ($? >> 8)) if ($? >> 8);
# remove file so we are sure that after .lib generation we have a fresh copy!
if (-e $TargetFilePath) { unlink($TargetFilePath) or PrintErrorMessage("Removing $TargetFilePath"); }
-
+
my $Redirection = "OUT:file, ERR:".($RedirectSTDERR ? "file" : "screen");
my $Message = "Building $Target ($Redirection)";
PrintMessage($Message) if (!$ReallyQuiet);
@@ -463,14 +463,14 @@ my $header = "
$OK = 0 if ($? >> 8);
# print " STDERR: ".((-s $build_log_err)-$OldSize)." bytes output written to $build_log_err\n+--------------------------------------------------------------------------------------\n" if ($OldSize != (-s $build_log_err));
PrintErrorMessage("'abld TARGET $TargetName UREL' exited with value " . ($? >> 8)) if ($? >> 8);
- return 0 if (!$OK); # ABLD always returns ok :( grr
+ return 0 if (!$OK); # ABLD always returns ok :( grr
PrintMessage("Done.") if (!$ReallyQuiet);
# did it work? :)
if (-e $TargetFilePath)
{
$LibrariesSucceeded++;
-
+
if ($TargetIntermediatePath ne '' && $TargetIntermediatePath =~ /\\EPOC32\\BUILD\\/i) # make really sure it's a valid path!
{
system("del /S /Q $TargetIntermediatePath > NUL");
@@ -491,12 +491,12 @@ my $header = "
##################################################################################################################
-# Build, Package & Upload a single Variation
+# Build, Package & Upload a single Variation
sub DoVariation
{
my ($SDK, $Variation, $MacroBlock) = @_;
my $Extra = ($Variation ne '' ? "_$Variation" : "");
- my $Package = sprintf($file_tpl_sis, $version_tpl_sis, $SDK, $Extra);
+ my $Package = sprintf($file_tpl_sis, $version_tpl_sis, $SDK, $Extra);
if ($SkipExistingPackages && -f "$output_dir/$Package")
{
@@ -527,7 +527,7 @@ my $header = "
if ($OK)
{
$OK = BuildVariation($SDK, $Variation, $Package, $MacroBlock);
-
+
if ($OK && $FTP_Host ne '')
{
UploadVariation($SDK, $Variation, $Package);
@@ -543,17 +543,17 @@ sub PrepVariation()
my $OK = 1;
PrepSdkPaths($SDK);
-
+
chdir($build_dir) or $OK=0;
PrintErrorMessage("Changing to $build_dir failed!") if (!$OK);
- return 0 if (!$OK);
+ return 0 if (!$OK);
# insert $MacroBlock into AUTO_MACRO_MASTER in scummvm_base.mmp
PrintMessage("Setting new AUTO_MACROS_MASTER in scummvm_base.mmp for '$Variation'") if (!$ReallyQuiet);
my $n = "AUTO_MACROS_MASTER";
my $a = "\/\/START_$n\/\/";
my $b = "\/\/STOP_$n\/\/";
- my $name = "scummvm_base.mmp";
+ my $name = "scummvm_base.mmp";
my $file = "$build_dir/mmp/$name";
my $updated = " Updated @ ".localtime();
@@ -562,11 +562,11 @@ sub PrepVariation()
return 0 if (!$OK);
my @lines = <FILE>;
close FILE;
-
+
my $onestr = join("",@lines);
$MacroBlock =~ s/^\s*//gm;
$onestr =~ s/$a(.*)$b/$a$updated\n$ExtraMacros$MacroBlock$b/s;
-
+
open FILE, ">$file" or $OK=0;
PrintErrorMessage("Writing file '$file'") if (!$OK);
return 0 if (!$OK);
@@ -579,7 +579,7 @@ sub PrepVariation()
$OK = 0 if ($? >> 8);
PrintErrorMessage("'AdaptAllMMPs.pl' exited with value " . ($? >> 8)) if ($? >> 8);
return 0 if (!$OK);
-
+
# we are here: so all is ok :)
return 1;
}
@@ -592,7 +592,7 @@ sub BuildVariation()
my $TargetName = $SDK_TargetName{$SDK};
my $TargetDir = $SDK_TargetDir{$SDK};
my $OK = 1;
-
+
my $dir = $build_dir."/".$SDK_BuildDirs{$SDK};
$dir =~ s#/#\\#g;
chdir($dir);
@@ -617,8 +617,8 @@ sub BuildVariation()
PrintErrorMessage("'bldmake bldfiles' exited with value " . ($? >> 8)) if ($? >> 8);
system("abld CLEAN $TargetName UREL 2> NUL > NUL");
- PrintErrorMessage("'abld CLEAN $TargetName UREL' exited with value " . ($? >> 8)) if ($? >> 8);
-
+ PrintErrorMessage("'abld CLEAN $TargetName UREL' exited with value " . ($? >> 8)) if ($? >> 8);
+
my $Redirection = "OUT:file, ERR:".($RedirectSTDERR ? "file" : "screen");
my $Message = "Building $Package ($Redirection)";
PrintMessage($Message) if (!$ReallyQuiet);
@@ -630,7 +630,7 @@ sub BuildVariation()
$OK = 0 if ($? >> 8);
print " STDERR: ".((-s $build_log_err)-$OldSize)." bytes output written to $build_log_err\n+--------------------------------------------------------------------------------------\n" if ($OldSize != (-s $build_log_err) && !$ReallyQuiet);
PrintErrorMessage("'abld BUILD $TargetName UREL' exited with value " . ($? >> 8)) if ($? >> 8);
- return 0 if (!$OK); # ABLD always returns ok :( grr
+ return 0 if (!$OK); # ABLD always returns ok :( grr
PrintMessage("Done.") if (!$ReallyQuiet);
# do we have an override suffix for the package name?
@@ -654,7 +654,7 @@ sub BuildVariation()
if (-e "$output_dir/$Package")
{
$PackagesCreated++;
-
+
if ($TargetIntermediatePath ne '' && $TargetIntermediatePath =~ /\\EPOC32\\BUILD\\/i) # make really sure it's a valid path!
{
#PrintMessage("Cleaning $TargetIntermediatePath");
@@ -677,7 +677,7 @@ sub UploadVariation()
use Net::FTP;
my $newerr;
-
+
PrintMessage("Connecting to FTP $FTP_Host") if (!$ReallyQuiet);
$ftp = Net::FTP->new($FTP_Host,Timeout=>240) or $newerr=1;
@@ -692,7 +692,7 @@ sub UploadVariation()
{
PrintMessage("Changing to dir $FTP_Dir");
$ftp->cwd($FTP_Dir) or $newerr=1;
-
+
if ($newerr)
{
PrintErrorMessage("Changing to dir $FTP_Dir! Aborting!");
@@ -704,20 +704,20 @@ sub UploadVariation()
# leave this for possible auto-deletion of old files?
# @files = $ftp->dir or $newerr=1;
# push @ERRORS, "Can't get file list $!\n" if $newerr;
-# print "Got file list\n";
+# print "Got file list\n";
# foreach(@files) {
# print "$_\n";
# }
-
+
PrintMessage("Uploading $Package (".(-s "$output_dir/$Package")." bytes)");
-
+
$ftp->binary;
$ftp->put("$output_dir/$Package") or $newerr=1;
PrintErrorMessage("Uploading package! Aborting!") if $newerr;
$PackagesUploaded++ if (!$newerr);
- }
+ }
- $ftp->quit;
+ $ftp->quit;
}
}
@@ -758,7 +758,7 @@ sub CleanupPath()
{
$path =~ s/\"\Q$ECompXL_BinDir\E\";//g;
}
-
+
while( ($SDK, $RootDir) = each(%SDK_RootDirs) )
{
if ($SDK_RootDirs{$SDK} ne '')
@@ -766,8 +766,8 @@ sub CleanupPath()
my $path_component = "\"".$SDK_RootDirs{$SDK}."\\epoc32\\";
$path =~ s/\Q$path_component\E.*?\";//g;
}
- }
-
+ }
+
return $path;
}
@@ -798,5 +798,5 @@ sub PrintMessage()
}
##################################################################################################################
-
+
diff --git a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
index b6ebbafe74..a0ec338ca0 100644
--- a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
+++ b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
@@ -2,26 +2,26 @@
##################################################################################################################
@WorkingEngines = qw(
- scumm agos sky queen gob groovie saga drascula
+ scumm agos sky queen gob groovie saga drascula
kyra lure agi touche parallaction cine
cruise made m4 tinsel tucker sword1 sword2 draci sci teenagent mohawk hugo
);
-
+
@WorkingEngines_1st = qw(
- scumm queen groovie saga drascula
+ scumm queen groovie saga drascula
touche parallaction cine
-? cruise made m4 tucker
+? cruise made m4 tucker
);
-
+
@WorkingEngines_2nd = qw(
- agos sky gob
+ agos sky gob
kyra lure agi tinsel
sword1 sword2 draci sci teenagent hugo
);
@TestingEngines = qw(
-
- );
+
+ );
@EnablableEngines = (@WorkingEngines, @TestingEngines);
@@ -36,16 +36,16 @@
#disabled subengines lol saga2 personal nightmare
%UseableFeatures = (
- 'zlib' => 'zlib.lib',
- 'mad' => 'libmad.lib',
+ 'zlib' => 'zlib.lib',
+ 'mad' => 'libmad.lib',
'tremor' => 'libtremor.lib',
'flac' => 'libflac.lib'
);
-
+
# these are normally enabled for each variation
#$DefaultFeatures = qw(zlib,mad);
- $DefaultFeatures = qw(zlib,mad,tremor,flac);
-
+ $DefaultFeatures = qw(zlib,mad,tremor,flac);
+
##################################################################################################################
##
## General system information, based on $COMPUTERNAME, so this way
@@ -62,13 +62,13 @@
$SkipExistingPackages = 0;
$ReallyQuiet = 0;
$DevBase = "C:\\S";
-
+
# specify an optional FTP server to upload to after each Build+Package (can leave empty)
#$FTP_Host = "host.com";
$FTP_User = "something";
$FTP_Pass = "password";
$FTP_Dir = "cvsbuilds";
-
+
# What Platform SDKs are installed on this machine?
# possible SDKs: ("UIQ2", UIQ3", "S60v1", "S60v2", "S60v3", "S80", "S90")
# Note1: the \epoc32 directory needs to be in these rootdirs
@@ -93,10 +93,10 @@
$SDK_LibraryDirs{'ALL'}{'zlib.lib'} = "$DevBase\\zlib-1.2.2\\epoc";
#$SDK_LibraryDirs{'ALL'}{'libmad.lib'} = "$DevBase\\libmad-0.15.1b\\group";
$SDK_LibraryDirs{'ALL'}{'libtremor.lib'}= "$DevBase\\tremor\\epoc";
-
+
## SDL 1.2.12 / AnotherGuest / Symbian version
my $SdlBase = "$DevBase\\SDL-1.2.12-ag\\Symbian";
- #$SDK_LibraryDirs{'S60v1'}{'esdl.lib'} = "$SdlBase\\S60"; // unsupported?
+ #$SDK_LibraryDirs{'S60v1'}{'esdl.lib'} = "$SdlBase\\S60"; // unsupported?
#$SDK_LibraryDirs{'S60v2'}{'esdl.lib'} = "$SdlBase\\S60v2";
$SDK_LibraryDirs{'S60v3'}{'esdl.lib'} = "$SdlBase\\S60v3";
#$SDK_LibraryDirs{'S80'}{'esdl.lib'} = "$SdlBase\\S80";
@@ -107,7 +107,7 @@
## HardlySupported(TM) :P
#$SDK_LibraryDirs{'ALL'}{'libmpeg2.lib'} = "$DevBase\\mpeg2dec-0.4.0\\epoc";
}
-
+
# now you can add $VariationSets only built on this PC below this line :)
#$VariationSets{'ALL'}{'scumm'} = "$DefaultFeatures scumm scumm_7_8 he";
@@ -296,11 +296,11 @@
# scummvm-051101-SymbianS90_queen.sis
# NOTE: empty $VariationSets{''} string instead of 'ALL' = easy way to disable pkg!
-
+
if (1) # all regular combo's
{
# the first one includes all SDKs & release-ready engines
-
+
$VariationSets{'ALL'}{'all'} = "$DefaultFeatures @WorkingEngines @EnablableSubEngines";
$VariationSets{'ALL'}{'1St'} = "$DefaultFeatures @WorkingEngines_1st @EnablableSubEngines";
$VariationSets{'ALL'}{'2nd'} = "$DefaultFeatures @WorkingEngines_2nd @EnablableSubEngines";
@@ -324,16 +324,16 @@
}
}
# below here you could specify weird & experimental combinations, non-ready engines
-
+
# Separate version for the broken sword engines (1&2)
#$VariationSets{'ALL'}{'brokensword'} = "$DefaultFeatures sword1 sword2";
-
+
# Separate version for Scumm games (COMI) since memory usage might be high
- #$VariationSets{'ALL'}{'scumm'} = "$DefaultFeatures scumm scumm_7_8 he";
-
+ #$VariationSets{'ALL'}{'scumm'} = "$DefaultFeatures scumm scumm_7_8 he";
+
# for mega-fast-testing only plz! Warning: contains to engines!
#$VariationSets{'ALL'}{'fast_empty'} = "";
-
+
} # end quick-n-fast if (1|0)
diff --git a/backends/platform/symbian/README b/backends/platform/symbian/README
index 630b539a5f..ba7099ba32 100644
--- a/backends/platform/symbian/README
+++ b/backends/platform/symbian/README
@@ -24,7 +24,7 @@ About ScummVM
The original ports (uptil 0.7.1) were made by Andreas Karlsson and Lars Persson.
The main transition to 0.8.0CVS and all relevant changes were done by Jurgen Braam.
Jurgen and Lars have successfully transfered all needed changes into CVS/SVN, with additional helpful tools for Symbian OS
-
+
Release History:
Release version: 1.1.0
* Nothing significant in the Symbian port, except SDL improvements.
@@ -33,7 +33,7 @@ Release History:
Release version: 1.0.0
* Nothing significant in the Symbian port, except SDL improvements.
* See main readme for general ScummVM improvements, minor update
-
+
Release version: 0.13.1
* Nothing significant in the Symbian port, except SDL improvements.
* See main readme for general ScummVM improvements, minor update
diff --git a/backends/platform/symbian/S60/BLD.INF.in b/backends/platform/symbian/S60/BLD.INF.in
index b6cf8bbda6..c3c3decf1a 100644
--- a/backends/platform/symbian/S60/BLD.INF.in
+++ b/backends/platform/symbian/S60/BLD.INF.in
@@ -5,7 +5,7 @@ PRJ_MMPFILES
//START_AUTO_PROJECTS//
// empty base file, will be updated by Perl build scripts
-
+
//STOP_AUTO_PROJECTS//
.\ScummVM_S60.mmp
diff --git a/backends/platform/symbian/S60v3/BLD.INF.in b/backends/platform/symbian/S60v3/BLD.INF.in
index 10f46ced61..78d130cb08 100644
--- a/backends/platform/symbian/S60v3/BLD.INF.in
+++ b/backends/platform/symbian/S60v3/BLD.INF.in
@@ -5,7 +5,7 @@ PRJ_MMPFILES
//START_AUTO_PROJECTS//
// empty base file, will be updated by Perl build scripts
-
+
//STOP_AUTO_PROJECTS//
gnumakefile icons.mk
.\ScummVM_A0000658_S60v3.mmp
diff --git a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
index 2ba609fef2..d044b33bb0 100644
--- a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
@@ -129,7 +129,7 @@ SOURCE gui\KeysDialog.cpp
SOURCE gui\Actions.cpp
SOURCE gui\Dialog.cpp
-// Common error
+// Common error
source common\error.cpp
// Special for graphics
@@ -143,4 +143,4 @@ LIBRARY gdi.lib hal.lib bitgdi.lib
LIBRARY mediaclientaudiostream.lib efsrv.lib ws32.lib
library avkon.lib bafl.lib
-CAPABILITY LocalServices ReadUserData \ No newline at end of file
+CAPABILITY LocalServices ReadUserData
diff --git a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
index 713d73bdb9..bcc00017ab 100644
--- a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
@@ -129,7 +129,7 @@ SOURCE gui\KeysDialog.cpp
SOURCE gui\Actions.cpp
SOURCE gui\Dialog.cpp
-// Common error
+// Common error
source common\error.cpp
// Special for graphics
@@ -143,4 +143,4 @@ LIBRARY gdi.lib hal.lib bitgdi.lib
LIBRARY mediaclientaudiostream.lib efsrv.lib ws32.lib
library avkon.lib bafl.lib
-CAPABILITY LocalServices ReadUserData \ No newline at end of file
+CAPABILITY LocalServices ReadUserData
diff --git a/backends/platform/symbian/S80/BLD.INF.in b/backends/platform/symbian/S80/BLD.INF.in
index 75ef20be12..c25ee43a99 100644
--- a/backends/platform/symbian/S80/BLD.INF.in
+++ b/backends/platform/symbian/S80/BLD.INF.in
@@ -5,7 +5,7 @@ PRJ_MMPFILES
//START_AUTO_PROJECTS//
// empty base file, will be updated by Perl build scripts
-
+
//STOP_AUTO_PROJECTS//
.\ScummVM_S80.mmp
diff --git a/backends/platform/symbian/S90/BLD.INF.in b/backends/platform/symbian/S90/BLD.INF.in
index d6e1ece012..4e333e5dae 100644
--- a/backends/platform/symbian/S90/BLD.INF.in
+++ b/backends/platform/symbian/S90/BLD.INF.in
@@ -5,7 +5,7 @@ PRJ_MMPFILES
//START_AUTO_PROJECTS//
// empty base file, will be updated by Perl build scripts
-
+
//STOP_AUTO_PROJECTS//
.\ScummVM_S90.mmp
diff --git a/backends/platform/symbian/UIQ2/BLD.INF.in b/backends/platform/symbian/UIQ2/BLD.INF.in
index b607446a64..b8d8111e87 100644
--- a/backends/platform/symbian/UIQ2/BLD.INF.in
+++ b/backends/platform/symbian/UIQ2/BLD.INF.in
@@ -5,7 +5,7 @@ PRJ_MMPFILES
//START_AUTO_PROJECTS//
// empty base file, will be updated by Perl build scripts
-
+
//STOP_AUTO_PROJECTS//
.\ScummVM_UIQ2.mmp
diff --git a/backends/platform/symbian/UIQ3/BLD.INF.in b/backends/platform/symbian/UIQ3/BLD.INF.in
index e4b0bb306e..ff12dbdd75 100644
--- a/backends/platform/symbian/UIQ3/BLD.INF.in
+++ b/backends/platform/symbian/UIQ3/BLD.INF.in
@@ -1,11 +1,11 @@
PRJ_PLATFORMS
-GCCE WINSCW
+GCCE WINSCW
PRJ_MMPFILES
//START_AUTO_PROJECTS//
// empty base file, will be updated by Perl build scripts
-
+
//STOP_AUTO_PROJECTS//
.\ScummVM_A0000658_UIQ3.mmp
.\ScummVM_UIQ3.mmp
diff --git a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
index 99cbb264c2..83ce9bc599 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
@@ -127,7 +127,7 @@ SOURCE gui\KeysDialog.cpp
SOURCE gui\Actions.cpp
SOURCE gui\Dialog.cpp
-// Common error
+// Common error
source common\error.cpp
// Special for graphics
diff --git a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
index 3509714152..3c8e41784a 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
@@ -127,7 +127,7 @@ SOURCE gui\KeysDialog.cpp
SOURCE gui\Actions.cpp
SOURCE gui\Dialog.cpp
-// Common error
+// Common error
source common\error.cpp
// Special for graphics