Instead of passing all the arguments for an overlay to display::add_overlay, just take an rvalue-reference to an existing overlay object.
The overlay ctor was adjusted. It no longer takes a halo::handle argument, and the display class sets that manually.
This additionally:
* Makes all copyright notices identical aside from the starting year for Wesnoth-specific source files. Files not included: mariadbpp, lua, spirit po, xbrz, and bcrypt (crypt_blowfish).
* Removes all attribution from the files, since the vast majority of them are outdated or seemingly just outright incorrect. For example, I would guess that Dave is no longer the sole author of the majority of Wesnoth's current code.
Turns out I mistook @celticminstrel's opinion that we should use include guards over pragma (737916e).
Since all major compilers support `#pragma once`, there's no reason not to use it.
For future mergability reasons, this excludes src/spirit_po and src/xBRZ. It also excludes src/boost-patched.
name= has no effect but can be used to delete the item. I also changed
[item] to automatically create an id (in case no id was given) and
return that (only usable if called from lua).
I used the id= field from overlay class for this, it was previously only
used by the editor. Not sure if it is a good idea to reuse the id field.
And related commits.
This reverts commit 545253ec2b117b413e7ef40e06e65d358ce20f77.
This reverts commit 1215f65eb875cc3070e8d087ce699c0a2ff8d8b0.
This reverts commit 11664f4024cb760de7db5fec54661cd14fc05ac8.
This reverts commit e948df3424657c5843b1fb65a1319449bb6311bc.
This reverts commit 3781e7839f29915292a2452c37b08a1e1fce9841.
This commits were reverted to exclude them from wesnoth 1.13.2 release because:
1) We are still unsure about the best name oftthese attributes
2) This breaks multiple campaigns, including LoW and the tutorial.
Feel free to revert this revert after 1.13.2 when thse issues can be solved..
fixes up commit 82c6b98907d9709aef0d23a3846c1e75ac48e1d5
Use smart "handles" for halos which have been added to a halo
manager. The handles remember what manager they came from, and
delete themselves automatically on destruction.
This wasn't an issue when haloes were basically managed by a
C library, but if we want to get rid of the static singleton
system, the handles need to be smarter than just int's.
we now enable warning 4800. I ran though the msvc compile with this
warning and i found some (in overlay.hpp, unit.cpp, whiteboard/move.cpp)
unintended implicit bool b = cfg["attributename"] casts that use
the implicit attribute_value to int cast and then a int to bool cast.
So for attributename=true b would be false. So i believe this
is a useful warning.
There are also a lot of implicit int to bool cast from the SDL and LUA
C-libraries which use int instead of bool because C doesn't have bool.
In this case this warning is less useful, but i still think it's worth
it since a "!= 0" or "== 1" isn't cost.
Plus if someone really wants to disable this warning he can still
disable it in the msvc project settings, while before is was not
possible for someone to enable this warning the the settings.