home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Elysian Archive
/
AmigaElysianArchive.iso
/
screen
/
fsm.lha
/
NewOpenScreenTagList.asm
< prev
Wrap
Assembly Source File
|
1992-10-20
|
901b
|
48 lines
SECTION text,code
; ts;4
; asm -ILATTICE:asm/ NewOpenScreenTagList.asm
INCLUDE "alib/utility_lib.i"
INCLUDE "utility/tagitem.i"
INCLUDE "intuition/screens.i"
XREF _ScreenTags
XREF _UtilityBase
XREF _OldOpenScreenTagList
XDEF _NewOpenScreenTagList
_NewOpenScreenTagList:
; check if SA_DisplayID is present in ScreenTagList
movem.l a0-a1/a6,-(sp)
move.l _UtilityBase,a6 ; UtilityBase
move.l #SA_DisplayID,d0
move.l a1,a0 ; old ScreenTags
jsr _LVOFindTagItem(a6)
movem.l (sp)+,a0-a1/a6
; Patch OpenScreenTagList
movem.l a3-a4,-(sp)
tst.l d0 ; found SA_DisplayID ?
bne PatchSkip
lea _ScreenTags,a3 ; new ScreenTags
move.l a1,(3*ti_SIZEOF)+ti_Data(a3) ; add old ScreenTags
move.l a3,a1 ; replace old by new ScreenTags
PatchSkip:
move.l _OldOpenScreenTagList,a4 ; do the good OldOpenScreenTagList
jsr (a4)
movem.l (sp)+,a3-a4
rts
END