mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 00:31:16 +00:00
MxParamType -> NotificationId
This commit is contained in:
parent
55829d4634
commit
05101c9e57
@ -95,7 +95,7 @@ void IsleApp::Close()
|
|||||||
if (Lego()) {
|
if (Lego()) {
|
||||||
GameState()->Save(0);
|
GameState()->Save(0);
|
||||||
if (InputManager()) {
|
if (InputManager()) {
|
||||||
InputManager()->QueueEvent(KEYDOWN, 0, 0, 0, 0x20);
|
InputManager()->QueueEvent(c_notificationKeyPress, 0, 0, 0, 0x20);
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->RemoveAll(NULL);
|
VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->RemoveAll(NULL);
|
||||||
@ -431,22 +431,22 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
keyCode = wParam;
|
keyCode = wParam;
|
||||||
type = KEYDOWN;
|
type = c_notificationKeyPress;
|
||||||
break;
|
break;
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
g_mousemoved = 1;
|
g_mousemoved = 1;
|
||||||
type = MOUSEMOVE;
|
type = c_notificationMouseMove;
|
||||||
break;
|
break;
|
||||||
case WM_TIMER:
|
case WM_TIMER:
|
||||||
type = TIMER;
|
type = c_notificationTimer;
|
||||||
break;
|
break;
|
||||||
case WM_LBUTTONDOWN:
|
case WM_LBUTTONDOWN:
|
||||||
g_mousedown = 1;
|
g_mousedown = 1;
|
||||||
type = MOUSEDOWN;
|
type = c_notificationButtonDown;
|
||||||
break;
|
break;
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
g_mousedown = 0;
|
g_mousedown = 0;
|
||||||
type = MOUSEUP;
|
type = c_notificationButtonUp;
|
||||||
break;
|
break;
|
||||||
case 0x5400:
|
case 0x5400:
|
||||||
if (g_isle) {
|
if (g_isle) {
|
||||||
@ -462,7 +462,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
if (InputManager()) {
|
if (InputManager()) {
|
||||||
InputManager()->QueueEvent(type, wParam, LOWORD(lParam), HIWORD(lParam), keyCode);
|
InputManager()->QueueEvent(type, wParam, LOWORD(lParam), HIWORD(lParam), keyCode);
|
||||||
}
|
}
|
||||||
if (g_isle && g_isle->m_drawCursor && type == MOUSEMOVE) {
|
if (g_isle && g_isle->m_drawCursor && type == c_notificationMouseMove) {
|
||||||
int x = LOWORD(lParam);
|
int x = LOWORD(lParam);
|
||||||
int y = HIWORD(lParam);
|
int y = HIWORD(lParam);
|
||||||
if (x >= 640) {
|
if (x >= 640) {
|
||||||
|
|||||||
@ -7,9 +7,9 @@
|
|||||||
// VTABLE 0x100d6aa0
|
// VTABLE 0x100d6aa0
|
||||||
class LegoEventNotificationParam : public MxNotificationParam {
|
class LegoEventNotificationParam : public MxNotificationParam {
|
||||||
public:
|
public:
|
||||||
inline LegoEventNotificationParam() : MxNotificationParam((MxParamType) 0, NULL) {}
|
inline LegoEventNotificationParam() : MxNotificationParam(PARAM_NONE, NULL) {}
|
||||||
inline LegoEventNotificationParam(
|
inline LegoEventNotificationParam(
|
||||||
MxParamType p_type,
|
NotificationId p_type,
|
||||||
MxCore* p_sender,
|
MxCore* p_sender,
|
||||||
MxU8 p_modifier,
|
MxU8 p_modifier,
|
||||||
MxS32 p_x,
|
MxS32 p_x,
|
||||||
|
|||||||
@ -227,11 +227,10 @@ void LegoInputManager::ClearWorld()
|
|||||||
// OFFSET: LEGO1 0x1005c740
|
// OFFSET: LEGO1 0x1005c740
|
||||||
void LegoInputManager::QueueEvent(NotificationId p_id, MxU8 p_modifier, MxLong p_x, MxLong p_y, MxU8 p_key)
|
void LegoInputManager::QueueEvent(NotificationId p_id, MxU8 p_modifier, MxLong p_x, MxLong p_y, MxU8 p_key)
|
||||||
{
|
{
|
||||||
// TODO: param type wrong?
|
LegoEventNotificationParam param = LegoEventNotificationParam(p_id, NULL, p_modifier, p_x, p_y, p_key);
|
||||||
LegoEventNotificationParam param =
|
|
||||||
LegoEventNotificationParam((MxParamType) p_id, NULL, p_modifier, p_x, p_y, p_key);
|
|
||||||
|
|
||||||
if (((!m_unk0x88) || ((m_unk0x335 && (param.GetType() == MOUSEDOWN)))) || ((m_unk0x336 && (p_key == ' ')))) {
|
if (((!m_unk0x88) || ((m_unk0x335 && (param.GetType() == c_notificationButtonDown)))) ||
|
||||||
|
((m_unk0x336 && (p_key == ' ')))) {
|
||||||
ProcessOneEvent(param);
|
ProcessOneEvent(param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,15 +10,6 @@
|
|||||||
|
|
||||||
#include <dinput.h>
|
#include <dinput.h>
|
||||||
|
|
||||||
enum NotificationId {
|
|
||||||
NONE = 0,
|
|
||||||
KEYDOWN = 7,
|
|
||||||
MOUSEUP = 8,
|
|
||||||
MOUSEDOWN = 9,
|
|
||||||
MOUSEMOVE = 10,
|
|
||||||
TIMER = 15
|
|
||||||
};
|
|
||||||
|
|
||||||
class LegoControlManager;
|
class LegoControlManager;
|
||||||
|
|
||||||
// VTABLE 0x100d8800
|
// VTABLE 0x100d8800
|
||||||
@ -113,13 +104,13 @@ class LegoInputManager : public MxPresenter {
|
|||||||
// OFFSET: LEGO1 0x1005d010 TEMPLATE
|
// OFFSET: LEGO1 0x1005d010 TEMPLATE
|
||||||
// MxListEntry<LegoEventNotificationParam>::GetValue
|
// MxListEntry<LegoEventNotificationParam>::GetValue
|
||||||
|
|
||||||
// VTABLE 0x100d87e8
|
// VTABLE 0x100d87e8 TEMPLATE
|
||||||
// class MxQueue<LegoEventNotificationParam>
|
// class MxQueue<LegoEventNotificationParam>
|
||||||
|
|
||||||
// VTABLE 0x100d87d0
|
// VTABLE 0x100d87d0 TEMPLATE
|
||||||
// class MxList<LegoEventNotificationParam>
|
// class MxList<LegoEventNotificationParam>
|
||||||
|
|
||||||
// VTABLE 0x100d87b8
|
// VTABLE 0x100d87b8 TEMPLATE
|
||||||
// class MxListParent<LegoEventNotificationParam>
|
// class MxListParent<LegoEventNotificationParam>
|
||||||
|
|
||||||
#endif // LEGOINPUTMANAGER_H
|
#endif // LEGOINPUTMANAGER_H
|
||||||
|
|||||||
@ -8,7 +8,12 @@
|
|||||||
// SIZE 0x14
|
// SIZE 0x14
|
||||||
class MxActionNotificationParam : public MxNotificationParam {
|
class MxActionNotificationParam : public MxNotificationParam {
|
||||||
public:
|
public:
|
||||||
inline MxActionNotificationParam(MxParamType p_type, MxCore* p_sender, MxDSAction* p_action, MxBool p_reallocAction)
|
inline MxActionNotificationParam(
|
||||||
|
NotificationId p_type,
|
||||||
|
MxCore* p_sender,
|
||||||
|
MxDSAction* p_action,
|
||||||
|
MxBool p_reallocAction
|
||||||
|
)
|
||||||
: MxNotificationParam(p_type, p_sender)
|
: MxNotificationParam(p_type, p_sender)
|
||||||
{
|
{
|
||||||
MxDSAction* oldAction = p_action;
|
MxDSAction* oldAction = p_action;
|
||||||
@ -50,7 +55,7 @@ class MxActionNotificationParam : public MxNotificationParam {
|
|||||||
class MxEndActionNotificationParam : public MxActionNotificationParam {
|
class MxEndActionNotificationParam : public MxActionNotificationParam {
|
||||||
public:
|
public:
|
||||||
inline MxEndActionNotificationParam(
|
inline MxEndActionNotificationParam(
|
||||||
MxParamType p_type,
|
NotificationId p_type,
|
||||||
MxCore* p_sender,
|
MxCore* p_sender,
|
||||||
MxDSAction* p_action,
|
MxDSAction* p_action,
|
||||||
MxBool p_reallocAction
|
MxBool p_reallocAction
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
class MxCore;
|
class MxCore;
|
||||||
|
|
||||||
enum MxParamType {
|
enum NotificationId {
|
||||||
PARAM_NONE = 0,
|
PARAM_NONE = 0,
|
||||||
c_notificationStartAction = 1, // 100dc210:100d8350
|
c_notificationStartAction = 1, // 100dc210:100d8350
|
||||||
c_notificationEndAction = 2, // 100d8358:100d8350
|
c_notificationEndAction = 2, // 100d8358:100d8350
|
||||||
@ -36,18 +36,20 @@ enum MxParamType {
|
|||||||
// VTABLE 0x100d56e0
|
// VTABLE 0x100d56e0
|
||||||
class MxNotificationParam : public MxParam {
|
class MxNotificationParam : public MxParam {
|
||||||
public:
|
public:
|
||||||
inline MxNotificationParam(MxParamType p_type, MxCore* p_sender) : MxParam(), m_type(p_type), m_sender(p_sender) {}
|
inline MxNotificationParam(NotificationId p_type, MxCore* p_sender) : MxParam(), m_type(p_type), m_sender(p_sender)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~MxNotificationParam() override {} // vtable+0x0 (scalar deleting destructor)
|
virtual ~MxNotificationParam() override {} // vtable+0x0 (scalar deleting destructor)
|
||||||
virtual MxNotificationParam* Clone(); // vtable+0x4
|
virtual MxNotificationParam* Clone(); // vtable+0x4
|
||||||
|
|
||||||
inline MxParamType GetNotification() const { return m_type; }
|
inline NotificationId GetNotification() const { return m_type; }
|
||||||
inline MxCore* GetSender() const { return m_sender; }
|
inline MxCore* GetSender() const { return m_sender; }
|
||||||
inline MxParamType GetType() const { return m_type; }
|
inline NotificationId GetType() const { return m_type; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MxParamType m_type; // 0x4
|
NotificationId m_type; // 0x4
|
||||||
MxCore* m_sender; // 0x8
|
MxCore* m_sender; // 0x8
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXNOTIFICATIONPARAM_H
|
#endif // MXNOTIFICATIONPARAM_H
|
||||||
|
|||||||
@ -42,7 +42,7 @@ class MxStreamerSubClass3 : public MxStreamerSubClass1 {
|
|||||||
|
|
||||||
class MxStreamerNotification : public MxNotificationParam {
|
class MxStreamerNotification : public MxNotificationParam {
|
||||||
public:
|
public:
|
||||||
inline MxStreamerNotification(MxParamType p_type, MxCore* p_sender, MxStreamController* p_ctrlr)
|
inline MxStreamerNotification(NotificationId p_type, MxCore* p_sender, MxStreamController* p_ctrlr)
|
||||||
: MxNotificationParam(p_type, p_sender)
|
: MxNotificationParam(p_type, p_sender)
|
||||||
{
|
{
|
||||||
m_controller = p_ctrlr;
|
m_controller = p_ctrlr;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user