fixed bugs related to borg widths which are not a multiple of 8
This commit is contained in:
parent
763cc08c28
commit
448afbbea5
|
@ -448,7 +448,7 @@ static unsigned char fixAnimPlasma(unsigned char const x,
|
||||||
fixp_t const t,
|
fixp_t const t,
|
||||||
void *const r)
|
void *const r)
|
||||||
{
|
{
|
||||||
assert(x < NUM_COLS);
|
assert(x < (LINEBYTES * 8));
|
||||||
assert(y < NUM_ROWS);
|
assert(y < NUM_ROWS);
|
||||||
|
|
||||||
// scaling factor
|
// scaling factor
|
||||||
|
@ -524,7 +524,7 @@ static unsigned char fixAnimPsychedelic(unsigned char const x,
|
||||||
fixp_t const t,
|
fixp_t const t,
|
||||||
void *const r)
|
void *const r)
|
||||||
{
|
{
|
||||||
assert(x < NUM_COLS);
|
assert(x < (LINEBYTES * 8));
|
||||||
assert(y < NUM_ROWS);
|
assert(y < NUM_ROWS);
|
||||||
fixp_psychedelic_t *p = (fixp_psychedelic_t *)r;
|
fixp_psychedelic_t *p = (fixp_psychedelic_t *)r;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "trackball.h"
|
#include "trackball.h"
|
||||||
|
|
||||||
/** Number of bytes per row. */
|
/** Number of bytes per row. */
|
||||||
#define LINEBYTES ((NUM_COLS + 1) / 8)
|
#define LINEBYTES (((NUM_COLS - 1) / 8) + 1)
|
||||||
|
|
||||||
/** Fake port for simulating joystick input. */
|
/** Fake port for simulating joystick input. */
|
||||||
volatile unsigned char fakeport;
|
volatile unsigned char fakeport;
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include "../display_loop.h"
|
#include "../display_loop.h"
|
||||||
|
|
||||||
/** Number of bytes per row. */
|
/** Number of bytes per row. */
|
||||||
#define LINEBYTES ((NUM_COLS + 1) / 8)
|
#define LINEBYTES (((NUM_COLS - 1) / 8) + 1)
|
||||||
|
|
||||||
/** The width (in pixels) of the margin around a LED. */
|
/** The width (in pixels) of the margin around a LED. */
|
||||||
#define LED_MARGIN 1
|
#define LED_MARGIN 1
|
||||||
|
|
Loading…
Reference in New Issue