SUPERNOVA: Add ciphered text image translation.

This commit is contained in:
Jaromir Wysoglad 2019-06-29 00:08:55 +02:00 committed by Thierry Crozat
parent 3a08ad99d9
commit 061d14e799
9 changed files with 203 additions and 8 deletions

View file

@ -0,0 +1,7 @@
1
0
319
0
199
0

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View file

@ -0,0 +1,179 @@
177
0 0 0
10 10 10
10 10 10
11 11 11
11 11 11
12 12 12
13 13 13
13 13 13
13 13 13
13 13 13
14 14 14
14 14 14
14 14 14
15 15 15
15 15 15
15 15 15
15 15 15
16 16 16
16 16 16
16 16 16
16 16 16
17 17 17
17 17 17
17 17 17
17 17 17
18 18 18
18 18 18
18 18 18
18 18 18
19 19 19
19 19 19
19 19 19
19 19 19
20 20 20
20 20 20
20 20 20
20 20 20
21 21 21
21 21 21
21 21 21
21 21 21
22 22 22
22 22 22
22 22 22
22 22 22
23 23 23
23 23 23
23 23 23
23 23 23
24 24 24
24 24 24
24 24 24
24 24 24
25 25 25
25 25 25
25 25 25
25 25 25
26 26 26
26 26 26
26 26 26
26 26 26
27 27 27
27 27 27
27 27 27
27 27 27
28 28 28
28 28 28
28 28 28
28 28 28
29 29 29
29 29 29
29 29 29
29 29 29
30 30 30
30 30 30
30 30 30
30 30 30
31 31 31
31 31 31
31 31 31
31 31 31
32 32 32
32 32 32
32 32 32
32 32 32
33 33 33
33 33 33
33 33 33
33 33 33
34 34 34
34 34 34
34 34 34
34 34 34
35 35 35
35 35 35
35 35 35
35 35 35
36 36 36
36 36 36
36 36 36
36 36 36
37 37 37
37 37 37
37 37 37
37 37 37
38 38 38
38 38 38
38 38 38
38 38 38
39 39 39
39 39 39
39 39 39
39 39 39
40 40 40
40 40 40
40 40 40
40 40 40
41 41 41
41 41 41
41 41 41
41 41 41
42 42 42
42 42 42
42 42 42
42 42 42
43 43 43
43 43 43
43 43 43
43 43 43
44 44 44
44 44 44
44 44 44
44 44 44
45 45 45
45 45 45
45 45 45
45 45 45
46 46 46
46 46 46
46 46 46
46 46 46
47 47 47
47 47 47
47 47 47
47 47 47
48 48 48
48 48 48
48 48 48
48 48 48
49 49 49
49 49 49
49 49 49
49 49 49
50 50 50
50 50 50
50 50 50
50 50 50
51 51 51
51 51 51
51 51 51
51 51 51
52 52 52
52 52 52
52 52 52
52 52 52
53 53 53
53 53 53
53 53 53
53 53 53
54 54 54
54 54 54
54 54 54
54 54 54
55 55 55
55 55 55
55 55 55
55 55 55

View file

@ -0,0 +1,9 @@
1
0
319
0
199
0
0
0

View file

@ -0,0 +1 @@
./create_image ms2_data 28 829

View file

@ -284,8 +284,7 @@ int main(int argc, char *argv[]) {
const char **l = &lang[0];
while(*l) {
writeDatafile(outputFile, 15, *l);
writeImage(outputFile, "img1", *l);
// writeImage(outputFile, "img2", *l);
writeDatafile(outputFile, 28, *l);
writeStrings(outputFile, *l);
++l;
}

Binary file not shown.

View file

@ -161,6 +161,8 @@ bool MSNImage::loadFromEngineDataFile() {
} else if (_MSPart == 2) {
if (_filenumber == 15)
name = "M015";
else if (_filenumber == 28)
name = "M028";
else
return false;
@ -292,16 +294,15 @@ bool MSNImage::loadStream(Common::SeekableReadStream &stream) {
bool MSNImage::loadSections() {
bool isNewspaper = (_MSPart == 1 && (_filenumber == 1 || _filenumber == 2)) ||
(_MSPart == 2 && _filenumber == 38);
bool isCypheredText = _MSPart == 2 && _filenumber == 28 && ConfMan.get("language") == "en";
int imageWidth = isNewspaper || isCypheredText ? 640 : 320;
int imageHeight = isNewspaper || isCypheredText ? 480 : 200;
int imageWidth = isNewspaper ? 640 : 320;
int imageHeight = isNewspaper ? 480 : 200;
_pitch = imageWidth;
for (int section = 0; section < _numSections; ++section) {
Graphics::Surface *surface = new Graphics::Surface;
_sectionSurfaces.push_back(surface);
if (isNewspaper || isCypheredText) {
if (isNewspaper) {
Color color1 = isNewspaper ? kColorWhite63 : kColorWhite44;
surface->create(imageWidth, imageHeight, g_system->getScreenFormat());
byte *surfacePixels = static_cast<byte *>(surface->getPixels());

View file

@ -375,8 +375,7 @@ void Screen::renderImageSection(const MSNImage *image, int section, bool invert)
if (_vm->_MSPart == 1)
bigImage = image->_filenumber == 1 || image->_filenumber == 2;
else if (_vm->_MSPart == 2)
bigImage = image->_filenumber == 38 ||
(image->_filenumber == 28 && ConfMan.get("language") == "en");
bigImage = image->_filenumber == 38;
if (bigImage) {
sectionRect.setWidth(640);
sectionRect.setHeight(480);