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 Color.h 00022 * @brief Defines ColorId and ColorGradient. 00023 * @author Cale Scholl / calvinss4 00024 */ 00025 00026 #pragma once 00027 #ifndef __TCYC_COLOR_H__ 00028 #define __TCYC_COLOR_H__ 00029 00030 #include <ogc/gx.h> // for GXColor 00031 00032 /// Enumerates all the color types. 00033 enum ColorId 00034 { 00035 COLOR_ID_YELLOW, 00036 COLOR_ID_CYAN, 00037 COLOR_ID_GREEN, 00038 COLOR_ID_RED, 00039 COLOR_ID_ORANGE, 00040 COLOR_ID_BLUE, 00041 COLOR_ID_MAGENTA, 00042 COLOR_ID_BROWN, 00043 COLOR_ID_DEAD, 00044 COLOR_ID_BASE, 00045 COLOR_ID_MAX 00046 }; 00047 00048 /// A color gradient for coloring the face of a tetris piece block. 00049 struct ColorGradient 00050 { 00051 GXColor light; 00052 GXColor medium; 00053 GXColor dark; 00054 00055 void SetColor(GXColor &c) { light = medium = dark = c; } 00056 }; 00057 00058 #endif // __TCYC_COLOR_H__