00001 /** @file globals.h 00002 * @brief A file for anything that needs to be globally visible. 00003 */ 00004 00005 #ifndef __globals_h__ 00006 #define __globals_h__ 00007 00008 #include <gccore.h> 00009 #include <wiiuse/wpad.h> 00010 #include <gcmodplay.h> 00011 00012 #include "prototypes.h" 00013 #include "defines.h" 00014 #include "Player.h" 00015 #include "Options.h" 00016 #include "Color.h" 00017 #include "libwiigui/gui.h" 00018 00019 // TODO cale - stick these in the Player class 00020 extern TetrisPiece g_currPiece[MAX_PLAYERS]; ///< the currently falling tetris piece 00021 extern TetrisPiece g_nextPiece[MAX_PLAYERS]; ///< the next tetris piece 00022 extern u8 map[MAX_PLAYERS][MAX_PLAYFIELD_WIDTH][MAX_PLAYFIELD_HEIGHT]; ///< the current layout of all fallen pieces 00023 extern vec3w_t g_wiiacc[MAX_PLAYERS]; ///< wiimote acceleration data 00024 extern expansion_t g_wiiexp[MAX_PLAYERS]; ///< wiimote expansion-controller data 00025 00026 extern Options& g_options; ///< the global options 00027 extern TetrisPieceDesc g_pieceDesc[NUMTYPES][4]; ///< static description of every tetris piece for all 4 rotations 00028 extern Player g_players[MAX_PLAYERS]; ///< the player instances 00029 extern MODPlay g_modPlay; ///< used for playing the game music 00030 extern bool g_isEditMode; ///< true when editing the playfield 00031 extern int g_tcycMenu; ///< the current menu state 00032 extern ColorGradient g_cubeGradients[COLOR_ID_MAX]; ///< gradients for coloring the face of a tetris piece block 00033 00034 // defined in video.cpp 00035 extern u32 *g_xfb[2]; ///< the external frame buffer 00036 extern GXRModeObj *g_vmode; ///< the video mode 00037 extern Mtx GXmodelView2D; ///< 2D modelview matrix 00038 extern Mtx44 orthographic; ///< 2D projection matrix 00039 00040 // defined in menu.cpp 00041 extern GuiImageData *pointer[MAX_PLAYERS]; 00042 extern GuiImage *bgImg; 00043 extern GuiSound *bgMusic; 00044 extern GuiWindow *mainWindow; 00045 00046 // defined in tetris_menu.cpp 00047 extern GuiImageData *grabber[MAX_PLAYERS]; 00048 extern GuiImageData *debug_grabber1; 00049 extern GuiImageData *debug_grabber2; 00050 extern GuiImageData *debug_grabber3; 00051 extern GuiImageData *debug_grabber4; 00052 00053 extern GuiSound *btnSoundOver; 00054 extern GuiSound *g_heartbeatSound; 00055 extern GuiSound *g_tetrisCheerSound; 00056 00057 extern GuiImageData *btnOutline; 00058 extern GuiImageData *btnOutlineOver; 00059 extern GuiImageData *btnLargeOutline; 00060 extern GuiImageData *btnLargeOutlineOver; 00061 extern GuiImageData *btnData40x40Square; 00062 extern GuiImageData *btnData40x40SquareOver; 00063 extern GuiImageData *btnData80x40; 00064 extern GuiImageData *btnData80x40Over; 00065 extern GuiImageData *btnDataMinus; 00066 extern GuiImageData *btnDataMinusOver; 00067 extern GuiImageData *btnDataPlus; 00068 extern GuiImageData *btnDataPlusOver; 00069 extern GuiImageData *tetrisLove; 00070 00071 extern GuiTrigger *trigA; 00072 extern GuiTrigger *trigHome; 00073 00074 //extern int timing[]; ///< the tetris piece falls every 'x' frames 00075 //extern void (*reload)(); 00076 //extern void (*reloadGecko)(); 00077 00078 #endif