mirror of
https://github.com/thepigeongenerator/breakout_clone.git
synced 2025-12-16 22:05:45 +01:00
Make colour initialisation on the integer
This commit is contained in:
12
src/colour.h
12
src/colour.h
@@ -1,9 +1,9 @@
|
||||
typedef union {
|
||||
struct {
|
||||
unsigned char r;
|
||||
unsigned char g;
|
||||
unsigned char b;
|
||||
unsigned char a;
|
||||
};
|
||||
unsigned packed;
|
||||
struct {
|
||||
unsigned char a;
|
||||
unsigned char b;
|
||||
unsigned char g;
|
||||
unsigned char r;
|
||||
};
|
||||
} Colour;
|
||||
|
||||
10
src/level.c
10
src/level.c
@@ -24,11 +24,11 @@ void level_init(Level* level) {
|
||||
// initialize bricks
|
||||
// define the colours of the brick rows
|
||||
const Colour colours[BRICK_COLUMNS] = {
|
||||
{0x5B, 0xCE, 0xFA, 0xFF},
|
||||
{0xF5, 0xA9, 0xB8, 0xFF},
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{0xF5, 0xA9, 0xB8, 0xFF},
|
||||
{0x5B, 0xCE, 0xFA, 0xFF}
|
||||
{0x3DA542FF},
|
||||
{0xA6D378FF},
|
||||
{0xFFFFFFFF},
|
||||
{0xA8A8A8FF},
|
||||
{0x202020FF}
|
||||
};
|
||||
|
||||
int brick_width = BRICK_WIDTH + BRICK_PADDING;
|
||||
|
||||
Reference in New Issue
Block a user