/*1* Gearcoleco - ColecoVision Emulator2* Copyright (C) 2021 Ignacio Sanchez34* This program is free software: you can redistribute it and/or modify5* it under the terms of the GNU General Public License as published by6* the Free Software Foundation, either version 3 of the License, or7* any later version.89* This program is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12* GNU General Public License for more details.1314* You should have received a copy of the GNU General Public License15* along with this program. If not, see http://www.gnu.org/licenses/16*17*/1819#ifndef INPUT_H20#define INPUT_H2122#include "definitions.h"2324class Processor;2526class Input27{28public:29enum InputSegments30{31SegmentKeypadRightButtons,32SegmentJoystickLeftButtons33};3435public:36Input(Processor* pProcessor);37void Init();38void Reset();39void KeyPressed(GC_Controllers controller, GC_Keys key);40void KeyReleased(GC_Controllers controller, GC_Keys key);41void Spinner1(int movement);42void Spinner2(int movement);43void SaveState(std::ostream& stream);44void LoadState(std::istream& stream);45void SetInputSegment(InputSegments segment);46u8 ReadInput(u8 port);4748private:49Processor* m_pProcessor;50u8 m_Gamepad[2];51u8 m_Keypad[2];52InputSegments m_Segment;53int m_iSpinnerRel[2];54};5556#endif /* INPUT_H */575859