1 // Brain Party 2 // Copyright (C) 2010 Paul Hudson (http://www.tuxradar.com/brainparty) 3 4 // Brain Party is free software; you can redistribute it and/or 5 // modify it under the terms of the GNU General Public License 6 // as published by the Free Software Foundation; either version 3 7 // of the License, or (at your option) any later version. 8 9 // This program is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 14 // You should have received a copy of the GNU General Public License 15 // along with this program; if not, write to the Free Software 16 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 18 #ifndef __UNDERTHEHAT_H__ 19 #define __UNDERTHEHAT_H__ 20 21 #include "Minigame.h" 22 23 class BPMiniGame_UnderTheHat_Hat { 24 public: 25 int X; 26 int Y; 27 int StartX; 28 int StartY; 29 int DestX; 30 int DestY; 31 }; 32 33 34 35 36 class BPMiniGame_UnderTheHat : public BPMiniGame { 37 public: 38 BPMiniGame_UnderTheHat(BPGame* game); 39 ~BPMiniGame_UnderTheHat(); 40 void Start(); 41 int GetWeight(); 42 void Render(); 43 void Tick(); 44 void OnMouseDown(); 45 void OnMouseMove(); 46 void OnMouseUp(); 47 void MakeMove(); 48 void LevelUp(); 49 void GenerateMoves(); 50 protected: 51 Texture* sfcBackground; 52 Texture* sfcBackground2; 53 Texture* sfcHat; 54 Texture* sfcBadHat; 55 Texture* sfcItem; 56 57 BPPList<BPMiniGame_UnderTheHat_Hat*> Hats; 58 BPPList<BPPoint*> Points; 59 60 BPMiniGame_UnderTheHat_Hat* ChosenHat; 61 62 int CurrentLevel; 63 SpriteFont* sfcCurrentLevel; 64 int Tries; 65 int MoveSpeed; 66 int MovesLeft; 67 int LastStateChange; 68 69 float BackgroundFade; 70 bool BackgroundUp; 71 72 int NumWrong; 73 int SuccessTime; 74 int TimeStarted; 75 76 float MoveAmount; 77 78 MiniGameStates State; 79 }; 80 81 #endif 82