6 #include "sc2_proto_interface.h" 35 #define SET_ENTRY_BASE(STRUCTNAME, ENTRYNAME) \ 37 ScoreEntry new_entry; \ 38 new_entry.offset += (int)int64_t(&(((STRUCTNAME*)0)->ENTRYNAME)); \ 39 new_entry.name += #STRUCTNAME"."#ENTRYNAME; \ 40 entries.push_back(new_entry); \ 43 #define SET_ENTRY_BASE_STRUCT(STRUCTNAME, ENTRYNAME) \ 45 ScoreEntry base_entry; \ 46 base_entry.offset += (int)int64_t(&(((STRUCTNAME*)0)->ENTRYNAME)); \ 47 base_entry.name += #STRUCTNAME"."#ENTRYNAME; \ 48 ((STRUCTNAME*)0)->ENTRYNAME.AddEntries(base_entry, entries); \ 51 #define SET_ENTRY(STRUCTNAME, ENTRYNAME) \ 53 ScoreEntry new_entry = base; \ 54 new_entry.offset += (int)int64_t(&(((STRUCTNAME*)0)->ENTRYNAME)); \ 55 new_entry.name += "."#ENTRYNAME; \ 56 entries.push_back(new_entry); \ 59 #define SET_ENTRY_STRUCT(STRUCTNAME, ENTRYNAME) \ 61 ScoreEntry new_entry = base; \ 62 new_entry.offset += (int)int64_t(&(((STRUCTNAME*)0)->ENTRYNAME)); \ 63 new_entry.name += "."#ENTRYNAME; \ 64 ((STRUCTNAME*)0)->ENTRYNAME.AddEntries(new_entry, entries); \ 77 static void AddEntries(
ScoreEntry base, std::vector<ScoreEntry>& entries) {
94 static void AddEntries(
ScoreEntry base, std::vector<ScoreEntry>& entries) {
103 float idle_production_time;
104 float idle_worker_time;
106 float total_value_units;
107 float total_value_structures;
111 float killed_value_units;
112 float killed_value_structures;
114 float collected_minerals;
115 float collected_vespene;
117 float collection_rate_minerals;
118 float collection_rate_vespene;
120 float spent_minerals;
146 static void AddEntries(
ScoreEntry base, std::vector<ScoreEntry>& entries) {
185 static const int float_count_ =
sizeof(
ScoreDetails) /
sizeof(
float) + 1;
186 const float* RawFloats()
const {
return &score; }
190 static void AddEntries(std::vector<ScoreEntry>& entries) {
191 SET_ENTRY_BASE(
Score, score)
192 SET_ENTRY_BASE_STRUCT(
Score, score_details)
195 bool IsEqual(
const Score& other_score)
const;
Score for vitals.
Definition: sc2_score.h:87
Scores.
Definition: sc2_score.h:179
Definition: sc2_score.h:22
Definition: sc2_action.h:9
Detailed scores.
Definition: sc2_score.h:102
ScoreType
Source of a score.
Definition: sc2_score.h:15
Types used in setting up a game.
Score by category.
Definition: sc2_score.h:68