Commit 00b0f1cc authored by Robert Sprowson's avatar Robert Sprowson Committed by ROOL
Browse files

Use Rel macros for window handle manipulation

Munge between internal and external window handles using the same macro the Wimp does for clarity.
parent 2d8d4aa3
......@@ -37,7 +37,7 @@ copy_filter_handler
Push "r0-r2,r10,r11,LR"
ADD r0,r10,#1
Rel r0,r10
LDR r1,copy_filters
copy_filter_exit
......
......@@ -83,6 +83,11 @@ debugregister SETL {FALSE} ; Register/de-register
wsptr RN R12
MACRO
$lab Rel $to,$from,$cc ; Turn Abs window handles to Rel
$lab ADD$cc $to,$from,#1
MEND
; ----------------------------------------------------------------------------------------------------------------------
; Filter block structure
^ 0
......
......@@ -41,7 +41,7 @@ post_icon_filter_handler
MOV R2,R2,ASL #16
MOV R2,R2,LSR #16
ADD r0,r10,#1 ; find the window being redrawn
Rel r0,r10 ; find the window being redrawn
LDR r1,post_icon_filters
post_icon_filter_exit
......
......@@ -40,7 +40,7 @@ post_rect_filter_handler
MOV R2,R2,ASL #16
MOV R2,R2,LSR #16
ADD r0,r10,#1 ; find the window being redrawn
Rel r0,r10 ; find the window being redrawn
LDR r1,post_rect_filters
post_rect_filter_exit
......
......@@ -49,8 +49,8 @@ rect_filter_handler
LDR r0, get_handle_from_r10 ; find the window being redrawn
TEQ r0, #0
LDREQ r0, [sp,#16+12+0] ; BTW - you didn't see that...
ADDEQ r0, r0, #1
ADDNE r0, r10, #1 ; turn pointer into window handle
Rel r0,r0,EQ
Rel r0,r10,NE ; turn pointer into window handle
LDR r1,rect_filters
rect_filter_exit
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment