Open source Star Ruler 2 source code!

This commit is contained in:
Lucas de Vries
2018-07-17 14:15:37 +02:00
commit cc307720ff
4342 changed files with 2365070 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#pragma once
#include <string>
struct StatEvent {
std::string name;
StatEvent* next;
unsigned short type;
StatEvent() : type(0), next(0) {}
};
struct StatEntry {
StatEntry* next, *prev;
StatEvent* evt;
unsigned time;
union {
int asInt;
float asFloat;
};
void addEvent(unsigned short type, const std::string& name);
StatEntry() : next(0), prev(0), time(0), evt(0), asInt(0) {}
};
class StatHistory {
StatEntry* head, *tail;
public:
StatHistory();
StatEntry* addStatEntry(unsigned time);
const StatEntry* getHead() const;
StatEntry* getTail() const;
};