aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/events/default/default-events.cpp7
-rw-r--r--backends/keymapper/remap-dialog.cpp15
-rw-r--r--backends/keymapper/remap-dialog.h1
-rw-r--r--backends/midi/seq.cpp4
-rw-r--r--backends/midi/timidity.cpp4
-rw-r--r--backends/platform/PalmOS/Src/be_os5.cpp4
-rw-r--r--backends/platform/dc/dc.h2
-rw-r--r--backends/platform/dc/dcmain.cpp12
-rw-r--r--backends/platform/dc/selector.cpp28
-rw-r--r--backends/platform/ds/arm7/Makefile5
-rw-r--r--backends/platform/ds/arm7/source/main.cpp2
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp6
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.h4
-rwxr-xr-xbackends/platform/gp2x/build/bundle.sh3
-rwxr-xr-xbackends/platform/gp2x/build/config-alleng.sh23
-rwxr-xr-xbackends/platform/gp2x/build/config.sh4
-rw-r--r--backends/platform/gp2x/events.cpp184
-rw-r--r--backends/platform/gp2x/gp2x-hw.h23
-rw-r--r--backends/platform/gp2x/gp2x.cpp109
-rwxr-xr-xbackends/platform/gp2xwiz/build/bundle.sh1
-rwxr-xr-xbackends/platform/gp2xwiz/build/config-alleng.sh2
-rwxr-xr-xbackends/platform/gp2xwiz/build/config.sh2
-rw-r--r--backends/platform/gp2xwiz/gp2xwiz-events.cpp38
-rw-r--r--backends/platform/gp2xwiz/gp2xwiz-hw.cpp10
-rw-r--r--backends/platform/gp2xwiz/gp2xwiz-hw.h29
-rw-r--r--backends/platform/iphone/iphone_video.m41
-rw-r--r--backends/platform/iphone/osys_iphone.cpp43
-rw-r--r--backends/platform/iphone/osys_iphone.h2
-rw-r--r--backends/platform/null/null.cpp5
-rw-r--r--backends/platform/ps2/systemps2.h1
-rw-r--r--backends/platform/psp/osys_psp.cpp6
-rw-r--r--backends/platform/psp/osys_psp.h4
-rw-r--r--backends/platform/psp/psp.spec2
-rw-r--r--backends/platform/sdl/events.cpp5
-rw-r--r--backends/platform/sdl/sdl.cpp21
-rw-r--r--backends/platform/symbian/src/SymbianActions.cpp7
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp9
-rw-r--r--backends/platform/symbian/src/SymbianOS.h12
-rw-r--r--backends/platform/wii/wii.mk62
-rw-r--r--backends/platform/wince/wince-sdl.cpp2
-rw-r--r--backends/vkeybd/packs/vkeybd_default.zipbin0 -> 508756 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/lowercase-symbols320x240.bmpbin0 -> 153654 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/lowercase-symbols640x480.bmpbin0 -> 612534 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/lowercase320x240.bmpbin0 -> 153654 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/lowercase640x480.bmpbin0 -> 612534 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/uppercase-symbols320x240.bmpbin0 -> 153654 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/uppercase-symbols640x480.bmpbin0 -> 612534 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/uppercase320x240.bmpbin0 -> 153654 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/uppercase640x480.bmpbin0 -> 612534 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/vkeybd_default.xml920
-rwxr-xr-xbackends/vkeybd/packs/vkeybdpack.py63
-rw-r--r--backends/vkeybd/virtual-keyboard-gui.cpp8
-rw-r--r--backends/vkeybd/virtual-keyboard-parser.cpp2
-rw-r--r--backends/vkeybd/virtual-keyboard.cpp85
-rw-r--r--backends/vkeybd/virtual-keyboard.h4
-rw-r--r--backends/vkeybd/vkeybd.zipbin632379 -> 0 bytes
56 files changed, 1428 insertions, 398 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 9b2c8df287..4fdf96e57e 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -278,7 +278,7 @@ void DefaultEventManager::init() {
if (ConfMan.hasKey("vkeybd_pack_name")) {
_vk->loadKeyboardPack(ConfMan.get("vkeybd_pack_name"));
} else {
- _vk->loadKeyboardPack("vkeybd");
+ _vk->loadKeyboardPack("vkeybd_default");
}
#endif
}
@@ -553,6 +553,11 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
_shouldRTL = true;
break;
+ case Common::EVENT_MUTE:
+ if (g_engine)
+ g_engine->flipMute();
+ break;
+
case Common::EVENT_QUIT:
if (ConfMan.getBool("confirm_exit")) {
if (_confirmExitDialogActive) {
diff --git a/backends/keymapper/remap-dialog.cpp b/backends/keymapper/remap-dialog.cpp
index d53ae588f8..0440acdd0a 100644
--- a/backends/keymapper/remap-dialog.cpp
+++ b/backends/keymapper/remap-dialog.cpp
@@ -39,16 +39,17 @@ enum {
};
RemapDialog::RemapDialog()
- : Dialog("KeyRemapper"), _keymapTable(0), _activeRemapAction(0), _topAction(0), _remapTimeout(0) {
+ : Dialog("KeyMapper"), _keymapTable(0), _activeRemapAction(0), _topAction(0), _remapTimeout(0) {
_keymapper = g_system->getEventManager()->getKeymapper();
assert(_keymapper);
- _kmPopUp = new GUI::PopUpWidget(this, "KeyRemapper.Popup", "Keymap: ");
+ _kmPopUpDesc = new GUI::StaticTextWidget(this, "KeyMapper.PopupDesc", "Keymap:");
+ _kmPopUp = new GUI::PopUpWidget(this, "KeyMapper.Popup");
_scrollBar = new GUI::ScrollBarWidget(this, 0, 0, 0, 0);
- new GUI::ButtonWidget(this, "KeyRemapper.Close", "Close", kCloseCmd);
+ new GUI::ButtonWidget(this, "KeyMapper.Close", "Close", kCloseCmd);
}
RemapDialog::~RemapDialog() {
@@ -137,12 +138,12 @@ void RemapDialog::reflowLayout() {
int16 areaX, areaY;
uint16 areaW, areaH;
- int spacing = g_gui.xmlEval()->getVar("Globals.KeyRemapper.Spacing");
- int labelWidth = g_gui.xmlEval()->getVar("Globals.KeyRemapper.LabelWidth");
- int buttonWidth = g_gui.xmlEval()->getVar("Globals.KeyRemapper.ButtonWidth");
+ int spacing = g_gui.xmlEval()->getVar("Globals.KeyMapper.Spacing");
+ int labelWidth = g_gui.xmlEval()->getVar("Globals.KeyMapper.LabelWidth");
+ int buttonWidth = g_gui.xmlEval()->getVar("Globals.KeyMapper.ButtonWidth");
int colWidth = labelWidth + buttonWidth + spacing;
- g_gui.xmlEval()->getWidgetData((const String&)String("KeyRemapper.KeymapArea"), areaX, areaY, areaW, areaH);
+ g_gui.xmlEval()->getWidgetData((const String&)String("KeyMapper.KeymapArea"), areaX, areaY, areaW, areaH);
_colCount = (areaW - scrollbarWidth) / colWidth;
_rowCount = (areaH + spacing) / (buttonHeight + spacing);
diff --git a/backends/keymapper/remap-dialog.h b/backends/keymapper/remap-dialog.h
index abec8a2d5c..88f099520a 100644
--- a/backends/keymapper/remap-dialog.h
+++ b/backends/keymapper/remap-dialog.h
@@ -76,6 +76,7 @@ protected:
Rect _keymapArea;
+ GUI::StaticTextWidget *_kmPopUpDesc;
GUI::PopUpWidget *_kmPopUp;
//GUI::ContainerWidget *_container;
GUI::ScrollBarWidget *_scrollBar;
diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp
index 5b7f071fd9..3522975679 100644
--- a/backends/midi/seq.cpp
+++ b/backends/midi/seq.cpp
@@ -142,7 +142,7 @@ void MidiDriver_SEQ::send(uint32 b) {
warning("MidiDriver_SEQ::send: unknown : %08x", (int)b);
break;
}
- write(device, buf, position);
+ (void)write(device, buf, position);
}
void MidiDriver_SEQ::sysEx (const byte *msg, uint16 length) {
@@ -167,7 +167,7 @@ void MidiDriver_SEQ::sysEx (const byte *msg, uint16 length) {
buf[position++] = _device_num;
buf[position++] = 0;
- write (device, buf, position);
+ (void)write(device, buf, position);
}
diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp
index ecb6dd7e8a..c813441724 100644
--- a/backends/midi/timidity.cpp
+++ b/backends/midi/timidity.cpp
@@ -221,7 +221,7 @@ int MidiDriver_TIMIDITY::open() {
* "200 Ready data connection" */
res = timidity_ctl_command(NULL);
if (atoi(res) != 200) {
- fprintf(stderr, "Can't connect timidity: %s\t(host=%s, port=%d)\n", res, timidity_host, data_port);
+ warning("Can't connect timidity: %s\t(host=%s, port=%d)", res, timidity_host, data_port);
close_all();
return -1;
}
@@ -334,7 +334,7 @@ char *MidiDriver_TIMIDITY::timidity_ctl_command(const char *fmt, ...) {
buff[len++] = '\n';
/* write command to control socket */
- write(_control_fd, buff, len);
+ (void)write(_control_fd, buff, len);
}
while (1) {
diff --git a/backends/platform/PalmOS/Src/be_os5.cpp b/backends/platform/PalmOS/Src/be_os5.cpp
index aa578dad9c..91e9818c02 100644
--- a/backends/platform/PalmOS/Src/be_os5.cpp
+++ b/backends/platform/PalmOS/Src/be_os5.cpp
@@ -115,6 +115,10 @@ void OSystem_PalmOS5::setFeatureState(Feature f, bool enable) {
}
void OSystem_PalmOS5::setWindowCaption(const char *caption) {
+FIXME/TODO: Convert caption from ISO Latin 1 to "right" encoding ?
+If the output encoding is unclear or conversion impossible,
+then one could just skip over any chars > 0x7F and display the rest
+
Err e;
Char buf[64];
Coord w, y, h = FntLineHeight() + 2;
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index 0ccd69593e..f86a2c6065 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -232,5 +232,5 @@ class OSystem_Dreamcast : private DCHardware, public BaseBackend, public Filesys
extern int handleInput(struct mapledev *pad,
int &mouse_x, int &mouse_y,
byte &shiftFlags, Interactive *inter = NULL);
-extern bool selectGame(char *&, char *&, class Icon &);
+extern bool selectGame(char *&, char *&, Common::Language &, Common::Platform &, class Icon &);
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index 7a0f71ad1a..795504d243 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -234,8 +234,10 @@ int main()
int DCLauncherDialog::runModal()
{
char *base = NULL, *dir = NULL;
+ Common::Language language = Common::UNK_LANG;
+ Common::Platform platform = Common::kPlatformUnknown;
- if (!selectGame(base, dir, icon))
+ if (!selectGame(base, dir, language, platform, icon))
g_system->quit();
// Set the game path.
@@ -243,6 +245,14 @@ int DCLauncherDialog::runModal()
if (dir != NULL)
ConfMan.set("path", dir, base);
+ // Set the game language.
+ if (language != Common::UNK_LANG)
+ ConfMan.set("language", Common::getLanguageCode(language), base);
+
+ // Set the game platform.
+ if (platform != Common::kPlatformUnknown)
+ ConfMan.set("platform", Common::getPlatformCode(platform), base);
+
// Set the target.
ConfMan.setActiveDomain(base);
diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp
index 9465769ea3..e2998234c3 100644
--- a/backends/platform/dc/selector.cpp
+++ b/backends/platform/dc/selector.cpp
@@ -138,6 +138,8 @@ struct Game
char dir[256];
char filename_base[256];
char text[256];
+ Common::Language language;
+ Common::Platform platform;
Icon icon;
Label label;
};
@@ -183,11 +185,15 @@ static void makeDefIcon(Icon &icon)
icon.load(scummvm_icon, sizeof(scummvm_icon));
}
-static bool uniqueGame(const char *base, const char *dir, Game *games, int cnt)
+static bool uniqueGame(const char *base, const char *dir,
+ Common::Language lang, Common::Platform plf,
+ Game *games, int cnt)
{
while (cnt--)
if (!strcmp(dir, games->dir) &&
- !stricmp(base, games->filename_base))
+ !stricmp(base, games->filename_base) &&
+ lang == games->language &&
+ plf == games->platform)
return false;
else
games++;
@@ -227,14 +233,20 @@ static int findGames(Game *games, int max)
if (curr_game < max) {
strcpy(games[curr_game].filename_base, ge->gameid().c_str());
strcpy(games[curr_game].dir, dirs[curr_dir-1].name);
+ games[curr_game].language = ge->language();
+ games[curr_game].platform = ge->platform();
if (uniqueGame(games[curr_game].filename_base,
- games[curr_game].dir, games, curr_game)) {
+ 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> in <%s> <%s> because of <%s> <*>\n",
- games[curr_game].text, games[curr_game].dir,
- games[curr_game].filename_base,
+ printf("Registered game <%s> (l:%d p:%d) in <%s> <%s> because of <%s> <*>\n",
+ games[curr_game].text,
+ (int)games[curr_game].language,
+ (int)games[curr_game].platform,
+ games[curr_game].dir, games[curr_game].filename_base,
dirs[curr_dir-1].name);
#endif
curr_game++;
@@ -405,7 +417,7 @@ int gameMenu(Game *games, int num_games)
}
}
-bool selectGame(char *&ret, char *&dir_ret, Icon &icon)
+bool selectGame(char *&ret, char *&dir_ret, Common::Language &lang_ret, Common::Platform &plf_ret, Icon &icon)
{
Game *games = new Game[MAX_GAMES];
int selected, num_games;
@@ -449,6 +461,8 @@ bool selectGame(char *&ret, char *&dir_ret, Icon &icon)
dir_ret = the_game.dir;
#endif
ret = the_game.filename_base;
+ lang_ret = the_game.language;
+ plf_ret = the_game.platform;
icon = the_game.icon;
return true;
} else
diff --git a/backends/platform/ds/arm7/Makefile b/backends/platform/ds/arm7/Makefile
index 82637845db..a8dc0efe6e 100644
--- a/backends/platform/ds/arm7/Makefile
+++ b/backends/platform/ds/arm7/Makefile
@@ -151,13 +151,12 @@ $(OUTPUT).elf : $(OFILES)
#---------------------------------------------------------------------------------
%.bin: %.elf
@echo built ... $(notdir $@)
- @$(OBJCOPY) -O binary $(TARGET).elf $@
+ $(OBJCOPY) -O binary $(TARGET).elf $@
#---------------------------------------------------------------------------------
%.elf:
echo ELF
- @echo $(LD) $(LDFLAGS) -specs=ds_arm7.specs $(OFILES) $(LIBPATHS) $(LIBS) -o $(TARGET).elf
- @$(LD) $(LDFLAGS) -specs=ds_arm7.specs $(OFILES) $(LIBPATHS) $(LIBS) -o $(TARGET).elf
+ $(LD) $(LDFLAGS) -specs=ds_arm7.specs $(OFILES) $(LIBPATHS) $(LIBS) -o $(TARGET).elf
diff --git a/backends/platform/ds/arm7/source/main.cpp b/backends/platform/ds/arm7/source/main.cpp
index 0e8dd9efeb..7029d96405 100644
--- a/backends/platform/ds/arm7/source/main.cpp
+++ b/backends/platform/ds/arm7/source/main.cpp
@@ -585,7 +585,7 @@ int main(int argc, char ** argv) {
//enable sound
// powerOn(POWER_SOUND);
- REG_SOUNDCNT = SOUND_ENABLE | SOUND_VOL(0x7F);
+ SOUND_CR = SOUND_ENABLE | SOUND_VOL(0x7F);
IPC->soundData = 0;
IPC->reset = false;
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index e35e5edea0..954a33b61d 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -642,12 +642,6 @@ void OSystem_DS::quit() {
swiSoftReset();*/
}
-void OSystem_DS::setWindowCaption(const char *caption) {
-}
-
-void OSystem_DS::displayMessageOnOSD(const char *msg) {
-}
-
Common::SaveFileManager* OSystem_DS::getSavefileManager() {
bool forceSram;
diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h
index 5a26a25c8b..3db23a5687 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -134,10 +134,6 @@ public:
virtual void quit();
- virtual void setWindowCaption(const char *caption);
-
- virtual void displayMessageOnOSD(const char *msg);
-
virtual Common::SaveFileManager *getSavefileManager();
void addEvent(Common::Event& e);
diff --git a/backends/platform/gp2x/build/bundle.sh b/backends/platform/gp2x/build/bundle.sh
index 8d48dcfb06..560f096ed4 100755
--- a/backends/platform/gp2x/build/bundle.sh
+++ b/backends/platform/gp2x/build/bundle.sh
@@ -12,6 +12,7 @@ export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib
echo Collecting files.
mkdir "scummvm-gp2x-`date '+%Y-%m-%d'`"
mkdir "scummvm-gp2x-`date '+%Y-%m-%d'`/saves"
+mkdir "scummvm-gp2x-`date '+%Y-%m-%d'`/plugins"
mkdir "scummvm-gp2x-`date '+%Y-%m-%d'`/engine-data"
echo "Please put your save games in this dir" >> "scummvm-gp2x-`date '+%Y-%m-%d'`/saves/PUT_SAVES_IN_THIS_DIR"
@@ -28,8 +29,10 @@ cp ../../../../COPYING ./scummvm-gp2x-`date '+%Y-%m-%d'`/
cp ../../../../COPYRIGHT ./scummvm-gp2x-`date '+%Y-%m-%d'`/
cp ../../../../NEWS ./scummvm-gp2x-`date '+%Y-%m-%d'`/
cp ../../../../gui/themes/scummmodern.zip ./scummvm-gp2x-`date '+%Y-%m-%d'`/
+cp ../../../../backends/vkeybd/packs/vkeybd_default.zip ./scummvm-gp2x-`date '+%Y-%m-%d'`/
cp ../../../../dists/pred.dic ./scummvm-gp2x-`date '+%Y-%m-%d'`/
cp ../../../../dists/engine-data/* ./scummvm-gp2x-`date '+%Y-%m-%d'`/engine-data
+cp ../../../../plugins/* ./scummvm-gp2x-`date '+%Y-%m-%d'`/plugins
echo Making Stripped GPE.
arm-open2x-linux-strip ./scummvm-gp2x-`date '+%Y-%m-%d'`/scummvm.gp2x
diff --git a/backends/platform/gp2x/build/config-alleng.sh b/backends/platform/gp2x/build/config-alleng.sh
new file mode 100755
index 0000000000..5724f39dc5
--- /dev/null
+++ b/backends/platform/gp2x/build/config-alleng.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+echo Quick script to make running configure all the time less painful
+echo and let all the build work be done from the backend/build folder.
+
+# Set the paths up here to generate the config.
+
+PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin:$PATH
+PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin:$PATH
+
+# Export the tool names for cross-compiling
+export CXX=arm-open2x-linux-g++
+export CXXFLAGS=-march=armv4t
+export CPPFLAGS=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include
+export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib
+export DEFINES=-DNDEBUG
+
+# Edit the configure line to suit.
+cd ../../../..
+./configure --backend=gp2x --disable-mt32emu --host=gp2x --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-all-engines --enable-vkeybd
+# --enable-plugins --default-dynamic
+
+echo Generating config for GP2X complete. Check for errors.
diff --git a/backends/platform/gp2x/build/config.sh b/backends/platform/gp2x/build/config.sh
index 17083d1ea4..55954d6231 100755
--- a/backends/platform/gp2x/build/config.sh
+++ b/backends/platform/gp2x/build/config.sh
@@ -17,7 +17,7 @@ export DEFINES=-DNDEBUG
# Edit the configure line to suit.
cd ../../../..
-./configure --backend=gp2x --disable-mt32emu --host=gp2x --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-made --enable-m4
-#--enable-plugins --default-dynamic
+./configure --backend=gp2x --disable-mt32emu --host=gp2x --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 complete. Check for errors.
diff --git a/backends/platform/gp2x/events.cpp b/backends/platform/gp2x/events.cpp
index 1c0fb398db..9a9a59765d 100644
--- a/backends/platform/gp2x/events.cpp
+++ b/backends/platform/gp2x/events.cpp
@@ -38,33 +38,33 @@
// we should really allow users to map any key to a joystick button
#define JOY_DEADZONE 2200
-// #define JOY_INVERT_Y
#define JOY_XAXIS 0
#define JOY_YAXIS 1
-// GP2X Stick Buttons (Note: The Stick is read as a set of buttons not a HAT type of setup).
-#define JOY_BUT_LMOUSE 0x0D
-#define JOY_BUT_RMOUSE 0x0E
-
-#define JOY_BUT_RETURN 0x08
-#define JOY_BUT_ESCAPE 0x09
-#define JOY_BUT_F5 0x0B
-#define JOY_BUT_SPACE 0x0F
-#define JOY_BUT_TALKUP 0x10
-#define JOY_BUT_TALKDN 0x11
-#define JOY_BUT_ZERO 0x12
-
-#define JOY_BUT_COMB 0x0A
-#define JOY_BUT_EXIT 0x12
-#define JOY_BUT_PERIOD 0x0C
-
-
-//TODO: Quick hack 101 ;-) Clean this up,
-#define TRUE 1
-#define FALSE 0
-
-static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode)
-{
+/* GP2X Wiz: Main Joystick Mappings */
+enum {
+ GP2X_BUTTON_UP = 0,
+ GP2X_BUTTON_UPLEFT = 1,
+ GP2X_BUTTON_LEFT = 2,
+ GP2X_BUTTON_DOWNLEFT = 3,
+ GP2X_BUTTON_DOWN = 4,
+ GP2X_BUTTON_DOWNRIGHT = 5,
+ GP2X_BUTTON_RIGHT = 6,
+ GP2X_BUTTON_UPRIGHT = 7,
+ GP2X_BUTTON_START = 8,
+ GP2X_BUTTON_SELECT = 9,
+ GP2X_BUTTON_L = 10,
+ GP2X_BUTTON_R = 11,
+ GP2X_BUTTON_A = 12,
+ GP2X_BUTTON_B = 13,
+ GP2X_BUTTON_X = 14,
+ GP2X_BUTTON_Y = 15,
+ GP2X_BUTTON_VOLUP = 16,
+ GP2X_BUTTON_VOLDOWN = 17,
+ GP2X_BUTTON_CLICK = 18
+};
+
+static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) {
if (key >= SDLK_F1 && key <= SDLK_F9) {
return key - SDLK_F1 + Common::ASCII_F1;
} else if (key >= SDLK_KP0 && key <= SDLK_KP9) {
@@ -197,10 +197,9 @@ void OSystem_GP2X::moveStick() {
if (_km.x_down_count!=2){
_km.x_vel = 1;
_km.x_down_count = 1;
- }else
+ } else
_km.x_vel = 4;
- }
- else{
+ } else {
_km.x_vel = 0;
_km.x_down_count = 0;
}
@@ -216,36 +215,16 @@ void OSystem_GP2X::moveStick() {
if (_km.y_down_count!=2){
_km.y_vel = 1;
_km.y_down_count = 1;
- }else
+ } else
_km.y_vel = 4;
- }
- else{
+ } else {
_km.y_vel = 0;
_km.y_down_count = 0;
}
}
- //Quick default button states for modifier.
-
- //int GP2X_BUTTON_STATE_UP = FALSE;
- //int GP2X_BUTTON_STATE_DOWN = FALSE;
- //int GP2X_BUTTON_STATE_LEFT = FALSE;
- //int GP2X_BUTTON_STATE_RIGHT = FALSE;
- //int GP2X_BUTTON_STATE_UPLEFT = FALSE;
- //int GP2X_BUTTON_STATE_UPRIGHT = FALSE;
- //int GP2X_BUTTON_STATE_DOWNLEFT = FALSE;
- //int GP2X_BUTTON_STATE_DOWNRIGHT = FALSE;
- //int GP2X_BUTTON_STATE_CLICK = FALSE;
- //int GP2X_BUTTON_STATE_A = FALSE;
- //int GP2X_BUTTON_STATE_B = FALSE;
- //int GP2X_BUTTON_STATE_Y = FALSE;
- //int GP2X_BUTTON_STATE_X = FALSE;
- int GP2X_BUTTON_STATE_L = FALSE;
- //int GP2X_BUTTON_STATE_R = FALSE;
- //int GP2X_BUTTON_STATE_START = FALSE;
- //int GP2X_BUTTON_STATE_SELECT = FALSE;
- //int GP2X_BUTTON_STATE_VOLUP = FALSE;
- //int GP2X_BUTTON_STATE_VOLDOWN = FALSE;
+/* Quick default button states for modifiers. */
+int GP2X_BUTTON_STATE_L = false;
bool OSystem_GP2X::pollEvent(Common::Event &event) {
SDL_Event ev;
@@ -273,8 +252,6 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) {
GP2X_BUTTON_LEFT Cursor Left
GP2X_BUTTON_RIGHT Cursor Right
- TODO: Add extra directions to cursor mappings.
-
GP2X_BUTTON_UPLEFT Cursor Up Left
GP2X_BUTTON_UPRIGHT Cursor Up Right
GP2X_BUTTON_DOWNLEFT Cursor Down Left
@@ -288,8 +265,8 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) {
GP2X_BUTTON_Y Space Bar
GP2X_BUTTON_X Right Mouse Click
GP2X_BUTTON_L Combo Modifier (Left Trigger)
- GP2X_BUTTON_R F5 (Right Trigger)
- GP2X_BUTTON_START Return
+ GP2X_BUTTON_R Return (Right Trigger)
+ GP2X_BUTTON_START F5 (Game Menu)
GP2X_BUTTON_SELECT Escape
GP2X_BUTTON_VOLUP /dev/mixer Global Volume Up
GP2X_BUTTON_VOLDOWN /dev/mixer Global Volume Down
@@ -299,6 +276,7 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) {
GP2X_BUTTON_VOLUP & GP2X_BUTTON_VOLDOWN 0 (For Monkey 2 CP)
GP2X_BUTTON_L & GP2X_BUTTON_SELECT Common::EVENT_QUIT (Calls Sync() to make sure SD is flushed)
GP2X_BUTTON_L & GP2X_BUTTON_Y Toggles setZoomOnMouse() for larger then 320*240 games to scale to the point + raduis.
+ GP2X_BUTTON_L & GP2X_BUTTON_START Common::EVENT_MAINMENU (ScummVM Global Main Menu)
GP2X_BUTTON_L & GP2X_BUTTON_A Common::EVENT_PREDICTIVE_DIALOG for predictive text entry box (AGI games)
*/
@@ -357,6 +335,10 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) {
else if (ev.button.button == SDL_BUTTON_WHEELDOWN)
event.type = Common::EVENT_WHEELDOWN;
#endif
+#if defined(SDL_BUTTON_MIDDLE)
+ else if (ev.button.button == SDL_BUTTON_MIDDLE)
+ event.type = Common::EVENT_MBUTTONDOWN;
+#endif
else
break;
@@ -369,6 +351,10 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) {
event.type = Common::EVENT_LBUTTONUP;
else if (ev.button.button == SDL_BUTTON_RIGHT)
event.type = Common::EVENT_RBUTTONUP;
+#if defined(SDL_BUTTON_MIDDLE)
+ else if (ev.button.button == SDL_BUTTON_MIDDLE)
+ event.type = Common::EVENT_MBUTTONUP;
+#endif
else
break;
fillMouseEvent(event, ev.button.x, ev.button.y);
@@ -379,16 +365,16 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) {
case SDL_JOYBUTTONDOWN:
_stickBtn[ev.jbutton.button] = 1;
- if (ev.jbutton.button == JOY_BUT_LMOUSE) {
+ if (ev.jbutton.button == GP2X_BUTTON_B) {
event.type = Common::EVENT_LBUTTONDOWN;
fillMouseEvent(event, _km.x, _km.y);
} else if (ev.jbutton.button == GP2X_BUTTON_CLICK) {
event.type = Common::EVENT_LBUTTONDOWN;
fillMouseEvent(event, _km.x, _km.y);
- } else if (ev.jbutton.button == JOY_BUT_RMOUSE) {
+ } else if (ev.jbutton.button == GP2X_BUTTON_X) {
event.type = Common::EVENT_RBUTTONDOWN;
fillMouseEvent(event, _km.x, _km.y);
- } else if (_stickBtn[JOY_BUT_COMB] && (ev.jbutton.button == JOY_BUT_EXIT)) {
+ } else if (_stickBtn[GP2X_BUTTON_L] && (ev.jbutton.button == GP2X_BUTTON_SELECT)) {
event.type = Common::EVENT_QUIT;
} else if (ev.jbutton.button < 8) {
moveStick();
@@ -399,19 +385,24 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) {
event.kbd.flags = 0;
switch (ev.jbutton.button) {
case GP2X_BUTTON_L:
- GP2X_BUTTON_STATE_L = TRUE;
+ GP2X_BUTTON_STATE_L = true;
break;
case GP2X_BUTTON_R:
- if (GP2X_BUTTON_STATE_L == TRUE) {
+ if (GP2X_BUTTON_STATE_L == true) {
+#ifdef ENABLE_VKEYBD
+ event.kbd.keycode = Common::KEYCODE_F7;
+ event.kbd.ascii = mapKey(SDLK_F7, ev.key.keysym.mod, 0);
+#else
event.kbd.keycode = Common::KEYCODE_0;
event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);
+#endif
} else {
- event.kbd.keycode = Common::KEYCODE_F5;
- event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
+ event.kbd.keycode = Common::KEYCODE_RETURN;
+ event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0);
}
break;
case GP2X_BUTTON_SELECT:
- if (GP2X_BUTTON_STATE_L == TRUE) {
+ if (GP2X_BUTTON_STATE_L == true) {
event.type = Common::EVENT_QUIT;
} else {
event.kbd.keycode = Common::KEYCODE_ESCAPE;
@@ -419,7 +410,7 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) {
}
break;
case GP2X_BUTTON_A:
- if (GP2X_BUTTON_STATE_L == TRUE) {
+ if (GP2X_BUTTON_STATE_L == true) {
event.type = Common::EVENT_PREDICTIVE_DIALOG;
} else {
event.kbd.keycode = Common::KEYCODE_PERIOD;
@@ -427,39 +418,21 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) {
}
break;
case GP2X_BUTTON_Y:
- if (GP2X_BUTTON_STATE_L == TRUE) {
+ if (GP2X_BUTTON_STATE_L == true) {
setZoomOnMouse();
} else {
event.kbd.keycode = Common::KEYCODE_SPACE;
event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
}
break;
- case JOY_BUT_RETURN:
- event.kbd.keycode = Common::KEYCODE_RETURN;
- event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0);
- break;
- case JOY_BUT_ZERO:
- event.kbd.keycode = Common::KEYCODE_0;
- event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);
+ case GP2X_BUTTON_START:
+ if (GP2X_BUTTON_STATE_L == true) {
+ event.type = Common::EVENT_MAINMENU;
+ } else {
+ event.kbd.keycode = Common::KEYCODE_F5;
+ event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
+ }
break;
-
- //case GP2X_BUTTON_R:
- // if ((ev.jbutton.button == GP2X_BUTTON_L) && (ev.jbutton.button == GP2X_BUTTON_R)) {
- // displayMessageOnOSD("Exiting ScummVM");
- // //Sync();
- // event.type = Common::EVENT_QUIT;
- // break;
- // } else if ((ev.jbutton.button == GP2X_BUTTON_L) && (ev.jbutton.button != GP2X_BUTTON_R)) {
- // displayMessageOnOSD("Left Trigger Pressed");
- // break;
- // } else if ((ev.jbutton.button == GP2X_BUTTON_R) && (ev.jbutton.button != GP2X_BUTTON_L)) {
- // event.kbd.keycode = Common::KEYCODE_F5;
- // event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
- // break;
- // } else {
- // break;
- // }
- // break;
case GP2X_BUTTON_VOLUP:
//if (GP2X_BUTTON_STATE_L == TRUE) {
// displayMessageOnOSD("Setting CPU Speed at 230MHz");
@@ -490,10 +463,13 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) {
case SDL_JOYBUTTONUP:
_stickBtn[ev.jbutton.button] = 0;
- if (ev.jbutton.button == JOY_BUT_LMOUSE) {
+ if (ev.jbutton.button == GP2X_BUTTON_B) {
event.type = Common::EVENT_LBUTTONUP;
fillMouseEvent(event, _km.x, _km.y);
- } else if (ev.jbutton.button == JOY_BUT_RMOUSE) {
+ } else if (ev.jbutton.button == GP2X_BUTTON_CLICK) {
+ event.type = Common::EVENT_LBUTTONUP;
+ fillMouseEvent(event, _km.x, _km.y);
+ } else if (ev.jbutton.button == GP2X_BUTTON_X) {
event.type = Common::EVENT_RBUTTONUP;
fillMouseEvent(event, _km.x, _km.y);
} else if (ev.jbutton.button < 8) {
@@ -517,15 +493,29 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) {
event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
break;
case GP2X_BUTTON_START:
- event.kbd.keycode = Common::KEYCODE_RETURN;
- event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0);
+ if (GP2X_BUTTON_STATE_L == true) {
+ event.type = Common::EVENT_MAINMENU;
+ } else {
+ event.kbd.keycode = Common::KEYCODE_F5;
+ event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
+ }
break;
case GP2X_BUTTON_L:
- GP2X_BUTTON_STATE_L = FALSE;
+ GP2X_BUTTON_STATE_L = false;
break;
case GP2X_BUTTON_R:
- event.kbd.keycode = Common::KEYCODE_F5;
- event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
+ if (GP2X_BUTTON_STATE_L == true) {
+#ifdef ENABLE_VKEYBD
+ event.kbd.keycode = Common::KEYCODE_F7;
+ event.kbd.ascii = mapKey(SDLK_F7, ev.key.keysym.mod, 0);
+#else
+ event.kbd.keycode = Common::KEYCODE_0;
+ event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);
+#endif
+ } else {
+ event.kbd.keycode = Common::KEYCODE_RETURN;
+ event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0);
+ }
break;
case GP2X_BUTTON_VOLUP:
break;
diff --git a/backends/platform/gp2x/gp2x-hw.h b/backends/platform/gp2x/gp2x-hw.h
index 0427698bc4..89ad1093e4 100644
--- a/backends/platform/gp2x/gp2x-hw.h
+++ b/backends/platform/gp2x/gp2x-hw.h
@@ -31,29 +31,6 @@
#ifndef GP2X_HW_H
#define GP2X_HW_H
-//GP2X Main Joystick Mappings
-//TODO: Use these more standard mappings over the custom ones.
-
-#define GP2X_BUTTON_UP (0)
-#define GP2X_BUTTON_UPLEFT (1)
-#define GP2X_BUTTON_LEFT (2)
-#define GP2X_BUTTON_DOWNLEFT (3)
-#define GP2X_BUTTON_DOWN (4)
-#define GP2X_BUTTON_DOWNRIGHT (5)
-#define GP2X_BUTTON_RIGHT (6)
-#define GP2X_BUTTON_UPRIGHT (7)
-#define GP2X_BUTTON_START (8)
-#define GP2X_BUTTON_SELECT (9)
-#define GP2X_BUTTON_L (10)
-#define GP2X_BUTTON_R (11)
-#define GP2X_BUTTON_A (12)
-#define GP2X_BUTTON_B (13)
-#define GP2X_BUTTON_X (14)
-#define GP2X_BUTTON_Y (15)
-#define GP2X_BUTTON_VOLUP (16)
-#define GP2X_BUTTON_VOLDOWN (17)
-#define GP2X_BUTTON_CLICK (18)
-
#define GP2X_MAXVOL 100 // Highest level permitted by GP2X's mixer
#define SYS_CLK_FREQ 7372800 // Clock Frequency
diff --git a/backends/platform/gp2x/gp2x.cpp b/backends/platform/gp2x/gp2x.cpp
index 62c65e8f5e..15b5e19e5d 100644
--- a/backends/platform/gp2x/gp2x.cpp
+++ b/backends/platform/gp2x/gp2x.cpp
@@ -33,15 +33,14 @@
#include "backends/platform/gp2x/gp2x-mem.h"
#include "common/archive.h"
#include "common/config-manager.h"
-
+#include "common/debug.h"
#include "common/events.h"
#include "common/util.h"
-#include "common/debug.h"
#include "common/file.h"
#include "base/main.h"
-#include "backends/saves/posix/posix-saves.h"
+#include "backends/saves/default/default-saves.h"
#include "backends/timer/default/default-timer.h"
#include "backends/plugins/posix/posix-provider.h"
@@ -72,15 +71,12 @@ static Uint32 timer_handler(Uint32 interval, void *param) {
}
int main(int argc, char *argv[]) {
- //extern OSystem *OSystem_GP2X_create();
- //g_system = OSystem_GP2X_create();
g_system = new OSystem_GP2X();
assert(g_system);
- // Check if Plugins are enabled (Using the hacked up GP2X provider)
- #ifdef DYNAMIC_MODULES
- PluginManager::instance().addPluginProvider(new GP2XPluginProvider());
- #endif
+#ifdef DYNAMIC_MODULES
+ PluginManager::instance().addPluginProvider(new POSIXPluginProvider());
+#endif
// Invoke the actual ScummVM main entry point:
int res = scummvm_main(argc, argv);
@@ -115,7 +111,8 @@ void OSystem_GP2X::initBackend() {
#endif
char savePath[PATH_MAX+1];
- char workDirName[PATH_MAX+1]; /* To be passed to getcwd system call. */
+ char workDirName[PATH_MAX+1];
+
if (getcwd(workDirName, PATH_MAX) == NULL) {
error("Could not obtain current working directory.");
} else {
@@ -133,25 +130,9 @@ void OSystem_GP2X::initBackend() {
ConfMan.registerDefault("savepath", savePath);
- // Setup default extra data path for engine data files to be workingdir/engine-data
-
- char enginedataPath[PATH_MAX+1];
-
- strcpy(enginedataPath, workDirName);
- strcat(enginedataPath, "/engine-data");
- printf("Current engine-data directory: %s\n", enginedataPath);
- //struct stat sb;
- if (stat(enginedataPath, &sb) == -1)
- if (errno == ENOENT) // Create the dir if it does not exist
- if (mkdir(enginedataPath, 0755) != 0)
- warning("mkdir for '%s' failed", enginedataPath);
-
- //FIXME: Do not use File::addDefaultDirectory, rather implement OSystem::addSysArchivesToSearchSet() !
- Common::File::addDefaultDirectory(enginedataPath);
-
- // Note: Review and clean this, it's OTT at the moment.
+ _savefile = new DefaultSaveFileManager(savePath);
- #if defined(DUMP_STDOUT)
+ #ifdef DUMP_STDOUT
// The GP2X has a serial console but most users do not use this so we
// output all our STDOUT and STDERR to files for debug purposes.
char STDOUT_FILE[PATH_MAX+1];
@@ -168,7 +149,7 @@ void OSystem_GP2X::initBackend() {
/* Redirect standard input and standard output */
FILE *newfp = freopen(STDOUT_FILE, "w", stdout);
- if (newfp == NULL) { /* This happens on NT */
+ if (newfp == NULL) {
#if !defined(stdout)
stdout = fopen(STDOUT_FILE, "w");
#else
@@ -178,8 +159,9 @@ void OSystem_GP2X::initBackend() {
}
#endif
}
+
newfp = freopen(STDERR_FILE, "w", stderr);
- if (newfp == NULL) { /* This happens on NT */
+ if (newfp == NULL) {
#if !defined(stderr)
stderr = fopen(STDERR_FILE, "w");
#else
@@ -189,8 +171,10 @@ void OSystem_GP2X::initBackend() {
}
#endif
}
- setbuf(stderr, NULL); /* No buffering */
- #endif // DUMP_STDOUT
+
+ setbuf(stderr, NULL);
+ printf("%s\n", "Debug: STDOUT and STDERR redirected to text files.");
+ #endif /* DUMP_STDOUT */
_graphicsMutex = createMutex();
@@ -199,7 +183,9 @@ void OSystem_GP2X::initBackend() {
// Setup other defaults.
ConfMan.registerDefault("aspect_ratio", true);
- ConfMan.registerDefault("music_volume", 220); // Up default volume as we use a seperate volume system anyway.
+
+ /* Up default volume values as we use a seperate system level volume anyway. */
+ ConfMan.registerDefault("music_volume", 220);
ConfMan.registerDefault("sfx_volume", 220);
ConfMan.registerDefault("speech_volume", 220);
ConfMan.registerDefault("autosave_period", 3 * 60); // Trigger autosave every 3 minutes - On low batts 4 mins is about your warning time.
@@ -223,12 +209,6 @@ void OSystem_GP2X::initBackend() {
_joystick = SDL_JoystickOpen(joystick_num);
}
- // Create the savefile manager, if none exists yet (we check for this to
- // allow subclasses to provide their own).
- if (_savefile == 0) {
- _savefile = new POSIXSaveFileManager();
- }
-
// Create and hook up the mixer, if none exists yet (we check for this to
// allow subclasses to provide their own).
if (_mixer == 0) {
@@ -367,32 +347,37 @@ FilesystemFactory *OSystem_GP2X::getFilesystemFactory() {
}
void OSystem_GP2X::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
+ /* Setup default extra data paths for engine data files and plugins */
+ char workDirName[PATH_MAX+1];
-#ifdef DATA_PATH
- // Add the global DATA_PATH to the directory search list
- // FIXME: We use depth = 4 for now, to match the old code. May want to change that
- Common::FSNode dataNode(DATA_PATH);
- if (dataNode.exists() && dataNode.isDirectory()) {
- s.add(DATA_PATH, new Common::FSDirectory(dataNode, 4), priority);
+ if (getcwd(workDirName, PATH_MAX) == NULL) {
+ error("Error: Could not obtain current working directory.");
}
-#endif
-#if defined(MACOSX) || defined(IPHONE)
- // Get URL of the Resource directory of the .app bundle
- CFURLRef fileUrl = CFBundleCopyResourcesDirectoryURL(CFBundleGetMainBundle());
- if (fileUrl) {
- // Try to convert the URL to an absolute path
- UInt8 buf[MAXPATHLEN];
- if (CFURLGetFileSystemRepresentation(fileUrl, true, buf, sizeof(buf))) {
- // Success: Add it to the search path
- Common::String bundlePath((const char *)buf);
- s.add("__OSX_BUNDLE__", new Common::FSDirectory(bundlePath), priority);
- }
- CFRelease(fileUrl);
+ Common::FSNode workdirNode(workDirName);
+ if (workdirNode.exists() && workdirNode.isDirectory()) {
+ s.add("__GP2X_WORKDIR__", new Common::FSDirectory(workDirName), priority);
}
-#endif
+ char enginedataPath[PATH_MAX+1];
+
+ strcpy(enginedataPath, workDirName);
+ strcat(enginedataPath, "/engine-data");
+
+ Common::FSNode engineNode(enginedataPath);
+ if (engineNode.exists() && engineNode.isDirectory()) {
+ s.add("__GP2X_ENGDATA__", new Common::FSDirectory(enginedataPath), priority);
+ }
+
+ char pluginsPath[PATH_MAX+1];
+
+ strcpy(pluginsPath, workDirName);
+ strcat(pluginsPath, "/plugins");
+ Common::FSNode pluginsNode(pluginsPath);
+ if (pluginsNode.exists() && pluginsNode.isDirectory()) {
+ s.add("__GP2X_PLUGINS__", new Common::FSDirectory(pluginsPath), priority);
+ }
}
static Common::String getDefaultConfigFileName() {
@@ -479,6 +464,12 @@ void OSystem_GP2X::quit() {
delete getEventManager();
+ #ifdef DUMP_STDOUT
+ printf("%s\n", "Debug: STDOUT and STDERR text files closed.");
+ fclose(stdout);
+ fclose(stderr);
+ #endif /* DUMP_STDOUT */
+
exit(0);
}
diff --git a/backends/platform/gp2xwiz/build/bundle.sh b/backends/platform/gp2xwiz/build/bundle.sh
index 1dcdb6389e..506dfcb742 100755
--- a/backends/platform/gp2xwiz/build/bundle.sh
+++ b/backends/platform/gp2xwiz/build/bundle.sh
@@ -22,6 +22,7 @@ cp ../../../../COPYING ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
cp ../../../../COPYRIGHT ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
cp ../../../../NEWS ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
cp ../../../../gui/themes/scummmodern.zip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
+cp ../../../../backends/vkeybd/packs/vkeybd_default.zip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
cp ../../../../dists/pred.dic ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
cp ../../../../dists/engine-data/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/engine-data
cp ../../../../plugins/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/plugins
diff --git a/backends/platform/gp2xwiz/build/config-alleng.sh b/backends/platform/gp2xwiz/build/config-alleng.sh
index 19ee308908..cfed463edf 100755
--- a/backends/platform/gp2xwiz/build/config-alleng.sh
+++ b/backends/platform/gp2xwiz/build/config-alleng.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-all-engines --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-all-engines --enable-vkeybd --enable-plugins --default-dynamic
echo Generating config for GP2X Wiz complete. Check for errors.
diff --git a/backends/platform/gp2xwiz/build/config.sh b/backends/platform/gp2xwiz/build/config.sh
index b6889fe3ac..27c1fbf0bf 100755
--- a/backends/platform/gp2xwiz/build/config.sh
+++ b/backends/platform/gp2xwiz/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-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/gp2xwiz/gp2xwiz-events.cpp b/backends/platform/gp2xwiz/gp2xwiz-events.cpp
index ea1b191213..dfb36742dc 100644
--- a/backends/platform/gp2xwiz/gp2xwiz-events.cpp
+++ b/backends/platform/gp2xwiz/gp2xwiz-events.cpp
@@ -30,7 +30,7 @@
#include "backends/platform/gp2xwiz/gp2xwiz-sdl.h"
#include "backends/platform/gp2xwiz/gp2xwiz-hw.h"
-#include "backends/keymapper/keymapper.h"
+
#include "common/util.h"
#include "common/events.h"
@@ -41,6 +41,28 @@
#define JOY_XAXIS 0
#define JOY_YAXIS 1
+/* GP2X Wiz: Main Joystick Mappings */
+enum {
+ GP2X_BUTTON_UP = 0,
+ GP2X_BUTTON_UPLEFT = 1,
+ GP2X_BUTTON_LEFT = 2,
+ GP2X_BUTTON_DOWNLEFT = 3,
+ GP2X_BUTTON_DOWN = 4,
+ GP2X_BUTTON_DOWNRIGHT = 5,
+ GP2X_BUTTON_RIGHT = 6,
+ GP2X_BUTTON_UPRIGHT = 7,
+ GP2X_BUTTON_MENU = 8,
+ GP2X_BUTTON_SELECT = 9,
+ GP2X_BUTTON_L = 10,
+ GP2X_BUTTON_R = 11,
+ GP2X_BUTTON_A = 12,
+ GP2X_BUTTON_B = 13,
+ GP2X_BUTTON_X = 14,
+ GP2X_BUTTON_Y = 15,
+ GP2X_BUTTON_VOLUP = 16,
+ GP2X_BUTTON_VOLDOWN = 17
+};
+
static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) {
if (key >= SDLK_F1 && key <= SDLK_F9) {
return key - SDLK_F1 + Common::ASCII_F1;
@@ -173,8 +195,8 @@ bool OSystem_GP2XWIZ::pollEvent(Common::Event &event) {
GP2X_BUTTON_Y Space Bar
GP2X_BUTTON_X Right Mouse Click
GP2X_BUTTON_L Combo Modifier (Left Trigger)
- GP2X_BUTTON_R F5 (Right Trigger)
- GP2X_BUTTON_MENU Return
+ GP2X_BUTTON_R Return (Right Trigger)
+ GP2X_BUTTON_MENU F5 (Game Menu)
GP2X_BUTTON_SELECT Escape
GP2X_BUTTON_VOLUP /dev/mixer Global Volume Up
GP2X_BUTTON_VOLDOWN /dev/mixer Global Volume Down
@@ -291,8 +313,13 @@ bool OSystem_GP2XWIZ::pollEvent(Common::Event &event) {
break;
case GP2X_BUTTON_R:
if (GP2X_BUTTON_STATE_L == true) {
+#ifdef ENABLE_VKEYBD
+ event.kbd.keycode = Common::KEYCODE_F7;
+ event.kbd.ascii = mapKey(SDLK_F7, ev.key.keysym.mod, 0);
+#else
event.kbd.keycode = Common::KEYCODE_0;
event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);
+#endif
} else {
event.kbd.keycode = Common::KEYCODE_RETURN;
event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0);
@@ -388,8 +415,13 @@ bool OSystem_GP2XWIZ::pollEvent(Common::Event &event) {
break;
case GP2X_BUTTON_R:
if (GP2X_BUTTON_STATE_L == true) {
+#ifdef ENABLE_VKEYBD
+ event.kbd.keycode = Common::KEYCODE_F7;
+ event.kbd.ascii = mapKey(SDLK_F7, ev.key.keysym.mod, 0);
+#else
event.kbd.keycode = Common::KEYCODE_0;
event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);
+#endif
} else {
event.kbd.keycode = Common::KEYCODE_RETURN;
event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0);
diff --git a/backends/platform/gp2xwiz/gp2xwiz-hw.cpp b/backends/platform/gp2xwiz/gp2xwiz-hw.cpp
index c804b0d819..4d69915e27 100644
--- a/backends/platform/gp2xwiz/gp2xwiz-hw.cpp
+++ b/backends/platform/gp2xwiz/gp2xwiz-hw.cpp
@@ -42,6 +42,16 @@
namespace WIZ_HW {
+enum {
+ VOLUME_NOCHG = 0,
+ VOLUME_DOWN = 1,
+ VOLUME_UP = 2,
+ VOLUME_CHANGE_RATE = 8,
+ VOLUME_MIN = 0,
+ VOLUME_INITIAL = 70,
+ VOLUME_MAX = 100
+};
+
int volumeLevel = VOLUME_INITIAL;
void deviceInit() {
diff --git a/backends/platform/gp2xwiz/gp2xwiz-hw.h b/backends/platform/gp2xwiz/gp2xwiz-hw.h
index 577facc437..507841e902 100644
--- a/backends/platform/gp2xwiz/gp2xwiz-hw.h
+++ b/backends/platform/gp2xwiz/gp2xwiz-hw.h
@@ -31,37 +31,8 @@
#ifndef GP2XWIZ_HW_H
#define GP2XWIZ_HW_H
-/* GP2X Wiz: Main Joystick Mappings */
-
-#define GP2X_BUTTON_UP (0)
-#define GP2X_BUTTON_UPLEFT (1)
-#define GP2X_BUTTON_LEFT (2)
-#define GP2X_BUTTON_DOWNLEFT (3)
-#define GP2X_BUTTON_DOWN (4)
-#define GP2X_BUTTON_DOWNRIGHT (5)
-#define GP2X_BUTTON_RIGHT (6)
-#define GP2X_BUTTON_UPRIGHT (7)
-#define GP2X_BUTTON_MENU (8)
-#define GP2X_BUTTON_SELECT (9)
-#define GP2X_BUTTON_L (10)
-#define GP2X_BUTTON_R (11)
-#define GP2X_BUTTON_A (12)
-#define GP2X_BUTTON_B (13)
-#define GP2X_BUTTON_X (14)
-#define GP2X_BUTTON_Y (15)
-#define GP2X_BUTTON_VOLUP (16)
-#define GP2X_BUTTON_VOLDOWN (17)
-
namespace WIZ_HW {
-#define VOLUME_MIN 0
-#define VOLUME_INITIAL 70 /* Default volume if you call mixerMoveVolume(0) without setting the global var. */
-#define VOLUME_MAX 100
-#define VOLUME_CHANGE_RATE 8
-#define VOLUME_NOCHG 0
-#define VOLUME_DOWN 1
-#define VOLUME_UP 2
-
extern int volumeLevel;
extern void deviceInit();
diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m
index 0392172aa2..61770a16c2 100644
--- a/backends/platform/iphone/iphone_video.m
+++ b/backends/platform/iphone/iphone_video.m
@@ -36,6 +36,9 @@ static int _textureHeight = 0;
NSLock* _lock = nil;
static int _needsScreenUpdate = 0;
+static UITouch* _firstTouch = NULL;
+static UITouch* _secondTouch = NULL;
+
// static long lastTick = 0;
// static int frames = 0;
@@ -47,14 +50,14 @@ void iPhone_updateScreen() {
}
void iPhone_updateScreenRect(unsigned short* screen, int x1, int y1, int x2, int y2) {
- [_lock lock];
+ //[_lock lock];
int y;
for (y = y1; y < y2; ++y) {
memcpy(&_textureBuffer[(y * _textureWidth + x1 )* 2], &screen[y * _width + x1], (x2 - x1) * 2);
}
- [_lock unlock];
+ //[_lock unlock];
}
@@ -192,12 +195,12 @@ uint getSizeNextPOT(uint size) {
glVertexPointer(2, GL_FLOAT, 0, vertices);
glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
- [_lock lock];
+ //[_lock lock];
// Unfortunately we have to update the whole texture every frame, since glTexSubImage2D is actually slower in all cases
// due to the iPhone internals having to convert the whole texture back from its internal format when used.
// In the future we could use several tiled textures instead.
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, _textureWidth, _textureHeight, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, _textureBuffer);
- [_lock unlock];
+ //[_lock unlock];
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glBindRenderbufferOES(GL_RENDERBUFFER_OES, _viewRenderbuffer);
@@ -280,7 +283,7 @@ uint getSizeNextPOT(uint size) {
glBindRenderbufferOES(GL_RENDERBUFFER_OES, _viewRenderbuffer);
// The color buffer is triple-buffered, so we clear it multiple times right away to avid doing any glClears later.
- int clearCount = 3;
+ int clearCount = 5;
while (clearCount-- > 0) {
glClear(GL_COLOR_BUFFER_BIT);
[_context presentRenderbuffer:GL_RENDERBUFFER_OES];
@@ -366,7 +369,6 @@ uint getSizeNextPOT(uint size) {
];
}
-
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
NSSet *allTouches = [event allTouches];
@@ -374,11 +376,12 @@ uint getSizeNextPOT(uint size) {
switch ([allTouches count]) {
case 1:
{
- UITouch *touch = [[allTouches allObjects] objectAtIndex:0];
+ UITouch *touch = [touches anyObject];
CGPoint point = [touch locationInView:self];
if (!getLocalMouseCoords(&point))
return;
+ _firstTouch = touch;
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputMouseDown], @"type",
@@ -391,11 +394,12 @@ uint getSizeNextPOT(uint size) {
}
case 2:
{
- UITouch *touch = [[allTouches allObjects] objectAtIndex:1];
+ UITouch *touch = [touches anyObject];
CGPoint point = [touch locationInView:self];
if (!getLocalMouseCoords(&point))
return;
+ _secondTouch = touch;
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputMouseSecondDown], @"type",
@@ -413,14 +417,13 @@ uint getSizeNextPOT(uint size) {
{
NSSet *allTouches = [event allTouches];
- switch ([allTouches count]) {
- case 1:
- {
- UITouch *touch = [[allTouches allObjects] objectAtIndex:0];
+ for (UITouch* touch in touches) {
+ if (touch == _firstTouch) {
+
CGPoint point = [touch locationInView:self];
if (!getLocalMouseCoords(&point))
return;
-
+
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputMouseDragged], @"type",
@@ -429,15 +432,13 @@ uint getSizeNextPOT(uint size) {
nil
]
];
- break;
- }
- case 2:
- {
- UITouch *touch = [[allTouches allObjects] objectAtIndex:1];
+
+ } else if (touch == _secondTouch) {
+
CGPoint point = [touch locationInView:self];
if (!getLocalMouseCoords(&point))
return;
-
+
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputMouseSecondDragged], @"type",
@@ -446,7 +447,7 @@ uint getSizeNextPOT(uint size) {
nil
]
];
- break;
+
}
}
}
diff --git a/backends/platform/iphone/osys_iphone.cpp b/backends/platform/iphone/osys_iphone.cpp
index b72e8b65d5..7f30c0caaf 100644
--- a/backends/platform/iphone/osys_iphone.cpp
+++ b/backends/platform/iphone/osys_iphone.cpp
@@ -813,22 +813,22 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
return false;
}
+ static const int kNeededLength = 100;
+ static const int kMaxDeviation = 20;
+
int vecX = (x - _gestureStartX);
int vecY = (y - _gestureStartY);
- int lengthSq = vecX * vecX + vecY * vecY;
- //printf("Lengthsq: %u\n", lengthSq);
+
+ int absX = abs(vecX);
+ int absY = abs(vecY);
+
+ //printf("(%d, %d)\n", vecX, vecY);
- if (lengthSq > 15000) { // Long enough gesture to react upon.
+ if (absX >= kNeededLength || absY >= kNeededLength) { // Long enough gesture to react upon.
_gestureStartX = -1;
_gestureStartY = -1;
- float vecLength = sqrt(lengthSq);
- float vecXNorm = vecX / vecLength;
- float vecYNorm = vecY / vecLength;
-
- //printf("Swipe vector: (%.2f, %.2f)\n", vecXNorm, vecYNorm);
-
- if (vecXNorm > -0.50 && vecXNorm < 0.50 && vecYNorm > 0.75) {
+ if (absX < kMaxDeviation && vecY >= kNeededLength) {
// Swipe down
event.type = Common::EVENT_KEYDOWN;
_queuedInputEvent.type = Common::EVENT_KEYUP;
@@ -837,7 +837,10 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
event.kbd.keycode = _queuedInputEvent.kbd.keycode = Common::KEYCODE_F5;
event.kbd.ascii = _queuedInputEvent.kbd.ascii = Common::ASCII_F5;
_needEventRestPeriod = true;
- } else if (vecXNorm > -0.50 && vecXNorm < 0.50 && vecYNorm < -0.75) {
+ return true;
+ }
+
+ if (absX < kMaxDeviation && -vecY >= kNeededLength) {
// Swipe up
_mouseClickAndDragEnabled = !_mouseClickAndDragEnabled;
const char *dialogMsg;
@@ -849,8 +852,9 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
GUI::TimedMessageDialog dialog(dialogMsg, 1500);
dialog.runModal();
return false;
-
- } else if (vecXNorm > 0.75 && vecYNorm > -0.5 && vecYNorm < 0.5) {
+ }
+
+ if (absY < kMaxDeviation && vecX >= kNeededLength) {
// Swipe right
_touchpadModeEnabled = !_touchpadModeEnabled;
const char *dialogMsg;
@@ -862,7 +866,9 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
dialog.runModal();
return false;
- } else if (vecXNorm < -0.75 && vecYNorm > -0.5 && vecYNorm < 0.5) {
+ }
+
+ if (absY < kMaxDeviation && -vecX >= kNeededLength) {
// Swipe left
return false;
}
@@ -1106,16 +1112,18 @@ void OSystem_IPHONE::AQBufferCallback(void *in, AudioQueueRef inQ, AudioQueueBuf
outQB->mAudioDataByteSize = 4 * s_AudioQueue.frameCount;
s_soundCallback(s_soundParam, (byte *)outQB->mAudioData, outQB->mAudioDataByteSize);
AudioQueueEnqueueBuffer(inQ, outQB, 0, NULL);
- } else
+ } else {
AudioQueueStop(s_AudioQueue.queue, false);
+ }
}
void OSystem_IPHONE::mixCallback(void *sys, byte *samples, int len) {
OSystem_IPHONE *this_ = (OSystem_IPHONE *)sys;
assert(this_);
- if (this_->_mixer)
+ if (this_->_mixer) {
this_->_mixer->mixCallback(samples, len);
+ }
}
void OSystem_IPHONE::setupMixer() {
@@ -1202,9 +1210,6 @@ void OSystem_IPHONE::getTimeAndDate(struct tm &t) const {
t = *localtime(&curTime);
}
-void OSystem_IPHONE::setWindowCaption(const char *caption) {
-}
-
Common::SaveFileManager *OSystem_IPHONE::getSavefileManager() {
assert(_savefile);
return _savefile;
diff --git a/backends/platform/iphone/osys_iphone.h b/backends/platform/iphone/osys_iphone.h
index ceb2102a5f..705f89319a 100644
--- a/backends/platform/iphone/osys_iphone.h
+++ b/backends/platform/iphone/osys_iphone.h
@@ -171,8 +171,6 @@ public:
virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
virtual void getTimeAndDate(struct tm &t) const;
- virtual void setWindowCaption(const char *caption);
-
virtual Common::SaveFileManager *getSavefileManager();
virtual Audio::Mixer *getMixer();
virtual Common::TimerManager *getTimerManager();
diff --git a/backends/platform/null/null.cpp b/backends/platform/null/null.cpp
index 304b7e80eb..ca4eda9158 100644
--- a/backends/platform/null/null.cpp
+++ b/backends/platform/null/null.cpp
@@ -113,8 +113,6 @@ public:
virtual void quit();
- virtual void setWindowCaption(const char *caption);
-
virtual Common::SaveFileManager *getSavefileManager();
virtual Audio::Mixer *getMixer();
virtual void getTimeAndDate(struct tm &t) const;
@@ -308,9 +306,6 @@ bool OSystem_NULL::setSoundCallback(SoundProc proc, void *param) {
void OSystem_NULL::quit() {
}
-void OSystem_NULL::setWindowCaption(const char *caption) {
-}
-
Common::SaveFileManager *OSystem_NULL::getSavefileManager() {
assert(_savefile);
return _savefile;
diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h
index 29747c0943..ab27d93574 100644
--- a/backends/platform/ps2/systemps2.h
+++ b/backends/platform/ps2/systemps2.h
@@ -73,7 +73,6 @@ public:
virtual void unlockScreen();
virtual void updateScreen();
/* TODO : check */
- virtual void fillScreen(unsigned int i) { printf("fillScreen %d\n", i); };
virtual void displayMessageOnOSD(const char *msg) { printf("displayMessageOnOSD: %s\n", msg); };
/* */
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index 63ea5bc0dc..45be0a0cd3 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -635,12 +635,6 @@ void OSystem_PSP::getTimeAndDate(struct tm &t) const {
t = *localtime(&curTime);
}
-void OSystem_PSP::setWindowCaption(const char *caption) {
-}
-
-void OSystem_PSP::displayMessageOnOSD(const char *msg) {
-}
-
#define PSP_CONFIG_FILE "ms0:/scummvm.ini"
Common::SeekableReadStream *OSystem_PSP::createConfigReadStream() {
diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h
index 7abba332df..34957b293c 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -140,10 +140,6 @@ public:
virtual void quit();
- virtual void setWindowCaption(const char *caption);
-
- virtual void displayMessageOnOSD(const char *msg);
-
virtual Common::SeekableReadStream *createConfigReadStream();
virtual Common::WriteStream *createConfigWriteStream();
};
diff --git a/backends/platform/psp/psp.spec b/backends/platform/psp/psp.spec
index 223bd58098..807b8f93b7 100644
--- a/backends/platform/psp/psp.spec
+++ b/backends/platform/psp/psp.spec
@@ -1,3 +1,3 @@
%rename lib old_lib
*lib:
--lg -lm -lstdc++ -lsupc++ -lg -lpsprtc -lpspaudio -lpspuser -lpsputility -lpspdebug -lc -lpspgum -lpspvfpu -lpspgu -lpspctrl -lpspge -lpspdisplay_driver -lpspdisplay -lpsphprm -lpspge_driver -lpspsdk -lpsppower -lpsppower_driver -lpspgum_vfpu -lpspkernel %(old_lib)
+%(old_lib) -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lz -lstdc++ -lc -lpspdisplay -lpspgu -lpspctrl -lpspsdk -lpspnet -lpspnet_inet -lpsputility -lpspsdk -lpspuser
diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp
index b4fc5e0777..feb2c9a9c5 100644
--- a/backends/platform/sdl/events.cpp
+++ b/backends/platform/sdl/events.cpp
@@ -252,6 +252,11 @@ bool OSystem_SDL::pollEvent(Common::Event &event) {
}
#endif
+ if ((ev.key.keysym.mod & KMOD_CTRL) && ev.key.keysym.sym == 'u') {
+ event.type = Common::EVENT_MUTE;
+ return true;
+ }
+
// Ctrl-Alt-<key> will change the GFX mode
if ((b & (Common::KBD_CTRL|Common::KBD_ALT)) == (Common::KBD_CTRL|Common::KBD_ALT)) {
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 3f9b81a912..105206ec07 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -395,13 +395,20 @@ Common::WriteStream *OSystem_SDL::createConfigWriteStream() {
}
void OSystem_SDL::setWindowCaption(const char *caption) {
- Common::String cap(caption);
+ Common::String cap;
+ byte c;
+
+ // The string caption is supposed to be in LATIN-1 encoding.
+ // SDL expects UTF-8. So we perform the conversion here.
+ while ((c = *(const byte *)caption++)) {
+ if (c < 0x80)
+ cap += c;
+ else {
+ cap += 0xC0 | (c >> 6);
+ cap += 0x80 | (c & 0x3F);
+ }
+ }
- // Filter out any non-ASCII characters, replacing them by question marks.
- // At some point, we may wish to allow LATIN 1 or UTF-8.
- for (uint i = 0; i < cap.size(); ++i)
- if ((byte)cap[i] > 0x7F)
- cap.setChar('?', i);
SDL_WM_SetCaption(cap.c_str(), cap.c_str());
}
@@ -487,7 +494,7 @@ void OSystem_SDL::quit() {
void OSystem_SDL::setupIcon() {
int x, y, w, h, ncols, nbytes, i;
unsigned int rgba[256];
- unsigned int *icon;
+ unsigned int *icon;
sscanf(scummvm_icon[0], "%d %d %d %d", &w, &h, &ncols, &nbytes);
if ((w > 512) || (h > 512) || (ncols > 255) || (nbytes > 1)) {
diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp
index c45cef32bd..995b03f200 100644
--- a/backends/platform/symbian/src/SymbianActions.cpp
+++ b/backends/platform/symbian/src/SymbianActions.cpp
@@ -102,8 +102,15 @@ SymbianActions::SymbianActions()
}
void SymbianActions::initInstanceMain(OSystem *mainSystem) {
+ int i;
+
Actions::initInstanceMain(mainSystem);
+ // Disable all mappings before setting main mappings again
+ for (i = 0; i < ACTION_LAST; i++) {
+ _action_enabled[i] = false;
+ }
+
// Mouse Up
_action_enabled[ACTION_UP] = true;
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index 452f730110..7af1cade8c 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -471,9 +471,18 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) {
void OSystem_SDL_Symbian::setWindowCaption(const char *caption) {
OSystem_SDL::setWindowCaption(caption);
+}
+
+void OSystem_SDL_Symbian::engineInit() {
+ // Check mappings for the engine just started
check_mappings();
}
+void OSystem_SDL_Symbian::engineDone() {
+ // Need to reset engine to basic state after an engine has been running
+ GUI::Actions::Instance()->initInstanceMain(this);
+}
+
void OSystem_SDL_Symbian::check_mappings() {
if (ConfMan.get("gameid").empty() || GUI::Actions::Instance()->initialized())
return;
diff --git a/backends/platform/symbian/src/SymbianOS.h b/backends/platform/symbian/src/SymbianOS.h
index efca94b706..b873b503be 100644
--- a/backends/platform/symbian/src/SymbianOS.h
+++ b/backends/platform/symbian/src/SymbianOS.h
@@ -107,6 +107,18 @@ protected:
void setWindowCaption(const char *caption);
+ /**
+ * Allows the backend to perform engine specific init.
+ * Called just before the engine is run.
+ */
+ virtual void engineInit();
+
+ /**
+ * Allows the backend to perform engine specific de-init.
+ * Called after the engine finishes.
+ */
+ virtual void engineDone();
+
//
// Used to intialized special game mappings
//
diff --git a/backends/platform/wii/wii.mk b/backends/platform/wii/wii.mk
index 030cc997eb..f99288c4a6 100644
--- a/backends/platform/wii/wii.mk
+++ b/backends/platform/wii/wii.mk
@@ -1,61 +1,25 @@
-WII_ELF=scummvm.elf
-WII_DOL=scummvm.dol
-WII_DISTPATH=$(srcdir)/dists/wii
-all: $(WII_DOL)
+WII_EXE := scummvm$(EXEEXT)
+WII_EXE_STRIPPED := scummvm_stripped$(EXEEXT)
-$(WII_DOL): $(WII_ELF)
- $(DEVKITPPC)/bin/elf2dol $< $@
+$(WII_EXE_STRIPPED): $(WII_EXE)
+ $(STRIP) $< -o $@
clean: wiiclean
wiiclean:
- $(RM) $(WII_DOL)
+ $(RM) $(WII_EXE_STRIPPED)
-wiiload: $(WII_DOL)
- $(DEVKITPPC)/bin/wiiload $(WII_DOL) -d3
+wiiload: $(WII_EXE_STRIPPED)
+ $(DEVKITPPC)/bin/wiiload $<
-geckoupload: $(WII_DOL)
- $(DEVKITPPC)/bin/geckoupload $(WII_DOL)
+geckoupload: $(WII_EXE_STRIPPED)
+ $(DEVKITPPC)/bin/geckoupload $<
wiigdb:
- $(DEVKITPPC)/bin/powerpc-gekko-gdb -n $(WII_ELF)
+ $(DEVKITPPC)/bin/powerpc-gekko-gdb -n $(WII_EXE)
wiidebug:
- $(DEVKITPPC)/bin/powerpc-gekko-gdb -n $(WII_ELF) -x $(srcdir)/backends/platform/wii/gdb.txt
-
-wiidist:
- $(MKDIR) dist/scummvm
- $(CP) $(WII_DOL) dist/scummvm/boot.dol
- $(CP) $(WII_DISTPATH)/meta.xml dist/scummvm/
- $(CP) $(WII_DISTPATH)/icon.png dist/scummvm/
- $(CP) $(WII_DISTPATH)/READMII dist/scummvm/
- $(CP) $(srcdir)/AUTHORS dist/scummvm/
- $(CP) $(srcdir)/COPYING dist/scummvm/
- $(CP) $(srcdir)/COPYING.LGPL dist/scummvm/
- $(CP) $(srcdir)/COPYRIGHT dist/scummvm/
- $(CP) $(srcdir)/NEWS dist/scummvm/
- $(CP) $(srcdir)/README dist/scummvm/
- $(CP) $(srcdir)/dists/pred.dic dist/scummvm/
- $(CP) $(DIST_FILES_THEMES) dist/scummvm/
-ifneq ($(DIST_FILES_ENGINEDATA),)
- $(CP) $(DIST_FILES_ENGINEDATA) dist/scummvm/
-endif
-
-gcdist:
- $(MKDIR) dist/scummvm
- $(CP) $(WII_DOL) dist/scummvm/
- $(CP) $(WII_DISTPATH)/READMII dist/scummvm/
- $(CP) $(srcdir)/AUTHORS dist/scummvm/
- $(CP) $(srcdir)/COPYING dist/scummvm/
- $(CP) $(srcdir)/COPYING.LGPL dist/scummvm/
- $(CP) $(srcdir)/COPYRIGHT dist/scummvm/
- $(CP) $(srcdir)/NEWS dist/scummvm/
- $(CP) $(srcdir)/README dist/scummvm/
- $(CP) $(srcdir)/dists/pred.dic dist/scummvm/
- $(CP) $(DIST_FILES_THEMES) dist/scummvm/
-ifneq ($(DIST_FILES_ENGINEDATA),)
- $(CP) $(DIST_FILES_ENGINEDATA) dist/scummvm/
-endif
-
-.PHONY: wiiclean wiiload geckoupload wiigdb wiidebug wiidist gcdist
+ $(DEVKITPPC)/bin/powerpc-gekko-gdb -n $(WII_EXE) -x $(srcdir)/backends/platform/wii/gdb.txt
+
+.PHONY: wiiclean wiiload geckoupload wiigdb wiidebug
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 344edd7143..b8261d029e 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -916,6 +916,8 @@ void OSystem_WINCE3::setWindowCaption(const char *caption) {
compute_sample_rate();
setupMixer();
+FIXME: move check_mappings() etc. calls to engineInit() & engineDone()
+
// handle the actual event
OSystem_SDL::setWindowCaption(caption);
}
diff --git a/backends/vkeybd/packs/vkeybd_default.zip b/backends/vkeybd/packs/vkeybd_default.zip
new file mode 100644
index 0000000000..9311b2a902
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_default.zip
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_default/lowercase-symbols320x240.bmp b/backends/vkeybd/packs/vkeybd_default/lowercase-symbols320x240.bmp
new file mode 100644
index 0000000000..02254aa3c7
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_default/lowercase-symbols320x240.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_default/lowercase-symbols640x480.bmp b/backends/vkeybd/packs/vkeybd_default/lowercase-symbols640x480.bmp
new file mode 100644
index 0000000000..98c602acbe
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_default/lowercase-symbols640x480.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_default/lowercase320x240.bmp b/backends/vkeybd/packs/vkeybd_default/lowercase320x240.bmp
new file mode 100644
index 0000000000..3270bf21e4
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_default/lowercase320x240.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_default/lowercase640x480.bmp b/backends/vkeybd/packs/vkeybd_default/lowercase640x480.bmp
new file mode 100644
index 0000000000..610f0844d0
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_default/lowercase640x480.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_default/uppercase-symbols320x240.bmp b/backends/vkeybd/packs/vkeybd_default/uppercase-symbols320x240.bmp
new file mode 100644
index 0000000000..8fd645eb22
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_default/uppercase-symbols320x240.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_default/uppercase-symbols640x480.bmp b/backends/vkeybd/packs/vkeybd_default/uppercase-symbols640x480.bmp
new file mode 100644
index 0000000000..cbdfbf19e9
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_default/uppercase-symbols640x480.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_default/uppercase320x240.bmp b/backends/vkeybd/packs/vkeybd_default/uppercase320x240.bmp
new file mode 100644
index 0000000000..6a1132314a
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_default/uppercase320x240.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_default/uppercase640x480.bmp b/backends/vkeybd/packs/vkeybd_default/uppercase640x480.bmp
new file mode 100644
index 0000000000..e635a3ccf2
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_default/uppercase640x480.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd_default/vkeybd_default.xml b/backends/vkeybd/packs/vkeybd_default/vkeybd_default.xml
new file mode 100644
index 0000000000..982c4f45ef
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_default/vkeybd_default.xml
@@ -0,0 +1,920 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<keyboard initial_mode="lowercase" v_align="bottom" h_align="centre">
+
+ <!-- Lowercase -->
+ <mode name="lowercase" resolutions="320x240,640x480">
+ <layout resolution="320x240" bitmap="lowercase320x240.bmp" transparent_color="255,0,255">
+ <map>
+ <area shape="rect" coords="13,8,306,20" target="display_area" />
+ <area shape="rect" coords="9,26,25,42" target="esc" />
+ <area shape="rect" coords="50,25,67,43" target="f2" />
+ <area shape="rect" coords="29,24,46,43" target="f1" />
+ <area shape="rect" coords="71,26,88,44" target="f3" />
+ <area shape="rect" coords="90,25,107,43" target="f4" />
+ <area shape="rect" coords="111,26,128,44" target="f5" />
+ <area shape="rect" coords="132,26,149,44" target="f6" />
+ <area shape="rect" coords="153,25,170,44" target="f7" />
+ <area shape="rect" coords="173,26,190,44" target="f8" />
+ <area shape="rect" coords="194,24,211,43" target="f9" />
+ <area shape="rect" coords="215,26,231,44" target="f10" />
+ <area shape="rect" coords="235,26,253,43" target="f11" />
+ <area shape="rect" coords="255,26,272,45" target="f12" />
+ <area shape="rect" coords="276,27,310,43" target="del" />
+ <area shape="rect" coords="276,47,308,64" target="backspace" />
+ <area shape="rect" coords="8,68,32,85" target="tab" />
+ <area shape="rect" coords="36,68,53,85" target="q" />
+ <area shape="rect" coords="57,68,75,86" target="w" />
+ <area shape="rect" coords="78,67,94,85" target="e" />
+ <area shape="rect" coords="98,67,115,85" target="r" />
+ <area shape="rect" coords="119,67,136,85" target="t" />
+ <area shape="rect" coords="141,68,158,86" target="y" />
+ <area shape="rect" coords="161,67,179,86" target="u" />
+ <area shape="rect" coords="182,67,199,86" target="i" />
+ <area shape="rect" coords="202,67,220,85" target="o" />
+ <area shape="rect" coords="223,68,240,86" target="p" />
+ <area shape="rect" coords="44,88,63,107" target="a" />
+ <area shape="rect" coords="65,88,84,106" target="s" />
+ <area shape="rect" coords="86,89,104,107" target="d" />
+ <area shape="rect" coords="107,89,124,107" target="f" />
+ <area shape="rect" coords="128,89,145,107" target="g" />
+ <area shape="rect" coords="149,88,165,107" target="h" />
+ <area shape="rect" coords="169,89,186,107" target="j" />
+ <area shape="rect" coords="189,89,207,107" target="k" />
+ <area shape="rect" coords="210,89,228,107" target="l" />
+ <area shape="rect" coords="273,89,311,106" target="enter" />
+ <area shape="rect" coords="9,110,50,127" target="shift" />
+ <area shape="rect" coords="8,89,41,106" target="caps" />
+ <area shape="rect" coords="58,110,75,128" target="z" />
+ <area shape="rect" coords="79,110,96,128" target="x" />
+ <area shape="rect" coords="99,109,116,127" target="c" />
+ <area shape="rect" coords="120,110,138,128" target="v" />
+ <area shape="rect" coords="141,109,157,127" target="b" />
+ <area shape="rect" coords="162,110,179,128" target="n" />
+ <area shape="rect" coords="182,110,199,128" target="m" />
+ <area shape="rect" coords="271,109,311,128" target="symbols" />
+ <area shape="rect" coords="9,130,33,148" target="ctrl" />
+ <area shape="rect" coords="38,130,61,147" target="alt" />
+ <area shape="rect" coords="67,130,262,148" target="space" />
+ <area shape="rect" coords="8,47,26,64" target="|" />
+ <area shape="rect" coords="28,47,45,64" target="1" />
+ <area shape="rect" coords="50,47,67,65" target="2" />
+ <area shape="rect" coords="70,46,87,65" target="3" />
+ <area shape="rect" coords="91,46,108,64" target="4" />
+ <area shape="rect" coords="111,46,129,65" target="5" />
+ <area shape="rect" coords="132,47,149,65" target="6" />
+ <area shape="rect" coords="152,47,170,64" target="7" />
+ <area shape="rect" coords="174,46,191,63" target="8" />
+ <area shape="rect" coords="194,47,211,65" target="9" />
+ <area shape="rect" coords="215,46,232,64" target="0" />
+ <area shape="rect" coords="235,47,252,65" target="-" />
+ <area shape="rect" coords="255,46,272,65" target="=" />
+ <area shape="rect" coords="244,68,261,86" target="[" />
+ <area shape="rect" coords="264,67,282,86" target="]" />
+ <area shape="rect" coords="284,68,309,86" target="#" />
+ <area shape="rect" coords="231,88,249,106" target=";" />
+ <area shape="rect" coords="251,89,269,107" target="’" />
+ <area shape="rect" coords="202,110,219,128" target="," />
+ <area shape="rect" coords="223,110,241,128" target="." />
+ <area shape="rect" coords="243,110,261,128" target="/" />
+ <area shape="rect" coords="277,133,292,148" target="ok" />
+ <area shape="rect" coords="292,133,309,148" target="cancel" />
+ </map>
+ </layout>
+ <layout resolution="640x480" bitmap="lowercase640x480.bmp" transparent_color="255,0,255">
+ <map>
+ <area shape="rect" coords="26,23,613,37" target="display_area" />
+ <area shape="rect" coords="18,52,51,85" target="esc" />
+ <area shape="rect" coords="100,51,135,88" target="f2" />
+ <area shape="rect" coords="59,49,94,88" target="f1" />
+ <area shape="rect" coords="142,53,176,89" target="f3" />
+ <area shape="rect" coords="181,51,216,87" target="f4" />
+ <area shape="rect" coords="223,52,258,88" target="f5" />
+ <area shape="rect" coords="265,52,299,89" target="f6" />
+ <area shape="rect" coords="306,51,341,90" target="f7" />
+ <area shape="rect" coords="347,53,382,89" target="f8" />
+ <area shape="rect" coords="389,49,424,88" target="f9" />
+ <area shape="rect" coords="431,52,464,89" target="f10" />
+ <area shape="rect" coords="470,53,506,88" target="f11" />
+ <area shape="rect" coords="511,52,546,90" target="f12" />
+ <area shape="rect" coords="552,55,620,87" target="del" />
+ <area shape="rect" coords="553,94,618,129" target="backspace" />
+ <area shape="rect" coords="17,136,66,171" target="tab" />
+ <area shape="rect" coords="73,137,108,171" target="q" />
+ <area shape="rect" coords="114,136,150,172" target="w" />
+ <area shape="rect" coords="157,134,189,171" target="e" />
+ <area shape="rect" coords="197,135,232,171" target="r" />
+ <area shape="rect" coords="239,135,274,172" target="t" />
+ <area shape="rect" coords="282,136,317,173" target="y" />
+ <area shape="rect" coords="322,135,359,173" target="u" />
+ <area shape="rect" coords="364,134,399,172" target="i" />
+ <area shape="rect" coords="404,135,440,171" target="o" />
+ <area shape="rect" coords="446,136,480,172" target="p" />
+ <area shape="rect" coords="89,177,127,216" target="a" />
+ <area shape="rect" coords="131,177,169,214" target="s" />
+ <area shape="rect" coords="173,178,209,215" target="d" />
+ <area shape="rect" coords="215,178,250,214" target="f" />
+ <area shape="rect" coords="256,178,291,214" target="g" />
+ <area shape="rect" coords="299,176,332,214" target="h" />
+ <area shape="rect" coords="339,178,374,215" target="j" />
+ <area shape="rect" coords="379,178,415,215" target="k" />
+ <area shape="rect" coords="421,178,457,215" target="l" />
+ <area shape="rect" coords="546,179,622,214" target="enter" />
+ <area shape="rect" coords="19,221,101,256" target="shift" />
+ <area shape="rect" coords="17,179,84,213" target="caps" />
+ <area shape="rect" coords="117,220,152,256" target="z" />
+ <area shape="rect" coords="158,220,192,256" target="x" />
+ <area shape="rect" coords="198,219,233,256" target="c" />
+ <area shape="rect" coords="240,220,276,257" target="v" />
+ <area shape="rect" coords="283,219,316,255" target="b" />
+ <area shape="rect" coords="324,220,359,256" target="n" />
+ <area shape="rect" coords="365,220,399,257" target="m" />
+ <area shape="rect" coords="542,219,623,257" target="symbols" />
+ <area shape="rect" coords="19,260,68,296" target="ctrl" />
+ <area shape="rect" coords="76,261,123,295" target="alt" />
+ <area shape="rect" coords="135,261,525,297" target="space" />
+ <area shape="rect" coords="16,95,53,129" target="|" />
+ <area shape="rect" coords="57,95,92,129" target="1" />
+ <area shape="rect" coords="100,94,134,130" target="2" />
+ <area shape="rect" coords="140,93,174,131" target="3" />
+ <area shape="rect" coords="182,93,217,130" target="4" />
+ <area shape="rect" coords="222,93,258,132" target="5" />
+ <area shape="rect" coords="265,94,299,131" target="6" />
+ <area shape="rect" coords="305,94,341,129" target="7" />
+ <area shape="rect" coords="348,93,382,128" target="8" />
+ <area shape="rect" coords="389,94,423,130" target="9" />
+ <area shape="rect" coords="431,93,465,130" target="0" />
+ <area shape="rect" coords="471,94,505,131" target="-" />
+ <area shape="rect" coords="511,93,546,131" target="=" />
+ <area shape="rect" coords="488,136,522,172" target="[" />
+ <area shape="rect" coords="529,135,565,173" target="]" />
+ <area shape="rect" coords="569,136,620,172" target="#" />
+ <area shape="rect" coords="462,177,498,214" target=";" />
+ <area shape="rect" coords="503,178,539,214" target="’" />
+ <area shape="rect" coords="405,220,440,256" target="," />
+ <area shape="rect" coords="447,220,483,256" target="." />
+ <area shape="rect" coords="487,220,524,256" target="/" />
+ <area shape="rect" coords="555,266,585,298" target="ok" />
+ <area shape="rect" coords="585,266,619,298" target="cancel" />
+ </map>
+ </layout>
+ <event name="esc" type="key" code="27" ascii="27" modifiers="" />
+ <event name="f1" type="key" code="282" ascii="315" modifiers="" />
+ <event name="f2" type="key" code="283" ascii="316" modifiers="" />
+ <event name="f3" type="key" code="284" ascii="317" modifiers="" />
+ <event name="f4" type="key" code="285" ascii="318" modifiers="" />
+ <event name="f5" type="key" code="286" ascii="319" modifiers="" />
+ <event name="f6" type="key" code="287" ascii="320" modifiers="" />
+ <event name="f7" type="key" code="288" ascii="321" modifiers="" />
+ <event name="f8" type="key" code="289" ascii="322" modifiers="" />
+ <event name="f9" type="key" code="290" ascii="323" modifiers="" />
+ <event name="f10" type="key" code="291" ascii="324" modifiers="" />
+ <event name="f11" type="key" code="292" ascii="325" modifiers="" />
+ <event name="f12" type="key" code="293" ascii="326" modifiers="" />
+ <event name="del" type="key" code="127" ascii="0" modifiers="" />
+ <event name="ctrl" type="modifier" modifiers="ctrl" />
+ <event name="alt" type="modifier" modifiers="alt" />
+ <event name="shift" type="modifier" modifiers="shift" />
+ <event name="caps" type="switch_mode" mode="uppercase" />
+ <event name="symbols" type="switch_mode" mode="lowercasesymbols" />
+ <event name="backspace" type="key" code="8" ascii="8" modifiers="" />
+ <event name="enter" type="key" code="13" ascii="13" modifiers="" />
+ <event name="|" type="key" code="124" ascii="124" modifiers="" />
+ <event name="-" type="key" code="45" ascii="45" modifiers="" />
+ <event name="=" type="key" code="61" ascii="61" modifiers="" />
+ <event name="[" type="key" code="91" ascii="91" modifiers="" />
+ <event name="]" type="key" code="93" ascii="93" modifiers="" />
+ <event name="#" type="key" code="35" ascii="35" modifiers="" />
+ <event name=";" type="key" code="59" ascii="59" modifiers="" />
+ <event name="'" type="key" code="39" ascii="39" modifiers="" />
+ <event name="," type="key" code="44" ascii="44" modifiers="" />
+ <event name="." type="key" code="46" ascii="46" modifiers="" />
+ <event name="/" type="key" code="47" ascii="47" modifiers="" />
+ <event name="space" type="key" code="32" ascii="32" modifiers="" />
+ <event name="tab" type="key" code="9" ascii="9" modifiers="" />
+ <event name="a" type="key" code="97" ascii="97" modifiers="" />
+ <event name="b" type="key" code="98" ascii="98" modifiers="" />
+ <event name="c" type="key" code="99" ascii="99" modifiers="" />
+ <event name="d" type="key" code="100" ascii="100" modifiers="" />
+ <event name="e" type="key" code="101" ascii="101" modifiers="" />
+ <event name="f" type="key" code="102" ascii="102" modifiers="" />
+ <event name="g" type="key" code="103" ascii="103" modifiers="" />
+ <event name="h" type="key" code="104" ascii="104" modifiers="" />
+ <event name="i" type="key" code="105" ascii="105" modifiers="" />
+ <event name="j" type="key" code="106" ascii="106" modifiers="" />
+ <event name="k" type="key" code="107" ascii="107" modifiers="" />
+ <event name="l" type="key" code="108" ascii="108" modifiers="" />
+ <event name="m" type="key" code="109" ascii="109" modifiers="" />
+ <event name="n" type="key" code="110" ascii="110" modifiers="" />
+ <event name="o" type="key" code="111" ascii="111" modifiers="" />
+ <event name="p" type="key" code="112" ascii="112" modifiers="" />
+ <event name="q" type="key" code="113" ascii="113" modifiers="" />
+ <event name="r" type="key" code="114" ascii="114" modifiers="" />
+ <event name="s" type="key" code="115" ascii="115" modifiers="" />
+ <event name="t" type="key" code="116" ascii="116" modifiers="" />
+ <event name="u" type="key" code="117" ascii="117" modifiers="" />
+ <event name="v" type="key" code="118" ascii="118" modifiers="" />
+ <event name="w" type="key" code="119" ascii="119" modifiers="" />
+ <event name="x" type="key" code="120" ascii="120" modifiers="" />
+ <event name="y" type="key" code="121" ascii="121" modifiers="" />
+ <event name="z" type="key" code="122" ascii="122" modifiers="" />
+ <event name="0" type="key" code="48" ascii="48" modifiers="" />
+ <event name="1" type="key" code="49" ascii="49" modifiers="" />
+ <event name="2" type="key" code="50" ascii="50" modifiers="" />
+ <event name="3" type="key" code="51" ascii="51" modifiers="" />
+ <event name="4" type="key" code="52" ascii="52" modifiers="" />
+ <event name="5" type="key" code="53" ascii="53" modifiers="" />
+ <event name="6" type="key" code="54" ascii="54" modifiers="" />
+ <event name="7" type="key" code="55" ascii="55" modifiers="" />
+ <event name="8" type="key" code="56" ascii="56" modifiers="" />
+ <event name="9" type="key" code="57" ascii="57" modifiers="" />
+ <event name="ok" type="submit" />
+ <event name="cancel" type="cancel" />
+ <event name="quit" type="submit" />
+ </mode>
+
+ <!-- Uppercase -->
+ <mode name="uppercase" resolutions="320x240,640x480">
+ <layout resolution="320x240" bitmap="uppercase320x240.bmp" transparent_color="255,0,255">
+ <map>
+ <area shape="rect" coords="13,8,306,20" target="display_area" />
+ <area shape="rect" coords="9,26,25,42" target="esc" />
+ <area shape="rect" coords="50,25,67,43" target="f2" />
+ <area shape="rect" coords="29,24,46,43" target="f1" />
+ <area shape="rect" coords="71,26,88,44" target="f3" />
+ <area shape="rect" coords="90,25,107,43" target="f4" />
+ <area shape="rect" coords="111,26,128,44" target="f5" />
+ <area shape="rect" coords="132,26,149,44" target="f6" />
+ <area shape="rect" coords="153,25,170,44" target="f7" />
+ <area shape="rect" coords="173,26,190,44" target="f8" />
+ <area shape="rect" coords="194,24,211,43" target="f9" />
+ <area shape="rect" coords="215,26,231,44" target="f10" />
+ <area shape="rect" coords="235,26,253,43" target="f11" />
+ <area shape="rect" coords="255,26,272,45" target="f12" />
+ <area shape="rect" coords="276,27,310,43" target="del" />
+ <area shape="rect" coords="276,47,308,64" target="backspace" />
+ <area shape="rect" coords="8,68,32,85" target="tab" />
+ <area shape="rect" coords="36,68,53,85" target="Q" />
+ <area shape="rect" coords="57,68,75,86" target="W" />
+ <area shape="rect" coords="78,67,94,85" target="E" />
+ <area shape="rect" coords="98,67,115,85" target="R" />
+ <area shape="rect" coords="119,67,136,85" target="T" />
+ <area shape="rect" coords="141,68,158,86" target="Y" />
+ <area shape="rect" coords="161,67,179,86" target="U" />
+ <area shape="rect" coords="182,67,199,86" target="I" />
+ <area shape="rect" coords="202,67,220,85" target="O" />
+ <area shape="rect" coords="223,68,240,86" target="P" />
+ <area shape="rect" coords="44,88,63,107" target="A" />
+ <area shape="rect" coords="65,88,84,106" target="S" />
+ <area shape="rect" coords="86,89,104,107" target="D" />
+ <area shape="rect" coords="107,89,124,107" target="F" />
+ <area shape="rect" coords="128,89,145,107" target="G" />
+ <area shape="rect" coords="149,88,165,107" target="H" />
+ <area shape="rect" coords="169,89,186,107" target="J" />
+ <area shape="rect" coords="189,89,207,107" target="K" />
+ <area shape="rect" coords="210,89,228,107" target="L" />
+ <area shape="rect" coords="273,89,311,106" target="enter" />
+ <area shape="rect" coords="9,110,50,127" target="shift" />
+ <area shape="rect" coords="8,89,41,106" target="caps" />
+ <area shape="rect" coords="58,110,75,128" target="Z" />
+ <area shape="rect" coords="79,110,96,128" target="X" />
+ <area shape="rect" coords="99,109,116,127" target="C" />
+ <area shape="rect" coords="120,110,138,128" target="V" />
+ <area shape="rect" coords="141,109,157,127" target="B" />
+ <area shape="rect" coords="162,110,179,128" target="N" />
+ <area shape="rect" coords="182,110,199,128" target="M" />
+ <area shape="rect" coords="271,109,311,128" target="symbols" />
+ <area shape="rect" coords="9,130,33,148" target="ctrl" />
+ <area shape="rect" coords="38,130,61,147" target="alt" />
+ <area shape="rect" coords="67,130,262,148" target="space" />
+ <area shape="rect" coords="8,47,26,64" target="|" />
+ <area shape="rect" coords="28,47,45,64" target="1" />
+ <area shape="rect" coords="50,47,67,65" target="2" />
+ <area shape="rect" coords="70,46,87,65" target="3" />
+ <area shape="rect" coords="91,46,108,64" target="4" />
+ <area shape="rect" coords="111,46,129,65" target="5" />
+ <area shape="rect" coords="132,47,149,65" target="6" />
+ <area shape="rect" coords="152,47,170,64" target="7" />
+ <area shape="rect" coords="174,46,191,63" target="8" />
+ <area shape="rect" coords="194,47,211,65" target="9" />
+ <area shape="rect" coords="215,46,232,64" target="0" />
+ <area shape="rect" coords="235,47,252,65" target="-" />
+ <area shape="rect" coords="255,46,272,65" target="=" />
+ <area shape="rect" coords="244,68,261,86" target="[" />
+ <area shape="rect" coords="264,67,282,86" target="]" />
+ <area shape="rect" coords="284,68,309,86" target="#" />
+ <area shape="rect" coords="231,88,249,106" target=";" />
+ <area shape="rect" coords="251,89,269,107" target="’" />
+ <area shape="rect" coords="202,110,219,128" target="," />
+ <area shape="rect" coords="223,110,241,128" target="." />
+ <area shape="rect" coords="243,110,261,128" target="/" />
+ </map>
+ </layout>
+ <layout resolution="640x480" bitmap="uppercase640x480.bmp" transparent_color="255,0,255">
+ <map>
+ <area shape="rect" coords="26,23,613,37" target="display_area" />
+ <area shape="rect" coords="18,52,51,85" target="esc" />
+ <area shape="rect" coords="100,51,135,88" target="f2" />
+ <area shape="rect" coords="59,49,94,88" target="f1" />
+ <area shape="rect" coords="142,53,176,89" target="f3" />
+ <area shape="rect" coords="181,51,216,87" target="f4" />
+ <area shape="rect" coords="223,52,258,88" target="f5" />
+ <area shape="rect" coords="265,52,299,89" target="f6" />
+ <area shape="rect" coords="306,51,341,90" target="f7" />
+ <area shape="rect" coords="347,53,382,89" target="f8" />
+ <area shape="rect" coords="389,49,424,88" target="f9" />
+ <area shape="rect" coords="431,52,464,89" target="f10" />
+ <area shape="rect" coords="470,53,506,88" target="f11" />
+ <area shape="rect" coords="511,52,546,90" target="f12" />
+ <area shape="rect" coords="552,55,620,87" target="del" />
+ <area shape="rect" coords="553,94,618,129" target="backspace" />
+ <area shape="rect" coords="17,136,66,171" target="tab" />
+ <area shape="rect" coords="73,137,108,171" target="Q" />
+ <area shape="rect" coords="114,136,150,172" target="W" />
+ <area shape="rect" coords="157,134,189,171" target="E" />
+ <area shape="rect" coords="197,135,232,171" target="R" />
+ <area shape="rect" coords="239,135,274,172" target="T" />
+ <area shape="rect" coords="282,136,317,173" target="Y" />
+ <area shape="rect" coords="322,135,359,173" target="U" />
+ <area shape="rect" coords="364,134,399,172" target="I" />
+ <area shape="rect" coords="404,135,440,171" target="O" />
+ <area shape="rect" coords="446,136,480,172" target="P" />
+ <area shape="rect" coords="89,177,127,216" target="A" />
+ <area shape="rect" coords="131,177,169,214" target="S" />
+ <area shape="rect" coords="173,178,209,215" target="D" />
+ <area shape="rect" coords="215,178,250,214" target="F" />
+ <area shape="rect" coords="256,178,291,214" target="G" />
+ <area shape="rect" coords="299,176,332,214" target="H" />
+ <area shape="rect" coords="339,178,374,215" target="J" />
+ <area shape="rect" coords="379,178,415,215" target="K" />
+ <area shape="rect" coords="421,178,457,215" target="L" />
+ <area shape="rect" coords="546,179,622,214" target="enter" />
+ <area shape="rect" coords="19,221,101,256" target="shift" />
+ <area shape="rect" coords="17,179,84,213" target="caps" />
+ <area shape="rect" coords="117,220,152,256" target="Z" />
+ <area shape="rect" coords="158,220,192,256" target="X" />
+ <area shape="rect" coords="198,219,233,256" target="C" />
+ <area shape="rect" coords="240,220,276,257" target="V" />
+ <area shape="rect" coords="283,219,316,255" target="B" />
+ <area shape="rect" coords="324,220,359,256" target="N" />
+ <area shape="rect" coords="365,220,399,257" target="M" />
+ <area shape="rect" coords="542,219,623,257" target="symbols" />
+ <area shape="rect" coords="19,260,68,296" target="ctrl" />
+ <area shape="rect" coords="76,261,123,295" target="alt" />
+ <area shape="rect" coords="135,261,525,297" target="space" />
+ <area shape="rect" coords="16,95,53,129" target="|" />
+ <area shape="rect" coords="57,95,92,129" target="1" />
+ <area shape="rect" coords="100,94,134,130" target="2" />
+ <area shape="rect" coords="140,93,174,131" target="3" />
+ <area shape="rect" coords="182,93,217,130" target="4" />
+ <area shape="rect" coords="222,93,258,132" target="5" />
+ <area shape="rect" coords="265,94,299,131" target="6" />
+ <area shape="rect" coords="305,94,341,129" target="7" />
+ <area shape="rect" coords="348,93,382,128" target="8" />
+ <area shape="rect" coords="389,94,423,130" target="9" />
+ <area shape="rect" coords="431,93,465,130" target="0" />
+ <area shape="rect" coords="471,94,505,131" target="-" />
+ <area shape="rect" coords="511,93,546,131" target="=" />
+ <area shape="rect" coords="488,136,522,172" target="[" />
+ <area shape="rect" coords="529,135,565,173" target="]" />
+ <area shape="rect" coords="569,136,620,172" target="#" />
+ <area shape="rect" coords="462,177,498,214" target=";" />
+ <area shape="rect" coords="503,178,539,214" target="’" />
+ <area shape="rect" coords="405,220,440,256" target="," />
+ <area shape="rect" coords="447,220,483,256" target="." />
+ <area shape="rect" coords="487,220,524,256" target="/" />
+ </map>
+ </layout>
+ <event name="esc" type="key" code="27" ascii="27" modifiers="" />
+ <event name="f1" type="key" code="282" ascii="315" modifiers="" />
+ <event name="f2" type="key" code="283" ascii="316" modifiers="" />
+ <event name="f3" type="key" code="284" ascii="317" modifiers="" />
+ <event name="f4" type="key" code="285" ascii="318" modifiers="" />
+ <event name="f5" type="key" code="286" ascii="319" modifiers="" />
+ <event name="f6" type="key" code="287" ascii="320" modifiers="" />
+ <event name="f7" type="key" code="288" ascii="321" modifiers="" />
+ <event name="f8" type="key" code="289" ascii="322" modifiers="" />
+ <event name="f9" type="key" code="290" ascii="323" modifiers="" />
+ <event name="f10" type="key" code="291" ascii="324" modifiers="" />
+ <event name="f11" type="key" code="292" ascii="325" modifiers="" />
+ <event name="f12" type="key" code="293" ascii="326" modifiers="" />
+ <event name="del" type="key" code="127" ascii="0" modifiers="" />
+ <event name="ctrl" type="modifier" modifiers="ctrl" />
+ <event name="alt" type="modifier" modifiers="alt" />
+ <event name="shift" type="modifier" modifiers="shift" />
+ <event name="caps" type="switch_mode" mode="lowercase" />
+ <event name="symbols" type="switch_mode" mode="uppercasesymbols" />
+ <event name="backspace" type="key" code="8" ascii="8" modifiers="" />
+ <event name="enter" type="key" code="13" ascii="13" modifiers="" />
+ <event name="|" type="key" code="124" ascii="124" modifiers="" />
+ <event name="-" type="key" code="45" ascii="45" modifiers="" />
+ <event name="=" type="key" code="61" ascii="61" modifiers="" />
+ <event name="[" type="key" code="91" ascii="91" modifiers="" />
+ <event name="]" type="key" code="93" ascii="93" modifiers="" />
+ <event name="#" type="key" code="35" ascii="35" modifiers="" />
+ <event name=";" type="key" code="59" ascii="59" modifiers="" />
+ <event name="'" type="key" code="39" ascii="39" modifiers="" />
+ <event name="," type="key" code="44" ascii="44" modifiers="" />
+ <event name="." type="key" code="46" ascii="46" modifiers="" />
+ <event name="/" type="key" code="47" ascii="47" modifiers="" />
+ <event name="space" type="key" code="32" ascii="32" modifiers="" />
+ <event name="tab" type="key" code="9" ascii="9" modifiers="" />
+ <event name="A" type="key" code="97" ascii="65" modifiers="shift" />
+ <event name="B" type="key" code="98" ascii="66" modifiers="shift" />
+ <event name="C" type="key" code="99" ascii="67" modifiers="shift" />
+ <event name="D" type="key" code="100" ascii="68" modifiers="shift" />
+ <event name="E" type="key" code="101" ascii="69" modifiers="shift" />
+ <event name="F" type="key" code="102" ascii="70" modifiers="shift" />
+ <event name="G" type="key" code="103" ascii="71" modifiers="shift" />
+ <event name="H" type="key" code="104" ascii="72" modifiers="shift" />
+ <event name="I" type="key" code="105" ascii="73" modifiers="shift" />
+ <event name="J" type="key" code="106" ascii="74" modifiers="shift" />
+ <event name="K" type="key" code="107" ascii="75" modifiers="shift" />
+ <event name="L" type="key" code="108" ascii="76" modifiers="shift" />
+ <event name="M" type="key" code="109" ascii="77" modifiers="shift" />
+ <event name="N" type="key" code="110" ascii="78" modifiers="shift" />
+ <event name="O" type="key" code="111" ascii="79" modifiers="shift" />
+ <event name="P" type="key" code="112" ascii="80" modifiers="shift" />
+ <event name="Q" type="key" code="113" ascii="81" modifiers="shift" />
+ <event name="R" type="key" code="114" ascii="82" modifiers="shift" />
+ <event name="S" type="key" code="115" ascii="83" modifiers="shift" />
+ <event name="T" type="key" code="116" ascii="84" modifiers="shift" />
+ <event name="U" type="key" code="117" ascii="85" modifiers="shift" />
+ <event name="V" type="key" code="118" ascii="86" modifiers="shift" />
+ <event name="W" type="key" code="119" ascii="87" modifiers="shift" />
+ <event name="X" type="key" code="120" ascii="88" modifiers="shift" />
+ <event name="Y" type="key" code="121" ascii="89" modifiers="shift" />
+ <event name="Z" type="key" code="122" ascii="90" modifiers="shift" />
+ <event name="0" type="key" code="48" ascii="48" modifiers="" />
+ <event name="1" type="key" code="49" ascii="49" modifiers="" />
+ <event name="2" type="key" code="50" ascii="50" modifiers="" />
+ <event name="3" type="key" code="51" ascii="51" modifiers="" />
+ <event name="4" type="key" code="52" ascii="52" modifiers="" />
+ <event name="5" type="key" code="53" ascii="53" modifiers="" />
+ <event name="6" type="key" code="54" ascii="54" modifiers="" />
+ <event name="7" type="key" code="55" ascii="55" modifiers="" />
+ <event name="8" type="key" code="56" ascii="56" modifiers="" />
+ <event name="9" type="key" code="57" ascii="57" modifiers="" />
+ <event name="quit" type="submit" />
+ </mode>
+
+ <!-- Lowercase Symbols -->
+ <mode name="lowercasesymbols" resolutions="320x240,640x480">
+ <layout resolution="320x240" bitmap="lowercase-symbols320x240.bmp" transparent_color="255,0,255">
+ <map>
+ <area shape="rect" coords="13,8,306,20" target="display_area" />
+ <area shape="rect" coords="9,26,25,42" target="esc" />
+ <area shape="rect" coords="50,25,67,43" target="f2" />
+ <area shape="rect" coords="29,24,46,43" target="f1" />
+ <area shape="rect" coords="71,26,88,44" target="f3" />
+ <area shape="rect" coords="90,25,107,43" target="f4" />
+ <area shape="rect" coords="111,26,128,44" target="f5" />
+ <area shape="rect" coords="132,26,149,44" target="f6" />
+ <area shape="rect" coords="153,25,170,44" target="f7" />
+ <area shape="rect" coords="173,26,190,44" target="f8" />
+ <area shape="rect" coords="194,24,211,43" target="f9" />
+ <area shape="rect" coords="215,26,231,44" target="f10" />
+ <area shape="rect" coords="235,26,253,43" target="f11" />
+ <area shape="rect" coords="255,26,272,45" target="f12" />
+ <area shape="rect" coords="276,27,310,43" target="del" />
+ <area shape="rect" coords="8,47,26,64" target="¬" />
+ <area shape="rect" coords="28,47,45,64" target="!" />
+ <area shape="rect" coords="50,47,67,65" target="quote" />
+ <area shape="rect" coords="70,46,87,65" target="£" />
+ <area shape="rect" coords="91,46,108,64" target="$" />
+ <area shape="rect" coords="111,46,129,65" target="%" />
+ <area shape="rect" coords="132,47,149,65" target="^" />
+ <area shape="rect" coords="152,47,170,64" target="&amp;" />
+ <area shape="rect" coords="174,46,191,63" target="*" />
+ <area shape="rect" coords="194,47,211,65" target="(" />
+ <area shape="rect" coords="215,46,232,64" target=")" />
+ <area shape="rect" coords="235,47,252,65" target="_" />
+ <area shape="rect" coords="255,46,272,65" target="+" />
+ <area shape="rect" coords="276,47,308,64" target="backspace" />
+ <area shape="rect" coords="8,68,32,85" target="tab" />
+ <area shape="rect" coords="36,68,53,85" target="q" />
+ <area shape="rect" coords="57,68,75,86" target="w" />
+ <area shape="rect" coords="78,67,94,85" target="e" />
+ <area shape="rect" coords="98,67,115,85" target="r" />
+ <area shape="rect" coords="119,67,136,85" target="t" />
+ <area shape="rect" coords="141,68,158,86" target="y" />
+ <area shape="rect" coords="161,67,179,86" target="u" />
+ <area shape="rect" coords="182,67,199,86" target="i" />
+ <area shape="rect" coords="202,67,220,85" target="o" />
+ <area shape="rect" coords="223,68,240,86" target="p" />
+ <area shape="rect" coords="244,68,261,86" target="{" />
+ <area shape="rect" coords="264,67,282,86" target="}" />
+ <area shape="rect" coords="284,68,309,86" target="~" />
+ <area shape="rect" coords="8,89,41,106" target="caps" />
+ <area shape="rect" coords="44,88,63,107" target="a" />
+ <area shape="rect" coords="65,88,84,106" target="s" />
+ <area shape="rect" coords="86,89,104,107" target="d" />
+ <area shape="rect" coords="107,89,124,107" target="f" />
+ <area shape="rect" coords="128,89,145,107" target="g" />
+ <area shape="rect" coords="149,88,165,107" target="h" />
+ <area shape="rect" coords="169,89,186,107" target="j" />
+ <area shape="rect" coords="189,89,207,107" target="k" />
+ <area shape="rect" coords="210,89,228,107" target="l" />
+ <area shape="rect" coords="231,88,249,106" target=":" />
+ <area shape="rect" coords="251,89,269,107" target="@" />
+ <area shape="rect" coords="273,89,311,106" target="enter" />
+ <area shape="rect" coords="9,110,50,127" target="shift" />
+ <area shape="rect" coords="58,110,75,128" target="z" />
+ <area shape="rect" coords="79,110,96,128" target="x" />
+ <area shape="rect" coords="99,109,116,127" target="c" />
+ <area shape="rect" coords="120,110,138,128" target="v" />
+ <area shape="rect" coords="141,109,157,127" target="b" />
+ <area shape="rect" coords="162,110,179,128" target="n" />
+ <area shape="rect" coords="182,110,199,128" target="m" />
+ <area shape="rect" coords="202,110,219,128" target="&lt;" />
+ <area shape="rect" coords="223,110,241,128" target="&gt;" />
+ <area shape="rect" coords="243,110,261,128" target="?" />
+ <area shape="rect" coords="271,109,311,128" target="symbols" />
+ <area shape="rect" coords="9,130,33,148" target="ctrl" />
+ <area shape="rect" coords="38,130,61,147" target="alt" />
+ <area shape="rect" coords="67,130,262,148" target="space" />
+ </map>
+ </layout>
+ <layout resolution="640x480" bitmap="lowercase-symbols640x480.bmp" transparent_color="255,0,255">
+ <map>
+ <area shape="rect" coords="26,23,613,37" target="display_area" />
+ <area shape="rect" coords="18,52,51,85" target="esc" />
+ <area shape="rect" coords="100,51,135,88" target="f2" />
+ <area shape="rect" coords="59,49,94,88" target="f1" />
+ <area shape="rect" coords="142,53,176,89" target="f3" />
+ <area shape="rect" coords="181,51,216,87" target="f4" />
+ <area shape="rect" coords="223,52,258,88" target="f5" />
+ <area shape="rect" coords="265,52,299,89" target="f6" />
+ <area shape="rect" coords="306,51,341,90" target="f7" />
+ <area shape="rect" coords="347,53,382,89" target="f8" />
+ <area shape="rect" coords="389,49,424,88" target="f9" />
+ <area shape="rect" coords="431,52,464,89" target="f10" />
+ <area shape="rect" coords="470,53,506,88" target="f11" />
+ <area shape="rect" coords="511,52,546,90" target="f12" />
+ <area shape="rect" coords="552,55,620,87" target="del" />
+ <area shape="rect" coords="16,95,53,129" target="¬" />
+ <area shape="rect" coords="57,95,92,129" target="!" />
+ <area shape="rect" coords="100,94,134,130" target="quote" />
+ <area shape="rect" coords="140,93,174,131" target="£" />
+ <area shape="rect" coords="182,93,217,130" target="$" />
+ <area shape="rect" coords="222,93,258,132" target="%" />
+ <area shape="rect" coords="265,94,299,131" target="^" />
+ <area shape="rect" coords="305,94,341,129" target="&amp;" />
+ <area shape="rect" coords="348,93,382,128" target="*" />
+ <area shape="rect" coords="389,94,423,130" target="(" />
+ <area shape="rect" coords="431,93,465,130" target=")" />
+ <area shape="rect" coords="471,94,505,131" target="_" />
+ <area shape="rect" coords="511,93,546,131" target="+" />
+ <area shape="rect" coords="553,94,618,129" target="backspace" />
+ <area shape="rect" coords="17,136,66,171" target="tab" />
+ <area shape="rect" coords="73,137,108,171" target="q" />
+ <area shape="rect" coords="114,136,150,172" target="w" />
+ <area shape="rect" coords="157,134,189,171" target="e" />
+ <area shape="rect" coords="197,135,232,171" target="r" />
+ <area shape="rect" coords="239,135,274,172" target="t" />
+ <area shape="rect" coords="282,136,317,173" target="y" />
+ <area shape="rect" coords="322,135,359,173" target="u" />
+ <area shape="rect" coords="364,134,399,172" target="i" />
+ <area shape="rect" coords="404,135,440,171" target="o" />
+ <area shape="rect" coords="446,136,480,172" target="p" />
+ <area shape="rect" coords="488,136,522,172" target="{" />
+ <area shape="rect" coords="529,135,565,173" target="}" />
+ <area shape="rect" coords="569,136,620,172" target="~" />
+ <area shape="rect" coords="17,179,84,213" target="caps" />
+ <area shape="rect" coords="89,177,127,216" target="a" />
+ <area shape="rect" coords="131,177,169,214" target="s" />
+ <area shape="rect" coords="173,178,209,215" target="d" />
+ <area shape="rect" coords="215,178,250,214" target="f" />
+ <area shape="rect" coords="256,178,291,214" target="g" />
+ <area shape="rect" coords="299,176,332,214" target="h" />
+ <area shape="rect" coords="339,178,374,215" target="j" />
+ <area shape="rect" coords="379,178,415,215" target="k" />
+ <area shape="rect" coords="421,178,457,215" target="l" />
+ <area shape="rect" coords="462,177,498,214" target=":" />
+ <area shape="rect" coords="503,178,539,214" target="@" />
+ <area shape="rect" coords="546,179,622,214" target="enter" />
+ <area shape="rect" coords="19,221,101,256" target="shift" />
+ <area shape="rect" coords="117,220,152,256" target="z" />
+ <area shape="rect" coords="158,220,192,256" target="x" />
+ <area shape="rect" coords="198,219,233,256" target="c" />
+ <area shape="rect" coords="240,220,276,257" target="v" />
+ <area shape="rect" coords="283,219,316,255" target="b" />
+ <area shape="rect" coords="324,220,359,256" target="n" />
+ <area shape="rect" coords="365,220,399,257" target="m" />
+ <area shape="rect" coords="405,220,440,256" target="&lt;" />
+ <area shape="rect" coords="447,220,483,256" target="&gt;" />
+ <area shape="rect" coords="487,220,524,256" target="?" />
+ <area shape="rect" coords="542,219,623,257" target="symbols" />
+ <area shape="rect" coords="19,260,68,296" target="ctrl" />
+ <area shape="rect" coords="76,261,123,295" target="alt" />
+ <area shape="rect" coords="135,261,525,297" target="space" />
+ </map>
+ </layout>
+ <event name="esc" type="key" code="27" ascii="27" modifiers="" />
+ <event name="f1" type="key" code="282" ascii="315" modifiers="" />
+ <event name="f2" type="key" code="283" ascii="316" modifiers="" />
+ <event name="f3" type="key" code="284" ascii="317" modifiers="" />
+ <event name="f4" type="key" code="285" ascii="318" modifiers="" />
+ <event name="f5" type="key" code="286" ascii="319" modifiers="" />
+ <event name="f6" type="key" code="287" ascii="320" modifiers="" />
+ <event name="f7" type="key" code="288" ascii="321" modifiers="" />
+ <event name="f8" type="key" code="289" ascii="322" modifiers="" />
+ <event name="f9" type="key" code="290" ascii="323" modifiers="" />
+ <event name="f10" type="key" code="291" ascii="324" modifiers="" />
+ <event name="f11" type="key" code="292" ascii="325" modifiers="" />
+ <event name="f12" type="key" code="293" ascii="326" modifiers="" />
+ <event name="del" type="key" code="127" ascii="0" modifiers="" />
+ <event name="ctrl" type="modifier" modifiers="ctrl" />
+ <event name="alt" type="modifier" modifiers="alt" />
+ <event name="shift" type="modifier" modifiers="shift" />
+ <event name="symbols" type="switch_mode" mode="lowercase" />
+ <event name="caps" type="switch_mode" mode="uppercasesymbols" />
+ <event name="backspace" type="key" code="8" ascii="8" modifiers="" />
+ <event name="enter" type="key" code="13" ascii="13" modifiers="" />
+ <event name="quote" type="key" code="34" ascii="34" modifiers="" />
+ <event name="£" type="key" code="163" ascii="163" modifiers="" />
+ <event name="$" type="key" code="36" ascii="36" modifiers="" />
+ <event name="%" type="key" code="37" ascii="37" modifiers="" />
+ <event name="^" type="key" code="94" ascii="94" modifiers="" />
+ <event name="&amp;" type="key" code="38" ascii="38" modifiers="" />
+ <event name="*" type="key" code="42" ascii="42" modifiers="" />
+ <event name="(" type="key" code="40" ascii="40" modifiers="" />
+ <event name=")" type="key" code="41" ascii="41" modifiers="" />
+ <event name="_" type="key" code="95" ascii="95" modifiers="" />
+ <event name="+" type="key" code="43" ascii="43" modifiers="" />
+ <event name="¬" type="key" code="172" ascii="172" modifiers="" />
+ <event name="!" type="key" code="33" ascii="33" modifiers="" />
+ <event name="{" type="key" code="123" ascii="123" modifiers="" />
+ <event name="}" type="key" code="125" ascii="125" modifiers="" />
+ <event name="~" type="key" code="126" ascii="126" modifiers="" />
+ <event name=":" type="key" code="58" ascii="58" modifiers="" />
+ <event name="@" type="key" code="64" ascii="64" modifiers="" />
+ <event name="&lt;" type="key" code="60" ascii="60" modifiers="" />
+ <event name="&gt;" type="key" code="62" ascii="62" modifiers="" />
+ <event name="?" type="key" code="63" ascii="63" modifiers="" />
+ <event name="space" type="key" code="32" ascii="32" modifiers="" />
+ <event name="tab" type="key" code="9" ascii="9" modifiers="" />
+ <event name="a" type="key" code="97" ascii="97" modifiers="" />
+ <event name="b" type="key" code="98" ascii="98" modifiers="" />
+ <event name="c" type="key" code="99" ascii="99" modifiers="" />
+ <event name="d" type="key" code="100" ascii="100" modifiers="" />
+ <event name="e" type="key" code="101" ascii="101" modifiers="" />
+ <event name="f" type="key" code="102" ascii="102" modifiers="" />
+ <event name="g" type="key" code="103" ascii="103" modifiers="" />
+ <event name="h" type="key" code="104" ascii="104" modifiers="" />
+ <event name="i" type="key" code="105" ascii="105" modifiers="" />
+ <event name="j" type="key" code="106" ascii="106" modifiers="" />
+ <event name="k" type="key" code="107" ascii="107" modifiers="" />
+ <event name="l" type="key" code="108" ascii="108" modifiers="" />
+ <event name="m" type="key" code="109" ascii="109" modifiers="" />
+ <event name="n" type="key" code="110" ascii="110" modifiers="" />
+ <event name="o" type="key" code="111" ascii="111" modifiers="" />
+ <event name="p" type="key" code="112" ascii="112" modifiers="" />
+ <event name="q" type="key" code="113" ascii="113" modifiers="" />
+ <event name="r" type="key" code="114" ascii="114" modifiers="" />
+ <event name="s" type="key" code="115" ascii="115" modifiers="" />
+ <event name="t" type="key" code="116" ascii="116" modifiers="" />
+ <event name="u" type="key" code="117" ascii="117" modifiers="" />
+ <event name="v" type="key" code="118" ascii="118" modifiers="" />
+ <event name="w" type="key" code="119" ascii="119" modifiers="" />
+ <event name="x" type="key" code="120" ascii="120" modifiers="" />
+ <event name="y" type="key" code="121" ascii="121" modifiers="" />
+ <event name="z" type="key" code="122" ascii="122" modifiers="" />
+ <event name="quit" type="submit" />
+ </mode>
+
+ <!-- Uppercase Symbols -->
+ <mode name="uppercasesymbols" resolutions="320x240,640x480">
+ <layout resolution="320x240" bitmap="uppercase-symbols320x240.bmp" transparent_color="255,0,255">
+ <map>
+ <area shape="rect" coords="13,8,306,20" target="display_area" />
+ <area shape="rect" coords="9,26,25,42" target="esc" />
+ <area shape="rect" coords="50,25,67,43" target="f2" />
+ <area shape="rect" coords="29,24,46,43" target="f1" />
+ <area shape="rect" coords="71,26,88,44" target="f3" />
+ <area shape="rect" coords="90,25,107,43" target="f4" />
+ <area shape="rect" coords="111,26,128,44" target="f5" />
+ <area shape="rect" coords="132,26,149,44" target="f6" />
+ <area shape="rect" coords="153,25,170,44" target="f7" />
+ <area shape="rect" coords="173,26,190,44" target="f8" />
+ <area shape="rect" coords="194,24,211,43" target="f9" />
+ <area shape="rect" coords="215,26,231,44" target="f10" />
+ <area shape="rect" coords="235,26,253,43" target="f11" />
+ <area shape="rect" coords="255,26,272,45" target="f12" />
+ <area shape="rect" coords="276,27,310,43" target="del" />
+ <area shape="rect" coords="8,47,26,64" target="¬" />
+ <area shape="rect" coords="28,47,45,64" target="!" />
+ <area shape="rect" coords="50,47,67,65" target="quote" />
+ <area shape="rect" coords="70,46,87,65" target="£" />
+ <area shape="rect" coords="91,46,108,64" target="$" />
+ <area shape="rect" coords="111,46,129,65" target="%" />
+ <area shape="rect" coords="132,47,149,65" target="^" />
+ <area shape="rect" coords="152,47,170,64" target="&amp;" />
+ <area shape="rect" coords="174,46,191,63" target="*" />
+ <area shape="rect" coords="194,47,211,65" target="(" />
+ <area shape="rect" coords="215,46,232,64" target=")" />
+ <area shape="rect" coords="235,47,252,65" target="_" />
+ <area shape="rect" coords="255,46,272,65" target="+" />
+ <area shape="rect" coords="276,47,308,64" target="backspace" />
+ <area shape="rect" coords="8,68,32,85" target="tab" />
+ <area shape="rect" coords="36,68,53,85" target="Q" />
+ <area shape="rect" coords="57,68,75,86" target="W" />
+ <area shape="rect" coords="78,67,94,85" target="E" />
+ <area shape="rect" coords="98,67,115,85" target="R" />
+ <area shape="rect" coords="119,67,136,85" target="T" />
+ <area shape="rect" coords="141,68,158,86" target="Y" />
+ <area shape="rect" coords="161,67,179,86" target="U" />
+ <area shape="rect" coords="182,67,199,86" target="I" />
+ <area shape="rect" coords="202,67,220,85" target="O" />
+ <area shape="rect" coords="223,68,240,86" target="P" />
+ <area shape="rect" coords="244,68,261,86" target="{" />
+ <area shape="rect" coords="264,67,282,86" target="}" />
+ <area shape="rect" coords="284,68,309,86" target="~" />
+ <area shape="rect" coords="8,89,41,106" target="caps" />
+ <area shape="rect" coords="44,88,63,107" target="A" />
+ <area shape="rect" coords="65,88,84,106" target="S" />
+ <area shape="rect" coords="86,89,104,107" target="D" />
+ <area shape="rect" coords="107,89,124,107" target="F" />
+ <area shape="rect" coords="128,89,145,107" target="G" />
+ <area shape="rect" coords="149,88,165,107" target="H" />
+ <area shape="rect" coords="169,89,186,107" target="J" />
+ <area shape="rect" coords="189,89,207,107" target="K" />
+ <area shape="rect" coords="210,89,228,107" target="L" />
+ <area shape="rect" coords="231,88,249,106" target=":" />
+ <area shape="rect" coords="251,89,269,107" target="@" />
+ <area shape="rect" coords="273,89,311,106" target="enter" />
+ <area shape="rect" coords="9,110,50,127" target="shift" />
+ <area shape="rect" coords="58,110,75,128" target="z" />
+ <area shape="rect" coords="79,110,96,128" target="x" />
+ <area shape="rect" coords="99,109,116,127" target="c" />
+ <area shape="rect" coords="120,110,138,128" target="v" />
+ <area shape="rect" coords="141,109,157,127" target="b" />
+ <area shape="rect" coords="162,110,179,128" target="n" />
+ <area shape="rect" coords="182,110,199,128" target="m" />
+ <area shape="rect" coords="202,110,219,128" target="&lt;" />
+ <area shape="rect" coords="223,110,241,128" target="&gt;" />
+ <area shape="rect" coords="243,110,261,128" target="?" />
+ <area shape="rect" coords="271,109,311,128" target="symbols" />
+ <area shape="rect" coords="9,130,33,148" target="ctrl" />
+ <area shape="rect" coords="38,130,61,147" target="alt" />
+ <area shape="rect" coords="67,130,262,148" target="space" />
+ </map>
+ </layout>
+ <layout resolution="640x480" bitmap="uppercase-symbols640x480.bmp" transparent_color="255,0,255">
+ <map>
+ <area shape="rect" coords="26,23,613,37" target="display_area" />
+ <area shape="rect" coords="18,52,51,85" target="esc" />
+ <area shape="rect" coords="100,51,135,88" target="f2" />
+ <area shape="rect" coords="59,49,94,88" target="f1" />
+ <area shape="rect" coords="142,53,176,89" target="f3" />
+ <area shape="rect" coords="181,51,216,87" target="f4" />
+ <area shape="rect" coords="223,52,258,88" target="f5" />
+ <area shape="rect" coords="265,52,299,89" target="f6" />
+ <area shape="rect" coords="306,51,341,90" target="f7" />
+ <area shape="rect" coords="347,53,382,89" target="f8" />
+ <area shape="rect" coords="389,49,424,88" target="f9" />
+ <area shape="rect" coords="431,52,464,89" target="f10" />
+ <area shape="rect" coords="470,53,506,88" target="f11" />
+ <area shape="rect" coords="511,52,546,90" target="f12" />
+ <area shape="rect" coords="552,55,620,87" target="del" />
+ <area shape="rect" coords="16,95,53,129" target="¬" />
+ <area shape="rect" coords="57,95,92,129" target="!" />
+ <area shape="rect" coords="100,94,134,130" target="quote" />
+ <area shape="rect" coords="140,93,174,131" target="£" />
+ <area shape="rect" coords="182,93,217,130" target="$" />
+ <area shape="rect" coords="222,93,258,132" target="%" />
+ <area shape="rect" coords="265,94,299,131" target="^" />
+ <area shape="rect" coords="305,94,341,129" target="&amp;" />
+ <area shape="rect" coords="348,93,382,128" target="*" />
+ <area shape="rect" coords="389,94,423,130" target="(" />
+ <area shape="rect" coords="431,93,465,130" target=")" />
+ <area shape="rect" coords="471,94,505,131" target="_" />
+ <area shape="rect" coords="511,93,546,131" target="+" />
+ <area shape="rect" coords="553,94,618,129" target="backspace" />
+ <area shape="rect" coords="17,136,66,171" target="tab" />
+ <area shape="rect" coords="73,137,108,171" target="Q" />
+ <area shape="rect" coords="114,136,150,172" target="W" />
+ <area shape="rect" coords="157,134,189,171" target="E" />
+ <area shape="rect" coords="197,135,232,171" target="R" />
+ <area shape="rect" coords="239,135,274,172" target="T" />
+ <area shape="rect" coords="282,136,317,173" target="Y" />
+ <area shape="rect" coords="322,135,359,173" target="U" />
+ <area shape="rect" coords="364,134,399,172" target="I" />
+ <area shape="rect" coords="404,135,440,171" target="O" />
+ <area shape="rect" coords="446,136,480,172" target="P" />
+ <area shape="rect" coords="488,136,522,172" target="{" />
+ <area shape="rect" coords="529,135,565,173" target="}" />
+ <area shape="rect" coords="569,136,620,172" target="~" />
+ <area shape="rect" coords="17,179,84,213" target="caps" />
+ <area shape="rect" coords="89,177,127,216" target="A" />
+ <area shape="rect" coords="131,177,169,214" target="S" />
+ <area shape="rect" coords="173,178,209,215" target="D" />
+ <area shape="rect" coords="215,178,250,214" target="F" />
+ <area shape="rect" coords="256,178,291,214" target="G" />
+ <area shape="rect" coords="299,176,332,214" target="H" />
+ <area shape="rect" coords="339,178,374,215" target="J" />
+ <area shape="rect" coords="379,178,415,215" target="K" />
+ <area shape="rect" coords="421,178,457,215" target="L" />
+ <area shape="rect" coords="462,177,498,214" target=":" />
+ <area shape="rect" coords="503,178,539,214" target="@" />
+ <area shape="rect" coords="546,179,622,214" target="enter" />
+ <area shape="rect" coords="19,221,101,256" target="shift" />
+ <area shape="rect" coords="117,220,152,256" target="z" />
+ <area shape="rect" coords="158,220,192,256" target="x" />
+ <area shape="rect" coords="198,219,233,256" target="c" />
+ <area shape="rect" coords="240,220,276,257" target="v" />
+ <area shape="rect" coords="283,219,316,255" target="b" />
+ <area shape="rect" coords="324,220,359,256" target="n" />
+ <area shape="rect" coords="365,220,399,257" target="m" />
+ <area shape="rect" coords="405,220,440,256" target="&lt;" />
+ <area shape="rect" coords="447,220,483,256" target="&gt;" />
+ <area shape="rect" coords="487,220,524,256" target="?" />
+ <area shape="rect" coords="542,219,623,257" target="symbols" />
+ <area shape="rect" coords="19,260,68,296" target="ctrl" />
+ <area shape="rect" coords="76,261,123,295" target="alt" />
+ <area shape="rect" coords="135,261,525,297" target="space" />
+ </map>
+ </layout>
+ <event name="esc" type="key" code="27" ascii="27" modifiers="" />
+ <event name="f1" type="key" code="282" ascii="315" modifiers="" />
+ <event name="f2" type="key" code="283" ascii="316" modifiers="" />
+ <event name="f3" type="key" code="284" ascii="317" modifiers="" />
+ <event name="f4" type="key" code="285" ascii="318" modifiers="" />
+ <event name="f5" type="key" code="286" ascii="319" modifiers="" />
+ <event name="f6" type="key" code="287" ascii="320" modifiers="" />
+ <event name="f7" type="key" code="288" ascii="321" modifiers="" />
+ <event name="f8" type="key" code="289" ascii="322" modifiers="" />
+ <event name="f9" type="key" code="290" ascii="323" modifiers="" />
+ <event name="f10" type="key" code="291" ascii="324" modifiers="" />
+ <event name="f11" type="key" code="292" ascii="325" modifiers="" />
+ <event name="f12" type="key" code="293" ascii="326" modifiers="" />
+ <event name="del" type="key" code="127" ascii="0" modifiers="" />
+ <event name="ctrl" type="modifier" modifiers="ctrl" />
+ <event name="alt" type="modifier" modifiers="alt" />
+ <event name="shift" type="switch_mode" mode="shiftlowercase" />
+ <event name="caps" type="switch_mode" mode="lowercasesymbols" />
+ <event name="symbols" type="switch_mode" mode="uppercase" />
+ <event name="backspace" type="key" code="8" ascii="8" modifiers="" />
+ <event name="enter" type="key" code="13" ascii="13" modifiers="" />
+ <event name="quote" type="key" code="34" ascii="34" modifiers="" />
+ <event name="£" type="key" code="163" ascii="163" modifiers="" />
+ <event name="$" type="key" code="36" ascii="36" modifiers="" />
+ <event name="%" type="key" code="37" ascii="37" modifiers="" />
+ <event name="^" type="key" code="94" ascii="94" modifiers="" />
+ <event name="&amp;" type="key" code="38" ascii="38" modifiers="" />
+ <event name="*" type="key" code="42" ascii="42" modifiers="" />
+ <event name="(" type="key" code="40" ascii="40" modifiers="" />
+ <event name=")" type="key" code="41" ascii="41" modifiers="" />
+ <event name="_" type="key" code="95" ascii="95" modifiers="" />
+ <event name="+" type="key" code="43" ascii="43" modifiers="" />
+ <event name="¬" type="key" code="172" ascii="172" modifiers="" />
+ <event name="!" type="key" code="33" ascii="33" modifiers="" />
+ <event name="{" type="key" code="123" ascii="123" modifiers="" />
+ <event name="}" type="key" code="125" ascii="125" modifiers="" />
+ <event name="~" type="key" code="126" ascii="126" modifiers="" />
+ <event name=":" type="key" code="58" ascii="58" modifiers="" />
+ <event name="@" type="key" code="64" ascii="64" modifiers="" />
+ <event name="&lt;" type="key" code="60" ascii="60" modifiers="" />
+ <event name="&gt;" type="key" code="62" ascii="62" modifiers="" />
+ <event name="?" type="key" code="63" ascii="63" modifiers="" />
+ <event name="space" type="key" code="32" ascii="32" modifiers="" />
+ <event name="tab" type="key" code="9" ascii="9" modifiers="" />
+ <event name="A" type="key" code="97" ascii="65" modifiers="shift" />
+ <event name="B" type="key" code="98" ascii="66" modifiers="shift" />
+ <event name="C" type="key" code="99" ascii="67" modifiers="shift" />
+ <event name="D" type="key" code="100" ascii="68" modifiers="shift" />
+ <event name="E" type="key" code="101" ascii="69" modifiers="shift" />
+ <event name="F" type="key" code="102" ascii="70" modifiers="shift" />
+ <event name="G" type="key" code="103" ascii="71" modifiers="shift" />
+ <event name="H" type="key" code="104" ascii="72" modifiers="shift" />
+ <event name="I" type="key" code="105" ascii="73" modifiers="shift" />
+ <event name="J" type="key" code="106" ascii="74" modifiers="shift" />
+ <event name="K" type="key" code="107" ascii="75" modifiers="shift" />
+ <event name="L" type="key" code="108" ascii="76" modifiers="shift" />
+ <event name="M" type="key" code="109" ascii="77" modifiers="shift" />
+ <event name="N" type="key" code="110" ascii="78" modifiers="shift" />
+ <event name="O" type="key" code="111" ascii="79" modifiers="shift" />
+ <event name="P" type="key" code="112" ascii="80" modifiers="shift" />
+ <event name="Q" type="key" code="113" ascii="81" modifiers="shift" />
+ <event name="R" type="key" code="114" ascii="82" modifiers="shift" />
+ <event name="S" type="key" code="115" ascii="83" modifiers="shift" />
+ <event name="T" type="key" code="116" ascii="84" modifiers="shift" />
+ <event name="U" type="key" code="117" ascii="85" modifiers="shift" />
+ <event name="V" type="key" code="118" ascii="86" modifiers="shift" />
+ <event name="W" type="key" code="119" ascii="87" modifiers="shift" />
+ <event name="X" type="key" code="120" ascii="88" modifiers="shift" />
+ <event name="Y" type="key" code="121" ascii="89" modifiers="shift" />
+ <event name="Z" type="key" code="122" ascii="90" modifiers="shift" />
+ <event name="0" type="key" code="48" ascii="48" modifiers="" />
+ <event name="1" type="key" code="49" ascii="49" modifiers="" />
+ <event name="2" type="key" code="50" ascii="50" modifiers="" />
+ <event name="3" type="key" code="51" ascii="51" modifiers="" />
+ <event name="4" type="key" code="52" ascii="52" modifiers="" />
+ <event name="5" type="key" code="53" ascii="53" modifiers="" />
+ <event name="6" type="key" code="54" ascii="54" modifiers="" />
+ <event name="7" type="key" code="55" ascii="55" modifiers="" />
+ <event name="8" type="key" code="56" ascii="56" modifiers="" />
+ <event name="9" type="key" code="57" ascii="57" modifiers="" />
+ <event name="quit" type="submit" />
+ </mode>
+
+</keyboard>
diff --git a/backends/vkeybd/packs/vkeybdpack.py b/backends/vkeybd/packs/vkeybdpack.py
new file mode 100755
index 0000000000..130e4b737b
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybdpack.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+# encoding: utf-8
+import sys
+import re
+import os
+import zipfile
+try:
+ import zlib
+ compression = zipfile.ZIP_DEFLATED
+except:
+ compression = zipfile.ZIP_STORED
+
+PACK_FILE_EXTENSIONS = ('.xml', '.bmp')
+
+def buildPack(packName):
+ if not os.path.isdir(packName):
+ print ("Invalid pack name: " + packName)
+ return
+
+ zf = zipfile.ZipFile(packName + ".zip", 'w')
+
+ zf.compress_type = zipfile.ZIP_DEFLATED
+
+ print ("Building '" + packName + "' pack:")
+ os.chdir(packName)
+
+ for filename in os.listdir('.'):
+ if os.path.isfile(filename) and not filename[0] == '.' and filename.endswith(PACK_FILE_EXTENSIONS):
+ zf.write(filename, './' + filename, compress_type=compression)
+ print (" Adding file: " + filename)
+
+ os.chdir('../')
+
+ zf.close()
+
+def buildAllPacks():
+ for f in os.listdir('.'):
+ if os.path.isdir(os.path.join('.', f)) and not f[0] == '.':
+ buildPack(f)
+
+def printUsage():
+ print ("===============================================")
+ print ("ScummVM Virtual Keyboard Pack Generation Script")
+ print ("===============================================")
+ print ("Usage:")
+ print ("vkeybdpack.py makeall")
+ print (" Builds all the available pack.\n")
+ print ("vkeybdpack.py make [packname]")
+ print (" Builds the pack called 'packname'.\n")
+
+def main():
+
+ if len(sys.argv) == 2 and sys.argv[1] == "makeall":
+ buildAllPacks()
+
+ elif len(sys.argv) == 3 and sys.argv[1] == "make":
+ buildPack(sys.argv[2])
+
+ else:
+ printUsage()
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/backends/vkeybd/virtual-keyboard-gui.cpp b/backends/vkeybd/virtual-keyboard-gui.cpp
index 54b9b3d43d..e1c076ad24 100644
--- a/backends/vkeybd/virtual-keyboard-gui.cpp
+++ b/backends/vkeybd/virtual-keyboard-gui.cpp
@@ -117,8 +117,12 @@ void VirtualKeyboardGUI::setupDisplayArea(Rect& r, OverlayColor forecolor) {
if (!fontIsSuitable(_dispFont, r)) {
_dispFont = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont);
if (!fontIsSuitable(_dispFont, r)) {
- _displayEnabled = false;
- return;
+ /* FIXME: We 'ab'use the kConsoleFont to get a font that fits in a small display_area on 320*240 keyboard images */
+ _dispFont = FontMan.getFontByUsage(Graphics::FontManager::kConsoleFont);
+ if (!fontIsSuitable(_dispFont, r)) {
+ _displayEnabled = false;
+ return;
+ }
}
}
_dispX = _kbdBound.left + r.left;
diff --git a/backends/vkeybd/virtual-keyboard-parser.cpp b/backends/vkeybd/virtual-keyboard-parser.cpp
index 3e40ffc1fa..5ae53f08ec 100644
--- a/backends/vkeybd/virtual-keyboard-parser.cpp
+++ b/backends/vkeybd/virtual-keyboard-parser.cpp
@@ -87,7 +87,7 @@ bool VirtualKeyboardParser::parserCallback_keyboard(ParserNode *node) {
}
if (node->values.contains("v_align")) {
- String v = node->values["h_align"];
+ String v = node->values["v_align"];
if (v.equalsIgnoreCase("top"))
_keyboard->_vAlignment = VirtualKeyboard::kAlignTop;
else if (v.equalsIgnoreCase("middle") || v.equalsIgnoreCase("center"))
diff --git a/backends/vkeybd/virtual-keyboard.cpp b/backends/vkeybd/virtual-keyboard.cpp
index a95b79d213..4ca4a5f586 100644
--- a/backends/vkeybd/virtual-keyboard.cpp
+++ b/backends/vkeybd/virtual-keyboard.cpp
@@ -31,7 +31,6 @@
#include "backends/vkeybd/virtual-keyboard-parser.h"
#include "backends/vkeybd/keycode-descriptions.h"
#include "common/config-manager.h"
-#include "common/fs.h"
#include "common/unzip.h"
#define KEY_START_CHAR ('[')
@@ -77,51 +76,77 @@ void VirtualKeyboard::reset() {
_kbdGUI->reset();
}
-bool VirtualKeyboard::loadKeyboardPack(String packName) {
- _kbdGUI->initSize(_system->getOverlayWidth(), _system->getOverlayHeight());
-
- delete _fileArchive;
- _fileArchive = 0;
-
- FSNode vkDir;
- if (ConfMan.hasKey("vkeybdpath"))
- vkDir = FSNode(ConfMan.get("vkeybdpath"));
- else if (ConfMan.hasKey("extrapath"))
- vkDir = FSNode(ConfMan.get("extrapath"));
- else // use current directory
- vkDir = FSNode(".");
-
- if (vkDir.getChild(packName + ".xml").exists()) {
- _fileArchive = new FSDirectory(vkDir, 1);
+bool VirtualKeyboard::openPack(const String &packName, const FSNode &node) {
+ if (node.getChild(packName + ".xml").exists()) {
+ _fileArchive = new FSDirectory(node, 1);
// uncompressed keyboard pack
- if (!_parser->loadFile(vkDir.getChild(packName + ".xml")))
+ if (!_parser->loadFile(node.getChild(packName + ".xml"))) {
+ delete _fileArchive;
+ _fileArchive = 0;
return false;
+ }
+
+ return true;
+ }
- } else if (vkDir.getChild(packName + ".zip").exists()) {
- // compressed keyboard pack
#ifdef USE_ZLIB
- _fileArchive = new ZipArchive(vkDir.getChild(packName + ".zip"));
+ if (node.getChild(packName + ".zip").exists()) {
+ // compressed keyboard pack
+ _fileArchive = new ZipArchive(node.getChild(packName + ".zip"));
if (_fileArchive->hasFile(packName + ".xml")) {
- if (!_parser->loadStream(_fileArchive->createReadStreamForMember(packName + ".xml")))
+ if (!_parser->loadStream(_fileArchive->createReadStreamForMember(packName + ".xml"))) {
+ delete _fileArchive;
+ _fileArchive = 0;
return false;
+ }
} else {
warning("Could not find %s.xml file in %s.zip keyboard pack", packName.c_str(), packName.c_str());
+ delete _fileArchive;
+ _fileArchive = 0;
return false;
}
-#else
- return false;
+
+ return true;
+ }
#endif
+
+ return false;
+}
+
+bool VirtualKeyboard::loadKeyboardPack(const String &packName) {
+ _kbdGUI->initSize(_system->getOverlayWidth(), _system->getOverlayHeight());
+
+ delete _fileArchive;
+ _fileArchive = 0;
+ _loaded = false;
+
+ bool opened = false;
+ if (ConfMan.hasKey("vkeybdpath"))
+ opened = openPack(packName, FSNode(ConfMan.get("vkeybdpath")));
+ else if (ConfMan.hasKey("extrapath"))
+ opened = openPack(packName, FSNode(ConfMan.get("extrapath")));
+
+ // fallback to the current dir
+ if (!opened)
+ opened = openPack(packName, FSNode("."));
+
+ if (opened) {
+ _parser->setParseMode(VirtualKeyboardParser::kParseFull);
+ _loaded = _parser->parse();
+
+ if (_loaded) {
+ printf("Keyboard pack '%s' loaded successfully!\n", packName.c_str());
+ } else {
+ warning("Error parsing the keyboard pack '%s'", packName.c_str());
+
+ delete _fileArchive;
+ _fileArchive = 0;
+ }
} else {
warning("Keyboard pack not found");
- return false;
}
- _parser->setParseMode(VirtualKeyboardParser::kParseFull);
- _loaded = _parser->parse();
- if (_loaded)
- printf("Keyboard pack '%s' loaded successfully!\n", packName.c_str());
-
return _loaded;
}
diff --git a/backends/vkeybd/virtual-keyboard.h b/backends/vkeybd/virtual-keyboard.h
index e3a9cd3600..2c31afcb35 100644
--- a/backends/vkeybd/virtual-keyboard.h
+++ b/backends/vkeybd/virtual-keyboard.h
@@ -37,6 +37,7 @@ class OSystem;
#include "common/keyboard.h"
#include "common/list.h"
#include "common/str.h"
+#include "common/fs.h"
#include "backends/vkeybd/image-map.h"
#include "graphics/surface.h"
@@ -190,7 +191,7 @@ public:
* searches for a compressed keyboard pack by looking for packName.zip.
* @param packName name of the keyboard pack
*/
- bool loadKeyboardPack(String packName);
+ bool loadKeyboardPack(const String &packName);
/**
* Shows the keyboard, starting an event loop that will intercept all
@@ -232,6 +233,7 @@ protected:
VirtualKeyboardParser *_parser;
void reset();
+ bool openPack(const String &packName, const FSNode &node);
void deleteEvents();
bool checkModeResolutions();
void switchMode(Mode *newMode);
diff --git a/backends/vkeybd/vkeybd.zip b/backends/vkeybd/vkeybd.zip
deleted file mode 100644
index 70f84ad0ce..0000000000
--- a/backends/vkeybd/vkeybd.zip
+++ /dev/null
Binary files differ