mirror of https://github.com/stella-emu/stella.git
Fix wide player dispatch after resp -> fixes missile command.
This commit is contained in:
parent
a982a334a8
commit
48d90768f3
|
@ -49,9 +49,6 @@ DrawCounterDecodes::DrawCounterDecodes()
|
|||
decodes[156] = 1;
|
||||
}
|
||||
|
||||
memset(myDecodesWide, 0, 160);
|
||||
myDecodesWide[157] = 1;
|
||||
|
||||
myDecodes1[12] = 1;
|
||||
myDecodes2[28] = 1;
|
||||
myDecodes3[12] = myDecodes3[28] = 1;
|
||||
|
@ -63,9 +60,9 @@ DrawCounterDecodes::DrawCounterDecodes()
|
|||
myPlayerDecodes[2] = myDecodes2;
|
||||
myPlayerDecodes[3] = myDecodes3;
|
||||
myPlayerDecodes[4] = myDecodes4;
|
||||
myPlayerDecodes[5] = myDecodesWide;
|
||||
myPlayerDecodes[5] = myDecodes0;
|
||||
myPlayerDecodes[6] = myDecodes6;
|
||||
myPlayerDecodes[7] = myDecodesWide;
|
||||
myPlayerDecodes[7] = myDecodes0;
|
||||
|
||||
myMissileDecodes[0] = myDecodes0;
|
||||
myMissileDecodes[1] = myDecodes1;
|
||||
|
|
|
@ -43,7 +43,7 @@ class DrawCounterDecodes
|
|||
uInt8* myMissileDecodes[8];
|
||||
|
||||
uInt8 myDecodes0[160], myDecodes1[160], myDecodes2[160], myDecodes3[160],
|
||||
myDecodes4[160], myDecodes6[160], myDecodesWide[160];
|
||||
myDecodes4[160], myDecodes6[160];
|
||||
|
||||
static DrawCounterDecodes myInstance;
|
||||
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
#include "DrawCounterDecodes.hxx"
|
||||
|
||||
enum Count: Int8 {
|
||||
renderCounterOffset = -5
|
||||
renderCounterOffset = -5,
|
||||
renderCounterOffsetWide = -6
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -95,8 +96,10 @@ void Player::resp(bool hblank, bool extendedHblank)
|
|||
{
|
||||
myCounter = hblank ? (extendedHblank ? 158 : 159) : 157;
|
||||
|
||||
if (myIsRendering && myRenderCounter < -1)
|
||||
myRenderCounter = Count::renderCounterOffset;
|
||||
const Int8 renderCounterOffset = myWidth > 8 ? Count::renderCounterOffsetWide : Count::renderCounterOffset;
|
||||
|
||||
if (myIsRendering && (myRenderCounter - renderCounterOffset) < 4)
|
||||
myRenderCounter = renderCounterOffset;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -189,7 +192,7 @@ void Player::tick()
|
|||
{
|
||||
if (myDecodes[myCounter]) {
|
||||
myIsRendering = true;
|
||||
myRenderCounter = Count::renderCounterOffset;
|
||||
myRenderCounter = myWidth > 8 ? Count::renderCounterOffset : Count::renderCounterOffset;
|
||||
} else if (myIsRendering && ++myRenderCounter >= myWidth) {
|
||||
myIsRendering = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue