Browse Source

Move documentation from implementations to declarations #2735 (#2836)

pull/2840/head
Siddharth singh chouhan 5 years ago committed by GitHub
parent
commit
ec1850e295
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 37
      Source/scrollrt.cpp
  2. 45
      Source/scrollrt.h

37
Source/scrollrt.cpp

@ -1419,30 +1419,18 @@ Displacement GetOffsetForWalking(const AnimationInfo &animationInfo, const Direc
return offset;
}
/**
* @brief Clear cursor state
*/
void ClearCursor() // CODE_FIX: this was supposed to be in cursor.cpp
{
sgdwCursWdt = 0;
sgdwCursWdtOld = 0;
}
/**
* @brief Shifting the view area along the logical grid
* Note: this won't allow you to shift between even and odd rows
* @param horizontal Shift the screen left or right
* @param vertical Shift the screen up or down
*/
void ShiftGrid(int *x, int *y, int horizontal, int vertical)
{
*x += vertical + horizontal;
*y += vertical - horizontal;
}
/**
* @brief Gets the number of rows covered by the main panel
*/
int RowsCoveredByPanel()
{
if (gnScreenWidth <= PANEL_WIDTH) {
@ -1457,11 +1445,6 @@ int RowsCoveredByPanel()
return rows;
}
/**
* @brief Calculate the offset needed for centering tiles in view area
* @param offsetX Offset in pixels
* @param offsetY Offset in pixels
*/
void CalcTileOffset(int *offsetX, int *offsetY)
{
int x;
@ -1484,11 +1467,6 @@ void CalcTileOffset(int *offsetX, int *offsetY)
*offsetY = y;
}
/**
* @brief Calculate the needed diamond tile to cover the view area
* @param columns Tiles needed per row
* @param rows Both even and odd rows
*/
void TilesInView(int *rcolumns, int *rrows)
{
int columns = gnScreenWidth / TILE_WIDTH;
@ -1562,9 +1540,6 @@ void CalcViewportGeometry()
extern SDL_Surface *pal_surface;
/**
* @brief Render the whole screen black
*/
void ClearScreenBuffer()
{
lock_buf(3);
@ -1576,9 +1551,6 @@ void ClearScreenBuffer()
}
#ifdef _DEBUG
/**
* @brief Scroll the screen when mouse is close to the edge
*/
void ScrollView()
{
bool scroll;
@ -1658,18 +1630,12 @@ void ScrollView()
}
#endif
/**
* @brief Initialize the FPS meter
*/
void EnableFrameCount()
{
frameflag = !frameflag;
framestart = SDL_GetTicks();
}
/**
* @brief Redraw screen
*/
void scrollrt_draw_game_screen()
{
int hgt = 0;
@ -1698,9 +1664,6 @@ void scrollrt_draw_game_screen()
}
}
/**
* @brief Render the game
*/
void DrawAndBlit()
{
if (!gbRunGame) {

45
Source/scrollrt.h

@ -45,19 +45,64 @@ extern bool AutoMapShowItems;
*/
Displacement GetOffsetForWalking(const AnimationInfo &animationInfo, const Direction dir, bool cameraMode = false);
/**
* @brief Clear cursor state
*/
void ClearCursor();
/**
* @brief Shifting the view area along the logical grid
* Note: this won't allow you to shift between even and odd rows
* @param horizontal Shift the screen left or right
* @param vertical Shift the screen up or down
*/
void ShiftGrid(int *x, int *y, int horizontal, int vertical);
/**
* @brief Gets the number of rows covered by the main panel
*/
int RowsCoveredByPanel();
/**
* @brief Calculate the offset needed for centering tiles in view area
* @param offsetX Offset in pixels
* @param offsetY Offset in pixels
*/
void CalcTileOffset(int *offsetX, int *offsetY);
/**
* @brief Calculate the needed diamond tile to cover the view area
* @param columns Tiles needed per row
* @param rows Both even and odd rows
*/
void TilesInView(int *columns, int *rows);
void CalcViewportGeometry();
/**
* @brief Render the whole screen black
*/
void ClearScreenBuffer();
#ifdef _DEBUG
/**
* @brief Scroll the screen when mouse is close to the edge
*/
void ScrollView();
#endif
/**
* @brief Initialize the FPS meter
*/
void EnableFrameCount();
/**
* @brief Redraw screen
*/
void scrollrt_draw_game_screen();
/**
* @brief Render the game
*/
void DrawAndBlit();
} // namespace devilution

Loading…
Cancel
Save