some additional functions

This commit is contained in:
ProgramSnail 2021-03-22 19:37:34 +03:00
parent 8553878b4a
commit 5173f4f2a9
23 changed files with 214 additions and 24 deletions

View file

@ -0,0 +1,9 @@
#pragma ONCE
namespace map {
class Action {
private:
public:
void update();
};
}

View file

@ -0,0 +1 @@
// include all actions from folder

View file

@ -0,0 +1 @@
#include "cell.hpp"

View file

@ -0,0 +1,24 @@
#pragma ONCE
namespace map {
enum CellType { // needed to choose final types
ctNone,
ctUnit,
ctWeapon,
ctForest,
ctMoutain
};
enum CellPlayer {
cpNone,
cpPlayer0,
cpPlayer1,
cpPlayer2,
cpPlayer3
};
struct Cell {
CellType type;
// int ??speed??; // speed when move inside
};
}

View file

@ -0,0 +1,5 @@
#include "unit_obj.hpp"
namespace map {
}

View file

@ -0,0 +1,29 @@
#include <utility>
#include <cstdint>
#include "cell.hpp"
#include "../unit/unit.hpp"
#pragma ONCE
namespace map {
class UnitObj {
private:
Unit* unit;
std::pair<int32_t, int32_t> pos;
std::pair<int32_t, int32_t> size;
CellType cellType;
public:
UnitObj(Unit* unit) : unit(unit) {
}
void updateValues() {
// from unit size, pos
}
void updatePosition() {
// from unit position
}
void updateAll() {
}
};
}