From ba161f623ea43ffbd274da514a19a2c89dbf7fbd Mon Sep 17 00:00:00 2001 From: Siddharth singh chouhan <63919605+Sid672@users.noreply.github.com> Date: Mon, 13 Sep 2021 19:15:38 +0530 Subject: [PATCH] Move documentation from implementations to declarations. (#2858) --- Source/monster.cpp | 3 --- Source/monster.h | 4 ++++ Source/movie.cpp | 9 --------- Source/movie.h | 10 ++++++++++ Source/multi.cpp | 3 --- Source/multi.h | 4 ++++ Source/nthread.cpp | 4 ---- Source/nthread.h | 5 +++++ Source/options.cpp | 6 ------ Source/options.h | 7 +++++++ 10 files changed, 30 insertions(+), 25 deletions(-) diff --git a/Source/monster.cpp b/Source/monster.cpp index 76290b938..317bc1f78 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -4800,9 +4800,6 @@ void MissToMonst(Missile &missile, Point position) } } -/** - * @brief Check that the given tile is available to the monster - */ bool IsTileAvailable(const Monster &monster, Point position) { if (!IsTileAvailable(position)) diff --git a/Source/monster.h b/Source/monster.h index 779e1e393..0b864c248 100644 --- a/Source/monster.h +++ b/Source/monster.h @@ -300,6 +300,10 @@ void PrintMonstHistory(int mt); void PrintUniqueHistory(); void PlayEffect(Monster &monster, int mode); void MissToMonst(Missile &missile, Point position); + +/** + * @brief Check that the given tile is available to the monster + */ bool IsTileAvailable(const Monster &monster, Point position); bool IsSkel(int mt); bool IsGoat(int mt); diff --git a/Source/movie.cpp b/Source/movie.cpp index 6c2958595..54281dba9 100644 --- a/Source/movie.cpp +++ b/Source/movie.cpp @@ -19,11 +19,6 @@ bool movie_playing; /** Should the movie play in a loop. */ bool loop_movie; -/** - * @brief Start playback of a given video. - * @param pszMovie The file name of the video - * @param user_can_close Set to false to make the video unskippable. - */ void play_movie(const char *pszMovie, bool userCanClose) { if (demo::IsRunning()) @@ -69,10 +64,6 @@ void play_movie(const char *pszMovie, bool userCanClose) OutputToLogical(&MousePosition.x, &MousePosition.y); } -/** - * @brief Fade to black and play a video - * @param pszMovie file path of movie - */ void PlayInGameMovie(const char *pszMovie) { PaletteFadeOut(8); diff --git a/Source/movie.h b/Source/movie.h index cad3426c7..8702075f0 100644 --- a/Source/movie.h +++ b/Source/movie.h @@ -10,7 +10,17 @@ namespace devilution { extern bool movie_playing; extern bool loop_movie; +/** + * @brief Start playback of a given video. + * @param pszMovie The file name of the video + * @param user_can_close Set to false to make the video unskippable. + */ void play_movie(const char *pszMovie, bool user_can_close); + +/** + * @brief Fade to black and play a video + * @param pszMovie file path of movie + */ void PlayInGameMovie(const char *pszMovie); } // namespace devilution diff --git a/Source/multi.cpp b/Source/multi.cpp index a41c67076..52f888276 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -540,9 +540,6 @@ void multi_net_ping() sglTimeoutStart = SDL_GetTicks(); } -/** - * @return Always true for singleplayer - */ bool multi_handle_delta() { if (gbGameDestroyed) { diff --git a/Source/multi.h b/Source/multi.h index 45780e906..2281fcb7c 100644 --- a/Source/multi.h +++ b/Source/multi.h @@ -55,6 +55,10 @@ void multi_send_msg_packet(uint32_t pmask, byte *src, BYTE len); void multi_msg_countdown(); void multi_player_left(int pnum, int reason); void multi_net_ping(); + +/** + * @return Always true for singleplayer + */ bool multi_handle_delta(); void multi_process_network_packets(); void multi_send_zero_packet(int pnum, _cmd_id bCmd, byte *pbSrc, DWORD dwLen); diff --git a/Source/nthread.cpp b/Source/nthread.cpp index ce3f04f50..1acf2a788 100644 --- a/Source/nthread.cpp +++ b/Source/nthread.cpp @@ -211,10 +211,6 @@ void nthread_ignore_mutex(bool bStart) sgbThreadIsRunning = bStart; } -/** - * @brief Checks if it's time for the logic to advance - * @return True if the engine should tick - */ bool nthread_has_500ms_passed() { int currentTickCount = SDL_GetTicks(); diff --git a/Source/nthread.h b/Source/nthread.h index 507a2ce47..7291d9aa1 100644 --- a/Source/nthread.h +++ b/Source/nthread.h @@ -25,6 +25,11 @@ void nthread_set_turn_upper_bit(); void nthread_start(bool setTurnUpperBit); void nthread_cleanup(); void nthread_ignore_mutex(bool bStart); + +/** + * @brief Checks if it's time for the logic to advance + * @return True if the engine should tick + */ bool nthread_has_500ms_passed(); /** * @brief Calculates the progress in time to the next game tick diff --git a/Source/options.cpp b/Source/options.cpp index 45376b307..0e0c6855d 100644 --- a/Source/options.cpp +++ b/Source/options.cpp @@ -206,9 +206,6 @@ bool GetIniValue(const char *sectionName, const char *keyName, char *string, int Options sgOptions; bool sbWasOptionsLoaded = false; -/** - * @brief Load game configurations from ini file - */ void LoadOptions() { sgOptions.Diablo.bIntro = GetIniBool("Diablo", "Intro", true); @@ -359,9 +356,6 @@ void LoadOptions() sbWasOptionsLoaded = true; } -/** - * @brief Save game configurations to ini file - */ void SaveOptions() { SetIniValue("Diablo", "Intro", sgOptions.Diablo.bIntro); diff --git a/Source/options.h b/Source/options.h index b77fa7cef..c8121dfb5 100644 --- a/Source/options.h +++ b/Source/options.h @@ -172,7 +172,14 @@ void SetIniValue(const char *sectionName, const char *keyName, const char *value extern Options sgOptions; extern bool sbWasOptionsLoaded; +/** + * @brief Save game configurations to ini file + */ void SaveOptions(); + +/** + * @brief Load game configurations from ini file + */ void LoadOptions(); } // namespace devilution