kirjavascript/Flex2

Add support for sprite linking and detecting duplicates.

Opened this issue · 4 comments

Please, add option for linking sprites.

My mapping uses links to one sprite Map_GiantBall_2C:

Map_GiantBall_0:   dc.w Map_GiantBall_12-Map_GiantBall
Map_GiantBall_2:   dc.w Map_GiantBall_2C-Map_GiantBall
Map_GiantBall_4:   dc.w Map_GiantBall_2C-Map_GiantBall
Map_GiantBall_6:   dc.w Map_GiantBall_2C-Map_GiantBall
Map_GiantBall_8:   dc.w Map_GiantBall_2C-Map_GiantBall
Map_GiantBall_A:   dc.w Map_GiantBall_2C-Map_GiantBall
Map_GiantBall_C:   dc.w Map_GiantBall_2C-Map_GiantBall
Map_GiantBall_E:   dc.w Map_GiantBall_12-Map_GiantBall
Map_GiantBall_10:   dc.w Map_GiantBall_E2-Map_GiantBall

After saving in Flex2 links have been replaced with duplicates:

Map_GiantBall_2:   dc.w Map_GiantBall_2C-Map_GiantBall
Map_GiantBall_4:   dc.w Map_GiantBall_46-Map_GiantBall
Map_GiantBall_6:   dc.w Map_GiantBall_60-Map_GiantBall
Map_GiantBall_8:   dc.w Map_GiantBall_7A-Map_GiantBall
Map_GiantBall_A:   dc.w Map_GiantBall_94-Map_GiantBall
Map_GiantBall_C:   dc.w Map_GiantBall_AE-Map_GiantBall
Map_GiantBall_E:   dc.w Map_GiantBall_C8-Map_GiantBall
Map_GiantBall_10:   dc.w Map_GiantBall_E2-Map_GiantBall

The same thing happens to DPLC too

It will be great if you add option for autolinking optimisation to

Good idea! I'll try and do this

It would be great if the Flex2 tried to optimize mappings. Duplicates take up space in the ROM. And that's troubling.

There are optimizations that take place, just not deduping (yet)

Traditionally, you would do this by hand - but it should be automatable

I understand that...

I had to fix the mapping links for Sonic + Super Sonic by hand since Flex2 can't do it

And the problem is that if I reuse Flex2, my work is just erased. And there are other big objects here

If I fix the links for mappings, Flex2 keeps duplicates again. And I'll feel like I've wasted my time...