From 05314c67655e5030d89e85087fba0a699d8a4ba7 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Fri, 14 Jan 2022 01:19:37 +0100 Subject: background can now be specified in map file --- src/gameplay.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gameplay.cpp') diff --git a/src/gameplay.cpp b/src/gameplay.cpp index 88da5ec..dd395ca 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -54,6 +54,10 @@ Game::Game(std::string const& path) : current(path) { ifs >> tok; nPerWave = std::atoi(tok.c_str()); } + if (tok == "BACKGROUND") { + ifs >> tok; + background = tok; + } } ifs.close(); enemies = new std::vector; @@ -334,3 +338,7 @@ std::string const& Game::getNext() const { std::string const& Game::getCurrent() const { return current; } + +std::string const& Game::getBackground() const { + return background; +} -- cgit v1.2.3