Skip to content

Commit

Permalink
version and whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
lefty01 committed Dec 9, 2023
1 parent f513ce7 commit 0276b6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion code/include/version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef _PROG_VERSION_H__
#define _PROG_VERSION_H__

const char* PROG_VERSION = "0.1.3b";
const char* PROG_VERSION = "0.1.4";

#endif
22 changes: 11 additions & 11 deletions code/src/digit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ void Digit::Morph0() {
// ZERO
for (int i = 0; i <= segWidth; i++)
{
if (_value==1) { // If 1 to 0, slide B to F and E to C
// slide B to F
if (_value==1) { // If 1 to 0, slide B to F and E to C
// slide B to F
drawLine(segWidth - i, segHeight * 2+1 , segWidth - i, segHeight + 2, _color);
if (i > 0) drawLine(segWidth - i + 1, segHeight * 2+1, segWidth - i + 1, segHeight + 2, black);

Expand All @@ -222,36 +222,36 @@ void Digit::Morph0() {
if (i<segWidth) drawPixel(segWidth - i, segHeight * 2 + 2 , _color); // Draw A
if (i<segWidth) drawPixel(segWidth - i, 0, _color); // Draw D
}

if (_value==2) { // If 2 to 0, slide B to F and Flow G to C
// slide B to F
// slide B to F
drawLine(segWidth - i, segHeight * 2+1 , segWidth - i, segHeight + 2, _color);
if (i > 0) drawLine(segWidth - i + 1, segHeight * 2+1, segWidth - i + 1, segHeight + 2, black);

drawPixel(1+i, segHeight + 1, black); // Erase G left to right
if (i<segWidth) drawPixel(segWidth + 1, segHeight + 1- i, _color);// Draw C
}

if (_value==3) { // B to F, C to E
// slide B to F
// slide B to F
drawLine(segWidth - i, segHeight * 2+1 , segWidth - i, segHeight + 2, _color);
if (i > 0) drawLine(segWidth - i + 1, segHeight * 2+1, segWidth - i + 1, segHeight + 2, black);

// Move C to E
drawLine(segWidth - i, 1, segWidth - i, segHeight, _color);
if (i > 0) drawLine(segWidth - i + 1, 1, segWidth - i + 1, segHeight, black);

// Erase G from right to left
drawPixel(segWidth - i, segHeight + 1, black); // G
}

if (_value==5) { // If 5 to 0, we also need to slide F to B
if (i<segWidth) {
if (i>0) drawLine(1 + i, segHeight * 2 + 1, 1 + i, segHeight + 2, black);
drawLine(2 + i, segHeight * 2 + 1, 2 + i, segHeight + 2, _color);
if (i>0) drawLine(1 + i, segHeight * 2 + 1, 1 + i, segHeight + 2, black);
drawLine(2 + i, segHeight * 2 + 1, 2 + i, segHeight + 2, _color);
}
}

if (_value==5 || _value==9) { // If 9 or 5 to 0, Flow G into E
if (i<segWidth) drawPixel(segWidth - i, segHeight + 1, black);
if (i<segWidth) drawPixel(0, segHeight - i, _color);
Expand Down

0 comments on commit 0276b6d

Please sign in to comment.