aboutsummaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorVincent Bénony2016-01-06 16:19:03 +0100
committerVincent Bénony2016-01-06 16:19:03 +0100
commit64f50761ec22243fe9964271a8554c9f3356a6b5 (patch)
treec4aa7991cad01deaa5f8a7683938d4899ff450d0 /devtools
parentfae79955e5ce6e215dcf457059c5744a85c76a80 (diff)
parent3fab9056296fbf491372f66f7fbb23d6312ad2ad (diff)
downloadscummvm-rg350-64f50761ec22243fe9964271a8554c9f3356a6b5.tar.gz
scummvm-rg350-64f50761ec22243fe9964271a8554c9f3356a6b5.tar.bz2
scummvm-rg350-64f50761ec22243fe9964271a8554c9f3356a6b5.zip
IOS: Merge master
Diffstat (limited to 'devtools')
-rw-r--r--devtools/convbdf.cpp4
-rw-r--r--devtools/create_access/amazon_resources.cpp757
-rw-r--r--devtools/create_access/amazon_resources.h62
-rw-r--r--devtools/create_access/create_access_dat.cpp430
-rw-r--r--devtools/create_access/create_access_dat.h184
-rw-r--r--devtools/create_access/martian_resources.cpp182
-rw-r--r--devtools/create_access/martian_resources.h52
-rw-r--r--devtools/create_access/module.mk13
-rw-r--r--devtools/create_project/create_project.h4
-rw-r--r--devtools/create_project/xcode.cpp345
-rw-r--r--devtools/create_project/xcode.h162
-rw-r--r--devtools/create_translations/create_translations.h6
-rwxr-xr-xdevtools/credits.pl4
13 files changed, 1938 insertions, 267 deletions
diff --git a/devtools/convbdf.cpp b/devtools/convbdf.cpp
index 21c8af8234..59ea5cc4e5 100644
--- a/devtools/convbdf.cpp
+++ b/devtools/convbdf.cpp
@@ -21,7 +21,7 @@
*/
#ifndef __has_feature // Optional of course.
- #define __has_feature(x) 0 // Compatibility with non-clang compilers.
+#define __has_feature(x) 0 // Compatibility with non-clang compilers.
#endif
#include <fstream>
@@ -392,7 +392,7 @@ int main(int argc, char *argv[]) {
for (int y = 0; y < box.height; ++y) {
printf("// |");
- unsigned char data;
+ unsigned char data = 0;
for (int x = 0; x < box.width; ++x) {
if (!(x % 8))
data = *bitmap++;
diff --git a/devtools/create_access/amazon_resources.cpp b/devtools/create_access/amazon_resources.cpp
new file mode 100644
index 0000000000..f4b642ffbc
--- /dev/null
+++ b/devtools/create_access/amazon_resources.cpp
@@ -0,0 +1,757 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "amazon_resources.h"
+
+namespace Amazon {
+
+const byte MOUSE0[] = {
+ // hotspot x and y, uint16 LE
+ 0, 0, 0, 0,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0, 2, 6, 1,
+ 0, 3, 6, 6, 1,
+ 0, 3, 6, 6, 1,
+ 0, 4, 6, 6, 6, 1,
+ 0, 4, 6, 6, 6, 1,
+ 0, 5, 6, 6, 6, 6, 1,
+ 0, 5, 6, 6, 6, 6, 1,
+ 0, 6, 6, 6, 6, 6, 6, 1,
+ 0, 6, 6, 6, 6, 6, 6, 1,
+ 0, 7, 6, 6, 6, 6, 6, 6, 1,
+ 0, 6, 6, 6, 6, 6, 6, 1,
+ 0, 5, 6, 6, 6, 6, 1,
+ 2, 3, 6, 6, 1,
+ 3, 3, 6, 6, 1,
+ 3, 3, 6, 6, 1,
+ 4, 2, 6, 1
+};
+
+const byte MOUSE1[] = {
+ // hotspot x and y, uint16 LE
+ 0x07, 0x00, 0x07, 0x00,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0x06, 0x01, 0x05,
+ 0x04, 0x05, 0xFF, 0xFF, 0x00, 0xFF, 0xFF,
+ 0x03, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0x02, 0x09, 0xFF, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xFF,
+ 0x01, 0x0B, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0x01, 0x0B, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0x00, 0x0D, 0x05, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x00, 0x05,
+ 0x01, 0x0B, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0x01, 0x0B, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0x02, 0x09, 0xFF, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xFF,
+ 0x03, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0x04, 0x05, 0xFF, 0xFF, 0x00, 0xFF, 0xFF,
+ 0x06, 0x01, 0x05,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00
+};
+
+const byte MOUSE2[] = {
+ // hotspot x and y, uint16 LE
+ 0x08, 0x00, 0x08, 0x00,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x07, 0x02, 0x04, 0x05,
+ 0x07, 0x02, 0x04, 0x05,
+ 0x07, 0x02, 0x04, 0x05,
+ 0x07, 0x02, 0x04, 0x05,
+ 0x07, 0x02, 0x04, 0x05,
+ 0x02, 0x0C, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05,
+ 0x07, 0x02, 0x04, 0x05,
+ 0x07, 0x02, 0x04, 0x05,
+ 0x07, 0x02, 0x04, 0x05,
+ 0x07, 0x02, 0x04, 0x05,
+ 0x07, 0x02, 0x04, 0x05,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00
+};
+
+const byte MOUSE3[] = {
+ // hotspot x and y, uint16 LE
+ 0x00, 0x00, 0x00, 0x00,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0x00, 0x0B, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x00, 0x0C, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06, 0x05,
+ 0x00, 0x0C, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x05, 0x05,
+ 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
+ 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
+ 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x05, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x05,
+ 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
+ 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
+ 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
+ 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
+ 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
+ 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05,
+ 0x01, 0x0B, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00
+};
+const byte CURSEYE[] = {
+ // hotspot x and y, uint16 LE
+ 0x01, 0x00, 0x08, 0x00,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0x04, 0x06, 0x0E, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D,
+ 0x03, 0x09, 0x0E, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0D, 0x0D,
+ 0x02, 0x0B, 0x0E, 0x01, 0x33, 0x33, 0x01, 0x01, 0x33, 0x34, 0x01, 0x01, 0x0D,
+ 0x01, 0x0D, 0x0E, 0x01, 0x04, 0x34, 0x01, 0x01, 0x01, 0x07, 0x33, 0x04, 0x04, 0x01, 0x0D,
+ 0x00, 0x0F, 0x0E, 0x0E, 0x01, 0x07, 0x33, 0x33, 0x01, 0x01, 0x33, 0x34, 0x07, 0x07, 0x06, 0x01, 0x0E,
+ 0x01, 0x0D, 0x0F, 0x0F, 0x06, 0x07, 0x34, 0x33, 0x33, 0x34, 0x07, 0x07, 0x06, 0x0F, 0x0E,
+ 0x03, 0x09, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0E,
+ 0x01, 0x01, 0x07,
+ 0x00, 0x03, 0x07, 0x01, 0x07,
+ 0x01, 0x01, 0x07,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00
+};
+
+const byte CURSHAND[] = {
+ // hotspot x and y, uint16 LE
+ 0x02, 0x00, 0x03, 0x00,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0x07, 0x02, 0x17, 0x0E,
+ 0x05, 0x07, 0x0E, 0x12, 0x17, 0x0E, 0x13, 0x17, 0x0E,
+ 0x02, 0x0C, 0x07, 0x00, 0x17, 0x0E, 0x11, 0x0F, 0x0E, 0x11, 0x17, 0x0E, 0x00, 0x17,
+ 0x01, 0x0E, 0x07, 0x01, 0x07, 0x0F, 0x0E, 0x11, 0x17, 0x0E, 0x11, 0x0F, 0x0E, 0x12, 0x17, 0x0E,
+ 0x02, 0x0D, 0x07, 0x00, 0x17, 0x0F, 0x12, 0x0F, 0x0F, 0x11, 0x17, 0x0E, 0x12, 0x0F, 0x0E,
+ 0x04, 0x0B, 0x0F, 0x0E, 0x11, 0x17, 0x0E, 0x12, 0x0F, 0x0F, 0x11, 0x17, 0x0E,
+ 0x04, 0x0B, 0x17, 0x0E, 0x12, 0x17, 0x0E, 0x12, 0x17, 0x0E, 0x11, 0x0F, 0x0E,
+ 0x00, 0x0F, 0x0E, 0x0D, 0x12, 0x00, 0x17, 0x0F, 0x0F, 0x0F, 0x0F, 0x12, 0x0F, 0x0E, 0x12, 0x17, 0x0F,
+ 0x00, 0x0F, 0x0F, 0x17, 0x0D, 0x11, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0E, 0x0D,
+ 0x01, 0x0E, 0x0F, 0x17, 0x0F, 0x0E, 0x0F, 0x0D, 0x0D, 0x0D, 0x0D, 0x0E, 0x0F, 0x0F, 0x0E, 0x0D,
+ 0x02, 0x0D, 0x0F, 0x17, 0x0F, 0x0E, 0x0D, 0x0D, 0x0F, 0x0F, 0x0E, 0x0F, 0x0E, 0x0E, 0x12,
+ 0x03, 0x0C, 0x0F, 0x17, 0x0F, 0x0F, 0x0F, 0x0E, 0x0F, 0x0F, 0x0F, 0x0E, 0x0D, 0x12,
+ 0x04, 0x0A, 0x0F, 0x17, 0x0F, 0x0F, 0x0F, 0x0E, 0x0F, 0x0F, 0x0E, 0x0D,
+ 0x05, 0x09, 0x0F, 0x17, 0x0F, 0x0F, 0x0F, 0x0F, 0x0E, 0x0D, 0x12,
+ 0x06, 0x08, 0x17, 0x0F, 0x0F, 0x0F, 0x0F, 0x0E, 0x0D, 0x12,
+ 0x06, 0x07, 0x17, 0x0F, 0x0F, 0x0F, 0x3D, 0x0E, 0x0D
+};
+
+const byte CURSGET[] = {
+ // hotspot x and y, uint16 LE
+ 0x07, 0x00, 0x0E, 0x00,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0x0A, 0x05, 0x1C, 0x07, 0x0F, 0x0F, 0x0F,
+ 0x08, 0x08, 0x1C, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
+ 0x06, 0x0A, 0x1C, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
+ 0x05, 0x0A, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
+ 0x03, 0x0C, 0x07, 0x1C, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
+ 0x02, 0x0D, 0x1C, 0x0F, 0x0E, 0x0E, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
+ 0x01, 0x0E, 0x07, 0x0F, 0x0E, 0x0D, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
+ 0x00, 0x0F, 0x1C, 0x0F, 0x0E, 0x0D, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C,
+ 0x00, 0x0F, 0x1C, 0x0E, 0x0D, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0C, 0x0C, 0x0E, 0x0F, 0x0F, 0x0F, 0x0C,
+ 0x00, 0x0E, 0x1C, 0x0D, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0C, 0x00, 0x00, 0x0E, 0x0F, 0x0F, 0x0C,
+ 0x00, 0x0E, 0x1C, 0x0E, 0x0F, 0x0D, 0x0F, 0x0F, 0x0C, 0x00, 0x00, 0x0E, 0x1C, 0x0F, 0x0F, 0x0C,
+ 0x00, 0x0D, 0x1C, 0x0D, 0x0F, 0x0D, 0x0F, 0x0C, 0x00, 0x00, 0x00, 0x0E, 0x1C, 0x0F, 0x0C,
+ 0x01, 0x0B, 0x0E, 0x0F, 0x0E, 0x0F, 0x0C, 0x00, 0x00, 0x0E, 0x07, 0x0F, 0x0C,
+ 0x02, 0x09, 0x0E, 0x0D, 0x0F, 0x0C, 0x00, 0x07, 0x0E, 0x0F, 0x0C,
+ 0x03, 0x06, 0x0E, 0x0F, 0x0E, 0x07, 0x01, 0x07,
+ 0x07, 0x01, 0x07
+};
+
+const byte CURSCLIMB[] = {
+ // hotspot x and y, uint16 LE
+ 0x03, 0x00, 0x0E, 0x00,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0x06, 0x04, 0x01, 0x01, 0x01, 0x01,
+ 0x06, 0x04, 0x0F, 0x0E, 0x01, 0x01,
+ 0x06, 0x04, 0x0F, 0x0E, 0x0D, 0x01,
+ 0x07, 0x02, 0x0F, 0x0D,
+ 0x00, 0x0C, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x13, 0x12, 0x12, 0x12, 0x12, 0x11, 0x11,
+ 0x00, 0x0D, 0x0D, 0x0E, 0x00, 0x00, 0x13, 0x14, 0x13, 0x12, 0x12, 0x12, 0x11, 0x11, 0x0E,
+ 0x01, 0x0C, 0x0D, 0x0D, 0x0D, 0x0E, 0x11, 0x13, 0x13, 0x12, 0x11, 0x11, 0x0E, 0x0D,
+ 0x02, 0x0C, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x13, 0x12, 0x11, 0x00, 0x00, 0x0E, 0x0D,
+ 0x03, 0x0B, 0x04, 0x04, 0x04, 0x22, 0x21, 0x21, 0x20, 0x00, 0x00, 0x00, 0x0D,
+ 0x02, 0x0D, 0x22, 0x04, 0x20, 0x22, 0x04, 0x21, 0x04, 0x20, 0x00, 0x00, 0x00, 0x0E, 0x0E,
+ 0x03, 0x07, 0x22, 0x21, 0x20, 0x20, 0x22, 0x04, 0x20,
+ 0x04, 0x06, 0x01, 0x01, 0x00, 0x04, 0x22, 0x20,
+ 0x02, 0x09, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x04, 0x20,
+ 0x03, 0x09, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00, 0x22, 0x04, 0x20,
+ 0x02, 0x0B, 0x07, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x20,
+ 0x03, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01
+};
+
+const byte CURSTALK[] = {
+ // hotspot x and y, uint16 LE
+ 0x02, 0x00, 0x0B, 0x00,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0x03, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x01, 0x0C, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06,
+ 0x00, 0x0E, 0x06, 0x06, 0x06, 0x06, 0x07, 0x06, 0x07, 0x07, 0x06, 0x07, 0x07, 0x06, 0x07, 0x06,
+ 0x00, 0x0F, 0x06, 0x08, 0x08, 0x08, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x08, 0x06,
+ 0x00, 0x0F, 0x06, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06, 0x06, 0x08, 0x08, 0x06, 0x06,
+ 0x00, 0x0F, 0x06, 0x06, 0x08, 0x06, 0x08, 0x08, 0x08, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x08, 0x06,
+ 0x01, 0x0E, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06,
+ 0x02, 0x0C, 0x06, 0x06, 0x06, 0x07, 0x06, 0x07, 0x06, 0x06, 0x07, 0x06, 0x07, 0x06,
+ 0x04, 0x09, 0x06, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06,
+ 0x07, 0x04, 0x06, 0x07, 0x07, 0x06,
+ 0x02, 0x08, 0x07, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x01, 0x06, 0x07, 0x01, 0x07, 0x06, 0x06, 0x06,
+ 0x02, 0x01, 0x07,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00
+};
+const byte CURSHELP[] = {
+ // hotspot x and y, uint16 LE
+ 0x02, 0x00, 0x0B, 0x00,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0x04, 0x06, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24,
+ 0x02, 0x0A, 0x24, 0x24, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x20, 0x20,
+ 0x01, 0x0C, 0x24, 0x22, 0x22, 0x22, 0x20, 0x20, 0x20, 0x22, 0x22, 0x22, 0x22, 0x20,
+ 0x00, 0x0E, 0x24, 0x22, 0x22, 0x22, 0x20, 0x00, 0x00, 0x00, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20,
+ 0x00, 0x0E, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, 0x00, 0x00, 0x00, 0x24, 0x22, 0x22, 0x22, 0x20,
+ 0x00, 0x0E, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, 0x00, 0x00, 0x00, 0x24, 0x22, 0x22, 0x22, 0x20,
+ 0x01, 0x0D, 0x24, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20,
+ 0x07, 0x06, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20,
+ 0x05, 0x07, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, 0x20,
+ 0x04, 0x05, 0x24, 0x22, 0x22, 0x22, 0x20,
+ 0x02, 0x07, 0x07, 0x00, 0x24, 0x20, 0x20, 0x20, 0x20,
+ 0x01, 0x03, 0x07, 0x01, 0x07,
+ 0x02, 0x07, 0x07, 0x00, 0x00, 0x24, 0x24, 0x24, 0x24,
+ 0x04, 0x06, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20,
+ 0x04, 0x06, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20,
+ 0x05, 0x04, 0x20, 0x20, 0x20, 0x20
+};
+
+const byte *const CURSORS[AMAZON_NUM_CURSORS] = {
+ MOUSE0, MOUSE1, MOUSE2, MOUSE3, CURSEYE, CURSHAND, CURSGET, CURSCLIMB, CURSTALK, CURSHELP
+};
+const uint CURSOR_SIZES[AMAZON_NUM_CURSORS] = {
+ sizeof(MOUSE0), sizeof(MOUSE1), sizeof(MOUSE2), sizeof(MOUSE3), sizeof(CURSEYE),
+ sizeof(CURSHAND), sizeof(CURSGET), sizeof(CURSCLIMB), sizeof(CURSTALK), sizeof(CURSHELP)
+};
+
+
+const int FONT2_INDEX[] = {
+ 62, 2, 6,
+ 0x0000, 0x0019, 0x0021, 0x002e, 0x0041, 0x005a, 0x0073, 0x008c, 0x0093, 0x009b,
+ 0x00a3, 0x00bc, 0x00d5, 0x00dd, 0x00ea, 0x00f1, 0x00fe, 0x010b, 0x0118, 0x0125,
+ 0x0132, 0x013f, 0x014c, 0x0159, 0x0166, 0x0173, 0x0180, 0x0187, 0x018e, 0x01a7,
+ 0x01b4, 0x01cd, 0x01dc, 0x01f5, 0x0208, 0x0215, 0x0222, 0x022f, 0x023c, 0x0249,
+ 0x025c, 0x0269, 0x0276, 0x0285, 0x0292, 0x029f, 0x02b2, 0x02c5, 0x02d2, 0x02df,
+ 0x02ee, 0x02fb, 0x0308, 0x0315, 0x0322, 0x032f, 0x0342, 0x034f, 0x0362, 0x036f,
+ 0x0388, 0x03a1,
+};
+
+const byte FONT2_DATA[] = {
+ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0xf0, 0xf0, 0xf0,
+ 0x00, 0xf0, 0x00, 0x06, 0xf3, 0xc0, 0xc3, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x07, 0x1c, 0x00,
+ 0x67, 0x9e, 0xc0, 0x07, 0x1c, 0x00, 0x67, 0x9e, 0xc0, 0x07,
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x02, 0xc0, 0x00, 0x3f,
+ 0xfc, 0x00, 0xb2, 0xc0, 0x00, 0x3f, 0xfc, 0x00, 0x02, 0xcb,
+ 0x00, 0x3f, 0xfc, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x60,
+ 0x70, 0x70, 0x60, 0x1c, 0x00, 0x04, 0x60, 0x18, 0x1c, 0x1c,
+ 0x1c, 0x70, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x30,
+ 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf0, 0xf0,
+ 0x00, 0x07, 0x00, 0xf0, 0x03, 0xc0, 0x0f, 0x00, 0x3c, 0x00,
+ 0xf0, 0x00, 0x00, 0x00, 0x07, 0x3f, 0xc0, 0x70, 0x70, 0x70,
+ 0x70, 0x70, 0x70, 0x3f, 0xc0, 0x00, 0x00, 0x07, 0x1f, 0x00,
+ 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0xff, 0xf0, 0x00, 0x00,
+ 0x08, 0x2b, 0xf0, 0xb0, 0x2c, 0x00, 0xa0, 0x0a, 0x00, 0xff,
+ 0xfc, 0x00, 0x00, 0x07, 0xff, 0xc0, 0x00, 0x70, 0x03, 0xc0,
+ 0x00, 0x70, 0xff, 0xc0, 0x00, 0x00, 0x07, 0x0b, 0xc0, 0x2d,
+ 0xc0, 0xb1, 0xc0, 0xaa, 0xa0, 0x01, 0xc0, 0x00, 0x00, 0x07,
+ 0xff, 0xf0, 0x70, 0x00, 0x7f, 0xc0, 0x00, 0xb0, 0xbf, 0xc0,
+ 0x00, 0x00, 0x07, 0x2f, 0xc0, 0x70, 0x00, 0x7f, 0xc0, 0x70,
+ 0x70, 0x3f, 0xc0, 0x00, 0x00, 0x08, 0xff, 0xfc, 0x00, 0xb0,
+ 0x02, 0xc0, 0x02, 0xc0, 0x0b, 0x00, 0x00, 0x00, 0x08, 0x2f,
+ 0xf0, 0xb0, 0x1c, 0x2f, 0xf0, 0xb0, 0x1c, 0x2f, 0xf0, 0x00,
+ 0x00, 0x07, 0x3f, 0xc0, 0x70, 0x70, 0x3f, 0xf0, 0x00, 0x70,
+ 0x3f, 0xc0, 0x00, 0x00, 0x03, 0xf0, 0xf0, 0x00, 0xf0, 0xf0,
+ 0x00, 0x03, 0xf0, 0xf0, 0x00, 0xf0, 0x30, 0x00, 0x09, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00,
+ 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x06, 0xff, 0x00, 0x03, 0xc0, 0x0f, 0x00, 0x3c, 0x00,
+ 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0a, 0x00, 0x40, 0x00, 0x01, 0xf0, 0x00, 0x07, 0x1c,
+ 0x00, 0x1f, 0xff, 0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x00,
+ 0x08, 0x7f, 0xf0, 0x70, 0x1c, 0x7f, 0xf0, 0x70, 0x1c, 0x6a,
+ 0xb0, 0x00, 0x00, 0x08, 0x2f, 0xfc, 0x70, 0x00, 0x70, 0x00,
+ 0x70, 0x00, 0x2a, 0xa8, 0x00, 0x00, 0x08, 0x7f, 0xf0, 0x70,
+ 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x6a, 0xb0, 0x00, 0x00, 0x07,
+ 0x7f, 0xf0, 0x70, 0x00, 0x7f, 0xc0, 0x70, 0x00, 0x6a, 0xa0,
+ 0x00, 0x00, 0x07, 0x7f, 0xf0, 0x70, 0x00, 0x7f, 0xc0, 0x70,
+ 0x00, 0x60, 0x00, 0x00, 0x00, 0x09, 0x3f, 0xfc, 0x00, 0x70,
+ 0x00, 0x00, 0x70, 0xff, 0x00, 0x70, 0x1c, 0x00, 0x2a, 0xbc,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x70, 0x1c, 0x70, 0x1c, 0x7f,
+ 0xfc, 0x70, 0x1c, 0x70, 0x1c, 0x00, 0x00, 0x07, 0xff, 0xf0,
+ 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0xaa, 0xa0, 0x00, 0x00,
+ 0x08, 0x0f, 0xfc, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x70,
+ 0x70, 0x2a, 0x40, 0x00, 0x00, 0x08, 0x70, 0x2c, 0x72, 0xc0,
+ 0x7f, 0x00, 0x72, 0xc0, 0x70, 0x28, 0x00, 0x00, 0x07, 0x70,
+ 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x6a, 0xa0, 0x00,
+ 0x00, 0x0a, 0x70, 0x02, 0xc0, 0x7c, 0x09, 0xc0, 0x77, 0x2d,
+ 0xc0, 0x71, 0xb1, 0xc0, 0x60, 0xc1, 0x80, 0x00, 0x00, 0x00,
+ 0x09, 0x70, 0x07, 0x00, 0x77, 0x07, 0x00, 0x71, 0xc7, 0x00,
+ 0x70, 0x77, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x2f, 0xf0, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x2a, 0xa0,
+ 0x00, 0x00, 0x08, 0x7f, 0xf0, 0x70, 0x1c, 0x7f, 0xf0, 0x70,
+ 0x00, 0x60, 0x00, 0x00, 0x00, 0x08, 0x2f, 0xf0, 0x70, 0x1c,
+ 0x70, 0x1c, 0x71, 0xdc, 0x2a, 0xa0, 0x00, 0x1c, 0x00, 0x00,
+ 0x08, 0x7f, 0xf0, 0x70, 0x1c, 0x7f, 0xc0, 0x70, 0x70, 0x60,
+ 0x18, 0x00, 0x00, 0x07, 0x2f, 0xf0, 0x70, 0x00, 0x2f, 0xc0,
+ 0x00, 0xb0, 0xbf, 0xc0, 0x00, 0x00, 0x07, 0xff, 0xf0, 0x0b,
+ 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08,
+ 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0xdc, 0x1f, 0x1c,
+ 0x00, 0x00, 0x08, 0xf0, 0x1c, 0xb0, 0x1c, 0x70, 0xb0, 0x72,
+ 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x0b, 0xf0, 0x00, 0xb0, 0xb0,
+ 0x00, 0x70, 0x70, 0xc0, 0x70, 0x72, 0x72, 0xc0, 0x7c, 0x1f,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0xf0, 0x3c, 0x1c, 0xe0, 0x07,
+ 0xc0, 0x1c, 0x70, 0x70, 0x1c, 0x00, 0x00, 0x09, 0x70, 0x07,
+ 0x00, 0x1c, 0x1c, 0x00, 0x07, 0xf0, 0x00, 0x01, 0xc0, 0x00,
+ 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xff, 0xfc, 0x00,
+ 0x70, 0x07, 0x00, 0x1c, 0x00, 0xaa, 0xac, 0x00, 0x00, 0x09,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+
+const int FONT6x6_INDEX[] = {
+ 62, 1, 6,
+ 0x0000, 0x0007, 0x000e, 0x0015, 0x001c, 0x0023, 0x002a, 0x0031, 0x0038, 0x003f,
+ 0x0046, 0x004d, 0x0054, 0x005b, 0x0062, 0x0069, 0x0070, 0x0077, 0x007e, 0x0085,
+ 0x008c, 0x0093, 0x009a, 0x00a1, 0x00a8, 0x00af, 0x00b6, 0x00bd, 0x00c4, 0x00cb,
+ 0x00d2, 0x00d9, 0x00e0, 0x00e7, 0x00ee, 0x00f5, 0x00fc, 0x0103, 0x010a, 0x0111,
+ 0x0118, 0x011f, 0x0126, 0x012d, 0x0134, 0x013b, 0x0142, 0x0149, 0x0150, 0x0157,
+ 0x015e, 0x0165, 0x016c, 0x0173, 0x017a, 0x0181, 0x0188, 0x018f, 0x0196, 0x019d,
+ 0x01a4, 0x01ab,
+};
+
+const byte FONT6x6_DATA[] = {
+ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x30,
+ 0x30, 0x30, 0x00, 0x30, 0x06, 0xd8, 0xd8, 0x90, 0x00, 0x00,
+ 0x00, 0x06, 0x50, 0xf8, 0x50, 0xf8, 0x50, 0x00, 0x06, 0x78,
+ 0xa0, 0x70, 0x28, 0xf0, 0x20, 0x06, 0xc8, 0xd0, 0x20, 0x58,
+ 0x98, 0x00, 0x06, 0x60, 0xd0, 0x60, 0xe8, 0xd0, 0x68, 0x06,
+ 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x06, 0x30, 0x60, 0x60,
+ 0x60, 0x30, 0x00, 0x07, 0x30, 0x18, 0x18, 0x18, 0x30, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x20, 0x20,
+ 0xf8, 0x20, 0x20, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x30,
+ 0x60, 0x06, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x06, 0x00,
+ 0x00, 0x00, 0x60, 0x60, 0x00, 0x06, 0x18, 0x30, 0x60, 0xc0,
+ 0x80, 0x00, 0x06, 0x70, 0x98, 0xa8, 0xc8, 0x70, 0x00, 0x06,
+ 0x10, 0x30, 0x10, 0x10, 0x10, 0x00, 0x06, 0xf0, 0x08, 0x70,
+ 0x80, 0xf8, 0x00, 0x06, 0xf0, 0x08, 0x70, 0x08, 0xf0, 0x00,
+ 0x06, 0x30, 0x50, 0x90, 0xf8, 0x10, 0x00, 0x06, 0xf0, 0x80,
+ 0xf0, 0x08, 0xf0, 0x00, 0x06, 0x70, 0x80, 0xf0, 0x88, 0x70,
+ 0x00, 0x06, 0xf8, 0x08, 0x10, 0x20, 0x20, 0x00, 0x06, 0x70,
+ 0x88, 0x70, 0x88, 0x70, 0x00, 0x06, 0x70, 0x88, 0x78, 0x08,
+ 0x70, 0x00, 0x06, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x06,
+ 0x60, 0x60, 0x00, 0x60, 0x20, 0x40, 0x06, 0x18, 0x30, 0x60,
+ 0x30, 0x18, 0x00, 0x06, 0x00, 0x78, 0x00, 0x78, 0x00, 0x00,
+ 0x06, 0x60, 0x30, 0x18, 0x30, 0x60, 0x00, 0x06, 0x70, 0x98,
+ 0x30, 0x30, 0x00, 0x30, 0x06, 0x70, 0x88, 0xb8, 0xb0, 0x80,
+ 0x78, 0x06, 0x70, 0x88, 0xf8, 0x88, 0x88, 0x00, 0x06, 0xf0,
+ 0x88, 0xf0, 0x88, 0xf0, 0x00, 0x06, 0x78, 0x80, 0x80, 0x80,
+ 0x78, 0x00, 0x06, 0xf0, 0x88, 0x88, 0x88, 0xf0, 0x00, 0x06,
+ 0xf8, 0x80, 0xf0, 0x80, 0xf8, 0x00, 0x06, 0xf8, 0x80, 0xf0,
+ 0x80, 0x80, 0x00, 0x06, 0x78, 0x80, 0x98, 0x88, 0x78, 0x00,
+ 0x06, 0x88, 0x88, 0xf8, 0x88, 0x88, 0x00, 0x06, 0x70, 0x20,
+ 0x20, 0x20, 0x70, 0x00, 0x06, 0x08, 0x08, 0x08, 0x88, 0x70,
+ 0x00, 0x06, 0x90, 0xa0, 0xc0, 0xa0, 0x90, 0x00, 0x06, 0x80,
+ 0x80, 0x80, 0x80, 0xf0, 0x00, 0x06, 0x88, 0xd8, 0xa8, 0x88,
+ 0x88, 0x00, 0x06, 0x88, 0xc8, 0xa8, 0x98, 0x88, 0x00, 0x06,
+ 0x70, 0x88, 0x88, 0x88, 0x70, 0x00, 0x06, 0xf0, 0x88, 0xf0,
+ 0x80, 0x80, 0x00, 0x06, 0x70, 0x88, 0x88, 0x88, 0x70, 0x18,
+ 0x06, 0xf0, 0x88, 0xf0, 0xa0, 0x98, 0x00, 0x06, 0x78, 0x80,
+ 0x70, 0x08, 0xf0, 0x00, 0x06, 0xf8, 0x20, 0x20, 0x20, 0x20,
+ 0x00, 0x06, 0x88, 0x88, 0x88, 0x88, 0x78, 0x00, 0x06, 0x88,
+ 0x88, 0x88, 0x50, 0x20, 0x00, 0x06, 0x88, 0x88, 0xa8, 0xd8,
+ 0x88, 0x00, 0x06, 0x88, 0x50, 0x20, 0x50, 0x88, 0x00, 0x06,
+ 0x88, 0x88, 0x50, 0x20, 0x20, 0x00, 0x06, 0xf8, 0x10, 0x20,
+ 0x40, 0xf8, 0x00, 0x06, 0x78, 0x60, 0x60, 0x60, 0x78, 0x00,
+ 0x06, 0xc0, 0x60, 0x30, 0x18, 0x08, 0x00, 0x06, 0x78, 0x18,
+ 0x18, 0x18, 0x78, 0x00, 0x00, 0x52, 0x41, 0x54, 0x00, 0x41,
+ 0x4c, 0x43, 0x4f, 0x48, 0x4f, 0x4c, 0x00, 0x53, 0x41, 0x46,
+ 0x45, 0x20, 0x43, 0x4f, 0x4d, 0x42, 0x49, 0x4e, 0x41, 0x54,
+ 0x49, 0x4f, 0x4e, 0x00, 0x42, 0x45, 0x41, 0x4b, 0x45, 0x52,
+ 0x00, 0x4d, 0x49, 0x43, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x4d,
+ 0x00, 0x56, 0x41, 0x55, 0x4c, 0x54, 0x20, 0x4b, 0x45, 0x59,
+ 0x00, 0x42, 0x4f, 0x4c, 0x54, 0x20, 0x43, 0x55, 0x54, 0x54,
+ 0x45, 0x52, 0x53, 0x00, 0x42, 0x4c, 0x4f, 0x57, 0x47, 0x55,
+ 0x4e, 0x00, 0x4c, 0x4f, 0x56, 0x45, 0x20, 0x50, 0x4f, 0x54,
+ 0x49, 0x4f, 0x4e, 0x00, 0x4d, 0x4f, 0x4e, 0x45, 0x59, 0x00,
+ 0x44, 0x41, 0x52, 0x54, 0x53, 0x00, 0x54, 0x41, 0x50, 0x45,
+ 0x00, 0x4a, 0x55, 0x4e, 0x47, 0x4c, 0x45, 0x20, 0x50, 0x4f,
+ 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4d, 0x4f, 0x56, 0x49,
+};
+
+const uint FONT2_INDEX_SIZE = sizeof(FONT2_INDEX) / 2;
+const uint FONT2_DATA_SIZE = sizeof(FONT2_DATA);
+const uint FONT6x6_INDEX_SIZE = sizeof(FONT6x6_INDEX) / 2;
+const uint FONT6x6_DATA_SIZE = sizeof(FONT6x6_DATA);
+
+const char *const ROOM_DESCR[64] = {
+ "Credits", nullptr, nullptr, nullptr, "Outside of Allister Center",
+ "Hall", "Jason's Lab", nullptr, "Allen's Lab", "Outside of the Vault",
+ "Inside the Vault", "Reader", "Jason's Apartment", "Jason's ransacked apartment", "Cutscene 1",
+ "TBD FLYSOUTH", "Cuzco Airport", "TBD INAIR", "Green Monkey Club", "In Plane",
+ "TBD PILFALL", "TBD COCKPIT", "TBD CRASH", "TBD SINKING", "Cutscene Jungle Walk",
+ "TBD TOWN", "TBD HOTEL", "TBD CANTINA", nullptr, "TBD MASSACRE",
+ "TBD TRADE", "TBD BRIDGE", "TBD DOCK", "TBD DRIVER", nullptr,
+ nullptr, "TBD SHORE", "TBD BOAT", "TBD CABIN", "TBD CAPTIVE",
+ nullptr, nullptr, "TBD VILLAGE", nullptr, "TBD TREE",
+ "TBD CANOE", "TBD INTREE", "TBD FALLS", nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr, "TBD WATERFALL",
+ "TBD INWATER", nullptr, "Cave Bridge", nullptr, nullptr,
+ nullptr, "Pit with Ants", nullptr, nullptr
+};
+
+
+const byte DEATH_SCREENS_ENG[58] = {
+ 0, 1, 0, 0, 0, 0, 0, 0, 2, 0,
+ 0, 2, 4, 2, 1, 0, 0, 0, 0, 0,
+ 0, 2, 7, 7, 4, 6, 7, 10, 4, 2,
+ 0, 0, 0, 0, 5, 5, 3, 3, 3, 5,
+ 8, 8, 11, 9, 8, 12, 0, 1, 9, 8,
+ 8, 0, 5, 8, 0, 12, 12, 11
+};
+
+const byte DEATH_SCREENS_ENG_DEMO[34] = {
+ 1, 2, 1, 1, 1, 1, 1, 1, 4, 1,
+ 3, 4, 2, 4, 2, 1, 1, 1, 1, 1,
+ 1, 4, 2, 4, 2, 4, 2, 4, 4, 4,
+ 1, 1, 1, 1
+};
+
+const char *const DEATH_TEXT_ENG[58] = {
+ "SAM SALVADOR SPOTS YOU AND LETS YOU HAVE IT.",
+ "WHILE TAKING A MOONLIGHT SWIM YOU DISCOVER THAT PIRANHA REALLY CAN STRIP FLESH TO THE BONE.",
+ "THE GUARD FILLS YOU FULL OF HOLES BEFORE TOSSING YOU TO THE PIRANHA.",
+ "YOU'RE ONLY ABLE TO SWIM HALFWAY ACROSS THE RIVER BEFORE RUNNING OUT OF AIR. "
+ "YOU MAKE SO MUCH NOISE GASPING FOR BREATH THAT SAM EASILY FINDS YOU AND LEAVES "
+ "YOU IN THE RIVER PERMANENTLY.",
+ "SAM SALVADOR NOTICES SOMEONE HAS BEEN PLAYING WITH THE CARGO. "
+ "HE TRACKS YOU DOWN AND LETS YOU HAVE IT.",
+ "THE GUARD COMES AROUND THE CORNER. HE DECIDES THAT THREE LEAD SLUGS WILL "
+ "TEACH YOU TO BE MORE POLITE.",
+ "THE CAPTAIN IS WAITING OUTSIDE THE DOOR.",
+ "THE CAPTAIN'S RANDOM SHOOTING FINALLY FINDS ITS TARGET.",
+ "THE CRATE OUTSIDE THE WINDOW EXPLODES, DESTROYING THE SHIP. "
+ "UNFORTUNATELY, YOU'RE STILL ABOARD.",
+ "THE DOOR WAS NOT BARRED AND THE CAPTAIN WALKS RIGHT IN AND PARTS YOUR HAIR.",
+
+ "",
+ "YOU RUN OUT ON DECK, THEN REALIZE THAT MAYA IS STILL TIED UP. "
+ "AS YOU TURN TO GO BACK THE BOAT BLOWS UP.",
+ "AFTER YOU FAIL TO PROVE YOUR DIVINITY THE NATIVES EAT YOU FOR LUNCH.",
+ "THIS IS THE GENERIC DEATH SCENE",
+ "YOU ONLY MAKE IT HALFWAY ACROSS THE RIVER BEFORE THE PIRANHA STRIKE.",
+ "WITH NOTHING TO PROTECT HIM FROM THE HAIL OF BULLETS ALLEN IS QUICKLY GUNNED DOWN. "
+ "JASON AND MAYA SOON FOLLOW...",
+ "THE COMBINATION OF THE WIND AND GUNFIRE KNOCK THE CORRUGATED IRON OVER, "
+ "LEAVING YOU WITHOUT PROTECTION.",
+ "WITHOUT SUFFICIENT AMMUNITION, ALLEN IS UNABLE TO HOLD OFF THE ATTACKERS FOR LONG. "
+ "THIS RESULTS IN A SERIOUS CASE OF LEAD POISONING. ADDITIONAL AMMUNITION SHOULD "
+ "HAVE BEEN PURCHASED AT THE RIO BLANCO TRADING POST (CHAPTER 6).",
+ "ALLEN IS A MARVELOUS SHOT, BUT HIS AMMUNITION IS NOT UNLIMITED. "
+ "SOON IT IS ALL OVER.",
+ "THE PILOT FEELS YOU ARE TOO CLOSE AND PULLS THE TRIGGER.",
+
+ "THE PILOT SHOOTS YOU IN THE HEART, THEN TOSSES YOUR LIFELESS BODY OUT THE DOOR.",
+ "THE PLANE CRASHES INTO THE JUNGLE CANOPY AT 200 MPH.",
+ "THE CANOE HITS THE ROCKS AND CAPSIZES, AND THE PIRANHA MAKE YOU THEIR LUNCH GUESTS.",
+ "YOU TAKE THE WRONG BRANCH AND ACCIDENTALLY DISCOVER THE FOURTH TALLEST WATERFALL "
+ "IN SOUTH AMERICA.",
+ "YOU TAKE THE WRONG BRANCH AND DISCOVER A VERY HUNGRY TRIBE OF CANNIBALS.",
+ "YOU TAKE THE WRONG BRANCH AND BECOME LOST IN THE WINDING WATERWAYS. "
+ "YOU WANDER UNTIL YOU STARVE TO DEATH.",
+ "YOU TAKE THE WRONG BRANCH AND BECOME TRAPPED IN THE RAPIDS. "
+ "EVENTUALLY YOU AND MAYA ARE CRUSHED BETWEEN THE ROCKS.",
+ "YOU WAIT AROUND FOR SOME TIME, BUT HANS STROHEIM NEVER SPEAKS TO YOU AGAIN. "
+ "FINALLY YOU RETURN HOME KNOWING YOU HAVE FAILED.",
+ "DECIDING THAT YOU THREATEN HIM AND HIS WORK, HANS STROHEIM HAS THE NATIVES "
+ "IN THE VILLAGE KILL YOU.",
+ "YOU DO NOT GET FAR ENOUGH AWAY BEFORE THE DYNAMITE EXPLODES AND YOU ARE BLOWN "
+ "INTO A THOUSAND PIECES.",
+
+ "YOU ARE STANDING SO CLOSE TO THE ENTRANCE WHEN SANCEZ AND HIS MEN BREAK THROUGH "
+ "THE WALL THAT YOU ARE QUICKLY SPOTTED AND SHOT",
+ "THE AMAZON SENTINELS SPOT YOU AND FILL YOU FULL OF ARROWS.",
+ "SAM MAY BE UGLY, BUT HE'S NOT DEAF. HE HEARS ALL THE NOISE YOU ARE MAKING AND "
+ "CANCELS YOUR BOARDING PASS.",
+ "WITH THE BAR OFF THE DOOR THE CAPTAIN WALTZES IN AND BLOWS YOU AWAY",
+ "THE BEAR WANDERS OFF INTO THE WOODS AND DISTURBS THE TWO LOVEBIRDS. "
+ "WHEN THEY COME OUT THEY FIND YOU AND PUT YOU IN THE BIG HOUSE FOR TWENTY YEARS.",
+ "WHEN YOU DO NOT LEAVE THE SECURITY AREA QUICKLY ENOUGH YOU ARE ARRESTED AND CONVICTED "
+ "AS A COMMIE SPY. YOU EMBARK ON A NEW CAREER STAMPING OUT LICENSE PLATES.",
+ "THE HUNGRY BEAR SPOTS YOU AND DECIDES YOU WILL MAKE A NICE APPETIZER.",
+ "YOU DISTURB THE BEAR'S LUNCH AND HE EATS YOU FOR DESSERT.",
+ "AFTER FAILING TO FIND ANY LUNCH AT THE GARBAGE CAN THE BEAR EATS YOU INSTEAD.",
+ "THE SUSPICIOUS LIBRARIAN CALLS SECURITY AND YOU ARE SENT TO JAIL.",
+
+ "YOU PLUMMET 10,000 FEET TO YOUR DEATH.",
+ "EL LOCO FLIES INTO AN INSANE RAGE AND BEATS YOU TO A BLOODY PULP.",
+ "THE WOMAN WALKS OUT THE DOOR AND NEVER RETURNS. YOU SPEND THE REST OF YOUR LIFE "
+ "IN A FUTILE ATTEMPT TO LOCATE ALLEN.",
+ "YOU SLIP OFF THE PLATFORM AND FALL TO YOUR DEATH.",
+ "YOU SLIP OFF THE PLATFORM AND FALL TO YOUR DEATH.",
+ "YOU COME TOO CLOSE TO THE POWERFUL JAWS OF THE ANT AND HE SNIPS YOU IN TWO BEFORE "
+ "DEVOURING YOU.",
+ "B.O.B. HAS A FLAW IN HIS PROGRAMMING THAT DIRECTS HIM TO SHOOT FIRST AND ASK QUESTIONS LATER.",
+ "THE PLANE SINKS AND THE PIRHANA ATTACK BEFORE YOU EVEN GET OUT THE DOOR.",
+ "MAYA FALLS OFF THE END OF THE BROKEN BRIDGE.",
+ "YOUR WEIGHT IS JUST ENOUGH TO CAUSE THE REMAINING SUPPORT CABLE TO SNAP AND YOU "
+ "FALL TO THE BOTTOM OF THE GORGE.",
+
+ "EVEN WITH REPAIRS THE BRIDGE IS NOT STRONG ENOUGH TO HOLD TWO PEOPLE.",
+ "SANCHEZ AND HIS MEN FIND YOU AND HOLD FIRING SQUAD PRACTICE.",
+ "THE TWO GUARDS ARE DISTURBED IN THEIR LOVE NEST AND COME LOOKING FOR ANYONE ACTING SUSPICIOUS. "
+ "THEY FIND YOU AND SEND YOU UP THE RIVER.",
+ "THE PARACHUTE IS NOT LARGE ENOUGH TO SUPPORT YOU, AND YOU HIT THE TREES AT 140 M.P.H.",
+ "SANCHEZ AND HIS MEN FOLLOW YOU ACROSS THE BRIDGE AND CUT YOU DOWN IN A HAIL OF GUNFIRE",
+ "YOU TRIED TO STAB THE ANT BUT HIS SHELL IS TOO DIFFICULT TO PENETRATE. "
+ "YOU NOTICE A SLIGHT CUT IN THE SHELL UNDERNEATH BUT YOU CAN'T GET TO IT "
+ "AND HE SNIPS YOU INTO DELICIOUS MEATY CHUNKS.",
+ "AFTER THE ANT FINISHES SUCKING ALL OF THE SAP OUT OF THE VINE HE TURNS HIS ATTENTION BACK TO YOU "
+ "AND BITES YOUR HEAD OFF.",
+ "THE CANTINA OWNER NOTICES YOU ARE TRYING TO STEAL OBJECTS FROM THE TABLES. "
+ "TWENTY YEARS LATER YOU ARE RELEASED FROM A SOUTH AMERICAN PRISON."
+};
+
+const char *const DEATH_TEXT_ENG_DEMO[34] = {
+ "SAM SALVADOR SPOTS YOU AND LETS YOU HAVE IT.",
+ "WHILE TAKING A MOONLIGHT SWIM YOU DISCOVER THAT PIRANHA REALLY CAN STRIP FLESH TO THE BONE.",
+ "THE GUARD FILLS YOU FULL OF HOLES BEFORE TOSSING YOU TO THE PIRANHA.",
+ "YOU'RE ONLY ABLE TO SWIM HALFWAY ACROSS THE RIVER BEFORE RUNNING OUT OF AIR. YOU MAKE SO MUCH NOISE GASPING FOR BREATH THAT SAM EASILY FINDS YOU AND LEAVES YOU IN THE RIVER PERMANENTLY.",
+ "SAM SALVADOR NOTICES SOMEONE HAS BEEN PLAYING WITH THE CARGO. HE TRACKS YOU DOWN AND LETS YOU HAVE IT.",
+ "THE GUARD COMES AROUND THE CORNER. HE DECIDES THAT THREE LEAD SLUGS WILL TEACH YOU TO BE MORE POLITE.",
+ "THE CAPTAIN IS WAITING OUTSIDE THE DOOR.",
+ "THE CAPTAIN'S RANDOM SHOOTING FINALLY FINDS ITS TARGET.",
+ "THE CRATE OUTSIDE THE WINDOW EXPLODES, DESTROYING THE SHIP. UNFORTUNATELY, YOU'RE STILL ABOARD.",
+ "THE DOOR WAS NOT BARRED AND THE CAPTAIN WALKS RIGHT IN AND PARTS YOUR HAIR.",
+ "",
+ "YOU RUN OUT ON DECK, THEN REALIZE THAT MAYA IS STILL TIED UP. AS YOU TURN TO GO BACK THE BOAT BLOWS UP.",
+ "AFTER YOU FAIL TO PROVE YOUR DIVINITY THE NATIVES EAT YOU FOR LUNCH.",
+ "THIS IS THE GENERIC DEATH SCENE",
+ "YOU ONLY MAKE IT HALFWAY ACROSS THE RIVER BEFORE THE PIRANHA STRIKE.",
+ "WITH NOTHING TO PROTECT HIM FROM THE HAIL OF BULLETS ALLEN IS QUICKLY GUNNED DOWN. JASON AND MAYA SOON FOLLOW...",
+ "THE COMBINATION OF THE WIND AND GUNFIRE KNOCK THE CORRUGATED IRON OVER, LEAVING YOU WITHOUT PROTECTION.",
+ "WITHOUT SUFFICIENT AMMUNITION, ALLEN IS UNABLE TO HOLD OFF THE ATTACKERS FOR LONG. THIS RESULTS IN A SERIOUS CASE OF LEAD POISONING.",
+ "ALLEN IS A MARVELOUS SHOT, BUT HIS AMMUNITION IS NOT UNLIMITED. SOON IT IS ALL OVER.",
+ "THE PILOT FEELS YOU ARE TOO CLOSE AND PULLS THE TRIGGER.",
+ "THE PILOT SHOOTS YOU IN THE HEAD, THEN TOSSES YOUR LIFELESS",
+ "THE PLANE CRASHES INTO THE JUNGLE CANOPY AT 200 MPH.",
+ "THE CANOE HITS THE ROCKS AND CAPSIZES, AND THE PIRANHA MAKE YOU THEIR LUNCH GUESTS.",
+ "YOU ACCIDENTALLY DISCOVER THE FOURTH TALLEST WATERFALL IN SOUTH AMERICA.",
+ "YOU DISCOVER A VERY HUNGRY TRIBE OF CANNIBALS.",
+ "YOU BECOME LOST IN THE WINDING WATERWAYS AND WANDER UNTIL YOU STARVE TO DEATH.",
+ "YOU BECOME TRAPPED IN THE RAPIDS AND ARE CRUSHED BETWEEN THE ROCKS.",
+ "YOU WAIT AROUND FOR SOME TIME, BUT HANS STROHEIM NEVER SPEAKS TO YOU AGAIN. FINALLY YOU RETURN HOME KNOWING YOU HAVE FAILED.",
+ "DECIDING THAT YOU THREATEN HIM AND HIS WORK, HANS STROHEIM HAS THE NATIVES IN THE VILLAGE KILL YOU.",
+ "YOU DO NOT GET FAR ENOUGH AWAY BEFORE THE DYNAMITE EXPLODES AND YOU ARE BLOWN INTO A THOUSAND PIECES.",
+ "STANDING OUT IN THE OPEN YOU ARE EXPOSED TO THE HAIL OF BULLETS FROM SANCHEZ' MEN.",
+ "THE AMAZON SENTINELS SPOT YOU AND FILL YOU FULL OF ARROWS.",
+ "SAM MAY BE UGLY, BUT HE'S NOT DEAF. HE HEARS ALL THE NOISE YOU ARE MAKING AND CANCELS YOUR BOARDING PASS.",
+ "WITH THE BAR OFF THE DOOR THE CAPTAIN WALTZES IN AND BLOWS YOU AWAY"
+};
+
+const char *const INVENTORY_NAMES_ENG[85] = {
+ "RAT", "ALCOHOL", "SAFE COMBINATION", "BEAKER", "MICROFILM",
+ "VAULT KEY", "BOLT CUTTERS", "BLOWGUN", "LOVE POTION", "MONEY",
+ "DARTS", "TAPE", "JUNGLE POTION", "MOVIE", "CABINET KEY",
+ "DISPLAY CASE KEY", "FLITCH'S CAR KEYS", "COAT HANGER",
+ "CROWBAR", "COMPASS", "MAP", "LETTER OPENER", "LETTER",
+ "DECODER", "DIPPED DART", "LOADED BLOWGUN", "CARD", "JERRYCAN",
+ "CIGARETTES", "BIKE PUMP", "PARACHUTE", "PESO", "PEPPERS",
+ "MACHETE", "POISON ROOT", "AMMUNITION", "PADDLE", "FISHING NET",
+ "RAT TRAP", "CHEESE", "LOADED TRAP", "KNIFE", "CHOPPED PEPPERS",
+ "LIGHTER", "LADDER", "SMALL POLE", "JEEP KEY", "CHAIN", "ARROW",
+ "FILLED JERRY CAN", "EXPLOSIVES", "GEIGER COUNTER", "VINE",
+ "GOLD NUGGET", "HOLLOW REED", "AMAZON QUEEN KEYS", "FISHING POLE",
+ "HARPOON", "RAG", "BOTTLE OF RUM", "RAG IN BOTTLE", "MOLOTOV COCKTAIL",
+ "JUNGLE PLANT", "LADLE", "WORM", "FISH", "FIREWORKS", "BAITED POLE",
+ "FILLED LADLE", "EMERALD", "SMALL KEY", "SCROLL", "LIT EXPLOSIVES",
+ "LIGHTER", "BROKEN SPEAR", "SHOE LACES", "TORCH", "LACES AND SPEAR",
+ "KNIFE SPEAR", "GARBAGE CAN", "RAFT", "INFLATED RAFT",
+ "JASON'S CAR KEYS", "PESO BILLS", "PLANK"
+};
+
+const int COMBO_TABLE[85][4] = {
+ { -1, -1, -1, -1 },
+ { 12, 3, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 24, 25, -1, -1 },
+ { 10, 24, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 8, 24, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 1, 3, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 7, 25, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 80, 81, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 41, 42, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 39, 40, -1, -1 },
+ { 38, 40, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 32, 42, 77, 78 },
+ { -1, -1, -1, -1 },
+ { 60, 61, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 73, 72, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 64, 67, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 59, 60, -1, -1 },
+ { 58, 60, -1, -1 },
+ { 43, 61, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 56, 67, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 50, 72, -1, -1 },
+ { 75, 77, -1, -1 },
+ { 74, 77, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 41, 78, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { 29, 81, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 },
+ { -1, -1, -1, -1 }
+};
+
+const char *const NO_HELP_MESSAGE_ENG =
+ "WE ARE UNABLE TO PROVIDE YOU WITH ANY MORE HINTS. YOUR IQ \
+HAS DECREASED SO FAR THAT WE CAN NO LONGER PUT THE HINTS IN TERMS \
+YOU CAN UNDERSTAND.";
+const char *const NO_HINTS_MESSAGE_ENG = "THE HELP SYSTEM HAS BEEN TURNED OFF FOR THIS GAME.";
+const char *const RIVER_HIT1_ENG = "YOU HIT THE ROCKS AND THE CANOE BEGINS TO LEAK.";
+const char *const RIVER_HIT2_ENG = "YOU HIT THE ROCKS AND THE CANOE DEVELOPS SERIOUS LEAKS.";
+const char *const BAR_MESSAGE_ENG = "YOU ARE TOO BUSY TRYING TO KEEP FROM SINKING TO DO THAT";
+const char *const HELPLVLTXT_ENG[3] = { " LEVEL 1 ", " LEVEL 2 ", " LEVEL 3 " };
+
+const char *const IQLABELS_ENG[9] = {
+ "VEGETABLE",
+ "NEANDERTHAL",
+ "LOBOTOMIZED",
+ "DENSE",
+ "AVERAGE",
+ "INTELLIGENT",
+ "MURPHYITE",
+ "BRILLIANT",
+ "GENIUS"
+};
+
+const char *const CANT_GET_THERE_ENG = "YOU CAN'T GET THERE FROM HERE.";
+
+} // End of namespace Amazon
diff --git a/devtools/create_access/amazon_resources.h b/devtools/create_access/amazon_resources.h
new file mode 100644
index 0000000000..aae27ce3ba
--- /dev/null
+++ b/devtools/create_access/amazon_resources.h
@@ -0,0 +1,62 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __AMAZON_RESOURCES_H__
+#define __AMAZON_RESOURCES_H__
+
+#include "common/scummsys.h"
+
+namespace Amazon {
+
+#define AMAZON_NUM_CURSORS 10
+extern const byte *const CURSORS[AMAZON_NUM_CURSORS];
+extern const uint CURSOR_SIZES[AMAZON_NUM_CURSORS];
+
+extern const int FONT2_INDEX[];
+extern const byte FONT2_DATA[];
+extern const int FONT6x6_INDEX[];
+extern const byte FONT6x6_DATA[];
+extern const uint FONT2_INDEX_SIZE;
+extern const uint FONT2_DATA_SIZE;
+extern const uint FONT6x6_INDEX_SIZE;
+extern const uint FONT6x6_DATA_SIZE;
+
+extern const char *const ROOM_DESCR[64];
+extern const char *const DEATH_TEXT_ENG[58];
+extern const char *const DEATH_TEXT_ENG_DEMO[34];
+extern const byte DEATH_SCREENS_ENG[58];
+extern const byte DEATH_SCREENS_ENG_DEMO[34];
+extern const char *const INVENTORY_NAMES_ENG[85];
+extern const int COMBO_TABLE[85][4];
+
+extern const char *const NO_HELP_MESSAGE_ENG;
+extern const char *const NO_HINTS_MESSAGE_ENG;
+extern const char *const RIVER_HIT1_ENG;
+extern const char *const RIVER_HIT2_ENG;
+extern const char *const BAR_MESSAGE_ENG;
+extern const char *const HELPLVLTXT_ENG[3];
+extern const char *const IQLABELS_ENG[9];
+extern const char *const CANT_GET_THERE_ENG;
+
+} // End of namespace Amazon
+
+#endif
diff --git a/devtools/create_access/create_access_dat.cpp b/devtools/create_access/create_access_dat.cpp
new file mode 100644
index 0000000000..a1591ef6e5
--- /dev/null
+++ b/devtools/create_access/create_access_dat.cpp
@@ -0,0 +1,430 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+// HACK to allow building with the SDL backend on MinGW
+// see bug #1800764 "TOOLS: MinGW tools building broken"
+#ifdef main
+#undef main
+#endif // main
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "common/language.h"
+#include "common/rect.h"
+#include "create_access_dat.h"
+#include "amazon_resources.h"
+#include "martian_resources.h"
+
+/**
+ * Format of the access.dat file that will be created:
+ * 4 Bytes - Magic string 'SVMA' to identify valid data file
+ * 2 bytes - Version number
+ * 2 Bytes - Number of different games data in the data file
+ * Series of index entries identifying each game:
+ * 1 byte - Game type: 1 = Amazon, 2 = Martian Memorandum, 3 = Noctropolis
+ * 1 byte - disc type: 0 = Floppy, 1 = CD, 2 = Common data shared across
+ * all variations of the given game
+ * 1 byte - Is Demo: 0 = Full game, 1 = Demo
+ * 1 byte - Language (Common::Language)
+ * 4 bytes - File offset for the data for the game
+ */
+
+File outputFile;
+
+void writeHeader(int numExecutables);
+void writeAmazonCommonData();
+void writeMartianCommonData();
+bool processExecutable(int idx, const char *name);
+
+void NORETURN_PRE error(const char *s, ...) {
+ printf("%s\n", s);
+ exit(1);
+}
+
+int main(int argc, char *argv[]) {
+ const uint NUM_COMMON_ENTRIES = 2;
+
+ if (argc < 3) {
+ printf("Format: %s output_filename executable1 [executable2 ..]\n", argv[0]);
+ exit(0);
+ }
+
+ // Create the new data file for output
+ outputFile.open(argv[1], kFileWriteMode);
+ writeHeader(argc - 2 + NUM_COMMON_ENTRIES);
+
+ // Write out entries containing common data for the games
+ writeAmazonCommonData();
+ writeMartianCommonData();
+
+ // Iterate through processing each specified executable
+ outputFile.seek(0, SEEK_END);
+ for (int idx = 2; idx < argc; ++idx) {
+ if (!processExecutable(idx - 2 + NUM_COMMON_ENTRIES, argv[idx]))
+ break;
+ }
+
+ // Close the output file
+ outputFile.close();
+}
+
+void writeHeader(int numExecutables) {
+ // Write out magic string
+ const char *MAGIC_STR = "SVMA";
+ outputFile.write(MAGIC_STR, 4);
+
+ // Write out version number
+ outputFile.writeWord(VERSION_NUMBER);
+
+ // Write out the number of entries the data file will contain
+ outputFile.writeWord(numExecutables);
+
+ // Write out padding for index entries that will be written
+ outputFile.writeByte(0, 8 * numExecutables);
+}
+
+void writeAmazonCommonData() {
+ // Write out the header entry
+ outputFile.seek(8);
+ outputFile.writeByte(1); // Amazon
+ outputFile.writeByte(2); // Common data
+ outputFile.writeByte(0);
+ outputFile.writeByte(0);
+ outputFile.writeLong(outputFile.size());
+
+ // Write out cursor list
+ outputFile.seek(0, SEEK_END);
+ outputFile.writeWord(AMAZON_NUM_CURSORS);
+
+ for (uint idx = 0; idx < AMAZON_NUM_CURSORS; ++idx) {
+ outputFile.writeWord(Amazon::CURSOR_SIZES[idx]);
+ outputFile.write(Amazon::CURSORS[idx], Amazon::CURSOR_SIZES[idx]);
+ }
+
+ // Write out font data
+ outputFile.writeWord(Amazon::FONT2_INDEX_SIZE);
+ for (uint idx = 0; idx < Amazon::FONT2_INDEX_SIZE; ++idx)
+ outputFile.writeWord(Amazon::FONT2_INDEX[idx]);
+
+ outputFile.writeWord(Amazon::FONT2_DATA_SIZE);
+ outputFile.write(Amazon::FONT2_DATA, Amazon::FONT2_DATA_SIZE);
+
+ outputFile.writeWord(Amazon::FONT6x6_INDEX_SIZE);
+ for (uint idx = 0; idx < Amazon::FONT6x6_INDEX_SIZE; ++idx)
+ outputFile.writeWord(Amazon::FONT6x6_INDEX[idx]);
+
+ outputFile.writeWord(Amazon::FONT6x6_DATA_SIZE);
+ outputFile.write(Amazon::FONT2_DATA, Amazon::FONT6x6_DATA_SIZE);
+}
+
+
+void writeMartianCommonData() {
+ // Write out the header entry
+ outputFile.seek(16);
+ outputFile.writeByte(2); // Martian
+ outputFile.writeByte(2); // Common data
+ outputFile.writeByte(0);
+ outputFile.writeByte(0);
+ outputFile.writeLong(outputFile.size());
+
+ // Write out cursor list
+ outputFile.seek(0, SEEK_END);
+ outputFile.writeByte(MARTIAN_NUM_CURSORS);
+
+ for (uint idx = 0; idx < MARTIAN_NUM_CURSORS; ++idx) {
+ outputFile.writeWord(Martian::CURSOR_SIZES[idx]);
+ outputFile.write(Martian::CURSORS[idx], Martian::CURSOR_SIZES[idx]);
+ }
+}
+
+bool processExecutable(int exeIdx, const char *name) {
+ uint dataSegmentOffset;
+ uint filenamesOffset, numFilenames;
+ uint charsStart, charsEnd;
+ uint roomsStart, roomsEnd, numRooms;
+ uint travelPosOffset;
+ const char *const *roomDescs;
+ const byte *deathScreens;
+ const char *const *deathText;
+ uint numDeaths;
+ uint numItems;
+ const char *const *itemNames;
+ const int *comboTable;
+ byte gameId = 0, discType = 0, demoType = 0;
+ byte language = Common::EN_ANY;
+
+ // Open up the file for access
+ File exeFile;
+ if (!exeFile.open(name)) {
+ printf("Could not open file - %s\n", name);
+ return false;
+ }
+
+ // Total up the first 256 bytes of the executable as a simplified
+ // means of identifying the different executables we support
+ uint fileChecksum = 0;
+ for (int idx = 0; idx < 256; ++idx)
+ fileChecksum += exeFile.readByte();
+
+ switch (fileChecksum) {
+ case 11899:
+ // Amazon English floppy
+ gameId = 1;
+ dataSegmentOffset = 0xC8C0;
+ filenamesOffset = dataSegmentOffset + 0x3628;
+ numFilenames = 100;
+ charsStart = dataSegmentOffset + 0x4234;
+ charsEnd = dataSegmentOffset + 0x49c6;
+ roomsStart = dataSegmentOffset + 0x35a8;
+ roomsEnd = dataSegmentOffset + 0x4234;
+ travelPosOffset = dataSegmentOffset + 0x5ff7;
+ numRooms = 64;
+ roomDescs = &Amazon::ROOM_DESCR[0];
+ deathScreens = Amazon::DEATH_SCREENS_ENG;
+ deathText = &Amazon::DEATH_TEXT_ENG[0];
+ numDeaths = sizeof(Amazon::DEATH_SCREENS_ENG);
+ numItems = 85;
+ itemNames = &Amazon::INVENTORY_NAMES_ENG[0];
+ comboTable = &Amazon::COMBO_TABLE[0][0];
+ break;
+
+ case 12360:
+ // Amazon CD English
+ gameId = 1;
+ discType = 1;
+ dataSegmentOffset = 0xd370;
+ filenamesOffset = dataSegmentOffset + 0x3EA0;
+ numFilenames = 116;
+ charsStart = dataSegmentOffset + 0x4BDC;
+ charsEnd = dataSegmentOffset + 0x5AF4;
+ roomsStart = dataSegmentOffset + 0x3E20;
+ roomsEnd = dataSegmentOffset + 0x4BDC;
+ travelPosOffset = dataSegmentOffset + 0x7125;
+ numRooms = 64;
+ roomDescs = &Amazon::ROOM_DESCR[0];
+ deathScreens = Amazon::DEATH_SCREENS_ENG;
+ deathText = &Amazon::DEATH_TEXT_ENG[0];
+ numDeaths = sizeof(Amazon::DEATH_SCREENS_ENG);
+ numItems = 85;
+ itemNames = &Amazon::INVENTORY_NAMES_ENG[0];
+ comboTable = &Amazon::COMBO_TABLE[0][0];
+ break;
+
+ case 11748:
+ // Amazon English Demo
+ gameId = 1;
+ discType = 0;
+ demoType = 1;
+ dataSegmentOffset = 0xa2a0;
+ filenamesOffset = dataSegmentOffset + 0x242C;
+ numFilenames = 100;
+ charsStart = dataSegmentOffset + 0x2F1A;
+ charsEnd = dataSegmentOffset + 0x34FB;
+ roomsStart = dataSegmentOffset + 0x23AC;
+ roomsEnd = dataSegmentOffset + 0x2F1A;
+ travelPosOffset = dataSegmentOffset + 0x494E;
+ numRooms = 64;
+ roomDescs = &Amazon::ROOM_DESCR[0];
+ deathScreens = Amazon::DEATH_SCREENS_ENG;
+ deathText = &Amazon::DEATH_TEXT_ENG[0];
+ numDeaths = sizeof(Amazon::DEATH_SCREENS_ENG);
+ numItems = 85;
+ itemNames = &Amazon::INVENTORY_NAMES_ENG[0];
+ comboTable = &Amazon::COMBO_TABLE[0][0];
+ break;
+
+ case 1224:
+ // Martian Memorandum English packed
+ printf("Martian Memorandum provided that's packed with EXEPACK.\n");
+ printf("It needs to be first unpacked before it can be used with this tool.\n");
+ return false;
+
+ case 0:
+ // Martian Memorandum English
+ gameId = 2;
+ dataSegmentOffset = 0x8d78;
+ filenamesOffset = dataSegmentOffset + 0x373A;
+ numFilenames = 80;
+ charsStart = dataSegmentOffset + 0x40F2;
+ charsEnd = dataSegmentOffset + 0x46F8;
+ roomsStart = dataSegmentOffset + 0x36DA;
+ roomsEnd = dataSegmentOffset + 0x40F2;
+ travelPosOffset = dataSegmentOffset + 0x58E9;
+ numRooms = 48;
+ roomDescs = &Martian::ROOM_DESCR[0];
+ deathScreens = Martian::DEATH_SCREENS_ENG;
+ deathText = &Martian::DEATH_TEXT_ENG[0];
+ numDeaths = sizeof(Martian::DEATH_SCREENS_ENG);
+ numItems = 85;
+ itemNames = &Martian::INVENTORY_NAMES_ENG[0];
+ comboTable = nullptr;
+ break;
+
+ default:
+ printf("Unknown game executable specified - %s\n", name);
+ exeFile.close();
+ return false;
+ }
+
+ // Write out header entry
+ uint outputOffset = outputFile.size();
+ outputFile.seek(8 + exeIdx * 8);
+ outputFile.writeByte(gameId);
+ outputFile.writeByte(discType);
+ outputFile.writeByte(demoType);
+ outputFile.writeByte(language);
+ outputFile.writeLong(outputOffset);
+ outputFile.seek(0, SEEK_END);
+
+ // Write out list of AP filenames
+ outputFile.writeWord(numFilenames);
+ for (uint idx = 0; idx < numFilenames; ++idx) {
+ exeFile.seek(filenamesOffset + idx * 2);
+ uint nameOffset = exeFile.readWord();
+
+ exeFile.seek(dataSegmentOffset + nameOffset);
+ outputFile.writeString(exeFile);
+ }
+
+ // Write out the character list
+ exeFile.seek(charsStart);
+ Common::Array<uint> charOffsets;
+ charOffsets.push_back(exeFile.readWord());
+ assert((dataSegmentOffset + charOffsets[0] - exeFile.pos()) < 512);
+
+ while (exeFile.pos() < (dataSegmentOffset + charOffsets[0]))
+ charOffsets.push_back(exeFile.readWord());
+
+ outputFile.writeWord(charOffsets.size());
+ charOffsets.push_back(charsEnd);
+ for (uint idx = 0; idx < charOffsets.size() - 1; ++idx) {
+ if (charOffsets[idx] == 0) {
+ outputFile.writeWord(0);
+ } else {
+ uint nextOffset = 0xffff;
+ for (uint idx2 = 0; idx2 < charOffsets.size(); ++idx2) {
+ if (charOffsets[idx2] && charOffsets[idx2] > charOffsets[idx] && charOffsets[idx2] < nextOffset)
+ nextOffset = charOffsets[idx2];
+ }
+ uint size = nextOffset - charOffsets[idx];
+
+ exeFile.seek(dataSegmentOffset + charOffsets[idx]);
+ outputFile.writeWord(size);
+ outputFile.write(exeFile, size);
+ }
+ }
+
+ // Write out the room data
+ Common::Array<uint> roomOffsets;
+ Common::Array<Common::Point> travelPos;
+
+ exeFile.seek(roomsStart);
+ for (uint idx = 0; idx < numRooms; ++idx)
+ roomOffsets.push_back(exeFile.readWord());
+ roomOffsets.push_back(roomsEnd);
+
+ exeFile.seek(travelPosOffset);
+ for (uint idx = 0; idx < numRooms; ++idx) {
+ int16 xp = (int16)exeFile.readWord();
+ int16 yp = (int16)exeFile.readWord();
+ travelPos.push_back(Common::Point(xp, yp));
+ }
+
+ outputFile.writeWord(numRooms);
+ for (uint idx = 0; idx < numRooms; ++idx) {
+ uint dataSize = 0;
+
+ if (roomOffsets[idx] == 0) {
+ dataSize = 0;
+ } else {
+ // Find the offset of the next higher entry that's non-zero
+ uint offset = 0;
+ for (uint idx2 = idx + 1; !offset; ++idx2)
+ offset = roomOffsets[idx2];
+ dataSize = offset - roomOffsets[idx];
+ exeFile.seek(dataSegmentOffset + roomOffsets[idx]);
+ }
+
+ // Write out the room description (used only by the debugger)
+ outputFile.writeString(roomDescs[idx]);
+
+ // Write out travel position
+ outputFile.writeWord((uint16)travelPos[idx].x);
+ outputFile.writeWord((uint16)travelPos[idx].y);
+
+ // Write out the data for the room
+ outputFile.writeWord(dataSize);
+ if (dataSize > 0)
+ outputFile.write(exeFile, dataSize);
+ }
+
+ // Write out the deaths list
+ outputFile.writeWord(numDeaths);
+ for (uint idx = 0; idx < numDeaths; ++idx) {
+ // Write out the screen number and text
+ outputFile.writeByte(deathScreens[idx]);
+ outputFile.writeString(deathText[idx]);
+ }
+
+ // Write out inventory data
+ outputFile.writeWord(numItems);
+ for (uint idx = 0; idx < numItems; ++idx) {
+ outputFile.writeString(itemNames[idx]);
+
+ if (comboTable == nullptr) {
+ for (uint cIdx = 0; cIdx < 4; ++cIdx)
+ outputFile.writeWord(0);
+ } else {
+ for (uint cIdx = 0; cIdx < 4; ++cIdx, ++comboTable)
+ outputFile.writeWord((uint16)*comboTable);
+ }
+ }
+
+ // Write out game specific strings and other data
+ if (gameId == 1) {
+ // Write out miscellaneous strings
+ outputFile.writeString(Amazon::NO_HELP_MESSAGE_ENG);
+ outputFile.writeString(Amazon::NO_HINTS_MESSAGE_ENG);
+ outputFile.writeString(Amazon::RIVER_HIT1_ENG);
+ outputFile.writeString(Amazon::RIVER_HIT2_ENG);
+ outputFile.writeString(Amazon::BAR_MESSAGE_ENG);
+
+ for (int idx = 0; idx < 3; ++idx)
+ outputFile.writeString(Amazon::HELPLVLTXT_ENG[idx]);
+ for (int idx = 0; idx < 9; ++idx)
+ outputFile.writeString(Amazon::IQLABELS_ENG[idx]);
+
+ outputFile.writeString(Amazon::CANT_GET_THERE_ENG);
+ }
+
+ // Do final padding to the next paragraph boundary
+ if ((outputFile.size() % 16) != 0)
+ outputFile.writeByte(0, 16 - (outputFile.size() % 16));
+
+ // Close the executable and signal that it was processed successfully
+ exeFile.close();
+ return true;
+}
diff --git a/devtools/create_access/create_access_dat.h b/devtools/create_access/create_access_dat.h
new file mode 100644
index 0000000000..4976edec46
--- /dev/null
+++ b/devtools/create_access/create_access_dat.h
@@ -0,0 +1,184 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __CREATE_ACCESS_DAT_H__
+#define __CREATE_ACCESS_DAT_H__
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "common/scummsys.h"
+#include "common/endian.h"
+#include "common/array.h"
+
+#define VERSION_NUMBER 1
+
+enum AccessMode {
+ kFileReadMode = 1,
+ kFileWriteMode = 2
+};
+
+class File {
+private:
+ FILE *_f;
+ const byte *_memPtr;
+ size_t _offset, _size;
+public:
+ File() : _f(nullptr), _memPtr(nullptr), _offset(0), _size(0) {}
+
+ bool open(const char *filename, AccessMode mode = kFileReadMode) {
+ _memPtr = nullptr;
+ _f = fopen(filename, (mode == kFileReadMode) ? "rb" : "wb+");
+ return (_f != NULL);
+ }
+ bool open(const byte *data, uint size) {
+ close();
+ _memPtr = data;
+ _size = size;
+ return true;
+ }
+
+ void close() {
+ if (_f)
+ fclose(_f);
+ _f = nullptr;
+ _memPtr = nullptr;
+ }
+ int seek(int32 offset, int whence = SEEK_SET) {
+ if (_f)
+ return fseek(_f, offset, whence);
+
+ switch (whence) {
+ case SEEK_SET:
+ _offset = offset;
+ break;
+ case SEEK_CUR:
+ _offset += offset;
+ break;
+ case SEEK_END:
+ _offset = _size + offset;
+ break;
+ default:
+ break;
+ }
+
+ return _offset;
+ }
+ void skip(int32 offset) {
+ if (_f)
+ fseek(_f, offset, SEEK_CUR);
+ else
+ _offset += offset;
+ }
+ long read(void *buffer, size_t len) {
+ if (_f)
+ return fread(buffer, 1, len, _f);
+
+ uint bytesToRead = CLIP(len, (size_t)0, _size - _offset);
+ memcpy(buffer, &_memPtr[_offset], bytesToRead);
+ _offset += bytesToRead;
+ return bytesToRead;
+ }
+ void write(const void *buffer, size_t len) {
+ assert(_f);
+ fwrite(buffer, 1, len, _f);
+ }
+ void write(File &src, size_t len) {
+ for (size_t idx = 0; idx < len; ++idx)
+ writeByte(src.readByte());
+ }
+ byte readByte() {
+ byte v;
+ read(&v, sizeof(byte));
+ return v;
+ }
+ uint16 readWord() {
+ uint16 v;
+ read(&v, sizeof(uint16));
+ return FROM_LE_16(v);
+ }
+ uint32 readLong() {
+ uint32 v;
+ read(&v, sizeof(uint32));
+ return FROM_LE_32(v);
+ }
+ void writeByte(byte v) {
+ write(&v, sizeof(byte));
+ }
+ void writeByte(byte v, int len) {
+ byte *b = new byte[len];
+ memset(b, v, len);
+ write(b, len);
+ delete[] b;
+ }
+ void writeWord(uint16 v) {
+ uint16 vTemp = TO_LE_16(v);
+ write(&vTemp, sizeof(uint16));
+ }
+ void writeLong(uint32 v) {
+ uint32 vTemp = TO_LE_32(v);
+ write(&vTemp, sizeof(uint32));
+ }
+ void writeString(const char *msg) {
+ if (!msg) {
+ writeByte(0);
+ } else {
+ do {
+ writeByte(*msg);
+ } while (*msg++);
+ }
+ }
+ void writeString(File &src) {
+ char c;
+ do {
+ c = src.readByte();
+ writeByte(c);
+ } while (c);
+ }
+ uint32 pos() const {
+ if (_f)
+ return ftell(_f);
+ else
+ return _offset;
+ }
+ uint32 size() const {
+ if (_f) {
+ uint32 currentPos = pos();
+ fseek(_f, 0, SEEK_END);
+ uint32 result = pos();
+ fseek(_f, currentPos, SEEK_SET);
+ return result;
+ } else if (_memPtr) {
+ return _size;
+ } else {
+ return 0;
+ }
+ }
+ bool eof() const {
+ if (_f)
+ return feof(_f) != 0;
+ else if (_memPtr)
+ return _offset >= _size;
+ return false;
+ }
+};
+
+#endif
diff --git a/devtools/create_access/martian_resources.cpp b/devtools/create_access/martian_resources.cpp
new file mode 100644
index 0000000000..381b79a073
--- /dev/null
+++ b/devtools/create_access/martian_resources.cpp
@@ -0,0 +1,182 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "martian_resources.h"
+
+namespace Martian {
+
+
+const byte MOUSE0[] = {
+ // hotspot x and y, uint16 LE
+ 0, 0, 0, 0,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0, 2, 0xF7, 5,
+ 0, 3, 0xF7, 0xF7, 5,
+ 0, 3, 0xF7, 0xF7, 5,
+ 0, 4, 0xF7, 0xF7, 0xF7, 5,
+ 0, 4, 0xF7, 0xF7, 0xF7, 5,
+ 0, 5, 0xF7, 0xF7, 0xF7, 0xF7, 5,
+ 0, 5, 0xF7, 0xF7, 0xF7, 0xF7, 5,
+ 0, 6, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5,
+ 0, 6, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5,
+ 0, 7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5,
+ 0, 6, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5,
+ 0, 5, 0xF7, 0xF7, 0xF7, 0xF7, 5,
+ 2, 3, 0xF7, 0xF7, 5,
+ 3, 3, 0xF7, 0xF7, 5,
+ 3, 3, 0xF7, 0xF7, 5,
+ 4, 2, 0xF7, 5
+};
+const byte MOUSE1[] = {
+ // hotspot x and y, uint16 LE
+ 7, 0, 7, 0,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 6, 1, 0xF7,
+ 4, 5, 0xFF, 0xFF, 0, 0xFF, 0xFF,
+ 3, 7, 0xFF, 0, 0, 0, 0, 0, 0xFF,
+ 2, 9, 0xFF, 0, 0, 0, 0xF7, 0, 0, 0, 0xFF,
+ 1, 11, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF,
+ 1, 11, 0xFF, 0, 0, 0, 0, 0xF7, 0, 0, 0, 0, 0xFF,
+ 0, 13, 0xF7, 0, 0, 0xF7, 0, 0xF7, 0, 0xF7, 0, 0xF7, 0, 0, 0xF7,
+ 1, 11, 0xFF, 0, 0, 0, 0, 0xF7, 0, 0, 0, 0, 0xFF,
+ 1, 11, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF,
+ 2, 9, 0xFF, 0, 0, 0, 0xF7, 0, 0, 0, 0xFF,
+ 3, 7, 0xFF, 0, 0, 0, 0, 0, 0xFF,
+ 4, 5, 0xFF, 0xFF, 0, 0xFF, 0xFF,
+ 6, 1, 0xF7,
+ 0, 0,
+ 0, 0,
+ 0, 0
+};
+const byte MOUSE2[] = {
+ // hotspot x and y, uint16 LE
+ 8, 0, 8, 0,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0, 0,
+ 0, 0,
+ 7, 2, 4, 5,
+ 7, 2, 4, 5,
+ 7, 2, 4, 5,
+ 7, 2, 4, 5,
+ 7, 2, 4, 5,
+ 2, 12, 4, 4, 4, 4, 4, 0, 4, 4, 4, 4, 4, 5,
+ 7, 2, 4, 5,
+ 7, 2, 4, 5,
+ 7, 2, 4, 5,
+ 7, 2, 4, 5,
+ 7, 2, 4, 5,
+ 0, 0,
+ 0, 0,
+ 0, 0
+};
+const byte MOUSE3[] = {
+ // hotspot x and y, uint16 LE
+ 0, 0, 0, 0,
+ // byte 1: number of skipped pixels
+ // byte 2: number of plotted pixels
+ // then, pixels
+ 0, 11, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 0, 12, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 5,
+ 0, 12, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 5, 5,
+ 0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
+ 0, 12, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5,
+ 0, 12, 6, 6, 6, 6, 5, 0, 0, 6, 6, 6, 6, 5,
+ 0, 12, 6, 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 5,
+ 0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
+ 0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
+ 0, 12, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5,
+ 0, 12, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5,
+ 0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5,
+ 1, 11, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 0, 0,
+ 0, 0,
+ 0, 0
+};
+
+const byte *const CURSORS[MARTIAN_NUM_CURSORS] = {
+ MOUSE0, MOUSE1, MOUSE2, MOUSE3
+};
+const uint CURSOR_SIZES[MARTIAN_NUM_CURSORS] = {
+ sizeof(MOUSE0), sizeof(MOUSE1), sizeof(MOUSE2), sizeof(MOUSE3)
+};
+
+const char *const ROOM_DESCR[48] = {
+ nullptr, "TBD ROOM_TABLE1", "TBD ROOM_TABLE2", "TBD ROOM_TABLE3", "TBD ROOM_TABLE4",
+ "TBD ROOM_TABLE5", "TBD ROOM_TABLE6", "TBD ROOM_TABLE7", "TBD ROOM_TABLE8", "TBD ROOM_TABLE9",
+ nullptr, "TBD ROOM_TABLE11", nullptr, "TBD ROOM_TABLE13", "TBD ROOM_TABLE14",
+ "TBD ROOM_TABLE15", "TBD ROOM_TABLE16", "TBD ROOM_TABLE17", "TBD ROOM_TABLE18", nullptr,
+ nullptr, "TBD ROOM_TABLE21", "TBD ROOM_TABLE22", "TBD ROOM_TABLE23", "TBD ROOM_TABLE24",
+ "TBD ROOM_TABLE25", "TBD ROOM_TABLE26", "TBD ROOM_TABLE27", "TBD ROOM_TABLE28", "TBD ROOM_TABLE29",
+ "TBD ROOM_TABLE30", "TBD ROOM_TABLE31", "TBD ROOM_TABLE32", "TBD ROOM_TABLE33", nullptr,
+ "TBD ROOM_TABLE35", nullptr, "TBD ROOM_TABLE37", "TBD ROOM_TABLE38", "TBD ROOM_TABLE39",
+ nullptr, nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, "TBD ROOM_TABLE47"
+};
+
+const byte DEATH_SCREENS_ENG[20] = {
+ 5, 5, 3, 3, 7, 4, 6, 2, 2, 2, 1, 5, 3, 5, 2, 8, 5, 3, 8, 5
+};
+
+const char *const DEATH_TEXT_ENG[20] = {
+ "A VICIOUS THUG PULLS OUT HIS GUN AND AIR CONDITIONS YOUR BRAIN.",
+ "BIG DICK COMES BACK AND ANNOUNCES YOUR TIME IS UP. ONE OF HIS BOYS PROCEEDS TO PART YOUR EYEBROWS.",
+ "ALTHOUGH HIS FIRST SHOT MISSED, THE PUNK FINDS YOU AND TURNS YOU INTO A DOUGHNUT.",
+ "THE CREEP SPOTS YOU. HE TURNS AND FIRES HIS WEAPON. IT BURNS A HOLE A BUZZARD CAN FLY THROUGH.",
+ "OBVIOUSLY RICK LOGAN HAS A FEW TRICK UP HIS SLEEVE. A TREMENDOUS WEIGHT HITS YOUR HEAD. YOU MUMBLE; WATCH OUT FOR THAT TREE...",
+ "SLOWLY SINKING IN THE SLIMY OOZE, YOU THINK OF SEVERAL JELLO WRESTLING MATCHES YOU'VE ATTENDED. BUT NO MORE...",
+ "THE PATH SUDDENLY GIVES WAY AND YOU FEEL MANY STAKES TEAR THROUGH YOUR FLESH. HOW DO YOU LIKE YOUR STAKE",
+ "THE SNAKE SINKS ITS FANGS INTO YOU LEG. THE POISON WORKS QUICKLY. THE SNAKE THEN SWALLOWS YOU WHOLE.",
+ "YOU FADE AWAY, GLOWING LIKE A LIGHTBULB.",
+ "YOU TOUCH THE BUBBLING RADIOACTIVE SELTZER. IT IMMEDIATELY CAUSES VITAL ORGANS TO ELONGATE AND EXPLODE. YOU DIE WITH AN ABSURD AND FOOLISH LOOK ON YOUR FACE.",
+ "THE DOGS PRETTY HUNGRY. IT WON'T TAKE HIM LONG TO FINISH SO SIT BACK AND ENJOY IT.",
+ "ROCKY DOESN'T LIKE BEING FOLLOWED. HE DECIDES TO BEAT YOU. WITHIN AND INCH OF YOUR LIFE. UNFORTUNATELY, HE MISJUDGED THE DISTANCE",
+ "YOU STUMBLE INTO DEADLY LASER FIRE.",
+ "THE OUTPOST AND YOUR BODY PARTS ARE BLOWN TO KINGDOM COME.",
+ "YOU REACH THE TOP, BUT YOUR AIR SOON RUNS OUT LEAVING YOU BREATHLESS.",
+ "YOU DIE IN THE FIERY EXPLOSION.",
+ "YOU FALL HUNDREDS OF FEET TO YOUR DEATH.",
+ "YOU WALK ONTO A PRESSURE SENSITIVE SECURITY PAD. A LASER ZEROS IN AND BLOWS A HOLE THE SIZE OF A SUBARU TIRE THROUGH YOU.",
+ "DANGERFIELD'S EXPERIMENT BACKFIRES. IT RELEASES A DEMON FROM HIS SUBCONSCIOUS WHICH DESTROYS THE ENTIRE PLANET.",
+ "ONCE DANGERFIELD GETS OUT OF HIS CHAMBER, HE PULLS OUT A WEAPON AND LETS YOU HAVE IT."
+};
+
+const char *const INVENTORY_NAMES_ENG[55] = {
+ "CAMERA", "LENS", "PHOTOS", "MAIL", "GUN",
+ "CASH", "COMLINK", "AMMO", "LOCKPICK KIT", "EARRING",
+ "RECIEPTS", "PAPER", "LADDER", "BOOTS", "DOCUMENTS",
+ "KNIFE", "DAGGER", "KEYS", "ROCK", "LOG",
+ "SHOVEL", "STONE", "REMOTE CONTROL", "FOOD AND WATER", "DOOR CARD KEY",
+ "FLASHLIGHT", "INTERLOCK KEY", "TOOLS", "REBREATHER", "JET PACK",
+ "ROD", "HCL2", "SAFE CARD KEY", "TUNING FORK", "STONE",
+ "ROSE", "KEY", "NOTE", "ALLEN WRENCH", "HOVER BOARD",
+ "BLUE PRINTS", "LETTER", "MEMORANDUM", "MARKERS", "FILM",
+ "ANDRETTI FILM", "GLASSES", "AMULET", "FACIAL KIT", "CAT FOOD",
+ "MONKEY WRENCH", "BIG DICK CARD", "BRA", "BOLT", nullptr
+};
+
+} // End of namespace Amazon
diff --git a/devtools/create_access/martian_resources.h b/devtools/create_access/martian_resources.h
new file mode 100644
index 0000000000..f80f4c1cf4
--- /dev/null
+++ b/devtools/create_access/martian_resources.h
@@ -0,0 +1,52 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __MARTIAN_RESOURCES_H__
+#define __MARTIAN_RESOURCES_H__
+
+#include "common/scummsys.h"
+
+namespace Martian {
+
+#define MARTIAN_NUM_CURSORS 4
+extern const byte *const CURSORS[MARTIAN_NUM_CURSORS];
+extern const uint CURSOR_SIZES[MARTIAN_NUM_CURSORS];
+
+extern const char *const ROOM_DESCR[48];
+
+extern const char *const DEATH_TEXT_ENG[20];
+extern const byte DEATH_SCREENS_ENG[20];
+extern const char *const INVENTORY_NAMES_ENG[55];
+extern const int COMBO_TABLE[85][4];
+
+extern const char *const NO_HELP_MESSAGE_ENG;
+extern const char *const NO_HINTS_MESSAGE_ENG;
+extern const char *const RIVER_HIT1_ENG;
+extern const char *const RIVER_HIT2_ENG;
+extern const char *const BAR_MESSAGE_ENG;
+extern const char *const HELPLVLTXT_ENG[3];
+extern const char *const IQLABELS_ENG[9];
+extern const char *const CANT_GET_THERE_ENG;
+
+} // End of namespace Amazon
+
+#endif
diff --git a/devtools/create_access/module.mk b/devtools/create_access/module.mk
new file mode 100644
index 0000000000..4694ccc7ef
--- /dev/null
+++ b/devtools/create_access/module.mk
@@ -0,0 +1,13 @@
+
+MODULE := devtools/create_access
+
+MODULE_OBJS := \
+ create_access_dat.o \
+ amazon_resources.o \
+ martian_resources.o
+
+# Set the name of the executable
+TOOL_EXECUTABLE := create_access
+
+# Include common rules
+include $(srcdir)/rules.mk
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index fdcc629382..fb207f3f59 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -23,8 +23,8 @@
#ifndef TOOLS_CREATE_PROJECT_H
#define TOOLS_CREATE_PROJECT_H
-#ifndef __has_feature // Optional of course.
- #define __has_feature(x) 0 // Compatibility with non-clang compilers.
+#ifndef __has_feature // Optional of course.
+#define __has_feature(x) 0 // Compatibility with non-clang compilers.
#endif
#include <map>
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 9fddf8af3f..5a433f1dd0 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -49,42 +49,42 @@ namespace CreateProjectTool {
(std::find(defines.begin(), defines.end(), name) != defines.end())
#define ADD_SETTING(config, key, value) \
- config.settings[key] = Setting(value, "", SettingsNoQuote);
+ config._settings[key] = Setting(value, "", kSettingsNoQuote);
#define ADD_SETTING_ORDER(config, key, value, order) \
config.settings[key] = Setting(value, "", SettingsNoQuote, 0, order);
#define ADD_SETTING_ORDER_NOVALUE(config, key, comment, order) \
- config.settings[key] = Setting("", comment, SettingsNoValue, 0, order);
+ config._settings[key] = Setting("", comment, kSettingsNoValue, 0, order);
#define ADD_SETTING_QUOTE(config, key, value) \
- config.settings[key] = Setting(value);
+ config._settings[key] = Setting(value);
#define ADD_SETTING_QUOTE_VAR(config, key, value) \
- config.settings[key] = Setting(value, "", SettingsQuoteVariable);
+ config._settings[key] = Setting(value, "", kSettingsQuoteVariable);
#define ADD_SETTING_LIST(config, key, values, flags, indent) \
- config.settings[key] = Setting(values, flags, indent);
+ config._settings[key] = Setting(values, flags, indent);
#define REMOVE_SETTING(config, key) \
- config.settings.erase(key);
+ config._settings.erase(key);
#define ADD_BUILD_FILE(id, name, fileRefId, comment) { \
Object *buildFile = new Object(this, id, name, "PBXBuildFile", "PBXBuildFile", comment); \
- buildFile->addProperty("fileRef", fileRefId, name, SettingsNoValue); \
+ buildFile->addProperty("fileRef", fileRefId, name, kSettingsNoValue); \
_buildFile.add(buildFile); \
- _buildFile.flags = SettingsSingleItem; \
+ _buildFile._flags = kSettingsSingleItem; \
}
#define ADD_FILE_REFERENCE(id, name, properties) { \
Object *fileRef = new Object(this, id, name, "PBXFileReference", "PBXFileReference", name); \
- if (!properties.fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties.fileEncoding, "", SettingsNoValue); \
- if (!properties.lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties.lastKnownFileType, "", SettingsNoValue|SettingsQuoteVariable); \
- if (!properties.fileName.empty()) fileRef->addProperty("name", properties.fileName, "", SettingsNoValue|SettingsQuoteVariable); \
- if (!properties.filePath.empty()) fileRef->addProperty("path", properties.filePath, "", SettingsNoValue|SettingsQuoteVariable); \
- if (!properties.sourceTree.empty()) fileRef->addProperty("sourceTree", properties.sourceTree, "", SettingsNoValue); \
+ if (!properties._fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties._fileEncoding, "", kSettingsNoValue); \
+ if (!properties._lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties._lastKnownFileType, "", kSettingsNoValue|kSettingsQuoteVariable); \
+ if (!properties._fileName.empty()) fileRef->addProperty("name", properties._fileName, "", kSettingsNoValue|kSettingsQuoteVariable); \
+ if (!properties._filePath.empty()) fileRef->addProperty("path", properties._filePath, "", kSettingsNoValue|kSettingsQuoteVariable); \
+ if (!properties._sourceTree.empty()) fileRef->addProperty("sourceTree", properties._sourceTree, "", kSettingsNoValue); \
_fileReference.add(fileRef); \
- _fileReference.flags = SettingsSingleItem; \
+ _fileReference._flags = kSettingsSingleItem; \
}
bool producesObjectFileOnOSX(const std::string &fileName) {
@@ -152,11 +152,11 @@ bool shouldSkipFileForTarget(const std::string &fileID, const std::string &targe
XcodeProvider::Group::Group(XcodeProvider *objectParent, const std::string &groupName, const std::string &uniqueName, const std::string &path) : Object(objectParent, uniqueName, groupName, "PBXGroup", "", groupName) {
bool path_is_absolute = (path.length() > 0 && path.at(0) == '/');
- addProperty("name", name, "", SettingsNoValue|SettingsQuoteVariable);
- addProperty("sourceTree", path_is_absolute ? "<absolute>" : "<group>", "", SettingsNoValue|SettingsQuoteVariable);
+ addProperty("name", _name, "", kSettingsNoValue | kSettingsQuoteVariable);
+ addProperty("sourceTree", path_is_absolute ? "<absolute>" : "<group>", "", kSettingsNoValue | kSettingsQuoteVariable);
if (path != "") {
- addProperty("path", path, "", SettingsNoValue|SettingsQuoteVariable);
+ addProperty("path", path, "", kSettingsNoValue | kSettingsQuoteVariable);
}
_childOrder = 0;
_treeName = uniqueName;
@@ -165,43 +165,43 @@ XcodeProvider::Group::Group(XcodeProvider *objectParent, const std::string &grou
void XcodeProvider::Group::ensureChildExists(const std::string &name) {
std::map<std::string, Group*>::iterator it = _childGroups.find(name);
if (it == _childGroups.end()) {
- Group *child = new Group(parent, name, this->_treeName + '/' + name, name);
+ Group *child = new Group(_parent, name, this->_treeName + '/' + name, name);
_childGroups[name] = child;
addChildGroup(child);
- parent->_groups.add(child);
+ _parent->_groups.add(child);
}
}
void XcodeProvider::Group::addChildInternal(const std::string &id, const std::string &comment) {
- if (properties.find("children") == properties.end()) {
+ if (_properties.find("children") == _properties.end()) {
Property children;
- children.hasOrder = true;
- children.flags = SettingsAsList;
- properties["children"] = children;
+ children._hasOrder = true;
+ children._flags = kSettingsAsList;
+ _properties["children"] = children;
}
- properties["children"].settings[id] = Setting("", comment + " in Sources", SettingsNoValue, 0, _childOrder++);
+ _properties["children"]._settings[id] = Setting("", comment + " in Sources", kSettingsNoValue, 0, _childOrder++);
if (_childOrder == 1) {
// Force children to use () even when there is only 1 child.
// Also this enforces the use of "," after the single item, instead of ; (see writeProperty)
- properties["children"].flags |= SettingsSingleItem;
+ _properties["children"]._flags |= kSettingsSingleItem;
} else {
- properties["children"].flags ^= SettingsSingleItem;
+ _properties["children"]._flags ^= kSettingsSingleItem;
}
}
-void XcodeProvider::Group::addChildGroup(const Group* group) {
- addChildInternal(parent->getHash(group->_treeName), group->_treeName);
+void XcodeProvider::Group::addChildGroup(const Group *group) {
+ addChildInternal(_parent->getHash(group->_treeName), group->_treeName);
}
void XcodeProvider::Group::addChildFile(const std::string &name) {
std::string id = "FileReference_" + _treeName + "/" + name;
- addChildInternal(parent->getHash(id), name);
+ addChildInternal(_parent->getHash(id), name);
FileProperty property = FileProperty(name, name, name, "\"<group>\"");
- parent->addFileReference(id, name, property);
+ _parent->addFileReference(id, name, property);
if (producesObjectFileOnOSX(name)) {
- parent->addBuildFile(_treeName + "/" + name, name, parent->getHash(id), name + " in Sources");
+ _parent->addBuildFile(_treeName + "/" + name, name, _parent->getHash(id), name + " in Sources");
}
}
@@ -210,14 +210,14 @@ void XcodeProvider::Group::addChildByHash(const std::string &hash, const std::st
}
XcodeProvider::Group *XcodeProvider::Group::getChildGroup(const std::string &name) {
- std::map<std::string, Group*>::iterator it = _childGroups.find(name);
+ std::map<std::string, Group *>::iterator it = _childGroups.find(name);
assert(it != _childGroups.end());
return it->second;
}
XcodeProvider::Group *XcodeProvider::touchGroupsForPath(const std::string &path) {
if (_rootSourceGroup == NULL) {
- assert (path == _projectRoot);
+ assert(path == _projectRoot);
_rootSourceGroup = new Group(this, "Sources", path, path);
_groups.add(_rootSourceGroup);
return _rootSourceGroup;
@@ -239,31 +239,31 @@ XcodeProvider::Group *XcodeProvider::touchGroupsForPath(const std::string &path)
void XcodeProvider::addFileReference(const std::string &id, const std::string &name, FileProperty properties) {
Object *fileRef = new Object(this, id, name, "PBXFileReference", "PBXFileReference", name);
- if (!properties.fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties.fileEncoding, "", SettingsNoValue);
- if (!properties.lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties.lastKnownFileType, "", SettingsNoValue|SettingsQuoteVariable);
- if (!properties.fileName.empty()) fileRef->addProperty("name", properties.fileName, "", SettingsNoValue|SettingsQuoteVariable);
- if (!properties.filePath.empty()) fileRef->addProperty("path", properties.filePath, "", SettingsNoValue|SettingsQuoteVariable);
- if (!properties.sourceTree.empty()) fileRef->addProperty("sourceTree", properties.sourceTree, "", SettingsNoValue);
+ if (!properties._fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties._fileEncoding, "", kSettingsNoValue);
+ if (!properties._lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties._lastKnownFileType, "", kSettingsNoValue | kSettingsQuoteVariable);
+ if (!properties._fileName.empty()) fileRef->addProperty("name", properties._fileName, "", kSettingsNoValue | kSettingsQuoteVariable);
+ if (!properties._filePath.empty()) fileRef->addProperty("path", properties._filePath, "", kSettingsNoValue | kSettingsQuoteVariable);
+ if (!properties._sourceTree.empty()) fileRef->addProperty("sourceTree", properties._sourceTree, "", kSettingsNoValue);
_fileReference.add(fileRef);
- _fileReference.flags = SettingsSingleItem;
+ _fileReference._flags = kSettingsSingleItem;
}
void XcodeProvider::addProductFileReference(const std::string &id, const std::string &name) {
Object *fileRef = new Object(this, id, name, "PBXFileReference", "PBXFileReference", name);
- fileRef->addProperty("explicitFileType", "wrapper.application", "", SettingsNoValue|SettingsQuoteVariable);
- fileRef->addProperty("includeInIndex", "0", "", SettingsNoValue);
- fileRef->addProperty("path", name, "", SettingsNoValue|SettingsQuoteVariable);
- fileRef->addProperty("sourceTree", "BUILT_PRODUCTS_DIR", "", SettingsNoValue);
+ fileRef->addProperty("explicitFileType", "wrapper.application", "", kSettingsNoValue | kSettingsQuoteVariable);
+ fileRef->addProperty("includeInIndex", "0", "", kSettingsNoValue);
+ fileRef->addProperty("path", name, "", kSettingsNoValue | kSettingsQuoteVariable);
+ fileRef->addProperty("sourceTree", "BUILT_PRODUCTS_DIR", "", kSettingsNoValue);
_fileReference.add(fileRef);
- _fileReference.flags = SettingsSingleItem;
+ _fileReference._flags = kSettingsSingleItem;
}
void XcodeProvider::addBuildFile(const std::string &id, const std::string &name, const std::string &fileRefId, const std::string &comment) {
Object *buildFile = new Object(this, id, name, "PBXBuildFile", "PBXBuildFile", comment);
- buildFile->addProperty("fileRef", fileRefId, name, SettingsNoValue);
+ buildFile->addProperty("fileRef", fileRefId, name, kSettingsNoValue);
_buildFile.add(buildFile);
- _buildFile.flags = SettingsSingleItem;
+ _buildFile._flags = kSettingsSingleItem;
}
XcodeProvider::XcodeProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version)
@@ -289,7 +289,7 @@ void XcodeProvider::createWorkspace(const BuildSetup &setup) {
createDirectory(workspace);
_projectRoot = setup.srcDir;
touchGroupsForPath(_projectRoot);
-
+
// Setup global objects
setupDefines(setup);
_targets.push_back(PROJECT_DESCRIPTION "-iOS");
@@ -341,10 +341,10 @@ void XcodeProvider::ouputMainProjectFile(const BuildSetup &setup) {
// Header
project << "// !$*UTF8*$!\n"
"{\n"
- "\t" << writeSetting("archiveVersion", "1", "", SettingsNoQuote) << ";\n"
+ "\t" << writeSetting("archiveVersion", "1", "", kSettingsNoQuote) << ";\n"
"\tclasses = {\n"
"\t};\n"
- "\t" << writeSetting("objectVersion", "46", "", SettingsNoQuote) << ";\n"
+ "\t" << writeSetting("objectVersion", "46", "", kSettingsNoQuote) << ";\n"
"\tobjects = {\n";
//////////////////////////////////////////////////////////////////////////
@@ -364,7 +364,7 @@ void XcodeProvider::ouputMainProjectFile(const BuildSetup &setup) {
//////////////////////////////////////////////////////////////////////////
// Footer
project << "\t};\n"
- "\t" << writeSetting("rootObject", getHash("PBXProject"), "Project object", SettingsNoQuote) << ";\n"
+ "\t" << writeSetting("rootObject", getHash("PBXProject"), "Project object", kSettingsNoQuote) << ";\n"
"}\n";
}
@@ -416,14 +416,14 @@ void XcodeProvider::setupCopyFilesBuildPhase() {
* (each native target has different build rules)
*/
void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
- _frameworksBuildPhase.comment = "PBXFrameworksBuildPhase";
+ _frameworksBuildPhase._comment = "PBXFrameworksBuildPhase";
// Just use a hardcoded id for the Frameworks-group
Group *frameworksGroup = new Group(this, "Frameworks", "PBXGroup_CustomTemplate_Frameworks_", "");
Property children;
- children.hasOrder = true;
- children.flags = SettingsAsList;
+ children._hasOrder = true;
+ children._flags = kSettingsAsList;
// Setup framework file properties
std::map<std::string, FileProperty> properties;
@@ -476,7 +476,7 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libfluidsynth.a", "libfluidsynth", true);
DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libglib.a", "libglib", true);
- frameworksGroup->properties["children"] = children;
+ frameworksGroup->_properties["children"] = children;
_groups.add(frameworksGroup);
// Force this to be added as a sub-group in the root.
_rootSourceGroup->addChildGroup(frameworksGroup);
@@ -489,13 +489,13 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
// ScummVM-iOS
Object *framework_iPhone = new Object(this, "PBXFrameworksBuildPhase_" + _targets[IOS_TARGET], "PBXFrameworksBuildPhase", "PBXFrameworksBuildPhase", "", "Frameworks");
- framework_iPhone->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
- framework_iPhone->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
+ framework_iPhone->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
+ framework_iPhone->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
// List of frameworks
Property iOS_files;
- iOS_files.hasOrder = true;
- iOS_files.flags = SettingsAsList;
+ iOS_files._hasOrder = true;
+ iOS_files._flags = kSettingsAsList;
ValueList frameworks_iOS;
frameworks_iOS.push_back("CoreAudio.framework");
@@ -539,7 +539,7 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]);
}
- framework_iPhone->properties["files"] = iOS_files;
+ framework_iPhone->_properties["files"] = iOS_files;
_frameworksBuildPhase.add(framework_iPhone);
@@ -547,13 +547,13 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
// ScummVM-OS X
Object *framework_OSX = new Object(this, "PBXFrameworksBuildPhase_" + _targets[OSX_TARGET], "PBXFrameworksBuildPhase", "PBXFrameworksBuildPhase", "", "Frameworks");
- framework_OSX->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
- framework_OSX->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
+ framework_OSX->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
+ framework_OSX->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
// List of frameworks
Property osx_files;
- osx_files.hasOrder = true;
- osx_files.flags = SettingsAsList;
+ osx_files._hasOrder = true;
+ osx_files._flags = kSettingsAsList;
ValueList frameworks_osx;
frameworks_osx.push_back("CoreFoundation.framework");
@@ -581,13 +581,13 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) {
ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]);
}
- framework_OSX->properties["files"] = osx_files;
+ framework_OSX->_properties["files"] = osx_files;
_frameworksBuildPhase.add(framework_OSX);
}
void XcodeProvider::setupNativeTarget() {
- _nativeTarget.comment = "PBXNativeTarget";
+ _nativeTarget._comment = "PBXNativeTarget";
// Just use a hardcoded id for the Products-group
Group *productsGroup = new Group(this, "Products", "PBXGroup_CustomTemplate_Products_" , "");
@@ -595,26 +595,26 @@ void XcodeProvider::setupNativeTarget() {
for (unsigned int i = 0; i < _targets.size(); i++) {
Object *target = new Object(this, "PBXNativeTarget_" + _targets[i], "PBXNativeTarget", "PBXNativeTarget", "", _targets[i]);
- target->addProperty("buildConfigurationList", getHash("XCConfigurationList_" + _targets[i]), "Build configuration list for PBXNativeTarget \"" + _targets[i] + "\"", SettingsNoValue);
+ target->addProperty("buildConfigurationList", getHash("XCConfigurationList_" + _targets[i]), "Build configuration list for PBXNativeTarget \"" + _targets[i] + "\"", kSettingsNoValue);
Property buildPhases;
- buildPhases.hasOrder = true;
- buildPhases.flags = SettingsAsList;
- buildPhases.settings[getHash("PBXResourcesBuildPhase_" + _targets[i])] = Setting("", "Resources", SettingsNoValue, 0, 0);
- buildPhases.settings[getHash("PBXSourcesBuildPhase_" + _targets[i])] = Setting("", "Sources", SettingsNoValue, 0, 1);
- buildPhases.settings[getHash("PBXFrameworksBuildPhase_" + _targets[i])] = Setting("", "Frameworks", SettingsNoValue, 0, 2);
- target->properties["buildPhases"] = buildPhases;
+ buildPhases._hasOrder = true;
+ buildPhases._flags = kSettingsAsList;
+ buildPhases._settings[getHash("PBXResourcesBuildPhase_" + _targets[i])] = Setting("", "Resources", kSettingsNoValue, 0, 0);
+ buildPhases._settings[getHash("PBXSourcesBuildPhase_" + _targets[i])] = Setting("", "Sources", kSettingsNoValue, 0, 1);
+ buildPhases._settings[getHash("PBXFrameworksBuildPhase_" + _targets[i])] = Setting("", "Frameworks", kSettingsNoValue, 0, 2);
+ target->_properties["buildPhases"] = buildPhases;
- target->addProperty("buildRules", "", "", SettingsNoValue|SettingsAsList);
+ target->addProperty("buildRules", "", "", kSettingsNoValue | kSettingsAsList);
- target->addProperty("dependencies", "", "", SettingsNoValue|SettingsAsList);
+ target->addProperty("dependencies", "", "", kSettingsNoValue | kSettingsAsList);
- target->addProperty("name", _targets[i], "", SettingsNoValue|SettingsQuoteVariable);
- target->addProperty("productName", PROJECT_NAME, "", SettingsNoValue);
+ target->addProperty("name", _targets[i], "", kSettingsNoValue | kSettingsQuoteVariable);
+ target->addProperty("productName", PROJECT_NAME, "", kSettingsNoValue);
addProductFileReference("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i], PROJECT_DESCRIPTION ".app");
productsGroup->addChildByHash(getHash("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i]), PROJECT_DESCRIPTION ".app");
- target->addProperty("productReference", getHash("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i]), PROJECT_DESCRIPTION ".app", SettingsNoValue);
- target->addProperty("productType", "com.apple.product-type.application", "", SettingsNoValue|SettingsQuoteVariable);
+ target->addProperty("productReference", getHash("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i]), PROJECT_DESCRIPTION ".app", kSettingsNoValue);
+ target->addProperty("productType", "com.apple.product-type.application", "", kSettingsNoValue | kSettingsQuoteVariable);
_nativeTarget.add(target);
}
@@ -623,38 +623,38 @@ void XcodeProvider::setupNativeTarget() {
}
void XcodeProvider::setupProject() {
- _project.comment = "PBXProject";
+ _project._comment = "PBXProject";
Object *project = new Object(this, "PBXProject", "PBXProject", "PBXProject", "", "Project object");
- project->addProperty("buildConfigurationList", getHash("XCConfigurationList_scummvm"), "Build configuration list for PBXProject \"" PROJECT_NAME "\"", SettingsNoValue);
- project->addProperty("compatibilityVersion", "Xcode 3.2", "", SettingsNoValue|SettingsQuoteVariable);
- project->addProperty("developmentRegion", "English", "", SettingsNoValue);
- project->addProperty("hasScannedForEncodings", "1", "", SettingsNoValue);
+ project->addProperty("buildConfigurationList", getHash("XCConfigurationList_scummvm"), "Build configuration list for PBXProject \"" PROJECT_NAME "\"", kSettingsNoValue);
+ project->addProperty("compatibilityVersion", "Xcode 3.2", "", kSettingsNoValue | kSettingsQuoteVariable);
+ project->addProperty("developmentRegion", "English", "", kSettingsNoValue);
+ project->addProperty("hasScannedForEncodings", "1", "", kSettingsNoValue);
// List of known regions
Property regions;
- regions.flags = SettingsAsList;
+ regions._flags = kSettingsAsList;
ADD_SETTING_ORDER_NOVALUE(regions, "English", "", 0);
ADD_SETTING_ORDER_NOVALUE(regions, "Japanese", "", 1);
ADD_SETTING_ORDER_NOVALUE(regions, "French", "", 2);
ADD_SETTING_ORDER_NOVALUE(regions, "German", "", 3);
- project->properties["knownRegions"] = regions;
+ project->_properties["knownRegions"] = regions;
- project->addProperty("mainGroup", _rootSourceGroup->getHashRef(), "CustomTemplate", SettingsNoValue);
- project->addProperty("productRefGroup", getHash("PBXGroup_CustomTemplate_Products_"), "" , SettingsNoValue);
- project->addProperty("projectDirPath", _projectRoot, "", SettingsNoValue|SettingsQuoteVariable);
- project->addProperty("projectRoot", "", "", SettingsNoValue|SettingsQuoteVariable);
+ project->addProperty("mainGroup", _rootSourceGroup->getHashRef(), "CustomTemplate", kSettingsNoValue);
+ project->addProperty("productRefGroup", getHash("PBXGroup_CustomTemplate_Products_"), "" , kSettingsNoValue);
+ project->addProperty("projectDirPath", _projectRoot, "", kSettingsNoValue | kSettingsQuoteVariable);
+ project->addProperty("projectRoot", "", "", kSettingsNoValue | kSettingsQuoteVariable);
// List of targets
Property targets;
- targets.flags = SettingsAsList;
- targets.settings[getHash("PBXNativeTarget_" + _targets[IOS_TARGET])] = Setting("", _targets[IOS_TARGET], SettingsNoValue, 0, 0);
- targets.settings[getHash("PBXNativeTarget_" + _targets[OSX_TARGET])] = Setting("", _targets[OSX_TARGET], SettingsNoValue, 0, 1);
- project->properties["targets"] = targets;
+ targets._flags = kSettingsAsList;
+ targets._settings[getHash("PBXNativeTarget_" + _targets[IOS_TARGET])] = Setting("", _targets[IOS_TARGET], kSettingsNoValue, 0, 0);
+ targets._settings[getHash("PBXNativeTarget_" + _targets[OSX_TARGET])] = Setting("", _targets[OSX_TARGET], kSettingsNoValue, 0, 1);
+ project->_properties["targets"] = targets;
// Force list even when there is only a single target
- project->properties["targets"].flags |= SettingsSingleItem;
+ project->_properties["targets"]._flags |= kSettingsSingleItem;
_project.add(project);
}
@@ -684,7 +684,7 @@ XcodeProvider::ValueList& XcodeProvider::getResourceFiles() const {
}
void XcodeProvider::setupResourcesBuildPhase() {
- _resourcesBuildPhase.comment = "PBXResourcesBuildPhase";
+ _resourcesBuildPhase._comment = "PBXResourcesBuildPhase";
ValueList &files_list = getResourceFiles();
@@ -692,12 +692,12 @@ void XcodeProvider::setupResourcesBuildPhase() {
for (unsigned int i = 0; i < _targets.size(); i++) {
Object *resource = new Object(this, "PBXResourcesBuildPhase_" + _targets[i], "PBXResourcesBuildPhase", "PBXResourcesBuildPhase", "", "Resources");
- resource->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
+ resource->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
// Add default files
Property files;
- files.hasOrder = true;
- files.flags = SettingsAsList;
+ files._hasOrder = true;
+ files._flags = kSettingsAsList;
int order = 0;
for (ValueList::iterator file = files_list.begin(); file != files_list.end(); file++) {
@@ -712,46 +712,46 @@ void XcodeProvider::setupResourcesBuildPhase() {
ADD_SETTING_ORDER_NOVALUE(files, getHash(resourceAbsolutePath), comment, order++);
}
- resource->properties["files"] = files;
+ resource->_properties["files"] = files;
- resource->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
+ resource->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
_resourcesBuildPhase.add(resource);
}
}
void XcodeProvider::setupSourcesBuildPhase() {
- _sourcesBuildPhase.comment = "PBXSourcesBuildPhase";
+ _sourcesBuildPhase._comment = "PBXSourcesBuildPhase";
// Same as for containers: a rule for each native target
for (unsigned int i = 0; i < _targets.size(); i++) {
const std::string &targetName = _targets[i];
Object *source = new Object(this, "PBXSourcesBuildPhase_" + _targets[i], "PBXSourcesBuildPhase", "PBXSourcesBuildPhase", "", "Sources");
- source->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
+ source->addProperty("buildActionMask", "2147483647", "", kSettingsNoValue);
Property files;
- files.hasOrder = true;
- files.flags = SettingsAsList;
+ files._hasOrder = true;
+ files._flags = kSettingsAsList;
int order = 0;
- for (std::vector<Object*>::iterator file = _buildFile.objects.begin(); file !=_buildFile.objects.end(); ++file) {
- const std::string &fileName = (*file)->name;
- if (shouldSkipFileForTarget((*file)->id, targetName, fileName)) {
+ for (std::vector<Object *>::iterator file = _buildFile._objects.begin(); file != _buildFile._objects.end(); ++file) {
+ const std::string &fileName = (*file)->_name;
+ if (shouldSkipFileForTarget((*file)->_id, targetName, fileName)) {
continue;
}
if (!producesObjectFileOnOSX(fileName)) {
continue;
}
std::string comment = fileName + " in Sources";
- ADD_SETTING_ORDER_NOVALUE(files, getHash((*file)->id), comment, order++);
+ ADD_SETTING_ORDER_NOVALUE(files, getHash((*file)->_id), comment, order++);
}
setupAdditionalSources(targetName, files, order);
- source->properties["files"] = files;
+ source->_properties["files"] = files;
- source->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
+ source->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue);
_sourcesBuildPhase.add(source);
}
@@ -760,8 +760,8 @@ void XcodeProvider::setupSourcesBuildPhase() {
// Setup all build configurations
void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
- _buildConfiguration.comment = "XCBuildConfiguration";
- _buildConfiguration.flags = SettingsAsList;
+ _buildConfiguration._comment = "XCBuildConfiguration";
+ _buildConfiguration._flags = kSettingsAsList;
std::string projectOutputDirectory;
#ifdef POSIX
@@ -792,7 +792,7 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
REMOVE_DEFINE(scummvm_defines, "IPHONE");
REMOVE_DEFINE(scummvm_defines, "IPHONE_OFFICIAL");
REMOVE_DEFINE(scummvm_defines, "SDL_BACKEND");
- ADD_SETTING_LIST(scummvm_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, SettingsNoQuote|SettingsAsList, 5);
+ ADD_SETTING_LIST(scummvm_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, kSettingsNoQuote | kSettingsAsList, 5);
ADD_SETTING(scummvm_Debug, "GCC_THUMB_SUPPORT", "NO");
ADD_SETTING(scummvm_Debug, "GCC_USE_GCC3_PFE_SUPPORT", "NO");
ADD_SETTING(scummvm_Debug, "GCC_WARN_ABOUT_RETURN_TYPE", "YES");
@@ -801,7 +801,7 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
scummvm_HeaderPaths.push_back("include/");
scummvm_HeaderPaths.push_back("$(SRCROOT)/engines/");
scummvm_HeaderPaths.push_back("$(SRCROOT)");
- ADD_SETTING_LIST(scummvm_Debug, "HEADER_SEARCH_PATHS", scummvm_HeaderPaths, SettingsQuoteVariable|SettingsAsList, 5);
+ ADD_SETTING_LIST(scummvm_Debug, "HEADER_SEARCH_PATHS", scummvm_HeaderPaths, kSettingsQuoteVariable | kSettingsAsList, 5);
ADD_SETTING_QUOTE(scummvm_Debug, "LIBRARY_SEARCH_PATHS", "");
ADD_SETTING(scummvm_Debug, "ONLY_ACTIVE_ARCH", "YES");
ADD_SETTING_QUOTE(scummvm_Debug, "OTHER_CFLAGS", "");
@@ -809,8 +809,8 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
ADD_SETTING(scummvm_Debug, "PREBINDING", "NO");
ADD_SETTING(scummvm_Debug, "ENABLE_TESTABILITY", "YES");
- scummvm_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
- scummvm_Debug_Object->properties["buildSettings"] = scummvm_Debug;
+ scummvm_Debug_Object->addProperty("name", "Debug", "", kSettingsNoValue);
+ scummvm_Debug_Object->_properties["buildSettings"] = scummvm_Debug;
// Release
Object *scummvm_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_NAME "_Release", PROJECT_NAME, "XCBuildConfiguration", "PBXProject", "Release");
@@ -821,8 +821,8 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
REMOVE_SETTING(scummvm_Release, "ONLY_ACTIVE_ARCH");
REMOVE_SETTING(scummvm_Release, "ENABLE_TESTABILITY");
- scummvm_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
- scummvm_Release_Object->properties["buildSettings"] = scummvm_Release;
+ scummvm_Release_Object->addProperty("name", "Release", "", kSettingsNoValue);
+ scummvm_Release_Object->_properties["buildSettings"] = scummvm_Release;
_buildConfiguration.add(scummvm_Debug_Object);
_buildConfiguration.add(scummvm_Release_Object);
@@ -842,7 +842,7 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
ValueList iPhone_FrameworkSearchPaths;
iPhone_FrameworkSearchPaths.push_back("$(inherited)");
iPhone_FrameworkSearchPaths.push_back("\"$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"");
- ADD_SETTING_LIST(iPhone_Debug, "FRAMEWORK_SEARCH_PATHS", iPhone_FrameworkSearchPaths, SettingsAsList, 5);
+ ADD_SETTING_LIST(iPhone_Debug, "FRAMEWORK_SEARCH_PATHS", iPhone_FrameworkSearchPaths, kSettingsAsList, 5);
ADD_SETTING(iPhone_Debug, "GCC_DYNAMIC_NO_PIC", "NO");
ADD_SETTING(iPhone_Debug, "GCC_ENABLE_CPP_EXCEPTIONS", "NO");
ADD_SETTING(iPhone_Debug, "GCC_ENABLE_FIX_AND_CONTINUE", "NO");
@@ -858,12 +858,12 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
iPhone_HeaderSearchPaths.push_back("$(SRCROOT)");
iPhone_HeaderSearchPaths.push_back("\"" + projectOutputDirectory + "\"");
iPhone_HeaderSearchPaths.push_back("\"" + projectOutputDirectory + "/include\"");
- ADD_SETTING_LIST(iPhone_Debug, "HEADER_SEARCH_PATHS", iPhone_HeaderSearchPaths, SettingsAsList|SettingsQuoteVariable, 5);
+ ADD_SETTING_LIST(iPhone_Debug, "HEADER_SEARCH_PATHS", iPhone_HeaderSearchPaths, kSettingsAsList | kSettingsQuoteVariable, 5);
ADD_SETTING_QUOTE(iPhone_Debug, "INFOPLIST_FILE", "$(SRCROOT)/dists/ios7/Info.plist");
ValueList iPhone_LibPaths;
iPhone_LibPaths.push_back("$(inherited)");
iPhone_LibPaths.push_back("\"" + projectOutputDirectory + "/lib\"");
- ADD_SETTING_LIST(iPhone_Debug, "LIBRARY_SEARCH_PATHS", iPhone_LibPaths, SettingsAsList, 5);
+ ADD_SETTING_LIST(iPhone_Debug, "LIBRARY_SEARCH_PATHS", iPhone_LibPaths, kSettingsAsList, 5);
ADD_SETTING(iPhone_Debug, "ONLY_ACTIVE_ARCH", "YES");
ADD_SETTING(iPhone_Debug, "PREBINDING", "NO");
ADD_SETTING(iPhone_Debug, "PRODUCT_NAME", PROJECT_NAME);
@@ -877,12 +877,12 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
ADD_DEFINE(scummvmIOS_defines, "\"$(inherited)\"");
ADD_DEFINE(scummvmIOS_defines, "IPHONE");
ADD_DEFINE(scummvmIOS_defines, "IPHONE_OFFICIAL");
- ADD_SETTING_LIST(iPhone_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmIOS_defines, SettingsNoQuote|SettingsAsList, 5);
+ ADD_SETTING_LIST(iPhone_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmIOS_defines, kSettingsNoQuote | kSettingsAsList, 5);
ADD_SETTING(iPhone_Debug, "ASSETCATALOG_COMPILER_APPICON_NAME", "AppIcon");
ADD_SETTING(iPhone_Debug, "ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME", "LaunchImage");
- iPhone_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
- iPhone_Debug_Object->properties["buildSettings"] = iPhone_Debug;
+ iPhone_Debug_Object->addProperty("name", "Debug", "", kSettingsNoValue);
+ iPhone_Debug_Object->_properties["buildSettings"] = iPhone_Debug;
// Release
Object *iPhone_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Release", _targets[IOS_TARGET] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Release");
@@ -894,8 +894,8 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
REMOVE_SETTING(iPhone_Release, "DEBUG_INFORMATION_FORMAT");
ADD_SETTING_QUOTE(iPhone_Release, "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym");
- iPhone_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
- iPhone_Release_Object->properties["buildSettings"] = iPhone_Release;
+ iPhone_Release_Object->addProperty("name", "Release", "", kSettingsNoValue);
+ iPhone_Release_Object->_properties["buildSettings"] = iPhone_Release;
_buildConfiguration.add(iPhone_Debug_Object);
_buildConfiguration.add(iPhone_Release_Object);
@@ -925,7 +925,7 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
ADD_DEFINE(scummvmOSX_defines, "\"$(inherited)\"");
ADD_DEFINE(scummvmOSX_defines, "SDL_BACKEND");
ADD_DEFINE(scummvmOSX_defines, "MACOSX");
- ADD_SETTING_LIST(scummvmOSX_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmOSX_defines, SettingsNoQuote|SettingsAsList, 5);
+ ADD_SETTING_LIST(scummvmOSX_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmOSX_defines, kSettingsNoQuote | kSettingsAsList, 5);
ADD_SETTING_QUOTE(scummvmOSX_Debug, "GCC_VERSION", "");
ValueList scummvmOSX_HeaderPaths;
scummvmOSX_HeaderPaths.push_back("/opt/local/include/SDL");
@@ -934,14 +934,14 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
scummvmOSX_HeaderPaths.push_back("include/");
scummvmOSX_HeaderPaths.push_back("$(SRCROOT)/engines/");
scummvmOSX_HeaderPaths.push_back("$(SRCROOT)");
- ADD_SETTING_LIST(scummvmOSX_Debug, "HEADER_SEARCH_PATHS", scummvmOSX_HeaderPaths, SettingsQuoteVariable|SettingsAsList, 5);
+ ADD_SETTING_LIST(scummvmOSX_Debug, "HEADER_SEARCH_PATHS", scummvmOSX_HeaderPaths, kSettingsQuoteVariable | kSettingsAsList, 5);
ADD_SETTING_QUOTE(scummvmOSX_Debug, "INFOPLIST_FILE", "$(SRCROOT)/dists/macosx/Info.plist");
ValueList scummvmOSX_LibPaths;
scummvmOSX_LibPaths.push_back("/sw/lib");
scummvmOSX_LibPaths.push_back("/opt/local/lib");
scummvmOSX_LibPaths.push_back("\"$(inherited)\"");
scummvmOSX_LibPaths.push_back("\"\\\\\\\"$(SRCROOT)/lib\\\\\\\"\""); // mmmh, all those slashes, it's almost Christmas \o/
- ADD_SETTING_LIST(scummvmOSX_Debug, "LIBRARY_SEARCH_PATHS", scummvmOSX_LibPaths, SettingsNoQuote|SettingsAsList, 5);
+ ADD_SETTING_LIST(scummvmOSX_Debug, "LIBRARY_SEARCH_PATHS", scummvmOSX_LibPaths, kSettingsNoQuote | kSettingsAsList, 5);
ADD_SETTING_QUOTE(scummvmOSX_Debug, "OTHER_CFLAGS", "");
ValueList scummvmOSX_LdFlags;
scummvmOSX_LdFlags.push_back("-lSDLmain");
@@ -956,12 +956,12 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
scummvmOSX_LdFlags.push_back("-lFLAC");
scummvmOSX_LdFlags.push_back("-lSDL");
scummvmOSX_LdFlags.push_back("-lz");
- ADD_SETTING_LIST(scummvmOSX_Debug, "OTHER_LDFLAGS", scummvmOSX_LdFlags, SettingsAsList, 5);
+ ADD_SETTING_LIST(scummvmOSX_Debug, "OTHER_LDFLAGS", scummvmOSX_LdFlags, kSettingsAsList, 5);
ADD_SETTING(scummvmOSX_Debug, "PREBINDING", "NO");
ADD_SETTING(scummvmOSX_Debug, "PRODUCT_NAME", PROJECT_NAME);
- scummvmOSX_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
- scummvmOSX_Debug_Object->properties["buildSettings"] = scummvmOSX_Debug;
+ scummvmOSX_Debug_Object->addProperty("name", "Debug", "", kSettingsNoValue);
+ scummvmOSX_Debug_Object->_properties["buildSettings"] = scummvmOSX_Debug;
// Release
Object *scummvmOSX_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-OSX_Release", _targets[OSX_TARGET] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Release");
@@ -973,27 +973,27 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
REMOVE_SETTING(scummvmOSX_Release, "DEBUG_INFORMATION_FORMAT");
ADD_SETTING_QUOTE(scummvmOSX_Release, "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym");
- scummvmOSX_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
- scummvmOSX_Release_Object->properties["buildSettings"] = scummvmOSX_Release;
+ scummvmOSX_Release_Object->addProperty("name", "Release", "", kSettingsNoValue);
+ scummvmOSX_Release_Object->_properties["buildSettings"] = scummvmOSX_Release;
_buildConfiguration.add(scummvmOSX_Debug_Object);
_buildConfiguration.add(scummvmOSX_Release_Object);
// Warning: This assumes we have all configurations with a Debug & Release pair
- for (std::vector<Object *>::iterator config = _buildConfiguration.objects.begin(); config != _buildConfiguration.objects.end(); config++) {
+ for (std::vector<Object *>::iterator config = _buildConfiguration._objects.begin(); config != _buildConfiguration._objects.end(); config++) {
- Object *configList = new Object(this, "XCConfigurationList_" + (*config)->name, (*config)->name, "XCConfigurationList", "", "Build configuration list for " + (*config)->refType + " \"" + (*config)->name + "\"");
+ Object *configList = new Object(this, "XCConfigurationList_" + (*config)->_name, (*config)->_name, "XCConfigurationList", "", "Build configuration list for " + (*config)->_refType + " \"" + (*config)->_name + "\"");
Property buildConfigs;
- buildConfigs.flags = SettingsAsList;
+ buildConfigs._flags = kSettingsAsList;
- buildConfigs.settings[getHash((*config)->id)] = Setting("", "Debug", SettingsNoValue, 0, 0);
- buildConfigs.settings[getHash((*(++config))->id)] = Setting("", "Release", SettingsNoValue, 0, 1);
+ buildConfigs._settings[getHash((*config)->_id)] = Setting("", "Debug", kSettingsNoValue, 0, 0);
+ buildConfigs._settings[getHash((*(++config))->_id)] = Setting("", "Release", kSettingsNoValue, 0, 1);
- configList->properties["buildConfigurations"] = buildConfigs;
+ configList->_properties["buildConfigurations"] = buildConfigs;
- configList->addProperty("defaultConfigurationIsVisible", "0", "", SettingsNoValue);
- configList->addProperty("defaultConfigurationName", "Release", "", SettingsNoValue);
+ configList->addProperty("defaultConfigurationIsVisible", "0", "", kSettingsNoValue);
+ configList->addProperty("defaultConfigurationName", "Release", "", kSettingsNoValue);
_configurationList.add(configList);
}
@@ -1023,7 +1023,7 @@ void XcodeProvider::setupAdditionalSources(std::string targetName, Property &fil
void XcodeProvider::setupDefines(const BuildSetup &setup) {
for (StringList::const_iterator i = setup.defines.begin(); i != setup.defines.end(); ++i) {
- if (*i == "HAVE_NASM") // Not supported on Mac (TODO: change how it's handled in main class or add it only in MSVC/CodeBlocks providers?)
+ if (*i == "HAVE_NASM") // Not supported on Mac (TODO: change how it's handled in main class or add it only in MSVC/CodeBlocks providers?)
continue;
ADD_DEFINE(_defines, *i);
@@ -1066,7 +1066,7 @@ std::string XcodeProvider::getHash(std::string key) {
#endif
}
-bool isSeparator (char s) { return (s == '-'); }
+bool isSeparator(char s) { return (s == '-'); }
#ifdef MACOSX
std::string XcodeProvider::md5(std::string key) {
@@ -1102,10 +1102,10 @@ std::string replace(std::string input, const std::string find, std::string repla
std::string::size_type findLen = find.length();
std::string::size_type replaceLen = replaceStr.length();
- if (findLen == 0 )
+ if (findLen == 0)
return input;
- for (;(pos = input.find(find, pos)) != std::string::npos;) {
+ for (; (pos = input.find(find, pos)) != std::string::npos;) {
input.replace(pos, findLen, replaceStr);
pos += replaceLen;
}
@@ -1116,30 +1116,30 @@ std::string replace(std::string input, const std::string find, std::string repla
std::string XcodeProvider::writeProperty(const std::string &variable, Property &prop, int flags) const {
std::string output;
- output += (flags & SettingsSingleItem ? "" : "\t\t\t") + variable + " = ";
+ output += (flags & kSettingsSingleItem ? "" : "\t\t\t") + variable + " = ";
- if (prop.settings.size() > 1 || (prop.flags & SettingsSingleItem))
- output += (prop.flags & SettingsAsList) ? "(\n" : "{\n";
+ if (prop._settings.size() > 1 || (prop._flags & kSettingsSingleItem))
+ output += (prop._flags & kSettingsAsList) ? "(\n" : "{\n";
OrderedSettingList settings = prop.getOrderedSettingList();
for (OrderedSettingList::const_iterator setting = settings.begin(); setting != settings.end(); ++setting) {
- if (settings.size() > 1 || (prop.flags & SettingsSingleItem))
- output += (flags & SettingsSingleItem ? " " : "\t\t\t\t");
+ if (settings.size() > 1 || (prop._flags & kSettingsSingleItem))
+ output += (flags & kSettingsSingleItem ? " " : "\t\t\t\t");
output += writeSetting((*setting).first, (*setting).second);
- // The combination of SettingsAsList, and SettingsSingleItem should use "," and not ";" (i.e children
+ // The combination of SettingsAsList, and kSettingsSingleItem should use "," and not ";" (i.e children
// in PBXGroup, so we special case that case here.
- if ((prop.flags & SettingsAsList) && (prop.settings.size() > 1 || (prop.flags & SettingsSingleItem))) {
- output += (prop.settings.size() > 0) ? ",\n" : "\n";
+ if ((prop._flags & kSettingsAsList) && (prop._settings.size() > 1 || (prop._flags & kSettingsSingleItem))) {
+ output += (prop._settings.size() > 0) ? ",\n" : "\n";
} else {
output += ";";
- output += (flags & SettingsSingleItem ? " " : "\n");
+ output += (flags & kSettingsSingleItem ? " " : "\n");
}
}
- if (prop.settings.size() > 1 || (prop.flags & SettingsSingleItem))
- output += (prop.flags & SettingsAsList) ? "\t\t\t);\n" : "\t\t\t};\n";
+ if (prop._settings.size() > 1 || (prop._flags & kSettingsSingleItem))
+ output += (prop._flags & kSettingsAsList) ? "\t\t\t);\n" : "\t\t\t};\n";
return output;
}
@@ -1152,32 +1152,31 @@ std::string XcodeProvider::writeSetting(const std::string &variable, std::string
// XCode project generator pbuilder_pbx.cpp, writeSettings() (under LGPL 2.1)
std::string XcodeProvider::writeSetting(const std::string &variable, const Setting &setting) const {
std::string output;
- const std::string quote = (setting.flags & SettingsNoQuote) ? "" : "\"";
+ const std::string quote = (setting._flags & kSettingsNoQuote) ? "" : "\"";
const std::string escape_quote = quote.empty() ? "" : "\\" + quote;
std::string newline = "\n";
// Get indent level
- for (int i = 0; i < setting.indent; ++i)
+ for (int i = 0; i < setting._indent; ++i)
newline += "\t";
// Setup variable
- std::string var = (setting.flags & SettingsQuoteVariable) ? "\"" + variable + "\"" : variable;
+ std::string var = (setting._flags & kSettingsQuoteVariable) ? "\"" + variable + "\"" : variable;
// Output a list
- if (setting.flags & SettingsAsList) {
-
- output += var + ((setting.flags & SettingsNoValue) ? "(" : " = (") + newline;
+ if (setting._flags & kSettingsAsList) {
+ output += var + ((setting._flags & kSettingsNoValue) ? "(" : " = (") + newline;
- for (unsigned int i = 0, count = 0; i < setting.entries.size(); ++i) {
+ for (unsigned int i = 0, count = 0; i < setting._entries.size(); ++i) {
- std::string value = setting.entries.at(i).value;
+ std::string value = setting._entries.at(i)._value;
if (!value.empty()) {
if (count++ > 0)
output += "," + newline;
output += quote + replace(value, quote, escape_quote) + quote;
- std::string comment = setting.entries.at(i).comment;
+ std::string comment = setting._entries.at(i)._comment;
if (!comment.empty())
output += " /* " + comment + " */";
}
@@ -1185,24 +1184,24 @@ std::string XcodeProvider::writeSetting(const std::string &variable, const Setti
}
// Add closing ")" on new line
newline.resize(newline.size() - 1);
- output += (setting.flags & SettingsNoValue) ? "\t\t\t)" : "," + newline + ")";
+ output += (setting._flags & kSettingsNoValue) ? "\t\t\t)" : "," + newline + ")";
} else {
output += var;
- output += (setting.flags & SettingsNoValue) ? "" : " = " + quote;
+ output += (setting._flags & kSettingsNoValue) ? "" : " = " + quote;
- for(unsigned int i = 0; i < setting.entries.size(); ++i) {
- std::string value = setting.entries.at(i).value;
- if(i)
+ for (unsigned int i = 0; i < setting._entries.size(); ++i) {
+ std::string value = setting._entries.at(i)._value;
+ if (i)
output += " ";
output += value;
- std::string comment = setting.entries.at(i).comment;
+ std::string comment = setting._entries.at(i)._comment;
if (!comment.empty())
output += " /* " + comment + " */";
}
- output += (setting.flags & SettingsNoValue) ? "" : quote;
+ output += (setting._flags & kSettingsNoValue) ? "" : quote;
}
return output;
}
diff --git a/devtools/create_project/xcode.h b/devtools/create_project/xcode.h
index c97e31064b..698b02e651 100644
--- a/devtools/create_project/xcode.h
+++ b/devtools/create_project/xcode.h
@@ -49,24 +49,23 @@ protected:
const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix);
private:
enum {
- SettingsAsList = 0x01,
- SettingsSingleItem = 0x02,
- SettingsNoQuote = 0x04,
- SettingsQuoteVariable = 0x08,
- SettingsNoValue = 0x10
+ kSettingsAsList = 0x01,
+ kSettingsSingleItem = 0x02,
+ kSettingsNoQuote = 0x04,
+ kSettingsQuoteVariable = 0x08,
+ kSettingsNoValue = 0x10
};
// File properties
struct FileProperty {
- std::string fileEncoding;
- std::string lastKnownFileType;
- std::string fileName;
- std::string filePath;
- std::string sourceTree;
-
- FileProperty(std::string fileType = "", std::string name = "", std::string path = "", std::string source = "") :
- fileEncoding(""), lastKnownFileType(fileType), fileName(name), filePath(path), sourceTree(source)
- {
+ std::string _fileEncoding;
+ std::string _lastKnownFileType;
+ std::string _fileName;
+ std::string _filePath;
+ std::string _sourceTree;
+
+ FileProperty(std::string fileType = "", std::string name = "", std::string path = "", std::string source = "")
+ : _fileEncoding(""), _lastKnownFileType(fileType), _fileName(name), _filePath(path), _sourceTree(source) {
}
};
@@ -75,33 +74,33 @@ private:
typedef std::vector<std::string> ValueList;
struct Entry {
- std::string value;
- std::string comment;
+ std::string _value;
+ std::string _comment;
- Entry(std::string val, std::string cmt) : value(val), comment(cmt) {}
+ Entry(std::string val, std::string cmt) : _value(val), _comment(cmt) {}
};
typedef std::vector<Entry> EntryList;
struct Setting {
- EntryList entries;
- int flags;
- int indent;
- int order;
+ EntryList _entries;
+ int _flags;
+ int _indent;
+ int _order;
- explicit Setting(std::string value = "", std::string comment = "", int flgs = 0, int idt = 0, int ord = -1) : flags(flgs), indent(idt), order(ord) {
- entries.push_back(Entry(value, comment));
+ Setting(std::string value = "", std::string comment = "", int flgs = 0, int idt = 0, int ord = -1) : _flags(flgs), _indent(idt), _order(ord) {
+ _entries.push_back(Entry(value, comment));
}
- explicit Setting(ValueList values, int flgs = 0, int idt = 0, int ord = -1) : flags(flgs), indent(idt), order(ord) {
+ Setting(ValueList values, int flgs = 0, int idt = 0, int ord = -1) : _flags(flgs), _indent(idt), _order(ord) {
for (unsigned int i = 0; i < values.size(); i++)
- entries.push_back(Entry(values[i], ""));
+ _entries.push_back(Entry(values[i], ""));
}
- explicit Setting(EntryList ents, int flgs = 0, int idt = 0, int ord = -1) : entries(ents), flags(flgs), indent(idt), order(ord) {}
+ Setting(EntryList ents, int flgs = 0, int idt = 0, int ord = -1) : _entries(ents), _flags(flgs), _indent(idt), _order(ord) {}
void addEntry(std::string value, std::string comment = "") {
- entries.push_back(Entry(value, comment));
+ _entries.push_back(Entry(value, comment));
}
};
@@ -109,46 +108,36 @@ private:
typedef std::pair<std::string, Setting> SettingPair;
typedef std::vector<SettingPair> OrderedSettingList;
- static bool OrderSortPredicate(const SettingPair& s1, const SettingPair& s2) {
- return s1.second.order < s2.second.order;
+ static bool OrderSortPredicate(const SettingPair &s1, const SettingPair &s2) {
+ return s1.second._order < s2.second._order;
}
struct Property {
public:
- SettingList settings;
- int flags;
- bool hasOrder;
+ SettingList _settings;
+ int _flags;
+ bool _hasOrder;
- Property() : flags(0), hasOrder(false) {}
+ Property() : _flags(0), _hasOrder(false) {}
// Constructs a simple Property
- explicit Property(std::string name, std::string value = "", std::string comment = "", int flgs = 0, int indent = 0, bool order = false) : flags(flgs), hasOrder(order) {
- Setting setting(value, comment, flags, indent);
-
- settings[name] = setting;
+ Property(std::string name, std::string value = "", std::string comment = "", int flgs = 0, int indent = 0, bool order = false) : _flags(flgs), _hasOrder(order) {
+ _settings[name] = Setting(value, comment, _flags, indent);
}
- Property(std::string name, ValueList values, int flgs = 0, int indent = 0, bool order = false) : flags(flgs), hasOrder(order) {
- Setting setting(values, flags, indent);
-
- settings[name] = setting;
- }
-
- // Copy constructor
- Property(const Property &rhs) {
- settings = rhs.settings;
- flags = rhs.flags;
+ Property(std::string name, ValueList values, int flgs = 0, int indent = 0, bool order = false) : _flags(flgs), _hasOrder(order) {
+ _settings[name] = Setting(values, _flags, indent);
}
OrderedSettingList getOrderedSettingList() {
OrderedSettingList list;
// Prepare vector to sort
- for (SettingList::const_iterator setting = settings.begin(); setting != settings.end(); ++setting)
+ for (SettingList::const_iterator setting = _settings.begin(); setting != _settings.end(); ++setting)
list.push_back(SettingPair(setting->first, setting->second));
// Sort vector using setting order
- if (hasOrder)
+ if (_hasOrder)
std::sort(list.begin(), list.end(), OrderSortPredicate);
return list;
@@ -162,48 +151,48 @@ private:
// be overkill since we only have to generate a single project
struct Object {
public:
- std::string id; // Unique identifier for this object
- std::string name; // Name (may not be unique - for ex. configuration entries)
- std::string refType; // Type of object this references (if any)
- std::string comment; // Main comment (empty for no comment)
+ std::string _id; // Unique identifier for this object
+ std::string _name; // Name (may not be unique - for ex. configuration entries)
+ std::string _refType; // Type of object this references (if any)
+ std::string _comment; // Main comment (empty for no comment)
- PropertyList properties; // List of object properties, including output configuration
+ PropertyList _properties; // List of object properties, including output configuration
// Constructs an object and add a default type property
Object(XcodeProvider *objectParent, std::string objectId, std::string objectName, std::string objectType, std::string objectRefType = "", std::string objectComment = "")
- : id(objectId), name(objectName), refType(objectRefType), comment(objectComment), parent(objectParent) {
+ : _id(objectId), _name(objectName), _refType(objectRefType), _comment(objectComment), _parent(objectParent) {
assert(objectParent);
assert(!objectId.empty());
assert(!objectName.empty());
assert(!objectType.empty());
- addProperty("isa", objectType, "", SettingsNoQuote|SettingsNoValue);
+ addProperty("isa", objectType, "", kSettingsNoQuote | kSettingsNoValue);
}
// Add a simple Property with just a name and a value
void addProperty(std::string propName, std::string propValue, std::string propComment = "", int propFlags = 0, int propIndent = 0) {
- properties[propName] = Property(propValue, "", propComment, propFlags, propIndent);
+ _properties[propName] = Property(propValue, "", propComment, propFlags, propIndent);
}
std::string toString(int flags = 0) {
std::string output;
- output = "\t\t" + parent->getHash(id) + (comment.empty() ? "" : " /* " + comment + " */") + " = {";
+ output = "\t\t" + _parent->getHash(_id) + (_comment.empty() ? "" : " /* " + _comment + " */") + " = {";
- if (flags & SettingsAsList)
+ if (flags & kSettingsAsList)
output += "\n";
// Special case: always output the isa property first
- output += parent->writeProperty("isa", properties["isa"], flags);
+ output += _parent->writeProperty("isa", _properties["isa"], flags);
// Write each property
- for (PropertyList::iterator property = properties.begin(); property != properties.end(); ++property) {
- if ((*property).first == "isa")
+ for (PropertyList::iterator property = _properties.begin(); property != _properties.end(); ++property) {
+ if (property->first == "isa")
continue;
- output += parent->writeProperty((*property).first, (*property).second, flags);
+ output += _parent->writeProperty(property->first, property->second, flags);
}
- if (flags & SettingsAsList)
+ if (flags & kSettingsAsList)
output += "\t\t";
output += "};\n";
@@ -211,37 +200,36 @@ private:
return output;
}
- // Slight hack, to allow Group access to parent.
+ // Slight hack, to allow Group access to parent.
protected:
- XcodeProvider *parent;
+ XcodeProvider *_parent;
private:
// Returns the type property (should always be the first in the properties map)
std::string getType() {
- assert(!properties.empty());
- assert(!properties["isa"].settings.empty());
-
- SettingList::iterator it = properties["isa"].settings.begin();
+ assert(!_properties.empty());
+ assert(!_properties["isa"]._settings.empty());
- return (*it).first;
+ SettingList::iterator it = _properties["isa"]._settings.begin();
+ return it->first;
}
};
struct ObjectList {
private:
- std::map<std::string, bool> objectMap;
+ std::map<std::string, bool> _objectMap;
public:
- std::vector<Object *> objects;
- std::string comment;
- int flags;
+ std::vector<Object *> _objects;
+ std::string _comment;
+ int _flags;
void add(Object *obj) {
- std::map<std::string, bool>::iterator it = objectMap.find(obj->id);
- if (it != objectMap.end() && it->second == true)
+ std::map<std::string, bool>::iterator it = _objectMap.find(obj->_id);
+ if (it != _objectMap.end() && it->second == true)
return;
- objects.push_back(obj);
- objectMap[obj->id] = true;
+ _objects.push_back(obj);
+ _objectMap[obj->_id] = true;
}
Object *find(std::string id) {
@@ -256,14 +244,14 @@ private:
std::string toString() {
std::string output;
- if (!comment.empty())
- output = "\n/* Begin " + comment + " section */\n";
+ if (!_comment.empty())
+ output = "\n/* Begin " + _comment + " section */\n";
- for (std::vector<Object *>::iterator object = objects.begin(); object != objects.end(); ++object)
- output += (*object)->toString(flags);
+ for (std::vector<Object *>::iterator object = _objects.begin(); object != _objects.end(); ++object)
+ output += (*object)->toString(_flags);
- if (!comment.empty())
- output += "/* End " + comment + " section */\n";
+ if (!_comment.empty())
+ output += "/* End " + _comment + " section */\n";
return output;
}
@@ -282,10 +270,10 @@ private:
void addChildFile(const std::string &name);
void addChildByHash(const std::string &hash, const std::string &name);
// Should be passed the hash for the entry
- void addChildGroup(const Group* group);
+ void addChildGroup(const Group *group);
void ensureChildExists(const std::string &name);
Group *getChildGroup(const std::string &name);
- std::string getHashRef() const { return parent->getHash(id); }
+ std::string getHashRef() const { return _parent->getHash(_id); }
};
// The path used by the root-source group
diff --git a/devtools/create_translations/create_translations.h b/devtools/create_translations/create_translations.h
index 34a79913ac..e87e3923c3 100644
--- a/devtools/create_translations/create_translations.h
+++ b/devtools/create_translations/create_translations.h
@@ -26,10 +26,10 @@
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
-typedef signed short int16;
+typedef signed short int16;
-#ifndef __has_feature // Optional of course.
- #define __has_feature(x) 0 // Compatibility with non-clang compilers.
+#ifndef __has_feature // Optional of course.
+#define __has_feature(x) 0 // Compatibility with non-clang compilers.
#endif
#endif /* CREATE_TRANSLATIONS_H */
diff --git a/devtools/credits.pl b/devtools/credits.pl
index 9fa28ed3e4..6201fc1052 100755
--- a/devtools/credits.pl
+++ b/devtools/credits.pl
@@ -1310,6 +1310,10 @@ begin_credits("Credits");
"Electronic Arts for providing the source code of the two Lost Files of Sherlock Holmes games. ".
"James M. Ferguson and Barry Duncan for their tenacious efforts to recover the sources.");
+ add_paragraph(
+ "The mindFactory team for writing Broken Sword 2.5, a splendid fan-made sequel, and for sharing ".
+ "the source code with us.");
+
end_section();
end_credits();