Opened 17 years ago

Closed 17 years ago

#3327 closed defect

WINCE: THE DIG: Text Problem

Reported by: SF/dharis Owned by: SF/knakos
Priority: low Component: Engine: SCUMM
Version: 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 17 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 by SF/dharis, 17 years ago

Summary: Text ProblemTHE DIG: Text Problem

comment:2 by SF/knakos, 17 years ago

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

comment:3 by SF/knakos, 17 years ago

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 by fingolfin, 17 years ago

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 by SF/szczecinski, 17 years ago

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 by fingolfin, 17 years ago

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 by fingolfin, 17 years ago

Status: newpending

comment:8 by SF/sf-robot, 17 years ago

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 by SF/sf-robot, 17 years ago

Status: pendingclosed

comment:10 by SF/froilson, 17 years ago

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 by Kirben, 17 years ago

Status: closednew

comment:12 by SF/knakos, 17 years ago

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 by fingolfin, 17 years ago

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 by fingolfin, 17 years ago

Priority: normalhigh

by fingolfin, 17 years ago

Attachment: wince-missing.patch added

comment:15 by fingolfin, 17 years ago

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 by fingolfin, 17 years ago

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 by SF/knakos, 17 years ago

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

comment:18 by SF/knakos, 17 years ago

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 by SF/knakos, 17 years ago

Priority: highlow
Status: newpending

comment:20 by SF/sf-robot, 17 years ago

Status: pendingclosed

comment:21 by SF/sf-robot, 17 years ago

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.