-fixed game boots if you just press a and the pointer is off screen

(issue 125)
-set the button type to s16 (now its correct :P)
-corrected some possible bugs with the button gui management
This commit is contained in:
fix94.1 2012-09-13 14:54:17 +00:00
parent d7e5460f31
commit 46b386112e
26 changed files with 553 additions and 540 deletions

View File

@ -29,7 +29,7 @@ bool CButtonsMgr::init(CVideo &vid)
return true;
}
u16 CButtonsMgr::addButton(SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color,
s16 CButtonsMgr::addButton(SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color,
const SButtonTextureSet &texSet, const SmartGuiSound &clickSound, const SmartGuiSound &hoverSound)
{
CButtonsMgr::SButton *b = new CButtonsMgr::SButton;
@ -62,9 +62,10 @@ u16 CButtonsMgr::addButton(SFont font, const wstringEx &text, int x, int y, u32
return m_elts.size() > sz ? m_elts.size() - 1 : -2;
}
void CButtonsMgr::reset(u16 id, bool instant)
void CButtonsMgr::reset(s16 id, bool instant)
{
if (id < m_elts.size())
if (id == -1) return;
if (id < (s32)m_elts.size())
{
CButtonsMgr::SElement &b = *m_elts[id];
b.x -= b.moveByX;
@ -81,9 +82,10 @@ void CButtonsMgr::reset(u16 id, bool instant)
}
}
void CButtonsMgr::moveBy(u16 id, int x, int y, bool instant)
void CButtonsMgr::moveBy(s16 id, int x, int y, bool instant)
{
if (id < m_elts.size())
if (id == -1) return;
if (id < (s32)m_elts.size())
{
CButtonsMgr::SElement &b = *m_elts[id];
b.moveByX += x;
@ -100,9 +102,10 @@ void CButtonsMgr::moveBy(u16 id, int x, int y, bool instant)
}
}
void CButtonsMgr::getDimensions(u16 id, int &x, int &y, u32 &width, u32 &height)
void CButtonsMgr::getDimensions(s16 id, int &x, int &y, u32 &width, u32 &height)
{
if (id < m_elts.size())
if (id == -1) return;
if (id < (s32)m_elts.size())
{
CButtonsMgr::SElement &b = *m_elts[id];
x = b.targetPos.x;
@ -119,9 +122,10 @@ void CButtonsMgr::getDimensions(u16 id, int &x, int &y, u32 &width, u32 &height)
}
}
void CButtonsMgr::hide(u16 id, int dx, int dy, float scaleX, float scaleY, bool instant)
void CButtonsMgr::hide(s16 id, int dx, int dy, float scaleX, float scaleY, bool instant)
{
if (id < m_elts.size())
if (id == -1) return;
if (id < (s32)m_elts.size())
{
CButtonsMgr::SElement &b = *m_elts[id];
b.hideParam.dx = dx;
@ -146,9 +150,10 @@ void CButtonsMgr::hide(u16 id, int dx, int dy, float scaleX, float scaleY, bool
}
}
void CButtonsMgr::hide(u16 id, bool instant)
void CButtonsMgr::hide(s16 id, bool instant)
{
if (id < m_elts.size())
if (id == -1) return;
if (id < (s32)m_elts.size())
{
CButtonsMgr::SElement &b = *m_elts[id];
hide(id, b.hideParam.dx, b.hideParam.dy, b.hideParam.scaleX, b.hideParam.scaleY, instant);
@ -173,9 +178,10 @@ void CButtonsMgr::setSoundVolume(int vol)
m_soundVolume = min(max(0, vol), 0xFF);
}
void CButtonsMgr::show(u16 id, bool instant)
void CButtonsMgr::show(s16 id, bool instant)
{
if (id < m_elts.size())
if (id == -1) return;
if (id < (s32)m_elts.size())
{
CButtonsMgr::SElement &b = *m_elts[id];
b.visible = true;
@ -205,12 +211,13 @@ void CButtonsMgr::mouse(int chan, int x, int y)
if (m_elts.empty()) return;
float w, h;
u32 s = m_selected[chan];
u16 s = 0;
if (m_selected[chan] < m_elts.size())
if(m_selected[chan] > -1 && m_selected[chan] < (s32)m_elts.size())
{
m_elts[m_selected[chan]]->targetScaleX = 1.f;
m_elts[m_selected[chan]]->targetScaleY = 1.f;
s = (u16)m_selected[chan];
}
m_selected[chan] = -1;
for (int i = (int)m_elts.size() - 1; i >= 0; --i)
@ -245,13 +252,13 @@ void CButtonsMgr::mouse(int chan, int x, int y)
}
}
bool CButtonsMgr::selected(u16 button)
bool CButtonsMgr::selected(s16 button)
{
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
{
if(m_selected[chan] == button)
{
if(m_selected[chan] != (u32)-1)
if(m_selected[chan] != -1)
if(!m_noclick)
click(m_selected[chan]);
return true;
@ -265,7 +272,7 @@ void CButtonsMgr::up(void)
if (m_elts.empty()) return;
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
{
if (m_selected[chan] < m_elts.size())
if (m_selected[chan] < (s32)m_elts.size())
{
m_elts[m_selected[chan]]->targetScaleX = 1.f;
m_elts[m_selected[chan]]->targetScaleY = 1.f;
@ -292,7 +299,7 @@ void CButtonsMgr::down(void)
if (m_elts.empty()) return;
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
{
if (m_selected[chan] < m_elts.size())
if (m_selected[chan] < (s32)m_elts.size())
{
m_elts[m_selected[chan]]->targetScaleX = 1.f;
m_elts[m_selected[chan]]->targetScaleY = 1.f;
@ -324,15 +331,16 @@ void CButtonsMgr::noClick(bool noclick)
m_noclick = noclick;
}
void CButtonsMgr::click(u16 id)
void CButtonsMgr::click(s16 id)
{
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
{
WPAD_Rumble(chan, 0);
PAD_ControlMotor(chan, 0);
if (id == (u16)-1) id = m_selected[chan];
if (id < m_elts.size() && m_elts[id]->t == CButtonsMgr::GUIELT_BUTTON)
if (id == -1) id = m_selected[chan];
if (id == -1) continue;
if (id < (s32)m_elts.size() && m_elts[id]->t == CButtonsMgr::GUIELT_BUTTON)
{
CButtonsMgr::SButton &b = *((CButtonsMgr::SButton *)m_elts[id].get());
b.click = 1.f;
@ -384,7 +392,7 @@ void CButtonsMgr::tick(void)
}
u16 CButtonsMgr::addLabel(SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, u16 style, const STexture &bg)
s16 CButtonsMgr::addLabel(SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, s16 style, const STexture &bg)
{
CButtonsMgr::SLabel *b = new CButtonsMgr::SLabel;
SmartPtr<CButtonsMgr::SElement> elt(b);
@ -409,13 +417,13 @@ u16 CButtonsMgr::addLabel(SFont font, const wstringEx &text, int x, int y, u32 w
b->moveByX = 0;
b->moveByY = 0;
u16 sz = m_elts.size();
u32 sz = m_elts.size();
m_elts.push_back(elt);
return m_elts.size() > sz ? m_elts.size() - 1 : -2;
}
u16 CButtonsMgr::addProgressBar(int x, int y, u32 width, u32 height, SButtonTextureSet &texSet)
s16 CButtonsMgr::addProgressBar(int x, int y, u32 width, u32 height, SButtonTextureSet &texSet)
{
CButtonsMgr::SProgressBar *b = new CButtonsMgr::SProgressBar;
SmartPtr<CButtonsMgr::SElement> elt(b);
@ -437,13 +445,13 @@ u16 CButtonsMgr::addProgressBar(int x, int y, u32 width, u32 height, SButtonText
b->moveByX = 0;
b->moveByY = 0;
u16 sz = m_elts.size();
u32 sz = m_elts.size();
m_elts.push_back(elt);
return m_elts.size() > sz ? m_elts.size() - 1 : -2;
}
u16 CButtonsMgr::addPicButton(STexture &texNormal, STexture &texSelected, int x, int y, u32 width, u32 height, const SmartGuiSound &clickSound, const SmartGuiSound &hoverSound)
s16 CButtonsMgr::addPicButton(STexture &texNormal, STexture &texSelected, int x, int y, u32 width, u32 height, const SmartGuiSound &clickSound, const SmartGuiSound &hoverSound)
{
SButtonTextureSet texSet;
@ -452,7 +460,7 @@ u16 CButtonsMgr::addPicButton(STexture &texNormal, STexture &texSelected, int x,
return addButton(SFont(), wstringEx(), x, y, width, height, CColor(), texSet, clickSound, hoverSound);
}
u16 CButtonsMgr::addPicButton(const u8 *pngNormal, const u8 *pngSelected, int x, int y, u32 width, u32 height, const SmartGuiSound &clickSound, const SmartGuiSound &hoverSound)
s16 CButtonsMgr::addPicButton(const u8 *pngNormal, const u8 *pngSelected, int x, int y, u32 width, u32 height, const SmartGuiSound &clickSound, const SmartGuiSound &hoverSound)
{
SButtonTextureSet texSet;
@ -461,9 +469,10 @@ u16 CButtonsMgr::addPicButton(const u8 *pngNormal, const u8 *pngSelected, int x,
return addButton(SFont(), wstringEx(), x, y, width, height, CColor(), texSet, clickSound, hoverSound);
}
void CButtonsMgr::setText(u16 id, const wstringEx &text, bool unwrap)
void CButtonsMgr::setText(s16 id, const wstringEx &text, bool unwrap)
{
if (id < m_elts.size())
if (id == -1) return;
if (id < (s32)m_elts.size())
{
CButtonsMgr::SLabel *lbl;
switch (m_elts[id]->t)
@ -483,9 +492,10 @@ void CButtonsMgr::setText(u16 id, const wstringEx &text, bool unwrap)
}
}
void CButtonsMgr::setText(u16 id, const wstringEx &text, u32 startline,bool unwrap)
void CButtonsMgr::setText(s16 id, const wstringEx &text, u32 startline,bool unwrap)
{
if (id < m_elts.size())
if (id == -1) return;
if (id < (s32)m_elts.size())
{
CButtonsMgr::SLabel *lbl;
switch (m_elts[id]->t)
@ -505,14 +515,15 @@ void CButtonsMgr::setText(u16 id, const wstringEx &text, u32 startline,bool unwr
}
}
void CButtonsMgr::setBtnTexture(u16 id, STexture &texNormal, STexture &texSelected)
void CButtonsMgr::setBtnTexture(s16 id, STexture &texNormal, STexture &texSelected)
{
if (id == -1) return;
SButtonTextureSet texSet;
texSet.center = texNormal;
texSet.centerSel = texSelected;
if (id < m_elts.size())
if (id < (s32)m_elts.size())
{
CButtonsMgr::SButton *b;
b = (CButtonsMgr::SButton *)m_elts[id].get();
@ -520,9 +531,10 @@ void CButtonsMgr::setBtnTexture(u16 id, STexture &texNormal, STexture &texSelect
}
}
void CButtonsMgr::setTexture(u16 id, STexture &bg)
void CButtonsMgr::setTexture(s16 id, STexture &bg)
{
if (id < m_elts.size())
if (id == -1) return;
if (id < (s32)m_elts.size())
{
CButtonsMgr::SLabel *lbl;
switch (m_elts[id]->t)
@ -539,9 +551,10 @@ void CButtonsMgr::setTexture(u16 id, STexture &bg)
}
}
void CButtonsMgr::setTexture(u16 id, STexture &bg, int width, int height)
void CButtonsMgr::setTexture(s16 id, STexture &bg, int width, int height)
{
if (id < m_elts.size())
if (id == -1) return;
if (id < (s32)m_elts.size())
{
CButtonsMgr::SLabel *lbl;
switch (m_elts[id]->t)
@ -560,7 +573,7 @@ void CButtonsMgr::setTexture(u16 id, STexture &bg, int width, int height)
}
}
void CButtonsMgr::setProgress(u16 id, float f, bool instant)
void CButtonsMgr::setProgress(s16 id, float f, bool instant)
{
if (m_elts[id]->t == CButtonsMgr::GUIELT_PROGRESS)
{
@ -896,8 +909,8 @@ void CButtonsMgr::draw(void)
GX_SetAlphaUpdate(GX_TRUE);
GX_SetCullMode(GX_CULL_NONE);
GX_SetZMode(GX_DISABLE, GX_LEQUAL, GX_TRUE);
for (u32 i = 0; i < m_elts.size(); ++i)
for(s32 i = 0; i < (s32)m_elts.size(); ++i)
{
switch (m_elts[i]->t)
{

View File

@ -30,26 +30,26 @@ public:
bool init(CVideo &vid);
void setRumble(bool enabled) { m_rumbleEnabled = enabled; }
void reserve(u32 capacity) { m_elts.reserve(capacity); }
u16 addButton(SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color,
s16 addButton(SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color,
const SButtonTextureSet &texSet, const SmartGuiSound &clickSound = _noSound, const SmartGuiSound &hoverSound = _noSound);
u16 addLabel(SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, u16 style, const STexture &bg = _noTexture);
u16 addPicButton(const u8 *pngNormal, const u8 *pngSelected, int x, int y, u32 width, u32 height,
s16 addLabel(SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, s16 style, const STexture &bg = _noTexture);
s16 addPicButton(const u8 *pngNormal, const u8 *pngSelected, int x, int y, u32 width, u32 height,
const SmartGuiSound &clickSound = _noSound, const SmartGuiSound &hoverSound = _noSound);
u16 addPicButton(STexture &texNormal, STexture &texSelected, int x, int y, u32 width, u32 height,
s16 addPicButton(STexture &texNormal, STexture &texSelected, int x, int y, u32 width, u32 height,
const SmartGuiSound &clickSound = _noSound, const SmartGuiSound &hoverSound = _noSound);
u16 addProgressBar(int x, int y, u32 width, u32 height, SButtonTextureSet &texSet);
void setText(u16 id, const wstringEx &text, bool unwrap = false);
void setText(u16 id, const wstringEx &text, u32 startline, bool unwrap = false);
void setBtnTexture(u16 id, STexture &texNormal, STexture &texSelected);
void setTexture(u16 id ,STexture &bg);
void setTexture(u16 id, STexture &bg, int width, int height);
void setProgress(u16 id, float f, bool instant = false);
void reset(u16 id, bool instant = false);
void moveBy(u16 id, int x, int y, bool instant = false);
void getDimensions(u16 id, int &x, int &y, u32 &width, u32 &height);
void hide(u16 id, int dx, int dy, float scaleX, float scaleY, bool instant = false);
void hide(u16 id, bool instant = false);
void show(u16 id, bool instant = false);
s16 addProgressBar(int x, int y, u32 width, u32 height, SButtonTextureSet &texSet);
void setText(s16 id, const wstringEx &text, bool unwrap = false);
void setText(s16 id, const wstringEx &text, u32 startline, bool unwrap = false);
void setBtnTexture(s16 id, STexture &texNormal, STexture &texSelected);
void setTexture(s16 id ,STexture &bg);
void setTexture(s16 id, STexture &bg, int width, int height);
void setProgress(s16 id, float f, bool instant = false);
void reset(s16 id, bool instant = false);
void moveBy(s16 id, int x, int y, bool instant = false);
void getDimensions(s16 id, int &x, int &y, u32 &width, u32 &height);
void hide(s16 id, int dx, int dy, float scaleX, float scaleY, bool instant = false);
void hide(s16 id, bool instant = false);
void show(s16 id, bool instant = false);
void mouse(int chan, int x, int y);
void up(void);
void down(void);
@ -57,10 +57,10 @@ public:
void tick(void);
void noClick(bool noclick = false);
void noHover(bool nohover = false);
void click(u16 id = (u32)-1);
bool selected(u16 button = (u32)-1);
void click(s16 id = -1);
bool selected(s16 button = -1);
void setRumble(int, bool wii = false, bool gc = false);
void deselect(void){ for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--) m_selected[chan] = (u32)-1; }
void deselect(void){ for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--) m_selected[chan] = -1; }
void stopSounds(void);
void setSoundVolume(int vol);
private:
@ -138,7 +138,7 @@ private:
};
private:
vector<SmartPtr<SElement> > m_elts;
u32 m_selected[WPAD_MAX_WIIMOTES];
s32 m_selected[WPAD_MAX_WIIMOTES];
bool m_rumbleEnabled;
u8 m_rumble[WPAD_MAX_WIIMOTES];
bool wii_rumble[WPAD_MAX_WIIMOTES];

View File

@ -132,7 +132,6 @@ CMenu::CMenu(CVideo &vid) :
m_numCFVersions = 0;
m_bgCrossFade = 0;
m_bnrSndVol = 0;
m_gameSettingsPage = 0;
m_bnr_settings = true;
m_directLaunch = false;
m_exit = false;
@ -1272,7 +1271,7 @@ u16 CMenu::_textStyle(const char *domain, const char *key, u16 def)
return textStyle;
}
u16 CMenu::_addButton(CMenu::SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color)
s16 CMenu::_addButton(CMenu::SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color)
{
SButtonTextureSet btnTexSet;
CColor c(color);
@ -1303,7 +1302,7 @@ u16 CMenu::_addButton(CMenu::SThemeData &theme, const char *domain, SFont font,
return m_btnMgr.addButton(font, text, x, y, width, height, c, btnTexSet, clickSound, hoverSound);
}
u16 CMenu::_addSelButton(CMenu::SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color)
s16 CMenu::_addSelButton(CMenu::SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color)
{
SButtonTextureSet btnTexSet;
CColor c(color);
@ -1334,7 +1333,7 @@ u16 CMenu::_addSelButton(CMenu::SThemeData &theme, const char *domain, SFont fon
return m_btnMgr.addButton(font, text, x, y, width, height, c, btnTexSet, clickSound, hoverSound);
}
u16 CMenu::_addPicButton(CMenu::SThemeData &theme, const char *domain, STexture &texNormal, STexture &texSelected, int x, int y, u32 width, u32 height)
s16 CMenu::_addPicButton(CMenu::SThemeData &theme, const char *domain, STexture &texNormal, STexture &texSelected, int x, int y, u32 width, u32 height)
{
x = m_theme.getInt(domain, "x", x);
y = m_theme.getInt(domain, "y", y);
@ -1354,7 +1353,7 @@ u16 CMenu::_addPicButton(CMenu::SThemeData &theme, const char *domain, STexture
return m_btnMgr.addPicButton(tex1, tex2, x, y, width, height, clickSound, hoverSound);
}
u16 CMenu::_addTitle(CMenu::SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, u16 style)
s16 CMenu::_addTitle(CMenu::SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, s16 style)
{
CColor c(color);
@ -1375,7 +1374,7 @@ u16 CMenu::_addTitle(CMenu::SThemeData &theme, const char *domain, SFont font, c
return m_btnMgr.addLabel(font, text, x, y, width, height, c, style);
}
u16 CMenu::_addText(CMenu::SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, u16 style)
s16 CMenu::_addText(CMenu::SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, s16 style)
{
CColor c(color);
@ -1396,7 +1395,7 @@ u16 CMenu::_addText(CMenu::SThemeData &theme, const char *domain, SFont font, co
return m_btnMgr.addLabel(font, text, x, y, width, height, c, style);
}
u16 CMenu::_addLabel(CMenu::SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, u16 style)
s16 CMenu::_addLabel(CMenu::SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, s16 style)
{
CColor c(color);
@ -1417,7 +1416,7 @@ u16 CMenu::_addLabel(CMenu::SThemeData &theme, const char *domain, SFont font, c
return m_btnMgr.addLabel(font, text, x, y, width, height, c, style);
}
u16 CMenu::_addLabel(CMenu::SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, u16 style, STexture &bg)
s16 CMenu::_addLabel(CMenu::SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, s16 style, STexture &bg)
{
CColor c(color);
@ -1439,7 +1438,7 @@ u16 CMenu::_addLabel(CMenu::SThemeData &theme, const char *domain, SFont font, c
return m_btnMgr.addLabel(font, text, x, y, width, height, c, style, texBg);
}
u16 CMenu::_addProgressBar(CMenu::SThemeData &theme, const char *domain, int x, int y, u32 width, u32 height)
s16 CMenu::_addProgressBar(CMenu::SThemeData &theme, const char *domain, int x, int y, u32 width, u32 height)
{
SButtonTextureSet btnTexSet;
@ -1463,7 +1462,7 @@ u16 CMenu::_addProgressBar(CMenu::SThemeData &theme, const char *domain, int x,
return m_btnMgr.addProgressBar(x, y, width, height, btnTexSet);
}
void CMenu::_setHideAnim(u16 id, const char *domain, int dx, int dy, float scaleX, float scaleY)
void CMenu::_setHideAnim(s16 id, const char *domain, int dx, int dy, float scaleX, float scaleY)
{
dx = m_theme.getInt(domain, "effect_x", dx);
dy = m_theme.getInt(domain, "effect_y", dy);
@ -1489,12 +1488,12 @@ void CMenu::_setHideAnim(u16 id, const char *domain, int dx, int dy, float scale
m_btnMgr.hide(id, dx, dy, scaleX, scaleY, true);
}
void CMenu::_addUserLabels(CMenu::SThemeData &theme, u16 *ids, u32 size, const char *domain)
void CMenu::_addUserLabels(CMenu::SThemeData &theme, s16 *ids, u32 size, const char *domain)
{
_addUserLabels(theme, ids, 0, size, domain);
}
void CMenu::_addUserLabels(CMenu::SThemeData &theme, u16 *ids, u32 start, u32 size, const char *domain)
void CMenu::_addUserLabels(CMenu::SThemeData &theme, s16 *ids, u32 start, u32 size, const char *domain)
{
for(u32 i = start; i < start + size; ++i)
@ -1507,7 +1506,7 @@ void CMenu::_addUserLabels(CMenu::SThemeData &theme, u16 *ids, u32 start, u32 si
_setHideAnim(ids[i], dom.c_str(), -50, 0, 0.f, 0.f);
}
else
ids[i] = (u16)-1;
ids[i] = -1;
}
}

View File

@ -142,11 +142,11 @@ private:
STexture m_gameBgLQ;
STexture m_mainBgLQ;
//Main Coverflow
u16 m_mainBtnConfig;
u16 m_mainBtnInfo;
u16 m_mainBtnFavoritesOn;
u16 m_mainBtnFavoritesOff;
u16 m_mainLblLetter;
s16 m_mainBtnConfig;
s16 m_mainBtnInfo;
s16 m_mainBtnFavoritesOn;
s16 m_mainBtnFavoritesOff;
s16 m_mainLblLetter;
#ifdef SHOWMEM
u32 m_mem2FreeSize;
#endif
@ -156,124 +156,124 @@ private:
unsigned int mem2old;
unsigned int mem2;
#endif
u16 m_mainLblNotice;
u16 m_mainBtnNext;
u16 m_mainBtnPrev;
u16 m_mainBtnQuit;
u16 m_mainBtnDVD;
u16 m_mainBtnDML;
u16 m_mainBtnEmu;
u16 m_mainBtnUsb;
u16 m_mainBtnChannel;
u16 m_mainBtnHomebrew;
u16 m_mainBtnInit;
u16 m_mainBtnInit2;
u16 m_mainLblInit;
u16 m_mainLblUser[6];
s16 m_mainLblNotice;
s16 m_mainBtnNext;
s16 m_mainBtnPrev;
s16 m_mainBtnQuit;
s16 m_mainBtnDVD;
s16 m_mainBtnDML;
s16 m_mainBtnEmu;
s16 m_mainBtnUsb;
s16 m_mainBtnChannel;
s16 m_mainBtnHomebrew;
s16 m_mainBtnInit;
s16 m_mainBtnInit2;
s16 m_mainLblInit;
s16 m_mainLblUser[6];
u8 m_show_dml;
bool m_devo_installed;
bool m_new_dml;
bool m_new_dm_cfg;
bool m_GameTDBLoaded;
//Main Config menus
u16 m_configLblPage;
u16 m_configBtnPageM;
u16 m_configBtnPageP;
u16 m_configBtnBack;
u16 m_configLblTitle;
u16 m_configLblDownload;
u16 m_configBtnDownload;
u16 m_configLblParental;
u16 m_configBtnUnlock;
u16 m_configBtnSetCode;
u16 m_configLblPartitionName;
u16 m_configLblPartition;
u16 m_configBtnPartitionP;
u16 m_configBtnPartitionM;
u16 m_configLblCfg4;
u16 m_configBtnCfg4;
u16 m_configLblUser[4];
u16 m_configAdvLblTheme;
u16 m_configAdvLblCurTheme;
u16 m_configAdvBtnCurThemeM;
u16 m_configAdvBtnCurThemeP;
u16 m_configAdvLblLanguage;
u16 m_configAdvLblCurLanguage;
u16 m_configAdvBtnCurLanguageM;
u16 m_configAdvBtnCurLanguageP;
u16 m_configAdvLblCFTheme;
u16 m_configAdvBtnCFTheme;
u16 m_configAdvLblInstall;
u16 m_configAdvBtnInstall;
u16 m_configAdvLblUser[4];
u16 m_config3LblGameLanguage;
u16 m_config3LblLanguage;
u16 m_config3BtnLanguageP;
u16 m_config3BtnLanguageM;
u16 m_config3LblGameVideo;
u16 m_config3LblVideo;
u16 m_config3BtnVideoP;
u16 m_config3BtnVideoM;
s16 m_configLblPage;
s16 m_configBtnPageM;
s16 m_configBtnPageP;
s16 m_configBtnBack;
s16 m_configLblTitle;
s16 m_configLblDownload;
s16 m_configBtnDownload;
s16 m_configLblParental;
s16 m_configBtnUnlock;
s16 m_configBtnSetCode;
s16 m_configLblPartitionName;
s16 m_configLblPartition;
s16 m_configBtnPartitionP;
s16 m_configBtnPartitionM;
s16 m_configLblCfg4;
s16 m_configBtnCfg4;
s16 m_configLblUser[4];
s16 m_configAdvLblTheme;
s16 m_configAdvLblCurTheme;
s16 m_configAdvBtnCurThemeM;
s16 m_configAdvBtnCurThemeP;
s16 m_configAdvLblLanguage;
s16 m_configAdvLblCurLanguage;
s16 m_configAdvBtnCurLanguageM;
s16 m_configAdvBtnCurLanguageP;
s16 m_configAdvLblCFTheme;
s16 m_configAdvBtnCFTheme;
s16 m_configAdvLblInstall;
s16 m_configAdvBtnInstall;
s16 m_configAdvLblUser[4];
s16 m_config3LblGameLanguage;
s16 m_config3LblLanguage;
s16 m_config3BtnLanguageP;
s16 m_config3BtnLanguageM;
s16 m_config3LblGameVideo;
s16 m_config3LblVideo;
s16 m_config3BtnVideoP;
s16 m_config3BtnVideoM;
u16 m_config3LblDMLGameLanguage;
u16 m_config3LblDMLLanguage;
u16 m_config3BtnDMLLanguageP;
u16 m_config3BtnDMLLanguageM;
u16 m_config3LblDMLGameVideo;
u16 m_config3LblDMLVideo;
u16 m_config3BtnDMLVideoP;
u16 m_config3BtnDMLVideoM;
s16 m_config3LblDMLGameLanguage;
s16 m_config3LblDMLLanguage;
s16 m_config3BtnDMLLanguageP;
s16 m_config3BtnDMLLanguageM;
s16 m_config3LblDMLGameVideo;
s16 m_config3LblDMLVideo;
s16 m_config3BtnDMLVideoP;
s16 m_config3BtnDMLVideoM;
u16 m_config3LblOcarina;
u16 m_config3BtnOcarina;
u16 m_config3LblAsyncNet;
u16 m_config3BtnAsyncNet;
u16 m_config3LblUser[4];
u16 m_config4LblReturnTo;
u16 m_config4LblReturnToVal;
u16 m_config4BtnReturnToM;
u16 m_config4BtnReturnToP;
u16 m_config4LblHome;
u16 m_config4BtnHome;
u16 m_config4LblSaveFavMode;
u16 m_config4BtnSaveFavMode;
u16 m_config4LblCategoryOnBoot;
u16 m_config4BtnCategoryOnBoot;
u16 m_config4LblUser[4];
u16 m_configSndLblBnrVol;
u16 m_configSndLblBnrVolVal;
u16 m_configSndBtnBnrVolP;
u16 m_configSndBtnBnrVolM;
u16 m_configSndLblMusicVol;
u16 m_configSndLblMusicVolVal;
u16 m_configSndBtnMusicVolP;
u16 m_configSndBtnMusicVolM;
u16 m_configSndLblGuiVol;
u16 m_configSndLblGuiVolVal;
u16 m_configSndBtnGuiVolP;
u16 m_configSndBtnGuiVolM;
u16 m_configSndLblCFVol;
u16 m_configSndLblCFVolVal;
u16 m_configSndBtnCFVolP;
u16 m_configSndBtnCFVolM;
u16 m_configSndLblUser[4];
u16 m_configScreenLblTVHeight;
u16 m_configScreenLblTVHeightVal;
u16 m_configScreenBtnTVHeightP;
u16 m_configScreenBtnTVHeightM;
u16 m_configScreenLblTVWidth;
u16 m_configScreenLblTVWidthVal;
u16 m_configScreenBtnTVWidthP;
u16 m_configScreenBtnTVWidthM;
u16 m_configScreenLblTVX;
u16 m_configScreenLblTVXVal;
u16 m_configScreenBtnTVXM;
u16 m_configScreenBtnTVXP;
u16 m_configScreenLblTVY;
u16 m_configScreenLblTVYVal;
u16 m_configScreenBtnTVYM;
u16 m_configScreenBtnTVYP;
u16 m_configScreenLblUser[4];
s16 m_config3LblOcarina;
s16 m_config3BtnOcarina;
s16 m_config3LblAsyncNet;
s16 m_config3BtnAsyncNet;
s16 m_config3LblUser[4];
s16 m_config4LblReturnTo;
s16 m_config4LblReturnToVal;
s16 m_config4BtnReturnToM;
s16 m_config4BtnReturnToP;
s16 m_config4LblHome;
s16 m_config4BtnHome;
s16 m_config4LblSaveFavMode;
s16 m_config4BtnSaveFavMode;
s16 m_config4LblCategoryOnBoot;
s16 m_config4BtnCategoryOnBoot;
s16 m_config4LblUser[4];
s16 m_configSndLblBnrVol;
s16 m_configSndLblBnrVolVal;
s16 m_configSndBtnBnrVolP;
s16 m_configSndBtnBnrVolM;
s16 m_configSndLblMusicVol;
s16 m_configSndLblMusicVolVal;
s16 m_configSndBtnMusicVolP;
s16 m_configSndBtnMusicVolM;
s16 m_configSndLblGuiVol;
s16 m_configSndLblGuiVolVal;
s16 m_configSndBtnGuiVolP;
s16 m_configSndBtnGuiVolM;
s16 m_configSndLblCFVol;
s16 m_configSndLblCFVolVal;
s16 m_configSndBtnCFVolP;
s16 m_configSndBtnCFVolM;
s16 m_configSndLblUser[4];
s16 m_configScreenLblTVHeight;
s16 m_configScreenLblTVHeightVal;
s16 m_configScreenBtnTVHeightP;
s16 m_configScreenBtnTVHeightM;
s16 m_configScreenLblTVWidth;
s16 m_configScreenLblTVWidthVal;
s16 m_configScreenBtnTVWidthP;
s16 m_configScreenBtnTVWidthM;
s16 m_configScreenLblTVX;
s16 m_configScreenLblTVXVal;
s16 m_configScreenBtnTVXM;
s16 m_configScreenBtnTVXP;
s16 m_configScreenLblTVY;
s16 m_configScreenLblTVYVal;
s16 m_configScreenBtnTVYM;
s16 m_configScreenBtnTVYP;
s16 m_configScreenLblUser[4];
//Download menu
enum CoverPrio
{
@ -302,27 +302,27 @@ private:
FLAT,
CFLAT,
};
u16 m_downloadPrioVal;
u16 m_downloadLblTitle;
u16 m_downloadPBar;
u16 m_downloadBtnCancel;
u16 m_downloadBtnAll;
u16 m_downloadBtnMissing;
u16 m_downloadBtnGameTDBDownload;
u16 m_downloadLblGameTDBDownload;
u16 m_downloadLblMessage[2];
u16 m_downloadLblCovers;
u16 m_downloadLblGameTDB;
u16 m_downloadLblUser[4];
u16 m_downloadLblCoverPrio;
u16 m_downloadLblPrio;
u16 m_downloadBtnPrioM;
u16 m_downloadBtnPrioP;
u16 m_downloadBtnVersion;
u16 m_downloadLblCoverSet;
u16 m_downloadBtnCoverSet;
u16 m_downloadLblSetTitle;
u16 m_downloadLblRegion;
s16 m_downloadPrioVal;
s16 m_downloadLblTitle;
s16 m_downloadPBar;
s16 m_downloadBtnCancel;
s16 m_downloadBtnAll;
s16 m_downloadBtnMissing;
s16 m_downloadBtnGameTDBDownload;
s16 m_downloadLblGameTDBDownload;
s16 m_downloadLblMessage[2];
s16 m_downloadLblCovers;
s16 m_downloadLblGameTDB;
s16 m_downloadLblUser[4];
s16 m_downloadLblCoverPrio;
s16 m_downloadLblPrio;
s16 m_downloadBtnPrioM;
s16 m_downloadBtnPrioP;
s16 m_downloadBtnVersion;
s16 m_downloadLblCoverSet;
s16 m_downloadBtnCoverSet;
s16 m_downloadLblSetTitle;
s16 m_downloadLblRegion;
enum Regions
{
EN = 1,
@ -338,31 +338,31 @@ private:
ZHCN,
AU,
};
u16 m_downloadBtnEN;
u16 m_downloadBtnJA;
u16 m_downloadBtnFR;
u16 m_downloadBtnDE;
u16 m_downloadBtnES;
u16 m_downloadBtnIT;
u16 m_downloadBtnNL;
u16 m_downloadBtnPT;
u16 m_downloadBtnRU;
u16 m_downloadBtnKO;
u16 m_downloadBtnZHCN;
u16 m_downloadBtnAU;
u16 m_downloadBtnENs;
u16 m_downloadBtnJAs;
u16 m_downloadBtnFRs;
u16 m_downloadBtnDEs;
u16 m_downloadBtnESs;
u16 m_downloadBtnITs;
u16 m_downloadBtnNLs;
u16 m_downloadBtnPTs;
u16 m_downloadBtnRUs;
u16 m_downloadBtnKOs;
u16 m_downloadBtnZHCNs;
u16 m_downloadBtnAUs;
u16 m_downloadBtnBack;
s16 m_downloadBtnEN;
s16 m_downloadBtnJA;
s16 m_downloadBtnFR;
s16 m_downloadBtnDE;
s16 m_downloadBtnES;
s16 m_downloadBtnIT;
s16 m_downloadBtnNL;
s16 m_downloadBtnPT;
s16 m_downloadBtnRU;
s16 m_downloadBtnKO;
s16 m_downloadBtnZHCN;
s16 m_downloadBtnAU;
s16 m_downloadBtnENs;
s16 m_downloadBtnJAs;
s16 m_downloadBtnFRs;
s16 m_downloadBtnDEs;
s16 m_downloadBtnESs;
s16 m_downloadBtnITs;
s16 m_downloadBtnNLs;
s16 m_downloadBtnPTs;
s16 m_downloadBtnRUs;
s16 m_downloadBtnKOs;
s16 m_downloadBtnZHCNs;
s16 m_downloadBtnAUs;
s16 m_downloadBtnBack;
static s8 _versionDownloaderInit(CMenu *m);
static s8 _versionTxtDownloaderInit(CMenu *m);
s8 _versionDownloader();
@ -374,184 +374,182 @@ private:
LOAD_IOS_SUCCEEDED,
LOAD_IOS_NOT_NEEDED
};
u16 m_gameLblInfo;
u16 m_gameBtnFavoriteOn;
u16 m_gameBtnFavoriteOff;
u16 m_gameBtnAdultOn;
u16 m_gameBtnAdultOff;
u16 m_gameBtnPlay;
u16 m_gameBtnDelete;
u16 m_gameBtnSettings;
u16 m_gameBtnBack;
u16 m_gameLblUser[4];
s16 m_gameLblInfo;
s16 m_gameBtnFavoriteOn;
s16 m_gameBtnFavoriteOff;
s16 m_gameBtnAdultOn;
s16 m_gameBtnAdultOff;
s16 m_gameBtnPlay;
s16 m_gameBtnDelete;
s16 m_gameBtnSettings;
s16 m_gameBtnBack;
s16 m_gameLblUser[4];
// Parental code menu
u16 m_codeLblTitle;
u16 m_codeBtnKey[10];
u16 m_codeBtnBack;
u16 m_codeBtnErase;
u16 m_codeBtnAge;
u16 m_codeLblAge;
u16 m_codeLblUser[4];
s16 m_codeLblTitle;
s16 m_codeBtnKey[10];
s16 m_codeBtnBack;
s16 m_codeBtnErase;
s16 m_codeBtnAge;
s16 m_codeLblAge;
s16 m_codeLblUser[4];
//menu_wbfs
u16 m_wbfsLblTitle;
u16 m_wbfsPBar;
u16 m_wbfsBtnBack;
u16 m_wbfsBtnGo;
u16 m_wbfsLblDialog;
u16 m_wbfsLblMessage;
u16 m_wbfsLblUser[4];
s16 m_wbfsLblTitle;
s16 m_wbfsPBar;
s16 m_wbfsBtnBack;
s16 m_wbfsBtnGo;
s16 m_wbfsLblDialog;
s16 m_wbfsLblMessage;
s16 m_wbfsLblUser[4];
//Theme Adjust menus
u16 m_cfThemeBtnAlt;
u16 m_cfThemeBtnSelect;
u16 m_cfThemeBtnWide;
u16 m_cfThemeLblParam;
u16 m_cfThemeBtnParamM;
u16 m_cfThemeBtnParamP;
u16 m_cfThemeBtnCopy;
u16 m_cfThemeBtnPaste;
u16 m_cfThemeBtnSave;
u16 m_cfThemeBtnCancel;
u16 m_cfThemeLblVal[4 * 4];
u16 m_cfThemeBtnValM[4 * 4];
u16 m_cfThemeBtnValP[4 * 4];
u16 m_cfThemeLblValTxt[4];
s16 m_cfThemeBtnAlt;
s16 m_cfThemeBtnSelect;
s16 m_cfThemeBtnWide;
s16 m_cfThemeLblParam;
s16 m_cfThemeBtnParamM;
s16 m_cfThemeBtnParamP;
s16 m_cfThemeBtnCopy;
s16 m_cfThemeBtnPaste;
s16 m_cfThemeBtnSave;
s16 m_cfThemeBtnCancel;
s16 m_cfThemeLblVal[4 * 4];
s16 m_cfThemeBtnValM[4 * 4];
s16 m_cfThemeBtnValP[4 * 4];
s16 m_cfThemeLblValTxt[4];
//Game Settings menus
u16 m_gameSettingsLblPage;
u16 m_gameSettingsBtnPageM;
u16 m_gameSettingsBtnPageP;
u16 m_gameSettingsBtnBack;
u16 m_gameSettingsLblTitle;
u16 m_gameSettingsLblGameLanguage;
u16 m_gameSettingsLblLanguage;
u16 m_gameSettingsBtnLanguageP;
u16 m_gameSettingsBtnLanguageM;
u16 m_gameSettingsLblGameVideo;
u16 m_gameSettingsLblVideo;
u16 m_gameSettingsBtnVideoP;
u16 m_gameSettingsBtnVideoM;
s16 m_gameSettingsLblPage;
s16 m_gameSettingsBtnPageM;
s16 m_gameSettingsBtnPageP;
s16 m_gameSettingsBtnBack;
s16 m_gameSettingsLblTitle;
s16 m_gameSettingsLblGameLanguage;
s16 m_gameSettingsLblLanguage;
s16 m_gameSettingsBtnLanguageP;
s16 m_gameSettingsBtnLanguageM;
s16 m_gameSettingsLblGameVideo;
s16 m_gameSettingsLblVideo;
s16 m_gameSettingsBtnVideoP;
s16 m_gameSettingsBtnVideoM;
u16 m_gameSettingsLblDMLGameVideo;
u16 m_gameSettingsLblDMLVideo;
u16 m_gameSettingsBtnDMLVideoP;
u16 m_gameSettingsBtnDMLVideoM;
s16 m_gameSettingsLblDMLGameVideo;
s16 m_gameSettingsLblDMLVideo;
s16 m_gameSettingsBtnDMLVideoP;
s16 m_gameSettingsBtnDMLVideoM;
u16 m_gameSettingsLblGClanguageVal;
u16 m_gameSettingsLblGClanguage;
u16 m_gameSettingsBtnGClanguageP;
u16 m_gameSettingsBtnGClanguageM;
s16 m_gameSettingsLblGClanguageVal;
s16 m_gameSettingsLblGClanguage;
s16 m_gameSettingsBtnGClanguageP;
s16 m_gameSettingsBtnGClanguageM;
u16 m_gameSettingsLblIOSreloadBlock;
u16 m_gameSettingsBtnIOSreloadBlock;
s16 m_gameSettingsLblIOSreloadBlock;
s16 m_gameSettingsBtnIOSreloadBlock;
u16 m_gameSettingsLblAspectRatio;
u16 m_gameSettingsLblAspectRatioVal;
u16 m_gameSettingsBtnAspectRatioP;
u16 m_gameSettingsBtnAspectRatioM;
s16 m_gameSettingsLblAspectRatio;
s16 m_gameSettingsLblAspectRatioVal;
s16 m_gameSettingsBtnAspectRatioP;
s16 m_gameSettingsBtnAspectRatioM;
u16 m_gameSettingsLblNMM;
u16 m_gameSettingsLblNMM_Val;
u16 m_gameSettingsBtnNMM_P;
u16 m_gameSettingsBtnNMM_M;
s16 m_gameSettingsLblNMM;
s16 m_gameSettingsLblNMM_Val;
s16 m_gameSettingsBtnNMM_P;
s16 m_gameSettingsBtnNMM_M;
u16 m_gameSettingsLblNoDVD;
u16 m_gameSettingsLblNoDVD_Val;
u16 m_gameSettingsBtnNoDVD_P;
u16 m_gameSettingsBtnNoDVD_M;
s16 m_gameSettingsLblNoDVD;
s16 m_gameSettingsLblNoDVD_Val;
s16 m_gameSettingsBtnNoDVD_P;
s16 m_gameSettingsBtnNoDVD_M;
u16 m_gameSettingsLblDevoMemcardEmu;
u16 m_gameSettingsBtnDevoMemcardEmu;
s16 m_gameSettingsLblDevoMemcardEmu;
s16 m_gameSettingsBtnDevoMemcardEmu;
u16 m_gameSettingsLblDM_Widescreen;
u16 m_gameSettingsBtnDM_Widescreen;
s16 m_gameSettingsLblDM_Widescreen;
s16 m_gameSettingsBtnDM_Widescreen;
u16 m_gameSettingsLblGCLoader;
u16 m_gameSettingsLblGCLoader_Val;
u16 m_gameSettingsBtnGCLoader_P;
u16 m_gameSettingsBtnGCLoader_M;
s16 m_gameSettingsLblGCLoader;
s16 m_gameSettingsLblGCLoader_Val;
s16 m_gameSettingsBtnGCLoader_P;
s16 m_gameSettingsBtnGCLoader_M;
u16 m_gameSettingsLblCustom;
u16 m_gameSettingsBtnCustom;
u16 m_gameSettingsLblLaunchNK;
u16 m_gameSettingsBtnLaunchNK;
s16 m_gameSettingsLblCustom;
s16 m_gameSettingsBtnCustom;
s16 m_gameSettingsLblLaunchNK;
s16 m_gameSettingsBtnLaunchNK;
u16 m_gameSettingsLblOcarina;
u16 m_gameSettingsBtnOcarina;
u16 m_gameSettingsLblVipatch;
u16 m_gameSettingsBtnVipatch;
u16 m_gameSettingsLblCountryPatch;
u16 m_gameSettingsBtnCountryPatch;
u16 m_gameSettingsLblCover;
u16 m_gameSettingsBtnCover;
u16 m_gameSettingsLblPatchVidModes;
u16 m_gameSettingsLblPatchVidModesVal;
u16 m_gameSettingsBtnPatchVidModesM;
u16 m_gameSettingsBtnPatchVidModesP;
u16 m_gameSettingsLblUser[3 * 2];
u16 m_gameSettingsLblHooktype;
u16 m_gameSettingsLblHooktypeVal;
u16 m_gameSettingsBtnHooktypeM;
u16 m_gameSettingsBtnHooktypeP;
u16 m_gameSettingsLblEmulationVal;
u16 m_gameSettingsBtnEmulationP;
u16 m_gameSettingsBtnEmulationM;
u16 m_gameSettingsLblEmulation;
u16 m_gameSettingsLblDebugger;
u16 m_gameSettingsLblDebuggerV;
u16 m_gameSettingsBtnDebuggerP;
u16 m_gameSettingsBtnDebuggerM;
u16 m_gameSettingsLblCheat;
u16 m_gameSettingsBtnCheat;
u16 m_gameSettingsLblCategoryMain;
u16 m_gameSettingsBtnCategoryMain;
u16 m_gameSettingsPage;
u16 m_gameSettingsLblGameIOS;
u16 m_gameSettingsLblIOS;
u16 m_gameSettingsBtnIOSP;
u16 m_gameSettingsBtnIOSM;
u16 m_gameSettingsLblExtractSave;
u16 m_gameSettingsBtnExtractSave;
u16 m_gameSettingsLblFlashSave;
u16 m_gameSettingsBtnFlashSave;
s16 m_gameSettingsLblOcarina;
s16 m_gameSettingsBtnOcarina;
s16 m_gameSettingsLblVipatch;
s16 m_gameSettingsBtnVipatch;
s16 m_gameSettingsLblCountryPatch;
s16 m_gameSettingsBtnCountryPatch;
s16 m_gameSettingsLblCover;
s16 m_gameSettingsBtnCover;
s16 m_gameSettingsLblPatchVidModes;
s16 m_gameSettingsLblPatchVidModesVal;
s16 m_gameSettingsBtnPatchVidModesM;
s16 m_gameSettingsBtnPatchVidModesP;
s16 m_gameSettingsLblUser[3 * 2];
s16 m_gameSettingsLblHooktype;
s16 m_gameSettingsLblHooktypeVal;
s16 m_gameSettingsBtnHooktypeM;
s16 m_gameSettingsBtnHooktypeP;
s16 m_gameSettingsLblEmulationVal;
s16 m_gameSettingsBtnEmulationP;
s16 m_gameSettingsBtnEmulationM;
s16 m_gameSettingsLblEmulation;
s16 m_gameSettingsLblDebugger;
s16 m_gameSettingsLblDebuggerV;
s16 m_gameSettingsBtnDebuggerP;
s16 m_gameSettingsBtnDebuggerM;
s16 m_gameSettingsLblCheat;
s16 m_gameSettingsBtnCheat;
s16 m_gameSettingsLblCategoryMain;
s16 m_gameSettingsBtnCategoryMain;
s16 m_gameSettingsLblGameIOS;
s16 m_gameSettingsLblIOS;
s16 m_gameSettingsBtnIOSP;
s16 m_gameSettingsBtnIOSM;
s16 m_gameSettingsLblExtractSave;
s16 m_gameSettingsBtnExtractSave;
s16 m_gameSettingsLblFlashSave;
s16 m_gameSettingsBtnFlashSave;
// System Menu
u16 m_systemBtnBack;
u16 m_systemLblTitle;
u16 m_systemLblVersionTxt;
u16 m_systemLblVersion;
u16 m_systemLblVersionRev;
u16 m_systemLblUser[4];
u16 m_systemBtnDownload;
u16 m_systemLblInfo;
u16 m_systemLblVerSelectVal;
u16 m_systemBtnVerSelectM;
u16 m_systemBtnVerSelectP;
s16 m_systemBtnBack;
s16 m_systemLblTitle;
s16 m_systemLblVersionTxt;
s16 m_systemLblVersion;
s16 m_systemLblVersionRev;
s16 m_systemLblUser[4];
s16 m_systemBtnDownload;
s16 m_systemLblInfo;
s16 m_systemLblVerSelectVal;
s16 m_systemBtnVerSelectM;
s16 m_systemBtnVerSelectP;
//Cheat menu
u16 m_cheatBtnBack;
u16 m_cheatBtnApply;
u16 m_cheatBtnDownload;
u16 m_cheatLblTitle;
u16 m_cheatLblPage;
u16 m_cheatBtnPageM;
u16 m_cheatBtnPageP;
u16 m_cheatLblItem[4];
u16 m_cheatBtnItem[4];
u16 m_cheatSettingsPage;
u16 m_cheatLblUser[4];
s16 m_cheatBtnBack;
s16 m_cheatBtnApply;
s16 m_cheatBtnDownload;
s16 m_cheatLblTitle;
s16 m_cheatLblPage;
s16 m_cheatBtnPageM;
s16 m_cheatBtnPageP;
s16 m_cheatLblItem[4];
s16 m_cheatBtnItem[4];
s16 m_cheatLblUser[4];
STexture m_cheatBg;
GCTCheats m_cheatfile;
// Gameinfo menu
u16 m_gameinfoLblTitle;
u16 m_gameinfoLblID;
u16 m_gameinfoLblSynopsis;
u16 m_gameinfoLblDev;
u16 m_gameinfoLblRegion;
u16 m_gameinfoLblPublisher;
u16 m_gameinfoLblRlsdate;
u16 m_gameinfoLblGenre;
u16 m_gameinfoLblRating;
u16 m_gameinfoLblWifiplayers;
u16 m_gameinfoLblUser[5];
u16 m_gameinfoLblControlsReq[4];
u16 m_gameinfoLblControls[4];
s16 m_gameinfoLblTitle;
s16 m_gameinfoLblID;
s16 m_gameinfoLblSynopsis;
s16 m_gameinfoLblDev;
s16 m_gameinfoLblRegion;
s16 m_gameinfoLblPublisher;
s16 m_gameinfoLblRlsdate;
s16 m_gameinfoLblGenre;
s16 m_gameinfoLblRating;
s16 m_gameinfoLblWifiplayers;
s16 m_gameinfoLblUser[5];
s16 m_gameinfoLblControlsReq[4];
s16 m_gameinfoLblControls[4];
STexture m_gameinfoBg;
STexture m_rating;
STexture m_wifi;
@ -1011,17 +1009,17 @@ private:
SmartGuiSound _sound(CMenu::SoundSet &soundSet, const char *domain, const char *key, const u8 * snd, u32 len, string name, bool isAllocated);
SmartGuiSound _sound(CMenu::SoundSet &soundSet, const char *domain, const char *key, string name);
u16 _textStyle(const char *domain, const char *key, u16 def);
u16 _addButton(SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color);
u16 _addSelButton(SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color);
u16 _addPicButton(SThemeData &theme, const char *domain, STexture &texNormal, STexture &texSelected, int x, int y, u32 width, u32 height);
u16 _addTitle(SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, u16 style);
u16 _addText(SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, u16 style);
u16 _addLabel(SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, u16 style);
u16 _addLabel(SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, u16 style, STexture &bg);
u16 _addProgressBar(SThemeData &theme, const char *domain, int x, int y, u32 width, u32 height);
void _setHideAnim(u16 id, const char *domain, int dx, int dy, float scaleX, float scaleY);
void _addUserLabels(CMenu::SThemeData &theme, u16 *ids, u32 size, const char *domain);
void _addUserLabels(CMenu::SThemeData &theme, u16 *ids, u32 start, u32 size, const char *domain);
s16 _addButton(SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color);
s16 _addSelButton(SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color);
s16 _addPicButton(SThemeData &theme, const char *domain, STexture &texNormal, STexture &texSelected, int x, int y, u32 width, u32 height);
s16 _addTitle(SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, s16 style);
s16 _addText(SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, s16 style);
s16 _addLabel(SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, s16 style);
s16 _addLabel(SThemeData &theme, const char *domain, SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, s16 style, STexture &bg);
s16 _addProgressBar(SThemeData &theme, const char *domain, int x, int y, u32 width, u32 height);
void _setHideAnim(s16 id, const char *domain, int dx, int dy, float scaleX, float scaleY);
void _addUserLabels(CMenu::SThemeData &theme, s16 *ids, u32 size, const char *domain);
void _addUserLabels(CMenu::SThemeData &theme, s16 *ids, u32 start, u32 size, const char *domain);
//
const wstringEx _t(const char *key, const wchar_t *def = L"") { return m_loc.getWString(m_curLanguage, key, def); }
const wstringEx _fmt(const char *key, const wchar_t *def);

View File

@ -12,10 +12,10 @@ const int pixels_to_skip = 10;
extern const u8 english_txt[];
//About menu
u16 m_aboutLblTitle;
u16 m_aboutLblInfo;
u16 m_aboutLblUser[4];
u16 m_aboutLblIOS;
s16 m_aboutLblTitle;
s16 m_aboutLblInfo;
s16 m_aboutLblUser[4];
s16 m_aboutLblIOS;
bool showHelp;
void CMenu::_about(bool help)
@ -73,7 +73,7 @@ void CMenu::_hideAbout(bool instant)
m_btnMgr.hide(m_aboutLblInfo, instant);
for (u8 i = 0; i < ARRAY_SIZE(m_aboutLblUser); ++i)
{
if(m_aboutLblUser[i] != (u16)-1)
if(m_aboutLblUser[i] != -1)
m_btnMgr.hide(m_aboutLblUser[i], instant);
}
}
@ -86,7 +86,7 @@ void CMenu::_showAbout(void)
m_btnMgr.show(m_aboutLblInfo,false);
for(u8 i = 0; i < ARRAY_SIZE(m_aboutLblUser); ++i)
{
if(m_aboutLblUser[i] != (u16)-1)
if(m_aboutLblUser[i] != -1)
m_btnMgr.show(m_aboutLblUser[i]);
}
}

View File

@ -4,18 +4,18 @@
#include <gccore.h>
// Category menu
u16 m_categoryLblPage;
u16 m_categoryBtnPageM;
u16 m_categoryBtnPageP;
u16 m_categoryBtnClear;
u16 m_categoryBtnBack;
u16 m_categoryLblTitle;
u16 m_categoryLblCat[11];
u16 m_categoryBtnCat[11];
u16 m_categoryBtnCats[11];
u16 m_categoryBtnCatHid[11];
u16 m_categoryBtnCatReq[11];
u16 m_categoryLblUser[4];
s16 m_categoryLblPage;
s16 m_categoryBtnPageM;
s16 m_categoryBtnPageP;
s16 m_categoryBtnClear;
s16 m_categoryBtnBack;
s16 m_categoryLblTitle;
s16 m_categoryLblCat[11];
s16 m_categoryBtnCat[11];
s16 m_categoryBtnCats[11];
s16 m_categoryBtnCatHid[11];
s16 m_categoryBtnCatReq[11];
s16 m_categoryLblUser[4];
STexture m_categoryBg;
u8 m_categories[51];
@ -36,7 +36,7 @@ void CMenu::_hideCategorySettings(bool instant)
for(u8 i = 0; i < ARRAY_SIZE(m_categoryLblUser); ++i)
{
if(m_categoryLblUser[i] != (u16)-1u)
if(m_categoryLblUser[i] != -1)
m_btnMgr.hide(m_categoryLblUser[i], instant);
}
@ -55,7 +55,7 @@ void CMenu::_showCategorySettings(void)
_setBg(m_categoryBg, m_categoryBg);
for(u8 i = 0; i < ARRAY_SIZE(m_categoryLblUser); ++i)
{
if(m_categoryLblUser[i] != (u16)-1)
if(m_categoryLblUser[i] != -1)
m_btnMgr.show(m_categoryLblUser[i]);
}
m_btnMgr.show(m_categoryLblTitle);

View File

@ -10,6 +10,8 @@
#define GECKOURL "http://geckocodes.org/codes/%c/%s.txt"
#define CHEATSPERPAGE 4
u8 m_cheatSettingsPage = 0;
void CMenu::_hideCheatDownload(bool instant)
{
m_btnMgr.hide(m_downloadBtnCancel, instant);
@ -277,7 +279,7 @@ void CMenu::_hideCheatSettings(bool instant)
}
for(u8 i = 0; i < ARRAY_SIZE(m_cheatLblUser); ++i)
if(m_cheatLblUser[i] != (u16)-1)
if(m_cheatLblUser[i] != -1)
m_btnMgr.hide(m_cheatLblUser[i], instant);
}
@ -288,7 +290,7 @@ void CMenu::_showCheatSettings(void)
m_btnMgr.show(m_cheatLblTitle);
for(u8 i = 0; i < ARRAY_SIZE(m_cheatLblUser); ++i)
if(m_cheatLblUser[i] != (u16)-1)
if(m_cheatLblUser[i] != -1)
m_btnMgr.show(m_cheatLblUser[i]);
if (m_cheatfile.getCnt() > 0)

View File

@ -14,7 +14,7 @@ void CMenu::_hideCode(bool instant)
m_btnMgr.hide(m_codeBtnAge, instant);
m_btnMgr.hide(m_codeLblTitle, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_codeLblUser); ++i)
if(m_codeLblUser[i] != (u16)-1)
if(m_codeLblUser[i] != -1)
m_btnMgr.hide(m_codeLblUser[i], instant);
m_btnMgr.hide(m_codeLblAge, true);
}
@ -27,7 +27,7 @@ void CMenu::_showCode(void)
m_btnMgr.show(m_codeBtnBack);
m_btnMgr.show(m_codeLblTitle);
for(u8 i = 0; i < ARRAY_SIZE(m_codeLblUser); ++i)
if(m_codeLblUser[i] != (u16)-1)
if(m_codeLblUser[i] != -1)
m_btnMgr.show(m_codeLblUser[i]);
m_btnMgr.hide(m_codeLblAge, true);
}

View File

@ -32,7 +32,7 @@ void CMenu::_hideConfig(bool instant)
m_btnMgr.hide(m_configLblCfg4, instant);
m_btnMgr.hide(m_configBtnCfg4, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_configLblUser); ++i)
if(m_configLblUser[i] != (u16)-1)
if(m_configLblUser[i] != -1)
m_btnMgr.hide(m_configLblUser[i], instant);
}
@ -67,7 +67,7 @@ void CMenu::_showConfig(void)
partitionname[i] = toupper(partitionname[i]);
for(u8 i = 0; i < ARRAY_SIZE(m_configLblUser); ++i)
if(m_configLblUser[i] != (u16)-1)
if(m_configLblUser[i] != -1)
m_btnMgr.show(m_configLblUser[i]);
m_btnMgr.setText(m_configLblPartition, (string)partitionname);

View File

@ -39,7 +39,7 @@ void CMenu::_hideConfig3(bool instant)
m_btnMgr.hide(m_config3LblOcarina, instant);
m_btnMgr.hide(m_config3BtnOcarina, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_config3LblUser); ++i)
if(m_config3LblUser[i] != (u16)-1)
if(m_config3LblUser[i] != -1)
m_btnMgr.hide(m_config3LblUser[i], instant);
}
@ -75,7 +75,7 @@ void CMenu::_showConfig3(void)
m_btnMgr.show(m_config3BtnOcarina);
for(u8 i = 0; i < ARRAY_SIZE(m_config3LblUser); ++i)
if(m_config3LblUser[i] != (u16)-1)
if(m_config3LblUser[i] != -1)
m_btnMgr.show(m_config3LblUser[i]);
int i;

View File

@ -43,7 +43,7 @@ void CMenu::_hideConfig4(bool instant)
m_btnMgr.hide(m_config4BtnReturnToM, instant);
m_btnMgr.hide(m_config4BtnReturnToP, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_config4LblUser); ++i)
if(m_config4LblUser[i] != (u16)-1)
if(m_config4LblUser[i] != -1)
m_btnMgr.hide(m_config4LblUser[i], instant);
}
@ -63,7 +63,7 @@ void CMenu::_showConfig4(void)
m_btnMgr.show(m_config4BtnReturnToP);
for(u32 i = 0; i < ARRAY_SIZE(m_config4LblUser); ++i)
if(m_config4LblUser[i] != (u16)-1)
if(m_config4LblUser[i] != -1)
m_btnMgr.show(m_config4LblUser[i]);
int i;

View File

@ -33,7 +33,7 @@ void CMenu::_hideConfigAdv(bool instant)
m_btnMgr.hide(m_configAdvLblCFTheme, instant);
m_btnMgr.hide(m_configAdvBtnCFTheme, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_configAdvLblUser); ++i)
if(m_configAdvLblUser[i] != (u16)-1)
if(m_configAdvLblUser[i] != -1)
m_btnMgr.hide(m_configAdvLblUser[i], instant);
}
@ -57,7 +57,7 @@ void CMenu::_showConfigAdv(void)
m_btnMgr.show(m_configAdvBtnCFTheme);
}
for(u32 i = 0; i < ARRAY_SIZE(m_configAdvLblUser); ++i)
if(m_configAdvLblUser[i] != (u16)-1)
if(m_configAdvLblUser[i] != -1)
m_btnMgr.show(m_configAdvLblUser[i]);
m_btnMgr.setText(m_configAdvLblCurLanguage, m_curLanguage);

View File

@ -13,7 +13,8 @@ static inline int loopNum(int i, int s)
return i < 0 ? (s - (-i % s)) % s : i % s;
}
u32 g_numGCfPages = 5;
u8 g_numGCfPages = 5;
u8 m_gameSettingsPage = 0;
void CMenu::_hideGameSettings(bool instant)
{
@ -100,7 +101,7 @@ void CMenu::_hideGameSettings(bool instant)
m_btnMgr.hide(m_gameSettingsBtnFlashSave, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_gameSettingsLblUser); ++i)
if(m_gameSettingsLblUser[i] != (u16)-1)
if(m_gameSettingsLblUser[i] != -1)
m_btnMgr.hide(m_gameSettingsLblUser[i], instant);
}
@ -403,7 +404,7 @@ void CMenu::_showGameSettings(void)
u32 i = 0;
for(i = 0; i < ARRAY_SIZE(m_gameSettingsLblUser); ++i)
if(m_gameSettingsLblUser[i] != (u16)-1)
if(m_gameSettingsLblUser[i] != -1)
m_btnMgr.show(m_gameSettingsLblUser[i]);
string id(m_cf.getId());

View File

@ -24,7 +24,7 @@ void CMenu::_hideConfigScreen(bool instant)
m_btnMgr.hide(m_configScreenBtnTVYM, instant);
m_btnMgr.hide(m_configScreenBtnTVYP, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_configScreenLblUser); ++i)
if(m_configScreenLblUser[i] != (u16)-1)
if(m_configScreenLblUser[i] != -1)
m_btnMgr.hide(m_configScreenLblUser[i], instant);
}
@ -49,7 +49,7 @@ void CMenu::_showConfigScreen(void)
m_btnMgr.show(m_configScreenBtnTVYM);
m_btnMgr.show(m_configScreenBtnTVYP);
for(u8 i = 0; i < ARRAY_SIZE(m_configScreenLblUser); ++i)
if(m_configScreenLblUser[i] != (u16)-1)
if(m_configScreenLblUser[i] != -1)
m_btnMgr.show(m_configScreenLblUser[i]);
m_btnMgr.setText(m_configScreenLblTVWidthVal, wfmt(L"%i", 640 * 640 / max(1, m_cfg.getInt("GENERAL", "tv_width", 640))));

View File

@ -24,7 +24,7 @@ void CMenu::_hideConfigSnd(bool instant)
m_btnMgr.hide(m_configSndBtnCFVolP, instant);
m_btnMgr.hide(m_configSndBtnCFVolM, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_configSndLblUser); ++i)
if(m_configSndLblUser[i] != (u16)-1)
if(m_configSndLblUser[i] != -1)
m_btnMgr.hide(m_configSndLblUser[i], instant);
}
@ -49,7 +49,7 @@ void CMenu::_showConfigSnd(void)
m_btnMgr.show(m_configSndBtnCFVolP);
m_btnMgr.show(m_configSndBtnCFVolM);
for(u8 i = 0; i < ARRAY_SIZE(m_configSndLblUser); ++i)
if(m_configSndLblUser[i] != (u16)-1)
if(m_configSndLblUser[i] != -1)
m_btnMgr.show(m_configSndLblUser[i]);
m_btnMgr.setText(m_configSndLblGuiVolVal, wfmt(L"%i", m_cfg.getInt("GENERAL", "sound_volume_gui", 255)));

View File

@ -291,7 +291,7 @@ void CMenu::_hideDownload(bool instant)
m_btnMgr.hide(m_downloadLblGameTDBDownload, instant);
m_btnMgr.hide(m_downloadLblGameTDB, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_downloadLblUser); ++i)
if(m_downloadLblUser[i] != (u16)-1)
if(m_downloadLblUser[i] != -1)
m_btnMgr.hide(m_downloadLblUser[i], instant);
}
@ -313,7 +313,7 @@ void CMenu::_showDownload(void)
m_btnMgr.show(m_downloadBtnGameTDBDownload);
}
for(u8 i = 0; i < ARRAY_SIZE(m_downloadLblUser); ++i)
if(m_downloadLblUser[i] != (u16)-1)
if(m_downloadLblUser[i] != -1)
m_btnMgr.show(m_downloadLblUser[i]);
}

View File

@ -3,9 +3,9 @@
#include "gecko/gecko.h"
extern const u8 error_png[];
u16 m_errorLblMessage;
u16 m_errorLblIcon;
u16 m_errorLblUser[4];
s16 m_errorLblMessage;
s16 m_errorLblIcon;
s16 m_errorLblUser[4];
void CMenu::error(const wstringEx &msg)
{
@ -45,7 +45,7 @@ void CMenu::_hideError(bool instant)
m_btnMgr.hide(m_errorLblIcon, instant);
m_btnMgr.hide(m_errorLblMessage, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_errorLblUser); ++i)
if(m_errorLblUser[i] != (u16)-1)
if(m_errorLblUser[i] != -1)
m_btnMgr.hide(m_errorLblUser[i], instant);
}
@ -55,7 +55,7 @@ void CMenu::_showError(void)
m_btnMgr.show(m_errorLblMessage);
m_btnMgr.show(m_errorLblIcon);
for(u8 i = 0; i < ARRAY_SIZE(m_errorLblUser); ++i)
if(m_errorLblUser[i] != (u16)-1)
if(m_errorLblUser[i] != -1)
m_btnMgr.show(m_errorLblUser[i]);
}

View File

@ -60,10 +60,10 @@ extern u32 boot2version;
static u64 sm_title_id[8] ATTRIBUTE_ALIGN(32);
bool m_zoom_banner = false;
u16 m_gameBtnPlayFull;
u16 m_gameBtnBackFull;
u16 m_gameBtnToogle;
u16 m_gameBtnToogleFull;
s16 m_gameBtnPlayFull;
s16 m_gameBtnBackFull;
s16 m_gameBtnToogle;
s16 m_gameBtnToogleFull;
const string CMenu::_translations[23] = {
"Default",
@ -330,7 +330,7 @@ void CMenu::_hideGame(bool instant)
m_btnMgr.hide(m_gameBtnAdultOn, instant);
m_btnMgr.hide(m_gameBtnAdultOff, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser); ++i)
if(m_gameLblUser[i] != (u16)-1)
if(m_gameLblUser[i] != -1)
m_btnMgr.hide(m_gameLblUser[i], instant);
}
@ -352,9 +352,9 @@ void CMenu::_showGame(void)
if(!m_zoom_banner)
{
for(u16 i = 0; i < ARRAY_SIZE(m_gameLblUser); ++i)
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser); ++i)
{
if(m_gameLblUser[i] != (u16)-1)
if(m_gameLblUser[i] != -1)
m_btnMgr.show(m_gameLblUser[i]);
}
m_btnMgr.show(m_gameBtnPlay);
@ -541,7 +541,7 @@ void CMenu::_game(bool launch)
if(!m_gameSound.IsPlaying())
startGameSound = -6;
}
else if(launch || m_btnMgr.selected(m_gameBtnPlay) || m_btnMgr.selected(m_gameBtnPlayFull) || (!WPadIR_Valid(0) && !WPadIR_Valid(1) && !WPadIR_Valid(2) && !WPadIR_Valid(3) && m_btnMgr.selected((u16)-1)))
else if(launch || m_btnMgr.selected(m_gameBtnPlay) || m_btnMgr.selected(m_gameBtnPlayFull) || !m_show_zone_game)
{
_hideGame();
m_gameSound.FreeMemory();
@ -684,7 +684,7 @@ void CMenu::_game(bool launch)
m_btnMgr.hide(m_gameBtnToogleFull);
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser); ++i)
{
if(m_gameLblUser[i] != (u16)-1)
if(m_gameLblUser[i] != -1)
m_btnMgr.show(m_gameLblUser[i]);
}
if(!m_locked)
@ -715,7 +715,7 @@ void CMenu::_game(bool launch)
m_btnMgr.hide(m_gameBtnBack);
m_btnMgr.hide(m_gameBtnToogle);
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser); ++i)
if (m_gameLblUser[i] != (u16)-1)
if (m_gameLblUser[i] != -1)
m_btnMgr.hide(m_gameLblUser[i]);
}
}

