#include <req.h>
#include <exec/types.h>
#include <intuition/intuition.h>
#include <exec/memory.h>

struct TextAttr reqtxtattr[] = {
/* 0 */{(UBYTE *)"topaz.font",8,0,65},
/* 1 */{(UBYTE *)"topaz.font",8,0,65},
/* 2 */{(UBYTE *)"topaz.font",8,0,65},
/* 3 */{(UBYTE *)"topaz.font",8,0,65},
/* 4 */{(UBYTE *)"topaz.font",8,0,65},
/* 5 */{(UBYTE *)"topaz.font",8,0,65},
/* 6 */{(UBYTE *)"topaz.font",8,0,65},
/* 7 */{(UBYTE *)"topaz.font",8,0,65},
/* 8 */{(UBYTE *)"topaz.font",8,0,65},
/* 9 */{(UBYTE *)"topaz.font",8,0,65},
/* 10 */{(UBYTE *)"topaz.font",8,0,65},
  };

struct IntuiText reqinttxt[] = {
/* 0 */{1,0,2,22,2,(struct TextAttr *)&reqtxtattr[0],(UBYTE *)"",(struct IntuiText *)0L},
/* 1 */{1,0,2,22,2,(struct TextAttr *)&reqtxtattr[1],(UBYTE *)"",(struct IntuiText *)0L},
/* 2 */{1,0,2,-65,0,(struct TextAttr *)&reqtxtattr[2],(UBYTE *)"String",(struct IntuiText *)0L},
/* 3 */{0,0,0,0,0,(struct TextAttr *)&reqtxtattr[3],(UBYTE *)"Eisbein",(struct IntuiText *)0L},
/* 4 */{0,0,0,0,0,(struct TextAttr *)&reqtxtattr[4],(UBYTE *)"Sauerkraut",(struct IntuiText *)0L},
/* 5 */{0,0,0,0,0,(struct TextAttr *)&reqtxtattr[5],(UBYTE *)"Rotkohl",(struct IntuiText *)0L},
/* 6 */{0,0,0,0,0,(struct TextAttr *)&reqtxtattr[6],(UBYTE *)"Kroketten",(struct IntuiText *)0L},
/* 7 */{0,0,0,0,0,(struct TextAttr *)&reqtxtattr[7],(UBYTE *)"Eis",(struct IntuiText *)0L},
/* 8 */{0,0,0,0,0,(struct TextAttr *)&reqtxtattr[8],(UBYTE *)"Apfelmus",(struct IntuiText *)0L},
/* 9 */{0,0,0,0,0,(struct TextAttr *)&reqtxtattr[9],(UBYTE *)"Pudding",(struct IntuiText *)0L},
/* 10 */{0,0,0,0,0,(struct TextAttr *)&reqtxtattr[10],(UBYTE *)"Weiter",(struct IntuiText *)0L},
  };

UBYTE strinfstraa[40];
UBYTE undostrinfstraa[40];
struct StringInfo reqstrinf[] = {
/* 0 */{(UBYTE *)&strinfstraa, (UBYTE *)&undostrinfstraa, 0, 40, 0, 0, 0, 0, 0, 0L, 0L, 0L},
  };

USHORT reqimgbitblk[] = {
/* 0 */0,0,0,0,0,0,0,0,0,0,32752,0,7,65535,0,
31,65535,49152,126,3971,61440,252,1793,63488,508,1793,64512,508,1793,64512,
1023,65535,65024,1023,65535,65024,1023,61567,65024,511,53151,64512,511,49135,64512,
255,49135,63488,127,32759,61440,31,65535,49152,7,65535,0,0,32752,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,/* 276 */0,0,0,0,0,0,0,0,0,0,32752,0,
7,65535,0,31,65535,49152,126,3971,61440,252,1793,63488,508,1793,64512,
508,1793,64512,1022,3971,65024,1023,65535,65024,1015,65535,32256,507,65534,64512,
508,65529,64512,255,16359,63488,127,49183,61440,31,65535,49152,7,65535,0,
0,32752,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,  };

struct Image reqimage[] = {
/* 0 */{0, 0, 44, 23, 2,(USHORT *)&reqimgbitblk[0], 3, 0, (struct Image *)0L},
/* 1 */{0, 0, 44, 23, 2,(USHORT *)&reqimgbitblk[276], 3, 0, (struct Image *)0L},
  };

SHORT reqbrddat[] = {
/* 0 */ -1 , -1 ,224 , -1 ,224 ,  8 , -1 ,  8 , -1 , -1 ,
  };

