mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-25 16:31:42 +00:00
Take ownership of test choice.
This commit is contained in:
parent
20c1c6fdcd
commit
278e7ba9b0
@ -137,9 +137,9 @@ void Base<personality>::posit_sprite(int sprite_number, int sprite_position, uin
|
||||
fetch_sprite_buffer_->reset_sprite_collection();
|
||||
fetch_sprite_buffer_->sprite_terminator = mode_timing_.sprite_terminator(fetch_line_buffer_->screen_mode);
|
||||
|
||||
#ifndef NDEBUG
|
||||
fetch_sprite_buffer_->is_filling = true;
|
||||
#endif
|
||||
if constexpr (SpriteBuffer::test_is_filling) {
|
||||
fetch_sprite_buffer_->is_filling = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!(status_ & StatusSpriteOverflow)) {
|
||||
|
@ -78,7 +78,9 @@ void Base<personality>::draw_sprites(uint8_t y, int start, int end, const std::a
|
||||
return;
|
||||
}
|
||||
|
||||
assert(!buffer.is_filling);
|
||||
if constexpr (SpriteBuffer::test_is_filling) {
|
||||
assert(!buffer.is_filling);
|
||||
}
|
||||
|
||||
constexpr uint32_t sprite_colour_selection_masks[2] = {0x00000000, 0xffffffff};
|
||||
constexpr int colour_masks[16] = {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
|
||||
|
@ -282,11 +282,11 @@ class SpriteFetcher {
|
||||
sprite.image[0] = base->ram_[graphic_location];
|
||||
sprite.image[1] = base->ram_[graphic_location+16];
|
||||
|
||||
#ifndef NDEBUG
|
||||
if(slot == ((mode == SpriteMode::Mode2) ? 7 : 3)) {
|
||||
base->fetch_sprite_buffer_->is_filling = false;
|
||||
if constexpr (SpriteBuffer::test_is_filling) {
|
||||
if(slot == ((mode == SpriteMode::Mode2) ? 7 : 3)) {
|
||||
base->fetch_sprite_buffer_->is_filling = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Base<personality> *const base;
|
||||
|
@ -113,7 +113,10 @@ struct SpriteBuffer {
|
||||
uint8_t sprite_terminator = 0;
|
||||
|
||||
#ifndef NDEBUG
|
||||
static constexpr bool test_is_filling = true;
|
||||
bool is_filling = false;
|
||||
#else
|
||||
static constexpr bool test_is_filling = false;
|
||||
#endif
|
||||
|
||||
void reset_sprite_collection();
|
||||
|
Loading…
Reference in New Issue
Block a user