C'est parti...
);
> #define USE_KERNEL // Make Kernel Program
>
> #define USE_TI92PLUS
> #include <genlib.h>
> char Temp[3000];
>
> extern BGS sourire[];
> extern BGS sadique[];
> extern BGS triste[];
> void attend(unsigned short);
> char txt1[]={"Dis-moi étranger, n'aurais-tu pas vu une jeune fille byzarre
> (#D) aux cheveux noirs? Elle s'appelle Angela, c'est une sorcière et elle a
> sûrement dû tuer quelques personnes sur son passage!!!"};
> char txt2[]={"Non, désolé... #w Par contre j'ai vu un homme-loup passer si
> ça vous intéresse #S ."};
> char txt3[]={"Arf #w #n #T ... #w #n Mais où cette *ù*$ù*$ de sorcière
> !?"};
> char nom1[]={"JB"};
> char nom2[]={"Inconnu"};
> char nbr_phrase=3;
> char *(dlg1[])={&nbr_phrase,nom1,txt1,nom2,txt2,nom1,txt3};
> void draw_rect(short x1, short x2, short y1, short y2,short color)
> {
> gl_draw_clipped_line(x1,y1,x2,y1,color);//black
> gl_draw_clipped_line(x1,y2,x2,y2,color);
> gl_draw_clipped_line(x1,y1,x1,y2,color);
> gl_draw_clipped_line(x2,y1,x2,y2,color);
> }
>
> void fill_screen_lg(void)
> {
> short aaa;
> for (aaa=0;aaa<128;aaa++) gl_draw_hline_lg(0,239,aaa);
> }
>
> void clear_part_scr(short y1,short y2)
> {
> short aa;
> for(aa=y1;aa<=y2;aa++) gl_draw_hline_w(0,239,aa);
> }
>
> void init_box(void)
> {
> clear_part_scr(4,46);
> draw_rect(0,239,0,50,0);
> draw_rect(1,238,1,49,1);
> draw_rect(2,237,2,48,2);
> draw_rect(3,236,3,47,3);
> }
> void _main(void)
> {
> short a,b,c,d,e,f,g;
> HANDLE hd;
> char nom[30];
> char buffer[4000];
> char dest[2]={};
> //char *ptr;
> DSCREEN *DScr[2] = {NULL, NULL };
> gl_init();
> ALLOC_DSCREEN(dscr);
> gl_set_dscreen_int(dscr);
> gl_set_dscreen_function(dscr);
> //gl_set_LCD_MEM();
>
> gl_cls();
> gl_set_spr_xy(0, 0);
> fill_screen_lg();
> //*********************************init dlg box
>
> //**********************************routine
> for (a=1;a<(*dlg1[0])*2+1;a+=2)
> {
> init_box();
> strcpy (nom, dlg1[a]);
> strcat (nom, ":")
> b=DrawStrWidth(nom, F_6x8)+7;
> d=7;
> strcpy (buffer, dlg1[a+1]);
> f=strlen(buffer);
> //ptr=buffer;
> gl_put_medium_string(DARK_SCREEN(dscr), 7, d,nom);
> gl_put_medium_string(LIGHT_SCREEN(dscr), 7, d,nom);
> e=0;
> while(f>0)
> {
> g=0;
> memset (nom, '',30);
> strncpy(nom,buffer+e,1);
> while(strncmp(buffer+e+g," ",1)!=0 && strncmp(buffer+e+g,"",1)!=0){
> strncat(nom,buffer+e+g,1); g++;}
> nom[g+1]='';
> if (g!=0 && b+DrawStrWidth(nom, F_6x8)>=230) {b=7; d+=10; }
> if (strchr (nom, '#')!=0)
> {
> if(strchr (nom, 'w')!=0) gl_wait_a_key();
> if(strchr (nom, 'n')!=0) {b=7; d+=10;}
> if(strchr (nom, 'S')!=0) {gl_put_big_sprite_flip_v(b-1,d-4, &
> sourire,(BGS *) Temp); b+=16;}
> if(strchr (nom, 'T')!=0) {gl_put_big_sprite_flip_v(b-1,d-4, &
> triste,(BGS *) Temp); b+=16;}
> if(strchr (nom, 'D')!=0) {gl_put_big_sprite_flip_v(b-1,d-4, &
> sadique,(BGS *) Temp); b+=16;}
> f-=3;
> e+=3;
> }
>
> else
> {
> strncpy (&dest[0], buffer+e, 1);
> dest[1]='';
> if(d>=47) {gl_wait_a_key(); init_box(); d=7;}
> gl_put_medium_string(DARK_SCREEN(dscr), b, d,&dest[0]);
> attend(gl_key_pressed()==0?9:1);
> b+=DrawStrWidth(dest, F_6x8);
> e++;
> f--;
> }
> //if(b>=230) {b=7; d+=10;}
> }
>
> //gl_put_medium_string(DARK_SCREEN(dscr), b, 7,dlg1[a+1]);
> gl_wait_a_key();
>
> }
>
>
> //gl_put_medium_string(DARK_SCREEN(dscr), 7, 7,txt2);
> //gl_put_medium_string(LIGHT_SCREEN(dscr), 7, 17,txt2);
> //gl_put_medium_string(dscr, 7, 27,txt2);
> //gl_put_medium_string(dscr, 7, 37,txt2);
>
> //gl_wait_a_key();
>
> exit:
> gl_free_hd();
> gl_quit();
> }
>
>
> asm("attend: movem.l %d0-%d3,-(%sp)
> move.w (20,%sp),%d2
> move.l #31,%d1
> move.l #31,%d3
> _wl2_: move.w #1551,%d0
> _wl1_: rol.l %d3,%d1
> dbra %d0,_wl1_
> dbra %d2,_wl2_
> movem.l (%sp)+,%d0-%d3
> rts"