View File

@ -146,11 +146,11 @@ void CMenu::_gameinfo(void)
m_btnMgr.hide(m_gameinfoLblWifiplayers, true);
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblControlsReq); ++i)
if(m_gameinfoLblControlsReq[i] != (u16)-1)
if(m_gameinfoLblControlsReq[i] != -1)
m_btnMgr.hide(m_gameinfoLblControlsReq[i], true);
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblControls); ++i)
if(m_gameinfoLblControls[i] != (u16)-1)
if(m_gameinfoLblControls[i] != -1)
m_btnMgr.hide(m_gameinfoLblControls[i], true);
// When showing synopsis, only show user labels 2 and 3
@ -176,11 +176,11 @@ void CMenu::_gameinfo(void)
m_btnMgr.show(m_gameinfoLblWifiplayers);
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblControlsReq); ++i)
if(m_gameinfoLblControlsReq[i] != (u16)-1 && i < cnt_controlsreq)
if(m_gameinfoLblControlsReq[i] != -1 && i < cnt_controlsreq)
m_btnMgr.show(m_gameinfoLblControlsReq[i]);
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblControls); ++i)
if(m_gameinfoLblControls[i] != (u16)-1 && i < cnt_controls)
if(m_gameinfoLblControls[i] != -1 && i < cnt_controls)
m_btnMgr.show(m_gameinfoLblControls[i]);
// When showing synopsis, only show user labels 2 and 3
@ -212,14 +212,14 @@ void CMenu::_hideGameInfo(bool instant)
m_btnMgr.hide(m_gameinfoLblWifiplayers, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblControlsReq); ++i)
if(m_gameinfoLblControlsReq[i] != (u16)-1)
if(m_gameinfoLblControlsReq[i] != -1)
m_btnMgr.hide(m_gameinfoLblControlsReq[i], instant);
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblUser); ++i)
m_btnMgr.hide(m_gameinfoLblUser[i], instant);
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblControls); ++i)
if(m_gameinfoLblControls[i] != (u16)-1)
if(m_gameinfoLblControls[i] != -1)
m_btnMgr.hide(m_gameinfoLblControls[i], instant);
}
@ -246,11 +246,11 @@ void CMenu::_showGameInfo(void)
m_btnMgr.show(m_gameinfoLblUser[i]);
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblControlsReq); ++i)
if(m_gameinfoLblControlsReq[i] != (u16)-1 && i < cnt_controlsreq)
if(m_gameinfoLblControlsReq[i] != -1 && i < cnt_controlsreq)
m_btnMgr.show(m_gameinfoLblControlsReq[i]);
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblControls); ++i)
if(m_gameinfoLblControls[i] != (u16)-1 && i < cnt_controls)
if(m_gameinfoLblControls[i] != -1 && i < cnt_controls)
m_btnMgr.show(m_gameinfoLblControls[i]);
}
}

