
 
 p r o c e d u r e   N e w T a l k ( h e a d n u m ,   t a l k n u m ,   n a m e n u m ,   p l a c e ,   s h o w h e a d ,   c o l o r ,   f r a m e :   i n t e g e r ) ; 
 
 v a r 
 
     k ,   a l e n ,   n e w c o l o r ,   c o l o r 1 ,   c o l o r 2 ,   n h ,   n w ,   c h ,   c 1 ,   r 1 ,   n ,   n a m e l e n ,   i ,   t 1 ,   g r p ,   i d x ,   o f f s e t ,   l e n ,   i 1 ,   i 2 ,   f a c e ,   c ,   n x ,   n y ,   h x ,   h y ,   h w ,   h h ,   x ,   y ,   w ,   h ,   c e l l ,   r o w :   i n t e g e r ; 
 
     n p 3 ,   n p ,   n p 1 ,   n p 2 ,   t p ,   p 1 ,   a p :   p c h a r ; 
 
     a c t o r a r r a y ,   t a l k a r r a y ,   n a m e a r r a y ,   n a m e 1 ,   n a m e 2 :   a r r a y   o f   b y t e ; 
 
     p w o r d :   a r r a y [ 0 . . 1 ]   o f   U i n t 1 6 ; 
 
 b e g i n 
 
     p w o r d [ 1 ]   : =   0 ; 
 
 
 
 / / r<P
 
     c a s e   c o l o r   o f 
 
         0 :   c o l o r   : =   2 8 5 1 5 ; 
 
         1 :   c o l o r   : =   2 8 4 2 1 ; 
 
         2 :   c o l o r   : =   2 8 4 3 5 ; 
 
         3 :   c o l o r   : =   2 8 5 6 3 ; 
 
         4 :   c o l o r   : =   2 8 4 6 6 ; 
 
         5 :   c o l o r   : =   2 8 4 5 0 ; 
 
     e n d ; 
 
     c o l o r 1   : =   c o l o r   a n d   $ F F ; 
 
     c o l o r 2   : =   ( c o l o r   s h r   8 )   a n d   $ F F ; 
 
     x   : =   6 8 ; / / [݋FhMOnX 
 
     y   : =   3 2 0 ; / / [݋FhMOnY 
 
     w   : =   5 1 1 ; / / [݋Fh[
 
     h   : =   1 0 9 ; / / [݋Fhؚ
 
     n w   : =   8 6 ; / / Y
TFh[
 
     n h   : =   2 8 ; / / Y
TFhؚ
 
     h x   : =   6 8 ; / / 4YPFhMOnX 
 
     h y   : =   2 4 4 ; / / 4YPFhMOnY 
 
     h w   : =   5 7 ; / / 4YPFh[
 
     h h   : =   7 2 ; / / 4YPFhؚ
 
     n x   : =   1 2 9 ; / / Y
TFhMOnX 
 
     n y   : =   2 8 8 ; / / Y
TFhMOnY 
 
     i f   s h o w h e a d   =   1   t h e n   n x   : =   x ; / / 9hnc/f&T>f:y4YP[Y
TFhMOn
 
     r o w   : =   5 ; 
 
     c e l l   : =   2 5 ; 
 
     i f   p l a c e   =   1   t h e n / / 9hnc>f:yMOnn4YPFhSY
TFhMOn
 
     b e g i n 
 
         h x   : =   5 2 2 ; 
 
         n x   : =   4 3 1 ; 
 
         i f   s h o w h e a d   =   1   t h e n   n x   : =   x   +   w   -   n w ; 
 
     e n d ; 
 
     / / r e a d   t a l k 
 
     / / S[݋
 
     i d x   : =   f i l e o p e n ( ' r e s o u r c e \ t a l k . i d x ' ,   f m o p e n r e a d ) ; 
 
     g r p   : =   f i l e o p e n ( ' r e s o u r c e \ t a l k . g r p ' ,   f m o p e n r e a d ) ; 
 
     i f   t a l k n u m   =   0   t h e n 
 
     b e g i n 
 
         o f f s e t   : =   0 ; 
 
         f i l e r e a d ( i d x ,   l e n ,   4 ) ; 
 
     e n d 
 
     e l s e 
 
     b e g i n 
 
         f i l e s e e k ( i d x ,   ( t a l k n u m   -   1 )   *   4 ,   0 ) ; 
 
         f i l e r e a d ( i d x ,   o f f s e t ,   4 ) ; 
 
         f i l e r e a d ( i d x ,   l e n ,   4 ) ; 
 
     e n d ; 
 
     l e n   : =   ( l e n   -   o f f s e t ) ; 
 
     s e t l e n g t h ( t a l k a r r a y ,   l e n   +   1 ) ; 
 
     f i l e s e e k ( g r p ,   o f f s e t ,   0 ) ; 
 
     f i l e r e a d ( g r p ,   t a l k a r r a y [ 0 ] ,   l e n ) ; 
 
     f i l e c l o s e ( i d x ) ; 
 
     f i l e c l o s e ( g r p ) ; 
 
     f o r   i   : =   0   t o   l e n   -   1   d o 
 
     b e g i n 
 
         t a l k a r r a y [ i ]   : =   t a l k a r r a y [ i ]   x o r   $ F F ; 
 
         i f   t a l k a r r a y [ i ]   =   2 5 5   t h e n   t a l k a r r a y [ i ]   : =   0 ; 
 
     e n d ; 
 
     t a l k a r r a y [ i ]   : =   0 ; 
 
     t p   : =   @ t a l k a r r a y [ 0 ] ; 
 
     / / r e a d   n a m e 
 
       / / SY
T
 
     i f   n a m e n u m   >   0   t h e n 
 
     b e g i n 
 
         i d x   : =   f i l e o p e n ( ' r e s o u r c e \ t a l k . i d x ' ,   f m o p e n r e a d ) ; 
 
         g r p   : =   f i l e o p e n ( ' r e s o u r c e \ t a l k . g r p ' ,   f m o p e n r e a d ) ; 
 
         f i l e s e e k ( i d x ,   ( n a m e n u m   -   1 )   *   4 ,   0 ) ; 
 
         f i l e r e a d ( i d x ,   o f f s e t ,   4 ) ; 
 
         f i l e r e a d ( i d x ,   n a m e l e n ,   4 ) ; 
 
         n a m e l e n   : =   ( n a m e l e n   -   o f f s e t ) ; 
 
         s e t l e n g t h ( n a m e a r r a y ,   n a m e l e n   +   1 ) ; 
 
         f i l e s e e k ( g r p ,   o f f s e t ,   0 ) ; 
 
         f i l e r e a d ( g r p ,   n a m e a r r a y [ 0 ] ,   n a m e l e n ) ; 
 
         f i l e c l o s e ( i d x ) ; 
 
         f i l e c l o s e ( g r p ) ; 
 
         f o r   i   : =   0   t o   n a m e l e n   -   2   d o 
 
         b e g i n 
 
             n a m e a r r a y [ i ]   : =   n a m e a r r a y [ i ]   x o r   $ F F ; 
 
             i f   n a m e a r r a y [ i ]   =   2 5 5   t h e n   n a m e a r r a y [ i ]   : =   0 ; 
 
         e n d ; 
 
         n a m e a r r a y [ i ]   : =   0 ; 
 
         n p   : =   @ n a m e a r r a y [ 0 ] ; 
 
     e n d 
 
     e l s e   i f   n a m e n u m   =   - 2   t h e n 
 
     b e g i n 
 
         f o r   i   : =   0   t o   l e n g t h ( r r o l e )   -   1   d o 
 
         b e g i n 
 
             i f   R r o l e [ i ] . H e a d N u m   =   h e a d n u m   t h e n 
 
             b e g i n 
 
                 p 1   : =   @ R r o l e [ i ] . N a m e ; 
 
                 n a m e l e n   : =   1 0 ; 
 
                 s e t l e n g t h ( n a m e a r r a y ,   n a m e l e n ) ; 
 
                 n p   : =   @ n a m e a r r a y [ 0 ] ; 
 
                 f o r   n   : =   0   t o   n a m e l e n   -   1   d o 
 
                 b e g i n 
 
                     ( n p   +   n ) ^   : =   ( p 1   +   n ) ^ ; 
 
                             / /   i f   ( p 1   +   n ) ^   =   c h a r ( 0 )   t h e n   b r e a k ; 
 
                 e n d ; 
 
                 ( n p   +   n ) ^   : =   c h a r ( 0 ) ; 
 
                 ( n p   +   n   +   1 ) ^   : =   c h a r ( 0 ) ; 
 
                 b r e a k ; 
 
             e n d ; 
 
         e n d ; 
 
     e n d ; 
 
     p 1   : =   @ R r o l e [ 0 ] . N a m e ; 
 
     a l e n   : =   l e n g t h ( p 1 )   +   2 ; 
 
     s e t l e n g t h ( a c t o r a r r a y ,   a l e n ) ; 
 
     a p   : =   @ a c t o r a r r a y [ 0 ] ; 
 
     f o r   n   : =   0   t o   a l e n   -   1   d o 
 
     b e g i n 
 
         ( a p   +   n ) ^   : =   ( p 1   +   n ) ^ ; 
 
         i f   ( p 1   +   n ) ^   =   c h a r ( 0 )   t h e n   b r e a k ; 
 
     e n d ; 
 
     ( a p   +   n ) ^   : =   c h a r ( $ 0 ) ; 
 
     ( a p   +   n   +   1 ) ^   : =   c h a r ( 0 ) ; 
 
     / / NN:N$ReY
 
 
 
 
 
     i f   a l e n   =   6   t h e n 
 
     b e g i n 
 
         s e t l e n g t h ( n a m e 1 ,   4 ) ; 
 
         n p 1   : =   @ n a m e 1 [ 0 ] ; 
 
         n p 1 ^   : =   a p ^ ; 
 
         ( n p 1   +   1 ) ^   : =   ( a p   +   1 ) ^ ; 
 
         ( n p 1   +   2 ) ^   : =   c h a r ( 0 ) ; 
 
         ( n p 1   +   3 ) ^   : =   c h a r ( 0 ) ; 
 
         s e t l e n g t h ( n a m e 2 ,   4 ) ; 
 
         n p 2   : =   @ n a m e 2 [ 0 ] ; 
 
         n p 2 ^   : =   a p ^ ; 
 
         f o r   i   : =   0   t o   l e n g t h ( n a m e 2 )   -   1   d o 
 
             ( n p 2   +   i ) ^   : =   ( a p   +   i   +   2 ) ^ ; 
 
     e n d 
 
     e l s e   i f   a l e n   >   8   t h e n 
 
     b e g i n 
 
             s e t l e n g t h ( n a m e 1 ,   6 ) ; 
 
             n p 1   : =   @ n a m e 1 [ 0 ] ; 
 
             n p 1 ^   : =   a p ^ ; 
 
             ( n p 1   +   1 ) ^   : =   ( a p   +   1 ) ^ ; 
 
             ( n p 1   +   2 ) ^   : =   ( a p   +   2 ) ^ ; 
 
             ( n p 1   +   3 ) ^   : =   ( a p   +   3 ) ^ ; 
 
             ( n p 1   +   4 ) ^   : =   c h a r ( 0 ) ; 
 
             ( n p 1   +   5 ) ^   : =   c h a r ( 0 ) ; 
 
             s e t l e n g t h ( n a m e 2 ,   6 ) ; 
 
             n p 2   : =   @ n a m e 2 [ 0 ] ; 
 
             f o r   i   : =   0   t o   l e n g t h ( n a m e 2 )   -   1   d o 
 
                 ( n p 2   +   i ) ^   : =   ( a p   +   i   +   4 ) ^ ; 
 
     e n d 
 
     e l s e   i f   a l e n   =   8   t h e n 
 
     b e g i n 
 
         i f   ( ( p u i n t 1 6 ( a p ) ^   =   $ 6 E A B )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ 6 3 A E ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ E 8 A 6 )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ F 9 A A ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ 4 6 A A )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ E 8 A 4 ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ 4 F A 5 )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ B 0 A A ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ 7 D B C )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ 6 5 A E ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ 7 1 A 5 )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ A 8 B 0 ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ D 1 B D )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ A F B 8 ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ 7 1 A 5 )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ C 5 A A ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ D 3 A 4 )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ 7 6 A 5 ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ B D A 4 )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ 5 D A E ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ D A B C )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ A 7 B 6 ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ 4 3 A D )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ D F A B ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ 7 1 A 5 )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ 7 B A E ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ B 9 A 7 )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ 4 3 C 3 ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ 6 1 B 0 )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ D 5 C 1 ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ 7 4 A 6 )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ E 5 A 4 ) ) )   o r 
 
             ( ( p u i n t 1 6 ( a p ) ^   =   $ D D A 9 )   a n d   ( ( p u i n t 1 6 ( a p   +   2 ) ^   =   $ 5 B B 6 ) ) )   t h e n 
 
         b e g i n 
 
             s e t l e n g t h ( n a m e 1 ,   6 ) ; 
 
             n p 1   : =   @ n a m e 1 [ 0 ] ; 
 
             n p 1 ^   : =   a p ^ ; 
 
             ( n p 1   +   1 ) ^   : =   ( a p   +   1 ) ^ ; 
 
             ( n p 1   +   2 ) ^   : =   ( a p   +   2 ) ^ ; 
 
             ( n p 1   +   3 ) ^   : =   ( a p   +   3 ) ^ ; 
 
             ( n p 1   +   4 ) ^   : =   c h a r ( 0 ) ; 
 
             ( n p 1   +   5 ) ^   : =   c h a r ( 0 ) ; 
 
             s e t l e n g t h ( n a m e 2 ,   4 ) ; 
 
             n p 2   : =   @ n a m e 2 [ 0 ] ; 
 
             f o r   i   : =   0   t o   l e n g t h ( n a m e 2 )   -   1   d o 
 
                 ( n p 2   +   i ) ^   : =   ( a p   +   i   +   4 ) ^ ; 
 
         e n d 
 
         e l s e 
 
         b e g i n 
 
             s e t l e n g t h ( n a m e 1 ,   4 ) ; 
 
             n p 1   : =   @ n a m e 1 [ 0 ] ; 
 
             n p 1 ^   : =   a p ^ ; 
 
             ( n p 1   +   1 ) ^   : =   ( a p   +   1 ) ^ ; 
 
             ( n p 1   +   2 ) ^   : =   c h a r ( 0 ) ; 
 
             ( n p 1   +   3 ) ^   : =   c h a r ( 0 ) ; 
 
             s e t l e n g t h ( n a m e 2 ,   6 ) ; 
 
             n p 2   : =   @ n a m e 2 [ 0 ] ; 
 
             f o r   i   : =   0   t o   l e n g t h ( n a m e 2 )   -   1   d o 
 
                 ( n p 2   +   i ) ^   : =   ( a p   +   i   +   2 ) ^ ; 
 
         e n d ; 
 
     e n d ; 
 
 
 
     c h   : =   0 ; 
 
     w h i l e   ( ( p u i n t 1 6 ( t p   +   c h ) ) ^   s h l   8   < >   0 )   a n d   ( ( p u i n t 1 6 ( t p   +   c h ) ) ^   s h r   8   < >   0 )   d o 
 
     b e g i n 
 
         r e d r a w ; 
 
         c 1   : =   0 ; 
 
         r 1   : =   0 ; 
 
         D r a w R e c t a n g l e ( x ,   y ,   w ,   h ,   f r a m e ,   c o l c o l o r ( $ F F ) ,   4 0 ) ; 
 
         i f   ( s h o w h e a d   =   0 )   o r   ( h e a d n u m   <   0 )   t h e n 
 
         b e g i n 
 
             D r a w R e c t a n g l e ( h x ,   h y ,   h w ,   h h ,   f r a m e ,   c o l c o l o r ( $ F F ) ,   4 0 ) ; 
 
             i f   h e a d n u m   =   0   t h e n 
 
             b e g i n 
 
                 D r a w H e a d P i c ( R R o l e [ 0 ] . H e a d N u m ,   h x ,   h y   +   6 8 ) ; 
 
             e n d 
 
             e l s e 
 
             b e g i n 
 
                 D r a w H e a d P i c ( h e a d n u m ,   h x ,   h y   +   6 8 ) ; 
 
             e n d ; 
 
         e n d ; 
 
         i f   n a m e n u m   < >   0   t h e n 
 
         b e g i n 
 
             D r a w R e c t a n g l e ( n x ,   n y ,   n w ,   n h ,   f r a m e ,   c o l c o l o r ( $ F F ) ,   4 0 ) ; 
 
             n a m e l e n   : =   l e n g t h ( n p ) ; 
 
             D r a w B i g 5 S h a d o w T e x t ( n p ,   n x   +   2 0   -   n a m e l e n   *   9   d i v   2 ,   n y   +   4 ,   c o l c o l o r ( $ 6 3 ) ,   c o l c o l o r ( $ 7 0 ) ) ; 
 
         e n d ; 
 
         w h i l e   r 1   <   r o w   d o 
 
         b e g i n 
 
             p w o r d [ 0 ]   : =   ( p u i n t 1 6 ( t p   +   c h ) ) ^ ; 
 
             i f   ( p w o r d [ 0 ]   s h r   8   < >   0 )   a n d   ( p w o r d [ 0 ]   s h l   8   < >   0 )   t h e n 
 
             b e g i n 
 
                 c h   : =   c h   +   2 ; 
 
                 i f   ( p w o r d [ 0 ]   a n d   $ F F )   =   $ 5 E   t h e n   / / ^ ^ 9eSeW[r
 
                 b e g i n 
 
                     c a s e   s m a l l i n t ( ( p w o r d [ 0 ]   a n d   $ F F 0 0 )   s h r   8 )   -   $ 3 0   o f 
 
                         0 :   n e w c o l o r   : =   2 8 5 1 5 ; 
 
                         1 :   n e w c o l o r   : =   2 8 4 2 1 ; 
 
                         2 :   n e w c o l o r   : =   2 8 4 3 5 ; 
 
                         3 :   n e w c o l o r   : =   2 8 5 6 3 ; 
 
                         4 :   n e w c o l o r   : =   2 8 4 6 6 ; 
 
                         5 :   n e w c o l o r   : =   2 8 4 5 0 ; 
 
                         6 4 :   n e w c o l o r   : =   c o l o r ; / / ^ ^ 9eVr
 
 
 
                     e l s e   n e w c o l o r   : =   c o l o r ; 
 
                     e n d ; 
 
                     c o l o r 1   : =   n e w c o l o r   a n d   $ F F ; 
 
                     c o l o r 2   : =   ( n e w c o l o r   s h r   8 )   a n d   $ F F ; 
 
                 e n d 
 
                 e l s e   i f   p w o r d [ 0 ]   =   $ 2 3 2 3   t h e n   / / # #   ^e
 
                 b e g i n 
 
                     s d l _ d e l a y ( 5 0 0 ) ; 
 
                 e n d 
 
                 e l s e   i f   p w o r d [ 0 ]   =   $ 2 A 2 A   t h e n   / / * * bcL
 
                 b e g i n 
 
                     i f   c 1   >   0   t h e n 
 
                         i n c ( r 1 ) ; 
 
                     c 1   : =   0 ; 
 
                 e n d 
 
                 e l s e   i f   p w o r d [ 0 ]   =   $ 4 0 4 0   t h e n   / / @ @ I{_Q.
 
                 b e g i n 
 
                     s d l _ u p d a t e r e c t ( s c r e e n ,   0 ,   0 ,   s c r e e n . w ,   s c r e e n . h ) ; 
 
                     k   : =   w a i t a n y k e y ; 
 
                     w h i l e   ( k   =   s d l k _ r i g h t )   o r 
 
                         ( k   =   s d l k _ l e f t )   o r 
 
                         ( k   =   s d l k _ u p )   o r 
 
                         ( k   =   s d l k _ d o w n )   d o 
 
                     b e g i n 
 
                         k   : =   w a i t a n y k e y ; 
 
                     e n d ; 
 
                 e n d 
 
                 e l s e   i f   ( p w o r d [ 0 ]   =   $ 2 6 2 6 )   o r   ( p w o r d [ 0 ]   =   $ 2 5 2 5 )   o r   ( p w o r d [ 0 ]   =   $ 2 4 2 4 )   t h e n 
 
                 b e g i n 
 
                     c a s e   p w o r d [ 0 ]   o f 
 
                         $ 2 6 2 6 :   n p 3   : =   a p ;   / / & & >f:yY
T
 
                         $ 2 5 2 5 :   n p 3   : =   n p 2 ;   / / % % >f:y
T
 
                         $ 2 4 2 4 :   n p 3   : =   n p 1 ;   / / $ $ >f:yY
 
                     e n d ; 
 
                     i   : =   0 ; 
 
                     w h i l e   ( p u i n t 1 6 ( n p 3   +   i ) ^   s h r   8   < >   0 )   a n d   ( p u i n t 1 6 ( n p 3   +   i ) ^   s h l   8   < >   0 )   d o 
 
                     b e g i n 
 
                         p w o r d [ 0 ]   : =   p u i n t 1 6 ( n p 3   +   i ) ^ ; 
 
                         i   : =   i   +   2 ; 
 
                         D r a w b i g 5 S h a d o w T e x t ( @ p w o r d [ 0 ] ,   x   -   1 4   +   C H I N E S E _ F O N T _ S I Z E   *   c 1 ,   y   +   4   +   C H I N E S E _ F O N T _ S I Z E   *   r 1 ,   c o l c o l o r ( c o l o r 1 ) ,   c o l c o l o r ( c o l o r 2 ) ) ; 
 
                         i n c ( c 1 ) ; 
 
                         i f   c 1   =   c e l l   t h e n 
 
                         b e g i n 
 
                             c 1   : =   0 ; 
 
                             i n c ( r 1 ) ; 
 
                             i f   r 1   =   r o w   t h e n 
 
                             b e g i n 
 
                                 s d l _ u p d a t e r e c t ( s c r e e n ,   0 ,   0 ,   s c r e e n . w ,   s c r e e n . h ) ; 
 
                                 k   : =   w a i t a n y k e y ; 
 
                                 w h i l e   ( k   =   s d l k _ r i g h t )   o r 
 
                                     ( k   =   s d l k _ l e f t )   o r 
 
                                     ( k   =   s d l k _ u p )   o r 
 
                                     ( k   =   s d l k _ d o w n )   d o 
 
                                 b e g i n 
 
                                     k   : =   w a i t a n y k e y ; 
 
                                 e n d ; 
 
                                 c 1   : =   0 ; 
 
                                 r 1   : =   0 ; 
 
                                 r e d r a w ; 
 
                                 D r a w R e c t a n g l e ( x ,   y ,   w ,   h ,   f r a m e ,   c o l c o l o r ( $ F F ) ,   4 0 ) ; 
 
                                 i f   ( s h o w h e a d   =   0 )   o r   ( h e a d n u m   <   0 )   t h e n 
 
                                 b e g i n 
 
                                     D r a w R e c t a n g l e ( h x ,   h y ,   h w ,   h h ,   f r a m e ,   c o l c o l o r ( $ F F ) ,   4 0 ) ; 
 
                                     i f   h e a d n u m   =   0   t h e n 
 
                                     b e g i n 
 
                                         D r a w H e a d P i c ( R R o l e [ 0 ] . H e a d N u m ,   h x ,   h y   +   6 8 ) ; 
 
                                     e n d 
 
                                     e l s e 
 
                                     b e g i n 
 
                                         D r a w H e a d P i c ( h e a d n u m ,   h x ,   h y   +   6 8 ) ; 
 
                                     e n d ; 
 
                                 e n d ; 
 
                                 i f   n a m e n u m   < >   0   t h e n 
 
                                 b e g i n 
 
                                     D r a w R e c t a n g l e ( n x ,   n y ,   n w ,   n h ,   f r a m e ,   c o l c o l o r ( $ F F ) ,   4 0 ) ; 
 
                                     n a m e l e n   : =   l e n g t h ( n p ) ; 
 
                                     D r a w B i g 5 S h a d o w T e x t ( n p ,   n x   +   2 0   -   n a m e l e n   *   9   d i v   2 ,   n y   +   4 ,   c o l c o l o r ( $ 6 3 ) ,   c o l c o l o r ( $ 7 0 ) ) ; 
 
                                 e n d ; 
 
                             e n d ; 
 
                         e n d ; 
 
                     e n d ; 
 
                 e n d 
 
                 e l s e   / / >f:yeW[
 
                 b e g i n 
 
                     D r a w B i g 5 S h a d o w T e x t ( @ p w o r d ,   x   -   1 4   +   C H I N E S E _ F O N T _ S I Z E   *   c 1 ,   y   +   4   +   C H I N E S E _ F O N T _ S I Z E   *   r 1 ,   c o l c o l o r ( c o l o r 1 ) ,   c o l c o l o r ( c o l o r 2 ) ) ; 
 
                     i n c ( c 1 ) ; 
 
                     i f   c 1   =   c e l l   t h e n 
 
                     b e g i n 
 
                         c 1   : =   0 ; 
 
                         i n c ( r 1 ) ; 
 
                     e n d ; 
 
                 e n d ; 
 
             e n d 
 
             e l s e   b r e a k ; 
 
         e n d ; 
 
         s d l _ u p d a t e r e c t ( s c r e e n ,   0 ,   0 ,   s c r e e n . w ,   s c r e e n . h ) ; 
 
         k   : =   w a i t a n y k e y ; 
 
         w h i l e   ( k   =   s d l k _ r i g h t )   o r 
 
             ( k   =   s d l k _ l e f t )   o r 
 
             ( k   =   s d l k _ u p )   o r 
 
             ( k   =   s d l k _ d o w n )   d o 
 
         b e g i n 
 
             k   : =   w a i t a n y k e y ; 
 
         e n d ; 
 
         i f   ( p w o r d [ 0 ]   a n d   $ F F   =   0 )   o r   ( p w o r d [ 0 ]   a n d   $ F F 0 0   =   0 )   t h e n   b r e a k ; 
 
     e n d ; 
 
     r e d r a w ; 
 
 e n d ; 
 
 