aboutsummaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-06-18 10:31:49 +0200
committerThierry Crozat2019-07-28 15:09:14 +0100
commit83e05ea13f61fdd5d582115c8c2bbd246f70983c (patch)
treea18687fa0a205254a8d231b24d0d63ca9af2dcd9 /devtools
parent76142e2e7dddcc41906bdddc1138d452b15de3bc (diff)
downloadscummvm-rg350-83e05ea13f61fdd5d582115c8c2bbd246f70983c.tar.gz
scummvm-rg350-83e05ea13f61fdd5d582115c8c2bbd246f70983c.tar.bz2
scummvm-rg350-83e05ea13f61fdd5d582115c8c2bbd246f70983c.zip
SUPERNOVA2: Add english translated image
This adds translated image of cyphered text inside Cabin room I don't think I can get any closer to the original looks with .pbm format.
Diffstat (limited to 'devtools')
-rw-r--r--devtools/create_supernova2/create_supernova2.cpp16
-rw-r--r--devtools/create_supernova2/img1-en-original.jpgbin0 -> 269133 bytes
-rw-r--r--devtools/create_supernova2/img1-en.pbmbin0 -> 38457 bytes
-rw-r--r--devtools/create_supernova2/img1-en.xcfbin0 -> 22946 bytes
4 files changed, 8 insertions, 8 deletions
diff --git a/devtools/create_supernova2/create_supernova2.cpp b/devtools/create_supernova2/create_supernova2.cpp
index 5c9e22f298..cca2a73207 100644
--- a/devtools/create_supernova2/create_supernova2.cpp
+++ b/devtools/create_supernova2/create_supernova2.cpp
@@ -87,9 +87,9 @@ void writeImage(File& outputFile, const char *name, const char* language) {
else {
// We have finished reading the header.
// Check the size is as expected.
- if (w != 640 || h != 480) {
+ if ((w != 640 || h != 480) && (w != 320 || h != 200)) {
imgFile.close();
- printf("Binary pbm file '%s' doesn't have the expected size (expected: 640x480, read: %dx%d). This image will be skipped.\n", fileName, w, h);
+ printf("Binary pbm file '%s' doesn't have the expected size (expected: 640x480 or 320x200, read: %dx%d). This image will be skipped.\n", fileName, w, h);
return;
}
// And break out of the loop.
@@ -121,13 +121,13 @@ void writeImage(File& outputFile, const char *name, const char* language) {
outputFile.writeByte(0);
}
- // Write block size (640*480 / 8)
- outputFile.writeLong(38400);
+ // Write block size
+ outputFile.writeLong(w * h / 8);
- // Write all the bytes. We should have 38400 bytes (640 * 480 / 8)
+ // Write all the bytes. We should have w * h / 8 bytes
// However we need to invert the bits has the engine expects 1 for the background and 0 for the text (black)
// but pbm uses 0 for white and 1 for black.
- for (i = 0 ; i < 38400 ; ++i) {
+ for (i = 0 ; i < w * h / 8 ; ++i) {
byte b = imgFile.readByte();
outputFile.writeByte(~b);
}
@@ -222,7 +222,7 @@ int main(int argc, char *argv[]) {
// 3 bytes: 'MS2'
// 1 byte: version
// -- data blocks
- // 4 bytes: header 'IMG1' and 'IMG2' for newspaper images (for file 1 and file 2 respectively),
+ // 4 bytes: header 'IMG1' cyphered text image
// 'TEXT' for strings
// 4 bytes: language code ('en\0', 'de\0'- see common/language.cpp)
// 4 bytes: block size n (uint32)
@@ -240,7 +240,7 @@ int main(int argc, char *argv[]) {
// Other languages
const char **l = &lang[0];
while(*l) {
- // writeImage(outputFile, "img1", *l);
+ writeImage(outputFile, "img1", *l);
// writeImage(outputFile, "img2", *l);
writeStrings(outputFile, *l);
++l;
diff --git a/devtools/create_supernova2/img1-en-original.jpg b/devtools/create_supernova2/img1-en-original.jpg
new file mode 100644
index 0000000000..6eb4fa73c7
--- /dev/null
+++ b/devtools/create_supernova2/img1-en-original.jpg
Binary files differ
diff --git a/devtools/create_supernova2/img1-en.pbm b/devtools/create_supernova2/img1-en.pbm
new file mode 100644
index 0000000000..bc09a53ed7
--- /dev/null
+++ b/devtools/create_supernova2/img1-en.pbm
Binary files differ
diff --git a/devtools/create_supernova2/img1-en.xcf b/devtools/create_supernova2/img1-en.xcf
new file mode 100644
index 0000000000..e621ada3e2
--- /dev/null
+++ b/devtools/create_supernova2/img1-en.xcf
Binary files differ