home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / screen / fsm.lha / NewOpenScreenTagList.asm < prev   
Assembly Source File  |  1992-10-20  |  901b  |  48 lines

  1.     SECTION    text,code
  2.  
  3. ;    ts;4
  4. ;    asm -ILATTICE:asm/ NewOpenScreenTagList.asm
  5.  
  6.     INCLUDE    "alib/utility_lib.i"
  7.     INCLUDE    "utility/tagitem.i"
  8.     INCLUDE    "intuition/screens.i"
  9.  
  10.     XREF    _ScreenTags
  11.     XREF    _UtilityBase
  12.  
  13.     XREF    _OldOpenScreenTagList
  14.     XDEF    _NewOpenScreenTagList
  15.  
  16. _NewOpenScreenTagList:
  17.  
  18. ;    check if SA_DisplayID is present in ScreenTagList
  19.  
  20.     movem.l    a0-a1/a6,-(sp)
  21.  
  22.     move.l    _UtilityBase,a6                    ;    UtilityBase
  23.     move.l    #SA_DisplayID,d0
  24.     move.l    a1,a0                            ;    old ScreenTags
  25.     jsr        _LVOFindTagItem(a6)
  26.  
  27.     movem.l    (sp)+,a0-a1/a6
  28.  
  29. ;    Patch OpenScreenTagList
  30.  
  31.     movem.l    a3-a4,-(sp)
  32.  
  33.     tst.l    d0                                ;    found SA_DisplayID ?
  34.     bne        PatchSkip
  35.     lea        _ScreenTags,a3                    ;    new ScreenTags
  36.     move.l    a1,(3*ti_SIZEOF)+ti_Data(a3)    ;    add old ScreenTags
  37.     move.l    a3,a1                            ;    replace old by new ScreenTags
  38. PatchSkip:
  39.  
  40.     move.l    _OldOpenScreenTagList,a4        ;    do the good OldOpenScreenTagList
  41.     jsr        (a4)
  42.  
  43.     movem.l    (sp)+,a3-a4
  44.  
  45.     rts
  46.  
  47.     END
  48.