-
Notifications
You must be signed in to change notification settings - Fork 0
/
patterns.c
30 lines (25 loc) · 1.28 KB
/
patterns.c
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
#include "patterns.h"
void load_background_pattern(const pattern_t pattern, const uint8_t pmba) {
uint8_t i;
for (i = 0; i < 16; i++) PMB[pmba][i] = pattern[i];
}
void load_foreground_pattern(const pattern_t pattern, const uint8_t pmfa) {
uint8_t i;
for (i = 0; i < 16; i++) PMF[pmfa][i] = pattern[i];
}
void load_patterns(void) {
load_foreground_pattern(white_pattern, white_pattern_pmfa);
load_foreground_pattern(white_small_pattern, white_small_pattern_pmfa);
load_foreground_pattern(bird_pattern, bird_pattern_pmfa);
load_foreground_pattern(bird_dead_pattern, bird_dead_pattern_pmfa);
load_foreground_pattern(bird_squish_pattern, bird_squish_pattern_pmfa);
load_foreground_pattern(pipe_top_pattern, pipe_top_pattern_pmfa);
load_foreground_pattern(pipe_body_pattern, pipe_body_pattern_pmfa);
load_background_pattern(white_pattern, white_pattern_pmba);
load_background_pattern(black_pattern, black_pattern_pmba);
load_background_pattern(ground0_pattern, ground0_pattern_pmba);
load_background_pattern(ground1_pattern, ground1_pattern_pmba);
load_background_pattern(ground2_pattern, ground2_pattern_pmba);
load_background_pattern(ground3_pattern, ground3_pattern_pmba);
load_background_pattern(ground4_pattern, ground4_pattern_pmba);
}