ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.74k stars 377 forks source link

Reduce code duplication in ICN decode and a little speed-up for transform decode #9230

Closed Districh-ru closed 1 month ago

Districh-ru commented 1 month ago

This PR combines duplicated code for the same color pixels consequence, does Transform type value calculation only if transformValue & 0x40 is true and adds a TODO to decode (by checking one bit: transformValue & 0x80) and store the shining contour data which is used in some images, in example:

img img img

Using this contour data should help us close #3319

ihhub commented 1 month ago

@Districh-ru , thank you very much for these improvements!