home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Sound / Player / HF-AP210.LHA / APlayer / Files / Developer.lha / Examples / aaRGBBox-Scope.S < prev    next >
Encoding:
Text File  |  1996-03-21  |  13.6 KB  |  681 lines

  1. ; $VER: RGBBox-Scope.library 1.12
  2. ;
  3.  
  4.     INCDIR    "Includes3.0:Include3.0/"
  5.     INCLUDE    "Exec/Types.i"
  6.     INCLUDE    "Own/SystemBases.i"
  7.     INCLUDE    "Own/SystemStructures.i"
  8.     INCLUDE    "Own/SystemOffsets.i"
  9.     INCLUDE    "Own/AccessiblePlayer.i"
  10.     INCLUDE    "Own/Reqtools.i"
  11.     INCLUDE    "Own/IDCMP.i"
  12.     INCLUDE    "Own/Intuitiontags.i"
  13.     INCLUDE    "Own/Gadtools.i"
  14.  
  15.  
  16. VERSION        =    1
  17. REVISION    =    12
  18.  
  19. TRUE        =    -1
  20. FALSE        =    0
  21.  
  22. SIGBREAKB_CTRL_C=    12
  23. SIGBREAK_CTRL_C    =    1<<SIGBREAKB_CTRL_C
  24.  
  25. ; Library Data
  26.  
  27. LN_Name        =    10
  28. LN_Type        =    8
  29. NT_Library    =    9
  30.  
  31. LIBB_Summing    =    0
  32. LIBB_Changed    =    1
  33. LIBB_SumUsed    =    2
  34. LIBB_DelExp    =    3
  35.  
  36. LIBF_Summing    =    1<<LIBB_Summing
  37. LIBF_Changed    =    1<<LIBB_Changed
  38. LIBF_SumUsed    =    1<<LIBB_SumUsed
  39. LIBF_DelExp    =    1<<LIBB_DelExp
  40.  
  41. ; Macros
  42.  
  43. INBYTE    MACRO
  44.     dc.b    %11100000,0
  45.     dc.w    \1
  46.     dc.b    \2,0
  47.     ENDM
  48.  
  49. INWORD    MACRO
  50.     dc.b    %11010000,0
  51.     dc.w    \1,\2
  52.     ENDM
  53.  
  54. INLONG    MACRO
  55.     dc.b    %11000000,0
  56.     dc.w    \1
  57.     dc.l    \2
  58.     ENDM
  59.  
  60. ; Library Base Structure
  61.  
  62.     STRUCTURE LibraryStruct,0
  63.     STRUCT    LIB_Node,14
  64.     UBYTE    LIB_Flags
  65.     UBYTE    LIB_Pad
  66.     UWORD    LIB_NegSize
  67.     UWORD    LIB_PosSize
  68.     UWORD    LIB_Version
  69.     UWORD    LIB_Revision
  70.     APTR    LIB_IDString
  71.     ULONG    LIB_Sum
  72.     UWORD    LIB_OpenCnt
  73.  
  74.     LONG    LIB_SegList
  75.     APTR    LIB_DosBase
  76.     LABEL    LibraryStruct_SIZEOF
  77.  
  78.  
  79.     SECTION    RGBBox-Scope.library,CODE
  80.  
  81. START    moveq    #0,d0
  82.     rts
  83. ;------------------------------------------------------------------------------
  84. LIBNAME    dc.b    "aaRGBBox-Scope.library",0
  85.  
  86. LIBID    dc.b    "RGBBox-Scope.library 1.12 (15-August-1995)",0
  87.     even
  88. ;------------------------------------------------------------------------------
  89. ; ROMTAG Structure
  90. ;
  91.  
  92. ROMTAG    dc.w    $4afc            ;ROMTAG Indentifier
  93.     dc.l    romtag
  94.     dc.l    slut
  95.     dc.b    $80            ;Flags
  96.     dc.b    version
  97.     dc.b    $09            ;Type Of Module
  98.     dc.b    $00            ;Initialization Priority
  99.     dc.l    libname
  100.     dc.l    libid
  101.     dc.l    autinit            ;Pointer To AUTOINIT Table
  102. ;------------------------------------------------------------------------------
  103. ; AUTOINIT Table
  104. ;
  105.  
  106. AUTINIT    dc.l    LibraryStruct_SIZEOF    ;Size Of Structure AFTER Base Address
  107.     dc.l    vector            ;Pointer To Vector Table
  108.     dc.l    inittab            ;Pointer To Init Structure
  109.     dc.l    init            ;Pointer To Init Routine
  110. ;------------------------------------------------------------------------------
  111. ; Init Table
  112. ;
  113.  
  114. INITTAB    INBYTE    LN_Type,NT_Library
  115.     INBYTE    LIB_Flags,LIBF_SumUsed!LIBF_Changed
  116.     INWORD    LIB_Version,version
  117.     INWORD    LIB_Revision,revision
  118.     INLONG    LN_Name,libname
  119.     INLONG    LIB_IDString,libid
  120.     dc.l    0
  121. ;------------------------------------------------------------------------------
  122. ; Vector Table
  123. ;
  124.  
  125. VECTOR    dc.w    -1
  126.     dc.w    opnlib-vector,clslib-vector,expunge-vector,extfunc-vector
  127.     dc.w    RB_GetTags-vector
  128.     dc.w    -1
  129. ;------------------------------------------------------------------------------
  130. ; Init Routine
  131. ;
  132.  
  133. INIT    movem.l    d1-d7/a0-a6,-(sp)
  134.     move.l    d0,a4            ;Base Address
  135.     move.l    a0,LIB_SegList(a4)
  136.  
  137.     move.l    4.w,a6
  138.     lea    dosnam(pc),a1
  139.     moveq    #37,d0
  140.     jsr    OpenLibrary(a6)        ;Open Dos.library
  141.     move.l    d0,LIB_DosBase(a4)
  142.     beq.b    inito
  143.  
  144.     move.l    d0,a6
  145.     move.l    #cfgname,d1
  146.     move.l    #1005,d2
  147.     jsr    Open(a6)        ;Open Config File
  148.     move.l    d0,d7
  149.     beq.b    init1
  150.  
  151.     move.l    d7,d1
  152.     move.l    #winpos,d2
  153.     moveq    #4*2,d3
  154.     jsr    Read(a6)        ;Read Config File
  155.  
  156.     move.l    d7,d1
  157.     jsr    Close(a6)        ;Close Config File Again
  158.  
  159.     move.w    winpos(pc),wintags+6
  160.     move.w    winpos+2(pc),wintags+14
  161.     move.w    winpos+4(pc),wintags+22
  162.     move.w    winpos+6(pc),wintags+30
  163.  
  164. INIT1    move.l    a4,d0
  165. INITO    movem.l    (sp)+,d1-d7/a0-a6
  166.     rts
  167. ;------------------------------------------------------------------------------
  168. ; Offset  -6: Open Library
  169. ;
  170.  
  171. OPNLIB    addq.w    #1,LIB_OpenCnt(a6)
  172.     bclr    #LIBB_DelExp,LIB_Flags(a6)
  173.     move.l    a6,d0
  174.     rts
  175. ;------------------------------------------------------------------------------
  176. ; Offset -12: Close Library
  177. ;
  178.  
  179. CLSLIB    moveq    #0,d0
  180.     subq.w    #1,LIB_OpenCnt(a6)
  181.     bne.b    clslibo
  182.     btst    #LIBB_DelExp,LIB_Flags(a6)
  183.     bne.b    expunge
  184. CLSLIBO    rts
  185. ;------------------------------------------------------------------------------
  186. ; Offset -18: Expunge
  187. ;
  188.  
  189. EXPUNGE    movem.l    d1-d7/a0-a6,-(sp)
  190.     move.l    a6,a4
  191.     tst.w    LIB_OpenCnt(a4)
  192.     beq.b    exp1
  193.     bset    #LIBB_DelExp,LIB_Flags(a4)
  194.     moveq    #0,d0
  195.     bra.w    expungo
  196.  
  197. EXP1    move.w    winpos(pc),d0
  198.     cmp.w    wintags+6(pc),d0    ;Left
  199.     bne.b    exp2
  200.     move.w    winpos+2(pc),d0
  201.     cmp.w    wintags+14(pc),d0    ;Top
  202.     bne.b    exp2
  203.     move.w    winpos+4(pc),d0
  204.     cmp.w    wintags+22(pc),d0    ;Width
  205.     bne.b    exp2
  206.     move.w    winpos+6(pc),d0
  207.     cmp.w    wintags+30(pc),d0    ;Height
  208.     beq.b    exp3
  209.  
  210. EXP2    move.l    LIB_DosBase(a4),a6
  211.     move.l    #cfgname,d1
  212.     move.l    #1006,d2
  213.     jsr    Open(a6)        ;Open Config File
  214.     move.l    d0,d7
  215.     beq.b    exp3
  216.  
  217.     move.w    wintags+30(pc),-(sp)
  218.     move.w    wintags+22(pc),-(sp)
  219.     move.w    wintags+14(pc),-(sp)
  220.     move.w    wintags+6(pc),-(sp)
  221.  
  222.     move.l    d7,d1
  223.     move.l    sp,d2
  224.     moveq    #4*2,d3
  225.     jsr    Write(a6)        ;Write Config File
  226.  
  227.     move.l    d7,d1
  228.     jsr    Close(a6)        ;Close Config File Again
  229.     addq.l    #4*2,sp
  230.  
  231. EXP3    move.l    4.w,a6
  232.     move.l    LIB_DosBase(a4),a1
  233.     jsr    CloseLibrary(a6)    ;Close Dos.library
  234.  
  235.     move.l    LIB_SegList(a4),d2
  236.     move.l    a4,a1
  237.     jsr    Remove(a6)
  238.  
  239.     move.l    a4,a1
  240.     moveq    #0,d0
  241.     move.w    LIB_NegSize(a4),d0
  242.     sub.l    d0,a1
  243.     add.w    LIB_PosSize(a4),d0
  244.     jsr    FreeMem(a6)
  245.     move.l    d2,d0
  246.  
  247. EXPUNGO    movem.l    (sp)+,d1-d7/a0-a6
  248.     rts
  249. ;------------------------------------------------------------------------------
  250. ; Offset -24: ExtFunc
  251. ;
  252.  
  253. EXTFUNC    moveq    #0,d0
  254.     rts
  255. ;------------------------------------------------------------------------------
  256. ;******************************************************************************
  257. ;* RGBBox-Peak Agent
  258. ;******************************************************************************
  259. ;------------------------------------------------------------------------------
  260. ; Offset -30: GetTags
  261. ;
  262. ; IN :    Nothing
  263. ;
  264. ; OUT:    A0 = Pointer To A TagList
  265. ;
  266.  
  267. RB_GetTags
  268.     lea    RB_Tags(pc),a0
  269.     rts
  270.  
  271. RB_Tags    dc.l    APT_RequestVersion,6
  272.     dc.l    APT_OSVersion,39
  273.  
  274.     dc.l    APT_AgentType,AGNT_Scope
  275.     dc.l    APT_AgentName,rbname
  276.     dc.l    APT_Description,rbdes
  277.  
  278.     dc.l    APT_Show,RB_ShowPoi
  279.     dc.l    TAG_END
  280.  
  281. RBNAME    dc.b    "RGB Box Scope",0
  282. RBDES    dc.b    "Coded by Tax.",10,10
  283.     dc.b    "This scope will show a RGB box",10
  284.     dc.b    "which will change color to the",10
  285.     dc.b    "first 3 channels. It requires",10
  286.     dc.b    "OS3.0 and one free pen to run.",0
  287.     even
  288. ;------------------------------------------------------------------------------
  289. ; Show
  290. ;
  291. ; IN :    Nothing
  292. ;
  293. ; OUT:    Nothing
  294. ;
  295.  
  296. RB_Show
  297.     move.l    glob(pc),a5
  298.  
  299.     move.l    APG_GetScreenHD(a5),a4
  300.     jsr    (a4)
  301.     move.l    d0,scrhd+4
  302.  
  303.     move.l    APG_GfxBase(a5),a6
  304.     move.l    d0,a0
  305.     move.l    Screen_ViewPort+ViewPort_ColorMap(a0),a0
  306.     move.l    a0,colmap
  307.     moveq    #-1,d0            ;We Accept Any Color Number
  308.     moveq    #0,d1            ;Black
  309.     moveq    #0,d2            ;
  310.     moveq    #0,d3            ;
  311.     moveq    #1,d4            ;PEN_EXCLUSIVE
  312.     jsr    ObtainPen(a6)        ;Allocate Pen
  313.     move.l    d0,pennum
  314.     bpl.b    .penok
  315.     move.l    APG_ReqBase(a5),a6
  316.     lea    reqtag(pc),a0
  317.     lea    npenerr(pc),a1
  318.     lea    okaygad(pc),a2
  319.     sub.l    a3,a3
  320.     sub.l    a4,a4
  321.     jsr    rtEZRequestA(a6)    ;Show Allocation Error
  322.     bra.w    .exit
  323.  
  324. ; Setup Window
  325.  
  326. .PENOK    move.l    APG_IntBase(a5),a6
  327.     sub.l    a0,a0
  328.     lea    wintags(pc),a1
  329.     jsr    OpenWindowTagList(a6)    ;Open Our Window
  330.     move.l    d0,winhd
  331.     beq.w    .exit1
  332.  
  333.     move.l    APG_GadBase(a5),a6
  334.     move.l    scrhd+4(pc),a0
  335.     sub.l    a1,a1
  336.     jsr    GetVisualInfoA(a6)
  337.     move.l    d0,bevtags+4
  338.     beq.w    .exit2
  339.  
  340.     move.l    APG_AllocScopeSignal(a5),a4
  341.     jsr    (a4)
  342.     move.l    d0,scopstr
  343.     beq.w    .exit3
  344.  
  345.     bsr.w    drwwin            ;Draw Window Box
  346.  
  347. ; Change Task Priority (This Is Important!!!!!)
  348.  
  349.     move.l    4.w,a6
  350.     sub.l    a1,a1
  351.     jsr    FindTask(a6)
  352.  
  353.     move.l    d0,a1
  354.     moveq    #-25,d0            ;New Priority
  355.     jsr    SetTaskPri(a6)
  356.  
  357. ; Message Loop
  358.  
  359. .LOOP    move.l    APG_GetScopeSignal(a5),a4
  360.     move.l    scopstr(pc),a0
  361.     jsr    (a4)
  362.  
  363.     move.l    winhd(pc),a0
  364.     move.l    Window_UserPort(a0),a0
  365.     moveq    #0,d1
  366.     moveq    #1,d2
  367.     move.b    MsgPort_SigBit(a0),d1
  368.     lsl.l    d1,d2
  369.     or.l    d2,d0            ;Window Signal
  370.     or.l    #SIGBREAK_CTRL_C,d0
  371.  
  372.     move.l    4.w,a6
  373.     jsr    Wait(a6)
  374.  
  375. ; Test For Ctrl-C Signal
  376.  
  377.     moveq    #0,d7
  378.     btst    #SIGBREAKB_CTRL_C,d0
  379.     beq.b    .noctrl
  380.     moveq    #-1,d7            ;Set Exit Flag
  381. .NOCTRL    move.l    d7,-(sp)
  382.  
  383. ; Test For Scope Signal
  384.  
  385.     move.l    APG_TestScopeSignal(a5),a4
  386.     move.l    scopstr(pc),a0
  387.     jsr    (a4)
  388.     btst    #0,d0
  389.     beq.b    .noscop
  390.     bsr.w    doscop            ;Yeah, We Have To Change The Color
  391.  
  392. .NOSCOP    btst    #1,d0
  393.     beq.b    .tstwin
  394.     bsr.w    dovb
  395.  
  396. .TSTWIN    move.l    4.w,a6
  397.     move.l    winhd(pc),a0
  398.     move.l    Window_UserPort(a0),a0
  399.     jsr    GetMsg(a6)        ;Get Message From Window Port
  400.     tst.l    d0
  401.     bne.b    .msg
  402.     tst.l    (sp)+            ;Test Exit Flag
  403.     bne.b    .getout
  404.     bra.b    .loop
  405.  
  406. .MSG    move.l    d0,a1
  407.     move.l    IntuiMessage_Class(a1),d2;Get Message
  408.     jsr    ReplyMsg(a6)
  409.  
  410.     cmp.l    #IC_NewSize,d2
  411.     bne.b    .nosize
  412.     bsr.w    drwwin            ;Draw Window Again
  413.     bra.b    .tstwin
  414.  
  415. .NOSIZE    cmp.l    #IC_CloseWindow,d2
  416.     bne.b    .tstwin
  417.     moveq    #-1,d7
  418.     move.l    d7,(sp)
  419.     bra.b    .tstwin
  420.  
  421. ; Remember Window Positions To Next Time
  422.  
  423. .GETOUT    moveq    #0,d4
  424.     moveq    #0,d5
  425.     move.l    scrhd+4(pc),a0
  426.     move.b    Screen_WBorLeft(a0),d4
  427.     add.b    Screen_WBorRight(a0),d4
  428.  
  429.     move.l    Screen_Font(a0),a1
  430.     move.w    TextAttr_YSize(a1),d5
  431.     addq.w    #1,d5
  432.     add.b    Screen_WBorTop(a0),d5
  433.     add.b    Screen_WBorBottom(a0),d5
  434.  
  435.     move.l    winhd(pc),a0
  436.     move.w    Window_LeftEdge(a0),d0
  437.     move.w    Window_TopEdge(a0),d1
  438.     move.w    Window_Width(a0),d2
  439.     move.w    Window_Height(a0),d3
  440.     sub.w    d4,d2
  441.     sub.w    #14,d2            ;Width Of Size Border
  442.     sub.w    d5,d3
  443.  
  444.     lea    wintags(pc),a0
  445.     move.w    d0,6(a0)        ;Left
  446.     move.w    d1,14(a0)        ;Top
  447.     move.w    d2,22(a0)        ;Width
  448.     move.w    d3,30(a0)        ;Height
  449.  
  450. ; Get Out
  451.  
  452.     move.l    APG_FreeScopeSignal(a5),a4
  453.     move.l    scopstr(pc),a0
  454.     jsr    (a4)
  455.  
  456. .EXIT3    move.l    APG_GadBase(a5),a6
  457.     move.l    bevtags+4(pc),a0
  458.     jsr    FreeVisualInfo(a6)
  459.  
  460. .EXIT2    move.l    APG_IntBase(a5),a6
  461.     move.l    winhd(pc),a0
  462.     jsr    CloseWindow(a6)        ;Close Window
  463.  
  464. .EXIT1    move.l    APG_GfxBase(a5),a6
  465.     move.l    colmap(pc),a0
  466.     move.l    pennum(pc),d0
  467.     jsr    ReleasePen(a6)        ;Release Pen Again
  468.  
  469. .EXIT    moveq    #0,d0
  470.     rts
  471. ;------------------------------------------------------------------------------
  472. ; Draw Window
  473. ;
  474.  
  475. DRWWIN    moveq    #0,d4
  476.     moveq    #0,d5
  477.     moveq    #0,d6
  478.     moveq    #0,d7
  479.     move.l    scrhd+4(pc),a0
  480.     move.b    Screen_WBorLeft(a0),d4
  481.     move.b    Screen_WBorRight(a0),d5
  482.  
  483.     move.l    Screen_Font(a0),a1
  484.     move.w    TextAttr_YSize(a1),d6
  485.     addq.w    #1,d6
  486.     add.b    Screen_WBorTop(a0),d6
  487.     move.b    Screen_WBorBottom(a0),d7
  488.  
  489.     move.l    winhd(pc),a0
  490.     move.w    Window_Width(a0),d2
  491.     move.w    Window_Height(a0),d3
  492.     sub.w    d4,d2
  493.     sub.w    d5,d2
  494.     sub.w    #14+8,d2        ;Width Of Size Border + 8 Spaces
  495.     sub.w    d6,d3
  496.     sub.w    d7,d3
  497.     subq.w    #4,d3            ;4 Spaces
  498.  
  499.     move.l    Window_RPort(a0),a1
  500.     move.l    a1,-(sp)        ;Store RastPort
  501.  
  502.     move.l    d2,-(sp)
  503.     move.l    APG_GfxBase(a5),a6
  504.     moveq    #0,d0
  505.     moveq    #0,d1
  506.     moveq    #0,d2            ;JAM1
  507.     jsr    SetABPenDrMd(a6)
  508.     move.l    (sp)+,d2
  509.  
  510.     movem.l    d2-d3,-(sp)
  511.     move.l    8(sp),a1        ;RastPort
  512.     moveq    #4,d0
  513.     add.w    d4,d0
  514.     moveq    #2,d1
  515.     add.w    d6,d1
  516.     add.w    d0,d2
  517.     addq.w    #3,d2
  518.     add.w    d1,d3
  519.     addq.w    #1,d3
  520.     jsr    RectFill(a6)        ;Clear Window
  521.     movem.l    (sp)+,d2-d3
  522.  
  523.     move.l    APG_GadBase(a5),a6
  524.     move.l    (sp),a0
  525.     moveq    #4,d0
  526.     add.w    d4,d0
  527.     moveq    #2,d1
  528.     add.w    d6,d1
  529.     lea    bevtags(pc),a1
  530.     jsr    DrawBevelBoxA(a6)
  531.  
  532.     move.l    d2,-(sp)
  533.     move.l    APG_GfxBase(a5),a6
  534.     move.l    4(sp),a1        ;RastPort
  535.     move.l    pennum(pc),d0
  536.     moveq    #0,d1
  537.     moveq    #0,d2            ;JAM1
  538.     jsr    SetABPenDrMd(a6)
  539.     move.l    (sp)+,d2
  540.  
  541.     move.l    (sp)+,a1        ;RastPort
  542.     moveq    #4+2,d0
  543.     add.w    d4,d0
  544.     moveq    #2+1,d1
  545.     add.w    d6,d1
  546.     subq.w    #4+1,d2
  547.     add.w    d0,d2
  548.     subq.w    #2+1,d3
  549.     add.w    d1,d3
  550.     jsr    RectFill(a6)
  551.     rts
  552. ;------------------------------------------------------------------------------
  553. ; Change The Color Of The Box
  554. ;
  555.  
  556. DOSCOP    movem.l    d0-d7/a0-a6,-(sp)
  557.     move.l    APG_ChannelInfo(a5),a0
  558.     move.l    APG_ChannelFlags(a5),a1
  559.     lea    cols(pc),a2
  560.     move.l    APG_UtiBase(a5),a6
  561.  
  562.     moveq    #3-1,d6            ;Number Of Channels - 1
  563. DOSCOP1    moveq    #-1,d2            ;Full Color Power
  564.     move.b    (a1)+,d3
  565.     btst    #NPCFB_Volume,d3
  566.     beq.b    doscop3
  567.     lea    coltab(pc),a3
  568.     move.w    NPC_Volume(a0),d0
  569.     lsl.w    #2,d0
  570.     move.l    (a3,d0.w),d2
  571.  
  572. DOSCOP3    btst    #NPCFB_Sample,d3
  573.     beq.b    doscop4
  574.     move.l    d2,(a2)
  575.     move.l    #$0f000000,4(a2)
  576.  
  577. DOSCOP4    move.w    NPC_Period(a0),d0
  578.     btst    #NPCFB_Period,d3
  579.     bne.b    doscop5
  580.     btst    #NPCFB_QuadroPeriod,d3
  581.     beq.b    doscop6
  582.     lsr.w    #2,d0
  583. DOSCOP5    move.w    #$2000,d1        ;Maximum Period
  584.     sub.w    d0,d1
  585.     mulu    #$6000,d1        ;Guess Value
  586.     move.l    d1,4(a2)
  587.  
  588. DOSCOP6    addq.l    #8,a2
  589.     lea    NPChannel_SIZEOF(a0),a0
  590.     dbra    d6,doscop1
  591.     bra.b    setcols
  592. ;------------------------------------------------------------------------------
  593. ; Flash Colors Down
  594. ;
  595.  
  596. DOVB    movem.l    d0-d7/a0-a6,-(sp)
  597.     lea    cols(pc),a0
  598.     moveq    #3-1,d6
  599. DOVB1    move.l    (a0),d0
  600.     beq.b    dovb3
  601.     cmp.l    4(a0),d0
  602.     bhi.b    dovb2
  603.     moveq    #0,d0
  604.     bra.b    dovb3
  605.  
  606. DOVB2    sub.l    4(a0),d0
  607. DOVB3    move.l    d0,(a0)
  608.     addq.l    #8,a0
  609.     dbra    d6,dovb1
  610.  
  611. SETCOLS    move.l    APG_GfxBase(a5),a6
  612.     move.l    scrhd+4(pc),a0
  613.     lea    Screen_ViewPort(a0),a0
  614.     move.l    pennum(pc),d0
  615.     move.l    cols(pc),d1        ;Red
  616.     move.l    cols+8(pc),d2        ;Green
  617.     move.l    cols+16(pc),d3        ;Blue
  618.     jsr    SetRGB32(a6)        ;Set New Color
  619.  
  620.     movem.l    (sp)+,d0-d7/a0-a6
  621.     rts
  622. ;------------------------------------------------------------------------------
  623. ; Data Area
  624. ;
  625.  
  626. RB_ShowPoi
  627.     dc.l    RB_Show
  628. GLOB    dc.l    0
  629.  
  630. COLS    blk.l    3*2,0
  631.  
  632. COLMAP    dc.l    0
  633. PENNUM    dc.l    0
  634. WINHD    dc.l    0
  635. SCOPSTR    dc.l    0
  636.  
  637. WINPOS    blk.w    4,0
  638.  
  639. WINTAGS    dc.l    WA_Left,0,WA_Top,0,WA_InnerWidth,150,WA_InnerHeight,75
  640.     dc.l    WA_MinWidth,90,WA_MinHeight,45,WA_MaxWidth,-1,WA_MaxHeight,-1
  641.     dc.l    WA_IDCMP,IC_CloseWindow!IC_NewSize,WA_Flags,$1000f
  642.     dc.l    WA_AutoAdjust,TRUE,WA_Title,wintit
  643. SCRHD    dc.l    WA_PubScreen,0,WA_PubScreenFallBack,TRUE
  644.     dc.l    TAG_END
  645.  
  646. REQTAG    dc.l    RT_LockWindow,TRUE,TAG_END
  647.  
  648. BEVTAGS    dc.l    GT_VisualInfo,0,TAG_END
  649.  
  650. OKAYGAD    dc.b    "Okay",0
  651. NPENERR    dc.b    "Couldn't allocate pen!!",0
  652.  
  653. WINTIT    dc.b    "RGB-Box",0
  654.  
  655. DOSNAM    dc.b    "dos.library",0
  656. CFGNAME    dc.b    "ENVARC:APlayer/Agents/RGBBox-Scope.cfg",0
  657.     even
  658. ;------------------------------------------------------------------------------
  659. ; Volume Color Table
  660. ;
  661.  
  662. COLTAB    dc.l    $00000000,$04000000,$08000000,$0c000000
  663.     dc.l    $10000000,$14000000,$18000000,$1c000000
  664.     dc.l    $20000000,$24000000,$28000000,$2c000000
  665.     dc.l    $30000000,$34000000,$38000000,$3c000000
  666.     dc.l    $40000000,$44000000,$48000000,$4c000000
  667.     dc.l    $50000000,$54000000,$58000000,$5c000000
  668.     dc.l    $60000000,$64000000,$68000000,$6c000000
  669.     dc.l    $70000000,$74000000,$78000000,$7c000000
  670.     dc.l    $80000000,$83ffffff,$87ffffff,$8bffffff
  671.     dc.l    $8fffffff,$93ffffff,$97ffffff,$9bffffff
  672.     dc.l    $9fffffff,$a3ffffff,$a7ffffff,$abffffff
  673.     dc.l    $afffffff,$b3ffffff,$b7ffffff,$bbffffff
  674.     dc.l    $bfffffff,$c3ffffff,$c7ffffff,$cbffffff
  675.     dc.l    $cfffffff,$d3ffffff,$d7ffffff,$dbffffff
  676.     dc.l    $dfffffff,$e3ffffff,$e7ffffff,$ebffffff
  677.     dc.l    $efffffff,$f3ffffff,$f7ffffff,$fbffffff
  678.     dc.l    $ffffffff
  679. ;------------------------------------------------------------------------------
  680. SLUT
  681.