View File

@ -5,21 +5,21 @@
#include "loader/nk.h"
#include "loader/sys.h"
u32 m_homeLblTitle;
u32 m_exittoLblTitle;
s16 m_homeLblTitle;
s16 m_exittoLblTitle;
u32 m_homeBtnSettings;
u32 m_homeBtnReloadCache;
u32 m_homeBtnUpdate;
u32 m_homeBtnHelp;
u32 m_homeBtnAbout;
u32 m_homeBtnExitTo;
s16 m_homeBtnSettings;
s16 m_homeBtnReloadCache;
s16 m_homeBtnUpdate;
s16 m_homeBtnHelp;
s16 m_homeBtnAbout;
s16 m_homeBtnExitTo;
u32 m_homeBtnExitToHBC;
u32 m_homeBtnExitToMenu;
u32 m_homeBtnExitToPriiloader;
u32 m_homeBtnExitToBootmii;
u32 m_homeBtnExitToNeek;
s16 m_homeBtnExitToHBC;
s16 m_homeBtnExitToMenu;
s16 m_homeBtnExitToPriiloader;
s16 m_homeBtnExitToBootmii;
s16 m_homeBtnExitToNeek;
STexture m_homeBg;

View File

@ -70,7 +70,7 @@ void CMenu::_hideMain(bool instant)
m_btnMgr.hide(m_mainLblLetter, instant);
m_btnMgr.hide(m_mainLblNotice, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_mainLblUser); ++i)
if(m_mainLblUser[i] != (u16)-1)
if(m_mainLblUser[i] != -1)
m_btnMgr.hide(m_mainLblUser[i], instant);
}
@ -136,7 +136,7 @@ void CMenu::_showMain(void)
}
for(u8 i = 0; i < ARRAY_SIZE(m_mainLblUser); ++i)
if(m_mainLblUser[i] != (u16)-1)
if(m_mainLblUser[i] != -1)
m_btnMgr.show(m_mainLblUser[i]);
if(m_gameList.empty())

