Commit d81a97d8 authored by Kevin Bracey's avatar Kevin Bracey
Browse files

Module made 32-bit compatible. Placed under srccommit control.

Version 0.14. Tagged as 'DragASprit-0_14'
parent 2d629cd6
......@@ -32,4 +32,11 @@ Version: 0.12 Mon 16-Feb-98 Ben Avison
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
pointer position and bits 0-3 are ignored.
---------------------------------------------------------------------------
Version 0.14 Thu 20-Apr-00 Kevin Bracey
* Module made 32-bit compatible.
* Placed under srccommit control.
......@@ -6,9 +6,9 @@
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
Module_MajorVersion SETS "0.13"
Module_Version SETA 13
Module_MajorVersion SETS "0.14"
Module_Version SETA 14
Module_MinorVersion SETS ""
Module_Date SETS "20 Apr 2000"
Module_FullVersion SETS "0.13"
Module_FullVersion SETS "0.14"
END
/* (0.13)
/* (0.14)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.13
#define Module_MajorVersion_CMHG 0.14
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 20 Apr 2000
#define Module_MajorVersion "0.13"
#define Module_Version 13
#define Module_MajorVersion "0.14"
#define Module_Version 14
#define Module_MinorVersion ""
#define Module_Date "20 Apr 2000"
#define Module_FullVersion "0.13"
#define Module_FullVersion "0.14"
......@@ -18,20 +18,22 @@
; Plot the b/g sprite at the relevant location
UnPlot ENTRY "r0-r11"
BL DoBusinessToDest
EXITS VS
[ debugdrag
BVS %FT01
DLINE "UnPlot"
01
]
MOV r3, r0
MOV r4, r1
LDR r0, =SpriteReason_PutSpriteUserCoords + &100
LDR r1, bg0sa
ADR r2, bg_name
MOV r5, #0
SWI XOS_SpriteOp
EXITS
MOVVC r3, r0
MOVVC r4, r1
LDRVC r0, =SpriteReason_PutSpriteUserCoords + &100
LDRVC r1, bg0sa
ADRVC r2, bg_name
MOVVC r5, #0
SWIVC XOS_SpriteOp
CLRV
EXIT
; plot:
; Grab the b/g sprite at the required location
......@@ -42,30 +44,31 @@ Plot ENTRY "r0-r11"
STRB lr, FirstMoveIsPlot
BL DoBusinessToDest
EXITS VS
[ debugdrag
BVS %FT01
DREG r0, "Plot at ",cc
DREG r1, ","
01
]
; Grab bg0 from the screen
MOV r4, r0
MOV r5, r1
SUB r6, r2, #1
SUB r7, r3, #1
BL Getbg0
EXITS VS
MOVVC r4, r0
MOVVC r5, r1
SUBVC r6, r2, #1
SUBVC r7, r3, #1
BLVC Getbg0
; Plot fg
LDR r0, =SpriteReason_PutSpriteUserCoords + &100
LDR r1, fgsa
ADRL r2, fg_name
MOV r3, r4
MOV r4, r5
MOV r5, #8 ; Mask is used for transparency
SWI XOS_SpriteOp
EXITS
LDRVC r0, =SpriteReason_PutSpriteUserCoords + &100
LDRVC r1, fgsa
ADRVCL r2, fg_name
MOVVC r3, r4
MOVVC r4, r5
MOVVC r5, #8 ; Mask is used for transparency
SWIVC XOS_SpriteOp
CLRV
EXIT
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
......@@ -87,19 +90,18 @@ Move
; If first action is move then it must be plot instead
LDRB lr, FirstMoveIsPlot
TEQ lr, #0
ADDNE sp, sp, #8*4
Pull "$Proc_RegList,lr",NE
PullEnv NE
BNE Plot
BL DoBusinessToDest
BLVC DoBusinessToSource
STMIA sp, {r0-r7}
TEQ r0, r4
TEQEQ r1, r5
TEQEQ r2, r6
TEQEQ r3, r7
EXITS EQ
CMP r0, r4
CMPEQ r1, r5
CMPEQ r2, r6
CMPEQ r3, r7
EXIT EQ
[ debugdrag
DLINE "Move ",cc
......@@ -121,7 +123,8 @@ Move
; Switch to bg1
LDRVC r1, bg1sa
BLVC SwitchOutputToSprite
EXITS VS
BVS %FT95
Push "r0-r3" ; Details to restore back to screen
; Plot bg0
......@@ -165,7 +168,7 @@ Move
; Switch back to the screen
Pull "r0-r3"
SWI XOS_SpriteOp
EXITS VS
BVS %FT95
; Plot fg
LDR r0, =SpriteReason_PutSpriteUserCoords + &100
......@@ -175,7 +178,7 @@ Move
LDMIA r14, {r3,r4}
MOV r5, #8
SWI XOS_SpriteOp
EXITS VS
BVS %FT95
; Plot bg0 to screen (bg0 at src)
......@@ -187,7 +190,7 @@ Move
LDMIA r14, {r3,r4}
MOV r5, #0
SWI XOS_SpriteOp
EXITS VS
BVS %FT95
; Swap bg0 and bg1
......@@ -196,13 +199,15 @@ Move
STR r0, bg1sa
STR r1, bg0sa
EXITS
EXIT ; V clear
90
; Error switched to a sprite
Pull "r0-r3"
SWI XOS_SpriteOp
EXITS
95
CLRV
EXIT
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
......
......@@ -28,6 +28,8 @@
GET Hdr:MsgTrans
GET Hdr:ColourTran
GET VersionASM
GET s.DebugOpts
GET s.Support
GET s.StartUp
......
......@@ -431,7 +431,7 @@ wibble
; free temporary pix trans block
MOV R1,PC
SavePSR R1
ADR R14,tx_block
CMP R7,#0
BLE wibble2
......@@ -439,7 +439,7 @@ wibble
MOVNE R0,#ModHandReason_Free
MOVNE R2,R7
SWINE XOS_Module
TEQP PC,R1
RestPSR R1,,f
;; We need the depth of the sprite so read it
......
......@@ -59,19 +59,29 @@ MySWIBase * Module_SWISystemBase + DragASpriteSWI * Module_SWIChunkS
DCD Support_Swi -Module_BaseAddr
DCD Support_SwiList -Module_BaseAddr
DCD 0 ; SWI decode code
[ :LNOT: No32bitCode
DCD 0 ; Messages file
DCD Support_ModuleFlags -Module_BaseAddr
]
Support_TitleString DCB "DragASprite", 0
Support_HelpString
DCB "Drag A Sprite",9, "0.13 (22 Jul 1998)", 0
DCB "Drag A Sprite",9, "$Module_MajorVersion ($Module_Date)", 0
Support_SwiList
DCB "DragASprite", 0
DCB "Start", 0
DCB "Stop", 0
DCB 0
ALIGN
[ :LNOT: No32bitCode
Support_ModuleFlags
DCD ModuleFlag_32bit
]
Support_Init
Push "lr"
MOV r0, #ModHandReason_Claim
......
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