MCPcopy Create free account
hub / github.com/Blizzard/s2client-api / OnStep

Method OnStep

examples/feature_layers.cc:40–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 }
39
40 virtual void OnStep() final {
41 const SC2APIProtocol::Observation* observation = Observation()->GetRawObservation();
42
43 const SC2APIProtocol::FeatureLayers& m = observation->feature_layer_data().renders();
44 DrawFeatureLayerUnits8BPP(m.unit_density(), 0, 0);
45 DrawFeatureLayer1BPP(m.selected(), kDrawSize, 0);
46
47 const SC2APIProtocol::FeatureLayersMinimap& mi = observation->feature_layer_data().minimap_renders();
48 DrawFeatureLayerHeightMap8BPP(mi.height_map(), 0, kDrawSize);
49 DrawFeatureLayer1BPP(mi.camera(), kDrawSize, kDrawSize);
50
51 sc2::renderer::Render();
52 }
53
54 virtual void OnGameEnd() final {
55 sc2::renderer::Shutdown();

Callers

nothing calls this directly

Calls 6

ObservationClass · 0.85
DrawFeatureLayer1BPPFunction · 0.85
RenderFunction · 0.85
GetRawObservationMethod · 0.80

Tested by

no test coverage detected