View File

@ -9,29 +9,29 @@
#include "loader/sys.h"
// NandEmulation menu
u16 m_nandemuLblTitle;
u16 m_nandemuBtnBack;
u16 m_nandemuLblEmulationVal;
u16 m_nandemuLblEmulation;
u16 m_nandemuBtnEmulationM;
u16 m_nandemuBtnEmulationP;
u16 m_nandemuLblSaveDump;
u16 m_nandemuBtnAll;
u16 m_nandemuBtnMissing;
u16 m_nandemuLblNandDump;
u16 m_nandemuBtnNandDump;
u16 m_nandfileLblMessage;
u16 m_nandemuLblMessage;
u16 m_nandfileLblDialog;
u16 m_nandfinLblDialog;
u16 m_nandemuLblDialog;
u16 m_nandfilePBar;
u16 m_nandemuPBar;
u16 m_nandemuBtnExtract;
u16 m_nandemuBtnDisable;
u16 m_nandemuBtnPartition;
u16 m_nandemuLblInit;
u16 m_nandemuLblUser[4];
s16 m_nandemuLblTitle;
s16 m_nandemuBtnBack;
s16 m_nandemuLblEmulationVal;
s16 m_nandemuLblEmulation;
s16 m_nandemuBtnEmulationM;
s16 m_nandemuBtnEmulationP;
s16 m_nandemuLblSaveDump;
s16 m_nandemuBtnAll;
s16 m_nandemuBtnMissing;
s16 m_nandemuLblNandDump;
s16 m_nandemuBtnNandDump;
s16 m_nandfileLblMessage;
s16 m_nandemuLblMessage;
s16 m_nandfileLblDialog;
s16 m_nandfinLblDialog;
s16 m_nandemuLblDialog;
s16 m_nandfilePBar;
s16 m_nandemuPBar;
s16 m_nandemuBtnExtract;
s16 m_nandemuBtnDisable;
s16 m_nandemuBtnPartition;
s16 m_nandemuLblInit;
s16 m_nandemuLblUser[4];
STexture m_nandemuBg;
bool m_nandext;

