mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-11 17:58:16 +08:00
[saco] Match FUNC_10006100 and the two accessor COMDATs it keeps alive; 0x1026EC2C is a CDXUTDialog and +0x13 is m_bVisible
This commit is contained in:
1 parent
237716a11e
commit
4750c5994f
4 files changed
+71
No files matched your search
@@ -35,6 +35,9 @@ public:
|
||||
|
||||
void GetDialogSize(RECT *pRect);
|
||||
|
||||
// 0x14E0 falls inside m_szCmdNames, so the accessor reaches it by a cast
|
||||
int GetField14E0() { return *(int *)((char *)this + 0x14E0); }; // .text:10002E50, out of line copy
|
||||
|
||||
bool IsImeActive(); // .text:10069810
|
||||
|
||||
void Enable();
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
extern CGame *pGame;
|
||||
extern CNetGame *pNetGame;
|
||||
extern CCmdWindow *pCmdWindow;
|
||||
extern CUnkClass3 *pUnkClass3;
|
||||
extern CDXUTDialog *pClassSelectDialog;
|
||||
|
||||
DWORD dword_100FE0A4 = -1;
|
||||
DWORD dword_100FE0A8 = 30;
|
||||
@@ -674,3 +677,65 @@ void CLocalPlayer::SetInteriorId(BYTE byteInteriorId)
|
||||
bsSend.Write(byteInteriorId);
|
||||
pNetGame->GetRakClient()->RPC(RPC_SetInteriorId, &bsSend, HIGH_PRIORITY, RELIABLE, 0, FALSE);
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
// drives class selection: centres the dialog on entry, then steps on the arrows
|
||||
void CLocalPlayer::FUNC_10006100()
|
||||
{
|
||||
if(!pGame->sub_100A0920())
|
||||
{
|
||||
pGame->sub_100A1DB0(0);
|
||||
pGame->ToggleKeyInputsDisabled(2, 0);
|
||||
}
|
||||
|
||||
if(pUnkClass3 && pUnkClass3->GetField28())
|
||||
return;
|
||||
|
||||
if(!field_306)
|
||||
{
|
||||
RECT rect;
|
||||
|
||||
pClassSelectDialog->SetVisible(true);
|
||||
GetClientRect(pGame->GetMainWindowHwnd(), &rect);
|
||||
pClassSelectDialog->SetLocation(rect.right / 2 - pClassSelectDialog->GetWidth() / 2,
|
||||
rect.bottom - pClassSelectDialog->GetHeight() - 50);
|
||||
|
||||
field_306 = 1;
|
||||
RequestClass(field_2FE);
|
||||
return;
|
||||
}
|
||||
|
||||
if(GetTickCount() - field_14B < 2000)
|
||||
return;
|
||||
|
||||
if(!field_302)
|
||||
{
|
||||
if(!field_143)
|
||||
return;
|
||||
|
||||
if((GetAsyncKeyState(VK_SHIFT) & 0x8000) && !pCmdWindow->GetField14E0())
|
||||
{
|
||||
sub_10004060();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(!field_143)
|
||||
return;
|
||||
|
||||
DWORD dwElapsed = GetTickCount() - field_147;
|
||||
|
||||
if((GetAsyncKeyState(VK_LEFT) & 0x8000) && dwElapsed > 250)
|
||||
{
|
||||
field_147 = GetTickCount();
|
||||
SelectPreviousClass();
|
||||
return;
|
||||
}
|
||||
|
||||
if((GetAsyncKeyState(VK_RIGHT) & 0x8000) && dwElapsed > 250)
|
||||
{
|
||||
field_147 = GetTickCount();
|
||||
SelectNextClass();
|
||||
}
|
||||
}
|
||||
@@ -151,6 +151,7 @@ public:
|
||||
void FUNC_10004080(); // .text:10004080
|
||||
void FUNC_10004230(WORD a1); // .text:10004230
|
||||
void FUNC_10004280(PLAYERID playerId); // .text:10004280
|
||||
void FUNC_10006100(); // .text:10006100
|
||||
void SendDeath(); // .text:10005810
|
||||
void SetInteriorId(BYTE byteInteriorId); // .text:10005970
|
||||
void FUNC_10003F50(); // .text:10003F50
|
||||
|
||||
@@ -25,4 +25,6 @@ public:
|
||||
CUnkClass3(IDirect3DDevice9 *pD3DDevice);
|
||||
|
||||
void ResetDialogControls(CDXUTDialog *pDialog);
|
||||
|
||||
int GetField28() { return field_28; }; // .text:10002E60, out of line copy
|
||||
};
|
||||
Reference in new issue
Block a user