mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-11 09:48:13 +08:00
[saco] Implement/match CUnkClass10::FUNC_10072040 and the seven-rect hover test FUNC_100720A0
This commit is contained in:
1 parent
b24c63a267
commit
2d5aabb1c4
2 files changed
+31
-1
No files matched your search
@@ -74,6 +74,32 @@ PCHAR CUnkClass10::FUNC_10071FA0(int nIndex)
|
||||
}
|
||||
|
||||
|
||||
void CUnkClass10::FUNC_10072040(RECT *pRect, POINT *pPoint)
|
||||
{
|
||||
pRect->left = pPoint->x - field_0 / 2;
|
||||
pRect->right = pRect->left + field_0;
|
||||
pRect->top = pPoint->y - field_4 / 2;
|
||||
pRect->bottom = pRect->top + field_4;
|
||||
}
|
||||
|
||||
// picks the hovered cell out of the seven hit rects
|
||||
void CUnkClass10::FUNC_100720A0()
|
||||
{
|
||||
POINT point;
|
||||
GetCursorPos(&point);
|
||||
ScreenToClient(pGame->GetMainWindowHwnd(), &point);
|
||||
|
||||
if(!field_84) field_113 = -1;
|
||||
else if(!pGame->field_61) field_113 = -1;
|
||||
else if(PtInRect(&field_8[0], point)) field_113 = 0;
|
||||
else if(PtInRect(&field_8[1], point)) field_113 = 1;
|
||||
else if(PtInRect(&field_8[2], point)) field_113 = 2;
|
||||
else if(PtInRect(&field_8[3], point)) field_113 = 3;
|
||||
else if(PtInRect(&field_8[4], point)) field_113 = 4;
|
||||
else if(PtInRect(&field_8[5], point)) field_113 = 5;
|
||||
else field_113 = PtInRect(&field_8[6], point) ? 10 : -1;
|
||||
}
|
||||
|
||||
void CUnkClass10::FUNC_100721F0(int nStyle)
|
||||
{
|
||||
if(field_78 == 1 && nStyle == 2)
|
||||
|
||||
+5
-1
@@ -4,7 +4,9 @@
|
||||
class CUnkClass10
|
||||
{
|
||||
private:
|
||||
char _gap0[120];
|
||||
int field_0;
|
||||
int field_4;
|
||||
RECT field_8[7];
|
||||
int field_78;
|
||||
int field_7C;
|
||||
int field_80;
|
||||
@@ -31,6 +33,8 @@ public:
|
||||
|
||||
float FUNC_10071C20(D3DXVECTOR3 *pPos, D3DXVECTOR2 *pOut);
|
||||
PCHAR FUNC_10071FA0(int nIndex);
|
||||
void FUNC_10072040(RECT *pRect, POINT *pPoint);
|
||||
void FUNC_100720A0();
|
||||
void FUNC_100721F0(int nStyle);
|
||||
BOOL FUNC_100723C0();
|
||||
|
||||
|
||||
Reference in new issue
Block a user