Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
99 lines
2.2 KiB
C++
99 lines
2.2 KiB
C++
// DInput9Mgr.h: interface for the CDInput9Mgr class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_DINPUT9MGR_H__7F904814_C54A_42A0_A3F0_43B3EC33364B__INCLUDED_)
|
|
#define AFX_DINPUT9MGR_H__7F904814_C54A_42A0_A3F0_43B3EC33364B__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include <Dinput.h>
|
|
#include "Caldron.h"
|
|
#include "./LogMgr.h"
|
|
|
|
/* *********************************************************************
|
|
|
|
* CDInput9Mgr
|
|
|
|
* 파일 : DInput8Mgr.h
|
|
* 기능 : Caldron Engine내 Direct Input9 을 이용한 input 키, mouse 처리 class
|
|
* 작성일 : 2003.10.31
|
|
* history :
|
|
wizardbug ( 2003.10.31)
|
|
|
|
********************************************************************** */
|
|
|
|
|
|
namespace Caldron
|
|
{
|
|
|
|
|
|
namespace Base
|
|
{
|
|
enum DINPUT8DEVICES
|
|
{
|
|
DINPUT8_KEYBOARD,
|
|
DINPUT8_MOUSE,
|
|
};
|
|
enum DINPUT8MOUSEBUTTON // Mouse Input
|
|
{
|
|
MOUSE_LBUTTON,
|
|
MOUSE_RBUTTON,
|
|
MOUSE_BUTTONNUMS,
|
|
};
|
|
enum DINPUT8MOUSEAXIS // Mouse Move Axis
|
|
{
|
|
MOUSE_XAXIS,
|
|
MOUSE_YAXIS,
|
|
MOUSE_AXISNUMS,
|
|
|
|
};
|
|
|
|
class CDInput8Mgr
|
|
{
|
|
protected:
|
|
LPDIRECTINPUT8 m_lpDirectInput;
|
|
LPDIRECTINPUTDEVICE8 m_lpKeyboardDevice;
|
|
static LPDIRECTINPUTDEVICE8 m_lpMouseDevice;
|
|
|
|
static DIMOUSESTATE m_MouseState;
|
|
static int m_iMouseMove[MOUSE_AXISNUMS];
|
|
static char m_strKeys[256];
|
|
static char m_strBackKeys[256];
|
|
|
|
static int ms_iLockKey;
|
|
|
|
public:
|
|
CDInput8Mgr();
|
|
~CDInput8Mgr();
|
|
|
|
HRESULT InitInputMgr(HINSTANCE ,HWND ,DWORD dwKeyboard = DISCL_FOREGROUND,DWORD dwMouse = DISCL_FOREGROUND);
|
|
HRESULT Acquire();
|
|
HRESULT Unacquire();
|
|
HRESULT Update();
|
|
|
|
static bool PushButton(int ,int iKey = -1);
|
|
static bool UpButton(int ,int iKey = -1);
|
|
|
|
static bool PushOnceKey(int ,int iKey = -1);
|
|
static bool PushKey(int ,int iKey = -1);
|
|
static bool UpKey(int ,int iKey = -1);
|
|
|
|
static bool KeyStrok(char *strBuffer,int &iPos);
|
|
|
|
static void GetMouseMove(int &iX,int &iY ,int iKey = -1);
|
|
|
|
static void Lock(const int &iKey) { ms_iLockKey = iKey;}
|
|
static void Unlock() { ms_iLockKey = -1;}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
#endif // !defined(AFX_DINPUT9MGR_H__7F904814_C54A_42A0_A3F0_43B3EC33364B__INCLUDED_)
|