hampusborgos / rme

Remere's Map Editor
Other
294 stars 223 forks source link

invisible tiles colors hardcoded #225

Open peonso opened 6 years ago

peonso commented 6 years ago

https://github.com/hjnilsson/rme/blob/64ef3b5e2ac25a6e1d1d3ab7db957e2c52bde5f2/source/map_drawer.cpp#L1132-L1141

Any chance to have ids and respective colors where this should apply loaded from a config file?

Related https://github.com/peonso/opentibia_sprite_pack/issues/7

In an alternate pack of sprites this overrule the real sprites making random sprites being full colored tiles and making me unable to see actual invisible tiles from this sprites at map editor.

peonso commented 6 years ago

Also those

https://github.com/hjnilsson/rme/blob/23a8fb15a1a90cf369261559536259400ff458ef/source/sprites.h#L24-L27

https://github.com/hjnilsson/rme/blob/cfe36ce5b3e24406d0b0f09e3fa0a6aeb372f76d/source/definitions.h#L54

https://github.com/hjnilsson/rme/blob/64ef3b5e2ac25a6e1d1d3ab7db957e2c52bde5f2/source/map_drawer.cpp#L1023-L1038

Elime1 commented 6 years ago

Why can you not add special sprites with these ids to your sprite pack?

peonso commented 5 years ago

@Elime1

Why can you not add special sprites with these ids to your sprite pack?

I could, but would mess with sprite order. The point is that it should/could be configurable by an xml file. Maybe at clients.xml, i.e. I can add default ids and specific ones for a single client.

Something alone this lines:

<specialsprites>
    <default>
        <stairs id="459" color="red, green, 0, alpha/3*2"/>
        <invisible id="460" color="red, 0, 0, alpha/3*2"/>
        <spawn id="1507"/>
        <housedoor id="2019"/>
    </default>
    <client name="10.41">
        <stairs id="2249" color="red, green, 0, alpha/3*2"/>
        <invisible id="2250" color="red, 0, 0, alpha/3*2"/>
        <spawn id="2161"/>
        <housedoor id="2161"/>
        <assets name="NotTibia"/>
    </client>
</specialsprites>
peonso commented 5 years ago

Even code commit calls this an "ugly hack", please reopen the issue, maybe someone would tackle it in the future.