diff options
Diffstat (limited to 'devtools')
-rw-r--r-- | devtools/create_titanic/create_titanic_dat.cpp | 140 | ||||
-rw-r--r-- | devtools/create_translations/po_parser.cpp | 16 | ||||
-rw-r--r-- | devtools/create_translations/po_parser.h | 1 |
3 files changed, 135 insertions, 22 deletions
diff --git a/devtools/create_titanic/create_titanic_dat.cpp b/devtools/create_titanic/create_titanic_dat.cpp index fc9222467f..b788733002 100644 --- a/devtools/create_titanic/create_titanic_dat.cpp +++ b/devtools/create_titanic/create_titanic_dat.cpp @@ -416,7 +416,7 @@ static const BedheadEntry OFF_RESTING_D_WRONG[1] = { { "Any", "Any", "Any", "ClosedWrong", 59, 70 } }; -static const char *const STRINGS_EN[] = { +static const char *const STRINGS_EN[108] = { "", "You are standing outside the Pellerator.", "I'm sorry, you cannot enter this pellerator at present as a bot is in the way.", @@ -478,11 +478,62 @@ static const char *const STRINGS_EN[] = { "Go where?", "It would be nice if you could take that but you can't.", "A bowl of pistachio nuts.", - "Not a bowl of pistachio nuts." + "Not a bowl of pistachio nuts.", + + "Sadly, it is not possible to summon the DoorBot from this location.", + "Sadly, it is not possible to summon the BellBot from this location.", + "There is no one here to talk to", + "Talking to ", + "the DoorBot", + "the DeskBot", + "a LiftBot", + "the Parrot", + "the BarBot", + "a ChatterBot", + "the BellBot", + "the Maitre d'Bot", + "a Succ-U-Bus", + "Unknown", + "The arm is already holding something.", + "You can't get this.", + "That doesn't seem to do anything.", + "It doesn't seem to want this.", + "This does not reach.", + "The chicken is already clean.", + "Succ-U-Bus auxiliary hose attachment incompatible with sliding glass cover.", + "This item is incorrectly calibrated.", + "Only First Class passengers are allowed to use the Gondoliers.", + "There is currently nothing available for your viewing pleasure on this channel.", + "Television control", + "Operate visual entertainment device", + "Operate the lights", + "Deploy floral enhancement", + "Deploy fully recumbent relaxation device", + "Deploy comfort workstation", + "Deploy minor horizontally mobile storage compartment", + "Deploy major semi-recumbent relaxation device", + "Inflate fully recumbent relaxation device ", + "Deploy personal maintenance hub", + "Deploy executive horizontal worksurface", + "Deploy minor semi-recumbent relaxation device", + "Deploy aqueous cleansing receptacle", + "Deploy major horizontally mobile storage compartment", + "Succ-U-Bus delivery system control", + "Navigation controller", + "Summon Elevator", + "Summon Pellerator", + "Go to the Bottom of the Well", + "Go to the Top of the Well", + "Go to your stateroom", + "Go to the Bar", + "Go to the Promenade Deck", + "Go to the Arboretum", + "Go to the Music Room", + "Go to the First Class Restaurant" }; -static const char *const STRINGS_DE[] = { - // TODO: Translate these to their German versions +static const char *const STRINGS_DE[152] = { + // TODO: Still many strings to translate to German "", "Sie befinden sich vor dem Pellerator.", "Wir bedauern, Zutritt zu diesem Pellerator ist nicht m\0xF6" @@ -561,6 +612,57 @@ static const char *const STRINGS_DE[] = { "Eine Schale Pistazien.", "Keine Schale Pistazien.", + "Sadly, it is not possible to summon the DoorBot from this location.", + "Sadly, it is not possible to summon the BellBot from this location.", + "There is no one here to talk to", + "Talking to ", + "the DoorBot", + "the DeskBot", + "a LiftBot", + "the Parrot", + "the BarBot", + "a ChatterBot", + "the BellBot", + "the Maitre d'Bot", + "a Succ-U-Bus", + "Unknown" + "The arm is already holding something.", + "You can't get this.", + "That doesn't seem to do anything.", + "It doesn't seem to want this.", + "This does not reach.", + "The chicken is already clean.", + "Succ-U-Bus auxiliary hose attachment incompatible with sliding glass cover.", + "This item is incorrectly calibrated.", + "Only First Class passengers are allowed to use the Gondoliers.", + "There is currently nothing available for your viewing pleasure on this channel.", + "Television control", + "Operate visual entertainment device", + "Operate the lights", + "Deploy floral enhancement", + "Deploy fully recumbent relaxation device", + "Deploy comfort workstation", + "Deploy minor horizontally mobile storage compartment", + "Deploy major semi-recumbent relaxation device", + "Inflate fully recumbent relaxation device ", + "Deploy personal maintenance hub", + "Deploy executive horizontal worksurface", + "Deploy minor semi-recumbent relaxation device", + "Deploy aqueous cleansing receptacle", + "Deploy major horizontally mobile storage compartment", + "Succ-U-Bus delivery system control", + "Navigation controller", + "Summon Elevator", + "Summon Pellerator", + "Go to the Bottom of the Well", + "Go to the Top of the Well", + "Go to your stateroom", + "Go to the Bar", + "Go to the Promenade Deck", + "Go to the Arboretum", + "Go to the Music Room", + "Go to the First Class Restaurant" + "Sommer", "Herbst", "Winter", @@ -779,12 +881,16 @@ void writeNumbers() { } void writeString(uint offset) { - inputFile.seek(offset - FILE_DIFF[_version]); - char c; - do { - c = inputFile.readByte(); - outputFile.writeByte(c); - } while (c); + if (offset == 0) { + outputFile.writeByte(0); + } else { + inputFile.seek(offset - FILE_DIFF[_version]); + char c; + do { + c = inputFile.readByte(); + outputFile.writeByte(c); + } while (c); + } } void writeResponseTree() { @@ -818,7 +924,7 @@ void writeResponseTree() { void writeSentenceEntries(const char *name, uint tableOffset) { outputFile.seek(dataOffset); - uint v1, v2, v9, v11, v12, v13; + uint v1, category, v4, v9, v11, v12, v13; uint offset3, offset5, offset6, offset7, offset8, offset10; for (uint idx = 0; ; ++idx) { @@ -829,9 +935,9 @@ void writeSentenceEntries(const char *name, uint tableOffset) { break; // Read data fields - v2 = inputFile.readLong(); + category = inputFile.readLong(); offset3 = inputFile.readLong(); - /* v4 = */inputFile.readLong(); + v4 = inputFile.readLong(); offset5 = inputFile.readLong(); offset6 = inputFile.readLong(); offset7 = inputFile.readLong(); @@ -843,9 +949,9 @@ void writeSentenceEntries(const char *name, uint tableOffset) { v13 = inputFile.readLong(); outputFile.writeLong(v1); - outputFile.writeLong(v2); + outputFile.writeLong(category); writeString(offset3); - outputFile.writeLong(v1); + outputFile.writeLong(v4); writeString(offset5); writeString(offset6); writeString(offset7); @@ -1085,8 +1191,8 @@ void writeData() { writeStringArray("TEXT/ITEM_NAMES", ITEM_NAMES, 46); writeStringArray("TEXT/ITEM_IDS", ITEM_IDS, 40); writeStringArray("TEXT/ROOM_NAMES", ROOM_NAMES, 34); - writeStringArray("TEXT/STRINGS", STRINGS_EN, 58); - writeStringArray("TEXT/STRINGS/DE", STRINGS_DE, 104); + writeStringArray("TEXT/STRINGS", STRINGS_EN, 108); + writeStringArray("TEXT/STRINGS/DE", STRINGS_DE, 152); const int TEXT_PHRASES[3] = { 0x61D3C8, 0x618340, 0x61B1E0 }; const int TEXT_REPLACEMENTS1[3] = { 0x61D9B0, 0x61C788, 0x61B7C8 }; const int TEXT_REPLACEMENTS2[3] = { 0x61DD20, 0x61CAF8, 0x61BB38 }; diff --git a/devtools/create_translations/po_parser.cpp b/devtools/create_translations/po_parser.cpp index ecc3ba540c..f1ad833932 100644 --- a/devtools/create_translations/po_parser.cpp +++ b/devtools/create_translations/po_parser.cpp @@ -108,7 +108,7 @@ const char *PoMessageList::operator[](int index) const { } PoMessageEntryList::PoMessageEntryList(const char *lang) : - _lang(NULL), _charset(NULL), _langName(NULL), + _lang(NULL), _charset(NULL), _langName(NULL), _langNameAlt(NULL), _list(NULL), _size(0), _allocated(0) { _lang = new char[1 + strlen(lang)]; @@ -117,14 +117,15 @@ PoMessageEntryList::PoMessageEntryList(const char *lang) : _charset = new char[1]; _charset[0] = '\0'; // Set default langName to lang - _langName = new char[1 + strlen(lang)]; - strcpy(_langName, lang); + _langNameAlt = new char[1 + strlen(lang)]; + strcpy(_langNameAlt, lang); } PoMessageEntryList::~PoMessageEntryList() { delete[] _lang; delete[] _charset; delete[] _langName; + delete[] _langNameAlt; for (int i = 0; i < _size; ++i) delete _list[i]; delete[] _list; @@ -134,11 +135,16 @@ void PoMessageEntryList::addMessageEntry(const char *translation, const char *me if (*message == '\0') { // This is the header. // We get the charset and the language name from the translation string - char *str = parseLine(translation, "Language:"); + char *str = parseLine(translation, "X-Language-name:"); if (str != NULL) { delete[] _langName; _langName = str; } + str = parseLine(translation, "Language:"); + if (str != NULL) { + delete[] _langNameAlt; + _langNameAlt = str; + } str = parseLine(translation, "charset="); if (str != NULL) { delete[] _charset; @@ -236,7 +242,7 @@ const char *PoMessageEntryList::language() const { } const char *PoMessageEntryList::languageName() const { - return _langName; + return _langName ? _langName : _langNameAlt; } const char *PoMessageEntryList::charset() const { diff --git a/devtools/create_translations/po_parser.h b/devtools/create_translations/po_parser.h index a3b1c9a9d7..0c30517017 100644 --- a/devtools/create_translations/po_parser.h +++ b/devtools/create_translations/po_parser.h @@ -96,6 +96,7 @@ private: char *_lang; char *_charset; char *_langName; + char *_langNameAlt; PoMessageEntry **_list; int _size; |