mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +00:00
Further simplified inner loops.
This commit is contained in:
parent
34640cec93
commit
82cb1c365c
@ -520,12 +520,16 @@ inline void Machine::update_display()
|
|||||||
while(pixels_to_output--)
|
while(pixels_to_output--)
|
||||||
{
|
{
|
||||||
GetNextPixels();
|
GetNextPixels();
|
||||||
for(int c = 0; c < 8; c++)
|
|
||||||
{
|
_writePointer[0] = _palette[(pixels&0x80) >> 4];
|
||||||
uint8_t colour = (pixels&0x80) >> 4;
|
_writePointer[1] = _palette[(pixels&0x40) >> 3];
|
||||||
_writePointer[c] = _palette[colour];
|
_writePointer[2] = _palette[(pixels&0x20) >> 2];
|
||||||
pixels <<= 1;
|
_writePointer[3] = _palette[(pixels&0x10) >> 1];
|
||||||
}
|
_writePointer[4] = _palette[(pixels&0x08) >> 0];
|
||||||
|
_writePointer[5] = _palette[(pixels&0x04) << 1];
|
||||||
|
_writePointer[6] = _palette[(pixels&0x02) << 2];
|
||||||
|
_writePointer[7] = _palette[(pixels&0x01) << 3];
|
||||||
|
|
||||||
_writePointer += 8;
|
_writePointer += 8;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -535,12 +539,12 @@ inline void Machine::update_display()
|
|||||||
while(pixels_to_output--)
|
while(pixels_to_output--)
|
||||||
{
|
{
|
||||||
GetNextPixels();
|
GetNextPixels();
|
||||||
for(int c = 0; c < 4; c ++)
|
|
||||||
{
|
_writePointer[0] = _palette[((pixels&0x80) >> 4) | ((pixels&0x08) >> 2)];
|
||||||
uint8_t colour = ((pixels&0x80) >> 4) | ((pixels&0x08) >> 2);
|
_writePointer[1] = _palette[((pixels&0x40) >> 3) | ((pixels&0x04) >> 1)];
|
||||||
_writePointer[c] = _palette[colour];
|
_writePointer[2] = _palette[((pixels&0x20) >> 2) | ((pixels&0x02) >> 0)];
|
||||||
pixels <<= 1;
|
_writePointer[3] = _palette[((pixels&0x10) >> 1) | ((pixels&0x01) << 1)];
|
||||||
}
|
|
||||||
_writePointer += 4;
|
_writePointer += 4;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -549,12 +553,8 @@ inline void Machine::update_display()
|
|||||||
while(pixels_to_output--)
|
while(pixels_to_output--)
|
||||||
{
|
{
|
||||||
GetNextPixels();
|
GetNextPixels();
|
||||||
for(int c = 0; c < 2; c ++)
|
_writePointer[0] = _palette[((pixels&0x80) >> 4) | ((pixels&0x20) >> 3) | ((pixels&0x08) >> 2) | ((pixels&0x02) >> 1)];
|
||||||
{
|
_writePointer[1] = _palette[((pixels&0x40) >> 3) | ((pixels&0x10) >> 2) | ((pixels&0x04) >> 1) | ((pixels&0x01) >> 0)];
|
||||||
uint8_t colour = ((pixels&0x80) >> 4) | ((pixels&0x20) >> 3) | ((pixels&0x08) >> 2) | ((pixels&0x02) >> 1);
|
|
||||||
_writePointer[c] = _palette[colour];
|
|
||||||
pixels <<= 1;
|
|
||||||
}
|
|
||||||
_writePointer += 2;
|
_writePointer += 2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user