Turn off animations
Moderator: Forum Moderators
Turn off animations
I would really like to do that. But I know some people like it, so perhaps there should be a switch for this? Or perhaps even better, to disable it at compile time?
If this will not be done, I'd be happy to try to do this my self if someone could help me explain what to look for in the code.
The reason for this: Everything should be as fast as possible.
Irrevenant: Subject edited: of->off
If this will not be done, I'd be happy to try to do this my self if someone could help me explain what to look for in the code.
The reason for this: Everything should be as fast as possible.
Irrevenant: Subject edited: of->off
Angband, the ultimate FPS game!
isn't the turbo enough for you ?????
since you say you are ready to code it, here is a little assignment for you
you should take the display class (in display.hpp and .cpp)
add a member function get_acceleration()
this function should be {return turbo?5:1;}
then look at all calls to "start_animation" and "restart_animation" and edit them to use that new function to have them your new function
submit the patch the usual way (patches.wesnoth.org)
I don't guarentee it will be in 1.2 but I will include it later
since you say you are ready to code it, here is a little assignment for you
you should take the display class (in display.hpp and .cpp)
add a member function get_acceleration()
this function should be {return turbo?5:1;}
then look at all calls to "start_animation" and "restart_animation" and edit them to use that new function to have them your new function
submit the patch the usual way (patches.wesnoth.org)
I don't guarentee it will be in 1.2 but I will include it later
Fight key loggers: write some perl using vim
I too would like to have the option to switch it off.
At least I strongly believe that the animation is in part responsible for a
slight speed delay, and I rather want to focus on the strategical
aspect of the game than on the eye candy.
In the source of display.cpp I only found one line referring to
start_animation:
There was another line which referred to invalidate_animations();
Then some more lines such as
and
Hmm and about two more lines
At least I strongly believe that the animation is in part responsible for a
slight speed delay, and I rather want to focus on the strategical
aspect of the game than on the eye candy.
In the source of display.cpp I only found one line referring to
start_animation:
Code: Select all
147 flags_.back().start_animation(rand()%flags_.back().get_frames_count(), animated<image::locator>::INFINITE_CYCLES);
Code: Select all
817 invalidate_animations();
Code: Select all
2046 void display::invalidate_animations()
Code: Select all
2063 if(builder_.update_animation(loc) || (map_.is_village(loc) && animate_flags)) {
no, I wasn't very clear, I guess
display is a class, which contains a member
bool display::turbo()
I want you to add a int display::acceleration() const member which would return the acceleration to use (currently 5 if turbo and 1 if not)
then, as a second step I want you to check every call to turbo() and look at all the turbo()?5:1 that are spread in the code and replace them by your brand new function
(I guess most of them will be in unit.cpp but probably not all)
and that's it
after that you can play with the actual turbo value (with a value of 10 animations will probably be entirely skipped)
hope this help
moving to coder's corner, BTW it's als public and fits better there
display is a class, which contains a member
bool display::turbo()
I want you to add a int display::acceleration() const member which would return the acceleration to use (currently 5 if turbo and 1 if not)
then, as a second step I want you to check every call to turbo() and look at all the turbo()?5:1 that are spread in the code and replace them by your brand new function
(I guess most of them will be in unit.cpp but probably not all)
and that's it
after that you can play with the actual turbo value (with a value of 10 animations will probably be entirely skipped)
hope this help
moving to coder's corner, BTW it's als public and fits better there
Fight key loggers: write some perl using vim