Home » Archimedes archive » Acorn User » AU 1996-03 B.adf » Features » Vocabulary/Source/draw_OK

Vocabulary/Source/draw_OK

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1996-03 B.adf » Features
Filename: Vocabulary/Source/draw_OK
Read OK:
File size: 1013 bytes
Load address: 0000
Exec address: 0000
File contents
#include "inc.h"


extern int option1;
extern dbox m;
extern char german[170][40];
extern char english[170][40];
extern char wrong_word_german[170][40];
extern char wrong_word_english[170][40];
extern int i;
extern char userger[50];
extern char usereng[50];
extern int num;
extern char ans[70];
extern char message[60];
extern void change_usereng(void);
extern void change_userger(void);
extern int quest;
extern int wn;
extern char language[70];
extern int n;
extern char title[70];
extern char subtitle[70];
extern void score_win(void);
extern int csound;
extern int wsound;



void drawbox(void)
   {

   if (option1==1)
   {
   dbox_setfield(m,5,"ENGLISH");

   dbox_setfield(m,7,language);
   dbox_setfield(m,4,title);
   dbox_setfield(m,9,subtitle);
   dbox_setfield(m,3,english[quest]);
   dbox_setfield(m,1,"");
   }
   else
   {
   dbox_setfield(m,7,"ENGLISH");
   dbox_setfield(m,4,title);
   dbox_setfield(m,9,subtitle);
   dbox_setfield(m,5,language);

   dbox_setfield(m,3,german[quest]);
   dbox_setfield(m,1,"");
   }


/*redraw_window(m);*/
 }



/*
 *============================================================================
 *
 * Function for redrawing the window.  This uses wimp_borderwindow ()
 * defined in the "interface.h" library
 *
 *    Parameters :     handle - window handle of window to be redrawn
 *
 *============================================================================
 */
/*
void redraw_window (handle)

     wimp_w handle;

     {
          BOOL redraw;
          wimp_redrawstr redraw_box;

          redraw_box.w = handle;
          wimpt_noerr (wimp_redraw_wind (&redraw_box, &redraw));

          while (redraw)
          {
               wimpt_complain (wimp_borderwindow (redraw_box));
               wimp_get_rectangle (&redraw_box, &redraw);
          }
     }
  */


   void okclick(void)
   {
     int ab;
     int q=0;
      if (option1==1)
      {

      dbox_getfield(m,1,userger,30);

      change_userger();

         if (strcmp(german[quest],userger)==0)
         {

         num++;

         strcpy(ans,"CORRECT");
         if (csound==1)
         bbc_sound(1,-15,200,5,0);
         }
         else
         {
         sprintf(message,"WRONG - %s",german[quest]);
         strcpy(ans,message);
         if (wsound==1)
         bbc_sound(1,-15,50,5,0);

         strcpy(wrong_word_german[wn],german[quest]);
         strcpy(wrong_word_english[wn],english[quest]);
      /* werr(0,"n %d Quest %d wn %d num %d Real english %s Wrong english %s",n,quest,wn,num,english[quest],wrong_word_english[wn]); */
         
      /*   while (q<10)
         {
           werr(0,"german %s",wrong_word_german[q]);
           q++;
         }    */
        wn++; 

         }
      }
      else
      {
      dbox_getfield(m,1,usereng,30);

      change_usereng();

         if (strcmp(english[quest],usereng)==0)
         {

         num++;
         strcpy(ans,"CORRECT");
         if (csound==1)
         bbc_sound(1,-15,200,5,0);
         }
         else
         {
         sprintf(message,"WRONG - %s",english[quest]);
         if (wsound==1)
         bbc_sound(1,-15,50,5,0);
         strcpy(ans,message);

         if (wn>150) 
         {
         ab=dboxquery("Your Wrong Answer List is full. Do you want to Clear it? If you want to keep the list save it before you answer the next Question");
            if (ab==1)
            {
            memset(wrong_word_german,0,6800);
            memset(wrong_word_english,0,6800);
            }
         }
         else
         {

         strcpy(wrong_word_german[wn],german[quest]);
         strcpy(wrong_word_english[wn],english[quest]);
         wn++;
         }

         
       /* werr(0,"n %d Quest %d wn %d num %d Real english %s Wrong english %s",n,quest,wn,num,english[quest],wrong_word_english[wn]);*/

      /*  while (q<10)
         {
           werr(0,"german %s",wrong_word_german[q]);
           q++;
         }    */   


        
         }

      }

      dbox_setfield(m,2,ans);
      quest++;
      i++;

      drawbox();

   if(quest==n)
{
 dbox_hide(m);
 quest = 0;
 score_win();
}

   }







