Began reworking the network code
This commit devides SerialPacket into a series of different structures, all decended from a common base class. Using a union was not a good idea.
This commit is contained in:
@@ -35,11 +35,11 @@
|
||||
|
||||
//std namespace
|
||||
#include <chrono>
|
||||
#include <list>
|
||||
#include <array>
|
||||
#include <utility>
|
||||
|
||||
#define COMBAT_MAX_CHARACTER_COUNT 12
|
||||
#define COMBAT_MAX_ENEMY_COUNT 12
|
||||
#define COMBAT_MAX_CHARACTERS 12
|
||||
#define COMBAT_MAX_ENEMIES 12
|
||||
|
||||
struct CombatData {
|
||||
enum class Terrain {
|
||||
@@ -50,9 +50,8 @@ struct CombatData {
|
||||
|
||||
typedef std::chrono::steady_clock Clock;
|
||||
|
||||
//combatants, point to the std::map's internal pairs
|
||||
std::list<std::pair<const int, CharacterData>*> characterList;
|
||||
std::list<std::pair<const int, EnemyData>*> enemyList;
|
||||
std::array<CharacterData, COMBAT_MAX_CHARACTERS> characterArray;
|
||||
std::array<EnemyData, COMBAT_MAX_ENEMIES> enemyArray;
|
||||
|
||||
//world interaction
|
||||
int mapIndex = 0;
|
||||
|
||||
Reference in New Issue
Block a user