-
Notifications
You must be signed in to change notification settings - Fork 0
/
level.h
58 lines (46 loc) · 1.13 KB
/
level.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* level.h
*
* Author: Michael Bossner
*/
#ifndef LEVEL_H_
#define LEVEL_H_
#include <stdint.h>
#include "pixel_colour.h"
// Macros for the get_row_speed() indexing
#define FIRST_VEHICLE_ROW_SPEED 0
#define SECOND_VEHICLE_ROW_SPEED 1
#define THIRD_VEHICLE_ROW_SPEED 2
#define FIRST_RIVER_ROW_SPEED 3
#define SECOND_RIVER_ROW_SPEED 4
#define RIVERBANK_ROW_SPEED 7
/*
* Initialises the game ready for use with levels.
* Must be called first for levels to function properly.
*/
void init_level(void);
/*
* Adds one to the level and updates the level number on the terminal.
*/
void level_updater(void);
/*
* Returns the current level.
*/
uint8_t get_level(void);
/*
* Returns the lane data for the requested lane.
*/
uint64_t get_lane_data(uint8_t lane);
/*
* Returns the log data for the requested channel
*/
uint32_t get_log_data(uint8_t channel);
/*
* Returns the colour for the vehicles in the requested lane
*/
PixelColour get_lane_colours(uint8_t lane);
/*
* Returns the speed at which the requested row will shift at
*/
uint16_t get_row_speed(uint8_t row);
#endif