Author: alink
Date: Sat Nov 3 17:56:27 2007
New Revision: 21466
URL: http://svn.gna.org/viewcvs/wesnoth?rev=21466&view=rev
Log:
Remove old unused code
Modified:
trunk/src/animated.hpp
trunk/src/animated.i
Modified: trunk/src/animated.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/animated.hpp?rev=21466&r1=21465&r2=21466&view=diff
==============================================================================
--- trunk/src/animated.hpp (original)
+++ trunk/src/animated.hpp Sat Nov 3 17:56:27 2007
@@ -68,8 +68,6 @@
const int get_animation_duration() const;
const T& get_current_frame() const;
- //! Get the next frame (or the current + shift frames)
- const T& get_next_frame(int shift = 1) const;
const int get_current_frame_begin_time() const;
const int get_current_frame_end_time() const;
const int get_current_frame_duration() const;
@@ -113,7 +111,6 @@
double acceleration_;
int last_update_tick_;
int current_frame_key_;
- int last_frame_key_;
};
Modified: trunk/src/animated.i
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/animated.i?rev=21466&r1=21465&r2=21466&view=diff
==============================================================================
--- trunk/src/animated.i (original)
+++ trunk/src/animated.i Sat Nov 3 17:56:27 2007
@@ -52,8 +52,7 @@
cycles_(false),
acceleration_(1),
last_update_tick_(0),
- current_frame_key_(0),
- last_frame_key_(-1)
+ current_frame_key_(0)
{
}
@@ -67,8 +66,7 @@
cycles_(false),
acceleration_(1),
last_update_tick_(0),
- current_frame_key_(0),
- last_frame_key_(-1)
+ current_frame_key_(0)
{
typename std::vector< std::pair<int,T> >::const_iterator itor =
cfg.begin();
@@ -105,9 +103,6 @@
if(acceleration_ <=0) acceleration_ = 1;
current_frame_key_= 0;
need_first_update_ = !frames_.empty();
- //update_last_draw_time();
- // need to force last frame key in the case of starting anim...
- last_frame_key_ = -1;
}
@@ -115,7 +110,6 @@
void animated<T,T_void_value>::update_last_draw_time()
{
last_update_tick_ = current_ticks;
- last_frame_key_ = current_frame_key_;
if (need_first_update_) {
need_first_update_ = false;
return;
@@ -136,7 +130,6 @@
while(get_animation_time() > get_end_time()){ // cut extra time
start_tick_ +=
static_cast<int>(get_end_time()/acceleration_);
current_frame_key_ = 0;
- last_frame_key_ = -1;
}
}
if(get_current_frame_end_time() < get_animation_time() && // catch up
@@ -222,21 +215,6 @@
}
template<typename T, typename T_void_value>
-const T& animated<T,T_void_value>::get_next_frame(int shift) const
-{
- if(frames_.empty() )
- return void_value_;
- int next_frame_key = current_frame_key_ + shift;;
- if (!cycles_) {
- if (next_frame_key < 0)
- return get_first_frame();
- else if (next_frame_key >= get_frames_count())
- return get_last_frame();
- }
- return frames_[next_frame_key % get_frames_count()].value_;
-}
-
-template<typename T, typename T_void_value>
const int animated<T,T_void_value>::get_current_frame_begin_time() const
{
if(frames_.empty() )
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits