mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 03:32:01 +00:00
Corrects initial error value.
This commit is contained in:
parent
0b9ebafc0f
commit
402fa41bc0
@ -145,16 +145,14 @@ bool Blitter::advance() {
|
|||||||
//
|
//
|
||||||
// Implementation below is heavily based on the documentation found
|
// Implementation below is heavily based on the documentation found
|
||||||
// at https://github.com/niklasekstrom/blitter-subpixel-line/blob/master/Drawing%20lines%20using%20the%20Amiga%20blitter.pdf
|
// at https://github.com/niklasekstrom/blitter-subpixel-line/blob/master/Drawing%20lines%20using%20the%20Amiga%20blitter.pdf
|
||||||
|
//
|
||||||
|
|
||||||
printf("!!! Line %08x\n", pointer_[3]);
|
int error = int16_t(pointer_[0] << 1) >> 1; // TODO: what happens if line_sign_ doesn't agree with this?
|
||||||
|
|
||||||
int error = int(pointer_[0]) * line_sign_;
|
|
||||||
bool draw_ = true;
|
bool draw_ = true;
|
||||||
while(height_--) {
|
while(height_--) {
|
||||||
|
|
||||||
if(draw_) {
|
if(draw_) {
|
||||||
c_ = ram_[pointer_[3] & ram_mask_];
|
c_ = ram_[pointer_[3] & ram_mask_];
|
||||||
// c_ |= a_ >> shifts_[0]; // TODO: there's an XOR mode, I think?
|
|
||||||
ram_[pointer_[3] & ram_mask_] =
|
ram_[pointer_[3] & ram_mask_] =
|
||||||
apply_minterm<uint16_t>(a_ >> shifts_[0], b_, c_, minterms_);
|
apply_minterm<uint16_t>(a_ >> shifts_[0], b_, c_, minterms_);
|
||||||
draw_ &= !one_dot_;
|
draw_ &= !one_dot_;
|
||||||
|
Loading…
Reference in New Issue
Block a user