// this sets the color to red
r=255;
g=0;
b=0;
char*key=GetKeyState();
MovementRL=key[KEY_RIGHT]-key[KEY_LEFT];
switch (MovementRL)
{
case 1:
x+=4;
Direction=1;
if (Jumping==0)
{Stance=1;}
break;
case -1:
x-=4;
Direction=3;
if (Jumping==0)
{Stance=1;}
break;
case 0:
if (Stance==1)
{Stance=0;}
break;
}
MovementUD=key[KEY_UP]-key[KEY_DOWN];
switch (MovementUD)
{
case 1:
y-=4;
Direction=4;
Stance=1
break;
case -1:
y+=4;
Direction=2;
Stance=1
break;
case 0:
if (Stance==1)
{Stance=0;}
break;
}
switch (Direction)
{
case (1)
strcpy(DirString, "Right");
break:
case (2)
strcpy(DirString, "Down");
break:
case (3)
strcpy(DirString, "Left");
break:
case (4)
strcpy(DirString, "Up");
break:
}
strcpy(SSString[0], "Green");
strcpy(SSString[1], "Red");
strcpy(SSString[2], "Night");
Users browsing this forum: No registered users and 1 guest