summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-19 21:39:21 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-19 21:42:08 +0100
commit517b218b093708ff1a10c3ed2474cf3395564741 (patch)
tree7ecd9155e132d1c5382a92c766877fd6de96853d /src
parent6dc7ae4f49931f721ad072cc72038cada78b147e (diff)
Copyright stuff.
Diffstat (limited to 'src')
-rw-r--r--src/common.hpp17
-rw-r--r--src/game/assets.cpp17
-rw-r--r--src/game/decos.cpp17
-rw-r--r--src/game/effects.cpp17
-rw-r--r--src/game/game.cpp17
-rw-r--r--src/game/game.hpp17
-rw-r--r--src/game/interface.cpp25
-rw-r--r--src/game/text.cpp17
-rw-r--r--src/game/units.cpp17
-rw-r--r--src/game/worldgen.cpp17
-rw-r--r--src/main.cpp17
-rw-r--r--src/math.hpp17
-rw-r--r--src/path_finder.cpp17
-rw-r--r--src/procgen.cpp17
-rw-r--r--src/render.cpp17
-rw-r--r--src/world.cpp17
16 files changed, 279 insertions, 1 deletions
diff --git a/src/common.hpp b/src/common.hpp
index f623f09..f7435ca 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include <iostream>
#include <cinttypes>
#include <cmath>
diff --git a/src/game/assets.cpp b/src/game/assets.cpp
index 241e3d7..03ca7d8 100644
--- a/src/game/assets.cpp
+++ b/src/game/assets.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "game.hpp"
namespace game::assets {
diff --git a/src/game/decos.cpp b/src/game/decos.cpp
index 4b92c8e..ebd8bb8 100644
--- a/src/game/decos.cpp
+++ b/src/game/decos.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "game.hpp"
namespace game {
diff --git a/src/game/effects.cpp b/src/game/effects.cpp
index 844f365..932b562 100644
--- a/src/game/effects.cpp
+++ b/src/game/effects.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "game.hpp"
namespace game {
diff --git a/src/game/game.cpp b/src/game/game.cpp
index 3f64e0c..a6eda99 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "game.hpp"
namespace game {
diff --git a/src/game/game.hpp b/src/game/game.hpp
index e609992..213e8b1 100644
--- a/src/game/game.hpp
+++ b/src/game/game.hpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "../common.hpp"
namespace game {
diff --git a/src/game/interface.cpp b/src/game/interface.cpp
index 0c2125b..5e5dc70 100644
--- a/src/game/interface.cpp
+++ b/src/game/interface.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "game.hpp"
#include <iomanip>
@@ -39,7 +56,13 @@ void state_t::tick(double dt)
view_size.y = view_scale * size.y / size.x;
}
- if (game->selected_units.size() && camera.following) {
+ if (!game->selected_units.size() && camera.following) {
+ camera.center = camera.follow_center;
+ print(text::get(text::FOLLOWING_OFF));
+ camera.following = false;
+ }
+
+ if (camera.following) {
for (entity_t *ent : game->selected_units)
follow_center += ent->render_bounds.center();
follow_center /= game->selected_units.size();
diff --git a/src/game/text.cpp b/src/game/text.cpp
index 7addbfa..6f684f0 100644
--- a/src/game/text.cpp
+++ b/src/game/text.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "game.hpp"
namespace game::text {
diff --git a/src/game/units.cpp b/src/game/units.cpp
index 214861b..308687d 100644
--- a/src/game/units.cpp
+++ b/src/game/units.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "game.hpp"
namespace game {
diff --git a/src/game/worldgen.cpp b/src/game/worldgen.cpp
index 8a6addf..61ceea3 100644
--- a/src/game/worldgen.cpp
+++ b/src/game/worldgen.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "game.hpp"
namespace game {
diff --git a/src/main.cpp b/src/main.cpp
index 37c75af..f45fb24 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "common.hpp"
#include <ctime>
diff --git a/src/math.hpp b/src/math.hpp
index e393015..e0b8f1b 100644
--- a/src/math.hpp
+++ b/src/math.hpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
template <typename T, size_t N>
class vec_t {
template<size_t index, typename... U>
diff --git a/src/path_finder.cpp b/src/path_finder.cpp
index 30e9ebd..8a61cc6 100644
--- a/src/path_finder.cpp
+++ b/src/path_finder.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "common.hpp"
namespace world {
diff --git a/src/procgen.cpp b/src/procgen.cpp
index 5fab153..440056a 100644
--- a/src/procgen.cpp
+++ b/src/procgen.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "common.hpp"
#include <cmath>
diff --git a/src/render.cpp b/src/render.cpp
index a640ecc..8ad0e25 100644
--- a/src/render.cpp
+++ b/src/render.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "common.hpp"
#include <iomanip>
diff --git a/src/world.cpp b/src/world.cpp
index 6a0ba97..640ac6e 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -1,3 +1,20 @@
+/*
+This file is part of Minitrem.
+
+Minitrem is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+Minitrem is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "common.hpp"
#include <sstream>