home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 16
/
amigaformatcd16.iso
/
-in_the_mag-
/
top100_shareware
/
workbench
/
urouhack
/
source
/
patchfunc.a
< prev
next >
Wrap
Text File
|
1996-04-09
|
3KB
|
149 lines
;=============================================================================
; Assembler section for UrouHack 1.4+
;
; Patches for the following Functions:
;
; OpenScreen()
; OpenScreenTagList()
; OpenWindow()
; OpenWindowTagList()
; CloseScreen()
;=============================================================================
include intuition/screens.i
include intuition/intuition_lib.i
include graphics/graphics_lib.i
include graphics/rastport.i
XDEF _newAGRoutine
XREF _oldAGRoutine
XDEF _newNMPRoutine
XREF _oldNMPRoutine
XDEF _newOSRoutine
XREF _oldOSRoutine
XDEF _newCSRoutine
XREF _oldCSRoutine
XDEF _newOTLRoutine
XREF _oldOTLRoutine
XDEF _newOWRoutine
XREF _oldOWRoutine
XDEF _newOWTLRoutine
XREF _oldOWTLRoutine
XREF _b_left
XREF _b_right
XREF _b_top
XREF _b_bottom
XREF _b_height
XREF _b_width
XREF _w_bottom
XREF _psysi
XREF _UtilityBase
XREF _IntuitionBase
XREF @allocNewPens
XREF @changeSize
XREF @freeNewPens
XREF @AddGListExtra
XREF @AddGadgetExtra
_newAGRoutine movem.l d0-d7/a0-a6,-(sp)
jsr @AddGadgetExtra
movem.l (sp)+,d0-d7/a0-a6
move.l a2,-(sp)
move.l _oldAGRoutine,a2
jsr 0(a2)
move.l (sp)+,a2
rts
_newNMPRoutine rts
_newCSRoutine jsr @freeNewPens
move.l a2,-(sp)
move.l _oldCSRoutine,a2
jsr 0(a2)
move.l (sp)+,a2
rts
_newOSRoutine move.l _oldOSRoutine,d0
bra.s shared
_newOTLRoutine move.l _oldOTLRoutine,d0
shared move.l a2,-(sp)
move.l d0,a2
jsr 0(a2)
move.l d0,a2
jsr @allocNewPens
tst.w _psysi
beq.s nosysi
move.b _b_bottom,d0
move.b d0,sc_WBorBottom(a2)
move.b _b_right,d0
move.b d0,sc_WBorRight(a2)
move.b _b_top,d0
move.b d0,sc_WBorTop(a2)
move.b _b_left,d0
move.b d0,sc_WBorLeft(a2)
nosysi move.l a2,d0
move.l (sp)+,a2
rts
_newOWRoutine move.l _oldOWRoutine,d0
bra.s shared1
_newOWTLRoutine movem.l d1-d7/a0-a7,-(sp)
jsr @changeSize
movem.l (sp)+,d1-d7/a0-a7
move.l _oldOWTLRoutine,d0
shared1 move.l a2,-(sp)
move.l d0,a2
jsr 0(a2)
move.l d0,a2
move.l wd_Flags(a2),d1
moveq #1,d0
and.l d1,d0
beq.s noAdjust
moveq #$20,d0
and.l d1,d0
beq.s checkRight
tst.b wd_BorderBottom(a2)
beq.s checkRight
move.b _b_height,wd_BorderBottom(a2)
checkRight moveq #$10,d0
and.l d1,d0
beq.s checkRefresh
tst.b wd_BorderRight(a2)
beq.s checkRefresh
move.b _b_width,wd_BorderRight(a2)
checkRefresh moveq #$30,d0
and.l d1,d0
beq.s noAdjust
move.l a2,a0
jsr _LVORefreshWindowFrame(a6)
noAdjust move.l a2,d0
move.l (sp)+,a2
rts
end