View File

@ -7,16 +7,16 @@ u32 Plugin_curPage;
u8 Plugin_lastBtn;
// Plugin menu
u16 m_pluginLblPage;
u16 m_pluginBtnPageM;
u16 m_pluginBtnPageP;
u16 m_pluginBtnBack;
u16 m_pluginLblTitle;
u16 m_pluginLblCat[21];
u16 m_pluginBtn[21];
u16 m_pluginBtnCat[21];
u16 m_pluginBtnCats[21];
u16 m_pluginLblUser[4];
s16 m_pluginLblPage;
s16 m_pluginBtnPageM;
s16 m_pluginBtnPageP;
s16 m_pluginBtnBack;
s16 m_pluginLblTitle;
s16 m_pluginLblCat[21];
s16 m_pluginBtn[21];
s16 m_pluginBtnCat[21];
s16 m_pluginBtnCats[21];
s16 m_pluginLblUser[4];
u8 m_max_plugins;
STexture m_pluginBg;
@ -29,7 +29,7 @@ void CMenu::_hidePluginSettings(bool instant)
m_btnMgr.hide(m_pluginBtnPageP, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_pluginLblUser); ++i)
{
if(m_pluginLblUser[i] != (u16)-1)
if(m_pluginLblUser[i] != -1)
m_btnMgr.hide(m_pluginLblUser[i], instant);
}
@ -45,7 +45,7 @@ void CMenu::_showPluginSettings(void)
_setBg(m_pluginBg, m_pluginBg);
for(u8 i = 0; i < ARRAY_SIZE(m_pluginLblUser); ++i)
{
if(m_pluginLblUser[i] != (u16)-1)
if(m_pluginLblUser[i] != -1)
m_btnMgr.show(m_pluginLblUser[i]);
}
m_btnMgr.show(m_pluginLblTitle);

