[colobot] 40/145: Solves #700

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 1960b373f1a3124053339e2febbc7990ef92cf7f
Author: KarolTrzeszczkowski 
Date:   Sun Apr 3 12:45:50 2016 +0200

Solves #700

It turns out, that tower is not over powered in code battle mode. It never 
hits flying enemy robot.
---
 src/object/auto/autotower.cpp | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/object/auto/autotower.cpp b/src/object/auto/autotower.cpp
index 23d8f2c..ad436af 100644
--- a/src/object/auto/autotower.cpp
+++ b/src/object/auto/autotower.cpp
@@ -271,12 +271,16 @@ CObject* CAutoTower::SearchTarget(Math::Vector )
 CObject* best = nullptr;
 for (CObject* obj : CObjectManager::GetInstancePointer()->GetAllObjects())
 {
+int oTeam=obj->GetTeam();
+int myTeam=m_object->GetTeam();
 ObjectType oType = obj->GetType();
 if ( oType != OBJECT_MOTHER &&
  oType != OBJECT_ANT&&
  oType != OBJECT_SPIDER &&
  oType != OBJECT_BEE&&
- oType != OBJECT_WORM   )  continue;
+ oType != OBJECT_WORM   &&
+ (oTeam == myTeam||
+ oTeam == 0) )  continue;
 
 if ( !obj->GetDetectable() )  continue;  // inactive?
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 39/145: One more code style fix

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit c0780f938e2fd73eb3a2ba22da936e2a796450fc
Author: krzys-h 
Date:   Sun Apr 3 13:19:51 2016 +0200

One more code style fix
---
 src/ui/debug_menu.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ui/debug_menu.cpp b/src/ui/debug_menu.cpp
index 9239038..10aa939 100644
--- a/src/ui/debug_menu.cpp
+++ b/src/ui/debug_menu.cpp
@@ -31,10 +31,10 @@
 
 #include "sound/sound.h"
 
+#include "ui/controls/button.h"
+#include "ui/controls/check.h"
 #include "ui/controls/interface.h"
 #include "ui/controls/window.h"
-#include "ui/controls/check.h"
-#include "ui/controls/button.h"
 
 namespace Ui
 {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 42/145: Fixed indentation

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 15702ec856cc83d98dd8c8cb67c7ed1624eb1c86
Author: krzys-h 
Date:   Sun Apr 3 20:29:55 2016 +0200

Fixed indentation
---
 src/level/player_profile.cpp | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/level/player_profile.cpp b/src/level/player_profile.cpp
index 7eba33c..d3603f1 100644
--- a/src/level/player_profile.cpp
+++ b/src/level/player_profile.cpp
@@ -77,35 +77,35 @@ void PlayerApperance::DefPerso()
 }
 
 void PlayerApperance::DefHairColor()
-{
+{
 if (this->face == 0)  // normal ?
-{
+{
 this->colorHair.r = 90.0f / 256.0f;
 this->colorHair.g = 95.0f / 256.0f;
 this->colorHair.b = 85.0f / 256.0f;  // black
-}
+}
 if (this->face == 1)  // bald ?
- {
+{
 this->colorHair.r = 74.0f / 256.0f;
 this->colorHair.g = 58.0f / 256.0f;
 this->colorHair.b = 46.0f / 256.0f;  // brown
-}
+}
 if (this->face == 2)  // carlos ?
- {
+{
 this->colorHair.r = 70.0f / 256.0f;
 this->colorHair.g = 40.0f / 256.0f;
 this->colorHair.b = 9.0f / 256.0f;  // brown
-}
+}
 if (this->face == 3)  // blond ? -> ginger ?
- {
+{
 this->colorHair.r = 74.0f / 256.0f;
 this->colorHair.g = 16.0f / 256.0f;
 this->colorHair.b = 0.0f / 256.0f;  // yellow, changed to ginger
-}
-
-this->colorHair.a = 0.0f;
 }
 
+this->colorHair.a = 0.0f;
+}
+
 
 CPlayerProfile::CPlayerProfile(std::string playerName)
 {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 29/145: Fixed compilation with disabled sound support, closes #748

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 39b364fa778f049c798b97d12967e4e1cab88c30
Author: krzys-h 
Date:   Wed Mar 30 22:22:22 2016 +0200

Fixed compilation with disabled sound support, closes #748
---
 src/app/app.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/app/app.cpp b/src/app/app.cpp
index 19a4830..4a50921 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -42,6 +42,7 @@
 
 #include "object/object_manager.h"
 
+#include "sound/sound.h"
 #ifdef OPENAL_SOUND
 #include "sound/oalsound/alsound.h"
 #endif

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 46/145: Moved pathman from common/ to app/

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit c94ebb45e79851ec3a4253381448959ffe1907b6
Author: krzys-h 
Date:   Mon Apr 4 22:28:08 2016 +0200

Moved pathman from common/ to app/
---
 src/CMakeLists.txt  | 2 +-
 src/app/app.cpp | 2 +-
 src/{common => app}/pathman.cpp | 2 +-
 src/{common => app}/pathman.h   | 0
 4 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 38d21f0..482de23 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -78,6 +78,7 @@ set(BASE_SOURCES
 app/app.cpp
 app/controller.cpp
 app/input.cpp
+app/pathman.cpp
 app/pausemanager.cpp
 app/signal_handlers.cpp
 app/system.cpp
@@ -90,7 +91,6 @@ set(BASE_SOURCES
 common/language.cpp
 common/logger.cpp
 common/misc.cpp
-common/pathman.cpp
 common/regex_utils.cpp
 common/resources/inputstream.cpp
 common/resources/inputstreambuffer.cpp
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 4a50921..4313550 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -21,6 +21,7 @@
 
 #include "app/controller.h"
 #include "app/input.h"
+#include "app/pathman.h"
 #include "app/system.h"
 
 #include "common/config_file.h"
@@ -28,7 +29,6 @@
 #include "common/key.h"
 #include "common/logger.h"
 #include "common/make_unique.h"
-#include "common/pathman.h"
 #include "common/stringutils.h"
 #include "common/version.h"
 
diff --git a/src/common/pathman.cpp b/src/app/pathman.cpp
similarity index 99%
rename from src/common/pathman.cpp
rename to src/app/pathman.cpp
index 44e2d34..2e32ddf 100644
--- a/src/common/pathman.cpp
+++ b/src/app/pathman.cpp
@@ -18,7 +18,7 @@
  */
 
 
-#include "common/pathman.h"
+#include "app/pathman.h"
 
 #include "common/config.h"
 
diff --git a/src/common/pathman.h b/src/app/pathman.h
similarity index 100%
rename from src/common/pathman.h
rename to src/app/pathman.h

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 120/145: Fixed pause blur in main menu

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 8ad53ce3278498dbdf38e4437a83536e240a1408
Author: krzys-h 
Date:   Sun Jun 19 22:18:03 2016 +0200

Fixed pause blur in main menu
---
 src/level/robotmain.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index d0f29ef..86d1d16 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -1554,6 +1554,8 @@ char* CRobotMain::GetDisplayInfoName(int index)
 //! Beginning of a dialogue during the game
 void CRobotMain::StartSuspend()
 {
+if (!IsPhaseWithWorld(m_phase)) return;
+
 m_sound->MuteAll(true);
 ClearInterface();
 m_suspend = 
m_pause->ActivatePause(PAUSE_ENGINE|PAUSE_HIDE_SHORTCUTS|PAUSE_MUTE_SOUND|PAUSE_CAMERA);

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 110/145: Updated data submodule

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit cd183413304e17537e04eb1adaaa5371ac33dded
Author: krzys-h 
Date:   Fri Jun 17 21:21:34 2016 +0200

Updated data submodule
---
 data | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data b/data
index cbd7b5b..5614bfe 16
--- a/data
+++ b/data
@@ -1 +1 @@
-Subproject commit cbd7b5b46a2098b8d88a96370cc8d9aeb05a71f7
+Subproject commit 5614bfe93c565d2f006138b0ec5b4fe380a04f08

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 122/145: Changed arrays to use {} when converted to string; added tests

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit c304ecd0cab9b62670d384d8ae93d9ab66c4d1fc
Author: krzys-h 
Date:   Tue Jun 21 12:58:43 2016 +0200

Changed arrays to use {} when converted to string; added tests
---
 src/CBot/CBotVar/CBotVarClass.cpp |  7 +--
 test/unit/CBot/CBot_test.cpp  | 24 
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/src/CBot/CBotVar/CBotVarClass.cpp 
b/src/CBot/CBotVar/CBotVarClass.cpp
index 919b43a..08acffb 100644
--- a/src/CBot/CBotVar/CBotVarClass.cpp
+++ b/src/CBot/CBotVar/CBotVarClass.cpp
@@ -343,10 +343,12 @@ std::string CBotVarClass::GetValString()
 res += " (";
 }
 }
+
+res += " )";
 }
 else
 {
-res = "( ";
+res = "{ ";
 
 CBotVar*pv = m_pVar;
 while ( pv != nullptr )
@@ -355,9 +357,10 @@ std::string CBotVarClass::GetValString()
 if ( pv->GetNext() != nullptr ) res += ", ";
 pv = pv->GetNext();
 }
+
+res += " }";
 }
 
-res += " )";
 returnres;
 }
 
diff --git a/test/unit/CBot/CBot_test.cpp b/test/unit/CBot/CBot_test.cpp
index e8cdcd1..c0d5e12 100644
--- a/test/unit/CBot/CBot_test.cpp
+++ b/test/unit/CBot/CBot_test.cpp
@@ -485,6 +485,30 @@ TEST_F(CBotUT, VarImplicitCast)
 );
 }
 
+TEST_F(CBotUT, ToString)
+{
+ExecuteTest(
+"extern void ArrayToString()\n"
+"{\n"
+"int[] array = {2, 4, 6};\n"
+"string arrayStr = \"\"+array;\n"
+"ASSERT(arrayStr == \"{ 2, 4, 6 }\");\n"
+"}\n"
+);
+
+ExecuteTest(
+"public class Test { int a = 1337; }\n"
+"extern void ClassToString()\n"
+"{\n"
+"Test test();\n"
+"string testStr = \"\"+test;\n"
+"ASSERT(testStr == \"Pointer to Test( a=1337 )\");\n"
+"}\n"
+);
+
+// TODO: IntrinsicClassToString ? (e.g. point)
+}
+
 TEST_F(CBotUT, Arrays)
 {
 ExecuteTest(

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 112/145: Do not rotate after changing autosave settings

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 7ce23fdf52f521b460e3a3522f353ee2431a3b88
Author: krzys-h 
Date:   Fri Jun 17 22:39:45 2016 +0200

Do not rotate after changing autosave settings

See https://github.com/colobot/colobot/pull/789#discussion_r67570610
---
 src/level/robotmain.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 8019786..760d1d5 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -5457,7 +5457,6 @@ void CRobotMain::SetAutosave(bool enable)
 
 m_autosave = enable;
 m_autosaveLast = m_gameTimeAbsolute;
-AutosaveRotate();
 }
 
 bool CRobotMain::GetAutosave()
@@ -5483,7 +5482,6 @@ void CRobotMain::SetAutosaveSlots(int slots)
 if (m_autosaveSlots == slots) return;
 
 m_autosaveSlots = slots;
-AutosaveRotate();
 }
 
 int CRobotMain::GetAutosaveSlots()

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 115/145: Enabled more tests

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 543df84db6acd6ecf17c66ae8776715b99cb162c
Author: krzys-h 
Date:   Sat Jun 18 22:31:32 2016 +0200

Enabled more tests

See https://github.com/colobot/colobot/pull/783#issuecomment-226963085
---
 test/unit/CBot/CBot_test.cpp | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/unit/CBot/CBot_test.cpp b/test/unit/CBot/CBot_test.cpp
index 355e37a..e8cdcd1 100644
--- a/test/unit/CBot/CBot_test.cpp
+++ b/test/unit/CBot/CBot_test.cpp
@@ -463,12 +463,12 @@ TEST_F(CBotUT, VarImplicitCast)
 "{\n"
 "string a = 2;\n"
 "ASSERT(a == \"2\");\n"
-//"a = 3;\n" // TODO: this certainly looks wrong, you an assign a 
number in initialization but not in assignment
-//"ASSERT(a == \"3\");\n"
+"a = 3;\n"
+"ASSERT(a == \"3\");\n"
 "string b = 2.5;\n"
 "ASSERT(b == \"2.5\");\n"
-//"b = 3.5;\n"
-//"ASSERT(b == \"3.5\");\n"
+"b = 3.5;\n"
+"ASSERT(b == \"3.5\");\n"
 "}\n"
 );
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 118/145: Fixed problem with pause blur after changing some graphic settings

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit a0b3f7a769b87639159c1774f18b4880dd1465bd
Author: Tomasz Kapuściński 
Date:   Sun Jun 19 16:52:01 2016 +0200

Fixed problem with pause blur after changing some graphic settings
---
 src/graphics/engine/engine.cpp | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index bb6319a..ac5cf52 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -376,6 +376,13 @@ void CEngine::ReloadAllTextures()
 m_app->GetEventQueue()->AddEvent(Event(EVENT_RELOAD_TEXTURES));
 UpdateGroundSpotTextures();
 LoadAllTextures();
+
+// recapture 3D scene
+if (m_worldCaptured)
+{
+m_captureWorld = true;
+m_worldCaptured = false;
+}
 }
 
 bool CEngine::ProcessEvent(const Event )

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

[colobot] 111/145: Merge pull request #789 from Erihel/dev-boost-filesystem-removal

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 439a416a66c3ecd28d8d8cc87fe1e240cf55bd52
Merge: cd18341 32629a2
Author: krzys-h 
Date:   Fri Jun 17 22:38:41 2016 +0200

Merge pull request #789 from Erihel/dev-boost-filesystem-removal

Dev boost filesystem removal

 src/app/app.cpp  |  1 -
 src/common/resources/resourcemanager.cpp | 49 ++
 src/common/resources/resourcemanager.h   |  2 -
 src/level/robotmain.cpp  | 85 
 src/level/robotmain.h|  2 +-
 src/sound/oalsound/alsound.cpp   |  6 ---
 src/sound/sound.cpp  |  2 -
 src/ui/screen/screen_io.cpp  |  2 +-
 8 files changed, 27 insertions(+), 122 deletions(-)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 119/145: Fixed dynamic textures not being reloaded properly

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit bd4362e26ca9d2259864e5d997dfac2196ce6049
Author: krzys-h 
Date:   Sun Jun 19 19:57:55 2016 +0200

Fixed dynamic textures not being reloaded properly
---
 src/graphics/engine/engine.cpp | 3 ++-
 src/level/robotmain.cpp| 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index ac5cf52..7fdb2a4 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -375,7 +375,8 @@ void CEngine::ReloadAllTextures()
 
 m_app->GetEventQueue()->AddEvent(Event(EVENT_RELOAD_TEXTURES));
 UpdateGroundSpotTextures();
-LoadAllTextures();
+// LoadAllTextures() is called from CRobotMain on EVENT_RELOAD_TEXTURES
+// This is required because all dynamic textures need to be loaded first
 
 // recapture 3D scene
 if (m_worldCaptured)
diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 760d1d5..d0f29ef 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -689,6 +689,7 @@ bool CRobotMain::ProcessEvent(Event )
 ChangeColor();
 UpdateMap();
 }
