generated from 32blit/32blit-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Level.hpp
47 lines (38 loc) · 1.1 KB
/
Level.hpp
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
/*
* Level.hpp - part of 32Blox (revised edition!)
*
* Copyright (C) 2020 Pete Favelle <[email protected]>
*
* This file is released under the MIT License; see LICENSE for details
*
* The Level object contains the details of a game level.
*/
#ifndef _LEVEL_HPP_
#define _LEVEL_HPP_
#include "AssetFactory.hpp"
#define MAX_BOARD_HEIGHT 15
#define MAX_BOARD_WIDTH 10
#define LEVEL_MAX 10
class Level
{
private:
uint8_t level;
uint8_t bricks[MAX_BOARD_HEIGHT][MAX_BOARD_WIDTH];
uint8_t width = MAX_BOARD_WIDTH;
uint8_t height = MAX_BOARD_HEIGHT;
uint8_t margin = 0;
void init( const uint8_t *, uint32_t );
public:
Level( uint8_t, target_type_t );
uint8_t get_level( void );
uint8_t get_width( void );
uint8_t get_height( void );
uint8_t get_margin( void );
uint16_t get_brick_count( void );
uint8_t get_brick( uint8_t, uint8_t );
uint8_t get_brick( blit::Point );
uint8_t hit_brick( blit::Point );
float get_ball_speed( void );
};
#endif /* _LEVEL_HPP_ */
/* End of Level.hpp */