mirror of https://github.com/stella-emu/stella.git
Cleanup.
This commit is contained in:
parent
94292bbbd1
commit
f1d503a0ef
|
@ -67,7 +67,7 @@ void Missile::hmm(uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Missile::resm(uInt8 counter, uInt32 hctr)
|
||||
void Missile::resm(uInt8 counter, bool hblank)
|
||||
{
|
||||
myCounter = counter;
|
||||
|
||||
|
@ -78,22 +78,14 @@ void Missile::resm(uInt8 counter, uInt32 hctr)
|
|||
} else {
|
||||
// The following is an effective description of the behavior of missile width after a
|
||||
// RESMx during draw. It would be much simpler without the HBLANK cases :)
|
||||
uInt8 delta = 0;
|
||||
bool hblank = counter != 157;
|
||||
|
||||
if (hblank) {
|
||||
if (hctr > 72) delta = 0;
|
||||
else if (hctr > 66) delta = 1;
|
||||
else delta = 2;
|
||||
}
|
||||
|
||||
switch (myWidth) {
|
||||
case 8:
|
||||
myRenderCounter = delta + ((myRenderCounter >= 4) ? 5 : 0);
|
||||
myRenderCounter = (counter - 157) + ((myRenderCounter >= 4) ? 4 : 0);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
myRenderCounter = delta;
|
||||
myRenderCounter = (counter - 157);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
|
|
@ -37,7 +37,7 @@ class Missile : public Serializable
|
|||
void hmm(uInt8 value);
|
||||
uInt32 hmm() const { return myHmmClocks; }
|
||||
|
||||
void resm(uInt8 counter, uInt32 hctr);
|
||||
void resm(uInt8 counter, bool hblank);
|
||||
|
||||
void resmp(uInt8 value, const Player& player);
|
||||
bool resmp() const { return bool(myResmp); }
|
||||
|
|
|
@ -459,12 +459,12 @@ bool TIA::poke(uInt16 address, uInt8 value)
|
|||
|
||||
case RESM0:
|
||||
myLinesSinceChange = 0;
|
||||
myMissile0.resm(resxCounter(), myHctr);
|
||||
myMissile0.resm(resxCounter(), myHstate == HState::blank);
|
||||
break;
|
||||
|
||||
case RESM1:
|
||||
myLinesSinceChange = 0;
|
||||
myMissile1.resm(resxCounter(), myHctr);
|
||||
myMissile1.resm(resxCounter(), myHstate == HState::blank);
|
||||
break;
|
||||
|
||||
case RESMP0:
|
||||
|
|
Loading…
Reference in New Issue