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.58k stars 359 forks source link

Put the Graveyard object to the correct category, "hide" the ugly versions of Graveyard sprites #8788

Closed oleg-derevenetz closed 1 month ago

oleg-derevenetz commented 1 month ago

fix #8784

Also related to #8785.

However, I am not sure about the logic of ordering in the objects list (did I put the Graveyard on the list to the correct place?).

ihhub commented 1 month ago

Hi @oleg-derevenetz , according to https://github.com/ihhub/fheroes2/blob/829cb34ef4cea3f7f7ec5ea0920f47a07beb798f/src/fheroes2/maps/map_object_info.h#L120

we simply cannot move objects from one place to another because it breaks map format.

What we need to do is:

https://github.com/ihhub/fheroes2/blob/829cb34ef4cea3f7f7ec5ea0920f47a07beb798f/src/fheroes2/maps/map_format_info.cpp#L40

we can call a function simply migrateV2toV3() or something like this, and there we need to change objects for each tile and more specifically their group and their index.

Please let me know if you have any questions about this.

oleg-derevenetz commented 1 month ago

I suggest to put the objects at the end of the list.

I would not like to put Graveyards after Barriers and Traveller's Tents, so I left them at the beginning. However, as for "ugly" versions of Graveyards, I put them at the end to hide them in a way.

oleg-derevenetz commented 1 month ago

The map maker may select any Graveyard that better fits his map. :)

I have a suspicion that these crude Graveyards are just mock-ups accidentally left from some alpha versions of the game. They are frankly poorly drawn (totally not in the style of the game as a whole), not used in the original editors and do not appear in any known map. I don't really think there's a need to encourage map makers to use them. Unfortunately, they are apparently no longer so easy to remove by converting them into "proper" Graveyards, because "proper" Graveyards are larger objects than those mock-ups.

ihhub commented 1 month ago

@oleg-derevenetz , thank you so much for this change!