home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / develop / beermon / bmsourcecode.lha / BMPEgad.s < prev    next >
Text File  |  1993-08-14  |  15KB  |  646 lines

  1. *
  2. *  Source machine generated by GadToolsBox V2.0
  3. *  which is (c) Copyright 1991-1993 Jaba Development
  4. *
  5. *  GUI Designed by : -- Unnamed --
  6. *
  7.  
  8.     include 'exec/types.i'
  9.     include 'intuition/intuition.i'
  10.     include 'intuition/classes.i'
  11.     include 'intuition/classusr.i'
  12.     include 'intuition/imageclass.i'
  13.     include 'intuition/gadgetclass.i'
  14.     include 'libraries/gadtools.i'
  15.     include 'graphics/displayinfo.i'
  16.     include 'graphics/gfxbase.i'
  17.  
  18.     XREF    _GadToolsBase
  19.     XREF    _IntuitionBase
  20.     XREF    _GfxBase
  21.     XREF    _SysBase
  22.  
  23. OpenScreenTagList    EQU    -612
  24. OpenWindowTagList    EQU    -606
  25. CloseScreen          EQU    -66
  26. CloseWindow          EQU    -72
  27. PrintIText           EQU    -216
  28. LockPubScreen        EQU    -510
  29. UnlockPubScreen      EQU    -516
  30. SetMenuStrip         EQU    -264
  31. ClearMenuStrip       EQU    -54
  32. GetVisualInfoA       EQU    -126
  33. FreeVisualInfo       EQU    -132
  34. CreateContext        EQU    -114
  35. CreateGadgetA        EQU    -30
  36. GT_RefreshWindow     EQU    -84
  37. FreeGadgets          EQU    -36
  38. CreateMenusA         EQU    -48
  39. LayoutMenusA         EQU    -66
  40. FreeMenus            EQU    -54
  41. OpenDiskFont         EQU    -30
  42. CloseFont            EQU    -78
  43. DrawBevelBoxA        EQU    -120
  44. FreeClass            EQU    -714
  45. NewObjectA           EQU    -636
  46. DisposeObject        EQU    -642
  47. TextLength           EQU    -54
  48. CopyMem              EQU    -624
  49. FindTagItem          EQU    -30
  50. IntuiTextLength      EQU    -330
  51. Forbid               EQU    -132
  52. Permit               EQU    -138
  53.  
  54. GD_Gadget00                            EQU    0
  55. GD_Gadget10                            EQU    1
  56. GD_Gadget20                            EQU    2
  57. GD_Gadget30                            EQU    3
  58. GD_Gadget40                            EQU    4
  59. GD_Gadget50                            EQU    5
  60. GD_Gadget60                            EQU    6
  61. GD_Gadget70                            EQU    7
  62. GD_Gadget80                            EQU    8
  63. GD_Gadget90                            EQU    9
  64. GD_Gadget100                           EQU    10
  65. GD_Gadget110                           EQU    11
  66. GD_Gadget120                           EQU    12
  67. GD_Gadget130                           EQU    13
  68. GD_Gadget140                           EQU    14
  69. GD_Gadget150                           EQU    15
  70. GD_Gadget160                           EQU    16
  71. GD_Gadget170                           EQU    17
  72. GD_Gadget180                           EQU    18
  73. GD_Gadget190                           EQU    19
  74. GD_Gadget200                           EQU    20
  75. GD_Gadget210                           EQU    21
  76. GD_Gadget220                           EQU    22
  77.  
  78. Scr:
  79.     DC.L    0
  80. VisualInfo:
  81.     DC.L    0
  82. PubScreenName:
  83.     DC.L    WBName
  84. WBName:
  85.     DC.B    'Workbench',0
  86.     CNOP  0,2
  87. Project0Wnd:
  88.     DC.L    0
  89. Project0GList:
  90.     DC.L    0
  91. Project0Gadgets:
  92.     DCB.L    23,0
  93. BufNewGad:
  94.     DC.W    0,0,0,0
  95.     DC.L    0,0
  96.     DC.W    0
  97.     DC.L    0,0,0
  98. TD:
  99.     DC.L    TAG_DONE
  100. Project0Left:
  101.     DC.W    113
  102. Project0Top:
  103.     DC.W    11
  104. Project0Width:
  105.     DC.W    419
  106. Project0Height:
  107.     DC.W    169
  108.  
  109. Project0GTypes:
  110.     DC.W    STRING_KIND
  111.     DC.W    STRING_KIND
  112.     DC.W    STRING_KIND
  113.     DC.W    STRING_KIND
  114.     DC.W    STRING_KIND
  115.     DC.W    STRING_KIND
  116.     DC.W    STRING_KIND
  117.     DC.W    STRING_KIND
  118.     DC.W    STRING_KIND
  119.     DC.W    STRING_KIND
  120.     DC.W    CYCLE_KIND
  121.     DC.W    CYCLE_KIND
  122.     DC.W    CYCLE_KIND
  123.     DC.W    STRING_KIND
  124.     DC.W    STRING_KIND
  125.     DC.W    BUTTON_KIND
  126.     DC.W    BUTTON_KIND
  127.     DC.W    STRING_KIND
  128.     DC.W    BUTTON_KIND
  129.     DC.W    BUTTON_KIND
  130.     DC.W    STRING_KIND
  131.     DC.W    CYCLE_KIND
  132.     DC.W    CHECKBOX_KIND
  133.  
  134. Project0NGads:
  135.     DC.W    225,3,180,13
  136.     DC.L    Gadget00Text,0
  137.     DC.W    GD_Gadget00
  138.     DC.L    PLACETEXT_LEFT,0,0
  139.     DC.W    225,18,180,13
  140.     DC.L    Gadget10Text,0
  141.     DC.W    GD_Gadget10
  142.     DC.L    PLACETEXT_LEFT,0,0
  143.     DC.W    225,33,180,13
  144.     DC.L    Gadget20Text,0
  145.     DC.W    GD_Gadget20
  146.     DC.L    PLACETEXT_LEFT,0,0
  147.     DC.W    225,48,180,13
  148.     DC.L    Gadget30Text,0
  149.     DC.W    GD_Gadget30
  150.     DC.L    PLACETEXT_LEFT,0,0
  151.     DC.W    225,63,180,13
  152.     DC.L    Gadget40Text,0
  153.     DC.W    GD_Gadget40
  154.     DC.L    PLACETEXT_LEFT,0,0
  155.     DC.W    225,78,180,13
  156.     DC.L    Gadget50Text,0
  157.     DC.W    GD_Gadget50
  158.     DC.L    PLACETEXT_LEFT,0,0
  159.     DC.W    225,93,180,13
  160.     DC.L    Gadget60Text,0
  161.     DC.W    GD_Gadget60
  162.     DC.L    PLACETEXT_LEFT,0,0
  163.     DC.W    225,108,180,13
  164.     DC.L    Gadget70Text,0
  165.     DC.W    GD_Gadget70
  166.     DC.L    PLACETEXT_LEFT,0,0
  167.     DC.W    225,123,180,13
  168.     DC.L    Gadget80Text,0
  169.     DC.W    GD_Gadget80
  170.     DC.L    PLACETEXT_LEFT,0,0
  171.     DC.W    225,138,180,13
  172.     DC.L    Gadget90Text,0
  173.     DC.W    GD_Gadget90
  174.     DC.L    PLACETEXT_LEFT,0,0
  175.     DC.W    46,3,142,13
  176.     DC.L    Gadget100Text,0
  177.     DC.W    GD_Gadget100
  178.     DC.L    PLACETEXT_LEFT,0,0
  179.     DC.W    62,33,126,13
  180.     DC.L    Gadget110Text,0
  181.     DC.W    GD_Gadget110
  182.     DC.L    PLACETEXT_LEFT,0,0
  183.     DC.W    62,48,126,13
  184.     DC.L    Gadget120Text,0
  185.     DC.W    GD_Gadget120
  186.     DC.L    PLACETEXT_LEFT,0,0
  187.     DC.W    62,18,44,13
  188.     DC.L    Gadget130Text,0
  189.     DC.W    GD_Gadget130
  190.     DC.L    PLACETEXT_LEFT,0,0
  191.     DC.W    144,18,44,13
  192.     DC.L    Gadget140Text,0
  193.     DC.W    GD_Gadget140
  194.     DC.L    PLACETEXT_LEFT,0,0
  195.     DC.W    7,93,81,13
  196.     DC.L    Gadget150Text,0
  197.     DC.W    GD_Gadget150
  198.     DC.L    PLACETEXT_IN,0,0
  199.     DC.W    107,93,81,13
  200.     DC.L    Gadget160Text,0
  201.     DC.W    GD_Gadget160
  202.     DC.L    PLACETEXT_IN,0,0
  203.     DC.W    62,108,126,13
  204.     DC.L    Gadget170Text,0
  205.     DC.W    GD_Gadget170
  206.     DC.L    PLACETEXT_LEFT,0,0
  207.     DC.W    7,138,165,13
  208.     DC.L    Gadget180Text,0
  209.     DC.W    GD_Gadget180
  210.     DC.L    PLACETEXT_IN,0,0
  211.     DC.W    7,152,165,13
  212.     DC.L    Gadget190Text,0
  213.     DC.W    GD_Gadget190
  214.     DC.L    PLACETEXT_IN,0,0
  215.     DC.W    225,153,180,12
  216.     DC.L    Gadget200Text,0
  217.     DC.W    GD_Gadget200
  218.     DC.L    PLACETEXT_LEFT,0,0
  219.     DC.W    46,63,142,13
  220.     DC.L    Gadget210Text,0
  221.     DC.W    GD_Gadget210
  222.     DC.L    PLACETEXT_LEFT,0,0
  223.     DC.W    151,80,26,11
  224.     DC.L    Gadget220Text,0
  225.     DC.W    GD_Gadget220
  226.     DC.L    PLACETEXT_LEFT,0,0
  227.  
  228. Project0GTags:
  229.     DC.L    GTST_String,Gadget00String
  230.     DC.L    GTST_MaxChars,20
  231.     DC.L    TAG_DONE
  232.     DC.L    GTST_String,Gadget10String
  233.     DC.L    GTST_MaxChars,20
  234.     DC.L    TAG_DONE
  235.     DC.L    GTST_String,Gadget20String
  236.     DC.L    GTST_MaxChars,20
  237.     DC.L    TAG_DONE
  238.     DC.L    GTST_String,Gadget30String
  239.     DC.L    GTST_MaxChars,20
  240.     DC.L    TAG_DONE
  241.     DC.L    GTST_String,Gadget40String
  242.     DC.L    GTST_MaxChars,20
  243.     DC.L    TAG_DONE
  244.     DC.L    GTST_MaxChars,20
  245.     DC.L    TAG_DONE
  246.     DC.L    GTST_MaxChars,20
  247.     DC.L    TAG_DONE
  248.     DC.L    GTST_MaxChars,20
  249.     DC.L    TAG_DONE
  250.     DC.L    GTST_MaxChars,20
  251.     DC.L    TAG_DONE
  252.     DC.L    GTST_MaxChars,20
  253.     DC.L    TAG_DONE
  254.     DC.L    GTCY_Labels,Gadget100Labels
  255.     DC.L    TAG_DONE
  256.     DC.L    GTCY_Labels,Gadget110Labels
  257.     DC.L    TAG_DONE
  258.     DC.L    GTCY_Labels,Gadget120Labels
  259.     DC.L    TAG_DONE
  260.     DC.L    GTST_String,Gadget130String
  261.     DC.L    GTST_MaxChars,3
  262.     DC.L    TAG_DONE
  263.     DC.L    GTST_String,Gadget140String
  264.     DC.L    GTST_MaxChars,3
  265.     DC.L    TAG_DONE
  266.     DC.L    TAG_DONE
  267.     DC.L    TAG_DONE
  268.     DC.L    GTST_String,Gadget170String
  269.     DC.L    GTST_MaxChars,30
  270.     DC.L    TAG_DONE
  271.     DC.L    TAG_DONE
  272.     DC.L    TAG_DONE
  273.     DC.L    GTST_String,Gadget200String
  274.     DC.L    GTST_MaxChars,30
  275.     DC.L    TAG_DONE
  276.     DC.L    GTCY_Labels,Gadget210Labels
  277.     DC.L    TAG_DONE
  278.     DC.L    GTCB_Checked,1
  279.     DC.L    TAG_DONE
  280.  
  281.  
  282. Gadget00String:
  283.     DC.B    'l 40000 0 2 s|',0
  284.     CNOP    0,2
  285.  
  286. Gadget10String:
  287.     DC.B    'a 40000|',0
  288.     CNOP    0,2
  289.  
  290. Gadget20String:
  291.     DC.B    'd 40000|',0
  292.     CNOP    0,2
  293.  
  294. Gadget30String:
  295.     DC.B    'L oi 40000|',0
  296.     CNOP    0,2
  297.  
  298. Gadget40String:
  299.     DC.B    'cd:|dir|',0
  300.     CNOP    0,2
  301.  
  302. Gadget130String:
  303.     DC.B    'BBB',0
  304.     CNOP    0,2
  305.  
  306. Gadget140String:
  307.     DC.B    '222',0
  308.     CNOP    0,2
  309.  
  310. Gadget170String:
  311.     DC.B    'S:BM.Prefs',0
  312.     CNOP    0,2
  313.  
  314. Gadget200String:
  315.     DC.B    ':C/BeerMon',0
  316.     CNOP    0,2
  317.  
  318. Gadget00Text:
  319.     DC.B    'F1',0
  320.  
  321. Gadget10Text:
  322.     DC.B    'F2',0
  323.  
  324. Gadget20Text:
  325.     DC.B    'F3',0
  326.  
  327. Gadget30Text:
  328.     DC.B    'F4',0
  329.  
  330. Gadget40Text:
  331.     DC.B    'F5',0
  332.  
  333. Gadget50Text:
  334.     DC.B    'F6',0
  335.  
  336. Gadget60Text:
  337.     DC.B    'F7',0
  338.  
  339. Gadget70Text:
  340.     DC.B    'F8',0
  341.  
  342. Gadget80Text:
  343.     DC.B    'F9',0
  344.  
  345. Gadget90Text:
  346.     DC.B    'F10',0
  347.  
  348. Gadget100Text:
  349.     DC.B    'Mode',0
  350.  
  351. Gadget110Text:
  352.     DC.B    'Keymap',0
  353.  
  354. Gadget120Text:
  355.     DC.B    'Repeat',0
  356.  
  357. Gadget130Text:
  358.     DC.B    'Col0  ',0
  359.  
  360. Gadget140Text:
  361.     DC.B    '1',0
  362.  
  363. Gadget150Text:
  364.     DC.B    'Load',0
  365.  
  366. Gadget160Text:
  367.     DC.B    'Save',0
  368.  
  369. Gadget170Text:
  370.     DC.B    'Prefs ',0
  371.  
  372. Gadget180Text:
  373.     DC.B    'Cancel',0
  374.  
  375. Gadget190Text:
  376.     DC.B    'Modify BeerMon',0
  377.  
  378. Gadget200Text:
  379.     DC.B    'Path',0
  380.  
  381. Gadget210Text:
  382.     DC.B    'CPU ',0
  383.  
  384. Gadget220Text:
  385.     DC.B    'Disk Verification',0
  386.  
  387.     CNOP    0,2
  388.  
  389. Gadget100Labels:
  390.     DC.L    Gadget100Lab0
  391.     DC.L    Gadget100Lab1
  392.     DC.L    Gadget100Lab2
  393.     DC.L    Gadget100Lab3
  394.     DC.L    Gadget100Lab4
  395.     DC.L    0
  396.  
  397. Gadget110Labels:
  398.     DC.L    Gadget110Lab0
  399.     DC.L    Gadget110Lab1
  400.     DC.L    0
  401.  
  402. Gadget120Labels:
  403.     DC.L    Gadget120Lab0
  404.     DC.L    Gadget120Lab1
  405.     DC.L    Gadget120Lab2
  406.     DC.L    0
  407.  
  408. Gadget210Labels:
  409.     DC.L    Gadget210Lab0
  410.     DC.L    Gadget210Lab1
  411.     DC.L    0
  412.  
  413. Gadget100Lab0:    DC.B    'PAL [640×256]',0
  414. Gadget100Lab1:    DC.B    'PAL [640×512]',0
  415. Gadget100Lab2:    DC.B    'NTSC [640×200]',0
  416. Gadget100Lab3:    DC.B    'NTSC [640×400]',0
  417. Gadget100Lab4:    DC.B    'VGA [640×480]',0
  418.  
  419.     CNOP    0,2
  420.  
  421. Gadget110Lab0:    DC.B    'German',0
  422. Gadget110Lab1:    DC.B    'American',0
  423.  
  424.     CNOP    0,2
  425.  
  426. Gadget120Lab0:    DC.B    'Fast',0
  427. Gadget120Lab1:    DC.B    'Medium',0
  428. Gadget120Lab2:    DC.B    'Slow',0
  429.  
  430.     CNOP    0,2
  431.  
  432. Gadget210Lab0:    DC.B    'Standard',0
  433. Gadget210Lab1:    DC.B    'Economy',0
  434.  
  435.     CNOP    0,2
  436.  
  437. topaz8:
  438.     DC.L    topazFName8
  439.     DC.W    8
  440.     DC.B    $00,$01
  441.  
  442. topazFName8:
  443.     DC.B    'topaz.font',0
  444.     CNOP    0,2
  445.  
  446. Project0WindowTags:
  447. Project0L:
  448.     DC.L    WA_Left,0
  449. Project0T:
  450.     DC.L    WA_Top,0
  451. Project0W:
  452.     DC.L    WA_Width,0
  453. Project0H:
  454.     DC.L    WA_Height,0
  455.     DC.L    WA_IDCMP,STRINGIDCMP!CYCLEIDCMP!BUTTONIDCMP!CHECKBOXIDCMP!IDCMP_REFRESHWINDOW
  456.     DC.L    WA_Flags,WFLG_DRAGBAR!WFLG_DEPTHGADGET!WFLG_SMART_REFRESH!WFLG_ACTIVATE!WFLG_RMBTRAP
  457. Project0WG:
  458.     DC.L    WA_Gadgets,0
  459.     DC.L    WA_Title,Project0WTitle
  460.     DC.L    WA_ScreenTitle,Project0STitle
  461.     DC.L    TAG_DONE
  462.  
  463. Project0WTitle:
  464.     DC.B    'BeerMon Preferences Editor V0.14',0
  465.     CNOP    0,2
  466.  
  467. Project0STitle:
  468.     DC.B    'Written By Carnivore/BeerMacht',0
  469.     CNOP    0,2
  470.  
  471. SetupScreen
  472.     movem.l d1-d3/a0-a2/a6,-(sp)
  473.     move.l  _IntuitionBase,a6
  474.     move.l  PubScreenName,a0
  475.     jsr     LockPubScreen(a6)
  476.     move.l  d0,Scr
  477.     tst.l   d0
  478.     beq     SError
  479.     move.l  Scr,a0
  480.     move.l  _GadToolsBase,a6
  481.     lea.l   TD,a1
  482.     jsr     GetVisualInfoA(a6)
  483.     move.l  d0,VisualInfo
  484.     tst.l   d0
  485.     beq     VError
  486.     moveq   #0,d0
  487. SDone:
  488.     movem.l (sp)+,d1-d3/a0-a2/a6
  489.     rts
  490. SError:
  491.     moveq   #1,d0
  492.     bra.s   SDone
  493. VError:
  494.     moveq   #2,d0
  495.     bra.s   SDone
  496.  
  497. CloseDownScreen:
  498.     movem.l d0-d1/a0-a1/a6,-(sp)
  499.     move.l  _GadToolsBase,a6
  500.     move.l  VisualInfo,a0
  501.     cmpa.l  #0,a0
  502.     beq.s   NoVis
  503.     jsr     FreeVisualInfo(a6)
  504.     move.l  #0,VisualInfo
  505. NoVis:
  506.     move.l  _IntuitionBase,a6
  507.     suba.l  a0,a0
  508.     move.l  Scr,a1
  509.     cmpa.l  #0,a1
  510.     beq.s   NoScr
  511.     jsr     UnlockPubScreen(a6)
  512.     move.l  #0,Scr
  513. NoScr:
  514.     movem.l (sp)+,d0-d1/a0-a1/a6
  515.     rts
  516.  
  517.     XDEF    OpenProject0Window
  518.  
  519. OpenProject0Window:
  520.     movem.l d1-d4/a0-a4/a6,-(sp)
  521.     move.l  Scr,a0
  522.     moveq   #0,d3
  523.     moveq   #0,d2
  524.     move.b  sc_WBorLeft(a0),d2
  525.     move.l  sc_Font(a0),a1
  526.     move.w  ta_YSize(a1),d3
  527.     addq.w  #1,d3
  528.     add.b   sc_WBorTop(a0),d3
  529.     move.l  _GadToolsBase,a6
  530.     lea.l   Project0GList,a0
  531.     jsr     CreateContext(a6)
  532.     move.l  d0,a3
  533.     tst.l   d0
  534.     beq     Project0CError
  535.     movem.w d2-d3,-(sp)
  536.     moveq   #0,d3
  537.     lea.l   Project0GTags,a4
  538. Project0GL:
  539.     move.l  _SysBase,a6
  540.     lea.l   Project0NGads,a0
  541.     move.l  d3,d0
  542.     mulu    #gng_SIZEOF,d0
  543.     add.l   d0,a0
  544.     lea.l   BufNewGad,a1
  545.     moveq   #gng_SIZEOF,d0
  546.     jsr     CopyMem(a6)
  547.     lea.l   BufNewGad,a0
  548.     move.l  VisualInfo,gng_VisualInfo(a0)
  549.     move.l  #topaz8,gng_TextAttr(a0)
  550.     move.w  gng_LeftEdge(a0),d0
  551.     add.w   (sp),d0
  552.     move.w  d0,gng_LeftEdge(a0)
  553.     move.w  gng_TopEdge(a0),d0
  554.     add.w   2(sp),d0
  555.     move.w  d0,gng_TopEdge(a0)
  556.     move.l  _GadToolsBase,a6
  557.     lea.l   Project0GTypes,a0
  558.     moveq   #0,d0
  559.     move.l  d3,d1
  560.     asl.l   #1,d1
  561.     add.l   d1,a0
  562.     move.w  (a0),d0
  563.     move.l  a3,a0
  564.     lea.l   BufNewGad,a1
  565.     move.l  a4,a2
  566.     jsr     CreateGadgetA(a6)
  567.     tst.l   d0
  568.     bne.s    Project0COK
  569.     movem.w (sp)+,d2-d3
  570.     bra     Project0CError
  571. Project0COK:
  572.     move.l  d0,a3
  573.     move.l  d3,d0
  574.     asl.l   #2,d0
  575.     lea.l   Project0Gadgets,a0
  576.     add.l   d0,a0
  577.     move.l  a3,(a0)
  578. Project0TL:
  579.     tst.l   (a4)
  580.     beq.s   Project0DN
  581.     addq.w  #8,a4
  582.     bra.s   Project0TL
  583. Project0DN:
  584.     addq.w  #4,a4
  585.     addq.w  #1,d3
  586.     cmp.w   #Project0_CNT,d3
  587.     bmi     Project0GL
  588.     movem.w (sp)+,d2-d3
  589.     move.l  Project0GList,Project0WG+4
  590.     moveq   #0,d0
  591.     move.w  Project0Left,d0
  592.     move.l  d0,Project0L+4
  593.     move.w  Project0Top,d0
  594.     move.l  d0,Project0T+4
  595.     move.w  Project0Width,d0
  596.     move.l  d0,Project0W+4
  597.     move.w  Project0Height,d0
  598.     add.w   d3,d0
  599.     move.l  d0,Project0H+4
  600.     move.l  _IntuitionBase,a6
  601.     suba.l  a0,a0
  602.     lea.l   Project0WindowTags,a1
  603.     jsr     OpenWindowTagList(a6)
  604.     move.l  d0,Project0Wnd
  605.     tst.l   d0
  606.     beq     Project0WError
  607.     move.l  _GadToolsBase,a6
  608.     move.l  Project0Wnd,a0
  609.     suba.l  a1,a1
  610.     jsr     GT_RefreshWindow(a6)
  611.     moveq   #0,d0
  612. Project0Done:
  613.     movem.l (sp)+,d1-d4/a0-a4/a6
  614.     rts
  615. Project0CError:
  616.     moveq   #1,d0
  617.     bra.s   Project0Done
  618. Project0GError:
  619.     moveq   #2,d0
  620.     bra.s   Project0Done
  621. Project0WError:
  622.     moveq   #4,d0
  623.     bra.s   Project0Done
  624.  
  625. CloseProject0Window:
  626.     movem.l d0-d1/a0-a2/a6,-(sp)
  627.     move.l  _IntuitionBase,a6
  628.     move.l  Project0Wnd,a0
  629.     cmpa.l  #0,a0
  630.     beq     Project0NWnd
  631.     jsr     CloseWindow(a6)
  632.     move.l  #0,Project0Wnd
  633. Project0NWnd:
  634.     move.l  _GadToolsBase,a6
  635.     move.l  Project0GList,a0
  636.     cmpa.l  #0,a0
  637.     beq     Project0NGad
  638.     jsr     FreeGadgets(a6)
  639.     move.l  #0,Project0GList
  640. Project0NGad:
  641.     movem.l (sp)+,d0-d1/a0-a2/a6
  642.     rts
  643.  
  644.  
  645.     end
  646.