/** * @file ucube/playstate.h * @brief Public interface of the ucube/playstate module. * * Copyright 2010 Stephen M. Webb * * This propgram is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; either version 3 of the License, or (at your option) any later * version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 51 * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef UCUBE_PLAYSTATE_H #define UCUBE_PLAYSTATE_H 1 #include "ucube/gamestate.h" #include "ucube/cube.h" #include "ucube/maths.h" namespace UCube { class Font; class PlayState : public GameState { public: PlayState(Config& config); ~PlayState(); void gesture(const GestureEvent&); void handle_event(EventPtr event); void update(App& app); void draw(Video& video); private: enum SubState { state_idle, state_swapping, state_unswapping, state_replacing, state_rotating, state_end }; SubState m_state; Cube m_cube; Font& m_infoFont; float m_x_velocity; float m_y_velocity; float m_z_velocity; float m_s_velocity; float m_x_pos; float m_y_pos; float m_z_pos; Vector3f m_scale; std::string m_gesture_type; int m_touches; #if 0 bool m_mouseIsDown; Vector2i m_mouseDownPos; Vector2i m_selectedPos; int m_curWins; int m_score; Matrix4f m_unproject; #endif }; } // namespace UCube #endif // UCUBE_PLAYSTATE_H