mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-19 00:11:55 +01:00
*Fixed some Themeprompts problems thx to julienstephan
*Added new effects (EFFECT_PULSE, EFFECT_GOROUND and EFFECT_ROCK_VERTICLE)
This commit is contained in:
parent
516baef59f
commit
899502b766
@ -45,6 +45,8 @@ Doyouwanttoretryfor30secs = R
|
|||||||
Downloadingfile = Téléchargement du fichier :
|
Downloadingfile = Téléchargement du fichier :
|
||||||
DownloadBoxartimage = Télécharger les jaquettes ?
|
DownloadBoxartimage = Télécharger les jaquettes ?
|
||||||
Downloadfinished = Téléchargement terminé
|
Downloadfinished = Téléchargement terminé
|
||||||
|
Defaultgamesettings = Réinitialiser les paramètres du jeu
|
||||||
|
Defaultsettings = Réinitialiser les paramètres par défaut
|
||||||
Error = Erreur !
|
Error = Erreur !
|
||||||
hour = Heures
|
hour = Heures
|
||||||
Homemenu = Menu HOME
|
Homemenu = Menu HOME
|
||||||
@ -120,6 +122,7 @@ OFF = D
|
|||||||
OfficialSite = Site Officiel
|
OfficialSite = Site Officiel
|
||||||
ok = OK
|
ok = OK
|
||||||
ON = Activé
|
ON = Activé
|
||||||
|
OnlyInstall = Jeu installé seulement
|
||||||
Parentalcontrol = Contrôle parental
|
Parentalcontrol = Contrôle parental
|
||||||
Partition = Partition
|
Partition = Partition
|
||||||
Password = Mot de passe
|
Password = Mot de passe
|
||||||
@ -177,6 +180,7 @@ Waiting = En attente...
|
|||||||
WaitingforUSBDevice = Attente d'un périphérique USB
|
WaitingforUSBDevice = Attente d'un périphérique USB
|
||||||
WidescreenFix = 16:9
|
WidescreenFix = 16:9
|
||||||
WiiMenu = Menu Wii
|
WiiMenu = Menu Wii
|
||||||
|
Wiilight = Illumination Wii
|
||||||
WrongPassword = Mot de passe incorrect
|
WrongPassword = Mot de passe incorrect
|
||||||
Yes = Oui
|
Yes = Oui
|
||||||
YoudonthavecIOS = cIOS222 non installé
|
YoudonthavecIOS = cIOS222 non installé
|
||||||
|
@ -116,6 +116,9 @@ typedef struct _paddata {
|
|||||||
#define EFFECT_FADE 64
|
#define EFFECT_FADE 64
|
||||||
#define EFFECT_SCALE 128
|
#define EFFECT_SCALE 128
|
||||||
#define EFFECT_COLOR_TRANSITION 256
|
#define EFFECT_COLOR_TRANSITION 256
|
||||||
|
#define EFFECT_PULSE 512
|
||||||
|
#define EFFECT_ROCK_VERTICLE 1024
|
||||||
|
#define EFFECT_GOROUND 2048
|
||||||
|
|
||||||
//!Sound conversion and playback. A wrapper for other sound libraries - ASND, libmad, ltremor, etc
|
//!Sound conversion and playback. A wrapper for other sound libraries - ASND, libmad, ltremor, etc
|
||||||
class GuiSound
|
class GuiSound
|
||||||
@ -337,6 +340,8 @@ class GuiElement
|
|||||||
void SetEffectOnOver(int e, int a, int t=0);
|
void SetEffectOnOver(int e, int a, int t=0);
|
||||||
//!Shortcut to SetEffectOnOver(EFFECT_SCALE, 4, 110)
|
//!Shortcut to SetEffectOnOver(EFFECT_SCALE, 4, 110)
|
||||||
void SetEffectGrow();
|
void SetEffectGrow();
|
||||||
|
//!Stops the current element effect
|
||||||
|
void StopEffect();
|
||||||
//!Gets the current element effects
|
//!Gets the current element effects
|
||||||
//!\return element effects
|
//!\return element effects
|
||||||
int GetEffect();
|
int GetEffect();
|
||||||
@ -403,6 +408,9 @@ class GuiElement
|
|||||||
int xmax; //!< Element's max X offset allowed
|
int xmax; //!< Element's max X offset allowed
|
||||||
int xoffsetDyn; //!< Element X offset, dynamic (added to xoffset value for animation effects)
|
int xoffsetDyn; //!< Element X offset, dynamic (added to xoffset value for animation effects)
|
||||||
int yoffsetDyn; //!< Element Y offset, dynamic (added to yoffset value for animation effects)
|
int yoffsetDyn; //!< Element Y offset, dynamic (added to yoffset value for animation effects)
|
||||||
|
f32 degree; //!< Degree for flying stuff
|
||||||
|
f32 yoffsetDynFloat; //!< Integer sucks float is need by some parts
|
||||||
|
int changervar; //!< Changervariable for some stuff
|
||||||
int alpha; //!< Element alpha value (0-255)
|
int alpha; //!< Element alpha value (0-255)
|
||||||
f32 scale; //!< Element scale (1 = 100%)
|
f32 scale; //!< Element scale (1 = 100%)
|
||||||
int alphaDyn; //!< Element alpha, dynamic (multiplied by alpha value for blending/fading effects)
|
int alphaDyn; //!< Element alpha, dynamic (multiplied by alpha value for blending/fading effects)
|
||||||
|
@ -44,6 +44,7 @@ GuiElement::GuiElement()
|
|||||||
updateCB = NULL;
|
updateCB = NULL;
|
||||||
yoffsetDyn = 0;
|
yoffsetDyn = 0;
|
||||||
xoffsetDyn = 0;
|
xoffsetDyn = 0;
|
||||||
|
yoffsetDynFloat = 0;
|
||||||
alphaDyn = -1;
|
alphaDyn = -1;
|
||||||
scaleDyn = 1;
|
scaleDyn = 1;
|
||||||
effects = 0;
|
effects = 0;
|
||||||
@ -52,6 +53,8 @@ GuiElement::GuiElement()
|
|||||||
effectsOver = 0;
|
effectsOver = 0;
|
||||||
effectAmountOver = 0;
|
effectAmountOver = 0;
|
||||||
effectTargetOver = 0;
|
effectTargetOver = 0;
|
||||||
|
degree = 0;
|
||||||
|
changervar = 0;
|
||||||
|
|
||||||
// default alignment - align to top left
|
// default alignment - align to top left
|
||||||
alignmentVert = ALIGN_TOP;
|
alignmentVert = ALIGN_TOP;
|
||||||
@ -89,7 +92,7 @@ int GuiElement::GetLeft()
|
|||||||
pLeft = parentElement->GetLeft();
|
pLeft = parentElement->GetLeft();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(effects & (EFFECT_SLIDE_IN | EFFECT_SLIDE_OUT))
|
if(effects & (EFFECT_SLIDE_IN | EFFECT_SLIDE_OUT | EFFECT_GOROUND | EFFECT_ROCK_VERTICLE))
|
||||||
pLeft += xoffsetDyn;
|
pLeft += xoffsetDyn;
|
||||||
|
|
||||||
switch(alignmentHor)
|
switch(alignmentHor)
|
||||||
@ -124,7 +127,7 @@ int GuiElement::GetTop()
|
|||||||
pTop = parentElement->GetTop();
|
pTop = parentElement->GetTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(effects & (EFFECT_SLIDE_IN | EFFECT_SLIDE_OUT))
|
if(effects & (EFFECT_SLIDE_IN | EFFECT_SLIDE_OUT | EFFECT_GOROUND | EFFECT_ROCK_VERTICLE))
|
||||||
pTop += yoffsetDyn;
|
pTop += yoffsetDyn;
|
||||||
|
|
||||||
switch(alignmentVert)
|
switch(alignmentVert)
|
||||||
@ -424,6 +427,7 @@ void GuiElement::SetEffect(int eff, int amount, int target)
|
|||||||
else if(eff & EFFECT_SLIDE_RIGHT)
|
else if(eff & EFFECT_SLIDE_RIGHT)
|
||||||
xoffsetDyn = screenwidth;
|
xoffsetDyn = screenwidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(eff & EFFECT_FADE && amount > 0)
|
if(eff & EFFECT_FADE && amount > 0)
|
||||||
{
|
{
|
||||||
alphaDyn = 0;
|
alphaDyn = 0;
|
||||||
@ -431,6 +435,14 @@ void GuiElement::SetEffect(int eff, int amount, int target)
|
|||||||
else if(eff & EFFECT_FADE && amount < 0)
|
else if(eff & EFFECT_FADE && amount < 0)
|
||||||
{
|
{
|
||||||
alphaDyn = alpha;
|
alphaDyn = alpha;
|
||||||
|
|
||||||
|
} else if(eff & EFFECT_GOROUND) {
|
||||||
|
xoffsetDyn = 0;
|
||||||
|
yoffsetDyn = -200;
|
||||||
|
} else if(eff & EFFECT_ROCK_VERTICLE) {
|
||||||
|
changervar = 0;
|
||||||
|
yoffsetDyn = 0;
|
||||||
|
yoffsetDynFloat = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
effects |= eff;
|
effects |= eff;
|
||||||
@ -451,10 +463,26 @@ void GuiElement::SetEffectGrow()
|
|||||||
SetEffectOnOver(EFFECT_SCALE, 4, 110);
|
SetEffectOnOver(EFFECT_SCALE, 4, 110);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GuiElement::StopEffect()
|
||||||
|
{
|
||||||
|
xoffsetDyn = 0;
|
||||||
|
yoffsetDyn = 0;
|
||||||
|
effects = 0;
|
||||||
|
effectsOver = 0;
|
||||||
|
effectAmount = 0;
|
||||||
|
effectAmountOver = 0;
|
||||||
|
effectTarget = 0;
|
||||||
|
effectTargetOver = 0;
|
||||||
|
scaleDyn = 1;
|
||||||
|
degree = 0;
|
||||||
|
changervar = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void GuiElement::UpdateEffects()
|
void GuiElement::UpdateEffects()
|
||||||
{
|
{
|
||||||
LOCK(this);
|
LOCK(this);
|
||||||
if(effects & (EFFECT_SLIDE_IN | EFFECT_SLIDE_OUT))
|
|
||||||
|
if(effects & (EFFECT_SLIDE_IN | EFFECT_SLIDE_OUT | EFFECT_GOROUND))
|
||||||
{
|
{
|
||||||
if(effects & EFFECT_SLIDE_IN)
|
if(effects & EFFECT_SLIDE_IN)
|
||||||
{
|
{
|
||||||
@ -531,6 +559,42 @@ void GuiElement::UpdateEffects()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(effects & EFFECT_GOROUND) {
|
||||||
|
|
||||||
|
if(degree < 2*PI) { //here we can let it cicle less/more than 2*PI which is 360°
|
||||||
|
int Radius = 200; //this needs to be moved to a global variable
|
||||||
|
degree += 0.08; //this defines the flying speed
|
||||||
|
|
||||||
|
xoffsetDyn = (int)(Radius*cos(degree-PI/2)); //here we can make the startdegree different
|
||||||
|
yoffsetDyn = (int)(Radius*sin(degree-PI/2)); //(by changing the radian degree of cos/sin
|
||||||
|
|
||||||
|
} else {
|
||||||
|
xoffsetDyn = 0;
|
||||||
|
yoffsetDyn += 0.08*100;
|
||||||
|
if(yoffsetDyn >= 0) {
|
||||||
|
effects = 0;
|
||||||
|
degree = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(effects & EFFECT_ROCK_VERTICLE) {
|
||||||
|
//move up to 10pixel above 0
|
||||||
|
if(changervar == 0 && yoffsetDynFloat < 11.0) {
|
||||||
|
yoffsetDynFloat += (effectAmount*0.01);
|
||||||
|
} else if(yoffsetDynFloat > 10.0) {
|
||||||
|
changervar = 1;
|
||||||
|
}
|
||||||
|
//move down till 10pixel under 0
|
||||||
|
if(changervar == 1 && yoffsetDynFloat > -11.0) {
|
||||||
|
yoffsetDynFloat -= (effectAmount*0.01);
|
||||||
|
} else if(yoffsetDynFloat < -10.0) {
|
||||||
|
changervar = 0;
|
||||||
|
}
|
||||||
|
yoffsetDyn = (int)(yoffsetDynFloat);
|
||||||
|
}
|
||||||
|
|
||||||
if(effects & EFFECT_FADE)
|
if(effects & EFFECT_FADE)
|
||||||
{
|
{
|
||||||
alphaDyn += effectAmount;
|
alphaDyn += effectAmount;
|
||||||
@ -546,7 +610,7 @@ void GuiElement::UpdateEffects()
|
|||||||
effects = 0; // shut off effect
|
effects = 0; // shut off effect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(effects & EFFECT_SCALE)
|
if(effects & EFFECT_SCALE)
|
||||||
{
|
{
|
||||||
scaleDyn += effectAmount/100.0;
|
scaleDyn += effectAmount/100.0;
|
||||||
|
|
||||||
@ -557,6 +621,21 @@ void GuiElement::UpdateEffects()
|
|||||||
effects = 0; // shut off effect
|
effects = 0; // shut off effect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(effects & EFFECT_PULSE)
|
||||||
|
{
|
||||||
|
int percent = 10; //go down from target by this
|
||||||
|
|
||||||
|
if((scaleDyn <= (effectTarget*0.01)) && (!changervar)) {
|
||||||
|
scaleDyn += (effectAmount*0.001);
|
||||||
|
} else if(scaleDyn > (effectTarget*0.01)) {
|
||||||
|
changervar = 1;
|
||||||
|
}
|
||||||
|
if((scaleDyn >= ((effectTarget-percent)*0.01)) && (changervar)) {
|
||||||
|
scaleDyn -= (effectAmount*0.001);
|
||||||
|
} else if(scaleDyn < ((effectTarget-percent)*0.01)) {
|
||||||
|
changervar = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiElement::Update(GuiTrigger * t)
|
void GuiElement::Update(GuiTrigger * t)
|
||||||
|
@ -1612,6 +1612,8 @@ DiscWait(const char *title, const char *msg, const char *btn1Label, const char *
|
|||||||
mainWindow->ChangeFocus(&promptWindow);
|
mainWindow->ChangeFocus(&promptWindow);
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
|
|
||||||
|
SDCard_deInit();
|
||||||
|
|
||||||
if(IsDeviceWait) {
|
if(IsDeviceWait) {
|
||||||
while(i >= 0)
|
while(i >= 0)
|
||||||
{
|
{
|
||||||
@ -1625,7 +1627,7 @@ DiscWait(const char *title, const char *msg, const char *btn1Label, const char *
|
|||||||
}
|
}
|
||||||
sleep(1);
|
sleep(1);
|
||||||
ret = WBFS_Init(WBFS_DEVICE_USB);
|
ret = WBFS_Init(WBFS_DEVICE_USB);
|
||||||
if(ret>=0)
|
if(ret>=0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
i--;
|
i--;
|
||||||
@ -5405,18 +5407,16 @@ static int MenuCheck()
|
|||||||
ret2 = WBFS_Init(WBFS_DEVICE_USB);
|
ret2 = WBFS_Init(WBFS_DEVICE_USB);
|
||||||
if (ret2 < 0)
|
if (ret2 < 0)
|
||||||
{
|
{
|
||||||
//shutdown SD
|
|
||||||
SDCard_deInit();
|
|
||||||
//initialize WiiMote for Prompt
|
//initialize WiiMote for Prompt
|
||||||
Wpad_Init();
|
Wpad_Init();
|
||||||
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
|
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
|
||||||
WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight);
|
WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight);
|
||||||
|
|
||||||
ret2 = WindowPrompt(LANGUAGE.NoUSBDevicefound,
|
ret2 = WindowPrompt(LANGUAGE.NoUSBDevicefound,
|
||||||
LANGUAGE.Doyouwanttoretryfor30secs,
|
LANGUAGE.Doyouwanttoretryfor30secs,
|
||||||
"cIOS249", "cIOS222",
|
"cIOS249", "cIOS222",
|
||||||
LANGUAGE.BacktoWiiMenu, 0);
|
LANGUAGE.BacktoWiiMenu, 0);
|
||||||
|
//shutdown SD
|
||||||
|
SDCard_deInit();
|
||||||
if(ret2 == 1) {
|
if(ret2 == 1) {
|
||||||
Settings.cios = ios249;
|
Settings.cios = ios249;
|
||||||
} else if(ret2 == 2) {
|
} else if(ret2 == 2) {
|
||||||
@ -5429,7 +5429,8 @@ static int MenuCheck()
|
|||||||
WPAD_Disconnect(0);
|
WPAD_Disconnect(0);
|
||||||
WPAD_Shutdown();
|
WPAD_Shutdown();
|
||||||
|
|
||||||
ret2 = DiscWait(LANGUAGE.NoUSBDevice, LANGUAGE.WaitingforUSBDevice, 0, 0, 1);
|
SDCard_Init();
|
||||||
|
ret2 = DiscWait(LANGUAGE.NoUSBDevice, LANGUAGE.WaitingforUSBDevice, 0, 0, 1);
|
||||||
PAD_Init();
|
PAD_Init();
|
||||||
Wpad_Init();
|
Wpad_Init();
|
||||||
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
|
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
|
||||||
@ -5437,7 +5438,9 @@ static int MenuCheck()
|
|||||||
SDCard_Init();
|
SDCard_Init();
|
||||||
}
|
}
|
||||||
if (ret2 < 0) {
|
if (ret2 < 0) {
|
||||||
WindowPrompt (LANGUAGE.Error,LANGUAGE.USBDevicenotfound, LANGUAGE.ok, 0,0,0);
|
SDCard_Init();
|
||||||
|
WindowPrompt (LANGUAGE.Error,LANGUAGE.USBDevicenotfound, LANGUAGE.ok, 0,0,0);
|
||||||
|
SDCard_deInit();
|
||||||
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
|
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
PAD_Init();
|
PAD_Init();
|
||||||
@ -5449,17 +5452,20 @@ static int MenuCheck()
|
|||||||
|
|
||||||
ret2 = Disc_Init();
|
ret2 = Disc_Init();
|
||||||
if (ret2 < 0) {
|
if (ret2 < 0) {
|
||||||
|
SDCard_Init();
|
||||||
WindowPrompt (LANGUAGE.Error,LANGUAGE.CouldnotinitializeDIPmodule,LANGUAGE.ok, 0,0,0);
|
WindowPrompt (LANGUAGE.Error,LANGUAGE.CouldnotinitializeDIPmodule,LANGUAGE.ok, 0,0,0);
|
||||||
|
SDCard_deInit();
|
||||||
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
|
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret2 = WBFS_Open();
|
ret2 = WBFS_Open();
|
||||||
if (ret2 < 0) {
|
if (ret2 < 0) {
|
||||||
|
SDCard_Init();
|
||||||
choice = WindowPrompt(LANGUAGE.NoWBFSpartitionfound,
|
choice = WindowPrompt(LANGUAGE.NoWBFSpartitionfound,
|
||||||
LANGUAGE.Youneedtoformatapartition,
|
LANGUAGE.Youneedtoformatapartition,
|
||||||
LANGUAGE.Format,
|
LANGUAGE.Format,
|
||||||
LANGUAGE.Return,0,0);
|
LANGUAGE.Return,0,0);
|
||||||
|
SDCard_deInit();
|
||||||
if(choice == 0)
|
if(choice == 0)
|
||||||
{
|
{
|
||||||
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
|
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
|
||||||
@ -5469,8 +5475,9 @@ static int MenuCheck()
|
|||||||
u32 sector_size;
|
u32 sector_size;
|
||||||
ret2 = Partition_GetEntries(partitions, §or_size);
|
ret2 = Partition_GetEntries(partitions, §or_size);
|
||||||
if (ret2 < 0) {
|
if (ret2 < 0) {
|
||||||
|
SDCard_Init();
|
||||||
WindowPrompt (LANGUAGE.Nopartitionsfound,0, LANGUAGE.Restart, 0,0,0);
|
WindowPrompt (LANGUAGE.Nopartitionsfound,0, LANGUAGE.Restart, 0,0,0);
|
||||||
|
SDCard_deInit();
|
||||||
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
|
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user