Browse Source

Move documentation from implementations to declarations. (#2858)

pull/2862/head
Siddharth singh chouhan 5 years ago committed by GitHub
parent
commit
ba161f623e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      Source/monster.cpp
  2. 4
      Source/monster.h
  3. 9
      Source/movie.cpp
  4. 10
      Source/movie.h
  5. 3
      Source/multi.cpp
  6. 4
      Source/multi.h
  7. 4
      Source/nthread.cpp
  8. 5
      Source/nthread.h
  9. 6
      Source/options.cpp
  10. 7
      Source/options.h

3
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) bool IsTileAvailable(const Monster &monster, Point position)
{ {
if (!IsTileAvailable(position)) if (!IsTileAvailable(position))

4
Source/monster.h

@ -300,6 +300,10 @@ void PrintMonstHistory(int mt);
void PrintUniqueHistory(); void PrintUniqueHistory();
void PlayEffect(Monster &monster, int mode); void PlayEffect(Monster &monster, int mode);
void MissToMonst(Missile &missile, Point position); 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 IsTileAvailable(const Monster &monster, Point position);
bool IsSkel(int mt); bool IsSkel(int mt);
bool IsGoat(int mt); bool IsGoat(int mt);

9
Source/movie.cpp

@ -19,11 +19,6 @@ bool movie_playing;
/** Should the movie play in a loop. */ /** Should the movie play in a loop. */
bool loop_movie; 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) void play_movie(const char *pszMovie, bool userCanClose)
{ {
if (demo::IsRunning()) if (demo::IsRunning())
@ -69,10 +64,6 @@ void play_movie(const char *pszMovie, bool userCanClose)
OutputToLogical(&MousePosition.x, &MousePosition.y); OutputToLogical(&MousePosition.x, &MousePosition.y);
} }
/**
* @brief Fade to black and play a video
* @param pszMovie file path of movie
*/
void PlayInGameMovie(const char *pszMovie) void PlayInGameMovie(const char *pszMovie)
{ {
PaletteFadeOut(8); PaletteFadeOut(8);

10
Source/movie.h

@ -10,7 +10,17 @@ namespace devilution {
extern bool movie_playing; extern bool movie_playing;
extern bool loop_movie; 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); 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); void PlayInGameMovie(const char *pszMovie);
} // namespace devilution } // namespace devilution

3
Source/multi.cpp

@ -540,9 +540,6 @@ void multi_net_ping()
sglTimeoutStart = SDL_GetTicks(); sglTimeoutStart = SDL_GetTicks();
} }
/**
* @return Always true for singleplayer
*/
bool multi_handle_delta() bool multi_handle_delta()
{ {
if (gbGameDestroyed) { if (gbGameDestroyed) {

4
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_msg_countdown();
void multi_player_left(int pnum, int reason); void multi_player_left(int pnum, int reason);
void multi_net_ping(); void multi_net_ping();
/**
* @return Always true for singleplayer
*/
bool multi_handle_delta(); bool multi_handle_delta();
void multi_process_network_packets(); void multi_process_network_packets();
void multi_send_zero_packet(int pnum, _cmd_id bCmd, byte *pbSrc, DWORD dwLen); void multi_send_zero_packet(int pnum, _cmd_id bCmd, byte *pbSrc, DWORD dwLen);

4
Source/nthread.cpp

@ -211,10 +211,6 @@ void nthread_ignore_mutex(bool bStart)
sgbThreadIsRunning = 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() bool nthread_has_500ms_passed()
{ {
int currentTickCount = SDL_GetTicks(); int currentTickCount = SDL_GetTicks();

5
Source/nthread.h

@ -25,6 +25,11 @@ void nthread_set_turn_upper_bit();
void nthread_start(bool setTurnUpperBit); void nthread_start(bool setTurnUpperBit);
void nthread_cleanup(); void nthread_cleanup();
void nthread_ignore_mutex(bool bStart); 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(); bool nthread_has_500ms_passed();
/** /**
* @brief Calculates the progress in time to the next game tick * @brief Calculates the progress in time to the next game tick

6
Source/options.cpp

@ -206,9 +206,6 @@ bool GetIniValue(const char *sectionName, const char *keyName, char *string, int
Options sgOptions; Options sgOptions;
bool sbWasOptionsLoaded = false; bool sbWasOptionsLoaded = false;
/**
* @brief Load game configurations from ini file
*/
void LoadOptions() void LoadOptions()
{ {
sgOptions.Diablo.bIntro = GetIniBool("Diablo", "Intro", true); sgOptions.Diablo.bIntro = GetIniBool("Diablo", "Intro", true);
@ -359,9 +356,6 @@ void LoadOptions()
sbWasOptionsLoaded = true; sbWasOptionsLoaded = true;
} }
/**
* @brief Save game configurations to ini file
*/
void SaveOptions() void SaveOptions()
{ {
SetIniValue("Diablo", "Intro", sgOptions.Diablo.bIntro); SetIniValue("Diablo", "Intro", sgOptions.Diablo.bIntro);

7
Source/options.h

@ -172,7 +172,14 @@ void SetIniValue(const char *sectionName, const char *keyName, const char *value
extern Options sgOptions; extern Options sgOptions;
extern bool sbWasOptionsLoaded; extern bool sbWasOptionsLoaded;
/**
* @brief Save game configurations to ini file
*/
void SaveOptions(); void SaveOptions();
/**
* @brief Load game configurations from ini file
*/
void LoadOptions(); void LoadOptions();
} // namespace devilution } // namespace devilution

Loading…
Cancel
Save