annotate Mouse.h @ 323:d720a13e2273

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