Commit daa85947 authored by Richard Leggett's avatar Richard Leggett
Browse files

Added flag bit (bit 9) to DragASprite_Start SWI. If set, sprite is placed at...

Added flag bit (bit 9) to DragASprite_Start SWI. If set, sprite is placed at pointer position and bits 0-3 are ignored.
parent 759d63c6
......@@ -121,12 +121,3 @@ Fix bug MED-02966. Force incoming drag boxes to be exact multiples of
the current osunits per pixel factor. Prevents effects such as the
trail when dragging !Style's sprite in 1280 x 480 screen modes.
---------------------------------------------------------------------------
Version: 0.12 Mon 16-Feb-98 Ben Avison
* Fixed bug which meant translation table used for ROM sprites was corrupt - since they have
traditionally been 16-colour sprites, it defaulted to the Wimp palette, and nobody noticed
* Added checking of Wimp_ReadSysInfo 16 to determine the ROM/RAM sprite pool relative priority
---------------------------------------------------------------------------
......@@ -17,3 +17,7 @@ Version 0.12
traditionally been 16-colour sprites, it defaulted to the Wimp palette, and nobody noticed
* Added checking of Wimp_ReadSysInfo 16 to determine the ROM/RAM sprite pool relative priority
Version 0.13
* Added flag bit (bit 9) to DragASprite_Start SWI. If set, icon is placed at pointer position
and bits 0-3 are ignored.
\ No newline at end of file
| Copyright 1998 Acorn Computers Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine export
***************************************************************************
PHOEBE - RISC OS 4.00 build
***************************************************************************
* *
* Project: Ursula *
* *
* Module: DragASprit *
* *
* Created: Mon 16-Feb-98 *
* *
* First version: 0.12 *
* *
* Copyright: (C) 1998, Acorn Computers Ltd., Cambridge, England. *
* *
***************************************************************************
Change Log:
===========
---------------------------------------------------------------------------
Version: 0.12 Mon 16-Feb-98 Ben Avison
* Fixed bug which meant translation table used for ROM sprites was corrupt -
since they have traditionally been 16-colour sprites, it defaulted to the
Wimp palette, and nobody noticed
* Added checking of Wimp_ReadSysInfo 16 to determine the ROM/RAM sprite pool
relative priority
---------------------------------------------------------------------------
Version 0.13 Wed 22-Jul-98 Richard Leggett
* Added flag bit (bit 9) to DragASprite_Start SWI. If set, icon is placed at
pointer position and bits 0-3 are ignored.
\ No newline at end of file
......@@ -60,5 +60,8 @@ DS_DropShadow_Present * 1 :SHL: 7
DS_Hatching * 0 :SHL: 8
DS_NoHatching * 1 :SHL: 8
DS_SpriteAtPointer * 1 :SHL: 9
DS_NotSpriteAtPointer * 0 :SHL: 9
OPT OldOpt
END
......@@ -17,6 +17,7 @@
GBLL hatching
hatching SETL 1=1
; StartUp the drag
;
; In r0 = flags:
......@@ -44,7 +45,9 @@ hatching SETL 1=1
; 1 Make a drop shadow when copying the sprite
; 8 0 Hatch the sprite
; 1 Never hatch the sprite
; 9-31 Reserved for future use, should be set to 0.
; 9 0 Sprite's position is determined by bits 0-3
; 1 Sprite is centred on pointer position
; 10-31 Reserved for future use, should be set to 0.
; r1 = sprite area:
; 0 System sprite area
; 1 Wimp sprite area
......@@ -589,6 +592,35 @@ wibble2
LDR r0, [sp, #Proc_LocalStack + 0*4]
LDR r3, [sp, #Proc_LocalStack + 3*4]
[ AtPointerFlag
; Check first if flag is set to put sprite at pointer position
TST r0, #DS_SpriteAtPointer
BEQ %FT54
; Get pointer position
ADR r1, ptrbuffer
SWI XWimp_GetPointerInfo
BVS %FT54
MOV r2, r1
; Work out x offset
LDR r1, [r2]
LDR r14, [r3, #box_x0]
SUB r1, r1, r14
LDR r14, x_size
SUB r1, r1, r14, LSR #1
STR r1, bl_offset_x ; Store x offset
; Work out y offset
LDR r1, [r2, #4]
LDR r14, [r3, #box_y0]
SUB r1, r1, r14
LDR r14, y_size
SUB r1, r1, r14, LSR #1 ; This value will be stord after next branch
B %FT65
54
]
TestAFlag r0, HJustify, Left, r14
; Left justify
......
......@@ -14,6 +14,10 @@
;
; DragASprite support module
GBLL AtPointerFlag
AtPointerFlag SETL {TRUE}
^ 0,r12
wsp # 4 ; workspace pointer
fgsa # 4 ; foreground sprite area
......@@ -23,6 +27,9 @@ bl_offset_x # 4 ; offset from drag box origin to sprite origin
bl_offset_y # 4 ; offset from drag box origin to sprite origin
x_size # 4 ; size in OS units of sprite
y_size # 4 ; size in OS units of sprite
[ AtPointerFlag
ptrbuffer # 20 ; Wimp_GetPointerInfo buffer
]
FirstMoveIsPlot # 1
wss * :INDEX:@
......@@ -56,7 +63,7 @@ MySWIBase * Module_SWISystemBase + DragASpriteSWI * Module_SWIChunkS
Support_TitleString DCB "DragASprite", 0
Support_HelpString
DCB "Drag A Sprite",9, "0.12 (16 Feb 1998)", 0
DCB "Drag A Sprite",9, "0.13 (22 Jul 1998)", 0
Support_SwiList
DCB "DragASprite", 0
......
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