From 517b218b093708ff1a10c3ed2474cf3395564741 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 19 Dec 2017 21:39:21 +0100 Subject: Copyright stuff. --- src/common.hpp | 17 +++++++++++++++++ src/game/assets.cpp | 17 +++++++++++++++++ src/game/decos.cpp | 17 +++++++++++++++++ src/game/effects.cpp | 17 +++++++++++++++++ src/game/game.cpp | 17 +++++++++++++++++ src/game/game.hpp | 17 +++++++++++++++++ src/game/interface.cpp | 25 ++++++++++++++++++++++++- src/game/text.cpp | 17 +++++++++++++++++ src/game/units.cpp | 17 +++++++++++++++++ src/game/worldgen.cpp | 17 +++++++++++++++++ src/main.cpp | 17 +++++++++++++++++ src/math.hpp | 17 +++++++++++++++++ src/path_finder.cpp | 17 +++++++++++++++++ src/procgen.cpp | 17 +++++++++++++++++ src/render.cpp | 17 +++++++++++++++++ src/world.cpp | 17 +++++++++++++++++ 16 files changed, 279 insertions(+), 1 deletion(-) (limited to 'src') 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 . +*/ + #include #include #include 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 . +*/ + #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 . +*/ + #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 . +*/ + #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 . +*/ + #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 . +*/ + #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 . +*/ + #include "game.hpp" #include @@ -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 . +*/ + #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 . +*/ + #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 . +*/ + #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 . +*/ + #include "common.hpp" #include 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 . +*/ + template class vec_t { template 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 . +*/ + #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 . +*/ + #include "common.hpp" #include 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 . +*/ + #include "common.hpp" #include 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 . +*/ + #include "common.hpp" #include -- cgit