URL:
<http://gna.org/patch/?1101>
Summary: Fogged labels and overlays
Project: Battle for Wesnoth
Submitted by: broodkiller
Submitted on: Wednesday 09/03/2008 at 12:15
Priority: 3 - Low
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
This patch tries to address zookeeper's request from here:
https://gna.org/bugs/?10143
I tested it and it seems to be working fine, also on saveloading. I am aware
though that it is not the most elegant way of doing it, also at the level of
efficiency.
For the labels the patch recalculates all of them (the fog-dependency check
is included in the draw() routine) on shroud changes, regardless of a
particular team or exact location. On one hand, it's a good thing, because it
doesn't need to re-parse the same containers every time, which may be a factor
if there are many labels on a map, but it's obviously a suboptimal soluton if
there are just a few of them (although only relatively, since parsing <10
labels is done in a flash anyways).
For the overlays there is a custom game_display routine that checks for a
fogged overlays (I kept it all within the class instead of returning an
overlay object or whatever).
The default behaviour is that all labels and overlays ARE hidden by fog.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wednesday 09/03/2008 at 12:15 Name: fogged items+overlays.patch Size:
9kB By: broodkiller
<http://gna.org/patch/download.php?file_id=4770>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?1101>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs