coastline 0.0.4
Loading...
Searching...
No Matches
MouseDevice Class Reference

The mouse of the game. More...

#include <input.h>

Public Member Functions

int GetCursorX () const
int GetCursorY () const
int GetPreviousCursorY () const
void SetCursorX (int value)
 Set the horizontal cursor position.
void SetCursorY (int value)
 Set the vertical cursor position.
bool IsButtonHeld (int index) const
IDirectInputDeviceA * GetDirectInputDevice () const
 MouseDevice ()
 Clear the state of the mouse.
bool CreateMouseDevice (HWND hWnd)
 Create the DirectInput device of the system mouse for a window, in the format of a mouse and with exclusive use in the foreground.
void ReleaseMouseDevice ()
 Unacquire and release the DirectInput device of the mouse.
void PollMouseDevice (HWND hWnd)
 Read the mouse and the arrows of the keyboard for the menus.
void SyncMouseAcquireState (HWND hWnd)
 Acquire the mouse while the game window is active and release it while another window is active.

Detailed Description

The mouse of the game.

The layout is not recovered past the members below.

Constructor & Destructor Documentation

◆ MouseDevice()

MouseDevice::MouseDevice ( )

Clear the state of the mouse.

Ghidra address:
BRD3D: 0x10060280
Ghidra address:
BRGlide: 0x100592f0

Member Function Documentation

◆ GetCursorX()

int MouseDevice::GetCursorX ( ) const
inline
Returns
The horizontal cursor position.

◆ GetCursorY()

int MouseDevice::GetCursorY ( ) const
inline
Returns
The vertical cursor position.

◆ GetPreviousCursorY()

int MouseDevice::GetPreviousCursorY ( ) const
inline
Returns
The previous vertical cursor position.

◆ SetCursorX()

void MouseDevice::SetCursorX ( int value)
inline

Set the horizontal cursor position.

◆ SetCursorY()

void MouseDevice::SetCursorY ( int value)
inline

Set the vertical cursor position.

◆ IsButtonHeld()

bool MouseDevice::IsButtonHeld ( int index) const
inline
Returns
Whether button index is held.

◆ GetDirectInputDevice()

IDirectInputDeviceA * MouseDevice::GetDirectInputDevice ( ) const
inline
Returns
The underlying DirectInput mouse device.

◆ CreateMouseDevice()

bool MouseDevice::CreateMouseDevice ( HWND hWnd)

Create the DirectInput device of the system mouse for a window, in the format of a mouse and with exclusive use in the foreground.

A step that fails shows a message.

Parameters
hWndThe window.
Returns
Whether the device was created.
Ghidra address:
BRD3D: 0x100602e0
Ghidra address:
BRGlide: 0x10059350

◆ ReleaseMouseDevice()

void MouseDevice::ReleaseMouseDevice ( )

Unacquire and release the DirectInput device of the mouse.

Ghidra address:
BRD3D: 0x100602b0
Ghidra address:
BRGlide: 0x10059320

◆ PollMouseDevice()

void MouseDevice::PollMouseDevice ( HWND hWnd)

Read the mouse and the arrows of the keyboard for the menus.

The cursor moves within the screen, F11 and F12 select the track of music before and after, the up and down arrows move the hover of a menu at a repeat of 120 milliseconds, and the left and right arrows act as the first two buttons. A button counts as clicked when it is let go.

Parameters
hWndNot read.
Ghidra address:
BRD3D: 0x100603a0
Ghidra address:
BRGlide: 0x10059410

◆ SyncMouseAcquireState()

void MouseDevice::SyncMouseAcquireState ( HWND hWnd)

Acquire the mouse while the game window is active and release it while another window is active.

This has an effect only after a menu screen is built.

Parameters
hWndUnused.
Ghidra address:
BRD3D: 0x10060750
Ghidra address:
BRGlide: 0x100597c0

The documentation for this class was generated from the following file: