diasurgical / devilutionX

Diablo build for modern operating systems
Other
8.01k stars 786 forks source link

Simplify foliage rendering #7366

Closed glebm closed 1 month ago

glebm commented 1 month ago

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

AJenbo commented 1 month ago

uh, this has a conflict now :o

glebm commented 1 month ago

Rebased

AJenbo commented 1 month ago

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