Imports the current Win32 source for the pod-racing game 'Red Planet', built on the MUNGA engine and its L4 (Win32/DirectX) platform layer: - MUNGA / MUNGA_L4: cross-platform engine core and Win32 backend - RP / RP_L4: Red Planet game logic and Win32 application - DivLoader, Setup1: asset loader and installer project - lib, MUNGA_L4/openal, MUNGA_L4/sos: third-party audio dependencies Removed stale Subversion metadata and added .gitignore/.gitattributes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
29 lines
639 B
C++
29 lines
639 B
C++
#pragma once
|
|
#include "l4ctrl.h"
|
|
#include <dinput.h>
|
|
|
|
class DIJoystick : public Joystick
|
|
{
|
|
friend BOOL CALLBACK EnumJoysticksCallback(const DIDEVICEINSTANCE* pdidInstance, VOID* pContext);
|
|
friend BOOL CALLBACK EnumAxesCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef);
|
|
|
|
public:
|
|
DIJoystick(HINSTANCE hInstance, HWND hWnd);
|
|
~DIJoystick();
|
|
|
|
bool IsValid() { return (mDI != NULL); }
|
|
bool Poll();
|
|
|
|
// inherited
|
|
void Update();
|
|
|
|
private:
|
|
LPDIRECTINPUT8 mDI;
|
|
LPDIRECTINPUTDEVICE8 mJoystick;
|
|
DIJOYSTATE2 mJoystate;
|
|
|
|
LONG xAxisMin, xAxisMax;
|
|
LONG yAxisMin, yAxisMax;
|
|
LONG zAxisMin, zAxisMax;
|
|
LONG rzAxisMin, rzAxisMax;
|
|
}; |