Skip to content

Commit

Permalink
MORTEVIELLE: Start updating tools to add support to German DOS version
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Apr 6, 2012
1 parent 2c49c3e commit 7ad0997
Show file tree
Hide file tree
Showing 6 changed files with 697 additions and 21 deletions.
31 changes: 20 additions & 11 deletions devtools/create_mortdat/create_mortdat.cpp
Expand Up @@ -57,25 +57,32 @@ void openOutputFile(const char *outFilename) {
* Write out the data for the font
*/
void writeFontBlock() {
const int knownAddr[2] = {0x36b0, 0x36c0};
byte checkBuffer[7];
byte fontBuffer[121 * 6];

// Move to just prior the font data and verify that we're reading the known mort.com
mortCom.seek(0x36b0);
mortCom.read(checkBuffer, 7);

if ((checkBuffer[0] != 0x59) || (checkBuffer[1] != 0x5B) || (checkBuffer[2] != 0x58) ||
(checkBuffer[3] != 0xC3) || (checkBuffer[4] != 0xE8) || (checkBuffer[5] != 0xD6) ||
(checkBuffer[6] != 0x02)) {
printf("Invalid mort.com input file");
exit(0);
for (int i = 0; i <= 2; ++i) {
if ( i == 2) {
printf("Invalid mort.com input file");
exit(0);
}

mortCom.seek(knownAddr[i]);
mortCom.read(checkBuffer, 7);

if ((checkBuffer[0] == 0x59) && (checkBuffer[1] == 0x5B) && (checkBuffer[2] == 0x58) ||
(checkBuffer[3] == 0xC3) && (checkBuffer[4] == 0xE8) && (checkBuffer[5] == 0xD6) ||
(checkBuffer[6] == 0x02)) {
break;
}
}

// Read in the data
mortCom.read(fontBuffer, 121 * 6);

// Write out a section header to the output file and the font data
char fontHeader[4] = { 'F', 'O', 'N', 'T' };
const char fontHeader[4] = { 'F', 'O', 'N', 'T' };
outputFile.write(fontHeader, 4); // Section Id
outputFile.writeWord(121 * 6); // Section size

Expand All @@ -84,8 +91,8 @@ void writeFontBlock() {

void writeStaticStrings(const char **strings, DataType dataType, int languageId) {
// Write out a section header
char sStaticStrings[4] = { 'S', 'S', 'T', 'R' };
char sGameStrings[4] = { 'G', 'S', 'T', 'R' };
const char sStaticStrings[4] = { 'S', 'S', 'T', 'R' };
const char sGameStrings[4] = { 'G', 'S', 'T', 'R' };

if (dataType == kStaticStrings)
outputFile.write(sStaticStrings, 4);
Expand Down Expand Up @@ -119,6 +126,7 @@ void writeStaticStrings(const char **strings, DataType dataType, int languageId)
void writeEngineStrings() {
writeStaticStrings(engineDataEn, kStaticStrings, 1);
writeStaticStrings(engineDataFr, kStaticStrings, 0);
writeStaticStrings(engineDataDe, kStaticStrings, 2);
}

/**
Expand All @@ -127,6 +135,7 @@ void writeEngineStrings() {
void writeGameStrings() {
writeStaticStrings(gameDataEn, kGameStrings, 1);
writeStaticStrings(gameDataFr, kGameStrings, 0);
writeStaticStrings(gameDataDe, kGameStrings, 2);
}

void process() {
Expand Down
53 changes: 53 additions & 0 deletions devtools/create_mortdat/enginetext.h
Expand Up @@ -133,4 +133,57 @@ const char *engineDataFr[] = {
NULL
};

const char *engineDataDe[] = {
"[2][ ][JA][NEIN]",
"Go to",
"Someone enters, looks surised, but says nothing",
"Cool",
"Schwer",
"Ungesund",
"Idem",
"You",
"are",
"Alone",

"Verdammt! Sie hoeren ein Geraeush...",
"Sie haetten ",
"% der Hinweise| bemerken muessen...",
"Do you want to wake up?",
"OK",
"",
" schreiben",

" lesen",
" Restart ",
"F3 nochmals",
"F8: stop",
"Hide self",
"take",
" probe ",
" raise ",
" -WEITER- ",
" -STOP- ",
"[1][ Benutzen Sie jetzt das Menue DEP...][OK]",
"lift",
"read",

"look",
"search",
"open",
"put",
"turn",
"tie",
"close",
"hit",
"pose",
"smash",

"smell",
"scratch",
"probe",
"[1][ Benutzen Sie jetzt das Menue DEP...][OK]",
"& tag",
NULL
};

#endif

0 comments on commit 7ad0997

Please sign in to comment.