C:/DevKitPro/!MDuel/source/menuTitle.cpp

Go to the documentation of this file.
00001 /*
00002  * Marshmallow Duel DS v2
00003  * Copyright © 2007 Sam Pospischil http://pospi.spadgos.com
00004  * 
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  * 
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00018  */
00019 
00020 #include "menuTitle.h"
00021 #include "titleWidget.h"
00022 
00028 menuTitle::menuTitle(u8 newScreen) : spriteManager(newScreen), bRotateBackground(false), backgroundAngle(0)
00029 {
00030         
00031 }
00032         
00033 menuTitle::~menuTitle()
00034 {
00035         
00036 }
00037 
00042 void menuTitle::loadRotatingBackground()
00043 {
00044         PA_SetVideoMode(screen, 1);
00045         PA_Load8bitBgPal(screen, (void*)::menuBG_Pal);
00046         PA_LoadRotBg(screen, 3, ::menuBG_Tiles, ::menuBG_Map, BG_ROT_256X256, 0);
00047         bRotateBackground = true;
00048         //PA_Load8bitBgPal(screen, (void*)backGroundSprite.bg_Pal);
00049         //PA_LoadRotBg(screen, 3, backGroundSprite.bg_Tiles, backGroundSprite.bg_Map, BG_ROT_256X256, 0);
00050         
00051         titleWidget* t = new titleWidget(this);
00052         t->givePallete(::menuLogo_Pal);
00053         t->giveSprite(::menuLogo_Sprite, OBJ_SIZE_64X32, 32, 16, 0, 95, 95, 1);
00054         spriteObject* s = new spriteObject(this);
00055         s->givePallete(::menuLogo2_Pal);
00056         s->giveSprite(::menuLogo2_Sprite, OBJ_SIZE_64X32, 32, 16, 0, 64, 0, 1);
00057         t->addChild(s);
00058 }
00059 
00063 void menuTitle::gameTick()
00064 {
00065         spriteManager::gameTick();
00066                 
00067         if (bRotateBackground)
00068         {
00069                 ++backgroundAngle;
00070                 PA_SetBgRot(screen, 3, 127, 95, 127, 95, backgroundAngle, 256);
00071         }
00072 }

Generated on Tue Mar 13 23:27:53 2007 for MDuel DS by  doxygen 1.5.1-p1