Tonma (./35):
Hi,
First, please, correct your code to remove all warnings. It's difficult to find error when you have too much warnings information and you soft will work better.
>> low arrow doesn't disappear after reaching of last page.
You need to change the test of the number of pages. When you have 2 pages, you only have page 0 and page 1.
if(page==numberofpages-1)
{
arrow1X=320;
arrow2X=288;
}
>> blue arrows in ArrowHorAnim and ArrowVertAnim functions are refusing to move automatically
you init variable path=0; every frame, you "path" value never change. Test value with writing variable on screen. Move the variable like
void instruction() {
ushort *data;
ushort flipMode=0;
button_available=true;
mode=3;
page=0;
numberofpages=2;
path = 0;
As I found out, it was need to move to the begin of functions using
ArrowHor/VertAnim also
direction variable too.
Next piece of question: why after selection of exit options in
StartMenu and
PauseMenu functions -
if(p1e&JOY_A)
{
if(roll==0)
{
clearSprites(22,48);
if(choice==0) Scene0(0);
if(choice==1) settings(0, choice, 0);
if(choice==2) instruction();
if(choice==3) information();
if(choice==4) main();
}
}
if(p1e&JOY_A)
{
if(roll==0)
{
clearSprites(55,22);
clearFixLayer();
if(choice==0)
{
if(whatscenefrom==1) Scene0(ret_choice);
if(whatscenefrom==2) Scene1(ret_choice);
if(whatscenefrom==3) Scene2(ret_choice);
if(whatscenefrom==4) Scene3(ret_choice);
if(whatscenefrom==5) Scene4(ret_choice);
if(whatscenefrom==6) Scene5(ret_choice);
if(whatscenefrom==7) Home1(ret_choice);
if(whatscenefrom==8) Home2(ret_choice);
if(whatscenefrom==9) Scene6(ret_choice,0);
if(whatscenefrom==10) Lose1(ret_choice);
if(whatscenefrom==11) Lose2(ret_choice);
if(whatscenefrom==12) Lose3(ret_choice);
if(whatscenefrom==13) miniGame();
}
if(choice==1) settings(ret_choice, choice, 0);
if(choice==2) main();
}
}
- icons and arrow sprites doesn't disappear, as if sprite clearing doesn't work, unlike case of
main function call in the end of
GameOver function?
void GameOver()
{
int screenTimer=0;
button_available=false;
current_track=2;
if(soundOFF==0) PlayMusic(current_track);
if(success==0)
{
fixPrint(15,15,4,3,"GAME OVER");
}
else
{
fixPrint(16,15,4,3,"YOU WIN!");
}
while(1) {
SCClose();
waitVBlank();
if(++screenTimer==780)
{
screenTimer=0;
success=0;
action=0;
main();
}
}
}