Fix nibble
This commit is contained in:
parent
e838d76e72
commit
72ed947273
4 changed files with 11 additions and 8 deletions
|
@ -80,10 +80,12 @@ void LCR_appendDataStr(const char *str)
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
*((volatile uint32_t *) 0x60000900) &= ~(1); // disable watchdog
|
// *((volatile uint32_t *) 0x60000900) &= ~(1); // disable watchdog
|
||||||
|
|
||||||
|
wdt_disable();
|
||||||
|
|
||||||
dac.begin(MCP4725address);
|
dac.begin(MCP4725address);
|
||||||
delay (100);
|
delay(100);
|
||||||
dac.setVoltage(0,false);
|
dac.setVoltage(0,false);
|
||||||
mcp.begin(MCP23017address);
|
mcp.begin(MCP23017address);
|
||||||
delay(100);
|
delay(100);
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
#define LCR_SETTING_RESOLUTION_SUBDIVIDE 2
|
#define LCR_SETTING_RESOLUTION_SUBDIVIDE 2
|
||||||
#define LCR_SETTING_GHOST_MAX_SAMPLES 0
|
#define LCR_SETTING_GHOST_MAX_SAMPLES 0
|
||||||
#define LCR_LOADING_COMMAND wdt_reset();
|
#define LCR_LOADING_COMMAND wdt_reset();
|
||||||
#define S3L_SORT 1
|
#define S3L_SORT 0
|
||||||
#define S3L_Z_BUFFER 0
|
#define S3L_Z_BUFFER 0
|
||||||
#define S3L_MAX_TRIANGES_DRAWN 32
|
#define S3L_MAX_TRIANGLES_DRAWN 32
|
||||||
#define LCR_SETTING_MAP_MAX_BLOCKS 350
|
#define LCR_SETTING_MAP_MAX_BLOCKS 350
|
||||||
#define LCR_SETTING_MAX_MAP_VERTICES 300
|
#define LCR_SETTING_MAX_MAP_VERTICES 300
|
||||||
#define LCR_SETTING_MAX_MAP_TRIANGLES 500
|
#define LCR_SETTING_MAX_MAP_TRIANGLES 500
|
||||||
|
@ -76,6 +76,7 @@ cbf(BTN_B,5)
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
|
wdt_disable();
|
||||||
Nibble.begin();
|
Nibble.begin();
|
||||||
display = Nibble.getDisplay();
|
display = Nibble.getDisplay();
|
||||||
sprite = display->getBaseSprite();
|
sprite = display->getBaseSprite();
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#define LCR_SETTING_RESOLUTION_SUBDIVIDE 2
|
#define LCR_SETTING_RESOLUTION_SUBDIVIDE 2
|
||||||
#define LCR_SETTING_MUSIC 0
|
#define LCR_SETTING_MUSIC 0
|
||||||
#define LCR_SETTING_GHOST_MAX_SAMPLES 0
|
#define LCR_SETTING_GHOST_MAX_SAMPLES 0
|
||||||
#define LCR_SETTING_MAP_MAX_BLOCKS 650
|
#define LCR_SETTING_MAP_MAX_BLOCKS 1024
|
||||||
#define LCR_SETTING_MAX_MAP_VERTICES 1024
|
#define LCR_SETTING_MAX_MAP_VERTICES 1024
|
||||||
#define LCR_SETTING_MAX_MAP_TRIANGLES 1550
|
#define LCR_SETTING_MAX_MAP_TRIANGLES 1550
|
||||||
#define LCR_SETTING_REPLAY_MAX_SIZE 0
|
#define LCR_SETTING_REPLAY_MAX_SIZE 0
|
||||||
|
|
|
@ -267,11 +267,11 @@ void LCR_rendererDrawText(const char *text, int x, int y, uint16_t color,
|
||||||
for (int a = 0; a < 2; ++a)
|
for (int a = 0; a < 2; ++a)
|
||||||
{
|
{
|
||||||
if (c & 0x01)
|
if (c & 0x01)
|
||||||
for (int i = 0; i < size; ++i)
|
for (int i = 0; i <= size; ++i)
|
||||||
_LCR_rendererDrawFontPixel(x + a * size + i,y + b * size,color);
|
_LCR_rendererDrawFontPixel(x + a * size + i,y + b * size,color);
|
||||||
|
|
||||||
if (c & 0x02)
|
if (c & 0x02)
|
||||||
for (int i = 0; i < size; ++i)
|
for (int i = 0; i <= size; ++i)
|
||||||
_LCR_rendererDrawFontPixel(x + b * size,y + a * size + i,color);
|
_LCR_rendererDrawFontPixel(x + b * size,y + a * size + i,color);
|
||||||
|
|
||||||
c >>= 2;
|
c >>= 2;
|
||||||
|
@ -281,7 +281,7 @@ void LCR_rendererDrawText(const char *text, int x, int y, uint16_t color,
|
||||||
for (int a = 0; a < 2; ++a)
|
for (int a = 0; a < 2; ++a)
|
||||||
{
|
{
|
||||||
if (c & 0x01)
|
if (c & 0x01)
|
||||||
for (int i = 0; i < size; ++i)
|
for (int i = 0; i <= size; ++i)
|
||||||
_LCR_rendererDrawFontPixel(x + a * size + i,y + b * size + i,color);
|
_LCR_rendererDrawFontPixel(x + a * size + i,y + b * size + i,color);
|
||||||
|
|
||||||
c >>= 1;
|
c >>= 1;
|
||||||
|
|
Loading…
Reference in a new issue