diff options
Diffstat (limited to 'devtools')
46 files changed, 3289 insertions, 740 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_classicmacfonts.sh b/devtools/create_classicmacfonts.sh new file mode 100755 index 0000000000..517f3f5638 --- /dev/null +++ b/devtools/create_classicmacfonts.sh @@ -0,0 +1,119 @@ +#!/bin/bash +# +# This script downloads System 7.0.1 image from Apple and extracts fonts +# from it. Mac only, unfortunately. +# +# On Windows you perhaps can perform the extraction manually with use of +# HFSxplorer: http://www.catacombae.org/hfsexplorer/ +# +# More information could be found in the vMac documentation: http://www.gryphel.com/c/image/ +# +# Alternatively you may use vMac instructions for extracting these disk images: +# http://www.gryphel.com/c/minivmac/recipes/sys7inst/ +# +# Based on instructions posted at +# http://apple.stackexchange.com/questions/58243/can-i-get-the-original-mac-font-chicago-on-a-mountain-lion-mac + +echo_n() { + printf "$@" +} + +if test `uname` != "Darwin"; then + echo This script is Mac OS X-only + exit +fi + +echo_n "Downloading System 7.0.1 image..." +if test ! -f System_7.0.1.smi.bin; then + curl -s http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/System/Older_System/System_7.0.x/System_7.0.1.smi.bin -o System_7.0.1.smi.bin +fi + +if test ! -f System_7.0.1.smi.bin; then + echo "Cannot download System_7.0.1.smi.bin" + exit +fi + +echo done + +echo_n "Mounting System 7.0.1 image..." + +macbinary decode System_7.0.1.smi.bin +hdiutil convert -quiet System\ 7.0.1.smi -format UDRO -o sys7.dmg +hdiutil attach -quiet sys7.dmg + +if test ! -f /Volumes/7.0.1\ \(1440k.images\)/Fonts.image; then + echo "Failed to attach sys7.dmg" + exit +fi + +echo done + +echo_n "Mounting Fonts disk image..." + +hdiutil convert -quiet /Volumes/7.0.1\ \(1440k.images\)/Fonts.image -format UDRO -o fonts.dmg +hdiutil detach -quiet `hdiutil info|grep "/Volumes/7.0.1 (1440k.images)"|cut -f 1` +hdiutil attach -quiet fonts.dmg + +if test ! -f /Volumes/Fonts/Chicago; then + echo "Failed to attach fonts.dmg" + exit +fi + +echo done + +echo_n "Copying fonts..." + +for i in Athens Cairo Chicago Courier Geneva Helvetica London "Los Angeles" Monaco "New York" Palatino "San Francisco" Symbol Times Venice +do + echo $i + macbinary encode "/Volumes/Fonts/$i" -o "$i.bin" -n +done + +echo ...Done + +hdiutil detach -quiet `hdiutil info|grep "/Volumes/Fonts"|cut -f 1` + +if test ! -f fondu_src-060102.tgz; then + echo_n "Getting fondu_src-060102.tgz..." + curl -s http://fondu.sourceforge.net/fondu_src-060102.tgz -o fondu_src-060102.tgz + tar xf fondu_src-060102.tgz +fi + +if test ! -d fondu-060102; then + echo "Failed to download fondu_src-060102.tgz" + exit +fi + +echo done + +if test ! -x fondu-060102/fondu; then + echo_n "Compiling fondu..." + cd fondu-060102 + ./configure >configure.log 2>&1 && make 2>&1 >make.log + cd .. +fi + +if test ! -x fondu-060102/fondu; then + echo "Failed to build fondu. See configure.log and make.log" + exit +else + rm -f configure.log make.log +fi + +echo done + +echo_n "Converting fonts..." +fondu-060102/fondu -force *.bin +echo done + +zip -9 classicmacfonts *.bdf +mv classicmacfonts.zip classicmacfonts.dat + +echo_n "Cleaning up..." +rm *.bdf +rm *.ttf +rm *.bin +rm *.dmg +echo done + +ls -l classicmacfonts.dat diff --git a/devtools/create_kyradat/create_kyradat.cpp b/devtools/create_kyradat/create_kyradat.cpp index 441f315c8d..294eadf92b 100644 --- a/devtools/create_kyradat/create_kyradat.cpp +++ b/devtools/create_kyradat/create_kyradat.cpp @@ -45,7 +45,7 @@ enum { - kKyraDatVersion = 86 + kKyraDatVersion = 88 }; const ExtractFilename extractFilenames[] = { @@ -119,7 +119,6 @@ const ExtractFilename extractFilenames[] = { // AUDIO filename table { k1AudioTracks, kStringList, false }, - { k1AudioTracks2, kStringList, false }, { k1AudioTracksIntro, kStringList, false }, // AMULET anim diff --git a/devtools/create_kyradat/create_kyradat.h b/devtools/create_kyradat/create_kyradat.h index a6bee6f75c..1d58d7551f 100644 --- a/devtools/create_kyradat/create_kyradat.h +++ b/devtools/create_kyradat/create_kyradat.h @@ -131,7 +131,6 @@ enum kExtractID { k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, k1CreditsStrings, diff --git a/devtools/create_kyradat/games.cpp b/devtools/create_kyradat/games.cpp index afe0c67dbf..e6f0b38c45 100644 --- a/devtools/create_kyradat/games.cpp +++ b/devtools/create_kyradat/games.cpp @@ -231,7 +231,6 @@ const int kyra1FloppyNeed[] = { k1NewGameString, k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, -1 }; @@ -317,7 +316,6 @@ const int kyra1FloppyOldNeed[] = { k1NewGameString, k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, -1 }; @@ -405,7 +403,6 @@ const int kyra1CDNeed[] = { k1NewGameString, k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, -1 }; diff --git a/devtools/create_kyradat/resources.cpp b/devtools/create_kyradat/resources.cpp index 4df6bb8fb8..246811f821 100644 --- a/devtools/create_kyradat/resources.cpp +++ b/devtools/create_kyradat/resources.cpp @@ -302,7 +302,6 @@ static const ResourceProvider resourceProviders[] = { { k1NewGameString, kKyra1, kPlatformDOS, kNoSpecial, EN_ANY, &k1NewGameStringDOSEnglishProvider }, { k1ConfigStrings, kKyra1, kPlatformDOS, kNoSpecial, EN_ANY, &k1ConfigStringsDOSEnglishProvider }, { k1AudioTracks, kKyra1, kPlatformDOS, kNoSpecial, UNK_LANG, &k1AudioTracksDOSProvider }, - { k1AudioTracks2, kKyra1, kPlatformDOS, kNoSpecial, UNK_LANG, &k1AudioTracks2DOSProvider }, { k1AudioTracksIntro, kKyra1, kPlatformDOS, kNoSpecial, UNK_LANG, &k1AudioTracksIntroDOSProvider }, { k1IntroStrings, kKyra1, kPlatformDOS, kNoSpecial, DE_DEU, &k1IntroStringsDOSGermanProvider }, { k1ItemNames, kKyra1, kPlatformDOS, kNoSpecial, DE_DEU, &k1ItemNamesDOSGermanProvider }, @@ -472,7 +471,6 @@ static const ResourceProvider resourceProviders[] = { { k1NewGameString, kKyra1, kPlatformDOS, kOldFloppy, RU_RUS, &k1NewGameStringDOSOldFloppyRussianProvider }, { k1ConfigStrings, kKyra1, kPlatformDOS, kOldFloppy, RU_RUS, &k1ConfigStringsDOSOldFloppyRussianProvider }, { k1AudioTracks, kKyra1, kPlatformDOS, kOldFloppy, UNK_LANG, &k1AudioTracksDOSOldFloppyProvider }, - { k1AudioTracks2, kKyra1, kPlatformDOS, kOldFloppy, UNK_LANG, &k1AudioTracks2DOSOldFloppyProvider }, { k1AudioTracksIntro, kKyra1, kPlatformDOS, kOldFloppy, UNK_LANG, &k1AudioTracksIntroDOSOldFloppyProvider }, { k1KallakWritingSeq, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1KallakWritingSeqDOSCDProvider }, { k1MalcolmTreeSeq, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1MalcolmTreeSeqDOSCDProvider }, @@ -556,7 +554,6 @@ static const ResourceProvider resourceProviders[] = { { k1NewGameString, kKyra1, kPlatformDOS, kTalkieVersion, EN_ANY, &k1NewGameStringDOSCDEnglishProvider }, { k1ConfigStrings, kKyra1, kPlatformDOS, kTalkieVersion, EN_ANY, &k1ConfigStringsDOSCDEnglishProvider }, { k1AudioTracks, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1AudioTracksDOSCDProvider }, - { k1AudioTracks2, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1AudioTracks2DOSCDProvider }, { k1AudioTracksIntro, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1AudioTracksIntroDOSCDProvider }, { k1IntroStrings, kKyra1, kPlatformDOS, kTalkieVersion, DE_DEU, &k1IntroStringsDOSCDGermanProvider }, { k1ItemNames, kKyra1, kPlatformDOS, kTalkieVersion, DE_DEU, &k1ItemNamesDOSCDGermanProvider }, diff --git a/devtools/create_kyradat/resources/lok_dos.h b/devtools/create_kyradat/resources/lok_dos.h index e8d987fe1b..6bc9c2525f 100644 --- a/devtools/create_kyradat/resources/lok_dos.h +++ b/devtools/create_kyradat/resources/lok_dos.h @@ -1898,7 +1898,7 @@ static const byte k1OutroReunionSeqDOS[1351] = { static const ByteProvider k1OutroReunionSeqDOSProvider = { ARRAYSIZE(k1OutroReunionSeqDOS), k1OutroReunionSeqDOS }; -static const char *const k1AudioTracksDOS[8] = { +static const char *const k1AudioTracksDOS[9] = { "KYRA1A", "KYRA1B", "KYRA2A", @@ -1906,17 +1906,12 @@ static const char *const k1AudioTracksDOS[8] = { "KYRA4A", "KYRA4B", "KYRA5A", - "KYRA5B" + "KYRA5B", + "KYRAMISC" }; static const StringListProvider k1AudioTracksDOSProvider = { ARRAYSIZE(k1AudioTracksDOS), k1AudioTracksDOS }; -static const char *const k1AudioTracks2DOS[1] = { - "kyramisc" -}; - -static const StringListProvider k1AudioTracks2DOSProvider = { ARRAYSIZE(k1AudioTracks2DOS), k1AudioTracks2DOS }; - static const char *const k1AudioTracksIntroDOS[1] = { "intro" }; diff --git a/devtools/create_kyradat/resources/lok_dos_cd.h b/devtools/create_kyradat/resources/lok_dos_cd.h index 9550d53d61..dc7a521063 100644 --- a/devtools/create_kyradat/resources/lok_dos_cd.h +++ b/devtools/create_kyradat/resources/lok_dos_cd.h @@ -1969,7 +1969,7 @@ static const byte k1OutroReunionSeqDOSCD[1509] = { static const ByteProvider k1OutroReunionSeqDOSCDProvider = { ARRAYSIZE(k1OutroReunionSeqDOSCD), k1OutroReunionSeqDOSCD }; -static const char *const k1AudioTracksDOSCD[8] = { +static const char *const k1AudioTracksDOSCD[9] = { "KYRA1A", "KYRA1B", "KYRA2A", @@ -1977,17 +1977,12 @@ static const char *const k1AudioTracksDOSCD[8] = { "KYRA4A", "KYRA4B", "KYRA5A", - "KYRA5B" + "KYRA5B", + "KYRAMISC" }; static const StringListProvider k1AudioTracksDOSCDProvider = { ARRAYSIZE(k1AudioTracksDOSCD), k1AudioTracksDOSCD }; -static const char *const k1AudioTracks2DOSCD[1] = { - "kyramisc" -}; - -static const StringListProvider k1AudioTracks2DOSCDProvider = { ARRAYSIZE(k1AudioTracks2DOSCD), k1AudioTracks2DOSCD }; - static const char *const k1AudioTracksIntroDOSCD[2] = { "intro", "intro" diff --git a/devtools/create_kyradat/resources/lok_dos_oldfloppy.h b/devtools/create_kyradat/resources/lok_dos_oldfloppy.h index e19cb5a6ef..62b1530941 100644 --- a/devtools/create_kyradat/resources/lok_dos_oldfloppy.h +++ b/devtools/create_kyradat/resources/lok_dos_oldfloppy.h @@ -1884,7 +1884,7 @@ static const byte k1OutroReunionSeqDOSOldFloppy[1351] = { static const ByteProvider k1OutroReunionSeqDOSOldFloppyProvider = { ARRAYSIZE(k1OutroReunionSeqDOSOldFloppy), k1OutroReunionSeqDOSOldFloppy }; -static const char *const k1AudioTracksDOSOldFloppy[8] = { +static const char *const k1AudioTracksDOSOldFloppy[9] = { "KYRA1A", "KYRA1B", "KYRA2A", @@ -1892,17 +1892,12 @@ static const char *const k1AudioTracksDOSOldFloppy[8] = { "KYRA4A", "KYRA4B", "KYRA5A", - "KYRA5B" + "KYRA5B", + "KYRAMISC" }; static const StringListProvider k1AudioTracksDOSOldFloppyProvider = { ARRAYSIZE(k1AudioTracksDOSOldFloppy), k1AudioTracksDOSOldFloppy }; -static const char *const k1AudioTracks2DOSOldFloppy[1] = { - "kyramisc" -}; - -static const StringListProvider k1AudioTracks2DOSOldFloppyProvider = { ARRAYSIZE(k1AudioTracks2DOSOldFloppy), k1AudioTracks2DOSOldFloppy }; - static const char *const k1AudioTracksIntroDOSOldFloppy[1] = { "intro" }; diff --git a/devtools/create_kyradat/resources/lok_pc98_japanese.h b/devtools/create_kyradat/resources/lok_pc98_japanese.h index 0cbc96aeb9..0a70ab945e 100644 --- a/devtools/create_kyradat/resources/lok_pc98_japanese.h +++ b/devtools/create_kyradat/resources/lok_pc98_japanese.h @@ -222,10 +222,11 @@ static const char *const k1PoisonGoneStringPC98Japanese[2] = { static const StringListProvider k1PoisonGoneStringPC98JapaneseProvider = { ARRAYSIZE(k1PoisonGoneStringPC98Japanese), k1PoisonGoneStringPC98Japanese }; -static const char *const k1ThePoisonStringsPC98Japanese[3] = { +static const char *const k1ThePoisonStringsPC98Japanese[4] = { "\x93\xC5\x82\xBE\x81""E""\x81""E""\x81""E", "\x8C\xC4\x8B""z""\x82\xAA\x8F""o""\x97\x88\x82\xC8\x82\xA2\x81""E""\x81""E""\x81""E", - "\x8B""C""\x95\xAA\x82\xAA\x88\xAB\x82\xA2\x81""E""\x81""E""\x81""E" + "\x8B""C""\x95\xAA\x82\xAA\x88\xAB\x82\xA2\x81""E""\x81""E""\x81""E", + "\x82\xA0\x82\xCC\x8E\xD6\x82\xCD""\r""\x93\xC5\x8E\xD6\x82\xC9\x82\xBF\x82\xAA\x82\xA2\x82\xC8\x82\xA2\x81""I" }; static const StringListProvider k1ThePoisonStringsPC98JapaneseProvider = { ARRAYSIZE(k1ThePoisonStringsPC98Japanese), k1ThePoisonStringsPC98Japanese }; diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp new file mode 100644 index 0000000000..1423e686be --- /dev/null +++ b/devtools/create_project/cmake.cpp @@ -0,0 +1,324 @@ +/* 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 "config.h" +#include "cmake.h" + +#include <algorithm> +#include <cstring> +#include <fstream> +#include <iterator> + +namespace CreateProjectTool { + +CMakeProvider::CMakeProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version) + : ProjectProvider(global_warnings, project_warnings, version) { +} + +const CMakeProvider::Library *CMakeProvider::getLibraryFromFeature(const char *feature) const { + static const Library s_libraries[] = { + { "sdl", "FindSDL", "SDL", "SDL_INCLUDE_DIR", "SDL_LIBRARY", 0 }, + { "sdl2", 0, "SDL2", "SDL2_INCLUDE_DIRS", "SDL2_LIBRARIES", 0 }, + { "freetype", "FindFreetype", "Freetype", "FREETYPE_INCLUDE_DIRS", "FREETYPE_LIBRARIES", 0 }, + { "libz", "FindZLIB", "ZLIB", "ZLIB_INCLUDE_DIRS", "ZLIB_LIBRARIES", 0 }, + { "png", "FindPNG", "PNG", "PNG_INCLUDE_DIRS", "PNG_LIBRARIES", 0 }, + { "jpeg", "FindJPEG", "JPEG", "JPEG_INCLUDE_DIRS", "JPEG_LIBRARIES", 0 }, + { "mpeg2", "FindMPEG2", "MPEG2", "MPEG2_INCLUDE_DIRS", "MPEG2_mpeg2_LIBRARY", 0 }, + { "flac", 0, 0, 0, 0, "FLAC" }, + { "mad", 0, 0, 0, 0, "mad" }, + { "vorbis", 0, 0, 0, 0, "vorbisfile vorbis ogg" }, + { "theora", 0, 0, 0, 0, "theoradec" }, + { "fluidsynth",0, 0, 0, 0, "fluidsynth" }, + { "faad", 0, 0, 0, 0, "faad" } + }; + + for (unsigned int i = 0; i < sizeof(s_libraries) / sizeof(s_libraries[0]); i++) { + if (std::strcmp(feature, s_libraries[i].feature) == 0) { + return &s_libraries[i]; + } + } + + return 0; +} + +void CMakeProvider::createWorkspace(const BuildSetup &setup) { + std::string filename = setup.outputDir + "/CMakeLists.txt"; + std::ofstream workspace(filename.c_str()); + if (!workspace) + error("Could not open \"" + filename + "\" for writing"); + + workspace << "cmake_minimum_required(VERSION 3.2)\n" + "project(" << setup.projectDescription << ")\n\n"; + + workspace << "# Define the engines and subengines\n"; + writeEngines(setup, workspace); + writeSubEngines(setup, workspace); + workspace << "# Generate options for the engines\n"; + writeEngineOptions(workspace); + + workspace << "include_directories(${" << setup.projectDescription << "_SOURCE_DIR} ${" << setup.projectDescription << "_SOURCE_DIR}/engines\n" + "$ENV{"<<LIBS_DEFINE<<"}/include)\n\n"; + + workspace << "# Libraries and features\n"; + writeFeatureLibSearch(workspace, setup.useSDL2 ? "sdl2" : "sdl"); + for (FeatureList::const_iterator i = setup.features.begin(), end = setup.features.end(); i != end; ++i) { + if (!i->enable || featureExcluded(i->name)) continue; + + writeFeatureLibSearch(workspace, i->name); + workspace << "add_definitions(-D" << i->define << ")\n"; + } + workspace << "\n"; + + writeWarnings(workspace); + writeDefines(setup, workspace); + workspace << "# Generate definitions for the engines\n"; + writeEngineDefinitions(workspace); + + workspace << "# Generate \"engines/plugins_table.h\"\n"; + writeGeneratePluginsTable(workspace); +} + +void CMakeProvider::writeFeatureLibSearch(std::ofstream &workspace, const char *feature) const { + const Library *library = getLibraryFromFeature(feature); + if (library) { + if (library->module) { + workspace << "Include(" << library->module << ")\n"; + } + if (library->package) { + workspace << "Find_Package(" << library->package << " REQUIRED)\n"; + } + if (library->includesVar) { + workspace << "include_directories(${" << library->includesVar << "})\n"; + } + } +} + +void CMakeProvider::writeEngines(const BuildSetup &setup, std::ofstream &workspace) const { + workspace << "set(ENGINES"; + for (EngineDescList::const_iterator i = setup.engines.begin(), end = setup.engines.end(); i != end; ++i) { + // We ignore all sub engines here because they require special handling. + if (!i->enable || isSubEngine(i->name, setup.engines)) { + continue; + } + + std::string engineName; + std::transform(i->name.begin(), i->name.end(), std::back_inserter(engineName), toupper); + + workspace << " " << engineName; + } + workspace << ")\n"; +} + +void CMakeProvider::writeSubEngines(const BuildSetup &setup, std::ofstream &workspace) const { + for (EngineDescList::const_iterator i = setup.engines.begin(), end = setup.engines.end(); i != end; ++i) { + // We ignore all sub engines here because they are handled in the inner loop + if (!i->enable || isSubEngine(i->name, setup.engines) || i->subEngines.empty()) { + continue; + } + + std::string engineName; + std::transform(i->name.begin(), i->name.end(), std::back_inserter(engineName), toupper); + + workspace << "set(SUB_ENGINES_" << engineName; + for (StringList::const_iterator j = i->subEngines.begin(), subEnd = i->subEngines.end(); j != subEnd; ++j) { + const EngineDesc &subEngine = findEngineDesc(*j, setup.engines); + if (!subEngine.enable) continue; + + std::string subEngineName; + std::transform(j->begin(), j->end(), std::back_inserter(subEngineName), toupper); + + workspace << " " << subEngineName; + } + workspace << ")\n"; + } + + workspace << "\n"; +} + +void CMakeProvider::createProjectFile(const std::string &name, const std::string &, const BuildSetup &setup, const std::string &moduleDir, + const StringList &includeList, const StringList &excludeList) { + + const std::string projectFile = setup.outputDir + "/CMakeLists.txt"; + std::ofstream project(projectFile.c_str(), std::ofstream::out | std::ofstream::app); + if (!project) + error("Could not open \"" + projectFile + "\" for writing"); + + if (name == setup.projectName) { + project << "add_executable(" << name << "\n"; + } else { + std::string engineName; + std::transform(name.begin(), name.end(), std::back_inserter(engineName), toupper); + + project << "if (ENABLE_" << engineName << ")\n"; + project << "add_library(" << name << "\n"; + } + + std::string modulePath; + if (!moduleDir.compare(0, setup.srcDir.size(), setup.srcDir)) { + modulePath = moduleDir.substr(setup.srcDir.size()); + if (!modulePath.empty() && modulePath.at(0) == '/') + modulePath.erase(0, 1); + } + + if (modulePath.size()) + addFilesToProject(moduleDir, project, includeList, excludeList, setup.filePrefix + '/' + modulePath); + else + addFilesToProject(moduleDir, project, includeList, excludeList, setup.filePrefix); + + + project << ")\n"; + if (name != setup.projectName) { + project << "endif()\n"; + } + + project << "# Libraries\n"; + if (name == setup.projectName) { + const Library *sdlLibrary = getLibraryFromFeature(setup.useSDL2 ? "sdl2" : "sdl"); + project << "target_link_libraries(" << name << " ${" << sdlLibrary->librariesVar << "})\n"; + + for (FeatureList::const_iterator i = setup.features.begin(), end = setup.features.end(); i != end; ++i) { + if (!i->enable || featureExcluded(i->name)) continue; + + const Library *library = getLibraryFromFeature(i->name); + if (!library) continue; + + if (library->librariesVar) { + project << "target_link_libraries(" << name << " ${" << library->librariesVar << "})\n"; + } else { + project << "target_link_libraries(" << name << " " << library->libraries << ")\n"; + } + } + project << "if (WIN32)\n"; + project << " target_sources(" << name << " PUBLIC dists/" << name << ".rc)\n"; + project << " target_link_libraries(" << name << " winmm)\n"; + project << "endif()\n"; + project << "\n"; + + project << "# Engines libraries handling\n"; + writeEnginesLibrariesHandling(setup, project); + + project << "set_property(TARGET " << name << " PROPERTY CXX_STANDARD 11)\n"; + project << "set_property(TARGET " << name << " PROPERTY CXX_STANDARD_REQUIRED ON)\n"; + } +} + +void CMakeProvider::writeWarnings(std::ofstream &output) const { + output << "SET (CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS}"; + for (StringList::const_iterator i = _globalWarnings.begin(); i != _globalWarnings.end(); ++i) { + output << " " << *i; + } + output << "\")\n"; +} + +void CMakeProvider::writeDefines(const BuildSetup &setup, std::ofstream &output) const { + output << "if (WIN32)\n"; + output << " add_definitions(-DWIN32)\n"; + output << "else()\n"; + output << " add_definitions(-DPOSIX)\n"; + output << "endif()\n"; + + output << "if (CMAKE_SIZEOF_VOID_P MATCHES 8)\n"; + output << " add_definitions(-DSCUMM_64BITS)\n"; + output << "endif()\n"; + + output << "add_definitions(-DSDL_BACKEND)\n\n"; +} + +void CMakeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int indentation, + const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix) { + + for (FileNode::NodeList::const_iterator i = dir.children.begin(); i != dir.children.end(); ++i) { + const FileNode *node = *i; + + if (!node->children.empty()) { + writeFileListToProject(*node, projectFile, indentation + 1, duplicate, objPrefix + node->name + '_', filePrefix + node->name + '/'); + } else { + std::string name, ext; + splitFilename(node->name, name, ext); + projectFile << "\t" << filePrefix + node->name << "\n"; + } + } +} + +const char *CMakeProvider::getProjectExtension() { + return ".txt"; +} + +void CMakeProvider::writeEngineOptions(std::ofstream &workspace) const { + workspace << "foreach(ENGINE IN LISTS ENGINES)\n"; + workspace << " OPTION(ENABLE_${ENGINE} \"Enable ${ENGINE}\" ON)\n"; + workspace << "endforeach(ENGINE)\n\n"; +} + +void CMakeProvider::writeGeneratePluginsTable(std::ofstream &workspace) const { + workspace << "file(REMOVE \"engines/plugins_table.h\")\n"; + workspace << "file(APPEND \"engines/plugins_table.h\" \"/* This file is automatically generated by CMake */\\n\")\n"; + workspace << "foreach(ENGINE IN LISTS ENGINES)\n"; + workspace << " if (ENABLE_${ENGINE})\n"; + workspace << " file(APPEND \"engines/plugins_table.h\" \"#if PLUGIN_ENABLED_STATIC(${ENGINE})\\n\")\n"; + workspace << " file(APPEND \"engines/plugins_table.h\" \"LINK_PLUGIN(${ENGINE})\\n\")\n"; + workspace << " file(APPEND \"engines/plugins_table.h\" \"#endif\\n\")\n"; + workspace << " endif()\n"; + workspace << "endforeach()\n\n"; +} + +void CMakeProvider::writeEnginesLibrariesHandling(const BuildSetup &setup, std::ofstream &workspace) const { + workspace << "foreach(ENGINE IN LISTS ENGINES)\n"; + workspace << " if (ENABLE_${ENGINE})\n"; + workspace << " string(TOLOWER ${ENGINE} ENGINE_LIB)\n\n"; + workspace << " # Enable C++11\n"; + workspace << " set_property(TARGET ${ENGINE_LIB} PROPERTY CXX_STANDARD 11)\n"; + workspace << " set_property(TARGET ${ENGINE_LIB} PROPERTY CXX_STANDARD_REQUIRED ON)\n\n"; + workspace << " # Link against the engine\n"; + workspace << " target_link_libraries("<< setup.projectName <<" ${ENGINE_LIB})\n"; + workspace << " endif()\n"; + workspace << "endforeach()\n\n"; +} + +void CMakeProvider::writeEngineDefinitions(std::ofstream &workspace) const { + workspace << "foreach(ENGINE IN LISTS ENGINES)\n"; + workspace << " if (ENABLE_${ENGINE})\n"; + workspace << " add_definitions(-DENABLE_${ENGINE})\n"; + workspace << " foreach(SUB_ENGINE IN LISTS SUB_ENGINES_${ENGINE})\n"; + workspace << " add_definitions(-DENABLE_${SUB_ENGINE})\n";; + workspace << " endforeach(SUB_ENGINE)\n"; + workspace << " endif()\n"; + workspace << "endforeach()\n\n"; +} + +bool CMakeProvider::featureExcluded(const char *name) const { + return std::strcmp(name, "nasm") == 0 || + std::strcmp(name, "updates") == 0 ; // NASM is not supported for now +} + +const EngineDesc &CMakeProvider::findEngineDesc(const std::string &name, const EngineDescList &engines) const { + for (EngineDescList::const_iterator i = engines.begin(), end = engines.end(); i != end; ++i) { + if (i->name == name) { + return *i; + } + + } + + error("Unable to find requested engine"); +} + +} // End of CreateProjectTool namespace diff --git a/devtools/create_project/cmake.h b/devtools/create_project/cmake.h new file mode 100644 index 0000000000..ec7ff565c9 --- /dev/null +++ b/devtools/create_project/cmake.h @@ -0,0 +1,85 @@ +/* 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 TOOLS_CREATE_PROJECT_CMAKE_H +#define TOOLS_CREATE_PROJECT_CMAKE_H + +#include "create_project.h" + +namespace CreateProjectTool { + +/** + * A ProjectProvider used to generate CMake project descriptions + * + * Generated CMake projects are minimal, and will only work with GCC. + */ +class CMakeProvider : public ProjectProvider { +public: + CMakeProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version = 0); + +protected: + + void createWorkspace(const BuildSetup &setup); + + void createOtherBuildFiles(const BuildSetup &) {} + + void addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList) {} + + void createProjectFile(const std::string &name, const std::string &uuid, const BuildSetup &setup, const std::string &moduleDir, + const StringList &includeList, const StringList &excludeList); + + void writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int indentation, + const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix); + + const char *getProjectExtension(); + +private: + /** + * CMake properties for a library required by a feature + */ + struct Library { + const char *feature; + const char *module; + const char *package; + const char *includesVar; + const char *librariesVar; + const char *libraries; + }; + + const Library *getLibraryFromFeature(const char *feature) const; + + void writeWarnings(std::ofstream &output) const; + void writeDefines(const BuildSetup &setup, std::ofstream &output) const; + void writeEngines(const BuildSetup &setup, std::ofstream &workspace) const; + void writeSubEngines(const BuildSetup &setup, std::ofstream &workspace) const; + void writeEngineOptions(std::ofstream &workspace) const; + void writeGeneratePluginsTable(std::ofstream &workspace) const; + void writeEnginesLibrariesHandling(const BuildSetup &setup, std::ofstream &workspace) const; + void writeEngineDefinitions(std::ofstream &workspace) const; + void writeFeatureLibSearch(std::ofstream &workspace, const char *feature) const; + bool featureExcluded(const char *name) const; + const EngineDesc &findEngineDesc(const std::string &name, const EngineDescList &engines) const; +}; + +} // End of CreateProjectTool namespace + +#endif // TOOLS_CREATE_PROJECT_CMAKE_H diff --git a/devtools/create_project/cmake/CMakeLists.txt b/devtools/create_project/cmake/CMakeLists.txt new file mode 100644 index 0000000000..2646b89d2d --- /dev/null +++ b/devtools/create_project/cmake/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.2) +project(create_project) + + +set(SOURCE_FILES + ../cmake.cpp + ../cmake.h + ../codeblocks.cpp + ../codeblocks.h + ../create_project.cpp + ../create_project.h + ../msbuild.cpp + ../msbuild.h + ../msvc.cpp + ../msvc.h + ../visualstudio.cpp + ../visualstudio.h + ../xcode.cpp + ../xcode.h + ) + +add_executable(create_project ${SOURCE_FILES}) + diff --git a/devtools/create_project/codeblocks.cpp b/devtools/create_project/codeblocks.cpp index 442a2b0025..e9dc8bf234 100644 --- a/devtools/create_project/codeblocks.cpp +++ b/devtools/create_project/codeblocks.cpp @@ -200,6 +200,11 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s } +void CodeBlocksProvider::addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList) { + includeList.push_back(setup.srcDir + "/icons/" + setup.projectName + ".ico"); + includeList.push_back(setup.srcDir + "/dists/" + setup.projectName + ".rc"); +} + void CodeBlocksProvider::writeWarnings(const std::string &name, std::ofstream &output) const { // Global warnings diff --git a/devtools/create_project/codeblocks.h b/devtools/create_project/codeblocks.h index f65604d925..5baa21c242 100644 --- a/devtools/create_project/codeblocks.h +++ b/devtools/create_project/codeblocks.h @@ -37,6 +37,8 @@ protected: void createOtherBuildFiles(const BuildSetup &) {} + void addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList); + void createProjectFile(const std::string &name, const std::string &uuid, const BuildSetup &setup, const std::string &moduleDir, const StringList &includeList, const StringList &excludeList); diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 0aba511491..7e2cad0901 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -31,6 +31,7 @@ #include "config.h" #include "create_project.h" +#include "cmake.h" #include "codeblocks.h" #include "msvc.h" #include "visualstudio.h" @@ -53,7 +54,7 @@ #define USE_WIN32_API #endif -#ifdef USE_WIN32_API +#if (defined(_WIN32) || defined(WIN32)) #include <windows.h> #else #include <sstream> @@ -83,10 +84,18 @@ std::string unifyPath(const std::string &path); * @param exe Name of the executable. */ void displayHelp(const char *exe); + +/** + * Build a list of options to enable or disable GCC warnings + * + * @param globalWarnings Resulting list of warnings + */ +void addGCCWarnings(StringList &globalWarnings); } // End of anonymous namespace enum ProjectType { kProjectNone, + kProjectCMake, kProjectCodeBlocks, kProjectMSVC, kProjectXcode @@ -125,7 +134,6 @@ int main(int argc, char *argv[]) { ProjectType projectType = kProjectNone; int msvcVersion = 12; - bool useSDL2 = false; // Parse command line arguments using std::cout; @@ -142,6 +150,14 @@ int main(int argc, char *argv[]) { return 0; + } else if (!std::strcmp(argv[i], "--cmake")) { + if (projectType != kProjectNone) { + std::cerr << "ERROR: You cannot pass more than one project type!\n"; + return -1; + } + + projectType = kProjectCMake; + } else if (!std::strcmp(argv[i], "--codeblocks")) { if (projectType != kProjectNone) { std::cerr << "ERROR: You cannot pass more than one project type!\n"; @@ -269,7 +285,7 @@ int main(int argc, char *argv[]) { } else if (!std::strcmp(argv[i], "--tests")) { setup.tests = true; } else if (!std::strcmp(argv[i], "--sdl2")) { - useSDL2 = true; + setup.useSDL2 = true; } else { std::cerr << "ERROR: Unknown parameter \"" << argv[i] << "\"\n"; return -1; @@ -335,19 +351,51 @@ int main(int argc, char *argv[]) { StringList featureDefines = getFeatureDefines(setup.features); setup.defines.splice(setup.defines.begin(), featureDefines); - // Windows only has support for the SDL backend, so we hardcode it here (along with winmm) - if (projectType != kProjectXcode) { + if (projectType == kProjectXcode) { + setup.defines.push_back("POSIX"); + // Define both MACOSX, and IPHONE, but only one of them will be associated to the + // correct target by the Xcode project provider. + // This define will help catching up target dependend files, like "browser_osx.mm" + // The suffix ("_osx", or "_ios") will be used by the project provider to filter out + // the files, according to the target. + setup.defines.push_back("MACOSX"); + setup.defines.push_back("IPHONE"); + } else if (projectType == kProjectMSVC || projectType == kProjectCodeBlocks) { + // Windows only has support for the SDL backend, so we hardcode it here (along with winmm) setup.defines.push_back("WIN32"); } else { + // As a last resort, select the backend files to build based on the platform used to build create_project. + // This is broken when cross compiling. +#if defined(_WIN32) || defined(WIN32) + setup.defines.push_back("WIN32"); +#else setup.defines.push_back("POSIX"); - setup.defines.push_back("MACOSX"); // This will break iOS, but allows OS X to catch up on browser_osx. +#endif } + + bool updatesEnabled = false; + for (FeatureList::const_iterator i = setup.features.begin(); i != setup.features.end(); ++i) { + if (i->enable && !strcmp(i->name, "updates")) + updatesEnabled = true; + } + if (updatesEnabled) { + setup.defines.push_back("USE_SPARKLE"); + if (projectType != kProjectXcode) + setup.libraries.push_back("winsparkle"); + else + setup.libraries.push_back("sparkle"); + } + setup.defines.push_back("SDL_BACKEND"); - if (!useSDL2) { - cout << "\nLinking to SDL 1.2\n\n"; + if (!setup.useSDL2) { + cout << "\nBuilding against SDL 1.2\n\n"; setup.libraries.push_back("sdl"); } else { - cout << "\nLinking to SDL 2.0\n\n"; + cout << "\nBuilding against SDL 2.0\n\n"; + // TODO: This also defines USE_SDL2 in the preprocessor, we don't do + // this in our configure/make based build system. Adapt create_project + // to replicate this behavior. + setup.defines.push_back("USE_SDL2"); setup.libraries.push_back("sdl2"); } setup.libraries.push_back("winmm"); @@ -374,49 +422,25 @@ int main(int argc, char *argv[]) { std::cerr << "ERROR: No project type has been specified!\n"; return -1; + case kProjectCMake: + if (setup.devTools || setup.tests) { + std::cerr << "ERROR: Building tools or tests is not supported for the CMake project type!\n"; + return -1; + } + + addGCCWarnings(globalWarnings); + + provider = new CreateProjectTool::CMakeProvider(globalWarnings, projectWarnings); + + break; + case kProjectCodeBlocks: if (setup.devTools || setup.tests) { std::cerr << "ERROR: Building tools or tests is not supported for the CodeBlocks project type!\n"; return -1; } - //////////////////////////////////////////////////////////////////////////// - // Code::Blocks is using GCC behind the scenes, so we need to pass a list - // of options to enable or disable warnings - //////////////////////////////////////////////////////////////////////////// - // - // -Wall - // enable all warnings - // - // -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder - // disable annoying and not-so-useful warnings - // - // -Wpointer-arith -Wcast-qual -Wcast-align - // -Wshadow -Wimplicit -Wnon-virtual-dtor -Wwrite-strings - // enable even more warnings... - // - // -fno-rtti -fno-exceptions -fcheck-new - // disable RTTI and exceptions, and enable checking of pointers returned - // by "new" - // - //////////////////////////////////////////////////////////////////////////// - - globalWarnings.push_back("-Wall"); - globalWarnings.push_back("-Wno-long-long"); - globalWarnings.push_back("-Wno-multichar"); - globalWarnings.push_back("-Wno-unknown-pragmas"); - globalWarnings.push_back("-Wno-reorder"); - globalWarnings.push_back("-Wpointer-arith"); - globalWarnings.push_back("-Wcast-qual"); - globalWarnings.push_back("-Wcast-align"); - globalWarnings.push_back("-Wshadow"); - globalWarnings.push_back("-Wimplicit"); - globalWarnings.push_back("-Wnon-virtual-dtor"); - globalWarnings.push_back("-Wwrite-strings"); - // The following are not warnings at all... We should consider adding them to - // a different list of parameters. - globalWarnings.push_back("-fno-exceptions"); - globalWarnings.push_back("-fcheck-new"); + addGCCWarnings(globalWarnings); provider = new CreateProjectTool::CodeBlocksProvider(globalWarnings, projectWarnings); @@ -630,6 +654,7 @@ void displayHelp(const char *exe) { " Additionally there are the following switches for changing various settings:\n" "\n" "Project specific settings:\n" + " --cmake build CMake project files\n" " --codeblocks build Code::Blocks project files\n" " --msvc build Visual Studio project files\n" " --xcode build XCode project files\n" @@ -684,6 +709,41 @@ void displayHelp(const char *exe) { cout.setf(std::ios_base::right, std::ios_base::adjustfield); } +void addGCCWarnings(StringList &globalWarnings) { + //////////////////////////////////////////////////////////////////////////// + // + // -Wall + // enable all warnings + // + // -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder + // disable annoying and not-so-useful warnings + // + // -Wpointer-arith -Wcast-qual -Wcast-align + // -Wshadow -Wimplicit -Wnon-virtual-dtor -Wwrite-strings + // enable even more warnings... + // + // -fno-exceptions -fcheck-new + // disable exceptions, and enable checking of pointers returned by "new" + // + //////////////////////////////////////////////////////////////////////////// + + globalWarnings.push_back("-Wall"); + globalWarnings.push_back("-Wno-long-long"); + globalWarnings.push_back("-Wno-multichar"); + globalWarnings.push_back("-Wno-unknown-pragmas"); + globalWarnings.push_back("-Wno-reorder"); + globalWarnings.push_back("-Wpointer-arith"); + globalWarnings.push_back("-Wcast-qual"); + globalWarnings.push_back("-Wcast-align"); + globalWarnings.push_back("-Wshadow"); + globalWarnings.push_back("-Wnon-virtual-dtor"); + globalWarnings.push_back("-Wwrite-strings"); + // The following are not warnings at all... We should consider adding them to + // a different list of parameters. + globalWarnings.push_back("-fno-exceptions"); + globalWarnings.push_back("-fcheck-new"); +} + /** * Parse the configure.engine file of a given engine directory and return a * list of all defined engines. @@ -929,16 +989,17 @@ TokenList tokenize(const std::string &input, char separator) { namespace { const Feature s_features[] = { // Libraries - { "libz", "USE_ZLIB", "zlib", true, "zlib (compression) support" }, - { "mad", "USE_MAD", "libmad", true, "libmad (MP3) support" }, - { "vorbis", "USE_VORBIS", "libvorbisfile_static libvorbis_static libogg_static", true, "Ogg Vorbis support" }, - { "flac", "USE_FLAC", "libFLAC_static win_utf8_io_static", true, "FLAC support" }, - { "png", "USE_PNG", "libpng", true, "libpng support" }, - { "faad", "USE_FAAD", "libfaad", false, "AAC support" }, - { "mpeg2", "USE_MPEG2", "libmpeg2", false, "MPEG-2 support" }, - { "theora", "USE_THEORADEC", "libtheora_static", true, "Theora decoding support" }, - {"freetype", "USE_FREETYPE2", "freetype", true, "FreeType support" }, - { "jpeg", "USE_JPEG", "jpeg-static", true, "libjpeg support" }, + { "libz", "USE_ZLIB", "zlib", true, "zlib (compression) support" }, + { "mad", "USE_MAD", "libmad", true, "libmad (MP3) support" }, + { "vorbis", "USE_VORBIS", "libvorbisfile_static libvorbis_static libogg_static", true, "Ogg Vorbis support" }, + { "flac", "USE_FLAC", "libFLAC_static win_utf8_io_static", true, "FLAC support" }, + { "png", "USE_PNG", "libpng16", true, "libpng support" }, + { "faad", "USE_FAAD", "libfaad", false, "AAC support" }, + { "mpeg2", "USE_MPEG2", "libmpeg2", false, "MPEG-2 support" }, + { "theora", "USE_THEORADEC", "libtheora_static", true, "Theora decoding support" }, + { "freetype", "USE_FREETYPE2", "freetype", true, "FreeType support" }, + { "jpeg", "USE_JPEG", "jpeg-static", true, "libjpeg support" }, + {"fluidsynth", "USE_FLUIDSYNTH", "libfluidsynth", true, "FluidSynth support" }, // Feature flags { "bink", "USE_BINK", "", true, "Bink video support" }, @@ -947,12 +1008,14 @@ const Feature s_features[] = { { "16bit", "USE_RGB_COLOR", "", true, "16bit color support" }, { "mt32emu", "USE_MT32EMU", "", true, "integrated MT-32 emulator" }, { "nasm", "USE_NASM", "", true, "IA-32 assembly support" }, // This feature is special in the regard, that it needs additional handling. - { "opengl", "USE_OPENGL", "opengl32", true, "OpenGL support" }, + { "opengl", "USE_OPENGL", "", true, "OpenGL support" }, + { "opengles", "USE_GLES", "", true, "forced OpenGL ES mode" }, { "taskbar", "USE_TASKBAR", "", true, "Taskbar integration support" }, { "translation", "USE_TRANSLATION", "", true, "Translation support" }, { "vkeybd", "ENABLE_VKEYBD", "", false, "Virtual keyboard support"}, { "keymapper", "ENABLE_KEYMAPPER", "", false, "Keymapper support"}, { "eventrecorder", "ENABLE_EVENTRECORDER", "", false, "Event recorder support"}, + { "updates", "USE_UPDATES", "", false, "Updates support"}, { "langdetect", "USE_DETECTLANG", "", true, "System language detection support" } // This feature actually depends on "translation", there // is just no current way of properly detecting this... }; @@ -1050,6 +1113,12 @@ void splitFilename(const std::string &fileName, std::string &name, std::string & ext = (dot == std::string::npos) ? std::string() : fileName.substr(dot + 1); } +std::string basename(const std::string &fileName) { + const std::string::size_type slash = fileName.find_last_of('/'); + if (slash == std::string::npos) return fileName; + return fileName.substr(slash + 1); +} + bool producesObjectFile(const std::string &fileName) { std::string n, ext; splitFilename(fileName, n, ext); @@ -1143,7 +1212,7 @@ bool compareNodes(const FileNode *l, const FileNode *r) { FileList listDirectory(const std::string &dir) { FileList result; -#ifdef USE_WIN32_API +#if defined(_WIN32) || defined(WIN32) WIN32_FIND_DATA fileInformation; HANDLE fileHandle = FindFirstFile((dir + "/*").c_str(), &fileInformation); @@ -1334,8 +1403,7 @@ void ProjectProvider::createProject(BuildSetup &setup) { createModuleList(setup.srcDir + "/image", setup.defines, setup.testDirs, in, ex); // Resource files - in.push_back(setup.srcDir + "/icons/" + setup.projectName + ".ico"); - in.push_back(setup.srcDir + "/dists/" + setup.projectName + ".rc"); + addResourceFiles(setup, in, ex); // Various text files in.push_back(setup.srcDir + "/AUTHORS"); diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index 459342a67d..1e417d485b 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> @@ -229,15 +229,17 @@ struct BuildSetup { StringList testDirs; ///< List of all folders containing tests bool devTools; ///< Generate project files for the tools - bool tests; ///< Generate project files for the tests + bool tests; ///< Generate project files for the tests bool runBuildEvents; ///< Run build events as part of the build (generate revision number and copy engine/theme data & needed files to the build folder bool createInstaller; ///< Create NSIS installer after the build + bool useSDL2; ///< Whether to use SDL2 or not. BuildSetup() { devTools = false; tests = false; runBuildEvents = false; createInstaller = false; + useSDL2 = false; } }; @@ -316,6 +318,17 @@ std::string convertPathToWin(const std::string &path); void splitFilename(const std::string &fileName, std::string &name, std::string &ext); /** + * Returns the basename of a path. + * examples: + * a/b/c/d.ext -> d.ext + * d.ext -> d.ext + * + * @param fileName Filename + * @return The basename + */ +std::string basename(const std::string &fileName); + +/** * Checks whether the given file will produce an object file or not. * * @param fileName Name of the file. @@ -419,6 +432,13 @@ protected: virtual void createOtherBuildFiles(const BuildSetup &setup) = 0; /** + * Add resources to the project + * + * @param setup Description of the desired build setup. + */ + virtual void addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList) = 0; + + /** * Create a project file for the specified list of files. * * @param name Name of the project file. diff --git a/devtools/create_project/module.mk b/devtools/create_project/module.mk index 0db070fa7c..bb7bdcc9b0 100644 --- a/devtools/create_project/module.mk +++ b/devtools/create_project/module.mk @@ -2,6 +2,7 @@ MODULE := devtools/create_project MODULE_OBJS := \ + cmake.o \ create_project.o \ codeblocks.o \ msvc.o \ diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index a326bd721a..2c6a89543f 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -319,12 +319,6 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s for (StringList::const_iterator i = setup.libraries.begin(); i != setup.libraries.end(); ++i) libraries += *i + ".lib;"; - if (_version == 14) { - std::string debug = isRelease ? "" : "d"; - libraries += "libvcruntime" + debug + ".lib;"; - libraries += "libucrt" + debug + ".lib;"; - } - project << "\t\t<Link>\n" "\t\t\t<OutputFile>$(OutDir)" << ((setup.devTools || setup.tests) ? name : setup.projectName) << ".exe</OutputFile>\n" "\t\t\t<AdditionalDependencies>" << libraries << "%(AdditionalDependencies)</AdditionalDependencies>\n" @@ -370,17 +364,17 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << (_version >= 12 ? _version : 4) << ".0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n" "\t<PropertyGroup>\n" "\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_Global</_PropertySheetDisplayName>\n" - "\t\t<ExecutablePath>$(" << LIBS_DEFINE << ")\\bin;$(ExecutablePath)</ExecutablePath>\n" - "\t\t<LibraryPath>$(" << LIBS_DEFINE << ")\\lib\\" << (bits == 32 ? "x86" : "x64") << ";$(LibraryPath)</LibraryPath>\n" - "\t\t<IncludePath>$(" << LIBS_DEFINE << ")\\include;$(" << LIBS_DEFINE << ")\\include\\SDL;$(IncludePath)</IncludePath>\n" + "\t\t<ExecutablePath>$(" << LIBS_DEFINE << ")\\bin;$(" << LIBS_DEFINE << ")\\bin\\" << (bits == 32 ? "x86" : "x64") << ";$(ExecutablePath)</ExecutablePath>\n" + "\t\t<LibraryPath>$(" << LIBS_DEFINE << ")\\lib\\" << (bits == 32 ? "x86" : "x64") << ";$(" << LIBS_DEFINE << ")\\lib\\" << (bits == 32 ? "x86" : "x64") << "\\$(Configuration);$(LibraryPath)</LibraryPath>\n" + "\t\t<IncludePath>$(" << LIBS_DEFINE << ")\\include;$(" << LIBS_DEFINE << ")\\include\\" << (setup.useSDL2 ? "SDL2" : "SDL") << ";$(IncludePath)</IncludePath>\n" "\t\t<OutDir>$(Configuration)" << bits << "\\</OutDir>\n" - "\t\t<IntDir>$(Configuration)" << bits << "/$(ProjectName)\\</IntDir>\n" + "\t\t<IntDir>$(Configuration)" << bits << "\\$(ProjectName)\\</IntDir>\n" "\t</PropertyGroup>\n" "\t<ItemDefinitionGroup>\n" "\t\t<ClCompile>\n" "\t\t\t<DisableLanguageExtensions>true</DisableLanguageExtensions>\n" "\t\t\t<DisableSpecificWarnings>" << warnings << ";%(DisableSpecificWarnings)</DisableSpecificWarnings>\n" - "\t\t\t<AdditionalIncludeDirectories>$(" << LIBS_DEFINE << ")\\include;.;" << prefix << ";" << prefix << "\\engines;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n" + "\t\t\t<AdditionalIncludeDirectories>.;" << prefix << ";" << prefix << "\\engines;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n" "\t\t\t<PreprocessorDefinitions>" << definesList << "%(PreprocessorDefinitions)</PreprocessorDefinitions>\n" "\t\t\t<ExceptionHandling>" << ((setup.devTools || setup.tests) ? "Sync" : "") << "</ExceptionHandling>\n"; @@ -437,10 +431,14 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b "\t\t\t<StringPooling>true</StringPooling>\n" "\t\t\t<BufferSecurityCheck>false</BufferSecurityCheck>\n" "\t\t\t<DebugInformationFormat></DebugInformationFormat>\n" - "\t\t\t<RuntimeLibrary>MultiThreaded</RuntimeLibrary>\n" + "\t\t\t<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n" "\t\t\t<EnablePREfast>" << (configuration == "Analysis" ? "true" : "false") << "</EnablePREfast>\n" "\t\t</ClCompile>\n" + "\t\t<Lib>\n" + "\t\t\t<LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>\n" + "\t\t</Lib>\n" "\t\t<Link>\n" + "\t\t\t<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>\n" "\t\t\t<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\n" "\t\t\t<SetChecksum>true</SetChecksum>\n"; } else { @@ -448,11 +446,17 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b "\t\t\t<PreprocessorDefinitions>WIN32;" << (configuration == "LLVM" ? "_CRT_SECURE_NO_WARNINGS;" : "") << "%(PreprocessorDefinitions)</PreprocessorDefinitions>\n" "\t\t\t<MinimalRebuild>true</MinimalRebuild>\n" "\t\t\t<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n" - "\t\t\t<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\n" + "\t\t\t<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n" "\t\t\t<FunctionLevelLinking>true</FunctionLevelLinking>\n" - "\t\t\t<TreatWarningAsError>false</TreatWarningAsError>\n" - "\t\t\t<DebugInformationFormat>" << (isWin32 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n" // For x64 format Edit and continue is not supported, thus we default to Program Database - "\t\t\t<EnablePREfast>" << (configuration == "Analysis" ? "true" : "false") << "</EnablePREfast>\n"; + "\t\t\t<TreatWarningAsError>false</TreatWarningAsError>\n"; + if (_version >= 14) { + // Since MSVC 2015 Edit and Continue is support for x64 too. + properties << "\t\t\t<DebugInformationFormat>" << "EditAndContinue" << "</DebugInformationFormat>\n"; + } else { + // Older MSVC versions did not support Edit and Continue for x64, thus we do not use it. + properties << "\t\t\t<DebugInformationFormat>" << (isWin32 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n"; + } + properties << "\t\t\t<EnablePREfast>" << (configuration == "Analysis" ? "true" : "false") << "</EnablePREfast>\n"; if (configuration == "LLVM") { // FIXME The LLVM cl wrapper does not seem to work properly with the $(TargetDir) path so we hard-code the build folder until the issue is resolved @@ -463,8 +467,7 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b properties << "\t\t</ClCompile>\n" "\t\t<Link>\n" "\t\t\t<GenerateDebugInformation>true</GenerateDebugInformation>\n" - "\t\t\t<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>\n" - "\t\t\t<IgnoreSpecificDefaultLibraries>libcmt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\n"; + "\t\t\t<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>\n"; } properties << "\t\t</Link>\n" diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp index dbfbcc128d..e6b47fe724 100644 --- a/devtools/create_project/msvc.cpp +++ b/devtools/create_project/msvc.cpp @@ -130,6 +130,11 @@ void MSVCProvider::createOtherBuildFiles(const BuildSetup &setup) { createBuildProp(setup, false, true, "LLVM"); } +void MSVCProvider::addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList) { + includeList.push_back(setup.srcDir + "/icons/" + setup.projectName + ".ico"); + includeList.push_back(setup.srcDir + "/dists/" + setup.projectName + ".rc"); +} + void MSVCProvider::createGlobalProp(const BuildSetup &setup) { std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_Global" + getPropertiesExtension()).c_str()); if (!properties) diff --git a/devtools/create_project/msvc.h b/devtools/create_project/msvc.h index e75e131bd1..178ba8e216 100644 --- a/devtools/create_project/msvc.h +++ b/devtools/create_project/msvc.h @@ -39,6 +39,8 @@ protected: void createOtherBuildFiles(const BuildSetup &setup); + void addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList); + /** * Create the global project properties. * diff --git a/devtools/create_project/msvc10/create_project.vcxproj b/devtools/create_project/msvc10/create_project.vcxproj index 80dfd5e8d3..700c4bb283 100644 --- a/devtools/create_project/msvc10/create_project.vcxproj +++ b/devtools/create_project/msvc10/create_project.vcxproj @@ -95,6 +95,7 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\cmake.cpp" /> <ClCompile Include="..\codeblocks.cpp" /> <ClCompile Include="..\create_project.cpp" /> <ClCompile Include="..\msbuild.cpp" /> @@ -103,6 +104,7 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command> <ClCompile Include="..\xcode.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\cmake.h" /> <ClInclude Include="..\codeblocks.h" /> <ClInclude Include="..\config.h" /> <ClInclude Include="..\create_project.h" /> diff --git a/devtools/create_project/msvc11/create_project.vcxproj b/devtools/create_project/msvc11/create_project.vcxproj index 8bbd25e9ba..09392a43e3 100644 --- a/devtools/create_project/msvc11/create_project.vcxproj +++ b/devtools/create_project/msvc11/create_project.vcxproj @@ -101,6 +101,7 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\cmake.cpp" /> <ClCompile Include="..\codeblocks.cpp" /> <ClCompile Include="..\create_project.cpp" /> <ClCompile Include="..\msbuild.cpp" /> @@ -109,6 +110,7 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command> <ClCompile Include="..\xcode.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\cmake.h" /> <ClInclude Include="..\codeblocks.h" /> <ClInclude Include="..\config.h" /> <ClInclude Include="..\create_project.h" /> diff --git a/devtools/create_project/msvc12/create_project.vcxproj b/devtools/create_project/msvc12/create_project.vcxproj index 6da1556547..3b38972e51 100644 --- a/devtools/create_project/msvc12/create_project.vcxproj +++ b/devtools/create_project/msvc12/create_project.vcxproj @@ -102,6 +102,7 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\cmake.cpp" /> <ClCompile Include="..\codeblocks.cpp" /> <ClCompile Include="..\create_project.cpp" /> <ClCompile Include="..\msbuild.cpp" /> @@ -110,6 +111,7 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command> <ClCompile Include="..\xcode.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\cmake.h" /> <ClInclude Include="..\codeblocks.h" /> <ClInclude Include="..\config.h" /> <ClInclude Include="..\create_project.h" /> diff --git a/devtools/create_project/msvc14/create_project.vcxproj b/devtools/create_project/msvc14/create_project.vcxproj index 3c0345f49c..839c834bb8 100644 --- a/devtools/create_project/msvc14/create_project.vcxproj +++ b/devtools/create_project/msvc14/create_project.vcxproj @@ -192,6 +192,7 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\cmake.cpp" /> <ClCompile Include="..\codeblocks.cpp" /> <ClCompile Include="..\create_project.cpp" /> <ClCompile Include="..\msbuild.cpp" /> @@ -200,6 +201,7 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command> <ClCompile Include="..\xcode.cpp" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\cmake.h" /> <ClInclude Include="..\codeblocks.h" /> <ClInclude Include="..\config.h" /> <ClInclude Include="..\create_project.h" /> diff --git a/devtools/create_project/msvc9/create_project.vcproj b/devtools/create_project/msvc9/create_project.vcproj index dc914248fb..eaa72099cc 100644 --- a/devtools/create_project/msvc9/create_project.vcproj +++ b/devtools/create_project/msvc9/create_project.vcproj @@ -170,6 +170,10 @@ > </File> <File + RelativePath="..\cmake.cpp" + > + </File> + <File RelativePath="..\codeblocks.cpp" > </File> @@ -200,6 +204,10 @@ > </File> <File + RelativePath="..\cmake.h" + > + </File> + <File RelativePath="..\codeblocks.h" > </File> diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd index fcbd8c534a..31d2a94416 100644 --- a/devtools/create_project/scripts/postbuild.cmd +++ b/devtools/create_project/scripts/postbuild.cmd @@ -59,7 +59,7 @@ echo Invalid installer parameter. Should be "0" or "1" (was %~5)! goto done
:error_script:
-echo An error occured while running the installer script!
+echo An error occurred while running the installer script!
goto done
:done
diff --git a/devtools/create_project/scripts/prebuild.cmd b/devtools/create_project/scripts/prebuild.cmd index fbab426137..0efaab190c 100644 --- a/devtools/create_project/scripts/prebuild.cmd +++ b/devtools/create_project/scripts/prebuild.cmd @@ -27,7 +27,7 @@ echo Invalid target folder (%~2)! goto done
:error_script:
-echo An error occured while running the revision script!
+echo An error occurred while running the revision script!
:done
exit /B0
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index babd530ad7..bfe7f522f0 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -26,58 +26,65 @@ #include <fstream> #include <algorithm> +#ifdef MACOSX +#include <sstream> +#include <iomanip> +#include <CommonCrypto/CommonCrypto.h> +#endif + namespace CreateProjectTool { #define DEBUG_XCODE_HASH 0 -#ifdef ENABLE_IOS #define IOS_TARGET 0 #define OSX_TARGET 1 -#define SIM_TARGET 2 -#else -#define OSX_TARGET 0 -#endif #define ADD_DEFINE(defines, name) \ defines.push_back(name); +#define REMOVE_DEFINE(defines, name) \ + { ValueList::iterator i = std::find(defines.begin(), defines.end(), name); if (i != defines.end()) defines.erase(i); } + +#define CONTAINS_DEFINE(defines, name) \ + (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); + config.settings[key] = Setting(value, "", kSettingsNoQuote, 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) { @@ -92,12 +99,64 @@ bool producesObjectFileOnOSX(const std::string &fileName) { return false; } +bool targetIsIOS(const std::string &targetName) { + return targetName.length() > 4 && targetName.substr(targetName.length() - 4) == "-iOS"; +} + +bool shouldSkipFileForTarget(const std::string &fileID, const std::string &targetName, const std::string &fileName) { + // Rules: + // - if the parent directory is "backends/platform/ios7", the file belongs to the iOS target. + // - if the parent directory is "/sdl", the file belongs to the OS X target. + // - if the file has a suffix, like "_osx", or "_ios", the file belongs to one of the target. + // - if the file is an OS X icon file (icns), it belongs to the OS X target. + std::string name, ext; + splitFilename(fileName, name, ext); + if (targetIsIOS(targetName)) { + // iOS target: we skip all files with the "_osx" suffix + if (name.length() > 4 && name.substr(name.length() - 4) == "_osx") { + return true; + } + // We don't need SDL for the iOS target + static const std::string sdl_directory = "/sdl/"; + static const std::string surfacesdl_directory = "/surfacesdl/"; + static const std::string doublebufferdl_directory = "/doublebuffersdl/"; + if (fileID.find(sdl_directory) != std::string::npos + || fileID.find(surfacesdl_directory) != std::string::npos + || fileID.find(doublebufferdl_directory) != std::string::npos) { + return true; + } + if (ext == "icns") { + return true; + } + } + else { + // Ugly hack: explicitly remove the browser.cpp file. + // The problem is that we have only one project for two different targets, + // and the parsing of the "mk" files added this file for both targets... + if (fileID.length() > 12 && fileID.substr(fileID.length() - 12) == "/browser.cpp") { + return true; + } + // OS X target: we skip all files with the "_ios" suffix + if (name.length() > 4 && name.substr(name.length() - 4) == "_ios") { + return true; + } + // parent directory + const std::string directory = fileID.substr(0, fileID.length() - fileName.length()); + static const std::string iphone_directory = "backends/platform/ios7"; + if (directory.length() > iphone_directory.length() && directory.substr(directory.length() - iphone_directory.length()) == iphone_directory) { + return true; + } + } + return false; +} + XcodeProvider::Group::Group(XcodeProvider *objectParent, const std::string &groupName, const std::string &uniqueName, const std::string &path) : Object(objectParent, uniqueName, groupName, "PBXGroup", "", groupName) { - addProperty("name", name, "", SettingsNoValue|SettingsQuoteVariable); - addProperty("sourceTree", "<group>", "", SettingsNoValue|SettingsQuoteVariable); - + bool path_is_absolute = (path.length() > 0 && path.at(0) == '/'); + 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; @@ -106,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"); } } @@ -151,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; @@ -180,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", "compiled.mach-o.executable", "", 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) @@ -212,28 +271,36 @@ XcodeProvider::XcodeProvider(StringList &global_warnings, std::map<std::string, _rootSourceGroup = NULL; } +void XcodeProvider::addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList) { + includeList.push_back(setup.srcDir + "/dists/ios7/Info.plist"); + + ValueList &resources = getResourceFiles(); + for (ValueList::iterator it = resources.begin(); it != resources.end(); ++it) { + includeList.push_back(setup.srcDir + "/" + *it); + } + + StringList td; + createModuleList(setup.srcDir + "/backends/platform/ios7", setup.defines, td, includeList, excludeList); +} + void XcodeProvider::createWorkspace(const BuildSetup &setup) { // Create project folder std::string workspace = setup.outputDir + '/' + PROJECT_NAME ".xcodeproj"; createDirectory(workspace); _projectRoot = setup.srcDir; touchGroupsForPath(_projectRoot); - + // Setup global objects setupDefines(setup); -#ifdef ENABLE_IOS - _targets.push_back(PROJECT_DESCRIPTION "-iPhone"); -#endif + _targets.push_back(PROJECT_DESCRIPTION "-iOS"); _targets.push_back(PROJECT_DESCRIPTION "-OS X"); -#ifdef ENABLE_IOS - _targets.push_back(PROJECT_DESCRIPTION "-Simulator"); -#endif setupCopyFilesBuildPhase(); - setupFrameworksBuildPhase(); + setupFrameworksBuildPhase(setup); setupNativeTarget(); setupProject(); setupResourcesBuildPhase(); - setupBuildConfiguration(); + setupBuildConfiguration(setup); + setupImageAssetCatalog(setup); } // We are done with constructing all the object graph and we got through every project, output the main project file @@ -274,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"; ////////////////////////////////////////////////////////////////////////// @@ -297,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"; } @@ -333,24 +400,30 @@ void XcodeProvider::setupCopyFilesBuildPhase() { #define DEF_SYSFRAMEWORK(framework) properties[framework".framework"] = FileProperty("wrapper.framework", framework".framework", "System/Library/Frameworks/" framework ".framework", "SDKROOT"); \ ADD_SETTING_ORDER_NOVALUE(children, getHash(framework".framework"), framework".framework", fwOrder++); - -#define DEF_LOCALLIB_STATIC(lib) properties[lib".a"] = FileProperty("archive.ar", lib".a", "/opt/local/lib/" lib ".a", "\"<group>\""); \ + +#define DEF_SYSTBD(lib) properties[lib".tbd"] = FileProperty("sourcecode.text-based-dylib-definition", lib".tbd", "usr/lib/" lib ".tbd", "SDKROOT"); \ + ADD_SETTING_ORDER_NOVALUE(children, getHash(lib".tbd"), lib".tbd", fwOrder++); + +#define DEF_LOCALLIB_STATIC_PATH(path,lib,absolute) properties[lib".a"] = FileProperty("archive.ar", lib ".a", path, (absolute ? "\"<absolute>\"" : "\"<group>\"")); \ ADD_SETTING_ORDER_NOVALUE(children, getHash(lib".a"), lib".a", fwOrder++); +#define DEF_LOCALLIB_STATIC(lib) DEF_LOCALLIB_STATIC_PATH("/opt/local/lib/" lib ".a", lib, true) + + /** * Sets up the frameworks build phase. * * (each native target has different build rules) */ -void XcodeProvider::setupFrameworksBuildPhase() { - _frameworksBuildPhase.comment = "PBXFrameworksBuildPhase"; +void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) { + _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; @@ -362,6 +435,8 @@ void XcodeProvider::setupFrameworksBuildPhase() { DEF_SYSFRAMEWORK("Carbon"); DEF_SYSFRAMEWORK("Cocoa"); DEF_SYSFRAMEWORK("CoreAudio"); + DEF_SYSFRAMEWORK("CoreMIDI"); + DEF_SYSFRAMEWORK("CoreGraphics"); DEF_SYSFRAMEWORK("CoreFoundation"); DEF_SYSFRAMEWORK("CoreMIDI"); DEF_SYSFRAMEWORK("Foundation"); @@ -370,8 +445,7 @@ void XcodeProvider::setupFrameworksBuildPhase() { DEF_SYSFRAMEWORK("QuartzCore"); DEF_SYSFRAMEWORK("QuickTime"); DEF_SYSFRAMEWORK("UIKit"); - // Optionals: - DEF_SYSFRAMEWORK("OpenGL"); + DEF_SYSTBD("libiconv"); // Local libraries DEF_LOCALLIB_STATIC("libFLAC"); @@ -380,64 +454,105 @@ void XcodeProvider::setupFrameworksBuildPhase() { DEF_LOCALLIB_STATIC("libfreetype"); // DEF_LOCALLIB_STATIC("libmpeg2"); - frameworksGroup->properties["children"] = children; + std::string absoluteOutputDir; +#ifdef POSIX + char *c_path = realpath(setup.outputDir.c_str(), NULL); + absoluteOutputDir = c_path; + absoluteOutputDir += "/lib"; + free(c_path); +#else + absoluteOutputDir = "lib"; +#endif + + DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libFLAC.a", "libFLAC", true); + DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libfreetype.a", "libfreetype", true); + DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libogg.a", "libogg", true); + DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libpng.a", "libpng", true); + DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libvorbis.a", "libvorbis", true); + DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libmad.a", "libmad", true); + DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libfluidsynth.a", "libfluidsynth", true); + DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libglib.a", "libglib", true); + DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libffi.a", "libffi", true); + + frameworksGroup->_properties["children"] = children; _groups.add(frameworksGroup); // Force this to be added as a sub-group in the root. _rootSourceGroup->addChildGroup(frameworksGroup); - // Declare this here, as it's used across the three targets + // Declare this here, as it's used across all the targets int order = 0; -#ifdef ENABLE_IOS + ////////////////////////////////////////////////////////////////////////// - // iPhone + // 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 iPhone_files; - iPhone_files.hasOrder = true; - iPhone_files.flags = SettingsAsList; - - ValueList frameworks_iPhone; - frameworks_iPhone.push_back("CoreAudio.framework"); - frameworks_iPhone.push_back("CoreFoundation.framework"); - frameworks_iPhone.push_back("Foundation.framework"); - frameworks_iPhone.push_back("UIKit.framework"); - frameworks_iPhone.push_back("AudioToolbox.framework"); - frameworks_iPhone.push_back("QuartzCore.framework"); - frameworks_iPhone.push_back("libmad.a"); - //frameworks_iPhone.push_back("libmpeg2.a"); - frameworks_iPhone.push_back("libFLAC.a"); - frameworks_iPhone.push_back("libvorbisidec.a"); - frameworks_iPhone.push_back("OpenGLES.framework"); - - for (ValueList::iterator framework = frameworks_iPhone.begin(); framework != frameworks_iPhone.end(); framework++) { + Property iOS_files; + iOS_files._hasOrder = true; + iOS_files._flags = kSettingsAsList; + + ValueList frameworks_iOS; + frameworks_iOS.push_back("CoreAudio.framework"); + frameworks_iOS.push_back("CoreGraphics.framework"); + frameworks_iOS.push_back("CoreFoundation.framework"); + frameworks_iOS.push_back("Foundation.framework"); + frameworks_iOS.push_back("UIKit.framework"); + frameworks_iOS.push_back("AudioToolbox.framework"); + frameworks_iOS.push_back("QuartzCore.framework"); + frameworks_iOS.push_back("OpenGLES.framework"); + + if (CONTAINS_DEFINE(setup.defines, "USE_FLAC")) { + frameworks_iOS.push_back("libFLAC.a"); + } + if (CONTAINS_DEFINE(setup.defines, "USE_FREETYPE2")) { + frameworks_iOS.push_back("libfreetype.a"); + } + if (CONTAINS_DEFINE(setup.defines, "USE_PNG")) { + frameworks_iOS.push_back("libpng.a"); + } + if (CONTAINS_DEFINE(setup.defines, "USE_VORBIS")) { + frameworks_iOS.push_back("libogg.a"); + frameworks_iOS.push_back("libvorbis.a"); + } + if (CONTAINS_DEFINE(setup.defines, "USE_MAD")) { + frameworks_iOS.push_back("libmad.a"); + } + if (CONTAINS_DEFINE(setup.defines, "USE_FLUIDSYNTH")) { + frameworks_iOS.push_back("libfluidsynth.a"); + frameworks_iOS.push_back("libglib.a"); + frameworks_iOS.push_back("libffi.a"); + frameworks_iOS.push_back("CoreMIDI.framework"); + frameworks_iOS.push_back("libiconv.tbd"); + } + + for (ValueList::iterator framework = frameworks_iOS.begin(); framework != frameworks_iOS.end(); framework++) { std::string id = "Frameworks_" + *framework + "_iphone"; std::string comment = *framework + " in Frameworks"; - ADD_SETTING_ORDER_NOVALUE(iPhone_files, getHash(id), comment, order++); + ADD_SETTING_ORDER_NOVALUE(iOS_files, getHash(id), comment, order++); ADD_BUILD_FILE(id, *framework, getHash(*framework), comment); ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]); } - framework_iPhone->properties["files"] = iPhone_files; + framework_iPhone->_properties["files"] = iOS_files; _frameworksBuildPhase.add(framework_iPhone); -#endif + ////////////////////////////////////////////////////////////////////////// // 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"); @@ -452,8 +567,6 @@ void XcodeProvider::setupFrameworksBuildPhase() { frameworks_osx.push_back("IOKit.framework"); frameworks_osx.push_back("Cocoa.framework"); frameworks_osx.push_back("AudioUnit.framework"); - // Optionals: - frameworks_osx.push_back("OpenGL.framework"); order = 0; for (ValueList::iterator framework = frameworks_osx.begin(); framework != frameworks_osx.end(); framework++) { @@ -465,81 +578,40 @@ void XcodeProvider::setupFrameworksBuildPhase() { ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]); } - framework_OSX->properties["files"] = osx_files; + framework_OSX->_properties["files"] = osx_files; _frameworksBuildPhase.add(framework_OSX); -#ifdef ENABLE_IOS - ////////////////////////////////////////////////////////////////////////// - // Simulator - Object *framework_simulator = new Object(this, "PBXFrameworksBuildPhase_" + _targets[SIM_TARGET], "PBXFrameworksBuildPhase", "PBXFrameworksBuildPhase", "", "Frameworks"); - - framework_simulator->addProperty("buildActionMask", "2147483647", "", SettingsNoValue); - framework_simulator->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue); - - // List of frameworks - Property simulator_files; - simulator_files.hasOrder = true; - simulator_files.flags = SettingsAsList; - - ValueList frameworks_simulator; - frameworks_simulator.push_back("CoreAudio.framework"); - frameworks_simulator.push_back("CoreFoundation.framework"); - frameworks_simulator.push_back("Foundation.framework"); - frameworks_simulator.push_back("UIKit.framework"); - frameworks_simulator.push_back("AudioToolbox.framework"); - frameworks_simulator.push_back("QuartzCore.framework"); - frameworks_simulator.push_back("OpenGLES.framework"); - - order = 0; - for (ValueList::iterator framework = frameworks_simulator.begin(); framework != frameworks_simulator.end(); framework++) { - std::string id = "Frameworks_" + *framework + "_simulator"; - std::string comment = *framework + " in Frameworks"; - - ADD_SETTING_ORDER_NOVALUE(simulator_files, getHash(id), comment, order++); - ADD_BUILD_FILE(id, *framework, getHash(*framework), comment); - ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]); - } - - framework_simulator->properties["files"] = simulator_files; - - _frameworksBuildPhase.add(framework_simulator); -#endif } 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_" , ""); // Output native target section for (unsigned int i = 0; i < _targets.size(); i++) { -#ifndef ENABLE_IOS - if (i != OSX_TARGET) { // TODO: Fix iOS-targets, for now just disable them. - continue; - } -#endif 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); } @@ -548,225 +620,155 @@ 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("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; -#ifdef ENABLE_IOS - targets.settings[getHash("PBXNativeTarget_" + _targets[IOS_TARGET])] = Setting("", _targets[IOS_TARGET], SettingsNoValue, 0, 0); -#endif - targets.settings[getHash("PBXNativeTarget_" + _targets[OSX_TARGET])] = Setting("", _targets[OSX_TARGET], SettingsNoValue, 0, 1); -#ifdef ENABLE_IOS - targets.settings[getHash("PBXNativeTarget_" + _targets[SIM_TARGET])] = Setting("", _targets[SIM_TARGET], SettingsNoValue, 0, 2); -#endif - project->properties["targets"] = targets; -#ifndef ENABLE_IOS + 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; -#endif + project->_properties["targets"]._flags |= kSettingsSingleItem; _project.add(project); } +XcodeProvider::ValueList& XcodeProvider::getResourceFiles() const { + static ValueList files; + if (files.empty()) { + files.push_back("gui/themes/scummclassic.zip"); + files.push_back("gui/themes/scummmodern.zip"); + files.push_back("gui/themes/translations.dat"); + files.push_back("dists/engine-data/drascula.dat"); + files.push_back("dists/engine-data/hugo.dat"); + files.push_back("dists/engine-data/kyra.dat"); + files.push_back("dists/engine-data/lure.dat"); + files.push_back("dists/engine-data/mort.dat"); + files.push_back("dists/engine-data/neverhood.dat"); + files.push_back("dists/engine-data/queen.tbl"); + files.push_back("dists/engine-data/sky.cpt"); + files.push_back("dists/engine-data/teenagent.dat"); + files.push_back("dists/engine-data/tony.dat"); + files.push_back("dists/engine-data/toon.dat"); + files.push_back("dists/engine-data/wintermute.zip"); + files.push_back("dists/pred.dic"); + files.push_back("icons/scummvm.icns"); + } + return files; +} + void XcodeProvider::setupResourcesBuildPhase() { - _resourcesBuildPhase.comment = "PBXResourcesBuildPhase"; + _resourcesBuildPhase._comment = "PBXResourcesBuildPhase"; - // Setup resource file properties - std::map<std::string, FileProperty> properties; - properties["scummclassic.zip"] = FileProperty("archive.zip", "", "scummclassic.zip", "\"<group>\""); - properties["scummmodern.zip"] = FileProperty("archive.zip", "", "scummmodern.zip", "\"<group>\""); - - properties["kyra.dat"] = FileProperty("file", "", "kyra.dat", "\"<group>\""); - properties["lure.dat"] = FileProperty("file", "", "lure.dat", "\"<group>\""); - properties["queen.tbl"] = FileProperty("file", "", "queen.tbl", "\"<group>\""); - properties["sky.cpt"] = FileProperty("file", "", "sky.cpt", "\"<group>\""); - properties["drascula.dat"] = FileProperty("file", "", "drascula.dat", "\"<group>\""); - properties["hugo.dat"] = FileProperty("file", "", "hugo.dat", "\"<group>\""); - properties["teenagent.dat"] = FileProperty("file", "", "teenagent.dat", "\"<group>\""); - properties["toon.dat"] = FileProperty("file", "", "toon.dat", "\"<group>\""); - - properties["Default.png"] = FileProperty("image.png", "", "Default.png", "\"<group>\""); - properties["icon.png"] = FileProperty("image.png", "", "icon.png", "\"<group>\""); - properties["icon-72.png"] = FileProperty("image.png", "", "icon-72.png", "\"<group>\""); - properties["icon4.png"] = FileProperty("image.png", "", "icon4.png", "\"<group>\""); + ValueList &files_list = getResourceFiles(); // Same as for containers: a rule for each native target 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; - - ValueList files_list; - files_list.push_back("scummclassic.zip"); - files_list.push_back("scummmodern.zip"); - files_list.push_back("kyra.dat"); - files_list.push_back("lure.dat"); - files_list.push_back("queen.tbl"); - files_list.push_back("sky.cpt"); - files_list.push_back("Default.png"); - files_list.push_back("icon.png"); - files_list.push_back("icon-72.png"); - files_list.push_back("icon4.png"); - files_list.push_back("drascula.dat"); - files_list.push_back("hugo.dat"); - files_list.push_back("teenagent.dat"); - files_list.push_back("toon.dat"); + files._hasOrder = true; + files._flags = kSettingsAsList; int order = 0; for (ValueList::iterator file = files_list.begin(); file != files_list.end(); file++) { - std::string id = "PBXResources_" + *file; - std::string comment = *file + " in Resources"; - - ADD_SETTING_ORDER_NOVALUE(files, getHash(id), comment, order++); - // TODO Fix crash when adding build file for data - //ADD_BUILD_FILE(id, *file, comment); - ADD_FILE_REFERENCE(*file, *file, properties[*file]); - } - - // Add custom files depending on the target - if (_targets[i] == PROJECT_DESCRIPTION "-OS X") { - files.settings[getHash("PBXResources_" PROJECT_NAME ".icns")] = Setting("", PROJECT_NAME ".icns in Resources", SettingsNoValue, 0, 6); - - // Remove 2 iphone icon files - files.settings.erase(getHash("PBXResources_Default.png")); - files.settings.erase(getHash("PBXResources_icon.png")); + if (shouldSkipFileForTarget(*file, _targets[i], *file)) { + continue; + } + std::string resourceAbsolutePath = _projectRoot + "/" + *file; + std::string file_id = "FileReference_" + resourceAbsolutePath; + std::string base = basename(*file); + std::string comment = base + " in Resources"; + addBuildFile(resourceAbsolutePath, base, getHash(file_id), comment); + 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"; - - // Setup source file properties - std::map<std::string, FileProperty> properties; + _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) { - if (!producesObjectFileOnOSX((*file)->name)) { + 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 = (*file)->name + " in Sources"; - ADD_SETTING_ORDER_NOVALUE(files, getHash((*file)->id), comment, order++); + std::string comment = fileName + " in Sources"; + ADD_SETTING_ORDER_NOVALUE(files, getHash((*file)->_id), comment, order++); } - source->properties["files"] = files; + setupAdditionalSources(targetName, files, order); - source->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue); + source->_properties["files"] = files; + + source->addProperty("runOnlyForDeploymentPostprocessing", "0", "", kSettingsNoValue); _sourcesBuildPhase.add(source); } } // Setup all build configurations -void XcodeProvider::setupBuildConfiguration() { +void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) { - _buildConfiguration.comment = "XCBuildConfiguration"; - _buildConfiguration.flags = SettingsAsList; + _buildConfiguration._comment = "XCBuildConfiguration"; + _buildConfiguration._flags = kSettingsAsList; - ///**************************************** - // * iPhone - // ****************************************/ -#ifdef ENABLE_IOS - // Debug - Object *iPhone_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Debug", _targets[IOS_TARGET] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); - Property iPhone_Debug; - ADD_SETTING_QUOTE(iPhone_Debug, "ARCHS", "$(ARCHS_UNIVERSAL_IPHONE_OS)"); - ADD_SETTING_QUOTE(iPhone_Debug, "CODE_SIGN_IDENTITY", "iPhone Developer"); - ADD_SETTING_QUOTE_VAR(iPhone_Debug, "CODE_SIGN_IDENTITY[sdk=iphoneos*]", "iPhone Developer"); - ADD_SETTING(iPhone_Debug, "COMPRESS_PNG_FILES", "NO"); - ADD_SETTING(iPhone_Debug, "COPY_PHASE_STRIP", "NO"); - ADD_SETTING_QUOTE(iPhone_Debug, "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym"); - 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(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"); - ADD_SETTING(iPhone_Debug, "GCC_OPTIMIZATION_LEVEL", "0"); - ADD_SETTING(iPhone_Debug, "GCC_PRECOMPILE_PREFIX_HEADER", "NO"); - ADD_SETTING_QUOTE(iPhone_Debug, "GCC_PREFIX_HEADER", ""); - ADD_SETTING(iPhone_Debug, "GCC_THUMB_SUPPORT", "NO"); - ADD_SETTING(iPhone_Debug, "GCC_UNROLL_LOOPS", "YES"); - ValueList iPhone_HeaderSearchPaths; - iPhone_HeaderSearchPaths.push_back("$(SRCROOT)/engines/"); - iPhone_HeaderSearchPaths.push_back("$(SRCROOT)"); - iPhone_HeaderSearchPaths.push_back("include/"); - ADD_SETTING_LIST(iPhone_Debug, "HEADER_SEARCH_PATHS", iPhone_HeaderSearchPaths, SettingsAsList|SettingsQuoteVariable, 5); - ADD_SETTING(iPhone_Debug, "INFOPLIST_FILE", "Info.plist"); - ValueList iPhone_LibPaths; - iPhone_LibPaths.push_back("$(inherited)"); - iPhone_LibPaths.push_back("\"$(SRCROOT)/lib\""); - ADD_SETTING_LIST(iPhone_Debug, "LIBRARY_SEARCH_PATHS", iPhone_LibPaths, SettingsAsList, 5); - ADD_SETTING(iPhone_Debug, "ONLY_ACTIVE_ARCH", "YES"); - ADD_SETTING(iPhone_Debug, "PREBINDING", "NO"); - ADD_SETTING(iPhone_Debug, "PRODUCT_NAME", PROJECT_DESCRIPTION); - ADD_SETTING_QUOTE(iPhone_Debug, "PROVISIONING_PROFILE", "EF590570-5FAC-4346-9071-D609DE2B28D8"); - ADD_SETTING_QUOTE_VAR(iPhone_Debug, "PROVISIONING_PROFILE[sdk=iphoneos*]", ""); - ADD_SETTING(iPhone_Debug, "SDKROOT", "iphoneos4.0"); - ADD_SETTING_QUOTE(iPhone_Debug, "TARGETED_DEVICE_FAMILY", "1,2"); - - iPhone_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue); - 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"); - Property iPhone_Release(iPhone_Debug); - ADD_SETTING(iPhone_Release, "GCC_OPTIMIZATION_LEVEL", "3"); - ADD_SETTING(iPhone_Release, "COPY_PHASE_STRIP", "YES"); - REMOVE_SETTING(iPhone_Release, "GCC_DYNAMIC_NO_PIC"); - ADD_SETTING(iPhone_Release, "WRAPPER_EXTENSION", "app"); - - iPhone_Release_Object->addProperty("name", "Release", "", SettingsNoValue); - iPhone_Release_Object->properties["buildSettings"] = iPhone_Release; - - _buildConfiguration.add(iPhone_Debug_Object); - _buildConfiguration.add(iPhone_Release_Object); + std::string projectOutputDirectory; +#ifdef POSIX + char *rp = realpath(setup.outputDir.c_str(), NULL); + projectOutputDirectory = rp; + free(rp); #endif + /**************************************** - * scummvm + * ScummVM - Project Level ****************************************/ // Debug @@ -774,7 +776,6 @@ void XcodeProvider::setupBuildConfiguration() { Property scummvm_Debug; ADD_SETTING(scummvm_Debug, "ALWAYS_SEARCH_USER_PATHS", "NO"); ADD_SETTING_QUOTE(scummvm_Debug, "USER_HEADER_SEARCH_PATHS", "$(SRCROOT) $(SRCROOT)/engines"); - ADD_SETTING_QUOTE(scummvm_Debug, "ARCHS", "$(ARCHS_STANDARD_32_BIT)"); ADD_SETTING_QUOTE(scummvm_Debug, "CODE_SIGN_IDENTITY", "Don't Code Sign"); ADD_SETTING_QUOTE_VAR(scummvm_Debug, "CODE_SIGN_IDENTITY[sdk=iphoneos*]", "Don't Code Sign"); ADD_SETTING_QUOTE(scummvm_Debug, "FRAMEWORK_SEARCH_PATHS", ""); @@ -784,10 +785,12 @@ void XcodeProvider::setupBuildConfiguration() { ADD_SETTING(scummvm_Debug, "GCC_INPUT_FILETYPE", "automatic"); ADD_SETTING(scummvm_Debug, "GCC_OPTIMIZATION_LEVEL", "0"); ValueList scummvm_defines(_defines); - ADD_DEFINE(scummvm_defines, "IPHONE"); - ADD_DEFINE(scummvm_defines, "XCODE"); - ADD_DEFINE(scummvm_defines, "IPHONE_OFFICIAL"); - ADD_SETTING_LIST(scummvm_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, SettingsNoQuote|SettingsAsList, 5); + REMOVE_DEFINE(scummvm_defines, "MACOSX"); + REMOVE_DEFINE(scummvm_defines, "IPHONE"); + REMOVE_DEFINE(scummvm_defines, "IPHONE_IOS7"); + REMOVE_DEFINE(scummvm_defines, "IPHONE_SANDBOXED"); + REMOVE_DEFINE(scummvm_defines, "SDL_BACKEND"); + 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"); @@ -796,16 +799,16 @@ void XcodeProvider::setupBuildConfiguration() { 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", ""); ADD_SETTING_QUOTE(scummvm_Debug, "OTHER_LDFLAGS", "-lz"); ADD_SETTING(scummvm_Debug, "PREBINDING", "NO"); - ADD_SETTING(scummvm_Debug, "SDKROOT", "macosx"); + 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"); @@ -814,24 +817,100 @@ void XcodeProvider::setupBuildConfiguration() { REMOVE_SETTING(scummvm_Release, "GCC_WARN_ABOUT_RETURN_TYPE"); REMOVE_SETTING(scummvm_Release, "GCC_WARN_UNUSED_VARIABLE"); 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); + ///**************************************** + // * ScummVM - iOS Target + // ****************************************/ + + // Debug + Object *iPhone_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Debug", _targets[IOS_TARGET] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); + Property iPhone_Debug; + ADD_SETTING_QUOTE(iPhone_Debug, "CODE_SIGN_IDENTITY", "iPhone Developer"); + ADD_SETTING_QUOTE_VAR(iPhone_Debug, "CODE_SIGN_IDENTITY[sdk=iphoneos*]", "iPhone Developer"); + ADD_SETTING(iPhone_Debug, "COMPRESS_PNG_FILES", "NO"); + ADD_SETTING(iPhone_Debug, "COPY_PHASE_STRIP", "NO"); + ADD_SETTING_QUOTE(iPhone_Debug, "DEBUG_INFORMATION_FORMAT", "dwarf"); + 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, 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"); + ADD_SETTING(iPhone_Debug, "GCC_OPTIMIZATION_LEVEL", "0"); + ADD_SETTING(iPhone_Debug, "GCC_PRECOMPILE_PREFIX_HEADER", "NO"); + ADD_SETTING(iPhone_Debug, "GCC_WARN_64_TO_32_BIT_CONVERSION", "NO"); + ADD_SETTING(iPhone_Debug, "WARNING_CFLAGS", "-Wno-multichar"); + ADD_SETTING_QUOTE(iPhone_Debug, "GCC_PREFIX_HEADER", ""); + ADD_SETTING(iPhone_Debug, "GCC_THUMB_SUPPORT", "NO"); + ADD_SETTING(iPhone_Debug, "GCC_UNROLL_LOOPS", "YES"); + ValueList iPhone_HeaderSearchPaths; + iPhone_HeaderSearchPaths.push_back("$(SRCROOT)/engines/"); + 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, 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, kSettingsAsList, 5); + ADD_SETTING(iPhone_Debug, "ONLY_ACTIVE_ARCH", "YES"); + ADD_SETTING(iPhone_Debug, "PREBINDING", "NO"); + ADD_SETTING(iPhone_Debug, "PRODUCT_NAME", PROJECT_NAME); + ADD_SETTING(iPhone_Debug, "PRODUCT_BUNDLE_IDENTIFIER", "\"org.scummvm.${PRODUCT_NAME}\""); + ADD_SETTING(iPhone_Debug, "IPHONEOS_DEPLOYMENT_TARGET", "7.1"); + //ADD_SETTING_QUOTE(iPhone_Debug, "PROVISIONING_PROFILE", "EF590570-5FAC-4346-9071-D609DE2B28D8"); + ADD_SETTING_QUOTE_VAR(iPhone_Debug, "PROVISIONING_PROFILE[sdk=iphoneos*]", ""); + ADD_SETTING(iPhone_Debug, "SDKROOT", "iphoneos"); + ADD_SETTING_QUOTE(iPhone_Debug, "TARGETED_DEVICE_FAMILY", "1,2"); + ValueList scummvmIOS_defines; + ADD_DEFINE(scummvmIOS_defines, "\"$(inherited)\""); + ADD_DEFINE(scummvmIOS_defines, "IPHONE"); + ADD_DEFINE(scummvmIOS_defines, "IPHONE_IOS7"); + ADD_DEFINE(scummvmIOS_defines, "IPHONE_SANDBOXED"); + 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", "", 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"); + Property iPhone_Release(iPhone_Debug); + ADD_SETTING(iPhone_Release, "GCC_OPTIMIZATION_LEVEL", "3"); + ADD_SETTING(iPhone_Release, "COPY_PHASE_STRIP", "YES"); + REMOVE_SETTING(iPhone_Release, "GCC_DYNAMIC_NO_PIC"); + ADD_SETTING(iPhone_Release, "WRAPPER_EXTENSION", "app"); + REMOVE_SETTING(iPhone_Release, "DEBUG_INFORMATION_FORMAT"); + ADD_SETTING_QUOTE(iPhone_Release, "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym"); + + iPhone_Release_Object->addProperty("name", "Release", "", kSettingsNoValue); + iPhone_Release_Object->_properties["buildSettings"] = iPhone_Release; + + _buildConfiguration.add(iPhone_Debug_Object); + _buildConfiguration.add(iPhone_Release_Object); + /**************************************** - * ScummVM-OS X + * ScummVM - OS X Target ****************************************/ // Debug Object *scummvmOSX_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-OSX_Debug", _targets[OSX_TARGET] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); Property scummvmOSX_Debug; - ADD_SETTING_QUOTE(scummvmOSX_Debug, "ARCHS", "$(NATIVE_ARCH)"); + ADD_SETTING(scummvmOSX_Debug, "COMBINE_HIDPI_IMAGES", "YES"); + ADD_SETTING(scummvmOSX_Debug, "SDKROOT", "macosx"); ADD_SETTING(scummvmOSX_Debug, "COMPRESS_PNG_FILES", "NO"); ADD_SETTING(scummvmOSX_Debug, "COPY_PHASE_STRIP", "NO"); - ADD_SETTING_QUOTE(scummvmOSX_Debug, "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym"); + ADD_SETTING_QUOTE(scummvmOSX_Debug, "DEBUG_INFORMATION_FORMAT", "dwarf"); ADD_SETTING_QUOTE(scummvmOSX_Debug, "FRAMEWORK_SEARCH_PATHS", ""); ADD_SETTING(scummvmOSX_Debug, "GCC_C_LANGUAGE_STANDARD", "c99"); ADD_SETTING(scummvmOSX_Debug, "GCC_ENABLE_CPP_EXCEPTIONS", "NO"); @@ -841,29 +920,33 @@ void XcodeProvider::setupBuildConfiguration() { ADD_SETTING(scummvmOSX_Debug, "GCC_OPTIMIZATION_LEVEL", "0"); ADD_SETTING(scummvmOSX_Debug, "GCC_PRECOMPILE_PREFIX_HEADER", "NO"); ADD_SETTING_QUOTE(scummvmOSX_Debug, "GCC_PREFIX_HEADER", ""); - ValueList scummvmOSX_defines(_defines); + ValueList scummvmOSX_defines; + 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"); + if (setup.useSDL2) { + scummvmOSX_HeaderPaths.push_back("/opt/local/include/SDL2"); + } else { + scummvmOSX_HeaderPaths.push_back("/opt/local/include/SDL"); + } scummvmOSX_HeaderPaths.push_back("/opt/local/include"); scummvmOSX_HeaderPaths.push_back("/opt/local/include/freetype2"); 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"); scummvmOSX_LdFlags.push_back("-logg"); scummvmOSX_LdFlags.push_back("-lpng"); scummvmOSX_LdFlags.push_back("-ljpeg"); @@ -873,14 +956,20 @@ void XcodeProvider::setupBuildConfiguration() { scummvmOSX_LdFlags.push_back("-lvorbis"); scummvmOSX_LdFlags.push_back("-lmad"); scummvmOSX_LdFlags.push_back("-lFLAC"); - scummvmOSX_LdFlags.push_back("-lSDL"); + if (setup.useSDL2) { + scummvmOSX_LdFlags.push_back("-lSDL2main"); + scummvmOSX_LdFlags.push_back("-lSDL2"); + } else { + scummvmOSX_LdFlags.push_back("-lSDLmain"); + 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_DESCRIPTION); + 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"); @@ -889,68 +978,51 @@ void XcodeProvider::setupBuildConfiguration() { REMOVE_SETTING(scummvmOSX_Release, "GCC_DYNAMIC_NO_PIC"); REMOVE_SETTING(scummvmOSX_Release, "GCC_OPTIMIZATION_LEVEL"); ADD_SETTING(scummvmOSX_Release, "WRAPPER_EXTENSION", "app"); + 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); -#ifdef ENABLE_IOS - /**************************************** - * ScummVM-Simulator - ****************************************/ - - // Debug - Object *scummvmSimulator_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Debug", _targets[SIM_TARGET] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); - Property scummvmSimulator_Debug(iPhone_Debug); - ADD_SETTING_QUOTE(scummvmSimulator_Debug, "FRAMEWORK_SEARCH_PATHS", "$(inherited)"); - ADD_SETTING_LIST(scummvmSimulator_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, SettingsNoQuote|SettingsAsList, 5); - ADD_SETTING(scummvmSimulator_Debug, "SDKROOT", "iphonesimulator3.2"); - ADD_SETTING_QUOTE(scummvmSimulator_Debug, "VALID_ARCHS", "i386 x86_64"); - REMOVE_SETTING(scummvmSimulator_Debug, "TARGETED_DEVICE_FAMILY"); - - scummvmSimulator_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue); - scummvmSimulator_Debug_Object->properties["buildSettings"] = scummvmSimulator_Debug; - - // Release - Object *scummvmSimulator_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Release", _targets[SIM_TARGET] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); - Property scummvmSimulator_Release(scummvmSimulator_Debug); - ADD_SETTING(scummvmSimulator_Release, "COPY_PHASE_STRIP", "YES"); - ADD_SETTING(scummvmSimulator_Release, "GCC_OPTIMIZATION_LEVEL", "3"); - REMOVE_SETTING(scummvmSimulator_Release, "GCC_DYNAMIC_NO_PIC"); - ADD_SETTING(scummvmSimulator_Release, "WRAPPER_EXTENSION", "app"); - - scummvmSimulator_Release_Object->addProperty("name", "Release", "", SettingsNoValue); - scummvmSimulator_Release_Object->properties["buildSettings"] = scummvmSimulator_Release; - - _buildConfiguration.add(scummvmSimulator_Debug_Object); - _buildConfiguration.add(scummvmSimulator_Release_Object); - ////////////////////////////////////////////////////////////////////////// - // Configuration List - _configurationList.comment = "XCConfigurationList"; - _configurationList.flags = SettingsAsList; -#endif // 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); } } +void XcodeProvider::setupImageAssetCatalog(const BuildSetup &setup) { + const std::string filename = "Images.xcassets"; + const std::string absoluteCatalogPath = _projectRoot + "/dists/ios7/" + filename; + const std::string id = "FileReference_" + absoluteCatalogPath; + Group *group = touchGroupsForPath(absoluteCatalogPath); + group->addChildFile(filename); + addBuildFile(absoluteCatalogPath, filename, getHash(id), "Image Asset Catalog"); +} + +void XcodeProvider::setupAdditionalSources(std::string targetName, Property &files, int &order) { + if (targetIsIOS(targetName)) { + const std::string absoluteCatalogPath = _projectRoot + "/dists/ios7/Images.xcassets"; + ADD_SETTING_ORDER_NOVALUE(files, getHash(absoluteCatalogPath), "Image Asset Catalog", order++); + } +} + ////////////////////////////////////////////////////////////////////////// // Misc ////////////////////////////////////////////////////////////////////////// @@ -959,15 +1031,18 @@ void XcodeProvider::setupBuildConfiguration() { 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); } // Add special defines for Mac support + REMOVE_DEFINE(_defines, "MACOSX"); + REMOVE_DEFINE(_defines, "IPHONE"); + REMOVE_DEFINE(_defines, "IPHONE_IOS7"); + REMOVE_DEFINE(_defines, "IPHONE_SANDBOXED"); + REMOVE_DEFINE(_defines, "SDL_BACKEND"); ADD_DEFINE(_defines, "CONFIG_H"); - ADD_DEFINE(_defines, "SCUMM_NEED_ALIGNMENT"); - ADD_DEFINE(_defines, "SCUMM_LITTLE_ENDIAN"); ADD_DEFINE(_defines, "UNIX"); ADD_DEFINE(_defines, "SCUMMVM"); } @@ -976,7 +1051,6 @@ void XcodeProvider::setupDefines(const BuildSetup &setup) { // Object hash ////////////////////////////////////////////////////////////////////////// -// TODO use md5 to compute a file hash (and fall back to standard key generation if not passed a file) std::string XcodeProvider::getHash(std::string key) { #if DEBUG_XCODE_HASH @@ -988,14 +1062,32 @@ std::string XcodeProvider::getHash(std::string key) { return hashIterator->second; // Generate a new key from the file hash and insert it into the dictionary +#ifdef MACOSX + std::string hash = md5(key); +#else std::string hash = newHash(); +#endif + _hashDictionnary[key] = hash; return hash; #endif } -bool isSeparator (char s) { return (s == '-'); } +bool isSeparator(char s) { return (s == '-'); } + +#ifdef MACOSX +std::string XcodeProvider::md5(std::string key) { + unsigned char md[CC_MD5_DIGEST_LENGTH]; + CC_MD5(key.c_str(), (CC_LONG) key.length(), md); + std::stringstream stream; + stream << std::hex << std::setfill('0') << std::setw(2); + for (int i=0; i<CC_MD5_DIGEST_LENGTH; i++) { + stream << (unsigned int) md[i]; + } + return stream.str(); +} +#endif std::string XcodeProvider::newHash() const { std::string hash = createUUID(); @@ -1018,10 +1110,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; } @@ -1032,30 +1124,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); + output += writeSetting(setting->first, setting->second); - // The combination of SettingsAsList, and SettingsSingleItem should use "," and not ";" (i.e children + // The combination of kSettingsAsList, 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; } @@ -1068,32 +1160,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 + " */"; } @@ -1101,24 +1192,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 2686d14986..d495dd0dfd 100644 --- a/devtools/create_project/xcode.h +++ b/devtools/create_project/xcode.h @@ -40,6 +40,8 @@ protected: void createOtherBuildFiles(const BuildSetup &setup); + void addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList); + void createProjectFile(const std::string &name, const std::string &uuid, const BuildSetup &setup, const std::string &moduleDir, const StringList &includeList, const StringList &excludeList); @@ -47,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) { } }; @@ -73,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)); } }; @@ -107,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, ValueList values, int flgs = 0, int indent = 0, bool order = false) : flags(flgs), hasOrder(order) { - Setting setting(values, 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); } - // 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; @@ -160,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"; @@ -209,50 +200,59 @@ 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()); + assert(!_properties.empty()); + assert(!_properties["isa"]._settings.empty()); - SettingList::iterator it = properties["isa"].settings.begin(); + SettingList::iterator it = _properties["isa"]._settings.begin(); - return (*it).first; + 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) { + for (std::vector<Object *>::iterator it = _objects.begin(); it != _objects.end(); ++it) { + if ((*it)->_id == id) { + return *it; + } + } + return NULL; } 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; } @@ -271,10 +271,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 @@ -312,18 +312,26 @@ private: // Setup objects void setupCopyFilesBuildPhase(); - void setupFrameworksBuildPhase(); + void setupFrameworksBuildPhase(const BuildSetup &setup); void setupNativeTarget(); void setupProject(); void setupResourcesBuildPhase(); void setupSourcesBuildPhase(); - void setupBuildConfiguration(); + void setupBuildConfiguration(const BuildSetup &setup); + void setupImageAssetCatalog(const BuildSetup &setup); + void setupAdditionalSources(std::string targetName, Property &files, int &order); // Misc void setupDefines(const BuildSetup &setup); // Setup the list of defines to be used on build configurations + // Retrieve information + ValueList& getResourceFiles() const; + // Hash generation std::string getHash(std::string key); +#ifdef MACOSX + std::string md5(std::string key); +#endif std::string newHash() const; // Output diff --git a/devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj b/devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj index f13bcf6969..4f06a5e469 100644 --- a/devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj +++ b/devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj @@ -140,6 +140,9 @@ /* Begin PBXProject section */ F9A66C1E1396D36100CEE494 /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + }; buildConfigurationList = F9A66C211396D36100CEE494 /* Build configuration list for PBXProject "create_project" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; @@ -177,12 +180,14 @@ F9A66C2E1396D36100CEE494 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; + GCC_PREPROCESSOR_DEFINITIONS = ( + POSIX, + MACOSX, + ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -195,9 +200,11 @@ F9A66C2F1396D36100CEE494 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_PREPROCESSOR_DEFINITIONS = ( + POSIX, + MACOSX, + ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -213,6 +220,10 @@ COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + DEBUG, + ); PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -224,6 +235,7 @@ COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; 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 41c2d4f162..9cc5ad4227 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -287,7 +287,7 @@ sub begin_section { # headlines... my $ascii_title = html_entities_to_ascii($title); $title = html_entities_to_cpp($title); - if ($ascii_title ne $title) { + if ($ascii_title ne $title) { print '"A1""'.$ascii_title.'",' . "\n"; } print '"C1""'.$title.'",' . "\n"; @@ -295,7 +295,7 @@ sub begin_section { } else { my $ascii_title = html_entities_to_ascii($title); $title = html_entities_to_cpp($title); - if ($ascii_title ne $title) { + if ($ascii_title ne $title) { print '"A1""'.$ascii_title.'",' . "\n"; } print '"C1""'.$title.'",' . "\n"; @@ -428,7 +428,7 @@ sub add_person { if (length $desc > 0) { my $ascii_desc = html_entities_to_ascii($desc); $desc = html_entities_to_cpp($desc); - if ($ascii_desc ne $desc) { + if ($ascii_desc ne $desc) { print '"A2""'.$ascii_desc.'",' . "\n"; } print '"C2""'.$desc.'",' . "\n"; @@ -536,10 +536,11 @@ begin_credits("Credits"); begin_section("AGI"); add_person("Stuart George", "darkfiber", ""); - add_person("Matthew Hoops", "clone2727", ""); + add_person("Matthew Hoops", "clone2727", "(retired)"); add_person("Filippos Karapetis", "[md5]", ""); + add_person("Martin Kiewitz", "m_kiewitz", ""); add_person("Paweł Kołodziejski", "aquadran", ""); - add_person("Walter van Niftrik", "waltervn", "(retired)"); + add_person("Walter van Niftrik", "waltervn", ""); add_person("Kari Salminen", "Buddha^", ""); add_person("Eugene Sandulenko", "sev", ""); add_person("David Symonds", "dsymonds", "(retired)"); @@ -552,17 +553,26 @@ begin_credits("Credits"); add_person("Oliver Kiehl", "olki", "(retired)"); add_person("Ludvig Strigeus", "ludde", "(retired)"); end_section(); - + + begin_section("Access"); + add_person("Arnaud Boutonné", "Strangerke", ""); + add_person("Paul Gilbert", "dreammaster", ""); + end_section(); + begin_section("Avalanche"); add_person("Peter Bozsó", "uruk", ""); add_person("Arnaud Boutonné", "Strangerke", ""); end_section(); + begin_section("BBVS"); + add_person("Benjamin Haisch", "john_doe", ""); + end_section(); + begin_section("CGE"); add_person("Arnaud Boutonné", "Strangerke", ""); add_person("Paul Gilbert", "dreammaster", ""); end_section(); - + begin_section("CGE2"); add_person("Peter Bozsó", "uruk", ""); add_person("Arnaud Boutonné", "Strangerke", ""); @@ -594,6 +604,7 @@ begin_credits("Credits"); begin_section("Drascula"); add_person("Filippos Karapetis", "[md5]", ""); add_person("Paweł Kołodziejski", "aquadran", ""); + add_person("Thierry Crozat", "criezy", ""); end_section(); begin_section("DreamWeb"); @@ -604,6 +615,11 @@ begin_credits("Credits"); add_person("Willem Jan Palenstijn", "wjp", ""); end_section(); + begin_section("Gnap"); + add_person("Arnaud Boutonné", "Strangerke", ""); + add_person("Benjamin Haisch", "john_doe", ""); + end_section(); + begin_section("Gob"); add_person("Torbjörn Andersson", "eriktorbjorn", ""); add_person("Arnaud Boutonné", "Strangerke", ""); @@ -637,7 +653,7 @@ begin_credits("Credits"); end_section(); begin_section("Lastexpress"); - add_person("Matthew Hoops", "clone2727", ""); + add_person("Matthew Hoops", "clone2727", "(retired)"); add_person("Jordi Vilalta Prat", "jvprat", ""); add_person("Julien Templier", "littleboy", ""); end_section(); @@ -659,7 +675,7 @@ begin_credits("Credits"); begin_section("Mohawk"); add_person("Bastien Bouclet", "bgk", ""); - add_person("Matthew Hoops", "clone2727", ""); + add_person("Matthew Hoops", "clone2727", "(retired)"); add_person("Filippos Karapetis", "[md5]", ""); add_person("Alyssa Milburn", "fuzzie", ""); add_person("Eugene Sandulenko", "sev", ""); @@ -681,7 +697,7 @@ begin_credits("Credits"); end_section(); begin_section("Pegasus"); - add_person("Matthew Hoops", "clone2727", ""); + add_person("Matthew Hoops", "clone2727", "(retired)"); end_section(); begin_section("Queen"); @@ -704,12 +720,17 @@ begin_credits("Credits"); add_person("Max Horn", "Fingolfin", "(retired)"); add_person("Filippos Karapetis", "[md5]", ""); add_person("Martin Kiewitz", "m_kiewitz", ""); - add_person("Walter van Niftrik", "waltervn", "(retired)"); + add_person("Walter van Niftrik", "waltervn", ""); add_person("Willem Jan Palenstijn", "wjp", ""); add_person("Jordi Vilalta Prat", "jvprat", ""); add_person("Lars Skovlund", "lskovlun", ""); end_section(); + begin_section("Sherlock"); + add_person("Paul Gilbert", "dreammaster", ""); + add_person("Martin Kiewitz", "m_kiewitz", ""); + end_section(); + begin_section("Sky"); add_person("Robert Göffringmann", "lavosspawn", "(retired)"); add_person("Oliver Kiehl", "olki", "(retired)"); @@ -788,7 +809,7 @@ begin_credits("Credits"); add_person("Einar Johan T. Sømåen", "somaen", ""); add_person("Tobia Tesan", "t0by", ""); end_section(); - + begin_section("Z-Vision"); add_person("Adrian Astley", "RichieSams", ""); add_person("Filippos Karapetis", "[md5]", ""); @@ -802,18 +823,24 @@ begin_credits("Credits"); begin_section("Android"); add_person("Andre Heider", "dhewg", ""); add_person("Angus Lees", "Gus", ""); + add_person("Lubomyr Lisen", "", ""); end_section(); begin_section("Dreamcast"); add_person("Marcus Comstedt", "", ""); end_section(); + begin_section("GCW0"); + add_person("Eugene Sandulenko", "", ""); + end_section(); + begin_section("GPH Devices (GP2X, GP2XWiz & Caanoo)"); add_person("John Willis", "DJWillis", ""); end_section(); - begin_section("iPhone"); + begin_section("iPhone / iPad"); add_person("Oystein Eftevaag", "vinterstum", ""); + add_person("Vincent Bénony", "bSr43", ""); end_section(); begin_section("LinuxMoto"); @@ -825,6 +852,10 @@ begin_credits("Credits"); add_person("Tarek Soliman", "tsoliman", ""); end_section(); + begin_section("Nintendo 3DS"); + add_person("Thomas Edvalson", "Cruel", ""); + end_section(); + begin_section("Nintendo 64"); add_person("Fabio Battaglia", "Hkz", ""); end_section(); @@ -877,6 +908,10 @@ begin_credits("Credits"); add_person("Andre Heider", "dhewg", ""); end_section(); + begin_section("Raspberry Pi"); + add_person("Manuel Alfayate", "vanfanel", ""); + end_section(); + end_section(); begin_section("Other subsystems"); @@ -929,7 +964,7 @@ begin_credits("Credits"); begin_persons(); add_person("Thierry Crozat", "criezy", "Numerous contributions to documentation"); add_person("Joachim Eberhard", "joachimeberhard", "Numerous contributions to documentation (retired)"); - add_person("Matthew Hoops", "clone2727", "Wiki editor"); + add_person("Matthew Hoops", "clone2727", "Numerous contributions to documentation (retired)"); end_persons(); end_section(); @@ -983,6 +1018,7 @@ begin_credits("Credits"); begin_section("Mac OS X"); add_person("Max Horn", "Fingolfin", "(retired)"); add_person("Oystein Eftevaag", "vinterstum", ""); + add_person("Thierry Crozat", "criezy", ""); end_section(); begin_section("Mandriva"); @@ -1286,6 +1322,15 @@ begin_credits("Credits"); "Bob Bell, Michel Kripalani, Tommy Yune, from Presto Studios for ". "providing the source code of The Journeyman Project: Pegasus Prime."); + add_paragraph( + "Electronic Arts IP Preservation Team, particularly Stefan Serbicki, and Vasyl Tsvirkunov of ". + "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(); diff --git a/devtools/dist-scummvm.sh b/devtools/dist-scummvm.sh index ac411c55a3..56e6b4e05e 100755 --- a/devtools/dist-scummvm.sh +++ b/devtools/dist-scummvm.sh @@ -4,6 +4,7 @@ # # Largely based on dist-fink.sh, Copyright (c) 2001 Christoph Pfisterer. # Modified to use Subversion instead of CVS by Max Horn in 2007. +# Modified to use git by Eugene Sandulenko in 2015. # # ScummVM is the legal property of its developers, whose names # are too numerous to list here. Please refer to the COPYRIGHT @@ -26,25 +27,44 @@ ### configuration -svnroot='https://scummvm.svn.sourceforge.net/svnroot/scummvm' +scummvmrepo='https://github.com/scummvm/scummvm.git' +toolsrepo='https://github.com/scummvm/scummvm-tools.git' ### init if [ $# -lt 2 ]; then - echo "Usage: $0 <module> <version-number> [<temporary-directory> [<tag>]]" + echo "Usage: $0 <scummvm | scummvm-tools> <version-number> [<temporary-directory> [<tag>]]" exit 1 fi +echo_n() { + printf "$@" +} + module=$1 version=$2 tmpdir=${3:-/tmp} tag=$4 if [ -z "$tag" ]; then - tag=release-`echo $version | sed 's/\./-/g'` + tag="v$version" fi fullname="$module-$version" -echo "packaging $module release $version, SVN tag $tag" +# Check modules +case $module in +scummvm) + gitrepo=$scummvmrepo +;; +scummvm-tools) + gitrepo=$toolsrepo +;; +*) + echo "Unknown module $module. Only scummvm or scummvm-tools are supported" + exit 1 +esac + + +echo "packaging $module release $version, GIT tag $tag" ### setup temp directory @@ -54,25 +74,39 @@ umask 022 if [ -d $fullname ]; then echo "There is a left-over directory in $tmpdir." - echo "Remove $fullname, then try again." + echo "Remove $tmpdir/$fullname, then try again." exit 1 fi -### check code out from SVN -# TODO: Add support for making tarballs from trunk / branches? +### check code out from GIT -echo "Exporting module $module, tag $tag from SVN:" -svn export "$svnroot/$module/tags/$tag" $fullname +echo "Cloning module $module from GIT:" +git clone $gitrepo $fullname if [ ! -d $fullname ]; then - echo "SVN export failed, directory $fullname doesn't exist!" + echo "GIT clone failed, directory $fullname doesn't exist!" exit 1 fi +cd $tmpdir/$fullname + +echo_n "Checking out tag $tag..." +if git checkout $tag --quiet 2>/dev/null; then + echo done +else + echo "checking out tag $tag failed." + exit 1 +fi + +cd $tmpdir + +echo "Cleaning up .git directory" +rm -rf $fullname/.git + ### roll the tarball -echo "Creating tarball $fullname.tar:" +echo "Creating tarball $fullname.tar..." rm -f $fullname.tar $fullname.tar.gz -tar -cvf $fullname.tar $fullname +tar -cf $fullname.tar $fullname echo "Compressing (using gzip) tarball $fullname.tar.gz..." gzip -c9 $fullname.tar > $fullname.tar.gz @@ -88,8 +122,15 @@ if [ ! -f $fullname.tar.bz2 ]; then exit 1 fi +echo "Compressing (using xz) tarball $fullname.tar.xz..." +xz -c9 $fullname.tar > $fullname.tar.xz +if [ ! -f $fullname.tar.xz ]; then + echo "Packaging to xz failed, $fullname.tar.xz doesn't exist!" + # But do not exit +fi + echo "Zipping $fullname.zip..." -zip -r9 $fullname.zip $fullname +zip -r9 $fullname.zip $fullname >/dev/null if [ ! -f $fullname.zip ]; then echo "Packaging failed, $fullname.zip doesn't exist!" exit 1 @@ -99,6 +140,7 @@ fi ### finish up echo "Done:" -ls -l $fullname.tar.gz $fullname.tar.bz2 $fullname.zip +ls -l $fullname.tar.gz $fullname.tar.bz2 $fullname.tar.xz $fullname.zip +md5sum $fullname.tar.gz $fullname.tar.bz2 $fullname.tar.xz $fullname.zip exit 0 diff --git a/devtools/encode-macbinary.sh b/devtools/encode-macbinary.sh new file mode 100755 index 0000000000..6635f7fcda --- /dev/null +++ b/devtools/encode-macbinary.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Iterates over current directory, encodes all files with +# MacBinary but ensures that the dates are preserved + +for i in * +do + macbinary encode "$i" + touch -r "$i" "$i.bin" + mv "$i.bin" "$i" +done diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt index ffde276a3d..92754a27b4 100644 --- a/devtools/scumm-md5.txt +++ b/devtools/scumm-md5.txt @@ -50,25 +50,26 @@ # IFS=$OIFS # maniac Maniac Mansion - 2d624d1b214f7faf0094daea65c6d1a6 -1 en 2gs Apple II - - + 2d624d1b214f7faf0094daea65c6d1a6 -1 en 2gs Apple II - - 2cb46375dd5cdfd023e2f07e0a21b530 -1 en C64 C64 Demo - Robert Crossfield - eea4d9ac2fb6f145945a308e8866915b -1 en C64 C64 - - - 439a7f4adf510489981ac52308e7d7a2 -1 de C64 C64 - - + eea4d9ac2fb6f145945a308e8866915b -1 en C64 C64 - - + 439a7f4adf510489981ac52308e7d7a2 -1 de C64 C64 - - 7f45ddd6dbfbf8f80c0c0efea4c295bc 1972 en DOS V1 V1 - Fingolfin - 17f7296f63c78642724f057fd8e736a7 2082 gb NES NES - - 91d5db93187fab54d823f73bd6441cb6 -1 us NES NES - - 1c7e7db2cfab1ad62746ab680a634204 -1 fr NES NES - - 3a5ec90d556d4920976c5578bfbfaf79 -1 de NES NES - - b7d37d6b786b5a22deea3b038eca96ca -1 es NES NES - - fa3cb1541f9d7cf99ccbae6249bc150c -1 it NES NES - - 6b5a3fef241e90d4b2e77f1e222773ee -1 se NES NES - + 17f7296f63c78642724f057fd8e736a7 2082 gb NES NES - + 91d5db93187fab54d823f73bd6441cb6 -1 us NES NES - + 1c7e7db2cfab1ad62746ab680a634204 -1 fr NES NES - + 3a5ec90d556d4920976c5578bfbfaf79 -1 de NES NES - + b7d37d6b786b5a22deea3b038eca96ca -1 es NES NES - + fa3cb1541f9d7cf99ccbae6249bc150c -1 it NES NES - + 6b5a3fef241e90d4b2e77f1e222773ee -1 se NES NES - e781230da44a44e2f0770edb2b3b3633 -1 en Amiga V2 V2 - dhewg, Andrea Petrucci ce7733f185b838e248927c7ba1a04204 -1 fr Amiga V2 V2 - Tobias Fleischer 9bc548e179cdb0767009401c094d0895 -1 de Amiga V2 V2 - Norbert Lange + 3cf4b6ff78f735b671d8ccc2bc110b15 -1 es Amiga V2 V2 - vanfanel a570381b028972d891052ee1e51dc011 1988 en Atari V2 V2 SS Andreas Bylund 0c331637580950aea2346e012ef2a868 1988 en Atari V2 V2 DS Petr Maruska dd30a53035393baa5a5e222e716559af -1 fr Atari V2 V2 - Andreas Bylund @@ -81,13 +82,15 @@ maniac Maniac Mansion 183d7464902d40d00800e8ee1f04117c 1988 de DOS V2 V2 - Fingolfin 87f6e8037b7cc996e13474b491a7a98e -1 it DOS V2 V2 from DOTT Andrea Petrucci 0d1b69471605201ef2fa9cec1f5f02d2 -1 es DOS V2 V2 - abnog, Andrea Petrucci + f0d294891b813d3dcc525b89bc318815 1988 ru DOS V2 V2 - sev 40564ec47da48a67787d1f9bd043902a 1988 en DOS V2 Demo V2 Demo non-interactive Fingolfin + 3a988de37118873ad129246b452909c0 1988 ru DOS V2 Demo V2 Demo non-interactive sev zak Zak McKracken and the Alien Mindbenders - 254fede2f15dbb32a23760d601b01816 -1 en C64 V1 - - - 95be99181bd0f10fef4872c2d4a771cb -1 de C64 V1 - - - aeec382acef62e122bf0d5b14581cfa4 -1 it C64 V1 - - + 254fede2f15dbb32a23760d601b01816 -1 en C64 V1 - - + 95be99181bd0f10fef4872c2d4a771cb -1 de C64 V1 - - + aeec382acef62e122bf0d5b14581cfa4 -1 it C64 V1 - - 7020931d5a2be0a49d68e7a1882363e4 1896 en DOS V1 V1 - Fingolfin b23f7cd7c304d7dff08e92a96120d5b4 -1 en DOS V1 V1 alt? Andrea Petrucci @@ -95,9 +98,9 @@ zak Zak McKracken and the Alien Mindbenders 91469353f7be1b122fa88d23480a1320 -1 fr Amiga V2 V2 - Tobias Fleischer 6027e9ca9c35746d95dee2068cec17e5 -1 de Amiga V2 V2 - Norbert Lange 27b3a4224ad63d5b04627595c1c1a025 -1 it Amiga V2 V2 - Andrea Petrucci - d55eff37c2100f5065cde9de428621fa -1 en Atari V2 V2 - + d55eff37c2100f5065cde9de428621fa -1 en Atari V2 V2 - 613f64f78ea26c7353b2a5940eb61d6a -1 fr Atari V2 V2 - Andreas Bylund - ff05c07990061d97647f059c48c1d05a -1 de Atari V2 V2 - + ff05c07990061d97647f059c48c1d05a -1 de Atari V2 V2 - 675d71151e9b5a968c8ce46d9fbf4cbf 1916 en DOS V2 V2 - Kirben debe337f73d660e951ece7c1f1c81add -1 en DOS V2 V2 alt? Andrea Petrucci 52a4bae0746a11d7b1e8554e91a6645c -1 fr DOS V2 V2 - Andrea Petrucci @@ -106,8 +109,9 @@ zak Zak McKracken and the Alien Mindbenders d06fbe28818fef7bfc45c2cdf0c0849d -1 de DOS V2 V2 from 5.25\" floppies Nicolas Sauzède, Andrea Petrucci 1900e501a52fbf55bde6e4196f6d2aa6 -1 it DOS V2 V2 - Andrea Petrucci 75ba23fff4fd63fa446c02864f2a5a4b -1 it DOS V2 V2 alt? Antti Leimi, Andrea Petrucci + a77d0efbe786ea7f490c2021dbfa3f2f -1 ru DOS V2 V2 - sev - 2d4536a56e01da4b02eb021e7770afa2 7520 en FM-TOWNS FM-TOWNS - - + 2d4536a56e01da4b02eb021e7770afa2 7520 en FM-TOWNS FM-TOWNS - - 1ca86e2cf9aaa2068738a1e5ba477e60 -1 jp FM-TOWNS FM-TOWNS - - Andrea Petrucci 8299d9b8a1b0e7b881bae7a9971dc5e2 1916 en Atari V2 Demo non-interactive Fingolfin @@ -117,7 +121,7 @@ indy3 Indiana Jones and the Last Crusade e689bdf67f98b1d760ce4487ec0e8d06 -1 fr Amiga EGA EGA - Gerald Vincent 330f631502e381a4e199a3f7cb483c20 -1 de Amiga EGA EGA - dhewg df03ee021aa9b81d90cab9c26da07614 -1 it Amiga EGA EGA - Andrea Petrucci - 62b8c16b6db226ba95aaa8be73f9885c -1 es Amiga EGA EGA - + 62b8c16b6db226ba95aaa8be73f9885c -1 es Amiga EGA EGA - 157367c3c21e0d03a0cba44361b4cf65 -1 en Atari No AdLib EGA - Andreas Bylund 0f9c7a76657f0840b8f7ccb5bffeb9f4 -1 fr Atari No AdLib EGA - Andreas Bylund aaa7f36a253f277dd29dd1c051b0e4b9 -1 de Atari No AdLib EGA - Jimmy Kohl @@ -127,7 +131,7 @@ indy3 Indiana Jones and the Last Crusade 66236cd1aec24e1d4aff4c4cc93b7e18 -1 fr DOS EGA EGA ?? v1.3, 25 Aug 89 Andrea Petrucci, Peter Eckerlein 89cfc425566003ff74b7dc7b3e6fd469 -1 fr DOS EGA EGA ?? v1.3, 25 Aug 89 Jorpho 69d70269fafc4445adbb0d223e4f9a3f 5361 en DOS EGA EGA v1.4, 11/07/89 (5.25\") Petr Maruska - 56e8c37a0a08c3a7076f82417461a877 -1 en DOS EGA EGA v1.4, 7 Nov 89 (3.5\") Paulo Vicente + 56e8c37a0a08c3a7076f82417461a877 -1 en DOS EGA EGA v1.4, 7 Nov 89 (3.5\") Paulo Vicente 6f6ef668c608c7f534fea6e6d3878dde -1 de DOS EGA EGA v1.4 from 19 Oct 89 dhewg, Peter Eckerlein eb700bb73ca1cc44a1ad5e4b1a4bdeaf 5361 de DOS EGA EGA PC-Spiele a.borque d62d248c3df6ec177405e2cb23d923b2 -1 it DOS EGA EGA v1.4 from 25 Nov 89 Andrea Petrucci, Peter Eckerlein @@ -140,7 +144,7 @@ indy3 Indiana Jones and the Last Crusade a15d6e1e2c52bbd0ff7fa6b63ab7f796 680340 en Mac Steam Steam Steam Version Filippos Karapetis 399b217b0c8d65d0398076da486363a9 6295 de DOS VGA VGA VGA v1.02 from 7 Nov 91 Peter Eckerlein, Fingolfin 17b5d5e6af4ae89d62631641d66d5a05 -1 it DOS VGA VGA IBM 256 color v2.1 from 3 May 01 Andrea Petrucci, Peter Eckerlein - 3cce1913a3bc586b51a75c3892ff18dd -1 ru DOS VGA VGA VGA + 3cce1913a3bc586b51a75c3892ff18dd -1 ru DOS VGA VGA VGA 04687cdf7f975a89d2474929f7b80946 7552 en FM-TOWNS FM-TOWNS - v1.00 1/23/91 Fingolfin 3a0c35f3c147b98a2bdf8d400cfc4ab5 -1 jp FM-TOWNS FM-TOWNS - - Paul Priest, Andrea Petrucci @@ -152,8 +156,8 @@ loom Loom 39cb9dec16fa16f38d79acd80effb059 -1 All Amiga EGA EGA IT and FR Gerald Vincent (IT), Andrea Petrucci (FR) 2fe369ad70f52a8cf7ad6077ee64f81a -1 de Amiga EGA EGA - Norbert Lange 48b9f04b348bc5013327753f0d12a144 -1 es Amiga EGA EGA - VooD - a0a7dea72003933b8b3f8b99b9f7ddeb -1 en Atari No AdLib EGA - - 0e9b01430e31d9fcd94071d433bbc6bf -1 fr Atari No AdLib EGA - + a0a7dea72003933b8b3f8b99b9f7ddeb -1 en Atari No AdLib EGA - + 0e9b01430e31d9fcd94071d433bbc6bf -1 fr Atari No AdLib EGA - c24c490373aeb48fbd54caa8e7ae376d -1 de Atari No AdLib EGA - Andreas Bylund 28ef68ee3ed76d7e2ee8ee13c15fbd5b 5748 en DOS EGA EGA v1.0 from 8 Mar 90 Peter Eckerlein, Fingolfin 73e5ab7dbb9a8061cc6d25df02dbd1e7 -1 en DOS EGA EGA v1.0 alt Andrea Petrucci @@ -164,7 +168,7 @@ loom Loom 6f8a22bfa397be1f7ed4b74aba0e397e -1 fr DOS EGA EGA v1.2 26 Jun 90 Jorpho 470c45b636139bb40716daa1c7edaad0 -1 de DOS EGA EGA v1.2 Deutsch from 7 Jun 90 Peter Eckerlein fa127d7c4bb47d05bb1c33ddcaa9f767 5748 de DOS EGA EGA v1.2 Deutsch from 7 Jun 90 Fingolfin - 187d315f6b5168f68680dfe8c3d76a3e -1 he DOS EGA EGA - + 187d315f6b5168f68680dfe8c3d76a3e -1 he DOS EGA EGA - c3df37df9d3b481b45f75283a9907c47 -1 it DOS EGA EGA - Andrea Petrucci 0be88565f734b1e9e77ccaaf3bb14b29 -1 es DOS EGA EGA v1.2 Espanol from 31 Aug 90 George Kormend 2a208ffbcd0e83e86f4356e6f64aa6e1 -1 es DOS EGA EGA v1.2 Espanol from 31 Aug 90 abnog, Andrea Petrucci, Peter Eckerlein @@ -184,10 +188,10 @@ loom Loom a00554c31d623fdb9fcb0f924b89b42b -1 en DOS EGA EGA Demo non-interactive Adrian C. Fruehwirth monkey The Secret of Monkey Island - c666a998af90d81db447eccba9f72c8d -1 en Atari No AdLib EGA - + c666a998af90d81db447eccba9f72c8d -1 en Atari No AdLib EGA - 9e5e0fb43bd22f4628719b7501adb717 -1 fr Atari No AdLib EGA - Andreas Bylund 927a764615c7fcdd72f591355e089d8c -1 de Atari No AdLib EGA - Joachim Eberhard - 0a41311d462b6639fc45297b9044bf16 -1 es Atari No AdLib EGA - + 0a41311d462b6639fc45297b9044bf16 -1 es Atari No AdLib EGA - 49210e124e4c2b30f1290a9ef6306301 8357 en DOS EGA EGA 8 disk v1.0, 9/18/90 Fingolfin 1dd3c11ea4439adfe681e4e405b624e1 -1 fr DOS EGA EGA 8 disk Andrea Petrucci @@ -207,7 +211,7 @@ monkey The Secret of Monkey Island 870d1e3c86bc50846d808d14a36b4e08 -1 es Amiga VGA VGA - Andreas Bylund c7890e038806df2bb5c0c8c6f1986ea2 -1 en DOS VGA VGA 8 disk Andrea Petrucci - 15e03ffbfeddb9c2aebc13dcb2a4a8f4 8357 en DOS VGA VGA 4 disk + 15e03ffbfeddb9c2aebc13dcb2a4a8f4 8357 en DOS VGA VGA 4 disk 08656dd9698ddf1023ba9bf8a195e37b -1 en DOS VGA VGA V1.1 crossbow777 d0b531227a27c6662018d2bd05aac52a 8357 de DOS VGA VGA 4 disk v1.1, 14.Feb.91 Fingolfin 66fd5ff9a810dfeb6d6bdada18221140 -1 it DOS VGA VGA 4 disk Andrea Petrucci @@ -222,9 +226,9 @@ monkey The Secret of Monkey Island da6269b18fcb08189c0aa9c95533cce2 8955 it DOS CD CD CD-ROM v2.3 Fingolfin, Andrej Sinicyn, Andrea Petrucci f049e38c1f8302b5db6170f1872af89a 8955 es DOS CD CD CD-ROM v2.3 Fingolfin, Andrej Sinicyn, Andrea Petrucci 2ccd8891ce4d3f1a334d21bff6a88ca2 9455 en Mac CD - Mac v2.4 Fingolfin, Lars Næsbye Christensen - b9ba19ce376efc69be78ef3baef8d2b9 -1 en Mac CD - alt? Grant Yeager + b9ba19ce376efc69be78ef3baef8d2b9 -1 en Mac CD - alt? Grant Yeager - c13225cb1bbd3bc9fe578301696d8021 -1 en SEGA SEGA - - + c13225cb1bbd3bc9fe578301696d8021 -1 en SEGA SEGA - - 057c9b456dedcc4d71b991a3072a20b3 9465 jp SEGA SEGA - - GloKidd 8eb84cee9b429314c7f0bdcf560723eb 9925 en FM-TOWNS FM-TOWNS - - Paul Priest, Andrea Petrucci @@ -233,6 +237,7 @@ monkey The Secret of Monkey Island 71523b539491527d9860f4407faf0411 7607 en DOS Demo EGA Demo - Fingolfin 771bc18ec6f93837b839c992b211904b -1 de DOS Demo EGA Demo - khalek 54a936ad06161ff7bfefcb96200f7bff 7617 en Amiga VGA VGA Demo - khalek + c0c9de81fb965e6cbe77f6e5631ca705 9135 en DOS SE Talkie Unofficial SE Talkie v1.02 rootfather pass Passport to Adventure e6cd81b25ab1453a8a6d3482118c391e 7857 en DOS - - v1.0 9/14/90 Fingolfin @@ -252,7 +257,7 @@ monkey2 Monkey Island 2: LeChuck's Revenge da669b20271b85182e9c17a2a37ea02e -1 de Amiga - - - Andreas Bylund, Norbert Lange 11ddf1fde76e3156eb3a38da213f484e -1 it Amiga - - - Andrea Petrucci 6ea966b4d660c870b9ee790d1fbfc535 -1 es Amiga - - - Andreas Bylund - 3686cf8f89e102ececf4366e1d2c8126 11135 en DOS - - - + 3686cf8f89e102ececf4366e1d2c8126 11135 en DOS - - - 8e4ee4db46954bfe2912e259a16fad82 -1 fr DOS - - - Nicolas Sauzède, Andrea Petrucci 6886e5d08cee329b1f2e743ae2e3ceed 11135 de DOS - - v1.0D 17Feb92 Fingolfin 69ea626f1f87eecb78ea0d6c6b983a1d -1 it DOS - - - Andrea Petrucci @@ -265,6 +270,7 @@ monkey2 Monkey Island 2: LeChuck's Revenge 430bc518017b6fac046f58bab6baad5d -1 jp FM-TOWNS FM-TOWNS - - Antti Leimi, Andrea Petrucci 387a544b8b10b26912d8413bab63a853 -1 en DOS - Demo non-interactive khalek + f4d20ab4ce19743a646cb48bd93aee72 10835 en DOS SE Talkie Unofficial SE Talkie v0.2 rootfather atlantis Indiana Jones and the Fate of Atlantis 3a03dab514e4038df192d8a8de469788 -1 en Amiga Floppy Floppy - dhewg @@ -292,14 +298,14 @@ atlantis Indiana Jones and the Fate of Atlantis c7be10f775404fd9785a8b92a06d240c 12030 en FM-TOWNS FM-TOWNS - - dhewg, Andrea Petrucci 4d34042713958b971cb139fba4658586 -1 jp FM-TOWNS FM-TOWNS - - Andrea Petrucci - 035deab53b47bc43abc763560d0f8d4b -1 en DOS Floppy Demo - + 035deab53b47bc43abc763560d0f8d4b -1 en DOS Floppy Demo - 98744fe66ff730e8c2b3b1f58803ab0b -1 en DOS Floppy Demo - Simon Krumrein, sev 12cdc256eae5a461bcc9a49975999841 -1 en DOS Floppy Demo - Paulo Vicente - 99b6f822b0b2612415407865438697d6 -1 en DOS - Demo non-interactive + 99b6f822b0b2612415407865438697d6 -1 en DOS - Demo non-interactive 28d24a33448fab6795850bc9f159a4a2 11170 jp FM-TOWNS FM-TOWNS Demo non-interactive khalek, Fingolfin tentacle Day of the Tentacle - acad97ab1c6fc2a5b2d98abf6db4a190 -1 en All? Floppy Floppy Version A ? + acad97ab1c6fc2a5b2d98abf6db4a190 -1 en All? Floppy Floppy Version A ? 2723fea3dae0cb47768c424b145ae0e7 7932 en DOS Floppy Floppy Version B ? Andrej Sinicyn, Andrea Petrucci, Fingolfin f0ccc12a8704bf57706b42a37f877128 -1 en DOS Floppy Floppy 1.6 Paulo Vicente 92b078d9d6d9d751da9c26b8b3075779 -1 fr DOS Floppy Floppy - Nicolas Sauzède, Andrea Petrucci @@ -335,11 +341,11 @@ samnmax Sam & Max Hit the Road 0fb73eddfcf584c02ba097984df131ba 9080 de All? - CD - Fingolfin 0f6f2e716ba896a44e5059bba1de7ca9 -1 it All? - CD - Andrea Petrucci 4ba7fb331296c283e73d8f5b2096e551 -1 es All? - CD - Andrea Petrucci - d43352a805d78b5f4936c6d7779bf575 -1 ru DOS - CD - + d43352a805d78b5f4936c6d7779bf575 -1 ru DOS - CD - 166553538ff320c69edafeee29525419 199195304 en Mac - CD Mac bundle Joachim Eberhard 3a5d13675e9a23aedac0bac7730f0ac1 228446581 fr Mac - CD Mac bundle ThierryFR, Thierry Crozat - c3196c5349e53e387aaff1533d95e53a -1 en DOS Floppy Demo - + c3196c5349e53e387aaff1533d95e53a -1 en DOS Floppy Demo - 0e4c5d54a0ad4b26132e78b5ea76642a 6485 en DOS Floppy Demo WIP Fingolfin d9d0dd93d16ab4dec55cabc2b86bbd17 6478 en DOS - Demo non-interactive Fingolfin cc8ba2b0df2f9c450bcf055fe2711979 7485 de DOS Floppy Demo - Simon Krumrein, sev, Fingolfin @@ -355,12 +361,12 @@ ft Full Throttle 55518cd73cf9c6d23ea29c51ee06bdfe -1 it All? - - - delfino 55e4cc866ff9046824e1c638ba2b8c7f -1 ru All? - Akella - sev 291fb06071e65897f755846611f5ad40 19697 ru All? - 7-Wolf - sev - e72bb4c2b613db2cf50f89ff6350e70a -1 es All? - - - + e72bb4c2b613db2cf50f89ff6350e70a -1 es All? - - - fe381e45117878b1e942cb876b050fd6 513243679 en Mac - - Mac bundle Fingolfin 04401d747f1a2c1c4b388daff71ed378 535405461 de Mac - - Mac bundle Fingolfin 403d2ec4d60d3cdae925e6cbf67716d6 489436643 fr Mac - - Mac bundle Thierry Crozat - 32a433dea56b86a55b59e4ff7d755711 -1 en DOS Demo Demo - + 32a433dea56b86a55b59e4ff7d755711 -1 en DOS Demo Demo - 9d7b67be003fea60be4dcbd193611936 11164 en Mac Demo Demo - Fingolfin 9b7452b5cd6d3ffb2b2f5118010af84f 116463537 en Mac Demo Demo Mac bundle Fingolfin, Joachim Eberhard @@ -369,6 +375,7 @@ dig The Dig aad201302286c1cfee92321cd406e427 811008 en Windows Steam Steam Steam Version Ben Castricum, Filippos Karapetis d93cc8be628ed5d3b3a29188fc7105d3 1061296 en Mac Steam Steam Steam Version Filippos Karapetis d62047a6729349ab36f7ee065bf26509 -1 ru All - - - sev + ebdd2fbc995a321605375dc57766db79 16304 ru All - With Subtitles - sev 35a2d3040fa512f8232d9e443319d84d 659335495 en Mac - - Mac bundle Fingolfin 21a6592322f92550f144f68a8a4e685e -1 fr Mac - - Mac bundle kaminari @@ -377,7 +384,7 @@ dig The Dig comi The Curse of Monkey Island fe60d6b5ff51b0553ac59963123b5777 76791 All Windows - - - Fingolfin - 861e59ed72a1cd0e6d454f7ee7e2bf3d -1 ru Windows - - - + 861e59ed72a1cd0e6d454f7ee7e2bf3d -1 ru Windows - - - 8fec68383202d38c0d25e9e3b757c5df 18041 All Windows Demo Demo - Fingolfin @@ -492,8 +499,9 @@ freddi Freddi Fish 1: The Case of the Missing Kelp Seeds 5ebb57234b2fe5c5dff641e00184ad81 -1 fr Windows HE 73 - - gist974 cf8ef3a1fb483c5c4b1c584d1167b2c4 -1 de Windows HE 73 - - Oncer 1f2e62b5a9c50589fc342285a6bb3a27 -1 he Windows HE 73 - - e_orz + 64a22be96d679018696e5c8d3ca8b71d 26375 jp Windows HE 73 - - sev 507bb360688dc4180fdf0d7597352a69 26402 se Windows HE 73 - - Sven Arvidsson - df047cc4792150f601290357566d36a6 -1 us All HE 90 Updated - khalek + df047cc4792150f601290357566d36a6 -1 en All HE 90 Updated - khalek e44ea295a3f8fe4f41983080dab1e9ce -1 fr Mac HE 90 Updated - ThierryFR 746e88c172a5b7a1ae89ac0ee3ee681a -1 ru Windows HE 90 Updated - sev a197a87ae77f3b3333f09a7a2c448fe2 -1 en Windows HE 99 Updated - Jonathan @@ -522,9 +530,9 @@ freddi2 Freddi Fish 2: The Case of the Haunted Schoolhouse 5057fb0e99e5aa29df1836329232f101 -1 All Windows HE 80 - - sev ac62d50e39492ee3738b4e83a5ac780f -1 nl Windows HE 80 - - joostp 151071053a1d0021198216713939521d -1 en Windows HE 80 - - vampir_raziel - 51305e929e330e24a75a0351c8f9975e -1 us All HE 99 Updated - Kirben + 51305e929e330e24a75a0351c8f9975e -1 en All HE 99 Updated - Kirben 9c0ee9c252785e9fca0143e42ac4b256 -1 de Windows HE 99 Updated - George Kormendi - 8ee63cafb1fe9d62aa0d5a23117e70e7 -1 us All HE 100 Updated - Kirben + 8ee63cafb1fe9d62aa0d5a23117e70e7 -1 en All HE 100 Updated - Kirben e41de1c2a15abbcdbf9977e2d7e8a340 -1 ru Windows HE 100 Updated - sev c20848f53c2d48bfacdc840993843765 -1 nl All HE 80 Demo - DarthBo @@ -532,7 +540,7 @@ freddi2 Freddi Fish 2: The Case of the Haunted Schoolhouse d37c55388294b66e53e7ced3af88fa68 -1 en All HE 100 Updated Demo - khalek freddi3 Freddi Fish 3: The Case of the Stolen Conch Shell - 8368f552b1e3eba559f8d559bcc4cadb -1 All All - - - Kirben, sev + 8368f552b1e3eba559f8d559bcc4cadb 55959 All All - - - Kirben, sev (US and ???) 0cccfa5223099a60e76cfcca57a1a141 -1 nl All - - - adutchguy, daniel9 008e76ec3ae58d0add637ea7aa299a2c -1 fr Mac - - - ThierryFR 898ce8eb1234a955ef75e87141902bb3 -1 ru Windows - - - sev @@ -550,7 +558,7 @@ freddi3 Freddi Fish 3: The Case of the Stolen Conch Shell d73c851b942af44deb9b6d5f416a0972 -1 he Windows HE 99 Demo - Ori Avtalion freddi4 Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch - 4f580a021eee026f3b4589e17d130d78 -1 All All - - - Kirben, sev + 4f580a021eee026f3b4589e17d130d78 44190 All All - - - Kirben, sev (US and ???) 14d48c95b43ddeb983254cf6c43851f1 -1 nl All - - - adutchguy, daniel9 3b832f4a90740bf22e9b8ed42ca0128c -1 gb All HE 99 - - Reckless d74122362a77ec24525fdd50297dfd82 -1 fr Mac - - - ThierryFR @@ -580,7 +588,7 @@ freddi4 Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch 47e041521d35c7a801bb1c010d84da9d -1 it Windows HE 99 Demo - Kirben freddicove Freddi Fish 5: The Case of the Creature of Coral Cove - 590e6546aacd0d374b7f3a4f53013ab1 -1 All All - - - cyx + 590e6546aacd0d374b7f3a4f53013ab1 41165 All All - - - cyx (US and ???) 21abe302e1b1e2b66d6f5c12e241ebfd -1 ru Windows unenc Unencrypted - sev b8955d7d23b4972229060d1592489fef -1 nl All HE 100 - - adutchguy, daniel9 8f345db2f3f5a25ed6305001957e6f72 41182 nl All HE 100 - - Ben Castricum @@ -650,12 +658,12 @@ moonbase Moonbase Commander ef71a322b6530ac45b1a070f7c0795f7 -1 en Windows Demo Demo - Kirben pajama Pajama Sam 1: No Need to Hide When It's Dark Outside - 672dec94b82f7f0877ebb5b5cf7f4bc1 -1 us All - - - khalek + 672dec94b82f7f0877ebb5b5cf7f4bc1 -1 en All - - - khalek 1d7a2e1ddcade791e2de0cfceac86725 -1 fr All - - - gist974, ThierryFR 4fa6870d9bc8c313b65d54b1da5a1891 -1 nl All - - - joostp a095e33061606d231ff37dca4c64c8ac -1 de All HE 99 - - Joachim Eberhard 898eaa21f79cf8d4f08db856244689ff 66505 en Windows HE 99 Updated - Joachim Eberhard - 37aed3f91c1ef959e0bd265f9b13781f -1 us All HE 100 Updated - Kirben + 37aed3f91c1ef959e0bd265f9b13781f 66599 en All HE 100 Updated - Kirben 4aa93cb30e485b728504ba3a693f12bf -1 ru Windows HE 100 - - sev 782393c5934ecd0b536eaf5fd541bd26 -1 en Windows HE 101 Updated - Jonathan c225bec1b6c0798a2b8c89ac226dc793 -1 en Wii HE 101 - - sanguinehearts @@ -759,20 +767,20 @@ puttmoon Putt-Putt Goes to the Moon 9c92eeaf517a31b7221ec2546ab669fd -1 en Windows HE 70 - - khalek 3c4c471342bd95505a42334367d8f127 12161 ru Windows HE 70 - - sev - aa6a91b7f6f119d1b7b1f2a4c9e24d59 6233 en DOS - Demo - + aa6a91b7f6f119d1b7b1f2a4c9e24d59 6233 en DOS - Demo - 4af4a6b248103c1fe9edef619677f540 -1 en Mac - Demo - khalek 9c143c5905055d5df7a0f014ab379aee -1 en Windows HE 70 Demo - khalek puttcircus Putt-Putt Joins the Circus ecc4340c2b801f5af8da4e00c0e432d9 -1 nl All - - - daniel9 - ab0693e9324cfcf498fdcbb12acf8bb4 -1 en All - - - sev + ab0693e9324cfcf498fdcbb12acf8bb4 36655 us All - - - sev 7bad72e332a59f9fcc1d437f4edad32a -1 ru All - - - sev db74136c20557eca6ed3411bff39f7a1 -1 gb Windows - - - Reckless d0ad929def3e9cfe39dea55bd12098d4 -1 fr Windows - - - gist974 febf4a983ea5faea1c9dd6c710ebb09c -1 de Windows - - - andy482 c8253da0f4626d2236b5291b99e33408 -1 he Windows HE 99 - - Matan Bareket - a7cacad9c40c4dc9e1812abf6c8af9d5 -1 en All - Demo - Kirben, sev + a7cacad9c40c4dc9e1812abf6c8af9d5 -1 us All - Demo - Kirben, sev 1387d16aa620dc1c2d1fd87f8a9e7a09 -1 fr Windows - Demo - Mevi 3af61c5edf8e15b43dbafd285b2e9777 -1 he Windows - Demo - Ori Avtalion @@ -787,7 +795,7 @@ puttputt Putt-Putt Joins the Parade 684732efb5799c0f78804c99d8de9aba -1 en Mac HE 62 - - khalek 6a30a07f353a75cdc602db27d73e1b42 -1 en Windows HE 70 - - khalek - 31aa57f460a3d12429f0552a46a90b39 6150 en DOS Demo Demo - + 31aa57f460a3d12429f0552a46a90b39 6150 en DOS Demo Demo - f40a7f495f59188ca57a9d1d50301bb6 -1 en Mac HE 60 Demo - khalek 37ff1b308999c4cca7319edfcc1280a0 8269 en Windows HE 70 Demo - khalek @@ -799,7 +807,7 @@ puttzoo Putt-Putt Saves the Zoo 9781422e4288dbc090720e4563168ba7 -1 fr Windows - - - gist974 0f9d3317910ac7a9f449243118884ada 42070 de Windows - - - George Kormendi 92e7727e67f5cd979d8a1070e4eb8cb3 -1 en All HE 98.5 Updated - cyx - 3a3e592b074f595489f7f11e150c398d -1 us Windows HE 99 Updated - Adrian + 3a3e592b074f595489f7f11e150c398d -1 en Windows HE 99 Updated - Adrian c5cc7cba02a2fbd539c4439e775b0536 43470 de Windows HE 99 Updated - Lightkey 5c9cecbd2952ccec14c9ecebf5822a34 -1 en iOS HE 100 - - clone2727 7b4ee071eecadc2d8cd0c3509110825c -1 en Windows HE 100 Remastered - Kirben @@ -815,7 +823,7 @@ puttzoo Putt-Putt Saves the Zoo PuttTime Putt-Putt Travels Through Time fcb78ebecab2757264c590890c319cc5 -1 nl All HE 85 - - adutchguy, daniel9 - 63fdcdc95cdeea00060883aed38e5504 -1 en All HE 85 - - iziku + 63fdcdc95cdeea00060883aed38e5504 62582 us All HE 85 - - iziku db21a6e338fe3b70c2723b6530865bf2 -1 fr All HE 85 - - gist974, ThierryFR 84e3c23a49ded8a6f9197735c8eb3de7 -1 de Windows HE 85 - - oncer 2108d83dcf09f8adb4bc524669c8cf51 -1 us All HE 99 Updated - Kirben @@ -829,7 +837,7 @@ PuttTime Putt-Putt Travels Through Time 59d5cfcc5e672a6e07baae01328b918b -1 fr All HE 90 Demo - Kirben fbb697d89d2beca87360a145f467bdae -1 de All HE 90 Demo - Joachim Eberhard 6b19d0e25cbf720d05822379b8b90ed9 -1 nl All HE 90 Demo - adutchguy - 0a6d7b81b850ed4a77811c60c9b5c555 18458 us Windows HE 99 Mini Game - eriktorbjorn + 0a6d7b81b850ed4a77811c60c9b5c555 18458 us Windows HE 99 Mini Game - eriktorbjorn a71014c53a6d18c66ef2ea0ee42328e9 18458 nl Windows HE 99 Mini Game - Ben Castricum 8dd4d590685c19bf651b5016e749ead2 18458 fr Windows HE 99 Mini Game - Ben Castricum aef415cc5dc063e3668359c2657169f3 18458 de Windows HE 99 Mini Game - Ben Castricum @@ -840,9 +848,9 @@ balloon Putt-Putt and Pep's Balloon-O-Rama bab0fb81dcb12b8930c5d850b8f2a7de 12800 de Windows HE 80 - - George Kormendi 145bd3373574feb668cc2eea2ec6cf86 -1 ru Windows HE 80 - - sev 27b2ef1653089fe5b897d9cc89ce784f -1 ru Windows HE 80 - - George Kormendi - 2232b0b9411575b1f9961713ebc9de61 -1 nl Windows HE 80 - - Ben Castricum - a22af0ad0e3126d19d22707b0267a37d -1 nl Windows HE 80 - - Ben Castricum - a56a05c6b865b9956639f8c51269e5ab -1 nl Mac HE 80 - - Ben Castricum + 2232b0b9411575b1f9961713ebc9de61 12800 nl Windows HE 80 - - Ben Castricum + a22af0ad0e3126d19d22707b0267a37d 12800 nl Windows HE 80 - - Ben Castricum + a56a05c6b865b9956639f8c51269e5ab 12800 nl Mac HE 80 - - Ben Castricum d7b247c26bf1f01f8f7daf142be84de3 -1 en Windows HE 99 Updated - iziku 8e3241ddd6c8dadf64305e8740d45e13 -1 en All HE 100 Updated - Kirben @@ -854,55 +862,55 @@ dog Putt-Putt and Pep's Dog on a Stick d4b8ee426b1afd3e53bc0cf020418cf6 -1 en Windows HE 99 - - sev activity Putt-Putt & Fatty Bear's Activity Pack - 2c04aacffb8428f30ccf4f734fbe3adc -1 en DOS - - - Kirben + 2c04aacffb8428f30ccf4f734fbe3adc -1 en DOS - - - Kirben 0e96ab45a4eb72acc1b46813976589fd -1 en Mac - - - Kirben - b628506f7def772e40de0aa5440fb8e1 -1 en Windows HE 70 - - Kirben + b628506f7def772e40de0aa5440fb8e1 -1 en Windows HE 70 - - Kirben funpack Putt-Putt's Fun Pack 8afb3cf9f95abf208358e984f0c9e738 -1 en 3DO - - - sev e95cf980719c0be078fb68a67af97b4a -1 jp 3DO - - - clone2727 3d219e7546039543307b55a91282bf18 -1 en DOS - - - iziku 46b53fd430adcfbed791b48a0d4b079f -1 en DOS - - - khalek - 90a329d8ad5b7ce0690429e98cfbb32f -1 he DOS - - - + 90a329d8ad5b7ce0690429e98cfbb32f -1 he DOS - - - PuttsFunShop Putt-Putt's One-Stop Fun Shop 5262a27afcaee04e5c4900220bd463e7 -1 us All - - - Kirben spyfox SPY Fox 1: Dry Cereal - 6bf70eee5de3d24d2403e0dd3d267e8a 49221 All Windows - - - khalek + 6bf70eee5de3d24d2403e0dd3d267e8a 49221 All Windows - - - khalek (US and ???) 100b4c8403ad6a83d4bf7dbf83e44dc4 -1 fr Windows - - - gist974 9bda5fee51d2fda5253d02c642016bf4 -1 nl All HE 98.5 - - daniel9, joostp - 58436e634f4fae1d9973591c2ffa1fcb -1 en All HE 99 Updated - Joachim Eberhard + 58436e634f4fae1d9973591c2ffa1fcb -1 en All HE 99 Updated - Joachim Eberhard (GB or US?) a28135a7ade38cc0208b04507c46efd1 -1 de All HE 99 - - nachbarnebenan ee785fe2569bc9965526e774f7ab86f1 -1 fr Mac HE 99 - - ThierryFR 76b66b43e593ad4d2f1dfb5cc8f19700 -1 nl Windows HE 99 - - sugarcube 72ac6bc980d5101c2142189d746bd62f -1 ru Windows HE 99 - - sev 3de99ef0523f8ca7958faa3afccd035a -1 us All HE 100 Updated - Kirben - 23394c8d29cc63c61313959431a12476 -1 en Windows HE 100 Updated - Jonathan - 50b831f11b8c4b83784cf81f4dcc69ea -1 en Wii HE 101 - - sanguinehearts - 15878e3bee2e1e759184abee98589eaa -1 en iOS HE 100 - - clone2727 + 23394c8d29cc63c61313959431a12476 -1 en Windows HE 100 Updated - Jonathan (GB or US?) + 50b831f11b8c4b83784cf81f4dcc69ea -1 en Wii HE 101 - - sanguinehearts (GB or US?) + 15878e3bee2e1e759184abee98589eaa -1 en iOS HE 100 - - clone2727 (GB or US?) - 53e94115b55dd51d4b8ff0871aa1df1e 20103 en All - Demo - khalek, sev - fbdd947d21e8f5bac6d6f7a316af1c5a 15693 en All - Demo - sev + 53e94115b55dd51d4b8ff0871aa1df1e 20103 us All - Demo - khalek, sev + fbdd947d21e8f5bac6d6f7a316af1c5a 15693 us All - Demo - sev ba888e6831517597859e91aa173f945c -1 fr All - Demo - Kirben 73b8197e236da4bf49adc99fe8f5fa1b -1 de All - Demo - Joachim Eberhard 4edbf9d03550f7ba01e7f34d69b678dd -1 nl All HE 98.5 Demo - Kirben - f2ec78e50bdc63b70044e9758be10914 -1 nl Mac HE 98.5 Demo - Ben Castricum - 9d4ab3e0e1d1ebc6ba8a6a4c470ed184 -1 en All HE 100 Demo - khalek + f2ec78e50bdc63b70044e9758be10914 20141 nl Mac HE 98.5 Demo - Ben Castricum + 9d4ab3e0e1d1ebc6ba8a6a4c470ed184 15943 us All HE 100 Demo - khalek spyfox2 SPY Fox 2: Some Assembly Required - f79e60c17cca601e411f1f75e8ee9b5a 51286 All All - - - Kirben + f79e60c17cca601e411f1f75e8ee9b5a 51286 All All - - - Kirben (US and ???) 90e2f0af4f779629695c6394a65bb702 -1 fr All - - - gist974, ThierryFR bc4700bc0e12879f6d25d14d6be6cfdd -1 de All - - - Joachim Eberhard 3785fd25f7e02b5782bfc5072d8f77c8 -1 it All - - - Saleck cea91e3dd47f2518ea418e41611aa77f -1 ru All - - - sev - 9fd66fb3b04703bd50da4356e4202558 51295 en Mac - - - pix_climber + 9fd66fb3b04703bd50da4356e4202558 51295 en Mac - - - pix_climber (GB or US?) 71fe97c3108678cf604f14abe342341b 51286 nl All - - - adutchguy 1c792d28376d45e145cb916bca0400a2 -1 nl All - Demo - joostp 7222f260253f325c21fcfa68b5bfab67 -1 us All - Demo - Kirben 732845548b1d6c2da572cb6a1bf81b07 -1 de All - Demo - Joachim Eberhard - e62056ba675ad65d8854ab3c5ad4b3c0 14689 en Windows - Mini Game - Trekky + e62056ba675ad65d8854ab3c5ad4b3c0 14689 gb Windows - Mini Game - Trekky 22c7432dc97a821fcfccd480e93e3911 14689 nl Windows - Mini Game - Ben Castricum 6b10c9977cad9de503642059359792b1 14689 fr Windows - Mini Game - Ben Castricum 9684c161258d68e0d464d6cab7024b9c 14689 it Windows - Mini Game - Ben Castricum @@ -917,9 +925,9 @@ spyozon SPY Fox 3: Operation Ozone 10d8e66cd11049ce64815ebb9fd76eb3 -1 fr All - - - gist974, ThierryFR 96a3069a3c63caa7329588ce1fef41ee -1 ru All - - - sev 7015b059ab72cff3a0ef9fb4d5e9889d -1 de Windows - - - andy482 - be39a5d4db60e8aa736b9086778cb45c -1 gb Windows - - - + be39a5d4db60e8aa736b9086778cb45c -1 gb Windows - - - - ebd0b2c8a387f18887282afe6cad894a 15317 en All - Demo - Kirben + ebd0b2c8a387f18887282afe6cad894a 15317 us All - Demo - Kirben a99c39ba65b6086be28aef576da69595 -1 fr Windows - Demo - Mevi 65563295c3a06493351870f20a1630cf 5235008 All All HE CUP Preview - sev diff --git a/devtools/skycpt/COMPACT.TXT b/devtools/skycpt/COMPACT.TXT index af22e129cf..4f8f5b97d9 100644 --- a/devtools/skycpt/COMPACT.TXT +++ b/devtools/skycpt/COMPACT.TXT @@ -2741,7 +2741,7 @@ SECTION::MAINLISTS 0000::NULL 40E6::sc38_phone_talk 40F4::sc32_garden_talk - 40DF::sc31_guard_talk + 40DF::sc31_guard_talk2 4145::barman_talk 4168::sc36_col_talk2 4169::sc36_gal_talk diff --git a/devtools/skycpt/README b/devtools/skycpt/README index 4b303cb0e9..ec7828f35c 100644 --- a/devtools/skycpt/README +++ b/devtools/skycpt/README @@ -16,8 +16,8 @@ This program was only included in ScummVM's source tree because the Debian licen forces us to. Instead download the file from http://www.scummvm.org/ Also, please be aware that if you create your own CPT file (if it isn't exactly the same as the -one we offer for download at www.scummvm.org), it will be incompatible and the savegames produced -using the file will be incompatible with ScummVM using the normal CPT file. +one we offer for download at www.scummvm.org), it will be incompatible and the saved games +produced using the file will be incompatible with ScummVM using the normal CPT file. The incompatibility will not be detected by ScummVM, it will most probably simply crash. If you still want to waste your time by creating this file: diff --git a/devtools/update-version.pl b/devtools/update-version.pl index b313846ab3..3b5f892c3f 100755 --- a/devtools/update-version.pl +++ b/devtools/update-version.pl @@ -37,12 +37,13 @@ my @subs_files = qw( dists/scummvm.rc dists/slackware/scummvm.SlackBuild dists/macosx/Info.plist + dists/macosx/dockplugin/Info.plist dists/iphone/Info.plist + dists/ios7/Info.plist dists/irix/scummvm.spec dists/win32/scummvm.nsi dists/wii/meta.xml dists/android/AndroidManifest.xml - dists/android/plugin-manifest.xml dists/openpandora/PXML.xml dists/openpandora/README-OPENPANDORA dists/openpandora/README-PND.txt |