Does anybody know, how I can fix this problem:
Here is the code:
Code: while (kb_Data[1] != kb_Clear && kb_Data[1] != kb_2nd)//Controls
{
gfx_SetDrawBuffer();
gfx_RotateSprite(ro, rotate_sprite, a + s);//Rotate the sprite
gfx_SetColor(7);
gfx_FillRectangle_NoClip(210,10,105,220);//Green background
gfx_SetTextFGColor(231);//Black text color
gfx_SetTextBGColor(255);//Transparent text background
gfx_SetTextScale(1,1);//Text size for title
gfx_SetTextXY(110,10);//Title position
gfx_PrintString("Roulette v0.2.0");//Print title
gfx_TransparentSprite_NoClip(rotate_sprite, 17, 69);//Show rotated sprite
gfx_TransparentSprite_NoClip(pfeil, 59, 36);//Show arrow
/*Create table*/
gfx_SetColor(231);
for(y = 0; y<15; ++y)
{
gfx_Line(215, (y + 1) * 14, 310, (y + 1) * 14);
}
for(z = 0; z<6; ++z)
{
if (z != 1 && z != 0)
{
gfx_Line(220 + (z * 18), 14, 220 + (z * 18), 210);
}
}
if (kb_Data[1] == kb_Clear || kb_Data[1] == kb_2nd) {break;}//Exit
/*Create table*/
/*Print numbers in table*/
gfx_SetTextScale(1,1);//Text size for numbers
gfx_SetTextFGColor(231);//Black text color
gfx_SetTextXY(280, 17);
gfx_PrintString("0");
gfx_SetTextXY(262, 199);
gfx_PrintString("^");
gfx_SetTextXY(280, 199);
gfx_PrintString("^");
gfx_SetTextXY(298, 199);
gfx_PrintString("^");
gfx_SetColor(7);
gfx_FillRectangle_NoClip(215,14,41,14);
gfx_FillRectangle_NoClip(215,84,41,15);
gfx_FillRectangle_NoClip(215,126,41,15);
gfx_SetColor(8);
gfx_FillTriangle(235,75,225,90,245,90);
gfx_FillTriangle(235,105,225,90,245,90);
gfx_SetColor(231);
gfx_FillTriangle(235,117,225,132,245,132);
gfx_FillTriangle(235,147,225,132,245,132);
gfx_Line(215,29,215,210);
gfx_SetTextXY(222, 31);
gfx_PrintString("1-12");
gfx_SetTextXY(217, 45);
gfx_PrintString("13-24");
gfx_SetTextXY(217, 59);
gfx_PrintString("25-36");
gfx_SetTextXY(222, 157);
gfx_PrintString("1-18");
gfx_SetTextXY(217, 171);
gfx_PrintString("19-36");
gfx_SetTextXY(225, 185);
gfx_PrintString("ODD");
gfx_SetTextXY(222, 199);
gfx_PrintString("EVEN");
g = 1;
if (kb_Data[1] == kb_Clear || kb_Data[1] == kb_2nd) {break;}//Exit
for(y = 0; y < 12; ++y)
{
for(z = 0; z<3; ++z)
{
gfx_SetTextXY(258 + z * 18, 31 + y * 14);
gfx_PrintInt(g, 2);
g++;
}
}
if (kb_Data[1] == kb_Clear || kb_Data[1] == kb_2nd) {break;}//Exit
/*Print numbers in table*/
gfx_SetTextFGColor(231);//Black text color
gfx_SetTextBGColor(255);//Transparent text background
gfx_SetTextScale(1,1);//Text size for Title
gfx_SetTextXY(110,10);//Title position
gfx_PrintString("Roulette v0.2.0");//Print title
gfx_SetTextScale(3,3);//Text size for number
gfx_SetTextXY(56,200);//number position
gfx_SetTextFGColor(c);//Text color of number
gfx_PrintInt(e,2);//Print number
gfx_RotateSprite(ro, rotate_sprite, n);//Rotate the sprite
gfx_TransparentSprite_NoClip(rotate_sprite, 17, 69);//Show rotated sprite
gfx_TransparentSprite_NoClip(pfeil, 59, 36);//Show arrow
gfx_SwapDraw();
if (kb_Data[1] == kb_Clear || kb_Data[1] == kb_2nd) {break;}//Exit
if(kb_Data[1] == kb_Up)//Up
{
if(posy > 1){posy = posy - 1;}
}
if(kb_Data[1] == kb_Down)//Down
{
if(posy < 15){posy = posy + 1;}
}
if(kb_Data[1] == kb_Up)//Left
{
if(posy > 1){posx = posx - 1;}
}
if(kb_Data[1] == kb_Up)//Right
{
if(posy < 6){posx = posx + 1;}
}
}