summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/openvic/Date.cpp (renamed from src/openvic2/Date.cpp)6
-rw-r--r--src/openvic/Date.hpp (renamed from src/openvic2/Date.hpp)2
-rw-r--r--src/openvic/GameAdvancementHook.cpp (renamed from src/openvic2/GameAdvancementHook.cpp)2
-rw-r--r--src/openvic/GameAdvancementHook.hpp (renamed from src/openvic2/GameAdvancementHook.hpp)2
-rw-r--r--src/openvic/GameManager.cpp (renamed from src/openvic2/GameManager.cpp)2
-rw-r--r--src/openvic/GameManager.hpp (renamed from src/openvic2/GameManager.hpp)2
-rw-r--r--src/openvic/Logger.cpp (renamed from src/openvic2/Logger.cpp)2
-rw-r--r--src/openvic/Logger.hpp (renamed from src/openvic2/Logger.hpp)4
-rw-r--r--src/openvic/Types.cpp (renamed from src/openvic2/Types.cpp)4
-rw-r--r--src/openvic/Types.hpp (renamed from src/openvic2/Types.hpp)2
-rw-r--r--src/openvic/economy/Good.cpp (renamed from src/openvic2/economy/Good.cpp)2
-rw-r--r--src/openvic/economy/Good.hpp (renamed from src/openvic2/economy/Good.hpp)2
-rw-r--r--src/openvic/map/Building.cpp (renamed from src/openvic2/map/Building.cpp)2
-rw-r--r--src/openvic/map/Building.hpp (renamed from src/openvic2/map/Building.hpp)2
-rw-r--r--src/openvic/map/Map.cpp (renamed from src/openvic2/map/Map.cpp)2
-rw-r--r--src/openvic/map/Map.hpp (renamed from src/openvic2/map/Map.hpp)2
-rw-r--r--src/openvic/map/Province.cpp (renamed from src/openvic2/map/Province.cpp)2
-rw-r--r--src/openvic/map/Province.hpp (renamed from src/openvic2/map/Province.hpp)2
-rw-r--r--src/openvic/map/Region.cpp (renamed from src/openvic2/map/Region.cpp)2
-rw-r--r--src/openvic/map/Region.hpp (renamed from src/openvic2/map/Region.hpp)2
20 files changed, 24 insertions, 24 deletions
diff --git a/src/openvic2/Date.cpp b/src/openvic/Date.cpp
index ed800d5..003a455 100644
--- a/src/openvic2/Date.cpp
+++ b/src/openvic/Date.cpp
@@ -5,7 +5,7 @@
#include "Logger.hpp"
-using namespace OpenVic2;
+using namespace OpenVic;
Timespan::Timespan(day_t value) : days{value} {}
@@ -57,7 +57,7 @@ Timespan::operator std::string() const {
return std::to_string(days);
}
-std::ostream& OpenVic2::operator<<(std::ostream& out, Timespan timespan) {
+std::ostream& operator<<(std::ostream& out, Timespan timespan) {
return out << static_cast<std::string>(timespan);
}
@@ -128,7 +128,7 @@ Date::operator std::string() const {
return ss.str();
}
-std::ostream& OpenVic2::operator<<(std::ostream& out, Date date) {
+std::ostream& operator<<(std::ostream& out, Date date) {
return out << (int) date.getYear() << '.' << (int) date.getMonth() << '.' << (int) date.getDay();
}
diff --git a/src/openvic2/Date.hpp b/src/openvic/Date.hpp
index b19602b..15b7219 100644
--- a/src/openvic2/Date.hpp
+++ b/src/openvic/Date.hpp
@@ -4,7 +4,7 @@
#include <string>
#include <ostream>
-namespace OpenVic2 {
+namespace OpenVic {
// A relative period between points in time, measured in days
struct Timespan {
using day_t = int64_t;
diff --git a/src/openvic2/GameAdvancementHook.cpp b/src/openvic/GameAdvancementHook.cpp
index d90b7b1..0fcdd03 100644
--- a/src/openvic2/GameAdvancementHook.cpp
+++ b/src/openvic/GameAdvancementHook.cpp
@@ -1,6 +1,6 @@
#include "GameAdvancementHook.hpp"
-using namespace OpenVic2;
+using namespace OpenVic;
const std::vector<std::chrono::milliseconds> GameAdvancementHook::GAME_SPEEDS = {
std::chrono::milliseconds{ 4000 },
diff --git a/src/openvic2/GameAdvancementHook.hpp b/src/openvic/GameAdvancementHook.hpp
index 07f8414..5d904bc 100644
--- a/src/openvic2/GameAdvancementHook.hpp
+++ b/src/openvic/GameAdvancementHook.hpp
@@ -4,7 +4,7 @@
#include <functional>
#include <vector>
-namespace OpenVic2 {
+namespace OpenVic {
//Conditionally advances game with provided behaviour
//Class governs game speed and pause state
class GameAdvancementHook {
diff --git a/src/openvic2/GameManager.cpp b/src/openvic/GameManager.cpp
index 349c276..50d7358 100644
--- a/src/openvic2/GameManager.cpp
+++ b/src/openvic/GameManager.cpp
@@ -2,7 +2,7 @@
#include "Logger.hpp"
-using namespace OpenVic2;
+using namespace OpenVic;
GameManager::GameManager(state_updated_func_t state_updated_callback)
: clock{ [this]() { tick(); }, [this]() { update_state(); } }, state_updated{ state_updated_callback } {}
diff --git a/src/openvic2/GameManager.hpp b/src/openvic/GameManager.hpp
index 5e46e58..e1a9e9b 100644
--- a/src/openvic2/GameManager.hpp
+++ b/src/openvic/GameManager.hpp
@@ -4,7 +4,7 @@
#include "map/Map.hpp"
#include "economy/Good.hpp"
-namespace OpenVic2 {
+namespace OpenVic {
struct GameManager {
using state_updated_func_t = std::function<void()>;
diff --git a/src/openvic2/Logger.cpp b/src/openvic/Logger.cpp
index 4d7378e..f93b8f1 100644
--- a/src/openvic2/Logger.cpp
+++ b/src/openvic/Logger.cpp
@@ -2,7 +2,7 @@
#include <iostream>
-using namespace OpenVic2;
+using namespace OpenVic;
Logger::log_func_t Logger::info_func = [](std::string&& str) { std::cout << str; };
Logger::log_func_t Logger::error_func = [](std::string&& str) { std::cerr << str; };
diff --git a/src/openvic2/Logger.hpp b/src/openvic/Logger.hpp
index 624df29..2c603e2 100644
--- a/src/openvic2/Logger.hpp
+++ b/src/openvic/Logger.hpp
@@ -6,7 +6,7 @@
#include <source_location>
#endif
-namespace OpenVic2 {
+namespace OpenVic {
#ifndef __cpp_lib_source_location
#include <string>
@@ -37,7 +37,7 @@ namespace OpenVic2 {
#ifdef __cpp_lib_source_location
using source_location = std::source_location;
#else
- using source_location = OpenVic2::source_location;
+ using source_location = OpenVic::source_location;
#endif
static log_func_t info_func, error_func;
diff --git a/src/openvic2/Types.cpp b/src/openvic/Types.cpp
index 719f5b1..829770b 100644
--- a/src/openvic2/Types.cpp
+++ b/src/openvic/Types.cpp
@@ -4,7 +4,7 @@
#include <sstream>
#include <iomanip>
-using namespace OpenVic2;
+using namespace OpenVic;
HasIdentifier::HasIdentifier(std::string const& new_identifier) : identifier{ new_identifier } {
assert(!identifier.empty());
@@ -20,7 +20,7 @@ HasColour::HasColour(colour_t const new_colour, bool can_be_null) : colour(new_c
colour_t HasColour::get_colour() const { return colour; }
-std::string OpenVic2::HasColour::colour_to_hex_string(colour_t const colour) {
+std::string HasColour::colour_to_hex_string(colour_t const colour) {
std::ostringstream stream;
stream << std::hex << std::setfill('0') << std::setw(6) << colour;
return stream.str();
diff --git a/src/openvic2/Types.hpp b/src/openvic/Types.hpp
index a16f3bd..c528ac0 100644
--- a/src/openvic2/Types.hpp
+++ b/src/openvic/Types.hpp
@@ -7,7 +7,7 @@
#include "Logger.hpp"
-namespace OpenVic2 {
+namespace OpenVic {
// Represents a 24-bit RGB integer OR a 32-bit ARGB integer
using colour_t = uint32_t;
/* When colour_t is used as an identifier, NULL_COLOUR is disallowed
diff --git a/src/openvic2/economy/Good.cpp b/src/openvic/economy/Good.cpp
index 94cb9e3..b4fa060 100644
--- a/src/openvic2/economy/Good.cpp
+++ b/src/openvic/economy/Good.cpp
@@ -2,7 +2,7 @@
#include <cassert>
-using namespace OpenVic2;
+using namespace OpenVic;
Good::Good(std::string const& new_identifier, std::string const& new_category, colour_t new_colour, price_t new_base_price,
bool new_default_available, bool new_tradeable, bool new_currency, bool new_overseas_maintenance)
diff --git a/src/openvic2/economy/Good.hpp b/src/openvic/economy/Good.hpp
index a34ffa8..75f5a73 100644
--- a/src/openvic2/economy/Good.hpp
+++ b/src/openvic/economy/Good.hpp
@@ -2,7 +2,7 @@
#include "../Types.hpp"
-namespace OpenVic2 {
+namespace OpenVic {
struct GoodManager;
/* ECON-3 , ECON-4 , ECON-5 , ECON-6 , ECON-7 , ECON-8 , ECON-9 , ECON-10, ECON-11, ECON-12, ECON-13, ECON-14,
diff --git a/src/openvic2/map/Building.cpp b/src/openvic/map/Building.cpp
index 4e0b14a..ccd5ad7 100644
--- a/src/openvic2/map/Building.cpp
+++ b/src/openvic/map/Building.cpp
@@ -5,7 +5,7 @@
#include "../Logger.hpp"
#include "Province.hpp"
-using namespace OpenVic2;
+using namespace OpenVic;
Building::Building(BuildingType const& new_type) : HasIdentifier{ new_type.get_identifier() }, type{ new_type } {}
diff --git a/src/openvic2/map/Building.hpp b/src/openvic/map/Building.hpp
index 78d08ae..ca5c196 100644
--- a/src/openvic2/map/Building.hpp
+++ b/src/openvic/map/Building.hpp
@@ -5,7 +5,7 @@
#include "../Types.hpp"
#include "../Date.hpp"
-namespace OpenVic2 {
+namespace OpenVic {
struct Province;
struct BuildingType;
diff --git a/src/openvic2/map/Map.cpp b/src/openvic/map/Map.cpp
index d456a1f..af1ea8a 100644
--- a/src/openvic2/map/Map.cpp
+++ b/src/openvic/map/Map.cpp
@@ -6,7 +6,7 @@
#include "../Logger.hpp"
#include "../economy/Good.hpp"
-using namespace OpenVic2;
+using namespace OpenVic;
Mapmode::Mapmode(index_t new_index, std::string const& new_identifier, colour_func_t new_colour_func)
: HasIdentifier{ new_identifier }, index{ new_index }, colour_func{ new_colour_func } {
diff --git a/src/openvic2/map/Map.hpp b/src/openvic/map/Map.hpp
index dd42076..39c37c0 100644
--- a/src/openvic2/map/Map.hpp
+++ b/src/openvic/map/Map.hpp
@@ -4,7 +4,7 @@
#include "Region.hpp"
-namespace OpenVic2 {
+namespace OpenVic {
struct Mapmode : HasIdentifier {
friend struct Map;
diff --git a/src/openvic2/map/Province.cpp b/src/openvic/map/Province.cpp
index 6c80317..b169021 100644
--- a/src/openvic2/map/Province.cpp
+++ b/src/openvic/map/Province.cpp
@@ -4,7 +4,7 @@
#include <sstream>
#include <iomanip>
-using namespace OpenVic2;
+using namespace OpenVic;
Province::Province(index_t new_index, std::string const& new_identifier, colour_t new_colour) :
HasIdentifier{ new_identifier }, HasColour{ new_colour }, index{ new_index }, buildings{ "buildings" } {
diff --git a/src/openvic2/map/Province.hpp b/src/openvic/map/Province.hpp
index 44d0dee..cc11046 100644
--- a/src/openvic2/map/Province.hpp
+++ b/src/openvic/map/Province.hpp
@@ -2,7 +2,7 @@
#include "Building.hpp"
-namespace OpenVic2 {
+namespace OpenVic {
struct Map;
struct Region;
struct Good;
diff --git a/src/openvic2/map/Region.cpp b/src/openvic/map/Region.cpp
index d6d8dcc..d546ff9 100644
--- a/src/openvic2/map/Region.cpp
+++ b/src/openvic/map/Region.cpp
@@ -2,7 +2,7 @@
#include <cassert>
-using namespace OpenVic2;
+using namespace OpenVic;
size_t ProvinceSet::get_province_count() const {
return provinces.size();
diff --git a/src/openvic2/map/Region.hpp b/src/openvic/map/Region.hpp
index f688254..953a3cc 100644
--- a/src/openvic2/map/Region.hpp
+++ b/src/openvic/map/Region.hpp
@@ -2,7 +2,7 @@
#include "Province.hpp"
-namespace OpenVic2 {
+namespace OpenVic {
struct ProvinceSet {
protected: