Mercurial > hg > Members > kono > nitros9-code
changeset 1426:58b7b86f61d5
cc3io now can be assembled with keyboard mouse global or local to a window
author | boisy |
---|---|
date | Tue, 02 Dec 2003 20:37:44 +0000 |
parents | 0aa81866992a |
children | b3868abe1fee |
files | level2/modules/cc3io.asm |
diffstat | 1 files changed, 41 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/level2/modules/cc3io.asm Tue Dec 02 15:53:22 2003 +0000 +++ b/level2/modules/cc3io.asm Tue Dec 02 20:37:44 2003 +0000 @@ -18,12 +18,16 @@ * 26r5 2002/07/24 * Added support for obtaining mouse info from the init module. * -* 27 2003/08/18 +* 27 2003/08/18 Boisy G. Pitre * Forward ported to NitrOS-9. * -* 2003/11/16 -* Corrected several lines for keyboard mouse. RG -* Corrected several lines in SSMOUSE where MS.Side used incorrectly. RG +* 2003/11/16 Robert Gault +* Corrected several lines for keyboard mouse. +* Corrected several lines in SSMOUSE where MS.Side used incorrectly. +* +* 2003/12/02 Boisy G. Pitre +* Keyboard mouse is now either global or local to window, depending +* on whether GLOBALKEYMOUSE is defined. nam CC3IO ttl CoCo 3 I/O driver @@ -39,6 +43,10 @@ rev set 0 edition set 27 +* Comment out next line for global keyboard mouse; otherwise, it's on/off +* on a per-window basis. +GLOBALKEYMOUSE equ 1 + mod eom,name,tylg,atrv,start,CC3DSiz fcb EXEC.+UPDAT. @@ -387,8 +395,11 @@ bne L0225 no, return ldb <G.KySame,u same key pressed? bne L0223 yes, return + IFNE GLOBALKEYMOUSE com <G.KyMse,u + ELSE ldx <G.CurDev,u + clra assume no keyboard mouse IFNE H6309 eim #KeyMse,<V.ULCase,x ELSE @@ -396,6 +407,10 @@ eorb #KeyMse reverse current Keyboard Mouse status stb <V.ULCase,x ENDC + beq KeyMOff branch if off + deca else A = $FF +KeyMOff sta <G.KyMse,u save window's keyboard mouse flag in global + ENDC L0223 clr $01,s L0225 ldb $01,s puls pc,u,y,x,b,a restore regs @@ -587,12 +602,16 @@ * Check for mouse update L034F equ * * Major error here. Used regU which points to D.CCMem not G.CurDev. RG + IFNE GLOBALKEYMOUSE + tst <G.KyMse,u keyboard mouse? + ELSE IFNE H6309 tim #KeyMse,<V.ULCase,y keyboard mouse? ELSE lda <V.ULCase,y keyboard mouse? bita #KeyMse ENDC + ENDC bne L0369 branch if so lda <G.MSmpRt,u get # ticks until next mouse read beq L0369 0 means shut off, don't bother @@ -613,6 +632,9 @@ ENDC std <G.KySns,u initialize keysense & same key flag * Major error here. Was regU; see above. RG + IFNE GLOBALKEYMOUSE + tst <G.KyMse,u + ELSE IFNE H6309 tim #KeyMse,>V.ULCase,y ELSE @@ -621,6 +643,7 @@ bita #KeyMse puls a ENDC + ENDC beq L0381 no, try joystick ldx >WGlobal+G.KeyEnt else get ptr to keydrv leau >G.KeyMem,u and ptr to its statics @@ -882,6 +905,20 @@ stb <G.AutoMs,x and set auto follow flag in global mem lda V.TYPE,u get device type sta <G.WinType,x set it + IFEQ GLOBALKEYMOUSE +* Added: get window's keyboard mouse flag and update global keyboard mouse + IFNE H6309 + tim #KeyMse,<V.ULCase,u keyboard mouse? + ELSE + lda <V.ULCase,u keyboard mouse? + bita #KeyMse + ENDC + beq setmous2 + lda #$FF + sta <G.KyMse,x + fcb $8c +setmous2 clr <G.KyMse,x + ENDC clra puls pc,x restore and return