Changeset 159 for trunk


Ignore:
Timestamp:
07/09/13 00:13:12 (12 years ago)
Author:
epyon
Message:
  • keyframed_mesh - animation start takes count of frames not stop
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/gfx/keyframed_mesh.hh

    r158 r159  
    2121                uint32 get_max_frames() const;
    2222                void set_frame( uint32 frame );
    23                 void setup_animation( uint32 start, uint32 stop, uint32 fps, bool loop );
     23                void setup_animation( uint32 start, uint32 count, uint32 fps, bool loop );
    2424                void update( uint32 ms );
    2525                void draw( render_state& rstate );
  • trunk/src/gfx/keyframed_mesh.cc

    r158 r159  
    7575}
    7676
    77 void keyframed_mesh::setup_animation( uint32 start, uint32 stop, uint32 fps, bool loop )
     77void keyframed_mesh::setup_animation( uint32 start, uint32 count, uint32 fps, bool loop )
    7878{
    7979        m_start_frame   = start;
    80         m_stop_frame    = stop;
     80        m_stop_frame    = start+count-1;
    8181        m_looping       = loop;
    8282        m_fps           = fps;
    83         m_active        = ( stop > start );
     83        m_active        = count > 1;
    8484        m_last_frame    = start;
    85         m_next_frame    = (stop > start ? start + 1 : start );
     85        m_next_frame    = (count > 1 ? start + 1 : start );
    8686        m_interpolation = 0.0f;
    8787        m_time          = 0;
Note: See TracChangeset for help on using the changeset viewer.