diff --git a/VersionASM b/VersionASM index b255f0ab00b7898b2398f17ff87b9ae2e77bea51..b1546d70f9f4be4a7e15d5a829efc1e82ae08d4c 100644 --- a/VersionASM +++ b/VersionASM @@ -5,8 +5,8 @@ GBLA Module_Version GBLS Module_MinorVersion GBLS Module_Date -Module_MajorVersion SETS "4.12" -Module_Version SETA 412 +Module_MajorVersion SETS "4.13" +Module_Version SETA 413 Module_MinorVersion SETS "" -Module_Date SETS "26 Nov 1998" +Module_Date SETS "27 Nov 1998" END diff --git a/VersionNum b/VersionNum index 0649c0bd995eca663b6c8efd538e55e73b72b159..3d27861db33ad60f9984d86609cacd7124f2233c 100644 --- a/VersionNum +++ b/VersionNum @@ -1,14 +1,14 @@ -/* (4.12) +/* (4.13) * * This file is automatically maintained by srccommit, do not edit manually. * */ -#define Module_MajorVersion_CMHG 4.12 +#define Module_MajorVersion_CMHG 4.13 #define Module_MinorVersion_CMHG -#define Module_Date_CMHG 26 Nov 1998 +#define Module_Date_CMHG 27 Nov 1998 -#define Module_MajorVersion "4.12" -#define Module_Version 412 +#define Module_MajorVersion "4.13" +#define Module_Version 413 #define Module_MinorVersion "" -#define Module_Date "26 Nov 1998" +#define Module_Date "27 Nov 1998" diff --git a/s/Watchdog b/s/Watchdog index adc71e3e379eb88c37594de05b021533e5822db4..f00b899429072c403683b2ccfb86dd1b97748512 100644 --- a/s/Watchdog +++ b/s/Watchdog @@ -172,6 +172,11 @@ taskloop ADR R0,watchdogcallback MOV R1,R12 SWI XOS_AddCallBack + [ NCErrorBox + ADRL R1, ptrpreserveflag + MOV R0, #1 + STR R0, [R1] ; note not to move the pointer + ] Pull "R0-R7,PC" watchdognext CMP R1,#3 ; kill diff --git a/s/Wimp01 b/s/Wimp01 index 61cf40f61ba6d37180b0d8f663dd7e72b3426f92..981a3ef7c461dbd9c4c2cacaca1308911068d298 100644 --- a/s/Wimp01 +++ b/s/Wimp01 @@ -1459,6 +1459,8 @@ ptrsuspenddata # 12 ; To store x,y,b last generated by IconH ptrsuspendflag # 4 ; 0 => normal ; 1 => waiting for mouse move generated by IconHigh ; 2 => waiting for next mouse move *not* generated by IconHigh +ptrpreserveflag # 4 ; 0 => position pointer over default error button on box start + ; 1 => don't move pointer on box start ] maxwork * :INDEX:@ diff --git a/s/Wimp02 b/s/Wimp02 index 28e0c8a64f852371b03087a6447a3be99b5d1b73..74298b337a7da7be723409ad6a07708d3e6a84e0 100644 --- a/s/Wimp02 +++ b/s/Wimp02 @@ -2868,6 +2868,8 @@ inittasks ] [ NCErrorBox ADRL R14, ptrsuspendflag + STR R0, [R14], #4 + ASSERT ptrpreserveflag = ptrsuspendflag + 4 STR R0, [R14] ] ; diff --git a/s/Wimp04 b/s/Wimp04 index d20514a8cf481958bbdde9c74f1b59ead8bd0247..67edd559b1cd67a19413bff7004bfe7163413110 100644 --- a/s/Wimp04 +++ b/s/Wimp04 @@ -4800,6 +4800,20 @@ pointerwindow strw y1,R1,7 MOV R0,#&15 SWI XOS_Word ; OSWORD &15 + [ NCErrorBox + ; If confining the mouse causes it to change position, + ; we *don't* want to trigger the reappearance of the pointer + ADRL y1, ptrsuspendflag + LDR x1, [y1] + TEQ x1, #2 ; waiting for a mouse move? + Push "R2", EQ ; if so then flush the mouse buffer + MOVEQ R0, #21 ; (maybe a bit dodgy, but it's the only way + MOVEQ R1, #Buff_Mouse ; to ensure that the next read from the + SWIEQ OS_Byte ; mouse buffer was due to the OS_Word call, + Pull "R2", EQ ; which doesn't in itself flush the buffer) + MOVEQ x1, #1 ; and then flag to ignore the next mouse read + STREQ x1, [y1] + ] ; Pull "R0,R1,x1,y1,PC" LTORG diff --git a/s/Wimp07 b/s/Wimp07 index 05432308722722fbd40d9543d9c37f3a6cc3d544..3cebde5b7476ae47ad12ef511392c170a0bb9b32 100644 --- a/s/Wimp07 +++ b/s/Wimp07 @@ -1885,6 +1885,12 @@ ReportError_restored_font_colours Pull "r0-r3" ] + [ NCErrorBox + ADRL R14, ptrpreserveflag + MOV R0, #0 + STR R0, [R14] ; move the pointer the next time the error box is opened + ] + MOV R0, #220 ; restore the old escape key LDRB R1, old_escape MOV R2, #0 @@ -1910,6 +1916,11 @@ notoveryet STR R1,tempworkspace+errtws_icondata LDR R1,tempworkspace+errtws_describebuttons ; Get back buttons STR R1,tempworkspace+errtws_buttonlist + [ false + ADRL R5, ptrpreserveflag + MOV R4, #1 + STR R4, [R5] ; note not to move the pointer + ] ADRL R1,progerrsaveblk LDMIA R1,{R4-R7} MOV userblk,R5 @@ -2843,7 +2854,47 @@ donegetr BL flushkbdmouse ; get ready to read these ; [ NCErrorBox - MOV R0, #106 + ADRL R0, ptrpreserveflag + LDR R0, [R0] + TEQ R0, #0 ; Should we move the pointer over the default action button? + BNE %FT01 + + Push "cx0-y0" + LDR R14, errorhandle + Abs R14, R14 + + LDR cx0, [R14, #w_wax1] + SUB cx0, cx0, #20 ; 20 OS unit border + LDR cx1, errbut_w_def + SUB cx0, cx0, cx1, ASR #1 ; screen x of icon centre + + LDR cy1, [R14, #w_way1] + LDR y0, [R14, #w_scy] + SUB y0, cy1, y0 ; screen y of wao + LDR cy0, errbut_y0_def + LDR cy1, errbut_y1_def + ADD cy0, cy0, cy1 + ADD cy0, y0, cy0, ASR #1 ; screen y of icon centre + + SUB sp, sp, #8 + MOV R1, sp + MOV R0, #3 + STRB R0, [R1] + strw cx0, R1, 1 + strw cy0, R1, 3 + MOV R0, #&15 + SWI XOS_Word ; Set mouse position + ADD sp, sp, #8 + + ADRL R0, ptrsuspendflag ; Update our copy of the coords + LDR R1, [R0] ; because IconHigh reads the mouse + TEQ R1, #2 ; position using Wimp_GetPointerInfo! + MOVEQ R1, #1 ; If pointer is currently hidden + STREQ R1, [R0] ; until the next mouse move, remember + BL getmouseposn ; to discount next mouse read. + Pull "cx0-y0" + +01 MOV R0, #106 MOV R1, #0 SWI XOS_Byte ; Read current pointer number (also turns it off, but we'll soon switch it back) ADRL R14, ptrshlflag