cleanup while on the train

This commit is contained in:
Sarah Faey 2025-05-06 20:16:25 +02:00
parent d5da82f287
commit 794fa5bba0
5 changed files with 28 additions and 18 deletions

21
src/World/Terrain.h Normal file
View file

@ -0,0 +1,21 @@
#ifndef TERRAIN_H
#define TERRAIN_H
#include <cstdint>
#include "../Actors"
class Terrain
{
public:
bool collides(const Actor & actor, const Level & level, uint16_t tilePositionX, uint16_t tilePositionY);
private:
uint8_t m_type; //0 if it depends on neighboring tiles (diagonals)
uint16_t m_object; //Id of object on the tile, tree, collectable,...
};
#endif

View file

@ -1,4 +1,4 @@
#ifndef TILE_H
#ifndef TILE_H
#define TILE_H
#include <cstdint>

View file

@ -4,6 +4,7 @@
#include <cstdint>
#include <array>
#include <vector>
#include <memory>
#include "Tile.h"
class Map
@ -11,12 +12,12 @@ class Map
public:
private:
int16_t size_x_;
int16_t size_y_;
uint16_t m_height;
uint16_t m_widht;
int8_t* terrain_map_;
Tile* tile_map_;
std::vector<int16_t> static_objects_;
uint8_t* m_terrain_map;
Tile* m_tile_map;
std::vector<int16_t> m_static_objects;
};

View file

@ -1,12 +0,0 @@
#ifndef TERAIN_H
#define TERAIN_H
class Terain
{
public:
private:
};
#endif