Merge branch 'dev' of github:colobot/colobot into dev
commit
93582536de
2
data
2
data
|
@ -1 +1 @@
|
||||||
Subproject commit 530c8b1048dc484f015652bb97492b83b2d8d9c7
|
Subproject commit d58fb314ad6886f7bf57ece996861d050d993b1e
|
|
@ -960,15 +960,15 @@ int CApplication::Run()
|
||||||
{
|
{
|
||||||
LogEvent(event);
|
LogEvent(event);
|
||||||
|
|
||||||
StartPerformanceCounter(PCNT_UPDATE_ENGINE);
|
|
||||||
m_engine->FrameUpdate();
|
|
||||||
StopPerformanceCounter(PCNT_UPDATE_ENGINE);
|
|
||||||
|
|
||||||
m_sound->FrameMove(m_relTime);
|
m_sound->FrameMove(m_relTime);
|
||||||
|
|
||||||
StartPerformanceCounter(PCNT_UPDATE_GAME);
|
StartPerformanceCounter(PCNT_UPDATE_GAME);
|
||||||
m_robotMain->ProcessEvent(event);
|
m_robotMain->ProcessEvent(event);
|
||||||
StopPerformanceCounter(PCNT_UPDATE_GAME);
|
StopPerformanceCounter(PCNT_UPDATE_GAME);
|
||||||
|
|
||||||
|
StartPerformanceCounter(PCNT_UPDATE_ENGINE);
|
||||||
|
m_engine->FrameUpdate();
|
||||||
|
StopPerformanceCounter(PCNT_UPDATE_ENGINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
StopPerformanceCounter(PCNT_UPDATE_ALL);
|
StopPerformanceCounter(PCNT_UPDATE_ALL);
|
||||||
|
|
|
@ -81,6 +81,9 @@
|
||||||
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
|
#include <boost/regex.hpp>
|
||||||
|
|
||||||
|
|
||||||
template<> CRobotMain* CSingleton<CRobotMain>::m_instance = nullptr;
|
template<> CRobotMain* CSingleton<CRobotMain>::m_instance = nullptr;
|
||||||
|
|
||||||
|
|
||||||
|
@ -4050,9 +4053,14 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Cmd(line, "Title")) continue; // Ignore
|
static const boost::regex titleCmdRe("Title\\.[A-Z]");
|
||||||
if (Cmd(line, "Resume")) continue; // Ignore
|
static const boost::regex resumeCmdRe("Resume\\.[A-Z]");
|
||||||
if (Cmd(line, "ScriptName")) continue; // Ignore
|
static const boost::regex scriptNameCmdRe("ScriptName\.[A-Z]");
|
||||||
|
|
||||||
|
if (boost::regex_match(GetCmd(line), titleCmdRe)) continue; // Ignore
|
||||||
|
if (boost::regex_match(GetCmd(line), resumeCmdRe)) continue; // Ignore
|
||||||
|
if (boost::regex_match(GetCmd(line), scriptNameCmdRe)) continue; // Ignore
|
||||||
|
|
||||||
|
|
||||||
if (Cmd(line, "ScriptFile") && !resetObject)
|
if (Cmd(line, "ScriptFile") && !resetObject)
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,6 +35,16 @@ char* SkipSpace(char *line)
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string GetCmd(char* line)
|
||||||
|
{
|
||||||
|
line = SkipSpace(line);
|
||||||
|
|
||||||
|
int len = 0;
|
||||||
|
for(char* x = line; *x != 0 && *x != ' ' && *x != '\t' && *x != '\n'; x++, len++);
|
||||||
|
|
||||||
|
return std::string(line, len);
|
||||||
|
}
|
||||||
|
|
||||||
// Checks if a line contains a command.
|
// Checks if a line contains a command.
|
||||||
|
|
||||||
bool Cmd(char *line, const char *token)
|
bool Cmd(char *line, const char *token)
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
// Procedures.
|
// Procedures.
|
||||||
|
|
||||||
|
extern std::string GetCmd(char* line);
|
||||||
extern bool Cmd(char *line, const char *token);
|
extern bool Cmd(char *line, const char *token);
|
||||||
extern char* SearchOp(char *line, const char *op);
|
extern char* SearchOp(char *line, const char *op);
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ configure_file(${SRC_DIR}/common/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/comm
|
||||||
# Code sources
|
# Code sources
|
||||||
set(COLOBOT_SOURCES
|
set(COLOBOT_SOURCES
|
||||||
${SRC_DIR}/app/app.cpp
|
${SRC_DIR}/app/app.cpp
|
||||||
|
${SRC_DIR}/app/pausemanager.cpp
|
||||||
${SRC_DIR}/app/system.cpp
|
${SRC_DIR}/app/system.cpp
|
||||||
${SRC_DIR}/app/${SYSTEM_CPP_MODULE}
|
${SRC_DIR}/app/${SYSTEM_CPP_MODULE}
|
||||||
${SRC_DIR}/app/system_other.cpp
|
${SRC_DIR}/app/system_other.cpp
|
||||||
|
|
Loading…
Reference in New Issue