summaryrefslogtreecommitdiff
path: root/src/game
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/game
parent6dc7ae4f49931f721ad072cc72038cada78b147e (diff)
Copyright stuff.
Diffstat (limited to 'src/game')
-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
9 files changed, 160 insertions, 1 deletions
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 {