annotate Mouse.h @ 41:fd64b06a39a8

19.10.12 PartyCreation Window complete
author Ritor1
date Fri, 19 Oct 2012 23:28:34 +0600
parents 8b8875f5b359
children 8a8dd0164b12
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #pragma once
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2 #include "OSAPI.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4 #include "VectorTypes.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8 /* 107 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10 struct ThreadWard
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12 //----- (00438B0B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13 inline ThreadWard()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15 InitializeCriticalSection(&csAsyncMouse);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16 InitializeCriticalSection(&cs2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17 InitializeCriticalSection(&cs3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18 InitializeCriticalSection(&csAsyncKeyboard);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21 //----- (00438B54) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22 virtual ~ThreadWard()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
24 ThreadWard *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27 //this->vdestructor_ptr = &ThreadWard_destructors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28 DeleteCriticalSection(&this->csAsyncKeyboard);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29 DeleteCriticalSection(&v1->cs3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30 DeleteCriticalSection(&v1->cs2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
31 DeleteCriticalSection(&v1->csAsyncMouse);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34 void (__thiscall ***vdestructor_ptr)(ThreadWard *, bool);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35 _RTL_CRITICAL_SECTION csAsyncMouse;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36 _RTL_CRITICAL_SECTION cs2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37 _RTL_CRITICAL_SECTION cs3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38 _RTL_CRITICAL_SECTION csAsyncKeyboard;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42 /* 106 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 struct Mouse
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46 //----- (00467E4E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47 inline Mouse(ThreadWard *pWard)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49 uCursorTextureID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50 uCursorTextureID_2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 hWnd = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52 pCursorBitmap_sysmem = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53 field_34 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54 pCursorBitmap2_sysmem = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 pCursorBitmap3_sysmembits_16bit = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 ptr_90 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 pWard = pWard;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 void GetClickPos(unsigned int *pX, unsigned int *pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 void RemoveHoldingItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 void SetCursorBitmapFromItemID(unsigned int uItemID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63 void SetCurrentCursorBitmap();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 void SetCursorBitmap(const char *pName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 LONG _469AE4();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66 void ClearCursor();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67 void AllocCursorSystemMem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68 void *DoAllocCursorMem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69 POINT *GetCursorPos(POINT *p);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 void Initialize(HWND hWnd);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 void Deactivate();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 void DrawCursor();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 void _469E1C();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 void _469E24();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 unsigned __int16 *_469E3B();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 void _469EA4();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 void Activate(int bActive);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 void SetMouseClick(int x, int y);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 unsigned int uPointingObjectID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 unsigned int bActive;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 int field_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 int field_C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 unsigned int bInitialized;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 int field_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 int field_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 int field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 int field_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 unsigned int uCursorTextureID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 unsigned int uCursorTextureID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 HWND hWnd;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93 unsigned __int16 *pCursorBitmap_sysmem;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 int field_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 unsigned __int8 *pCursorBitmap2_sysmem;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 unsigned __int16 *pCursorBitmap3_sysmembits_16bit;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 int field_40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 int field_44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 int field_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 int field_4C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 int field_50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 int field_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103 int uCursorBitmapPitch;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 int field_5C[13];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 void *ptr_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 int field_94;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 int field_98;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 int field_9C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 int field_A0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 int field_A4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 int field_A8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 int field_AC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113 int field_B0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 int field_B4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 int field_B8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 int field_BC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 int field_C0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118 Vec2_int_ pCursorBitmapPos;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 int uCursorBitmapWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 int uCursorBitmapHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 int field_D4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 int field_D8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 int field_DC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 int field_E0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 Vec4_int_ pCursorBitmapRect;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 char field_F4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 char pCurrentCursorName[11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 int field_100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 int field_104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 unsigned int uMouseClickX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 unsigned int uMouseClickY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 ThreadWard *pWard;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 struct AsyncMouse
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 AsyncMouse(struct IDirectDrawSurface *);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 ~AsyncMouse();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 char Initialize(LPVOID lpParameter);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 char LoadCursor(const char *pContainer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145 char LoadCursorImage();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146 char _46B072();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 char CreateDisrectInputMouse();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 int _46B0ED();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 void Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 void Suspend();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151 char _46B1DD();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 bool DrawCursor(struct Texture *a1, struct IDirectDrawSurface4 *a2, int a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 bool _46B289(int a2, char a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 void SetHotspot(float hotspotx, float hotspoty);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 int UpdateData(int a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 char Thread();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 void _46B492(int a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 void _46B5D5(int a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159 void _46B736_consume_click_lists(char a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 void _46B76F();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 void _46B879();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 int _46B944();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 char _46B958(int a2, int a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 char _46BA8D(int a2, int a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165 void _46BAEC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 void _46BB0A();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167 void *Clip();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168 void dtor_sub_46BC73();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169 int _46BCAB();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 int unk_46BCD2(int a2, int a3, int a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 void *unk_46BD09(void *a1, void *a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172 int unk_46BD2D(int a2, void *a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 int unk_46BD66(int a1, int a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 static void __stdcall AsyncMouseThread(int a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177 void _409E3D(char a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178 void Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 extern Mouse *pMouse;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 extern AsyncMouse *pAsyncMouse;