boolean advance ( ) { if ( header . frameCount <= 0 ) { return false ; } if ( framePointer == getFrameCount ( ) - 1 ) { loopIndex ++ ; } if ( header . loopCount != LOOP_FOREVER && loopIndex > header . loopCount ) { return false ; } framePointer = ( framePointer + 1 ) % header . frameCount ; return true ; }
Move the animation frame counter forward .