00001 /* 00002 * TetriCycle 00003 * Copyright (C) 2009, 2010 Cale Scholl 00004 * 00005 * This file is part of TetriCycle. 00006 * 00007 * TetriCycle is free software: you can redistribute it and/or modify 00008 * it under the terms of the GNU Lesser General Public License as published 00009 * by the Free Software Foundation, either version 3 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * TetriCycle is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public License 00018 * along with TetriCycle. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 /** @file Options.h 00022 * @brief Defines the Options class. 00023 * @author Cale Scholl / calvinss4 00024 */ 00025 00026 #pragma once 00027 #ifndef __OPTIONS_H__ 00028 #define __OPTIONS_H__ 00029 00030 #include "Profile.h" // for Profile 00031 00032 /// The game options. 00033 class Options 00034 { 00035 public: 00036 Profile profile; ///< the global player profile 00037 vector<PowerupId> powerups; ///< powerups that are enabled 00038 u8 powerupsSize; ///< actual size of the powerups array 00039 u8 players; ///< the number of players 00040 bool isPaused; ///< whether the game is paused 00041 bool isNetplay; 00042 00043 static Options& GetInstance() 00044 { 00045 static Options options; 00046 return options; 00047 } 00048 00049 private: 00050 Options() : powerups(g_totalPowerups), 00051 powerupsSize(g_totalPowerups), 00052 players(1), 00053 isPaused(false), 00054 isNetplay(false) 00055 { 00056 for (int i = 0; i < g_totalPowerups; ++i) 00057 powerups[i] = (PowerupId)i; 00058 } 00059 }; 00060 00061 #endif // __OPTIONS_H__