mirror of https://github.com/MLXXXp/Arduboy2.git
[spacing] remove extra spaces
This commit is contained in:
parent
3ef49d186f
commit
1e95b4edfe
|
@ -13,7 +13,7 @@ Arduboy::Arduboy()
|
||||||
// lastFrameStart
|
// lastFrameStart
|
||||||
// lastFrameDurationMs
|
// lastFrameDurationMs
|
||||||
|
|
||||||
// font rendering
|
// font rendering
|
||||||
cursor_x = 0;
|
cursor_x = 0;
|
||||||
cursor_y = 0;
|
cursor_y = 0;
|
||||||
textsize = 1;
|
textsize = 1;
|
||||||
|
@ -414,11 +414,11 @@ void Arduboy::fillRect
|
||||||
|
|
||||||
void Arduboy::fillScreen(uint8_t color)
|
void Arduboy::fillScreen(uint8_t color)
|
||||||
{
|
{
|
||||||
// C version :
|
// C version :
|
||||||
//
|
//
|
||||||
// if (color) color = 0xFF; //change any nonzero argument to b11111111 and insert into screen array.
|
// if (color) color = 0xFF; //change any nonzero argument to b11111111 and insert into screen array.
|
||||||
// for(int16_t i=0; i<1024; i++) { sBuffer[i] = color; } //sBuffer = (128*64) = 8192/8 = 1024 bytes.
|
// for(int16_t i=0; i<1024; i++) { sBuffer[i] = color; } //sBuffer = (128*64) = 8192/8 = 1024 bytes.
|
||||||
|
|
||||||
asm volatile
|
asm volatile
|
||||||
(
|
(
|
||||||
// load color value into r27
|
// load color value into r27
|
||||||
|
@ -588,7 +588,7 @@ void Arduboy::fillTriangle
|
||||||
}
|
}
|
||||||
|
|
||||||
void Arduboy::drawBitmap
|
void Arduboy::drawBitmap
|
||||||
(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t w, uint8_t h,
|
(int16_t x, int16_t y, const uint8_t *bitmap, uint8_t w, uint8_t h,
|
||||||
uint8_t color)
|
uint8_t color)
|
||||||
{
|
{
|
||||||
// no need to dar at all of we're offscreen
|
// no need to dar at all of we're offscreen
|
||||||
|
@ -696,7 +696,7 @@ void Arduboy::setCursor(int16_t x, int16_t y)
|
||||||
void Arduboy::setTextSize(uint8_t s)
|
void Arduboy::setTextSize(uint8_t s)
|
||||||
{
|
{
|
||||||
// textsize must always be 1 or higher
|
// textsize must always be 1 or higher
|
||||||
textsize = max(1,s);
|
textsize = max(1,s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Arduboy::setTextWrap(boolean w)
|
void Arduboy::setTextWrap(boolean w)
|
||||||
|
@ -721,7 +721,7 @@ size_t Arduboy::write(uint8_t c)
|
||||||
cursor_x += textsize*6;
|
cursor_x += textsize*6;
|
||||||
if (wrap && (cursor_x > (WIDTH - textsize*6)))
|
if (wrap && (cursor_x > (WIDTH - textsize*6)))
|
||||||
{
|
{
|
||||||
// calling ourselves recursively for 'newline' is
|
// calling ourselves recursively for 'newline' is
|
||||||
// 12 bytes smaller than doing the same math here
|
// 12 bytes smaller than doing the same math here
|
||||||
write('\n');
|
write('\n');
|
||||||
}
|
}
|
||||||
|
@ -755,4 +755,4 @@ void Arduboy::swap(int16_t& a, int16_t& b)
|
||||||
a = b;
|
a = b;
|
||||||
b = temp;
|
b = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ public:
|
||||||
|
|
||||||
/// Writes a single ASCII character to the screen.
|
/// Writes a single ASCII character to the screen.
|
||||||
virtual size_t write(uint8_t);
|
virtual size_t write(uint8_t);
|
||||||
|
|
||||||
/// Seeds the random number generator with entropy from the temperature, voltage reading, and microseconds since boot.
|
/// Seeds the random number generator with entropy from the temperature, voltage reading, and microseconds since boot.
|
||||||
/**
|
/**
|
||||||
* This method is still most effective when called semi-randomly such
|
* This method is still most effective when called semi-randomly such
|
||||||
|
@ -170,7 +170,7 @@ public:
|
||||||
void setFrameRate(uint8_t rate);
|
void setFrameRate(uint8_t rate);
|
||||||
bool nextFrame();
|
bool nextFrame();
|
||||||
bool everyXFrames(uint8_t frames);
|
bool everyXFrames(uint8_t frames);
|
||||||
|
|
||||||
/// Returns the load on the CPU as a percentage.
|
/// Returns the load on the CPU as a percentage.
|
||||||
/**
|
/**
|
||||||
* This is based on how much of the time your app is spends rendering
|
* This is based on how much of the time your app is spends rendering
|
||||||
|
@ -178,7 +178,7 @@ public:
|
||||||
* really slowly.
|
* really slowly.
|
||||||
*/
|
*/
|
||||||
int cpuLoad();
|
int cpuLoad();
|
||||||
|
|
||||||
uint8_t frameRate;
|
uint8_t frameRate;
|
||||||
uint16_t frameCount;
|
uint16_t frameCount;
|
||||||
uint8_t eachFrameMillis;
|
uint8_t eachFrameMillis;
|
||||||
|
|
Loading…
Reference in New Issue