mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-22 09:30:32 +00:00
Expose the clock tick as an externally driven action.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
4f8d3287d4
commit
2c23289caa
@ -11,12 +11,12 @@ namespace EightBit {
|
||||
|
||||
Signal<EventArgs> Ticked;
|
||||
|
||||
void tick(const int extra) { for (int i = 0; i < extra; ++i) tick(); }
|
||||
void tick() { ++m_cycles; Ticked.fire(EventArgs::empty()); }
|
||||
[[nodiscard]] auto cycles() const noexcept { return m_cycles; }
|
||||
|
||||
protected:
|
||||
void resetCycles() noexcept { m_cycles = 0; }
|
||||
void tick(const int extra) { for (int i = 0; i < extra; ++i) tick(); }
|
||||
void tick() { ++m_cycles; Ticked.fire(EventArgs::empty()); }
|
||||
|
||||
private:
|
||||
int m_cycles = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user