// // ZXSpectrum.hpp // Clock Signal // // Created by Thomas Harte on 17/03/2021. // Copyright © 2021 Thomas Harte. All rights reserved. // #pragma once #include "../../../Configurable/Configurable.hpp" #include "../../../Configurable/StandardOptions.hpp" #include "../../../Analyser/Static/StaticAnalyser.hpp" #include "../../ROMMachine.hpp" #include namespace Sinclair::ZXSpectrum { struct Machine { virtual ~Machine() = default; static std::unique_ptr ZXSpectrum(const Analyser::Static::Target *, const ROMMachine::ROMFetcher &); virtual void set_tape_is_playing(bool is_playing) = 0; virtual bool get_tape_is_playing() = 0; class Options: public Reflection::StructImpl, public Configurable::DisplayOption, public Configurable::QuickloadOption { friend Configurable::DisplayOption; friend Configurable::QuickloadOption; public: bool automatic_tape_motor_control = true; Options(Configurable::OptionsType type) : Configurable::DisplayOption(type == Configurable::OptionsType::UserFriendly ? Configurable::Display::RGB : Configurable::Display::CompositeColour), Configurable::QuickloadOption(type == Configurable::OptionsType::UserFriendly), automatic_tape_motor_control(type == Configurable::OptionsType::UserFriendly) {} private: Options() : Options(Configurable::OptionsType::UserFriendly) {} friend Reflection::StructImpl; void declare_fields() { DeclareField(automatic_tape_motor_control); declare_display_option(); declare_quickload_option(); } }; }; }