2015-07-11 01:07:24 +00:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
2016-02-06 04:14:27 +00:00
|
|
|
#include "BaseControlDevice.h"
|
|
|
|
#include "Zapper.h"
|
2015-07-11 01:07:24 +00:00
|
|
|
|
2016-02-06 04:14:27 +00:00
|
|
|
class StandardController : public BaseControlDevice
|
2015-07-11 01:07:24 +00:00
|
|
|
{
|
|
|
|
private:
|
2016-02-06 04:14:27 +00:00
|
|
|
uint32_t _stateBuffer;
|
|
|
|
uint32_t _stateBufferFamicom;
|
|
|
|
|
|
|
|
bool _hasZapper;
|
|
|
|
shared_ptr<BaseControlDevice> _additionalController;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
uint8_t RefreshState();
|
|
|
|
virtual void StreamState(bool saving);
|
2015-07-11 01:07:24 +00:00
|
|
|
|
|
|
|
public:
|
2016-02-06 04:14:27 +00:00
|
|
|
using BaseControlDevice::BaseControlDevice;
|
|
|
|
|
|
|
|
virtual uint8_t GetButtonState();
|
|
|
|
uint8_t GetPortOutput();
|
|
|
|
void RefreshStateBuffer();
|
2015-07-11 01:07:24 +00:00
|
|
|
|
2016-02-06 04:14:27 +00:00
|
|
|
shared_ptr<Zapper> GetZapper();
|
2015-07-11 01:07:24 +00:00
|
|
|
|
2016-02-06 04:14:27 +00:00
|
|
|
void AddAdditionalController(shared_ptr<BaseControlDevice> controller);
|
2015-07-11 01:07:24 +00:00
|
|
|
};
|