mirror of
https://github.com/wesnoth/wesnoth
synced 2024-09-22 06:15:32 +00:00
韦诺之战
1cecf57cc7
(IRC users: please read the entire commit message instead of relyingon CIA.) 2011-02-07T21:43:12Z!b.waresiak@gmail.com introduced some code, purportedly intended to fix bug #16237, which relied on game_display/display never destroying buttons returned by the find_button() method. Unfortunately, many code paths calling game_display/display::draw() cause them to be destroyed and recreated, resulting in UB from code that still keeps the old pointers around and doesn't refresh them before use. This commit removes the replay_controller::replay_buttons_wrapper class and reintegrates its code into the replay_controller class to remove one unrequired abstraction layer, without entirely reverting 2011-02-07T21:43:12Z!b.waresiak@gmail.com. It also makes sure pointers aren't kept for longer than necessary, disposing of them after use and calling game_display/display::find_button() every single time a button has to be accessed. This shouldn't result in noticeable runtime overhead increase as the buttons are stored in a vector which is rarely very large (I have yet to see a Wesnoth GUI theme that has more than ten buttons). As a side-effect of my changes, however, a glitch on the Skip Animations checkbox background has appeared. Considering I don't touch that button at all, it's possible there's a different cause for it that was concealed by the replay buttons' triggered UB. I don't think this side-effect is more important at this point than the original bug, and I or someone else can investigate it later. NOTE: If someone has a reasonable argument for this commit being reverted before 1.9.10, feel free to discuss that with me. |
||
---|---|---|
attic | ||
cmake | ||
data | ||
doc | ||
fonts | ||
graphincludes/project | ||
icons | ||
images | ||
misc/fortunes | ||
packaging | ||
po | ||
projectfiles | ||
resources | ||
scons | ||
sounds | ||
src | ||
utils | ||
website | ||
.gitignore | ||
changelog | ||
CMakeLists.txt | ||
config.h.cmake | ||
COPYING | ||
copyright | ||
Doxyfile | ||
INSTALL | ||
l10n-spec | ||
l10n-track | ||
players_changelog | ||
py-compile | ||
README | ||
RELEASE_NOTES | ||
SConstruct | ||
wesnoth.kdevelop |
The game's license is described in COPYING. Note that for artwork and music, we interpret "preferred form of the work for making modifications" as the modifiable form that the author chooses to ship us for the source tree. See INSTALL for instructions on how to build the game from source code. A (translated) description of how to play the game can be found in doc/manual/manual.*.html . To be notified of new releases, subscribe to this rss feed: http://feed43.com/wesnoth.xml It does list all news from the Wesnoth frontpage, so you will also have some additional notifications, but at least you should be aware of all releases. Wesnoth User and Developer Forums (with over 390,000 posts from more than 16,000 registered members) can be found at http://forums.wesnoth.org/ For extensive documentation about all aspects of the game, see the official Battle for Wesnoth web site: http://www.wesnoth.org/ David White <davidnwhite@verizon.net>