From 449085f880bbe83613cd1d27cd414e24963cb985 Mon Sep 17 00:00:00 2001 From: Julian Date: Wed, 7 Nov 2018 13:34:54 +0100 Subject: Kinda rotating --- sprites.h | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'sprites.h') diff --git a/sprites.h b/sprites.h index 3b53d47..f53219d 100644 --- a/sprites.h +++ b/sprites.h @@ -5,6 +5,8 @@ struct Sprite { uint8_t buff[8]; uint8_t width; uint8_t height; + uint8_t xOff; + uint8_t yOff; }; const Sprite smiley = { @@ -17,7 +19,7 @@ const Sprite smiley = { 0b11111100, 0b00000000, 0b00000000 - }, 6, 6 + }, 6, 6, 0, 0 }; const Sprite checker = { @@ -30,7 +32,7 @@ const Sprite checker = { 0b01010101, 0b10101010, 0b01010101 - }, 8, 8 + }, 8, 8, 0, 0 }; const Sprite ball = { @@ -43,7 +45,7 @@ const Sprite ball = { 0b00000000, 0b00000000, 0b00000000 - }, 3, 3 + }, 3, 3, 0, 0 }; const Sprite miniSmiley = { @@ -56,21 +58,21 @@ const Sprite miniSmiley = { 0b00000000, 0b00000000, 0b00000000 - }, 4, 3 + }, 4, 3, 0, 0 }; const Sprite iBlock = { { - 0b11110000, 0b00000000, 0b00000000, 0b00000000, + 0b00011110, 0b00000000, 0b00000000, 0b00000000, 0b00000000 - }, 4, 1 + }, 4, 1, 3, 3 }; const Sprite oBlock = { @@ -83,72 +85,72 @@ const Sprite oBlock = { 0b00000000, 0b00000000, 0b00000000 - }, 2, 2 + }, 2, 2, 0, 0 }; const Sprite tBlock = { { - 0b01000000, - 0b11100000, 0b00000000, + 0b00100000, + 0b01110000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 - }, 3, 2 + }, 3, 2, 1, 1 }; const Sprite sBlock = { { - 0b01100000, - 0b11000000, 0b00000000, 0b00000000, + 0b00011000, + 0b00110000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 - }, 3, 2 + }, 3, 2, 2, 2 }; const Sprite zBlock = { { - 0b11000000, - 0b01100000, 0b00000000, + 0b01100000, + 0b00110000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 - }, 3, 2 + }, 3, 2, 1, 1 }; const Sprite jBlock = { { - 0b10000000, - 0b11100000, 0b00000000, 0b00000000, + 0b001000000, + 0b001110000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 - }, 3, 2 + }, 3, 2, 2, 2 }; const Sprite lBlock = { { - 0b00100000, - 0b11100000, 0b00000000, 0b00000000, + 0b00001000, + 0b00111000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 - }, 3, 2 + }, 3, 2, 2, 2 }; const Sprite *blocks[] = { &iBlock, &oBlock, &tBlock, &sBlock, &zBlock, &jBlock, &lBlock }; -- cgit v1.2.3