summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/config.h.cmake2
-rw-r--r--src/common/event.cpp35
-rw-r--r--src/common/event.h35
-rw-r--r--src/common/global.h33
-rw-r--r--src/common/image.cpp47
-rw-r--r--src/common/image.h33
-rw-r--r--src/common/iman.cpp37
-rw-r--r--src/common/iman.h33
-rw-r--r--src/common/ioutils.h33
-rw-r--r--src/common/key.h33
-rw-r--r--src/common/logger.cpp33
-rw-r--r--src/common/logger.h33
-rw-r--r--src/common/misc.cpp33
-rw-r--r--src/common/misc.h33
-rw-r--r--src/common/profile.cpp133
-rw-r--r--src/common/profile.h157
-rw-r--r--src/common/resources/inputstream.cpp61
-rw-r--r--src/common/resources/inputstream.h37
-rw-r--r--src/common/resources/inputstreambuffer.cpp132
-rw-r--r--src/common/resources/inputstreambuffer.h51
-rw-r--r--src/common/resources/outputstream.cpp55
-rw-r--r--src/common/resources/outputstream.h36
-rw-r--r--src/common/resources/outputstreambuffer.cpp89
-rw-r--r--src/common/resources/outputstreambuffer.h46
-rw-r--r--src/common/resources/resourcemanager.cpp288
-rw-r--r--src/common/resources/resourcemanager.h64
-rw-r--r--src/common/resources/sndfile.cpp133
-rw-r--r--src/common/resources/sndfile.h49
-rw-r--r--src/common/restext.cpp1402
-rw-r--r--src/common/restext.h35
-rw-r--r--src/common/singleton.h38
-rw-r--r--src/common/stringutils.cpp33
-rw-r--r--src/common/stringutils.h33
33 files changed, 2240 insertions, 1085 deletions
diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake
index 98ccefe..44c1085 100644
--- a/src/common/config.h.cmake
+++ b/src/common/config.h.cmake
@@ -24,6 +24,8 @@
#define SDL_MAIN_FUNC main
#endif
+#cmakedefine PORTABLE @PORTABLE@
+
#define COLOBOT_VERSION "@COLOBOT_VERSION_FULL@"
#define COLOBOT_CODENAME "@COLOBOT_VERSION_CODENAME@"
#define COLOBOT_FULLNAME "Colobot @COLOBOT_VERSION_CODENAME@"
diff --git a/src/common/event.cpp b/src/common/event.cpp
index 9dc3943..37a6fe8 100644
--- a/src/common/event.cpp
+++ b/src/common/event.cpp
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/event.h"
@@ -67,7 +70,6 @@ void InitializeEventTypeTexts()
EVENT_TYPE_TEXT[EVENT_BUTTON_CANCEL] = "EVENT_BUTTON_CANCEL";
EVENT_TYPE_TEXT[EVENT_BUTTON_NEXT] = "EVENT_BUTTON_NEXT";
EVENT_TYPE_TEXT[EVENT_BUTTON_PREV] = "EVENT_BUTTON_PREV";
- EVENT_TYPE_TEXT[EVENT_BUTTON_QUIT] = "EVENT_BUTTON_QUIT";
EVENT_TYPE_TEXT[EVENT_BUTTON0] = "EVENT_BUTTON0";
EVENT_TYPE_TEXT[EVENT_BUTTON1] = "EVENT_BUTTON1";
@@ -170,7 +172,6 @@ void InitializeEventTypeTexts()
EVENT_TYPE_TEXT[EVENT_INTERFACE_READ] = "EVENT_INTERFACE_READ";
EVENT_TYPE_TEXT[EVENT_INTERFACE_ABORT] = "EVENT_INTERFACE_ABORT";
EVENT_TYPE_TEXT[EVENT_INTERFACE_USER] = "EVENT_INTERFACE_USER";
- EVENT_TYPE_TEXT[EVENT_INTERFACE_TEEN] = "EVENT_INTERFACE_TEEN";
EVENT_TYPE_TEXT[EVENT_INTERFACE_CHAP] = "EVENT_INTERFACE_CHAP";
EVENT_TYPE_TEXT[EVENT_INTERFACE_LIST] = "EVENT_INTERFACE_LIST";
diff --git a/src/common/event.h b/src/common/event.h
index 1df675e..bb9e123 100644
--- a/src/common/event.h
+++ b/src/common/event.h
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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
+ */
/**
* \file common/event.h
@@ -90,7 +93,6 @@ enum EventType
EVENT_BUTTON_CANCEL = 41,
EVENT_BUTTON_NEXT = 42,
EVENT_BUTTON_PREV = 43,
- EVENT_BUTTON_QUIT = 44,
EVENT_BUTTON0 = 50,
EVENT_BUTTON1 = 51,
@@ -193,7 +195,6 @@ enum EventType
EVENT_INTERFACE_READ = 411,
EVENT_INTERFACE_ABORT = 412,
EVENT_INTERFACE_USER = 413,
- EVENT_INTERFACE_TEEN = 414,
EVENT_INTERFACE_CHAP = 420,
EVENT_INTERFACE_LIST = 421,
diff --git a/src/common/global.h b/src/common/global.h
index 4049bdc..b41ea53 100644
--- a/src/common/global.h
+++ b/src/common/global.h
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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
+ */
/**
* \file common/global.h
diff --git a/src/common/image.cpp b/src/common/image.cpp
index e3d1ef7..f241f83 100644
--- a/src/common/image.cpp
+++ b/src/common/image.cpp
@@ -1,23 +1,27 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/image.h"
#include "math/func.h"
+#include "common/resources/resourcemanager.h"
#include <stdlib.h>
#include <stdio.h>
@@ -381,7 +385,16 @@ bool CImage::Load(const std::string& fileName)
m_error = "";
- m_data->surface = IMG_Load(fileName.c_str());
+ SDL_RWops* pointer = CResourceManager::GetSDLFileHandler(fileName.c_str());
+ if (pointer == nullptr)
+ {
+ delete m_data;
+ m_data = nullptr;
+
+ m_error = "Unable to open file";
+ return false;
+ }
+ m_data->surface = IMG_Load_RW(pointer, 1);
if (m_data->surface == nullptr)
{
delete m_data;
@@ -458,4 +471,4 @@ void CImage::flipVertically(){
SDL_FreeSurface(m_data->surface);
m_data->surface = result;
-} \ No newline at end of file
+}
diff --git a/src/common/image.h b/src/common/image.h
index b93f2f9..e0e270a 100644
--- a/src/common/image.h
+++ b/src/common/image.h
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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
+ */
/**
* \file common/image.h
diff --git a/src/common/iman.cpp b/src/common/iman.cpp
index 88fbb9b..d85c313 100644
--- a/src/common/iman.cpp
+++ b/src/common/iman.cpp
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/iman.h"
@@ -42,9 +45,7 @@ void CInstanceManager::Flush()
{
for (int i = 0; i < CLASS_MAX; i++)
{
- if (m_table[i].instances != nullptr)
- delete[] m_table[i].instances;
-
+ delete[] m_table[i].instances;
m_table[i].instances = nullptr;
}
}
diff --git a/src/common/iman.h b/src/common/iman.h
index bfa2204..112ca12 100644
--- a/src/common/iman.h
+++ b/src/common/iman.h
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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
+ */
/**
* \file common/iman.h
diff --git a/src/common/ioutils.h b/src/common/ioutils.h
index 823b720..12c2943 100644
--- a/src/common/ioutils.h
+++ b/src/common/ioutils.h
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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
+ */
/**
* \file common/ioutils.h
diff --git a/src/common/key.h b/src/common/key.h
index 82b3fbd..d4d2a55 100644
--- a/src/common/key.h
+++ b/src/common/key.h
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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
+ */
/**
* \file common/key.h
diff --git a/src/common/logger.cpp b/src/common/logger.cpp
index 7fc8fb0..fd0d418 100644
--- a/src/common/logger.cpp
+++ b/src/common/logger.cpp
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/logger.h"
diff --git a/src/common/logger.h b/src/common/logger.h
index 1a5f3b9..bca0845 100644
--- a/src/common/logger.h
+++ b/src/common/logger.h
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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
+ */
/**
* \file common/logger.h
diff --git a/src/common/misc.cpp b/src/common/misc.cpp
index 92c3e9a..1cbd3b1 100644
--- a/src/common/misc.cpp
+++ b/src/common/misc.cpp
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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"
diff --git a/src/common/misc.h b/src/common/misc.h
index 3c147b1..a079ba6 100644
--- a/src/common/misc.h
+++ b/src/common/misc.h
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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
diff --git a/src/common/profile.cpp b/src/common/profile.cpp
index ee3e873..92fc1d6 100644
--- a/src/common/profile.cpp
+++ b/src/common/profile.cpp
@@ -1,26 +1,32 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/profile.h"
-#include "common/logger.h"
-
+#include "common/resources/inputstream.h"
+#include "common/resources/outputstream.h"
#include "app/system.h"
+#include "common/logger.h"
+
+#include <memory>
#include <utility>
#include <cstring>
#include <boost/property_tree/ini_parser.hpp>
@@ -31,27 +37,51 @@ template<> CProfile* CSingleton<CProfile>::m_instance = nullptr;
namespace bp = boost::property_tree;
-CProfile::CProfile() :
- m_profileNeedSave(false)
+CProfile::CProfile()
+ : m_profileNeedSave(false)
+ , m_useCurrentDirectory(false)
{
}
CProfile::~CProfile()
{
- SaveCurrentDirectory();
+ Save();
}
+void CProfile::SetUseCurrentDirectory(bool useCurrentDirectory)
+{
+ m_useCurrentDirectory = useCurrentDirectory;
+}
-bool CProfile::InitCurrentDirectory()
+bool CProfile::Init()
{
try
{
- #if DEV_BUILD
- bp::ini_parser::read_ini("colobot.ini", m_propertyTree);
- #else
- bp::ini_parser::read_ini(GetSystemUtils()->GetProfileFileLocation(), m_propertyTree);
- #endif
+ std::unique_ptr<std::istream> stream;
+ bool good;
+ if (m_useCurrentDirectory)
+ {
+ std::ifstream* inputStream = new std::ifstream("./colobot.ini");
+ stream = std::unique_ptr<std::istream>(inputStream);
+ good = inputStream->good();
+ }
+ else
+ {
+ CInputStream* inputStream = new CInputStream("colobot.ini");
+ stream = std::unique_ptr<std::istream>(inputStream);
+ good = inputStream->is_open();
+ }
+
+ if (good)
+ {
+ bp::ini_parser::read_ini(*stream, m_propertyTree);
+ }
+ else
+ {
+ GetLogger()->Error("Error on parsing profile: failed to open file\n");
+ return false;
+ }
}
catch (std::exception & e)
{
@@ -61,17 +91,36 @@ bool CProfile::InitCurrentDirectory()
return true;
}
-bool CProfile::SaveCurrentDirectory()
+bool CProfile::Save()
{
if (m_profileNeedSave)
{
try
{
- #if DEV_BUILD
- bp::ini_parser::write_ini("colobot.ini", m_propertyTree);
- #else
- bp::ini_parser::write_ini(GetSystemUtils()->GetProfileFileLocation(), m_propertyTree);
- #endif
+ std::unique_ptr<std::ostream> stream;
+ bool good;
+ if (m_useCurrentDirectory)
+ {
+ std::ofstream* outputStream = new std::ofstream("./colobot.ini");
+ stream = std::unique_ptr<std::ostream>(outputStream);
+ good = outputStream->good();
+ }
+ else
+ {
+ COutputStream* outputStream = new COutputStream("colobot.ini");
+ stream = std::unique_ptr<std::ostream>(outputStream);
+ good = outputStream->is_open();
+ }
+
+ if (good)
+ {
+ bp::ini_parser::write_ini(*stream, m_propertyTree);
+ }
+ else
+ {
+ GetLogger()->Error("Error on storing profile: failed to open file\n");
+ return false;
+ }
}
catch (std::exception & e)
{
@@ -82,7 +131,7 @@ bool CProfile::SaveCurrentDirectory()
return true;
}
-bool CProfile::SetLocalProfileString(std::string section, std::string key, std::string value)
+bool CProfile::SetStringProperty(std::string section, std::string key, std::string value)
{
try
{
@@ -98,7 +147,7 @@ bool CProfile::SetLocalProfileString(std::string section, std::string key, std::
}
-bool CProfile::GetLocalProfileString(std::string section, std::string key, std::string &buffer)
+bool CProfile::GetStringProperty(std::string section, std::string key, std::string &buffer)
{
try
{
@@ -113,7 +162,7 @@ bool CProfile::GetLocalProfileString(std::string section, std::string key, std::
}
-bool CProfile::SetLocalProfileInt(std::string section, std::string key, int value)
+bool CProfile::SetIntProperty(std::string section, std::string key, int value)
{
try
{
@@ -129,7 +178,7 @@ bool CProfile::SetLocalProfileInt(std::string section, std::string key, int valu
}
-bool CProfile::GetLocalProfileInt(std::string section, std::string key, int &value)
+bool CProfile::GetIntProperty(std::string section, std::string key, int &value)
{
try
{
@@ -144,7 +193,7 @@ bool CProfile::GetLocalProfileInt(std::string section, std::string key, int &val
}
-bool CProfile::SetLocalProfileFloat(std::string section, std::string key, float value)
+bool CProfile::SetFloatProperty(std::string section, std::string key, float value)
{
try
{
@@ -160,7 +209,7 @@ bool CProfile::SetLocalProfileFloat(std::string section, std::string key, float
}
-bool CProfile::GetLocalProfileFloat(std::string section, std::string key, float &value)
+bool CProfile::GetFloatProperty(std::string section, std::string key, float &value)
{
try
{
@@ -175,7 +224,7 @@ bool CProfile::GetLocalProfileFloat(std::string section, std::string key, float
}
-std::vector< std::string > CProfile::GetLocalProfileSection(std::string section, std::string key)
+std::vector< std::string > CProfile::GetSection(std::string section, std::string key)
{
std::vector< std::string > ret_list;
boost::regex re(key + "[0-9]*"); //we want to match all key followed by any number
@@ -205,13 +254,13 @@ void CProfile::SetUserDir(std::string dir)
}
-std::string CProfile::GetUserBasedPath(std::string dir, std::string default_dir)
+std::string CProfile::GetUserBasedPath(std::string dir, std::string defaultDir)
{
std::string path = dir;
boost::replace_all(path, "\\", "/");
if (dir.find("/") == std::string::npos)
{
- path = default_dir + "/" + dir;
+ path = defaultDir + "/" + dir;
}
if (m_userDirectory.length() > 0)
@@ -220,7 +269,7 @@ std::string CProfile::GetUserBasedPath(std::string dir, std::string default_dir)
}
else
{
- boost::replace_all(path, "%user%", default_dir);
+ boost::replace_all(path, "%user%", defaultDir);
}
return fs::path(path).make_preferred().string();
diff --git a/src/common/profile.h b/src/common/profile.h
index f084ece..444975c 100644
--- a/src/common/profile.h
+++ b/src/common/profile.h
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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
+ */
/**
* \file common/profile.h
@@ -45,94 +48,98 @@ public:
CProfile();
virtual ~CProfile();
+ /** Set flag to force using ini file from current directory */
+ void SetUseCurrentDirectory(bool useCurrentDirectory);
+
/** Loads colobot.ini from current directory
- * \return return true on success
- */
- bool InitCurrentDirectory();
+ * \return return true on success
+ */
+ bool Init();
/** Saves colobot.ini to current directory
- * \return return true on success
- */
- bool SaveCurrentDirectory();
+ * \return return true on success
+ */
+ bool Save();
/** Sets string value in section under specified key
- * \param section
- * \param key
- * \param value
- * \return return true on success
- */
- bool SetLocalProfileString(std::string section, std::string key, std::string value);
+ * \param section
+ * \param key
+ * \param value
+ * \return return true on success
+ */
+ bool SetStringProperty(std::string section, std::string key, std::string value);
/** Gets string value in section under specified key
- * \param section
- * \param key
- * \param buffer
- * \return return true on success
- */
- bool GetLocalProfileString(std::string section, std::string key, std::string& buffer);
+ * \param section
+ * \param key
+ * \param buffer
+ * \return return true on success
+ */
+ bool GetStringProperty(std::string section, std::string key, std::string& buffer);
/** Sets int value in section under specified key
- * \param section
- * \param key
- * \param value
- * \return return true on success
- */
- bool SetLocalProfileInt(std::string section, std::string key, int value);
+ * \param section
+ * \param key
+ * \param value
+ * \return return true on success
+ */
+ bool SetIntProperty(std::string section, std::string key, int value);
/** Gets int value in section under specified key
- * \param section
- * \param key
- * \param value
- * \return return true on success
- */
- bool GetLocalProfileInt(std::string section, std::string key, int &value);
+ * \param section
+ * \param key
+ * \param value
+ * \return return true on success
+ */
+ bool GetIntProperty(std::string section, std::string key, int &value);
/** Sets float value in section under specified key
- * \param section
- * \param key
- * \param value
- * \return return true on success
- */
- bool SetLocalProfileFloat(std::string section, std::string key, float value);
+ * \param section
+ * \param key
+ * \param value
+ * \return return true on success
+ */
+ bool SetFloatProperty(std::string section, std::string key, float value);
/** Gets float value in section under specified key
- * \param section
- * \param key
- * \param value
- * \return return true on success
- */
- bool GetLocalProfileFloat(std::string section, std::string key, float &value);
+ * \param section
+ * \param key
+ * \param value
+ * \return return true on success
+ */
+ bool GetFloatProperty(std::string section, std::string key, float &value);
/** Gets all values in section under specified key
- * \param section
- * \param key
- * \return vector of values
- */
- std::vector< std::string > GetLocalProfileSection(std::string section, std::string key);
+ * \param section
+ * \param key
+ * \return vector of values
+ */
+ std::vector< std::string > GetSection(std::string section, std::string key);
/** Sets current user directory
- * \param dir
- */
+ * \param dir
+ */
void SetUserDir(std::string dir);
/** Returns path based on current user. Replaces %user% in path with current user dir or
- * uses default_dir param if no user dir is specified
- * \param dir
- * \param default_dir
- * \return path
- */
- std::string GetUserBasedPath(std::string dir, std::string default_dir);
-
- /** opy a file into the temporary folder.
- * \param filename
- * \return true on success
- */
+ * uses default_dir param if no user dir is specified
+ * \param dir
+ * \param default_dir
+ * \return path
+ */
+ std::string GetUserBasedPath(std::string dir, std::string defaultDir);
+
+ /** Copy a file into the temporary folder.
+ * \param filename
+ * \return true on success
+ */
bool CopyFileToTemp(std::string filename);
private:
boost::property_tree::ptree m_propertyTree;
bool m_profileNeedSave;
std::string m_userDirectory;
+ bool m_useCurrentDirectory;
};
//! Global function to get profile instance
diff --git a/src/common/resources/inputstream.cpp b/src/common/resources/inputstream.cpp
new file mode 100644
index 0000000..57d1305
--- /dev/null
+++ b/src/common/resources/inputstream.cpp
@@ -0,0 +1,61 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/resources/inputstream.h"
+#include "common/resources/inputstreambuffer.h"
+
+
+CInputStream::CInputStream() : std::istream(new CInputStreamBuffer())
+{
+}
+
+CInputStream::CInputStream(const std::string& filename) : std::istream(new CInputStreamBuffer())
+{
+ open(filename);
+}
+
+
+CInputStream::~CInputStream()
+{
+ delete rdbuf();
+}
+
+
+void CInputStream::open(const std::string& filename)
+{
+ static_cast<CInputStreamBuffer *>(rdbuf())->open(filename);
+}
+
+
+void CInputStream::close()
+{
+ static_cast<CInputStreamBuffer *>(rdbuf())->close();
+}
+
+
+bool CInputStream::is_open()
+{
+ return static_cast<CInputStreamBuffer *>(rdbuf())->is_open();
+}
+
+
+size_t CInputStream::size()
+{
+ return static_cast<CInputStreamBuffer *>(rdbuf())->size();
+}
diff --git a/src/common/resources/inputstream.h b/src/common/resources/inputstream.h
new file mode 100644
index 0000000..74e17b2
--- /dev/null
+++ b/src/common/resources/inputstream.h
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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 <istream>
+#include <string>
+
+
+class CInputStream : public std::istream
+{
+public:
+ CInputStream();
+ CInputStream(const std::string& filename);
+ virtual ~CInputStream();
+
+ void open(const std::string& filename);
+ void close();
+ bool is_open();
+ size_t size();
+};
diff --git a/src/common/resources/inputstreambuffer.cpp b/src/common/resources/inputstreambuffer.cpp
new file mode 100644
index 0000000..7059d60
--- /dev/null
+++ b/src/common/resources/inputstreambuffer.cpp
@@ -0,0 +1,132 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/resources/inputstreambuffer.h"
+
+#include <stdexcept>
+#include <sstream>
+
+CInputStreamBuffer::CInputStreamBuffer(size_t buffer_size) : m_buffer_size(buffer_size)
+{
+ if (buffer_size <= 0)
+ {
+ throw std::runtime_error("File buffer must be larger then 0 bytes");
+ }
+
+ m_buffer = new char[buffer_size];
+ m_file = nullptr;
+}
+
+
+CInputStreamBuffer::~CInputStreamBuffer()
+{
+ close();
+ delete m_buffer;
+}
+
+
+void CInputStreamBuffer::open(const std::string &filename)
+{
+ if (PHYSFS_isInit())
+ m_file = PHYSFS_openRead(filename.c_str());
+}
+
+
+void CInputStreamBuffer::close()
+{
+ if (is_open())
+ PHYSFS_close(m_file);
+}
+
+
+bool CInputStreamBuffer::is_open()
+{
+ return m_file;
+}
+
+
+size_t CInputStreamBuffer::size()
+{
+ return PHYSFS_fileLength(m_file);
+}
+
+
+std::streambuf::int_type CInputStreamBuffer::underflow()
+{
+ if (gptr() < egptr())
+ return traits_type::to_int_type(*gptr());
+
+ if (PHYSFS_eof(m_file))
+ return traits_type::eof();
+
+ PHYSFS_sint64 read_count = PHYSFS_read(m_file, m_buffer, sizeof(char), m_buffer_size);
+ if (read_count <= 0)
+ return traits_type::eof();
+
+ setg(m_buffer, m_buffer, m_buffer + read_count);
+
+ return traits_type::to_int_type(*gptr());
+}
+
+
+std::streampos CInputStreamBuffer::seekpos(std::streampos sp, std::ios_base::openmode which)
+{
+ return seekoff(off_type(sp), std::ios_base::beg, which);
+}
+
+
+std::streampos CInputStreamBuffer::seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which)
+{
+ /* A bit of explanation:
+ We are reading file by m_buffer_size parts so our 3 internal pointers will be
+ * eback (not used here) - start of block
+ * gptr - position of read cursor in block
+ * egtpr - end of block
+ off argument is relative to way */
+
+ std::streamoff new_position;
+
+ switch (way)
+ {
+ case std::ios_base::beg:
+ new_position = off;
+ break;
+
+ case std::ios_base::cur:
+ // tell will give cursor at begining of block so we have to add where in block we currently are
+ new_position = off + static_cast<off_type>(PHYSFS_tell(m_file)) - static_cast<off_type> (egptr() - gptr());
+ break;
+
+ case std::ios_base::end:
+ new_position = off + static_cast<off_type>(PHYSFS_fileLength(m_file));
+ break;
+
+ default:
+ break;
+ }
+
+ if (PHYSFS_seek(m_file, new_position))
+ {
+ setg(m_buffer, m_buffer, m_buffer); // reset buffer
+
+ return pos_type(new_position);
+ }
+
+ return pos_type(off_type(-1));
+}
diff --git a/src/common/resources/inputstreambuffer.h b/src/common/resources/inputstreambuffer.h
new file mode 100644
index 0000000..8c45c22
--- /dev/null
+++ b/src/common/resources/inputstreambuffer.h
@@ -0,0 +1,51 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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 <streambuf>
+#include <string>
+#include <physfs.h>
+
+class CInputStreamBuffer : public std::streambuf
+{
+public:
+ CInputStreamBuffer(size_t buffer_size = 512);
+ virtual ~CInputStreamBuffer();
+
+ void open(const std::string &filename);
+ void close();
+ bool is_open();
+ size_t size();
+
+private:
+ int_type underflow();
+
+ std::streampos seekpos(std::streampos sp, std::ios_base::openmode which);
+ std::streampos seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which);
+
+ // copy ctor and assignment not implemented;
+ // copying not allowed
+ CInputStreamBuffer(const CInputStreamBuffer &);
+ CInputStreamBuffer &operator= (const CInputStreamBuffer &);
+
+ PHYSFS_File *m_file;
+ char *m_buffer;
+ size_t m_buffer_size;
+};
diff --git a/src/common/resources/outputstream.cpp b/src/common/resources/outputstream.cpp
new file mode 100644
index 0000000..e88520e
--- /dev/null
+++ b/src/common/resources/outputstream.cpp
@@ -0,0 +1,55 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/resources/outputstream.h"
+#include "common/resources/outputstreambuffer.h"
+
+
+COutputStream::COutputStream() : std::ostream(new COutputStreamBuffer())
+{
+}
+
+COutputStream::COutputStream(const std::string& filename) : std::ostream(new COutputStreamBuffer())
+{
+ open(filename);
+}
+
+
+COutputStream::~COutputStream()
+{
+ delete rdbuf();
+}
+
+
+void COutputStream::open(const std::string& filename)
+{
+ static_cast<COutputStreamBuffer *>(rdbuf())->open(filename);
+}
+
+
+void COutputStream::close()
+{
+ static_cast<COutputStreamBuffer *>(rdbuf())->close();
+}
+
+
+bool COutputStream::is_open()
+{
+ return static_cast<COutputStreamBuffer *>(rdbuf())->is_open();
+}
diff --git a/src/common/resources/outputstream.h b/src/common/resources/outputstream.h
new file mode 100644
index 0000000..30b9429
--- /dev/null
+++ b/src/common/resources/outputstream.h
@@ -0,0 +1,36 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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 <ostream>
+#include <string>
+
+
+class COutputStream : public std::ostream
+{
+public:
+ COutputStream();
+ COutputStream(const std::string& filename);
+ virtual ~COutputStream();
+
+ void open(const std::string& filename);
+ void close();
+ bool is_open();
+};
diff --git a/src/common/resources/outputstreambuffer.cpp b/src/common/resources/outputstreambuffer.cpp
new file mode 100644
index 0000000..f8b4100
--- /dev/null
+++ b/src/common/resources/outputstreambuffer.cpp
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/resources/outputstreambuffer.h"
+
+#include <stdexcept>
+#include <sstream>
+
+COutputStreamBuffer::COutputStreamBuffer(size_t buffer_size) : m_buffer_size(buffer_size)
+{
+ m_file = nullptr;
+ m_buffer = new char[buffer_size];
+ setp(m_buffer, m_buffer + buffer_size);
+}
+
+
+COutputStreamBuffer::~COutputStreamBuffer()
+{
+ close();
+ delete m_buffer;
+}
+
+
+void COutputStreamBuffer::open(const std::string &filename)
+{
+ if (PHYSFS_isInit())
+ m_file = PHYSFS_openWrite(filename.c_str());
+}
+
+
+void COutputStreamBuffer::close()
+{
+ sync();
+ if (is_open())
+ PHYSFS_close(m_file);
+}
+
+
+bool COutputStreamBuffer::is_open()
+{
+ return m_file;
+}
+
+
+std::streambuf::int_type COutputStreamBuffer::overflow(std::streambuf::int_type ch)
+{
+ /* This function should be called when pptr() == epptr(). We use it also in sync()
+ so we also have to write data if buffer is not full. */
+
+ if (pbase() == pptr()) // no data to write, sync() called with empty buffer
+ return 0;
+
+ // save buffer
+ PHYSFS_sint64 bytes_written = PHYSFS_write(m_file, pbase(), 1, pptr() - pbase());
+ if (bytes_written <= 0)
+ return traits_type::eof();
+
+ pbump(-bytes_written);
+ // write final char
+ if (ch != traits_type::eof()) {
+ bytes_written = PHYSFS_write(m_file, &ch, 1, 1);
+ if (bytes_written <= 0)
+ return traits_type::eof();
+ }
+
+ return ch;
+}
+
+
+int COutputStreamBuffer::sync()
+{
+ return overflow(traits_type::eof());
+}
diff --git a/src/common/resources/outputstreambuffer.h b/src/common/resources/outputstreambuffer.h
new file mode 100644
index 0000000..758c4df
--- /dev/null
+++ b/src/common/resources/outputstreambuffer.h
@@ -0,0 +1,46 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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 <streambuf>
+#include <string>
+#include <physfs.h>
+
+class COutputStreamBuffer : public std::streambuf
+{
+public:
+ COutputStreamBuffer(size_t buffer_size = 512);
+ virtual ~COutputStreamBuffer();
+ void open(const std::string &filename);
+ void close();
+ bool is_open();
+
+private:
+ int_type overflow(int_type ch);
+ int sync();
+
+ // copy ctor and assignment not implemented;
+ // copying not allowed
+ COutputStreamBuffer(const COutputStreamBuffer &);
+ COutputStreamBuffer &operator= (const COutputStreamBuffer &);
+ PHYSFS_File *m_file;
+ char *m_buffer;
+ size_t m_buffer_size;
+};
diff --git a/src/common/resources/resourcemanager.cpp b/src/common/resources/resourcemanager.cpp
new file mode 100644
index 0000000..42f9634
--- /dev/null
+++ b/src/common/resources/resourcemanager.cpp
@@ -0,0 +1,288 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/resources/resourcemanager.h"
+
+#include "common/config.h"
+#include "common/logger.h"
+
+#include <physfs.h>
+
+#include <boost/filesystem.hpp>
+
+namespace fs = boost::filesystem;
+
+namespace
+{
+ const Uint32 PHYSFS_RWOPS_TYPE = 0xc010b04f;
+}
+
+
+CResourceManager::CResourceManager(const char *argv0)
+{
+ if (!PHYSFS_init(argv0))
+ {
+ CLogger::GetInstancePointer()->Error("Error while initializing physfs\n");
+ }
+}
+
+
+CResourceManager::~CResourceManager()
+{
+ if (PHYSFS_isInit())
+ {
+ if (!PHYSFS_deinit())
+ {
+ CLogger::GetInstancePointer()->Error("Error while deinitializing physfs\n");
+ }
+ }
+}
+
+
+bool CResourceManager::AddLocation(const std::string &location, bool prepend)
+{
+ if (PHYSFS_isInit())
+ {
+ if (!PHYSFS_mount(location.c_str(), nullptr, prepend ? 0 : 1))
+ {
+ CLogger::GetInstancePointer()->Error("Error while mounting \"%s\"\n", location.c_str());
+ }
+ }
+
+ return false;
+}
+
+
+bool CResourceManager::RemoveLocation(const std::string &location)
+{
+ if (PHYSFS_isInit())
+ {
+ if (!PHYSFS_removeFromSearchPath(location.c_str()))
+ {
+ CLogger::GetInstancePointer()->Error("Error while unmounting \"%s\"\n", location.c_str());
+ }
+ }
+
+ return false;
+}
+
+
+bool CResourceManager::SetSaveLocation(const std::string &location)
+{
+ if (PHYSFS_isInit())
+ {
+ if (!PHYSFS_setWriteDir(location.c_str()))
+ {
+ CLogger::GetInstancePointer()->Error("Error while setting save location to \"%s\"\n", location.c_str());
+ }
+ }
+
+ return false;
+}
+
+std::string CResourceManager::GetSaveLocation()
+{
+ if(PHYSFS_isInit()) {
+ return PHYSFS_getWriteDir();
+ }
+ return "";
+}
+
+
+SDL_RWops* CResourceManager::GetSDLFileHandler(const std::string &filename)
+{
+ SDL_RWops *handler = SDL_AllocRW();
+ if (!handler)
+ {
+ CLogger::GetInstancePointer()->Error("Unable to allocate SDL_RWops for \"%s\"\n", filename.c_str());
+ return nullptr;
+ }
+
+ if (!PHYSFS_isInit())
+ {
+ SDL_FreeRW(handler);
+ return nullptr;
+ }
+
+ PHYSFS_File *file = PHYSFS_openRead(filename.c_str());
+ if (!file)
+ {
+ SDL_FreeRW(handler);
+ return nullptr;
+ }
+
+ handler->seek = SDLSeek;
+ handler->read = SDLRead;
+ handler->write = SDLWrite;
+ handler->close = SDLClose;
+ handler->type = PHYSFS_RWOPS_TYPE;
+ handler->hidden.unknown.data1 = file;
+
+ return handler;
+}
+
+
+CSNDFile* CResourceManager::GetSNDFileHandler(const std::string &filename)
+{
+ return new CSNDFile(filename);
+}
+
+
+bool CResourceManager::Exists(const std::string &filename)
+{
+ return PHYSFS_exists(filename.c_str());
+}
+
+bool CResourceManager::DirectoryExists(const std::string& directory)
+{
+ return PHYSFS_exists(directory.c_str()) && PHYSFS_isDirectory(directory.c_str());
+}
+
+bool CResourceManager::CreateDirectory(const std::string& directory)
+{
+ return PHYSFS_mkdir(directory.c_str());
+}
+
+bool CResourceManager::RemoveDirectory(const std::string& directory)
+{
+ bool success = true;
+ std::string writeDir = PHYSFS_getWriteDir();
+ try
+ {
+ fs::remove_all(writeDir + "/" + directory);
+ }
+ catch (std::exception & e)
+ {
+ success = false;
+ }
+ return success;
+}
+
+std::vector<std::string> CResourceManager::ListFiles(const std::string &directory)
+{
+ std::vector<std::string> result;
+
+ char **files = PHYSFS_enumerateFiles(directory.c_str());
+
+ for (char **i = files; *i != nullptr; i++)
+ {
+ result.push_back(*i);
+ }
+
+ PHYSFS_freeList(files);
+
+ return result;
+}
+
+std::vector<std::string> CResourceManager::ListDirectories(const std::string &directory)
+{
+ std::vector<std::string> result;
+
+ char **files = PHYSFS_enumerateFiles(directory.c_str());
+
+ for (char **i = files; *i != nullptr; i++)
+ {
+ std::string path = directory + "/" + (*i);
+ if (PHYSFS_isDirectory(path.c_str()))
+ {
+ result.push_back(*i);
+ }
+ }
+
+ PHYSFS_freeList(files);
+
+ return result;
+}
+
+
+int CResourceManager::SDLClose(SDL_RWops *context)
+{
+ if (CheckSDLContext(context))
+ {
+ PHYSFS_close(static_cast<PHYSFS_File *>(context->hidden.unknown.data1));
+ SDL_FreeRW(context);
+
+ return 0;
+ }
+
+ return 1;
+}
+
+
+int CResourceManager::SDLRead(SDL_RWops *context, void *ptr, int size, int maxnum)
+{
+ if (CheckSDLContext(context))
+ {
+ PHYSFS_File *file = static_cast<PHYSFS_File *>(context->hidden.unknown.data1);
+ SDL_memset(ptr, 0, size * maxnum);
+
+ return PHYSFS_read(file, ptr, size, maxnum);
+ }
+
+ return 0;
+}
+
+
+int CResourceManager::SDLWrite(SDL_RWops *context, const void *ptr, int size, int num)
+{
+ return 0;
+}
+
+
+int CResourceManager::SDLSeek(SDL_RWops *context, int offset, int whence)
+{
+ if (CheckSDLContext(context))
+ {
+ PHYSFS_File *file = static_cast<PHYSFS_File *>(context->hidden.unknown.data1);
+ int position, result;
+
+ switch (whence)
+ {
+ default:
+ case RW_SEEK_SET:
+ result = PHYSFS_seek(file, offset);
+ return result > 0 ? offset : -1;
+
+ case RW_SEEK_CUR:
+ position = offset + PHYSFS_tell(file);
+ result = PHYSFS_seek(file, position);
+ return result > 0 ? position : -1;
+
+ case RW_SEEK_END:
+ position = PHYSFS_fileLength(file) - offset;
+ result = PHYSFS_seek(file, position);
+ return result > 0 ? position : -1;
+ }
+ }
+
+ return -1;
+}
+
+
+bool CResourceManager::CheckSDLContext(SDL_RWops *context)
+{
+ if (context->type != PHYSFS_RWOPS_TYPE)
+ {
+ SDL_SetError("Wrong kind of RWops");
+ return false;
+ }
+
+ return true;
+}
diff --git a/src/common/resources/resourcemanager.h b/src/common/resources/resourcemanager.h
new file mode 100644
index 0000000..730cf3e
--- /dev/null
+++ b/src/common/resources/resourcemanager.h
@@ -0,0 +1,64 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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 <vector>
+#include <string>
+#include <SDL.h>
+
+#include "common/resources/sndfile.h"
+
+class CResourceManager
+{
+public:
+ CResourceManager(const char *argv0);
+ ~CResourceManager();
+
+ static bool AddLocation(const std::string &location, bool prepend = true);
+ static bool RemoveLocation(const std::string &location);
+
+ static bool SetSaveLocation(const std::string &location);
+ static std::string GetSaveLocation();
+
+ static SDL_RWops* GetSDLFileHandler(const std::string &filename);
+ static CSNDFile* GetSNDFileHandler(const std::string &filename);
+
+ //! Check if file exists
+ static bool Exists(const std::string &filename);
+ //! Check if file exists and is a directory
+ static bool DirectoryExists(const std::string& directory);
+
+ //! Create directory in write directory
+ static bool CreateDirectory(const std::string& directory);
+ //! Remove directory in write directory, recursively
+ static bool RemoveDirectory(const std::string& directory);
+
+ //! List files contained in directory
+ static std::vector<std::string> ListFiles(const std::string &directory);
+ //! List directories contained in directory
+ static std::vector<std::string> ListDirectories(const std::string &directory);
+
+private:
+ static int SDLSeek(SDL_RWops *context, int offset, int whence);
+ static int SDLRead(SDL_RWops *context, void *ptr, int size, int maxnum);
+ static int SDLWrite(SDL_RWops *context, const void *ptr, int size, int num);
+ static int SDLClose(SDL_RWops *context);
+ static bool CheckSDLContext(SDL_RWops *context);
+};
diff --git a/src/common/resources/sndfile.cpp b/src/common/resources/sndfile.cpp
new file mode 100644
index 0000000..d2330e1
--- /dev/null
+++ b/src/common/resources/sndfile.cpp
@@ -0,0 +1,133 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/resources/sndfile.h"
+
+#include <cstring>
+
+
+CSNDFile::CSNDFile(const std::string& filename)
+ : m_file_info{}
+ , m_snd_file{nullptr}
+ , m_file{nullptr}
+ , m_last_error{}
+ , m_snd_callbacks{SNDLength, SNDSeek, SNDRead, SNDWrite, SNDTell}
+{
+ if (PHYSFS_isInit())
+ {
+ m_file = PHYSFS_openRead(filename.c_str());
+ }
+ else
+ {
+ m_last_error = "Resource system not started!";
+ }
+ if (m_file)
+ {
+ m_snd_file = sf_open_virtual(&m_snd_callbacks, SFM_READ, &m_file_info, m_file);
+ if (!m_snd_file)
+ {
+ m_last_error = "Could not load file";
+ }
+ }
+ else
+ {
+ m_last_error = std::string(PHYSFS_getLastError());
+ }
+}
+
+
+CSNDFile::~CSNDFile()
+{
+ if (m_file)
+ {
+ PHYSFS_close(m_file);
+ if (m_snd_file)
+ {
+ sf_close(m_snd_file);
+ }
+ }
+}
+
+
+bool CSNDFile::IsOpen()
+{
+ return m_file && m_snd_file;
+}
+
+
+SF_INFO &CSNDFile::GetFileInfo()
+{
+ return m_file_info;
+}
+
+
+std::string& CSNDFile::GetLastError()
+{
+ return m_last_error;
+}
+
+
+sf_count_t CSNDFile::Read(short int *ptr, sf_count_t items)
+{
+ return sf_read_short(m_snd_file, ptr, items);
+}
+
+
+sf_count_t CSNDFile::SNDLength(void *data)
+{
+ return PHYSFS_fileLength(static_cast<PHYSFS_File *>(data));
+}
+
+
+sf_count_t CSNDFile::SNDRead(void *ptr, sf_count_t count, void *data)
+{
+ return PHYSFS_read(static_cast<PHYSFS_File *>(data), ptr, 1, count);
+}
+
+
+sf_count_t CSNDFile::SNDSeek(sf_count_t offset, int whence, void *data)
+{
+ PHYSFS_File *file = static_cast<PHYSFS_File *>(data);
+ switch(whence)
+ {
+ case SEEK_CUR:
+ PHYSFS_seek(file, PHYSFS_tell(file) + offset);
+ break;
+ case SEEK_SET:
+ PHYSFS_seek(file, offset);
+ break;
+ case SEEK_END:
+ PHYSFS_seek(file, PHYSFS_fileLength(file) + offset);
+ break;
+ }
+
+ return PHYSFS_tell(file);
+}
+
+
+sf_count_t CSNDFile::SNDTell(void *data)
+{
+ return PHYSFS_tell(static_cast<PHYSFS_File *>(data));
+}
+
+
+sf_count_t CSNDFile::SNDWrite(const void *ptr, sf_count_t count, void *data)
+{
+ return PHYSFS_write(static_cast<PHYSFS_File *>(data), ptr, 1, count);
+}
diff --git a/src/common/resources/sndfile.h b/src/common/resources/sndfile.h
new file mode 100644
index 0000000..f083666
--- /dev/null
+++ b/src/common/resources/sndfile.h
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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 <string>
+#include <physfs.h>
+#include <sndfile.h>
+
+
+class CSNDFile
+{
+public:
+ CSNDFile(const std::string &filename);
+ virtual ~CSNDFile();
+
+ SF_INFO &GetFileInfo();
+ bool IsOpen();
+ std::string &GetLastError();
+ sf_count_t Read(short int *ptr, sf_count_t items);
+
+private:
+ static sf_count_t SNDLength(void *data);
+ static sf_count_t SNDSeek(sf_count_t offset, int whence, void *data);
+ static sf_count_t SNDRead(void *ptr, sf_count_t count, void *data);
+ static sf_count_t SNDWrite(const void *ptr, sf_count_t count, void *data);
+ static sf_count_t SNDTell(void *data);
+ SF_INFO m_file_info;
+ SNDFILE *m_snd_file;
+ PHYSFS_File *m_file;
+ std::string m_last_error;
+ SF_VIRTUAL_IO m_snd_callbacks;
+};
diff --git a/src/common/restext.cpp b/src/common/restext.cpp
index bc488b8..95e015c 100644
--- a/src/common/restext.cpp
+++ b/src/common/restext.cpp
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/restext.h"
@@ -38,694 +41,697 @@ const char* stringsObject[OBJECT_MAX] = { nullptr };
const char* stringsErr[ERR_MAX] = { nullptr };
const char* stringsCbot[TX_MAX] = { nullptr };
+/* Macro to mark which texts are translatable by gettext
+ * It doesn't do anything at compile-time, as all texts represented here are used later
+ * in explicit call to gettext(), but it is used by xgettext executable to filter extracted
+ * texts from this file.
+ */
+#define TR(x) x
+
void InitializeRestext()
{
stringsText[RT_VERSION_ID] = COLOBOT_FULLNAME;
- stringsText[RT_DISINFO_TITLE] = "SatCom";
- stringsText[RT_WINDOW_MAXIMIZED] = "Maximize";
- stringsText[RT_WINDOW_MINIMIZED] = "Minimize";
- stringsText[RT_WINDOW_STANDARD] = "Normal size";
- stringsText[RT_WINDOW_CLOSE] = "Close";
-
- stringsText[RT_STUDIO_TITLE] = "Program editor";
- stringsText[RT_SCRIPT_NEW] = "New";
- stringsText[RT_NAME_DEFAULT] = "Player";
- stringsText[RT_IO_NEW] = "New ...";
- stringsText[RT_KEY_OR] = " or ";
-
- stringsText[RT_TITLE_BASE] = "COLOBOT";
- stringsText[RT_TITLE_INIT] = "COLOBOT: Gold Edition";
- stringsText[RT_TITLE_TRAINER] = "Programming exercises";
- stringsText[RT_TITLE_DEFI] = "Challenges";
- stringsText[RT_TITLE_MISSION] = "Missions";
- stringsText[RT_TITLE_FREE] = "Free game";
- stringsText[RT_TITLE_TEEN] = "Free game";
- stringsText[RT_TITLE_USER] = "User levels";
- stringsText[RT_TITLE_SETUP] = "Options";
- stringsText[RT_TITLE_NAME] = "Player's name";
- stringsText[RT_TITLE_PERSO] = "Customize your appearance";
- stringsText[RT_TITLE_WRITE] = "Save the current mission";
- stringsText[RT_TITLE_READ] = "Load a saved mission";
-
- stringsText[RT_PLAY_CHAPt] = " Chapters:";
- stringsText[RT_PLAY_CHAPd] = " Chapters:";
- stringsText[RT_PLAY_CHAPm] = " Planets:";
- stringsText[RT_PLAY_CHAPf] = " Planets:";
- stringsText[RT_PLAY_CHAPu] = " User levels:";
- stringsText[RT_PLAY_CHAPte] = " Chapters:";
- stringsText[RT_PLAY_LISTt] = " Exercises in the chapter:";
- stringsText[RT_PLAY_LISTd] = " Challenges in the chapter:";
- stringsText[RT_PLAY_LISTm] = " Missions on this planet:";
- stringsText[RT_PLAY_LISTf] = " Free game on this planet:";
- stringsText[RT_PLAY_LISTu] = " Missions on this level:";
- stringsText[RT_PLAY_LISTk] = " Free game on this chapter:";
- stringsText[RT_PLAY_RESUME] = " Summary:";
-
- stringsText[RT_SETUP_DEVICE] = " Drivers:";
- stringsText[RT_SETUP_MODE] = " Resolution:";
- stringsText[RT_SETUP_KEY1] = "1) First click on the key you want to redefine.";
- stringsText[RT_SETUP_KEY2] = "2) Then press the key you want to use instead.";
-
- stringsText[RT_PERSO_FACE] = "Face type:";
- stringsText[RT_PERSO_GLASSES] = "Eyeglasses:";
- stringsText[RT_PERSO_HAIR] = "Hair color:";
- stringsText[RT_PERSO_COMBI] = "Suit color:";
- stringsText[RT_PERSO_BAND] = "Strip color:";
-
- stringsText[RT_DIALOG_QUIT] = "Do you want to quit COLOBOT ?";
- stringsText[RT_DIALOG_TITLE] = "COLOBOT";
- stringsText[RT_DIALOG_YESQUIT] = "Quit\\Quit COLOBOT";
- stringsText[RT_DIALOG_ABORT] = "Quit the mission?";
- stringsText[RT_DIALOG_YES] = "Abort\\Abort the current mission";
- stringsText[RT_DIALOG_NO] = "Continue\\Continue the current mission";
- stringsText[RT_DIALOG_NOQUIT] = "Continue\\Continue the game";
- stringsText[RT_DIALOG_DELOBJ] = "Do you really want to destroy the selected building?";
- stringsText[RT_DIALOG_DELGAME] = "Do you want to delete %s's saved games? ";
- stringsText[RT_DIALOG_YESDEL] = "Delete";
- stringsText[RT_DIALOG_NODEL] = "Cancel";
- stringsText[RT_DIALOG_LOADING] = "LOADING";
-
- stringsText[RT_STUDIO_LISTTT] = "Keyword help(\\key cbot;)";
- stringsText[RT_STUDIO_COMPOK] = "Compilation ok (0 errors)";
- stringsText[RT_STUDIO_PROGSTOP] = "Program finished";
-
- stringsText[RT_SATCOM_LIST] = "\\b;List of objects\n";
- stringsText[RT_SATCOM_BOT] = "\\b;Robots\n";
- stringsText[RT_SATCOM_BUILDING] = "\\b;Buildings\n";
- stringsText[RT_SATCOM_FRET] = "\\b;Moveable objects\n";
- stringsText[RT_SATCOM_ALIEN] = "\\b;Aliens\n";
- stringsText[RT_SATCOM_NULL] = "\\c; (none)\\n;\n";
- stringsText[RT_SATCOM_ERROR1] = "\\b;Error\n";
- stringsText[RT_SATCOM_ERROR2] = "The list is only available if a \\l;radar station\\u object\\radar; is working.\n";
-
- stringsText[RT_IO_OPEN] = "Open";
- stringsText[RT_IO_SAVE] = "Save";
- stringsText[RT_IO_LIST] = "Folder: %s";
- stringsText[RT_IO_NAME] = "Name:";
- stringsText[RT_IO_DIR] = "Folder:";
- stringsText[RT_IO_PRIVATE] = "Private\\Private folder";
- stringsText[RT_IO_PUBLIC] = "Public\\Common folder";
-
- stringsText[RT_GENERIC_DEV1] = "Developed by :";
- stringsText[RT_GENERIC_DEV2] = "www.epsitec.com";
- stringsText[RT_GENERIC_EDIT1] = " ";
- stringsText[RT_GENERIC_EDIT2] = " ";
-
- stringsText[RT_INTERFACE_REC] = "Recorder";
-
-
-
- stringsEvent[EVENT_BUTTON_OK] = "OK";
- stringsEvent[EVENT_BUTTON_CANCEL] = "Cancel";
- stringsEvent[EVENT_BUTTON_NEXT] = "Next";
- stringsEvent[EVENT_BUTTON_PREV] = "Previous";
- stringsEvent[EVENT_BUTTON_QUIT] = "Menu (\\key quit;)";
-
- stringsEvent[EVENT_DIALOG_OK] = "OK";
- stringsEvent[EVENT_DIALOG_CANCEL] = "Cancel";
-
- stringsEvent[EVENT_INTERFACE_TRAINER] = "Exercises\\Programming exercises";
- stringsEvent[EVENT_INTERFACE_DEFI] = "Challenges\\Programming challenges";
- stringsEvent[EVENT_INTERFACE_MISSION] = "Missions\\Select mission";
- stringsEvent[EVENT_INTERFACE_FREE] = "Free game\\Free game without a specific goal";
- stringsEvent[EVENT_INTERFACE_TEEN] = "Free game\\Free game without a specific goal";
- stringsEvent[EVENT_INTERFACE_USER] = "User\\User levels";
- stringsEvent[EVENT_INTERFACE_NAME] = "Change player\\Change player";
- stringsEvent[EVENT_INTERFACE_SETUP] = "Options\\Preferences";
- stringsEvent[EVENT_INTERFACE_AGAIN] = "Restart\\Restart the mission from the beginning";
- stringsEvent[EVENT_INTERFACE_WRITE] = "Save\\Save the current mission ";
- stringsEvent[EVENT_INTERFACE_READ] = "Load\\Load a saved mission";
- stringsEvent[EVENT_INTERFACE_ABORT] = "\\Return to COLOBOT";
- stringsEvent[EVENT_INTERFACE_QUIT] = "Quit\\Quit COLOBOT";
- stringsEvent[EVENT_INTERFACE_BACK] = "<< Back \\Back to the previous screen";
- stringsEvent[EVENT_INTERFACE_PLAY] = "Play\\Start mission!";
- stringsEvent[EVENT_INTERFACE_SETUPd] = "Device\\Driver and resolution settings";
- stringsEvent[EVENT_INTERFACE_SETUPg] = "Graphics\\Graphics settings";
- stringsEvent[EVENT_INTERFACE_SETUPp] = "Game\\Game settings";
- stringsEvent[EVENT_INTERFACE_SETUPc] = "Controls\\Keyboard, joystick and mouse settings";
- stringsEvent[EVENT_INTERFACE_SETUPs] = "Sound\\Music and game sound volume";
- stringsEvent[EVENT_INTERFACE_DEVICE] = "Unit";
- stringsEvent[EVENT_INTERFACE_RESOL] = "Resolution";
- stringsEvent[EVENT_INTERFACE_FULL] = "Full screen\\Full screen or window mode";
- stringsEvent[EVENT_INTERFACE_APPLY] = "Apply changes\\Activates the changed settings";
-
- stringsEvent[EVENT_INTERFACE_TOTO] = "Robbie\\Your assistant";
- stringsEvent[EVENT_INTERFACE_SHADOW] = "Shadows\\Shadows on the ground";
- stringsEvent[EVENT_INTERFACE_GROUND] = "Marks on the ground\\Marks on the ground";
- stringsEvent[EVENT_INTERFACE_DIRTY] = "Dust\\Dust and dirt on bots and buildings";
- stringsEvent[EVENT_INTERFACE_FOG] = "Fog\\Fog";
- stringsEvent[EVENT_INTERFACE_LENS] = "Sunbeams\\Sunbeams in the sky";
- stringsEvent[EVENT_INTERFACE_SKY] = "Sky\\Clouds and nebulae";
- stringsEvent[EVENT_INTERFACE_PLANET] = "Planets and stars\\Astronomical objects in the sky";
- stringsEvent[EVENT_INTERFACE_LIGHT] = "Dynamic lighting\\Mobile light sources";
- stringsEvent[EVENT_INTERFACE_PARTI] = "Number of particles\\Explosions, dust, reflections, etc.";
- stringsEvent[EVENT_INTERFACE_CLIP] = "Depth of field\\Maximum visibility";
- stringsEvent[EVENT_INTERFACE_DETAIL] = "Details\\Visual quality of 3D objects";
- stringsEvent[EVENT_INTERFACE_TEXTURE] = "Textures\\Quality of textures ";
- stringsEvent[EVENT_INTERFACE_GADGET] = "Num of decorative objects\\Number of purely ornamental objects";
- stringsEvent[EVENT_INTERFACE_RAIN] = "Particles in the interface\\Steam clouds and sparks in the interface";
- stringsEvent[EVENT_INTERFACE_GLINT] = "Reflections on the buttons \\Shiny buttons";
- stringsEvent[EVENT_INTERFACE_TOOLTIP] = "Help balloons\\Explain the function of the buttons";
- stringsEvent[EVENT_INTERFACE_MOVIES] = "Film sequences\\Films before and after the missions";
- stringsEvent[EVENT_INTERFACE_NICERST] = "Exit film\\Film at the exit of exercises";
- stringsEvent[EVENT_INTERFACE_HIMSELF] = "Friendly fire\\Your shooting can damage your own objects ";
- stringsEvent[EVENT_INTERFACE_SCROLL] = "Scrolling\\Scrolling when the mouse touches right or left border";
- stringsEvent[EVENT_INTERFACE_INVERTX] = "Mouse inversion X\\Inversion of the scrolling direction on the X axis";
- stringsEvent[EVENT_INTERFACE_INVERTY] = "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis";
- stringsEvent[EVENT_INTERFACE_EFFECT] = "Quake at explosions\\The screen shakes at explosions";
- stringsEvent[EVENT_INTERFACE_MOUSE] = "Mouse shadow\\Gives the mouse a shadow";
- stringsEvent[EVENT_INTERFACE_EDITMODE] = "Automatic indent\\When program editing";
- stringsEvent[EVENT_INTERFACE_EDITVALUE] = "Big indent\\Indent 2 or 4 spaces per level defined by braces";
- stringsEvent[EVENT_INTERFACE_SOLUCE4] = "Access to solutions\\Show program \"4: Solution\" in the exercises";
- stringsEvent[EVENT_INTERFACE_BLOOD] = "Blood\\Display blood when the astronaut or the alien queen is hit";
-
- stringsEvent[EVENT_INTERFACE_KDEF] = "Standard controls\\Standard key functions";
- stringsEvent[EVENT_INTERFACE_KLEFT] = "Turn left\\turns the bot to the left";
- stringsEvent[EVENT_INTERFACE_KRIGHT] = "Turn right\\turns the bot to the right";
- stringsEvent[EVENT_INTERFACE_KUP] = "Forward\\Moves forward";
- stringsEvent[EVENT_INTERFACE_KDOWN] = "Backward\\Moves backward";
- stringsEvent[EVENT_INTERFACE_KGUP] = "Climb\\Increases the power of the jet";
- stringsEvent[EVENT_INTERFACE_KGDOWN] = "Descend\\Reduces the power of the jet";
- stringsEvent[EVENT_INTERFACE_KCAMERA] = "Change camera\\Switches between onboard camera and following camera";
- stringsEvent[EVENT_INTERFACE_KDESEL] = "Previous object\\Selects the previous object";
- stringsEvent[EVENT_INTERFACE_KACTION] = "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)";
- stringsEvent[EVENT_INTERFACE_KNEAR] = "Camera closer\\Moves the camera forward";
- stringsEvent[EVENT_INTERFACE_KAWAY] = "Camera back\\Moves the camera backward";
- stringsEvent[EVENT_INTERFACE_KNEXT] = "Next object\\Selects the next object";
- stringsEvent[EVENT_INTERFACE_KHUMAN] = "Select the astronaut\\Selects the astronaut";
- stringsEvent[EVENT_INTERFACE_KQUIT] = "Quit\\Quit the current mission or exercise";
- stringsEvent[EVENT_INTERFACE_KHELP] = "Instructions\\Shows the instructions for the current mission";
- stringsEvent[EVENT_INTERFACE_KPROG] = "Programming help\\Gives more detailed help with programming";
- stringsEvent[EVENT_INTERFACE_KCBOT] = "Key word help\\More detailed help about key words";
- stringsEvent[EVENT_INTERFACE_KVISIT] = "Origin of last message\\Shows where the last message was sent from";
- stringsEvent[EVENT_INTERFACE_KSPEED10] = "Speed 1.0x\\Normal speed";
- stringsEvent[EVENT_INTERFACE_KSPEED15] = "Speed 1.5x\\1.5 times faster";
- stringsEvent[EVENT_INTERFACE_KSPEED20] = "Speed 2.0x\\Double speed";
- stringsEvent[EVENT_INTERFACE_KSPEED30] = "Speed 3.0x\\Three times faster";
-
- stringsEvent[EVENT_INTERFACE_VOLSOUND] = "Sound effects:\\Volume of engines, voice, shooting, etc.";
- stringsEvent[EVENT_INTERFACE_VOLMUSIC] = "Background sound :\\Volume of audio tracks on the CD";
- stringsEvent[EVENT_INTERFACE_SOUND3D] = "3D sound\\3D positioning of the sound";
-
- stringsEvent[EVENT_INTERFACE_MIN] = "Lowest\\Minimum graphic quality (highest frame rate)";
- stringsEvent[EVENT_INTERFACE_NORM] = "Normal\\Normal graphic quality";
- stringsEvent[EVENT_INTERFACE_MAX] = "Highest\\Highest graphic quality (lowest frame rate)";
-
- stringsEvent[EVENT_INTERFACE_SILENT] = "Mute\\No sound";
- stringsEvent[EVENT_INTERFACE_NOISY] = "Normal\\Normal sound volume";
-
- stringsEvent[EVENT_INTERFACE_JOYSTICK] = "Use a joystick\\Joystick or keyboard";
- stringsEvent[EVENT_INTERFACE_SOLUCE] = "Access to solution\\Shows the solution (detailed instructions for missions)";
-
- stringsEvent[EVENT_INTERFACE_NEDIT] = "\\New player name";
- stringsEvent[EVENT_INTERFACE_NOK] = "OK\\Choose the selected player";
- stringsEvent[EVENT_INTERFACE_NCANCEL] = "Cancel\\Keep current player name";
- stringsEvent[EVENT_INTERFACE_NDELETE] = "Delete player\\Deletes the player from the list";
- stringsEvent[EVENT_INTERFACE_NLABEL] = "Player name";
-
- stringsEvent[EVENT_INTERFACE_IOWRITE] = "Save\\Saves the current mission";
- stringsEvent[EVENT_INTERFACE_IOREAD] = "Load\\Loads the selected mission";
- stringsEvent[EVENT_INTERFACE_IOLIST] = "List of saved missions";
- stringsEvent[EVENT_INTERFACE_IOLABEL] = "Filename:";
- stringsEvent[EVENT_INTERFACE_IONAME] = "Mission name";
- stringsEvent[EVENT_INTERFACE_IOIMAGE] = "Photography";
- stringsEvent[EVENT_INTERFACE_IODELETE] = "Delete\\Deletes the selected file";
-
- stringsEvent[EVENT_INTERFACE_PERSO] = "Appearance\\Choose your appearance";
- stringsEvent[EVENT_INTERFACE_POK] = "OK";
- stringsEvent[EVENT_INTERFACE_PCANCEL] = "Cancel";
- stringsEvent[EVENT_INTERFACE_PDEF] = "Standard\\Standard appearance settings";
- stringsEvent[EVENT_INTERFACE_PHEAD] = "Head\\Face and hair";
- stringsEvent[EVENT_INTERFACE_PBODY] = "Suit\\Astronaut suit";
- stringsEvent[EVENT_INTERFACE_PLROT] = "\\Turn left";
- stringsEvent[EVENT_INTERFACE_PRROT] = "\\Turn right";
- stringsEvent[EVENT_INTERFACE_PCRa] = "Red";
- stringsEvent[EVENT_INTERFACE_PCGa] = "Green";
- stringsEvent[EVENT_INTERFACE_PCBa] = "Blue";
- stringsEvent[EVENT_INTERFACE_PCRb] = "Red";
- stringsEvent[EVENT_INTERFACE_PCGb] = "Green";
- stringsEvent[EVENT_INTERFACE_PCBb] = "Blue";
- stringsEvent[EVENT_INTERFACE_PFACE1] = "\\Face 1";
- stringsEvent[EVENT_INTERFACE_PFACE2] = "\\Face 4";
- stringsEvent[EVENT_INTERFACE_PFACE3] = "\\Face 3";
- stringsEvent[EVENT_INTERFACE_PFACE4] = "\\Face 2";
- stringsEvent[EVENT_INTERFACE_PGLASS0] = "\\No eyeglasses";
- stringsEvent[EVENT_INTERFACE_PGLASS1] = "\\Eyeglasses 1";
- stringsEvent[EVENT_INTERFACE_PGLASS2] = "\\Eyeglasses 2";
- stringsEvent[EVENT_INTERFACE_PGLASS3] = "\\Eyeglasses 3";
- stringsEvent[EVENT_INTERFACE_PGLASS4] = "\\Eyeglasses 4";
- stringsEvent[EVENT_INTERFACE_PGLASS5] = "\\Eyeglasses 5";
-
- stringsEvent[EVENT_OBJECT_DESELECT] = "Previous selection (\\key desel;)";
- stringsEvent[EVENT_OBJECT_LEFT] = "Turn left (\\key left;)";
- stringsEvent[EVENT_OBJECT_RIGHT] = "Turn right (\\key right;)";
- stringsEvent[EVENT_OBJECT_UP] = "Forward (\\key up;)";
- stringsEvent[EVENT_OBJECT_DOWN] = "Backward (\\key down;)";
- stringsEvent[EVENT_OBJECT_GASUP] = "Up (\\key gup;)";
- stringsEvent[EVENT_OBJECT_GASDOWN] = "Down (\\key gdown;)";
- stringsEvent[EVENT_OBJECT_HTAKE] = "Grab or drop (\\key action;)";
- stringsEvent[EVENT_OBJECT_MTAKE] = "Grab or drop (\\key action;)";
- stringsEvent[EVENT_OBJECT_MFRONT] = "..in front";
- stringsEvent[EVENT_OBJECT_MBACK] = "..behind";
- stringsEvent[EVENT_OBJECT_MPOWER] = "..power cell";
- stringsEvent[EVENT_OBJECT_BHELP] = "Instructions for the mission (\\key help;)";
- stringsEvent[EVENT_OBJECT_BTAKEOFF] = "Take off to finish the mission";
- stringsEvent[EVENT_OBJECT_BDESTROY] = "Destroy";
- stringsEvent[EVENT_OBJECT_BDERRICK] = "Build a derrick";
- stringsEvent[EVENT_OBJECT_BSTATION] = "Build a power station";
- stringsEvent[EVENT_OBJECT_BFACTORY] = "Build a bot factory";
- stringsEvent[EVENT_OBJECT_BREPAIR] = "Build a repair center";
- stringsEvent[EVENT_OBJECT_BCONVERT] = "Build a converter";
- stringsEvent[EVENT_OBJECT_BTOWER] = "Build a defense tower";
- stringsEvent[EVENT_OBJECT_BRESEARCH] = "Build a research center";
- stringsEvent[EVENT_OBJECT_BRADAR] = "Build a radar station";
- stringsEvent[EVENT_OBJECT_BENERGY] = "Build a power cell factory";
- stringsEvent[EVENT_OBJECT_BLABO] = "Build an autolab";
- stringsEvent[EVENT_OBJECT_BNUCLEAR] = "Build a nuclear power plant";
- stringsEvent[EVENT_OBJECT_BPARA] = "Build a lightning conductor";
- stringsEvent[EVENT_OBJECT_BINFO] = "Build a exchange post";
- stringsEvent[EVENT_OBJECT_BDESTROYER] = "Build a destroyer";
- stringsEvent[EVENT_OBJECT_GFLAT] = "Show if the ground is flat";
- stringsEvent[EVENT_OBJECT_FCREATE] = "Plant a flag";
- stringsEvent[EVENT_OBJECT_FDELETE] = "Remove a flag";
- stringsEvent[EVENT_OBJECT_FCOLORb] = "\\Blue flags";
- stringsEvent[EVENT_OBJECT_FCOLORr] = "\\Red flags";
- stringsEvent[EVENT_OBJECT_FCOLORg] = "\\Green flags";
- stringsEvent[EVENT_OBJECT_FCOLORy] = "\\Yellow flags";
- stringsEvent[EVENT_OBJECT_FCOLORv] = "\\Violet flags";
- stringsEvent[EVENT_OBJECT_FACTORYfa] = "Build a winged grabber";
- stringsEvent[EVENT_OBJECT_FACTORYta] = "Build a tracked grabber";
- stringsEvent[EVENT_OBJECT_FACTORYwa] = "Build a wheeled grabber";
- stringsEvent[EVENT_OBJECT_FACTORYia] = "Build a legged grabber";
- stringsEvent[EVENT_OBJECT_FACTORYfc] = "Build a winged shooter";
- stringsEvent[EVENT_OBJECT_FACTORYtc] = "Build a tracked shooter";
- stringsEvent[EVENT_OBJECT_FACTORYwc] = "Build a wheeled shooter";
- stringsEvent[EVENT_OBJECT_FACTORYic] = "Build a legged shooter";
- stringsEvent[EVENT_OBJECT_FACTORYfi] = "Build a winged orga shooter";
- stringsEvent[EVENT_OBJECT_FACTORYti] = "Build a tracked orga shooter";
- stringsEvent[EVENT_OBJECT_FACTORYwi] = "Build a wheeled orga shooter";
- stringsEvent[EVENT_OBJECT_FACTORYii] = "Build a legged orga shooter";
- stringsEvent[EVENT_OBJECT_FACTORYfs] = "Build a winged sniffer";
- stringsEvent[EVENT_OBJECT_FACTORYts] = "Build a tracked sniffer";
- stringsEvent[EVENT_OBJECT_FACTORYws] = "Build a wheeled sniffer";
- stringsEvent[EVENT_OBJECT_FACTORYis] = "Build a legged sniffer";
- stringsEvent[EVENT_OBJECT_FACTORYrt] = "Build a thumper";
- stringsEvent[EVENT_OBJECT_FACTORYrc] = "Build a phazer shooter";
- stringsEvent[EVENT_OBJECT_FACTORYrr] = "Build a recycler";
- stringsEvent[EVENT_OBJECT_FACTORYrs] = "Build a shielder";
- stringsEvent[EVENT_OBJECT_FACTORYsa] = "Build a subber";
- stringsEvent[EVENT_OBJECT_RTANK] = "Run research program for tracked bots";
- stringsEvent[EVENT_OBJECT_RFLY] = "Run research program for winged bots";
- stringsEvent[EVENT_OBJECT_RTHUMP] = "Run research program for thumper";
- stringsEvent[EVENT_OBJECT_RCANON] = "Run research program for shooter";
- stringsEvent[EVENT_OBJECT_RTOWER] = "Run research program for defense tower";
- stringsEvent[EVENT_OBJECT_RPHAZER] = "Run research program for phazer shooter";
- stringsEvent[EVENT_OBJECT_RSHIELD] = "Run research program for shielder";
- stringsEvent[EVENT_OBJECT_RATOMIC] = "Run research program for nuclear power";
- stringsEvent[EVENT_OBJECT_RiPAW] = "Run research program for legged bots";
- stringsEvent[EVENT_OBJECT_RiGUN] = "Run research program for orga shooter";
- stringsEvent[EVENT_OBJECT_RESET] = "Return to start";
- stringsEvent[EVENT_OBJECT_SEARCH] = "Sniff (\\key action;)";
- stringsEvent[EVENT_OBJECT_TERRAFORM] = "Thump (\\key action;)";
- stringsEvent[EVENT_OBJECT_FIRE] = "Shoot (\\key action;)";
- stringsEvent[EVENT_OBJECT_SPIDEREXPLO] = "Explode (\\key action;)";
- stringsEvent[EVENT_OBJECT_RECOVER] = "Recycle (\\key action;)";
- stringsEvent[EVENT_OBJECT_BEGSHIELD] = "Extend shield (\\key action;)";
- stringsEvent[EVENT_OBJECT_ENDSHIELD] = "Withdraw shield (\\key action;)";
- stringsEvent[EVENT_OBJECT_DIMSHIELD] = "Shield radius";
- stringsEvent[EVENT_OBJECT_PROGRUN] = "Execute the selected program";
- stringsEvent[EVENT_OBJECT_PROGEDIT] = "Edit the selected program";
- stringsEvent[EVENT_OBJECT_INFOOK] = "\\SatCom on standby";
- stringsEvent[EVENT_OBJECT_DELETE] = "Destroy the building";
- stringsEvent[EVENT_OBJECT_GENERGY] = "Energy level";
- stringsEvent[EVENT_OBJECT_GSHIELD] = "Shield level";
- stringsEvent[EVENT_OBJECT_GRANGE] = "Jet temperature";
- stringsEvent[EVENT_OBJECT_GPROGRESS] = "Still working ...";
- stringsEvent[EVENT_OBJECT_GRADAR] = "Number of insects detected";
- stringsEvent[EVENT_OBJECT_GINFO] = "Transmitted information";
- stringsEvent[EVENT_OBJECT_COMPASS] = "Compass";
- stringsEvent[EVENT_OBJECT_MAPZOOM] = "Zoom mini-map";
- stringsEvent[EVENT_OBJECT_CAMERA] = "Camera (\\key camera;)";
- stringsEvent[EVENT_OBJECT_CAMERAleft] = "Camera to left";
- stringsEvent[EVENT_OBJECT_CAMERAright] = "Camera to right";
- stringsEvent[EVENT_OBJECT_CAMERAnear] = "Camera nearest";
- stringsEvent[EVENT_OBJECT_CAMERAaway] = "Camera awayest";
- stringsEvent[EVENT_OBJECT_HELP] = "Help about selected object";
- stringsEvent[EVENT_OBJECT_SOLUCE] = "Show the solution";
- stringsEvent[EVENT_OBJECT_SHORTCUT00] = "Switch bots <-> buildings";
- stringsEvent[EVENT_OBJECT_LIMIT] = "Show the range";
- stringsEvent[EVENT_OBJECT_PEN0] = "\\Raise the pencil";
- stringsEvent[EVENT_OBJECT_PEN1] = "\\Use the black pencil";
- stringsEvent[EVENT_OBJECT_PEN2] = "\\Use the yellow pencil";
- stringsEvent[EVENT_OBJECT_PEN3] = "\\Use the orange pencil";
- stringsEvent[EVENT_OBJECT_PEN4] = "\\Use the red pencil";
- stringsEvent[EVENT_OBJECT_PEN5] = "\\Use the purple pencil";
- stringsEvent[EVENT_OBJECT_PEN6] = "\\Use the blue pencil";
- stringsEvent[EVENT_OBJECT_PEN7] = "\\Use the green pencil";
- stringsEvent[EVENT_OBJECT_PEN8] = "\\Use the brown pencil";
- stringsEvent[EVENT_OBJECT_REC] = "\\Start recording";
- stringsEvent[EVENT_OBJECT_STOP] = "\\Stop recording";
- stringsEvent[EVENT_DT_VISIT0] = "Show the place";
- stringsEvent[EVENT_DT_VISIT1] = "Show the place";
- stringsEvent[EVENT_DT_VISIT2] = "Show the place";
- stringsEvent[EVENT_DT_VISIT3] = "Show the place";
- stringsEvent[EVENT_DT_VISIT4] = "Show the place";
- stringsEvent[EVENT_DT_END] = "Continue";
- stringsEvent[EVENT_CMD] = "Command line";
- stringsEvent[EVENT_SPEED] = "Game speed";
-
- stringsEvent[EVENT_HYPER_PREV] = "Back";
- stringsEvent[EVENT_HYPER_NEXT] = "Forward";
- stringsEvent[EVENT_HYPER_HOME] = "Home";
- stringsEvent[EVENT_HYPER_COPY] = "Copy";
- stringsEvent[EVENT_HYPER_SIZE1] = "Size 1";
- stringsEvent[EVENT_HYPER_SIZE2] = "Size 2";
- stringsEvent[EVENT_HYPER_SIZE3] = "Size 3";
- stringsEvent[EVENT_HYPER_SIZE4] = "Size 4";
- stringsEvent[EVENT_HYPER_SIZE5] = "Size 5";
- stringsEvent[EVENT_SATCOM_HUSTON] = "Instructions from Houston";
- stringsEvent[EVENT_SATCOM_SAT] = "Satellite report";
- stringsEvent[EVENT_SATCOM_LOADING] = "Programs dispatched by Houston";
- stringsEvent[EVENT_SATCOM_OBJECT] = "List of objects";
- stringsEvent[EVENT_SATCOM_PROG] = "Programming help";
- stringsEvent[EVENT_SATCOM_SOLUCE] = "Solution";
-
- stringsEvent[EVENT_STUDIO_OK] = "OK\\Close program editor and return to game";
- stringsEvent[EVENT_STUDIO_CANCEL] = "Cancel\\Cancel all changes";
- stringsEvent[EVENT_STUDIO_NEW] = "New";
- stringsEvent[EVENT_STUDIO_OPEN] = "Open (Ctrl+o)";
- stringsEvent[EVENT_STUDIO_SAVE] = "Save (Ctrl+s)";
- stringsEvent[EVENT_STUDIO_UNDO] = "Undo (Ctrl+z)";
- stringsEvent[EVENT_STUDIO_CUT] = "Cut (Ctrl+x)";
- stringsEvent[EVENT_STUDIO_COPY] = "Copy (Ctrl+c)";
- stringsEvent[EVENT_STUDIO_PASTE] = "Paste (Ctrl+v)";
- stringsEvent[EVENT_STUDIO_SIZE] = "Font size";
- stringsEvent[EVENT_STUDIO_TOOL] = "Instructions (\\key help;)";
- stringsEvent[EVENT_STUDIO_HELP] = "Programming help (\\key prog;)";
- stringsEvent[EVENT_STUDIO_COMPILE] = "Compile";
- stringsEvent[EVENT_STUDIO_RUN] = "Execute/stop";
- stringsEvent[EVENT_STUDIO_REALTIME] = "Pause/continue";
- stringsEvent[EVENT_STUDIO_STEP] = "One step";
-
-
-
- stringsObject[OBJECT_PORTICO] = "Gantry crane";
- stringsObject[OBJECT_BASE] = "Spaceship";
- stringsObject[OBJECT_DERRICK] = "Derrick";
- stringsObject[OBJECT_FACTORY] = "Bot factory";
- stringsObject[OBJECT_REPAIR] = "Repair center";
- stringsObject[OBJECT_DESTROYER] = "Destroyer";
- stringsObject[OBJECT_STATION] = "Power station";
- stringsObject[OBJECT_CONVERT] = "Converts ore to titanium";
- stringsObject[OBJECT_TOWER] = "Defense tower";
- stringsObject[OBJECT_NEST] = "Nest";
- stringsObject[OBJECT_RESEARCH] = "Research center";
- stringsObject[OBJECT_RADAR] = "Radar station";
- stringsObject[OBJECT_INFO] = "Information exchange post";
- stringsObject[OBJECT_ENERGY] = "Power cell factory";
- stringsObject[OBJECT_LABO] = "Autolab";
- stringsObject[OBJECT_NUCLEAR] = "Nuclear power station";
- stringsObject[OBJECT_PARA] = "Lightning conductor";
- stringsObject[OBJECT_SAFE] = "Vault";
- stringsObject[OBJECT_HUSTON] = "Houston Mission Control";
- stringsObject[OBJECT_TARGET1] = "Target";
- stringsObject[OBJECT_TARGET2] = "Target";
- stringsObject[OBJECT_START] = "Start";
- stringsObject[OBJECT_END] = "Finish";
- stringsObject[OBJECT_STONE] = "Titanium ore";
- stringsObject[OBJECT_URANIUM] = "Uranium ore";
- stringsObject[OBJECT_BULLET] = "Organic matter";
- stringsObject[OBJECT_METAL] = "Titanium";
- stringsObject[OBJECT_POWER] = "Power cell";
- stringsObject[OBJECT_ATOMIC] = "Nuclear power cell";
- stringsObject[OBJECT_BBOX] = "Black box";
- stringsObject[OBJECT_KEYa] = "Key A";
- stringsObject[OBJECT_KEYb] = "Key B";
- stringsObject[OBJECT_KEYc] = "Key C";
- stringsObject[OBJECT_KEYd] = "Key D";
- stringsObject[OBJECT_TNT] = "Explosive";
- stringsObject[OBJECT_BOMB] = "Fixed mine";
- stringsObject[OBJECT_BAG] = "Survival kit";
- stringsObject[OBJECT_WAYPOINT] = "Checkpoint";
- stringsObject[OBJECT_FLAGb] = "Blue flag";
- stringsObject[OBJECT_FLAGr] = "Red flag";
- stringsObject[OBJECT_FLAGg] = "Green flag";
- stringsObject[OBJECT_FLAGy] = "Yellow flag";
- stringsObject[OBJECT_FLAGv] = "Violet flag";
- stringsObject[OBJECT_MARKPOWER] = "Energy deposit (site for power station)";
- stringsObject[OBJECT_MARKURANIUM] = "Uranium deposit (site for derrick)";
- stringsObject[OBJECT_MARKKEYa] = "Found key A (site for derrick)";
- stringsObject[OBJECT_MARKKEYb] = "Found key B (site for derrick)";
- stringsObject[OBJECT_MARKKEYc] = "Found key C (site for derrick)";
- stringsObject[OBJECT_MARKKEYd] = "Found key D (site for derrick)";
- stringsObject[OBJECT_MARKSTONE] = "Titanium deposit (site for derrick)";
- stringsObject[OBJECT_MOBILEft] = "Practice bot";
- stringsObject[OBJECT_MOBILEtt] = "Practice bot";
- stringsObject[OBJECT_MOBILEwt] = "Practice bot";
- stringsObject[OBJECT_MOBILEit] = "Practice bot";
- stringsObject[OBJECT_MOBILEfa] = "Winged grabber";
- stringsObject[OBJECT_MOBILEta] = "Tracked grabber";
- stringsObject[OBJECT_MOBILEwa] = "Wheeled grabber";
- stringsObject[OBJECT_MOBILEia] = "Legged grabber";
- stringsObject[OBJECT_MOBILEfc] = "Winged shooter";
- stringsObject[OBJECT_MOBILEtc] = "Tracked shooter";
- stringsObject[OBJECT_MOBILEwc] = "Wheeled shooter";
- stringsObject[OBJECT_MOBILEic] = "Legged shooter";
- stringsObject[OBJECT_MOBILEfi] = "Winged orga shooter";
- stringsObject[OBJECT_MOBILEti] = "Tracked orga shooter";
- stringsObject[OBJECT_MOBILEwi] = "Wheeled orga shooter";
- stringsObject[OBJECT_MOBILEii] = "Legged orga shooter";
- stringsObject[OBJECT_MOBILEfs] = "Winged sniffer";
- stringsObject[OBJECT_MOBILEts] = "Tracked sniffer";
- stringsObject[OBJECT_MOBILEws] = "Wheeled sniffer";
- stringsObject[OBJECT_MOBILEis] = "Legged sniffer";
- stringsObject[OBJECT_MOBILErt] = "Thumper";
- stringsObject[OBJECT_MOBILErc] = "Phazer shooter";
- stringsObject[OBJECT_MOBILErr] = "Recycler";
- stringsObject[OBJECT_MOBILErs] = "Shielder";
- stringsObject[OBJECT_MOBILEsa] = "Subber";
- stringsObject[OBJECT_MOBILEtg] = "Target bot";
- stringsObject[OBJECT_MOBILEdr] = "Drawer bot";
- stringsObject[OBJECT_TECH] = "Engineer";
- stringsObject[OBJECT_TOTO] = "Robbie";
- stringsObject[OBJECT_MOTHER] = "Alien Queen";
- stringsObject[OBJECT_ANT] = "Ant";
- stringsObject[OBJECT_SPIDER] = "Spider";
- stringsObject[OBJECT_BEE] = "Wasp";
- stringsObject[OBJECT_WORM] = "Worm";
- stringsObject[OBJECT_EGG] = "Egg";
- stringsObject[OBJECT_RUINmobilew1] = "Wreckage";
- stringsObject[OBJECT_RUINmobilew2] = "Wreckage";
- stringsObject[OBJECT_RUINmobilet1] = "Wreckage";
- stringsObject[OBJECT_RUINmobilet2] = "Wreckage";
- stringsObject[OBJECT_RUINmobiler1] = "Wreckage";
- stringsObject[OBJECT_RUINmobiler2] = "Wreckage";
- stringsObject[OBJECT_RUINfactory] = "Ruin";
- stringsObject[OBJECT_RUINdoor] = "Ruin";
- stringsObject[OBJECT_RUINsupport] = "Waste";
- stringsObject[OBJECT_RUINradar] = "Ruin";
- stringsObject[OBJECT_RUINconvert] = "Ruin";
- stringsObject[OBJECT_RUINbase] = "Spaceship ruin";
- stringsObject[OBJECT_RUINhead] = "Spaceship ruin";
- stringsObject[OBJECT_APOLLO1] = "Remains of Apollo mission";
- stringsObject[OBJECT_APOLLO3] = "Remains of Apollo mission";
- stringsObject[OBJECT_APOLLO4] = "Remains of Apollo mission";
- stringsObject[OBJECT_APOLLO5] = "Remains of Apollo mission";
- stringsObject[OBJECT_APOLLO2] = "Lunar Roving Vehicle";
-
-
-
- stringsErr[ERR_GENERIC] = "Internal error - tell the developers";
- stringsErr[ERR_CMD] = "Unknown command";
- stringsErr[ERR_MANIP_VEH] = "Inappropriate bot";
- stringsErr[ERR_MANIP_FLY] = "Impossible when flying";
- stringsErr[ERR_MANIP_BUSY] = "Already carrying something";
- stringsErr[ERR_MANIP_NIL] = "Nothing to grab";
- stringsErr[ERR_MANIP_MOTOR] = "Impossible when moving";
- stringsErr[ERR_MANIP_OCC] = "Place occupied";
- stringsErr[ERR_MANIP_FRIEND] = "No other robot";
- stringsErr[ERR_MANIP_RADIO] = "You can not carry a radioactive object";
- stringsErr[ERR_MANIP_WATER] = "You can not carry an object under water";
- stringsErr[ERR_MANIP_EMPTY] = "Nothing to drop";
- stringsErr[ERR_BUILD_FLY] = "Impossible when flying";
- stringsErr[ERR_BUILD_WATER] = "Impossible under water";
- stringsErr[ERR_BUILD_ENERGY] = "Not enough energy";
- stringsErr[ERR_BUILD_METALAWAY] = "Titanium too far away";
- stringsErr[ERR_BUILD_METALNEAR] = "Titanium too close";
- stringsErr[ERR_BUILD_METALINEX] = "No titanium around";
- stringsErr[ERR_BUILD_FLAT] = "Ground not flat enough";
- stringsErr[ERR_BUILD_FLATLIT] = "Flat ground not large enough";
- stringsErr[ERR_BUILD_BUSY] = "Place occupied";
- stringsErr[ERR_BUILD_BASE] = "Too close to space ship";
- stringsErr[ERR_BUILD_NARROW] = "Too close to a building";
- stringsErr[ERR_BUILD_MOTOR] = "Impossible when moving";
- stringsErr[ERR_SEARCH_FLY] = "Impossible when flying";
- stringsErr[ERR_BUILD_DISABLED] = "Can not produce this object in this mission";
- stringsErr[ERR_BUILD_RESEARCH] = "Can not produce not researched object";
- stringsErr[ERR_SEARCH_VEH] = "Inappropriate bot";
- stringsErr[ERR_SEARCH_MOTOR] = "Impossible when moving";
- stringsErr[ERR_TERRA_VEH] = "Inappropriate bot";
- stringsErr[ERR_TERRA_ENERGY] = "Not enough energy";
- stringsErr[ERR_TERRA_FLOOR] = "Ground inappropriate";
- stringsErr[ERR_TERRA_BUILDING] = "Building too close";
- stringsErr[ERR_TERRA_OBJECT] = "Object too close";
- stringsErr[ERR_RECOVER_VEH] = "Inappropriate bot";
- stringsErr[ERR_RECOVER_ENERGY] = "Not enough energy";
- stringsErr[ERR_RECOVER_NULL] = "Nothing to recycle";
- stringsErr[ERR_SHIELD_VEH] = "Inappropriate bot";
- stringsErr[ERR_SHIELD_ENERGY] = "No more energy";
- stringsErr[ERR_MOVE_IMPOSSIBLE] = "Error in instruction move";
- stringsErr[ERR_FIND_IMPOSSIBLE] = "Object not found";
- stringsErr[ERR_GOTO_IMPOSSIBLE] = "Goto: inaccessible destination";
- stringsErr[ERR_GOTO_ITER] = "Goto: inaccessible destination";
- stringsErr[ERR_GOTO_BUSY] = "Goto: destination occupied";
- stringsErr[ERR_FIRE_VEH] = "Inappropriate bot";
- stringsErr[ERR_FIRE_ENERGY] = "Not enough energy";
- stringsErr[ERR_FIRE_FLY] = "Impossible when flying";
- stringsErr[ERR_CONVERT_EMPTY] = "No titanium ore to convert";
- stringsErr[ERR_DERRICK_NULL] = "No ore in the subsoil";
- stringsErr[ERR_STATION_NULL] = "No energy in the subsoil";
- stringsErr[ERR_TOWER_POWER] = "No power cell";
- stringsErr[ERR_TOWER_ENERGY] = "No more energy";
- stringsErr[ERR_RESEARCH_POWER] = "No power cell";
- stringsErr[ERR_RESEARCH_ENERGY] = "Not enough energy";
- stringsErr[ERR_RESEARCH_TYPE] = "Inappropriate cell type";
- stringsErr[ERR_RESEARCH_ALREADY]= "Research program already performed";
- stringsErr[ERR_ENERGY_NULL] = "No energy in the subsoil";
- stringsErr[ERR_ENERGY_LOW] = "Not enough energy yet";
- stringsErr[ERR_ENERGY_EMPTY] = "No titanium to transform";
- stringsErr[ERR_ENERGY_BAD] = "Transforms only titanium";
- stringsErr[ERR_BASE_DLOCK] = "Doors blocked by a robot or another object ";
- stringsErr[ERR_BASE_DHUMAN] = "You must get on the spaceship to take off ";
- stringsErr[ERR_LABO_NULL] = "Nothing to analyze";
- stringsErr[ERR_LABO_BAD] = "Analyzes only organic matter";
- stringsErr[ERR_LABO_ALREADY] = "Analysis already performed";
- stringsErr[ERR_NUCLEAR_NULL] = "No energy in the subsoil";
- stringsErr[ERR_NUCLEAR_LOW] = "Not yet enough energy";
- stringsErr[ERR_NUCLEAR_EMPTY] = "No uranium to transform";
- stringsErr[ERR_NUCLEAR_BAD] = "Transforms only uranium";
- stringsErr[ERR_FACTORY_NULL] = "No titanium";
- stringsErr[ERR_FACTORY_NEAR] = "Object too close";
- stringsErr[ERR_RESET_NEAR] = "Place occupied";
- stringsErr[ERR_INFO_NULL] = "No information exchange post within range";
- stringsErr[ERR_VEH_VIRUS] = "Program infected by a virus";
- stringsErr[ERR_BAT_VIRUS] = "Infected by a virus; temporarily out of order";
- stringsErr[ERR_VEH_POWER] = "No power cell";
- stringsErr[ERR_VEH_ENERGY] = "No more energy";
- stringsErr[ERR_FLAG_FLY] = "Impossible when flying";
- stringsErr[ERR_FLAG_WATER] = "Impossible when swimming";
- stringsErr[ERR_FLAG_MOTOR] = "Impossible when moving";
- stringsErr[ERR_FLAG_BUSY] = "Impossible when carrying an object";
- stringsErr[ERR_FLAG_CREATE] = "Too many flags of this color (maximum 5)";
- stringsErr[ERR_FLAG_PROXY] = "Too close to an existing flag";
- stringsErr[ERR_FLAG_DELETE] = "No flag nearby";
- stringsErr[ERR_DESTROY_NOTFOUND]= "Not found anything to destroy";
- stringsErr[ERR_WRONG_OBJ] = "Inappropriate object";
- stringsErr[ERR_MISSION_NOTERM] = "The mission is not accomplished yet (press \\key help; for more details)";
- stringsErr[ERR_DELETEMOBILE] = "Bot destroyed";
- stringsErr[ERR_DELETEBUILDING] = "Building destroyed";
- stringsErr[ERR_TOOMANY] = "Can not create this; there are too many objects";
- stringsErr[ERR_OBLIGATORYTOKEN] = "\"%s\" missing in this exercise";
- stringsErr[ERR_PROHIBITEDTOKEN] = "Do not use in this exercise";
-
- stringsErr[INFO_BUILD] = "Building completed";
- stringsErr[INFO_CONVERT] = "Titanium available";
- stringsErr[INFO_RESEARCH] = "Research program completed";
- stringsErr[INFO_RESEARCHTANK] = "Plans for tracked robots available ";
- stringsErr[INFO_RESEARCHFLY] = "You can fly with the keys (\\key gup;) and (\\key gdown;)";
- stringsErr[INFO_RESEARCHTHUMP] = "Plans for thumper available";
- stringsErr[INFO_RESEARCHCANON] = "Plans for shooter available";
- stringsErr[INFO_RESEARCHTOWER] = "Plans for defense tower available";
- stringsErr[INFO_RESEARCHPHAZER] = "Plans for phazer shooter available";
- stringsErr[INFO_RESEARCHSHIELD] = "Plans for shielder available";
- stringsErr[INFO_RESEARCHATOMIC] = "Plans for nuclear power plant available";
- stringsErr[INFO_FACTORY] = "New bot available";
- stringsErr[INFO_LABO] = "Analysis performed";
- stringsErr[INFO_ENERGY] = "Power cell available";
- stringsErr[INFO_NUCLEAR] = "Nuclear power cell available";
- stringsErr[INFO_FINDING] = "You found a usable object";
- stringsErr[INFO_MARKPOWER] = "Found a site for power station";
- stringsErr[INFO_MARKURANIUM] = "Found a site for a derrick";
- stringsErr[INFO_MARKSTONE] = "Found a site for a derrick";
- stringsErr[INFO_MARKKEYa] = "Found a site for a derrick";
- stringsErr[INFO_MARKKEYb] = "Found a site for a derrick";
- stringsErr[INFO_MARKKEYc] = "Found a site for a derrick";
- stringsErr[INFO_MARKKEYd] = "Found a site for a derrick";
- stringsErr[INFO_WIN] = "<<< Well done; mission accomplished >>>";
- stringsErr[INFO_LOST] = "<<< Sorry; mission failed >>>";
- stringsErr[INFO_LOSTq] = "<<< Sorry; mission failed >>>";
- stringsErr[INFO_WRITEOK] = "Current mission saved";
- stringsErr[INFO_DELETEPATH] = "Checkpoint crossed";
- stringsErr[INFO_DELETEMOTHER] = "Alien Queen killed";
- stringsErr[INFO_DELETEANT] = "Ant fatally wounded";
- stringsErr[INFO_DELETEBEE] = "Wasp fatally wounded";
- stringsErr[INFO_DELETEWORM] = "Worm fatally wounded";
- stringsErr[INFO_DELETESPIDER] = "Spider fatally wounded";
- stringsErr[INFO_BEGINSATCOM] = "Press \\key help; to read instructions on your SatCom";
-
-
-
- stringsCbot[TX_OPENPAR] = "Opening bracket missing";
- stringsCbot[TX_CLOSEPAR] = "Closing bracket missing ";
- stringsCbot[TX_NOTBOOL] = "The expression must return a boolean value";
- stringsCbot[TX_UNDEFVAR] = "Variable not declared";
- stringsCbot[TX_BADLEFT] = "Assignment impossible";
- stringsCbot[TX_ENDOF] = "Semicolon terminator missing";
- stringsCbot[TX_OUTCASE] = "Instruction \"case\" outside a block \"switch\"";
- stringsCbot[TX_NOTERM] = "Instructions after the final closing brace";
- stringsCbot[TX_CLOSEBLK] = "End of block missing";
- stringsCbot[TX_ELSEWITHOUTIF] = "Instruction \"else\" without corresponding \"if\" ";
- stringsCbot[TX_OPENBLK] = "Opening brace missing ";
- stringsCbot[TX_BADTYPE] = "Wrong type for the assignment";
- stringsCbot[TX_REDEFVAR] = "A variable can not be declared twice";
- stringsCbot[TX_BAD2TYPE] = "The types of the two operands are incompatible ";
- stringsCbot[TX_UNDEFCALL] = "Unknown function";
- stringsCbot[TX_MISDOTS] = "Sign \" : \" missing";
- stringsCbot[TX_WHILE] = "Keyword \"while\" missing";
- stringsCbot[TX_BREAK] = "Instruction \"break\" outside a loop";
- stringsCbot[TX_LABEL] = "A label must be followed by \"for\"; \"while\"; \"do\" or \"switch\"";
- stringsCbot[TX_NOLABEL] = "This label does not exist";
- stringsCbot[TX_NOCASE] = "Instruction \"case\" missing";
- stringsCbot[TX_BADNUM] = "Number missing";
- stringsCbot[TX_VOID] = "Void parameter";
- stringsCbot[TX_NOTYP] = "Type declaration missing";
- stringsCbot[TX_NOVAR] = "Variable name missing";
- stringsCbot[TX_NOFONC] = "Function name missing";
- stringsCbot[TX_OVERPARAM] = "Too many parameters";
- stringsCbot[TX_REDEF] = "Function already exists";
- stringsCbot[TX_LOWPARAM] = "Parameters missing ";
- stringsCbot[TX_BADPARAM] = "No function with this name accepts this kind of parameter";
- stringsCbot[TX_NUMPARAM] = "No function with this name accepts this number of parameters";
- stringsCbot[TX_NOITEM] = "This is not a member of this class";
- stringsCbot[TX_DOT] = "This object is not a member of a class";
- stringsCbot[TX_NOCONST] = "Appropriate constructor missing";
- stringsCbot[TX_REDEFCLASS] = "This class already exists";
- stringsCbot[TX_CLBRK] = "\" ] \" missing";
- stringsCbot[TX_RESERVED] = "Reserved keyword of CBOT language";
- stringsCbot[TX_BADNEW] = "Bad argument for \"new\"";
- stringsCbot[TX_OPBRK] = "\" [ \" expected";
- stringsCbot[TX_BADSTRING] = "String missing";
- stringsCbot[TX_BADINDEX] = "Incorrect index type";
- stringsCbot[TX_PRIVATE] = "Private element";
- stringsCbot[TX_NOPUBLIC] = "Public required";
- stringsCbot[TX_DIVZERO] = "Dividing by zero";
- stringsCbot[TX_NOTINIT] = "Variable not initialized";
- stringsCbot[TX_BADTHROW] = "Negative value rejected by \"throw\"";
- stringsCbot[TX_NORETVAL] = "The function returned no value ";
- stringsCbot[TX_NORUN] = "No function running";
- stringsCbot[TX_NOCALL] = "Calling an unknown function";
- stringsCbot[TX_NOCLASS] = "This class does not exist";
- stringsCbot[TX_NULLPT] = "Unknown Object";
- stringsCbot[TX_OPNAN] = "Operation impossible with value \"nan\"";
- stringsCbot[TX_OUTARRAY] = "Access beyond array limit";
- stringsCbot[TX_STACKOVER] = "Stack overflow";
- stringsCbot[TX_DELETEDPT] = "Illegal object";
- stringsCbot[TX_FILEOPEN] = "Can't open file";
- stringsCbot[TX_NOTOPEN] = "File not open";
- stringsCbot[TX_ERRREAD] = "Read error";
- stringsCbot[TX_ERRWRITE] = "Write error";
+ stringsText[RT_DISINFO_TITLE] = TR("SatCom");
+ stringsText[RT_WINDOW_MAXIMIZED] = TR("Maximize");
+ stringsText[RT_WINDOW_MINIMIZED] = TR("Minimize");
+ stringsText[RT_WINDOW_STANDARD] = TR("Normal size");
+ stringsText[RT_WINDOW_CLOSE] = TR("Close");
+
+ stringsText[RT_STUDIO_TITLE] = TR("Program editor");
+ stringsText[RT_SCRIPT_NEW] = TR("New");
+ stringsText[RT_NAME_DEFAULT] = TR("Player");
+ stringsText[RT_IO_NEW] = TR("New ...");
+ stringsText[RT_KEY_OR] = TR(" or ");
+
+ stringsText[RT_TITLE_BASE] = TR("COLOBOT");
+ stringsText[RT_TITLE_INIT] = TR("COLOBOT: Gold Edition");
+ stringsText[RT_TITLE_TRAINER] = TR("Programming exercises");
+ stringsText[RT_TITLE_DEFI] = TR("Challenges");
+ stringsText[RT_TITLE_MISSION] = TR("Missions");
+ stringsText[RT_TITLE_FREE] = TR("Free game");
+ stringsText[RT_TITLE_USER] = TR("User levels");
+ stringsText[RT_TITLE_SETUP] = TR("Options");
+ stringsText[RT_TITLE_NAME] = TR("Player's name");
+ stringsText[RT_TITLE_PERSO] = TR("Customize your appearance");
+ stringsText[RT_TITLE_WRITE] = TR("Save the current mission");
+ stringsText[RT_TITLE_READ] = TR("Load a saved mission");
+
+ stringsText[RT_PLAY_CHAPt] = TR(" Chapters:");
+ stringsText[RT_PLAY_CHAPd] = TR(" Chapters:");
+ stringsText[RT_PLAY_CHAPm] = TR(" Planets:");
+ stringsText[RT_PLAY_CHAPf] = TR(" Planets:");
+ stringsText[RT_PLAY_CHAPu] = TR(" User levels:");
+ stringsText[RT_PLAY_CHAPte] = TR(" Chapters:");
+ stringsText[RT_PLAY_LISTt] = TR(" Exercises in the chapter:");
+ stringsText[RT_PLAY_LISTd] = TR(" Challenges in the chapter:");
+ stringsText[RT_PLAY_LISTm] = TR(" Missions on this planet:");
+ stringsText[RT_PLAY_LISTf] = TR(" Free game on this planet:");
+ stringsText[RT_PLAY_LISTu] = TR(" Missions on this level:");
+ stringsText[RT_PLAY_RESUME] = TR(" Summary:");
+
+ stringsText[RT_SETUP_DEVICE] = TR(" Drivers:");
+ stringsText[RT_SETUP_MODE] = TR(" Resolution:");
+ stringsText[RT_SETUP_KEY1] = TR("1) First click on the key you want to redefine.");
+ stringsText[RT_SETUP_KEY2] = TR("2) Then press the key you want to use instead.");
+
+ stringsText[RT_PERSO_FACE] = TR("Face type:");
+ stringsText[RT_PERSO_GLASSES] = TR("Eyeglasses:");
+ stringsText[RT_PERSO_HAIR] = TR("Hair color:");
+ stringsText[RT_PERSO_COMBI] = TR("Suit color:");
+ stringsText[RT_PERSO_BAND] = TR("Strip color:");
+
+ stringsText[RT_DIALOG_QUIT] = TR("Do you want to quit COLOBOT ?");
+ stringsText[RT_DIALOG_TITLE] = TR("COLOBOT");
+ stringsText[RT_DIALOG_YESQUIT] = TR("Quit\\Quit COLOBOT");
+ stringsText[RT_DIALOG_ABORT] = TR("Quit the mission?");
+ stringsText[RT_DIALOG_YES] = TR("Abort\\Abort the current mission");
+ stringsText[RT_DIALOG_NO] = TR("Continue\\Continue the current mission");
+ stringsText[RT_DIALOG_NOQUIT] = TR("Continue\\Continue the game");
+ stringsText[RT_DIALOG_DELOBJ] = TR("Do you really want to destroy the selected building?");
+ stringsText[RT_DIALOG_DELGAME] = TR("Do you want to delete %s's saved games? ");
+ stringsText[RT_DIALOG_YESDEL] = TR("Delete");
+ stringsText[RT_DIALOG_NODEL] = TR("Cancel");
+ stringsText[RT_DIALOG_LOADING] = TR("LOADING");
+
+ stringsText[RT_STUDIO_LISTTT] = TR("Keyword help(\\key cbot;)");
+ stringsText[RT_STUDIO_COMPOK] = TR("Compilation ok (0 errors)");
+ stringsText[RT_STUDIO_PROGSTOP] = TR("Program finished");
+
+ stringsText[RT_SATCOM_LIST] = TR("\\b;List of objects\n");
+ stringsText[RT_SATCOM_BOT] = TR("\\b;Robots\n");
+ stringsText[RT_SATCOM_BUILDING] = TR("\\b;Buildings\n");
+ stringsText[RT_SATCOM_FRET] = TR("\\b;Moveable objects\n");
+ stringsText[RT_SATCOM_ALIEN] = TR("\\b;Aliens\n");
+ stringsText[RT_SATCOM_NULL] = TR("\\c; (none)\\n;\n");
+ stringsText[RT_SATCOM_ERROR1] = TR("\\b;Error\n");
+ stringsText[RT_SATCOM_ERROR2] = TR("The list is only available if a \\l;radar station\\u object\\radar; is working.\n");
+
+ stringsText[RT_IO_OPEN] = TR("Open");
+ stringsText[RT_IO_SAVE] = TR("Save");
+ stringsText[RT_IO_LIST] = TR("Folder: %s");
+ stringsText[RT_IO_NAME] = TR("Name:");
+ stringsText[RT_IO_DIR] = TR("Folder:");
+ stringsText[RT_IO_PRIVATE] = TR("Private\\Private folder");
+ stringsText[RT_IO_PUBLIC] = TR("Public\\Common folder");
+
+ stringsText[RT_GENERIC_DEV1] = TR("Developed by :");
+ stringsText[RT_GENERIC_DEV2] = TR("www.epsitec.com");
+ stringsText[RT_GENERIC_EDIT1] = TR(" ");
+ stringsText[RT_GENERIC_EDIT2] = TR(" ");
+
+ stringsText[RT_INTERFACE_REC] = TR("Recorder");
+
+
+
+ stringsEvent[EVENT_BUTTON_OK] = TR("OK");
+ stringsEvent[EVENT_BUTTON_CANCEL] = TR("Cancel");
+ stringsEvent[EVENT_BUTTON_NEXT] = TR("Next");
+ stringsEvent[EVENT_BUTTON_PREV] = TR("Previous");
+
+ stringsEvent[EVENT_DIALOG_OK] = TR("OK");
+ stringsEvent[EVENT_DIALOG_CANCEL] = TR("Cancel");
+
+ stringsEvent[EVENT_INTERFACE_TRAINER] = TR("Exercises\\Programming exercises");
+ stringsEvent[EVENT_INTERFACE_DEFI] = TR("Challenges\\Programming challenges");
+ stringsEvent[EVENT_INTERFACE_MISSION] = TR("Missions\\Select mission");
+ stringsEvent[EVENT_INTERFACE_FREE] = TR("Free game\\Free game without a specific goal");
+ stringsEvent[EVENT_INTERFACE_USER] = TR("User\\User levels");
+ stringsEvent[EVENT_INTERFACE_NAME] = TR("Change player\\Change player");
+ stringsEvent[EVENT_INTERFACE_SETUP] = TR("Options\\Preferences");
+ stringsEvent[EVENT_INTERFACE_AGAIN] = TR("Restart\\Restart the mission from the beginning");
+ stringsEvent[EVENT_INTERFACE_WRITE] = TR("Save\\Save the current mission ");
+ stringsEvent[EVENT_INTERFACE_READ] = TR("Load\\Load a saved mission");
+ stringsEvent[EVENT_INTERFACE_ABORT] = TR("\\Return to COLOBOT");
+ stringsEvent[EVENT_INTERFACE_QUIT] = TR("Quit\\Quit COLOBOT");
+ stringsEvent[EVENT_INTERFACE_BACK] = TR("<< Back \\Back to the previous screen");
+ stringsEvent[EVENT_INTERFACE_PLAY] = TR("Play\\Start mission!");
+ stringsEvent[EVENT_INTERFACE_SETUPd] = TR("Device\\Driver and resolution settings");
+ stringsEvent[EVENT_INTERFACE_SETUPg] = TR("Graphics\\Graphics settings");
+ stringsEvent[EVENT_INTERFACE_SETUPp] = TR("Game\\Game settings");
+ stringsEvent[EVENT_INTERFACE_SETUPc] = TR("Controls\\Keyboard, joystick and mouse settings");
+ stringsEvent[EVENT_INTERFACE_SETUPs] = TR("Sound\\Music and game sound volume");
+ stringsEvent[EVENT_INTERFACE_DEVICE] = TR("Unit");
+ stringsEvent[EVENT_INTERFACE_RESOL] = TR("Resolution");
+ stringsEvent[EVENT_INTERFACE_FULL] = TR("Full screen\\Full screen or window mode");
+ stringsEvent[EVENT_INTERFACE_APPLY] = TR("Apply changes\\Activates the changed settings");
+
+ stringsEvent[EVENT_INTERFACE_TOTO] = TR("Robbie\\Your assistant");
+ stringsEvent[EVENT_INTERFACE_SHADOW] = TR("Shadows\\Shadows on the ground");
+ stringsEvent[EVENT_INTERFACE_GROUND] = TR("Marks on the ground\\Marks on the ground");
+ stringsEvent[EVENT_INTERFACE_DIRTY] = TR("Dust\\Dust and dirt on bots and buildings");
+ stringsEvent[EVENT_INTERFACE_FOG] = TR("Fog\\Fog");
+ stringsEvent[EVENT_INTERFACE_LENS] = TR("Sunbeams\\Sunbeams in the sky");
+ stringsEvent[EVENT_INTERFACE_SKY] = TR("Sky\\Clouds and nebulae");
+ stringsEvent[EVENT_INTERFACE_PLANET] = TR("Planets and stars\\Astronomical objects in the sky");
+ stringsEvent[EVENT_INTERFACE_LIGHT] = TR("Dynamic lighting\\Mobile light sources");
+ stringsEvent[EVENT_INTERFACE_PARTI] = TR("Number of particles\\Explosions, dust, reflections, etc.");
+ stringsEvent[EVENT_INTERFACE_CLIP] = TR("Depth of field\\Maximum visibility");
+ stringsEvent[EVENT_INTERFACE_DETAIL] = TR("Details\\Visual quality of 3D objects");
+ stringsEvent[EVENT_INTERFACE_TEXTURE] = TR("Textures\\Quality of textures ");
+ stringsEvent[EVENT_INTERFACE_GADGET] = TR("Num of decorative objects\\Number of purely ornamental objects");
+ stringsEvent[EVENT_INTERFACE_RAIN] = TR("Particles in the interface\\Steam clouds and sparks in the interface");
+ stringsEvent[EVENT_INTERFACE_GLINT] = TR("Reflections on the buttons \\Shiny buttons");
+ stringsEvent[EVENT_INTERFACE_TOOLTIP] = TR("Help balloons\\Explain the function of the buttons");
+ stringsEvent[EVENT_INTERFACE_MOVIES] = TR("Film sequences\\Films before and after the missions");
+ stringsEvent[EVENT_INTERFACE_NICERST] = TR("Exit film\\Film at the exit of exercises");
+ stringsEvent[EVENT_INTERFACE_HIMSELF] = TR("Friendly fire\\Your shooting can damage your own objects ");
+ stringsEvent[EVENT_INTERFACE_SCROLL] = TR("Scrolling\\Scrolling when the mouse touches right or left border");
+ stringsEvent[EVENT_INTERFACE_INVERTX] = TR("Mouse inversion X\\Inversion of the scrolling direction on the X axis");
+ stringsEvent[EVENT_INTERFACE_INVERTY] = TR("Mouse inversion Y\\Inversion of the scrolling direction on the Y axis");
+ stringsEvent[EVENT_INTERFACE_EFFECT] = TR("Quake at explosions\\The screen shakes at explosions");
+ stringsEvent[EVENT_INTERFACE_MOUSE] = TR("Mouse shadow\\Gives the mouse a shadow");
+ stringsEvent[EVENT_INTERFACE_EDITMODE] = TR("Automatic indent\\When program editing");
+ stringsEvent[EVENT_INTERFACE_EDITVALUE] = TR("Big indent\\Indent 2 or 4 spaces per level defined by braces");
+ stringsEvent[EVENT_INTERFACE_SOLUCE4] = TR("Access to solutions\\Show program \"4: Solution\" in the exercises");
+ stringsEvent[EVENT_INTERFACE_BLOOD] = TR("Blood\\Display blood when the astronaut or the alien queen is hit");
+
+ stringsEvent[EVENT_INTERFACE_KDEF] = TR("Standard controls\\Standard key functions");
+ stringsEvent[EVENT_INTERFACE_KLEFT] = TR("Turn left\\turns the bot to the left");
+ stringsEvent[EVENT_INTERFACE_KRIGHT] = TR("Turn right\\turns the bot to the right");
+ stringsEvent[EVENT_INTERFACE_KUP] = TR("Forward\\Moves forward");
+ stringsEvent[EVENT_INTERFACE_KDOWN] = TR("Backward\\Moves backward");
+ stringsEvent[EVENT_INTERFACE_KGUP] = TR("Climb\\Increases the power of the jet");
+ stringsEvent[EVENT_INTERFACE_KGDOWN] = TR("Descend\\Reduces the power of the jet");
+ stringsEvent[EVENT_INTERFACE_KCAMERA] = TR("Change camera\\Switches between onboard camera and following camera");
+ stringsEvent[EVENT_INTERFACE_KDESEL] = TR("Previous object\\Selects the previous object");
+ stringsEvent[EVENT_INTERFACE_KACTION] = TR("Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)");
+ stringsEvent[EVENT_INTERFACE_KNEAR] = TR("Camera closer\\Moves the camera forward");
+ stringsEvent[EVENT_INTERFACE_KAWAY] = TR("Camera back\\Moves the camera backward");
+ stringsEvent[EVENT_INTERFACE_KNEXT] = TR("Next object\\Selects the next object");
+ stringsEvent[EVENT_INTERFACE_KHUMAN] = TR("Select the astronaut\\Selects the astronaut");
+ stringsEvent[EVENT_INTERFACE_KQUIT] = TR("Quit\\Quit the current mission or exercise");
+ stringsEvent[EVENT_INTERFACE_KHELP] = TR("Instructions\\Shows the instructions for the current mission");
+ stringsEvent[EVENT_INTERFACE_KPROG] = TR("Programming help\\Gives more detailed help with programming");
+ stringsEvent[EVENT_INTERFACE_KCBOT] = TR("Key word help\\More detailed help about key words");
+ stringsEvent[EVENT_INTERFACE_KVISIT] = TR("Origin of last message\\Shows where the last message was sent from");
+ stringsEvent[EVENT_INTERFACE_KSPEED10] = TR("Speed 1.0x\\Normal speed");
+ stringsEvent[EVENT_INTERFACE_KSPEED15] = TR("Speed 1.5x\\1.5 times faster");
+ stringsEvent[EVENT_INTERFACE_KSPEED20] = TR("Speed 2.0x\\Double speed");
+ stringsEvent[EVENT_INTERFACE_KSPEED30] = TR("Speed 3.0x\\Three times faster");
+
+ stringsEvent[EVENT_INTERFACE_VOLSOUND] = TR("Sound effects:\\Volume of engines, voice, shooting, etc.");
+ stringsEvent[EVENT_INTERFACE_VOLMUSIC] = TR("Background sound :\\Volume of audio tracks on the CD");
+ stringsEvent[EVENT_INTERFACE_SOUND3D] = TR("3D sound\\3D positioning of the sound");
+
+ stringsEvent[EVENT_INTERFACE_MIN] = TR("Lowest\\Minimum graphic quality (highest frame rate)");
+ stringsEvent[EVENT_INTERFACE_NORM] = TR("Normal\\Normal graphic quality");
+ stringsEvent[EVENT_INTERFACE_MAX] = TR("Highest\\Highest graphic quality (lowest frame rate)");
+
+ stringsEvent[EVENT_INTERFACE_SILENT] = TR("Mute\\No sound");
+ stringsEvent[EVENT_INTERFACE_NOISY] = TR("Normal\\Normal sound volume");
+
+ stringsEvent[EVENT_INTERFACE_JOYSTICK] = TR("Use a joystick\\Joystick or keyboard");
+ stringsEvent[EVENT_INTERFACE_SOLUCE] = TR("Access to solution\\Shows the solution (detailed instructions for missions)");
+
+ stringsEvent[EVENT_INTERFACE_NEDIT] = TR("\\New player name");
+ stringsEvent[EVENT_INTERFACE_NOK] = TR("OK\\Choose the selected player");
+ stringsEvent[EVENT_INTERFACE_NCANCEL] = TR("Cancel\\Keep current player name");
+ stringsEvent[EVENT_INTERFACE_NDELETE] = TR("Delete player\\Deletes the player from the list");
+ stringsEvent[EVENT_INTERFACE_NLABEL] = TR("Player name");
+
+ stringsEvent[EVENT_INTERFACE_IOWRITE] = TR("Save\\Saves the current mission");
+ stringsEvent[EVENT_INTERFACE_IOREAD] = TR("Load\\Loads the selected mission");
+ stringsEvent[EVENT_INTERFACE_IOLIST] = TR("List of saved missions");
+ stringsEvent[EVENT_INTERFACE_IOLABEL] = TR("Filename:");
+ stringsEvent[EVENT_INTERFACE_IONAME] = TR("Mission name");
+ stringsEvent[EVENT_INTERFACE_IOIMAGE] = TR("Photography");
+ stringsEvent[EVENT_INTERFACE_IODELETE] = TR("Delete\\Deletes the selected file");
+
+ stringsEvent[EVENT_INTERFACE_PERSO] = TR("Appearance\\Choose your appearance");
+ stringsEvent[EVENT_INTERFACE_POK] = TR("OK");
+ stringsEvent[EVENT_INTERFACE_PCANCEL] = TR("Cancel");
+ stringsEvent[EVENT_INTERFACE_PDEF] = TR("Standard\\Standard appearance settings");
+ stringsEvent[EVENT_INTERFACE_PHEAD] = TR("Head\\Face and hair");
+ stringsEvent[EVENT_INTERFACE_PBODY] = TR("Suit\\Astronaut suit");
+ stringsEvent[EVENT_INTERFACE_PLROT] = TR("\\Turn left");
+ stringsEvent[EVENT_INTERFACE_PRROT] = TR("\\Turn right");
+ stringsEvent[EVENT_INTERFACE_PCRa] = TR("Red");
+ stringsEvent[EVENT_INTERFACE_PCGa] = TR("Green");
+ stringsEvent[EVENT_INTERFACE_PCBa] = TR("Blue");
+ stringsEvent[EVENT_INTERFACE_PCRb] = TR("Red");
+ 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_PFACE3] = TR("\\Face 3");
+ stringsEvent[EVENT_INTERFACE_PFACE4] = TR("\\Face 2");
+ stringsEvent[EVENT_INTERFACE_PGLASS0] = TR("\\No eyeglasses");
+ stringsEvent[EVENT_INTERFACE_PGLASS1] = TR("\\Eyeglasses 1");
+ stringsEvent[EVENT_INTERFACE_PGLASS2] = TR("\\Eyeglasses 2");
+ stringsEvent[EVENT_INTERFACE_PGLASS3] = TR("\\Eyeglasses 3");
+ stringsEvent[EVENT_INTERFACE_PGLASS4] = TR("\\Eyeglasses 4");
+ stringsEvent[EVENT_INTERFACE_PGLASS5] = TR("\\Eyeglasses 5");
+
+ stringsEvent[EVENT_OBJECT_DESELECT] = TR("Previous selection (\\key desel;)");
+ stringsEvent[EVENT_OBJECT_LEFT] = TR("Turn left (\\key left;)");
+ stringsEvent[EVENT_OBJECT_RIGHT] = TR("Turn right (\\key right;)");
+ stringsEvent[EVENT_OBJECT_UP] = TR("Forward (\\key up;)");
+ stringsEvent[EVENT_OBJECT_DOWN] = TR("Backward (\\key down;)");
+ stringsEvent[EVENT_OBJECT_GASUP] = TR("Up (\\key gup;)");
+ stringsEvent[EVENT_OBJECT_GASDOWN] = TR("Down (\\key gdown;)");
+ stringsEvent[EVENT_OBJECT_HTAKE] = TR("Grab or drop (\\key action;)");
+ stringsEvent[EVENT_OBJECT_MTAKE] = TR("Grab or drop (\\key action;)");
+ stringsEvent[EVENT_OBJECT_MFRONT] = TR("..in front");
+ stringsEvent[EVENT_OBJECT_MBACK] = TR("..behind");
+ stringsEvent[EVENT_OBJECT_MPOWER] = TR("..power cell");
+ stringsEvent[EVENT_OBJECT_BHELP] = TR("Instructions for the mission (\\key help;)");
+ stringsEvent[EVENT_OBJECT_BTAKEOFF] = TR("Take off to finish the mission");
+ stringsEvent[EVENT_OBJECT_BDESTROY] = TR("Destroy");
+ stringsEvent[EVENT_OBJECT_BDERRICK] = TR("Build a derrick");
+ stringsEvent[EVENT_OBJECT_BSTATION] = TR("Build a power station");
+ stringsEvent[EVENT_OBJECT_BFACTORY] = TR("Build a bot factory");
+ stringsEvent[EVENT_OBJECT_BREPAIR] = TR("Build a repair center");
+ stringsEvent[EVENT_OBJECT_BCONVERT] = TR("Build a converter");
+ stringsEvent[EVENT_OBJECT_BTOWER] = TR("Build a defense tower");
+ stringsEvent[EVENT_OBJECT_BRESEARCH] = TR("Build a research center");
+ stringsEvent[EVENT_OBJECT_BRADAR] = TR("Build a radar station");
+ stringsEvent[EVENT_OBJECT_BENERGY] = TR("Build a power cell factory");
+ stringsEvent[EVENT_OBJECT_BLABO] = TR("Build an autolab");
+ stringsEvent[EVENT_OBJECT_BNUCLEAR] = TR("Build a nuclear power plant");
+ stringsEvent[EVENT_OBJECT_BPARA] = TR("Build a lightning conductor");
+ stringsEvent[EVENT_OBJECT_BINFO] = TR("Build a exchange post");
+ stringsEvent[EVENT_OBJECT_BDESTROYER] = TR("Build a destroyer");
+ stringsEvent[EVENT_OBJECT_GFLAT] = TR("Show if the ground is flat");
+ stringsEvent[EVENT_OBJECT_FCREATE] = TR("Plant a flag");
+ stringsEvent[EVENT_OBJECT_FDELETE] = TR("Remove a flag");
+ stringsEvent[EVENT_OBJECT_FCOLORb] = TR("\\Blue flags");
+ stringsEvent[EVENT_OBJECT_FCOLORr] = TR("\\Red flags");
+ stringsEvent[EVENT_OBJECT_FCOLORg] = TR("\\Green flags");
+ stringsEvent[EVENT_OBJECT_FCOLORy] = TR("\\Yellow flags");
+ stringsEvent[EVENT_OBJECT_FCOLORv] = TR("\\Violet flags");
+ stringsEvent[EVENT_OBJECT_FACTORYfa] = TR("Build a winged grabber");
+ stringsEvent[EVENT_OBJECT_FACTORYta] = TR("Build a tracked grabber");
+ stringsEvent[EVENT_OBJECT_FACTORYwa] = TR("Build a wheeled grabber");
+ stringsEvent[EVENT_OBJECT_FACTORYia] = TR("Build a legged grabber");
+ stringsEvent[EVENT_OBJECT_FACTORYfc] = TR("Build a winged shooter");
+ stringsEvent[EVENT_OBJECT_FACTORYtc] = TR("Build a tracked shooter");
+ stringsEvent[EVENT_OBJECT_FACTORYwc] = TR("Build a wheeled shooter");
+ stringsEvent[EVENT_OBJECT_FACTORYic] = TR("Build a legged shooter");
+ stringsEvent[EVENT_OBJECT_FACTORYfi] = TR("Build a winged orga shooter");
+ stringsEvent[EVENT_OBJECT_FACTORYti] = TR("Build a tracked orga shooter");
+ stringsEvent[EVENT_OBJECT_FACTORYwi] = TR("Build a wheeled orga shooter");
+ stringsEvent[EVENT_OBJECT_FACTORYii] = TR("Build a legged orga shooter");
+ stringsEvent[EVENT_OBJECT_FACTORYfs] = TR("Build a winged sniffer");
+ stringsEvent[EVENT_OBJECT_FACTORYts] = TR("Build a tracked sniffer");
+ stringsEvent[EVENT_OBJECT_FACTORYws] = TR("Build a wheeled sniffer");
+ stringsEvent[EVENT_OBJECT_FACTORYis] = TR("Build a legged sniffer");
+ stringsEvent[EVENT_OBJECT_FACTORYrt] = TR("Build a thumper");
+ stringsEvent[EVENT_OBJECT_FACTORYrc] = TR("Build a phazer shooter");
+ stringsEvent[EVENT_OBJECT_FACTORYrr] = TR("Build a recycler");
+ stringsEvent[EVENT_OBJECT_FACTORYrs] = TR("Build a shielder");
+ stringsEvent[EVENT_OBJECT_FACTORYsa] = TR("Build a subber");
+ stringsEvent[EVENT_OBJECT_RTANK] = TR("Run research program for tracked bots");
+ stringsEvent[EVENT_OBJECT_RFLY] = TR("Run research program for winged bots");
+ stringsEvent[EVENT_OBJECT_RTHUMP] = TR("Run research program for thumper");
+ stringsEvent[EVENT_OBJECT_RCANON] = TR("Run research program for shooter");
+ stringsEvent[EVENT_OBJECT_RTOWER] = TR("Run research program for defense tower");
+ stringsEvent[EVENT_OBJECT_RPHAZER] = TR("Run research program for phazer shooter");
+ stringsEvent[EVENT_OBJECT_RSHIELD] = TR("Run research program for shielder");
+ stringsEvent[EVENT_OBJECT_RATOMIC] = TR("Run research program for nuclear power");
+ stringsEvent[EVENT_OBJECT_RiPAW] = TR("Run research program for legged bots");
+ stringsEvent[EVENT_OBJECT_RiGUN] = TR("Run research program for orga shooter");
+ stringsEvent[EVENT_OBJECT_RESET] = TR("Return to start");
+ stringsEvent[EVENT_OBJECT_SEARCH] = TR("Sniff (\\key action;)");
+ stringsEvent[EVENT_OBJECT_TERRAFORM] = TR("Thump (\\key action;)");
+ stringsEvent[EVENT_OBJECT_FIRE] = TR("Shoot (\\key action;)");
+ stringsEvent[EVENT_OBJECT_SPIDEREXPLO] = TR("Explode (\\key action;)");
+ stringsEvent[EVENT_OBJECT_RECOVER] = TR("Recycle (\\key action;)");
+ stringsEvent[EVENT_OBJECT_BEGSHIELD] = TR("Extend shield (\\key action;)");
+ stringsEvent[EVENT_OBJECT_ENDSHIELD] = TR("Withdraw shield (\\key action;)");
+ stringsEvent[EVENT_OBJECT_DIMSHIELD] = TR("Shield radius");
+ stringsEvent[EVENT_OBJECT_PROGRUN] = TR("Execute the selected program");
+ stringsEvent[EVENT_OBJECT_PROGEDIT] = TR("Edit the selected program");
+ stringsEvent[EVENT_OBJECT_INFOOK] = TR("\\SatCom on standby");
+ stringsEvent[EVENT_OBJECT_DELETE] = TR("Destroy the building");
+ stringsEvent[EVENT_OBJECT_GENERGY] = TR("Energy level");
+ stringsEvent[EVENT_OBJECT_GSHIELD] = TR("Shield level");
+ stringsEvent[EVENT_OBJECT_GRANGE] = TR("Jet temperature");
+ stringsEvent[EVENT_OBJECT_GPROGRESS] = TR("Still working ...");
+ stringsEvent[EVENT_OBJECT_GRADAR] = TR("Number of insects detected");
+ stringsEvent[EVENT_OBJECT_GINFO] = TR("Transmitted information");
+ stringsEvent[EVENT_OBJECT_COMPASS] = TR("Compass");
+ stringsEvent[EVENT_OBJECT_MAPZOOM] = TR("Zoom mini-map");
+ stringsEvent[EVENT_OBJECT_CAMERA] = TR("Camera (\\key camera;)");
+ stringsEvent[EVENT_OBJECT_CAMERAleft] = TR("Camera to left");
+ stringsEvent[EVENT_OBJECT_CAMERAright] = TR("Camera to right");
+ stringsEvent[EVENT_OBJECT_CAMERAnear] = TR("Camera nearest");
+ stringsEvent[EVENT_OBJECT_CAMERAaway] = TR("Camera awayest");
+ stringsEvent[EVENT_OBJECT_HELP] = TR("Help about selected object");
+ stringsEvent[EVENT_OBJECT_SOLUCE] = TR("Show the solution");
+ stringsEvent[EVENT_OBJECT_SHORTCUT00] = TR("Switch bots <-> buildings");
+ stringsEvent[EVENT_OBJECT_LIMIT] = TR("Show the range");
+ stringsEvent[EVENT_OBJECT_PEN0] = TR("\\Raise the pencil");
+ stringsEvent[EVENT_OBJECT_PEN1] = TR("\\Use the black pencil");
+ stringsEvent[EVENT_OBJECT_PEN2] = TR("\\Use the yellow pencil");
+ stringsEvent[EVENT_OBJECT_PEN3] = TR("\\Use the orange pencil");
+ stringsEvent[EVENT_OBJECT_PEN4] = TR("\\Use the red pencil");
+ stringsEvent[EVENT_OBJECT_PEN5] = TR("\\Use the purple pencil");
+ stringsEvent[EVENT_OBJECT_PEN6] = TR("\\Use the blue pencil");
+ stringsEvent[EVENT_OBJECT_PEN7] = TR("\\Use the green pencil");
+ stringsEvent[EVENT_OBJECT_PEN8] = TR("\\Use the brown pencil");
+ stringsEvent[EVENT_OBJECT_REC] = TR("\\Start recording");
+ stringsEvent[EVENT_OBJECT_STOP] = TR("\\Stop recording");
+ stringsEvent[EVENT_DT_VISIT0] = TR("Show the place");
+ stringsEvent[EVENT_DT_VISIT1] = TR("Show the place");
+ stringsEvent[EVENT_DT_VISIT2] = TR("Show the place");
+ stringsEvent[EVENT_DT_VISIT3] = TR("Show the place");
+ stringsEvent[EVENT_DT_VISIT4] = TR("Show the place");
+ stringsEvent[EVENT_DT_END] = TR("Continue");
+ stringsEvent[EVENT_CMD] = TR("Command line");
+ stringsEvent[EVENT_SPEED] = TR("Game speed");
+
+ stringsEvent[EVENT_HYPER_PREV] = TR("Back");
+ stringsEvent[EVENT_HYPER_NEXT] = TR("Forward");
+ stringsEvent[EVENT_HYPER_HOME] = TR("Home");
+ stringsEvent[EVENT_HYPER_COPY] = TR("Copy");
+ stringsEvent[EVENT_HYPER_SIZE1] = TR("Size 1");
+ stringsEvent[EVENT_HYPER_SIZE2] = TR("Size 2");
+ stringsEvent[EVENT_HYPER_SIZE3] = TR("Size 3");
+ stringsEvent[EVENT_HYPER_SIZE4] = TR("Size 4");
+ stringsEvent[EVENT_HYPER_SIZE5] = TR("Size 5");
+ stringsEvent[EVENT_SATCOM_HUSTON] = TR("Instructions from Houston");
+ stringsEvent[EVENT_SATCOM_SAT] = TR("Satellite report");
+ stringsEvent[EVENT_SATCOM_LOADING] = TR("Programs dispatched by Houston");
+ stringsEvent[EVENT_SATCOM_OBJECT] = TR("List of objects");
+ stringsEvent[EVENT_SATCOM_PROG] = TR("Programming help");
+ stringsEvent[EVENT_SATCOM_SOLUCE] = TR("Solution");
+
+ stringsEvent[EVENT_STUDIO_OK] = TR("OK\\Close program editor and return to game");
+ stringsEvent[EVENT_STUDIO_CANCEL] = TR("Cancel\\Cancel all changes");
+ stringsEvent[EVENT_STUDIO_NEW] = TR("New");
+ stringsEvent[EVENT_STUDIO_OPEN] = TR("Open (Ctrl+o)");
+ stringsEvent[EVENT_STUDIO_SAVE] = TR("Save (Ctrl+s)");
+ stringsEvent[EVENT_STUDIO_UNDO] = TR("Undo (Ctrl+z)");
+ stringsEvent[EVENT_STUDIO_CUT] = TR("Cut (Ctrl+x)");
+ stringsEvent[EVENT_STUDIO_COPY] = TR("Copy (Ctrl+c)");
+ stringsEvent[EVENT_STUDIO_PASTE] = TR("Paste (Ctrl+v)");
+ stringsEvent[EVENT_STUDIO_SIZE] = TR("Font size");
+ stringsEvent[EVENT_STUDIO_TOOL] = TR("Instructions (\\key help;)");
+ stringsEvent[EVENT_STUDIO_HELP] = TR("Programming help (\\key prog;)");
+ stringsEvent[EVENT_STUDIO_COMPILE] = TR("Compile");
+ stringsEvent[EVENT_STUDIO_RUN] = TR("Execute/stop");
+ stringsEvent[EVENT_STUDIO_REALTIME] = TR("Pause/continue");
+ stringsEvent[EVENT_STUDIO_STEP] = TR("One step");
+
+
+
+ stringsObject[OBJECT_PORTICO] = TR("Gantry crane");
+ stringsObject[OBJECT_BASE] = TR("Spaceship");
+ stringsObject[OBJECT_DERRICK] = TR("Derrick");
+ stringsObject[OBJECT_FACTORY] = TR("Bot factory");
+ stringsObject[OBJECT_REPAIR] = TR("Repair center");
+ stringsObject[OBJECT_DESTROYER] = TR("Destroyer");
+ stringsObject[OBJECT_STATION] = TR("Power station");
+ stringsObject[OBJECT_CONVERT] = TR("Converts ore to titanium");
+ stringsObject[OBJECT_TOWER] = TR("Defense tower");
+ stringsObject[OBJECT_NEST] = TR("Nest");
+ stringsObject[OBJECT_RESEARCH] = TR("Research center");
+ stringsObject[OBJECT_RADAR] = TR("Radar station");
+ stringsObject[OBJECT_INFO] = TR("Information exchange post");
+ stringsObject[OBJECT_ENERGY] = TR("Power cell factory");
+ stringsObject[OBJECT_LABO] = TR("Autolab");
+ stringsObject[OBJECT_NUCLEAR] = TR("Nuclear power station");
+ stringsObject[OBJECT_PARA] = TR("Lightning conductor");
+ stringsObject[OBJECT_SAFE] = TR("Vault");
+ stringsObject[OBJECT_HUSTON] = TR("Houston Mission Control");
+ stringsObject[OBJECT_TARGET1] = TR("Target");
+ stringsObject[OBJECT_TARGET2] = TR("Target");
+ stringsObject[OBJECT_START] = TR("Start");
+ stringsObject[OBJECT_END] = TR("Finish");
+ stringsObject[OBJECT_STONE] = TR("Titanium ore");
+ stringsObject[OBJECT_URANIUM] = TR("Uranium ore");
+ stringsObject[OBJECT_BULLET] = TR("Organic matter");
+ stringsObject[OBJECT_METAL] = TR("Titanium");
+ stringsObject[OBJECT_POWER] = TR("Power cell");
+ stringsObject[OBJECT_ATOMIC] = TR("Nuclear power cell");
+ stringsObject[OBJECT_BBOX] = TR("Black box");
+ stringsObject[OBJECT_KEYa] = TR("Key A");
+ stringsObject[OBJECT_KEYb] = TR("Key B");
+ stringsObject[OBJECT_KEYc] = TR("Key C");
+ stringsObject[OBJECT_KEYd] = TR("Key D");
+ stringsObject[OBJECT_TNT] = TR("Explosive");
+ stringsObject[OBJECT_BOMB] = TR("Fixed mine");
+ stringsObject[OBJECT_BAG] = TR("Survival kit");
+ stringsObject[OBJECT_WAYPOINT] = TR("Checkpoint");
+ stringsObject[OBJECT_FLAGb] = TR("Blue flag");
+ stringsObject[OBJECT_FLAGr] = TR("Red flag");
+ stringsObject[OBJECT_FLAGg] = TR("Green flag");
+ stringsObject[OBJECT_FLAGy] = TR("Yellow flag");
+ stringsObject[OBJECT_FLAGv] = TR("Violet flag");
+ stringsObject[OBJECT_MARKPOWER] = TR("Energy deposit (site for power station)");
+ stringsObject[OBJECT_MARKURANIUM] = TR("Uranium deposit (site for derrick)");
+ stringsObject[OBJECT_MARKKEYa] = TR("Found key A (site for derrick)");
+ stringsObject[OBJECT_MARKKEYb] = TR("Found key B (site for derrick)");
+ stringsObject[OBJECT_MARKKEYc] = TR("Found key C (site for derrick)");
+ stringsObject[OBJECT_MARKKEYd] = TR("Found key D (site for derrick)");
+ stringsObject[OBJECT_MARKSTONE] = TR("Titanium deposit (site for derrick)");
+ stringsObject[OBJECT_MOBILEft] = TR("Practice bot");
+ stringsObject[OBJECT_MOBILEtt] = TR("Practice bot");
+ stringsObject[OBJECT_MOBILEwt] = TR("Practice bot");
+ stringsObject[OBJECT_MOBILEit] = TR("Practice bot");
+ stringsObject[OBJECT_MOBILEfa] = TR("Winged grabber");
+ stringsObject[OBJECT_MOBILEta] = TR("Tracked grabber");
+ stringsObject[OBJECT_MOBILEwa] = TR("Wheeled grabber");
+ stringsObject[OBJECT_MOBILEia] = TR("Legged grabber");
+ stringsObject[OBJECT_MOBILEfc] = TR("Winged shooter");
+ stringsObject[OBJECT_MOBILEtc] = TR("Tracked shooter");
+ stringsObject[OBJECT_MOBILEwc] = TR("Wheeled shooter");
+ stringsObject[OBJECT_MOBILEic] = TR("Legged shooter");
+ stringsObject[OBJECT_MOBILEfi] = TR("Winged orga shooter");
+ stringsObject[OBJECT_MOBILEti] = TR("Tracked orga shooter");
+ stringsObject[OBJECT_MOBILEwi] = TR("Wheeled orga shooter");
+ stringsObject[OBJECT_MOBILEii] = TR("Legged orga shooter");
+ stringsObject[OBJECT_MOBILEfs] = TR("Winged sniffer");
+ stringsObject[OBJECT_MOBILEts] = TR("Tracked sniffer");
+ stringsObject[OBJECT_MOBILEws] = TR("Wheeled sniffer");
+ stringsObject[OBJECT_MOBILEis] = TR("Legged sniffer");
+ stringsObject[OBJECT_MOBILErt] = TR("Thumper");
+ stringsObject[OBJECT_MOBILErc] = TR("Phazer shooter");
+ stringsObject[OBJECT_MOBILErr] = TR("Recycler");
+ stringsObject[OBJECT_MOBILErs] = TR("Shielder");
+ stringsObject[OBJECT_MOBILEsa] = TR("Subber");
+ stringsObject[OBJECT_MOBILEtg] = TR("Target bot");
+ stringsObject[OBJECT_MOBILEdr] = TR("Drawer bot");
+ stringsObject[OBJECT_TECH] = TR("Engineer");
+ stringsObject[OBJECT_TOTO] = TR("Robbie");
+ stringsObject[OBJECT_MOTHER] = TR("Alien Queen");
+ stringsObject[OBJECT_ANT] = TR("Ant");
+ stringsObject[OBJECT_SPIDER] = TR("Spider");
+ stringsObject[OBJECT_BEE] = TR("Wasp");
+ stringsObject[OBJECT_WORM] = TR("Worm");
+ stringsObject[OBJECT_EGG] = TR("Egg");
+ stringsObject[OBJECT_RUINmobilew1] = TR("Wreckage");
+ stringsObject[OBJECT_RUINmobilew2] = TR("Wreckage");
+ stringsObject[OBJECT_RUINmobilet1] = TR("Wreckage");
+ stringsObject[OBJECT_RUINmobilet2] = TR("Wreckage");
+ stringsObject[OBJECT_RUINmobiler1] = TR("Wreckage");
+ stringsObject[OBJECT_RUINmobiler2] = TR("Wreckage");
+ stringsObject[OBJECT_RUINfactory] = TR("Ruin");
+ stringsObject[OBJECT_RUINdoor] = TR("Ruin");
+ stringsObject[OBJECT_RUINsupport] = TR("Waste");
+ stringsObject[OBJECT_RUINradar] = TR("Ruin");
+ stringsObject[OBJECT_RUINconvert] = TR("Ruin");
+ stringsObject[OBJECT_RUINbase] = TR("Spaceship ruin");
+ stringsObject[OBJECT_RUINhead] = TR("Spaceship ruin");
+ stringsObject[OBJECT_APOLLO1] = TR("Remains of Apollo mission");
+ stringsObject[OBJECT_APOLLO3] = TR("Remains of Apollo mission");
+ stringsObject[OBJECT_APOLLO4] = TR("Remains of Apollo mission");
+ stringsObject[OBJECT_APOLLO5] = TR("Remains of Apollo mission");
+ stringsObject[OBJECT_APOLLO2] = TR("Lunar Roving Vehicle");
+
+
+
+ stringsErr[ERR_GENERIC] = TR("Internal error - tell the developers");
+ stringsErr[ERR_CMD] = TR("Unknown command");
+ stringsErr[ERR_MANIP_VEH] = TR("Inappropriate bot");
+ stringsErr[ERR_MANIP_FLY] = TR("Impossible when flying");
+ stringsErr[ERR_MANIP_BUSY] = TR("Already carrying something");
+ stringsErr[ERR_MANIP_NIL] = TR("Nothing to grab");
+ stringsErr[ERR_MANIP_MOTOR] = TR("Impossible when moving");
+ stringsErr[ERR_MANIP_OCC] = TR("Place occupied");
+ stringsErr[ERR_MANIP_FRIEND] = TR("No other robot");
+ stringsErr[ERR_MANIP_RADIO] = TR("You can not carry a radioactive object");
+ stringsErr[ERR_MANIP_WATER] = TR("You can not carry an object under water");
+ stringsErr[ERR_MANIP_EMPTY] = TR("Nothing to drop");
+ stringsErr[ERR_BUILD_FLY] = TR("Impossible when flying");
+ stringsErr[ERR_BUILD_WATER] = TR("Impossible under water");
+ stringsErr[ERR_BUILD_ENERGY] = TR("Not enough energy");
+ stringsErr[ERR_BUILD_METALAWAY] = TR("Titanium too far away");
+ stringsErr[ERR_BUILD_METALNEAR] = TR("Titanium too close");
+ stringsErr[ERR_BUILD_METALINEX] = TR("No titanium around");
+ stringsErr[ERR_BUILD_FLAT] = TR("Ground not flat enough");
+ stringsErr[ERR_BUILD_FLATLIT] = TR("Flat ground not large enough");
+ stringsErr[ERR_BUILD_BUSY] = TR("Place occupied");
+ stringsErr[ERR_BUILD_BASE] = TR("Too close to space ship");
+ stringsErr[ERR_BUILD_NARROW] = TR("Too close to a building");
+ stringsErr[ERR_BUILD_MOTOR] = TR("Impossible when moving");
+ stringsErr[ERR_SEARCH_FLY] = TR("Impossible when flying");
+ stringsErr[ERR_BUILD_DISABLED] = TR("Can not produce this object in this mission");
+ stringsErr[ERR_BUILD_RESEARCH] = TR("Can not produce not researched object");
+ stringsErr[ERR_SEARCH_VEH] = TR("Inappropriate bot");
+ stringsErr[ERR_SEARCH_MOTOR] = TR("Impossible when moving");
+ stringsErr[ERR_TERRA_VEH] = TR("Inappropriate bot");
+ stringsErr[ERR_TERRA_ENERGY] = TR("Not enough energy");
+ stringsErr[ERR_TERRA_FLOOR] = TR("Ground inappropriate");
+ stringsErr[ERR_TERRA_BUILDING] = TR("Building too close");
+ stringsErr[ERR_TERRA_OBJECT] = TR("Object too close");
+ stringsErr[ERR_RECOVER_VEH] = TR("Inappropriate bot");
+ stringsErr[ERR_RECOVER_ENERGY] = TR("Not enough energy");
+ stringsErr[ERR_RECOVER_NULL] = TR("Nothing to recycle");
+ stringsErr[ERR_SHIELD_VEH] = TR("Inappropriate bot");
+ stringsErr[ERR_SHIELD_ENERGY] = TR("No more energy");
+ stringsErr[ERR_MOVE_IMPOSSIBLE] = TR("Error in instruction move");
+ stringsErr[ERR_FIND_IMPOSSIBLE] = TR("Object not found");
+ stringsErr[ERR_GOTO_IMPOSSIBLE] = TR("Goto: inaccessible destination");
+ stringsErr[ERR_GOTO_ITER] = TR("Goto: inaccessible destination");
+ stringsErr[ERR_GOTO_BUSY] = TR("Goto: destination occupied");
+ stringsErr[ERR_FIRE_VEH] = TR("Inappropriate bot");
+ stringsErr[ERR_FIRE_ENERGY] = TR("Not enough energy");
+ stringsErr[ERR_FIRE_FLY] = TR("Impossible when flying");
+ stringsErr[ERR_CONVERT_EMPTY] = TR("No titanium ore to convert");
+ stringsErr[ERR_DERRICK_NULL] = TR("No ore in the subsoil");
+ stringsErr[ERR_STATION_NULL] = TR("No energy in the subsoil");
+ stringsErr[ERR_TOWER_POWER] = TR("No power cell");
+ stringsErr[ERR_TOWER_ENERGY] = TR("No more energy");
+ stringsErr[ERR_RESEARCH_POWER] = TR("No power cell");
+ stringsErr[ERR_RESEARCH_ENERGY] = TR("Not enough energy");
+ stringsErr[ERR_RESEARCH_TYPE] = TR("Inappropriate cell type");
+ stringsErr[ERR_RESEARCH_ALREADY]= TR("Research program already performed");
+ stringsErr[ERR_ENERGY_NULL] = TR("No energy in the subsoil");
+ stringsErr[ERR_ENERGY_LOW] = TR("Not enough energy yet");
+ stringsErr[ERR_ENERGY_EMPTY] = TR("No titanium to transform");
+ stringsErr[ERR_ENERGY_BAD] = TR("Transforms only titanium");
+ stringsErr[ERR_BASE_DLOCK] = TR("Doors blocked by a robot or another object ");
+ stringsErr[ERR_BASE_DHUMAN] = TR("You must get on the spaceship to take off ");
+ stringsErr[ERR_LABO_NULL] = TR("Nothing to analyze");
+ stringsErr[ERR_LABO_BAD] = TR("Analyzes only organic matter");
+ stringsErr[ERR_LABO_ALREADY] = TR("Analysis already performed");
+ stringsErr[ERR_NUCLEAR_NULL] = TR("No energy in the subsoil");
+ stringsErr[ERR_NUCLEAR_LOW] = TR("Not yet enough energy");
+ stringsErr[ERR_NUCLEAR_EMPTY] = TR("No uranium to transform");
+ stringsErr[ERR_NUCLEAR_BAD] = TR("Transforms only uranium");
+ stringsErr[ERR_FACTORY_NULL] = TR("No titanium");
+ stringsErr[ERR_FACTORY_NEAR] = TR("Object too close");
+ stringsErr[ERR_RESET_NEAR] = TR("Place occupied");
+ stringsErr[ERR_INFO_NULL] = TR("No information exchange post within range");
+ stringsErr[ERR_VEH_VIRUS] = TR("Program infected by a virus");
+ stringsErr[ERR_BAT_VIRUS] = TR("Infected by a virus; temporarily out of order");
+ stringsErr[ERR_VEH_POWER] = TR("No power cell");
+ stringsErr[ERR_VEH_ENERGY] = TR("No more energy");
+ stringsErr[ERR_FLAG_FLY] = TR("Impossible when flying");
+ stringsErr[ERR_FLAG_WATER] = TR("Impossible when swimming");
+ stringsErr[ERR_FLAG_MOTOR] = TR("Impossible when moving");
+ stringsErr[ERR_FLAG_BUSY] = TR("Impossible when carrying an object");
+ stringsErr[ERR_FLAG_CREATE] = TR("Too many flags of this color (maximum 5)");
+ stringsErr[ERR_FLAG_PROXY] = TR("Too close to an existing flag");
+ stringsErr[ERR_FLAG_DELETE] = TR("No flag nearby");
+ stringsErr[ERR_DESTROY_NOTFOUND]= TR("Not found anything to destroy");
+ stringsErr[ERR_WRONG_OBJ] = TR("Inappropriate object");
+ stringsErr[ERR_MISSION_NOTERM] = TR("The mission is not accomplished yet (press \\key help; for more details)");
+ stringsErr[ERR_DELETEMOBILE] = TR("Bot destroyed");
+ stringsErr[ERR_DELETEBUILDING] = TR("Building destroyed");
+ stringsErr[ERR_TOOMANY] = TR("Can not create this; there are too many objects");
+ stringsErr[ERR_OBLIGATORYTOKEN] = TR("\"%s\" missing in this exercise");
+ stringsErr[ERR_PROHIBITEDTOKEN] = TR("Do not use in this exercise");
+
+ stringsErr[INFO_BUILD] = TR("Building completed");
+ stringsErr[INFO_CONVERT] = TR("Titanium available");
+ stringsErr[INFO_RESEARCH] = TR("Research program completed");
+ stringsErr[INFO_RESEARCHTANK] = TR("Plans for tracked robots available ");
+ stringsErr[INFO_RESEARCHFLY] = TR("You can fly with the keys (\\key gup;) and (\\key gdown;)");
+ stringsErr[INFO_RESEARCHTHUMP] = TR("Plans for thumper available");
+ stringsErr[INFO_RESEARCHCANON] = TR("Plans for shooter available");
+ stringsErr[INFO_RESEARCHTOWER] = TR("Plans for defense tower available");
+ stringsErr[INFO_RESEARCHPHAZER] = TR("Plans for phazer shooter available");
+ stringsErr[INFO_RESEARCHSHIELD] = TR("Plans for shielder available");
+ stringsErr[INFO_RESEARCHATOMIC] = TR("Plans for nuclear power plant available");
+ stringsErr[INFO_FACTORY] = TR("New bot available");
+ stringsErr[INFO_LABO] = TR("Analysis performed");
+ stringsErr[INFO_ENERGY] = TR("Power cell available");
+ stringsErr[INFO_NUCLEAR] = TR("Nuclear power cell available");
+ stringsErr[INFO_FINDING] = TR("You found a usable object");
+ stringsErr[INFO_MARKPOWER] = TR("Found a site for power station");
+ stringsErr[INFO_MARKURANIUM] = TR("Found a site for a derrick");
+ stringsErr[INFO_MARKSTONE] = TR("Found a site for a derrick");
+ stringsErr[INFO_MARKKEYa] = TR("Found a site for a derrick");
+ stringsErr[INFO_MARKKEYb] = TR("Found a site for a derrick");
+ stringsErr[INFO_MARKKEYc] = TR("Found a site for a derrick");
+ stringsErr[INFO_MARKKEYd] = TR("Found a site for a derrick");
+ stringsErr[INFO_WIN] = TR("<<< Well done; mission accomplished >>>");
+ stringsErr[INFO_LOST] = TR("<<< Sorry; mission failed >>>");
+ stringsErr[INFO_LOSTq] = TR("<<< Sorry; mission failed >>>");
+ stringsErr[INFO_WRITEOK] = TR("Current mission saved");
+ stringsErr[INFO_DELETEPATH] = TR("Checkpoint crossed");
+ stringsErr[INFO_DELETEMOTHER] = TR("Alien Queen killed");
+ stringsErr[INFO_DELETEANT] = TR("Ant fatally wounded");
+ stringsErr[INFO_DELETEBEE] = TR("Wasp fatally wounded");
+ stringsErr[INFO_DELETEWORM] = TR("Worm fatally wounded");
+ stringsErr[INFO_DELETESPIDER] = TR("Spider fatally wounded");
+ stringsErr[INFO_BEGINSATCOM] = TR("Press \\key help; to read instructions on your SatCom");
+
+
+
+ stringsCbot[TX_OPENPAR] = TR("Opening bracket missing");
+ stringsCbot[TX_CLOSEPAR] = TR("Closing bracket missing ");
+ stringsCbot[TX_NOTBOOL] = TR("The expression must return a boolean value");
+ stringsCbot[TX_UNDEFVAR] = TR("Variable not declared");
+ stringsCbot[TX_BADLEFT] = TR("Assignment impossible");
+ stringsCbot[TX_ENDOF] = TR("Semicolon terminator missing");
+ stringsCbot[TX_OUTCASE] = TR("Instruction \"case\" outside a block \"switch\"");
+ stringsCbot[TX_NOTERM] = TR("Instructions after the final closing brace");
+ stringsCbot[TX_CLOSEBLK] = TR("End of block missing");
+ stringsCbot[TX_ELSEWITHOUTIF] = TR("Instruction \"else\" without corresponding \"if\" ");
+ stringsCbot[TX_OPENBLK] = TR("Opening brace missing ");
+ stringsCbot[TX_BADTYPE] = TR("Wrong type for the assignment");
+ stringsCbot[TX_REDEFVAR] = TR("A variable can not be declared twice");
+ stringsCbot[TX_BAD2TYPE] = TR("The types of the two operands are incompatible ");
+ stringsCbot[TX_UNDEFCALL] = TR("Unknown function");
+ stringsCbot[TX_MISDOTS] = TR("Sign \" : \" missing");
+ stringsCbot[TX_WHILE] = TR("Keyword \"while\" missing");
+ stringsCbot[TX_BREAK] = TR("Instruction \"break\" outside a loop");
+ stringsCbot[TX_LABEL] = TR("A label must be followed by \"for\"; \"while\"; \"do\" or \"switch\"");
+ stringsCbot[TX_NOLABEL] = TR("This label does not exist");
+ stringsCbot[TX_NOCASE] = TR("Instruction \"case\" missing");
+ stringsCbot[TX_BADNUM] = TR("Number missing");
+ stringsCbot[TX_VOID] = TR("Void parameter");
+ stringsCbot[TX_NOTYP] = TR("Type declaration missing");
+ stringsCbot[TX_NOVAR] = TR("Variable name missing");
+ stringsCbot[TX_NOFONC] = TR("Function name missing");
+ stringsCbot[TX_OVERPARAM] = TR("Too many parameters");
+ stringsCbot[TX_REDEF] = TR("Function already exists");
+ stringsCbot[TX_LOWPARAM] = TR("Parameters missing ");
+ stringsCbot[TX_BADPARAM] = TR("No function with this name accepts this kind of parameter");
+ stringsCbot[TX_NUMPARAM] = TR("No function with this name accepts this number of parameters");
+ stringsCbot[TX_NOITEM] = TR("This is not a member of this class");
+ stringsCbot[TX_DOT] = TR("This object is not a member of a class");
+ stringsCbot[TX_NOCONST] = TR("Appropriate constructor missing");
+ stringsCbot[TX_REDEFCLASS] = TR("This class already exists");
+ stringsCbot[TX_CLBRK] = TR("\" ] \" missing");
+ stringsCbot[TX_RESERVED] = TR("Reserved keyword of CBOT language");
+ stringsCbot[TX_BADNEW] = TR("Bad argument for \"new\"");
+ stringsCbot[TX_OPBRK] = TR("\" [ \" expected");
+ stringsCbot[TX_BADSTRING] = TR("String missing");
+ stringsCbot[TX_BADINDEX] = TR("Incorrect index type");
+ stringsCbot[TX_PRIVATE] = TR("Private element");
+ stringsCbot[TX_NOPUBLIC] = TR("Public required");
+ stringsCbot[TX_DIVZERO] = TR("Dividing by zero");
+ stringsCbot[TX_NOTINIT] = TR("Variable not initialized");
+ stringsCbot[TX_BADTHROW] = TR("Negative value rejected by \"throw\"");
+ stringsCbot[TX_NORETVAL] = TR("The function returned no value ");
+ stringsCbot[TX_NORUN] = TR("No function running");
+ stringsCbot[TX_NOCALL] = TR("Calling an unknown function");
+ stringsCbot[TX_NOCLASS] = TR("This class does not exist");
+ stringsCbot[TX_NULLPT] = TR("Unknown Object");
+ stringsCbot[TX_OPNAN] = TR("Operation impossible with value \"nan\"");
+ stringsCbot[TX_OUTARRAY] = TR("Access beyond array limit");
+ stringsCbot[TX_STACKOVER] = TR("Stack overflow");
+ stringsCbot[TX_DELETEDPT] = TR("Illegal object");
+ stringsCbot[TX_FILEOPEN] = TR("Can't open file");
+ stringsCbot[TX_NOTOPEN] = TR("File not open");
+ stringsCbot[TX_ERRREAD] = TR("Read error");
+ stringsCbot[TX_ERRWRITE] = TR("Write error");
}
diff --git a/src/common/restext.h b/src/common/restext.h
index cde7203..8eb6bdb 100644
--- a/src/common/restext.h
+++ b/src/common/restext.h
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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
+ */
/**
* \file common/restext.h
@@ -72,7 +75,6 @@ enum ResTextType
RT_TITLE_WRITE = 50,
RT_TITLE_READ = 51,
RT_TITLE_USER = 52,
- RT_TITLE_TEEN = 53,
RT_PLAY_CHAPt = 60,
RT_PLAY_CHAPd = 61,
@@ -86,7 +88,6 @@ enum ResTextType
RT_PLAY_CHAPu = 71,
RT_PLAY_LISTu = 72,
RT_PLAY_CHAPte = 73,
- RT_PLAY_LISTk = 74,
RT_SETUP_DEVICE = 80,
RT_SETUP_MODE = 81,
diff --git a/src/common/singleton.h b/src/common/singleton.h
index 841759d..eab7ec5 100644
--- a/src/common/singleton.h
+++ b/src/common/singleton.h
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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
+ */
/**
* \file common/singleton.h
@@ -62,10 +65,7 @@ public:
static void ReplaceInstance(T* newInstance)
{
assert(newInstance != nullptr);
-
- if (m_instance != nullptr)
- delete m_instance;
-
+ delete m_instance;
m_instance = newInstance;
}
#endif
diff --git a/src/common/stringutils.cpp b/src/common/stringutils.cpp
index 03a0f0b..9edc82d 100644
--- a/src/common/stringutils.cpp
+++ b/src/common/stringutils.cpp
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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/stringutils.h"
diff --git a/src/common/stringutils.h b/src/common/stringutils.h
index e80163a..46c1d2a 100644
--- a/src/common/stringutils.h
+++ b/src/common/stringutils.h
@@ -1,18 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
-// *
-// * 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://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.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
+ */
/**
* \file common/stringutils.h