00000000  23 69 6e 63 6c 75 64 65  20 22 69 6e 63 2e 68 22  |#include "inc.h"|
00000010  0a 0a 0a 65 78 74 65 72  6e 20 69 6e 74 20 6f 70  |...extern int op|
00000020  74 69 6f 6e 31 3b 0a 65  78 74 65 72 6e 20 64 62  |tion1;.extern db|
00000030  6f 78 20 6d 3b 0a 65 78  74 65 72 6e 20 63 68 61  |ox m;.extern cha|
00000040  72 20 67 65 72 6d 61 6e  5b 31 37 30 5d 5b 34 30  |r german[170][40|
00000050  5d 3b 0a 65 78 74 65 72  6e 20 63 68 61 72 20 65  |];.extern char e|
00000060  6e 67 6c 69 73 68 5b 31  37 30 5d 5b 34 30 5d 3b  |nglish[170][40];|
00000070  0a 65 78 74 65 72 6e 20  63 68 61 72 20 77 72 6f  |.extern char wro|
00000080  6e 67 5f 77 6f 72 64 5f  67 65 72 6d 61 6e 5b 31  |ng_word_german[1|
00000090  37 30 5d 5b 34 30 5d 3b  0a 65 78 74 65 72 6e 20  |70][40];.extern |
000000a0  63 68 61 72 20 77 72 6f  6e 67 5f 77 6f 72 64 5f  |char wrong_word_|
000000b0  65 6e 67 6c 69 73 68 5b  31 37 30 5d 5b 34 30 5d  |english[170][40]|
000000c0  3b 0a 65 78 74 65 72 6e  20 69 6e 74 20 69 3b 0a  |;.extern int i;.|
000000d0  65 78 74 65 72 6e 20 63  68 61 72 20 75 73 65 72  |extern char user|
000000e0  67 65 72 5b 35 30 5d 3b  0a 65 78 74 65 72 6e 20  |ger[50];.extern |
000000f0  63 68 61 72 20 75 73 65  72 65 6e 67 5b 35 30 5d  |char usereng[50]|
00000100  3b 0a 65 78 74 65 72 6e  20 69 6e 74 20 6e 75 6d  |;.extern int num|
00000110  3b 0a 65 78 74 65 72 6e  20 63 68 61 72 20 61 6e  |;.extern char an|
00000120  73 5b 37 30 5d 3b 0a 65  78 74 65 72 6e 20 63 68  |s[70];.extern ch|
00000130  61 72 20 6d 65 73 73 61  67 65 5b 36 30 5d 3b 0a  |ar message[60];.|
00000140  65 78 74 65 72 6e 20 76  6f 69 64 20 63 68 61 6e  |extern void chan|
00000150  67 65 5f 75 73 65 72 65  6e 67 28 76 6f 69 64 29  |ge_usereng(void)|
00000160  3b 0a 65 78 74 65 72 6e  20 76 6f 69 64 20 63 68  |;.extern void ch|
00000170  61 6e 67 65 5f 75 73 65  72 67 65 72 28 76 6f 69  |ange_userger(voi|
00000180  64 29 3b 0a 65 78 74 65  72 6e 20 69 6e 74 20 71  |d);.extern int q|
00000190  75 65 73 74 3b 0a 65 78  74 65 72 6e 20 69 6e 74  |uest;.extern int|
000001a0  20 77 6e 3b 0a 65 78 74  65 72 6e 20 63 68 61 72  | wn;.extern char|
000001b0  20 6c 61 6e 67 75 61 67  65 5b 37 30 5d 3b 0a 65  | language[70];.e|
000001c0  78 74 65 72 6e 20 69 6e  74 20 6e 3b 0a 65 78 74  |xtern int n;.ext|
000001d0  65 72 6e 20 63 68 61 72  20 74 69 74 6c 65 5b 37  |ern char title[7|
000001e0  30 5d 3b 0a 65 78 74 65  72 6e 20 63 68 61 72 20  |0];.extern char |
000001f0  73 75 62 74 69 74 6c 65  5b 37 30 5d 3b 0a 65 78  |subtitle[70];.ex|
00000200  74 65 72 6e 20 76 6f 69  64 20 73 63 6f 72 65 5f  |tern void score_|
00000210  77 69 6e 28 76 6f 69 64  29 3b 0a 65 78 74 65 72  |win(void);.exter|
00000220  6e 20 69 6e 74 20 63 73  6f 75 6e 64 3b 0a 65 78  |n int csound;.ex|
00000230  74 65 72 6e 20 69 6e 74  20 77 73 6f 75 6e 64 3b  |tern int wsound;|
00000240  0a 0a 0a 0a 76 6f 69 64  20 64 72 61 77 62 6f 78  |....void drawbox|
00000250  28 76 6f 69 64 29 0a 20  20 20 7b 0a 0a 20 20 20  |(void).   {..   |
00000260  69 66 20 28 6f 70 74 69  6f 6e 31 3d 3d 31 29 0a  |if (option1==1).|
00000270  20 20 20 7b 0a 20 20 20  64 62 6f 78 5f 73 65 74  |   {.   dbox_set|
00000280  66 69 65 6c 64 28 6d 2c  35 2c 22 45 4e 47 4c 49  |field(m,5,"ENGLI|
00000290  53 48 22 29 3b 0a 0a 20  20 20 64 62 6f 78 5f 73  |SH");..   dbox_s|
000002a0  65 74 66 69 65 6c 64 28  6d 2c 37 2c 6c 61 6e 67  |etfield(m,7,lang|
000002b0  75 61 67 65 29 3b 0a 20  20 20 64 62 6f 78 5f 73  |uage);.   dbox_s|
000002c0  65 74 66 69 65 6c 64 28  6d 2c 34 2c 74 69 74 6c  |etfield(m,4,titl|
000002d0  65 29 3b 0a 20 20 20 64  62 6f 78 5f 73 65 74 66  |e);.   dbox_setf|
000002e0  69 65 6c 64 28 6d 2c 39  2c 73 75 62 74 69 74 6c  |ield(m,9,subtitl|
000002f0  65 29 3b 0a 20 20 20 64  62 6f 78 5f 73 65 74 66  |e);.   dbox_setf|
00000300  69 65 6c 64 28 6d 2c 33  2c 65 6e 67 6c 69 73 68  |ield(m,3,english|
00000310  5b 71 75 65 73 74 5d 29  3b 0a 20 20 20 64 62 6f  |[quest]);.   dbo|
00000320  78 5f 73 65 74 66 69 65  6c 64 28 6d 2c 31 2c 22  |x_setfield(m,1,"|
00000330  22 29 3b 0a 20 20 20 7d  0a 20 20 20 65 6c 73 65  |");.   }.   else|
00000340  0a 20 20 20 7b 0a 20 20  20 64 62 6f 78 5f 73 65  |.   {.   dbox_se|
00000350  74 66 69 65 6c 64 28 6d  2c 37 2c 22 45 4e 47 4c  |tfield(m,7,"ENGL|
00000360  49 53 48 22 29 3b 0a 20  20 20 64 62 6f 78 5f 73  |ISH");.   dbox_s|
00000370  65 74 66 69 65 6c 64 28  6d 2c 34 2c 74 69 74 6c  |etfield(m,4,titl|
00000380  65 29 3b 0a 20 20 20 64  62 6f 78 5f 73 65 74 66  |e);.   dbox_setf|
00000390  69 65 6c 64 28 6d 2c 39  2c 73 75 62 74 69 74 6c  |ield(m,9,subtitl|
000003a0  65 29 3b 0a 20 20 20 64  62 6f 78 5f 73 65 74 66  |e);.   dbox_setf|
000003b0  69 65 6c 64 28 6d 2c 35  2c 6c 61 6e 67 75 61 67  |ield(m,5,languag|
000003c0  65 29 3b 0a 0a 20 20 20  64 62 6f 78 5f 73 65 74  |e);..   dbox_set|
000003d0  66 69 65 6c 64 28 6d 2c  33 2c 67 65 72 6d 61 6e  |field(m,3,german|
000003e0  5b 71 75 65 73 74 5d 29  3b 0a 20 20 20 64 62 6f  |[quest]);.   dbo|
000003f0  78 5f 73 65 74 66 69 65  6c 64 28 6d 2c 31 2c 22  |x_setfield(m,1,"|
00000400  22 29 3b 0a 20 20 20 7d  0a 0a 0a 2f 2a 72 65 64  |");.   }.../*red|
00000410  72 61 77 5f 77 69 6e 64  6f 77 28 6d 29 3b 2a 2f  |raw_window(m);*/|
00000420  0a 20 7d 0a 0a 0a 0a 2f  2a 0a 20 2a 3d 3d 3d 3d  |. }..../*. *====|
00000430  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00000470  3d 3d 3d 3d 3d 3d 3d 3d  0a 20 2a 0a 20 2a 20 46  |========. *. * F|
00000480  75 6e 63 74 69 6f 6e 20  66 6f 72 20 72 65 64 72  |unction for redr|
00000490  61 77 69 6e 67 20 74 68  65 20 77 69 6e 64 6f 77  |awing the window|
000004a0  2e 20 20 54 68 69 73 20  75 73 65 73 20 77 69 6d  |.  This uses wim|
000004b0  70 5f 62 6f 72 64 65 72  77 69 6e 64 6f 77 20 28  |p_borderwindow (|
000004c0  29 0a 20 2a 20 64 65 66  69 6e 65 64 20 69 6e 20  |). * defined in |
000004d0  74 68 65 20 22 69 6e 74  65 72 66 61 63 65 2e 68  |the "interface.h|
000004e0  22 20 6c 69 62 72 61 72  79 0a 20 2a 0a 20 2a 20  |" library. *. * |
000004f0  20 20 20 50 61 72 61 6d  65 74 65 72 73 20 3a 20  |   Parameters : |
00000500  20 20 20 20 68 61 6e 64  6c 65 20 2d 20 77 69 6e  |    handle - win|
00000510  64 6f 77 20 68 61 6e 64  6c 65 20 6f 66 20 77 69  |dow handle of wi|
00000520  6e 64 6f 77 20 74 6f 20  62 65 20 72 65 64 72 61  |ndow to be redra|
00000530  77 6e 0a 20 2a 0a 20 2a  3d 3d 3d 3d 3d 3d 3d 3d  |wn. *. *========|
00000540  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00000580  3d 3d 3d 3d 0a 20 2a 2f  0a 2f 2a 0a 76 6f 69 64  |====. */./*.void|
00000590  20 72 65 64 72 61 77 5f  77 69 6e 64 6f 77 20 28  | redraw_window (|
000005a0  68 61 6e 64 6c 65 29 0a  0a 20 20 20 20 20 77 69  |handle)..     wi|
000005b0  6d 70 5f 77 20 68 61 6e  64 6c 65 3b 0a 0a 20 20  |mp_w handle;..  |
000005c0  20 20 20 7b 0a 20 20 20  20 20 20 20 20 20 20 42  |   {.          B|
000005d0  4f 4f 4c 20 72 65 64 72  61 77 3b 0a 20 20 20 20  |OOL redraw;.    |
000005e0  20 20 20 20 20 20 77 69  6d 70 5f 72 65 64 72 61  |      wimp_redra|
000005f0  77 73 74 72 20 72 65 64  72 61 77 5f 62 6f 78 3b  |wstr redraw_box;|
00000600  0a 0a 20 20 20 20 20 20  20 20 20 20 72 65 64 72  |..          redr|
00000610  61 77 5f 62 6f 78 2e 77  20 3d 20 68 61 6e 64 6c  |aw_box.w = handl|
00000620  65 3b 0a 20 20 20 20 20  20 20 20 20 20 77 69 6d  |e;.          wim|
00000630  70 74 5f 6e 6f 65 72 72  20 28 77 69 6d 70 5f 72  |pt_noerr (wimp_r|
00000640  65 64 72 61 77 5f 77 69  6e 64 20 28 26 72 65 64  |edraw_wind (&red|
00000650  72 61 77 5f 62 6f 78 2c  20 26 72 65 64 72 61 77  |raw_box, &redraw|
00000660  29 29 3b 0a 0a 20 20 20  20 20 20 20 20 20 20 77  |));..          w|
00000670  68 69 6c 65 20 28 72 65  64 72 61 77 29 0a 20 20  |hile (redraw).  |
00000680  20 20 20 20 20 20 20 20  7b 0a 20 20 20 20 20 20  |        {.      |
00000690  20 20 20 20 20 20 20 20  20 77 69 6d 70 74 5f 63  |         wimpt_c|
000006a0  6f 6d 70 6c 61 69 6e 20  28 77 69 6d 70 5f 62 6f  |omplain (wimp_bo|
000006b0  72 64 65 72 77 69 6e 64  6f 77 20 28 72 65 64 72  |rderwindow (redr|
000006c0  61 77 5f 62 6f 78 29 29  3b 0a 20 20 20 20 20 20  |aw_box));.      |
000006d0  20 20 20 20 20 20 20 20  20 77 69 6d 70 5f 67 65  |         wimp_ge|
000006e0  74 5f 72 65 63 74 61 6e  67 6c 65 20 28 26 72 65  |t_rectangle (&re|
000006f0  64 72 61 77 5f 62 6f 78  2c 20 26 72 65 64 72 61  |draw_box, &redra|
00000700  77 29 3b 0a 20 20 20 20  20 20 20 20 20 20 7d 0a  |w);.          }.|
00000710  20 20 20 20 20 7d 0a 20  20 2a 2f 0a 0a 0a 20 20  |     }.  */...  |
00000720  20 76 6f 69 64 20 6f 6b  63 6c 69 63 6b 28 76 6f  | void okclick(vo|
00000730  69 64 29 0a 20 20 20 7b  0a 20 20 20 20 20 69 6e  |id).   {.     in|
00000740  74 20 61 62 3b 0a 20 20  20 20 20 69 6e 74 20 71  |t ab;.     int q|
00000750  3d 30 3b 0a 20 20 20 20  20 20 69 66 20 28 6f 70  |=0;.      if (op|
00000760  74 69 6f 6e 31 3d 3d 31  29 0a 20 20 20 20 20 20  |tion1==1).      |
00000770  7b 0a 0a 20 20 20 20 20  20 64 62 6f 78 5f 67 65  |{..      dbox_ge|
00000780  74 66 69 65 6c 64 28 6d  2c 31 2c 75 73 65 72 67  |tfield(m,1,userg|
00000790  65 72 2c 33 30 29 3b 0a  0a 20 20 20 20 20 20 63  |er,30);..      c|
000007a0  68 61 6e 67 65 5f 75 73  65 72 67 65 72 28 29 3b  |hange_userger();|
000007b0  0a 0a 20 20 20 20 20 20  20 20 20 69 66 20 28 73  |..         if (s|
000007c0  74 72 63 6d 70 28 67 65  72 6d 61 6e 5b 71 75 65  |trcmp(german[que|
000007d0  73 74 5d 2c 75 73 65 72  67 65 72 29 3d 3d 30 29  |st],userger)==0)|
000007e0  0a 20 20 20 20 20 20 20  20 20 7b 0a 0a 20 20 20  |.         {..   |
000007f0  20 20 20 20 20 20 6e 75  6d 2b 2b 3b 0a 0a 20 20  |      num++;..  |
00000800  20 20 20 20 20 20 20 73  74 72 63 70 79 28 61 6e  |       strcpy(an|
00000810  73 2c 22 43 4f 52 52 45  43 54 22 29 3b 0a 20 20  |s,"CORRECT");.  |
00000820  20 20 20 20 20 20 20 69  66 20 28 63 73 6f 75 6e  |       if (csoun|
00000830  64 3d 3d 31 29 0a 20 20  20 20 20 20 20 20 20 62  |d==1).         b|
00000840  62 63 5f 73 6f 75 6e 64  28 31 2c 2d 31 35 2c 32  |bc_sound(1,-15,2|
00000850  30 30 2c 35 2c 30 29 3b  0a 20 20 20 20 20 20 20  |00,5,0);.       |
00000860  20 20 7d 0a 20 20 20 20  20 20 20 20 20 65 6c 73  |  }.         els|
00000870  65 0a 20 20 20 20 20 20  20 20 20 7b 0a 20 20 20  |e.         {.   |
00000880  20 20 20 20 20 20 73 70  72 69 6e 74 66 28 6d 65  |      sprintf(me|
00000890  73 73 61 67 65 2c 22 57  52 4f 4e 47 20 2d 20 25  |ssage,"WRONG - %|
000008a0  73 22 2c 67 65 72 6d 61  6e 5b 71 75 65 73 74 5d  |s",german[quest]|
000008b0  29 3b 0a 20 20 20 20 20  20 20 20 20 73 74 72 63  |);.         strc|
000008c0  70 79 28 61 6e 73 2c 6d  65 73 73 61 67 65 29 3b  |py(ans,message);|
000008d0  0a 20 20 20 20 20 20 20  20 20 69 66 20 28 77 73  |.         if (ws|
000008e0  6f 75 6e 64 3d 3d 31 29  0a 20 20 20 20 20 20 20  |ound==1).       |
000008f0  20 20 62 62 63 5f 73 6f  75 6e 64 28 31 2c 2d 31  |  bbc_sound(1,-1|
00000900  35 2c 35 30 2c 35 2c 30  29 3b 0a 0a 20 20 20 20  |5,50,5,0);..    |
00000910  20 20 20 20 20 73 74 72  63 70 79 28 77 72 6f 6e  |     strcpy(wron|
00000920  67 5f 77 6f 72 64 5f 67  65 72 6d 61 6e 5b 77 6e  |g_word_german[wn|
00000930  5d 2c 67 65 72 6d 61 6e  5b 71 75 65 73 74 5d 29  |],german[quest])|
00000940  3b 0a 20 20 20 20 20 20  20 20 20 73 74 72 63 70  |;.         strcp|
00000950  79 28 77 72 6f 6e 67 5f  77 6f 72 64 5f 65 6e 67  |y(wrong_word_eng|
00000960  6c 69 73 68 5b 77 6e 5d  2c 65 6e 67 6c 69 73 68  |lish[wn],english|
00000970  5b 71 75 65 73 74 5d 29  3b 0a 20 20 20 20 20 20  |[quest]);.      |
00000980  2f 2a 20 77 65 72 72 28  30 2c 22 6e 20 25 64 20  |/* werr(0,"n %d |
00000990  51 75 65 73 74 20 25 64  20 77 6e 20 25 64 20 6e  |Quest %d wn %d n|
000009a0  75 6d 20 25 64 20 52 65  61 6c 20 65 6e 67 6c 69  |um %d Real engli|
000009b0  73 68 20 25 73 20 57 72  6f 6e 67 20 65 6e 67 6c  |sh %s Wrong engl|
000009c0  69 73 68 20 25 73 22 2c  6e 2c 71 75 65 73 74 2c  |ish %s",n,quest,|
000009d0  77 6e 2c 6e 75 6d 2c 65  6e 67 6c 69 73 68 5b 71  |wn,num,english[q|
000009e0  75 65 73 74 5d 2c 77 72  6f 6e 67 5f 77 6f 72 64  |uest],wrong_word|
000009f0  5f 65 6e 67 6c 69 73 68  5b 77 6e 5d 29 3b 20 2a  |_english[wn]); *|
00000a00  2f 0a 20 20 20 20 20 20  20 20 20 0a 20 20 20 20  |/.         .    |
00000a10  20 20 2f 2a 20 20 20 77  68 69 6c 65 20 28 71 3c  |  /*   while (q<|
00000a20  31 30 29 0a 20 20 20 20  20 20 20 20 20 7b 0a 20  |10).         {. |
00000a30  20 20 20 20 20 20 20 20  20 20 77 65 72 72 28 30  |          werr(0|
00000a40  2c 22 67 65 72 6d 61 6e  20 25 73 22 2c 77 72 6f  |,"german %s",wro|
00000a50  6e 67 5f 77 6f 72 64 5f  67 65 72 6d 61 6e 5b 71  |ng_word_german[q|
00000a60  5d 29 3b 0a 20 20 20 20  20 20 20 20 20 20 20 71  |]);.           q|
00000a70  2b 2b 3b 0a 20 20 20 20  20 20 20 20 20 7d 20 20  |++;.         }  |
00000a80  20 20 2a 2f 0a 20 20 20  20 20 20 20 20 77 6e 2b  |  */.        wn+|
00000a90  2b 3b 20 0a 0a 20 20 20  20 20 20 20 20 20 7d 0a  |+; ..         }.|
00000aa0  20 20 20 20 20 20 7d 0a  20 20 20 20 20 20 65 6c  |      }.      el|
00000ab0  73 65 0a 20 20 20 20 20  20 7b 0a 20 20 20 20 20  |se.      {.     |
00000ac0  20 64 62 6f 78 5f 67 65  74 66 69 65 6c 64 28 6d  | dbox_getfield(m|
00000ad0  2c 31 2c 75 73 65 72 65  6e 67 2c 33 30 29 3b 0a  |,1,usereng,30);.|
00000ae0  0a 20 20 20 20 20 20 63  68 61 6e 67 65 5f 75 73  |.      change_us|
00000af0  65 72 65 6e 67 28 29 3b  0a 0a 20 20 20 20 20 20  |ereng();..      |
00000b00  20 20 20 69 66 20 28 73  74 72 63 6d 70 28 65 6e  |   if (strcmp(en|
00000b10  67 6c 69 73 68 5b 71 75  65 73 74 5d 2c 75 73 65  |glish[quest],use|
00000b20  72 65 6e 67 29 3d 3d 30  29 0a 20 20 20 20 20 20  |reng)==0).      |
00000b30  20 20 20 7b 0a 0a 20 20  20 20 20 20 20 20 20 6e  |   {..         n|
00000b40  75 6d 2b 2b 3b 0a 20 20  20 20 20 20 20 20 20 73  |um++;.         s|
00000b50  74 72 63 70 79 28 61 6e  73 2c 22 43 4f 52 52 45  |trcpy(ans,"CORRE|
00000b60  43 54 22 29 3b 0a 20 20  20 20 20 20 20 20 20 69  |CT");.         i|
00000b70  66 20 28 63 73 6f 75 6e  64 3d 3d 31 29 0a 20 20  |f (csound==1).  |
00000b80  20 20 20 20 20 20 20 62  62 63 5f 73 6f 75 6e 64  |       bbc_sound|
00000b90  28 31 2c 2d 31 35 2c 32  30 30 2c 35 2c 30 29 3b  |(1,-15,200,5,0);|
00000ba0  0a 20 20 20 20 20 20 20  20 20 7d 0a 20 20 20 20  |.         }.    |
00000bb0  20 20 20 20 20 65 6c 73  65 0a 20 20 20 20 20 20  |     else.      |
00000bc0  20 20 20 7b 0a 20 20 20  20 20 20 20 20 20 73 70  |   {.         sp|
00000bd0  72 69 6e 74 66 28 6d 65  73 73 61 67 65 2c 22 57  |rintf(message,"W|
00000be0  52 4f 4e 47 20 2d 20 25  73 22 2c 65 6e 67 6c 69  |RONG - %s",engli|
00000bf0  73 68 5b 71 75 65 73 74  5d 29 3b 0a 20 20 20 20  |sh[quest]);.    |
00000c00  20 20 20 20 20 69 66 20  28 77 73 6f 75 6e 64 3d  |     if (wsound=|
00000c10  3d 31 29 0a 20 20 20 20  20 20 20 20 20 62 62 63  |=1).         bbc|
00000c20  5f 73 6f 75 6e 64 28 31  2c 2d 31 35 2c 35 30 2c  |_sound(1,-15,50,|
00000c30  35 2c 30 29 3b 0a 20 20  20 20 20 20 20 20 20 73  |5,0);.         s|
00000c40  74 72 63 70 79 28 61 6e  73 2c 6d 65 73 73 61 67  |trcpy(ans,messag|
00000c50  65 29 3b 0a 0a 20 20 20  20 20 20 20 20 20 69 66  |e);..         if|
00000c60  20 28 77 6e 3e 31 35 30  29 20 0a 20 20 20 20 20  | (wn>150) .     |
00000c70  20 20 20 20 7b 0a 20 20  20 20 20 20 20 20 20 61  |    {.         a|
00000c80  62 3d 64 62 6f 78 71 75  65 72 79 28 22 59 6f 75  |b=dboxquery("You|
00000c90  72 20 57 72 6f 6e 67 20  41 6e 73 77 65 72 20 4c  |r Wrong Answer L|
00000ca0  69 73 74 20 69 73 20 66  75 6c 6c 2e 20 44 6f 20  |ist is full. Do |
00000cb0  79 6f 75 20 77 61 6e 74  20 74 6f 20 43 6c 65 61  |you want to Clea|
00000cc0  72 20 69 74 3f 20 49 66  20 79 6f 75 20 77 61 6e  |r it? If you wan|
00000cd0  74 20 74 6f 20 6b 65 65  70 20 74 68 65 20 6c 69  |t to keep the li|
00000ce0  73 74 20 73 61 76 65 20  69 74 20 62 65 66 6f 72  |st save it befor|
00000cf0  65 20 79 6f 75 20 61 6e  73 77 65 72 20 74 68 65  |e you answer the|
00000d00  20 6e 65 78 74 20 51 75  65 73 74 69 6f 6e 22 29  | next Question")|
00000d10  3b 0a 20 20 20 20 20 20  20 20 20 20 20 20 69 66  |;.            if|
00000d20  20 28 61 62 3d 3d 31 29  0a 20 20 20 20 20 20 20  | (ab==1).       |
00000d30  20 20 20 20 20 7b 0a 20  20 20 20 20 20 20 20 20  |     {.         |
00000d40  20 20 20 6d 65 6d 73 65  74 28 77 72 6f 6e 67 5f  |   memset(wrong_|
00000d50  77 6f 72 64 5f 67 65 72  6d 61 6e 2c 30 2c 36 38  |word_german,0,68|
00000d60  30 30 29 3b 0a 20 20 20  20 20 20 20 20 20 20 20  |00);.           |
00000d70  20 6d 65 6d 73 65 74 28  77 72 6f 6e 67 5f 77 6f  | memset(wrong_wo|
00000d80  72 64 5f 65 6e 67 6c 69  73 68 2c 30 2c 36 38 30  |rd_english,0,680|
00000d90  30 29 3b 0a 20 20 20 20  20 20 20 20 20 20 20 20  |0);.            |
00000da0  7d 0a 20 20 20 20 20 20  20 20 20 7d 0a 20 20 20  |}.         }.   |
00000db0  20 20 20 20 20 20 65 6c  73 65 0a 20 20 20 20 20  |      else.     |
00000dc0  20 20 20 20 7b 0a 0a 20  20 20 20 20 20 20 20 20  |    {..         |
00000dd0  73 74 72 63 70 79 28 77  72 6f 6e 67 5f 77 6f 72  |strcpy(wrong_wor|
00000de0  64 5f 67 65 72 6d 61 6e  5b 77 6e 5d 2c 67 65 72  |d_german[wn],ger|
00000df0  6d 61 6e 5b 71 75 65 73  74 5d 29 3b 0a 20 20 20  |man[quest]);.   |
00000e00  20 20 20 20 20 20 73 74  72 63 70 79 28 77 72 6f  |      strcpy(wro|
00000e10  6e 67 5f 77 6f 72 64 5f  65 6e 67 6c 69 73 68 5b  |ng_word_english[|
00000e20  77 6e 5d 2c 65 6e 67 6c  69 73 68 5b 71 75 65 73  |wn],english[ques|
00000e30  74 5d 29 3b 0a 20 20 20  20 20 20 20 20 20 77 6e  |t]);.         wn|
00000e40  2b 2b 3b 0a 20 20 20 20  20 20 20 20 20 7d 0a 0a  |++;.         }..|
00000e50  20 20 20 20 20 20 20 20  20 0a 20 20 20 20 20 20  |         .      |
00000e60  20 2f 2a 20 77 65 72 72  28 30 2c 22 6e 20 25 64  | /* werr(0,"n %d|
00000e70  20 51 75 65 73 74 20 25  64 20 77 6e 20 25 64 20  | Quest %d wn %d |
00000e80  6e 75 6d 20 25 64 20 52  65 61 6c 20 65 6e 67 6c  |num %d Real engl|
00000e90  69 73 68 20 25 73 20 57  72 6f 6e 67 20 65 6e 67  |ish %s Wrong eng|
00000ea0  6c 69 73 68 20 25 73 22  2c 6e 2c 71 75 65 73 74  |lish %s",n,quest|
00000eb0  2c 77 6e 2c 6e 75 6d 2c  65 6e 67 6c 69 73 68 5b  |,wn,num,english[|
00000ec0  71 75 65 73 74 5d 2c 77  72 6f 6e 67 5f 77 6f 72  |quest],wrong_wor|
00000ed0  64 5f 65 6e 67 6c 69 73  68 5b 77 6e 5d 29 3b 2a  |d_english[wn]);*|
00000ee0  2f 0a 0a 20 20 20 20 20  20 2f 2a 20 20 77 68 69  |/..      /*  whi|
00000ef0  6c 65 20 28 71 3c 31 30  29 0a 20 20 20 20 20 20  |le (q<10).      |
00000f00  20 20 20 7b 0a 20 20 20  20 20 20 20 20 20 20 20  |   {.           |
00000f10  77 65 72 72 28 30 2c 22  67 65 72 6d 61 6e 20 25  |werr(0,"german %|
00000f20  73 22 2c 77 72 6f 6e 67  5f 77 6f 72 64 5f 67 65  |s",wrong_word_ge|
00000f30  72 6d 61 6e 5b 71 5d 29  3b 0a 20 20 20 20 20 20  |rman[q]);.      |
00000f40  20 20 20 20 20 71 2b 2b  3b 0a 20 20 20 20 20 20  |     q++;.      |
00000f50  20 20 20 7d 20 20 20 20  2a 2f 20 20 20 0a 0a 0a  |   }    */   ...|
00000f60  20 20 20 20 20 20 20 20  0a 20 20 20 20 20 20 20  |        .       |
00000f70  20 20 7d 0a 0a 20 20 20  20 20 20 7d 0a 0a 20 20  |  }..      }..  |
00000f80  20 20 20 20 64 62 6f 78  5f 73 65 74 66 69 65 6c  |    dbox_setfiel|
00000f90  64 28 6d 2c 32 2c 61 6e  73 29 3b 0a 20 20 20 20  |d(m,2,ans);.    |
00000fa0  20 20 71 75 65 73 74 2b  2b 3b 0a 20 20 20 20 20  |  quest++;.     |
00000fb0  20 69 2b 2b 3b 0a 0a 20  20 20 20 20 20 64 72 61  | i++;..      dra|
00000fc0  77 62 6f 78 28 29 3b 0a  0a 20 20 20 69 66 28 71  |wbox();..   if(q|
00000fd0  75 65 73 74 3d 3d 6e 29  0a 7b 0a 20 64 62 6f 78  |uest==n).{. dbox|
00000fe0  5f 68 69 64 65 28 6d 29  3b 0a 20 71 75 65 73 74  |_hide(m);. quest|
00000ff0  20 3d 20 30 3b 0a 20 73  63 6f 72 65 5f 77 69 6e  | = 0;. score_win|
00001000  28 29 3b 0a 7d 0a 0a 20  20 20 7d 0a 0a 0a 0a 0a  |();.}..   }.....|
00001010  0a 0a 0a                                          |...|
00001013