Opened 12 years ago

Closed 11 years ago

#3327 closed defect

WINCE: THE DIG: Text Problem

Reported by: SF/dharis Owned by: SF/knakos
Priority: low Component: Engine: SCUMM
Keywords: Cc:
Game: The Dig

Description

ScummVM Version: Pocket ScummVM 0.10.0
Game: The Dig (german)
Platform: Windows Mobile 5

The text at the bottom of the screen where the names of objects are shown when you move the mouse over them is buggy. Instead there are just some strange symbols like %<-<-% and they are shown constantly and don't change when the mouse is moved.

Ticket imported from: #1758191. Ticket imported from: bugs/3327.

Attachments (1)

wince-missing.patch (1.2 KB) - added by fingolfin 11 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 12 years ago by SF/dharis

Summary: Text ProblemTHE DIG: Text Problem

comment:2 Changed 12 years ago by SF/knakos

Owner: set to SF/knakos
Summary: THE DIG: Text ProblemWINCE: THE DIG: Text Problem

comment:3 Changed 12 years ago by SF/knakos

Of course, the text is shown correctly (as tested by the user) in the win32 build of scummvm.

Running the english version in WinCE gives no problems.

Cryptic bugs ahead :-)

comment:4 Changed 12 years ago by fingolfin

The german version of "The Dig" works fine for me on Mac OS X, too.

Maybe your LANGUAGE.BND file is damaged? How big is is, what MD5 does it have?

comment:5 Changed 12 years ago by SF/szczecinski

Hello !
I have th same problem with a french version ! I work fine on Win32 platform !
The bug not exists in version 0.9.1

comment:6 Changed 12 years ago by fingolfin

This tracker item is pending response by the submitter; we
cannot continue processing it before that happens. As a
consequence, its status has been set to "Pending". It will
automatically revert to "Open" once a new comment is made to
this item. If no response is made within 14 days, it will
automatically be closed.

Thank you.

comment:7 Changed 12 years ago by fingolfin

Status: newpending

comment:8 Changed 12 years ago by SF/sf-robot

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

comment:9 Changed 12 years ago by SF/sf-robot

Status: pendingclosed

comment:10 Changed 11 years ago by SF/froilson

Hello !
I have the same problem with a spanish version ! It works fine in Win32
platform !
I don't try in version 0.9.1.

What do you need to make a correction of this issue?

Thanks.

comment:11 Changed 11 years ago by Kirben

Status: closednew

comment:12 Changed 11 years ago by SF/knakos

All the wince bugs will be looked into before next release. When I have something new on this you'll find out here. Obviously something goes wrong with non-english language stuff.

comment:13 Changed 11 years ago by fingolfin

And it works correctly on the desktop. Odd.

The code relevant for loading the translated text is in engines/scumm/string.cpp, lines 1258ff.
There, we simply read the whole LANGUAGE.BND into memory in one go; then format this data in-place, creating an index which allows quick access to the data. Pretty straight forward code. The only "unusual" thing about it is that we use strpbrk, which is not used much elsewhere (only by the SMUSH subtitle code, and by some Kyra code).

I see you provide a custom strpbrk implementation in missing.cpp -- maybe that is buggy?

And I also see that you provide a *bad* bsearch implementation, which performs a linear search and hence will be veeery slow. Two things to look at, I guess.

The actual translation during runtime is performed by ScummEngine_v7::translateText, in the same file.

Could it be that

comment:14 Changed 11 years ago by fingolfin

Priority: normalhigh

Changed 11 years ago by fingolfin

Attachment: wince-missing.patch added

comment:15 Changed 11 years ago by fingolfin

OK, I see no obvious bug in your strpbrk, but it's *very* inefficient, so it should be replaced in any case. Attached a patch which provides better implementations of bsearch and strpbrk.
File Added: wince-missing.patch

comment:16 Changed 11 years ago by fingolfin

Hrm, one of the isspace implementations in missing.cpp is also wrong (the one around line 500). It only tests for a space but it should also test for \t, \n, \v, \f and \r. However, isspace is only used for COMI.

Is missing.cpp still used? If yes, this should be fixed. And missing.cpp should be cleaned up. It contains stuff we don't need at all, and seems to be in a rather random order. Some stuff is duplicated. Some is written in a rather inefficient style (anything which does a "for (i=0; i < strlen(s); ++i)" can't be good!).

comment:17 Changed 11 years ago by SF/knakos

OK, thanks for the code and suggestions Fingolfin. Will check it out.

comment:18 Changed 11 years ago by SF/knakos

I cannot confirm this bug with the german version of the dig, during the initial screens of the game (around and inside the asteroid). Even special characters are shown ok ("Schl'u'ssel", the arming key in the inventory). If anyone can provide a savegame and accurate instructions on where this happens I'll look into it. Is it right from the beginning? Lowering priority and setting to pending.

(missing.cpp comments still stand)

comment:19 Changed 11 years ago by SF/knakos

Priority: highlow
Status: newpending

comment:20 Changed 11 years ago by SF/sf-robot

Status: pendingclosed

comment:21 Changed 11 years ago by SF/sf-robot

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

Note: See TracTickets for help on using tickets.