diff options
| author | craigsc | 2020-01-11 12:08:21 -0800 |
|---|---|---|
| committer | craigsc | 2020-01-11 12:08:21 -0800 |
| commit | 3dd4fb16f017a8eab5c6c11fd119a397b457866e (patch) | |
| tree | 5b80b5c5038d8577c2d674a5a4742b335deca515 /devtools | |
| parent | f9f81ea9baecb714f26cf1c17a1b0ae58431467b (diff) | |
| parent | 5893672b80f00fced33c42e63471d68ba47d7dd4 (diff) | |
| download | scummvm-rg350-3dd4fb16f017a8eab5c6c11fd119a397b457866e.tar.gz scummvm-rg350-3dd4fb16f017a8eab5c6c11fd119a397b457866e.tar.bz2 scummvm-rg350-3dd4fb16f017a8eab5c6c11fd119a397b457866e.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'devtools')
| -rw-r--r-- | devtools/create_prince/en.po | 101 | ||||
| -rw-r--r-- | devtools/create_prince/ru.po | 4 | ||||
| -rw-r--r-- | devtools/create_titanic/winexe.cpp | 14 | ||||
| -rw-r--r-- | devtools/create_titanic/winexe.h | 35 | ||||
| -rw-r--r-- | devtools/create_titanic/winexe_pe.cpp | 46 | ||||
| -rw-r--r-- | devtools/create_titanic/winexe_pe.h | 22 | ||||
| -rwxr-xr-x | devtools/encode-macbinary.sh | 8 |
7 files changed, 138 insertions, 92 deletions
diff --git a/devtools/create_prince/en.po b/devtools/create_prince/en.po index 4a025148c1..62c42bc36e 100644 --- a/devtools/create_prince/en.po +++ b/devtools/create_prince/en.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Prince\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" "POT-Creation-Date: 2018-04-17 19:53+0100\n" -"PO-Revision-Date: 2020-01-04 01:01+0000\n" +"PO-Revision-Date: 2020-01-09 15:27+0000\n" "Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n" "Language-Team: English <https://translations.scummvm.org/projects/prince/" "prince/en/>\n" @@ -8465,23 +8465,23 @@ msgstr "$6: That's dirty!" #: dialog0263.txt:208 msgid "$7: Została wyrządzona nam straszna krzywda!" -msgstr "" +msgstr "$7: Terrible harm was done to us!" #: dialog0263.txt:309 msgid "$8: Żądamy surowego ukarania winnych!" -msgstr "" +msgstr "$8: We demand severe punishment for the guilty!" #: dialog0263.txt:310 msgid "$9: Chcę odzyskać swoje ciało!" -msgstr "" +msgstr "$9: I want to recover my body!" #: dialog0263.txt:311 msgid "$10: I trzeba coś z tym fantem zrobić!" -msgstr "" +msgstr "$10: And you have to do something about it!" #: dialog0263.txt:312 msgid "$11: Chcemy zemsty!" -msgstr "" +msgstr "$11: We want revenge!" #: dialog0263.txt:413 msgid "$12: Halo?!" @@ -8489,11 +8489,11 @@ msgstr "$12: Hello?!" #: dialog0263.txt:414 msgid "$13: Ktoś nas w ogóle słucha?!" -msgstr "" +msgstr "$13: Is anyone listening to us at all?!" #: dialog0263.txt:415 msgid "$14: Do licha ciężkiego, co za ignorancja!" -msgstr "" +msgstr "$14: What's the hell, such a disregard!" #: dialog0263.txt:416 msgid "$15: Słyszysz nas, Lucyferze?!" @@ -8578,86 +8578,93 @@ msgstr "OTHER: Tell it all again..." #: dialog0265.txt:1 msgid "OTHER: W miarę trwania opowieści Lucyfer był coraz|mniej śpiący, lecz za to coraz bardziej|zdumiony." msgstr "" +"OTHER: As the story progressed, Lucifer was less|and less dormant, but more " +"and more|astonished." #: dialog0266.txt:1 msgid "HERO: To właśnie on!" -msgstr "" +msgstr "HERO: It's him!" #: dialog0267.txt:1 msgid "OTHER: To właśnie on!" -msgstr "" +msgstr "OTHER: It's him!" #: dialog0268.txt:1 msgid "HERO: Ten sam demon był przyczyną naszych|nieszczęść?" -msgstr "" +msgstr "HERO: The same demon was the cause of our|misfortunes?" #: dialog0268.txt:2 msgid "OTHER: Poznaję go!" -msgstr "" +msgstr "OTHER: I recognized him!" #: dialog0268.txt:3 msgid "OTHER: A my mamy więcej wspólnego niż myślałam..." -msgstr "" +msgstr "OTHER: And we have more in common than I thought..." #: dialog0269.txt:1 msgid "OTHER: Tak, mój panie?" -msgstr "" +msgstr "OTHER: Yes my lord?" #: dialog0270.txt:1 msgid "OTHER: Rozpoczął się iście piekielny ogień pytań." -msgstr "" +msgstr "OTHER: And the truly hellish flow of questions began." #: dialog0271.txt:1 msgid "OTHER: Jesteś najbardziej nikczemnym, zuchwałym|i zepsutym diabłem w ostatnich latach." -msgstr "" +msgstr "OTHER: You are the most wicked, bold and corrupt devil in recent years." #: dialog0271.txt:2 msgid "OTHER: Przebijasz nawet Belzebuba." -msgstr "" +msgstr "OTHER: You even beat Beelzebub." #: dialog0271.txt:3 msgid "OTHER2: Wszystko dla twojej chwały,|mój panie." -msgstr "" +msgstr "OTHER2: Everything for your glory,|my lord." #: dialog0271.txt:4 msgid "OTHER2: Mówiłem, że moje nowoczesne metody|przyniosą rezultat i dotrzymuję|słowa." msgstr "" +"OTHER2: I said that my modern methods will bring results|and I keep my word." #: dialog0271.txt:5 msgid "OTHER2: Zasady są po to, by je łamać!" -msgstr "" +msgstr "OTHER2: The rules are there to break!" #: dialog0271.txt:6 msgid "OTHER2: Postęp musi skruszyć zmurszałe|i przestarzałe prawo!" -msgstr "" +msgstr "OTHER2: Progress must break the old and|outdated law!" #: dialog0271.txt:7 msgid "OTHER: I za to należy ci się nagroda, a tym dwóm|idiotom jakaś specjalna kara, może małe|przypalanko, może..." msgstr "" +"OTHER: And for that, you deserve a reward, and for|these two idiots some " +"special punishment,|maybe a small burn, maybe..." #: dialog0272.txt:1 msgid "P#OTHER: Z drugiej jednak strony..." -msgstr "" +msgstr "P#OTHER: On the other hand, however..." #: dialog0272.txt:2 msgid "P#OTHER: ...nie można tolerować narobionych|przez ciebie kłopotów." -msgstr "" +msgstr "P#OTHER: ...you can't ignore the trouble you|have caused." #: dialog0272.txt:3 msgid "OTHER: I tego, że do Piekła dostali się|zwykli śmiertelnicy, a ten na górze|znowu mnie upokarza." msgstr "" +"OTHER: And the fact that ordinary mortals|got to Hell, and the dude from the " +"top|humiliates me again." #: dialog0272.txt:4 msgid "OTHER: Jeśli nie odkręcisz tego w 5 sekund,|ja odkręcę ci łeb." -msgstr "" +msgstr "OTHER: If you don't unscrew it in 5 seconds,|I'll unscrew your head." #: dialog0272.txt:5 msgid "OTHER: A potem spokojnie porozmawiamy sobie o|ŁAMANIU, KRUSZENIU I WYPALANIU." -msgstr "" +msgstr "OTHER: And then we'll calmly talk about|BREAKING, CRUSHING AND BURNING." #: dialog0272.txt:6 msgid "OTHER: I to będzie długa rozmowa." -msgstr "" +msgstr "OTHER: And it will be a long conversation." #: dialog0273.txt:1 msgid "HERO: Ładna dzisiaj pogoda." @@ -8746,26 +8753,28 @@ msgstr "OTHER: Marosthittem chodj les uji|nioklamcom." #: dialog0283.txt:1 msgid "HERO: Pewnie nic nie rozumiesz z tego, co|mówię, ty tępy osiłku." msgstr "" +"HERO: You apparently don't understand anything|from what I'm saying,|you " +"blunt musclehead." #: dialog0284.txt:1 msgid "HERO: Co za zadziwiający świat, mają tu takie|tresowane małpy jak ty." -msgstr "" +msgstr "HERO: What an amazing world, having such trained|monkeys as you here." #: dialog0285.txt:1 msgid "HERO: Ha, ha! Mogę do ciebie gadać co chcę,|a ty i tak mi nic nie zrobisz." -msgstr "" +msgstr "HERO: Haha! I can tell you what I want|and you won't do anything to me." #: dialog0286.txt:1 msgid "HERO: Arivaldzie! Już czas! Już czas!|Zabierz mnie stąd!" -msgstr "" +msgstr "HERO: Arivald! It's time! It's time!|Take me out of here!" #: dialog0287.txt:1 msgid "HERO: A kim do licha jest Sheila?..." -msgstr "" +msgstr "HERO: Who the hell is Sheila?..." #: dialog0288.txt:1 msgid "HERO: Ślepa to mało powiedziane..." -msgstr "" +msgstr "HERO: Blind is an understatement..." #: dialog0289.txt:1 msgid "OTHER: Nareszcie chwila rozrywki!" @@ -8773,67 +8782,67 @@ msgstr "OTHER: Finally a minute break!" #: dialog0290.txt:1 msgid "OTHER: Czas się odegrać!" -msgstr "" +msgstr "OTHER: Time to play back!" #: dialog0291.txt:1 msgid "OTHER: Łapy aż zatrzeszczą!" -msgstr "" +msgstr "OTHER: My paws are crackling up!" #: dialog0292.txt:1 msgid "OTHER: Rączki do góry!" -msgstr "" +msgstr "OTHER: Hands up!" #: dialog0293.txt:1 msgid "OTHER: Nadchodzi godzina zapłaty!" -msgstr "" +msgstr "OTHER: The hour of payback is coming!" #: dialog0294.txt:1 msgid "OTHER: To oznacza wojnę!" -msgstr "" +msgstr "OTHER: It means war!" #: dialog0295.txt:1 msgid "OTHER: Się robi, książę!" -msgstr "" +msgstr "OTHER: Consider it done, prince!" #: dialog0296.txt:1 msgid "OTHER: O nie, książę, jak tak dalej pójdzie,|to zbankrutuję." -msgstr "" +msgstr "OTHER: Oh no, prince, if this continues,|I will go bankrupt." #: dialog0296.txt:2 msgid "OTHER: Myślę, że starczy na dzisiaj." -msgstr "" +msgstr "OTHER: I think that's enough for today." #: dialog0297.txt:1 msgid "OTHER: Ty atakujesz, książę." -msgstr "" +msgstr "OTHER: Your turn to attack, prince." #: dialog0298.txt:1 msgid "OTHER: Broń się, książę." -msgstr "" +msgstr "OTHER: Defend yourself, prince." #: dialog0299.txt:1 msgid "OTHER: Dobra nasza, teraz ja atakuję!" -msgstr "" +msgstr "OTHER: We are good, I'm attacking now!" #: dialog0300.txt:1 msgid "OTHER: Ha, i tak się obronię!" -msgstr "" +msgstr "OTHER: Ha, I will defend myself anyway!" #: dialog0301.txt:1 msgid "OTHER: Złocisz dla ciebie, książę..." -msgstr "" +msgstr "OTHER: Some gold for you, prince..." #: dialog0302.txt:1 msgid "OTHER: Poproszę o złocisza, książę..." -msgstr "" +msgstr "OTHER: Please, give me some gold, prince..." #: dialog0303.txt:1 msgid "OTHER: Nie masz złociszy?" -msgstr "" +msgstr "OTHER: Got no gold?" #: dialog0303.txt:2 msgid "OTHER: Ech, książę..." -msgstr "" +msgstr "OTHER: Ugh, prince..." #: dialog0303.txt:3 msgid "OTHER: Ale przynajmniej miałem chwilę radości." diff --git a/devtools/create_prince/ru.po b/devtools/create_prince/ru.po index 3fb80002f9..63b67b6f21 100644 --- a/devtools/create_prince/ru.po +++ b/devtools/create_prince/ru.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Prince\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" "POT-Creation-Date: 2018-04-17 19:53+0100\n" -"PO-Revision-Date: 2020-01-04 01:01+0000\n" +"PO-Revision-Date: 2020-01-06 00:26+0000\n" "Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n" "Language-Team: Russian <https://translations.scummvm.org/projects/prince/" "prince/ru/>\n" @@ -8135,7 +8135,7 @@ msgstr "$10: Что-то должно произойти!" #: dialog0263.txt:312 msgid "$11: Chcemy zemsty!" -msgstr "$11: Мы хотим курить!" +msgstr "$11: Мы хотим мести!" #: dialog0263.txt:413 msgid "$12: Halo?!" diff --git a/devtools/create_titanic/winexe.cpp b/devtools/create_titanic/winexe.cpp index c23bd84a89..49be23dbd4 100644 --- a/devtools/create_titanic/winexe.cpp +++ b/devtools/create_titanic/winexe.cpp @@ -80,4 +80,18 @@ String WinResourceID::toString() const { return ""; } +bool WinResources::loadFromEXE(const String &fileName) { + if (fileName.empty()) + return false; + + File *file = new File(); + + if (!file->open(fileName.c_str())) { + delete file; + return false; + } + + return loadFromEXE(file); +} + } // End of namespace Common diff --git a/devtools/create_titanic/winexe.h b/devtools/create_titanic/winexe.h index 102f1494fd..6bfe2a25a0 100644 --- a/devtools/create_titanic/winexe.h +++ b/devtools/create_titanic/winexe.h @@ -23,6 +23,7 @@ #ifndef COMMON_WINEXE_H #define COMMON_WINEXE_H +#include "file.h" #include "hash-str.h" #include "str.h" @@ -90,6 +91,40 @@ struct WinResourceID_EqualTo { bool operator()(const WinResourceID &id1, const WinResourceID &id2) const { return id1 == id2; } }; +/** + * A class able to load resources from a Windows Executable, such + * as cursors, bitmaps, and sounds. + */ +class WinResources { +public: + virtual ~WinResources() {} + + /** Clear all information. */ + virtual void clear() = 0; + + /** Load from an EXE file. */ + virtual bool loadFromEXE(const String &fileName); + + virtual bool loadFromEXE(File *stream) = 0; + + /** Return a list of IDs for a given type. */ + virtual const Array<WinResourceID> getIDList(const WinResourceID &type) const = 0; + + /** Return a list of languages for a given type and ID. */ + virtual const Array<WinResourceID> getLangList(const WinResourceID &type, const WinResourceID &id) const { + Array<WinResourceID> array; + return array; + }; + + /** Return a stream to the specified resource, taking the first language found (or 0 if non-existent). */ + virtual File *getResource(const WinResourceID &type, const WinResourceID &id) = 0; + + /** Return a stream to the specified resource (or 0 if non-existent). */ + virtual File *getResource(const WinResourceID &type, const WinResourceID &id, const WinResourceID &lang) { + return getResource(type, id); + } +}; + } // End of namespace Common #endif diff --git a/devtools/create_titanic/winexe_pe.cpp b/devtools/create_titanic/winexe_pe.cpp index 16ad16ab63..f55740f692 100644 --- a/devtools/create_titanic/winexe_pe.cpp +++ b/devtools/create_titanic/winexe_pe.cpp @@ -44,20 +44,6 @@ void PEResources::clear() { delete _exe; _exe = 0; } -bool PEResources::loadFromEXE(const String &fileName) { - if (fileName.empty()) - return false; - - File *file = new File(); - - if (!file->open(fileName.c_str())) { - delete file; - return false; - } - - return loadFromEXE(file); -} - bool PEResources::loadFromEXE(File *stream) { clear(); @@ -151,7 +137,7 @@ void PEResources::parseResourceLevel(Section §ion, uint32 offset, int level) if (level == 0) _curType = id; else if (level == 1) - _curName = id; + _curID = id; else if (level == 2) _curLang = id; @@ -165,7 +151,7 @@ void PEResources::parseResourceLevel(Section §ion, uint32 offset, int level) resource.offset = _exe->readUint32LE() + section.offset - section.virtualAddress; resource.size = _exe->readUint32LE(); - _resources[_curType][_curName][_curLang] = resource; + _resources[_curType][_curID][_curLang] = resource; } _exe->seek(lastOffset); @@ -184,32 +170,32 @@ const Array<WinResourceID> PEResources::getTypeList() const { return array; } -const Array<WinResourceID> PEResources::getNameList(const WinResourceID &type) const { +const Array<WinResourceID> PEResources::getIDList(const WinResourceID &type) const { Array<WinResourceID> array; if (!_exe || !_resources.contains(type)) return array; - const NameMap &nameMap = _resources[type]; + const IDMap &idMap = _resources[type]; - for (NameMap::const_iterator it = nameMap.begin(); it != nameMap.end(); it++) + for (IDMap::const_iterator it = idMap.begin(); it != idMap.end(); it++) array.push_back(it->_key); return array; } -const Array<WinResourceID> PEResources::getLangList(const WinResourceID &type, const WinResourceID &name) const { +const Array<WinResourceID> PEResources::getLangList(const WinResourceID &type, const WinResourceID &id) const { Array<WinResourceID> array; if (!_exe || !_resources.contains(type)) return array; - const NameMap &nameMap = _resources[type]; + const IDMap &idMap = _resources[type]; - if (!nameMap.contains(name)) + if (!idMap.contains(id)) return array; - const LangMap &langMap = nameMap[name]; + const LangMap &langMap = idMap[id]; for (LangMap::const_iterator it = langMap.begin(); it != langMap.end(); it++) array.push_back(it->_key); @@ -217,13 +203,13 @@ const Array<WinResourceID> PEResources::getLangList(const WinResourceID &type, c return array; } -File *PEResources::getResource(const WinResourceID &type, const WinResourceID &name) { - Array<WinResourceID> langList = getLangList(type, name); +File *PEResources::getResource(const WinResourceID &type, const WinResourceID &id) { + Array<WinResourceID> langList = getLangList(type, id); if (langList.empty()) return 0; - const Resource &resource = _resources[type][name][langList[0]]; + const Resource &resource = _resources[type][id][langList[0]]; byte *data = (byte *)malloc(resource.size); _exe->seek(resource.offset); _exe->read(data, resource.size); @@ -233,16 +219,16 @@ File *PEResources::getResource(const WinResourceID &type, const WinResourceID &n return file; } -File *PEResources::getResource(const WinResourceID &type, const WinResourceID &name, const WinResourceID &lang) { +File *PEResources::getResource(const WinResourceID &type, const WinResourceID &id, const WinResourceID &lang) { if (!_exe || !_resources.contains(type)) return 0; - const NameMap &nameMap = _resources[type]; + const IDMap &idMap = _resources[type]; - if (!nameMap.contains(name)) + if (!idMap.contains(id)) return 0; - const LangMap &langMap = nameMap[name]; + const LangMap &langMap = idMap[id]; if (!langMap.contains(lang)) return 0; diff --git a/devtools/create_titanic/winexe_pe.h b/devtools/create_titanic/winexe_pe.h index 3c960053b2..6ab7ae847a 100644 --- a/devtools/create_titanic/winexe_pe.h +++ b/devtools/create_titanic/winexe_pe.h @@ -38,7 +38,7 @@ class SeekableReadStream; * A class able to load resources from a Windows Portable Executable, such * as cursors, bitmaps, and sounds. */ -class PEResources { +class PEResources : WinResources { public: PEResources(); ~PEResources(); @@ -47,24 +47,24 @@ public: void clear(); /** Load from an EXE file. */ - bool loadFromEXE(const String &fileName); + using WinResources::loadFromEXE; bool loadFromEXE(File *stream); /** Return a list of resource types. */ const Array<WinResourceID> getTypeList() const; - /** Return a list of names for a given type. */ - const Array<WinResourceID> getNameList(const WinResourceID &type) const; + /** Return a list of IDs for a given type. */ + const Array<WinResourceID> getIDList(const WinResourceID &type) const; - /** Return a list of languages for a given type and name. */ - const Array<WinResourceID> getLangList(const WinResourceID &type, const WinResourceID &name) const; + /** Return a list of languages for a given type and ID. */ + const Array<WinResourceID> getLangList(const WinResourceID &type, const WinResourceID &id) const; /** Return a stream to the specified resource, taking the first language found (or 0 if non-existent). */ - File *getResource(const WinResourceID &type, const WinResourceID &name); + File *getResource(const WinResourceID &type, const WinResourceID &id); /** Return a stream to the specified resource (or 0 if non-existent). */ - File *getResource(const WinResourceID &type, const WinResourceID &name, const WinResourceID &lang); + File *getResource(const WinResourceID &type, const WinResourceID &id, const WinResourceID &lang); /** Returns true if the resources is empty */ bool empty() const { return _sections.empty(); } @@ -80,7 +80,7 @@ private: File *_exe; void parseResourceLevel(Section §ion, uint32 offset, int level); - WinResourceID _curType, _curName, _curLang; + WinResourceID _curType, _curID, _curLang; struct Resource { uint32 offset; @@ -88,8 +88,8 @@ private: }; typedef HashMap<WinResourceID, Resource, WinResourceID_Hash, WinResourceID_EqualTo> LangMap; - typedef HashMap<WinResourceID, LangMap, WinResourceID_Hash, WinResourceID_EqualTo> NameMap; - typedef HashMap<WinResourceID, NameMap, WinResourceID_Hash, WinResourceID_EqualTo> TypeMap; + typedef HashMap<WinResourceID, LangMap, WinResourceID_Hash, WinResourceID_EqualTo> IDMap; + typedef HashMap<WinResourceID, IDMap, WinResourceID_Hash, WinResourceID_EqualTo> TypeMap; TypeMap _resources; }; diff --git a/devtools/encode-macbinary.sh b/devtools/encode-macbinary.sh index 235dd860a4..0655fc9242 100755 --- a/devtools/encode-macbinary.sh +++ b/devtools/encode-macbinary.sh @@ -7,10 +7,12 @@ for i in * do if test -d "$i" ; then cd "$i" - bash $0 "$1/$i" + if [ "$(ls -A .)" ] ; then # directory is not empty + bash $0 "$1/$i" + fi cd .. else - echo -n $1/$i ; echo -ne "... \r" + echo -ne "$1/$i... \r" macbinary encode "$i" touch -r "$i" "$i.bin" mv "$i.bin" "$i" @@ -18,6 +20,6 @@ do done # on the top level we want to print a new line -if test -z $1 ; then +if test -z "$1" ; then echo fi |
