+//#define SWIMMING
+
+namespace {
+ static const int TILES_FOR_BUTTJUMP = 3;
+ static const float BUTTJUMP_MIN_VELOCITY_Y = 400.0f;
+ static const float SHOOTING_TIME = .150f;
+
+ /** number of idle stages, including standing */
+ static const unsigned int IDLE_STAGE_COUNT = 5;
+ /**
+ * how long to play each idle animation in milliseconds
+ * '0' means the sprite action is played once before moving onto the next
+ * animation
+ */
+ static const int IDLE_TIME[] = { 5000, 0, 2500, 0, 2500 };
+ /** idle stages */
+ static const std::string IDLE_STAGES[] =
+ { "stand",
+ "idle",
+ "stand",
+ "idle",
+ "stand" };
+
+ /** acceleration in horizontal direction when walking
+ * (all accelerations are in pixel/s^2) */
+ static const float WALK_ACCELERATION_X = 300;
+ /** acceleration in horizontal direction when running */
+ static const float RUN_ACCELERATION_X = 400;
+ /** acceleration when skidding */
+ static const float SKID_XM = 200;
+ /** time of skidding in seconds */
+ static const float SKID_TIME = .3f;
+ /** maximum walk velocity (pixel/s) */
+ static const float MAX_WALK_XM = 230;
+ /** maximum run velocity (pixel/s) */
+ static const float MAX_RUN_XM = 320;
+ /** maximum horizontal climb velocity */
+ static const float MAX_CLIMB_XM = 48;
+ /** maximum vertical climb velocity */
+ static const float MAX_CLIMB_YM = 128;
+ /** instant velocity when tux starts to walk */
+ static const float WALK_SPEED = 100;
+
+ /** multiplied by WALK_ACCELERATION to give friction */
+ static const float NORMAL_FRICTION_MULTIPLIER = 1.5f;
+ /** multiplied by WALK_ACCELERATION to give friction */
+ static const float ICE_FRICTION_MULTIPLIER = 0.1f;
+ static const float ICE_ACCELERATION_MULTIPLIER = 0.25f;
+
+ /** time of the kick (kicking mriceblock) animation */
+ static const float KICK_TIME = .3f;
+ /** time of tux cheering (currently unused) */
+ static const float CHEER_TIME = 1.0f;
+
+ /** if Tux cannot unduck for this long, he will get hurt */
+ static const float UNDUCK_HURT_TIME = 0.25f;
+ /** gravity is higher after the jump key is released before
+ the apex of the jump is reached */
+ static const float JUMP_EARLY_APEX_FACTOR = 3.0;
+
+ static const float JUMP_GRACE_TIME = 0.25f; /**< time before hitting the ground that the jump button may be pressed (and still trigger a jump) */