From f6e27099b294d55c15a6b5dad13cda7730a17a71 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Wed, 17 Oct 2012 21:55:45 +0200 Subject: Doxygen/comment fixes and some #include refactoring --- src/app/main.cpp | 1 + src/app/system.cpp | 7 +-- src/common/error_ids.h | 1 + src/common/event.cpp | 1 + src/common/event.h | 1 + src/common/event_ids.h | 1 + src/common/global.h | 3 +- src/common/image.cpp | 3 +- src/common/image.h | 2 + src/common/iman.cpp | 1 - src/common/iman.h | 6 +- src/common/ioutils.h | 2 +- src/common/key.h | 5 +- src/common/logger.cpp | 3 +- src/common/logger.h | 30 ++++----- src/common/misc.cpp | 2 - src/common/misc.h | 15 ----- src/common/profile.cpp | 3 +- src/common/profile.h | 63 +++++++++---------- src/common/restext.cpp | 5 +- src/common/restext.h | 1 + src/common/restext_strings.c | 11 +++- src/common/singleton.h | 1 - src/common/stringutils.cpp | 3 +- src/graphics/engine/particle.h | 2 +- src/object/auto/auto.cpp | 4 +- src/object/auto/autobase.cpp | 2 +- src/object/auto/autoconvert.cpp | 2 +- src/object/auto/autodestroyer.cpp | 2 +- src/object/auto/autoegg.cpp | 2 +- src/object/auto/autoenergy.cpp | 2 +- src/object/auto/autoflag.cpp | 2 +- src/object/auto/autohuston.cpp | 2 +- src/object/auto/autoinfo.cpp | 2 +- src/object/auto/autokid.cpp | 2 +- src/object/auto/autolabo.cpp | 2 +- src/object/auto/automush.cpp | 2 +- src/object/auto/autonest.cpp | 2 +- src/object/auto/autonuclear.cpp | 2 +- src/object/auto/autopara.cpp | 2 +- src/object/auto/autoportico.cpp | 2 +- src/object/auto/autoradar.cpp | 2 +- src/object/auto/autorepair.cpp | 2 +- src/object/auto/autoresearch.cpp | 2 +- src/object/auto/autoroot.cpp | 2 +- src/object/auto/autosafe.cpp | 2 +- src/object/auto/autostation.cpp | 2 +- src/object/auto/autotower.cpp | 2 +- src/object/brain.cpp | 14 +++-- src/object/brain.h | 6 +- src/object/mainmovie.cpp | 14 ++--- src/object/mainmovie.h | 5 +- src/object/motion/motion.cpp | 2 +- src/object/object.cpp | 43 +++++++------ src/object/object.h | 5 +- src/object/object_ids.h | 1 + src/object/robotmain.h | 6 +- src/physics/physics.cpp | 25 ++++---- src/physics/physics.h | 5 +- src/plugins/plugininterface.h | 30 ++++----- src/plugins/pluginloader.cpp | 10 ++- src/plugins/pluginloader.h | 41 ++++++------- src/plugins/pluginmanager.cpp | 4 +- src/plugins/pluginmanager.h | 51 ++++++++------- src/script/cbottoken.h | 5 +- src/script/cmdtoken.h | 6 +- src/script/script.cpp | 9 ++- src/script/script.h | 10 ++- src/sound/sound.h | 126 +++++++++++++++++++------------------- 69 files changed, 333 insertions(+), 306 deletions(-) (limited to 'src') diff --git a/src/app/main.cpp b/src/app/main.cpp index 7cd98b9..45871b7 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -22,6 +22,7 @@ #include "app/app.h" #include "app/system.h" + #include "common/logger.h" #include "common/misc.h" #include "common/restext.h" diff --git a/src/app/system.cpp b/src/app/system.cpp index eb0321b..73614aa 100644 --- a/src/app/system.cpp +++ b/src/app/system.cpp @@ -15,7 +15,6 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// system.cpp #include "app/system.h" @@ -23,13 +22,13 @@ #if defined(PLATFORM_WINDOWS) -#include "system_windows.h" +#include "app/system_windows.h" #elif defined(PLATFORM_LINUX) -#include "system_linux.h" +#include "app/system_linux.h" #else -#include "system_other.h" +#include "app/system_other.h" #endif diff --git a/src/common/error_ids.h b/src/common/error_ids.h index fc1f7d6..fd7d4e0 100644 --- a/src/common/error_ids.h +++ b/src/common/error_ids.h @@ -19,6 +19,7 @@ #pragma once + enum Error { ERR_OK = 0, // ok diff --git a/src/common/event.cpp b/src/common/event.cpp index 4e5ec1a..b078dc5 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -16,6 +16,7 @@ #include "common/event.h" + #include "common/iman.h" #include "common/logger.h" diff --git a/src/common/event.h b/src/common/event.h index ce2872a..04b75c9 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -24,6 +24,7 @@ #include "common/key.h" #include "common/event_ids.h" + #include "math/point.h" #include "math/vector.h" diff --git a/src/common/event_ids.h b/src/common/event_ids.h index b6c646c..ecf10b5 100644 --- a/src/common/event_ids.h +++ b/src/common/event_ids.h @@ -19,6 +19,7 @@ #pragma once + /** \enum EventType \brief Type of event message diff --git a/src/common/global.h b/src/common/global.h index 9704a2b..43c77ac 100644 --- a/src/common/global.h +++ b/src/common/global.h @@ -21,7 +21,8 @@ #pragma once -#include "error_ids.h" + +#include "common/error_ids.h" /** * \enum Language diff --git a/src/common/image.cpp b/src/common/image.cpp index adb8ce7..f3cfa34 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -14,9 +14,8 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// image.cpp -#include "image.h" +#include "common/image.h" #include #include diff --git a/src/common/image.h b/src/common/image.h index 54bbd3d..d23a6fa 100644 --- a/src/common/image.h +++ b/src/common/image.h @@ -21,7 +21,9 @@ #pragma once + #include "graphics/core/color.h" + #include "math/intpoint.h" #include diff --git a/src/common/iman.cpp b/src/common/iman.cpp index e59afb1..6a0a9eb 100644 --- a/src/common/iman.cpp +++ b/src/common/iman.cpp @@ -14,7 +14,6 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// iman.cpp #include "common/iman.h" diff --git a/src/common/iman.h b/src/common/iman.h index 75655aa..53caed7 100644 --- a/src/common/iman.h +++ b/src/common/iman.h @@ -15,14 +15,14 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. /** - * \file iman.h + * \file common/iman.h * \brief Instance manager for managed classes */ #pragma once -#include -#include + +#include "common/singleton.h" /** diff --git a/src/common/ioutils.h b/src/common/ioutils.h index e7668eb..9a94617 100644 --- a/src/common/ioutils.h +++ b/src/common/ioutils.h @@ -15,7 +15,7 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. /** - * \file ioutils.h + * \file common/ioutils.h * \brief Functions for binary I/O */ diff --git a/src/common/key.h b/src/common/key.h index 11076a3..196f66d 100644 --- a/src/common/key.h +++ b/src/common/key.h @@ -14,7 +14,10 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// key.h +/** + * \file common/key.h + * \brief Key-related macros and enums + */ #pragma once diff --git a/src/common/logger.cpp b/src/common/logger.cpp index ed8df8c..5a78433 100644 --- a/src/common/logger.cpp +++ b/src/common/logger.cpp @@ -14,9 +14,8 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// logger.cpp -#include +#include "common/logger.h" #include diff --git a/src/common/logger.h b/src/common/logger.h index dfeeb98..198e5e5 100644 --- a/src/common/logger.h +++ b/src/common/logger.h @@ -19,9 +19,9 @@ * \brief Class for logging information to file or console */ - #pragma once + #include "common/singleton.h" #include @@ -58,48 +58,48 @@ class CLogger : public CSingleton ~CLogger(); /** Write message to console or file - * @param str - message to write - * @param ... - additional arguments + * \param str - message to write + * \param ... - additional arguments */ void Message(const char *str, ...); /** Write message to console or file with LOG_TRACE level - * @param str - message to write - * @param ... - additional arguments + * \param str - message to write + * \param ... - additional arguments */ void Trace(const char *str, ...); /** Write message to console or file with LOG_DEBUG level - * @param str - message to write - * @param ... - additional arguments + * \param str - message to write + * \param ... - additional arguments */ void Debug(const char *str, ...); /** Write message to console or file with LOG_INFO level - * @param str - message to write - * @param ... - additional arguments + * \param str - message to write + * \param ... - additional arguments */ void Info(const char *str, ...); /** Write message to console or file with LOG_WARN level - * @param str - message to write - * @param ... - additional arguments + * \param str - message to write + * \param ... - additional arguments */ void Warn(const char *str, ...); /** Write message to console or file with LOG_ERROR level - * @param str - message to write - * @param ... - additional arguments + * \param str - message to write + * \param ... - additional arguments */ void Error(const char *str, ...); /** Set output file to write logs to - * @param filename - output file to write to + * \param filename - output file to write to */ void SetOutputFile(std::string filename); /** Set log level. Logs with level below will not be shown - * @param level - minimum log level to write + * \param level - minimum log level to write */ void SetLogLevel(LogType level); diff --git a/src/common/misc.cpp b/src/common/misc.cpp index 2ed6e2c..2bce3b8 100644 --- a/src/common/misc.cpp +++ b/src/common/misc.cpp @@ -14,8 +14,6 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// misc.cpp - #include "common/misc.h" diff --git a/src/common/misc.h b/src/common/misc.h index f6fd609..f210706 100644 --- a/src/common/misc.h +++ b/src/common/misc.h @@ -14,7 +14,6 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// misc.h #pragma once @@ -22,20 +21,6 @@ #include -// TODO: to be removed (replaced by TrackedKey enum and mouse states in app.h) -const int KS_PAGEUP = (1<<4); -const int KS_PAGEDOWN = (1<<5); -const int KS_SHIFT = (1<<6); -const int KS_CONTROL = (1<<7); -const int KS_MLEFT = (1<<8); -const int KS_MRIGHT = (1<<9); -const int KS_NUMUP = (1<<10); -const int KS_NUMDOWN = (1<<11); -const int KS_NUMLEFT = (1<<12); -const int KS_NUMRIGHT = (1<<13); -const int KS_NUMPLUS = (1<<14); -const int KS_NUMMINUS = (1<<15); - // TODO: rewrite/refactor or remove extern char GetNoAccent(char letter); diff --git a/src/common/profile.cpp b/src/common/profile.cpp index 2c78f9f..5432489 100644 --- a/src/common/profile.cpp +++ b/src/common/profile.cpp @@ -14,10 +14,9 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// profile.cpp - #include "common/profile.h" + #include "common/logger.h" #include diff --git a/src/common/profile.h b/src/common/profile.h index facb414..9bc6c37 100644 --- a/src/common/profile.h +++ b/src/common/profile.h @@ -21,18 +21,19 @@ #pragma once -#include #include "common/singleton.h" +#include + #include #include /** -* @class CProfile +* \class CProfile * -* @brief Class for loading profile (currently for loading ini config file) +* \brief Class for loading profile (currently for loading ini config file) * */ class CProfile : public CSingleton @@ -42,62 +43,62 @@ class CProfile : public CSingleton ~CProfile(); /** Loads colobot.ini from current directory - * @return return true on success + * \return return true on success */ bool InitCurrentDirectory(); /** Sets string value in section under specified key - * @param std::string section - * @param std::string key - * @param std::string value - * @return return true on success + * \param section + * \param key + * \param value + * \return return true on success */ bool SetLocalProfileString(std::string section, std::string key, std::string value); /** Gets string value in section under specified key - * @param std::string section - * @param std::string key - * @param std::string& buffer - * @return return true on success + * \param section + * \param key + * \param buffer + * \return return true on success */ bool GetLocalProfileString(std::string section, std::string key, std::string& buffer); /** Sets int value in section under specified key - * @param std::string section - * @param std::string key - * @param int value - * @return return true on success + * \param section + * \param key + * \param value + * \return return true on success */ bool SetLocalProfileInt(std::string section, std::string key, int value); /** Gets int value in section under specified key - * @param std::string section - * @param std::string key - * @param int& value - * @return return true on success + * \param section + * \param key + * \param value + * \return return true on success */ bool GetLocalProfileInt(std::string section, std::string key, int &value); /** Sets float value in section under specified key - * @param std::string section - * @param std::string key - * @param float value - * @return return true on success + * \param section + * \param key + * \param value + * \return return true on success */ bool SetLocalProfileFloat(std::string section, std::string key, float value); /** Gets float value in section under specified key - * @param std::string section - * @param std::string key - * @param float& value - * @return return true on success + * \param section + * \param key + * \param value + * \return return true on success */ bool GetLocalProfileFloat(std::string section, std::string key, float &value); /** Gets all values in section under specified key - * @param std::string section - * @param std::string key - * @return vector of values + * \param section + * \param key + * \return vector of values */ std::vector< std::string > GetLocalProfileSection(std::string section, std::string key); diff --git a/src/common/restext.cpp b/src/common/restext.cpp index 9a3d964..4404e90 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -12,7 +12,8 @@ // * 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/.// restext.cpp +// * along with this program. If not, see http://www.gnu.org/licenses/. + #include "common/restext.h" @@ -20,7 +21,9 @@ #include "common/event.h" #include "common/logger.h" #include "common/stringutils.h" + #include "CBot/resource.h" + #include "object/object.h" #include "object/robotmain.h" diff --git a/src/common/restext.h b/src/common/restext.h index 6abb7f5..fa45e7b 100644 --- a/src/common/restext.h +++ b/src/common/restext.h @@ -21,6 +21,7 @@ #pragma once + #include "common/global.h" #include "common/restext_ids.h" diff --git a/src/common/restext_strings.c b/src/common/restext_strings.c index d041a28..45828e3 100644 --- a/src/common/restext_strings.c +++ b/src/common/restext_strings.c @@ -14,12 +14,17 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -#include "common/restext_ids.h" -#include "common/event_ids.h" -#include "object/object_ids.h" + #include "common/error_ids.h" +#include "common/event_ids.h" +#include "common/restext_ids.h" + #include "CBot/resource.h" +#include "object/object_ids.h" + + + const char * const strings_text[] = { [RT_VERSION_ID] = "Colobot Gold", diff --git a/src/common/singleton.h b/src/common/singleton.h index 7407504..c1b28d9 100644 --- a/src/common/singleton.h +++ b/src/common/singleton.h @@ -19,7 +19,6 @@ * \brief CSingleton base class for singletons */ - #pragma once #include diff --git a/src/common/stringutils.cpp b/src/common/stringutils.cpp index 12a3179..db486f0 100644 --- a/src/common/stringutils.cpp +++ b/src/common/stringutils.cpp @@ -14,9 +14,8 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// stringutils.cpp -#include "stringutils.h" +#include "common/stringutils.h" std::string StrUtils::Replace(const std::string &str, const std::string &oldStr, const std::string &newStr) diff --git a/src/graphics/engine/particle.h b/src/graphics/engine/particle.h index d03b3fc..90aec55 100644 --- a/src/graphics/engine/particle.h +++ b/src/graphics/engine/particle.h @@ -23,7 +23,7 @@ #pragma once -#include "engine.h" +#include "graphics/engine/engine.h" #include "sound/sound.h" diff --git a/src/object/auto/auto.cpp b/src/object/auto/auto.cpp index 711497d..4003193 100644 --- a/src/object/auto/auto.cpp +++ b/src/object/auto/auto.cpp @@ -352,7 +352,7 @@ void CAuto::UpdateInterface(float rTime) } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAuto::GetError() { @@ -421,7 +421,7 @@ bool CAuto::Write(char *line) return false; } -// Geturn all settings to the controller. +// Return all settings to the controller. bool CAuto::Read(char *line) { diff --git a/src/object/auto/autobase.cpp b/src/object/auto/autobase.cpp index d7b3ca1..8370517 100644 --- a/src/object/auto/autobase.cpp +++ b/src/object/auto/autobase.cpp @@ -1198,7 +1198,7 @@ bool CAutoBase::Abort() } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoBase::GetError() { diff --git a/src/object/auto/autoconvert.cpp b/src/object/auto/autoconvert.cpp index ec4392b..a550697 100644 --- a/src/object/auto/autoconvert.cpp +++ b/src/object/auto/autoconvert.cpp @@ -285,7 +285,7 @@ bool CAutoConvert::EventProcess(const Event &event) return true; } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoConvert::GetError() { diff --git a/src/object/auto/autodestroyer.cpp b/src/object/auto/autodestroyer.cpp index 740f600..ecf7c94 100644 --- a/src/object/auto/autodestroyer.cpp +++ b/src/object/auto/autodestroyer.cpp @@ -316,7 +316,7 @@ bool CAutoDestroyer::SearchVehicle() } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoDestroyer::GetError() { diff --git a/src/object/auto/autoegg.cpp b/src/object/auto/autoegg.cpp index 35a6add..5b90ef9 100644 --- a/src/object/auto/autoegg.cpp +++ b/src/object/auto/autoegg.cpp @@ -258,7 +258,7 @@ Error CAutoEgg::IsEnded() } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoEgg::GetError() { diff --git a/src/object/auto/autoenergy.cpp b/src/object/auto/autoenergy.cpp index 18a21ab..c63dede 100644 --- a/src/object/auto/autoenergy.cpp +++ b/src/object/auto/autoenergy.cpp @@ -508,7 +508,7 @@ CObject* CAutoEnergy::SearchPower() } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoEnergy::GetError() { diff --git a/src/object/auto/autoflag.cpp b/src/object/auto/autoflag.cpp index e88ee3a..c2dec5c 100644 --- a/src/object/auto/autoflag.cpp +++ b/src/object/auto/autoflag.cpp @@ -153,7 +153,7 @@ bool CAutoFlag::EventProcess(const Event &event) } -// Geturns an error due the state of the automation +// Returns an error due the state of the automation Error CAutoFlag::GetError() { diff --git a/src/object/auto/autohuston.cpp b/src/object/auto/autohuston.cpp index 1e81a65..1b6778d 100644 --- a/src/object/auto/autohuston.cpp +++ b/src/object/auto/autohuston.cpp @@ -286,7 +286,7 @@ bool CAutoHuston::CreateInterface(bool bSelect) } -// Geturns an error due to state of the automation. +// Returns an error due to state of the automation. Error CAutoHuston::GetError() { diff --git a/src/object/auto/autoinfo.cpp b/src/object/auto/autoinfo.cpp index 78cc249..1245034 100644 --- a/src/object/auto/autoinfo.cpp +++ b/src/object/auto/autoinfo.cpp @@ -339,7 +339,7 @@ bool CAutoInfo::EventProcess(const Event &event) } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoInfo::GetError() { diff --git a/src/object/auto/autokid.cpp b/src/object/auto/autokid.cpp index 7004e6b..64cd39a 100644 --- a/src/object/auto/autokid.cpp +++ b/src/object/auto/autokid.cpp @@ -191,7 +191,7 @@ bool CAutoKid::EventProcess(const Event &event) } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoKid::GetError() { diff --git a/src/object/auto/autolabo.cpp b/src/object/auto/autolabo.cpp index af780e0..70bcc5e 100644 --- a/src/object/auto/autolabo.cpp +++ b/src/object/auto/autolabo.cpp @@ -423,7 +423,7 @@ bool CAutoLabo::EventProcess(const Event &event) } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoLabo::GetError() { diff --git a/src/object/auto/automush.cpp b/src/object/auto/automush.cpp index d7aa98e..cb94590 100644 --- a/src/object/auto/automush.cpp +++ b/src/object/auto/automush.cpp @@ -289,7 +289,7 @@ bool CAutoMush::SearchTarget() } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoMush::GetError() { diff --git a/src/object/auto/autonest.cpp b/src/object/auto/autonest.cpp index 4a8132a..99927bd 100644 --- a/src/object/auto/autonest.cpp +++ b/src/object/auto/autonest.cpp @@ -219,7 +219,7 @@ CObject* CAutoNest::SearchFret() } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoNest::GetError() { diff --git a/src/object/auto/autonuclear.cpp b/src/object/auto/autonuclear.cpp index bb20dde..375acf0 100644 --- a/src/object/auto/autonuclear.cpp +++ b/src/object/auto/autonuclear.cpp @@ -410,7 +410,7 @@ void CAutoNuclear::CreatePower() } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoNuclear::GetError() { diff --git a/src/object/auto/autopara.cpp b/src/object/auto/autopara.cpp index b52344f..a3082f5 100644 --- a/src/object/auto/autopara.cpp +++ b/src/object/auto/autopara.cpp @@ -221,7 +221,7 @@ bool CAutoPara::CreateInterface(bool bSelect) } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoPara::GetError() { diff --git a/src/object/auto/autoportico.cpp b/src/object/auto/autoportico.cpp index 9d04982..3b3bf84 100644 --- a/src/object/auto/autoportico.cpp +++ b/src/object/auto/autoportico.cpp @@ -385,7 +385,7 @@ bool CAutoPortico::Abort() } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoPortico::GetError() { diff --git a/src/object/auto/autoradar.cpp b/src/object/auto/autoradar.cpp index b586521..4214d17 100644 --- a/src/object/auto/autoradar.cpp +++ b/src/object/auto/autoradar.cpp @@ -183,7 +183,7 @@ bool CAutoRadar::EventProcess(const Event &event) } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoRadar::GetError() { diff --git a/src/object/auto/autorepair.cpp b/src/object/auto/autorepair.cpp index 4662699..cf4f33e 100644 --- a/src/object/auto/autorepair.cpp +++ b/src/object/auto/autorepair.cpp @@ -283,7 +283,7 @@ CObject* CAutoRepair::SearchVehicle() } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoRepair::GetError() { diff --git a/src/object/auto/autoresearch.cpp b/src/object/auto/autoresearch.cpp index a3ce464..9f423ec 100644 --- a/src/object/auto/autoresearch.cpp +++ b/src/object/auto/autoresearch.cpp @@ -263,7 +263,7 @@ bool CAutoResearch::EventProcess(const Event &event) } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoResearch::GetError() { diff --git a/src/object/auto/autoroot.cpp b/src/object/auto/autoroot.cpp index 4413d56..196ed5d 100644 --- a/src/object/auto/autoroot.cpp +++ b/src/object/auto/autoroot.cpp @@ -108,7 +108,7 @@ bool CAutoRoot::EventProcess(const Event &event) } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoRoot::GetError() { diff --git a/src/object/auto/autosafe.cpp b/src/object/auto/autosafe.cpp index ea0c183..e89acea 100644 --- a/src/object/auto/autosafe.cpp +++ b/src/object/auto/autosafe.cpp @@ -334,7 +334,7 @@ bool CAutoSafe::CreateInterface(bool bSelect) } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoSafe::GetError() { diff --git a/src/object/auto/autostation.cpp b/src/object/auto/autostation.cpp index 1dbcf26..e99ae4b 100644 --- a/src/object/auto/autostation.cpp +++ b/src/object/auto/autostation.cpp @@ -288,7 +288,7 @@ CObject* CAutoStation::SearchVehicle() } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoStation::GetError() { diff --git a/src/object/auto/autotower.cpp b/src/object/auto/autotower.cpp index 7674794..84dcd85 100644 --- a/src/object/auto/autotower.cpp +++ b/src/object/auto/autotower.cpp @@ -313,7 +313,7 @@ CObject* CAutoTower::SearchTarget(Math::Vector &impact) } -// Geturns an error due the state of the automation. +// Returns an error due the state of the automation. Error CAutoTower::GetError() { diff --git a/src/object/brain.cpp b/src/object/brain.cpp index 5403903..4ce1bf8 100644 --- a/src/object/brain.cpp +++ b/src/object/brain.cpp @@ -19,14 +19,20 @@ #include "common/misc.h" #include "common/iman.h" + #include "graphics/core/color.h" #include "graphics/engine/terrain.h" + #include "object/motion/motion.h" #include "object/task/taskmanager.h" + #include "physics/physics.h" + #include "script/cmdtoken.h" #include "script/script.h" + #include "sound/sound.h" + #include "ui/displaytext.h" #include "ui/interface.h" #include "ui/slider.h" @@ -803,7 +809,7 @@ void CBrain::StopTask() // Introduces a virus into a program. -// Geturns true if it was inserted. +// Returns true if it was inserted. bool CBrain::IntroduceVirus() { @@ -2450,7 +2456,7 @@ void CBrain::UpdateScript(Ui::CWindow *pw) pl->ShowSelect(true); } -// Geturns the rank of selected script. +// Returns the rank of selected script. int CBrain::GetSelScript() { @@ -2590,7 +2596,7 @@ void CBrain::RunProgram(int rank) } } -// Geturns the first free program. +// Returns the first free program. int CBrain::FreeProgram() { @@ -2604,7 +2610,7 @@ int CBrain::FreeProgram() } -// Geturns the current program. +// Returns the current program. int CBrain::GetProgram() { diff --git a/src/object/brain.h b/src/object/brain.h index 008fb67..ce7116e 100644 --- a/src/object/brain.h +++ b/src/object/brain.h @@ -14,10 +14,14 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// brain.h +/** + * \file object/brain.h + * \brief CBrain - dispatches commands to objects + */ #pragma once + #include "common/event.h" #include "common/misc.h" diff --git a/src/object/mainmovie.cpp b/src/object/mainmovie.cpp index 346f370..9aaf345 100644 --- a/src/object/mainmovie.cpp +++ b/src/object/mainmovie.cpp @@ -14,20 +14,18 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// mainmovie.cpp - - -#include - #include "object/mainmovie.h" -#include "math/geometry.h" #include "common/iman.h" + +#include "math/geometry.h" + #include "object/motion/motionhuman.h" #include "object/robotmain.h" +#include // Constructor of the application card. @@ -219,14 +217,14 @@ bool CMainMovie::EventProcess(const Event &event) } -// Geturns the type of the current movie. +// Returns the type of the current movie. MainMovieType CMainMovie::GetType() { return m_type; } -// Geturns the type of movie stop. +// Returns the type of movie stop. MainMovieType CMainMovie::GetStopType() { diff --git a/src/object/mainmovie.h b/src/object/mainmovie.h index 27e4df3..eba21eb 100644 --- a/src/object/mainmovie.h +++ b/src/object/mainmovie.h @@ -14,7 +14,10 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// mainmovie.h +/** + * \file object/mainmovie.h + * \brief CMainMovie - control over movie sequences + */ #pragma once diff --git a/src/object/motion/motion.cpp b/src/object/motion/motion.cpp index ff038ae..605091f 100644 --- a/src/object/motion/motion.cpp +++ b/src/object/motion/motion.cpp @@ -150,7 +150,7 @@ Error CMotion::SetAction(int action, float time) return ERR_OK; } -// Geturns the current action. +// Returns the current action. int CMotion::GetAction() { diff --git a/src/object/object.cpp b/src/object/object.cpp index 5a1631f..2eade93 100644 --- a/src/object/object.cpp +++ b/src/object/object.cpp @@ -17,7 +17,6 @@ #include "object/object.h" - #include "CBot/CBotDll.h" #include "app/app.h" @@ -830,7 +829,7 @@ void CObject::InitPart(int part) } // Creates a new part, and returns its number. -// Geturns -1 on error. +// Returns -1 on error. int CObject::CreatePart() { @@ -891,7 +890,7 @@ void CObject::SetObjectRank(int part, int objRank) m_objectPart[part].object = objRank; } -// Geturns the number of part. +// Returns the number of part. int CObject::GetObjectRank(int part) { @@ -1164,7 +1163,7 @@ bool CObject::Write(char *line) return true; } -// Geturns all parameters of the object. +// Returns all parameters of the object. bool CObject::Read(char *line) { @@ -1299,14 +1298,14 @@ int CObject::CreateCrashSphere(Math::Vector pos, float radius, Sound sound, return m_crashSphereUsed++; } -// Geturns the number of spheres. +// Returns the number of spheres. int CObject::GetCrashSphereTotal() { return m_crashSphereUsed; } -// Geturns a sphere for collisions. +// Returns a sphere for collisions. // The position is absolute in the world. bool CObject::GetCrashSphere(int rank, Math::Vector &pos, float &radius) @@ -1318,7 +1317,7 @@ bool CObject::GetCrashSphere(int rank, Math::Vector &pos, float &radius) return false; } - // Geturns to the sphere collisions, + // Returns to the sphere collisions, // which ignores the inclination of the vehicle. // This is necessary to collisions with vehicles, // so as not to reflect SetInclinaison, for example. @@ -1342,14 +1341,14 @@ bool CObject::GetCrashSphere(int rank, Math::Vector &pos, float &radius) return true; } -// Geturns the hardness of a sphere. +// Returns the hardness of a sphere. Sound CObject::GetCrashSphereSound(int rank) { return m_crashSphereSound[rank]; } -// Geturns the hardness of a sphere. +// Returns the hardness of a sphere. float CObject::GetCrashSphereHardness(int rank) { @@ -1383,7 +1382,7 @@ void CObject::SetGlobalSphere(Math::Vector pos, float radius) m_globalSphereRadius = radius*zoom; } -// Geturns the global sphere, in the world. +// Returns the global sphere, in the world. void CObject::GetGlobalSphere(Math::Vector &pos, float &radius) { @@ -1416,7 +1415,7 @@ void CObject::SetShieldRadius(float radius) m_shieldRadius = radius; } -// Geturns the radius of the shield. +// Returns the radius of the shield. float CObject::GetShieldRadius() { @@ -1787,7 +1786,7 @@ float CObject::GetZoomZ(int part) } -// Geturns the water level. +// Returns the water level. float CObject::GetWaterLevel() { @@ -2023,7 +2022,7 @@ float CObject::GetCmdLine(int rank) } -// Geturns matrices of an object portion. +// Returns matrices of an object portion. Math::Matrix* CObject::GetRotateMatrix(int part) { @@ -2277,7 +2276,7 @@ bool CObject::CreateShadowLight(float height, Gfx::Color color) return true; } -// Geturns the number of negative light shade. +// Returns the number of negative light shade. int CObject::GetShadowLight() { @@ -2318,7 +2317,7 @@ bool CObject::CreateEffectLight(float height, Gfx::Color color) return true; } -// Geturns the number of light effects. +// Returns the number of light effects. int CObject::GetEffectLight() { @@ -5808,7 +5807,7 @@ bool CObject::RunProgram(int rank) // Calculates the matrix for transforming the object. -// Geturns true if the matrix has changed. +// Returns true if the matrix has changed. // The rotations occur in the order Y, Z and X. bool CObject::UpdateTransformObject(int part, bool bForceUpdate) @@ -6452,7 +6451,7 @@ Character* CObject::GetCharacter() } -// Geturns the absolute time. +// Returns the absolute time. float CObject::GetAbsTime() { @@ -7406,35 +7405,35 @@ CScript* CObject::GetRunScript() return m_runScript; } -// Geturns the variables of "this" for CBOT. +// Returns the variables of "this" for CBOT. CBotVar* CObject::GetBotVar() { return m_botVar; } -// Geturns the physics associated to the object. +// Returns the physics associated to the object. CPhysics* CObject::GetPhysics() { return m_physics; } -// Geturns the brain associated to the object. +// Returns the brain associated to the object. CBrain* CObject::GetBrain() { return m_brain; } -// Geturns the movement associated to the object. +// Returns the movement associated to the object. CMotion* CObject::GetMotion() { return m_motion; } -// Geturns the controller associated to the object. +// Returns the controller associated to the object. CAuto* CObject::GetAuto() { diff --git a/src/object/object.h b/src/object/object.h index b555856..ae3b596 100644 --- a/src/object/object.h +++ b/src/object/object.h @@ -14,7 +14,10 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// object.h +/** + * \file object/object.h + * \brief CObject - base class for all game objects + */ #pragma once diff --git a/src/object/object_ids.h b/src/object/object_ids.h index 2d9c1a8..62c066b 100644 --- a/src/object/object_ids.h +++ b/src/object/object_ids.h @@ -16,6 +16,7 @@ #pragma once + enum ObjectType { OBJECT_NULL = 0, // object destroyed diff --git a/src/object/robotmain.h b/src/object/robotmain.h index e475c43..cb0cd7f 100644 --- a/src/object/robotmain.h +++ b/src/object/robotmain.h @@ -14,10 +14,14 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// robotmain.h +/** + * \file object/robotmain.h + * \brief CRobotMain - main class of Colobot game engine + */ #pragma once + #include "common/global.h" #include "common/singleton.h" diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index a3c680b..f56f81d 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -14,29 +14,32 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// physics.cpp +#include "physics/physics.h" -#include -#include - -#include "math/geometry.h" -#include "graphics/engine/engine.h" -#include "common/global.h" #include "common/event.h" +#include "common/global.h" #include "common/iman.h" + +#include "graphics/engine/camera.h" +#include "graphics/engine/engine.h" #include "graphics/engine/lightman.h" +#include "graphics/engine/pyro.h" #include "graphics/engine/terrain.h" #include "graphics/engine/water.h" -#include "graphics/engine/camera.h" -#include "graphics/engine/pyro.h" -#include "script/cmdtoken.h" -#include "physics/physics.h" + +#include "math/geometry.h" + #include "object/brain.h" #include "object/motion/motion.h" #include "object/motion/motionhuman.h" #include "object/task/task.h" +#include "script/cmdtoken.h" + +#include +#include + const float LANDING_SPEED = 3.0f; diff --git a/src/physics/physics.h b/src/physics/physics.h index e8a1f84..db88e8c 100644 --- a/src/physics/physics.h +++ b/src/physics/physics.h @@ -15,17 +15,18 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -#pragma once - /** * \file physics/physics.h * \brief Responsible for physics "and more" in game */ +#pragma once #include "common/global.h" + #include "object/object.h" + #include "math/vector.h" diff --git a/src/plugins/plugininterface.h b/src/plugins/plugininterface.h index 6554b44..838dbfd 100644 --- a/src/plugins/plugininterface.h +++ b/src/plugins/plugininterface.h @@ -14,17 +14,17 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// plugininterface.h - /** - * @file plugin/plugininterface.h - * @brief Generic plugin interface + * \file plugins/plugininterface.h + * \brief Generic plugin interface */ #pragma once + #include + #define PLUGIN_INTERFACE(class_type) \ static class_type* Plugin##class_type; \ extern "C" void InstallPluginEntry() { Plugin##class_type = new class_type(); Plugin##class_type->InstallPlugin(); } \ @@ -37,29 +37,29 @@ /** -* @class CPluginInterface -* -* @brief Generic plugin interface. All plugins that will be managed by plugin manager have to derive from this class. -* -*/ + * \class CPluginInterface + * + * \brief Generic plugin interface. All plugins that will be managed by plugin manager have to derive from this class. + * + */ class CPluginInterface { public: /** Function to get plugin name or description - * @return returns plugin name + * \return returns plugin name */ - inline virtual std::string PluginName() { return "abc"; }; + inline virtual std::string PluginName() { return "abc"; } /** Function to get plugin version. 1 means version 0.01, 2 means 0.02 etc. - * @return number indicating plugin version + * \return number indicating plugin version */ - inline virtual int PluginVersion() { return 0; }; + inline virtual int PluginVersion() { return 0; } /** Function to initialize plugin */ - inline virtual void InstallPlugin() {}; + inline virtual void InstallPlugin() {} /** Function called before removing plugin */ - inline virtual bool UninstallPlugin(std::string &) { return true; }; + inline virtual bool UninstallPlugin(std::string &) { return true; } }; diff --git a/src/plugins/pluginloader.cpp b/src/plugins/pluginloader.cpp index fd8ce74..bd0c8be 100644 --- a/src/plugins/pluginloader.cpp +++ b/src/plugins/pluginloader.cpp @@ -14,10 +14,8 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// pluginloader.cpp - -#include "pluginloader.h" +#include "plugins/pluginloader.h" CPluginLoader::CPluginLoader(std::string filename) @@ -57,7 +55,7 @@ bool CPluginLoader::UnloadPlugin() return true; } - bool (*uninstall)(std::string &) = (bool (*)(std::string &)) lt_dlsym(mHandle, "UninstallPluginEntry"); + bool (*uninstall)(std::string &) = reinterpret_cast( lt_dlsym(mHandle, "UninstallPluginEntry") ); if (!uninstall) { GetLogger()->Error("Error getting UninstallPluginEntry for plugin %s: %s\n", mFilename.c_str(), lt_dlerror()); return false; @@ -88,13 +86,13 @@ bool CPluginLoader::LoadPlugin() return false; } - void (*install)() = (void (*)()) lt_dlsym(mHandle, "InstallPluginEntry"); + void (*install)() = reinterpret_cast( lt_dlsym(mHandle, "InstallPluginEntry") ); if (!install) { GetLogger()->Error("Error getting InstallPluginEntry for plugin %s: %s\n", mFilename.c_str(), lt_dlerror()); return false; } - CPluginInterface* (*getInterface)() = (CPluginInterface* (*)()) lt_dlsym(mHandle, "GetPluginInterfaceEntry"); + CPluginInterface* (*getInterface)() = reinterpret_cast( lt_dlsym(mHandle, "GetPluginInterfaceEntry") ); if (!getInterface) { GetLogger()->Error("Error getting GetPluginInterfaceEntry for plugin %s: %s\n", mFilename.c_str(), lt_dlerror()); diff --git a/src/plugins/pluginloader.h b/src/plugins/pluginloader.h index 3dfa20b..e8c2c73 100644 --- a/src/plugins/pluginloader.h +++ b/src/plugins/pluginloader.h @@ -14,68 +14,67 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// pluginloader.h - /** - * @file plugin/pluginloader.h - * @brief Plugin loader interface + * \file plugins/pluginloader.h + * \brief Plugin loader interface */ #pragma once -#include -#include #include "common/logger.h" -#include "plugininterface.h" +#include "plugins/plugininterface.h" + +#include +#include /** -* @class CPluginLoader -* -* @brief Plugin loader interface. Plugin manager uses this class to load plugins. -* -*/ + * \class CPluginLoader + * + * \brief Plugin loader interface. Plugin manager uses this class to load plugins. + * + */ class CPluginLoader { public: /** Class contructor - * @param std::string plugin filename + * \param filename plugin filename */ - CPluginLoader(std::string); + CPluginLoader(std::string filename); /** Function to get plugin name or description - * @return returns plugin name + * \return returns plugin name */ std::string GetName(); /** Function to get plugin version - * @return returns plugin version + * \return returns plugin version */ int GetVersion(); /** Function to unload plugin - * @return returns true on success + * \return returns true on success */ bool UnloadPlugin(); /** Function to load plugin - * @return returns true on success + * \return returns true on success */ bool LoadPlugin(); /** Function to check if plugin is loaded - * @return returns true if plugin is loaded + * \return returns true if plugin is loaded */ bool IsLoaded(); /** Function to set plugin filename - * @return returns true on success. Action can fail if plugin was loaded and cannot be unloaded + * \return returns true on success. Action can fail if plugin was loaded and cannot be unloaded */ bool SetFilename(std::string); /** Function to get plugin filename - * @return returns plugin filename + * \return returns plugin filename */ std::string GetFilename(); diff --git a/src/plugins/pluginmanager.cpp b/src/plugins/pluginmanager.cpp index 39d1d17..f4dbcdb 100644 --- a/src/plugins/pluginmanager.cpp +++ b/src/plugins/pluginmanager.cpp @@ -14,10 +14,8 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// pluginmanager.cpp - -#include "pluginmanager.h" +#include "plugins/pluginmanager.h" template<> CPluginManager* CSingleton::mInstance = nullptr; diff --git a/src/plugins/pluginmanager.h b/src/plugins/pluginmanager.h index 7a69820..2798483 100644 --- a/src/plugins/pluginmanager.h +++ b/src/plugins/pluginmanager.h @@ -14,33 +14,32 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// pluginmanager.h - /** - * @file plugin/pluginmanager.h - * @brief Plugin manager class. + * \file plugins/pluginmanager.h + * \brief Plugin manager class. */ #pragma once -#include -#include -#include #include "common/logger.h" #include "common/profile.h" #include "common/singleton.h" -#include "pluginloader.h" +#include "plugins/pluginloader.h" + +#include +#include +#include /** -* @class CPluginManager -* -* @brief Plugin manager class. Plugin manager can load plugins from colobot.ini or manually specified files. -* -*/ + * \class CPluginManager + * + * \brief Plugin manager class. Plugin manager can load plugins from colobot.ini or manually specified files. + * + */ class CPluginManager : public CSingleton { public: CPluginManager(); @@ -51,31 +50,31 @@ class CPluginManager : public CSingleton { void LoadFromProfile(); /** Function loads specified plugin - * @param std::string plugin filename - * @return returns true on success + * \param filename plugin filename + * \return returns true on success */ - bool LoadPlugin(std::string); + bool LoadPlugin(std::string filename); /** Function unloads specified plugin - * @param std::string plugin filename - * @return returns true on success + * \param filename plugin filename + * \return returns true on success */ - bool UnloadPlugin(std::string); + bool UnloadPlugin(std::string filename); /** Function adds path to be checked when searching for plugin file. If path was already added it will be ignored - * @param std::string plugin search path - * @return returns true on success + * \param dir plugin search path + * \return returns true on success */ - bool AddSearchDirectory(std::string); + bool AddSearchDirectory(std::string dir); /** Function removes path from list - * @param std::string plugin search path - * @return returns true on success + * \param dir plugin search path + * \return returns true on success */ - bool RemoveSearchDirectory(std::string); + bool RemoveSearchDirectory(std::string dir); /** Function tries to unload all plugins - * @return returns true on success + * \return returns true on success */ bool UnloadAllPlugins(); diff --git a/src/script/cbottoken.h b/src/script/cbottoken.h index 1f2d6e7..f5b7b70 100644 --- a/src/script/cbottoken.h +++ b/src/script/cbottoken.h @@ -14,7 +14,10 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// cbottoken.h +/** + * \file script/cbottoken.h + * \brief Functions to parse some CBot-related tokens + */ #pragma once diff --git a/src/script/cmdtoken.h b/src/script/cmdtoken.h index 812cec7..fe831f1 100644 --- a/src/script/cmdtoken.h +++ b/src/script/cmdtoken.h @@ -14,10 +14,14 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// cmdtoken.h +/** + * \file script/cmdtoken.h + * \brief Functions to parse commands from level files + */ #pragma once + #include "graphics/engine/water.h" #include "graphics/engine/engine.h" #include "graphics/engine/pyro.h" diff --git a/src/script/script.cpp b/src/script/script.cpp index 001443b..8471df5 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -14,25 +14,30 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// script.cpp - #include "script/script.h" #include "app/app.h" + #include "common/global.h" #include "common/iman.h" #include "common/restext.h" + #include "graphics/engine/terrain.h" #include "graphics/engine/water.h" #include "graphics/engine/text.h" + #include "math/geometry.h" #include "math/vector.h" + #include "object/object.h" #include "object/robotmain.h" #include "object/task/taskmanager.h" + #include "physics/physics.h" + #include "script/cbottoken.h" + #include "ui/interface.h" #include "ui/edit.h" #include "ui/list.h" diff --git a/src/script/script.h b/src/script/script.h index 5c1118f..dbd66a2 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -14,16 +14,20 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// script.h +/** + * \file script/script.h + * \brief CBot script runner + */ #pragma once -#include - #include "common/event.h" + #include "CBot/CBotDll.h" +#include + class CInstanceManager; class CObject; diff --git a/src/sound/sound.h b/src/sound/sound.h index 1f3fea9..c2b890f 100644 --- a/src/sound/sound.h +++ b/src/sound/sound.h @@ -15,15 +15,14 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// sound.h - /** - * @file sound/sound.h - * @brief Sound plugin interface + * \file sound/sound.h + * \brief Sound plugin interface */ #pragma once + #include "math/vector.h" #include "common/iman.h" @@ -136,8 +135,7 @@ enum Sound /** - * \public - * \enum SoundNext sound/sound.h + * \enum SoundNext * \brief Enum representing operation that will be performend on a sound at given time **/ enum SoundNext @@ -149,9 +147,9 @@ enum SoundNext /** -* @class CSoundInterface +* \class CSoundInterface * -* @brief Sound plugin interface +* \brief Sound plugin interface * */ class CSoundInterface : public CPluginInterface @@ -164,7 +162,7 @@ class CSoundInterface : public CPluginInterface inline virtual ~CSoundInterface() {}; /** Function to initialize sound device - * @param bool b3D - enable support for 3D sound + * \param b3D - enable support for 3D sound */ inline virtual bool Create(bool b3D) { return true; }; @@ -182,133 +180,133 @@ class CSoundInterface : public CPluginInterface /** Function called to cache sound effect file. * This function is called by plugin interface for each file. - * @param Sound bSound - id of a file, will be used to identify sound files - * @param std::string bFile - file to load - * @return return true on success + * \param bSound - id of a file, will be used to identify sound files + * \param bFile - file to load + * \return return true on success */ inline virtual bool Cache(Sound bSound, std::string bFile) { return true; }; - /** Geturn if plugin is enabled - * @return return true if plugin is enabled + /** Return if plugin is enabled + * \return return true if plugin is enabled */ inline virtual bool GetEnable() {return true;}; /** Change sound mode to 2D/3D - * @param bool bMode - true to enable 3D sound + * \param bMode - true to enable 3D sound */ inline virtual void SetSound3D(bool bMode) {}; - /** Geturn if we use 3D sound - * @return true if we have 3D sound enabled + /** Return if we use 3D sound + * \return true if we have 3D sound enabled */ inline virtual bool GetSound3D() {return true;}; - /** Geturn if we have 3D sound capable card - * @return true for 3D sound support + /** Return if we have 3D sound capable card + * \return true for 3D sound support */ inline virtual bool GetSound3DCap() {return true;}; /** Change global sound volume - * @param int volume - range from 0 to MAXVOLUME + * \param volume - range from 0 to MAXVOLUME */ inline virtual void SetAudioVolume(int volume) {}; - /** Geturn global sound volume - * @return global volume as int in range from 0 to MAXVOLUME + /** Return global sound volume + * \return global volume as int in range from 0 to MAXVOLUME */ inline virtual int GetAudioVolume() {return 0;}; /** Set music volume - * @param int volume - range from 0 to MAXVOLUME + * \param volume - range from 0 to MAXVOLUME */ inline virtual void SetMusicVolume(int volume) {}; - /** Geturn music volume - * @return music volume as int in range from 0 to MAXVOLUME + /** Return music volume + * \return music volume as int in range from 0 to MAXVOLUME */ inline virtual int GetMusicVolume() {return 0;}; /** Set listener position - * @param Math::Vector eye - position of listener - * @param Math::Vector lookat - direction listener is looking at + * \param eye - position of listener + * \param lookat - direction listener is looking at */ inline virtual void SetListener(Math::Vector eye, Math::Vector lookat) {}; /** Update data each frame - * @param float rTime - time since last update + * \param rTime - time since last update */ inline virtual void FrameMove(float rTime) {}; /** Play specific sound - * @param Sound sound - sound to play - * @param float amplitude - change amplitude of sound before playing - * @param float frequency - change sound frequency before playing (0.5 octave down, 2.0 octave up) - * @param bool bLoop - loop sound - * @return identifier of channel that sound will be played on + * \param sound - sound to play + * \param amplitude - change amplitude of sound before playing + * \param frequency - change sound frequency before playing (0.5 octave down, 2.0 octave up) + * \param bLoop - loop sound + * \return identifier of channel that sound will be played on */ inline virtual int Play(Sound sound, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false) {return 0;}; /** Play specific sound - * @param Sound sound - sound to play - * @param Math:Vector pos - position of sound in space - * @param float amplitude - change amplitude of sound before playing - * @param float frequency - change sound frequency before playing (0.5 octave down, 2.0 octave up) - * @param bool bLoop - loop sound - * @return identifier of channel that sound will be played on + * \param sound - sound to play + * \param pos - position of sound in space + * \param amplitude - change amplitude of sound before playing + * \param frequency - change sound frequency before playing (0.5 octave down, 2.0 octave up) + * \param bLoop - loop sound + * \return identifier of channel that sound will be played on */ inline virtual int Play(Sound sound, Math::Vector pos, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false) {return 0;}; /** Remove all operations that would be made on sound in channel. - * @param int channel - channel to work on - * @return return true on success + * \param channel - channel to work on + * \return return true on success */ inline virtual bool FlushEnvelope(int channel) {return true;}; /** Add envelope to sound. Envelope is a operatino that will be performend on sound in future like changing frequency - * @param int channel - channel to work on - * @param float amplitude - change amplitude - * @param float frequency - change frequency - * @param float time - when to change (sample time) - * @param SoundNext oper - operation to perform - * @return return true on success + * \param channel - channel to work on + * \param amplitude - change amplitude + * \param frequency - change frequency + * \param time - when to change (sample time) + * \param oper - operation to perform + * \return return true on success */ inline virtual bool AddEnvelope(int channel, float amplitude, float frequency, float time, SoundNext oper) {return true;}; /** Set sound position in space - * @param int channel - channel to work on - * @param Math::Vector pos - new positino of a sound - * @return return true on success + * \param channel - channel to work on + * \param pos - new positino of a sound + * \return return true on success */ inline virtual bool Position(int channel, Math::Vector pos) {return true;}; /** Set sound frequency - * @param int channel - channel to work on - * @param float frequency - change sound frequency - * @return return true on success + * \param channel - channel to work on + * \param frequency - change sound frequency + * \return return true on success */ inline virtual bool Frequency(int channel, float frequency) {return true;}; /** Stop playing sound - * @param int channel - channel to work on - * @return return true on success + * \param channel - channel to work on + * \return return true on success */ inline virtual bool Stop(int channel) {return true;}; /** Stop playing all sounds - * @return return true on success + * \return return true on success */ inline virtual bool StopAll() {return true;}; /** Mute/unmute all sounds - * @param bool bMute - * @return return true on success + * \param bMute + * \return return true on success */ inline virtual bool MuteAll(bool bMute) {return true;}; /** Start playing music - * @param int rank - track number - * @param bool bRepeat - repeat playing - * @return return true on success + * \param rank - track number + * \param bRepeat - repeat playing + * \return return true on success */ inline virtual bool PlayMusic(int rank, bool bRepeat) {return true;}; @@ -318,17 +316,17 @@ class CSoundInterface : public CPluginInterface inline virtual bool RestartMusic() {return true;}; /** Susspend paying music - * @return return true on success + * \return return true on success */ inline virtual void SuspendMusic() {}; /** Stop playing music - * @return return true on success + * \return return true on success */ inline virtual void StopMusic() {}; /** Check if music if playing - * @return return true if music is playing + * \return return true if music is playing */ inline virtual bool IsPlayingMusic() {return true;}; }; -- cgit v1.2.3-1-g7c22