2012-07-03 18:26:49 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Copyright (C) 2012 Dimok
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef BANNERWINDOW_HPP_
|
|
|
|
#define BANNERWINDOW_HPP_
|
|
|
|
|
|
|
|
#include <gccore.h>
|
|
|
|
|
|
|
|
#include "disc.h"
|
|
|
|
#include "AnimatedBanner.h"
|
|
|
|
#include "gui_sound.h"
|
|
|
|
#include "video.hpp"
|
|
|
|
#include "channel/banner.h"
|
|
|
|
|
|
|
|
#define FAVORITE_STARS 5
|
|
|
|
|
|
|
|
class BannerWindow
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
BannerWindow();
|
|
|
|
void DeleteBanner();
|
|
|
|
void LoadBanner(Banner *banner, CVideo *vid, u8 *font1, u8 *font2);
|
|
|
|
int GetSelectedGame() { return gameSelected; }
|
2012-07-04 13:56:02 +02:00
|
|
|
bool GetZoomSetting() { return AnimZoom; }
|
2012-07-03 18:26:49 +02:00
|
|
|
void Draw(void);
|
2012-07-04 13:56:02 +02:00
|
|
|
bool ToogleZoom(void);
|
2012-07-03 18:26:49 +02:00
|
|
|
protected:
|
|
|
|
int MainLoop();
|
|
|
|
void Animate(void);
|
|
|
|
void ChangeGame(Banner *banner);
|
2012-07-04 13:56:02 +02:00
|
|
|
void DrawRectangle(f32 x, f32 y, f32 width, f32 height, GXColor color);
|
2012-07-03 20:00:42 +02:00
|
|
|
void ReSetup_GX(void);
|
2012-07-03 18:26:49 +02:00
|
|
|
|
|
|
|
static const float fBannerWidth = 608.f;
|
|
|
|
static const float fBannerHeight = 448.f;
|
|
|
|
static const float fIconWidth = 128.f;
|
|
|
|
static const float fIconHeight = 96.f;
|
|
|
|
|
|
|
|
CVideo *video;
|
|
|
|
bool reducedVol;
|
|
|
|
int returnVal;
|
|
|
|
int gameSelected;
|
|
|
|
dir_discHdr dvdheader;
|
|
|
|
|
|
|
|
int MaxAnimSteps;
|
|
|
|
|
|
|
|
int AnimStep;
|
|
|
|
float AnimPosX, AnimPosY;
|
|
|
|
float fAnimScale;
|
2012-07-04 13:56:02 +02:00
|
|
|
bool AnimZoom;
|
2012-07-03 18:26:49 +02:00
|
|
|
bool AnimationRunning;
|
2012-07-04 00:08:51 +02:00
|
|
|
bool changing;
|
2012-07-03 18:26:49 +02:00
|
|
|
|
|
|
|
Mtx modelview;
|
|
|
|
Mtx44 projection;
|
|
|
|
Vec2f ScreenProps;
|
|
|
|
|
|
|
|
AnimatedBanner *gameBanner;
|
|
|
|
u8 *sysFont1;
|
|
|
|
u8 *sysFont2;
|
2012-07-04 13:56:02 +02:00
|
|
|
bool FontLoaded;
|
2012-07-03 18:26:49 +02:00
|
|
|
};
|
|
|
|
|
2012-07-04 13:56:02 +02:00
|
|
|
extern BannerWindow *m_banner;
|
|
|
|
|
2012-07-03 18:26:49 +02:00
|
|
|
#endif
|