Minor syntax corrections.

This commit is contained in:
Stephen Anthony 2024-04-04 14:25:47 -02:30
parent 98b2b9b1c3
commit 09be43c506
1 changed files with 15 additions and 15 deletions

View File

@ -63,13 +63,13 @@ class StreamReader : public Serializable
return static_cast<bool>(myFile); return static_cast<bool>(myFile);
} }
bool isValid() { bool isValid() const {
return (myFileSize > 0) ? true:false; return myFileSize > 0;
} }
void blankPartialLines(bool index) { void blankPartialLines(bool index) {
const int colorSize = myVisibleLines * 5; const int colorSize = myVisibleLines * 5;
if (index) if(index)
{ {
// top line // top line
myColor[0] = 0; myColor[0] = 0;
@ -118,7 +118,7 @@ class StreamReader : public Serializable
const FrameFormat* ff = reinterpret_cast<FrameFormat*>(offset); const FrameFormat* ff = reinterpret_cast<FrameFormat*>(offset);
if (ff->format & 0x80) if(ff->format & 0x80)
{ {
myVSyncLines = ff->vsync; myVSyncLines = ff->vsync;
myBlankLines = ff->vblank; myBlankLines = ff->vblank;
@ -153,7 +153,7 @@ class StreamReader : public Serializable
myColorBK = myColor + static_cast<ptrdiff_t>(5 * myVisibleLines); myColorBK = myColor + static_cast<ptrdiff_t>(5 * myVisibleLines);
} }
if (!odd) if(!odd)
myColorBK++; myColorBK++;
} }
@ -983,7 +983,7 @@ void MovieCart::updateTransport()
{ {
const uInt8 temp = ~(myA10_Count & 0x1e) & 0x1e; const uInt8 temp = ~(myA10_Count & 0x1e) & 0x1e;
if (temp == myDirectionValue) if(temp == myDirectionValue)
myInputs.updateDirection(temp); myInputs.updateDirection(temp);
myDirectionValue = temp; myDirectionValue = temp;
@ -1023,7 +1023,7 @@ void MovieCart::updateTransport()
} }
else if(myInputs.down && !myLastInputs.down) else if(myInputs.down && !myLastInputs.down)
{ {
if (myMode == Mode::Last) if(myMode == Mode::Last)
myMode = 0; myMode = 0;
else else
myMode++; myMode++;
@ -1049,7 +1049,7 @@ void MovieCart::updateTransport()
{ {
myDrawTimeCode = OSD_FRAMES; myDrawTimeCode = OSD_FRAMES;
mySpeed += 4; mySpeed += 4;
if (mySpeed < 0) if(mySpeed < 0)
mySpeed -= 4; mySpeed -= 4;
} }
else if(myMode == Mode::Volume) else if(myMode == Mode::Volume)
@ -1057,7 +1057,7 @@ void MovieCart::updateTransport()
myDrawLevelBars = OSD_FRAMES; myDrawLevelBars = OSD_FRAMES;
if(myInputs.left) if(myInputs.left)
{ {
if (myVolume) if(myVolume)
myVolume--; myVolume--;
} }
else else
@ -1118,7 +1118,7 @@ void MovieCart::updateTransport()
else else
myDrawLevelBars = 0; myDrawLevelBars = 0;
if (myMute) if(myMute)
myMute--; myMute--;
if(myPlaying && !myMute) if(myPlaying && !myMute)
@ -1151,7 +1151,7 @@ void MovieCart::updateTransport()
{ {
if(myInputs.right) if(myInputs.right)
step = mySpeed; step = mySpeed;
else if (myInputs.left) else if(myInputs.left)
step = -mySpeed; step = -mySpeed;
} }
else else
@ -1198,7 +1198,7 @@ void MovieCart::fill_addr_right_line()
writeColor(addr_set_gcol9 + 1, v); writeColor(addr_set_gcol9 + 1, v);
// alternate between background color and playfield color // alternate between background color and playfield color
if (myForceColor) if(myForceColor)
{ {
v = 0; v = 0;
writeROM(addr_set_colubk_r + 1, v); writeROM(addr_set_colubk_r + 1, v);
@ -1238,7 +1238,7 @@ void MovieCart::fill_addr_left_line(bool again)
// alternate between background color and playfield color // alternate between background color and playfield color
if (myForceColor) if(myForceColor)
{ {
v = 0; v = 0;
writeROM(addr_set_colupf_l + 1, v); writeROM(addr_set_colupf_l + 1, v);
@ -1421,7 +1421,7 @@ void MovieCart::runStateMachine()
{ {
if(myDrawTimeCode) if(myDrawTimeCode)
{ {
if (myLines == (TIMECODE_HEIGHT - 0)) if(myLines == (TIMECODE_HEIGHT - 0))
myStream.blankPartialLines(true); myStream.blankPartialLines(true);
} }
if(myDrawLevelBars) if(myDrawLevelBars)
@ -1498,7 +1498,7 @@ bool MovieCart::process(uInt16 address)
switch(myTitleState) switch(myTitleState)
{ {
case TitleState::Display: case TitleState::Display:
if (myStream.isValid()) if(myStream.isValid())
myTitleCycles++; myTitleCycles++;
if(myTitleCycles == TITLE_CYCLES) if(myTitleCycles == TITLE_CYCLES)
{ {