1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-11 08:30:55 +00:00

Map all events lists appropriately.

This commit is contained in:
Thomas Harte 2023-02-12 23:02:51 -05:00
parent dce04e7219
commit 927e61484f

View File

@ -92,7 +92,7 @@ template <Personality personality> struct Storage<personality, std::enable_if_t<
int sprite_block_ = 0; int sprite_block_ = 0;
/// Resets line-ephemeral state for a new line. /// Resets line-ephemeral state for a new line.
void begin_line([[maybe_unused]] ScreenMode mode, bool is_refresh, [[maybe_unused]] bool sprites_enabled) { void begin_line(ScreenMode mode, bool is_refresh, bool sprites_enabled) {
// TODO: reinstate upon completion of the Yamaha pipeline. // TODO: reinstate upon completion of the Yamaha pipeline.
// assert(mode < ScreenMode::YamahaText80 || next_event_ == nullptr || next_event_->offset == 1368); // assert(mode < ScreenMode::YamahaText80 || next_event_ == nullptr || next_event_->offset == 1368);
@ -104,8 +104,22 @@ template <Personality personality> struct Storage<personality, std::enable_if_t<
return; return;
} }
// TODO: obey sprites_enabled flag, at least. switch(mode) {
next_event_ = no_sprites_events.data(); case ScreenMode::YamahaText80:
case ScreenMode::Text:
next_event_ = text_events.data();
break;
case ScreenMode::MultiColour:
case ScreenMode::YamahaGraphics1:
case ScreenMode::YamahaGraphics2:
next_event_ = character_events.data();
break;
default:
next_event_ = sprites_enabled ? sprites_events.data() : no_sprites_events.data();
break;
}
} }
// Command engine state. // Command engine state.