Added mouse functions
This commit is contained in:
@@ -1137,42 +1137,36 @@ NEWSYM Get_MouseData ; Returns both pressed and coordinates
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM Set_MouseXMax ; Sets the X boundaries (ecx = left, edx = right)
|
NEWSYM Set_MouseXMax ; Sets the X boundaries (ecx = left, edx = right)
|
||||||
; pushad
|
pushad
|
||||||
; or ecx,0FFFh
|
push ecx
|
||||||
; push ecx
|
call SetMouseMinX
|
||||||
; call SetMouseMinX
|
pop ecx
|
||||||
; pop ecx
|
push edx
|
||||||
; or edx,0FFFh
|
call SetMouseMaxX
|
||||||
; push edx
|
pop edx
|
||||||
; call SetMouseMaxX
|
popad
|
||||||
; pop edx
|
|
||||||
; popad
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM Set_MouseYMax ; Sets the Y boundaries (ecx = left, edx = right)
|
NEWSYM Set_MouseYMax ; Sets the Y boundaries (ecx = left, edx = right)
|
||||||
; pushad
|
pushad
|
||||||
; or ecx,0FFFh
|
push ecx
|
||||||
; push ecx
|
call SetMouseMinY
|
||||||
; call SetMouseMinY
|
pop ecx
|
||||||
; pop ecx
|
push edx
|
||||||
; or edx,0FFFh
|
call SetMouseMaxY
|
||||||
; push edx
|
pop edx
|
||||||
; call SetMouseMaxY
|
popad
|
||||||
; pop edx
|
|
||||||
; popad
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM Set_MousePosition ; Sets Mouse Position (x:cx,y:dx)
|
NEWSYM Set_MousePosition ; Sets Mouse Position (x:cx,y:dx)
|
||||||
; pushad
|
pushad
|
||||||
; or ecx,0FFFFh
|
push ecx
|
||||||
; push ecx
|
call SetMouseX
|
||||||
; call SetMouseX
|
pop ecx
|
||||||
; pop ecx
|
push edx
|
||||||
; push edx
|
call SetMouseY
|
||||||
; or edx,0FFFFh
|
pop edx
|
||||||
; call SetMouseY
|
popad
|
||||||
; pop edx
|
|
||||||
; popad
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NEWSYM Get_MousePositionDisplacement
|
NEWSYM Get_MousePositionDisplacement
|
||||||
|
|||||||
@@ -1014,14 +1014,13 @@ void SetMouseMaxY(int MaxY)
|
|||||||
MouseMaxY = MaxY;
|
MouseMaxY = MaxY;
|
||||||
adjustMouseYScale();
|
adjustMouseYScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
// we can probably get rid of these functions since they are no
|
|
||||||
// longer called in sdlintrf.asm
|
|
||||||
void SetMouseX(int X)
|
void SetMouseX(int X)
|
||||||
{ /* MouseX=X; */
|
{
|
||||||
|
MouseX = X;
|
||||||
}
|
}
|
||||||
void SetMouseY(int Y)
|
void SetMouseY(int Y)
|
||||||
{ /* MouseY=Y; */
|
{
|
||||||
|
MouseY = Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZsnesPage()
|
void ZsnesPage()
|
||||||
|
|||||||
@@ -1438,11 +1438,9 @@ NEWSYM Get_MouseData ; Returns both pressed and coordinates
|
|||||||
|
|
||||||
NEWSYM Set_MouseXMax ; Sets the X boundaries (ecx = left, edx = right)
|
NEWSYM Set_MouseXMax ; Sets the X boundaries (ecx = left, edx = right)
|
||||||
pushad
|
pushad
|
||||||
or ecx,0FFFh
|
|
||||||
push ecx
|
push ecx
|
||||||
call SetMouseMinX
|
call SetMouseMinX
|
||||||
pop ecx
|
pop ecx
|
||||||
or edx,0FFFh
|
|
||||||
push edx
|
push edx
|
||||||
call SetMouseMaxX
|
call SetMouseMaxX
|
||||||
pop edx
|
pop edx
|
||||||
@@ -1451,11 +1449,9 @@ NEWSYM Set_MouseXMax ; Sets the X boundaries (ecx = left, edx = right)
|
|||||||
|
|
||||||
NEWSYM Set_MouseYMax ; Sets the Y boundaries (ecx = left, edx = right)
|
NEWSYM Set_MouseYMax ; Sets the Y boundaries (ecx = left, edx = right)
|
||||||
pushad
|
pushad
|
||||||
or ecx,0FFFh
|
|
||||||
push ecx
|
push ecx
|
||||||
call SetMouseMinY
|
call SetMouseMinY
|
||||||
pop ecx
|
pop ecx
|
||||||
or edx,0FFFh
|
|
||||||
push edx
|
push edx
|
||||||
call SetMouseMaxY
|
call SetMouseMaxY
|
||||||
pop edx
|
pop edx
|
||||||
@@ -1464,12 +1460,10 @@ NEWSYM Set_MouseYMax ; Sets the Y boundaries (ecx = left, edx = right)
|
|||||||
|
|
||||||
NEWSYM Set_MousePosition ; Sets Mouse Position (x:cx,y:dx)
|
NEWSYM Set_MousePosition ; Sets Mouse Position (x:cx,y:dx)
|
||||||
pushad
|
pushad
|
||||||
or ecx,0FFFFh
|
|
||||||
push ecx
|
push ecx
|
||||||
call SetMouseX
|
call SetMouseX
|
||||||
pop ecx
|
pop ecx
|
||||||
push edx
|
push edx
|
||||||
or edx,0FFFFh
|
|
||||||
call SetMouseY
|
call SetMouseY
|
||||||
pop edx
|
pop edx
|
||||||
popad
|
popad
|
||||||
@@ -1487,7 +1481,6 @@ NEWSYM Get_MousePositionDisplacement
|
|||||||
mov dx,[WMouseMoveY]
|
mov dx,[WMouseMoveY]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
NEWSYM MouseWindow
|
NEWSYM MouseWindow
|
||||||
pushad
|
pushad
|
||||||
or byte[MouseButton],2
|
or byte[MouseButton],2
|
||||||
|
|||||||
@@ -2727,26 +2727,32 @@ int GetMouseButton(void)
|
|||||||
|
|
||||||
void SetMouseMinX(int MinX)
|
void SetMouseMinX(int MinX)
|
||||||
{
|
{
|
||||||
|
MouseMinX = MinX;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMouseMaxX(int MaxX)
|
void SetMouseMaxX(int MaxX)
|
||||||
{
|
{
|
||||||
|
MouseMaxX = MaxX;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMouseMinY(int MinY)
|
void SetMouseMinY(int MinY)
|
||||||
{
|
{
|
||||||
|
MouseMinY = MinY;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMouseMaxY(int MaxY)
|
void SetMouseMaxY(int MaxY)
|
||||||
{
|
{
|
||||||
|
MouseMaxY = MaxY;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMouseX(int X)
|
void SetMouseX(int X)
|
||||||
{
|
{
|
||||||
|
MouseX = X;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMouseY(int Y)
|
void SetMouseY(int Y)
|
||||||
{
|
{
|
||||||
|
MouseY = Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZsnesPage()
|
void ZsnesPage()
|
||||||
|
|||||||
Reference in New Issue
Block a user