From d5fb3ff33f38214288bac1ded0ac870154433de0 Mon Sep 17 00:00:00 2001
From: dimok321 <15055714+dimok789@users.noreply.github.com>
Date: Sat, 1 Aug 2009 14:42:12 +0000
Subject: [PATCH] Some changes to the Carousel:
*Added a ToolTip
*Added GameName under the covers
*Fixed Crash with no Favorites in list.
NOTE: I'll add a better coming out effect for the covers, for now there is only a slow big ZoomOut which isnt too bad either.
---
gui.pnproj | 2 +-
source/libwiigui/gui.h | 11 +-
source/libwiigui/gui_button.cpp | 2 +-
source/libwiigui/gui_element.cpp | 4 +-
source/libwiigui/gui_gamecarousel.cpp | 67 ++-
source/libwiigui/gui_gamecarousel.h | 4 +
source/libwiigui/gui_gamegrid.cpp | 694 +++++++++++++-------------
source/libwiigui/gui_image.cpp | 19 +-
source/libwiigui/gui_tooltip.cpp | 38 +-
source/menu.cpp | 7 -
10 files changed, 444 insertions(+), 404 deletions(-)
diff --git a/gui.pnproj b/gui.pnproj
index 8178b615..ea394844 100644
--- a/gui.pnproj
+++ b/gui.pnproj
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/source/libwiigui/gui.h b/source/libwiigui/gui.h
index 506eb1c7..51b1f8af 100644
--- a/source/libwiigui/gui.h
+++ b/source/libwiigui/gui.h
@@ -378,7 +378,7 @@ class GuiElement
//!Sets the element's position
//!\param x X coordinate
//!\param y Y coordinate
- void SetPosition(int x, int y);
+ void SetPosition(int x, int y, int z = 0);
//!Updates the element's effects (dynamic values)
//!Called by Draw(), used for animation purposes
void UpdateEffects();
@@ -427,6 +427,7 @@ class GuiElement
int height; //!< Element height
int xoffset; //!< Element X offset
int yoffset; //!< Element Y offset
+ int zoffset; //!< Element Z offset
int ymin; //!< Element's min Y offset allowed
int ymax; //!< Element's max Y offset allowed
int xmin; //!< Element's min X offset allowed
@@ -638,6 +639,8 @@ class GuiImage : public GuiElement
void SetPixel(int x, int y, GXColor color);
//!Sets the image to grayscale
void SetGrayscale(void);
+ //!Set/disable the use of parentelement angle (default true)
+ void SetParentAngle(bool a);
//!Directly modifies the image data to create a color-striped effect
//!Alters the RGB values by the specified amount
//!\param s Amount to increment/decrement the RGB values in the image
@@ -648,7 +651,6 @@ class GuiImage : public GuiElement
void SetStripe(int s);
s32 z;
void SetSkew(int XX1, int YY1,int XX2, int YY2,int XX3, int YY3,int XX4, int YY4);
-
int xx1;
int yy1;
int xx2;
@@ -672,6 +674,7 @@ class GuiImage : public GuiElement
int tile; //!< Number of times to draw (tile) the image horizontally
int stripe; //!< Alpha value (0-255) to apply a stripe effect to the texture
short widescreen; //added
+ bool parentangle;
};
//!Display, manage, and manipulate text in the GUI
@@ -874,7 +877,7 @@ class GuiButton : public GuiElement
//!Constantly called to draw the GuiButtons ToolTip
//!Sets the button's Tooltip on over
//!\param tt Pointer to GuiElement object, x & y Positioning, h & v Align
- void SetToolTip(GuiElement* tt, int x, int y, int h=ALIGN_RIGHT, int v=ALIGN_TOP);
+ void SetToolTip(GuiTooltip* tt, int x, int y, int h=ALIGN_RIGHT, int v=ALIGN_TOP);
void RemoveToolTip();
//!Constantly called to draw the GuiButton
@@ -895,7 +898,7 @@ class GuiButton : public GuiElement
GuiImage * iconOver; //!< Button icon for STATE_SELECTED
GuiImage * iconHold; //!< Button icon for STATE_HELD
GuiImage * iconClick; //!< Button icon for STATE_CLICKED
- GuiElement *toolTip;
+ GuiTooltip *toolTip;
time_t time1, time2;//!< Tooltip timeconstants
GuiText * label[3]; //!< Label(s) to display (default)
GuiText * labelOver[3]; //!< Label(s) to display for STATE_SELECTED
diff --git a/source/libwiigui/gui_button.cpp b/source/libwiigui/gui_button.cpp
index 2e90e092..7669ae37 100644
--- a/source/libwiigui/gui_button.cpp
+++ b/source/libwiigui/gui_button.cpp
@@ -232,7 +232,7 @@ void GuiButton::SetSoundClick(GuiSound * snd)
soundClick = snd;
}
-void GuiButton::SetToolTip(GuiElement* tt, int x, int y, int h_align, int v_align)
+void GuiButton::SetToolTip(GuiTooltip* tt, int x, int y, int h_align, int v_align)
{
LOCK(this);
if(tt)
diff --git a/source/libwiigui/gui_element.cpp b/source/libwiigui/gui_element.cpp
index 0fa825c7..99ad3bda 100644
--- a/source/libwiigui/gui_element.cpp
+++ b/source/libwiigui/gui_element.cpp
@@ -18,6 +18,7 @@ GuiElement::GuiElement()
{
xoffset = 0;
yoffset = 0;
+ zoffset = 0;
xmin = 0;
xmax = 0;
ymin = 0;
@@ -705,11 +706,12 @@ void GuiElement::SetUpdateCallback(UpdateCallback u)
updateCB = u;
}
-void GuiElement::SetPosition(int xoff, int yoff)
+void GuiElement::SetPosition(int xoff, int yoff, int zoff)
{
LOCK(this);
xoffset = xoff;
yoffset = yoff;
+ zoffset = zoff;
}
void GuiElement::SetAlignment(int hor, int vert)
diff --git a/source/libwiigui/gui_gamecarousel.cpp b/source/libwiigui/gui_gamecarousel.cpp
index 690677a0..64ebb4a3 100644
--- a/source/libwiigui/gui_gamecarousel.cpp
+++ b/source/libwiigui/gui_gamecarousel.cpp
@@ -37,9 +37,9 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int count, co
gameCnt = count;
gameList = l;
pagesize = (gameCnt < PAGESIZE) ? gameCnt : PAGESIZE;
- listOffset = (offset == 0) ? this->FindMenuItem(-1, 1) : offset;
+ listOffset = 0;
selectable = true;
- selectedItem = selected - offset;
+ selectedItem = 0;
if (selectedItem==0)selectedItem=(pagesize+1)/2;
focus = 1; // allow focus
firstPic = 0;
@@ -97,6 +97,14 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int count, co
btnRight->SetEffectGrow();
ResumeBufferThread(listOffset);
+
+ ttgame = new GuiTooltip(" ");
+
+ gamename = new GuiText(" ", 18, (GXColor) {THEME.info_r, THEME.info_g, THEME.info_b, 255});
+ gamename->SetParent(this);
+ gamename->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
+ gamename->SetPosition(0, 330);
+ gamename->SetMaxWidth(280, GuiText::DOTTED);
gameIndex = new int[pagesize];
game = new GuiButton * [pagesize];
@@ -137,7 +145,9 @@ GuiGameCarousel::~GuiGameCarousel()
delete trigPlus;
delete trigMinus;
delete btnSoundClick;
- delete btnSoundOver;
+ delete btnSoundOver;
+ delete ttgame;
+ delete gamename;
for(int i=0; iIsVisible())
+ if(!this->IsVisible() || !gameCnt)
return;
int next = listOffset;
-
+
for(int i=0; i= 0) {
game[i]->SetImage(ImageBuffer(i));
game[i]->Draw();
next = this->FindMenuItem(next, 1);
} else break;
- }
+ }
+
+ //!Draw tooltip after the Images to have it on top
+ for(int i=0; i= 0) {
+ if(Settings.tooltips == TooltipsOn)
+ game[i]->DrawTooltip();
+ next = this->FindMenuItem(next, 1);
+ } else break;
+ }
+
+ gamename->Draw();
if(gameCnt > pagesize) {
btnRight->Draw();
@@ -266,7 +289,7 @@ void GuiGameCarousel::Draw()
void GuiGameCarousel::Update(GuiTrigger * t)
{
LOCK(this);
- if(state == STATE_DISABLED || !t)
+ if(state == STATE_DISABLED || !t || !gameCnt)
return;
if(!(game[0]->GetEffect() || game[0]->GetEffectOnOver())) {
@@ -298,11 +321,13 @@ void GuiGameCarousel::Update(GuiTrigger * t)
int next = listOffset;
for(int i=0; i= 0) {
+ if(next >= 0) {
if(game[i]->GetState() == STATE_DISABLED) {
game[i]->SetVisible(true);
- game[i]->SetState(STATE_DEFAULT);
- }
+ game[i]->SetState(STATE_DEFAULT);
+ game[i]->RemoveToolTip();
+ }
+ game[i]->SetEffectOnOver(EFFECT_SCALE, 1, 130);
gameIndex[i] = next;
next = this->FindMenuItem(next, 1);
} else {
@@ -313,7 +338,7 @@ void GuiGameCarousel::Update(GuiTrigger * t)
if(focus) {
if(i != selectedItem && game[i]->GetState() == STATE_SELECTED)
game[i]->ResetState();
- else if(i == selectedItem && game[i]->GetState() == STATE_DEFAULT);
+ else if(i == selectedItem && game[i]->GetState() == STATE_DEFAULT)
game[selectedItem]->SetState(STATE_SELECTED, t->chan);
}
game[i]->Update(t);
@@ -324,10 +349,22 @@ void GuiGameCarousel::Update(GuiTrigger * t)
if(game[i]->GetState() == STATE_CLICKED) {
clickedItem = i;
}
+ }
+
+ ///Tooltip stuff
+ struct discHdr *header = &gameList[this->GetSelectedOption()];
+ ttgame->SetText(get_title(header));
+ game[selectedItem]->SetToolTip(ttgame, 0, 0);
+ ttgame->SetPosition(0, 20);
+ if(selectedItem < PAGESIZE/2+1)
+ ttgame->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
+ else
+ ttgame->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
+
+ ///GameText
+ gamename->SetText(get_title(header));
- }
-
- // navigation
+ /// navigation
if(!focus || gameCnt <= pagesize || (game[0]->GetEffect() && game[pagesize-1]->GetEffect()))
return; // skip navigation
diff --git a/source/libwiigui/gui_gamecarousel.h b/source/libwiigui/gui_gamecarousel.h
index 333a57ed..ed0df063 100644
--- a/source/libwiigui/gui_gamecarousel.h
+++ b/source/libwiigui/gui_gamecarousel.h
@@ -35,6 +35,10 @@ class GuiGameCarousel : public GuiElement
GuiButton ** game;
+ GuiTooltip * ttgame;
+
+ GuiText * gamename;
+
GuiButton * btnRight;
GuiButton * btnLeft;
diff --git a/source/libwiigui/gui_gamegrid.cpp b/source/libwiigui/gui_gamegrid.cpp
index 194d7a29..47f2e86d 100644
--- a/source/libwiigui/gui_gamegrid.cpp
+++ b/source/libwiigui/gui_gamegrid.cpp
@@ -35,7 +35,7 @@
extern const int vol;
-int mover=0, mover2=0;
+int mover=0, mover2=0;
u8 goback=0;
int goLeft = 0, goRight=0;
char debugbuffer[100];
@@ -64,18 +64,18 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char
char imgPath[100];
rows =3;
drawTTs=0;
-
-
-
+
+
+
if ((count<42)&&(rows==3))rows=2;
if ((count<16)&&(rows==2))rows=1;
if (gameCnt<6)gameCnt=6;
-
+
if (rows==1)pagesize = 6;
else if (rows==2)pagesize = 16;
else if (rows==3)pagesize = 42;
-
-
+
+
//if (realCntSetSoundOver(btnSoundOver);
btnLeft->SetTrigger(trigL);
btnLeft->SetTrigger(trigMinus);
-
+
/*debugTxt = new GuiText("fag", 14, (GXColor){0,0,0, 255});
debugTxt->SetParent(this);
- debugTxt->SetAlignment(2,5);
- debugTxt->SetPosition(0,180);*/
-
+ debugTxt->SetAlignment(2,5);
+ debugTxt->SetPosition(0,180);*/
+
btnRight = new GuiButton(0,0);
btnRight->SetParent(this);
@@ -119,39 +119,29 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char
btnRight->SetSoundOver(btnSoundOver);
btnRight->SetTrigger(trigR);
btnRight->SetTrigger(trigPlus);
-
+
btnRowUp = new GuiButton(0,0);
btnRowUp->SetParent(this);
btnRowUp->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
btnRowUp->SetPosition(0,0);
btnRowUp->SetTrigger(trig2);
-
+
btnRowDown = new GuiButton(0,0);
btnRowDown->SetParent(this);
btnRowDown->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
btnRowDown->SetPosition(0,0);
btnRowDown->SetTrigger(trig1);
-
-
-// titleTxt = new GuiText("test");
-
- titleTT = new GuiTooltip("test");
+
+ titleTT = new GuiTooltip(" ");
titleTT->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
titleTT->SetPosition(-100,0);
titleTT->SetAlpha(THEME.tooltipAlpha);
-
-// if (Settings.wsprompt == yes)
-// installBtnTT.SetWidescreen(CFG.widescreen);
-
-
- //if (count>0){
gameIndex = new int[pagesize];
game = new GuiButton * [pagesize];
bob = new int[pagesize];
coverImg = new GuiImage * [gameCnt];
cover = new GuiImageData * [gameCnt];
- //titleTxt = new GuiText * [gameCnt];
for(int i=0; ipagesize?gameCnt:pagesize;
- //for(int i=0; i < gameCnt; i++) {
+
for(int i=0; i < n; i++) {
struct discHdr *header = &gameList[i];
@@ -184,12 +174,12 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char
coverImg[i]->SetWidescreen(CFG.widescreen);
if (Settings.gridRows==2)coverImg[i]->SetScale(.6);//these are the numbers for 2 rows
else if (Settings.gridRows==3)coverImg[i]->SetScale(.26);//these are the numbers for 3 rows
-
+
//titleTxt[i] = new GuiText(get_title(&gameList[i]), 20, (GXColor){0,0,0, 0xff});
-
-
+
+
}
-
+
for(int i=0; i < pagesize; i++) {
game[i] = new GuiButton(160,224);//for 1 row
if (Settings.gridRows==2)game[i]->SetSize(75,133);//these are the numbers for 2 rows
@@ -206,29 +196,29 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char
game[i]->SetClickable(true);
game[i]->SetVisible(true);
//coverImg[i]->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50);
-
+
}
- for (int i=gameCnt-1;iSetVisible(false);
game[i]->SetClickable(false);
game[i]->RemoveSoundOver();}
-
+
//if(CFG.widescreen){
-
+
rows =Settings.gridRows;
if ((count<42)&&(rows==3))rows=2;
if ((count<16)&&(rows==2))rows=1;
if (gameCnt<6)gameCnt=6;
-
+
if (rows==1)pagesize = 6;
else if (rows==2)pagesize = 16;
else if (rows==3)pagesize = 42;
-
+
Settings.gridRows = rows;
if(isInserted(bootDevice)) {
cfg_save_global();
}
-
+
if (rows==1)
{
if(CFG.widescreen){
@@ -243,7 +233,7 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char
game[bob[2]]->SetPosition(239,74);
game[bob[3]]->SetPosition(420,74);
game[bob[4]]->SetPosition(612,74);
- }
+ }
game[0]->SetSkew(-10,-44,10,-26,10,26,-10,44);
game[1]->SetSkew(-6,-22,6,-14,6,14,-6,22);
game[2]->SetSkew(0,-11,0,-11,0,11,0,11);
@@ -302,58 +292,58 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char
game[12]->SetSkew(-4.5,-27,4.5,-49,4.5,0,-4.5,0);
game[13]->SetSkew(-4.5,0,4.5,0,4.5,49,-4.5,27);
}
-
+
else if (rows==3)
{
if(CFG.widescreen){
game[0]->SetPosition(13,58);
game[1]->SetPosition(13,153);
game[2]->SetPosition(13,250);
-
+
game[3]->SetPosition(68,67);
game[4]->SetPosition(68,153);
game[5]->SetPosition(68,239);
-
+
game[6]->SetPosition(120,74);
game[7]->SetPosition(120,153);
game[8]->SetPosition(120,232);
-
+
game[9]->SetPosition(170,78);
game[10]->SetPosition(170,153);
game[11]->SetPosition(170,228);
-
+
game[12]->SetPosition(214,80);
game[13]->SetPosition(214,153);
game[14]->SetPosition(214,226);
-
+
game[15]->SetPosition(258,81);
game[16]->SetPosition(258,153);
game[17]->SetPosition(258,224);
-
+
game[18]->SetPosition(302,81);
game[19]->SetPosition(302,153);
game[20]->SetPosition(302,223);
-
+
game[21]->SetPosition(346,81);
game[22]->SetPosition(346,153);
game[23]->SetPosition(346,223);
-
+
game[24]->SetPosition(390,80);
game[25]->SetPosition(390,153);
game[26]->SetPosition(390,225);
-
+
game[27]->SetPosition(434,77);
game[28]->SetPosition(434,153);
game[29]->SetPosition(434,227);
-
+
game[30]->SetPosition(484,73);
game[31]->SetPosition(484,153);
game[32]->SetPosition(484,231);
-
+
game[33]->SetPosition(537,67);
game[34]->SetPosition(537,153);
game[35]->SetPosition(537,239);
-
+
game[36]->SetPosition(591,58);
game[37]->SetPosition(591,153);
game[38]->SetPosition(591,250);
@@ -362,51 +352,51 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char
game[0]->SetPosition(-29,58);
game[1]->SetPosition(-29,153);
game[2]->SetPosition(-29,250);
-
+
game[3]->SetPosition(33,67);
game[4]->SetPosition(33,153);
game[5]->SetPosition(33,239);
-
+
game[6]->SetPosition(92,74);
game[7]->SetPosition(92,153);
game[8]->SetPosition(92,232);
-
+
game[9]->SetPosition(149,78);
game[10]->SetPosition(149,153);
game[11]->SetPosition(149,228);
-
+
game[12]->SetPosition(200,80);
game[13]->SetPosition(200,153);
game[14]->SetPosition(200,226);
-
+
game[15]->SetPosition(251,81);
game[16]->SetPosition(251,153);
game[17]->SetPosition(251,224);
-
+
game[18]->SetPosition(302,81);
game[19]->SetPosition(302,153);
game[20]->SetPosition(302,223);
-
+
game[21]->SetPosition(353,81);
game[22]->SetPosition(353,153);
game[23]->SetPosition(353,223);
-
+
game[24]->SetPosition(404,80);
game[25]->SetPosition(404,153);
game[26]->SetPosition(404,225);
-
+
game[27]->SetPosition(457,77);
game[28]->SetPosition(457,153);
game[29]->SetPosition(457,227);
-
+
game[30]->SetPosition(512,73);
game[31]->SetPosition(512,153);
game[32]->SetPosition(512,231);
-
+
game[33]->SetPosition(572,67);
game[34]->SetPosition(572,153);
game[35]->SetPosition(572,239);
-
+
game[36]->SetPosition(633,58);
game[37]->SetPosition(633,153);
game[38]->SetPosition(633,250);
@@ -414,63 +404,63 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int count, const char
game[0]->SetSkew(-38,-110,15,-42,15,65,-38,32);
game[1]->SetSkew(-38,-75,15,-48,15,45,-38,72);
game[2]->SetSkew(-38,-52,15,-70,15,27,-38,100);
-
+
game[3]->SetSkew(-38,-70,15,-24,15,40,-38,27);
game[4]->SetSkew(-38,-50,15,-35,15,40,-38,50);
game[5]->SetSkew(-38,-34,15,-47,15,24,-38,58);
-
+
game[6]->SetSkew(-27,-55,19,-22,19,30,-27,22);
game[7]->SetSkew(-27,-40,19,-30,19,30,-27,40);
game[8]->SetSkew(-27,-20,19,-30,19,20,-27,50);
-
+
game[9]->SetSkew(-19,-28,0,-17,0,15,-19,10);
game[10]->SetSkew(-19,-30,0,-20,0,12,-19,30);
game[11]->SetSkew(-19,-15,0,-20,0,10,-19,24);
-
+
game[12]->SetSkew(-10,-20,3,-13,3,14,-10,10);
game[13]->SetSkew(-10,-20,3,-18,3,18,-10,20);
game[14]->SetSkew(-10,-10,3,-10,3,0,-10,10);
-
+
game[15]->SetSkew(-10,-15,3,-12,3,13,-10,13);
game[16]->SetSkew(-10,-17,3,-10,3,10,-10,17);
game[17]->SetSkew(-10,-10,3,-15,3,10,-10,10);
-
+
game[18]->SetSkew(-10,-10,3,-10,3,14,-10,14);
game[19]->SetSkew(-10,-10,3,-10,3,10,-10,10);//middle
game[20]->SetSkew(-10,-10,3,-10,3,10,-10,10);
-
+
game[21]->SetSkew(-14,-10,4,-20,3,10,-14,10);
game[22]->SetSkew(-14,-10,4,-17,3,17,-14,10);
game[23]->SetSkew(-14,-10,4,-10,3,10,-14,10);
-
+
game[24]->SetSkew(-10,-13,3,-20,3,14,-10,10);
game[25]->SetSkew(-10,-18,3,-20,3,20,-10,18);
game[26]->SetSkew(-10,-10,3,-10,3,20,-10,5);
-
+
game[27]->SetSkew(-19,-17,0,-28,0,10,-19,15);
game[28]->SetSkew(-19,-20,0,-30,0,30,-19,12);
game[29]->SetSkew(-19,-20,0,-15,0,30,-19,10);
-
+
game[30]->SetSkew(-27,-22,19,-55,19,22,-27,30);
game[31]->SetSkew(-27,-30,19,-40,19,40,-27,30);
game[32]->SetSkew(-27,-30,19,-20,19,55,-27,20);
-
+
game[33]->SetSkew(-38,-24,15,-70,15,27,-38,40);
game[34]->SetSkew(-38,-35,15,-50,15,50,-38,40);
game[35]->SetSkew(-38,-47,15,-34,15,58,-38,24);
-
+
game[36]->SetSkew(-38,-42,15,-110,15,32,-38,60);
game[37]->SetSkew(-38,-48,15,-75,15,70,-38,45);
game[38]->SetSkew(-38,-70,15,-52,15,100,-38,27);
}
-
-
-
-
+
+
+
+
// }
- // else
+ // else
// WindowPrompt("Oops","Your Wii must be in 16:9 mode to see the gamewall.",0, tr("OK"), 0,0);
-
+
//}
}
@@ -601,9 +591,9 @@ void GuiGameGrid::Draw()
LOCK(this);
if(!this->IsVisible())
return;
-
+
if(c>0){
-
+
int next = listOffset;
for(int i=0; iDraw();
if ((wait>75)&&(Settings.tooltips == TooltipsOn)&&(drawTTs!=0))
titleTT->Draw();
-
-
-
+
+
+
this->UpdateEffects();
}
@@ -634,7 +624,7 @@ void GuiGameGrid::Draw()
/**
- * Change the number of rows
+ * Change the number of rows
*/
void GuiGameGrid::ChangeRows(int n)
{
@@ -644,7 +634,7 @@ void GuiGameGrid::ChangeRows(int n)
if(isInserted(bootDevice)) {
cfg_save_global();
}
-
+
for(int i=0; iSetWidescreen(CFG.widescreen);
if (rows==2)coverImg[i]->SetScale(.6);//these are the numbers for 2 rows
else if (rows==3)coverImg[i]->SetScale(.26);//these are the numbers for 3 rows
-
+
}
//set pagesize
if (n==1)pagesize=6;
else if (n==2)pagesize=16;
else if (n==3)pagesize=42;
-
+
firstPic=0;
drawTTs=0;
-
+
// create new buttons based on pagesize
for(int i=0; i < pagesize; i++) {
if (n==1)game[i]->SetSize(160,224);//for 1 row
if (n==2)game[i]->SetSize(75,133);//these are the numbers for 2 rows
else if (n==3)game[i]->SetSize(35,68);//these are the numbers for 3 rows
- game[i]->SetPosition(0,740);//hide unused buttons
+ game[i]->SetPosition(0,740);//hide unused buttons
game[i]->SetImage(listOffset+iSetPosition(0,0):coverImg[listOffset+i-gameCnt]->SetPosition(0,0);}// only for 1 row
if (n==2){listOffset+iSetPosition(0,-50):coverImg[listOffset+i-gameCnt]->SetPosition(0,-50);}// only for 2 row
if (n==3){listOffset+iSetPosition(0,-80):coverImg[listOffset+i-gameCnt]->SetPosition(0,-80);}// only for 3 row
bob[i] = i;
-
-
+
+
}
//if(CFG.widescreen)
//{
-
+
if (n==1)
{
if(CFG.widescreen){
@@ -691,14 +681,14 @@ void GuiGameGrid::ChangeRows(int n)
game[bob[3]]->SetPosition(390,74);
game[bob[4]]->SetPosition(550,74);
}
- else{
+ else{
game[bob[0]]->SetPosition(-130,74);
game[bob[1]]->SetPosition(60,74);
game[bob[2]]->SetPosition(239,74);
game[bob[3]]->SetPosition(420,74);
game[bob[4]]->SetPosition(612,74);
}
-
+
game[bob[0]]->SetSkew(-10,-44,10,-26,10,26,-10,44);
game[bob[1]]->SetSkew(-6,-22,6,-14,6,14,-6,22);
game[bob[2]]->SetSkew(0,-11,0,-11,0,11,0,11);
@@ -762,51 +752,51 @@ void GuiGameGrid::ChangeRows(int n)
game[bob[0]]->SetPosition(13,58);
game[bob[1]]->SetPosition(13,153);
game[bob[2]]->SetPosition(13,250);
-
+
game[bob[3]]->SetPosition(68,67);
game[bob[4]]->SetPosition(68,153);
game[bob[5]]->SetPosition(68,239);
-
+
game[bob[6]]->SetPosition(120,74);
game[bob[7]]->SetPosition(120,153);
game[bob[8]]->SetPosition(120,232);
-
+
game[bob[9]]->SetPosition(170,78);
game[bob[10]]->SetPosition(170,153);
game[bob[11]]->SetPosition(170,228);
-
+
game[bob[12]]->SetPosition(214,80);
game[bob[13]]->SetPosition(214,153);
game[bob[14]]->SetPosition(214,226);
-
+
game[bob[15]]->SetPosition(258,81);
game[bob[16]]->SetPosition(258,153);
game[bob[17]]->SetPosition(258,224);
-
+
game[bob[18]]->SetPosition(302,81);
game[bob[19]]->SetPosition(302,153);
game[bob[20]]->SetPosition(302,223);
-
+
game[bob[21]]->SetPosition(346,81);
game[bob[22]]->SetPosition(346,153);
game[bob[23]]->SetPosition(346,223);
-
+
game[bob[24]]->SetPosition(390,80);
game[bob[25]]->SetPosition(390,153);
game[bob[26]]->SetPosition(390,225);
-
+
game[bob[27]]->SetPosition(434,77);
game[bob[28]]->SetPosition(434,153);
game[bob[29]]->SetPosition(434,227);
-
+
game[bob[30]]->SetPosition(484,73);
game[bob[31]]->SetPosition(484,153);
game[bob[32]]->SetPosition(484,231);
-
+
game[bob[33]]->SetPosition(537,67);
game[bob[34]]->SetPosition(537,153);
game[bob[35]]->SetPosition(537,239);
-
+
game[bob[36]]->SetPosition(591,58);
game[bob[37]]->SetPosition(591,153);
game[bob[38]]->SetPosition(591,250);
@@ -815,109 +805,109 @@ void GuiGameGrid::ChangeRows(int n)
game[bob[0]]->SetPosition(-29,58);
game[bob[1]]->SetPosition(-29,153);
game[bob[2]]->SetPosition(-29,250);
-
+
game[bob[3]]->SetPosition(33,67);
game[bob[4]]->SetPosition(33,153);
game[bob[5]]->SetPosition(33,239);
-
+
game[bob[6]]->SetPosition(92,74);
game[bob[7]]->SetPosition(92,153);
game[bob[8]]->SetPosition(92,232);
-
+
game[bob[9]]->SetPosition(149,78);
game[bob[10]]->SetPosition(149,153);
game[bob[11]]->SetPosition(149,228);
-
+
game[bob[12]]->SetPosition(200,80);
game[bob[13]]->SetPosition(200,153);
game[bob[14]]->SetPosition(200,226);
-
+
game[bob[15]]->SetPosition(251,81);
game[bob[16]]->SetPosition(251,153);//
game[bob[17]]->SetPosition(251,224);
-
+
game[bob[18]]->SetPosition(302,81);//
game[bob[19]]->SetPosition(302,153);//
game[bob[20]]->SetPosition(302,223);//
-
+
game[bob[21]]->SetPosition(353,81);
game[bob[22]]->SetPosition(353,153);
game[bob[23]]->SetPosition(353,223);
-
+
game[bob[24]]->SetPosition(404,80);
game[bob[25]]->SetPosition(404,153);
game[bob[26]]->SetPosition(404,225);
-
+
game[bob[27]]->SetPosition(457,77);
game[bob[28]]->SetPosition(457,153);
game[bob[29]]->SetPosition(457,227);
-
+
game[bob[30]]->SetPosition(512,73);
game[bob[31]]->SetPosition(512,153);
game[bob[32]]->SetPosition(512,231);
-
+
game[bob[33]]->SetPosition(572,67);
game[bob[34]]->SetPosition(572,153);
game[bob[35]]->SetPosition(572,239);
-
+
game[bob[36]]->SetPosition(633,58);
game[bob[37]]->SetPosition(633,153);
game[bob[38]]->SetPosition(633,250);
}
-
+
game[bob[0]]->SetSkew(-38,-110,15,-42,15,65,-38,32);
game[bob[1]]->SetSkew(-38,-75,15,-48,15,45,-38,72);
game[bob[2]]->SetSkew(-38,-52,15,-70,15,27,-38,100);
-
+
game[bob[3]]->SetSkew(-38,-70,15,-24,15,40,-38,27);
game[bob[4]]->SetSkew(-38,-50,15,-35,15,40,-38,50);
game[bob[5]]->SetSkew(-38,-34,15,-47,15,24,-38,58);
-
+
game[bob[6]]->SetSkew(-27,-55,19,-22,19,30,-27,22);
game[bob[7]]->SetSkew(-27,-40,19,-30,19,30,-27,40);
game[bob[8]]->SetSkew(-27,-20,19,-30,19,20,-27,50);
-
+
game[bob[9]]->SetSkew(-19,-28,0,-17,0,15,-19,10);
game[bob[10]]->SetSkew(-19,-30,0,-20,0,12,-19,30);
game[bob[11]]->SetSkew(-19,-15,0,-20,0,10,-19,24);
-
+
game[bob[12]]->SetSkew(-10,-20,3,-13,3,14,-10,10);
game[bob[13]]->SetSkew(-10,-20,3,-18,3,18,-10,20);
game[bob[14]]->SetSkew(-10,-10,3,-10,3,0,-10,10);
-
+
game[bob[15]]->SetSkew(-10,-15,3,-12,3,13,-10,13);
game[bob[16]]->SetSkew(-10,-17,3,-10,3,10,-10,17);
game[bob[17]]->SetSkew(-10,-10,3,-15,3,10,-10,10);
-
+
game[bob[18]]->SetSkew(-10,-10,3,-10,3,14,-10,14);
game[bob[19]]->SetSkew(-10,-10,3,-10,3,10,-10,10);//middle
game[bob[20]]->SetSkew(-10,-10,3,-10,3,10,-10,10);
-
+
game[bob[21]]->SetSkew(-14,-10,4,-20,3,10,-14,10);
game[bob[22]]->SetSkew(-14,-10,4,-17,3,17,-14,10);
game[bob[23]]->SetSkew(-14,-10,4,-10,3,10,-14,10);
-
+
game[bob[24]]->SetSkew(-10,-13,3,-20,3,14,-10,10);
game[bob[25]]->SetSkew(-10,-18,3,-20,3,20,-10,18);
game[bob[26]]->SetSkew(-10,-10,3,-10,3,20,-10,5);
-
+
game[bob[27]]->SetSkew(-19,-17,0,-28,0,10,-19,15);
game[bob[28]]->SetSkew(-19,-20,0,-30,0,30,-19,12);
game[bob[29]]->SetSkew(-19,-20,0,-15,0,30,-19,10);
-
+
game[bob[30]]->SetSkew(-27,-22,19,-55,19,22,-27,30);
game[bob[31]]->SetSkew(-27,-30,19,-40,19,40,-27,30);
game[bob[32]]->SetSkew(-27,-30,19,-20,19,55,-27,20);
-
+
game[bob[33]]->SetSkew(-38,-24,15,-70,15,27,-38,40);
game[bob[34]]->SetSkew(-38,-35,15,-50,15,50,-38,40);
game[bob[35]]->SetSkew(-38,-47,15,-34,15,58,-38,24);
-
+
game[bob[36]]->SetSkew(-38,-42,15,-110,15,32,-38,60);
game[bob[37]]->SetSkew(-38,-48,15,-75,15,70,-38,45);
game[bob[38]]->SetSkew(-38,-70,15,-52,15,100,-38,27);
}
-
+
//}
}
@@ -938,7 +928,7 @@ void GuiGameGrid::Update(GuiTrigger * t)
//snprintf(debugbuffer, sizeof(debugbuffer), "count: %i listOffset: %i", count,listOffset);
//debugTxt->SetText(debugbuffer);
//debugTxt->Draw();
-
+
btnRight->Update(t);
btnLeft->Update(t);
btnRowUp->Update(t);
@@ -976,11 +966,11 @@ void GuiGameGrid::Update(GuiTrigger * t)
}
}
-
+
this->SetPosition(this->GetLeft()+mover2,this->GetTop());
if (goback==1)mover2= (mover2<0? mover2+1:mover2-1);
if (mover2==0)goback=0;
-
+
/*u16 buttons = ButtonsHold();
if(buttons & WPAD_BUTTON_B) {
int x = t->wpad.ir.x;
@@ -991,8 +981,8 @@ void GuiGameGrid::Update(GuiTrigger * t)
for(int i=0; iDraw();}
//return;
}*/
-
-
+
+
// navigation
if(!focus || gameCnt < pagesize || (c==0)||(game[bob[0]]->GetEffect() && game[bob[pagesize-1]]->GetEffect()))
return; // skip navigation
@@ -1007,26 +997,26 @@ void GuiGameGrid::Update(GuiTrigger * t)
speed = SHIFT_SPEED;
return;
}
-
+
if (Settings.xflip==sysmenu ||Settings.xflip==yes)
goRight=12;
else
goLeft=12;
wait=0;wait1=0;
-
-
+
+
}
if (goLeft>0){
-
- for (int i=1; iSetImage(coverImg[(listOffset + pagesize-i) % gameCnt]);
if (rows==1)coverImg[(listOffset+i) % gameCnt]->SetPosition(0,0);// only for 1 row
if (rows==3)coverImg[(listOffset + pagesize-i) % gameCnt]->SetPosition(0,-80);// only for 3 rows
if (rows==2)coverImg[(listOffset + pagesize-i) % gameCnt]->SetPosition(0,-50);// only for 2 rows
-
+
}
if (mover<11){
-
+
if (rows==1){
if(CFG.widescreen)
{
@@ -1036,7 +1026,7 @@ void GuiGameGrid::Update(GuiTrigger * t)
game[bob[3]]->SetPosition(390-(mover * 15.1),74);
game[bob[4]]->SetPosition(550-(mover * 16),74);
game[bob[5]]->SetPosition(710-(mover * 16),74);
- }else{
+ }else{
game[bob[0]]->SetPosition(-130-(mover * 19),74);
game[bob[1]]->SetPosition(60-(mover * 19),74);
game[bob[2]]->SetPosition(239-(mover * 17.9),74);
@@ -1044,25 +1034,25 @@ void GuiGameGrid::Update(GuiTrigger * t)
game[bob[4]]->SetPosition(612-(mover * 19.2),74);
game[bob[5]]->SetPosition(772-(mover * 16),74);
}
-
-
-
+
+
+
//if (mover>5)game[bob[0]]->SetSkew(-10,-26,10,-44,10,44,-10,26);
//SetSkew(-10(mover * ),-44(mover * ),10(mover * ),-26(mover * ),
// 10(mover * ),26(mover * ),-10(mover * ),44(mover * ));
-
+
game[bob[1]]->SetSkew(-6-(mover * .4),-22-(mover * 2.2),6+(mover * .4),-14-(mover * 1.2),
6+(mover * .4),14+(mover * 1.2),-6-(mover * .4),22+(mover * 2.2));
-
+
game[bob[2]]->SetSkew(0-(mover * .6),-11-(mover * 1.1),0+(mover * .6),-11-(mover * .3)
,0+(mover * .6),11+(mover * .3),0-(mover * .6),11+(mover * 1.1));
-
+
game[bob[3]]->SetSkew(-6+(mover * .6),-14+(mover * .3),6-(mover * .6),-22+(mover * 1.1),
6-(mover * .6),22-(mover * 1.1),-6+(mover * .6),14-(mover * .3));
-
+
game[bob[4]]->SetSkew(-10+(mover * .4),-26+(mover * 1.2),10-(mover * .4),-44+(mover * 2.2),
10-(mover * .4),44-(mover * 2.2),-10+(mover * .4),26-(mover * 1.2));
-
+
game[bob[5]]->SetSkew(-14+(mover * .4),-34+(mover * 1.2),14-(mover * .4),-66+(mover * 2.2),
14-(mover * .4),66-(mover * 2.2),-14+(mover * .4),34-(mover * 1.2));
}
@@ -1070,7 +1060,7 @@ void GuiGameGrid::Update(GuiTrigger * t)
{
if(CFG.widescreen)
{
-
+
game[bob[0]]->SetPosition(3-(mover * 9.4),50);
game[bob[1]]->SetPosition(3-(mover * 9.4),193);
game[bob[2]]->SetPosition(97-(mover * 9.4),50);
@@ -1105,43 +1095,43 @@ void GuiGameGrid::Update(GuiTrigger * t)
game[bob[14]]->SetPosition(700-(mover * 10.1),50);
game[bob[15]]->SetPosition(700-(mover * 10.1),193);
}
-
+
game[bob[2]]->SetSkew(-4-(mover * .05),-22-(mover * 2.7),4+(mover * .05),-14-(mover * 1.3),
4+(mover * .05),0,-4-(mover * .05),0);
-
+
game[bob[3]]->SetSkew(-4-(mover * .05),0,4+(mover * .05),0,
4+(mover * .05),14+(mover * 1.3),-4-(mover * .05),22+(mover * 2.7));
-
+
game[bob[4]]->SetSkew(0-(mover * .4),-9-(mover * 1.3),0+(mover * .4),-5-(mover * .9),
0+(mover * .4),0,0-(mover * .4),0);
-
+
game[bob[5]]->SetSkew(0-(mover * .4),0,0+(mover * .4),0,
0+(mover *.4),5+(mover * .9),0-(mover * .4),9+(mover * 1.3));
-
+
game[bob[6]]->SetSkew(0,0-(mover * .9),0,0-(mover * .5),
0,0,0,0);
-
+
game[bob[7]]->SetSkew(0,0,0,0,
0,0+(mover * .5),0,0+(mover * .9));
-
+
game[bob[8]]->SetSkew(0,-5+(mover * .5),0,-9+(mover * .9),
0,0,0,0);
-
+
game[bob[9]]->SetSkew(0,0,0,0,
0,9-(mover * .9),0,5-(mover * .5));
-
+
game[bob[10]]->SetSkew(-4+(mover * .4),-14+(mover * .9),4-(mover * .4),-22+(mover *1.3),
4-(mover * .4),0,-4+(mover * .4),0);
-
+
game[bob[11]]->SetSkew(-4+(mover * .4),0,4-(mover * .4),0,
4-(mover * .4),22-(mover * 1.3),-4+(mover * .4),14-(mover * .9));
-
+
game[bob[12]]->SetSkew(-4.5+(mover *.05),-27+(mover *1.3),4.5-(mover *.05),-49+(mover *2.7),
4.5-(mover *.05),0,-4.5+(mover *.05),0);
-
+
game[bob[13]]->SetSkew(-4.5+(mover *.05),0,4.5-(mover *.05),0,4.5-(mover *.05),
49-(mover *2.7),-4.5+(mover *.05),27-(mover *1.3));
-
+
game[bob[14]]->SetSkew(-4.5,-27,4.5,-49,4.5,0,-4.5,0);
game[bob[15]]->SetSkew(-4.5,0,4.5,0,4.5,49,-4.5,27);
}
@@ -1151,55 +1141,55 @@ void GuiGameGrid::Update(GuiTrigger * t)
game[bob[0]]->SetPosition(13-(mover * 5.5),58-(mover * .9));
game[bob[1]]->SetPosition(13-(mover * 5.5),153);
game[bob[2]]->SetPosition(13-(mover * 5.5),250+(mover * 1.1));
-
+
game[bob[3]]->SetPosition(68-(mover * 5.5),67-(mover * .9));
game[bob[4]]->SetPosition(68-(mover * 5.5),153);
game[bob[5]]->SetPosition(68-(mover * 5.5),239+(mover * 1.1));
-
+
game[bob[6]]->SetPosition(120-(mover * 5.2),74-(mover * .7));
game[bob[7]]->SetPosition(120-(mover * 5.2),153);
game[bob[8]]->SetPosition(120-(mover * 5.2),232+(mover * .7));
-
+
game[bob[9]]->SetPosition(170-(mover * 5),78-(mover * .4));
game[bob[10]]->SetPosition(170-(mover * 5),153);
game[bob[11]]->SetPosition(170-(mover * 5),228+(mover * .4));
-
+
game[bob[12]]->SetPosition(214-(mover * 4.4),80-(mover * .2));
game[bob[13]]->SetPosition(214-(mover * 4.4),153);
game[bob[14]]->SetPosition(214-(mover * 4.4),226+(mover * .2));
-
+
game[bob[15]]->SetPosition(258-(mover * 4.4),81-(mover * .1));
game[bob[16]]->SetPosition(258-(mover * 4.4),153);
game[bob[17]]->SetPosition(258-(mover * 4.4),224+(mover * .2));
-
+
game[bob[18]]->SetPosition(302-(mover * 4.4),81);
game[bob[19]]->SetPosition(302-(mover * 4.4),153);
game[bob[20]]->SetPosition(302-(mover * 4.4),223+(mover * .1));
-
+
game[bob[21]]->SetPosition(346-(mover * 4.4),81);
game[bob[22]]->SetPosition(346-(mover * 4.4),153);
game[bob[23]]->SetPosition(346-(mover * 4.4),223);
-
+
game[bob[24]]->SetPosition(390-(mover * 4.4),80+(mover * .1));
game[bob[25]]->SetPosition(390-(mover * 4.4),153);
game[bob[26]]->SetPosition(390-(mover * 4.4),225-(mover * .2));
-
+
game[bob[27]]->SetPosition(434-(mover * 4.4),77+(mover * .3));
game[bob[28]]->SetPosition(434-(mover * 4.4),153);
game[bob[29]]->SetPosition(434-(mover * 4.4),227-(mover * .2));
-
+
game[bob[30]]->SetPosition(484-(mover * 5),73+(mover * .4));
game[bob[31]]->SetPosition(484-(mover * 5),153);
game[bob[32]]->SetPosition(484-(mover * 5),231-(mover * .4));
-
+
game[bob[33]]->SetPosition(537-(mover * 5.3),67+(mover * .6));
game[bob[34]]->SetPosition(537-(mover * 5.3),153);
game[bob[35]]->SetPosition(537-(mover * 5.3),239-(mover * .8));
-
+
game[bob[36]]->SetPosition(591-(mover * 5.4),58+(mover * .9));
game[bob[37]]->SetPosition(591-(mover * 5.4),153);
game[bob[38]]->SetPosition(591-(mover * 5.4),250-(mover * 1.1));
-
+
game[bob[39]]->SetPosition(645-(mover * 5.4),58);
game[bob[40]]->SetPosition(645-(mover * 5.4),153);
game[bob[41]]->SetPosition(645-(mover * 5.4),250);
@@ -1208,121 +1198,121 @@ void GuiGameGrid::Update(GuiTrigger * t)
game[bob[0]]->SetPosition(-29-(mover * 6.2),58-(mover * .9));
game[bob[1]]->SetPosition(-29-(mover * 6.2),153);
game[bob[2]]->SetPosition(-29-(mover * 6.2),250+(mover * 1.1));
-
+
game[bob[3]]->SetPosition(33-(mover * 6.2),67-(mover * .9));
game[bob[4]]->SetPosition(33-(mover * 6.2),153);
game[bob[5]]->SetPosition(33-(mover * 6.2),239+(mover * 1.1));
-
+
game[bob[6]]->SetPosition(92-(mover * 5.9),74-(mover * .7));
game[bob[7]]->SetPosition(92-(mover * 5.9),153);
game[bob[8]]->SetPosition(92-(mover * 5.9),232+(mover * .7));
-
+
game[bob[9]]->SetPosition(149-(mover * 5.7),78-(mover * .4));
game[bob[10]]->SetPosition(149-(mover * 5.7),153);
game[bob[11]]->SetPosition(149-(mover * 5.7),228+(mover * .4));
-
+
game[bob[12]]->SetPosition(200-(mover * 5.1),80-(mover * .2));
game[bob[13]]->SetPosition(200-(mover * 5.1),153);
game[bob[14]]->SetPosition(200-(mover * 5.1),226+(mover * .2));
-
+
game[bob[15]]->SetPosition(251-(mover * 5.1),81-(mover * .1));
game[bob[16]]->SetPosition(251-(mover * 5.1),153);//
game[bob[17]]->SetPosition(251-(mover * 5.1),224+(mover * .2));
-
+
game[bob[18]]->SetPosition(302-(mover * 5.1),81);//
game[bob[19]]->SetPosition(302-(mover * 5.1),153);//
game[bob[20]]->SetPosition(302-(mover * 5.1),223+(mover * .1));//
-
+
game[bob[21]]->SetPosition(353-(mover * 5.1),81);
game[bob[22]]->SetPosition(353-(mover * 5.1),153);
game[bob[23]]->SetPosition(353-(mover * 5.1),223);
-
+
game[bob[24]]->SetPosition(404-(mover * 5.1),80+(mover * .1));
game[bob[25]]->SetPosition(404-(mover * 5.1),153);
game[bob[26]]->SetPosition(404-(mover * 5.1),225-(mover * .2));
-
+
game[bob[27]]->SetPosition(457-(mover * 5.3),77+(mover * .3));
game[bob[28]]->SetPosition(457-(mover * 5.3),153);
game[bob[29]]->SetPosition(457-(mover * 5.3),227-(mover * .2));
-
+
game[bob[30]]->SetPosition(512-(mover * 5.5),73+(mover * .4));
game[bob[31]]->SetPosition(512-(mover * 5.5),153);
game[bob[32]]->SetPosition(512-(mover * 5.5),231-(mover * .4));
-
+
game[bob[33]]->SetPosition(572-(mover * 6),67+(mover * .6));
game[bob[34]]->SetPosition(572-(mover * 6),153);
game[bob[35]]->SetPosition(572-(mover * 6),239-(mover * .8));
-
+
game[bob[36]]->SetPosition(633-(mover * 6.1),58+(mover * .9));
game[bob[37]]->SetPosition(633-(mover * 6.1),153);
game[bob[38]]->SetPosition(633-(mover * 6.1),250-(mover * 1.1));
-
+
game[bob[39]]->SetPosition(687-(mover * 5.4),58);
game[bob[40]]->SetPosition(687-(mover * 5.4),153);
game[bob[41]]->SetPosition(687-(mover * 5.4),250);
}
-
+
//game[bob[0]]->SetSkew(-38,-110,15,-42,15,65,-38,32);
//game[bob[1]]->SetSkew(-38,-75,15,-48,15,45,-38,72);
//game[bob[2]]->SetSkew(-38,-52,15,-70,15,27,-38,100);
-
+
game[bob[3]]->SetSkew(-38,-70-(mover * 4),15,-24-(mover * 1.8),15,40+(mover * 1.5),-38,27+(mover * .5));
game[bob[4]]->SetSkew(-38,-50-(mover * 2.5),15,-35-(mover * .7),15,40-(mover * .5),-38,50+(mover * 1.2));
game[bob[5]]->SetSkew(-38,-34-(mover * 1.8),15,-47-(mover * 2.3),15,24+(mover * .3),-38,58+(mover * 4.2));
-
+
game[bob[6]]->SetSkew(-27-(mover * 1.1),-55-(mover * 1.5),19-(mover * .4),-22-(mover * .2),19-(mover * .4),30+(mover * 1),-27-(mover * 1.1),22+(mover * .5));
game[bob[7]]->SetSkew(-27-(mover * 1.1),-40-(mover * 1),19-(mover * .4),-30-(mover * .5),19-(mover * .4),30-(mover * 1),-27-(mover * 1.1),40+(mover * 1));
game[bob[8]]->SetSkew(-27-(mover * 1.1),-20-(mover * 1.4),19-(mover * .4),-30-(mover * 1.7),19-(mover * .4),20+(mover * .4),-27-(mover * 1.1),50+(mover * .8));
-
+
game[bob[9]]->SetSkew(-19-(mover * .8),-28-(mover * 1.7),0+(mover * 1.9),-17-(mover * .5),0+(mover * 1.9),15+(mover * 1.5),-19-(mover * .8),10+(mover * 1.2));
game[bob[10]]->SetSkew(-19-(mover * .8),-30-(mover * 1),0+(mover * 1.9),-20-(mover * 1),0+(mover * 1.9),12+(mover * 1.8),-19-(mover * .8),30+(mover * 1));
game[bob[11]]->SetSkew(-19-(mover * .8),-15-(mover * .5),0+(mover * 1.9),-20-(mover * 1),0+(mover * 1.9),10+(mover * 1),-19-(mover * .8),24+(mover * 2.2));
-
+
game[bob[12]]->SetSkew(-10-(mover * .9),-20-(mover * .8),3-(mover * .3),-13-(mover * .4),3-(mover * .3),14+(mover * .1),-10-(mover * .9),10);
game[bob[13]]->SetSkew(-10-(mover * .9),-20-(mover * 1),3-(mover * .3),-18-(mover * .2),3-(mover * .3),18-(mover * .1),-10-(mover * .9),20+(mover * 1));
game[bob[14]]->SetSkew(-10-(mover * .9),-10-(mover * .5),3-(mover * .3),-10-(mover * 1),3-(mover * .3),0+(mover * 1),-10-(mover * .9),10+(mover * 1.4));
-
+
game[bob[15]]->SetSkew(-10,-15-(mover * .5),3,-12-(mover * .1),3,13+(mover * .1),-10,13-(mover * .3));
game[bob[16]]->SetSkew(-10,-17-(mover * .3),3,-10-(mover * .8),3,10+(mover * .8),-10,17+(mover * .3));
game[bob[17]]->SetSkew(-10,-10,3,-15+(mover * .5),3,10-(mover * 1),-10,10);
-
+
game[bob[18]]->SetSkew(-10,-10-(mover * .5),3,-10-(mover * .2),3,14-(mover * .1),-10,14-(mover * .1));
game[bob[19]]->SetSkew(-10,-10-(mover * .7),3,-10,3,10,-10,10+(mover * .7));//middle
game[bob[20]]->SetSkew(-10,-10,3,-10-(mover * .5),3,10,-10,10);
-
+
game[bob[21]]->SetSkew(-14,-10,4-(mover * .1),-20+(mover * 1),3,10+(mover * .4),-14,10);
game[bob[22]]->SetSkew(-14,-10,4-(mover * .1),-17+(mover * .7),3,17-(mover * .7),-14,10);
game[bob[23]]->SetSkew(-14,-10,4-(mover * .1),-10,3,10,-14+(mover * .4),10);
-
+
game[bob[24]]->SetSkew(-10-(mover * .4),-13-(mover * .3),3+(mover * .1),-20,3,14-(mover * .4),-10-(mover * .4),10);
game[bob[25]]->SetSkew(-10-(mover * .4),-18-(mover * .8),3+(mover * .1),-20+(mover * .3),3,20-(mover * .3),-10-(mover * .4),18-(mover * .8));
game[bob[26]]->SetSkew(-10-(mover * .4),-10,3+(mover * .1),-10,3,20-(mover * 1),-10-(mover * .4),5+(mover * .5));
-
+
game[bob[27]]->SetSkew(-19+(mover * .9),-17+(mover * .4),0+(mover * .3),-28+(mover * .8),0+(mover * .3),10+(mover * .4),-19+(mover * .9),15-(mover * .5));
game[bob[28]]->SetSkew(-19+(mover * .9),-20+(mover * .2),0+(mover * .3),-30+(mover * 1),0+(mover * .3),20-(mover * 1),-19+(mover * .9),12+(mover * .6));
game[bob[29]]->SetSkew(-19+(mover * .9),-20+(mover * 1),0+(mover * .3),-15+(mover * .5),0+(mover * .3),30-(mover * 1),-19+(mover * .9),10);
-
+
game[bob[30]]->SetSkew(-27+(mover * .8),-22+(mover * .5),19-(mover * .9),-55+(mover * 1.7),19-(mover * .9),22-(mover * 1.2),-27+(mover * .8),30-(mover * 1.5));
game[bob[31]]->SetSkew(-27+(mover * .8),-30+(mover * 1),19-(mover * .9),-40+(mover * 1),19-(mover * .9),40-(mover * 2),-27+(mover * .8),30-(mover * 1.8));
game[bob[32]]->SetSkew(-27+(mover * .8),-30+(mover * 1),19-(mover * .9),-20+(mover * .5),19-(mover * .9),55-(mover * 1.5),-27+(mover * .8),20-(mover * 1));
-
+
game[bob[33]]->SetSkew(-38+(mover * 1.1),-24+(mover * .2),15+(mover * .4),-70+(mover * 1.5),15+(mover * .4),27-(mover * .5),-38+(mover * 1.1),40-(mover * 1));
game[bob[34]]->SetSkew(-38+(mover * 1.1),-35+(mover * .5),15+(mover * .4),-50+(mover * 1),15+(mover * .4),50-(mover * 1),-38+(mover * 1.1),40-(mover * 1));
game[bob[35]]->SetSkew(-38+(mover * 1.1),-47+(mover * 1.7),15+(mover * .4),-34+(mover * 1.4),15+(mover * .4),58-(mover * .3),-38+(mover * 1.1),24-(mover * .4));
-
+
game[bob[36]]->SetSkew(-38,-42+(mover * 1.8),15,-110+(mover * 4),15,32-(mover * .5),-38,60-(mover * 2));
game[bob[37]]->SetSkew(-38,-48+(mover * 1.3),15,-75+(mover * 2.5),15,70-(mover * 2),-38,45-(mover * .5));
game[bob[38]]->SetSkew(-38,-70+(mover * 2.3),15,-52+(mover * 1.8),15,100-(mover * 4.2),-38,27-(mover * .3));
-
+
game[bob[39]]->SetSkew(-38,-42,15,-110,15,32,-38,60);
game[bob[40]]->SetSkew(-38,-48,15,-75,15,65,-38,45);
game[bob[41]]->SetSkew(-38,-70,15,-52,15,100,-38,27);
}
-
-
+
+
mover++;
goLeft--;
-
+
}
else {goLeft=0;mover=0;
listOffset = (listOffset+rows < gameCnt) ? listOffset+rows : ((listOffset+rows) - gameCnt);
@@ -1331,10 +1321,10 @@ void GuiGameGrid::Update(GuiTrigger * t)
for (int i=0; iGetState() == STATE_CLICKED) {
WPAD_ScanPads();
u16 buttons = 0;
@@ -1350,26 +1340,26 @@ void GuiGameGrid::Update(GuiTrigger * t)
else
goRight=12;
wait=0;wait1=0;
-
-
-
-
+
+
+
+
}
if (goRight>0){
if (mover<11){
-
-
-
- for (int i=1; i<(rows+1); i++){
+
+
+
+ for (int i=1; i<(rows+1); i++){
int tmp = listOffset-i;
-
+
if (tmp<0)tmp=(gameCnt-i);
-
+
game[bob[pagesize-(i)]]->SetImage(coverImg[tmp]);
-
+
if (rows==1)coverImg[tmp]->SetPosition(0,0);// only for 1 row
if (rows==3)coverImg[tmp]->SetPosition(0,-80);// only for 3 rows
- if (rows==2)coverImg[tmp]->SetPosition(0,-50);// only for 2 rows
+ if (rows==2)coverImg[tmp]->SetPosition(0,-50);// only for 2 rows
}
if (rows==1){
if(CFG.widescreen)
@@ -1380,7 +1370,7 @@ void GuiGameGrid::Update(GuiTrigger * t)
game[bob[3]]->SetPosition(390+(mover * 16),74);
game[bob[4]]->SetPosition(550+(mover * 16),74);
game[bob[5]]->SetPosition(-230+(mover * 16),74);
- }else{
+ }else{
game[bob[5]]->SetPosition(-290+(mover * 16),74);
game[bob[0]]->SetPosition(-130+(mover * 19),74);
game[bob[1]]->SetPosition(60+(mover * 17.9),74);
@@ -1388,22 +1378,22 @@ void GuiGameGrid::Update(GuiTrigger * t)
game[bob[3]]->SetPosition(420+(mover * 19.2),74);
game[bob[4]]->SetPosition(612+(mover * 19.2),74);
}
-
+
game[bob[0]]->SetSkew(-10+(mover * .4),-44+(mover * 2.2),10-(mover * .4),-26+(mover * 1.2),
10-(mover * .4),26-(mover * 1.2),-10+(mover * .4),44-(mover * 2.2));
-
+
game[bob[1]]->SetSkew(-6+(mover * .6),-22+(mover * 1.1),6-(mover * .6),-14+(mover * .3),
6-(mover * .6),14-(mover * .3),-6+(mover * .6),22-(mover * 1.1));
-
+
game[bob[2]]->SetSkew(0-(mover * .6),-11-(mover * .3),0+(mover * .6),-11-(mover * 1.1)
,0+(mover * .6),11+(mover * 1.1),0-(mover * .6),11+(mover * .3));
-
+
game[bob[3]]->SetSkew(-6-(mover * .4),-14-(mover * 1.2),6+(mover * .4),-22-(mover * 2.2),
6+(mover * .4),22+(mover * 2.2),-6-(mover * .4),14+(mover * 1.2));
-
+
game[bob[4]]->SetSkew(-10-(mover * .4),-26+(mover * 1.2),10+(mover * .4),-44-(mover * 2.2),
10+(mover * .4),44+(mover * 2.2),-10-(mover * .4),26+(mover * 1.2));
-
+
game[bob[5]]->SetSkew(-10,-44,10,-26,10,26,-10,44);
}
else if (rows==2)
@@ -1444,46 +1434,46 @@ void GuiGameGrid::Update(GuiTrigger * t)
game[bob[14]]->SetPosition(-155+(mover * 10.1),50);
game[bob[15]]->SetPosition(-155+(mover * 10.1),193);
}
-
-
+
+
game[bob[0]]->SetSkew(-4.5+(mover * .05),-49+(mover * 2.7),4.5-(mover * .05),-27+(mover * 1.3),
4.5-(mover * .05),0,-4.5+(mover * .05),0);
-
+
game[bob[1]]->SetSkew(-4.5+(mover * .05),0,4.5-(mover * .05),0,
4.5-(mover * .05),27-(mover * 1.3),-4.5+(mover * .05),49-(mover * 2.7));
-
+
game[bob[2]]->SetSkew(-4+(mover * .4),-22+(mover * 1.3),4-(mover * .4),-14+(mover * .9),
4-(mover * .4),0,-4+(mover * .4),0);
-
+
game[bob[3]]->SetSkew(-4+(mover * .4),0,4-(mover * .4),0,
4-(mover * .4),14-(mover * .9),-4+(mover * .4),22-(mover * 1.3));
-
+
game[bob[4]]->SetSkew(0,-9+(mover * .9),0,-5+(mover * .5),
0,0,0,0);
-
+
game[bob[5]]->SetSkew(0,0,0,0,
0,5-(mover * .5),0,9-(mover * .9));
-
+
game[bob[6]]->SetSkew(0,0-(mover * .5),0,0-(mover * .9),
0,0,0,0);
-
+
game[bob[7]]->SetSkew(0,0,0,0,
0,0+(mover * .9),0,0+(mover * .5));
-
+
game[bob[8]]->SetSkew(0-(mover * .4),-5-(mover * .9),0+(mover * .4),-9-(mover * 1.3),
0+(mover * .4),0,0-(mover * .4),0);
-
+
game[bob[9]]->SetSkew(0-(mover * .4),0,0+(mover * .4),0,
0+(mover * .4),9+(mover * 1.3),0-(mover * .4),5+(mover * .9));
-
+
game[bob[10]]->SetSkew(-4-(mover * .05),-14-(mover * 1.3),4+(mover * .05),-22-(mover * 2.7),
4+(mover * .05),0,-4-(mover * .05),0);
-
+
game[bob[11]]->SetSkew(-4-(mover * .05),0,4+(mover * .05),0,
4+(mover * .05),22+(mover * 2.7),-4-(mover * .05),14+(mover * 1.3));
-
+
game[bob[12]]->SetSkew(-4.5,-27,4.5,-49,4.5,0,-4.5,0);
-
+
game[bob[13]]->SetSkew(-4.5,0,4.5,0,4.5,49,-4.5,27);
game[bob[14]]->SetSkew(-4.5,-49,4.5,-27,4.5,0,-4.5,0);
game[bob[15]]->SetSkew(-4.5,0,4.5,0,4.5,27,-4.5,49);
@@ -1494,113 +1484,113 @@ void GuiGameGrid::Update(GuiTrigger * t)
game[bob[39]]->SetPosition(-42+(mover *5.5),58);
game[bob[40]]->SetPosition(-42+(mover *5.5),153);
game[bob[41]]->SetPosition(-42+(mover *5.5),250);
-
+
game[bob[0]]->SetPosition(13+(mover *5.5),58+(mover *.9));
game[bob[1]]->SetPosition(13+(mover *5.5),153);
game[bob[2]]->SetPosition(13+(mover *5.5),250-(mover *1.1));
-
+
game[bob[3]]->SetPosition(68+(mover *5.2),67+(mover *.7));
game[bob[4]]->SetPosition(68+(mover *5.2),153);
game[bob[5]]->SetPosition(68+(mover *5.2),239-(mover *.7));
-
+
game[bob[6]]->SetPosition(120+(mover *5),74+(mover *.4));
game[bob[7]]->SetPosition(120+(mover *5),153);
game[bob[8]]->SetPosition(120+(mover *5),232-(mover *.4));
-
+
game[bob[9]]->SetPosition(170+(mover *4.4),78+(mover *.2));
game[bob[10]]->SetPosition(170+(mover *4.4),153);
game[bob[11]]->SetPosition(170+(mover *4.4),228-(mover *.2));
-
+
game[bob[12]]->SetPosition(214+(mover *4.4),80+(mover *.1));
game[bob[13]]->SetPosition(214+(mover *4.4),153);
game[bob[14]]->SetPosition(214+(mover *4.4),226-(mover *.2));
-
+
game[bob[15]]->SetPosition(258+(mover *4.4),81);
game[bob[16]]->SetPosition(258+(mover *4.4),153);
game[bob[17]]->SetPosition(258+(mover *4.4),224-(mover *.1));
-
+
game[bob[18]]->SetPosition(302+(mover *4.4),81);
game[bob[19]]->SetPosition(302+(mover *4.4),153);
game[bob[20]]->SetPosition(302+(mover *4.4),223);
-
+
game[bob[21]]->SetPosition(346+(mover *4.4),81-(mover *.1));
game[bob[22]]->SetPosition(346+(mover *4.4),153);
game[bob[23]]->SetPosition(346+(mover *4.4),223+(mover *.2));
-
+
game[bob[24]]->SetPosition(390+(mover *4.4),80-(mover *.3));
game[bob[25]]->SetPosition(390+(mover *4.4),153);
game[bob[26]]->SetPosition(390+(mover *4.4),225+(mover *.2));
-
+
game[bob[27]]->SetPosition(434+(mover *5),77-(mover *.4));
game[bob[28]]->SetPosition(434+(mover *5),153);
game[bob[29]]->SetPosition(434+(mover *5),227+(mover *.4));
-
+
game[bob[30]]->SetPosition(484+(mover *5.3),73-(mover *.6));
game[bob[31]]->SetPosition(484+(mover *5.3),153);
game[bob[32]]->SetPosition(484+(mover *5.3),231+(mover *.8));
-
+
game[bob[33]]->SetPosition(537+(mover *5.4),67-(mover *.9));
game[bob[34]]->SetPosition(537+(mover *5.4),153);
game[bob[35]]->SetPosition(537+(mover *5.4),239+(mover *1.1));
-
+
game[bob[36]]->SetPosition(591+(mover *5.4),58);
game[bob[37]]->SetPosition(591+(mover *5.4),153);
game[bob[38]]->SetPosition(591+(mover *5.4),250);
-
+
}
else{
game[bob[39]]->SetPosition(-84+(mover *5.5),58);
game[bob[40]]->SetPosition(-84+(mover *5.5),153);
game[bob[41]]->SetPosition(-84+(mover *5.5),250);
-
+
game[bob[0]]->SetPosition(-29+(mover * 6.2),58+(mover * .9));
game[bob[1]]->SetPosition(-29+(mover * 6.2),153);
game[bob[2]]->SetPosition(-29+(mover * 6.2),250-(mover * 1.1));
-
+
game[bob[3]]->SetPosition(33+(mover * 5.9),67+(mover * .7));
game[bob[4]]->SetPosition(33+(mover * 5.9),153);
game[bob[5]]->SetPosition(33+(mover * 5.9),239-(mover * .7));
-
+
game[bob[6]]->SetPosition(92+(mover * 5.7),74+(mover * .4));
game[bob[7]]->SetPosition(92+(mover * 5.7),153);
game[bob[8]]->SetPosition(92+(mover * 5.7),232-(mover * .4));
-
+
game[bob[9]]->SetPosition(149+(mover * 5.1),78+(mover * .2));
game[bob[10]]->SetPosition(149+(mover * 5.1),153);
game[bob[11]]->SetPosition(149+(mover * 5.1),228-(mover * .2));
-
+
game[bob[12]]->SetPosition(200+(mover * 5.1),80+(mover * .1));
game[bob[13]]->SetPosition(200+(mover * 5.1),153);
game[bob[14]]->SetPosition(200+(mover * 5.1),226-(mover * .2));
-
+
game[bob[15]]->SetPosition(251+(mover * 5.1),81);
game[bob[16]]->SetPosition(251+(mover * 5.1),153);//
game[bob[17]]->SetPosition(251+(mover * 5.1),224-(mover * .1));
-
+
game[bob[18]]->SetPosition(302+(mover * 5.2),81);//
game[bob[19]]->SetPosition(302+(mover * 5.2),153);//
game[bob[20]]->SetPosition(302+(mover * 5.2),223);//
-
+
game[bob[21]]->SetPosition(353+(mover * 5.1),81-(mover * .1));
game[bob[22]]->SetPosition(353+(mover * 5.1),153);
game[bob[23]]->SetPosition(353+(mover * 5.1),223+(mover * .2));
-
+
game[bob[24]]->SetPosition(404+(mover * 5.3),80-(mover * .3));
game[bob[25]]->SetPosition(404+(mover * 5.3),153);
game[bob[26]]->SetPosition(404+(mover * 5.3),225+(mover * .2));
-
+
game[bob[27]]->SetPosition(457+(mover * 5.5),77-(mover * .4));
game[bob[28]]->SetPosition(457+(mover * 5.5),153);
game[bob[29]]->SetPosition(457+(mover * 5.5),227+(mover * .4));
-
+
game[bob[30]]->SetPosition(512+(mover * 6),73-(mover * .6));
game[bob[31]]->SetPosition(512+(mover * 6),153);
game[bob[32]]->SetPosition(512+(mover * 6),231+(mover * .8));
-
+
game[bob[33]]->SetPosition(572+(mover * 6),67-(mover * .9));
game[bob[34]]->SetPosition(572+(mover * 6),153);
game[bob[35]]->SetPosition(572+(mover * 6),239+(mover * 1.1));
-
+
game[bob[36]]->SetPosition(633+(mover * 6),58);
game[bob[37]]->SetPosition(633+(mover * 6),153);
game[bob[38]]->SetPosition(633+(mover * 6),250);
@@ -1608,63 +1598,63 @@ void GuiGameGrid::Update(GuiTrigger * t)
game[bob[39]]->SetSkew(-38,-110,15,-42,15,65,-38,32);
game[bob[40]]->SetSkew(-38,-75,15,-48,15,45,-38,72);
game[bob[41]]->SetSkew(-38,-52,15,-70,15,27,-38,100);
-
+
game[bob[0]]->SetSkew(-38,-110+(mover * .4),15,-42+(mover * 1.8),15,65-(mover * 2.5),-38,32-(mover * .5));
game[bob[1]]->SetSkew(-38,-75+(mover * 2.5),15,-48+(mover * 1.3),15,45-(mover * .5),-38,72-(mover * 2.2));
game[bob[2]]->SetSkew(-38,-52+(mover * 1.8),15,-70+(mover * 2.3),15,27+(mover * .3),-38,100-(mover * 4.2));
-
+
game[bob[3]]->SetSkew(-38+(mover * 1.1),-70+(mover * 1.5),15+(mover * .4),-24-(mover * .2),15+(mover * .4),40-(mover * 1),-38+(mover * 1.1),27-(mover * .5));
game[bob[4]]->SetSkew(-38+(mover * 1.1),-50+(mover * 1),15+(mover * .4),-35-(mover * .5),15+(mover * .4),40-(mover * 1),-38+(mover * 1.1),50-(mover * 1));
game[bob[5]]->SetSkew(-38+(mover * 1.1),-34+(mover * 1.4),15+(mover * .4),-47+(mover * 1.7),15+(mover * .4),24-(mover * .4),-38+(mover * 1.1),58-(mover * .8));
-
+
game[bob[6]]->SetSkew(-27+(mover * .8),-55+(mover * 1.7),19-(mover * .9),-22+(mover * .5),19-(mover * .9),30-(mover * 1.5),-27+(mover * .8),22-(mover * 1.2));
game[bob[7]]->SetSkew(-27+(mover * .8),-40+(mover * 1),19-(mover * .9),-30+(mover * 1),19-(mover * .9),30-(mover * 1.8),-27+(mover * .8),40-(mover * 1));
game[bob[8]]->SetSkew(-27+(mover * .8),-20+(mover * .5),19-(mover * .9),-30+(mover * 1),19-(mover * .9),20-(mover * 1),-27+(mover * .8),50-(mover * 2.6));
-
+
game[bob[9]]->SetSkew(-19+(mover * .9),-28+(mover * .8),0+(mover * .3),-17-(mover * .4),0+(mover * .3),15-(mover * 1),-19+(mover * .9),10);
game[bob[10]]->SetSkew(-19+(mover * .9),-30+(mover * 1),0+(mover * .3),-20-(mover * .2),0+(mover * .3),12+(mover * .6),-19+(mover * .9),30-(mover * 1));
game[bob[11]]->SetSkew(-19+(mover * .9),-15+(mover * .5),0+(mover * .3),-20+(mover * 1),0+(mover * .3),10,-19+(mover * .9),24-(mover * 1.4));
-
+
game[bob[12]]->SetSkew(-10,-20+(mover * .5),3,-13+(mover * .1),3,14-(mover * .1),-10,10+(mover * .3));
game[bob[13]]->SetSkew(-10,-20+(mover * .3),3,-18+(mover * .8),3,18-(mover * .8),-10,20-(mover * .3));
game[bob[14]]->SetSkew(-10,-10,3,-10-(mover * .5),3,0+(mover * 1),-10,10);
-
+
game[bob[15]]->SetSkew(-10,-15+(mover * .5),3,-12+(mover * .2),3,13+(mover * .1),-10,13+(mover * .1));
game[bob[16]]->SetSkew(-10,-17+(mover * .7),3,-10,3,10,-10,17-(mover * .7));
game[bob[17]]->SetSkew(-10,-10,3,-15+(mover * .5),3,10,-10,10);
-
+
game[bob[18]]->SetSkew(-10,-10,3+(mover * .1),-10-(mover * 1),3,14-(mover * .4),-10-(mover * .4),14-(mover * .4));
game[bob[19]]->SetSkew(-10,-10,3+(mover * .1),-10-(mover * .7),3,10+(mover * .7),-10-(mover * .4),10);//middle
game[bob[20]]->SetSkew(-10,-10,3+(mover * .1),-10,3,10,-10-(mover * .4),10);
-
+
game[bob[21]]->SetSkew(-14+(mover * .4),-10-(mover * .3),4-(mover * .1),-20,3,10+(mover * .4),-14,10);
game[bob[22]]->SetSkew(-14+(mover * .4),-10-(mover * .8),4-(mover * .1),-17-(mover * .3),3,17+(mover * .3),-14,10+(mover * .8));
game[bob[23]]->SetSkew(-14+(mover * .4),-10,4-(mover * .1),-10,3,10+(mover * 1),-14,10-(mover * .5));
-
+
game[bob[24]]->SetSkew(-10-(mover * .9),-13,3-(mover * .3),-20,3-(mover * .3),14,-10-(mover * .9),10);
game[bob[25]]->SetSkew(-10-(mover * .9),-18,3-(mover * .3),-20,3-(mover * .3),20,-10-(mover * .9),18);
game[bob[26]]->SetSkew(-10-(mover * .9),-10,3-(mover * .3),-10,3-(mover * .3),20,-10-(mover * .9),5);
-
+
game[bob[27]]->SetSkew(-19-(mover * .8),-17,0+(mover * 1.9),-28,0+(mover * 1.9),10+(mover * 1.2),-19-(mover * .8),15+(mover * 1.5));
game[bob[28]]->SetSkew(-19-(mover * .8),-20,0+(mover * 1.9),-30,0+(mover * 1.9),30+(mover * 1),-19-(mover * .8),12+(mover * 1.8));
game[bob[29]]->SetSkew(-19-(mover * .8),-20,0+(mover * 1.9),-15,0+(mover * 1.9),30+(mover * 1.5),-19-(mover * .8),10+(mover * 1));
-
+
game[bob[30]]->SetSkew(-27-(mover * 1.1),-22-(mover * .2),19-(mover * .4),-55-(mover * 1.5),19-(mover * .4),22+(mover * .5),-27-(mover * 1.1),30+(mover * 1));
game[bob[31]]->SetSkew(-27-(mover * 1.1),-30-(mover * .5),19-(mover * .4),-40-(mover * 1),19-(mover * .4),40+(mover * 1),-27-(mover * 1.1),30+(mover * 1));
game[bob[32]]->SetSkew(-27-(mover * 1.1),-30-(mover * 1.7),19-(mover * .4),-20-(mover * 1.4),19-(mover * .4),55+(mover * .3),-27-(mover * 1.1),20+(mover * .4));
-
+
game[bob[33]]->SetSkew(-38,-24-(mover * 1.8),15,-70-(mover * 4),15,27+(mover * .5),-38,40+(mover * .2));
game[bob[34]]->SetSkew(-38,-35-(mover * 1.3),15,-50-(mover * 2.5),15,50+(mover * 2),-38,40+(mover * .5));
game[bob[35]]->SetSkew(-38,-47-(mover * 2.7),15,-34-(mover * 1.8),15,58+(mover * 4.2),-38,24+(mover * .3));
-
+
game[bob[36]]->SetSkew(-38,-42+(mover * 1.8),15,-110,15,32,-38,60);
game[bob[37]]->SetSkew(-38,-48+(mover * 1.3),15,-75,15,70,-38,45);
game[bob[38]]->SetSkew(-38,-70+(mover * 2.3),15,-52+(mover * 1.8),15,100,-38,27);
-
+
}
mover++;
goRight--;
-
+
}
else {goRight=0;mover=0;
listOffset = (listOffset-rows < 0) ? gameCnt-rows : listOffset-rows;
@@ -1672,15 +1662,15 @@ void GuiGameGrid::Update(GuiTrigger * t)
for(int i=0; iSetText(debugbuffer);
-
+
}
}
}
-
-
+
+
int ttoffset=0;
if (rows==1)ttoffset=70;
if (rows==2)ttoffset=35;
@@ -1695,30 +1685,30 @@ void GuiGameGrid::Update(GuiTrigger * t)
//depending on where on the screen the game is
for(int i=0; i < (pagesize/3); i++) {
game[i]->RemoveToolTip();
-
+
if (game[bob[i]]->GetState()==STATE_SELECTED)
{
-
+
game[bob[i]]->SetToolTip(titleTT,ttoffset,0,0,5);
}
- }
+ }
for(int i=(pagesize/3); i < (2* pagesize/3); i++) {
game[i]->RemoveToolTip();
-
+
if (game[bob[i]]->GetState()==STATE_SELECTED)
{
game[bob[i]]->SetToolTip(titleTT,0,0,2,5);
isover=true;
}
- }
+ }
for(int i=(2* pagesize/3); i < pagesize; i++) {
game[i]->RemoveToolTip();
-
+
if (game[bob[i]]->GetState()==STATE_SELECTED)
{
game[bob[i]]->SetToolTip(titleTT,-ttoffset,0,1,5);
}
- }
+ }
snprintf(titlebuffer, sizeof(titlebuffer), "%s",get_title(&gameList[this->GetSelectedOption()]));
if (selected!=selectedOld){
drawTTs=1;
@@ -1730,8 +1720,8 @@ void GuiGameGrid::Update(GuiTrigger * t)
selectedOld=selected;
if (wait1==0){wait++;if(wait>500)wait1=1;}//500 *2 is the time that the tooltips stay on screen
if ((wait1==1)&&(wait>-1)){wait--;}
-
-
+
+
//snprintf(debugbuffer, sizeof(debugbuffer), "faggot %i %s", GetOverImage(t),get_title(&gameList[this->GetSelectedOption()]));
//debugTxt->SetText(debugbuffer);
if ((btnRowUp->GetState() == STATE_CLICKED)&&(c>0)) {
@@ -1781,7 +1771,7 @@ void GuiGameGrid::Reload(struct discHdr * l, int count)
drawTTs=0;
//speed = SHIFT_SPEED;
char imgPath[100];
-
+
if (count<42)rows=2;
if (count<16)rows=1;
Settings.gridRows = rows;
@@ -1792,7 +1782,7 @@ void GuiGameGrid::Reload(struct discHdr * l, int count)
if (rows==1)pagesize = 6;
else if (rows==2)pagesize = 16;
else if (rows==3)pagesize = 42;
-
+
game = new GuiButton * [pagesize];
//bob = new int[pagesize];
coverImg = new GuiImage * [gameCnt];
@@ -1801,7 +1791,7 @@ void GuiGameGrid::Reload(struct discHdr * l, int count)
for(int i=0; iSetWidescreen(CFG.widescreen);
if (rows==2)coverImg[i]->SetScale(.6);//these are the numbers for 2 rows
else if (rows==3)coverImg[i]->SetScale(.26);//these are the numbers for 3 rows
-
+
}
-
+
for(int i=0; i < pagesize; i++) {
game[i] = new GuiButton(160,224);//for 1 row
if (rows==2)game[i]->SetSize(75,133);//these are the numbers for 2 rows
@@ -1848,11 +1838,11 @@ void GuiGameGrid::Reload(struct discHdr * l, int count)
game[i]->SetSoundClick(btnSoundClick);
game[i]->SetClickable(true);
}
- for (int i=gameCnt-1;iSetVisible(false);
game[i]->SetClickable(false);
game[i]->RemoveSoundOver();}
-
+
if (rows==1)
{
if(CFG.widescreen){
@@ -1862,14 +1852,14 @@ void GuiGameGrid::Reload(struct discHdr * l, int count)
game[bob[3]]->SetPosition(390,74);
game[bob[4]]->SetPosition(550,74);
}
- else{
+ else{
game[bob[0]]->SetPosition(-130,74);
game[bob[1]]->SetPosition(60,74);
game[bob[2]]->SetPosition(239,74);
game[bob[3]]->SetPosition(420,74);
game[bob[4]]->SetPosition(612,74);
}
-
+
game[bob[0]]->SetSkew(-10,-44,10,-26,10,26,-10,44);
game[bob[1]]->SetSkew(-6,-22,6,-14,6,14,-6,22);
game[bob[2]]->SetSkew(0,-11,0,-11,0,11,0,11);
@@ -1933,51 +1923,51 @@ void GuiGameGrid::Reload(struct discHdr * l, int count)
game[bob[0]]->SetPosition(13,58);
game[bob[1]]->SetPosition(13,153);
game[bob[2]]->SetPosition(13,250);
-
+
game[bob[3]]->SetPosition(68,67);
game[bob[4]]->SetPosition(68,153);
game[bob[5]]->SetPosition(68,239);
-
+
game[bob[6]]->SetPosition(120,74);
game[bob[7]]->SetPosition(120,153);
game[bob[8]]->SetPosition(120,232);
-
+
game[bob[9]]->SetPosition(170,78);
game[bob[10]]->SetPosition(170,153);
game[bob[11]]->SetPosition(170,228);
-
+
game[bob[12]]->SetPosition(214,80);
game[bob[13]]->SetPosition(214,153);
game[bob[14]]->SetPosition(214,226);
-
+
game[bob[15]]->SetPosition(258,81);
game[bob[16]]->SetPosition(258,153);
game[bob[17]]->SetPosition(258,224);
-
+
game[bob[18]]->SetPosition(302,81);
game[bob[19]]->SetPosition(302,153);
game[bob[20]]->SetPosition(302,223);
-
+
game[bob[21]]->SetPosition(346,81);
game[bob[22]]->SetPosition(346,153);
game[bob[23]]->SetPosition(346,223);
-
+
game[bob[24]]->SetPosition(390,80);
game[bob[25]]->SetPosition(390,153);
game[bob[26]]->SetPosition(390,225);
-
+
game[bob[27]]->SetPosition(434,77);
game[bob[28]]->SetPosition(434,153);
game[bob[29]]->SetPosition(434,227);
-
+
game[bob[30]]->SetPosition(484,73);
game[bob[31]]->SetPosition(484,153);
game[bob[32]]->SetPosition(484,231);
-
+
game[bob[33]]->SetPosition(537,67);
game[bob[34]]->SetPosition(537,153);
game[bob[35]]->SetPosition(537,239);
-
+
game[bob[36]]->SetPosition(591,58);
game[bob[37]]->SetPosition(591,153);
game[bob[38]]->SetPosition(591,250);
@@ -1986,109 +1976,109 @@ void GuiGameGrid::Reload(struct discHdr * l, int count)
game[bob[0]]->SetPosition(-29,58);
game[bob[1]]->SetPosition(-29,153);
game[bob[2]]->SetPosition(-29,250);
-
+
game[bob[3]]->SetPosition(33,67);
game[bob[4]]->SetPosition(33,153);
game[bob[5]]->SetPosition(33,239);
-
+
game[bob[6]]->SetPosition(92,74);
game[bob[7]]->SetPosition(92,153);
game[bob[8]]->SetPosition(92,232);
-
+
game[bob[9]]->SetPosition(149,78);
game[bob[10]]->SetPosition(149,153);
game[bob[11]]->SetPosition(149,228);
-
+
game[bob[12]]->SetPosition(200,80);
game[bob[13]]->SetPosition(200,153);
game[bob[14]]->SetPosition(200,226);
-
+
game[bob[15]]->SetPosition(251,81);
game[bob[16]]->SetPosition(251,153);//
game[bob[17]]->SetPosition(251,224);
-
+
game[bob[18]]->SetPosition(302,81);//
game[bob[19]]->SetPosition(302,153);//
game[bob[20]]->SetPosition(302,223);//
-
+
game[bob[21]]->SetPosition(353,81);
game[bob[22]]->SetPosition(353,153);
game[bob[23]]->SetPosition(353,223);
-
+
game[bob[24]]->SetPosition(404,80);
game[bob[25]]->SetPosition(404,153);
game[bob[26]]->SetPosition(404,225);
-
+
game[bob[27]]->SetPosition(457,77);
game[bob[28]]->SetPosition(457,153);
game[bob[29]]->SetPosition(457,227);
-
+
game[bob[30]]->SetPosition(512,73);
game[bob[31]]->SetPosition(512,153);
game[bob[32]]->SetPosition(512,231);
-
+
game[bob[33]]->SetPosition(572,67);
game[bob[34]]->SetPosition(572,153);
game[bob[35]]->SetPosition(572,239);
-
+
game[bob[36]]->SetPosition(633,58);
game[bob[37]]->SetPosition(633,153);
game[bob[38]]->SetPosition(633,250);
}
-
+
game[bob[0]]->SetSkew(-38,-110,15,-42,15,65,-38,32);
game[bob[1]]->SetSkew(-38,-75,15,-48,15,45,-38,72);
game[bob[2]]->SetSkew(-38,-52,15,-70,15,27,-38,100);
-
+
game[bob[3]]->SetSkew(-38,-70,15,-24,15,40,-38,27);
game[bob[4]]->SetSkew(-38,-50,15,-35,15,40,-38,50);
game[bob[5]]->SetSkew(-38,-34,15,-47,15,24,-38,58);
-
+
game[bob[6]]->SetSkew(-27,-55,19,-22,19,30,-27,22);
game[bob[7]]->SetSkew(-27,-40,19,-30,19,30,-27,40);
game[bob[8]]->SetSkew(-27,-20,19,-30,19,20,-27,50);
-
+
game[bob[9]]->SetSkew(-19,-28,0,-17,0,15,-19,10);
game[bob[10]]->SetSkew(-19,-30,0,-20,0,12,-19,30);
game[bob[11]]->SetSkew(-19,-15,0,-20,0,10,-19,24);
-
+
game[bob[12]]->SetSkew(-10,-20,3,-13,3,14,-10,10);
game[bob[13]]->SetSkew(-10,-20,3,-18,3,18,-10,20);
game[bob[14]]->SetSkew(-10,-10,3,-10,3,0,-10,10);
-
+
game[bob[15]]->SetSkew(-10,-15,3,-12,3,13,-10,13);
game[bob[16]]->SetSkew(-10,-17,3,-10,3,10,-10,17);
game[bob[17]]->SetSkew(-10,-10,3,-15,3,10,-10,10);
-
+
game[bob[18]]->SetSkew(-10,-10,3,-10,3,14,-10,14);
game[bob[19]]->SetSkew(-10,-10,3,-10,3,10,-10,10);//middle
game[bob[20]]->SetSkew(-10,-10,3,-10,3,10,-10,10);
-
+
game[bob[21]]->SetSkew(-14,-10,4,-20,3,10,-14,10);
game[bob[22]]->SetSkew(-14,-10,4,-17,3,17,-14,10);
game[bob[23]]->SetSkew(-14,-10,4,-10,3,10,-14,10);
-
+
game[bob[24]]->SetSkew(-10,-13,3,-20,3,14,-10,10);
game[bob[25]]->SetSkew(-10,-18,3,-20,3,20,-10,18);
game[bob[26]]->SetSkew(-10,-10,3,-10,3,20,-10,5);
-
+
game[bob[27]]->SetSkew(-19,-17,0,-28,0,10,-19,15);
game[bob[28]]->SetSkew(-19,-20,0,-30,0,30,-19,12);
game[bob[29]]->SetSkew(-19,-20,0,-15,0,30,-19,10);
-
+
game[bob[30]]->SetSkew(-27,-22,19,-55,19,22,-27,30);
game[bob[31]]->SetSkew(-27,-30,19,-40,19,40,-27,30);
game[bob[32]]->SetSkew(-27,-30,19,-20,19,55,-27,20);
-
+
game[bob[33]]->SetSkew(-38,-24,15,-70,15,27,-38,40);
game[bob[34]]->SetSkew(-38,-35,15,-50,15,50,-38,40);
game[bob[35]]->SetSkew(-38,-47,15,-34,15,58,-38,24);
-
+
game[bob[36]]->SetSkew(-38,-42,15,-110,15,32,-38,60);
game[bob[37]]->SetSkew(-38,-48,15,-75,15,70,-38,45);
game[bob[38]]->SetSkew(-38,-70,15,-52,15,100,-38,27);
}
-
-
+
+
}
diff --git a/source/libwiigui/gui_image.cpp b/source/libwiigui/gui_image.cpp
index 1811ab61..9208f467 100644
--- a/source/libwiigui/gui_image.cpp
+++ b/source/libwiigui/gui_image.cpp
@@ -41,6 +41,7 @@ GuiImage::GuiImage(GuiImageData * img)
tile = -1;
stripe = 0;
widescreen = 0;
+ parentangle = true;
xx1 = 0;
yy1 = 0;
xx2 = 0;
@@ -61,6 +62,7 @@ GuiImage::GuiImage(u8 * img, int w, int h)
tile = -1;
stripe = 0;
widescreen = 0;
+ parentangle = true;
xx1 = 0;
yy1 = 0;
xx2 = 0;
@@ -81,6 +83,7 @@ GuiImage::GuiImage(int w, int h, GXColor c)
tile = -1;
stripe = 0;
widescreen = 0;
+ parentangle = true;
xx1 = 0;
yy1 = 0;
xx2 = 0;
@@ -126,6 +129,7 @@ GuiImage::GuiImage(GuiImage &srcimage)
tile = -1;
stripe = 0;
widescreen = 0;
+ parentangle = true;
xx1 = 0;
yy1 = 0;
xx2 = 0;
@@ -155,6 +159,7 @@ GuiImage::GuiImage(GuiImage *srcimage)
tile = -1;
stripe = 0;
widescreen = 0;
+ parentangle = true;
xx1 = 0;
yy1 = 0;
xx2 = 0;
@@ -184,6 +189,7 @@ GuiImage &GuiImage::operator=(GuiImage &srcimage)
tile = -1;
stripe = 0;
widescreen = 0;
+ parentangle = true;
xx1 = 0;
yy1 = 0;
xx2 = 0;
@@ -260,6 +266,11 @@ void GuiImage::SetWidescreen(bool w)
LOCK(this);
widescreen = w;
}
+void GuiImage::SetParentAngle(bool a)
+{
+ LOCK(this);
+ parentangle = a;
+}
GXColor GuiImage::GetPixel(int x, int y)
{
@@ -402,15 +413,15 @@ void GuiImage::Draw()
float currAngleDyn = this->GetAngleDyn();
- if(currAngleDyn)
- imageangle = currAngleDyn;
+ if(currAngleDyn && parentangle)
+ imageangle = currAngleDyn;
if(tile > 0)
{
for(int i=0; iGetTop(), 0, width, height, image, imageangle, widescreen ? currScale*0.80 : currScale, currScale, this->GetAlpha(), xx1,yy1,xx2,yy2,xx3,yy3,xx4,yy4);
+ Menu_DrawImg(currLeft+width*i, this->GetTop(), zoffset, width, height, image, imageangle, widescreen ? currScale*0.80 : currScale, currScale, this->GetAlpha(), xx1,yy1,xx2,yy2,xx3,yy3,xx4,yy4);
}
else
{
@@ -418,7 +429,7 @@ void GuiImage::Draw()
if(scale != 1)
currLeft = currLeft - width/2 + (width*scale)/2;
- Menu_DrawImg(currLeft, this->GetTop(), 0, width, height, image, imageangle, widescreen ? currScale*0.80 : currScale, currScale, this->GetAlpha(), xx1,yy1,xx2,yy2,xx3,yy3,xx4,yy4);
+ Menu_DrawImg(currLeft, this->GetTop(), zoffset, width, height, image, imageangle, widescreen ? currScale*0.80 : currScale, currScale, this->GetAlpha(), xx1,yy1,xx2,yy2,xx3,yy3,xx4,yy4);
}
if(stripe > 0)
diff --git a/source/libwiigui/gui_tooltip.cpp b/source/libwiigui/gui_tooltip.cpp
index c504bd77..7fe37df6 100644
--- a/source/libwiigui/gui_tooltip.cpp
+++ b/source/libwiigui/gui_tooltip.cpp
@@ -16,40 +16,40 @@ static GuiImageData tooltipRight(tooltip_right_png);
/**
- * Constructor for the GuiTooltip class.
- */
+ * Constructor for the GuiTooltip class.
+ */
GuiTooltip::GuiTooltip(const char *t)
:
leftImage(&tooltipLeft), tileImage(&tooltipTile), rightImage(&tooltipRight)
{
text = NULL;
height = leftImage.GetHeight();
- leftImage.SetParent(this);
- tileImage.SetParent(this);
- rightImage.SetParent(this);
+ leftImage.SetParent(this);
+ tileImage.SetParent(this);
+ rightImage.SetParent(this);
+ leftImage.SetParentAngle(false);
+ tileImage.SetParentAngle(false);
+ rightImage.SetParentAngle(false);
SetText(t);
}
/*
* Destructor for the GuiTooltip class.
- */
+ */
GuiTooltip::~GuiTooltip()
{
- if(text) delete text;
+ if(text) delete text;
}
float GuiTooltip::GetScale()
{
float s = scale * scaleDyn;
-// if(parentElement)
-// s *= parentElement->GetScale();
-
return s;
}
-/* !Sets the text of the GuiTooltip element
- * !\param t Text
+/* !Sets the text of the GuiTooltip element
+ * !\param t Text
*/
void GuiTooltip::SetText(const char * t)
{
@@ -62,13 +62,13 @@ void GuiTooltip::SetText(const char * t)
int tile_cnt = 0;
if(t && (text = new GuiText(t, 22, (GXColor){0, 0, 0, 255})))
{
- text->SetParent(this);
+ text->SetParent(this);
tile_cnt = (text->GetTextWidth()-12) /tileImage.GetWidth();
if(tile_cnt < 0) tile_cnt = 0;
}
- tileImage.SetPosition(leftImage.GetWidth(), 0);
+ tileImage.SetPosition(leftImage.GetWidth(), 0);
tileImage.SetTile(tile_cnt);
- rightImage.SetPosition(leftImage.GetWidth() + tile_cnt * tileImage.GetWidth(), 0);
+ rightImage.SetPosition(leftImage.GetWidth() + tile_cnt * tileImage.GetWidth(), 0);
width = leftImage.GetWidth() + tile_cnt * tileImage.GetWidth() + rightImage.GetWidth();
}
@@ -79,11 +79,11 @@ void GuiTooltip::SetWidescreen(bool){}
void GuiTooltip::Draw()
{
LOCK(this);
- if(!this->IsVisible()) return;
+ if(!this->IsVisible()) return;
- leftImage.Draw();
- tileImage.Draw();
- rightImage.Draw();
+ leftImage.Draw();
+ tileImage.Draw();
+ rightImage.Draw();
if(text) text->Draw();
this->UpdateEffects();
diff --git a/source/menu.cpp b/source/menu.cpp
index 76e562a4..30be709f 100644
--- a/source/menu.cpp
+++ b/source/menu.cpp
@@ -669,10 +669,6 @@ int MenuDiscList() {
ResumeGui();
-
-
-
-
while (menu == MENU_NONE) {
if (idiotFlag==1) {
@@ -825,9 +821,6 @@ int MenuDiscList() {
}
}
-
-
-
else if (sdcardBtn.GetState() == STATE_CLICKED) {
SDCard_deInit();
SDCard_Init();