Code:
int string1[98] = "this is a test |this is only a test |if this had been an actual emergency, |you would be dead.";
int string2[25] = "abcdefghijklmnopqrstuvwxyz";
int string3[9] = {1,2,3,4,5,6,7,8,9};
int string4[9] = {1,2,3,4,5,6,7,8,9};
int string5[9] = {1,2,3,4,5,6,7,8,9};
int string6[9] = {1,2,3,4,5,6,7,8,9};
int string7[9] = {1,2,3,4,5,6,7,8,9};
int string8[9] = {1,2,3,4,5,6,7,8,9};
int string9[9] = {1,2,3,4,5,6,7,8,9};
global script test{
void run(){
while(true){
Waitframes(30);
Draw_String(1,98,0,0,6);
}
}
}
int temp[255];
void Draw_String(int string, int max_depth, int Xindent, int Yindent, int cset){
int x = Xindent; int y = Yindent;
int i; int t; int j; int k;
int tile = 520;
if(string==1){ for(i=0;i<=max_depth;i++) temp[i] = string1[i]; }
else if(string==2){ for(i=0;i<=max_depth;i++) temp[i] = string2[i]; }
else if(string==3){ for(i=0;i<=max_depth;i++) temp[i] = string3[i]; }
else if(string==4){ for(i=0;i<=max_depth;i++) temp[i] = string4[i]; }
else if(string==5){ for(i=0;i<=max_depth;i++) temp[i] = string5[i]; }
else if(string==6){ for(i=0;i<=max_depth;i++) temp[i] = string6[i]; }
else if(string==7){ for(i=0;i<=max_depth;i++) temp[i] = string7[i]; }
else if(string==8){ for(i=0;i<=max_depth;i++) temp[i] = string8[i]; }
else if(string==9){ for(i=0;i<=max_depth;i++) temp[i] = string9[i]; }
Waitframe();
for(i=0;i<=max_depth;i++){
for(k=0;k<4;k++){
for(j=0;j<=i;j++){
if(temp[j]==124){
t = tile + 32;
Screen->DrawTile(6,x,y,t,1,1,cset,1,0,0,0,0,true,128);
y+=8;x=Xindent;
}
else{
t = tile + temp[j];
Screen->DrawTile(6,x,y,t,1,1,cset,1,0,0,0,0,true,128);
x+=6;
}
}
x=Xindent;y=Yindent;
Waitframe();
}
}
}