home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / nethack-3.1 / sys / amiga / wbdata.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-22  |  5.0 KB  |  258 lines

  1. /*    SCCS Id: @(#)wbdata.c     3.1    93/01/08
  2. /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993.  */
  3. /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5. struct IntuitionBase *IntuitionBase;
  6. struct GfxBase *GfxBase;
  7. struct Library *IconBase;
  8. struct DiskfontBase *DiskfontBase;
  9. struct Screen *scrn;
  10. struct Window *oldwin;
  11. char *classes = "ABCEHKPRSTVW";
  12. struct TmpRas tmpras;
  13.  
  14. DEFAULTS  defgame =
  15. {
  16.     PL_RANDOM,
  17.     NULL, NULL,
  18. };
  19.  
  20. OPTIONS curopts[] =
  21. {
  22.     { 0, 1, "checkpoint", NULL, GADOCHKPOINT, },
  23.     { 0, 1, "color", NULL, GADOCOLOR, },
  24.     { 0, 1, "confirm", NULL, GADOCONFIRM, },
  25.     { 0, 1, "disclose", NULL, GADODISCLOSE, },
  26.     { 0, 0, "female", NULL, GADOFEMALE, },
  27.     { 0, 1, "fixinv", NULL, GADOFIXINV, },
  28.     { 0, 0, "flush", NULL, GADOFLUSH, },
  29.     { 0, 1, "help", NULL, GADOHELP, },
  30.     { 0, 1, "hilite_pet", NULL, GADOHILITEPET, },
  31.     { 0, 0, "ignintr", NULL, GADOIGNINTR, },
  32.     { 0, 1, "legacy", NULL, GADOLEGACY, },
  33.     { 0, 0, "lit_corridor", NULL, GADOLITCORRIDOR, },
  34.     { 0, 1, "news", NULL, GADONEWS, },
  35.     { 0, 0, "numberpad", NULL, GADONUMBERPAD, },
  36.     { 0, 1, "null", NULL, GADONULL, },
  37.     { 0, 1, "pickup", NULL, GADOPICKUP, },
  38.     { 0, 0, "rest_on_space", NULL, GADORESTONSPACE, },
  39.     { 0, 1, "safepet", NULL, GADOSAFEPET, },
  40.     { 0, 0, "showexp", NULL, GADOSHOWEXP, },
  41.     { 0, 0, "showscore", NULL, GADOSHOWSCORE, },
  42.     { 0, 1, "silent", NULL, GADOSILENT, },
  43.     { 0, 1, "sortpack", NULL, GADOSORTPACK, },
  44.     { 0, 1, "sound", NULL, GADOSOUND, },
  45.     { 0, 0, "standout", NULL, GADOSTANDOUT, },
  46.     { 0, 0, "time", NULL, GADOTIME, },
  47.     { 0, 1, "tombstone", NULL, GADOTOMBSTONE, },
  48.     { 0, 1, "verbose", NULL, GADOVERBOSE, },
  49.     { 0, 0, "asksave", NULL, GADOASKSAVE, },
  50.     { 0, 0, "packorder", "", GADOPACKORDER, },
  51.     { 0, 0, "dogname", "", GADODOGNAME, },
  52.     { 0, 0, "catname", "", GADOCATNAME, },
  53.     { 0, 0, "fruit", "", GADOFRUIT, },
  54.     { 0, 0, "objects", "", GADOOBJECTS, },
  55.     { 0, 0, NULL, NULL, -1 },
  56. };
  57.  
  58. char *players[ ] =
  59. {
  60.     "Random",
  61.     "Archeologist",
  62.     "Barbarian",
  63.     "CaveMan",
  64.     "Elf",
  65.     "Healer",
  66.     "Knight",
  67.     "Priest",
  68.     "Rogue",
  69.     "Samurai",
  70.     "Tourist",
  71.     "Valkyrie",
  72.     "Wizard",
  73.     NULL,
  74. };
  75.  
  76. char *options[ NUMIDX + 1 ] =
  77. {
  78.     "Nethack:",                /* PATH_IDX */
  79.     "",                    /* OPTIONS_IDX */
  80.     "Nethack:",                /* HACKDIR_IDX */
  81.     "Nethack:levels",            /* LEVELS_IDX */
  82.     "Nethack:save",            /* SAVE_IDX */
  83.     "AAA,FFF,620,B08,181,C06,23E,D00",    /* PENS_IDX */
  84.  
  85.     NULL,                /* Terminating option */
  86. };
  87.  
  88. USHORT __chip up_renderdata[] = {
  89. /* Plane 0 */
  90.    0xfff0,
  91.    0x8700,
  92.    0x8f80,
  93.    0xbfe0,
  94.    0x8000,
  95.  
  96. /* Plane 1 */
  97.    0x0008,
  98.    0x0708,
  99.    0x0f88,
  100.    0x3fe8,
  101.    0x7ff8,
  102.  
  103. };
  104.  
  105. struct Image up_renderimage = {
  106.    0, 0,
  107.    13, 5, 2,
  108.    up_renderdata,
  109.    3,0,
  110.    NULL,
  111. };
  112.  
  113. USHORT __chip up_selectdata[] = {
  114. /* Plane 0 */
  115.    0x0008, 0x78f8, 0x7078, 0x4018, 0xfff8,
  116. /* Plane 1 */
  117.    0xfff0, 0xf8f0, 0xf070, 0xc010, 0x0000,
  118. };
  119.  
  120. struct Image up_selectimage = {
  121.    0, 0,
  122.    13, 5, 2,
  123.    up_selectdata,
  124.    3,0,
  125.    NULL,
  126. };
  127.  
  128. USHORT __chip down_renderdata[] = {
  129. /* Plane 0 */
  130.    0xfff0,
  131.    0xbfe0,
  132.    0x8f80,
  133.    0x8700,
  134.    0x8000,
  135.  
  136. /* Plane 1 */
  137.    0x0008,
  138.    0x3fe8,
  139.    0x0f88,
  140.    0x0708,
  141.    0x7ff8,
  142.  
  143. };
  144.  
  145. struct Image down_renderimage = {
  146.    0, 0,
  147.    13, 5, 2,
  148.    down_renderdata,
  149.    3,0,
  150.    NULL,
  151. };
  152.  
  153. USHORT __chip down_selectdata[] = {
  154. /* Plane 0 */
  155.    0x0008, 0x4018, 0x7078, 0x78f8, 0x7ff8,
  156. /* Plane 1 */
  157.    0xfff0, 0xc010, 0xf070, 0xf8f0, 0x8000,
  158. };
  159.  
  160. struct Image down_selectimage = {
  161.    0, 0,
  162.    13, 5, 2,
  163.    down_selectdata,
  164.    3,0,
  165.    NULL,
  166. };
  167.  
  168. USHORT __chip leftimg[] =
  169. {
  170.     0x0380, 0x0000,
  171.     0x0f80, 0x0000,
  172.     0x3fff, 0xff00,
  173.     0xffff, 0xff00,
  174.     0x3fff, 0xff00,
  175.     0x0f80, 0x0000,
  176.     0x0380, 0x0000,
  177. };
  178.  
  179. USHORT __chip rightimg[] =
  180. {
  181.     0x0001, 0xc000,
  182.     0x0001, 0xf000,
  183.     0xffff, 0xfc00,
  184.     0xffff, 0xff00,
  185.     0xffff, 0xfc00,
  186.     0x0001, 0xf000,
  187.     0x0001, 0xc000,
  188. };
  189.  
  190. struct Image leftarrow =
  191. {
  192.     0, 0,
  193.     24, 7, 1,
  194.     leftimg,
  195.     2, 0,
  196.     NULL,
  197. };
  198.  
  199. struct Image rightarrow =
  200. {
  201.     0, 0,
  202.     24, 7, 1,
  203.     rightimg,
  204.     2, 0,
  205.     NULL,
  206. };
  207.  
  208. struct Image dnleftarrow =
  209. {
  210.     0, 0,
  211.     24, 7, 1,
  212.     leftimg,
  213.     1, 0,
  214.     NULL,
  215. };
  216.  
  217. struct Image dnrightarrow =
  218. {
  219.     0, 0,
  220.     24, 7, 1,
  221.     rightimg,
  222.     1, 0,
  223.     NULL,
  224. };
  225.  
  226. struct MsgPort
  227.     *dosport;
  228.  
  229. PLANEPTR
  230.     tmprasp;
  231.  
  232. GPTR
  233.     lastgaddown,    /* Last game gadget user selected */
  234.     globgptr,
  235.     windowgads,        /* What is currently attached to the window */
  236.     gamehead,        /* Pointer to active games */
  237.     gameavail;        /* Pointer to available allocations */
  238.  
  239. int
  240.     wbopen = 0,        /* Is workbench open? */
  241.     shutdown = 0,    /* Close down workbench during game option */
  242.     errup = 0,        /* Error message on line */
  243.     cols = 0,        /* Total columns */
  244.     vcols = 0,        /* Columns visible */
  245.     scol = -1,        /* Starting column */
  246.     height,        /* Height of window */
  247.     width,        /* Width of window */
  248.     curcol = 0,        /* Offset to first display column */
  249.     active_count;    /* Number of games active */
  250.  
  251. char
  252.     defgname[100] = "WBDefaults";
  253.  
  254. flag
  255.     quit=0;        /* time to cleanup */
  256.  
  257. struct Window *win;    /* the window we create */
  258.