mirror of https://github.com/stella-emu/stella.git
Simplify priority logic in score mode.
This commit is contained in:
parent
1924013daf
commit
92ec526d68
|
@ -850,28 +850,19 @@ void TIA::renderPixel(uInt32 x, uInt32 y, bool lineNotCached)
|
|||
break;
|
||||
|
||||
case Priority::score: // CTRLPF D2=0, D1=1
|
||||
// Score mode left half
|
||||
if (x < 80) {
|
||||
// Priority from highest to lowest:
|
||||
// PF/P0/M0 => P1/M1 => BL => BK
|
||||
color = myBall.getPixel(color);
|
||||
color = myMissile1.getPixel(color);
|
||||
color = myPlayer1.getPixel(color);
|
||||
color = myMissile0.getPixel(color);
|
||||
color = myPlayer0.getPixel(color);
|
||||
color = myPlayfield.getPixel(color);
|
||||
}
|
||||
else // Score mode right half
|
||||
{
|
||||
// Priority from highest to lowest:
|
||||
// P0/M0 => PF/P1/M1 => BL => BK
|
||||
color = myBall.getPixel(color);
|
||||
color = myMissile1.getPixel(color);
|
||||
color = myPlayer1.getPixel(color);
|
||||
color = myPlayfield.getPixel(color);
|
||||
color = myMissile0.getPixel(color);
|
||||
color = myPlayer0.getPixel(color);
|
||||
}
|
||||
// Formally we have (priority from highest to lowest)
|
||||
// PF/P0/M0 => P1/M1 => BL => BK
|
||||
// for the first half and
|
||||
// P0/M0 => PF/P1/M1 => BL => BK
|
||||
// for the second half. However, the first ordering is equivalent
|
||||
// to the second (PF has the same color as P0/M0), so we can just
|
||||
// write
|
||||
color = myBall.getPixel(color);
|
||||
color = myMissile1.getPixel(color);
|
||||
color = myPlayer1.getPixel(color);
|
||||
color = myPlayfield.getPixel(color);
|
||||
color = myMissile0.getPixel(color);
|
||||
color = myPlayer0.getPixel(color);
|
||||
break;
|
||||
|
||||
// Priority from highest to lowest:
|
||||
|
|
Loading…
Reference in New Issue