Feature Request #2370

review real sprite compression type

Added by yexo over 9 years ago. Updated almost 9 years ago.

Status:ClosedStart date:2011-02-27
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:-
Target version:0.2.0

Description

See http://www.tt-forums.net/viewtopic.php?p=666637#p666637 for a good description by frosch

Probably best course of action: only keep ALLOW_CROP. Try both TILE and COMPRESSION and see which one results in the smallest filesize. For OpenTTD it doesn't matter at all, for TTDPatch it might have some speed implications. Personally I don't care about the possible small performance penalty in TTDPatch for this case.

IRC log:

  • frosch123 is surprised nml exposes the real sprite compression type
    <Yexo> frosch123: it's needed to set "no-crop" for some sprites
    <frosch123> btw. TILE | COMPRESSED is no valid combination, but ottd ignores COMPRESSED anyway
    <Yexo> or you wouldn't be able to crop sprites at all
    <frosch123> yes, CROP is important :)
    <Yexo> openttd tries to load all sprites as if they are compressed?
    <frosch123> ottd loads all sprites on first use, and stores them uncompressed in the spritecache
    <frosch123> TILE and NORMAL are ignored as well (except for actually reading)
    <frosch123> the simple blitters more or less user NORMAL for all sprites, while the optimised blitters use something like TILE for all
    <frosch123> http://www.tt-forums.net/viewtopic.php?p=666637#p666637 <- i summarised the compression thingie some time ago
    <Webster> Title: Transport Tycoon Forums View topic - [8bpp] Graphics Replacement Project - OpenGFX (at www.tt-forums.net)
    <Yexo> if nml became real smart it could try both TILE and COMPRESSED and see which one results in a smaller output
    <frosch123> file size is the only thing you can archieve with ottd there :)
    <Yexo> I'm not interested at all in drawing speed for ttdpatch
    <Hirundo> So I guess, we should remove all of those except the cropping
    <frosch123> if you can detect which sprites are used as parent sprites in spritelayouts, then you can also automatically set the crop bit
    <frosch123> though it is needed for base graphics and action 5/a stuff of course
    <frosch123> hmm? do you refer to the CROP bit?
    <Yexo> no, the other bits
    <Yexo> <frosch123> though it is needed for base graphics and action 5/a stuff of course <- what exactly is needed?
    <frosch123> only the CROP :)

Associated revisions

Revision 1654:5e8f5aba53d3
Added by yexo almost 9 years ago

Change #2370: only the NOCROP bit is still valid in the 'compression type' real sprite flag. The best compression type is now automatically detected

Revision 1654:5e8f5aba53d3
Added by yexo almost 9 years ago

Change #2370: only the NOCROP bit is still valid in the 'compression type' real sprite flag. The best compression type is now automatically detected

History

#1 Updated by Hirundo almost 9 years ago

  • Target version set to 0.2.0

It's a compatibility-breaking change, do it asap

#2 Updated by yexo almost 9 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF