Commit 11711a72 authored by Ben Avison's avatar Ben Avison
Browse files

Service_SwitchingOutputToSprite code optimised: graphics parameters are now...

Service_SwitchingOutputToSprite code optimised: graphics parameters are now only cached when making the first Wimp_PlotIcon call while output is switched to a sprite, and upon return to screen output after such an occurrence.

All error box templates featuring "border" icons updated to have button type
0 (never). This prevents IconHigh from mistakenly allowing them to be selected.

Version 4.07. Tagged as 'Wimp-4_07'
parent 7877ad21
......@@ -5,8 +5,8 @@
GBLA Module_Version
GBLS Module_MinorVersion
GBLS Module_Date
Module_MajorVersion SETS "4.06"
Module_Version SETA 406
Module_MajorVersion SETS "4.07"
Module_Version SETA 407
Module_MinorVersion SETS ""
Module_Date SETS "20 Oct 1998"
Module_Date SETS "21 Oct 1998"
END
/* (4.06)
/* (4.07)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 4.06
#define Module_MajorVersion_CMHG 4.07
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 20 Oct 1998
#define Module_Date_CMHG 21 Oct 1998
#define Module_MajorVersion "4.06"
#define Module_Version 406
#define Module_MajorVersion "4.07"
#define Module_Version 407
#define Module_MinorVersion ""
#define Module_Date "20 Oct 1998"
#define Module_Date "21 Oct 1998"
......@@ -2311,10 +2311,23 @@ loseromsprites
; Service_SwitchingOutputToSprite: cache limited graphics parameters
switchingtosprite
Push "R0,R5-R6,LR"
ENTRY
STR R4, switchtospr_current ; remember where output is switched to now
TEQ R4, #0 ; if switching to screen
BLEQ switchingtosprite_recache ; then make sure parameters are correct
EXITS
switchingtosprite_recache
; recaches graphics parameters iff switchtospr_correctfor <> switchtospr_current
ENTRY "R0,R5-R6"
LDR R0, switchtospr_current
LDR R14, switchtospr_correctfor
TEQ R0, R14
EXITS EQ
STR R0, switchtospr_correctfor
BL readvduvars2 ; including new screen/sprite size etc.
BLVC calcborders ; to set up dx, dy
Pull "R0,R5-R6,PC"
EXITS
]
; Service_ModeChange: cache new graphics parameters
......@@ -3540,6 +3553,11 @@ truetitlebg2 # 4 ; title background colour when highlight
titlecolour # 4 ; independent of input focus status
]
[ SwitchingToSprite
switchtospr_current # 4 ; -> sprite (or 0 for screen) that VDU output is switched to
switchtospr_correctfor # 4 ; -> sprite (or 0 for screen) that Wimp is set up for
]
iconbar_scroll_speed # 4
iconbar_scroll_accel # 4
......
......@@ -199,6 +199,12 @@ initfirsttask
MOV R0, #0
STR R0, hourglass_status ; note that autohourglass is initially switched off
]
;
[ SwitchingToSprite
MOV R0, #0
STR R0, switchtospr_current ; initialise both of these as though output is directed to screen
STR R0, switchtospr_correctfor
]
;
[ true
LDR R0,currentmode
......
......@@ -24,6 +24,12 @@
SWIWimp_PlotIcon
MyEntry "PlotIcon"
;
[ SwitchingToSprite
LDR R14, switchtospr_current ; outputting to a sprite?
TEQ R14, #0
BLNE switchingtosprite_recache ; check graphics parameters are up-to-date if so
]
LDR handle,redrawhandle
CMP handle,#nullptr ; Not in a redraw loop.
......
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