struct Border reqbrd[] = {
/* 0 */{0, 0, 1, 0, 2, 5,(SHORT *)&reqbrddat[0], (struct Border *)0L},
  };

struct Gadget reqgad[] = {
/* 0 */{(struct Gadget *)&reqgad[1], 199, 38, 44, 23, 4, 7, 4097, (struct Image *)&reqimage[0], (LONG)0, (struct IntuiText *)&reqinttxt[0], (LONG)0, (LONG)0, PIC2, (LONG)-1},
/* 1 */{(struct Gadget *)&reqgad[2], 108, 38, 44, 23, 4, 3, 4097, (struct Image *)&reqimage[1], (LONG)0, (struct IntuiText *)&reqinttxt[1], (LONG)0, (LONG)0, PIC1, (LONG)-1},
/* 2 */{(struct Gadget *)0L, 71, 16, 224, 8, 0, 3, 4100, (struct Border *)&reqbrd[0], (LONG)0, (struct IntuiText *)&reqinttxt[2], (LONG)0, (struct StringInfo *)&reqstrinf[0], STRING, (LONG)-1},
  };

struct Requester req;
struct MenuItem reqmenuitem[] = {
/* 0 */{(struct MenuItem *)&reqmenuitem[1], 0, 0, 72, 8, 82, 0, (struct IntuiText *)&reqinttxt[3], (LONG)0, 0, (struct MenuItem *)0L, 65535},
/* 1 */{(struct MenuItem *)&reqmenuitem[2], 0, 8, 80, 8, 82, 0, (struct IntuiText *)&reqinttxt[4], (LONG)0, 0, (struct MenuItem *)0L, 65535},
/* 2 */{(struct MenuItem *)&reqmenuitem[3], 0, 16, 72, 8, 82, 0, (struct IntuiText *)&reqinttxt[5], (LONG)0, 0, (struct MenuItem *)0L, 65535},
/* 3 */{(struct MenuItem *)0L, 0, 24, 72, 8, 82, 0, (struct IntuiText *)&reqinttxt[6], (LONG)0, 0, (struct MenuItem *)0L, 65535},
/* 4 */{(struct MenuItem *)&reqmenuitem[5], 0, 0, 72, 8, 82, 0, (struct IntuiText *)&reqinttxt[7], (LONG)0, 0, (struct MenuItem *)0L, 65535},
/* 5 */{(struct MenuItem *)&reqmenuitem[6], 0, 8, 72, 8, 82, 0, (struct IntuiText *)&reqinttxt[8], (LONG)0, 0, (struct MenuItem *)0L, 65535},
/* 6 */{(struct MenuItem *)0L, -1, 16, 72, 8, 82, 0, (struct IntuiText *)&reqinttxt[9], (LONG)0, 0, (struct MenuItem *)0L, 65535},
/* 7 */{(struct MenuItem *)0L, 0, 0, 51, 8, 82, 0, (struct IntuiText *)&reqinttxt[10], (LONG)0, 0, (struct MenuItem *)0L, 65535},
  };

struct Menu reqmenu[] = {
/* 0 */{(struct Menu *)&reqmenu[1], 0, 0, 40, 0, 1, "Menü", (struct MenuItem *)&reqmenuitem[0]}, /* MENU  */
/* 1 */{(struct Menu *)&reqmenu[2], 40, 0, 80, 0, 1, "Nachtisch", (struct MenuItem *)&reqmenuitem[4]}, /*  */
/* 2 */{(struct Menu *)0L, 120, 0, 56, 0, 257, "Weiter", (struct MenuItem *)&reqmenuitem[7]}, /*  */
  };

reqstart(window)
struct Window *window;
{

InitRequester(&req);
req.LeftEdge = 0;
req.TopEdge = 0;
req.Width = 311;
req.Height = 73;
req.BackFill = 1;
req.Flags = 0;
req.ReqGadget = &reqgad[0];
req.ReqBorder = 0L;
req.ReqText = 0L;
return( Request( &req,window));
}

/* Kopiert Imagedaten ins Chipmem */
Imagemem(source,anz)
register USHORT *source;
register USHORT anz;
{
register USHORT *dest,*t;
register USHORT j;
if(t = dest = (USHORT *)AllocMem((anz * 2),MEMF_CHIP|MEMF_CLEAR))
  for( j = 0; j < anz; j++)
    *dest++ = *source++;
return( (USHORT *)t);
}

