diff --git a/!TheEsc/!RunImage,ff8 b/!TheEsc/!RunImage,ff8 index 73db0cd..53bb751 100644 Binary files a/!TheEsc/!RunImage,ff8 and b/!TheEsc/!RunImage,ff8 differ diff --git a/!TheEsc/Spr,ff9 b/!TheEsc/Spr,ff9 index 75029c5..e527e54 100644 Binary files a/!TheEsc/Spr,ff9 and b/!TheEsc/Spr,ff9 differ diff --git a/!TheEsc/c/CTheEscape b/!TheEsc/c/CTheEscape index fcff78b..04e4fa5 100644 --- a/!TheEsc/c/CTheEscape +++ b/!TheEsc/c/CTheEscape @@ -179,7 +179,7 @@ void intro() sound_composition_start(clock()); - draw_sprite("spacebar",(DISPLAY_X/2)-106,50); + draw_sprite("spacebar",(DISPLAY_X/2)-106,50); while(sound_composition_incomplete()) { diff --git a/!TheEsc/c/Graphics b/!TheEsc/c/Graphics index 33aea88..ac46a6b 100644 --- a/!TheEsc/c/Graphics +++ b/!TheEsc/c/Graphics @@ -131,6 +131,50 @@ void draw_sprite(char* spritename,int x, int y) _kernel_swi(OS_SpriteOp,&inreg,&outreg); } +void draw_spritetext(char* text, int x, int y) +{ + int currentx; + int currenty; + int i; + char str[2] = "\0"; + currentx = x; + currenty = y; + for(i = 0; i < strlen(text); i++) + { + str[0] = text[i]; + + if((text[i] != ' ') && (text[i] != '\n')) + draw_sprite(str,currentx,currenty); + + switch (text[i]) + { + case 't': + case 'i': + case 'y': + currentx += 6 + 2; + break; + case 'm': + currentx += 14 + 2; + break; + case 'q': + case 'w': + currentx += 10 + 2; + break; + case ' ': + currentx += 4 + 2; + break; + default: + currentx += 8 + 2; + } + + if(text[i] == '\n') + { + currentx = x; + currenty -= 32; + } + } +} + void draw_text(char* text, int x, int y, int fonthandle) { inreg.r[0] = fonthandle;