X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=events.h;h=df5fcb6a9b8c8b08871f2d76ef7804a5501652f7;hb=bfeb7552a144d5a1048ad20d3246f7c7dce4b05c;hp=6dc2faf2f069e3d0d8c8c35e0cdf54a8c7113e90;hpb=54bd286ed213509da23c43d0c80f731dd1bb7a18;p=pkanalytics diff --git a/events.h b/events.h index 6dc2faf..df5fcb6 100644 --- a/events.h +++ b/events.h @@ -27,7 +27,9 @@ public: unsigned insert_event(uint64_t t, std::optional player_id, std::optional formation_id, const std::string &type = "unknown"); // Returns the row. void delete_event(unsigned row); + std::string get_event_type(unsigned row) { return events[row].type; } void set_event_type(unsigned row, const std::string &type); + void set_event_formation(unsigned row, int formation_id); uint64_t get_time(unsigned row) { return events[row].t; } unsigned get_last_event_pos(uint64_t t) const; // Last event that happened at or before t. QModelIndex get_last_event_qt(uint64_t t) const { @@ -38,6 +40,7 @@ public: struct Status { unsigned our_score, their_score; enum { NOT_STARTED, OFFENSE, DEFENSE } attack_state; + unsigned offensive_formation, defensive_formation; bool stoppage; enum { NOT_PULLING, SHOULD_PULL, PULL_IN_AIR } pull_state; unsigned num_passes;