View File

@ -24,19 +24,19 @@ string m_sourceDir;
Config m_source;
// Source menu
u16 m_sourceLblNotice;
u16 m_sourceLblPage;
u16 m_sourceBtnPageM;
u16 m_sourceBtnPageP;
u16 m_sourceLblTitle;
u16 m_sourceBtnSource[12];
u16 m_sourceLblUser[4];
s16 m_sourceLblNotice;
s16 m_sourceLblPage;
s16 m_sourceBtnPageM;
s16 m_sourceBtnPageP;
s16 m_sourceLblTitle;
s16 m_sourceBtnSource[12];
s16 m_sourceLblUser[4];
STexture m_sourceBg;
u16 m_sourceBtnDML;
u16 m_sourceBtnEmu;
u16 m_sourceBtnUsb;
u16 m_sourceBtnChannel;
u16 m_sourceBtnHomebrew;
s16 m_sourceBtnDML;
s16 m_sourceBtnEmu;
s16 m_sourceBtnUsb;
s16 m_sourceBtnChannel;
s16 m_sourceBtnHomebrew;
void CMenu::_hideSource(bool instant)
{
@ -54,7 +54,7 @@ void CMenu::_hideSource(bool instant)
u8 i = 0;
for(i = 0; i < ARRAY_SIZE(m_sourceLblUser); ++i)
{
if(m_sourceLblUser[i] != (u16)-1)
if(m_sourceLblUser[i] != -1)
m_btnMgr.hide(m_sourceLblUser[i], instant);
}
@ -69,7 +69,7 @@ void CMenu::_showSource(void)
u8 i = 0;
for(i = 0; i < ARRAY_SIZE(m_sourceLblUser); ++i)
{
if(m_sourceLblUser[i] != (u16)-1)
if(m_sourceLblUser[i] != -1)
m_btnMgr.show(m_sourceLblUser[i]);
}

View File

@ -219,7 +219,7 @@ void CMenu::_hideSystem(bool instant)
m_btnMgr.hide(m_systemBtnVerSelectM);
m_btnMgr.hide(m_systemBtnVerSelectP);
for(u8 i = 0; i < ARRAY_SIZE(m_systemLblUser); ++i)
if(m_systemLblUser[i] != (u16)-1)
if(m_systemLblUser[i] != -1)
m_btnMgr.hide(m_systemLblUser[i], instant);
}
@ -236,7 +236,7 @@ void CMenu::_showSystem(void)
m_btnMgr.show(m_systemBtnVerSelectP);
m_btnMgr.show(m_systemBtnDownload);
for(u8 i = 0; i < ARRAY_SIZE(m_systemLblUser); ++i)
if(m_systemLblUser[i] != (u16)-1)
if(m_systemLblUser[i] != -1)
m_btnMgr.show(m_systemLblUser[i]);
_textSystem();
}

