SC2API
An API for AI for StarCraft II
Classes | Macros | Enumerations
sc2_score.h File Reference

Scores accumulated in a game as calculated by the game engine. More...

#include "sc2_proto_interface.h"
#include "sc2_gametypes.h"
#include <vector>
#include <string>
#include <stdint.h>

Go to the source code of this file.

Classes

struct  sc2::ScoreEntry
 
struct  sc2::CategoryScoreDetails
 Score by category. More...
 
struct  sc2::VitalScoreDetails
 Score for vitals. More...
 
struct  sc2::ScoreDetails
 Detailed scores. More...
 
struct  sc2::Score
 Scores. More...
 

Macros

#define SET_ENTRY_BASE(STRUCTNAME, ENTRYNAME)
 
#define SET_ENTRY_BASE_STRUCT(STRUCTNAME, ENTRYNAME)
 
#define SET_ENTRY(STRUCTNAME, ENTRYNAME)
 
#define SET_ENTRY_STRUCT(STRUCTNAME, ENTRYNAME)
 

Enumerations

enum  sc2::ScoreType { sc2::ScoreType::Curriculum = 1, sc2::ScoreType::Melee = 2 }
 Source of a score.
 

Detailed Description

Scores accumulated in a game as calculated by the game engine.

Macro Definition Documentation

#define SET_ENTRY (   STRUCTNAME,
  ENTRYNAME 
)
Value:
{ \
ScoreEntry new_entry = base; \
new_entry.offset += (int)int64_t(&(((STRUCTNAME*)0)->ENTRYNAME)); \
new_entry.name += "."#ENTRYNAME; \
entries.push_back(new_entry); \
}
#define SET_ENTRY_BASE (   STRUCTNAME,
  ENTRYNAME 
)
Value:
{ \
ScoreEntry new_entry; \
new_entry.offset += (int)int64_t(&(((STRUCTNAME*)0)->ENTRYNAME)); \
new_entry.name += #STRUCTNAME"."#ENTRYNAME; \
entries.push_back(new_entry); \
}
#define SET_ENTRY_BASE_STRUCT (   STRUCTNAME,
  ENTRYNAME 
)
Value:
{ \
ScoreEntry base_entry; \
base_entry.offset += (int)int64_t(&(((STRUCTNAME*)0)->ENTRYNAME)); \
base_entry.name += #STRUCTNAME"."#ENTRYNAME; \
((STRUCTNAME*)0)->ENTRYNAME.AddEntries(base_entry, entries); \
}
#define SET_ENTRY_STRUCT (   STRUCTNAME,
  ENTRYNAME 
)
Value:
{ \
ScoreEntry new_entry = base; \
new_entry.offset += (int)int64_t(&(((STRUCTNAME*)0)->ENTRYNAME)); \
new_entry.name += "."#ENTRYNAME; \
((STRUCTNAME*)0)->ENTRYNAME.AddEntries(new_entry, entries); \
}