2018-11-03 08:58:25 -07:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-03-25 14:11:08 -07:00
|
|
|
#include <vector>
|
2020-01-29 11:27:43 -08:00
|
|
|
#include "core/String.h"
|
2018-11-03 08:58:25 -07:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <glm/vec2.hpp>
|
|
|
|
#include <glm/vec3.hpp>
|
|
|
|
#include <glm/vec4.hpp>
|
|
|
|
|
|
|
|
namespace traze {
|
|
|
|
|
|
|
|
struct GameInfo {
|
2020-01-29 11:36:55 -08:00
|
|
|
core::String name;
|
2018-11-03 08:58:25 -07:00
|
|
|
int activePlayers;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class BikeDirection {
|
|
|
|
N, S, W, E
|
|
|
|
};
|
|
|
|
|
2018-11-20 00:50:55 -08:00
|
|
|
using PlayerId = uint32_t;
|
|
|
|
|
2020-01-29 23:47:07 -08:00
|
|
|
using Score = std::vector<core::String>;
|
2019-03-25 14:11:08 -07:00
|
|
|
|
2018-11-20 11:02:59 -08:00
|
|
|
struct Spawn {
|
|
|
|
glm::ivec2 position;
|
|
|
|
bool own;
|
|
|
|
};
|
|
|
|
|
2018-11-03 08:58:25 -07:00
|
|
|
struct Bike {
|
2018-11-20 00:50:55 -08:00
|
|
|
PlayerId playerId;
|
2018-11-03 08:58:25 -07:00
|
|
|
glm::ivec2 currentLocation;
|
|
|
|
BikeDirection direction;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Player {
|
2020-01-29 11:36:55 -08:00
|
|
|
core::String name;
|
2018-11-20 00:50:55 -08:00
|
|
|
PlayerId id = 0u;
|
|
|
|
uint32_t frags = 0u;
|
2019-03-25 14:07:29 -07:00
|
|
|
uint32_t owned = 0u;
|
2018-11-20 00:50:55 -08:00
|
|
|
uint8_t colorIndex = 0u;
|
|
|
|
glm::vec4 color {0.0f};
|
2018-11-03 08:58:25 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
enum class TickerType {
|
2018-12-14 10:48:58 -08:00
|
|
|
Frag, Suicide, Collision, Unknown
|
2018-11-03 08:58:25 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Ticker {
|
|
|
|
TickerType type = TickerType::Unknown;
|
|
|
|
int casualty;
|
2018-11-20 00:50:55 -08:00
|
|
|
PlayerId fragger;
|
2018-11-03 08:58:25 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|