* MouseIsVisible renamed CustomMouse_MouseIsVisible to indicate its value is only used for the custom drawn mouse cursor

git-svn-id: trunk@29071 -
This commit is contained in:
nickysn 2014-11-13 22:32:55 +00:00
parent a4053370fc
commit 3effe8d62a

View File

@ -47,7 +47,9 @@ var
ActionRegs : TRealRegs;external name '___v2prt0_rmcb_regs'; ActionRegs : TRealRegs;external name '___v2prt0_rmcb_regs';
v2prt0_ds_alias : word;external name '___v2prt0_ds_alias'; v2prt0_ds_alias : word;external name '___v2prt0_ds_alias';
const const
MouseIsVisible: boolean = false; { indicates whether the mouse cursor is visible when the mouse cursor is
drawn by this unit (i.e. drawmousecursor=true) }
CustomMouse_MouseIsVisible: boolean = false;
MousePresent : boolean = false; MousePresent : boolean = false;
First_try : boolean = true; First_try : boolean = true;
{$ifdef DEBUG} {$ifdef DEBUG}
@ -102,7 +104,7 @@ asm
{ should we draw the mouse cursor? } { should we draw the mouse cursor? }
cmpb $0,drawmousecursor cmpb $0,drawmousecursor
je .Lmouse_nocursor je .Lmouse_nocursor
cmpb $0,mouseisvisible cmpb $0,CustomMouse_MouseIsVisible
je .Lmouse_nocursor je .Lmouse_nocursor
pushw %fs pushw %fs
pushl %eax pushl %eax
@ -448,7 +450,7 @@ begin
Unlock_Data(MouseWhereX,SizeOf(word)); Unlock_Data(MouseWhereX,SizeOf(word));
Unlock_Data(MouseWhereY,SizeOf(word)); Unlock_Data(MouseWhereY,SizeOf(word));
Unlock_Data(drawmousecursor,SizeOf(boolean)); Unlock_Data(drawmousecursor,SizeOf(boolean));
Unlock_Data(mouseisvisible,SizeOf(boolean)); Unlock_Data(CustomMouse_MouseIsVisible,SizeOf(boolean));
Unlock_Data(mouselock,SizeOf(boolean)); Unlock_Data(mouselock,SizeOf(boolean));
Unlock_Data(videoseg,SizeOf(word)); Unlock_Data(videoseg,SizeOf(word));
Unlock_Data(dosmemselector,SizeOf(word)); Unlock_Data(dosmemselector,SizeOf(word));
@ -512,7 +514,7 @@ begin
Lock_Data(MouseWhereX,SizeOf(word)); Lock_Data(MouseWhereX,SizeOf(word));
Lock_Data(MouseWhereY,SizeOf(word)); Lock_Data(MouseWhereY,SizeOf(word));
Lock_Data(drawmousecursor,SizeOf(boolean)); Lock_Data(drawmousecursor,SizeOf(boolean));
Lock_Data(mouseisvisible,SizeOf(boolean)); Lock_Data(CustomMouse_MouseIsVisible,SizeOf(boolean));
Lock_Data(mouselock,SizeOf(boolean)); Lock_Data(mouselock,SizeOf(boolean));
Lock_Data(videoseg,SizeOf(word)); Lock_Data(videoseg,SizeOf(word));
Lock_Data(dosmemselector,SizeOf(word)); Lock_Data(dosmemselector,SizeOf(word));
@ -533,7 +535,7 @@ begin
If MouseCallBack=Nil then If MouseCallBack=Nil then
Mouse_Action($ffff, @MouseInt); { Set masks/interrupt } Mouse_Action($ffff, @MouseInt); { Set masks/interrupt }
drawmousecursor:=false; drawmousecursor:=false;
mouseisvisible:=false; CustomMouse_MouseIsVisible:=false;
if (screenwidth>80) or (screenheight>50) then if (screenwidth>80) or (screenheight>50) then
DoCustomMouse(true); DoCustomMouse(true);
ShowMouse; ShowMouse;
@ -577,13 +579,13 @@ begin
lockmouse; lockmouse;
if CustomMouse_HideCount>0 then if CustomMouse_HideCount>0 then
Dec(CustomMouse_HideCount); Dec(CustomMouse_HideCount);
if (CustomMouse_HideCount=0) and not(mouseisvisible) then if (CustomMouse_HideCount=0) and not(CustomMouse_MouseIsVisible) then
begin begin
oldmousex:=getmousex-1; oldmousex:=getmousex-1;
oldmousey:=getmousey-1; oldmousey:=getmousey-1;
mem[videoseg:(((screenwidth*oldmousey)+oldmousex)*2)+1]:= mem[videoseg:(((screenwidth*oldmousey)+oldmousex)*2)+1]:=
mem[videoseg:(((screenwidth*oldmousey)+oldmousex)*2)+1] xor $7f; mem[videoseg:(((screenwidth*oldmousey)+oldmousex)*2)+1] xor $7f;
mouseisvisible:=true; CustomMouse_MouseIsVisible:=true;
end; end;
unlockmouse; unlockmouse;
end end
@ -607,9 +609,9 @@ begin
begin begin
lockmouse; lockmouse;
Inc(CustomMouse_HideCount); Inc(CustomMouse_HideCount);
if mouseisvisible then if CustomMouse_MouseIsVisible then
begin begin
mouseisvisible:=false; CustomMouse_MouseIsVisible:=false;
mem[videoseg:(((screenwidth*oldmousey)+oldmousex)*2)+1]:= mem[videoseg:(((screenwidth*oldmousey)+oldmousex)*2)+1]:=
mem[videoseg:(((screenwidth*oldmousey)+oldmousex)*2)+1] xor $7f; mem[videoseg:(((screenwidth*oldmousey)+oldmousex)*2)+1] xor $7f;
oldmousex:=-1; oldmousex:=-1;
@ -740,7 +742,7 @@ procedure DoCustomMouse(b : boolean);
SetMouseYRange(0,(screenheight-1)*8); SetMouseYRange(0,(screenheight-1)*8);
if b then if b then
begin begin
mouseisvisible:=false; CustomMouse_MouseIsVisible:=false;
drawmousecursor:=true; drawmousecursor:=true;
end end
else else