annotate Mouse.h @ 2376:bcd7fadbf7d2

Слияние
author Ritor1
date Mon, 12 May 2014 12:28:06 +0600
parents bddcaf5d5db2
children 0313c761d203
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;
0
Ritor1
parents:
diff changeset
59 pWard = pWard;
Ritor1
parents:
diff changeset
60 }
Ritor1
parents:
diff changeset
61
Ritor1
parents:
diff changeset
62 void GetClickPos(unsigned int *pX, unsigned int *pY);
Ritor1
parents:
diff changeset
63 void RemoveHoldingItem();
Ritor1
parents:
diff changeset
64 void SetCursorBitmapFromItemID(unsigned int uItemID);
Ritor1
parents:
diff changeset
65 void SetCurrentCursorBitmap();
Ritor1
parents:
diff changeset
66 void SetCursorBitmap(const char *pName);
Ritor1
parents:
diff changeset
67 LONG _469AE4();
Ritor1
parents:
diff changeset
68 void ClearCursor();
Ritor1
parents:
diff changeset
69 void AllocCursorSystemMem();
Ritor1
parents:
diff changeset
70 void *DoAllocCursorMem();
Ritor1
parents:
diff changeset
71 POINT *GetCursorPos(POINT *p);
1802
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
72 void Initialize(OSWindow *window);
762
cf2fbac6edc9 Misc cleaning
Nomad
parents: 0
diff changeset
73 void SetActive(bool active);
0
Ritor1
parents:
diff changeset
74 void Deactivate();
Ritor1
parents:
diff changeset
75 void DrawCursor();
2216
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
76 void Activate();
0
Ritor1
parents:
diff changeset
77 void _469E24();
Ritor1
parents:
diff changeset
78 void DrawCursorToTarget();
2216
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
79 void ReadCursorWithItem();
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
80 void ChangeActivation(int a1);
0
Ritor1
parents:
diff changeset
81 void SetMouseClick(int x, int y);
Ritor1
parents:
diff changeset
82
2339
63e1388c5463 Moving functions from unsorted_subs.h pt3
Grumpy7
parents: 2216
diff changeset
83 static void UI_OnMouseLeftClick(int *pXY); // idb
63e1388c5463 Moving functions from unsorted_subs.h pt3
Grumpy7
parents: 2216
diff changeset
84 static bool UI_OnKeyDown(unsigned int vkKey);
63e1388c5463 Moving functions from unsorted_subs.h pt3
Grumpy7
parents: 2216
diff changeset
85
0
Ritor1
parents:
diff changeset
86
Ritor1
parents:
diff changeset
87 unsigned int uPointingObjectID;
Ritor1
parents:
diff changeset
88 unsigned int bActive;
Ritor1
parents:
diff changeset
89 int field_8;
Ritor1
parents:
diff changeset
90 int field_C;
Ritor1
parents:
diff changeset
91 unsigned int bInitialized;
791
346f7069676a Indoor::GetSector and various stuff
Nomad
parents: 762
diff changeset
92 unsigned int bRedraw;
0
Ritor1
parents:
diff changeset
93 int field_18;
Ritor1
parents:
diff changeset
94 int field_1C;
Ritor1
parents:
diff changeset
95 int field_20;
Ritor1
parents:
diff changeset
96 unsigned int uCursorTextureID;
Ritor1
parents:
diff changeset
97 unsigned int uCursorTextureID_2;
1802
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
98 //HWND hWnd;
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
99 OSWindow *window;
0
Ritor1
parents:
diff changeset
100 unsigned __int16 *pCursorBitmap_sysmem;
Ritor1
parents:
diff changeset
101 int field_34;
Ritor1
parents:
diff changeset
102 unsigned __int8 *pCursorBitmap2_sysmem;
Ritor1
parents:
diff changeset
103 unsigned __int16 *pCursorBitmap3_sysmembits_16bit;
2216
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
104 int uCursorWithItemX;
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
105 int uCursorWithItemY;
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
106 int uCursorWithItemW;
3f375342de12 window->GetWidth() continue
Ritor1
parents: 1802
diff changeset
107 int uCursorWithItemZ;
0
Ritor1
parents:
diff changeset
108 int field_50;
Ritor1
parents:
diff changeset
109 int field_54;
Ritor1
parents:
diff changeset
110 int uCursorBitmapPitch;
Ritor1
parents:
diff changeset
111 int field_5C[13];
Ritor1
parents:
diff changeset
112 void *ptr_90;
Ritor1
parents:
diff changeset
113 int field_94;
Ritor1
parents:
diff changeset
114 int field_98;
Ritor1
parents:
diff changeset
115 int field_9C;
Ritor1
parents:
diff changeset
116 int field_A0;
Ritor1
parents:
diff changeset
117 int field_A4;
Ritor1
parents:
diff changeset
118 int field_A8;
Ritor1
parents:
diff changeset
119 int field_AC;
Ritor1
parents:
diff changeset
120 int field_B0;
Ritor1
parents:
diff changeset
121 int field_B4;
Ritor1
parents:
diff changeset
122 int field_B8;
Ritor1
parents:
diff changeset
123 int field_BC;
Ritor1
parents:
diff changeset
124 int field_C0;
Ritor1
parents:
diff changeset
125 Vec2_int_ pCursorBitmapPos;
Ritor1
parents:
diff changeset
126 int uCursorBitmapWidth;
Ritor1
parents:
diff changeset
127 int uCursorBitmapHeight;
Ritor1
parents:
diff changeset
128 int field_D4;
Ritor1
parents:
diff changeset
129 int field_D8;
Ritor1
parents:
diff changeset
130 int field_DC;
Ritor1
parents:
diff changeset
131 int field_E0;
Ritor1
parents:
diff changeset
132 Vec4_int_ pCursorBitmapRect;
Ritor1
parents:
diff changeset
133 char field_F4;
Ritor1
parents:
diff changeset
134 char pCurrentCursorName[11];
Ritor1
parents:
diff changeset
135 int field_100;
Ritor1
parents:
diff changeset
136 int field_104;
Ritor1
parents:
diff changeset
137 unsigned int uMouseClickX;
Ritor1
parents:
diff changeset
138 unsigned int uMouseClickY;
1397
eb02a65e5c82 Quick Spell fixed.
Nomad
parents: 1103
diff changeset
139 void/*ThreadWard*/ *pWard;
0
Ritor1
parents:
diff changeset
140 };
Ritor1
parents:
diff changeset
141 #pragma pack(pop)
Ritor1
parents:
diff changeset
142
Ritor1
parents:
diff changeset
143
Ritor1
parents:
diff changeset
144
Ritor1
parents:
diff changeset
145
Ritor1
parents:
diff changeset
146
1038
39f42990698f Cleanings
Nomad
parents: 791
diff changeset
147 extern Mouse *pMouse;