Make the DinkyECS test fully isolated.
This commit is contained in:
parent
f8dd5d816f
commit
02a385e707
1 changed files with 5 additions and 12 deletions
|
@ -2,12 +2,16 @@
|
||||||
#include "dinkyecs.hpp"
|
#include "dinkyecs.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fmt/core.h>
|
#include <fmt/core.h>
|
||||||
#include "point.hpp"
|
|
||||||
|
|
||||||
using namespace fmt;
|
using namespace fmt;
|
||||||
using DinkyECS::Entity;
|
using DinkyECS::Entity;
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
|
struct Point {
|
||||||
|
size_t x;
|
||||||
|
size_t y;
|
||||||
|
};
|
||||||
|
|
||||||
struct Player {
|
struct Player {
|
||||||
string name;
|
string name;
|
||||||
Entity eid;
|
Entity eid;
|
||||||
|
@ -17,35 +21,24 @@ struct Position {
|
||||||
Point location;
|
Point location;
|
||||||
};
|
};
|
||||||
|
|
||||||
// DINKY_HAS_COMPONENT(Point, x, y);
|
|
||||||
// DINKY_HAS_COMPONENT(Position, location);
|
|
||||||
|
|
||||||
struct Motion {
|
struct Motion {
|
||||||
int dx;
|
int dx;
|
||||||
int dy;
|
int dy;
|
||||||
bool random=false;
|
bool random=false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// DINKY_HAS_COMPONENT(Motion, dx, dy, random);
|
|
||||||
|
|
||||||
struct Velocity {
|
struct Velocity {
|
||||||
double x, y;
|
double x, y;
|
||||||
};
|
};
|
||||||
|
|
||||||
// DINKY_HAS_COMPONENT(Velocity, x, y);
|
|
||||||
|
|
||||||
struct Gravity {
|
struct Gravity {
|
||||||
double level;
|
double level;
|
||||||
};
|
};
|
||||||
|
|
||||||
// DINKY_HAS_COMPONENT(Gravity, level);
|
|
||||||
|
|
||||||
struct DaGUI {
|
struct DaGUI {
|
||||||
int event;
|
int event;
|
||||||
};
|
};
|
||||||
|
|
||||||
// DINKY_HAS_COMPONENT(DaGUI, event);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Using a function catches instances where I'm not copying
|
* Using a function catches instances where I'm not copying
|
||||||
* the data into the world.
|
* the data into the world.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue