// Path: hermes/Hermes.java
// public class Hermes {
// 	
// 	private static PApplet _parentApplet = null; //Storage of sketch's PApplet. 
// 	private static float _timeScale = 1.0f; // the time scale used by Hermes motion and physics calculations
// 	
// 	/**
// 	 * Sets the time scale for calculating motion and physics. This is seconds/unit, so a value of 2 will mean
// 	 * 	each 2 seconds correspond to one time unit.
// 	 * @param scale
// 	 */
// 	public static void setTimeScale(float scale) {
// 		_timeScale = scale;
// 	}
// 	
// 	/**
// 	 * Returns the Hermes time scale.
// 	 * @return	the time scale
// 	 */
// 	public static float getTimeScale() {
// 		return _timeScale;
// 	}
// 	
// 	/**
// 	 * Returns the <code>PApplet</code> that Hermes is running in.
// 	 */
// 	public static PApplet getPApplet() {
// 		synchronized(_parentApplet) {
// 			return _parentApplet;
// 		}
// 	}
// 	
// 	/**
// 	 * Set the PApplet that all utilities use. Called <code>Hermes.setPApplet(this)</code> before doing anything else!
// 	 */
// 	public static void setPApplet(PApplet parentApplet) {
// 		_parentApplet = parentApplet;		
// 	}
// 	
// 	/**
// 	 * Causes the calling thread to sleep, catches InterruptedException.
// 	 * @param time	the time (in milliseconds) to sleep
// 	 */
// 	public static void unsafeSleep(long time) {
// 		try {
// 			Thread.sleep(time);
// 		} catch (InterruptedException e) {}
// 	}
// 	
// }


import hermes.Hermes;
import java.util.ArrayList;
import processing.core.*;
		}

		if (_millisecondsPerFrameOnDeckFlag) { 
			_currentMillisecondsPerFrame = _millisecondsPerFrameOnDeck; //update the millisecondsPerFrame used based on the onDeck buffer
			_millisecondsPerFrameOnDeckFlag = false; //reset flag
		}

		if (_initialFrameOnDeckFlag) { 
			_initialFrame = _initialFrameOnDeck; //update the initialFrame to use based on the onDeck buffer
			_initialFrameOnDeckFlag = false; //reset flag
		}

		if (_lastFrameOnDeckFlag) { 
			_lastFrame = _lastFrameOnDeck; //update the lastFrame to use based on the onDeck buffer
			_lastFrameOnDeckFlag = false; //reset flag
		}

		if (_playDirectionLeftToRightOnDeckFlag) { 
			_playDirectionLeftToRight = _playDirectionLeftToRightOnDeck; //update the play direction based on the onDeck buffer
			_playDirectionLeftToRightOnDeckFlag = false; //reset flag
		}

		if (!_playingOnDeck) {
			_playing = _playingOnDeck;
		}

	} 

	////////2)
	if(_playing) {
// Path: hermes/Hermes.java
// public class Hermes {
// 	
// 	private static PApplet _parentApplet = null; //Storage of sketch's PApplet. 
// 	private static float _timeScale = 1.0f; // the time scale used by Hermes motion and physics calculations
// 	
// 	/**
// 	 * Sets the time scale for calculating motion and physics. This is seconds/unit, so a value of 2 will mean
// 	 * 	each 2 seconds correspond to one time unit.
// 	 * @param scale
// 	 */
// 	public static void setTimeScale(float scale) {
// 		_timeScale = scale;
// 	}
// 	
// 	/**
// 	 * Returns the Hermes time scale.
// 	 * @return	the time scale
// 	 */
// 	public static float getTimeScale() {
// 		return _timeScale;
// 	}
// 	
// 	/**
// 	 * Returns the <code>PApplet</code> that Hermes is running in.
// 	 */
// 	public static PApplet getPApplet() {
// 		synchronized(_parentApplet) {
// 			return _parentApplet;
// 		}
// 	}
// 	
// 	/**
// 	 * Set the PApplet that all utilities use. Called <code>Hermes.setPApplet(this)</code> before doing anything else!
// 	 */
// 	public static void setPApplet(PApplet parentApplet) {
// 		_parentApplet = parentApplet;		
// 	}
// 	
// 	/**
// 	 * Causes the calling thread to sleep, catches InterruptedException.
// 	 * @param time	the time (in milliseconds) to sleep
// 	 */
// 	public static void unsafeSleep(long time) {
// 		try {
// 			Thread.sleep(time);
// 		} catch (InterruptedException e) {}
// 	}
// 	
// }


// Path: hermes/animation/AnimatedSprite.java
import hermes.Hermes;
import java.util.ArrayList;
import processing.core.*;

		}

		if (_millisecondsPerFrameOnDeckFlag) { 
			_currentMillisecondsPerFrame = _millisecondsPerFrameOnDeck; //update the millisecondsPerFrame used based on the onDeck buffer
			_millisecondsPerFrameOnDeckFlag = false; //reset flag
		}

		if (_initialFrameOnDeckFlag) { 
			_initialFrame = _initialFrameOnDeck; //update the initialFrame to use based on the onDeck buffer
			_initialFrameOnDeckFlag = false; //reset flag
		}

		if (_lastFrameOnDeckFlag) { 
			_lastFrame = _lastFrameOnDeck; //update the lastFrame to use based on the onDeck buffer
			_lastFrameOnDeckFlag = false; //reset flag
		}

		if (_playDirectionLeftToRightOnDeckFlag) { 
			_playDirectionLeftToRight = _playDirectionLeftToRightOnDeck; //update the play direction based on the onDeck buffer
			_playDirectionLeftToRightOnDeckFlag = false; //reset flag
		}

		if (!_playingOnDeck) {
			_playing = _playingOnDeck;
		}

	} 

	////////2)
	if(_playing) {
		int currentTime = Hermes.getPApplet().millis();