Author: crab
Date: Fri May 15 01:11:34 2009
New Revision: 35630

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35630&view=rev
Log:
Added a content-addressable-table of unit states which are boolean and are used 
by the game. This allows O(1) lookup of these unit states, and give ~ +10% to 
AI speed (more with --nogui), due to get_state("slowed") replaced with 
get_state(STATE_SLOWED) in unit::movement_cost calculation which is heavily 
used by the pathfinding. This does the improvement described in Bug #13520

Modified:
    trunk/src/actions.cpp
    trunk/src/ai/ai.cpp
    trunk/src/ai/ai_attack.cpp
    trunk/src/ai/contexts.cpp
    trunk/src/game_events.cpp
    trunk/src/generate_report.cpp
    trunk/src/menu_events.cpp
    trunk/src/unit.cpp
    trunk/src/unit.hpp

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: trunk/src/actions.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/actions.cpp?rev=35630&r1=35629&r2=35630&view=diff

Modified: trunk/src/ai/ai.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/ai.cpp?rev=35630&r1=35629&r2=35630&view=diff

Modified: trunk/src/ai/ai_attack.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/ai_attack.cpp?rev=35630&r1=35629&r2=35630&view=diff

Modified: trunk/src/ai/contexts.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/contexts.cpp?rev=35630&r1=35629&r2=35630&view=diff

Modified: trunk/src/game_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=35630&r1=35629&r2=35630&view=diff

Modified: trunk/src/generate_report.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/generate_report.cpp?rev=35630&r1=35629&r2=35630&view=diff

Modified: trunk/src/menu_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/menu_events.cpp?rev=35630&r1=35629&r2=35630&view=diff

Modified: trunk/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=35630&r1=35629&r2=35630&view=diff

Modified: trunk/src/unit.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.hpp?rev=35630&r1=35629&r2=35630&view=diff


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to