
Added ability to hold shift and skip the terrain generation when loading Added ability for the perlin terrain to save a raw image of the terrain to use as a cache
29 lines
841 B
C++
29 lines
841 B
C++
#pragma once
|
|
#include <set>
|
|
#include "Core.h"
|
|
#include "DirectXCore.h"
|
|
#include <XInput.h>
|
|
#pragma comment(lib, "XInput.lib")
|
|
|
|
// Emum class for helping with the select of which controller inputs to use
|
|
enum class ControlInputs { Forward, Back, TurnLeft, TurnRight, StrafeLeft, StrafeRight, Up, Down, Fire1, Fire2 };
|
|
|
|
class GamePadController
|
|
{
|
|
public:
|
|
GamePadController();
|
|
~GamePadController();
|
|
void ProcessGameController(set<ControlInputs>& currentInputs, bool &boostHit);
|
|
|
|
private:
|
|
XINPUT_STATE _controllerState;
|
|
DWORD _lastPacketNumber;
|
|
bool _firstTime;
|
|
|
|
// These two values are used to avoid having to calculate square roots (which are very time consuming)
|
|
// when we are checking if the movement of the left or right thumb stick is in the dead zone
|
|
DWORD _leftThumbDeadZoneSquared;
|
|
DWORD _rightThumbDeadZoneSquared;
|
|
};
|
|
|