From 522a43d16e812e10ff69747ee916918b4bd29f2f Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Sun, 5 Sep 2021 23:00:42 +0200 Subject: invariant added as 'inv' --- game/load.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'game/load.cpp') diff --git a/game/load.cpp b/game/load.cpp index 4b58ff0..9f58c7d 100644 --- a/game/load.cpp +++ b/game/load.cpp @@ -32,8 +32,8 @@ std::vector load_abilities () { return abs; } -void load_json (Gst &gst) { - gst.abilities = load_abilities(); +void load_json (Inv &inv) { + inv.abilities = load_abilities(); std::ifstream file_tiles("content/tiles.json"); json j_tiles; file_tiles >> j_tiles; @@ -44,7 +44,7 @@ void load_json (Gst &gst) { tile.defence_bonus = it["defence_bonus"]; tile.range_bonus = it["range_bonus"]; tile.spritebounds = vec2 { it["spritebounds"][0], it["spritebounds"][1] }; - gst.tiles.push_back(tile); + inv.tiles.push_back(tile); } std::ifstream file_ents("content/entities.json"); @@ -86,8 +86,8 @@ void load_json (Gst &gst) { it["class"].get()); for (auto ab : it["abilities"]) { int index = 0; - for (int i=0; i