Opened 19 years ago

Closed 19 years ago

Last modified 6 years ago

#8437 closed patch

SCUMM: NUT fonts codec 44

Reported by: cyxx Owned by: cyxx
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game:

Description

The TODO file was mentionning this so I had a look (apparently the implementation in scummvm wasn't done from RE'ing, so there are some differences). The attached patch should implement the decoding of the smush codec 44 as the original interpreters did. Just for the reference, I don't know if it was already known but codec 44 is just codec 21 with a slight difference in the bytes copying (see the patch).

The patch also tries cleanup a bit the NutRenderer class : - by re-using the original smush_decode_codec1 function (is there a need to duplicate it ?) - removing the getCharOffsX and getCharOffsY methods (they were unused...)

I haven't committed this as-is, because : - I haven't tested it that much - This could lead to regressions - I am not a 'SMUSH' expert, so it would be nice if aquadran you could have a look at it, for objections or anything else... - I also got rid of the 'russian' FT version hack, because I'd like to find a proper way of fixing this ; _sev, can you test this patch with your russian version and report if the problem still there ?

Ticket imported from: #1221592. Ticket imported from: patches/542.

Attachments (1)

nut_codec44.diff (10.5 KB ) - added by cyxx 19 years ago.
Patch against a June 16 CVS snapshot

Download all attachments as: .zip

Change History (11)

comment:1 by cyxx, 19 years ago

Owner: set to aquadran

comment:2 by sev-, 19 years ago

Just tested. No problems with Russian fonts.

comment:3 by aquadran, 19 years ago

Owner: changed from aquadran to cyxx

comment:4 by aquadran, 19 years ago

i don't see any changes to smush, why i are ask me. But i can comment one thing in nut renderer which was related to me. you don't noticed one thing: "const int srcSize = (_chars[l].width + 2) * _chars[l].height + 1000;" here it's buffer hack "+1000" and you dont'removed it. it's for previous codec bug which write too much sometimes. please check first with proper buffer all fonts if there is no buffer override. I assume you tested codec1 with playing FT intro ?

by cyxx, 19 years ago

Attachment: nut_codec44.diff added

Patch against a June 16 CVS snapshot

comment:5 by cyxx, 19 years ago

Ok, thanks _sev and aquadran.

I watched the whole FT intro and didn't noticed any glitches.

Concerning the buffer size hack, I got rid of the +1000 and added some assert() calls. Playing a bit with COMI and FT didn't triggered them.

_sev, in the patch #823031, I saw you also added the +2 to the buffer size, I also got rid of it. Can you try the latest patch with your russian FT version and report here if some assert() calls trigger ?

comment:6 by cyxx, 19 years ago

I decoded all the .nut files from my comi/dig/ft versions (english and/or french), and didn't noticed any problems. Well, except BENBIKE.NUT which was complaining about a missing FRME chunk and BRUSH.NUT which used codec 3, but these are unused.

So, if there's no problem with your Russian FT version, _sev, I plan to commit this.

comment:7 by sev-, 19 years ago

Works perfectly here with updated patch. So FT Russian-wise it is ok to commit :)

comment:8 by cyxx, 19 years ago

Status: newclosed

comment:9 by cyxx, 19 years ago

Committed. Thanks for testing again, _sev.

comment:10 by digitall, 6 years ago

Component: Engine: SCUMM
Note: See TracTickets for help on using tickets.