aboutsummaryrefslogtreecommitdiff
path: root/devtools/create_mortdat
diff options
context:
space:
mode:
authorThierry Crozat2013-08-03 16:45:05 +0100
committerThierry Crozat2013-08-03 16:50:14 +0100
commit0a2e64b903a65e9ffcfc3f7f81eba708c774d0f2 (patch)
tree93ab2865cf717fe65fa479601063e7c825f76f5f /devtools/create_mortdat
parent178feb8e8bd46b0bb5222c7a4a09e6da91df9752 (diff)
downloadscummvm-rg350-0a2e64b903a65e9ffcfc3f7f81eba708c774d0f2.tar.gz
scummvm-rg350-0a2e64b903a65e9ffcfc3f7f81eba708c774d0f2.tar.bz2
scummvm-rg350-0a2e64b903a65e9ffcfc3f7f81eba708c774d0f2.zip
DEVTOOLS: Include English menu in mortevielle dat file
Diffstat (limited to 'devtools/create_mortdat')
-rw-r--r--devtools/create_mortdat/create_mortdat.cpp27
-rw-r--r--devtools/create_mortdat/menudata.h79
2 files changed, 106 insertions, 0 deletions
diff --git a/devtools/create_mortdat/create_mortdat.cpp b/devtools/create_mortdat/create_mortdat.cpp
index 653a0754eb..93ca721d95 100644
--- a/devtools/create_mortdat/create_mortdat.cpp
+++ b/devtools/create_mortdat/create_mortdat.cpp
@@ -41,6 +41,7 @@
#include "create_mortdat.h"
#include "enginetext.h"
#include "gametext.h"
+#include "menudata.h"
bool File::open(const char *filename, AccessMode mode) {
@@ -200,10 +201,36 @@ void writeGameStrings() {
writeStaticStrings(gameDataDe, kGameStrings, 2);
}
+/**
+ * Write out the data for the English menu
+ */
+void writeMenuBlock() {
+ // Write out a section header to the output file and the font data
+ const char menuHeader[4] = { 'M', 'E', 'N', 'U' };
+ outputFile.write(menuHeader, 4); // Section Id
+ outputFile.writeWord(strlen(menuDataEn) / 8); // Section size
+ // Write each 8-characters block as a byte (one bit per character)
+ // ' ' -> 0, anything else -> 1
+ byte value;
+ int valueCpt = 0;
+ const char* str = menuDataEn;
+ while (*str != 0) {
+ if (*(str++) != ' ')
+ value |= (1 << (7 - valueCpt));
+ ++valueCpt;
+ if (valueCpt == 8) {
+ outputFile.writeByte(value);
+ value = 0;
+ valueCpt = 0;
+ }
+ }
+}
+
void process() {
writeFontBlock();
writeGameStrings();
writeEngineStrings();
+ writeMenuBlock();
}
/**
diff --git a/devtools/create_mortdat/menudata.h b/devtools/create_mortdat/menudata.h
new file mode 100644
index 0000000000..aa4557b336
--- /dev/null
+++ b/devtools/create_mortdat/menudata.h
@@ -0,0 +1,79 @@
+/* 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.
+ *
+ * This is a utility for extracting needed resource data from different language
+ * version of the Mortevielle executable files into a new file mort.dat - this
+ * is required for the ScummVM Mortevielle module to work properly
+ */
+
+#ifndef MENUDATA_H
+#define MENUDATA_H
+
+const char *menuDataEn =
+ " @@@ "
+ " @ "
+ " @ @ @@ @@@ @@@ "
+ " @ @ @ @ @ "
+ " @ @ @ @ @ "
+ " @ @ @ @ @ "
+ "@@@ @@@ @@ @@ "
+ " "
+ " @@ @@ "
+ " @@ @ @ "
+ " @ @ @ @ @@@ @@@ @@@"
+ " @ @ @ @ @ @ @ "
+ " @ @ @ @ @ @ "
+ " @ @ @ @ @ @ "
+ "@@@ @@@ @@@@ @@ "
+ " "
+ " @ @ "
+ " @@ @ "
+ " @ @ @@@@ @@@@ "
+ " @ @ @ @ @ "
+ " @@@@@ @ @ "
+ " @ @ @ @ @ "
+ "@@@ @@@ @@@ @@ "
+ " "
+ " @@@@@ @@@ @@@"
+ " @ @ @ @ @"
+ " @ @@@ @ @ "
+ " @@@@ @ @ @ @@@ "
+ " @ @@@@@ @ @ "
+ " @ @ @ @ @ "
+ "@@@@@@ @@@ @@@ @@@ "
+ " "
+ "@@@@@@@ @@@ @@@ "
+ "@ @ @ @ @ "
+ " @ @@@@ @ @ @@"
+ " @ @ @ @ @@ @ "
+ " @ @ @ @ @ @@ "
+ " @ @ @ @ @ @ "
+ "@@@ @@@@ @@@ @@@ @@@"
+ " "
+ " @@@@@@@ @ @@@ "
+ " @ @ @ "
+ " @ @ @@ @ @@@ "
+ " @@@@ @ @ @ @"
+ " @ @ @ @ @@@@@ "
+ " @ @ @ @ "
+ "@@@ @@@ @@@ @@@ "
+ " ";
+
+#endif