devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

Simplify foliage rendering

Open glebm opened this issue 1 year ago • 2 comments

During ReencodeDungeonCels, extracts floor tile foliage into a triangle with the floor frame and a separate 16-px tall TransparentSquare.

This means that the floor frames are now always triangles and the foliage can be rendered directly without masking.

Dungeon graphics sizes:

Map Frames Foliage frames Byte size Before PR After PR
Town 3,803 41 2,317,832 2,242,056 2,242,190
L1 1,119 11 738,836 721,604 721,110
L4 1,091 6 603,140 584,500 584,242

RG99 binary size reduced by ~4 KiB: 2,426,380 bytes -> 2,421,388 bytes

glebm avatar Aug 24 '24 12:08 glebm

uh, this has a conflict now :o

AJenbo avatar Aug 26 '24 19:08 AJenbo

Rebased

glebm avatar Aug 27 '24 06:08 glebm

Nice to have it split the data like this, also good to have the comments to explain what it's doing.

AJenbo avatar Aug 28 '24 22:08 AJenbo