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;
|
||||
|
||||
@@ -30,6 +30,12 @@ struct RoomData {
|
||||
FORESTS,
|
||||
CAVES,
|
||||
};
|
||||
|
||||
/* TODO: more
|
||||
* "multiple rooms system" using this structure
|
||||
* Pager
|
||||
* collision map
|
||||
*/
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,4 @@
|
||||
* Since most/all of the files in this directory are header files, I've created
|
||||
* this source file as a "sanity check", to ensure that the above header files
|
||||
* are written correctly via make.
|
||||
*
|
||||
* Oddly enough, I'm pretty sure this is the first directory compiled in a
|
||||
* clean build.
|
||||
*/
|
||||
Reference in New Issue
Block a user