Eternal-Lands
Eternal-Lands copied to clipboard
Rationalise #defs for map editor
There's a confusing amount of #defs related to building the map editor, including some relating to the long abandoned map editor 2. We should clean this up.
As far as I can see, nothing ever sets MAP_EDITOR2, so I guess anything #ifdef MAP_EDITOR2
can be removed. Furthermore, I'd like to remove either ELC or MAP_EDITOR. The question is what would make more sense? Personally, since the main project is the game client and the map editor is the exception, I'd vote for removing ELC and changing all #ifdef ELC
to #ifndef MAP_EDITOR
.
I'm willing to do the work if you want me to, but I'll hold off until I get the OK to avoid duplicating work.
I agree that MAP_EDITOR2 is defunct, a shame but its not been touched for many years.
I have used ELC (or the absence) to conditionally compile test code - unit test code in xor_cipher.cpp for example. Perhaps an abuse of the #def but it breaks with the second change you suggested. I would also need to check how OTHERLIFE and ANDROID expect ELC to be defined.
Perhaps cleaning up map editor code to only use MAP_EDITOR is OK so long as you leave other use of ELC in place.
I created the issue to remind us about the proposed change. I would have assigned myself to the issue if I was going to start working on it.