Commit 70487957 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Split Pull "r1,lr,pc" into two, now deprecated.

Not tested, should be OK.

Version 1.34. Tagged as 'Switcher-1_34'
parent 743fa397
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.33"
Module_Version SETA 133
Module_MajorVersion SETS "1.34"
Module_Version SETA 134
Module_MinorVersion SETS ""
Module_Date SETS "21 Sep 2011"
Module_ApplicationDate SETS "21-Sep-11"
Module_Date SETS "13 Oct 2011"
Module_ApplicationDate SETS "13-Oct-11"
Module_ComponentName SETS "Switcher"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Switcher"
Module_FullVersion SETS "1.33"
Module_HelpVersion SETS "1.33 (21 Sep 2011)"
Module_FullVersion SETS "1.34"
Module_HelpVersion SETS "1.34 (13 Oct 2011)"
END
/* (1.33)
/* (1.34)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.33
#define Module_MajorVersion_CMHG 1.34
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 21 Sep 2011
#define Module_Date_CMHG 13 Oct 2011
#define Module_MajorVersion "1.33"
#define Module_Version 133
#define Module_MajorVersion "1.34"
#define Module_Version 134
#define Module_MinorVersion ""
#define Module_Date "21 Sep 2011"
#define Module_Date "13 Oct 2011"
#define Module_ApplicationDate "21-Sep-11"
#define Module_ApplicationDate "13-Oct-11"
#define Module_ComponentName "Switcher"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Switcher"
#define Module_FullVersion "1.33"
#define Module_HelpVersion "1.33 (21 Sep 2011)"
#define Module_LibraryVersionInfo "1:33"
#define Module_FullVersion "1.34"
#define Module_HelpVersion "1.34 (13 Oct 2011)"
#define Module_LibraryVersionInfo "1:34"
......@@ -992,7 +992,7 @@ StartDesktopTask_Code ROUT
;------------------------------------------------------------------------------
; Decode SWIs recieved by the module.
; Decode SWIs received by the module.
;------------------------------------------------------------------------------
Switcher_SWIdecode ROUT
......@@ -1250,8 +1250,8 @@ SWITaskManager_StartTask Push "r0-r4"
; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
; Handle UpCalls 1,2 if recieved and attempt to return that the media is not
; present if the flags word at [r2] iindicates that we must bounce UpCall's
; Handle UpCalls 1,2 if received and attempt to return that the media is not
; present if the flags word at [r2] indicates that we must bounce UpCall's
; received.
upcallroutine
......@@ -1265,7 +1265,8 @@ upcallroutine
Pull "R1,PC",EQ ; if rejecting media search then exit
MOV R0,#-1 ; nar-ne-nar-nar its not there!
Pull "R1,LR,PC"
Pull "R1,LR"
Pull "PC"
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -2351,27 +2352,27 @@ close_window
; R4 = height in OS units
;
get_screen_size
Push "R1, LR"
Push "R1, LR"
MOV R0,#-1
; Get XEig
MOV R1,#4
SWI XOS_ReadModeVariable
MOVVC R3,R2
; Get YEig
; Get YEig
MOVVC R1,#5
SWIVC XOS_ReadModeVariable
MOVVC R4,R2
; Get X pixels
; Get X pixels
MOVVC R1,#11
SWIVC XOS_ReadModeVariable
ADDVC R2,R2,#1
ADDVC R2,R2,#1
MOVVC R3,R2,ASL R3 ; X size in OS Units
; Get Y pixels
; Get Y pixels
MOVVC R1,#12
SWIVC XOS_ReadModeVariable
ADDVC R2,R2,#1
ADDVC R2,R2,#1
MOVVC R4,R2,ASL R4 ; Y size in OS Units.
Pull "R1, PC"
Pull "R1, PC"
; Open the specified window at the front of the stack, centred on screen
; and at maximum horizontal extent (if possible). Currently, this call is
......@@ -2380,61 +2381,61 @@ get_screen_size
; in R0 = handle of window
;
front_window
Push "R5, LR"
MOV R1,R0
; Read screen dimensions
BL get_screen_size
BVS %FT02
MOV R0,R1
; R0,R1 = window handle
; R3 = screen width (OS units)
; R4 = screen height (OS units)
;
; Read the window state into a temporary buffer
Push "R5, LR"
MOV R1,R0
; Read screen dimensions
BL get_screen_size
BVS %FT02
MOV R0,R1
; R0,R1 = window handle
; R3 = screen width (OS units)
; R4 = screen height (OS units)
;
; Read the window state into a temporary buffer
SUB sp,sp,#w_icons+4
STR R0,[sp]
ORR R1,sp,#1 ; set bit 0 to stop icon definitions from being included in the returned block
SWI XWimp_GetWindowInfo ; read window info (including workarea dimensions)
BVS %FT01
ADD R1,sp,#4
ORR R1,sp,#1 ; set bit 0 to stop icon definitions from being included in the returned block
SWI XWimp_GetWindowInfo ; read window info (including workarea dimensions)
BVS %FT01
ADD R1,sp,#4
; Maximise the horizontal extent
LDR R5,[R1,#w_wex0]
LDR R14,[R1,#w_wex1]
SUB R5,R14,R5
LDR R5,[R1,#w_wex0]
LDR R14,[R1,#w_wex1]
SUB R5,R14,R5
; If horizontal extent > screen_x - (screen_x / 4) then horizontal extent = screen_x - (screen_x / 4)
MOV R14,R3,LSR #2 ; R14 = width/4
SUB R14,R3,R14
CMP R5,R14
MOVHI R5,R14
MOV R14,R3,LSR #2 ; R14 = width/4
SUB R14,R3,R14
CMP R5,R14
MOVHI R5,R14
; Center horizontally
MOV R14,R3,LSR #1
SUB R14,R14,R5,LSR #1 ; R14 = (half of screen width) - (half of computed visible area width)
STR R14,[R1,#w_wax0]
ADD R14,R14,R5
STR R14,[R1,#w_wax1]
MOV R14,R3,LSR #1
SUB R14,R14,R5,LSR #1 ; R14 = (half of screen width) - (half of computed visible area width)
STR R14,[R1,#w_wax0]
ADD R14,R14,R5
STR R14,[R1,#w_wax1]
; Maximise the vertical extent
LDR R5,[R1,#w_wey0]
LDR R14,[R1,#w_wey1]
SUB R5,R14,R5
LDR R5,[R1,#w_wey0]
LDR R14,[R1,#w_wey1]
SUB R5,R14,R5
; If vertical extent > screen_y - (screen_y / 4) then vertical extent = screen_y - (screen_y / 4)
MOV R14,R4,LSR #2
SUB R14,R4,R14
CMP R5,R14
MOVHI R5,R14
MOV R14,R4,LSR #2
SUB R14,R4,R14
CMP R5,R14
MOVHI R5,R14
; Center vertically
MOV R14,R4,LSR #1
SUB R14,R14,R5,LSR #1 ; R14 = (half of screen height) - (half of computed visible area height)
STR R14,[R1,#w_way0]
ADD R14,R14,R5
STR R14,[R1,#w_way1]
; (Re)open the window
MOV R14,#-1
STR R14,[R1,#w_bhandle] ; open at top
MOV R1,sp
SWI XWimp_OpenWindow
MOV R14,R4,LSR #1
SUB R14,R14,R5,LSR #1 ; R14 = (half of screen height) - (half of computed visible area height)
STR R14,[R1,#w_way0]
ADD R14,R14,R5
STR R14,[R1,#w_way1]
; (Re)open the window
MOV R14,#-1
STR R14,[R1,#w_bhandle] ; open at top
MOV R1,sp
SWI XWimp_OpenWindow
; Correct the stack pointer
01 ADD sp,sp,#w_icons+4
02 ;
01 ADD sp,sp,#w_icons+4
02 ;
Pull "R5, PC"
; Open a window (or reopen) at the centre of the screen
......@@ -2445,10 +2446,10 @@ front_window
; [pollblock] corrupt!
centre_window
Push "LR"
MOV R5,R0
BL get_screen_size
MOV R5,R0
BL get_screen_size
BVS %FT01
MOV R0,R5
MOV R0,R5
STR R0,[R1]
SWI XWimp_GetWindowState ; read initial info
......@@ -3682,7 +3683,7 @@ msg_quit
mes_datasaveack
; when this message is recieved then we must close the menu down
; when this message is received then we must close the menu down
Push "R1" ; preserve that bogus message pointer
ASSERT button_right_drag < &100
......@@ -6574,7 +6575,7 @@ savestate_bydragging
]
BVC %FT95
CLRV
Pull "r1-r5,PC"
Pull "r1-r5,PC"
95
Debug ab,"Module found."
......
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