+m_engine->LoadAllTextures();
 }
 
 if (event.type == EVENT_RESOLUTION_CHANGED)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 121/145: Fixed string values with spaces (closes #791)

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 5f7a8dbd5d3a9f7eeeb39a8e69ffbbae364c151a
Author: krzys-h 
Date:   Tue Jun 21 12:57:45 2016 +0200

Fixed string values with spaces (closes #791)
---
 src/CBot/CBotVar/CBotVarString.h | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/CBot/CBotVar/CBotVarString.h b/src/CBot/CBotVar/CBotVarString.h
index 5ff29d1..162264d 100644
--- a/src/CBot/CBotVar/CBotVarString.h
+++ b/src/CBot/CBotVar/CBotVarString.h
@@ -32,6 +32,12 @@ class CBotVarString : public CBotVarValue
 public:
 CBotVarString(const CBotToken ) : CBotVarValue(name) {}
 
+void SetValString(const std::string& val) override
+{
+m_val = val;
+m_binit = CBotVar::InitType::DEF;
+}
+
 void SetValInt(int val, const std::string& s = "") override
 {
 SetValString(ToString(val));

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 117/145: Fixed pause blur blinking for one frame

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 125d1a32c7edb176d52d1280f9bd9561d542025d
Author: krzys-h 
Date:   Sun Jun 19 12:23:54 2016 +0200

Fixed pause blur blinking for one frame

issue #656
---
 src/graphics/engine/engine.cpp | 302 ++---
 src/graphics/engine/engine.h   |   2 +
 2 files changed, 163 insertions(+), 141 deletions(-)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index 1617c98..bb6319a 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -3153,19 +3153,30 @@ void CEngine::Render()
 
 m_device->BeginScene();
 
-UseMSAA(true);
+// use currently captured scene for world
+if (m_worldCaptured && !m_captureWorld)
+{
+DrawCaptured3DScene();
+}
+else
+{
+UseMSAA(true);
 
-if (!m_worldCaptured)
 DrawBackground();// draws the background
 
-if (m_drawWorld)
-Draw3DScene();
+if (m_drawWorld)
+Draw3DScene();
 
-UseMSAA(false);
+UseMSAA(false);
 
-// marked to capture currently rendered world
-if (m_captureWorld)
-Capture3DScene();
+// marked to capture currently rendered world
+if (m_captureWorld)
+{
+Capture3DScene();
+m_device->Clear();
+DrawCaptured3DScene();
+}
+}
 
 m_app->StartPerformanceCounter(PCNT_RENDER_INTERFACE);
 DrawInterface();
@@ -3175,145 +3186,17 @@ void CEngine::Render()
 m_device->EndScene();
 }
 
-void CEngine::Capture3DScene()
+void CEngine::Draw3DScene()
 {
-// destroy existing texture
-if (m_capturedWorldTexture.Valid())
-{
-m_device->DestroyTexture(m_capturedWorldTexture);
-m_capturedWorldTexture = Texture();
-}
-
-// obtain pixels from screen
-int width = m_size.x;
-int height = m_size.y;
-
-auto pixels = m_device->GetFrameBufferPixels();
-unsigned char* data = reinterpret_cast(pixels->GetPixelsData());
-
-// calculate 2nd mipmap
-int newWidth = width / 4;
-int newHeight = height / 4;
-std::unique_ptr mipmap(new unsigned char[4 * newWidth * 
newHeight]);
-
-for (int x = 0; x < newWidth; x++)
-{
-for (int y = 0; y < newHeight; y++)
-{
-float color[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
-
-for (int i = 0; i < 4; i++)
-{
-for (int j = 0; j < 4; j++)
-{
-int index = 4 * ((4 * x + i) + width * (4 * y + j));
-
-for (int k = 0; k < 4; k++)
-color[k] += data[index + k];
-}
-}
-
-int index = 4 * (x + newWidth * y);
-
-for (int k = 0; k < 4; k++)
-{
-mipmap[index + k] = static_cast(color[k] * 
(1.0f / 16.0f));
-}
-}
-}
-
-// calculate Gaussian blur
-std::unique_ptr blured(new unsigned char[4 * newWidth * 
newHeight]);
-
-float matrix[7][7] =
-{
-{ 0.0067f, 0.2292f, 0.00019117f, 0.00038771f, 0.00019117f, 
0.2292f, 0.0067f },
-{ 0.2292f, 0.00078634f, 0.00655965f, 0.01330373f, 0.00655965f, 
0.00078633f, 0.2292f },
-{ 0.00019117f, 0.00655965f, 0.05472157f, 0.11098164f, 0.05472157f, 
0.00655965f, 0.00019117f },
-{ 0.00038771f, 0.01330373f, 0.11098164f, 0.22508352f, 0.11098164f, 
0.01330373f, 0.00038771f },
-{ 0.00019117f, 0.00655965f, 0.05472157f, 0.11098164f, 0.05472157f, 
0.00655965f, 0.00019117f },
-{ 0.2292f, 0.00078633f, 0.00655965f, 0.01330373f, 0.00655965f, 
0.00078633f, 0.2292f },
-{ 0.0067f, 0.2292f, 0.00019117f, 0.00038771f, 0.00019117f, 
0.2292f, 0.0067f }
-};
-
-for (int x = 0; x < newWidth; x++)
+if (!m_worldCaptured)
 {
-for (int y = 0; y < newHeight; y++)
+if (m_capturedWorldTexture.Valid())
 {
-float color[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
-
-for (int i = -3; i <= 3; i++)
-{
-for (int j = -3; j <= 3; j++)
-{
-int xp = Math::Clamp(x + i, 0, newWidth - 1);
-int yp = Math::Clamp(y + j, 0, newHeight - 1);
-
-float weight = matrix[i + 3][j + 3];
-
-int index = 4 * (newWidth * yp + xp);
-
-for (int k = 0; k < 4; k++)
-color[k] += weight * mipmap[index + k];
-}
-}
-
-int index = 4 * (newWidth * y + x);
-
-for (int k = 0; k < 4; k++)
-{
-float value = Math::Clamp(color[k], 0.0f, 255.0f);
-blured[index + k] = static_cast(value);
-}
+

[colobot] 124/145: Changed mouse scaling (again)

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 3b9b9b322a6f1e2ff4b08b803badf3af6f55f186
Author: krzys-h 
Date:   Tue Jun 21 13:07:40 2016 +0200

Changed mouse scaling (again)
---
 src/graphics/engine/engine.cpp | 148 +
 src/graphics/engine/engine.h   |  40 +--
 src/math/intpoint.h|  96 ++
 src/math/point.h   |   4 +-
 4 files changed, 191 insertions(+), 97 deletions(-)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index 7fdb2a4..f7d0b5a 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -68,6 +68,60 @@ template<> Gfx::CEngine* 
CSingleton::m_instance = nullptr;
 namespace Gfx
 {
 
+/**
+ * \struct EngineMouse
+ * \brief Information about mouse cursor
+ */
+struct EngineMouse
+{
+//! Index of texture element for 1st image
+int icon1;
+//! Index of texture element for 2nd image
+int icon2;
+//! Shadow texture part
+int iconShadow;
+//! Mode to render 1st image in
+EngineRenderState mode1;
+//! Mode to render 2nd image in
+EngineRenderState mode2;
+//! Hot point
+Math::IntPoint hotPoint;
+
+EngineMouse(int icon1 = -1,
+int icon2 = -1,
+int iconShadow = -1,
+EngineRenderState mode1 = ENG_RSTATE_NORMAL,
+EngineRenderState mode2 = ENG_RSTATE_NORMAL,
+Math::IntPoint hotPoint = Math::IntPoint())
+: icon1(icon1)
+, icon2(icon2)
+, iconShadow(iconShadow)
+, mode1(mode1)
+, mode2(mode2)
+, hotPoint(hotPoint)
+{}
+};
+
+const Math::IntPoint MOUSE_SIZE(32, 32);
+const std::map MOUSE_TYPES = {
+{{ENG_MOUSE_NORM},{EngineMouse( 0,  1, 32, ENG_RSTATE_TTEXTURE_WHITE, 
ENG_RSTATE_TTEXTURE_BLACK, Math::IntPoint( 1,  1))}},
+{{ENG_MOUSE_WAIT},{EngineMouse( 2,  3, 33, ENG_RSTATE_TTEXTURE_WHITE, 
ENG_RSTATE_TTEXTURE_BLACK, Math::IntPoint( 8, 12))}},
+{{ENG_MOUSE_HAND},{EngineMouse( 4,  5, 34, ENG_RSTATE_TTEXTURE_WHITE, 
ENG_RSTATE_TTEXTURE_BLACK, Math::IntPoint( 7,  2))}},
+{{ENG_MOUSE_NO},  {EngineMouse( 6,  7, 35, ENG_RSTATE_TTEXTURE_WHITE, 
ENG_RSTATE_TTEXTURE_BLACK, Math::IntPoint(10, 10))}},
+{{ENG_MOUSE_EDIT},{EngineMouse( 8,  9, -1, ENG_RSTATE_TTEXTURE_BLACK, 
ENG_RSTATE_TTEXTURE_WHITE, Math::IntPoint( 6, 10))}},
+{{ENG_MOUSE_CROSS},   {EngineMouse(10, 11, -1, ENG_RSTATE_TTEXTURE_BLACK, 
ENG_RSTATE_TTEXTURE_WHITE, Math::IntPoint(10, 10))}},
+{{ENG_MOUSE_MOVEV},   {EngineMouse(12, 13, -1, ENG_RSTATE_TTEXTURE_BLACK, 
ENG_RSTATE_TTEXTURE_WHITE, Math::IntPoint( 5, 11))}},
+{{ENG_MOUSE_MOVEH},   {EngineMouse(14, 15, -1, ENG_RSTATE_TTEXTURE_BLACK, 
ENG_RSTATE_TTEXTURE_WHITE, Math::IntPoint(11,  5))}},
+{{ENG_MOUSE_MOVED},   {EngineMouse(16, 17, -1, ENG_RSTATE_TTEXTURE_BLACK, 
ENG_RSTATE_TTEXTURE_WHITE, Math::IntPoint( 9,  9))}},
+{{ENG_MOUSE_MOVEI},   {EngineMouse(18, 19, -1, ENG_RSTATE_TTEXTURE_BLACK, 
ENG_RSTATE_TTEXTURE_WHITE, Math::IntPoint( 9,  9))}},
+{{ENG_MOUSE_MOVE},{EngineMouse(20, 21, -1, ENG_RSTATE_TTEXTURE_BLACK, 
ENG_RSTATE_TTEXTURE_WHITE, Math::IntPoint(11, 11))}},
+{{ENG_MOUSE_TARGET},  {EngineMouse(22, 23, -1, ENG_RSTATE_TTEXTURE_BLACK, 
ENG_RSTATE_TTEXTURE_WHITE, Math::IntPoint(15, 15))}},
+{{ENG_MOUSE_SCROLLL}, {EngineMouse(24, 25, 43, ENG_RSTATE_TTEXTURE_BLACK, 
ENG_RSTATE_TTEXTURE_WHITE, Math::IntPoint( 2,  9))}},
+{{ENG_MOUSE_SCROLLR}, {EngineMouse(26, 27, 44, ENG_RSTATE_TTEXTURE_BLACK, 
ENG_RSTATE_TTEXTURE_WHITE, Math::IntPoint(17,  9))}},
+{{ENG_MOUSE_SCROLLU}, {EngineMouse(28, 29, 45, ENG_RSTATE_TTEXTURE_BLACK, 
ENG_RSTATE_TTEXTURE_WHITE, Math::IntPoint( 9,  2))}},
+{{ENG_MOUSE_SCROLLD}, {EngineMouse(30, 31, 46, ENG_RSTATE_TTEXTURE_BLACK, 
ENG_RSTATE_TTEXTURE_WHITE, Math::IntPoint( 9, 17))}},
+};
+
 CEngine::CEngine(CApplication *app, CSystemUtils* systemUtils)
 : m_app(app),
   m_systemUtils(systemUtils),
@@ -75,8 +129,7 @@ CEngine::CEngine(CApplication *app, CSystemUtils* 
systemUtils)
   m_fogColor(),
   m_deepView(),
   m_fogStart(),
-  m_highlightRank(),
-  m_mice()
+  m_highlightRank()
 {
 m_device = nullptr;
 
@@ -160,24 +213,6 @@ CEngine::CEngine(CApplication *app, CSystemUtils* 
systemUtils)
 m_debugLights = false;
 m_debugDumpLights = false;
 
-m_mice[ENG_MOUSE_NORM]= EngineMouse( 0,  1, 32, 
ENG_RSTATE_TTEXTURE_WHITE, ENG_RSTATE_TTEXTURE_BLACK, Math::Point( 1.0f,  
1.0f));
-m_mice[ENG_MOUSE_WAIT]= EngineMouse( 2,  3, 33, 
ENG_RSTATE_TTEXTURE_WHITE, ENG_RSTATE_TTEXTURE_BLACK, Math::Point( 8.0f, 
12.0f));
-m_mice[ENG_MOUSE_HAND]= EngineMouse( 4,  5, 34, 
ENG_RSTATE_TTEXTURE_WHITE, ENG_RSTATE_TTEXTURE_BLACK, Math::Point( 7.0f,  
2.0f));
-

[colobot] 113/145: Merge pull request #783 from melex750/dev

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit bf2e3cdfaeb7114cc5ec60cb601b8f5305cbf4e6
Merge: 7ce23fd 37ab015
Author: krzys-h 
Date:   Fri Jun 17 22:41:53 2016 +0200

Merge pull request #783 from melex750/dev

[INFO] Conversion to string

 src/CBot/CBotInstr/CBotExpression.cpp  | 23 +--
 src/CBot/CBotInstr/CBotInstrUtils.cpp  |  6 +++---
 src/CBot/CBotInstr/CBotInstrUtils.h|  8 +++-
 src/CBot/CBotInstr/CBotLeftExprVar.cpp |  6 ++
 src/CBot/CBotInstr/CBotTwoOpExpr.cpp   | 16 +---
 5 files changed, 50 insertions(+), 9 deletions(-)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 116/145: Fixed pause blur with MSAA

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 9d9131c3fba3a3fbf6d15d4b1816d87927fa172c
Author: krzys-h 
Date:   Sun Jun 19 11:45:56 2016 +0200

Fixed pause blur with MSAA

issue #656
---
 src/graphics/engine/engine.cpp | 225 +
 src/graphics/engine/engine.h   |   2 +
 2 files changed, 116 insertions(+), 111 deletions(-)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index 8eb9275..1617c98 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -3163,6 +3163,10 @@ void CEngine::Render()
 
 UseMSAA(false);
 
+// marked to capture currently rendered world
+if (m_captureWorld)
+Capture3DScene();
+
 m_app->StartPerformanceCounter(PCNT_RENDER_INTERFACE);
 DrawInterface();
 m_app->StopPerformanceCounter(PCNT_RENDER_INTERFACE);
@@ -3171,6 +3175,116 @@ void CEngine::Render()
 m_device->EndScene();
 }
 
+void CEngine::Capture3DScene()
+{
+// destroy existing texture
+if (m_capturedWorldTexture.Valid())
+{
+m_device->DestroyTexture(m_capturedWorldTexture);
+m_capturedWorldTexture = Texture();
+}
+
+// obtain pixels from screen
+int width = m_size.x;
+int height = m_size.y;
+
+auto pixels = m_device->GetFrameBufferPixels();
+unsigned char* data = reinterpret_cast(pixels->GetPixelsData());
+
+// calculate 2nd mipmap
+int newWidth = width / 4;
+int newHeight = height / 4;
+std::unique_ptr mipmap(new unsigned char[4 * newWidth * 
newHeight]);
+
+for (int x = 0; x < newWidth; x++)
+{
+for (int y = 0; y < newHeight; y++)
+{
+float color[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
+
+for (int i = 0; i < 4; i++)
+{
+for (int j = 0; j < 4; j++)
+{
+int index = 4 * ((4 * x + i) + width * (4 * y + j));
+
+for (int k = 0; k < 4; k++)
+color[k] += data[index + k];
+}
+}
+
+int index = 4 * (x + newWidth * y);
+
+for (int k = 0; k < 4; k++)
+{
+mipmap[index + k] = static_cast(color[k] * 
(1.0f / 16.0f));
+}
+}
+}
+
+// calculate Gaussian blur
+std::unique_ptr blured(new unsigned char[4 * newWidth * 
newHeight]);
+
+float matrix[7][7] =
+{
+{ 0.0067f, 0.2292f, 0.00019117f, 0.00038771f, 0.00019117f, 
0.2292f, 0.0067f },
+{ 0.2292f, 0.00078634f, 0.00655965f, 0.01330373f, 0.00655965f, 
0.00078633f, 0.2292f },
+{ 0.00019117f, 0.00655965f, 0.05472157f, 0.11098164f, 0.05472157f, 
0.00655965f, 0.00019117f },
+{ 0.00038771f, 0.01330373f, 0.11098164f, 0.22508352f, 0.11098164f, 
0.01330373f, 0.00038771f },
+{ 0.00019117f, 0.00655965f, 0.05472157f, 0.11098164f, 0.05472157f, 
0.00655965f, 0.00019117f },
+{ 0.2292f, 0.00078633f, 0.00655965f, 0.01330373f, 0.00655965f, 
0.00078633f, 0.2292f },
+{ 0.0067f, 0.2292f, 0.00019117f, 0.00038771f, 0.00019117f, 
0.2292f, 0.0067f }
+};
+
+for (int x = 0; x < newWidth; x++)
+{
+for (int y = 0; y < newHeight; y++)
+{
+float color[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
+
+for (int i = -3; i <= 3; i++)
+{
+for (int j = -3; j <= 3; j++)
+{
+int xp = Math::Clamp(x + i, 0, newWidth - 1);
+int yp = Math::Clamp(y + j, 0, newHeight - 1);
+
+float weight = matrix[i + 3][j + 3];
+
+int index = 4 * (newWidth * yp + xp);
+
+for (int k = 0; k < 4; k++)
+color[k] += weight * mipmap[index + k];
+}
+}
+
+int index = 4 * (newWidth * y + x);
+
+for (int k = 0; k < 4; k++)
+{
+float value = Math::Clamp(color[k], 0.0f, 255.0f);
+blured[index + k] = static_cast(value);
+}
+}
+}
+
+// create SDL surface and final texture
+ImageData image;
+image.surface = SDL_CreateRGBSurfaceFrom(blured.get(), newWidth, 
newHeight, 32, 0, 0, 0, 0, 0xFF00);
+
+TextureCreateParams params;
+params.filter = TEX_FILTER_BILINEAR;
+params.format = TEX_IMG_RGBA;
+params.mipmap = false;
+
+m_capturedWorldTexture = m_device->CreateTexture(, params);
+
+SDL_FreeSurface(image.surface);
+
+m_captureWorld = false;
+m_worldCaptured = true;
+}
+
 void CEngine::Draw3DScene()
 {
 // use currently captured scene for world
@@ -3451,117 +3565,6 @@ void CEngine::Draw3DScene()
 DrawForegroundImage();   // draws the foreground
 
 if (! m_overFront) DrawOverColor();  // draws the foreground 

[colobot] 125/145: Fix initializing an array using variables

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 0d74b4f36b8e9fbd6236c56976d82abf56545fea
Author: melex750 
Date:   Fri Jun 24 16:56:17 2016 -0400

Fix initializing an array using variables

Resolves a conflict between CBotListArray and CBotExprVar
---
 src/CBot/CBotInstr/CBotListArray.cpp | 19 +--
 src/CBot/CBotInstr/CBotListArray.h   |  2 +-
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/CBot/CBotInstr/CBotListArray.cpp 
b/src/CBot/CBotInstr/CBotListArray.cpp
index 559bb9d..89cbb79 100644
--- a/src/CBot/CBotInstr/CBotListArray.cpp
+++ b/src/CBot/CBotInstr/CBotListArray.cpp
@@ -98,7 +98,7 @@ CBotInstr* CBotListArray::Compile(CBotToken* , CBotCStack* 
pStack, CBotTypResu
 }
 }
 
-inst->m_expr->AddNext3(i);
+inst->m_expr->AddNext3b(i);
 
 if ( p->GetType() == ID_COMMA ) continue;
 if ( p->GetType() == ID_CLBLK ) break;
@@ -114,10 +114,10 @@ CBotInstr* CBotListArray::Compile(CBotToken* , 
CBotCStack* pStack, CBotTypResu
 {
 goto error;
 }
-CBotVar* pv = pStk->GetVar();  
 // result of the expression
 
-if (pv == nullptr || (!TypesCompatibles( type, pv->GetTypResult()) 
&&
-!(type.Eq(CBotTypPointer) && 
pv->GetTypResult().Eq(CBotTypNullPointer)) ))
+CBotTypResult valType = pStk->GetTypResult();
+
+if (!TypeCompatible(valType, type, ID_ASS) )
 {
 pStk->SetError(CBotErrBadType1, p->GetStart());
 goto error;
@@ -133,15 +133,14 @@ CBotInstr* CBotListArray::Compile(CBotToken* , 
CBotCStack* pStack, CBotTypResu
 goto error;
 }
 
-CBotVar* pv = pStk->GetVar();  
 // result of the expression
+CBotTypResult valType = pStk->GetTypResult();
 
-if (pv == nullptr || (!TypesCompatibles( type, 
pv->GetTypResult()) &&
-!(type.Eq(CBotTypPointer) && 
pv->GetTypResult().Eq(CBotTypNullPointer)) ))
+if (!TypeCompatible(valType, type, ID_ASS) )
 {
 pStk->SetError(CBotErrBadType1, p->GetStart());
 goto error;
 }
-inst->m_expr->AddNext3(i);
+inst->m_expr->AddNext3b(i);
 
 if (p->GetType() == ID_COMMA) continue;
 if (p->GetType() == ID_CLBLK) break;
@@ -175,7 +174,7 @@ bool CBotListArray::Execute(CBotStack* , CBotVar* pVar)
 
 int n = 0;
 
-for (; p != nullptr ; n++, p = p->GetNext3())
+for (; p != nullptr ; n++, p = p->GetNext3b())
 {
 if (pile1->GetState() > n) continue;
 
@@ -207,7 +206,7 @@ void CBotListArray::RestoreState(CBotStack* , bool bMain)
 
 intstate = pile->GetState();
 
-while(state-- > 0) p = p->GetNext3() ;
+while(state-- > 0) p = p->GetNext3b() ;
 
 p->RestoreState(pile, bMain);// size calculation 
//interrupted!
 }
diff --git a/src/CBot/CBotInstr/CBotListArray.h 
b/src/CBot/CBotInstr/CBotListArray.h
index c5f800b..18d6b56 100644
--- a/src/CBot/CBotInstr/CBotListArray.h
+++ b/src/CBot/CBotInstr/CBotListArray.h
@@ -62,7 +62,7 @@ protected:
 virtual std::map GetDebugLinks() override;
 
 private:
-//! An expression for an element others are linked with CBotInstr :: 
m_next3;
+//! An expression for an element others are linked with CBotInstr :: 
m_next3b;
 CBotInstr* m_expr;
 };
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 127/145: Fix "new" keyword syntax checking

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 51665e8396800391fdc9a7eb20df824ab28ed033
Author: melex750 
Date:   Fri Jun 24 17:03:50 2016 -0400

Fix "new" keyword syntax checking
---
 src/CBot/CBotInstr/CBotNew.cpp | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/CBot/CBotInstr/CBotNew.cpp b/src/CBot/CBotInstr/CBotNew.cpp
index 7da8e41..a302b39 100644
--- a/src/CBot/CBotInstr/CBotNew.cpp
+++ b/src/CBot/CBotInstr/CBotNew.cpp
@@ -50,7 +50,11 @@ CBotInstr* CBotNew::Compile(CBotToken* , CBotCStack* 
pStack)
 if (!IsOfType(p, ID_NEW)) return nullptr;
 
 // verifies that the token is a class name
-if (p->GetType() != TokenTypVar) return nullptr;
+if (p->GetType() != TokenTypVar)
+{
+pStack->SetError(CBotErrBadNew, p);
+return nullptr;
+}
 
 CBotClass* pClass = CBotClass::Find(p);
 if (pClass == nullptr)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 128/145: Fix crash when calling method on a null object

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 64157090e66aeb5cec7ac1b72748ac1eeeb09dfa
Author: melex750 
Date:   Fri Jun 24 17:18:11 2016 -0400

Fix crash when calling method on a null object
---
 src/CBot/CBotInstr/CBotInstrMethode.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/CBot/CBotInstr/CBotInstrMethode.cpp 
b/src/CBot/CBotInstr/CBotInstrMethode.cpp
index e0d08a9..3bdf849 100644
--- a/src/CBot/CBotInstr/CBotInstrMethode.cpp
+++ b/src/CBot/CBotInstr/CBotInstrMethode.cpp
@@ -103,6 +103,7 @@ bool CBotInstrMethode::ExecuteVar(CBotVar* , 
CBotStack* , CBotToken* pre
 if (pVar->GetPointer() == nullptr)
 {
 pj->SetError(CBotErrNull, prevToken);
+return pj->Return(pile1);
 }
 
 if (pile1->IfStep()) return false;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 26/145: Fix occured/occurred spelling error

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit a06035ecb8e49884d38d0d7a2da295cde1813d49
Author: Didier Raboud <o...@debian.org>
Date:   Wed Mar 30 13:40:26 2016 +0200

Fix occured/occurred spelling error
---
 src/CBot/CBotProgram.h |  4 ++--
 src/CBot/CBotStack.h   |  2 +-
 src/app/signal_handlers.cpp|  4 ++--
 src/graphics/opengl/gl21device.cpp |  2 +-
 src/graphics/opengl/gl33device.cpp |  2 +-
 src/graphics/opengl/gldevice.cpp   |  2 +-
 src/graphics/opengl/glutil.cpp |  8 
 src/level/robotmain.cpp| 10 +-
 8 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/CBot/CBotProgram.h b/src/CBot/CBotProgram.h
index 2b477bd..9f5cdc0 100644
--- a/src/CBot/CBotProgram.h
+++ b/src/CBot/CBotProgram.h
@@ -143,7 +143,7 @@ public:
  * \param[out] code Error code
  * \param[out] start Starting position in the code string of this error
  * \param[out] end Ending position in the code string of this error
- * \return false if no error has occured
+ * \return false if no error has occurred
  */
 bool GetError(CBotError& code, int& start, int& end);
 
@@ -153,7 +153,7 @@ public:
  * \param[out] start Starting position in the code string of this error
  * \param[out] end Ending position in the code string of this error
  * \param[out] pProg Program that caused the error (TODO: This always 
returns "this"... what?)
- * \return false if no error has occured
+ * \return false if no error has occurred
  */
 bool GetError(CBotError& code, int& start, int& end, CBotProgram*& pProg);
 
diff --git a/src/CBot/CBotStack.h b/src/CBot/CBotStack.h
index 1d7c788..6cd8e56 100644
--- a/src/CBot/CBotStack.h
+++ b/src/CBot/CBotStack.h
@@ -105,7 +105,7 @@ public:
 
 /**
  * \brief Check if there was an error
- * \return false if an error occured
+ * \return false if an error occurred
  * \see GetError()
  */
 bool IsOk()
diff --git a/src/app/signal_handlers.cpp b/src/app/signal_handlers.cpp
index 1f29dc6..87dbb4a 100644
--- a/src/app/signal_handlers.cpp
+++ b/src/app/signal_handlers.cpp
@@ -124,7 +124,7 @@ void CSignalHandlers::ReportError(const std::string& 
errorMessage)
 }
 
 std::stringstream msg;
-msg << "Unhandled exception occured!" << std::endl;
+msg << "Unhandled exception occurred!" << std::endl;
 msg << "==" << std::endl;
 msg << errorMessage << std::endl;
 msg << "==" << std::endl;
@@ -162,7 +162,7 @@ void CSignalHandlers::ReportError(const std::string& 
errorMessage)
 
 std::cerr << std::endl << msg.str() << std::endl;
 
-m_systemUtils->SystemDialog(SDT_ERROR, "Unhandled exception occured!", 
msg.str());
+m_systemUtils->SystemDialog(SDT_ERROR, "Unhandled exception occurred!", 
msg.str());
 
 if (canSave && !triedSaving)
 {
diff --git a/src/graphics/opengl/gl21device.cpp 
b/src/graphics/opengl/gl21device.cpp
index 6f7051e..f5fb774 100644
--- a/src/graphics/opengl/gl21device.cpp
+++ b/src/graphics/opengl/gl21device.cpp
@@ -174,7 +174,7 @@ bool CGL21Device::Create()
 
 if (!InitializeGLEW())
 {
-m_errorMessage = "An error occured while initializing GLEW.";
+m_errorMessage = "An error occurred while initializing GLEW.";
 return false;
 }
 
diff --git a/src/graphics/opengl/gl33device.cpp 
b/src/graphics/opengl/gl33device.cpp
index d02ff77..c0c1e12 100644
--- a/src/graphics/opengl/gl33device.cpp
+++ b/src/graphics/opengl/gl33device.cpp
@@ -173,7 +173,7 @@ bool CGL33Device::Create()
 
 if (!InitializeGLEW())
 {
-m_errorMessage = "An error occured while initializing GLEW.";
+m_errorMessage = "An error occurred while initializing GLEW.";
 return false;
 }
 
diff --git a/src/graphics/opengl/gldevice.cpp b/src/graphics/opengl/gldevice.cpp
index 95a96fe..423520d 100644
--- a/src/graphics/opengl/gldevice.cpp
+++ b/src/graphics/opengl/gldevice.cpp
@@ -169,7 +169,7 @@ bool CGLDevice::Create()
 
 if (!InitializeGLEW())
 {
-m_errorMessage = "An error occured while initializing GLEW.";
+m_errorMessage = "An error occurred while initializing GLEW.";
 return false;
 }
 
diff --git a/src/graphics/opengl/glutil.cpp b/src/graphics/opengl/glutil.cpp
index 95c1f24..04ad80a 100644
--- a/src/graphics/opengl/glutil.cpp
+++ b/src/graphics/opengl/glutil.cpp
@@ -480,8 +480,8 @@ GLint LoadShader(GLint type, const char* filename)
 auto message = MakeUniqueArray(len + 1);
 glGetShaderInfoLog(shader, len + 1, nullptr, 

[colobot] 24/145: Deactive pause before jumping to next visit

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 8ccad5b954e9a11a0ccf4ffad8e12aa7023706c3
Author: Krzysztof Dermont 
Date:   Tue Mar 29 22:29:24 2016 +0200

Deactive pause before jumping to next visit

When pause was active setting new pause resulted in strange behavior.

This should fix issue #736.
---
 src/level/robotmain.cpp | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index c410e31..9506fca 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -1631,6 +1631,12 @@ void CRobotMain::StartDisplayVisit(EventType event)
 {
 if (m_editLock) return;
 
+if (m_visitPause)
+{
+m_pause->DeactivatePause(m_visitPause);
+m_visitPause = nullptr;
+}
+
 Ui::CWindow* pw = 
static_cast(m_interface->SearchControl(EVENT_WINDOW2));
 if (pw == nullptr) return;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 23/145: Merge pull request #749 from Erihel/dev

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 7e1b11276ce02698cef7bbd4b3ed602852680a06
Merge: 64fef98 2ea453f
Author: krzys_h 
Date:   Tue Mar 29 21:43:42 2016 +0200

Merge pull request #749 from Erihel/dev

Change SatCom button size in main menu

 src/ui/screen/screen_main_menu.cpp | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 27/145: Add Keywords key in desktop file

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 761c85468fa3a7571861667d05beee7b0bb9468e
Author: Didier Raboud <o...@debian.org>
Date:   Wed Mar 30 13:51:37 2016 +0200

Add Keywords key in desktop file

See:
- https://wiki.gnome.org/Initiatives/GnomeGoals/DesktopFileKeywords
- 
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s05.html
---
 desktop/colobot.ini|  2 +-
 desktop/create_desktop_file.sh |  2 +-
 desktop/po/colobot-desktop.pot |  8 +++-
 desktop/po/fr.po   | 10 --
 4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/desktop/colobot.ini b/desktop/colobot.ini
index 27193df..0cba215 100644
--- a/desktop/colobot.ini
+++ b/desktop/colobot.ini
@@ -1,4 +1,4 @@
 Name="Colobot"
 GenericName="Game to learn programming"
 Comment="Colonize with bots"
-
+Keywords="robots;3d;space;astronaut;java;c++"
diff --git a/desktop/create_desktop_file.sh b/desktop/create_desktop_file.sh
index 8f3d15b..a41299f 100755
--- a/desktop/create_desktop_file.sh
+++ b/desktop/create_desktop_file.sh
@@ -10,7 +10,7 @@ cat colobot.desktop.in
 
 linguas=$([ ! -d lang ] || ( cd lang ; ls));
 
-for type in Name GenericName Comment; do
+for type in Name GenericName Comment Keywords; do
 egrep "^$type=" $fname | sed -e "s/^$type=\"\(.*\)\"$/$type=\1/g"
 for l in $linguas; do
 egrep "^$type=" lang/$l/$fname | sed -e 
"s/^$type=\"\(.*\)\"$/$type[$l]=\1/g"
diff --git a/desktop/po/colobot-desktop.pot b/desktop/po/colobot-desktop.pot
index 4fbbee3..52e6e1a 100644
--- a/desktop/po/colobot-desktop.pot
+++ b/desktop/po/colobot-desktop.pot
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2016-03-25 19:24+0100\n"
+"POT-Creation-Date: 2016-03-30 13:45+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <l...@li.org>\n"
@@ -34,6 +34,12 @@ msgstr ""
 msgid "Colonize with bots"
 msgstr ""
 
+#. type: Keywords=
+#: colobot.ini:4
+#, no-wrap
+msgid "robots;3d;space;astronaut;java;c++"
+msgstr ""
+
 #. type: =head1
 #: colobot.pod:3
 msgid "NAME"
diff --git a/desktop/po/fr.po b/desktop/po/fr.po
index 01b73ce..5032271 100644
--- a/desktop/po/fr.po
+++ b/desktop/po/fr.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: colobot 0.1.7\n"
-"POT-Creation-Date: 2016-03-25 19:24+0100\n"
-"PO-Revision-Date: 2016-03-25 21:13+0100\n"
+"POT-Creation-Date: 2016-03-30 13:45+0200\n"
+"PO-Revision-Date: 2016-03-30 13:49+0100\n"
 "Last-Translator: Didier Raboud <o...@debian.org>\n"
 "Language: fr\n"
 "MIME-Version: 1.0\n"
@@ -34,6 +34,12 @@ msgstr "Apprentissage de la programmation par le jeu"
 msgid "Colonize with bots"
 msgstr "Colonise avec des roBots"
 
+#. type: Keywords=
+#: colobot.ini:4
+#, no-wrap
+msgid "robots;3d;space;astronaut;java;c++"
+msgstr "robots;3d;espace;astronaute;cosmonaute;java;c++"
+
 #. type: =head1
 #: colobot.pod:3
 msgid "NAME"

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 20/145: Post-release 0.1.7-alpha

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 1c5f47703bca1ae3d4f2f6df77706bdd482c1ab9
Author: krzys-h 
Date:   Tue Mar 29 16:08:20 2016 +0200

Post-release 0.1.7-alpha
---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f4510b..9de7ae9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,9 +16,9 @@ set(COLOBOT_VERSION_MINOR1)
 set(COLOBOT_VERSION_REVISION 7)
 
 # Used on official releases
-set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha")
+#set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha")
 # Used on unreleased, development builds
-#set(COLOBOT_VERSION_UNRELEASED "+alpha")
+set(COLOBOT_VERSION_UNRELEASED "+alpha")
 
 # Append git characteristics to version
 if(DEFINED COLOBOT_VERSION_UNRELEASED)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 13/145: Fixed exit after single mission mode

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 7fe65067ee06c414e56499c01e65666db176c957
Author: krzys-h 
Date:   Sun Mar 27 13:46:48 2016 +0200

Fixed exit after single mission mode
---
 src/level/robotmain.cpp | 19 +++
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 1234224..1d51b59 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -231,8 +231,6 @@ CRobotMain::CRobotMain()
 
 m_globalMagnifyDamage = 1.0f;
 
-m_exitAfterMission = false;
-
 m_autosave = true;
 m_autosaveInterval = 5;
 m_autosaveSlots = 3;
@@ -366,6 +364,13 @@ void CRobotMain::ChangePhase(Phase phase)
 bool resetWorld = false;
 if ((IsPhaseWithWorld(m_phase) || IsPhaseWithWorld(phase)) && 
!IsInSimulationConfigPhase(m_phase) && !IsInSimulationConfigPhase(phase))
 {
+if (IsPhaseWithWorld(m_phase) && !IsPhaseWithWorld(phase) && 
m_exitAfterMission)
+{
+GetLogger()->Info("Mission finished in single mission mode, 
exiting\n");
+m_eventQueue->AddEvent(Event(EVENT_QUIT));
+return;
+}
+
 GetLogger()->Info("Reseting world on phase change...\n");
 resetWorld = true;
 }
@@ -5105,8 +5110,6 @@ Error CRobotMain::CheckEndMission(bool frame)
 m_missionTimerEnabled = m_missionTimerStarted = 
false;
 m_winDelay  = m_endTakeWinDelay;  // wins in two 
seconds
 m_lostDelay = 0.0f;
-if (m_exitAfterMission)
-m_eventQueue->AddEvent(Event(EVENT_QUIT));
 m_displayText->SetEnable(false);
 }
 m_missionResult = ERR_OK;
@@ -5139,8 +5142,6 @@ Error CRobotMain::CheckEndMission(bool frame)
 }
 m_missionTimerEnabled = m_missionTimerStarted = false;
 m_displayText->SetEnable(false);
-if (m_exitAfterMission)
-m_eventQueue->AddEvent(Event(EVENT_QUIT));
 return INFO_LOSTq;
 }
 
@@ -5154,8 +5155,6 @@ Error CRobotMain::CheckEndMission(bool frame)
 }
 m_missionTimerEnabled = m_missionTimerStarted = false;
 m_displayText->SetEnable(false);
-if (m_exitAfterMission)
-m_eventQueue->AddEvent(Event(EVENT_QUIT));
 return INFO_LOST;
 }
 
@@ -5167,8 +5166,6 @@ Error CRobotMain::CheckEndMission(bool frame)
 m_lostDelay = 0.0f;
 m_missionTimerEnabled = m_missionTimerStarted = false;
 m_displayText->SetEnable(false);
-if (m_exitAfterMission)
-m_eventQueue->AddEvent(Event(EVENT_QUIT));
 return ERR_OK;  // mission ended
 }
 
@@ -5194,8 +5191,6 @@ Error CRobotMain::CheckEndMission(bool frame)
 m_winDelay  = m_endTakeWinDelay;  // wins in two seconds
 m_lostDelay = 0.0f;
 }
-if (m_exitAfterMission)
-m_eventQueue->AddEvent(Event(EVENT_QUIT));
 m_displayText->SetEnable(false);
 return ERR_OK;  // mission ended
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 18/145: goto() bitmap debugger

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit e24d77bde87b20b8a4d02e8c0871d8c6748d3bc2
Author: krzys-h 
Date:   Mon Mar 28 21:42:25 2016 +0200

goto() bitmap debugger
---
 src/graphics/engine/engine.cpp | 27 ++-
 src/graphics/engine/engine.h   |  2 ++
 src/object/task/taskgoto.cpp   | 33 +
 src/object/task/taskgoto.h |  1 +
 4 files changed, 62 insertions(+), 1 deletion(-)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index 7d00e87..5b2fc6e 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -3986,7 +3986,7 @@ void CEngine::UpdateGroundSpotTextures()
 set = true;
 }
 
-if (clear || set || m_debugResources)
+if (clear || set || m_debugResources || m_displayGotoImage != nullptr)
 {
 CImage shadowImg(Math::IntPoint(256, 256));
 shadowImg.Fill(Gfx::IntColor(255, 255, 255, 255));
@@ -4169,6 +4169,20 @@ void CEngine::UpdateGroundSpotTextures()
 }
 }
 
+if (m_displayGotoImage != nullptr)
+{
+Math::IntPoint size = m_displayGotoImage->GetSize();
+for (float x = min.x; x < max.x; x += 1.0f)
+{
+for (float y = min.y; y < max.y; y += 1.0f)
+{
+int px = x / 4.0f / 254.0f * size.x;
+int py = y / 4.0f / 254.0f * size.y;
+shadowImg.SetPixelInt(Math::IntPoint(x-min.x, 
y-min.y), m_displayGotoImage->GetPixelInt(Math::IntPoint(px, py)));
+}
+}
+}
+
 std::stringstream str;
 str << "textures/shadow" << std::setfill('0') << std::setw(2) << s 
<< ".png";
 std::string texName = str.str();
@@ -5147,6 +5161,10 @@ bool CEngine::GetDebugResources()
 void CEngine::SetDebugGoto(bool debugGoto)
 {
 m_debugGoto = debugGoto;
+if (!m_debugGoto)
+{
+m_displayGotoImage.reset();
+}
 }
 
 bool CEngine::GetDebugGoto()
@@ -5159,4 +5177,11 @@ void 
CEngine::AddDebugGotoLine(std::vector line)
 m_displayGoto.push_back(line);
 }
 
+void CEngine::SetDebugGotoBitmap(std::unique_ptr debugImage)
+{
+m_displayGotoImage = std::move(debugImage);
+m_firstGroundSpot = true; // Force ground spot texture reload
+UpdateGroundSpotTextures();
+}
+
 } // namespace Gfx
diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h
index 04757fc..a64b8c3 100644
--- a/src/graphics/engine/engine.h
+++ b/src/graphics/engine/engine.h
@@ -1194,6 +1194,7 @@ public:
 voidSetDebugGoto(bool debugGoto);
 boolGetDebugGoto();
 voidAddDebugGotoLine(std::vector line);
+voidSetDebugGotoBitmap(std::unique_ptr debugImage);
 
 protected:
 //! Resets some states and flushes textures after device was changed (e.g. 
resoulution changed)
@@ -1494,6 +1495,7 @@ protected:
 
 std::vector m_displayCrashSpheres;
 std::vector m_displayGoto;
+std::unique_ptr m_displayGotoImage;
 
 //! Pause the animation updates
 boolm_pause = false;
diff --git a/src/object/task/taskgoto.cpp b/src/object/task/taskgoto.cpp
index 7a6c754..de37d1a 100644
--- a/src/object/task/taskgoto.cpp
+++ b/src/object/task/taskgoto.cpp
@@ -22,6 +22,7 @@
 
 #include "common/event.h"
 #include "common/global.h"
+#include "common/image.h"
 #include "common/make_unique.h"
 
 #include "graphics/engine/terrain.h"
@@ -65,6 +66,9 @@ CTaskGoto::CTaskGoto(COldObject* object) : 
CForegroundTask(object)
 CTaskGoto::~CTaskGoto()
 {
 BitmapClose();
+
+if (m_engine->GetDebugGoto() && m_object->GetSelect())
+m_engine->SetDebugGotoBitmap(std::move(nullptr));
 }
 
 
@@ -105,6 +109,31 @@ bool CTaskGoto::EventProcess(const Event )
 debugLine.push_back(Gfx::VertexCol(m_object->GetPosition(), color));
 debugLine.push_back(Gfx::VertexCol(AdjustPoint(m_bmTotal > 0 && 
m_bmIndex <= m_bmTotal && m_phase != TGP_BEAMSEARCH ? m_bmPoints[m_bmIndex] : 
m_goal), color));
 m_engine->AddDebugGotoLine(debugLine);
+
+if (m_object->GetSelect() && m_bmChanged)
+{
+if (m_bmArray != nullptr)
+{
+std::unique_ptr debugImage = 
MakeUnique(Math::IntPoint(m_bmSize, m_bmSize));
+debugImage->Fill(Gfx::IntColor(255, 255, 255, 255));
+for (int x = 0; x < m_bmSize; x++)
+{
+for (int y = 0; y < m_bmSize; y++)
+{
+bool a = BitmapTestDot(0, x, y);
+bool b = BitmapTestDot(1, x, y);
+if (a || b)
+{
+Gfx::Color c = 

[colobot] 38/145: Fixed code style warnings

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 98dd9f90c8fec2129b5dcc59f56c3741315a9659
Author: krzys-h 
Date:   Sun Apr 3 13:06:39 2016 +0200

Fixed code style warnings
---
 src/object/auto/autohouston.cpp | 4 ++--
 src/ui/debug_menu.cpp   | 9 +
 src/ui/debug_menu.h | 5 +++--
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/object/auto/autohouston.cpp b/src/object/auto/autohouston.cpp
index 9ace408..2853be8 100644
--- a/src/object/auto/autohouston.cpp
+++ b/src/object/auto/autohouston.cpp
@@ -17,10 +17,10 @@
  * along with this program. If not, see http://gnu.org/licenses
  */
 
-
-#include 
 #include "object/auto/autohouston.h"
 
+#include "math/geometry.h"
+
 #include "object/old_object.h"
 
 #include "ui/controls/interface.h"
diff --git a/src/ui/debug_menu.cpp b/src/ui/debug_menu.cpp
index 88e62c1..9239038 100644
--- a/src/ui/debug_menu.cpp
+++ b/src/ui/debug_menu.cpp
@@ -26,9 +26,10 @@
 
 #include "level/robotmain.h"
 
-#include "object/object_create_params.h"
-#include "object/object_manager.h"
 #include "object/object.h"
+#include "object/object_manager.h"
+
+#include "sound/sound.h"
 
 #include "ui/controls/interface.h"
 #include "ui/controls/window.h"
@@ -62,7 +63,7 @@ void CDebugMenu::ToggleInterface()
 
 const Math::Point dim = Math::Point(33.0f/640.0f, 33.0f/480.0f);
 const float ox = 3.0f/640.0f, oy = 3.0f/480.0f;
-const float sx = 33.0f/640.0f, sy = 33.0f/480.0f;
+const float /*sx = 33.0f/640.0f,*/ sy = 33.0f/480.0f;
 
 void CDebugMenu::CreateInterface()
 {
@@ -426,4 +427,4 @@ bool CDebugMenu::HandleTeleport(Math::Point mousePos)
 return true;
 }
 
-}
\ No newline at end of file
+}
diff --git a/src/ui/debug_menu.h b/src/ui/debug_menu.h
index 2fb4b9d..a45623a 100644
--- a/src/ui/debug_menu.h
+++ b/src/ui/debug_menu.h
@@ -19,12 +19,13 @@
 
 #pragma once
 
-#include 
-#include 
+#include "math/point.h"
+
 #include "object/object_type.h"
 
 class CRobotMain;
 class CObjectManager;
+class CSoundInterface;
 struct Event;
 
 namespace Gfx

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 30/145: Appearance customization face butons fix

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 831276f37892fba73865be4e668d9dae68e1b3f2
Author: Smok94 
Date:   Sat Apr 2 13:13:42 2016 +0200

Appearance customization face butons fix

*face buttons 2 and 4 swaped.
*default hair colors now fit to buttons look
*changing face changes hair color do default

Fixes two first issues mentioned in the #724
---
 src/common/restext.cpp |  4 +--
 src/level/player_profile.cpp   | 55 +-
 src/level/player_profile.h |  1 +
 src/ui/screen/screen_apperance.cpp |  5 ++--
 4 files changed, 49 insertions(+), 16 deletions(-)

diff --git a/src/common/restext.cpp b/src/common/restext.cpp
index c1cd857..1ef4930 100644
--- a/src/common/restext.cpp
+++ b/src/common/restext.cpp
@@ -283,9 +283,9 @@ void InitializeRestext()
 stringsEvent[EVENT_INTERFACE_PCGb]  = TR("Green");
 stringsEvent[EVENT_INTERFACE_PCBb]  = TR("Blue");
 stringsEvent[EVENT_INTERFACE_PFACE1]= TR("\\Face 1");
-stringsEvent[EVENT_INTERFACE_PFACE2]= TR("\\Face 4");
+stringsEvent[EVENT_INTERFACE_PFACE2]= TR("\\Face 2");
 stringsEvent[EVENT_INTERFACE_PFACE3]= TR("\\Face 3");
-stringsEvent[EVENT_INTERFACE_PFACE4]= TR("\\Face 2");
+stringsEvent[EVENT_INTERFACE_PFACE4]= TR("\\Face 4");
 stringsEvent[EVENT_INTERFACE_PGLASS0]   = TR("\\No eyeglasses");
 stringsEvent[EVENT_INTERFACE_PGLASS1]   = TR("\\Eyeglasses 1");
 stringsEvent[EVENT_INTERFACE_PGLASS2]   = TR("\\Eyeglasses 2");
diff --git a/src/level/player_profile.cpp b/src/level/player_profile.cpp
index a34bfb5..7eba33c 100644
--- a/src/level/player_profile.cpp
+++ b/src/level/player_profile.cpp
@@ -38,9 +38,9 @@ void PlayerApperance::DefPerso()
 this->colorCombi.r = 206.0f/256.0f;
 this->colorCombi.g = 206.0f/256.0f;
 this->colorCombi.b = 204.0f/256.0f;  // ~white
-this->colorBand.r  = 255.0f/256.0f;
-this->colorBand.g  = 132.0f/256.0f;
-this->colorBand.b  =   1.0f/256.0f;  // orange
+this->colorBand.r = 255.0f / 256.0f;
+this->colorBand.g = 132.0f / 256.0f;
+this->colorBand.b = 1.0f / 256.0f;  // orange
 
 if ( this->face == 0 )  // normal ?
 {
@@ -52,23 +52,23 @@ void PlayerApperance::DefPerso()
 if ( this->face == 1 )  // bald ?
 {
 this->glasses = 0;
-this->colorHair.r =  83.0f/256.0f;
-this->colorHair.g =  64.0f/256.0f;
-this->colorHair.b =  51.0f/256.0f;  // brown
+this->colorHair.r = 74.0f / 256.0f;
+this->colorHair.g = 58.0f / 256.0f;
+this->colorHair.b = 46.0f / 256.0f;  // brown
 }
 if ( this->face == 2 )  // carlos ?
 {
 this->glasses = 1;
-this->colorHair.r =  85.0f/256.0f;
-this->colorHair.g =  48.0f/256.0f;
+this->colorHair.r = 70.0f / 256.0f;
+this->colorHair.g = 40.0f / 256.0f;
 this->colorHair.b =   9.0f/256.0f;  // brown
 }
-if ( this->face == 3 )  // blond ?
+if ( this->face == 3 )  // blond ? -> ginger ?
 {
 this->glasses = 4;
-this->colorHair.r = 255.0f/256.0f;
-this->colorHair.g = 255.0f/256.0f;
-this->colorHair.b = 181.0f/256.0f;  // yellow
+this->colorHair.r = 74.0f / 256.0f;
+this->colorHair.g = 16.0f / 256.0f;
+this->colorHair.b = 0.0f / 256.0f;  // yellow, changed to ginger
 }
 
 this->colorHair.a  = 0.0f;
@@ -76,6 +76,37 @@ void PlayerApperance::DefPerso()
 this->colorBand.a  = 0.0f;
 }
 
+void PlayerApperance::DefHairColor()
+{
+if (this->face == 0)  // normal ?
+{
+this->colorHair.r = 90.0f / 256.0f;
+this->colorHair.g = 95.0f / 256.0f;
+this->colorHair.b = 85.0f / 256.0f;  // black
+}
+if (this->face == 1)  // bald ?
+ {
+this->colorHair.r = 74.0f / 256.0f;
+this->colorHair.g = 58.0f / 256.0f;
+this->colorHair.b = 46.0f / 256.0f;  // brown
+}
+if (this->face == 2)  // carlos ?
+ {
+this->colorHair.r = 70.0f / 256.0f;
+this->colorHair.g = 40.0f / 256.0f;
+this->colorHair.b = 9.0f / 256.0f;  // brown
+}
+if (this->face == 3)  // blond ? -> ginger ?
+ {
+this->colorHair.r = 74.0f / 256.0f;
+this->colorHair.g = 16.0f / 256.0f;
+this->colorHair.b = 0.0f / 256.0f;  // yellow, changed to ginger
+}
+
+this->colorHair.a = 0.0f;
+}
+
+
 CPlayerProfile::CPlayerProfile(std::string playerName)
 {
 m_playerName = playerName;
diff --git a/src/level/player_profile.h b/src/level/player_profile.h
index 63bbfd7..fc198cb 100644
--- a/src/level/player_profile.h
+++ b/src/level/player_profile.h
@@ -42,6 +42,7 @@ struct PlayerApperance
 Gfx::Color   colorBand;  // strips color
 
 void DefPerso();
+void DefHairColor();
 };
 
 struct 

[colobot] 32/145: Merge branch 'master' into dev

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 02633e32c312443669b98aeaabe0db391dbd2634
Merge: 39b364f e77f9db
Author: krzys-h 
Date:   Sat Apr 2 23:55:32 2016 +0200

Merge branch 'master' into dev

 CMakeLists.txt   |  2 +-
 src/app/main.cpp | 15 +++
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --cc CMakeLists.txt
index 9de7ae9,e57e73a..c5edf93
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@@ -13,12 -13,12 +13,12 @@@ project(colobot C CXX
  set(COLOBOT_VERSION_CODENAME "Gold")
  set(COLOBOT_VERSION_MAJOR0)
  set(COLOBOT_VERSION_MINOR1)
- set(COLOBOT_VERSION_REVISION 7)
+ set(COLOBOT_VERSION_REVISION 7b)
  
  # Used on official releases
 -set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha")
 +#set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha")
  # Used on unreleased, development builds
 -#set(COLOBOT_VERSION_UNRELEASED "+alpha")
 +set(COLOBOT_VERSION_UNRELEASED "+alpha")
  
  # Append git characteristics to version
  if(DEFINED COLOBOT_VERSION_UNRELEASED)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 19/145: Changed CParticle::CheckChannel log message

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 427bbfa6307c8054f265dbd70d6ef880fe921c8b
Author: krzys-h 
Date:   Mon Mar 28 23:04:24 2016 +0200

Changed CParticle::CheckChannel log message
---
 src/graphics/engine/particle.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/graphics/engine/particle.cpp b/src/graphics/engine/particle.cpp
index 69b27e3..e9aa0ab 100644
--- a/src/graphics/engine/particle.cpp
+++ b/src/graphics/engine/particle.cpp
@@ -647,13 +647,13 @@ bool CParticle::CheckChannel(int )
 
 if (!m_particle[channel].used)
 {
-GetLogger()->Error("CheckChannel used=false !\n");
+GetLogger()->Error("CParticle::CheckChannel used=false !\n");
 return false;
 }
 
 if (m_particle[channel].uniqueStamp != uniqueStamp)
 {
-GetLogger()->Error("CheckChannel uniqueStamp !\n");
+GetLogger()->Error("CParticle::CheckChannel uniqueStamp !\n");
 return false;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 21/145: Merge branch 'dev-0.1.8' into dev

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 64fef98bd78e74fd3c58e35d852dc2bfd7d438ee
Merge: 1c5f477 427bbfa
Author: krzys-h 
Date:   Tue Mar 29 16:16:20 2016 +0200

Merge branch 'dev-0.1.8' into dev

 src/CMakeLists.txt|   1 +
 src/app/app.cpp   |   2 +-
 src/app/input.cpp |  20 +-
 src/common/config_file.h  |   4 +-
 src/common/event.cpp  |   2 +
 src/common/event.h|  31 ++-
 src/graphics/core/nulldevice.cpp  |   3 -
 src/graphics/core/nulldevice.h|  11 -
 src/graphics/engine/engine.cpp| 151 --
 src/graphics/engine/engine.h  |  28 ++-
 src/graphics/engine/lightning.cpp |  59 +++---
 src/graphics/engine/lightning.h   |   3 +
 src/graphics/engine/particle.cpp  |  12 +-
 src/graphics/engine/particle.h|   3 -
 src/graphics/engine/terrain.cpp   |  36 ++--
 src/graphics/engine/terrain.h |   2 +
 src/level/robotmain.cpp   | 240 ++---
 src/level/robotmain.h |  15 +-
 src/object/auto/autohouston.cpp   |  64 +++---
 src/object/task/taskgoto.cpp  |  66 +-
 src/object/task/taskgoto.h|   1 +
 src/ui/controls/target.cpp|   3 +-
 src/ui/debug_menu.cpp | 429 ++
 src/ui/debug_menu.h   |  70 +++
 24 files changed, 977 insertions(+), 279 deletions(-)


-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 22/145: Change SatCom button size in main menu

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 2ea453f484c75c9146296d904785c42e775fbe65
Author: Krzysztof Dermont 
Date:   Tue Mar 29 21:36:33 2016 +0200

Change SatCom button size in main menu

Change button size as proposed in issue #722
---
 src/ui/screen/screen_main_menu.cpp | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/ui/screen/screen_main_menu.cpp 
b/src/ui/screen/screen_main_menu.cpp
index fa016a3..ea8a29c 100644
--- a/src/ui/screen/screen_main_menu.cpp
+++ b/src/ui/screen/screen_main_menu.cpp
@@ -163,9 +163,11 @@ void CScreenMainMenu::CreateInterface()
 pl->SetFontSize(Gfx::FONT_SIZE_SMALL);
 
 // SatCom button
-pos.x = ox+sx*4.4f;
-pos.y = oy+sy*4.4f;
-pb = pw->CreateButton(pos, dim, 128+60, EVENT_INTERFACE_SATCOM);
+pos.x = ox+sx*4.3f;
+pos.y = oy+sy*4.3f;
+ddim.x = dim.x*1.2f;
+ddim.y = dim.y*1.2f;
+pb = pw->CreateButton(pos, ddim, 128+60, EVENT_INTERFACE_SATCOM);
 pb->SetState(STATE_SHADOW);
 
 SetBackground("textures/interface/interface.png");

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 28/145: Merge pull request #751 from OdyX/018-minor-fixes

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit d84304cba5dd9b87c014e9a663ea92f8fd61ae7a
Merge: ef0147e 761c854
Author: krzys_h 
Date:   Wed Mar 30 14:00:45 2016 +0200

Merge pull request #751 from OdyX/018-minor-fixes

Fix spelling error, and add Keywords to the desktop file

 desktop/colobot.ini|  2 +-
 desktop/create_desktop_file.sh |  2 +-
 desktop/po/colobot-desktop.pot |  8 +++-
 desktop/po/fr.po   | 10 --
 src/CBot/CBotProgram.h |  4 ++--
 src/CBot/CBotStack.h   |  2 +-
 src/app/signal_handlers.cpp|  4 ++--
 src/graphics/opengl/gl21device.cpp |  2 +-
 src/graphics/opengl/gl33device.cpp |  2 +-
 src/graphics/opengl/gldevice.cpp   |  2 +-
 src/graphics/opengl/glutil.cpp |  8 
 src/level/robotmain.cpp| 10 +-
 12 files changed, 34 insertions(+), 22 deletions(-)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 34/145: Fix desktop SVG icon not resizing properly

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 89389e82e8a6d999092497c68172c7d633a0fa88
Author: Piotr Dziwinski 
Date:   Sun Apr 3 15:18:46 2016 +1200

Fix desktop SVG icon not resizing properly

Workaround for librsvg bug
---
 desktop/CMakeLists.txt | 32 ++--
 desktop/colobot.svg|  1 +
 2 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt
index 93113ad..a452167 100644
--- a/desktop/CMakeLists.txt
+++ b/desktop/CMakeLists.txt
@@ -1,30 +1,34 @@
 cmake_minimum_required(VERSION 2.8)
 
-set(COLOBOT_ICON_FILE colobot.svg)
+set(COLOBOT_ICON_FILE ${CMAKE_CURRENT_SOURCE_DIR}/colobot.svg)
 
 # Render SVG icon in various sizes
 find_program(RSVG_CONVERT rsvg-convert)
-if(RSVG_CONVERT AND (PLATFORM_GNU OR PLATFORM_MACOSX))
-add_custom_target(png-icons ALL)
-foreach(PNGSIZE 512 256 128 48 32 16)
+find_program(XMLSTARLET xmlstarlet)
+if(RSVG_CONVERT AND XMLSTARLET AND (PLATFORM_GNU OR PLATFORM_MACOSX))
+add_custom_target(png-icons ALL DEPENDS ${COLOBOT_ICON_FILE})
+
+foreach(PNG_SIZE 512 256 128 48 32 16)
+# Using xmlstarlet to edit SVG file is a workaround for rsvg-convert 
bug (see: https://bugzilla.gnome.org/show_bug.cgi?id=762115)
 add_custom_command(
-OUTPUT ${PNGSIZE}/colobot.png
-COMMAND mkdir -p ${PNGSIZE}
-COMMAND ${RSVG_CONVERT} -w ${PNGSIZE} -h ${PNGSIZE} 
${CMAKE_CURRENT_SOURCE_DIR}/${COLOBOT_ICON_FILE} > ${PNGSIZE}/colobot.png
+OUTPUT ${PNG_SIZE}/colobot.png
+COMMAND mkdir -p ${PNG_SIZE}
+COMMAND ${XMLSTARLET} ed -u /*/@width -v ${PNG_SIZE} -u /*/@height 
-v ${PNG_SIZE} ${COLOBOT_ICON_FILE} > ${PNG_SIZE}/colobot.svg
+COMMAND ${RSVG_CONVERT} ${PNG_SIZE}/colobot.svg -o 
${PNG_SIZE}/colobot.png
 )
-add_custom_target(png-icon-${PNGSIZE} ALL DEPENDS 
${PNGSIZE}/colobot.png)
-add_dependencies(png-icons png-icon-${PNGSIZE})
+add_custom_target(png-icon-${PNG_SIZE} ALL DEPENDS 
${PNG_SIZE}/colobot.png)
+add_dependencies(png-icons png-icon-${PNG_SIZE})
 
 if(PLATFORM_GNU)
 install(
-FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGSIZE}/colobot.png
-DESTINATION 
${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/${PNGSIZE}x${PNGSIZE}/apps/
+FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNG_SIZE}/colobot.png
+DESTINATION 
${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/${PNG_SIZE}x${PNG_SIZE}/apps/
 )
 endif()
 # Prepare the ICNS icon generation
-list(APPEND ICNS_SRCS "${PNGSIZE}/colobot.png")
+list(APPEND ICNS_SRCS "${PNG_SIZE}/colobot.png")
 endforeach()
-
+
 # Pack icon for Mac OS
 find_program(PNG2ICNS png2icns)
 if(PNG2ICNS AND PLATFORM_MACOSX)
@@ -54,7 +58,7 @@ if(PLATFORM_GNU)
 
 # Install Icon
 install(
-FILES ${CMAKE_CURRENT_SOURCE_DIR}/${COLOBOT_ICON_FILE}
+FILES ${COLOBOT_ICON_FILE}
 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps/
 )
 
diff --git a/desktop/colobot.svg b/desktop/colobot.svg
index c514d6b..cb3ca35 100644
--- a/desktop/colobot.svg
+++ b/desktop/colobot.svg
@@ -12,6 +12,7 @@
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape;
width="32"
height="32"
+   viewBox="0 0 32 32"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 25/145: Merge pull request #750 from Erihel/dev

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit ef0147eb3749bce403f715b7758223b920c2d02d
Merge: 7e1b112 8ccad5b
Author: krzys_h 
Date:   Tue Mar 29 22:33:13 2016 +0200

Merge pull request #750 from Erihel/dev

Deactive pause before jumping to next visit

 src/level/robotmain.cpp | 6 ++
 1 file changed, 6 insertions(+)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 81/145: Fix RestoreState to assign IDs to instance vars

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit c19f97bc24c2c5532db84fd2ba6664fba22f8838
Author: melex750 
Date:   Tue May 24 10:09:44 2016 -0400

Fix RestoreState to assign IDs to instance vars
---
 src/CBot/CBotStack.cpp | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/src/CBot/CBotStack.cpp b/src/CBot/CBotStack.cpp
index 746976b..3170fb7 100644
--- a/src/CBot/CBotStack.cpp
+++ b/src/CBot/CBotStack.cpp
@@ -805,6 +805,8 @@ bool CBotVar::RestoreState(FILE* pf, CBotVar* )
 
 CBotToken token(name, std::string());
 
+bool isClass = false;
+
 switch (w)
 {
 case CBotTypInt:
@@ -826,6 +828,7 @@ bool CBotVar::RestoreState(FILE* pf, CBotVar* )
 
 // returns an intrinsic object or element of an array
 case CBotTypIntrinsic:
+isClass = true;
 case CBotTypArrayBody:
 {
 CBotTypResultr;
@@ -843,6 +846,17 @@ bool CBotVar::RestoreState(FILE* pf, CBotVar* )
 if ( !RestoreState(pf, 
(static_cast(pNew))->m_pVar)) return false;
 pNew->SetIdent(id);
 
+if (isClass && p == nullptr) // set id for each item in 
this instance
+{
+CBotVar* pVars = pNew->GetItemList();
+long itemId = 1;
+while (pVars != nullptr)
+{
+pVars->m_ident = itemId++;
+pVars = pVars->GetNext();
+}
+}
+
 if ( p != nullptr )
 {
 delete pNew;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 77/145: Renamed CGLDevice to CGL14Device

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 8922bb5e848be9dae6a272fa5a68057682c2661d
Author: Tomasz Kapuściński 
Date:   Wed May 11 14:50:18 2016 +0200

Renamed CGLDevice to CGL14Device
---
 src/CMakeLists.txt |   4 +-
 .../opengl/{gldevice.cpp => gl14device.cpp}| 152 ++---
 src/graphics/opengl/{gldevice.h => gl14device.h}   |  14 +-
 src/graphics/opengl/glutil.cpp |  10 +-
 4 files changed, 90 insertions(+), 90 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f619cac..bc6f12a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -205,12 +205,12 @@ set(BASE_SOURCES
 graphics/model/model_output.h
 graphics/model/model_shadow_spot.h
 graphics/model/model_triangle.h
+graphics/opengl/gl14device.cpp
+graphics/opengl/gl14device.h
 graphics/opengl/gl21device.cpp
 graphics/opengl/gl21device.h
 graphics/opengl/gl33device.cpp
 graphics/opengl/gl33device.h
-graphics/opengl/gldevice.cpp
-graphics/opengl/gldevice.h
 graphics/opengl/glframebuffer.cpp
 graphics/opengl/glframebuffer.h
 graphics/opengl/glutil.cpp
diff --git a/src/graphics/opengl/gldevice.cpp 
b/src/graphics/opengl/gl14device.cpp
similarity index 93%
rename from src/graphics/opengl/gldevice.cpp
rename to src/graphics/opengl/gl14device.cpp
index e28b6c2..7b93aaf 100644
--- a/src/graphics/opengl/gldevice.cpp
+++ b/src/graphics/opengl/gl14device.cpp
@@ -18,7 +18,7 @@
  */
 
 
-#include "graphics/opengl/gldevice.h"
+#include "graphics/opengl/gl14device.h"
 
 #include "common/config.h"
 
@@ -43,22 +43,22 @@
 namespace Gfx
 {
 
-CGLDevice::CGLDevice(const DeviceConfig )
+CGL14Device::CGL14Device(const DeviceConfig )
 : m_config(config)
 {}
 
-CGLDevice::~CGLDevice()
+CGL14Device::~CGL14Device()
 {
 }
 
-void CGLDevice::DebugHook()
+void CGL14Device::DebugHook()
 {
 /* This function is only called here, so it can be used
  * as a breakpoint when debugging using gDEBugger */
 glColor3i(0, 0, 0);
 }
 
-void CGLDevice::DebugLights()
+void CGL14Device::DebugLights()
 {
 Gfx::ColorHSV color(0.0, 1.0, 1.0);
 
@@ -158,12 +158,12 @@ void CGLDevice::DebugLights()
 UpdateModelviewMatrix();
 }
 
-std::string CGLDevice::GetName()
+std::string CGL14Device::GetName()
 {
 return std::string("OpenGL 1.4");
 }
 
-bool CGLDevice::Create()
+bool CGL14Device::Create()
 {
 GetLogger()->Info("Creating CDevice - OpenGL 1.4\n");
 
@@ -382,7 +382,7 @@ bool CGLDevice::Create()
 return true;
 }
 
-void CGLDevice::Destroy()
+void CGL14Device::Destroy()
 {
 // delete framebuffers
 for (auto& framebuffer : m_framebuffers)
@@ -404,7 +404,7 @@ void CGLDevice::Destroy()
 m_textureStageParams.clear();
 }
 
-void CGLDevice::ConfigChanged(const DeviceConfig& newConfig)
+void CGL14Device::ConfigChanged(const DeviceConfig& newConfig)
 {
 m_config = newConfig;
 
@@ -423,7 +423,7 @@ void CGLDevice::ConfigChanged(const DeviceConfig& newConfig)
 m_framebuffers["default"] = 
MakeUnique(framebufferParams);
 }
 
-void CGLDevice::BeginScene()
+void CGL14Device::BeginScene()
 {
 Clear();
 
@@ -433,7 +433,7 @@ void CGLDevice::BeginScene()
 UpdateModelviewMatrix();
 }
 
-void CGLDevice::EndScene()
+void CGL14Device::EndScene()
 {
 #ifdef DEV_BUILD
 int count = ClearGLErrors();
@@ -443,18 +443,18 @@ void CGLDevice::EndScene()
 #endif
 }
 
-void CGLDevice::Clear()
+void CGL14Device::Clear()
 {
 glDepthMask(GL_TRUE);
 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 }
 
-void CGLDevice::SetRenderMode(RenderMode mode)
+void CGL14Device::SetRenderMode(RenderMode mode)
 {
 // nothing is done
 }
 
-void CGLDevice::SetTransform(TransformType type, const Math::Matrix )
+void CGL14Device::SetTransform(TransformType type, const Math::Matrix )
 {
 if  (type == TRANSFORM_WORLD)
 {
@@ -492,7 +492,7 @@ void CGLDevice::SetTransform(TransformType type, const 
Math::Matrix )
 }
 }
 
-void CGLDevice::UpdateModelviewMatrix()
+void CGL14Device::UpdateModelviewMatrix()
 {
 glMatrixMode(GL_MODELVIEW);
 glLoadIdentity();
@@ -507,7 +507,7 @@ void CGLDevice::UpdateModelviewMatrix()
 }
 }
 
-void CGLDevice::SetMaterial(const Material )
+void CGL14Device::SetMaterial(const Material )
 {
 m_material = material;
 
@@ -516,12 +516,12 @@ void CGLDevice::SetMaterial(const Material )
 glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, m_material.specular.Array());
 }
 
-int CGLDevice::GetMaxLightCount()
+int CGL14Device::GetMaxLightCount()
 {
 return m_lights.size();
 }
 
-void CGLDevice::SetLight(int index, const Light )
+void CGL14Device::SetLight(int index, const Light )
 {
 assert(index >= 0);
 assert(index < static_cast( m_lights.size() ));
@@ -550,7 +550,7 @@ void CGLDevice::SetLight(int index, const Light )
 

[colobot] 85/145: Added Jenkinsfile

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 261b26c8e9b2f81a4028d1264379b2da00b87cf0
Author: krzys-h 
Date:   Fri May 27 18:30:56 2016 +0200

Added Jenkinsfile
---
 Jenkinsfile | 49 +
 1 file changed, 49 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 000..a0431a6
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,49 @@
+node('master') {
+stage 'Pull changes'
+checkout scm
+
+stage 'Build Windows'
+sh 'mkdir -p build/windows'
+dir('build/windows') {
+sh '''
+cmake \
+-DCMAKE_INSTALL_PREFIX=/install \
+
-DCMAKE_TOOLCHAIN_FILE=/opt/mxe/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake
 \
+-DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 
-DTOOLS=1 -DTESTS=0 ../..
+make
+rm -rf install
+DESTDIR=. make install
+'''
+}
+sh 'rm -f windows-debug.zip'
+zip zipFile: 'windows-debug.zip', archive: true, dir: 
'build/windows/install'
+
+stage 'Build Linux'
+sh 'mkdir -p build/linux'
+dir('build/linux') {
+sh '''
+cmake \
+-DCMAKE_INSTALL_PREFIX=/install 
-DCOLOBOT_INSTALL_BIN_DIR=/install -DCOLOBOT_INSTALL_LIB_DIR=/install 
-DCOLOBOT_INSTALL_DATA_DIR=/install/data 
-DCOLOBOT_INSTALL_I18N_DIR=/install/lang \
+-DBOOST_STATIC=ON -DGLEW_STATIC=ON 
-DGLEW_LIBRARY=/usr/lib64/libGLEW.a \
+-DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 
-DTOOLS=1 -DTESTS=1 -DDESKTOP=0 ../..
+make
+rm -rf install
+DESTDIR=. make install
+'''
+}
+sh 'rm -f linux-debug.zip'
+zip zipFile: 'linux-debug.zip', archive: true, dir: 'build/linux/install'
+
+stage 'Doxygen'
+dir('build/linux') {
+sh 'make doc'
+}
+publishHTML target: [$class: 'HtmlPublisherTarget', reportName: 'Doxygen', 
reportDir: 'build/linux/doc/html', reportFiles: 'index.html']
+
+stage 'Run tests'
+dir('build/linux') {
+sh './colobot_ut --gtest_output=xml:gtestresults.xml || true'
+}
+step([$class: 'XUnitBuilder', testTimeMargin: '3000', thresholdMode: 1, 
thresholds: [[$class: 'FailedThreshold', failureNewThreshold: '', 
failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '0'], 
[$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', 
unstableNewThreshold: '', unstableThreshold: '']], tools: [[$class: 
'GoogleTestType', deleteOutputFiles: true, failIfNotNew: true, pattern: 
'build/linux/gtestresults.xml', skipNoTestFiles: false, stopP [...]
+}
+

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 78/145: Added blur effect when the game is paused (issue #656)

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 213fd6b203c82156fef49e8d77e1a4c719e53a19
Author: Tomasz Kapuściński 
Date:   Sat May 21 14:27:35 2016 +0200

Added blur effect when the game is paused (issue #656)

Might be unstable, needs more testing. To enable, add PauseBlur=1 to 
[Experimental] section in colobot.ini
---
 src/common/settings.cpp|   4 +
 src/graphics/engine/engine.cpp | 175 -
 src/graphics/engine/engine.h   |  17 
 src/level/robotmain.cpp|   4 +
 src/math/func.h|   9 +++
 5 files changed, 206 insertions(+), 3 deletions(-)

diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index 2b67ef1..1003984 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -112,6 +112,7 @@ void CSettings::SaveSettings()
 
 // Experimental settings
 GetConfigFile().SetBoolProperty("Experimental", "TerrainShadows", 
engine->GetTerrainShadows());
+GetConfigFile().SetBoolProperty("Experimental", "PauseBlur", 
engine->GetPauseBlur());
 
 CInput::GetInstancePointer()->SaveKeyBindings();
 
@@ -270,6 +271,9 @@ void CSettings::LoadSettings()
 if (GetConfigFile().GetBoolProperty("Experimental", "TerrainShadows", 
bValue))
 engine->SetTerrainShadows(bValue);
 
+if (GetConfigFile().GetBoolProperty("Experimental", "PauseBlur", bValue))
+engine->SetPauseBlur(bValue);
+
 CInput::GetInstancePointer()->LoadKeyBindings();
 
 
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index aeb6dcb..b7d0e56 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -59,6 +59,7 @@
 #include "ui/controls/interface.h"
 
 #include 
+#include 
 #include 
 
 template<> Gfx::CEngine* CSingleton::m_instance = nullptr;
@@ -148,6 +149,7 @@ CEngine::CEngine(CApplication *app, CSystemUtils* 
systemUtils)
 m_editIndentMode = true;
 m_editIndentValue = 4;
 m_tracePrecision = 1.0f;
+m_pauseBlur = false;
 
 
 m_updateGeometry = false;
@@ -3028,6 +3030,16 @@ EngineMouseType CEngine::GetMouseType()
 return m_mouseType;
 }
 
+void CEngine::SetPauseBlur(bool enable)
+{
+m_pauseBlur = enable;
+}
+
+bool CEngine::GetPauseBlur()
+{
+return m_pauseBlur;
+}
+
 const Math::Matrix& CEngine::GetMatView()
 {
 return m_matView;
@@ -3066,6 +3078,10 @@ void CEngine::UpdateMatProj()
 void CEngine::ApplyChange()
 {
 SetFocus(m_focus);
+
+// recapture 3D scene
+if (m_worldCaptured)
+m_captureWorld = true;
 }
 
 void CEngine::ClearDisplayCrashSpheres()
@@ -3137,8 +3153,8 @@ void CEngine::Render()
 
 UseMSAA(true);
 
-DrawBackground();// draws the background
-
+if (!m_worldCaptured)
+DrawBackground();// draws the background
 
 if (m_drawWorld)
 Draw3DScene();
@@ -3155,6 +3171,33 @@ void CEngine::Render()
 
 void CEngine::Draw3DScene()
 {
+// use currently captured scene for world
+if (m_worldCaptured)
+{
+Math::Matrix identity;
+
+m_device->SetTransform(TRANSFORM_PROJECTION, identity);
+m_device->SetTransform(TRANSFORM_VIEW, identity);
+m_device->SetTransform(TRANSFORM_WORLD, identity);
+
+Vertex vertices[4];
+
+vertices[0] = Vertex(Math::Vector(-1.0f, -1.0f, 0.0f), 
Math::Vector(0.0f, 1.0f, 0.0f), Math::Point(0.0f, 0.0f));
+vertices[1] = Vertex(Math::Vector( 1.0f, -1.0f, 0.0f), 
Math::Vector(0.0f, 1.0f, 0.0f), Math::Point(1.0f, 0.0f));
+vertices[2] = Vertex(Math::Vector(-1.0f,  1.0f, 0.0f), 
Math::Vector(0.0f, 1.0f, 0.0f), Math::Point(0.0f, 1.0f));
+vertices[3] = Vertex(Math::Vector( 1.0f,  1.0f, 0.0f), 
Math::Vector(0.0f, 1.0f, 0.0f), Math::Point(1.0f, 1.0f));
+
+m_device->SetRenderState(RENDER_STATE_DEPTH_TEST, false);
+
+m_device->SetTexture(TEXTURE_PRIMARY, m_capturedWorldTexture);
+m_device->SetTextureEnabled(TEXTURE_PRIMARY, true);
+m_device->SetTextureEnabled(TEXTURE_SECONDARY, false);
+
+m_device->DrawPrimitive(PRIMITIVE_TRIANGLE_STRIP, vertices, 4);
+
+return;
+}
+
 m_device->SetRenderState(RENDER_STATE_DEPTH_TEST, false);
 
 UpdateGroundSpotTextures();
@@ -3237,7 +3280,6 @@ void CEngine::Draw3DScene()
 if (!m_shadowMapping)
 DrawShadowSpots();
 
-
 m_app->StopPerformanceCounter(PCNT_RENDER_TERRAIN);
 
 // Draw other objects
@@ -3407,6 +3449,117 @@ void CEngine::Draw3DScene()
 DrawForegroundImage();   // draws the foreground
 
 if (! m_overFront) DrawOverColor();  // draws the foreground color
+
+// marked to capture currently rendered world
+if (m_captureWorld)
+{
+// destroy existing texture
+if (m_capturedWorldTexture.Valid())
+{
+m_device->DestroyTexture(m_capturedWorldTexture);
+

[colobot] 90/145: Don't scale mouse cursor with resolution

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit aa159bc9b07d7f0dd776ec5a5a398f5e40a12c71
Author: krzys-h 
Date:   Sat May 28 00:43:14 2016 +0200

Don't scale mouse cursor with resolution
---
 src/graphics/engine/engine.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index 5e773dc..d866673 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -177,7 +177,7 @@ CEngine::CEngine(CApplication *app, CSystemUtils* 
systemUtils)
 m_mice[ENG_MOUSE_SCROLLU] = EngineMouse(28, 29, 45, 
ENG_RSTATE_TTEXTURE_BLACK, ENG_RSTATE_TTEXTURE_WHITE, Math::Point( 9.0f,  
2.0f));
 m_mice[ENG_MOUSE_SCROLLD] = EngineMouse(30, 31, 46, 
ENG_RSTATE_TTEXTURE_BLACK, ENG_RSTATE_TTEXTURE_WHITE, Math::Point( 9.0f, 
17.0f));
 
-m_mouseSize= Math::Point(0.04f, 0.04f * (800.0f / 600.0f));
+m_mouseSize= Math::Point(48.f/m_size.x, 48.f/m_size.x * (800.f/600.f));
 m_mouseType= ENG_MOUSE_NORM;
 
 m_fpsCounter = 0;
@@ -280,7 +280,7 @@ void CEngine::SetTerrain(CTerrain* terrain)
 bool CEngine::Create()
 {
 m_size = m_app->GetVideoConfig().size;
-m_mouseSize = Math::Point(0.04f, 0.04f * (static_cast(m_size.x) / 
static_cast(m_size.y)));
+m_mouseSize = Math::Point(48.f/m_size.x, 48.f/m_size.x * 
(static_cast(m_size.x) / static_cast(m_size.y)));
 
 // Use the setters to set defaults, because they automatically disable 
what is not supported
 SetShadowMapping(m_shadowMapping);
@@ -359,7 +359,7 @@ void CEngine::Destroy()
 void CEngine::ResetAfterVideoConfigChanged()
 {
 m_size = m_app->GetVideoConfig().size;
-m_mouseSize = Math::Point(0.04f, 0.04f * (static_cast(m_size.x) / 
static_cast(m_size.y)));
+m_mouseSize = Math::Point(48.f/m_size.x, 48.f/m_size.x * 
(static_cast(m_size.x) / static_cast(m_size.y)));
 
 // Update the camera projection matrix for new aspect ratio
 ApplyChange();

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 60/145: Refactored part of CScript to std::string

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit bd9184bd92d60986eabe298f2b4479a52f2d2219
Author: krzys-h 
Date:   Fri Apr 8 22:27:42 2016 +0200

Refactored part of CScript to std::string
---
 src/script/script.cpp   | 62 +++--
 src/script/script.h | 12 -
 src/ui/object_interface.cpp | 14 +-
 3 files changed, 33 insertions(+), 55 deletions(-)

diff --git a/src/script/script.cpp b/src/script/script.cpp
index 924081d..4f7bf32 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -70,11 +70,8 @@ CScript::CScript(COldObject* object)
 m_bRun = false;
 m_bStepMode = false;
 m_bCompile = false;
-m_title[0] = 0;
-m_mainFunction[0] = 0;
 m_cursor1 = 0;
 m_cursor2 = 0;
-m_filename[0] = 0;
 }
 
 // Object's destructor.
@@ -159,8 +156,8 @@ bool CScript::CheckToken()
 if ( !m_object->GetCheckToken() )  return true;
 
 m_error = CBot::CBotNoErr;
-m_title[0] = 0;
-m_mainFunction[0] = 0;
+m_title.clear();
+m_mainFunction.clear();
 m_token.clear();
 m_bCompile = false;
 
@@ -206,8 +203,8 @@ bool CScript::CheckToken()
 m_tokenUsed = used[it.first];
 m_tokenAllowed = allowed;
 m_error = static_cast(error);
-strcpy(m_title, "");
-m_mainFunction[0] = 0;
+m_title = "";
+m_mainFunction.clear();
 return false;
 }
 }
@@ -220,14 +217,13 @@ bool CScript::CheckToken()
 bool CScript::Compile()
 {
 std::vector functionList;
-int i;
 std::string p;
 
 m_error = CBot::CBotNoErr;
 m_cursor1 = 0;
 m_cursor2 = 0;
-m_title[0] = 0;
-m_mainFunction[0] = 0;
+m_title.clear();
+m_mainFunction.clear();
 m_bCompile = false;
 
 if ( IsEmpty() )  // program exist?
@@ -245,33 +241,17 @@ bool CScript::Compile()
 {
 if (functionList.empty())
 {
-strcpy(m_title, "");
-m_mainFunction[0] = 0;
+m_title = "";
+m_mainFunction.clear();
 }
 else
 {
-p = functionList[0];
-i = 0;
-bool titleDone = false;
-while ( true )
+m_mainFunction = functionList[0];
+m_title = m_mainFunction;
+if (m_title.length() >= 20)
 {
-if ( p[i] == 0 || p[i] == '(' )  break;
-if ( i >= 20 && !titleDone )
-{
-m_title[i+0] = '.';
-m_title[i+1] = '.';
-m_title[i+2] = '.';
-m_title[i+3] = 0;
-titleDone = true;
-}
-if(!titleDone)
-m_title[i] = p[i];
-m_mainFunction[i] = p[i];
-i ++;
+m_title = m_title.substr(0, 20)+"...";
 }
-if(!titleDone)
-m_title[i] = 0;
-m_mainFunction[i] = p[i];
 }
 m_bCompile = true;
 return true;
@@ -289,8 +269,8 @@ bool CScript::Compile()
 {
 m_cursor1 = m_cursor2 = 0;
 }
-strcpy(m_title, "");
-m_mainFunction[0] = 0;
+m_title = "";
+m_mainFunction.clear();
 return false;
 }
 }
@@ -298,9 +278,9 @@ bool CScript::Compile()
 
 // Returns the title of the script.
 
-void CScript::GetTitle(char* buffer)
+const std::string& CScript::GetTitle()
 {
-strcpy(buffer, m_title);
+return m_title;
 }
 
 
@@ -323,9 +303,9 @@ bool CScript::Run()
 {
 if (m_botProg == nullptr)  return false;
 if ( m_script == nullptr || m_len == 0 )  return false;
-if ( m_mainFunction[0] == 0 ) return false;
+if ( m_mainFunction.empty() ) return false;
 
-if ( !m_botProg->Start(m_mainFunction) )  return false;
+if ( !m_botProg->Start(m_mainFunction.c_str()) )  return false;
 
 m_bRun = true;
 m_bContinue = false;
@@ -1024,12 +1004,12 @@ bool CScript::Compare(CScript* other)
 
 // Management of the file name when the script is saved.
 
-void CScript::SetFilename(char *filename)
+void CScript::SetFilename(const std::string& filename)
 {
-strcpy(m_filename, filename);
+m_filename = filename;
 }
 
-char* CScript::GetFilename()
+const std::string& CScript::GetFilename()
 {
 return m_filename;
 }
diff --git a/src/script/script.h b/src/script/script.h
index a114171..deed0c6 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -66,7 +66,7 @@ public:
 boolGetScript(Ui::CEdit* edit);
 boolGetCompile();
 
-voidGetTitle(char* buffer);
+const std::string& GetTitle();
 
 voidSetStepMode(bool bStep);
 boolGetStepMode();
@@ -92,8 +92,8 @@ public:
 boolWriteStack(FILE *file);
 

[colobot] 57/145: Fix compile warning

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit ed58e7e012b61d1b24c445ab058080afd786ca4d
Author: krzys-h 
Date:   Fri Apr 8 21:16:03 2016 +0200

Fix compile warning
---
 src/level/robotmain.cpp | 3 ++-
 src/level/robotmain.h   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index b3c34de..848804f 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -5056,7 +5056,8 @@ Error 
CRobotMain::ProcessEndMissionTakeForGroup(std::vector
 return finalResult;
 }
 
-Error CRobotMain::ProcessEndMissionTake()
+//! Process EndMissionTake commands, result is stored in m_missionResult
+void CRobotMain::ProcessEndMissionTake()
 {
 // Sort end conditions by teams
 std::map> teams;
diff --git a/src/level/robotmain.h b/src/level/robotmain.h
index 4f78df3..d3294b3 100644
--- a/src/level/robotmain.h
+++ b/src/level/robotmain.h
@@ -197,7 +197,7 @@ public:
 voidUpdateAudio(bool frame);
 voidSetMissionResultFromScript(Error result, float delay);
 Error   CheckEndMission(bool frame);
-Error   ProcessEndMissionTake();
+voidProcessEndMissionTake();
 Error   
ProcessEndMissionTakeForGroup(std::vector& endTakes);
 int GetObligatoryToken();
 char*   GetObligatoryToken(int i);

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 48/145: Fix array in a class not working with sizeof()...

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 748f0034bd613f587607be9e761cca0347d06059
Author: melex750 
Date:   Tue Apr 5 14:28:36 2016 -0400

Fix array in a class not working with sizeof()...

...when no assignment is made in the definition.

It should pass this unit test now:
TEST_F(CBotUT, DISABLED_ArraysInClasses)
---
 src/CBot/CBotClass.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/CBot/CBotClass.cpp b/src/CBot/CBotClass.cpp
index 1995dd9..70c72ef 100644
--- a/src/CBot/CBotClass.cpp
+++ b/src/CBot/CBotClass.cpp
@@ -22,6 +22,7 @@
 #include "CBot/CBotInstr/CBotInstrUtils.h"
 #include "CBot/CBotInstr/CBotNew.h"
 #include "CBot/CBotInstr/CBotLeftExprVar.h"
+#include "CBot/CBotInstr/CBotExprLitNull.h"
 #include "CBot/CBotInstr/CBotTwoOpExpr.h"
 #include "CBot/CBotInstr/CBotFunction.h"
 #include "CBot/CBotInstr/CBotExpression.h"
@@ -722,6 +723,7 @@ bool CBotClass::CompileDefItem(CBotToken* , CBotCStack* 
pStack, bool bSecond)
 }
 if ( !pStack->IsOk() ) return false;
 }
+else if ( type2.Eq(CBotTypArrayPointer) ) i = new 
CBotExprLitNull();
 
 
 if ( !bSecond )

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 64/145: Updated data submodule

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit e75ed79fb5cb65431f5826a544164bba542035cf
Author: krzys-h 
Date:   Sat Apr 9 18:47:26 2016 +0200

Updated data submodule
---
 data | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data b/data
index 17b8846..229394c 16
--- a/data
+++ b/data
@@ -1 +1 @@
-Subproject commit 17b8846ac97a26de006c456fe645724199155403
+Subproject commit 229394cda28955dfa6ec554c58365d11c647f55c

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 70/145: Fix checking parameters in CBotFunction

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit e7942962d3b351119fd9beed7b2c1f5ff6ba3392
Author: melex750 
Date:   Tue Apr 19 10:36:06 2016 -0400

Fix checking parameters in CBotFunction
---
 src/CBot/CBotInstr/CBotFunction.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/CBot/CBotInstr/CBotFunction.cpp 
b/src/CBot/CBotInstr/CBotFunction.cpp
index 4c016d3..4c15a41 100644
--- a/src/CBot/CBotInstr/CBotFunction.cpp
+++ b/src/CBot/CBotInstr/CBotFunction.cpp
@@ -840,8 +840,8 @@ bool CBotFunction::CheckParam(CBotDefParam* pParam)
 CBotDefParam*   pp = m_param;
 while ( pp != nullptr && pParam != nullptr )
 {
-CBotTypResult type1 = pp->GetType();
-CBotTypResult type2 = pParam->GetType();
+CBotTypResult type1 = pp->GetTypResult();
+CBotTypResult type2 = pParam->GetTypResult();
 if ( !type1.Compare(type2) ) return false;
 pp = pp->GetNext();
 pParam = pParam->GetNext();

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 62/145: Proper l10n for date/time

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 139592bc00534dabe4709b1baf5be6aa260edee7
Author: krzys-h 
Date:   Sat Apr 9 18:23:57 2016 +0200

Proper l10n for date/time
---
 src/app/app.cpp  |  8 --
 src/common/misc.cpp  | 54 
 src/common/misc.h|  4 ---
 src/level/parser/parserparam.cpp |  4 +++
 src/level/parser/parserparam.h   |  1 +
 src/level/robotmain.cpp  |  5 ++--
 src/ui/screen/screen_io.cpp  |  2 +-
 src/ui/studio.cpp| 11 
 8 files changed, 21 insertions(+), 68 deletions(-)

diff --git a/src/app/app.cpp b/src/app/app.cpp
index 4313550..5cc047a 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -1813,9 +1813,13 @@ void CApplication::SetLanguage(Language language)
 
 char* defaultLocale = setlocale(LC_ALL, ""); // Load system locale
 GetLogger()->Debug("Default system locale: %s\n", defaultLocale);
+if (!locale.empty()) // Override system locale?
+{
+setlocale(LC_ALL, locale.c_str());
+}
 setlocale(LC_NUMERIC, "C"); // Force numeric locale to "C" (fixes decimal 
point problems)
-char* systemLocale = setlocale(LC_ALL, nullptr); // Get current locale 
configuration
-GetLogger()->Debug("Setting locale: %s\n", systemLocale);
+std::string systemLocale = setlocale(LC_ALL, nullptr); // Get current 
locale configuration
+GetLogger()->Debug("Setting locale: %s\n", systemLocale.c_str());
 // Update C++ locale
 try
 {
diff --git a/src/common/misc.cpp b/src/common/misc.cpp
index e96f58e..578b4a6 100644
--- a/src/common/misc.cpp
+++ b/src/common/misc.cpp
@@ -186,55 +186,6 @@ char GetToLower(char letter)
 return tolower(letter);
 }
 
-
-// Converting time to string.
-
-void TimeToAscii(time_t time, char *buffer)
-{
-struct tm   when;
-int year;
-
-when = *localtime();
-year = when.tm_year+1900;
-if ( year < 2000 )  year -= 1900;
-elseyear -= 2000;
-charformat[10];
-int hour;
-
-hour = when.tm_hour;  // 0..23
-if ( hour < 12 )  // morning?
-{
-strcpy(format, "am");
-}
-else// afternoon?
-{
-strcpy(format, "pm");
-hour -= 12;  // 0..11
-}
-if ( hour == 0 )  hour = 12;
-
-sprintf(buffer, "%.2d.%.2d.%.2d %.2d:%.2d %s",
-when.tm_mon+1, when.tm_mday, year,
-hour, when.tm_min, format);
-}
-
-// Converting time to string.
-
-void TimeToAsciiClean(time_t time, char *buffer)
-{
-struct tm   when;
-int year;
-
-when = *localtime();
-year = when.tm_year+1900;
-if ( year < 2000 )  year -= 1900;
-elseyear -= 2000;
-
-sprintf(buffer, "%.2d%.2d%.2d%.2d%.2d",
-year, when.tm_mon+1, when.tm_mday,
-when.tm_hour, when.tm_min);
-}
-
 std::string TimeFormat(float time)
 {
 int minutes = floor(time/60);
@@ -254,8 +205,3 @@ void AddExt(char* filename, const char* ext)
 if ( strchr(filename, '.') != nullptr )  return;  // already an extension?
 strcat(filename, ext);
 }
-
-int GetCurrentTimestamp()
-{
-return std::chrono::seconds(std::time(nullptr)).count();
-}
diff --git a/src/common/misc.h b/src/common/misc.h
index d292781..4177f3d 100644
--- a/src/common/misc.h
+++ b/src/common/misc.h
@@ -31,10 +31,6 @@ extern char GetNoAccent(char letter);
 extern char GetToUpper(char letter);
 extern char GetToLower(char letter);
 
-extern void TimeToAscii(time_t time, char *buffer);
-extern void TimeToAsciiClean(time_t time, char *buffer);
 extern std::string TimeFormat(float time);
 
 extern void AddExt(char* filename, const char* ext);
-
-extern int GetCurrentTimestamp();
diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp
index 317d388..82e6e49 100644
--- a/src/level/parser/parserparam.cpp
+++ b/src/level/parser/parserparam.cpp
@@ -50,6 +50,10 @@ CLevelParserParam::CLevelParserParam(int value)
   : m_value(boost::lexical_cast(value))
 {}
 
+CLevelParserParam::CLevelParserParam(long value)
+: m_value(boost::lexical_cast(value))
+{}
+
 CLevelParserParam::CLevelParserParam(float value)
   : m_value(boost::lexical_cast(value))
 {}
diff --git a/src/level/parser/parserparam.h b/src/level/parser/parserparam.h
index f620d84..55a2f44 100644
--- a/src/level/parser/parserparam.h
+++ b/src/level/parser/parserparam.h
@@ -54,6 +54,7 @@ public:
 //! Create param with given value
 //@{
 CLevelParserParam(int value);
+CLevelParserParam(long value);
 CLevelParserParam(float value);
 CLevelParserParam(std::string value);
 CLevelParserParam(bool value);
diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index b59cc1f..e2afb5b 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -4646,7 

[colobot] 59/145: Improvements to ObligatoryToken/ProhibitedToken

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 7f38aca7660f5ba80a259537d9bee7c0cecdb3f1
Author: krzys-h 
Date:   Fri Apr 8 22:15:54 2016 +0200

Improvements to ObligatoryToken/ProhibitedToken

Now you can specify exactly how many times given instruction can occur
---
 po/colobot.pot  | 12 ++---
 po/de.po| 24 -
 po/fr.po| 24 -
 po/pl.po| 24 -
 po/ru.po| 24 -
 src/common/restext.cpp  |  4 +--
 src/level/robotmain.cpp | 69 +
 src/level/robotmain.h   | 16 ++--
 src/script/script.cpp   | 58 ++---
 src/script/script.h |  3 ++-
 10 files changed, 143 insertions(+), 115 deletions(-)

diff --git a/po/colobot.pot b/po/colobot.pot
index 1c4e61e..442beb4 100644
--- a/po/colobot.pot
+++ b/po/colobot.pot
@@ -611,13 +611,13 @@ msgstr ""
 msgid "\\Face 1"
 msgstr ""
 
-msgid "\\Face 4"
+msgid "\\Face 2"
 msgstr ""
 
 msgid "\\Face 3"
 msgstr ""
 
-msgid "\\Face 2"
+msgid "\\Face 4"
 msgstr ""
 
 msgid "\\No eyeglasses"
@@ -1519,10 +1519,11 @@ msgid "Unable to control enemy objects"
 msgstr ""
 
 #, c-format
-msgid "\"%s\" missing in this exercise"
+msgid "You have to use \"%s\" at least %d times in this exercise (used: %d)"
 msgstr ""
 
-msgid "Do not use in this exercise"
+#, c-format
+msgid "You have to use \"%s\" at most %d times in this exercise (used: %d)"
 msgstr ""
 
 msgid "Inappropriate bot"
@@ -1738,6 +1739,9 @@ msgstr ""
 msgid "Public required"
 msgstr ""
 
+msgid "expression expected after ="
+msgstr ""
+
 msgid "Dividing by zero"
 msgstr ""
 
diff --git a/po/de.po b/po/de.po
index d008dfa..300d209 100644
--- a/po/de.po
+++ b/po/de.po
@@ -61,10 +61,6 @@ msgstr "Es fehlt eine offene eckige Klammer \" [ \""
 msgid "\" ] \" missing"
 msgstr "Es fehlt eine geschlossene eckige Klammer \" ] \""
 
-#, c-format
-msgid "\"%s\" missing in this exercise"
-msgstr "Es fehlt \"%s\" in Ihrem Programm"
-
 msgid "..behind"
 msgstr "..hinten"
 
@@ -491,9 +487,6 @@ msgstr "Bildschirm\\Driver und Bildschirmauflösung"
 msgid "Dividing by zero"
 msgstr "Teilung durch Null"
 
-msgid "Do not use in this exercise"
-msgstr "In dieser Übung verboten"
-
 msgid "Do you really want to destroy the selected building?"
 msgstr "Wollen Sie das angewählte Gebäude wirklich zerstören ?"
 
@@ -1715,6 +1708,14 @@ msgstr "Sie können unter Wasser nichts tragen"
 msgid "You found a usable object"
 msgstr "Sie haben ein brauchbares Objekt gefunden"
 
+#, c-format
+msgid "You have to use \"%s\" at least %d times in this exercise (used: %d)"
+msgstr ""
+
+#, c-format
+msgid "You have to use \"%s\" at most %d times in this exercise (used: %d)"
+msgstr ""
+
 msgid "You must get on the spaceship to take off "
 msgstr "Gehen Sie an Bord, bevor Sie abheben"
 
@@ -1821,6 +1822,9 @@ msgstr ""
 msgid "epsitec.com"
 msgstr "www.epsitec.com"
 
+msgid "expression expected after ="
+msgstr ""
+
 #~ msgid " "
 #~ msgstr " "
 
@@ -1830,6 +1834,9 @@ msgstr "www.epsitec.com"
 #~ msgid " Missions on this level:"
 #~ msgstr " Missionen des Userlevels:"
 
+#~ msgid "\"%s\" missing in this exercise"
+#~ msgstr "Es fehlt \"%s\" in Ihrem Programm"
+
 #~ msgid "3D sound\\3D positioning of the sound"
 #~ msgstr "3D-Geräusche\\Orten der Geräusche im Raum"
 
@@ -1863,6 +1870,9 @@ msgstr "www.epsitec.com"
 #~ msgid "Developed by :"
 #~ msgstr "Entwickelt von:"
 
+#~ msgid "Do not use in this exercise"
+#~ msgstr "In dieser Übung verboten"
+
 #, fuzzy
 #~ msgid "Do you want to quit Colobot: Gold Edition?"
 #~ msgstr "Wollen Sie COLOBOT schließen ?"
diff --git a/po/fr.po b/po/fr.po
index 5db35d4..a57ce32 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -54,10 +54,6 @@ msgstr "\" [ \" attendu"
 msgid "\" ] \" missing"
 msgstr "\" ] \" attendu"
 
-#, c-format
-msgid "\"%s\" missing in this exercise"
-msgstr "Il manque \"%s\" dans le programme"
-
 msgid "..behind"
 msgstr "..derrière"
 
@@ -486,9 +482,6 @@ msgstr "Affichage\\Pilote et résolution d'affichage"
 msgid "Dividing by zero"
 msgstr "Division par zéro"
 
-msgid "Do not use in this exercise"
-msgstr "Interdit dans cet exercice"
-
 msgid "Do you really want to destroy the selected building?"
 msgstr "Voulez-vous vraiment détruire le bâtiment sélectionné ?"
 
@@ -1701,6 +1694,14 @@ msgstr "Vous ne pouvez pas transporter un objet sous 
l'eau"
 msgid "You found a usable object"
 msgstr "Vous avez trouvé un objet utilisable"
 
+#, c-format
+msgid "You have to use \"%s\" at least %d times in this exercise (used: %d)"
+msgstr ""
+
+#, c-format
+msgid "You have to use \"%s\" at most %d times in this exercise (used: %d)"
+msgstr ""
+
 msgid "You must get on the spaceship to take off "
 msgstr "Vous devez embarquer pour pouvoir décoller"
 
@@ -1806,6 +1807,9 @@ msgstr "colobot.info"
 

[colobot] 74/145: Clamp FogStart value to 0 if negative

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 9870cfe8a882af9318b00635a16bc55bc876875e
Author: tomangelo2 
Date:   Mon May 2 01:27:07 2016 +0200

Clamp FogStart value to 0 if negative

Should fix issue #766
---
 src/graphics/engine/engine.cpp | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index 8b0b40e..aeb6dcb 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -2733,7 +2733,10 @@ float CEngine::GetDeepView(int rank)
 
 void CEngine::SetFogStart(float start, int rank)
 {
-m_fogStart[rank] = start;
+if (start < 0.0f)
+m_fogStart[rank] = 0.0f;
+else
+m_fogStart[rank] = start;
 }
 
 float CEngine::GetFogStart(int rank)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 82/145: Fix passing "this" as an argument to a method

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 6491ce0aa5b1139fc8c55e9bc56d999790b187aa
Author: melex750 
Date:   Tue May 24 10:30:20 2016 -0400

Fix passing "this" as an argument to a method
---
 src/CBot/CBotInstr/CBotInstrMethode.cpp | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/CBot/CBotInstr/CBotInstrMethode.cpp 
b/src/CBot/CBotInstr/CBotInstrMethode.cpp
index 52a58cc..e0d08a9 100644
--- a/src/CBot/CBotInstr/CBotInstrMethode.cpp
+++ b/src/CBot/CBotInstr/CBotInstrMethode.cpp
@@ -119,7 +119,7 @@ bool CBotInstrMethode::ExecuteVar(CBotVar* , 
CBotStack* , CBotToken* pre
 
 pThis->SetName("this");
 pThis->SetUniqNum(-2);
-pile1->AddVar(pThis);
+pile1->SetVar(pThis);
 pile1->IncState();
 }
 inti = 0;
@@ -144,7 +144,7 @@ bool CBotInstrMethode::ExecuteVar(CBotVar* , 
CBotStack* , CBotToken* pre
 ppVars[i] = nullptr;
 
 CBotClass*pClass = CBotClass::Find(m_className);
-CBotVar*pThis  = pile1->FindVar(-2, false);
+CBotVar*pThis  = pile1->GetVar();
 CBotVar*pResult = nullptr;
 if (m_typRes.GetType() > 0) pResult = CBotVar::Create("", m_typRes);
 if (m_typRes.Eq(CBotTypClass))
@@ -174,7 +174,10 @@ void CBotInstrMethode::RestoreStateVar(CBotStack* , 
bool bMain)
 CBotStack*pile2 = pile1->RestoreStack();// and for the 
parameters coming
 if (pile2 == nullptr) return;
 
-CBotVar*pThis  = pile1->FindVar("this");
+CBotVar*pThis  = pile1->GetVar();
+
+assert(pThis != nullptr); // see fix for issues #256 & #436
+
 pThis->SetUniqNum(-2);
 
 inti = 0;
@@ -226,7 +229,7 @@ bool CBotInstrMethode::Execute(CBotStack* )
 // Test.Action (Test = Other);
 // Action must act on the value before test = Other!
 pThis->SetName("this");
-pile1->AddVar(pThis);
+pile1->SetVar(pThis);
 pile1->IncState();
 }
 inti = 0;
@@ -250,7 +253,7 @@ bool CBotInstrMethode::Execute(CBotStack* )
 ppVars[i] = nullptr;
 
 CBotClass*pClass = CBotClass::Find(m_className);
-CBotVar*pThis  = pile1->FindVar("this");
+CBotVar*pThis  = pile1->GetVar();
 CBotVar*pResult = nullptr;
 if (m_typRes.GetType()>0) pResult = CBotVar::Create("", m_typRes);
 if (m_typRes.Eq(CBotTypClass))

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 86/145: Unified all camera inputs

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit bd72086704a6b61222a9708b848875585d84ae4e
Author: krzys-h 
Date:   Fri May 27 22:38:44 2016 +0200

Unified all camera inputs

Until now each camera type had separate code for handling camera input, and 
some new features were missing in some of them.

The camera controls are as follows:
* RMB+mouse and numpad keys - horizontal/vertical rotation
* mouse wheel and +/- keys - zoom (in free camera - move eye up/down)
* CTRL or MMB + horizontal controls - pan left/right
* CTRL or MMB + zoom controls - move lookat up/down (free camera only)
---
 po/colobot.pot |   6 -
 po/de.po   |   6 -
 po/fr.po   |  12 +-
 po/pl.po   |  12 +-
 po/ru.po   |   6 -
 src/app/input.cpp  |  30 +
 src/app/input.h|   8 --
 src/common/key.h   |   2 -
 src/common/restext.cpp |   2 -
 src/graphics/engine/camera.cpp | 266 +
 src/graphics/engine/camera.h   |  21 ++--
 11 files changed, 109 insertions(+), 262 deletions(-)

diff --git a/po/colobot.pot b/po/colobot.pot
index b39e7ad..08625b6 100644
--- a/po/colobot.pot
+++ b/po/colobot.pot
@@ -506,12 +506,6 @@ msgstr ""
 msgid "Speed 6.0x\\Sextuple speed"
 msgstr ""
 
-msgid "Camera up\\Increase camera angle while visiting message origin"
-msgstr ""
-
-msgid "Camera down\\Decrease camera angle while visiting message origin"
-msgstr ""
-
 msgid "Pause\\Pause the game without opening menu"
 msgstr ""
 
diff --git a/po/de.po b/po/de.po
index 972066e..c49e5cf 100644
--- a/po/de.po
+++ b/po/de.po
@@ -330,9 +330,6 @@ msgstr "Kameradrehung mit der Maus\\Die Kamera dreht wenn 
die Maus den Rand erre
 msgid "Camera closer\\Moves the camera forward"
 msgstr "Kamera näher\\Bewegung der Kamera vorwärts"
 
-msgid "Camera down\\Decrease camera angle while visiting message origin"
-msgstr ""
-
 msgid "Camera nearest"
 msgstr "Kamera näher"
 
@@ -342,9 +339,6 @@ msgstr "Kamera links"
 msgid "Camera to right"
 msgstr "Kamera rechts"
 
-msgid "Camera up\\Increase camera angle while visiting message origin"
-msgstr ""
-
 msgid "Can not produce not researched object"
 msgstr "Das erforschte Objekt kann nicht produziert werden"
 
diff --git a/po/fr.po b/po/fr.po
index 6822fa0..880f1d0 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -321,9 +321,6 @@ msgstr "Défilement dans les bords\\Défilement lorsque la 
souris touche les bor
 msgid "Camera closer\\Moves the camera forward"
 msgstr "Caméra plus proche\\Avance la caméra"
 
-msgid "Camera down\\Decrease camera angle while visiting message origin"
-msgstr "Caméra plus basse\\Réduit l'angle de caméra lors de la vue de 
l'origine des messages"
-
 msgid "Camera nearest"
 msgstr "Caméra plus proche"
 
@@ -333,9 +330,6 @@ msgstr "Caméra à gauche"
 msgid "Camera to right"
 msgstr "Caméra à droite"
 
-msgid "Camera up\\Increase camera angle while visiting message origin"
-msgstr "Caméra plus haute\\Augmente l'angle de caméra lors de la vue de 
l'origine des messages"
-
 msgid "Can not produce not researched object"
 msgstr "Impossible de créer un objet n'ayant pas été recherché"
 
@@ -1815,6 +1809,12 @@ msgstr ""
 #~ msgid "COLOBOT"
 #~ msgstr "COLOBOT"
 
+#~ msgid "Camera down\\Decrease camera angle while visiting message origin"
+#~ msgstr "Caméra plus basse\\Réduit l'angle de caméra lors de la vue de 
l'origine des messages"
+
+#~ msgid "Camera up\\Increase camera angle while visiting message origin"
+#~ msgstr "Caméra plus haute\\Augmente l'angle de caméra lors de la vue de 
l'origine des messages"
+
 #~ msgid "Can not create this; there are too many objects"
 #~ msgstr "Création impossible; il y a trop d'objets"
 
diff --git a/po/pl.po b/po/pl.po
index 89cc236..6796728 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -324,9 +324,6 @@ msgstr "Przewijanie kamery przy krawędzi\\Ekran jest 
przewijany gdy mysz dotkni
 msgid "Camera closer\\Moves the camera forward"
 msgstr "Kamera bliżej\\Przybliża kamerę"
 
-msgid "Camera down\\Decrease camera angle while visiting message origin"
-msgstr "Kamera w dół\\Opuść kamerę podczas sprawdzania źródła wiadomości"
-
 msgid "Camera nearest"
 msgstr "Camera nearest"
 
@@ -336,9 +333,6 @@ msgstr "Camera to left"
 msgid "Camera to right"
 msgstr "Camera to right"
 
-msgid "Camera up\\Increase camera angle while visiting message origin"
-msgstr "Kamera w górę\\Podnieś kamerę podczas sprawdzania źródła wiadomości"
-
 msgid "Can not produce not researched object"
 msgstr "Nie można wyprodukować nie wynalezionego obiektu"
 
@@ -1811,6 +1805,12 @@ msgstr ""
 #~ msgid "Building too close"
 #~ msgstr "Budynek za blisko"
 
+#~ msgid "Camera down\\Decrease camera angle while visiting message origin"
+#~ msgstr "Kamera w dół\\Opuść kamerę podczas sprawdzania źródła wiadomości"
+

[colobot] 76/145: Removed texture coordinate generation

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit ebca89d9200e7ff649ee11e7ba071824ae80dd31
Author: Tomasz Kapuściński 
Date:   Wed May 11 13:47:08 2016 +0200

Removed texture coordinate generation

This feature was only needed by GL14 device to implement shadow mapping and 
is not supported by shader-based devices. Shadow mapping has been rewritten, so 
this feature is no longer needed.
---
 src/graphics/core/device.h |  3 ---
 src/graphics/core/nulldevice.cpp   |  4 
 src/graphics/core/nulldevice.h |  1 -
 src/graphics/opengl/gl21device.cpp | 42 --
 src/graphics/opengl/gl21device.h   |  1 -
 src/graphics/opengl/gl33device.cpp |  5 -
 src/graphics/opengl/gl33device.h   |  1 -
 src/graphics/opengl/gldevice.cpp   | 40 
 src/graphics/opengl/gldevice.h |  1 -
 9 files changed, 98 deletions(-)

diff --git a/src/graphics/core/device.h b/src/graphics/core/device.h
index 2b5f4a6..b4e897d 100644
--- a/src/graphics/core/device.h
+++ b/src/graphics/core/device.h
@@ -413,9 +413,6 @@ public:
 //! Sets only the texture wrap modes (for faster than thru stage params)
 virtual void SetTextureStageWrap(int index, TexWrapMode wrapS, TexWrapMode 
wrapT) = 0;
 
-//! Sets the texture coordinate generation mode for given texture unit
-virtual void SetTextureCoordGeneration(int index, TextureGenerationParams 
) = 0;
-
 //! Renders primitive composed of vertices with single texture
 virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices, 
int vertexCount,
Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) = 
0;
diff --git a/src/graphics/core/nulldevice.cpp b/src/graphics/core/nulldevice.cpp
index ad483ed..aba9f80 100644
--- a/src/graphics/core/nulldevice.cpp
+++ b/src/graphics/core/nulldevice.cpp
@@ -154,10 +154,6 @@ void CNullDevice::SetTextureStageWrap(int index, 
TexWrapMode wrapS, TexWrapMode
 {
 }
 
-void CNullDevice::SetTextureCoordGeneration(int index, TextureGenerationParams 
)
-{
-}
-
 void CNullDevice::DrawPrimitive(PrimitiveType type, const Vertex *vertices, 
int vertexCount,
   Color color)
 {
diff --git a/src/graphics/core/nulldevice.h b/src/graphics/core/nulldevice.h
index 3a78ea8..5721d92 100644
--- a/src/graphics/core/nulldevice.h
+++ b/src/graphics/core/nulldevice.h
@@ -80,7 +80,6 @@ public:
 void SetTextureStageParams(int index, const TextureStageParams ) 
override;
 
 void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, 
Gfx::TexWrapMode wrapT) override;
-void SetTextureCoordGeneration(int index, TextureGenerationParams ) 
override;
 
 void DrawPrimitive(PrimitiveType type, const Vertex* vertices, int 
vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override;
 void DrawPrimitive(PrimitiveType type, const VertexTex2* vertices, int 
vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override;
diff --git a/src/graphics/opengl/gl21device.cpp 
b/src/graphics/opengl/gl21device.cpp
index f5fb774..e1a96db 100644
--- a/src/graphics/opengl/gl21device.cpp
+++ b/src/graphics/opengl/gl21device.cpp
@@ -1058,48 +1058,6 @@ void CGL21Device::SetTextureStageParams(int index, const 
TextureStageParams 
 UpdateTextureParams(index);
 }
 
-void CGL21Device::SetTextureCoordGeneration(int index, TextureGenerationParams 
)
-{
-/*
-glActiveTexture(GL_TEXTURE0 + index);
-
-for (int i = 0; i < 4; i++)
-{
-GLuint texCoordGen = TranslateTextureCoordinateGen(i);
-GLuint texCoord = TranslateTextureCoordinate(i);
-
-switch (params.coords[i].mode)
-{
-case TEX_GEN_NONE:
-glDisable(texCoordGen);
-break;
-case TEX_GEN_OBJECT_LINEAR:
-glEnable(texCoordGen);
-glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
-glTexGenfv(texCoord, GL_OBJECT_PLANE, params.coords[i].plane);
-break;
-case TEX_GEN_EYE_LINEAR:
-glEnable(texCoordGen);
-glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
-glTexGenfv(texCoord, GL_EYE_PLANE, params.coords[i].plane);
-break;
-case TEX_GEN_SPHERE_MAP:
-glEnable(texCoordGen);
-glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
-break;
-case TEX_GEN_NORMAL_MAP:
-glEnable(texCoordGen);
-glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP);
-break;
-case TEX_GEN_REFLECTION_MAP:
-glEnable(texCoordGen);
-glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP);
-break;
-}
-}
-// */
-}
-
 void CGL21Device::UpdateTextureParams(int index)
 {
 assert(index >= 0 && index < static_cast( m_currentTextures.size() 

[colobot] 72/145: Added unit tests for #768

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 7c551dc39ddcdc42ee4a11250d57a59ef446f4c9
Author: krzys-h 
Date:   Tue Apr 19 21:09:41 2016 +0200

Added unit tests for #768
---
 test/unit/CBot/CBot_test.cpp | 24 
 1 file changed, 24 insertions(+)

diff --git a/test/unit/CBot/CBot_test.cpp b/test/unit/CBot/CBot_test.cpp
index 63c3e91..f130666 100644
--- a/test/unit/CBot/CBot_test.cpp
+++ b/test/unit/CBot/CBot_test.cpp
@@ -647,6 +647,18 @@ TEST_F(CBotUT, FunctionRedefined)
 "}\n",
 CBotErrRedefFunc
 );
+
+ExecuteTest(
+"int func(int[] test)\n"
+"{\n"
+"return 1;\n"
+"}\n"
+"int func(int[] test)\n"
+"{\n"
+"return 2;\n"
+"}\n",
+CBotErrRedefFunc
+);
 }
 
 // TODO: Doesn't work
@@ -845,6 +857,18 @@ TEST_F(CBotUT, ClassMethodRedefined)
 "}\n",
 CBotErrRedefFunc
 );
+
+ExecuteTest(
+"public class TestClass {\n"
+"public int test(int[] test) {\n"
+"return 1;\n"
+"}\n"
+"public int test(int[] test) {\n"
+"return 2;\n"
+"}\n"
+"}\n",
+CBotErrRedefFunc
+);
 }
 
 // TODO: Not only doesn't work but segfaults

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 79/145: Fixed pause blur image not updating correctly on resolution change

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 59c106f7a7c0024e00e15fa2332601721f39064d
Author: krzys-h 
Date:   Sat May 21 18:58:35 2016 +0200

Fixed pause blur image not updating correctly on resolution change
---
 src/graphics/engine/engine.cpp | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index b7d0e56..5e773dc 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -362,7 +362,7 @@ void CEngine::ResetAfterVideoConfigChanged()
 m_mouseSize = Math::Point(0.04f, 0.04f * (static_cast(m_size.x) / 
static_cast(m_size.y)));
 
 // Update the camera projection matrix for new aspect ratio
-SetFocus(m_focus);
+ApplyChange();
 
 // This needs to be recreated on resolution change
 m_device->DeleteFramebuffer("multisample");
@@ -3081,7 +3081,10 @@ void CEngine::ApplyChange()
 
 // recapture 3D scene
 if (m_worldCaptured)
+{
 m_captureWorld = true;
+m_worldCaptured = false;
+}
 }
 
 void CEngine::ClearDisplayCrashSpheres()

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 75/145: Group source files for IDE projects in CMake

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 734e6e97c06df98bb6c7584aa26b4ff26d20a39a
Author: Mateusz Przybył 
Date:   Mon May 2 12:14:18 2016 +0200

Group source files for IDE projects in CMake

Merge pull request #773 from MrSimbax/msvc-project-org-cmake
---
 CMakeLists.txt  |   5 +
 src/CBot/CMakeLists.txt |  92 --
 src/CMakeLists.txt  | 326 +++-
 3 files changed, 380 insertions(+), 43 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72e2217..dd412fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,6 +64,7 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
 
 # Platform-dependent implementation of system.h
 set(SYSTEM_CPP_MODULE "system_windows.cpp")
+set(SYSTEM_H_MODULE "system_windows.h")
 elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
 message(STATUS "Build for Linux system")
 set(PLATFORM_WINDOWS 0)
@@ -74,6 +75,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
 
 # Platform-dependent implementation of system.h
 set(SYSTEM_CPP_MODULE "system_linux.cpp")
+set(SYSTEM_H_MODULE "system_linux.h")
 elseif("${CMAKE_SYSTEM_NAME}" MATCHES "kFreeBSD" OR "${CMAKE_SYSTEM_NAME}" 
STREQUAL "GNU")
 message(STATUS "Build for kFreeBSD system")
 set(PLATFORM_WINDOWS 0)
@@ -84,6 +86,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "kFreeBSD" OR 
"${CMAKE_SYSTEM_NAME}" STREQ
 
 # Platform-dependent implementation of system.h
 set(SYSTEM_CPP_MODULE "system_other.cpp")
+set(SYSTEM_H_MODULE "system_other.h")
 elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
 message(STATUS "Build for Mac OSX system")
 set(PLATFORM_WINDOWS 0)
@@ -94,6 +97,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
 
 # Platform-dependent implementation of system.h
 set(SYSTEM_CPP_MODULE "system_macosx.cpp")
+set(SYSTEM_H_MODULE "system_macosx.h")
 # To avoid CMake warning
 set(CMAKE_MACOSX_RPATH 1)
 else()
@@ -106,6 +110,7 @@ else()
 
 # Platform-dependent implementation of system.h
 set(SYSTEM_CPP_MODULE "system_other.cpp")
+set(SYSTEM_H_MODULE "system_other.h")
 endif()
 
 
diff --git a/src/CBot/CMakeLists.txt b/src/CBot/CMakeLists.txt
index 1f17e6b..dbd3d02 100644
--- a/src/CBot/CMakeLists.txt
+++ b/src/CBot/CMakeLists.txt
@@ -1,75 +1,148 @@
 set(SOURCES
+CBot.h
+CBotCStack.cpp
+CBotCStack.h
 CBotCallMethode.cpp
+CBotCallMethode.h
 CBotClass.cpp
-CBotCStack.cpp
+CBotClass.h
 CBotDebug.cpp
+CBotDebug.h
 CBotDefParam.cpp
+CBotDefParam.h
+CBotDefines.h
+CBotEnums.h
 CBotExternalCall.cpp
+CBotExternalCall.h
 CBotFileUtils.cpp
-CBotProgram.cpp
-CBotStack.cpp
-CBotToken.cpp
-CBotTypResult.cpp
-CBotUtils.cpp
+CBotFileUtils.h
 CBotInstr/CBotBlock.cpp
+CBotInstr/CBotBlock.h
 CBotInstr/CBotBoolExpr.cpp
+CBotInstr/CBotBoolExpr.h
 CBotInstr/CBotBreak.cpp
+CBotInstr/CBotBreak.h
 CBotInstr/CBotCase.cpp
+CBotInstr/CBotCase.h
 CBotInstr/CBotCatch.cpp
+CBotInstr/CBotCatch.h
 CBotInstr/CBotCondition.cpp
+CBotInstr/CBotCondition.h
 CBotInstr/CBotDefArray.cpp
+CBotInstr/CBotDefArray.h
 CBotInstr/CBotDefBoolean.cpp
+CBotInstr/CBotDefBoolean.h
 CBotInstr/CBotDefClass.cpp
+CBotInstr/CBotDefClass.h
 CBotInstr/CBotDefFloat.cpp
+CBotInstr/CBotDefFloat.h
 CBotInstr/CBotDefInt.cpp
+CBotInstr/CBotDefInt.h
 CBotInstr/CBotDefString.cpp
+CBotInstr/CBotDefString.h
 CBotInstr/CBotDo.cpp
+CBotInstr/CBotDo.h
 CBotInstr/CBotEmpty.cpp
-CBotInstr/CBotExpression.cpp
+CBotInstr/CBotEmpty.h
 CBotInstr/CBotExprLitBool.cpp
+CBotInstr/CBotExprLitBool.h
 CBotInstr/CBotExprLitNan.cpp
+CBotInstr/CBotExprLitNan.h
 CBotInstr/CBotExprLitNull.cpp
+CBotInstr/CBotExprLitNull.h
 CBotInstr/CBotExprLitNum.cpp
+CBotInstr/CBotExprLitNum.h
 CBotInstr/CBotExprLitString.cpp
+CBotInstr/CBotExprLitString.h
 CBotInstr/CBotExprUnaire.cpp
+CBotInstr/CBotExprUnaire.h
 CBotInstr/CBotExprVar.cpp
+CBotInstr/CBotExprVar.h
+CBotInstr/CBotExpression.cpp
+CBotInstr/CBotExpression.h
 CBotInstr/CBotFieldExpr.cpp
+CBotInstr/CBotFieldExpr.h
 CBotInstr/CBotFor.cpp
+CBotInstr/CBotFor.h
 CBotInstr/CBotFunction.cpp
+CBotInstr/CBotFunction.h
 CBotInstr/CBotIf.cpp
+CBotInstr/CBotIf.h
 CBotInstr/CBotIndexExpr.cpp
-CBotInstr/CBotInstrCall.cpp
+CBotInstr/CBotIndexExpr.h
 CBotInstr/CBotInstr.cpp
+CBotInstr/CBotInstr.h
+CBotInstr/CBotInstrCall.cpp
+CBotInstr/CBotInstrCall.h
 CBotInstr/CBotInstrMethode.cpp
+CBotInstr/CBotInstrMethode.h
 CBotInstr/CBotInstrUtils.cpp
+CBotInstr/CBotInstrUtils.h
 CBotInstr/CBotLeftExpr.cpp
+CBotInstr/CBotLeftExpr.h
 

[colobot] 65/145: Fixed missing #includes

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 32af7f45df055a3504559ca5bb2b13461d89d808
Author: krzys-h 
Date:   Sat Apr 9 18:52:15 2016 +0200

Fixed missing #includes
---
 src/level/robotmain.cpp | 1 +
 src/ui/studio.cpp   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index ff3ae3b..e1fb239 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -107,6 +107,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
diff --git a/src/ui/studio.cpp b/src/ui/studio.cpp
index b07b631..483d89b 100644
--- a/src/ui/studio.cpp
+++ b/src/ui/studio.cpp
@@ -62,6 +62,7 @@
 #include "ui/controls/window.h"
 
 #include 
+#include 
 
 
 namespace Ui

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 68/145: Fixed crash when loading level with incorrect object type

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit dd8a324f9b87710280cd4ec2aeaeb6e7e7630917
Author: krzys-h 
Date:   Sun Apr 10 13:27:56 2016 +0200

Fixed crash when loading level with incorrect object type
---
 src/level/parser/parserparam.cpp | 2 +-
 src/level/parser/parserparam.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp
index 317d388..fb3c82f 100644
--- a/src/level/parser/parserparam.cpp
+++ b/src/level/parser/parserparam.cpp
@@ -530,7 +530,7 @@ ObjectType CLevelParserParam::ToObjectType(std::string 
value)
 if (value == "Me") return OBJECT_HUMAN;
 if (value == "Tech"  ) return OBJECT_TECH;
 if (value == "MissionController" ) return OBJECT_CONTROLLER;
-return static_cast(boost::lexical_cast(value));
+return static_cast(Cast(value, "object"));
 }
 
 const std::string CLevelParserParam::FromObjectType(ObjectType value)
diff --git a/src/level/parser/parserparam.h b/src/level/parser/parserparam.h
index f620d84..c72be4f 100644
--- a/src/level/parser/parserparam.h
+++ b/src/level/parser/parserparam.h
@@ -123,7 +123,6 @@ public:
 bool IsDefined();
 
 static const std::string FromObjectType(ObjectType value);
-static ObjectType ToObjectType(std::string value);
 
 private:
 void ParseArray();
@@ -133,6 +132,7 @@ private:
 template T Cast(std::string requestedType);
 
 std::string ToPath(std::string path, const std::string defaultDir);
+ObjectType ToObjectType(std::string value);
 DriveType ToDriveType(std::string value);
 ToolType ToToolType(std::string value);
 Gfx::WaterType ToWaterType(std::string value);

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 66/145: Man, those compile errors...

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 4de9d25f048441e3d4b64245f53e56a09779634e
Author: krzys-h 
Date:   Sat Apr 9 18:58:34 2016 +0200

Man, those compile errors...
---
 src/app/app.cpp| 2 +-
 src/level/parser/parserparam.cpp   | 4 
 src/level/parser/parserparam.h | 1 -
 src/level/robotmain.cpp| 2 +-
 src/ui/screen/screen_player_select.cpp | 4 +---
 5 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/app/app.cpp b/src/app/app.cpp
index 5cc047a..c1439ff 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -1823,7 +1823,7 @@ void CApplication::SetLanguage(Language language)
 // Update C++ locale
 try
 {
-std::locale::global(std::locale(systemLocale));
+std::locale::global(std::locale(systemLocale.c_str()));
 }
 catch (...)
 {
diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp
index 82e6e49..317d388 100644
--- a/src/level/parser/parserparam.cpp
+++ b/src/level/parser/parserparam.cpp
@@ -50,10 +50,6 @@ CLevelParserParam::CLevelParserParam(int value)
   : m_value(boost::lexical_cast(value))
 {}
 
-CLevelParserParam::CLevelParserParam(long value)
-: m_value(boost::lexical_cast(value))
-{}
-
 CLevelParserParam::CLevelParserParam(float value)
   : m_value(boost::lexical_cast(value))
 {}
diff --git a/src/level/parser/parserparam.h b/src/level/parser/parserparam.h
index 55a2f44..f620d84 100644
--- a/src/level/parser/parserparam.h
+++ b/src/level/parser/parserparam.h
@@ -54,7 +54,6 @@ public:
 //! Create param with given value
 //@{
 CLevelParserParam(int value);
-CLevelParserParam(long value);
 CLevelParserParam(float value);
 CLevelParserParam(std::string value);
 CLevelParserParam(bool value);
diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index e1fb239..9104f3b 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -4656,7 +4656,7 @@ bool CRobotMain::IOWriteScene(std::string filename, 
std::string filecbot, std::s
 
 
 line = MakeUnique("Created");
-line->AddParam("date", MakeUnique(time(nullptr)));
+line->AddParam("date", 
MakeUnique(static_cast(time(nullptr;
 levelParser.AddLine(std::move(line));
 
 line = MakeUnique("Mission");
diff --git a/src/ui/screen/screen_player_select.cpp 
b/src/ui/screen/screen_player_select.cpp
index 9c707d7..678f828 100644
--- a/src/ui/screen/screen_player_select.cpp
+++ b/src/ui/screen/screen_player_select.cpp
@@ -370,9 +370,6 @@ bool CScreenPlayerSelect::NameCreate()
 {
 CWindow*pw;
 CEdit*  pe;
-charname[100];
-charc;
-int len, i, j;
 
 GetLogger()->Info("Creating new player\n");
 pw = static_cast(m_interface->SearchControl(EVENT_WINDOW5));
@@ -380,6 +377,7 @@ bool CScreenPlayerSelect::NameCreate()
 pe = static_cast(pw->SearchControl(EVENT_INTERFACE_NEDIT));
 if ( pe == nullptr )  return false;
 
+char name[100];
 pe->GetText(name, 100);
 if ( name[0] == 0 )
 {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 63/145: Removed misc.cpp / misc.h

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 04d7c343ef20bbf2d634cdd4cd8f923b1d772ab4
Author: krzys-h 
Date:   Sat Apr 9 18:46:12 2016 +0200

Removed misc.cpp / misc.h
---
 src/CMakeLists.txt |   1 -
 src/common/misc.cpp| 207 -
 src/common/misc.h  |  36 --
 src/level/robotmain.cpp|  11 +-
 src/object/auto/autolabo.cpp   |   1 -
 src/ui/controls/button.cpp |   1 -
 src/ui/controls/check.cpp  |   1 -
 src/ui/controls/color.cpp  |   1 -
 src/ui/controls/edit.cpp   |  17 +--
 src/ui/controls/editvalue.cpp  |   1 -
 src/ui/controls/group.cpp  |   1 -
 src/ui/controls/image.cpp  |   1 -
 src/ui/controls/scroll.cpp |   1 -
 src/ui/controls/shortcut.cpp   |   1 -
 src/ui/controls/slider.cpp |   1 -
 src/ui/displayinfo.cpp |   1 -
 src/ui/screen/screen_io.cpp|   1 -
 src/ui/screen/screen_player_select.cpp |  25 
 src/ui/studio.cpp  |  11 +-
 19 files changed, 17 insertions(+), 303 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 482de23..d397fb2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -90,7 +90,6 @@ set(BASE_SOURCES
 common/key.cpp
 common/language.cpp
 common/logger.cpp
-common/misc.cpp
 common/regex_utils.cpp
 common/resources/inputstream.cpp
 common/resources/inputstreambuffer.cpp
diff --git a/src/common/misc.cpp b/src/common/misc.cpp
deleted file mode 100644
index 578b4a6..000
--- a/src/common/misc.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * This file is part of the Colobot: Gold Edition source code
- * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
- * http://epsitec.ch; http://colobot.info; http://github.com/colobot
- *
- * This program 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 3 of the License, or
- * (at your option) any later version.
- *
- * This program 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 this program. If not, see http://gnu.org/licenses
- */
-
-
-#include "common/misc.h"
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-
-// Returns a non-accented letter.
-
-char GetNoAccent(char letter)
-{
-/*
-if ( letter < 0 )
-{
-if ( letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' )  return 'a';
-
-if ( letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' )  return 'e';
-
-if ( letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' )  return 'i';
-
-if ( letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' )  return 'o';
-
-if ( letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' )  return 'u';
-
-if ( letter == '�' )  return 'c';
-
-if ( letter == '�' )  return 'n';
-
-if ( letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' )  return 'A';
-
-if ( letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' )  return 'E';
-
-if ( letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' )  return 'I';
-
-if ( letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' )  return 'O';
-
-if ( letter == '�' ||
- letter == '�' ||
- letter == '�' ||
- letter == '�' )  return 'U';
-
-if ( letter == '�' )  return 'C';
-
-if ( letter == '�' )  return 'N';
-}*/
-
-return letter;
-}
-
-// Returns an uppercase letter.
-
-char GetToUpper(char letter)
-{
-/*if ( letter < 0 )
-{
-if ( letter == '�' )  return '�';
-if ( letter == '�' )  return '�';
-if ( letter == '�' )  return '�';
-if ( letter == '�' )  return '�';
-if ( letter == '�' )  return '�';
-
-if ( letter 

[colobot] 80/145: Made clipping distance settings apply immediately

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit cdd719cc470c359ea134a0f7f0fa38db726138fe
Author: krzys-h 
Date:   Sat May 21 19:05:18 2016 +0200

Made clipping distance settings apply immediately
---
 src/ui/screen/screen_setup.cpp  | 2 --
 src/ui/screen/screen_setup_graphics.cpp | 4 
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/ui/screen/screen_setup.cpp b/src/ui/screen/screen_setup.cpp
index 4d5c597..7f20eab 100644
--- a/src/ui/screen/screen_setup.cpp
+++ b/src/ui/screen/screen_setup.cpp
@@ -153,7 +153,6 @@ bool CScreenSetup::EventProcess(const Event )
 (event.type == EVENT_KEY_DOWN && 
event.GetData()->key == KEY(ESCAPE)) )
 {
 m_settings->SaveSettings();
-m_engine->ApplyChange();
 m_main->ChangePhase(PHASE_MAIN_MENU);
 return false;
 }
@@ -194,7 +193,6 @@ bool CScreenSetup::EventProcess(const Event )
 (event.type == EVENT_KEY_DOWN && 
event.GetData()->key == KEY(ESCAPE)) )
 {
 m_settings->SaveSettings();
-m_engine->ApplyChange();
 m_interface->DeleteControl(EVENT_WINDOW5);
 m_main->ChangePhase(PHASE_SIMUL);
 m_main->StopSuspend();
diff --git a/src/ui/screen/screen_setup_graphics.cpp 
b/src/ui/screen/screen_setup_graphics.cpp
index 83713b7..9346754 100644
--- a/src/ui/screen/screen_setup_graphics.cpp
+++ b/src/ui/screen/screen_setup_graphics.cpp
@@ -248,8 +248,12 @@ bool CScreenSetupGraphics::EventProcess(const Event )
 switch( event.type )
 {
 case EVENT_INTERFACE_PARTI:
+ChangeSetupButtons();
+break;
+
 case EVENT_INTERFACE_CLIP:
 ChangeSetupButtons();
+m_engine->ApplyChange();
 break;
 
 case EVENT_INTERFACE_DIRTY:

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 73/145: Do not zoom while scrolling lists, closes #769

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit c00a7fd13241272106e6a4f78977a8d766b0e86e
Author: krzys-h 
Date:   Fri Apr 22 19:20:31 2016 +0200

Do not zoom while scrolling lists, closes #769
---
 src/ui/controls/edit.cpp  | 2 +-
 src/ui/controls/editvalue.cpp | 1 +
 src/ui/controls/list.cpp  | 2 +-
 src/ui/controls/scroll.cpp| 1 +
 src/ui/controls/slider.cpp| 1 +
 5 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/ui/controls/edit.cpp b/src/ui/controls/edit.cpp
index 0cb3763..c46d5b0 100644
--- a/src/ui/controls/edit.cpp
+++ b/src/ui/controls/edit.cpp
@@ -248,7 +248,7 @@ bool CEdit::EventProcess(const Event )
 {
 auto data = event.GetData();
 Scroll(m_lineFirst - data->y, true);
-return true;
+return false;
 }
 
 CControl::EventProcess(event);
diff --git a/src/ui/controls/editvalue.cpp b/src/ui/controls/editvalue.cpp
index cb3d5bb..21bb3d4 100644
--- a/src/ui/controls/editvalue.cpp
+++ b/src/ui/controls/editvalue.cpp
@@ -190,6 +190,7 @@ bool CEditValue::EventProcess(const Event )
 if ( value > m_maxValue )  value = m_maxValue;
 SetValue(value, true);
 HiliteValue(event);
+return false;
 }
 
 return true;
diff --git a/src/ui/controls/list.cpp b/src/ui/controls/list.cpp
index dc4de23..88d36d9 100644
--- a/src/ui/controls/list.cpp
+++ b/src/ui/controls/list.cpp
@@ -288,7 +288,7 @@ bool CList::EventProcess(const Event )
 
 UpdateScroll();
 UpdateButton();
-return true;
+return false;
 }
 
 CControl::EventProcess(event);
diff --git a/src/ui/controls/scroll.cpp b/src/ui/controls/scroll.cpp
index 256a67b..e47e561 100644
--- a/src/ui/controls/scroll.cpp
+++ b/src/ui/controls/scroll.cpp
@@ -291,6 +291,7 @@ bool CScroll::EventProcess(const Event )
 m_event->AddEvent(Event(m_buttonDown->GetEventType()));
 }
 }
+return false;
 }
 
 return true;
diff --git a/src/ui/controls/slider.cpp b/src/ui/controls/slider.cpp
index 6a85178..a492600 100644
--- a/src/ui/controls/slider.cpp
+++ b/src/ui/controls/slider.cpp
@@ -356,6 +356,7 @@ bool CSlider::EventProcess(const Event )
 m_event->AddEvent(Event(m_buttonRight->GetEventType()));
 }
 }
+return false;
 }
 
 return true;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 71/145: Merge pull request #768 from melex750/dev

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 54a34a9b22cf665a28158a9abf532f669320e11f
Merge: 952a542 e794296
Author: krzys_h 
Date:   Tue Apr 19 21:07:56 2016 +0200

Merge pull request #768 from melex750/dev

Fix function and method overloading

 src/CBot/CBotInstr/CBotFunction.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 83/145: Merge pull request #781 from melex750/dev

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit fc7e6214714c0c959fe00f200dcd30653107bbc0
Merge: cdd719c 6491ce0
Author: krzys_h 
Date:   Fri May 27 11:37:03 2016 +0200

Merge pull request #781 from melex750/dev

Fix "this" bug - #256 & #436

 src/CBot/CBotInstr/CBotInstrMethode.cpp | 13 -
 src/CBot/CBotStack.cpp  | 14 ++
 2 files changed, 22 insertions(+), 5 deletions(-)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 84/145: Reenabled working tests after fc7e6214714c0c959fe00f200dcd30653107bbc0

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 620620fa615fba839c809d89e3e3ac5efb5f9976
Author: krzys-h 
Date:   Fri May 27 11:39:33 2016 +0200

Reenabled working tests after fc7e6214714c0c959fe00f200dcd30653107bbc0
---
 test/unit/CBot/CBot_test.cpp | 28 ++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/test/unit/CBot/CBot_test.cpp b/test/unit/CBot/CBot_test.cpp
index f130666..129d797 100644
--- a/test/unit/CBot/CBot_test.cpp
+++ b/test/unit/CBot/CBot_test.cpp
@@ -909,8 +909,7 @@ TEST_F(CBotUT, DISABLED_PublicClasses)
 );
 }
 
-// TODO: This needs to be fixed
-TEST_F(CBotUT, DISABLED_WeirdThisEarlyContextSwitch_Issue436)
+TEST_F(CBotUT, ThisEarlyContextSwitch_Issue436)
 {
 ExecuteTest(
 "public class Something {\n"
@@ -1091,3 +1090,28 @@ TEST_F(CBotUT, TestArrayFunctionReturn)
 "}\n"
 );
 }
+
+TEST_F(CBotUT, AccessMembersInParameters_Issue256)
+{
+ExecuteTest(
+"public class Test1 {\n"
+"int x = 1337;\n"
+"}\n"
+"public class Test2 {\n"
+"public bool test(int a) {\n"
+"return a == 1337;\n"
+"}\n"
+"}\n"
+"public class Test3 {\n"
+"public Test1 test1 = new Test1();\n"
+"public Test2 test2 = new Test2();\n"
+"public void test() {\n"
+"ASSERT(test2.test(test1.x));\n"
+"}\n"
+"}\n"
+"extern void AccessMembersInParameters() {\n"
+"Test3 t();\n"
+"t.test();\n"
+"}\n"
+);
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 145/145: colobot 0.1.8-1 Debian release

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 9355ba7c49152b17c5c341a96f3f4cdd8c963c01
Author: Didier Raboud <o...@debian.org>
Date:   Mon Jul 11 10:39:08 2016 +0200

colobot 0.1.8-1 Debian release
---
 debian/changelog | 9 +
 1 file changed, 9 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index cb85b20..197c198 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+colobot (0.1.8-1) unstable; urgency=medium
+
+  * New upstream release: 0.1.8
+
+  * Bump S-V to 3.9.8 without changes needed
+  * Add xmlstarlet as B-D needed for the new SVG resizing code
+
+ -- Didier Raboud <o...@debian.org>  Mon, 11 Jul 2016 10:39:08 +0200
+
 colobot (0.1.7b-1) unstable; urgency=medium
 
   * New upstream release: 0.1.7b

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] branch upstream/latest updated (e77f9db -> 407d855)

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a change to branch upstream/latest
in repository colobot.

  from  e77f9db   Bump version to 0.1.7b
   new  1c5f477   Post-release 0.1.7-alpha
   new  640c029   Replaced CConfigFile::GetInstancePointer() with 
GetConfigFile()
   new  6585ee9   Refactor some references to CRobotMain from CEngine
   new  5de5774   Refactor CRobotMain::ExecuteCmd() to std::string
   new  adf20f5   Removed unused members of CNullDevice
   new  d2ac1af   Changed reference colors using when recoloring textures 
to constants
   new  7fe6506   Fixed exit after single mission mode
   new  45c93f5   Fixed Houston lights when object is rotated
   new  4af02c8   Debug menu
   new  e4f9360   Resources debug mode
   new  d38ddcb   goto() path debugger
   new  e24d77b   goto() bitmap debugger
   new  427bbfa   Changed CParticle::CheckChannel log message
   new  64fef98   Merge branch 'dev-0.1.8' into dev
   new  2ea453f   Change SatCom button size in main menu
   new  7e1b112   Merge pull request #749 from Erihel/dev
   new  8ccad5b   Deactive pause before jumping to next visit
   new  ef0147e   Merge pull request #750 from Erihel/dev
   new  a06035e   Fix occured/occurred spelling error
   new  761c854   Add Keywords key in desktop file
   new  d84304c   Merge pull request #751 from OdyX/018-minor-fixes
   new  39b364f   Fixed compilation with disabled sound support, closes #748
   new  02633e3   Merge branch 'master' into dev
   new  b5438c3   Fix CMake warning when compiling on OSX
   new  89389e8   Fix desktop SVG icon not resizing properly
   new  3a3653d   Add warning messages if tool programs are not found
   new  72f966b   Fix for #738
   new  9639dc5   Fix typo
   new  98dd9f9   Fixed code style warnings
   new  c0780f9   One more code style fix
   new  1960b37   Solves #700
   new  831276f   Appearance customization face butons fix
   new  6afdb7b   First person camera unlocked for Me and Tech
   new  6216dae   Merge part of PR #756
   new  15702ec   Fixed indentation
   new  4a29e84   Fix syntax and type checking for CBotListArray
   new  accfc93   Add syntax and type checking for class member vars
   new  707ef97   Fix syntax+type checking, base types+CBotDefArray
   new  5b3da83   Fix inline declaration of an array of string
   new  6be1f56   Add error code no expression, remove some bad code
   new  8b7410f   Fix class.arrays using size of one before comma
   new  02133d0   Fix method overloading
   new  1472100   Merged PR #737: Fix for various issues with initializing 
variables in CBOT
   new  059a546   Reenabled unit tests that started working after 
14721001e5ad8a7d4a3c893d0343125eddc20ddc
   new  09a5869   Updated data submodule
   new  c94ebb4   Moved pathman from common/ to app/
   new  71a77c7   Hack to finally fix #738
   new  0d12ded   Fixed failed assertion when non-damageable objects get 
fall damage (closes #764)
   new  ac95097   Fixed AlienWorm collisions (#740)
   new  6144039   Fix initializing static array in class definition
   new  748f003   Fix array in a class not working with sizeof()...
   new  1941020   Merge pull request #762 from melex750/dev
   new  efc5431   Enabled ArraysInClasses test after 
1941020993d740c7dc90762a9dbf788916729e63
   new  c6c01c3   Fix displaying of text highlights (#738)
   new  4c8da2c   LevelController improvements; minor EndMissionTake cleanup
   new  ed58e7e   Fix compile warning
   new  3e4fbe9   This time really fixed compile errors
   new  7f38aca   Improvements to ObligatoryToken/ProhibitedToken
   new  bd9184b   Refactored part of CScript to std::string
   new  14e2910   Proper plural form translations for ObligatoryToken
   new  139592b   Proper l10n for date/time
   new  04d7c34   Removed misc.cpp / misc.h
   new  e75ed79   Updated data submodule
   new  32af7f4   Fixed missing #includes
   new  4de9d25   Man, those compile errors...
   new  ae4e875   Do not store exact object part positions
   new  d3f808f   Merge branch 'dev-savegame' into dev
   new  dd8a324   Fixed crash when loading level with incorrect object type
   new  952a542   Fixed non-power-of-2 images in SatCom (closes #634); 
fixed not unloading textures on SatCom close
   new  e794296   Fix checking parameters in CBotFunction
   new  54a34a9   Merge pull request #768 from melex750/dev
   new  7c551dc   Added unit tests for #768
   new  c00a7fd   Do not zoom while scrolling lists, closes #769
   new  9870cfe   Clamp FogStart value to 0 if negative
   new  734e6e9   Group source files for IDE projects in CMake
   new  ebca89d   Removed texture coordinate generation
   new  8922bb5   Renamed CGLDevice to 

[colobot] tag upstream/0.1.8 created (now 407d855)

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a change to tag upstream/0.1.8
in repository colobot.

at  407d855   (commit)
This tag includes the following new commits:

   new  4a29e84   Fix syntax and type checking for CBotListArray
   new  accfc93   Add syntax and type checking for class member vars
   new  707ef97   Fix syntax+type checking, base types+CBotDefArray
   new  5b3da83   Fix inline declaration of an array of string
   new  6be1f56   Add error code no expression, remove some bad code
   new  8b7410f   Fix class.arrays using size of one before comma
   new  02133d0   Fix method overloading
   new  640c029   Replaced CConfigFile::GetInstancePointer() with 
GetConfigFile()
   new  6585ee9   Refactor some references to CRobotMain from CEngine
   new  5de5774   Refactor CRobotMain::ExecuteCmd() to std::string
   new  adf20f5   Removed unused members of CNullDevice
   new  d2ac1af   Changed reference colors using when recoloring textures 
to constants
   new  7fe6506   Fixed exit after single mission mode
   new  45c93f5   Fixed Houston lights when object is rotated
   new  4af02c8   Debug menu
   new  e4f9360   Resources debug mode
   new  d38ddcb   goto() path debugger
   new  e24d77b   goto() bitmap debugger
   new  427bbfa   Changed CParticle::CheckChannel log message
   new  1c5f477   Post-release 0.1.7-alpha
   new  64fef98   Merge branch 'dev-0.1.8' into dev
   new  2ea453f   Change SatCom button size in main menu
   new  7e1b112   Merge pull request #749 from Erihel/dev
   new  8ccad5b   Deactive pause before jumping to next visit
   new  ef0147e   Merge pull request #750 from Erihel/dev
   new  a06035e   Fix occured/occurred spelling error
   new  761c854   Add Keywords key in desktop file
   new  d84304c   Merge pull request #751 from OdyX/018-minor-fixes
   new  39b364f   Fixed compilation with disabled sound support, closes #748
   new  831276f   Appearance customization face butons fix
   new  6afdb7b   First person camera unlocked for Me and Tech
   new  02633e3   Merge branch 'master' into dev
   new  b5438c3   Fix CMake warning when compiling on OSX
   new  89389e8   Fix desktop SVG icon not resizing properly
   new  3a3653d   Add warning messages if tool programs are not found
   new  72f966b   Fix for #738
   new  9639dc5   Fix typo
   new  98dd9f9   Fixed code style warnings
   new  c0780f9   One more code style fix
   new  1960b37   Solves #700
   new  6216dae   Merge part of PR #756
   new  15702ec   Fixed indentation
   new  1472100   Merged PR #737: Fix for various issues with initializing 
variables in CBOT
   new  059a546   Reenabled unit tests that started working after 
14721001e5ad8a7d4a3c893d0343125eddc20ddc
   new  09a5869   Updated data submodule
   new  c94ebb4   Moved pathman from common/ to app/
   new  6144039   Fix initializing static array in class definition
   new  748f003   Fix array in a class not working with sizeof()...
   new  71a77c7   Hack to finally fix #738
   new  0d12ded   Fixed failed assertion when non-damageable objects get 
fall damage (closes #764)
   new  ac95097   Fixed AlienWorm collisions (#740)
   new  1941020   Merge pull request #762 from melex750/dev
   new  efc5431   Enabled ArraysInClasses test after 
1941020993d740c7dc90762a9dbf788916729e63
   new  c6c01c3   Fix displaying of text highlights (#738)
   new  ae4e875   Do not store exact object part positions
   new  4c8da2c   LevelController improvements; minor EndMissionTake cleanup
   new  ed58e7e   Fix compile warning
   new  3e4fbe9   This time really fixed compile errors
   new  7f38aca   Improvements to ObligatoryToken/ProhibitedToken
   new  bd9184b   Refactored part of CScript to std::string
   new  14e2910   Proper plural form translations for ObligatoryToken
   new  139592b   Proper l10n for date/time
   new  04d7c34   Removed misc.cpp / misc.h
   new  e75ed79   Updated data submodule
   new  32af7f4   Fixed missing #includes
   new  4de9d25   Man, those compile errors...
   new  d3f808f   Merge branch 'dev-savegame' into dev
   new  dd8a324   Fixed crash when loading level with incorrect object type
   new  952a542   Fixed non-power-of-2 images in SatCom (closes #634); 
fixed not unloading textures on SatCom close
   new  e794296   Fix checking parameters in CBotFunction
   new  54a34a9   Merge pull request #768 from melex750/dev
   new  7c551dc   Added unit tests for #768
   new  c00a7fd   Do not zoom while scrolling lists, closes #769
   new  9870cfe   Clamp FogStart value to 0 if negative
   new  734e6e9   Group source files for IDE projects in CMake
   new  ebca89d   Removed texture coordinate generation
   new  8922bb5   

[colobot] branch debian/master updated (6ef1c81 -> 9355ba7)

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a change to branch debian/master
in repository colobot.

  from  6ef1c81   colobot 0.1.7b-1 Debian release
   new  1c5f477   Post-release 0.1.7-alpha
   new  640c029   Replaced CConfigFile::GetInstancePointer() with 
GetConfigFile()
   new  6585ee9   Refactor some references to CRobotMain from CEngine
   new  5de5774   Refactor CRobotMain::ExecuteCmd() to std::string
   new  adf20f5   Removed unused members of CNullDevice
   new  d2ac1af   Changed reference colors using when recoloring textures 
to constants
   new  7fe6506   Fixed exit after single mission mode
   new  45c93f5   Fixed Houston lights when object is rotated
   new  4af02c8   Debug menu
   new  e4f9360   Resources debug mode
   new  d38ddcb   goto() path debugger
   new  e24d77b   goto() bitmap debugger
   new  427bbfa   Changed CParticle::CheckChannel log message
   new  64fef98   Merge branch 'dev-0.1.8' into dev
   new  2ea453f   Change SatCom button size in main menu
   new  7e1b112   Merge pull request #749 from Erihel/dev
   new  8ccad5b   Deactive pause before jumping to next visit
   new  ef0147e   Merge pull request #750 from Erihel/dev
   new  a06035e   Fix occured/occurred spelling error
   new  761c854   Add Keywords key in desktop file
   new  d84304c   Merge pull request #751 from OdyX/018-minor-fixes
   new  39b364f   Fixed compilation with disabled sound support, closes #748
   new  02633e3   Merge branch 'master' into dev
   new  b5438c3   Fix CMake warning when compiling on OSX
   new  89389e8   Fix desktop SVG icon not resizing properly
   new  3a3653d   Add warning messages if tool programs are not found
   new  72f966b   Fix for #738
   new  9639dc5   Fix typo
   new  98dd9f9   Fixed code style warnings
   new  c0780f9   One more code style fix
   new  1960b37   Solves #700
   new  831276f   Appearance customization face butons fix
   new  6afdb7b   First person camera unlocked for Me and Tech
   new  6216dae   Merge part of PR #756
   new  15702ec   Fixed indentation
   new  4a29e84   Fix syntax and type checking for CBotListArray
   new  accfc93   Add syntax and type checking for class member vars
   new  707ef97   Fix syntax+type checking, base types+CBotDefArray
   new  5b3da83   Fix inline declaration of an array of string
   new  6be1f56   Add error code no expression, remove some bad code
   new  8b7410f   Fix class.arrays using size of one before comma
   new  02133d0   Fix method overloading
   new  1472100   Merged PR #737: Fix for various issues with initializing 
variables in CBOT
   new  059a546   Reenabled unit tests that started working after 
14721001e5ad8a7d4a3c893d0343125eddc20ddc
   new  09a5869   Updated data submodule
   new  c94ebb4   Moved pathman from common/ to app/
   new  71a77c7   Hack to finally fix #738
   new  0d12ded   Fixed failed assertion when non-damageable objects get 
fall damage (closes #764)
   new  ac95097   Fixed AlienWorm collisions (#740)
   new  6144039   Fix initializing static array in class definition
   new  748f003   Fix array in a class not working with sizeof()...
   new  1941020   Merge pull request #762 from melex750/dev
   new  efc5431   Enabled ArraysInClasses test after 
1941020993d740c7dc90762a9dbf788916729e63
   new  c6c01c3   Fix displaying of text highlights (#738)
   new  4c8da2c   LevelController improvements; minor EndMissionTake cleanup
   new  ed58e7e   Fix compile warning
   new  3e4fbe9   This time really fixed compile errors
   new  7f38aca   Improvements to ObligatoryToken/ProhibitedToken
   new  bd9184b   Refactored part of CScript to std::string
   new  14e2910   Proper plural form translations for ObligatoryToken
   new  139592b   Proper l10n for date/time
   new  04d7c34   Removed misc.cpp / misc.h
   new  e75ed79   Updated data submodule
   new  32af7f4   Fixed missing #includes
   new  4de9d25   Man, those compile errors...
   new  ae4e875   Do not store exact object part positions
   new  d3f808f   Merge branch 'dev-savegame' into dev
   new  dd8a324   Fixed crash when loading level with incorrect object type
   new  952a542   Fixed non-power-of-2 images in SatCom (closes #634); 
fixed not unloading textures on SatCom close
   new  e794296   Fix checking parameters in CBotFunction
   new  54a34a9   Merge pull request #768 from melex750/dev
   new  7c551dc   Added unit tests for #768
   new  c00a7fd   Do not zoom while scrolling lists, closes #769
   new  9870cfe   Clamp FogStart value to 0 if negative
   new  734e6e9   Group source files for IDE projects in CMake
   new  ebca89d   Removed texture coordinate generation
   new  8922bb5   Renamed CGLDevice to 

[colobot] 08/145: Replaced CConfigFile::GetInstancePointer() with GetConfigFile()

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 640c0297ef5644d0f8cd3de3bd610439ad437d98
Author: krzys-h 
Date:   Sat Mar 26 18:34:26 2016 +0100

Replaced CConfigFile::GetInstancePointer() with GetConfigFile()
---
 src/app/input.cpp| 20 ++--
 src/common/config_file.h |  4 ++--
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/app/input.cpp b/src/app/input.cpp
index ca7aff4..ed1fdf9 100644
--- a/src/app/input.cpp
+++ b/src/app/input.cpp
@@ -332,7 +332,7 @@ InputSlot CInput::FindBinding(unsigned int key)
 void CInput::SaveKeyBindings()
 {
 std::stringstream key;
-CConfigFile::GetInstancePointer()->SetStringProperty("Keybindings", 
"_Version", "SDL2");
+GetConfigFile().SetStringProperty("Keybindings", "_Version", "SDL2");
 for (int i = 0; i < INPUT_SLOT_MAX; i++)
 {
 InputBinding b = GetInputBinding(static_cast(i));
@@ -341,30 +341,30 @@ void CInput::SaveKeyBindings()
 key.str("");
 key << b.primary << " " << b.secondary;
 
-CConfigFile::GetInstancePointer()->SetStringProperty("Keybindings", 
m_keyTable[static_cast(i)], key.str());
+GetConfigFile().SetStringProperty("Keybindings", 
m_keyTable[static_cast(i)], key.str());
 }
 
 for (int i = 0; i < JOY_AXIS_SLOT_MAX; i++)
 {
 JoyAxisBinding b = GetJoyAxisBinding(static_cast(i));
 
-CConfigFile::GetInstancePointer()->SetIntProperty("Setup", 
"JoystickAxisBinding"+boost::lexical_cast(i), b.axis);
-CConfigFile::GetInstancePointer()->SetIntProperty("Setup", 
"JoystickAxisInvert"+boost::lexical_cast(i), b.invert);
+GetConfigFile().SetIntProperty("Setup", 
"JoystickAxisBinding"+boost::lexical_cast(i), b.axis);
+GetConfigFile().SetIntProperty("Setup", 
"JoystickAxisInvert"+boost::lexical_cast(i), b.invert);
 }
-CConfigFile::GetInstancePointer()->SetFloatProperty("Setup", 
"JoystickDeadzone", GetJoystickDeadzone());
+GetConfigFile().SetFloatProperty("Setup", "JoystickDeadzone", 
GetJoystickDeadzone());
 }
 
 void CInput::LoadKeyBindings()
 {
 std::stringstream skey;
 std::string keys;
-if (CConfigFile::GetInstancePointer()->GetStringProperty("Keybindings", 
"_Version", keys) && keys == "SDL2") // Keybindings from SDL1.2 are 
incompatible with SDL2 !!
+if (GetConfigFile().GetStringProperty("Keybindings", "_Version", keys) && 
keys == "SDL2") // Keybindings from SDL1.2 are incompatible with SDL2 !!
 {
 for (int i = 0; i < INPUT_SLOT_MAX; i++)
 {
 InputBinding b;
 
-if 
(!CConfigFile::GetInstancePointer()->GetStringProperty("Keybindings", 
m_keyTable[static_cast(i)], keys))
+if (!GetConfigFile().GetStringProperty("Keybindings", 
m_keyTable[static_cast(i)], keys))
 continue;
 skey.clear();
 skey.str(keys);
@@ -380,17 +380,17 @@ void CInput::LoadKeyBindings()
 {
 JoyAxisBinding b;
 
-if (!CConfigFile::GetInstancePointer()->GetIntProperty("Setup", 
"JoystickAxisBinding"+boost::lexical_cast(i), b.axis))
+if (!GetConfigFile().GetIntProperty("Setup", 
"JoystickAxisBinding"+boost::lexical_cast(i), b.axis))
 continue;
 
 int x = 0;
-CConfigFile::GetInstancePointer()->GetIntProperty("Setup", 
"JoystickAxisInvert"+boost::lexical_cast(i), x); // If doesn't 
exist, use default (0)
+GetConfigFile().GetIntProperty("Setup", 
"JoystickAxisInvert"+boost::lexical_cast(i), x); // If doesn't 
exist, use default (0)
 b.invert = (x != 0);
 
 SetJoyAxisBinding(static_cast(i), b);
 }
 float deadzone;
-if (CConfigFile::GetInstancePointer()->GetFloatProperty("Setup", 
"JoystickDeadzone", deadzone))
+if (GetConfigFile().GetFloatProperty("Setup", "JoystickDeadzone", 
deadzone))
 SetJoystickDeadzone(deadzone);
 }
 
diff --git a/src/common/config_file.h b/src/common/config_file.h
index 02a000c..0ed8e19 100644
--- a/src/common/config_file.h
+++ b/src/common/config_file.h
@@ -107,8 +107,8 @@ private:
 bool m_loaded;
 };
 
-//! Global function to get profile instance
+//! Global function to get config file instance
 inline CConfigFile & GetConfigFile()
 {
-return *CConfigFile::GetInstancePointer();
+return CConfigFile::GetInstance();
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 16/145: Resources debug mode

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit e4f9360e63fcd7ee66dc942a927b0ac799d1d3e2
Author: krzys-h 
Date:   Mon Mar 28 17:57:41 2016 +0200

Resources debug mode
---
 src/common/event.h  |  7 ---
 src/graphics/engine/engine.cpp  | 37 -
 src/graphics/engine/engine.h|  4 
 src/graphics/engine/terrain.cpp | 36 +---
 src/graphics/engine/terrain.h   |  2 ++
 src/ui/debug_menu.cpp   | 15 +++
 6 files changed, 82 insertions(+), 19 deletions(-)

diff --git a/src/common/event.h b/src/common/event.h
index d1b851c..c5fe1f5 100644
--- a/src/common/event.h
+++ b/src/common/event.h
@@ -384,9 +384,10 @@ enum EventType
 EVENT_DBG_SPAWN_OBJ = 851,
 EVENT_DBG_TELEPORT  = 852,
 EVENT_DBG_LIGHTNING = 853,
-EVENT_DBG_CRASHSPHERES  = 854,
-EVENT_DBG_LIGHTS= 855,
-EVENT_DBG_LIGHTS_DUMP   = 856,
+EVENT_DBG_RESOURCES = 854,
+EVENT_DBG_CRASHSPHERES  = 855,
+EVENT_DBG_LIGHTS= 856,
+EVENT_DBG_LIGHTS_DUMP   = 857,
 
 EVENT_SPAWN_CANCEL  = 860,
 EVENT_SPAWN_ME  = 861,
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index 4ab66f3..e3e3431 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -3971,7 +3971,7 @@ void CEngine::UpdateGroundSpotTextures()
 set = true;
 }
 
-if (clear || set)
+if (clear || set || m_debugResources)
 {
 CImage shadowImg(Math::IntPoint(256, 256));
 shadowImg.Fill(Gfx::IntColor(255, 255, 255, 255));
@@ -4131,6 +4131,29 @@ void CEngine::UpdateGroundSpotTextures()
 }
 }
 
+if (m_debugResources)
+{
+for (float x = min.x; x < max.x; x += 1.0f)
+{
+for (float y = min.y; y < max.y; y += 1.0f)
+{
+Math::Vector pos(
+x / 4.0f / 254.0f * 3200.0f - 1600.0f,
+0.0f,
+y / 4.0f / 254.0f * 3200.0f - 1600.0f
+);
+TerrainRes res = m_terrain->GetResource(pos);
+Math::IntPoint p(x-min.x, y-min.y);
+if (res == TR_NULL)
+{
+shadowImg.SetPixel(p, Gfx::Color(0.5f, 0.5f, 
0.5f));
+continue;
+}
+shadowImg.SetPixelInt(p, ResourceToColor(res));
+}
+}
+}
+
 std::stringstream str;
 str << "textures/shadow" << std::setfill('0') << std::setw(2) << s 
<< ".png";
 std::string texName = str.str();
@@ -5094,4 +5117,16 @@ void CEngine::DebugDumpLights()
 m_debugDumpLights = true;
 }
 
+void CEngine::SetDebugResources(bool debugResources)
+{
+m_debugResources = debugResources;
+m_firstGroundSpot = true; // Force a refresh of ground spot textures
+UpdateGroundSpotTextures();
+}
+
+bool CEngine::GetDebugResources()
+{
+return m_debugResources;
+}
+
 } // namespace Gfx
diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h
index ba1b171..f95bdf3 100644
--- a/src/graphics/engine/engine.h
+++ b/src/graphics/engine/engine.h
@@ -1188,6 +1188,9 @@ public:
 boolGetDebugLights();
 voidDebugDumpLights();
 
+voidSetDebugResources(bool debugResources);
+boolGetDebugResources();
+
 protected:
 //! Resets some states and flushes textures after device was changed (e.g. 
resoulution changed)
 /** Instead of calling this directly, send EVENT_RESOLUTION_CHANGED event 
**/
@@ -1478,6 +1481,7 @@ protected:
 boolm_debugLights;
 boolm_debugDumpLights;
 boolm_debugCrashSpheres = false;
+boolm_debugResources = false;
 
 std::string m_timerText;
 
diff --git a/src/graphics/engine/terrain.cpp b/src/graphics/engine/terrain.cpp
index 8475a8a..7ff2417 100644
--- a/src/graphics/engine/terrain.cpp
+++ b/src/graphics/engine/terrain.cpp
@@ -192,6 +192,22 @@ void CTerrain::AddMaterial(int id, const std::string& 
texName, const Math::Point
 }
 
 
+// values from original bitmap palette
+const std::map RESOURCE_PALETTE = {
+{TR_STONE,   Gfx::IntColor(255,   0, 0)},
+{TR_URANIUM, Gfx::IntColor(255, 255, 0)},
+{TR_POWER,   Gfx::IntColor(  0, 255, 0)},
+{TR_KEY_A,   Gfx::IntColor(  0, 204, 0)},
+{TR_KEY_B,   Gfx::IntColor( 51, 204, 0)},
+{TR_KEY_C,   Gfx::IntColor(102, 204, 0)},
+{TR_KEY_D,   Gfx::IntColor(153, 204, 0)}
+};
+
+Gfx::IntColor ResourceToColor(TerrainRes res)
+{
+   

[colobot] 07/145: Fix method overloading

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 02133d0bd48a54a17a0b5d59b596c009fb512c19
Author: melex750 
Date:   Mon Mar 21 07:56:52 2016 -0400

Fix method overloading
---
 src/CBot/CBotClass.cpp | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/CBot/CBotClass.cpp b/src/CBot/CBotClass.cpp
index e701db8..27794d7 100644
--- a/src/CBot/CBotClass.cpp
+++ b/src/CBot/CBotClass.cpp
@@ -33,6 +33,7 @@
 #include "CBot/CBotExternalCall.h"
 #include "CBot/CBotStack.h"
 #include "CBot/CBotCStack.h"
+#include "CBot/CBotDefParam.h"
 #include "CBot/CBotUtils.h"
 #include "CBot/CBotFileUtils.h"
 #include "CBot/CBotCallMethode.h"
@@ -604,9 +605,14 @@ bool CBotClass::CompileDefItem(CBotToken* , CBotCStack* 
pStack, bool bSecond)
 // return a method precompiled in pass 1
 CBotFunction*   pf = m_pMethod;
 CBotFunction*   prev = nullptr;
-while ( pf != nullptr )
+CBotToken* ppp = p;
+CBotCStack* pStk = pStack->TokenStack(nullptr, true);
+CBotDefParam* params = CBotDefParam::Compile(p, pStk );
+delete pStk;
+p = ppp;
+while ( pf != nullptr ) // 
search by name and parameters
 {
-if (pf->GetName() == pp) break;
+if (pf->GetName() == pp && pf->CheckParam( params )) 
break;
 prev = pf;
 pf = pf->Next();
 }
@@ -708,7 +714,7 @@ bool CBotClass::CompileDefItem(CBotToken* , CBotCStack* 
pStack, bool bSecond)
 i = CBotTwoOpExpr::Compile(p, pStack);
 
 if ( !(type.Eq(CBotTypPointer) && 
pStack->GetTypResult().Eq(CBotTypNullPointer)) &&
- !TypesCompatibles( type, pStack->GetTypResult()) )
+ !TypesCompatibles( type2, pStack->GetTypResult()) )
 {
 pStack->SetError(CBotErrBadType1, p->GetStart());
 return false;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 12/145: Changed reference colors using when recoloring textures to constants

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit d2ac1afcf04f28fced52799fe42892ef1bfd6ebd
Author: krzys-h 
Date:   Sun Mar 27 13:34:26 2016 +0200

Changed reference colors using when recoloring textures to constants
---
 src/level/robotmain.cpp | 65 -
 src/level/robotmain.h   |  4 ---
 2 files changed, 26 insertions(+), 43 deletions(-)

diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index ed520ba..1234224 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -116,6 +116,12 @@
 const float UNIT = 4.0f;// default for g_unit
 float   g_unit; // conversion factor
 
+// Reference colors used when recoloring textures, see ChangeColor()
+const Gfx::Color COLOR_REF_BOT   = Gfx::Color( 10.0f/256.0f, 166.0f/256.0f, 
254.0f/256.0f);  // blue
+const Gfx::Color COLOR_REF_ALIEN = Gfx::Color(135.0f/256.0f, 170.0f/256.0f,  
13.0f/256.0f);  // green
+const Gfx::Color COLOR_REF_GREEN = Gfx::Color(135.0f/256.0f, 170.0f/256.0f,  
13.0f/256.0f);  // green
+const Gfx::Color COLOR_REF_WATER = Gfx::Color( 25.0f/256.0f, 255.0f/256.0f, 
240.0f/256.0f);  // cyan
+
 
 template<> CRobotMain* CSingleton::m_instance = nullptr;
 
@@ -2823,30 +2829,11 @@ void CRobotMain::CreateScene(bool soluce, bool 
fixScene, bool resetObject)
 
 m_controller = nullptr;
 
-m_colorRefBot.r =  10.0f/256.0f;
-m_colorRefBot.g = 166.0f/256.0f;
-m_colorRefBot.b = 254.0f/256.0f;  // blue
-m_colorRefBot.a = 0.0f;
 m_colorNewBot.clear();
-m_colorNewBot[0] = m_colorRefBot;
-
-m_colorRefAlien.r = 135.0f/256.0f;
-m_colorRefAlien.g = 170.0f/256.0f;
-m_colorRefAlien.b =  13.0f/256.0f;  // green
-m_colorRefAlien.a = 0.0f;
-m_colorNewAlien = m_colorRefAlien;
-
-m_colorRefGreen.r = 135.0f/256.0f;
-m_colorRefGreen.g = 170.0f/256.0f;
-m_colorRefGreen.b =  13.0f/256.0f;  // green
-m_colorRefGreen.a = 0.0f;
-m_colorNewGreen = m_colorRefGreen;
-
-m_colorRefWater.r =  25.0f/256.0f;
-m_colorRefWater.g = 255.0f/256.0f;
-m_colorRefWater.b = 240.0f/256.0f;  // cyan
-m_colorRefWater.a = 0.0f;
-m_colorNewWater = m_colorRefWater;
+m_colorNewBot[0] = COLOR_REF_BOT;
+m_colorNewAlien = COLOR_REF_ALIEN;
+m_colorNewGreen = COLOR_REF_GREEN;
+m_colorNewWater = COLOR_REF_WATER;
 
 m_engine->SetAmbientColor(Gfx::Color(0.5f, 0.5f, 0.5f, 0.5f), 0);
 m_engine->SetAmbientColor(Gfx::Color(0.5f, 0.5f, 0.5f, 0.5f), 1);
@@ -3249,7 +3236,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, 
bool resetObject)
 
line->GetParam("level")->AsFloat(100.0f)*g_unit,
 line->GetParam("glint")->AsFloat(1.0f),
 pos);
-m_colorNewWater = 
line->GetParam("color")->AsColor(m_colorRefWater);
+m_colorNewWater = 
line->GetParam("color")->AsColor(COLOR_REF_WATER);
 m_colorShiftWater = 
line->GetParam("brightness")->AsFloat(0.0f);
 continue;
 }
@@ -3951,26 +3938,26 @@ void CRobotMain::ChangeColor()
 
 // VehicleColor
 
-for(auto it : m_colorNewBot)
+for (auto it : m_colorNewBot)
 {
 int team = it.first;
 Gfx::Color newColor = it.second;
 std::string teamStr = StrUtils::ToString(team);
 if(team == 0) teamStr = "";
 
-m_engine->ChangeTextureColor("textures/objects/base1.png"+teamStr,   
"textures/objects/base1.png",   m_colorRefBot, newColor, colorRef2, colorNew2, 
0.10f, -1.0f, ts, ti, nullptr, 0, true);
-m_engine->ChangeTextureColor("textures/objects/convert.png"+teamStr, 
"textures/objects/convert.png", m_colorRefBot, newColor, colorRef2, colorNew2, 
0.10f, -1.0f, ts, ti, nullptr, 0, true);
-m_engine->ChangeTextureColor("textures/objects/derrick.png"+teamStr, 
"textures/objects/derrick.png", m_colorRefBot, newColor, colorRef2, colorNew2, 
0.10f, -1.0f, ts, ti, nullptr, 0, true);
-m_engine->ChangeTextureColor("textures/objects/factory.png"+teamStr, 
"textures/objects/factory.png", m_colorRefBot, newColor, colorRef2, colorNew2, 
0.10f, -1.0f, ts, ti, nullptr, 0, true);
-m_engine->ChangeTextureColor("textures/objects/lemt.png"+teamStr,
"textures/objects/lemt.png",m_colorRefBot, newColor, colorRef2, colorNew2, 
0.10f, -1.0f, ts, ti, nullptr, 0, true);
-m_engine->ChangeTextureColor("textures/objects/roller.png"+teamStr,  
"textures/objects/roller.png",  m_colorRefBot, newColor, colorRef2, colorNew2, 
0.10f, -1.0f, ts, ti, nullptr, 0, true);
-m_engine->ChangeTextureColor("textures/objects/search.png"+teamStr,  
"textures/objects/search.png",  m_colorRefBot, newColor, colorRef2, colorNew2, 
0.10f, -1.0f, ts, 

[colobot] 10/145: Refactor CRobotMain::ExecuteCmd() to std::string

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 5de577400bbbe20b1e77ad1e37aa46540ddb9e9d
Author: krzys-h 
Date:   Sat Mar 26 19:05:58 2016 +0100

Refactor CRobotMain::ExecuteCmd() to std::string
---
 src/level/robotmain.cpp | 70 -
 src/level/robotmain.h   |  2 +-
 2 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 9a841e6..ed520ba 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -1156,25 +1156,25 @@ bool CRobotMain::ProcessEvent(Event )
 
 
 //! Executes a command
-void CRobotMain::ExecuteCmd(char *cmd)
+void CRobotMain::ExecuteCmd(const std::string& cmd)
 {
-if (cmd[0] == 0) return;
+if (cmd.empty()) return;
 
 if (m_phase == PHASE_SIMUL)
 {
-if (strcmp(cmd, "winmission") == 0)
+if (cmd == "winmission")
 m_eventQueue->AddEvent(Event(EVENT_WIN));
 
-if (strcmp(cmd, "lostmission") == 0)
+if (cmd == "lostmission")
 m_eventQueue->AddEvent(Event(EVENT_LOST));
 
-if (strcmp(cmd, "trainerpilot") == 0)
+if (cmd == "trainerpilot")
 {
 m_trainerPilot = !m_trainerPilot;
 return;
 }
 
-if (strcmp(cmd, "fly") == 0)
+if (cmd == "fly")
 {
 m_researchDone[0] |= RESEARCH_FLY;
 
@@ -1182,7 +1182,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
 return;
 }
 
-if (strcmp(cmd, "allresearch") == 0)
+if (cmd == "allresearch")
 {
 m_researchDone[0] = -1;  // all research are done
 
@@ -1190,7 +1190,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
 return;
 }
 
-if (strcmp(cmd, "allbuildings") == 0)
+if (cmd == "allbuildings")
 {
 m_build = -1;  // all buildings are available
 
@@ -1198,7 +1198,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
 return;
 }
 
-if (strcmp(cmd, "all") == 0)
+if (cmd == "all")
 {
 m_researchDone[0] = -1;  // all research are done
 m_build = -1;  // all buildings are available
@@ -1207,13 +1207,13 @@ void CRobotMain::ExecuteCmd(char *cmd)
 return;
 }
 
-if (strcmp(cmd, "nolimit") == 0)
+if (cmd == "nolimit")
 {
 m_terrain->SetFlyingMaxHeight(280.0f);
 return;
 }
 
-if (strcmp(cmd, "controller") == 0)
+if (cmd == "controller")
 {
 if (m_controller != nullptr)
 {
@@ -1231,7 +1231,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
 return;
 }
 
-if (strcmp(cmd, "photo1") == 0)
+if (cmd == "photo1")
 {
 if (m_freePhotoPause == nullptr)
 {
@@ -1247,7 +1247,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
 return;
 }
 
-if (strcmp(cmd, "photo2") == 0)
+if (cmd == "photo2")
 {
 if (m_freePhotoPause == nullptr)
 {
@@ -1269,26 +1269,26 @@ void CRobotMain::ExecuteCmd(char *cmd)
 }
 
 int camtype;
-if (sscanf(cmd, "camtype %d", ) > 0)
+if (sscanf(cmd.c_str(), "camtype %d", ) > 0)
 {
 m_camera->SetType(static_cast(camtype));
 return;
 }
 
 float camspeed;
-if (sscanf(cmd, "camspeed %f", ) > 0)
+if (sscanf(cmd.c_str(), "camspeed %f", ) > 0)
 {
 m_camera->SetCameraSpeed(camspeed);
 return;
 }
 
-if (strcmp(cmd, "freecam") == 0)
+if (cmd == "freecam")
 {
 m_camera->SetType(Gfx::CAM_TYPE_FREE);
 return;
 }
 
-if (strcmp(cmd, "noclip") == 0)
+if (cmd == "noclip")
 {
 CObject* object = GetSelect();
 if (object != nullptr)
@@ -1296,7 +1296,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
 return;
 }
 
-if (strcmp(cmd, "clip") == 0)
+if (cmd == "clip")
 {
 CObject* object = GetSelect();
 if (object != nullptr)
@@ -1304,7 +1304,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
 return;
 }
 
-if (strcmp(cmd, "addhusky") == 0)
+if (cmd == "addhusky")
 {
 CObject* object = GetSelect();
 if (object != nullptr && 
object->Implements(ObjectInterfaceType::Shielded))
@@ -1312,7 +1312,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
 return;
 }
 
-if (strcmp(cmd, "addfreezer") == 0)
+if (cmd == "addfreezer")
 {
 CObject* object = GetSelect();
 if (object != nullptr && 
object->Implements(ObjectInterfaceType::JetFlying))
@@ -1320,7 +1320,7 @@ void CRobotMain::ExecuteCmd(char *cmd)
 

[colobot] 14/145: Fixed Houston lights when object is rotated

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 45c93f58ec75e5fd5d4a93c2240961fc0174778f
Author: krzys-h 
Date:   Sun Mar 27 14:19:48 2016 +0200

Fixed Houston lights when object is rotated
---
 src/object/auto/autohouston.cpp | 64 -
 1 file changed, 31 insertions(+), 33 deletions(-)

diff --git a/src/object/auto/autohouston.cpp b/src/object/auto/autohouston.cpp
index a73b270..9ace408 100644
--- a/src/object/auto/autohouston.cpp
+++ b/src/object/auto/autohouston.cpp
@@ -18,6 +18,7 @@
  */
 
 
+#include 
 #include "object/auto/autohouston.h"
 
 #include "object/old_object.h"
@@ -30,23 +31,19 @@
 
 CAutoHouston::CAutoHouston(COldObject* object) : CAuto(object)
 {
-Math::Vectorpos;
-int i;
-
-for ( i=0 ; iGetPosition();
 m_lens[0].type = Gfx::PARTISELR;
 m_lens[1].type = Gfx::PARTISELR;
 m_lens[2].type = Gfx::PARTISELR;
 m_lens[3].type = Gfx::PARTISELR;
-m_lens[0].pos = pos+Math::Vector(0.0f+13.0f, 34.0f, 30.0f  );
-m_lens[1].pos = pos+Math::Vector(0.0f-13.0f, 34.0f, 30.0f  );
-m_lens[2].pos = pos+Math::Vector(0.0f  , 34.0f, 30.0f+13.0f);
-m_lens[3].pos = pos+Math::Vector(0.0f  , 34.0f, 30.0f-13.0f);
+m_lens[0].pos = Math::Vector(0.0f+13.0f, 34.0f, 30.0f  );
+m_lens[1].pos = Math::Vector(0.0f-13.0f, 34.0f, 30.0f  );
+m_lens[2].pos = Math::Vector(0.0f  , 34.0f, 30.0f+13.0f);
+m_lens[3].pos = Math::Vector(0.0f  , 34.0f, 30.0f-13.0f);
 m_lens[0].dim = 4.0f;
 m_lens[1].dim = 4.0f;
 m_lens[2].dim = 4.0f;
@@ -60,49 +57,50 @@ CAutoHouston::CAutoHouston(COldObject* object) : 
CAuto(object)
 m_lens[2].off = 0.4f;
 m_lens[3].off = 0.4f;
 
+int i = 4;
+
 // Part under the radar.
-i = 4;
 m_lens[i].type = Gfx::PARTISELR;
-m_lens[i].pos = pos+Math::Vector(-7.0f, 9.9f, 40.1f);
+m_lens[i].pos = Math::Vector(-7.0f, 9.9f, 40.1f);
 m_lens[i].dim = 1.8f;
 m_lens[i].total = 0.4f;
 m_lens[i].off = 0.2f;
 i ++;
 
 m_lens[i].type = Gfx::PARTISELY;
-m_lens[i].pos = pos+Math::Vector(-7.0f, 7.2f, 34.8f);
+m_lens[i].pos = Math::Vector(-7.0f, 7.2f, 34.8f);
 m_lens[i].dim = 0.4f;
 m_lens[i].total = 0.7f;
 m_lens[i].off = 0.3f;
 i ++;
 m_lens[i].type = Gfx::PARTISELY;
-m_lens[i].pos = pos+Math::Vector(-7.0f, 6.5f, 34.3f);
+m_lens[i].pos = Math::Vector(-7.0f, 6.5f, 34.3f);
 m_lens[i].dim = 0.4f;
 m_lens[i].total = 0.7f;
 m_lens[i].off = 0.3f;
 i ++;
 m_lens[i].type = Gfx::PARTISELR;
-m_lens[i].pos = pos+Math::Vector(-7.0f, 6.5f, 33.4f);
+m_lens[i].pos = Math::Vector(-7.0f, 6.5f, 33.4f);
 m_lens[i].dim = 0.4f;
 m_lens[i].total = 0.0f;
 m_lens[i].off = 0.0f;
 i ++;
 m_lens[i].type = Gfx::PARTISELR;
-m_lens[i].pos = pos+Math::Vector(-7.0f, 6.5f, 33.0f);
+m_lens[i].pos = Math::Vector(-7.0f, 6.5f, 33.0f);
 m_lens[i].dim = 0.4f;
 m_lens[i].total = 1.0f;
 m_lens[i].off = 0.5f;
 i ++;
 
 m_lens[i].type = Gfx::PARTISELY;
-m_lens[i].pos = pos+Math::Vector(-7.0f, 8.5f, 14.0f);
+m_lens[i].pos = Math::Vector(-7.0f, 8.5f, 14.0f);
 m_lens[i].dim = 1.2f;
 m_lens[i].total = 0.8f;
 m_lens[i].off = 0.2f;
 i ++;
 
 m_lens[i].type = Gfx::PARTISELR;
-m_lens[i].pos = pos+Math::Vector(4.0f, 6.0f, 8.6f);
+m_lens[i].pos = Math::Vector(4.0f, 6.0f, 8.6f);
 m_lens[i].dim = 1.0f;
 m_lens[i].total = 0.9f;
 m_lens[i].off = 0.7f;
@@ -110,53 +108,53 @@ CAutoHouston::CAutoHouston(COldObject* object) : 
CAuto(object)
 
 // Part with three windows.
 m_lens[i].type = Gfx::PARTISELR;
-m_lens[i].pos = pos+Math::Vector(-7.0f, 9.9f, -19.9f);
+m_lens[i].pos = Math::Vector(-7.0f, 9.9f, -19.9f);
 m_lens[i].dim = 1.0f;
 m_lens[i].total = 0.6f;
 m_lens[i].off = 0.3f;
 i ++;
 
 m_lens[i].type = Gfx::PARTISELY;
-m_lens[i].pos = pos+Math::Vector(-7.0f, 7.2f, 34.8f-60.0f);
+m_lens[i].pos = Math::Vector(-7.0f, 7.2f, 34.8f-60.0f);
 m_lens[i].dim = 0.4f;
 m_lens[i].total = 0.7f;
 m_lens[i].off = 0.3f;
 i ++;
 m_lens[i].type = Gfx::PARTISELY;
-m_lens[i].pos = pos+Math::Vector(-7.0f, 6.5f, 34.3f-60.0f);
+m_lens[i].pos = Math::Vector(-7.0f, 6.5f, 34.3f-60.0f);
 m_lens[i].dim = 0.4f;
 m_lens[i].total = 0.0f;
 m_lens[i].off = 0.0f;
 i ++;
 m_lens[i].type = Gfx::PARTISELR;
-m_lens[i].pos = pos+Math::Vector(-7.0f, 6.5f, 33.4f-60.0f);
+m_lens[i].pos = Math::Vector(-7.0f, 6.5f, 33.4f-60.0f);
 m_lens[i].dim = 0.4f;
 m_lens[i].total = 0.6f;
 m_lens[i].off = 0.4f;
 i ++;
 m_lens[i].type = Gfx::PARTISELR;
-m_lens[i].pos = pos+Math::Vector(-7.0f, 6.5f, 33.0f-60.0f);
+m_lens[i].pos = Math::Vector(-7.0f, 6.5f, 33.0f-60.0f);
 m_lens[i].dim = 0.4f;
 m_lens[i].total = 0.8f;
 m_lens[i].off = 

[colobot] 06/145: Fix class.arrays using size of one before comma

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 8b7410f803c89f5261071f28e75e7e15382b2521
Author: melex750 
Date:   Mon Mar 21 06:11:55 2016 -0400

Fix class.arrays using size of one before comma
---
 src/CBot/CBotClass.cpp| 34 +-
 src/CBot/CBotInstr/CBotDefBoolean.cpp |  2 +-
 src/CBot/CBotInstr/CBotDefClass.cpp   | 13 +++--
 src/CBot/CBotInstr/CBotDefFloat.cpp   |  2 +-
 src/CBot/CBotInstr/CBotDefInt.cpp |  2 +-
 src/CBot/CBotInstr/CBotDefString.cpp  |  2 +-
 src/CBot/CBotInstr/CBotListArray.cpp  | 15 ---
 src/CBot/CBotInstr/CBotListArray.h|  1 -
 8 files changed, 40 insertions(+), 31 deletions(-)

diff --git a/src/CBot/CBotClass.cpp b/src/CBot/CBotClass.cpp
index aca2d2b..e701db8 100644
--- a/src/CBot/CBotClass.cpp
+++ b/src/CBot/CBotClass.cpp
@@ -550,6 +550,7 @@ bool CBotClass::CompileDefItem(CBotToken* , CBotCStack* 
pStack, bool bSecond)
 
 while (pStack->IsOk())
 {
+CBotTypResult  type2 = CBotTypResult(type); // 
reset type after comma
 std::string pp = p->GetString();
 if ( IsOfType(p, ID_NOT) )
 {
@@ -575,7 +576,7 @@ bool CBotClass::CompileDefItem(CBotToken* , CBotCStack* 
pStack, bool bSecond)
 else
 i = new CBotEmpty();// special 
if not a formula
 
-type = CBotTypResult(CBotTypArrayPointer, type);
+type2 = CBotTypResult(CBotTypArrayPointer, type2);
 
 if (limites == nullptr) limites = i;
 else limites->AddNext3(i);
@@ -671,7 +672,7 @@ bool CBotClass::CompileDefItem(CBotToken* , CBotCStack* 
pStack, bool bSecond)
 }
 
 // definition of an element
-if (type.Eq(0))
+if (type2.Eq(0))
 {
 pStack->SetError(CBotErrNoTerminator, p);
 return false;
@@ -683,26 +684,33 @@ bool CBotClass::CompileDefItem(CBotToken* , CBotCStack* 
pStack, bool bSecond)
 pStack->SetStartError(p->GetStart());
 if ( IsOfType(p, ID_SEP) )
 {
-pStack->SetError(CBotErrNoExpression, p->GetPrev());
+pStack->SetError(CBotErrNoExpression, p->GetStart());
 return false;
 }
-if ( type.Eq(CBotTypArrayPointer) )
+if ( type2.Eq(CBotTypArrayPointer) )
 {
-i = CBotListArray::Compile(p, pStack, type.GetTypElem());
+if ( nullptr == (i = CBotListArray::Compile(p, pStack, 
type2.GetTypElem())) )
+{
+if (pStack->IsOk())
+{
+i = CBotTwoOpExpr::Compile(p, pStack);
+if (i == nullptr || 
!pStack->GetTypResult().Compare(type2))
+{
+pStack->SetError(CBotErrBadType1, 
p->GetStart());
+return false;
+}
+}
+}
 }
 else
 {
 // it has an assignmet to calculate
 i = CBotTwoOpExpr::Compile(p, pStack);
 
-CBotTypResult retType = 
pStack->GetTypResult(CBotVar::GetTypeMode::CLASS_AS_INTRINSIC);
-
-if ( (type.Eq(CBotTypString) && 
!retType.Eq(CBotTypString)) ||
- (!(type.Eq(CBotTypPointer) && 
retType.Eq(CBotTypNullPointer)) &&
-  !TypeCompatible( type, retType, ID_ASS)) )
-  
+if ( !(type.Eq(CBotTypPointer) && 
pStack->GetTypResult().Eq(CBotTypNullPointer)) &&
+ !TypesCompatibles( type, pStack->GetTypResult()) )
 {
-pStack->SetError(CBotErrBadType1, p->GetPrev());
+pStack->SetError(CBotErrBadType1, p->GetStart());
 return false;
 }
 }
@@ -712,7 +720,7 @@ bool CBotClass::CompileDefItem(CBotToken* , CBotCStack* 
pStack, bool bSecond)
 
 if ( !bSecond )
 {
-CBotVar*pv = CBotVar::Create(pp, type);
+CBotVar*pv = CBotVar::Create(pp, type2);
 pv -> SetStatic( bStatic );
 pv -> SetPrivate( mProtect );
 
diff --git a/src/CBot/CBotInstr/CBotDefBoolean.cpp 
b/src/CBot/CBotInstr/CBotDefBoolean.cpp
index d64a186..e89bdc8 100644
--- a/src/CBot/CBotInstr/CBotDefBoolean.cpp
+++ b/src/CBot/CBotInstr/CBotDefBoolean.cpp
@@ -90,7 +90,7 @@ CBotInstr* CBotDefBoolean::Compile(CBotToken* , CBotCStack* 
pStack, bool cont,
 

[colobot] 09/145: Refactor some references to CRobotMain from CEngine

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 6585ee9ae8ef7fedb3cf7fdd3d83c933be703dff
Author: krzys-h 
Date:   Sat Mar 26 18:55:39 2016 +0100

Refactor some references to CRobotMain from CEngine
---
 src/app/app.cpp|  2 +-
 src/common/event.cpp   |  2 ++
 src/common/event.h |  4 
 src/graphics/engine/engine.cpp |  9 ++---
 src/graphics/engine/engine.h   |  8 +---
 src/level/robotmain.cpp| 41 +
 src/level/robotmain.h  |  3 ---
 7 files changed, 35 insertions(+), 34 deletions(-)

diff --git a/src/app/app.cpp b/src/app/app.cpp
index 5e91af9..fbf6018 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -822,7 +822,7 @@ bool CApplication::ChangeVideoConfig(const 
Gfx::DeviceConfig )
 
 m_device->ConfigChanged(m_deviceConfig);
 
-m_engine->ResetAfterVideoConfigChanged();
+m_eventQueue->AddEvent(Event(EVENT_RESOLUTION_CHANGED));
 
 return true;
 }
diff --git a/src/common/event.cpp b/src/common/event.cpp
index ccd7fe8..49b5218 100644
--- a/src/common/event.cpp
+++ b/src/common/event.cpp
@@ -68,6 +68,8 @@ void InitializeEventTypeTexts()
 
 
 EVENT_TYPE_TEXT[EVENT_UPDINTERFACE]  = "EVENT_UPDINTERFACE";
+EVENT_TYPE_TEXT[EVENT_RESOLUTION_CHANGED]= "EVENT_RESOLUTION_CHANGED";
+EVENT_TYPE_TEXT[EVENT_RELOAD_TEXTURES]   = "EVENT_RELOAD_TEXTURES";
 EVENT_TYPE_TEXT[EVENT_WIN]   = "EVENT_WIN";
 EVENT_TYPE_TEXT[EVENT_LOST]  = "EVENT_LOST";
 
diff --git a/src/common/event.h b/src/common/event.h
index 50fb0c9..b4eb79f 100644
--- a/src/common/event.h
+++ b/src/common/event.h
@@ -95,6 +95,10 @@ enum EventType
 //! Event sent on user quit request
 EVENT_QUIT  = 20,
 EVENT_UPDINTERFACE  = 21,
+//! Event sent on resolution change
+EVENT_RESOLUTION_CHANGED = 22,
+//! Event sent when textures have to be reloaded
+EVENT_RELOAD_TEXTURES   = 23,
 EVENT_WIN   = 30,
 EVENT_LOST  = 31,
 
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index a66f806..afc8a17 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -359,8 +359,6 @@ void CEngine::ResetAfterVideoConfigChanged()
 m_size = m_app->GetVideoConfig().size;
 m_mouseSize = Math::Point(0.04f, 0.04f * (static_cast(m_size.x) / 
static_cast(m_size.y)));
 
-CRobotMain::GetInstancePointer()->ResetAfterVideoConfigChanged(); //TODO: 
Remove cross-reference to CRobotMain
-
 // Update the camera projection matrix for new aspect ratio
 SetFocus(m_focus);
 
@@ -373,13 +371,18 @@ void CEngine::ReloadAllTextures()
 FlushTextureCache();
 m_text->FlushCache();
 
-CRobotMain::GetInstancePointer()->ReloadAllTextures(); //TODO: Remove 
cross-reference to CRobotMain
+m_app->GetEventQueue()->AddEvent(Event(EVENT_RELOAD_TEXTURES));
 UpdateGroundSpotTextures();
 LoadAllTextures();
 }
 
 bool CEngine::ProcessEvent(const Event )
 {
+if (event.type == EVENT_RESOLUTION_CHANGED)
+{
+ResetAfterVideoConfigChanged();
+}
+
 if (event.type == EVENT_KEY_DOWN)
 {
 auto data = event.GetData();
diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h
index 5fc65a2..bda5f78 100644
--- a/src/graphics/engine/engine.h
+++ b/src/graphics/engine/engine.h
@@ -655,9 +655,6 @@ public:
 //! Frees all resources before exit
 voidDestroy();
 
-//! Resets some states and flushes textures after device was changed (e.g. 
resoulution changed)
-voidResetAfterVideoConfigChanged();
-
 
 //! Called once per frame, the call is the entry point for rendering
 voidRender();
@@ -1188,6 +1185,10 @@ public:
 voidAddDisplayCrashSpheres(const std::vector& 
crashSpheres);
 
 protected:
+//! Resets some states and flushes textures after device was changed (e.g. 
resoulution changed)
+/** Instead of calling this directly, send EVENT_RESOLUTION_CHANGED event 
**/
+voidResetAfterVideoConfigChanged();
+
 //! Prepares the interface for 3D scene
 voidDraw3DScene();
 //! Renders shadow map
@@ -1281,6 +1282,7 @@ protected:
 static void WriteScreenShotThread(std::unique_ptr 
data);
 
 //! Reloads all textures
+/** This additionally sends EVENT_RELOAD_TEXTURES to reload all textures 
not maintained by CEngine **/
 void ReloadAllTextures();
 
 protected:
diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 514d218..9a841e6 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -303,30 +303,6 @@ CPauseManager* CRobotMain::GetPauseManager()
 return m_pause.get();
 }
 
-void CRobotMain::ResetAfterVideoConfigChanged()
-{
-// Recreate the interface (needed if the aspect ratio changes)
- 

[colobot] 17/145: goto() path debugger

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit d38ddcbc4199fe624f9b6689127363ee7bb5693d
Author: krzys-h 
Date:   Mon Mar 28 20:25:07 2016 +0200

goto() path debugger
---
 src/common/event.h |  7 ---
 src/graphics/engine/engine.cpp | 30 ++
 src/graphics/engine/engine.h   |  6 ++
 src/object/task/taskgoto.cpp   | 33 -
 src/ui/debug_menu.cpp  | 14 ++
 5 files changed, 86 insertions(+), 4 deletions(-)

diff --git a/src/common/event.h b/src/common/event.h
index c5fe1f5..d3f22b0 100644
--- a/src/common/event.h
+++ b/src/common/event.h
@@ -385,9 +385,10 @@ enum EventType
 EVENT_DBG_TELEPORT  = 852,
 EVENT_DBG_LIGHTNING = 853,
 EVENT_DBG_RESOURCES = 854,
-EVENT_DBG_CRASHSPHERES  = 855,
-EVENT_DBG_LIGHTS= 856,
-EVENT_DBG_LIGHTS_DUMP   = 857,
+EVENT_DBG_GOTO  = 855,
+EVENT_DBG_CRASHSPHERES  = 856,
+EVENT_DBG_LIGHTS= 857,
+EVENT_DBG_LIGHTS_DUMP   = 858,
 
 EVENT_SPAWN_CANCEL  = 860,
 EVENT_SPAWN_ME  = 861,
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index e3e3431..7d00e87 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -3378,6 +3378,21 @@ void CEngine::Draw3DScene()
 if (m_debugCrashSpheres)
 DrawCrashSpheres();
 
+if (m_debugGoto)
+{
+Math::Matrix worldMatrix;
+worldMatrix.LoadIdentity();
+m_device->SetTransform(TRANSFORM_WORLD, worldMatrix);
+
+SetState(ENG_RSTATE_OPAQUE_COLOR);
+
+for (const auto& line : m_displayGoto)
+{
+m_device->DrawPrimitive(PRIMITIVE_LINE_STRIP, line.data(), 
line.size());
+}
+}
+m_displayGoto.clear();
+
 m_app->StartPerformanceCounter(PCNT_RENDER_PARTICLE);
 m_particle->DrawParticle(SH_WORLD); // draws the particles of the 3D world
 m_app->StopPerformanceCounter(PCNT_RENDER_PARTICLE);
@@ -5129,4 +5144,19 @@ bool CEngine::GetDebugResources()
 return m_debugResources;
 }
 
+void CEngine::SetDebugGoto(bool debugGoto)
+{
+m_debugGoto = debugGoto;
+}
+
+bool CEngine::GetDebugGoto()
+{
+return m_debugGoto;
+}
+
+void CEngine::AddDebugGotoLine(std::vector line)
+{
+m_displayGoto.push_back(line);
+}
+
 } // namespace Gfx
diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h
index f95bdf3..04757fc 100644
--- a/src/graphics/engine/engine.h
+++ b/src/graphics/engine/engine.h
@@ -1191,6 +1191,10 @@ public:
 voidSetDebugResources(bool debugResources);
 boolGetDebugResources();
 
+voidSetDebugGoto(bool debugGoto);
+boolGetDebugGoto();
+voidAddDebugGotoLine(std::vector line);
+
 protected:
 //! Resets some states and flushes textures after device was changed (e.g. 
resoulution changed)
 /** Instead of calling this directly, send EVENT_RESOLUTION_CHANGED event 
**/
@@ -1482,12 +1486,14 @@ protected:
 boolm_debugDumpLights;
 boolm_debugCrashSpheres = false;
 boolm_debugResources = false;
+boolm_debugGoto = false;
 
 std::string m_timerText;
 
 std::unordered_map m_staticMeshBaseObjects;
 
 std::vector m_displayCrashSpheres;
+std::vector m_displayGoto;
 
 //! Pause the animation updates
 boolm_pause = false;
diff --git a/src/object/task/taskgoto.cpp b/src/object/task/taskgoto.cpp
index d7e36cd..7a6c754 100644
--- a/src/object/task/taskgoto.cpp
+++ b/src/object/task/taskgoto.cpp
@@ -77,9 +77,38 @@ bool CTaskGoto::EventProcess(const Event )
 float   a, g, dist, linSpeed, cirSpeed, h, hh, factor, dir;
 Error   ret;
 
-if ( m_engine->GetPause() )  return true;
 if ( event.type != EVENT_FRAME )  return true;
 
+if (m_engine->GetDebugGoto())
+{
+auto AdjustPoint = [&](Math::Vector p) -> Math::Vector
+{
+m_terrain->AdjustToFloor(p);
+p.y += 2.0f;
+return p;
+};
+
+std::vector debugLine;
+if (m_bmTotal > 0)
+{
+Gfx::Color color = Gfx::Color(0.0f, 1.0f, 0.0f);
+for (int i = 0; i < m_bmTotal; i++)
+{
+if (i > m_bmIndex-1)
+color = Gfx::Color(1.0f, 0.0f, 0.0f);
+debugLine.push_back(Gfx::VertexCol(AdjustPoint(m_bmPoints[i]), 
color));
+}
+m_engine->AddDebugGotoLine(debugLine);
+debugLine.clear();
+}
+Gfx::Color color = Gfx::Color(0.0f, 0.0f, 1.0f);
+debugLine.push_back(Gfx::VertexCol(m_object->GetPosition(), color));
+debugLine.push_back(Gfx::VertexCol(AdjustPoint(m_bmTotal > 0 && 
m_bmIndex <= m_bmTotal && 

[colobot] 11/145: Removed unused members of CNullDevice

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit adf20f58d41565780fda4194fa926aa1a9358524
Author: krzys-h 
Date:   Sat Mar 26 19:49:24 2016 +0100

Removed unused members of CNullDevice
---
 src/graphics/core/nulldevice.cpp |  3 ---
 src/graphics/core/nulldevice.h   | 11 ---
 2 files changed, 14 deletions(-)

diff --git a/src/graphics/core/nulldevice.cpp b/src/graphics/core/nulldevice.cpp
index 5ab4ec0..ad483ed 100644
--- a/src/graphics/core/nulldevice.cpp
+++ b/src/graphics/core/nulldevice.cpp
@@ -27,9 +27,6 @@ namespace Gfx
 
 CNullDevice::CNullDevice()
 {
-m_matrix = Math::Matrix();
-m_material = Material();
-m_light = Light();
 }
 
 CNullDevice::~CNullDevice()
diff --git a/src/graphics/core/nulldevice.h b/src/graphics/core/nulldevice.h
index 68f2eff..3a78ea8 100644
--- a/src/graphics/core/nulldevice.h
+++ b/src/graphics/core/nulldevice.h
@@ -17,11 +17,6 @@
  * along with this program. If not, see http://gnu.org/licenses
  */
 
-/**
- * \file graphics/core/device.h
- * \brief Abstract graphics device - CDevice class and related structs/enums
- */
-
 #pragma once
 
 #include "graphics/core/device.h"
@@ -38,7 +33,6 @@ namespace Gfx
 /**
  * \class CNullDevice
  * \brief Device implementation that doesn't render anything
- *
  */
 class CNullDevice : public CDevice
 {
@@ -160,11 +154,6 @@ public:
 int GetMaxTextureSize() override;
 
 bool IsFramebufferSupported() override;
-
-private:
-Math::Matrix m_matrix;
-Material m_material;
-Lightm_light;
 };
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 03/145: Fix syntax+type checking, base types+CBotDefArray

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 707ef976261b4221330f93113d6886b97381c533
Author: melex750 
Date:   Sun Mar 20 07:54:41 2016 -0400

Fix syntax+type checking, base types+CBotDefArray
---
 src/CBot/CBotInstr/CBotDefArray.cpp   | 41 +++
 src/CBot/CBotInstr/CBotDefBoolean.cpp | 13 ++-
 src/CBot/CBotInstr/CBotDefClass.cpp   | 15 +++--
 src/CBot/CBotInstr/CBotDefFloat.cpp   | 13 ++-
 src/CBot/CBotInstr/CBotDefInt.cpp | 25 -
 src/CBot/CBotInstr/CBotDefString.cpp  | 10 +++--
 6 files changed, 66 insertions(+), 51 deletions(-)

diff --git a/src/CBot/CBotInstr/CBotDefArray.cpp 
b/src/CBot/CBotInstr/CBotDefArray.cpp
index 2cb05aa..c70c8f9 100644
--- a/src/CBot/CBotInstr/CBotDefArray.cpp
+++ b/src/CBot/CBotInstr/CBotDefArray.cpp
@@ -72,19 +72,26 @@ CBotInstr* CBotDefArray::Compile(CBotToken* , CBotCStack* 
pStack, CBotTypResul
 CBotInstr*i;
 while (IsOfType(p,  ID_OPBRK))
 {
+pStk->SetStartError(p->GetStart());
 if (p->GetType() != ID_CLBRK)
-i = CBotExpression::Compile(p, pStk);   // 
expression for the value
+{
+i = CBotExpression::Compile(p, pStk);  // 
expression for the value
+if (i == nullptr || pStk->GetType() >= CBotTypBoolean) // must 
be a number
+{
+pStk->SetError(CBotErrBadIndex, p->GetStart());
+goto error;
+}
+}
 else
 i = new CBotEmpty();// if 
no special formula
 
 inst->AddNext3b(i); // 
construct a list
 type = CBotTypResult(CBotTypArrayPointer, type);
 
-if (!pStk->IsOk() || !IsOfType(p, ID_CLBRK ))
-{
-pStk->SetError(CBotErrCloseIndex, p->GetStart());
-goto error;
-}
+if (IsOfType(p, ID_CLBRK)) continue;
+
+pStk->SetError(CBotErrCloseIndex, p->GetStart());
+goto error;
 }
 
 CBotVar*   var = CBotVar::Create(*vartoken, type);   // 
create an instance
@@ -96,17 +103,23 @@ CBotInstr* CBotDefArray::Compile(CBotToken* , 
CBotCStack* pStack, CBotTypResul
 
 if (IsOfType(p, ID_ASS))// 
with an assignment
 {
-if ((inst->m_listass = CBotTwoOpExpr::Compile(p, pStk)) != nullptr)
+pStk->SetStartError(p->GetStart());
+if ( IsOfType(p, ID_SEP) )
 {
-if (!pStk->GetTypResult().Compare(type))  // compatible type ?
-{
-pStk->SetError(CBotErrBadType1, p->GetStart());
-goto error;
-}
+pStk->SetError(CBotErrBadLeft, p->GetPrev());
+goto error;
 }
-else
+if ( nullptr == (inst->m_listass = CBotListArray::Compile(p, pStk, 
type.GetTypElem())) )
 {
-inst->m_listass = CBotListArray::Compile(p, pStk, 
type.GetTypElem());
+if (pStk->IsOk())
+{
+inst->m_listass = CBotTwoOpExpr::Compile(p, pStk);
+if (inst->m_listass == nullptr || 
!pStk->GetTypResult().Compare(type))  // compatible type ?
+{
+pStk->SetError(CBotErrBadType1, p->GetStart());
+goto error;
+}
+}
 }
 }
 
diff --git a/src/CBot/CBotInstr/CBotDefBoolean.cpp 
b/src/CBot/CBotInstr/CBotDefBoolean.cpp
index bcac072..63b9d34 100644
--- a/src/CBot/CBotInstr/CBotDefBoolean.cpp
+++ b/src/CBot/CBotInstr/CBotDefBoolean.cpp
@@ -82,16 +82,17 @@ CBotInstr* CBotDefBoolean::Compile(CBotToken* , 
CBotCStack* pStack, bool cont,
 
 inst = static_cast(CBotDefArray::Compile(p, pStk, 
CBotTypBoolean));
 
-if (!pStk->IsOk() )
-{
-pStk->SetError(CBotErrCloseIndex, p->GetStart());
-goto error;
-}
 goto suite;// no assignment, variable already created
 }
 
 if (IsOfType(p,  ID_ASS))
 {
+pStk->SetStartError(p->GetStart());
+if ( IsOfType(p, ID_SEP) )
+{
+pStk->SetError(CBotErrBadLeft, p->GetPrev());
+goto error;
+}
 if (nullptr == ( inst->m_expr = CBotTwoOpExpr::Compile( p, pStk )))
 {
 goto error;
@@ -109,7 +110,7 @@ CBotInstr* CBotDefBoolean::Compile(CBotToken* , 
CBotCStack* pStack, bool cont,
 

[colobot] 02/145: Add syntax and type checking for class member vars

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit accfc9357372fd87a71723ebdc3d0210cce2a92c
Author: melex750 
Date:   Sun Mar 20 07:50:42 2016 -0400

Add syntax and type checking for class member vars
---
 src/CBot/CBotClass.cpp | 44 ++--
 1 file changed, 30 insertions(+), 14 deletions(-)

diff --git a/src/CBot/CBotClass.cpp b/src/CBot/CBotClass.cpp
index d5007d8..5f76145 100644
--- a/src/CBot/CBotClass.cpp
+++ b/src/CBot/CBotClass.cpp
@@ -19,6 +19,7 @@
 
 #include "CBot/CBotClass.h"
 
+#include "CBot/CBotInstr/CBotInstrUtils.h"
 #include "CBot/CBotInstr/CBotNew.h"
 #include "CBot/CBotInstr/CBotLeftExprVar.h"
 #include "CBot/CBotInstr/CBotTwoOpExpr.h"
@@ -561,29 +562,27 @@ bool CBotClass::CompileDefItem(CBotToken* , CBotCStack* 
pStack, bool bSecond)
 while ( IsOfType( p, ID_OPBRK ) )   // a table?
 {
 CBotInstr* i = nullptr;
-
+pStack->SetStartError( p->GetStart() );
 if ( p->GetType() != ID_CLBRK )
+{
 i = CBotExpression::Compile( p, pStack );   // 
expression for the value
+if (i == nullptr || pStack->GetType() >= CBotTypBoolean) 
// must be a number
+{
+pStack->SetError(CBotErrBadIndex, p->GetStart());
+return false;
+}
+}
 else
 i = new CBotEmpty();// special 
if not a formula
 
 type = CBotTypResult(CBotTypArrayPointer, type);
 
-if (!pStack->IsOk() || !IsOfType( p, ID_CLBRK ) )
-{
-pStack->SetError(CBotErrCloseIndex, p->GetStart());
-return false;
-}
-
-/*  CBotVar* pv = pStack->GetVar();
-if ( pv->GetType()>= CBotTypBoolean )
-{
-pStack->SetError(CBotErrBadType1, p->GetStart());
-return false;
-}*/
-
 if (limites == nullptr) limites = i;
 else limites->AddNext3(i);
+
+if (IsOfType(p, ID_CLBRK)) continue;
+pStack->SetError(CBotErrCloseIndex, p->GetStart());
+return false;
 }
 
 if ( p->GetType() == ID_OPENPAR )
@@ -681,6 +680,12 @@ bool CBotClass::CompileDefItem(CBotToken* , CBotCStack* 
pStack, bool bSecond)
 CBotInstr* i = nullptr;
 if ( IsOfType(p, ID_ASS ) )
 {
+pStack->SetStartError(p->GetStart());
+if ( IsOfTypeList(p, TokenTypVar, ID_NEW, ID_SEP, 0) ) // no 
var, new, or ';'
+{
+pStack->SetError(CBotErrBadLeft, p->GetPrev());
+return false;
+}
 if ( type.Eq(CBotTypArrayPointer) )
 {
 i = CBotListArray::Compile(p, pStack, type.GetTypElem());
@@ -689,6 +694,17 @@ bool CBotClass::CompileDefItem(CBotToken* , CBotCStack* 
pStack, bool bSecond)
 {
 // it has an assignmet to calculate
 i = CBotTwoOpExpr::Compile(p, pStack);
+
+CBotTypResult retType = 
pStack->GetTypResult(CBotVar::GetTypeMode::CLASS_AS_INTRINSIC);
+
+if ( (type.Eq(CBotTypString) && 
!retType.Eq(CBotTypString)) ||
+ (!(type.Eq(CBotTypPointer) && 
retType.Eq(CBotTypNullPointer)) &&
+  !TypeCompatible( type, retType, ID_ASS)) )
+  
+{
+pStack->SetError(CBotErrBadType1, p->GetPrev());
+return false;
+}
 }
 if ( !pStack->IsOk() ) return false;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 04/145: Fix inline declaration of an array of string

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 5b3da837156619fe62bfe10d9a4378c5db0cafe3
Author: melex750 
Date:   Sun Mar 20 13:27:02 2016 -0400

Fix inline declaration of an array of string
---
 src/CBot/CBotInstr/CBotDefString.cpp | 25 -
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/src/CBot/CBotInstr/CBotDefString.cpp 
b/src/CBot/CBotInstr/CBotDefString.cpp
index b224a1c..77e0119 100644
--- a/src/CBot/CBotInstr/CBotDefString.cpp
+++ b/src/CBot/CBotInstr/CBotDefString.cpp
@@ -20,6 +20,7 @@
 #include "CBot/CBotInstr/CBotDefString.h"
 
 #include "CBot/CBotInstr/CBotLeftExprVar.h"
+#include "CBot/CBotInstr/CBotDefArray.h"
 #include "CBot/CBotInstr/CBotTwoOpExpr.h"
 
 #include "CBot/CBotStack.h"
@@ -61,6 +62,7 @@ CBotInstr* CBotDefString::Compile(CBotToken* , CBotCStack* 
pStack, bool cont,
 inst->m_expr = nullptr;
 
 CBotToken*vartoken = p;
+CBotVar*var = nullptr;
 inst->SetToken(vartoken);
 
 if (nullptr != (inst->m_var = CBotLeftExprVar::Compile( p, pStk )))
@@ -73,6 +75,19 @@ CBotInstr* CBotDefString::Compile(CBotToken* , CBotCStack* 
pStack, bool cont,
 goto error;
 }
 
+if (IsOfType(p,  ID_OPBRK))
+{
+delete inst;// type is not CBotDefString
+p = vartoken;   // returns the variable name
+
+// compiles an array declaration
+
+CBotInstr* inst2 = CBotDefArray::Compile(p, pStk, CBotTypString);
+
+inst = static_cast(inst2);
+goto suite; // no assignment, variable already created
+}
+
 if (IsOfType(p,  ID_ASS))
 {
 pStk->SetStartError(p->GetStart());
@@ -85,20 +100,20 @@ CBotInstr* CBotDefString::Compile(CBotToken* , 
CBotCStack* pStack, bool cont,
 {
 goto error;
 }
-if (!pStk->GetTypResult().Eq(CBotTypString))// type 
compatible ?
+/*if (!pStk->GetTypResult().Eq(CBotTypString))// type 
compatible ?
 {
 pStk->SetError(CBotErrBadType1, p->GetStart());
 goto error;
-}
+}*/
 }
 
-CBotVar*var = CBotVar::Create(*vartoken, CBotTypString);
+var = CBotVar::Create(*vartoken, CBotTypString);
 var->SetInit(inst->m_expr != nullptr ? CBotVar::InitType::DEF : 
CBotVar::InitType::UNDEF);
 var->SetUniqNum(
 (static_cast(inst->m_var))->m_nIdent = 
CBotVar::NextUniqNum());
 pStack->AddVar(var);
-
-if (IsOfType(p,  ID_COMMA))
+suite:
+if (pStk->IsOk() && IsOfType(p,  ID_COMMA))
 {
 if (nullptr != ( inst->m_next2b = CBotDefString::Compile(p, pStk, 
true, noskip)))
 {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 105/145: Fix conversion to string with + operator

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 6db2832577578dc7eda5c805513de99b5cf3ef22
Author: melex750 
Date:   Sun May 29 06:45:08 2016 -0400

Fix conversion to string with + operator
---
 src/CBot/CBotInstr/CBotTwoOpExpr.cpp | 16 +---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/CBot/CBotInstr/CBotTwoOpExpr.cpp 
b/src/CBot/CBotInstr/CBotTwoOpExpr.cpp
index 23e1153..4132103 100644
--- a/src/CBot/CBotInstr/CBotTwoOpExpr.cpp
+++ b/src/CBot/CBotInstr/CBotTwoOpExpr.cpp
@@ -214,6 +214,13 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* , 
CBotCStack* pStack, int* pOpera
 
 type2 = pStk->GetTypResult();   // what kind 
of results?
 
+if ( type1.Eq(99) || type2.Eq(99) ) // operand is 
void
+{
+pStack->SetError(CBotErrBadType2, >m_token);
+delete inst;
+return nullptr;
+}
+
 // what kind of result?
 int TypeRes = std::max( 
type1.GetType(CBotTypResult::GetTypeMode::NULL_AS_POINTER), 
type2.GetType(CBotTypResult::GetTypeMode::NULL_AS_POINTER) );
 if (typeOp == ID_ADD && type1.Eq(CBotTypString))
@@ -267,7 +274,7 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* , 
CBotCStack* pStack, int* pOpera
 return pStack->Return(nullptr, pStk);
 }
 
-if ( TypeRes != CBotTypString )
+if ( TypeRes != CBotTypString ) // 
keep string conversion
 TypeRes = std::max(type1.GetType(), type2.GetType());
 inst = i;
 }
@@ -370,7 +377,9 @@ bool CBotTwoOpExpr::Execute(CBotStack* )
 // what kind of result?
 int TypeRes = std::max(type1.GetType(), type2.GetType());
 
-if ( GetTokenType() == ID_ADD && type1.Eq(CBotTypString) )
+// see "any type convertible chain" in compile method
+if ( GetTokenType() == ID_ADD &&
+(type1.Eq(CBotTypString) || type2.Eq(CBotTypString)) )
 {
 TypeRes = CBotTypString;
 }
@@ -397,7 +406,8 @@ bool CBotTwoOpExpr::Execute(CBotStack* )
 CBotVar*result = CBotVar::Create("", TypeRes);
 
 // creates a variable to perform the calculation in the appropriate type
-TypeRes = std::max(type1.GetType(), type2.GetType());
+if ( TypeRes != CBotTypString ) // 
keep string conversion
+TypeRes = std::max(type1.GetType(), type2.GetType());
 
 if ( GetTokenType() == ID_ADD && type1.Eq(CBotTypString) )
 {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 106/145: Fix conversion to string with = operator

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 37ab015c8db1c29cbd01e849fd6cc586b60c794d
Author: melex750 
Date:   Sun May 29 06:55:28 2016 -0400

Fix conversion to string with = operator
---
 src/CBot/CBotInstr/CBotExpression.cpp  | 23 +--
 src/CBot/CBotInstr/CBotLeftExprVar.cpp |  6 ++
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/src/CBot/CBotInstr/CBotExpression.cpp 
b/src/CBot/CBotInstr/CBotExpression.cpp
index cb7f3df..c98deca 100644
--- a/src/CBot/CBotInstr/CBotExpression.cpp
+++ b/src/CBot/CBotInstr/CBotExpression.cpp
@@ -71,6 +71,13 @@ CBotInstr* CBotExpression::Compile(CBotToken* , 
CBotCStack* pStack)
 return nullptr;
 }
 
+if ( p->GetType() == ID_SEP )
+{
+pStack->SetError(CBotErrNoExpression, p);
+delete inst;
+return nullptr;
+}
+
 inst->m_rightop = CBotExpression::Compile(p, pStack);
 if (inst->m_rightop == nullptr)
 {
@@ -118,13 +125,13 @@ CBotInstr* CBotExpression::Compile(CBotToken* , 
CBotCStack* pStack)
 break;
 case ID_ASSADD:
 if (type2.Eq(CBotTypBoolean) ||
-type2.Eq(CBotTypPointer) ) type2 = -1;// numbers and 
strings
+type2.GetType() > CBotTypString ) type2.SetType(-1);// 
numbers and strings
 break;
 case ID_ASSSUB:
 case ID_ASSMUL:
 case ID_ASSDIV:
 case ID_ASSMODULO:
-if (type2.GetType() >= CBotTypBoolean) type2 = -1;// numbers 
only
+if (type2.GetType() >= CBotTypBoolean) type2.SetType(-1);// 
numbers only
 break;
 }
 
@@ -179,6 +186,18 @@ bool CBotExpression::Execute(CBotStack* )
 if ( pile2->GetState()==0)
 {
 if (m_rightop && !m_rightop->Execute(pile2)) return false;// 
initial value // interrupted?
+if (m_rightop)
+{
+CBotVar* var = pile1->GetVar();
+CBotVar* value = pile2->GetVar();
+if (var->GetType() == CBotTypString && value->GetType() != 
CBotTypString)
+{
+CBotVar* newVal = CBotVar::Create("", var->GetTypResult());
+value->Update(pj->GetUserPtr());
+newVal->SetValString(value->GetValString());
+pile2->SetVar(newVal);
+}
+}
 pile2->IncState();
 }
 
diff --git a/src/CBot/CBotInstr/CBotLeftExprVar.cpp 
b/src/CBot/CBotInstr/CBotLeftExprVar.cpp
index 848d16a..4394fc4 100644
--- a/src/CBot/CBotInstr/CBotLeftExprVar.cpp
+++ b/src/CBot/CBotInstr/CBotLeftExprVar.cpp
@@ -64,6 +64,12 @@ bool CBotLeftExprVar::Execute(CBotStack* )
 CBotVar* var2 = pj->GetVar(); // Initial value on the stack
 if (var2 != nullptr)
 {
+if (m_typevar.Eq(CBotTypString) && var2->GetType() != CBotTypString)
+{
+var2->Update(pj->GetUserPtr());
+var1->SetValString(var2->GetValString());
+return true;
+}
 var1->SetVal(var2); // Set the value
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 108/145: Refactor autosave rotation.

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 32629a2f2ad631ccb8774ac846795208d4c87d18
Author: Krzysztof Dermont 
Date:   Sun May 15 19:42:27 2016 +0200

Refactor autosave rotation.

In order to remove boost:filesystem from CResourceManager Move()
function has to be removed or rewrited. Since Move is only used in
autosave rotation it's simpler to change autosave rotation and remove
Move().

Now oldest autosaves (with lowest timestamp) will be removed in rotation.
---
 src/common/resources/resourcemanager.cpp | 29 ---
 src/common/resources/resourcemanager.h   |  2 -
 src/level/robotmain.cpp  | 85 
 src/level/robotmain.h|  2 +-
 src/ui/screen/screen_io.cpp  |  2 +-
 5 files changed, 22 insertions(+), 98 deletions(-)

diff --git a/src/common/resources/resourcemanager.cpp 
b/src/common/resources/resourcemanager.cpp
index 9130b88..3ed0dee 100644
--- a/src/common/resources/resourcemanager.cpp
+++ b/src/common/resources/resourcemanager.cpp
@@ -31,11 +31,8 @@
 
 #include 
 
-#include 
 #include 
 
-namespace fs = boost::filesystem;
-
 
 CResourceManager::CResourceManager(const char *argv0)
 {
@@ -231,32 +228,6 @@ long long CResourceManager::GetLastModificationTime(const 
std::string& filename)
 return -1;
 }
 
-//TODO: Don't use boost::filesystem. Why doesn't PHYSFS have this?
-bool CResourceManager::Move(const std::string& from, const std::string& to)
-{
-if (PHYSFS_isInit())
-{
-bool success = true;
-std::string writeDir = PHYSFS_getWriteDir();
-try
-{
-std::string path_from = writeDir + "/" + CleanPath(from);
-std::string path_to = writeDir + "/" + CleanPath(to);
-#if PLATFORM_WINDOWS
-fs::rename(CSystemUtilsWindows::UTF8_Decode(path_from), 
CSystemUtilsWindows::UTF8_Decode(path_to));
-#else
-fs::rename(path_from, path_to);
-#endif
-}
-catch (std::exception&)
-{
-success = false;
-}
-return success;
-}
-return false;
-}
-
 bool CResourceManager::Remove(const std::string& filename)
 {
 if (PHYSFS_isInit())
diff --git a/src/common/resources/resourcemanager.h 
b/src/common/resources/resourcemanager.h
index b21ad26..61f85b3 100644
--- a/src/common/resources/resourcemanager.h
+++ b/src/common/resources/resourcemanager.h
@@ -66,8 +66,6 @@ public:
 //! Returns last modification date as timestamp
 static long long GetLastModificationTime(const std::string );
 
-//! Move file/directory
-static bool Move(const std::string , const std::string );
 //! Remove file
 static bool Remove(const std::string& filename);
 };
diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 374a749..8019786 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -105,6 +105,7 @@
 
 #include "ui/screen/screen_loading.h"
 
+#include 
 #include 
 #include 
 #include 
@@ -5456,7 +5457,7 @@ void CRobotMain::SetAutosave(bool enable)
 
 m_autosave = enable;
 m_autosaveLast = m_gameTimeAbsolute;
-AutosaveRotate(false);
+AutosaveRotate();
 }
 
 bool CRobotMain::GetAutosave()
@@ -5482,7 +5483,7 @@ void CRobotMain::SetAutosaveSlots(int slots)
 if (m_autosaveSlots == slots) return;
 
 m_autosaveSlots = slots;
-AutosaveRotate(false);
+AutosaveRotate();
 }
 
 int CRobotMain::GetAutosaveSlots()
@@ -5490,85 +5491,39 @@ int CRobotMain::GetAutosaveSlots()
 return m_autosaveSlots;
 }
 
-int CRobotMain::AutosaveRotate(bool freeOne)
+// Remove oldest saves with autosave prefix
+void CRobotMain::AutosaveRotate()
 {
 if (m_playerProfile == nullptr)
-return 0;
+return;
 
 GetLogger()->Debug("Rotate autosaves...\n");
-// Find autosave dirs
 auto saveDirs = 
CResourceManager::ListDirectories(m_playerProfile->GetSaveDir());
-std::map autosaveDirs;
-for (auto& dir : saveDirs)
-{
-try
-{
-const std::string autosavePrefix = "autosave";
-if (dir.substr(0, autosavePrefix.length()) == autosavePrefix)
-{
-int id = 
boost::lexical_cast(dir.substr(autosavePrefix.length()));
-autosaveDirs[id] = m_playerProfile->GetSaveFile(dir);
-}
-}
-catch (...)
-{
-GetLogger()->Info("Bad autosave found: %s\n", dir.c_str());
-// skip
-}
-}
-if (autosaveDirs.size() == 0) return 1;
-
-// Remove all but last m_autosaveSlots
-std::map autosavesToKeep;
-int last_id = autosaveDirs.rbegin()->first;
-int count = 0;
-int to_keep = m_autosaveSlots-(freeOne ? 1 : 0);
-int new_last_id = Math::Min(autosaveDirs.size(), to_keep);
-bool 

[colobot] 107/145: Remove part of boost::filesystem usage.

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 2168b57cac9e20738718e323cf55ff3dbf9c733b
Author: Krzysztof Dermont 
Date:   Sun Apr 10 21:48:19 2016 +0200

Remove part of boost::filesystem usage.
---
 src/app/app.cpp  |  1 -
 src/common/resources/resourcemanager.cpp | 20 +---
 src/sound/oalsound/alsound.cpp   |  6 --
 src/sound/sound.cpp  |  2 --
 4 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/src/app/app.cpp b/src/app/app.cpp
index c1439ff..d34532f 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -47,7 +47,6 @@
 #include "sound/oalsound/alsound.h"
 #endif
 
-#include 
 #include 
 
 #include 
diff --git a/src/common/resources/resourcemanager.cpp 
b/src/common/resources/resourcemanager.cpp
index 94326a9..9130b88 100644
--- a/src/common/resources/resourcemanager.cpp
+++ b/src/common/resources/resourcemanager.cpp
@@ -152,27 +152,17 @@ bool CResourceManager::CreateDirectory(const std::string& 
directory)
 return false;
 }
 
-//TODO: Don't use boost::filesystem here
 bool CResourceManager::RemoveDirectory(const std::string& directory)
 {
 if (PHYSFS_isInit())
 {
-bool success = true;
-std::string writeDir = PHYSFS_getWriteDir();
-try
+std::string path = CleanPath(directory);
+for (auto file : ListFiles(path))
 {
-std::string path = writeDir + "/" + CleanPath(directory);
-#if PLATFORM_WINDOWS
-fs::remove_all(CSystemUtilsWindows::UTF8_Decode(path));
-#else
-fs::remove_all(path);
-#endif
+if (PHYSFS_delete((path + "/" + file).c_str()) == 0)
+return false;
 }
-catch (std::exception&)
-{
-success = false;
-}
-return success;
+return PHYSFS_delete(path.c_str()) != 0;
 }
 return false;
 }
diff --git a/src/sound/oalsound/alsound.cpp b/src/sound/oalsound/alsound.cpp
index 95b49a9..cfa335d 100644
--- a/src/sound/oalsound/alsound.cpp
+++ b/src/sound/oalsound/alsound.cpp
@@ -25,7 +25,6 @@
 #include 
 #include 
 
-#include 
 
 CALSound::CALSound()
 : m_enabled(false),
@@ -586,11 +585,6 @@ bool CALSound::PlayMusic(const std::string , bool 
repeat, float fadeTim
 if (m_music.find(filename) == m_music.end())
 {
 GetLogger()->Debug("Music %s was not cached!\n", filename.c_str());
-/* TODO: if (!boost::filesystem::exists(filename))
-{
-GetLogger()->Debug("Requested music %s was not found.\n", 
filename.c_str());
-return false;
-} */
 
 auto newBuffer = MakeUnique();
 buffer = newBuffer.get();
diff --git a/src/sound/sound.cpp b/src/sound/sound.cpp
index d22523f..3640c58 100644
--- a/src/sound/sound.cpp
+++ b/src/sound/sound.cpp
@@ -27,8 +27,6 @@
 #include 
 #include 
 
-#include 
-
 
 CSoundInterface::CSoundInterface()
 {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 109/145: Fixed links in CBot listings in SatCom

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 9017e5a25b37535b0fc6281effa861c9182c52e2
Author: krzys-h 
Date:   Fri Jun 17 21:13:16 2016 +0200

Fixed links in CBot listings in SatCom
---
 src/graphics/engine/text.cpp | 98 ++--
 src/graphics/engine/text.h   |  7 ++--
 src/ui/controls/edit.cpp | 13 +++---
 3 files changed, 58 insertions(+), 60 deletions(-)

diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp
index 4fcf4ac..aece13e 100644
--- a/src/graphics/engine/text.cpp
+++ b/src/graphics/engine/text.cpp
@@ -720,43 +720,42 @@ void CText::DrawString(const std::string , 
std::vector::itera
 
 Color c = color;
 FontHighlight hl = static_cast(format[fmtIndex] & 
FONT_MASK_HIGHLIGHT);
-if (hl != FONT_HIGHLIGHT_NONE)
+if (hl == FONT_HIGHLIGHT_TOKEN)
 {
-if (hl == FONT_HIGHLIGHT_TOKEN)
-{
-c = Color(0.490f, 0.380f, 0.165f, 1.0f); // #7D612A
-}
-else if (hl == FONT_HIGHLIGHT_TYPE)
-{
-c = Color(0.31f, 0.443f, 0.196f, 1.0f); // #4F7132
-}
-else if (hl == FONT_HIGHLIGHT_CONST)
-{
-c = Color(0.882f, 0.176f, 0.176f, 1.0f); // #E12D2D
-}
-else if (hl == FONT_HIGHLIGHT_THIS)
-{
-c = Color(0.545f, 0.329f, 0.608f, 1.0f); // #8B549B
-}
-else if (hl == FONT_HIGHLIGHT_COMMENT)
-{
-c = Color(0.251f, 0.271f, 0.306f, 1.0f); // #40454E
-}
-else if (hl == FONT_HIGHLIGHT_KEYWORD)
-{
-c = Color(0.239f, 0.431f, 0.588f, 1.0f); // #3D6E96
-}
-else if (hl == FONT_HIGHLIGHT_STRING)
-{
-c = Color(0.239f, 0.384f, 0.341f, 1.0f); // #3D6257
-}
-else
-{
-Math::IntPoint charSize;
-charSize.x = GetCharWidthInt(ch, font, size, offset);
-charSize.y = GetHeightInt(font, size);
-DrawHighlight(hl, pos, charSize);
-}
+c = Color(0.490f, 0.380f, 0.165f, 1.0f); // #7D612A
+}
+else if (hl == FONT_HIGHLIGHT_TYPE)
+{
+c = Color(0.31f, 0.443f, 0.196f, 1.0f); // #4F7132
+}
+else if (hl == FONT_HIGHLIGHT_CONST)
+{
+c = Color(0.882f, 0.176f, 0.176f, 1.0f); // #E12D2D
+}
+else if (hl == FONT_HIGHLIGHT_THIS)
+{
+c = Color(0.545f, 0.329f, 0.608f, 1.0f); // #8B549B
+}
+else if (hl == FONT_HIGHLIGHT_COMMENT)
+{
+c = Color(0.251f, 0.271f, 0.306f, 1.0f); // #40454E
+}
+else if (hl == FONT_HIGHLIGHT_KEYWORD)
+{
+c = Color(0.239f, 0.431f, 0.588f, 1.0f); // #3D6E96
+}
+else if (hl == FONT_HIGHLIGHT_STRING)
+{
+c = Color(0.239f, 0.384f, 0.341f, 1.0f); // #3D6257
+}
+
+// draw highlight background or link underline
+if (font != FONT_BUTTON)
+{
+Math::IntPoint charSize;
+charSize.x = GetCharWidthInt(ch, font, size, offset);
+charSize.y = GetHeightInt(font, size);
+DrawHighlight(format[fmtIndex], pos, charSize);
 }
 
 DrawCharAndAdjustPos(ch, font, size, pos, c);
@@ -854,26 +853,25 @@ void CText::DrawString(const std::string , FontType 
font,
 }
 }
 
-void CText::DrawHighlight(FontHighlight hl, Math::IntPoint pos, Math::IntPoint 
size)
+void CText::DrawHighlight(FontMetaChar hl, Math::IntPoint pos, Math::IntPoint 
size)
 {
 // Gradient colors
 Color grad[4];
 
 // TODO: switch to alpha factors
 
-switch (hl)
+if ((hl & FONT_MASK_LINK) != 0)
 {
-case FONT_HIGHLIGHT_LINK:
-grad[0] = grad[1] = grad[2] = grad[3] = Color(0.0f, 0.0f, 1.0f, 
0.5f);
-break;
-
-case FONT_HIGHLIGHT_KEY:
-grad[0] = grad[1] = grad[2] = grad[3] =
-Color(192.0f / 256.0f, 192.0f / 256.0f, 192.0f / 256.0f, 0.5f);
-break;
-
-default:
-return;
+grad[0] = grad[1] = grad[2] = grad[3] = Color(0.0f, 0.0f, 1.0f, 0.5f);
+}
+else if ((hl & FONT_MASK_HIGHLIGHT) == FONT_HIGHLIGHT_KEY)
+{
+grad[0] = grad[1] = grad[2] = grad[3] =
+Color(192.0f / 256.0f, 192.0f / 256.0f, 192.0f / 256.0f, 0.5f);
+}
+else
+{
+return;
 }
 
 Math::IntPoint vsize = m_engine->GetWindowSize();
@@ -889,7 +887,7 @@ void CText::DrawHighlight(FontHighlight hl, Math::IntPoint 
pos, Math::IntPoint s
 p2.x = pos.x + size.x;
 p2.y = pos.y;
 
-if (hl == FONT_HIGHLIGHT_LINK)
+if ((hl & FONT_MASK_LINK) != 0)
 {
 p1.y = pos.y - h;  // 

[colobot] 104/145: Fix and document TypeCompatible

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 0165e8f348f7e257d8866287ae440ec4c8051916
Author: melex750 
Date:   Sun May 29 06:40:42 2016 -0400

Fix and document TypeCompatible
---
 src/CBot/CBotInstr/CBotInstrUtils.cpp | 6 +++---
 src/CBot/CBotInstr/CBotInstrUtils.h   | 8 +++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/CBot/CBotInstr/CBotInstrUtils.cpp 
b/src/CBot/CBotInstr/CBotInstrUtils.cpp
index 05de1a4..bbe80b2 100644
--- a/src/CBot/CBotInstr/CBotInstrUtils.cpp
+++ b/src/CBot/CBotInstr/CBotInstrUtils.cpp
@@ -97,9 +97,9 @@ bool TypeCompatible(CBotTypResult& type1, CBotTypResult& 
type2, int op)
 if (max == 99) return false;// result is void?
 
 // special case for strin concatenation
-if (op == ID_ADD && max >= CBotTypString) return true;
-if (op == ID_ASSADD && max >= CBotTypString) return true;
-if (op == ID_ASS && t1 == CBotTypString) return true;
+if (op == ID_ADD && t1 == CBotTypString) return true;
+if (op == ID_ASSADD && t2 == CBotTypString) return true;
+if (op == ID_ASS && t2 == CBotTypString) return true;
 
 if (max >= CBotTypBoolean)
 {
diff --git a/src/CBot/CBotInstr/CBotInstrUtils.h 
b/src/CBot/CBotInstr/CBotInstrUtils.h
index a609988..b530288 100644
--- a/src/CBot/CBotInstr/CBotInstrUtils.h
+++ b/src/CBot/CBotInstr/CBotInstrUtils.h
@@ -39,7 +39,13 @@ CBotInstr* CompileParams(CBotToken* , CBotCStack* pStack, 
CBotVar** ppVars);
 
 /*!
  * \brief TypeCompatible Check if two results are consistent to make an
- * operation.
+ * operation. TypeCompatible is used in two ways:
+ * For non-assignment operations:  see CBotTwoOpExpr::Compile
+ * TypeCompatible( leftType, rightType, opType )
+
+ * For assignment or compound assignment operations (it's reversed):
+ * see CBotReturn::Compile & CBotExpression::Compile
+ * TypeCompatible( valueType, varType, opType ) 
  * \param type1
  * \param type2
  * \param op

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 129/145: Fix class not unlocked when program is stopped

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit d0d0c4f197f82fa4aa134cdd6ab2c436c1748715
Author: melex750 
Date:   Fri Jun 24 17:29:32 2016 -0400

Fix class not unlocked when program is stopped

#626
---
 src/CBot/CBotProgram.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/CBot/CBotProgram.cpp b/src/CBot/CBotProgram.cpp
index dde36bb..d0284ea 100644
--- a/src/CBot/CBotProgram.cpp
+++ b/src/CBot/CBotProgram.cpp
@@ -214,6 +214,7 @@ bool CBotProgram::Run(void* pUser, int timer)
 m_error = m_stack->GetError(m_errorStart, m_errorEnd);
 m_stack->Delete();
 m_stack = nullptr;
+CBotClass::FreeLock(this);
 return true;// execution is finished!
 }
 
@@ -226,6 +227,7 @@ void CBotProgram::Stop()
 m_stack->Delete();
 m_stack = nullptr;
 m_entryPoint = nullptr;
+CBotClass::FreeLock(this);
 }
 
 


-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 136/145: Updated data submodule

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 9b9dd43c2a2dfbea8367407b8b0db0843e35e084
Author: krzys-h 
Date:   Mon Jul 4 20:36:03 2016 +0200

Updated data submodule
---
 data | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data b/data
index 60fb1c5..0a55d94 16
--- a/data
+++ b/data
@@ -1 +1 @@
-Subproject commit 60fb1c5dc12f4c951cc10d979dc080bd43057363
+Subproject commit 0a55d94b4e8a80b6873cf6c3f86d9438deed7c84

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 139/145: Fixed sound channels not being unmuted properly

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 19cc25f7164aafe4576075afb935c985fe9f9a53
Author: krzys-h 
Date:   Sun Jul 10 20:12:44 2016 +0200

Fixed sound channels not being unmuted properly
---
 src/sound/oalsound/alsound.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/sound/oalsound/alsound.cpp b/src/sound/oalsound/alsound.cpp
index cfa335d..020bfba 100644
--- a/src/sound/oalsound/alsound.cpp
+++ b/src/sound/oalsound/alsound.cpp
@@ -356,6 +356,7 @@ int CALSound::Play(SoundType sound, const Math::Vector 
, float amplitude, fl
 chn->SetFrequency(frequency);
 chn->SetVolume(powf(amplitude * chn->GetVolumeAtrib(), 0.2f) * 
m_audioVolume);
 chn->SetLoop(loop);
+chn->Mute(false);
 
 if (!chn->Play())
 {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 144/145: Add xmlstarlet as B-D needed for the new SVG resizing code

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 5b45a4ff9bbec9752f9fe619ad52fe05356c4b99
Author: Didier Raboud <o...@debian.org>
Date:   Mon Jul 11 10:14:47 2016 +0200

Add xmlstarlet as B-D needed for the new SVG resizing code
---
 debian/control | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index d38ef13..b0fd000 100644
--- a/debian/control
+++ b/debian/control
@@ -29,7 +29,8 @@ Build-Depends:
 Build-Depends-Indep:
  doxygen,
  graphviz,
- vorbis-tools
+ vorbis-tools,
+ xmlstarlet,
 Vcs-Git: https://alioth.debian.org/anonscm/git/pkg-games/colobot.git -b debian
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-games/colobot.git
 Standards-Version: 3.9.8

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 143/145: Bump S-V to 3.9.8 without changes needed

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 99c70a4e393495350494ea79388ad02f709f0b2f
Author: Didier Raboud <o...@debian.org>
Date:   Mon Jul 11 09:58:49 2016 +0200

Bump S-V to 3.9.8 without changes needed
---
 debian/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index bbe2d43..d38ef13 100644
--- a/debian/control
+++ b/debian/control
@@ -32,7 +32,7 @@ Build-Depends-Indep:
  vorbis-tools
 Vcs-Git: https://alioth.debian.org/anonscm/git/pkg-games/colobot.git -b debian
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-games/colobot.git
-Standards-Version: 3.9.7
+Standards-Version: 3.9.8
 Homepage: http://colobot.info
 
 Package: colobot

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 137/145: Added pause blur config setting, enabled by default

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 8a17bc901c8ea526278287548bf687640c8a5973
Author: krzys-h 
Date:   Sat Jul 9 12:13:51 2016 +0200

Added pause blur config setting, enabled by default
---
 po/colobot.pot  | 15 +++
 po/de.po| 27 +++
 po/fr.po| 27 +++
 po/pl.po| 27 +++
 po/ru.po| 27 +++
 src/common/event.h  |  1 +
 src/common/restext.cpp  |  1 +
 src/common/settings.cpp |  8 
 src/graphics/engine/engine.cpp  | 14 ++
 src/graphics/engine/engine.h|  6 +++---
 src/ui/screen/screen_setup_graphics.cpp | 14 ++
 11 files changed, 92 insertions(+), 75 deletions(-)

diff --git a/po/colobot.pot b/po/colobot.pot
index d17e297..91bfcdb 100644
--- a/po/colobot.pot
+++ b/po/colobot.pot
@@ -359,6 +359,9 @@ msgstr ""
 msgid "Render distance\\Maximum visibility"
 msgstr ""
 
+msgid "Pause blur\\Blur the background on the pause screen"
+msgstr ""
+
 msgid "Particles in the interface\\Steam clouds and sparks in the interface"
 msgstr ""
 
@@ -926,18 +929,6 @@ msgstr ""
 msgid "Camera (\\key camera;)"
 msgstr ""
 
-msgid "Camera to left"
-msgstr ""
-
-msgid "Camera to right"
-msgstr ""
-
-msgid "Camera nearest"
-msgstr ""
-
-msgid "Camera awayest"
-msgstr ""
-
 msgid "Help about selected object"
 msgstr ""
 
diff --git a/po/de.po b/po/de.po
index 3e8cdea..be31b51 100644
--- a/po/de.po
+++ b/po/de.po
@@ -288,9 +288,6 @@ msgstr "Die aufgerufene Funktion existiert nicht"
 msgid "Camera (\\key camera;)"
 msgstr "Kamera (\\key camera;)"
 
-msgid "Camera awayest"
-msgstr "Kamera weiter weg"
-
 msgid "Camera back\\Moves the camera backward"
 msgstr "Kamera weiter\\Bewegung der Kamera rückwärts"
 
@@ -309,19 +306,10 @@ msgstr "Kamera näher\\Bewegung der Kamera vorwärts"
 msgid "Camera left\\Turns the camera left"
 msgstr "Kamera näher\\Bewegung der Kamera vorwärts"
 
-msgid "Camera nearest"
-msgstr "Kamera näher"
-
 #, fuzzy
 msgid "Camera right\\Turns the camera right"
 msgstr "Drehung nach rechts\\Steuer rechts"
 
-msgid "Camera to left"
-msgstr "Kamera links"
-
-msgid "Camera to right"
-msgstr "Kamera rechts"
-
 #, fuzzy
 msgid "Camera up\\Turns the camera up"
 msgstr "Kamera (\\key camera;)"
@@ -1047,6 +1035,9 @@ msgstr "Partikel in den Menüs\\Funken und Sterne in den 
Menüs"
 msgid "Paste (Ctrl+V)"
 msgstr "Einfügen (Ctrl+V)"
 
+msgid "Pause blur\\Blur the background on the pause screen"
+msgstr ""
+
 msgid "Pause in background\\Pause the game when the window is unfocused"
 msgstr ""
 
@@ -1853,6 +1844,18 @@ msgstr "epsitec.com"
 #~ msgid "COLOBOT"
 #~ msgstr "COLOBOT"
 
+#~ msgid "Camera awayest"
+#~ msgstr "Kamera weiter weg"
+
+#~ msgid "Camera nearest"
+#~ msgstr "Kamera näher"
+
+#~ msgid "Camera to left"
+#~ msgstr "Kamera links"
+
+#~ msgid "Camera to right"
+#~ msgstr "Kamera rechts"
+
 #~ msgid "Can not create this; there are too many objects"
 #~ msgstr "Kein neues Objekt kann erstellt werden (zu viele vorhanden)"
 
diff --git a/po/fr.po b/po/fr.po
index b834222..996fc6f 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -282,9 +282,6 @@ msgstr "Appel d'une fonction inexistante"
 msgid "Camera (\\key camera;)"
 msgstr "Caméra (\\key camera;)"
 
-msgid "Camera awayest"
-msgstr "Caméra plus loin"
-
 msgid "Camera back\\Moves the camera backward"
 msgstr "Caméra plus loin\\Recule la caméra"
 
@@ -302,19 +299,10 @@ msgstr "Caméra plus proche\\Avance la caméra"
 msgid "Camera left\\Turns the camera left"
 msgstr "Caméra plus proche\\Avance la caméra"
 
-msgid "Camera nearest"
-msgstr "Caméra plus proche"
-
 #, fuzzy
 msgid "Camera right\\Turns the camera right"
 msgstr "Tourner à droite\\Moteur à droite"
 
-msgid "Camera to left"
-msgstr "Caméra à gauche"
-
-msgid "Camera to right"
-msgstr "Caméra à droite"
-
 #, fuzzy
 msgid "Camera up\\Turns the camera up"
 msgstr "Caméra (\\key camera;)"
@@ -1032,6 +1020,9 @@ msgstr "Particules dans l'interface\\Pluie de particules"
 msgid "Paste (Ctrl+V)"
 msgstr "Coller (Ctrl+V)"
 
+msgid "Pause blur\\Blur the background on the pause screen"
+msgstr ""
+
 msgid "Pause in background\\Pause the game when the window is unfocused"
 msgstr ""
 
@@ -1828,9 +1819,21 @@ msgstr "epsitec.com"
 #~ msgid "COLOBOT"
 #~ msgstr "COLOBOT"
 
+#~ msgid "Camera awayest"
+#~ msgstr "Caméra plus loin"
+
 #~ msgid "Camera down\\Decrease camera angle while visiting message origin"
 #~ msgstr "Caméra plus basse\\Réduit l'angle de caméra lors de la vue de 
l'origine des messages"
 
+#~ msgid "Camera nearest"
+#~ msgstr "Caméra plus proche"
+
+#~ msgid "Camera to left"
+#~ msgstr "Caméra à gauche"
+
+#~ msgid "Camera to right"
+#~ 

[colobot] 140/145: Release 0.1.8-alpha: Merge branch 'dev'

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 2b6336906041b1309badc57c3e0f0e2d0d80bb7b
Merge: e77f9db 19cc25f
Author: krzys-h 
Date:   Mon Jul 11 09:27:01 2016 +0200

Release 0.1.8-alpha: Merge branch 'dev'

 CMakeLists.txt |  11 +-
 Jenkinsfile|  50 ++
 cmake/FindGettext.cmake| 218 -
 data   |   2 +-
 desktop/CMakeLists.txt |  68 +-
 desktop/colobot.ini|   2 +-
 desktop/colobot.svg|   1 +
 desktop/create_desktop_file.sh |   2 +-
 desktop/po/colobot-desktop.pot |   8 +-
 desktop/po/fr.po   |  10 +-
 po/CMakeLists.txt  |  35 +-
 po/colobot.pot | 138 ++--
 po/de.po   | 225 ++---
 po/fr.po   | 245 +++---
 po/pl.po   | 269 +++---
 po/ru.po   | 222 ++---
 src/CBot/CBotClass.cpp |  85 +-
 src/CBot/CBotEnums.h   |   1 +
 src/CBot/CBotInstr/CBotDefArray.cpp|  46 +-
 src/CBot/CBotInstr/CBotDefBoolean.cpp  |  13 +-
 src/CBot/CBotInstr/CBotDefClass.cpp|  16 +-
 src/CBot/CBotInstr/CBotDefFloat.cpp|  13 +-
 src/CBot/CBotInstr/CBotDefInt.cpp  |  25 +-
 src/CBot/CBotInstr/CBotDefString.cpp   |  27 +-
 src/CBot/CBotInstr/CBotExpression.cpp  |  23 +-
 src/CBot/CBotInstr/CBotFunction.cpp|   4 +-
 src/CBot/CBotInstr/CBotInstrMethode.cpp|  14 +-
 src/CBot/CBotInstr/CBotInstrUtils.cpp  |   6 +-
 src/CBot/CBotInstr/CBotInstrUtils.h|   8 +-
 src/CBot/CBotInstr/CBotLeftExprVar.cpp |   6 +
 src/CBot/CBotInstr/CBotListArray.cpp   |  60 +-
 src/CBot/CBotInstr/CBotListArray.h |   2 +-
 src/CBot/CBotInstr/CBotNew.cpp |   6 +-
 src/CBot/CBotInstr/CBotTwoOpExpr.cpp   |  16 +-
 src/CBot/CBotProgram.cpp   |   2 +
 src/CBot/CBotProgram.h |   4 +-
 src/CBot/CBotStack.cpp |  14 +
 src/CBot/CBotStack.h   |   2 +-
 src/CBot/CBotVar/CBotVar.cpp   |  51 +-
 src/CBot/CBotVar/CBotVar.h |  13 +
 src/CBot/CBotVar/CBotVarBoolean.cpp| 118 +--
 src/CBot/CBotVar/CBotVarBoolean.h  |  24 +-
 src/CBot/CBotVar/CBotVarClass.cpp  |   7 +-
 src/CBot/CBotVar/CBotVarFloat.cpp  | 196 -
 src/CBot/CBotVar/CBotVarFloat.h|  39 +-
 src/CBot/CBotVar/CBotVarInt.cpp| 237 +-
 src/CBot/CBotVar/CBotVarInt.h  |  36 +-
 src/CBot/CBotVar/CBotVarString.cpp |  98 +--
 src/CBot/CBotVar/CBotVarString.h   |  58 +-
 src/CBot/CBotVar/CBotVarValue.h| 196 +
 src/CBot/CMakeLists.txt|  93 ++-
 src/CMakeLists.txt | 328 +++-
 src/app/app.cpp|  16 +-
 src/app/input.cpp  | 119 +--
 src/app/input.h|  10 +-
 src/{common => app}/pathman.cpp|   3 +-
 src/{common => app}/pathman.h  |   2 +-
 src/app/pausemanager.cpp   |  16 +-
 src/app/pausemanager.h |   1 +
 src/app/signal_handlers.cpp|   4 +-
 src/common/config_file.h   |   4 +-
 src/common/event.cpp   |  14 +-
 src/common/event.h |  74 +-
 src/common/key.h   |  14 +-
 src/common/misc.cpp| 261 --
 src/common/misc.h  |  40 -
 src/common/resources/resourcemanager.cpp   |  49 +-
 src/common/resources/resourcemanager.h |   2 -
 src/common/restext.cpp |  86 +-
 src/common/settings.cpp|   4 +
 src/graphics/core/device.h |   3 -
 src/graphics/core/nulldevice.cpp   |   7 -
 src/graphics/core/nulldevice.h |  12 -
 src/graphics/engine/camera.cpp | 767 ++---
 src/graphics/engine/camera.h   | 273 +++---
 src/graphics/engine/engine.cpp  

[colobot] 141/145: Release 0.1.8-alpha: Bump version

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 407d8554669951be794788d37b268fb54bb67aec
Author: krzys-h 
Date:   Mon Jul 11 09:27:53 2016 +0200

Release 0.1.8-alpha: Bump version
---
 CMakeLists.txt | 6 +++---
 data   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd412fb..c13a720 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,12 +13,12 @@ project(colobot C CXX)
 set(COLOBOT_VERSION_CODENAME "Gold")
 set(COLOBOT_VERSION_MAJOR0)
 set(COLOBOT_VERSION_MINOR1)
-set(COLOBOT_VERSION_REVISION 7b)
+set(COLOBOT_VERSION_REVISION 8)
 
 # Used on official releases
-#set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha")
+set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha")
 # Used on unreleased, development builds
-set(COLOBOT_VERSION_UNRELEASED "+alpha")
+#set(COLOBOT_VERSION_UNRELEASED "+alpha")
 
 # Append git characteristics to version
 if(DEFINED COLOBOT_VERSION_UNRELEASED)
diff --git a/data b/data
index 0a55d94..faebc8f 16
--- a/data
+++ b/data
@@ -1 +1 @@
-Subproject commit 0a55d94b4e8a80b6873cf6c3f86d9438deed7c84
+Subproject commit faebc8f4bc20121328b993dd388a2a14617c1fbd

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 138/145: Fixed colobot-lint warnings

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 9e545d0d39077eac131a7d3fa9ddb51cb55adb41
Author: krzys-h 
Date:   Sat Jul 9 20:39:18 2016 +0200

Fixed colobot-lint warnings
---
 src/CBot/CBotVar/CBotVarValue.h | 19 +++
 src/graphics/engine/camera.cpp  |  2 +-
 src/graphics/engine/engine.cpp  |  4 ++--
 src/level/robotmain.cpp |  3 ++-
 4 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/src/CBot/CBotVar/CBotVarValue.h b/src/CBot/CBotVar/CBotVarValue.h
index 3e184d7..3fd1528 100644
--- a/src/CBot/CBotVar/CBotVarValue.h
+++ b/src/CBot/CBotVar/CBotVarValue.h
@@ -1,3 +1,22 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsitec.ch; http://colobot.info; http://github.com/colobot
+ *
+ * This program 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program. If not, see http://gnu.org/licenses
+ */
+
 #pragma once
 
 #include "CBot/CBotVar/CBotVar.h"
diff --git a/src/graphics/engine/camera.cpp b/src/graphics/engine/camera.cpp
index 5f5c254..9f7fc40 100644
--- a/src/graphics/engine/camera.cpp
+++ b/src/graphics/engine/camera.cpp
@@ -254,7 +254,7 @@ CObject* CCamera::GetControllingObject()
 
 void CCamera::SetType(CameraType type)
 {
-if ( (m_type == CAM_TYPE_BACK) )
+if (m_type == CAM_TYPE_BACK)
 {
 for (CObject* obj : 
CObjectManager::GetInstancePointer()->GetAllObjects())
 {
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index a6adbad..27d2db7 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -3510,7 +3510,7 @@ void CEngine::Capture3DScene()
 // calculate 2nd mipmap
 int newWidth = width / 4;
 int newHeight = height / 4;
-std::unique_ptr mipmap(new unsigned char[4 * newWidth * 
newHeight]);
+std::unique_ptr mipmap = MakeUniqueArray(4 
* newWidth * newHeight);
 
 for (int x = 0; x < newWidth; x++)
 {
@@ -3539,7 +3539,7 @@ void CEngine::Capture3DScene()
 }
 
 // calculate Gaussian blur
-std::unique_ptr blured(new unsigned char[4 * newWidth * 
newHeight]);
+std::unique_ptr blured = MakeUniqueArray(4 
* newWidth * newHeight);
 
 float matrix[7][7] =
 {
diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 2aab95c..75c12f8 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -5525,7 +5525,8 @@ void CRobotMain::AutosaveRotate()
 auto saveDirs = 
CResourceManager::ListDirectories(m_playerProfile->GetSaveDir());
 const std::string autosavePrefix = "autosave";
 std::vector autosaves;
-std::copy_if(saveDirs.begin(), saveDirs.end(), 
std::back_inserter(autosaves), [&](const std::string ) {
+std::copy_if(saveDirs.begin(), saveDirs.end(), 
std::back_inserter(autosaves), [&](const std::string )
+{
 return save.substr(0, autosavePrefix.length()) == autosavePrefix;
 });
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[colobot] 142/145: Merge tag 'upstream/0.1.8' into debian/master

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 1b0b51dce752ca8ea30a12e423a1645d02ad6b57
Merge: 6ef1c81 407d855
Author: Didier Raboud <o...@debian.org>
Date:   Mon Jul 11 09:50:42 2016 +0200

Merge tag 'upstream/0.1.8' into debian/master

 CMakeLists.txt |   9 +-
 Jenkinsfile|  50 ++
 cmake/FindGettext.cmake| 218 -
 data   |   2 +-
 desktop/CMakeLists.txt |  68 +-
 desktop/colobot.ini|   2 +-
 desktop/colobot.svg|   1 +
 desktop/create_desktop_file.sh |   2 +-
 desktop/po/colobot-desktop.pot |   8 +-
 desktop/po/fr.po   |  10 +-
 po/CMakeLists.txt  |  35 +-
 po/colobot.pot | 138 ++--
 po/de.po   | 225 ++---
 po/fr.po   | 245 +++---
 po/pl.po   | 269 +++---
 po/ru.po   | 222 ++---
 src/CBot/CBotClass.cpp |  85 +-
 src/CBot/CBotEnums.h   |   1 +
 src/CBot/CBotInstr/CBotDefArray.cpp|  46 +-
 src/CBot/CBotInstr/CBotDefBoolean.cpp  |  13 +-
 src/CBot/CBotInstr/CBotDefClass.cpp|  16 +-
 src/CBot/CBotInstr/CBotDefFloat.cpp|  13 +-
 src/CBot/CBotInstr/CBotDefInt.cpp  |  25 +-
 src/CBot/CBotInstr/CBotDefString.cpp   |  27 +-
 src/CBot/CBotInstr/CBotExpression.cpp  |  23 +-
 src/CBot/CBotInstr/CBotFunction.cpp|   4 +-
 src/CBot/CBotInstr/CBotInstrMethode.cpp|  14 +-
 src/CBot/CBotInstr/CBotInstrUtils.cpp  |   6 +-
 src/CBot/CBotInstr/CBotInstrUtils.h|   8 +-
 src/CBot/CBotInstr/CBotLeftExprVar.cpp |   6 +
 src/CBot/CBotInstr/CBotListArray.cpp   |  60 +-
 src/CBot/CBotInstr/CBotListArray.h |   2 +-
 src/CBot/CBotInstr/CBotNew.cpp |   6 +-
 src/CBot/CBotInstr/CBotTwoOpExpr.cpp   |  16 +-
 src/CBot/CBotProgram.cpp   |   2 +
 src/CBot/CBotProgram.h |   4 +-
 src/CBot/CBotStack.cpp |  14 +
 src/CBot/CBotStack.h   |   2 +-
 src/CBot/CBotVar/CBotVar.cpp   |  51 +-
 src/CBot/CBotVar/CBotVar.h |  13 +
 src/CBot/CBotVar/CBotVarBoolean.cpp| 118 +--
 src/CBot/CBotVar/CBotVarBoolean.h  |  24 +-
 src/CBot/CBotVar/CBotVarClass.cpp  |   7 +-
 src/CBot/CBotVar/CBotVarFloat.cpp  | 196 -
 src/CBot/CBotVar/CBotVarFloat.h|  39 +-
 src/CBot/CBotVar/CBotVarInt.cpp| 237 +-
 src/CBot/CBotVar/CBotVarInt.h  |  36 +-
 src/CBot/CBotVar/CBotVarString.cpp |  98 +--
 src/CBot/CBotVar/CBotVarString.h   |  58 +-
 src/CBot/CBotVar/CBotVarValue.h| 196 +
 src/CBot/CMakeLists.txt|  93 ++-
 src/CMakeLists.txt | 328 +++-
 src/app/app.cpp|  16 +-
 src/app/input.cpp  | 119 +--
 src/app/input.h|  10 +-
 src/{common => app}/pathman.cpp|   3 +-
 src/{common => app}/pathman.h  |   2 +-
 src/app/pausemanager.cpp   |  16 +-
 src/app/pausemanager.h |   1 +
 src/app/signal_handlers.cpp|   4 +-
 src/common/config_file.h   |   4 +-
 src/common/event.cpp   |  14 +-
 src/common/event.h |  74 +-
 src/common/key.h   |  14 +-
 src/common/misc.cpp| 261 --
 src/common/misc.h  |  40 -
 src/common/resources/resourcemanager.cpp   |  49 +-
 src/common/resources/resourcemanager.h |   2 -
 src/common/restext.cpp |  86 +-
 src/common/settings.cpp|   4 +
 src/graphics/core/device.h |   3 -
 src/graphics/core/nulldevice.cpp   |   7 -
 src/graphics/core/nulldevice.h |  12 -
 src/graphics/engine/camera.cpp | 767 ++---
 src/graphics/engine/camera.h   | 273 +++---
 src/graphics/engin

[colobot] 133/145: Added warnings about planned changes to EndMisisonTake (#759)

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 58815059eaad11fa8ecf206dc03165a7b4f209ec
Author: krzys-h 
Date:   Mon Jul 4 16:30:22 2016 +0200

Added warnings about planned changes to EndMisisonTake (#759)
---
 src/app/pathman.cpp |  1 +
 src/level/robotmain.cpp | 18 ++
 tools/check-levels.sh   |  2 +-
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/app/pathman.cpp b/src/app/pathman.cpp
index 2e32ddf..8f86211 100644
--- a/src/app/pathman.cpp
+++ b/src/app/pathman.cpp
@@ -145,6 +145,7 @@ void CPathManager::InitPaths()
 
 void CPathManager::LoadModsFromDir(const std::string )
 {
+GetLogger()->Trace("Looking for mods in '%s' ...\n", dir.c_str());
 try
 {
 #if PLATFORM_WINDOWS
diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 86d1d16..36ee503 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -2785,6 +2785,12 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, 
bool resetObject)
 Gfx::Color backgroundCloudDown = Gfx::Color(0.0f, 0.0f, 0.0f, 0.0f);
 bool backgroundFull = false;
 
+auto LoadingWarning = [&](const std::string& message)
+{
+GetLogger()->Warn("%s\n", message.c_str());
+m_ui->GetDialog()->StartInformation("Level loading warning", "This 
level contains problems. It may stop working in future versions of the game.", 
message);
+};
+
 try
 {
 m_ui->GetLoadingScreen()->SetProgress(0.05f, RT_LOADING_PROCESSING);
@@ -2868,6 +2874,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, 
bool resetObject)
 int rank = 
boost::lexical_cast(line->GetParam(type)->GetValue());
 if (rank >= 0)
 {
+// TODO: Fix default levels and add a future 
removal warning
 GetLogger()->Warn("This level is using 
deprecated way of defining %1$s scene. Please change the %1$s= parameter in 
EndingFile from %2$d to \"levels/other/%1$s%2$03d.txt\".\n", type.c_str(), 
rank);
 std::stringstream ss;
 ss << "levels/other/" << type << 
std::setfill('0') << std::setw(3) << rank << ".txt";
@@ -2875,6 +2882,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, 
bool resetObject)
 }
 else
 {
+// TODO: Fix default levels and add a future 
removal warning
 GetLogger()->Warn("This level is using 
deprecated way of defining %1$s scene. Please remove the %1$s= parameter in 
EndingFile.\n", type.c_str());
 return "";
 }
@@ -2931,6 +2939,11 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, 
bool resetObject)
 m_ui->GetLoadingScreen()->SetProgress(0.15f, RT_LOADING_MUSIC, 
audioChange->music);
 m_sound->CacheMusic(audioChange->music);
 m_audioChange.push_back(std::move(audioChange));
+
+if (!line->GetParam("pos")->IsDefined() || 
!line->GetParam("dist")->IsDefined())
+{
+LoadingWarning("The defaults for pos= and dist= are going 
to change, specify them explicitly. See issue #759 (https://git.io/vVBzH)");
+}
 continue;
 }
 
@@ -3560,6 +3573,11 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, 
bool resetObject)
 if (endTake->immediat)
 m_endTakeImmediat = true;
 m_endTake.push_back(std::move(endTake));
+
+if (!line->GetParam("pos")->IsDefined() || 
!line->GetParam("dist")->IsDefined())
+{
+LoadingWarning("The defaults for pos= and dist= are going 
to change, specify them explicitly. See issue #759 (https://git.io/vVBzH)");
+}
 continue;
 }
 if (line->GetCommand() == "EndMissionDelay" && !resetObject)
diff --git a/tools/check-levels.sh b/tools/check-levels.sh
index c277867..2d980b0 100755
--- a/tools/check-levels.sh
+++ b/tools/check-levels.sh
@@ -13,7 +13,7 @@ for category in $categories; do
if [ ! -d 
/usr/local/share/games/colobot/levels/$category/chapter00$chapter/$level ]; 
then continue; fi
level=`echo -n $level | cut -d . -f 1 | tail -c 3`
echo $category$chapter$level
-   colobot -runscene $category$chapter$level -scenetest 
-loglevel warn -headless  2>&1 | grep -v --line-buffered "Colobot starting" | 
grep -v --line-buffered "Log level changed" | grep -v --line-buffered "Running 
scene"
+   colobot -runscene 

[colobot] 126/145: Fix using compound-assignment with an array

2016-07-11 Thread Didier Raboud
This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 66984a4bb3a0c3249322b85184f8d3c17953fb59
Author: melex750 
Date:   Fri Jun 24 17:00:41 2016 -0400

Fix using compound-assignment with an array

...that was initialized in the definition
---
 src/CBot/CBotInstr/CBotDefArray.cpp | 9 +
 1 file changed, 9 insertions(+)

diff --git a/src/CBot/CBotInstr/CBotDefArray.cpp 
b/src/CBot/CBotInstr/CBotDefArray.cpp
index 473fdc8..c1995d9 100644
--- a/src/CBot/CBotInstr/CBotDefArray.cpp
+++ b/src/CBot/CBotInstr/CBotDefArray.cpp
@@ -121,6 +121,15 @@ CBotInstr* CBotDefArray::Compile(CBotToken* , 
CBotCStack* pStack, CBotTypResul
 }
 }
 }
+
+if (pStk->IsOk()) while (true)   // mark initialized
+{
+var = var->GetItem(0, true);
+if (var == nullptr) break;
+if (var->GetType() == CBotTypArrayPointer) continue;
+if (var->GetType() <= CBotTypString) 
var->SetInit(CBotVar::InitType::DEF);
+break;
+}
 }
 
 if (pStk->IsOk()) return pStack->Return(inst, pStk);

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


<    2   3   4   5   6   7   8   9   10   11   >