View File

@ -19,7 +19,7 @@ void CMenu::_hideWBFS(bool instant)
m_btnMgr.hide(m_wbfsLblDialog);
m_btnMgr.hide(m_wbfsLblMessage);
for(u8 i = 0; i < ARRAY_SIZE(m_wbfsLblUser); ++i)
if(m_wbfsLblUser[i] != (u16)-1)
if(m_wbfsLblUser[i] != -1)
m_btnMgr.hide(m_wbfsLblUser[i], instant);
}
@ -46,16 +46,16 @@ void CMenu::_showWBFS(CMenu::WBFS_OP op)
m_btnMgr.show(m_wbfsBtnGo);
m_btnMgr.show(m_wbfsLblDialog);
for(u8 i = 0; i < ARRAY_SIZE(m_wbfsLblUser); ++i)
if(m_wbfsLblUser[i] != (u16)-1)
if(m_wbfsLblUser[i] != -1)
m_btnMgr.show(m_wbfsLblUser[i]);
}
static void slotLight(bool state)
{
if (state)
*(u32 *)0xCD0000C0 |= 0x20;
*(u32 *)0xCD0000C0 |= 0x20;
else
*(u32 *)0xCD0000C0 &= ~0x20;
*(u32 *)0xCD0000C0 &= ~0x20;
}
void CMenu::_addDiscProgress(int status, int total, void *user_data)