• Main Page
  • Classes
  • Files
  • File List
  • File Members

code/source/globals.cpp

Go to the documentation of this file.
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 globals.cpp
00022  * @author Cale Scholl / calvinss4
00023  */
00024 
00025 #include <wiiuse/wpad.h> // for vec3w_t, expansion_t
00026 #include <gcmodplay.h>   // for MODPlay
00027 #include "Player.h"      // for Player
00028 #include "Options.h"     // for Options
00029 #include "Color.h"       // for ColorGradient
00030 
00031 Options *g_options; // the global options
00032 TetrisPieceDesc g_pieceDesc[TETRISPIECE_ID_MAX][4]; // static description of every tetris piece for all 4 rotations
00033 Player *g_players; // the player instances
00034 MODPlay g_modPlay; // used for playing the game music
00035 bool g_isEditMode = false; // true when editing the playfield
00036 bool g_isClassicMode = false; // classic mode
00037 int g_tcycMenu; // the current menu state
00038 Mtx g_view; // the global view matrix
00039 vec3w_t g_wiiacc[MAX_PLAYERS];     // wiimote acceleration data
00040 expansion_t g_wiiexp[MAX_PLAYERS]; // wiimote expansion-controller data
00041 int g_totalPowerups; // the total number of unique powerups
00042 
00043 // gradients for coloring the face of a tetris piece block
00044 ColorGradient g_cubeGradients[COLOR_ID_MAX] = 
00045 {
00046   {{255, 255, 64, 255}, {128, 128, 0, 255}, {64, 64, 0, 255}},    // yellow
00047   {{64, 255, 255, 255}, {0, 128, 128, 255}, {0, 64, 64, 255}},    // cyan
00048   {{64, 255, 64, 255}, {0, 128, 0, 255}, {0, 64, 0, 255}},        // green
00049   {{255, 64, 64, 255}, {128, 0, 0, 255}, {64, 0, 0, 255}},        // red
00050   {{255, 128, 64, 255}, {128, 64, 0, 255}, {64, 32, 0, 255}},     // orange
00051   {{64, 64, 255, 255}, {0, 0, 128, 255}, {0, 0, 64, 255}},        // blue
00052   {{255, 64, 255, 255}, {128, 0, 128, 255}, {64, 0, 64, 255}},    // magenta
00053   {{200, 150, 100, 255}, {150, 100, 50, 255}, {100, 50, 0, 255}}, // brown
00054   {{100, 100, 100, 255}, {50, 50, 50, 255}, {25, 25, 25, 255}},   // dead color
00055   {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}                      // base color
00056   //{{200, 200, 200, 255}, {128, 128, 128, 255}, {64, 64, 64, 255}}, // gray
00057 };
00058 
00059 //void (*reload)() = (void(*)())0x90000020;
00060 //void (*reloadGecko)() = (void(*)())0x80001800;

Generated on Wed Oct 20 2010 17:06:58 for TetriCycle by  doxygen 1.7.1