2015-07-10 21:07:24 -04:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
2016-02-05 23:14:27 -05:00
|
|
|
#include "BaseControlDevice.h"
|
|
|
|
#include "Zapper.h"
|
2015-07-10 21:07:24 -04:00
|
|
|
|
2016-02-05 23:14:27 -05:00
|
|
|
class StandardController : public BaseControlDevice
|
2015-07-10 21:07:24 -04:00
|
|
|
{
|
|
|
|
private:
|
2016-02-05 23:14:27 -05:00
|
|
|
uint32_t _stateBuffer;
|
|
|
|
uint32_t _stateBufferFamicom;
|
|
|
|
|
|
|
|
bool _hasZapper;
|
2016-02-14 12:58:35 -05:00
|
|
|
bool _hasArkanoidController;
|
2016-02-05 23:14:27 -05:00
|
|
|
shared_ptr<BaseControlDevice> _additionalController;
|
2016-02-14 12:58:35 -05:00
|
|
|
uint8_t GetButtonState();
|
2016-02-05 23:14:27 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
uint8_t RefreshState();
|
|
|
|
virtual void StreamState(bool saving);
|
2015-07-10 21:07:24 -04:00
|
|
|
|
|
|
|
public:
|
2016-02-05 23:14:27 -05:00
|
|
|
using BaseControlDevice::BaseControlDevice;
|
|
|
|
|
2016-02-14 12:58:35 -05:00
|
|
|
uint32_t GetNetPlayState();
|
|
|
|
|
2016-02-05 23:14:27 -05:00
|
|
|
uint8_t GetPortOutput();
|
|
|
|
void RefreshStateBuffer();
|
2015-07-10 21:07:24 -04:00
|
|
|
|
2016-02-05 23:14:27 -05:00
|
|
|
void AddAdditionalController(shared_ptr<BaseControlDevice> controller);
|
2015-07-10 21:07:24 -04:00
|
|
|
};
|