Fixed code formatting
* moved braces to new lines * fixed some function/variable names * fixed whitespace issuesdev-ui
parent
538745a731
commit
8765d58b02
|
@ -1703,4 +1703,3 @@ public:
|
||||||
bool GetPosition(int& start, int& stop, CBotGet modestart, CBotGet modestop);
|
bool GetPosition(int& start, int& stop, CBotGet modestart, CBotGet modestop);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -141,4 +141,3 @@ bool CBotAddExpr::Execute(CBotStack* &pStack)
|
||||||
return pStack->Return(pStk1); // transmits the result
|
return pStack->Return(pStk1); // transmits the result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1646,3 +1646,4 @@ CBotClass* CBotClass::Compile(CBotToken* &p, CBotCStack* pStack)
|
||||||
pStack->SetError(TX_ENDOF, p);
|
pStack->SetError(TX_ENDOF, p);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,3 +36,4 @@
|
||||||
|
|
||||||
extern bool IsOfType(CBotToken* &p, int type1, int type2 = -1);
|
extern bool IsOfType(CBotToken* &p, int type1, int type2 = -1);
|
||||||
extern bool IsOfTypeList(CBotToken* &p, int type1, ...);
|
extern bool IsOfTypeList(CBotToken* &p, int type1, ...);
|
||||||
|
|
||||||
|
|
|
@ -566,3 +566,4 @@ void t(bool t)
|
||||||
t ? 0 : "test";
|
t ? 0 : "test";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -2245,4 +2245,3 @@ CBotTypResult&
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,3 +21,4 @@ else()
|
||||||
ARCHIVE DESTINATION ${COLOBOT_INSTALL_LIB_DIR}
|
ARCHIVE DESTINATION ${COLOBOT_INSTALL_LIB_DIR}
|
||||||
RUNTIME DESTINATION ${COLOBOT_INSTALL_BIN_DIR})
|
RUNTIME DESTINATION ${COLOBOT_INSTALL_BIN_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -434,3 +434,4 @@ void InitStringFunctions()
|
||||||
CBotProgram::AddFunction("strupper", rStrUpper, cStrStr );
|
CBotProgram::AddFunction("strupper", rStrUpper, cStrStr );
|
||||||
CBotProgram::AddFunction("strlower", rStrLower, cStrStr );
|
CBotProgram::AddFunction("strlower", rStrLower, cStrStr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,3 +39,4 @@ the object being created with CBotVar :: Create (name, pClasse)
|
||||||
not destroy the object when there imédiatement pointers
|
not destroy the object when there imédiatement pointers
|
||||||
but marked as virtually destroyed
|
but marked as virtually destroyed
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -176,3 +176,4 @@ enum EID
|
||||||
#define TX_ERRWRITE 6015
|
#define TX_ERRWRITE 6015
|
||||||
|
|
||||||
#define TX_MAX 6016
|
#define TX_MAX 6016
|
||||||
|
|
||||||
|
|
|
@ -229,3 +229,4 @@ target_link_libraries(colobot ${LIBS})
|
||||||
|
|
||||||
install(TARGETS colobot RUNTIME DESTINATION ${COLOBOT_INSTALL_BIN_DIR})
|
install(TARGETS colobot RUNTIME DESTINATION ${COLOBOT_INSTALL_BIN_DIR})
|
||||||
set_target_properties(colobot PROPERTIES INSTALL_RPATH ${COLOBOT_INSTALL_LIB_DIR})
|
set_target_properties(colobot PROPERTIES INSTALL_RPATH ${COLOBOT_INSTALL_LIB_DIR})
|
||||||
|
|
||||||
|
|
|
@ -2,3 +2,4 @@
|
||||||
* \dir src/app
|
* \dir src/app
|
||||||
* Main class of the application and system functions
|
* Main class of the application and system functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -122,3 +122,4 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|
||||||
|
|
|
@ -188,12 +188,13 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CSystemUtils::profileFileLocation()
|
std::string CSystemUtils::GetProfileFileLocation()
|
||||||
{
|
{
|
||||||
return std::string("colobot.ini");
|
return std::string("colobot.ini");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CSystemUtils::savegameDirectoryLocation()
|
std::string CSystemUtils::GetSavegameDirectoryLocation()
|
||||||
{
|
{
|
||||||
return std::string("savegame");
|
return std::string("savegame");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,10 +131,10 @@ public:
|
||||||
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) = 0;
|
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) = 0;
|
||||||
|
|
||||||
//! Returns the profile (colobot.ini) file location
|
//! Returns the profile (colobot.ini) file location
|
||||||
virtual std::string profileFileLocation();
|
virtual std::string GetProfileFileLocation();
|
||||||
|
|
||||||
//! Returns the savegame directory location
|
//! Returns the savegame directory location
|
||||||
virtual std::string savegameDirectoryLocation();
|
virtual std::string GetSavegameDirectoryLocation();
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Global function to get CSystemUtils instance
|
//! Global function to get CSystemUtils instance
|
||||||
|
@ -142,3 +142,4 @@ inline CSystemUtils* GetSystemUtils()
|
||||||
{
|
{
|
||||||
return CSystemUtils::GetInstancePointer();
|
return CSystemUtils::GetInstancePointer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,9 +95,9 @@ long long CSystemUtilsLinux::TimeStampExactDiff(SystemTimeStamp *before, SystemT
|
||||||
(after->clockTime.tv_sec - before->clockTime.tv_sec) * 1000000000ll;
|
(after->clockTime.tv_sec - before->clockTime.tv_sec) * 1000000000ll;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CSystemUtilsLinux::profileFileLocation()
|
std::string CSystemUtilsLinux::GetProfileFileLocation()
|
||||||
{
|
{
|
||||||
std::string m_profileFile;
|
std::string profileFile;
|
||||||
|
|
||||||
// Determine profileFile according to XDG Base Directory Specification
|
// Determine profileFile according to XDG Base Directory Specification
|
||||||
char* envXDG_CONFIG_HOME = getenv("XDG_CONFIG_HOME");
|
char* envXDG_CONFIG_HOME = getenv("XDG_CONFIG_HOME");
|
||||||
|
@ -106,25 +106,25 @@ std::string CSystemUtilsLinux::profileFileLocation()
|
||||||
char *envHOME = getenv("HOME");
|
char *envHOME = getenv("HOME");
|
||||||
if (envHOME == NULL)
|
if (envHOME == NULL)
|
||||||
{
|
{
|
||||||
m_profileFile = "colobot.ini";
|
profileFile = "colobot.ini";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_profileFile = std::string(envHOME) + "/.config/colobot.ini";
|
profileFile = std::string(envHOME) + "/.config/colobot.ini";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_profileFile = std::string(envXDG_CONFIG_HOME) + "/colobot.ini";
|
profileFile = std::string(envXDG_CONFIG_HOME) + "/colobot.ini";
|
||||||
}
|
}
|
||||||
GetLogger()->Trace("Profile configuration is %s\n", m_profileFile.c_str());
|
GetLogger()->Trace("Profile configuration is %s\n", profileFile.c_str());
|
||||||
|
|
||||||
return m_profileFile;
|
return profileFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CSystemUtilsLinux::savegameDirectoryLocation()
|
std::string CSystemUtilsLinux::GetSavegameDirectoryLocation()
|
||||||
{
|
{
|
||||||
std::string m_savegameDir;
|
std::string savegameDir;
|
||||||
|
|
||||||
// Determine savegame dir according to XDG Base Directory Specification
|
// Determine savegame dir according to XDG Base Directory Specification
|
||||||
char *envXDG_DATA_HOME = getenv("XDG_CONFIG_DATA");
|
char *envXDG_DATA_HOME = getenv("XDG_CONFIG_DATA");
|
||||||
|
@ -133,18 +133,19 @@ std::string CSystemUtilsLinux::savegameDirectoryLocation()
|
||||||
char *envHOME = getenv("HOME");
|
char *envHOME = getenv("HOME");
|
||||||
if (envHOME == NULL)
|
if (envHOME == NULL)
|
||||||
{
|
{
|
||||||
m_savegameDir = "/tmp/colobot-savegame";
|
savegameDir = "/tmp/colobot-savegame";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_savegameDir = std::string(envHOME) + "/.local/share/colobot";
|
savegameDir = std::string(envHOME) + "/.local/share/colobot";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_savegameDir = std::string(envXDG_DATA_HOME) + "/colobot";
|
savegameDir = std::string(envXDG_DATA_HOME) + "/colobot";
|
||||||
}
|
}
|
||||||
GetLogger()->Trace("Saved game files are going to %s\n", m_savegameDir.c_str());
|
GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str());
|
||||||
|
|
||||||
return m_savegameDir;
|
return savegameDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,10 @@ public:
|
||||||
virtual long long GetTimeStampExactResolution() override;
|
virtual long long GetTimeStampExactResolution() override;
|
||||||
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override;
|
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override;
|
||||||
|
|
||||||
virtual std::string profileFileLocation() override;
|
virtual std::string GetProfileFileLocation() override;
|
||||||
virtual std::string savegameDirectoryLocation() override;
|
virtual std::string GetSavegameDirectoryLocation() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_zenityAvailable;
|
bool m_zenityAvailable;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -37,3 +37,4 @@ long long int CSystemUtilsOther::TimeStampExactDiff(SystemTimeStamp* before, Sys
|
||||||
{
|
{
|
||||||
return (after->sdlTicks - before->sdlTicks) * 1000000ll;
|
return (after->sdlTicks - before->sdlTicks) * 1000000ll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,3 +46,4 @@ public:
|
||||||
virtual long long GetTimeStampExactResolution() override;
|
virtual long long GetTimeStampExactResolution() override;
|
||||||
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override;
|
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -111,38 +111,39 @@ std::wstring CSystemUtilsWindows::UTF8_Decode(const std::string& str)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CSystemUtilsWindows::profileFileLocation()
|
std::string CSystemUtilsWindows::GetProfileFileLocation()
|
||||||
{
|
{
|
||||||
std::string m_profileFile;
|
std::string profileFile;
|
||||||
|
|
||||||
char* envUSERPROFILE = getenv("USERPROFILE");
|
char* envUSERPROFILE = getenv("USERPROFILE");
|
||||||
if (envUSERPROFILE == NULL)
|
if (envUSERPROFILE == NULL)
|
||||||
{
|
{
|
||||||
m_profileFile = "colobot.ini";
|
profileFile = "colobot.ini";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_profileFile = std::string(envUSERPROFILE) + "\\colobot\\colobot.ini";
|
profileFile = std::string(envUSERPROFILE) + "\\colobot\\colobot.ini";
|
||||||
}
|
}
|
||||||
GetLogger()->Trace("Profile configuration is %s\n", m_profileFile.c_str());
|
GetLogger()->Trace("Profile configuration is %s\n", profileFile.c_str());
|
||||||
|
|
||||||
return m_profileFile;
|
return profileFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CSystemUtilsWindows::savegameDirectoryLocation()
|
std::string CSystemUtilsWindows::GetSavegameDirectoryLocation()
|
||||||
{
|
{
|
||||||
std::string m_savegameDir;
|
std::string savegameDir;
|
||||||
|
|
||||||
char* envUSERPROFILE = getenv("USERPROFILE");
|
char* envUSERPROFILE = getenv("USERPROFILE");
|
||||||
if (envUSERPROFILE == NULL)
|
if (envUSERPROFILE == NULL)
|
||||||
{
|
{
|
||||||
m_savegameDir = "savegame";
|
savegameDir = "savegame";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_savegameDir = std::string(envUSERPROFILE) + "\\colobot\\savegame";
|
savegameDir = std::string(envUSERPROFILE) + "\\colobot\\savegame";
|
||||||
}
|
}
|
||||||
GetLogger()->Trace("Saved game files are going to %s\n", m_savegameDir.c_str());
|
GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str());
|
||||||
|
|
||||||
return m_savegameDir;
|
return savegameDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,8 @@ public:
|
||||||
virtual long long GetTimeStampExactResolution() override;
|
virtual long long GetTimeStampExactResolution() override;
|
||||||
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override;
|
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override;
|
||||||
|
|
||||||
virtual std::string profileFileLocation() override;
|
virtual std::string GetProfileFileLocation() override;
|
||||||
virtual std::string savegameDirectoryLocation() override;
|
virtual std::string GetSavegameDirectoryLocation() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string UTF8_Encode(const std::wstring &wstr);
|
std::string UTF8_Encode(const std::wstring &wstr);
|
||||||
|
@ -54,3 +54,4 @@ private:
|
||||||
protected:
|
protected:
|
||||||
long long m_counterFrequency;
|
long long m_counterFrequency;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,3 +2,4 @@
|
||||||
* \dir src/common
|
* \dir src/common
|
||||||
* \brief Structs and utils shared throughout the application
|
* \brief Structs and utils shared throughout the application
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -23,3 +23,4 @@
|
||||||
|
|
||||||
#define COLOBOT_DEFAULT_DATADIR "@COLOBOT_INSTALL_DATA_DIR@"
|
#define COLOBOT_DEFAULT_DATADIR "@COLOBOT_INSTALL_DATA_DIR@"
|
||||||
#define COLOBOT_I18N_DIR "@COLOBOT_INSTALL_I18N_DIR@"
|
#define COLOBOT_I18N_DIR "@COLOBOT_INSTALL_I18N_DIR@"
|
||||||
|
|
||||||
|
|
|
@ -779,3 +779,4 @@ protected:
|
||||||
int m_tail;
|
int m_tail;
|
||||||
int m_total;
|
int m_total;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -297,3 +297,4 @@ extern int g_build; // constructible buildings
|
||||||
extern int g_researchDone; // research done
|
extern int g_researchDone; // research done
|
||||||
extern long g_researchEnable; // research available
|
extern long g_researchEnable; // research available
|
||||||
extern float g_unit; // conversion factor
|
extern float g_unit; // conversion factor
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,8 @@ bool PNGSaveSurface(const char *filename, SDL_Surface *surf)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setjmp(png_jmpbuf(png_ptr))) {
|
if (setjmp(png_jmpbuf(png_ptr)))
|
||||||
|
{
|
||||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return false;
|
return false;
|
||||||
|
@ -396,3 +397,4 @@ bool CImage::SavePNG(const std::string& fileName)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,3 +112,4 @@ private:
|
||||||
//! Image data
|
//! Image data
|
||||||
ImageData* m_data;
|
ImageData* m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -111,3 +111,4 @@ void CInstanceManager::Compress(ManagedClassType classType)
|
||||||
}
|
}
|
||||||
m_table[classType].usedCount = j;
|
m_table[classType].usedCount = j;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,4 +93,3 @@ protected:
|
||||||
ManagedClassInstances m_table[CLASS_MAX];
|
ManagedClassInstances m_table[CLASS_MAX];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -146,3 +146,4 @@ std::string ReadBinaryString(std::istream &istr)
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // namespace IOUtils
|
}; // namespace IOUtils
|
||||||
|
|
||||||
|
|
|
@ -61,3 +61,4 @@ enum VirtualKmod
|
||||||
|
|
||||||
//! Special value for invalid key bindings
|
//! Special value for invalid key bindings
|
||||||
const unsigned int KEY_INVALID = SDLK_LAST + 1000;
|
const unsigned int KEY_INVALID = SDLK_LAST + 1000;
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,8 @@ private:
|
||||||
|
|
||||||
|
|
||||||
//! Global function to get Logger instance
|
//! Global function to get Logger instance
|
||||||
inline CLogger* GetLogger() {
|
inline CLogger* GetLogger()
|
||||||
|
{
|
||||||
return CLogger::GetInstancePointer();
|
return CLogger::GetInstancePointer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,3 +31,4 @@ extern void TimeToAscii(time_t time, char *buffer);
|
||||||
|
|
||||||
extern bool CopyFileListToTemp(char* filename, int* list, int total);
|
extern bool CopyFileListToTemp(char* filename, int* list, int total);
|
||||||
extern void AddExt(char* filename, const char* ext);
|
extern void AddExt(char* filename, const char* ext);
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,9 @@ bool CProfile::InitCurrentDirectory()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// TODO: NDEBUG should be replaced with something like BUILD_TYPE == "DEBUG"/"RELEASE"
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
bp::ini_parser::read_ini(GetSystemUtils()->profileFileLocation(), m_propertyTree);
|
bp::ini_parser::read_ini(GetSystemUtils()->GetProfileFileLocation(), m_propertyTree);
|
||||||
#else
|
#else
|
||||||
bp::ini_parser::read_ini("colobot.ini", m_propertyTree);
|
bp::ini_parser::read_ini("colobot.ini", m_propertyTree);
|
||||||
#endif
|
#endif
|
||||||
|
@ -68,7 +69,7 @@ bool CProfile::SaveCurrentDirectory()
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
bp::ini_parser::write_ini(GetSystemUtils()->profileFileLocation(), m_propertyTree);
|
bp::ini_parser::write_ini(GetSystemUtils()->GetProfileFileLocation(), m_propertyTree);
|
||||||
#else
|
#else
|
||||||
bp::ini_parser::write_ini("colobot.ini", m_propertyTree);
|
bp::ini_parser::write_ini("colobot.ini", m_propertyTree);
|
||||||
#endif
|
#endif
|
||||||
|
@ -209,13 +210,17 @@ std::string CProfile::GetUserBasedPath(std::string dir, std::string default_dir)
|
||||||
{
|
{
|
||||||
std::string path = dir;
|
std::string path = dir;
|
||||||
boost::replace_all(path, "\\", "/");
|
boost::replace_all(path, "\\", "/");
|
||||||
if (dir.find("/") == std::string::npos) {
|
if (dir.find("/") == std::string::npos)
|
||||||
|
{
|
||||||
path = default_dir + "/" + dir;
|
path = default_dir + "/" + dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_userDirectory.length() > 0) {
|
if (m_userDirectory.length() > 0)
|
||||||
|
{
|
||||||
boost::replace_all(path, "%user%", m_userDirectory);
|
boost::replace_all(path, "%user%", m_userDirectory);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
boost::replace_all(path, "%user%", default_dir);
|
boost::replace_all(path, "%user%", default_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,7 +240,8 @@ bool CProfile::CopyFileToTemp(std::string filename)
|
||||||
|
|
||||||
fs::create_directory(fs::path(dst).parent_path().make_preferred().string());
|
fs::create_directory(fs::path(dst).parent_path().make_preferred().string());
|
||||||
fs::copy_file(src, dst, fs::copy_option::overwrite_if_exists);
|
fs::copy_file(src, dst, fs::copy_option::overwrite_if_exists);
|
||||||
if (fs::exists(dst)) {
|
if (fs::exists(dst))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ namespace fs = boost::filesystem;
|
||||||
*/
|
*/
|
||||||
class CProfile : public CSingleton<CProfile>
|
class CProfile : public CSingleton<CProfile>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CProfile();
|
CProfile();
|
||||||
~CProfile();
|
~CProfile();
|
||||||
|
|
||||||
|
@ -129,13 +129,15 @@ class CProfile : public CSingleton<CProfile>
|
||||||
*/
|
*/
|
||||||
bool CopyFileToTemp(std::string filename);
|
bool CopyFileToTemp(std::string filename);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::property_tree::ptree m_propertyTree;
|
boost::property_tree::ptree m_propertyTree;
|
||||||
bool m_profileNeedSave;
|
bool m_profileNeedSave;
|
||||||
std::string m_userDirectory;
|
std::string m_userDirectory;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Global function to get profile instance
|
//! Global function to get profile instance
|
||||||
inline CProfile & GetProfile() {
|
inline CProfile & GetProfile()
|
||||||
|
{
|
||||||
return *CProfile::GetInstancePointer();
|
return *CProfile::GetInstancePointer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -920,3 +920,4 @@ bool GetResource(ResType type, int num, char* text)
|
||||||
PutKeyName(text, tmpl);
|
PutKeyName(text, tmpl);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -158,3 +158,4 @@ void InitializeRestext();
|
||||||
void SetGlobalGamerName(std::string name);
|
void SetGlobalGamerName(std::string name);
|
||||||
bool SearchKey(const char *cmd, InputSlot& slot);
|
bool SearchKey(const char *cmd, InputSlot& slot);
|
||||||
bool GetResource(ResType type, int num, char* text);
|
bool GetResource(ResType type, int num, char* text);
|
||||||
|
|
||||||
|
|
|
@ -74,3 +74,4 @@ private:
|
||||||
CSingleton& operator=(const CSingleton<T> &);
|
CSingleton& operator=(const CSingleton<T> &);
|
||||||
CSingleton(const CSingleton<T> &);
|
CSingleton(const CSingleton<T> &);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -142,3 +142,4 @@ size_t StrUtils::Utf8StringLength(const std::string &str)
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,3 +78,4 @@ int Utf8CharSizeAt(const std::string &str, unsigned int pos);
|
||||||
size_t Utf8StringLength(const std::string &str);
|
size_t Utf8StringLength(const std::string &str);
|
||||||
|
|
||||||
}; // namespace StrUtil
|
}; // namespace StrUtil
|
||||||
|
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
lang/
|
lang/
|
||||||
|
|
||||||
|
|
|
@ -95,3 +95,4 @@ if(PO4A)
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -4,3 +4,4 @@ Type=Application
|
||||||
Exec=colobot
|
Exec=colobot
|
||||||
Icon=colobot
|
Icon=colobot
|
||||||
Categories=Education;Robotics;Game;AdventureGame;StrategyGame;
|
Categories=Education;Robotics;Game;AdventureGame;StrategyGame;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
Name="Colobot"
|
Name="Colobot"
|
||||||
GenericName="Game to learn programming"
|
GenericName="Game to learn programming"
|
||||||
Comment="Colonize with bots"
|
Comment="Colonize with bots"
|
||||||
|
|
||||||
|
|
|
@ -45,3 +45,4 @@ Set language. Note that you can also fill the B<LANG> environment variable.
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
This manpage was written by Didier Raboud <S<odyx@debian.org>>.
|
This manpage was written by Didier Raboud <S<odyx@debian.org>>.
|
||||||
|
|
||||||
|
|
|
@ -236,3 +236,4 @@
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
@ -132,3 +132,4 @@ msgstr ""
|
||||||
#: colobot.pod:47
|
#: colobot.pod:47
|
||||||
msgid "This manpage was written by Didier Raboud <S<odyx@debian.org>>."
|
msgid "This manpage was written by Didier Raboud <S<odyx@debian.org>>."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -2,3 +2,4 @@
|
||||||
|
|
||||||
[type:ini] colobot.ini $lang:lang/$lang/colobot.ini
|
[type:ini] colobot.ini $lang:lang/$lang/colobot.ini
|
||||||
[type:pod] colobot.pod $lang:lang/$lang/colobot.pod
|
[type:pod] colobot.pod $lang:lang/$lang/colobot.pod
|
||||||
|
|
||||||
|
|
|
@ -10,3 +10,4 @@
|
||||||
* This namespace was created to avoid clashing with old code, but now it still serves,
|
* This namespace was created to avoid clashing with old code, but now it still serves,
|
||||||
* defining a border between pure graphics engine and other parts of application.
|
* defining a border between pure graphics engine and other parts of application.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -5,3 +5,4 @@
|
||||||
* Core types, enums, structs and CDevice abstract class that define
|
* Core types, enums, structs and CDevice abstract class that define
|
||||||
* the abstract graphics device used in graphics engine
|
* the abstract graphics device used in graphics engine
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -106,3 +106,4 @@ Color HSV2RGB(ColorHSV color)
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -154,3 +154,4 @@ Color HSV2RGB(ColorHSV color);
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -401,3 +401,4 @@ public:
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -98,3 +98,4 @@ struct Light
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -60,3 +60,4 @@ struct Material
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -269,3 +269,4 @@ struct Texture
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -140,3 +140,4 @@ struct VertexTex2
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
Possible future DirectX implementation of graphics engine
|
Possible future DirectX implementation of graphics engine
|
||||||
|
|
||||||
|
|
|
@ -7,3 +7,4 @@
|
||||||
*
|
*
|
||||||
* Graphics operations are done on abstract interface from src/graphics/core
|
* Graphics operations are done on abstract interface from src/graphics/core
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1676,3 +1676,4 @@ Math::Vector CCamera::ExcludeObject(Math::Vector eye, Math::Vector lookat,
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,8 +128,7 @@ enum CameraOverEffect
|
||||||
|
|
||||||
... */
|
... */
|
||||||
class CCamera {
|
class CCamera {
|
||||||
|
public:
|
||||||
public:
|
|
||||||
CCamera();
|
CCamera();
|
||||||
~CCamera();
|
~CCamera();
|
||||||
|
|
||||||
|
@ -391,3 +390,4 @@ protected:
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -270,3 +270,4 @@ bool CCloud::GetEnabled()
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -140,3 +140,4 @@ protected:
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -4332,3 +4332,4 @@ void CEngine::DrawStats()
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -1431,3 +1431,4 @@ protected:
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -465,3 +465,4 @@ bool CLightManager::LightsComparator::operator()(const DynamicLight& left, const
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -216,3 +216,4 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
}; // namespace Gfx
|
}; // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -418,3 +418,4 @@ CObject* CLightning::SearchObject(Math::Vector pos)
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -107,3 +107,4 @@ protected:
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -1199,3 +1199,4 @@ int CModelFile::GetTriangleCount()
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -150,3 +150,4 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
}; // namespace Gfx
|
}; // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -201,3 +201,4 @@ float CModelManager::GetHeight(std::vector<ModelTriangle>& triangles, Math::Vect
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,3 +99,4 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -3917,3 +3917,4 @@ bool CParticle::WriteWheelTrace(const char *filename, int width, int height,
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -395,3 +395,4 @@ protected:
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -185,3 +185,4 @@ int CPlanet::GetMode()
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -118,3 +118,4 @@ protected:
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -2399,3 +2399,4 @@ void CPyro::LightOperFrame(float rTime)
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -219,3 +219,4 @@ protected:
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -1801,3 +1801,4 @@ float CTerrain::GetFlyingLimit(Math::Vector pos, bool noLimit)
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -418,3 +418,4 @@ protected:
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -25,3 +25,4 @@ add_executable(modelfile_test ${MODELFILE_TEST_SOURCES})
|
||||||
target_link_libraries(modelfile_test gtest)
|
target_link_libraries(modelfile_test gtest)
|
||||||
|
|
||||||
add_test(modelfile_test modelfile_test)
|
add_test(modelfile_test modelfile_test)
|
||||||
|
|
||||||
|
|
|
@ -260,3 +260,4 @@ int main(int argc, char **argv)
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -913,3 +913,4 @@ CharTexture CText::CreateCharTexture(UTF8Char ch, CachedFont* font)
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -342,3 +342,4 @@ protected:
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -628,3 +628,4 @@ void CWater::AdjustEye(Math::Vector &eye)
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -204,3 +204,4 @@ protected:
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -5,3 +5,4 @@
|
||||||
* Contains the concrete implementation using OpenGL of abstract CDevice class
|
* Contains the concrete implementation using OpenGL of abstract CDevice class
|
||||||
* from src/graphics/core
|
* from src/graphics/core
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1689,3 +1689,4 @@ FillMode CGLDevice::GetFillMode()
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -257,3 +257,4 @@ private:
|
||||||
|
|
||||||
|
|
||||||
} // namespace Gfx
|
} // namespace Gfx
|
||||||
|
|
||||||
|
|
|
@ -10,3 +10,4 @@
|
||||||
* This namespace was created to avoid clashing with old code, but now it still serves,
|
* This namespace was created to avoid clashing with old code, but now it still serves,
|
||||||
* defining a border between math and non-math-related code.
|
* defining a border between math and non-math-related code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -28,3 +28,4 @@
|
||||||
#include "math/vector.h"
|
#include "math/vector.h"
|
||||||
#include "math/matrix.h"
|
#include "math/matrix.h"
|
||||||
#include "math/geometry.h"
|
#include "math/geometry.h"
|
||||||
|
|
||||||
|
|
|
@ -53,3 +53,4 @@ const float LOG_2 = log(2.0f);
|
||||||
|
|
||||||
|
|
||||||
} // namespace Math
|
} // namespace Math
|
||||||
|
|
||||||
|
|
|
@ -263,3 +263,4 @@ inline float Bounce(float progress, float middle = 0.3f, float bounce = 0.4f)
|
||||||
|
|
||||||
|
|
||||||
} // namespace Math
|
} // namespace Math
|
||||||
|
|
||||||
|
|
|
@ -643,3 +643,4 @@ inline Math::Vector RotateView(Math::Vector center, float angleH, float angleV,
|
||||||
|
|
||||||
|
|
||||||
} // namespace Math
|
} // namespace Math
|
||||||
|
|
||||||
|
|
|
@ -59,3 +59,4 @@ struct IntPoint
|
||||||
|
|
||||||
|
|
||||||
} // namespace Math
|
} // namespace Math
|
||||||
|
|
||||||
|
|
|
@ -462,3 +462,4 @@ inline Math::Vector MatrixVectorMultiply(const Math::Matrix &m, const Math::Vect
|
||||||
|
|
||||||
|
|
||||||
} // namespace Math
|
} // namespace Math
|
||||||
|
|
||||||
|
|
|
@ -191,3 +191,4 @@ inline float Distance(const Point &a, const Point &b)
|
||||||
|
|
||||||
|
|
||||||
} // namespace Math
|
} // namespace Math
|
||||||
|
|
||||||
|
|
|
@ -281,3 +281,4 @@ inline Vector Clamp(const Vector &vec, const Vector &min, const Vector &max)
|
||||||
|
|
||||||
|
|
||||||
} // namespace Math
|
} // namespace Math
|
||||||
|
|
||||||
|
|
|
@ -5,3 +5,4 @@
|
||||||
* Contains the main class of game engine - CRobotMain and the various in-game objects:
|
* Contains the main class of game engine - CRobotMain and the various in-game objects:
|
||||||
* CObject and related auto, motion and task subclasses.
|
* CObject and related auto, motion and task subclasses.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue