From 0966f66799e5b09c745a5d06177a6954683225be Mon Sep 17 00:00:00 2001 From: Joshua Saxby <joshua.a.saxby@gmail.com> Date: Sun, 9 Feb 2020 21:43:56 +0000 Subject: [PATCH] Added FLASH-backed data for rotated sprites --- source/main.cpp | 102 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) diff --git a/source/main.cpp b/source/main.cpp index bbf800b..39d2f35 100755 --- a/source/main.cpp +++ b/source/main.cpp @@ -133,6 +133,36 @@ const uint8_t FLAT_L_NORTH_SPRITE[] __attribute__ ((aligned (4))) = { 0, 0, 0, }; +const uint8_t FLAT_L_EAST_SPRITE[] __attribute__ ((aligned (4))) = { + 0xff, 0xff, // magic number requesting data to be stored in FLASH + 3, 0, // image width followed by zero + 3, 0, // image height followed by zero + // image data follows: + 0, 1, 1, + 0, 1, 0, + 0, 1, 0, +}; + +const uint8_t FLAT_L_SOUTH_SPRITE[] __attribute__ ((aligned (4))) = { + 0xff, 0xff, // magic number requesting data to be stored in FLASH + 3, 0, // image width followed by zero + 3, 0, // image height followed by zero + // image data follows: + 0, 0, 0, + 1, 1, 1, + 0, 0, 1, +}; + +const uint8_t FLAT_L_WEST_SPRITE[] __attribute__ ((aligned (4))) = { + 0xff, 0xff, // magic number requesting data to be stored in FLASH + 3, 0, // image width followed by zero + 3, 0, // image height followed by zero + // image data follows: + 0, 1, 0, + 0, 1, 0, + 1, 1, 0, +}; + const uint8_t TALL_L_NORTH_SPRITE[] __attribute__ ((aligned (4))) = { 0xff, 0xff, // magic number requesting data to be stored in FLASH 3, 0, // image width followed by zero @@ -143,6 +173,36 @@ const uint8_t TALL_L_NORTH_SPRITE[] __attribute__ ((aligned (4))) = { 0, 1, 1, }; +const uint8_t TALL_L_EAST_SPRITE[] __attribute__ ((aligned (4))) = { + 0xff, 0xff, // magic number requesting data to be stored in FLASH + 3, 0, // image width followed by zero + 3, 0, // image height followed by zero + // image data follows: + 0, 0, 0, + 1, 1, 1, + 1, 0, 0, +}; + +const uint8_t TALL_L_SOUTH_SPRITE[] __attribute__ ((aligned (4))) = { + 0xff, 0xff, // magic number requesting data to be stored in FLASH + 3, 0, // image width followed by zero + 3, 0, // image height followed by zero + // image data follows: + 1, 1, 0, + 0, 1, 0, + 0, 1, 0, +}; + +const uint8_t TALL_L_WEST_SPRITE[] __attribute__ ((aligned (4))) = { + 0xff, 0xff, // magic number requesting data to be stored in FLASH + 3, 0, // image width followed by zero + 3, 0, // image height followed by zero + // image data follows: + 0, 0, 1, + 1, 1, 1, + 0, 0, 0, +}; + const uint8_t UPSIDE_DOWN_T_NORTH_SPRITE[] __attribute__ ((aligned (4))) = { 0xff, 0xff, // magic number requesting data to be stored in FLASH 3, 0, // image width followed by zero @@ -153,6 +213,36 @@ const uint8_t UPSIDE_DOWN_T_NORTH_SPRITE[] __attribute__ ((aligned (4))) = { 0, 0, 0, }; +const uint8_t UPSIDE_DOWN_T_EAST_SPRITE[] __attribute__ ((aligned (4))) = { + 0xff, 0xff, // magic number requesting data to be stored in FLASH + 3, 0, // image width followed by zero + 3, 0, // image height followed by zero + // image data follows: + 0, 1, 0, + 0, 1, 1, + 0, 1, 0, +}; + +const uint8_t UPSIDE_DOWN_T_SOUTH_SPRITE[] __attribute__ ((aligned (4))) = { + 0xff, 0xff, // magic number requesting data to be stored in FLASH + 3, 0, // image width followed by zero + 3, 0, // image height followed by zero + // image data follows: + 0, 0, 0, + 1, 1, 1, + 0, 1, 0, +}; + +const uint8_t UPSIDE_DOWN_T_WEST_SPRITE[] __attribute__ ((aligned (4))) = { + 0xff, 0xff, // magic number requesting data to be stored in FLASH + 3, 0, // image width followed by zero + 3, 0, // image height followed by zero + // image data follows: + 0, 1, 0, + 1, 1, 0, + 0, 1, 0, +}; + const uint8_t SQUARE_SPRITE[] __attribute__ ((aligned (4))) = { 0xff, 0xff, // magic number requesting data to be stored in FLASH 2, 0, // image width followed by zero @@ -162,7 +252,7 @@ const uint8_t SQUARE_SPRITE[] __attribute__ ((aligned (4))) = { 1, 1, }; -const uint8_t PIPE_NORTH_SPRITE[] __attribute__ ((aligned (4))) = { +const uint8_t PIPE_HORIZONTAL_SPRITE[] __attribute__ ((aligned (4))) = { 0xff, 0xff, // magic number requesting data to be stored in FLASH 3, 0, // image width followed by zero 3, 0, // image height followed by zero @@ -172,6 +262,16 @@ const uint8_t PIPE_NORTH_SPRITE[] __attribute__ ((aligned (4))) = { 0, 0, 0, }; +const uint8_t PIPE_VERTICAL_SPRITE[] __attribute__ ((aligned (4))) = { + 0xff, 0xff, // magic number requesting data to be stored in FLASH + 3, 0, // image width followed by zero + 3, 0, // image height followed by zero + // image data follows: + 0, 1, 0, + 0, 1, 0, + 0, 1, 0, +}; + /** * @brief Stores the shape and colour information for a Block in the game. */ -- GitLab