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/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 +++++- 32 files changed, 81 insertions(+), 63 deletions(-) (limited to 'src/object') 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" -- cgit v1.2.3-1-g7c22