rodecomp/Source/Client/Input/Mouse.h
ragnarok-clanker e20b198c62 Decompile fn_04731 (CMouse::Message)
Batch #10993 by cremane: 0 byte-identical, 1 confirmed by peer review.

- fn_04731 CMouse::Message: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, dori, StrawberrysherbetIX
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-04 18:41:54 +00:00

41 lines
1,015 B
C++

#ifndef RAGNAROK_SOURCE_CLIENT_INPUT_MOUSE_H
#define RAGNAROK_SOURCE_CLIENT_INPUT_MOUSE_H
#include <cstdint>
#include <windows.h>
class CMouse {
public:
virtual ~CMouse();
void Update();
void Reset();
int Center();
void SetX(int value);
void SetY(int value);
void Message(HWND source, UINT message, WPARAM keys, LPARAM unused);
/* 0004 */ int x = 0;
/* 0008 */ int y = 0;
/* 000C */ int deltaX = 0;
/* 0010 */ int deltaY = 0;
/* 0014 */ int buttons[2] = {};
/* 001C */ int wheel = 0;
/* 0020 */ int pendingX = 0;
/* 0024 */ int pendingY = 0;
/* 0028 */ int pendingWheel = 0;
/* 002C */ std::uint8_t previousButtons[2] = {};
/* 002E */ std::uint8_t pendingButtons[2] = {};
/* 0030 */ std::uint32_t pressTicks[2] = {};
/* 0038 */ std::uint32_t doubleClickTime = 500;
/* 003C */ std::uint8_t active = 1;
/* 003D */ std::uint8_t unknown_003D[3] = {};
};
extern CMouse g_mouse;
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(CMouse) == 64);
#endif
#endif