-
Notifications
You must be signed in to change notification settings - Fork 0
/
levels.h
37 lines (28 loc) · 3.21 KB
/
levels.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef LEVELS_H_
#define LEVELS_H_
#include "GrLib/grlib/grlib.h"
typedef struct level {
const Graphics_Rectangle* blocks;
const int32_t* colors;
const char* bindings;
int numBlocks;
} Level;
const Graphics_Rectangle LEVEL_0_BLOCKS[30] = {{1, 1, 20, 8}, {22, 1, 42, 8}, {44, 1, 64, 8}, {66, 1, 86, 8}, {88, 1, 108, 8}, {110, 1, 127, 8}, {1, 10, 20, 18}, {22, 10, 42, 18}, {44, 10, 64, 18}, {66, 10, 86, 18}, {88, 10, 108, 18}, {110, 10, 127, 18}, {1, 20, 20, 28}, {22, 20, 42, 28}, {44, 20, 64, 28}, {66, 20, 86, 28}, {88, 20, 108, 28}, {110, 20, 127, 28}, {1, 30, 20, 38}, {22, 30, 42, 38}, {44, 30, 64, 38}, {66, 30, 86, 38}, {88, 30, 108, 38}, {110, 30, 127, 38}, {1, 40, 20, 48}, {22, 40, 42, 48}, {44, 40, 64, 48}, {66, 40, 86, 48}, {88, 40, 108, 48}, {110, 40, 127, 48}};
const int32_t LEVEL_0_COLORS[30] = {0xFF00, 0xFF, 0xFF0000, 0xFF00FF};
const char LEVEL_0_BINDINGS[30] = {0, 1, 2, 0, 1, 3, 2, 0, 1, 3, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 3, 2, 0, 1, 3};
const Graphics_Rectangle LEVEL_1_BLOCKS[30] = {{0, 8, 16, 16}, {8, 16, 24, 24}, {16, 24, 32, 32}, {24, 32, 40, 40}, {32, 40, 48, 48}, {40, 48, 56, 56}, {48, 56, 64, 64}, {56, 48, 72, 56}, {64, 40, 80, 48}, {72, 32, 88, 40}, {80, 24, 96, 32}, {88, 16, 104, 24}, {96, 8, 112, 16}, {88, 0, 104, 8}, {72, 0, 88, 8}, {56, 0, 72, 8}, {40, 0, 56, 8}, {24, 0, 40, 8}, {8, 0, 24, 8}, {48, 40, 64, 48}, {64, 24, 80, 32}, {80, 8, 96, 16}, {32, 24, 48, 32}, {16, 8, 32, 16}, {48, 24, 64, 32}, {64, 8, 80, 16}, {32, 8, 48, 16}, {48, 8, 64, 16}, {64, 56, 80, 64}, {32, 56, 48, 64}};
const int32_t LEVEL_1_COLORS[30] = {0x2196F3, 0x4A0904, 0xEBD300, 0xEEF3BC, 0x306D32};
const char LEVEL_1_BINDINGS[30] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4, 4};
const Graphics_Rectangle LEVEL_2_BLOCKS[30] = {{37, 28, 57, 36}, {84, 26, 104, 34}, {54, 54, 63, 61}, {73, 54, 85, 61}, {7, 72, 36, 80}, {21, 82, 58, 91}, {90, 70, 122, 80}, {63, 82, 106, 91}, {42, 93, 81, 102}, {42, 37, 52, 49}, {88, 36, 101, 49}};
const int32_t LEVEL_2_COLORS[30] = {0x2196F3, 0x2196F3, 0xFFFFFF};
const char LEVEL_2_BINDINGS[30] = {0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2};
const Graphics_Rectangle LEVEL_3_BLOCKS[30] = {{0, 0, 16, 8}, {0, 8, 16, 16}, {0, 16, 16, 24}, {16, 8, 32, 16}, {48, 24, 64, 32}, {64, 32, 80, 40}, {80, 40, 96, 48}, {96, 48, 112, 56}, {112, 0, 128, 8}, {112, 8, 128, 16}, {112, 16, 128, 24}, {112, 24, 128, 32}, {112, 32, 128, 40}, {112, 48, 128, 56}, {112, 40, 128, 48}, {112, 56, 128, 64}, {0, 24, 16, 32}, {0, 32, 16, 40}, {0, 40, 16, 48}, {0, 48, 16, 56}, {0, 56, 16, 64}, {96, 56, 112, 64}, {64, 40, 80, 48}, {32, 24, 48, 32}, {16, 0, 32, 8}, {32, 16, 48, 24}, {48, 16, 64, 24}, {80, 32, 96, 40}, {16, 32, 64, 56}, {64, 8, 112, 32}};
const int32_t LEVEL_3_COLORS[30] = {0x2196F3, 0x2196F3, 0xD1BC00, 0xAB2BC1, 0xB31148, 0x306D32};
const char LEVEL_3_BINDINGS[30] = {0, 1, 0, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 2, 3, 3, 4, 5};
const Level LEVELS[4] = {
{LEVEL_0_BLOCKS, LEVEL_0_COLORS, LEVEL_0_BINDINGS, 30},
{LEVEL_1_BLOCKS, LEVEL_1_COLORS, LEVEL_1_BINDINGS, 30},
{LEVEL_2_BLOCKS, LEVEL_2_COLORS, LEVEL_2_BINDINGS, 11},
{LEVEL_3_BLOCKS, LEVEL_3_COLORS, LEVEL_3_BINDINGS, 30}};
#define NUM_LEVELS 4
#endif /* LEVELS_H_ */