Fix invaders nickdisplay

This commit is contained in:
Stefan `Sec` Zehl 2011-08-12 13:27:38 +02:00
parent ffb4dae48c
commit b605025acf
1 changed files with 10 additions and 3 deletions

View File

@ -28,11 +28,18 @@ void ram(void)
const int maxY = 30; const int maxY = 30;
const int space = 15; const int space = 15;
const int delaytime = 150; const int delaytime = 150;
const int defaultfont = font;
int x = minX; int x = minX;
int y = minY; int y = minY;
int u = 0; int u = 0;
int dir = 0; int dir = 0;
int dx,dy;
dx=DoString(0,0,nickname);
dx=(RESX-dx)/2;
if(dx<0)
dx=0;
dy=40;
while(1){ while(1){
lcdFill(0); lcdFill(0);
@ -70,8 +77,8 @@ void ram(void)
break; break;
} }
dir %= 4; dir %= 4;
font = defaultfont; font = NULL;
DoString(10,40,nickname); DoString(dx,dy,nickname);
lcdDisplay(); lcdDisplay();
if(getInputRaw()!=BTN_NONE) return; if(getInputRaw()!=BTN_NONE) return;
step = !step; step = !step;