///	毎フレーム呼ぶ関数 更新が必要な関数
void CPlayerAttack::Update()
{
	PushKey();

	Create();
	OnCollision();
}
void KeyStrokerImpl::PressKey(Key iKey, bool iPress)
{
    m_Cpt = 0;
    ZeroMemory(m_Input, sizeof m_Input);
    PushKey(m_KeyMap[iKey], iPress);
    SendInput(m_Cpt, m_Input, sizeof INPUT);
}
LONG CPropertyArchiveRegistry::Open(HKEY hKeyParent, const CString &strKeyName, REGSAM samDesired) const
{
	assert(hKeyParent != NULL);
	HKEY hKey = NULL;
	LONG lRes = RegOpenKeyEx(hKeyParent, strKeyName, 0, samDesired, &hKey);
	if (lRes == ERROR_SUCCESS)
	{
		//lRes = Close();
		assert(lRes == ERROR_SUCCESS);
		PushKey(hKey);
	}
	return lRes;
}
LONG CPropertyArchiveRegistry::Create(HKEY hKeyParent, const CString &strKeyName,
	LPTSTR lpszClass, DWORD dwOptions, REGSAM samDesired,
	LPSECURITY_ATTRIBUTES lpSecAttr, LPDWORD lpdwDisposition)
{
	assert(hKeyParent != NULL);
	DWORD dw;
	HKEY hKey = NULL;
	LONG lRes = RegCreateKeyEx(hKeyParent, strKeyName, 0,
		lpszClass, dwOptions, samDesired, lpSecAttr, &hKey, &dw);
	if (lpdwDisposition != NULL)
		*lpdwDisposition = dw;
	if (lRes == ERROR_SUCCESS)
	{
		//lRes = Close();
		PushKey(hKey);
	}
	return lRes;
}
Exemple #5
0
void UpdateState (DIDEVICEOBJECTDATA *pdidod)
{
	KEYCODE kcKey = pdidod->dwOfs;

	fix timeNow = TimerGetFixedSeconds ();

	if (pdidod->dwData & 0x80)
	{
		keyd_pressed [kcKey] = 1;
		keyd_last_pressed = kcKey;
                g_rgtimeDown [kcKey] = keyd_time_when_last_pressed = timeNow;
                g_rgcDowns [kcKey] ++;
		PushKey (kcKey, keyd_time_when_last_pressed);
	}
	else
	{
		keyd_pressed [kcKey] = 0;
		keyd_last_released = kcKey;
                g_rgcUps [kcKey] ++;
		g_rgtimeElapsed [kcKey] = timeNow - g_rgtimeDown [kcKey];
	}
}
void CPropertyArchiveRegistry::Attach(HKEY hKey)
{
	assert(GetKey() == NULL);
	PushKey(hKey);
}