annotate Mouse.h @ 2481:4f4eb812af28

KEY_ALL_ACCESS
author Ritor1
date Fri, 22 Aug 2014 17:41:25 +0600
parents 0313c761d203
children 68cdef6879a0
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
1802
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
2 #include "OSWindow.h"
0
Ritor1
parents:
diff changeset
3
Ritor1
parents:
diff changeset
4 #include "VectorTypes.h"
Ritor1
parents:
diff changeset
5
Ritor1
parents:
diff changeset
6
Ritor1
parents:
diff changeset
7
Ritor1
parents:
diff changeset
8 /* 107 */
Ritor1
parents:
diff changeset
9 #pragma pack(push, 1)
1103
db395ce89ede struct/class incostintency
Grumpy7
parents: 1038
diff changeset
10 class ThreadWard
0
Ritor1
parents:
diff changeset
11 {
1103
db395ce89ede struct/class incostintency
Grumpy7
parents: 1038
diff changeset
12 public:
0
Ritor1
parents:
diff changeset
13 //----- (00438B0B) --------------------------------------------------------
Ritor1
parents:
diff changeset
14 inline ThreadWard()
Ritor1
parents:
diff changeset
15 {
Ritor1
parents:
diff changeset
16 InitializeCriticalSection(&csAsyncMouse);
Ritor1
parents:
diff changeset
17 InitializeCriticalSection(&cs2);
Ritor1
parents:
diff changeset
18 InitializeCriticalSection(&cs3);
Ritor1
parents:
diff changeset
19 InitializeCriticalSection(&csAsyncKeyboard);
Ritor1
parents:
diff changeset
20 }
Ritor1
parents:
diff changeset
21
Ritor1
parents:
diff changeset
22 //----- (00438B54) --------------------------------------------------------
Ritor1
parents:
diff changeset
23 virtual ~ThreadWard()
Ritor1
parents:
diff changeset
24 {
Ritor1
parents:
diff changeset
25 ThreadWard *v1; // esi@1
Ritor1
parents:
diff changeset
26
Ritor1
parents:
diff changeset
27 v1 = this;
Ritor1
parents:
diff changeset
28 //this->vdestructor_ptr = &ThreadWard_destructors;
Ritor1
parents:
diff changeset
29 DeleteCriticalSection(&this->csAsyncKeyboard);
Ritor1
parents:
diff changeset
30 DeleteCriticalSection(&v1->cs3);
Ritor1
parents:
diff changeset
31 DeleteCriticalSection(&v1->cs2);
Ritor1
parents:
diff changeset
32 DeleteCriticalSection(&v1->csAsyncMouse);
Ritor1
parents:
diff changeset
33 }
Ritor1
parents:
diff changeset
34
1458
934074e7fcc1 ModalWindow
Nomad
parents: 1397
diff changeset
35 void ( ***vdestructor_ptr)(ThreadWard *, bool);
0
Ritor1
parents:
diff changeset
36 _RTL_CRITICAL_SECTION csAsyncMouse;
Ritor1
parents:
diff changeset
37 _RTL_CRITICAL_SECTION cs2;
Ritor1
parents:
diff changeset
38 _RTL_CRITICAL_SECTION cs3;
Ritor1
parents:
diff changeset
39 _RTL_CRITICAL_SECTION csAsyncKeyboard;
Ritor1
parents:
diff changeset
40 };
Ritor1
parents:
diff changeset
41 #pragma pack(pop)
Ritor1
parents:
diff changeset
42
Ritor1
parents:
diff changeset
43 /* 106 */
Ritor1
parents:
diff changeset
44 #pragma pack(push, 1)
1103
db395ce89ede struct/class incostintency
Grumpy7
parents: 1038
diff changeset
45 class Mouse
0
Ritor1
parents:
diff changeset
46 {
1103
db395ce89ede struct/class incostintency
Grumpy7
parents: 1038
diff changeset
47 public:
0
Ritor1
parents:
diff changeset
48 //----- (00467E4E) --------------------------------------------------------
1802
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
49 inline Mouse():
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
50 window(nullptr)
0
Ritor1
parents:
diff changeset
51 {
Ritor1
parents:
diff changeset
52 uCursorTextureID = 0;
Ritor1
parents:
diff changeset
53 uCursorTextureID_2 = 0;
2369
bddcaf5d5db2 removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents: 2339
diff changeset
54 pCursorBitmap_sysmem = nullptr;
0
Ritor1
parents:
diff changeset
55 field_34 = 0;
2369
bddcaf5d5db2 removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents: 2339
diff changeset
56 pCursorBitmap2_sysmem = nullptr;
bddcaf5d5db2 removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents: 2339
diff changeset
57 pCursorBitmap3_sysmembits_16bit = nullptr;
bddcaf5d5db2 removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents: 2339
diff changeset
58 ptr_90 = nullptr;
2420
0313c761d203 memory problems, Mouse
Ritor1
parents: 2369
diff changeset
59 pWard = nullptr;
0313c761d203 memory problems, Mouse
Ritor1
parents: 2369
diff changeset
60 *pCurrentCursorName = NULL;
0313c761d203 memory problems, Mouse
Ritor1
parents: 2369
diff changeset
61 uMouseClickX = 0;
0313c761d203 memory problems, Mouse
Ritor1
parents: 2369
diff changeset
62 uMouseClickY = 0;
0
Ritor1
parents:
diff changeset
63 }
Ritor1
parents:
diff changeset
64
Ritor1
parents:
diff changeset
65 void GetClickPos(unsigned int *pX, unsigned int *pY);
Ritor1
parents:
diff changeset
66 void RemoveHoldingItem();
Ritor1
parents:
diff changeset
67 void SetCursorBitmapFromItemID(unsigned int uItemID);
Ritor1
parents:
diff changeset
68 void SetCurrentCursorBitmap();
Ritor1
parents:
diff changeset
69 void SetCursorBitmap(const char *pName);
Ritor1
parents:
diff changeset
70 LONG _469AE4();
Ritor1
parents:
diff changeset
71 void ClearCursor();
Ritor1
parents:
diff changeset
72 void AllocCursorSystemMem();
Ritor1
parents:
diff changeset
73 void *DoAllocCursorMem();
Ritor1
parents:
diff changeset
74 POINT *GetCursorPos(POINT *p);
1802
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
75 void Initialize(OSWindow *window);
762
cf2fbac6edc9 Misc cleaning
Nomad
parents: 0
diff changeset
76 void SetActive(bool active);
0
Ritor1
parents:
diff changeset
77 void Deactivate();
Ritor1
parents:
diff changeset
78 void DrawCursor();
2216
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
79 void Activate();
0
Ritor1
parents:
diff changeset
80 void _469E24();
Ritor1
parents:
diff changeset
81 void DrawCursorToTarget();
2216
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
82 void ReadCursorWithItem();
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
83 void ChangeActivation(int a1);
0
Ritor1
parents:
diff changeset
84 void SetMouseClick(int x, int y);
Ritor1
parents:
diff changeset
85
2339
63e1388c5463 Moving functions from unsorted_subs.h pt3
Grumpy7
parents: 2216
diff changeset
86 static void UI_OnMouseLeftClick(int *pXY); // idb
63e1388c5463 Moving functions from unsorted_subs.h pt3
Grumpy7
parents: 2216
diff changeset
87 static bool UI_OnKeyDown(unsigned int vkKey);
63e1388c5463 Moving functions from unsorted_subs.h pt3
Grumpy7
parents: 2216
diff changeset
88
0
Ritor1
parents:
diff changeset
89
Ritor1
parents:
diff changeset
90 unsigned int uPointingObjectID;
Ritor1
parents:
diff changeset
91 unsigned int bActive;
Ritor1
parents:
diff changeset
92 int field_8;
Ritor1
parents:
diff changeset
93 int field_C;
Ritor1
parents:
diff changeset
94 unsigned int bInitialized;
791
346f7069676a Indoor::GetSector and various stuff
Nomad
parents: 762
diff changeset
95 unsigned int bRedraw;
0
Ritor1
parents:
diff changeset
96 int field_18;
Ritor1
parents:
diff changeset
97 int field_1C;
Ritor1
parents:
diff changeset
98 int field_20;
Ritor1
parents:
diff changeset
99 unsigned int uCursorTextureID;
Ritor1
parents:
diff changeset
100 unsigned int uCursorTextureID_2;
1802
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
101 //HWND hWnd;
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
102 OSWindow *window;
0
Ritor1
parents:
diff changeset
103 unsigned __int16 *pCursorBitmap_sysmem;
Ritor1
parents:
diff changeset
104 int field_34;
Ritor1
parents:
diff changeset
105 unsigned __int8 *pCursorBitmap2_sysmem;
Ritor1
parents:
diff changeset
106 unsigned __int16 *pCursorBitmap3_sysmembits_16bit;
2216
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
107 int uCursorWithItemX;
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
108 int uCursorWithItemY;
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
109 int uCursorWithItemW;
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
110 int uCursorWithItemZ;
0
Ritor1
parents:
diff changeset
111 int field_50;
Ritor1
parents:
diff changeset
112 int field_54;
Ritor1
parents:
diff changeset
113 int uCursorBitmapPitch;
Ritor1
parents:
diff changeset
114 int field_5C[13];
Ritor1
parents:
diff changeset
115 void *ptr_90;
Ritor1
parents:
diff changeset
116 int field_94;
Ritor1
parents:
diff changeset
117 int field_98;
Ritor1
parents:
diff changeset
118 int field_9C;
Ritor1
parents:
diff changeset
119 int field_A0;
Ritor1
parents:
diff changeset
120 int field_A4;
Ritor1
parents:
diff changeset
121 int field_A8;
Ritor1
parents:
diff changeset
122 int field_AC;
Ritor1
parents:
diff changeset
123 int field_B0;
Ritor1
parents:
diff changeset
124 int field_B4;
Ritor1
parents:
diff changeset
125 int field_B8;
Ritor1
parents:
diff changeset
126 int field_BC;
Ritor1
parents:
diff changeset
127 int field_C0;
Ritor1
parents:
diff changeset
128 Vec2_int_ pCursorBitmapPos;
Ritor1
parents:
diff changeset
129 int uCursorBitmapWidth;
Ritor1
parents:
diff changeset
130 int uCursorBitmapHeight;
Ritor1
parents:
diff changeset
131 int field_D4;
Ritor1
parents:
diff changeset
132 int field_D8;
Ritor1
parents:
diff changeset
133 int field_DC;
Ritor1
parents:
diff changeset
134 int field_E0;
Ritor1
parents:
diff changeset
135 Vec4_int_ pCursorBitmapRect;
Ritor1
parents:
diff changeset
136 char field_F4;
Ritor1
parents:
diff changeset
137 char pCurrentCursorName[11];
Ritor1
parents:
diff changeset
138 int field_100;
Ritor1
parents:
diff changeset
139 int field_104;
Ritor1
parents:
diff changeset
140 unsigned int uMouseClickX;
Ritor1
parents:
diff changeset
141 unsigned int uMouseClickY;
1397
eb02a65e5c82 Quick Spell fixed.
Nomad
parents: 1103
diff changeset
142 void/*ThreadWard*/ *pWard;
0
Ritor1
parents:
diff changeset
143 };
Ritor1
parents:
diff changeset
144 #pragma pack(pop)
Ritor1
parents:
diff changeset
145
Ritor1
parents:
diff changeset
146
Ritor1
parents:
diff changeset
147
Ritor1
parents:
diff changeset
148
Ritor1
parents:
diff changeset
149
1038
39f42990698f Cleanings
Nomad
parents: 791
diff changeset
150 extern Mouse *pMouse;