X10 simu upright and working
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include <inttypes.h>
|
||||
#include "colors.h"
|
||||
|
||||
#if defined(PCBX10)
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
#define MOVE_PIXEL_RIGHT(p, count) p -= count
|
||||
#else
|
||||
#define MOVE_PIXEL_RIGHT(p, count) p += count
|
||||
@@ -86,7 +86,7 @@ class BitmapBufferBase
|
||||
|
||||
inline const display_t * getPixelPtr(coord_t x, coord_t y) const
|
||||
{
|
||||
#if defined(PCBX10)
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
x = width - x - 1;
|
||||
y = height - y - 1;
|
||||
#endif
|
||||
@@ -165,7 +165,7 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
|
||||
|
||||
inline const display_t * getPixelPtr(coord_t x, coord_t y) const
|
||||
{
|
||||
#if defined(PCBX10)
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
x = width - x - 1;
|
||||
y = height - y - 1;
|
||||
#endif
|
||||
@@ -174,7 +174,7 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
|
||||
|
||||
inline display_t * getPixelPtr(coord_t x, coord_t y)
|
||||
{
|
||||
#if defined(PCBX10)
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
x = width - x - 1;
|
||||
y = height - y - 1;
|
||||
#endif
|
||||
|
||||
@@ -414,7 +414,7 @@ BitmapBuffer * lcd = &_lcd;
|
||||
|
||||
void DMAFillRect(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color)
|
||||
{
|
||||
#if defined(PCBX10)
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
x = destw - (x + w);
|
||||
y = desth - (y + h);
|
||||
#endif
|
||||
@@ -428,7 +428,7 @@ void DMAFillRect(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, ui
|
||||
|
||||
void DMACopyBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h)
|
||||
{
|
||||
#if defined(PCBX10)
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
x = destw - (x + w);
|
||||
y = desth - (y + h);
|
||||
srcx = srcw - (srcx + w);
|
||||
@@ -442,7 +442,7 @@ void DMACopyBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x,
|
||||
|
||||
void DMACopyAlphaBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h)
|
||||
{
|
||||
#if defined(PCBX10)
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
x = destw - (x + w);
|
||||
y = desth - (y + h);
|
||||
srcx = srcw - (srcx + w);
|
||||
|
||||
Reference in New Issue
Block a user