blob: e7936cf95104c9e5ad149289a11b21f4c702eb38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma once
#include "../../hal/api.hpp"
#include "../../globals.hpp"
#include "bitset"
#define PLATFORM_TILE_SIZE 16
// The original game on TI-84 Plus had 12 tiles per platform
#define PLATFORM_NUM_TILES (DISPLAY_WIDTH/PLATFORM_TILE_SIZE)
class Platform {
private:
int m_position_y;
int m_speed;
// Bitset where solid tiles have a size of
std::bitset<PLATFORM_NUM_TILES> m_tiles_solid;
void create_tiles();
public:
Platform();
Platform(int y = DISPLAY_HEIGHT-1, int speed = 1);
void update();
void draw(Api *app_api);
};
|