You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
2.3 KiB
106 lines
2.3 KiB
|
6 years ago
|
/**
|
||
|
|
* @file scrollrt.h
|
||
|
|
*
|
||
|
|
* Interface of functionality for rendering the dungeons, monsters and calling other render routines.
|
||
|
|
*/
|
||
|
5 years ago
|
#pragma once
|
||
|
8 years ago
|
|
||
|
5 years ago
|
#include <cstdint>
|
||
|
5 years ago
|
|
||
|
5 years ago
|
#include "engine.h"
|
||
|
5 years ago
|
#include "engine/animationinfo.h"
|
||
|
|
#include "engine/point.hpp"
|
||
|
5 years ago
|
|
||
|
5 years ago
|
namespace devilution {
|
||
|
6 years ago
|
|
||
|
5 years ago
|
enum class ScrollDirection : uint8_t {
|
||
|
|
None,
|
||
|
|
North,
|
||
|
|
NorthEast,
|
||
|
|
East,
|
||
|
|
SouthEast,
|
||
|
|
South,
|
||
|
|
SouthWest,
|
||
|
|
West,
|
||
|
|
NorthWest,
|
||
|
5 years ago
|
};
|
||
|
6 years ago
|
|
||
|
5 years ago
|
extern int LightTableIndex;
|
||
|
5 years ago
|
extern uint32_t level_cel_block;
|
||
|
7 years ago
|
extern char arch_draw_type;
|
||
|
5 years ago
|
extern bool cel_transparency_active;
|
||
|
|
extern bool cel_foliage_active;
|
||
|
7 years ago
|
extern int level_piece_id;
|
||
|
5 years ago
|
extern bool AutoMapShowItems;
|
||
|
4 years ago
|
extern bool frameflag;
|
||
|
8 years ago
|
|
||
|
5 years ago
|
/**
|
||
|
|
* @brief Returns the offset for the walking animation
|
||
|
|
* @param animationInfo the current active walking animation
|
||
|
|
* @param dir walking direction
|
||
|
|
* @param cameraMode Adjusts the offset relative to the camera
|
||
|
|
*/
|
||
|
5 years ago
|
Displacement GetOffsetForWalking(const AnimationInfo &animationInfo, const Direction dir, bool cameraMode = false);
|
||
|
5 years ago
|
|
||
|
5 years ago
|
/**
|
||
|
|
* @brief Clear cursor state
|
||
|
|
*/
|
||
|
7 years ago
|
void ClearCursor();
|
||
|
5 years ago
|
|
||
|
|
/**
|
||
|
|
* @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
|
||
|
|
*/
|
||
|
6 years ago
|
void ShiftGrid(int *x, int *y, int horizontal, int vertical);
|
||
|
5 years ago
|
|
||
|
|
/**
|
||
|
|
* @brief Gets the number of rows covered by the main panel
|
||
|
|
*/
|
||
|
6 years ago
|
int RowsCoveredByPanel();
|
||
|
5 years ago
|
|
||
|
|
/**
|
||
|
|
* @brief Calculate the offset needed for centering tiles in view area
|
||
|
|
* @param offsetX Offset in pixels
|
||
|
|
* @param offsetY Offset in pixels
|
||
|
|
*/
|
||
|
6 years ago
|
void CalcTileOffset(int *offsetX, int *offsetY);
|
||
|
5 years ago
|
|
||
|
|
/**
|
||
|
|
* @brief Calculate the needed diamond tile to cover the view area
|
||
|
|
* @param columns Tiles needed per row
|
||
|
|
* @param rows Both even and odd rows
|
||
|
|
*/
|
||
|
6 years ago
|
void TilesInView(int *columns, int *rows);
|
||
|
6 years ago
|
void CalcViewportGeometry();
|
||
|
5 years ago
|
|
||
|
5 years ago
|
/**
|
||
|
|
* @brief Render the whole screen black
|
||
|
|
*/
|
||
|
7 years ago
|
void ClearScreenBuffer();
|
||
|
8 years ago
|
#ifdef _DEBUG
|
||
|
5 years ago
|
|
||
|
|
/**
|
||
|
|
* @brief Scroll the screen when mouse is close to the edge
|
||
|
|
*/
|
||
|
7 years ago
|
void ScrollView();
|
||
|
8 years ago
|
#endif
|
||
|
5 years ago
|
|
||
|
|
/**
|
||
|
|
* @brief Initialize the FPS meter
|
||
|
|
*/
|
||
|
6 years ago
|
void EnableFrameCount();
|
||
|
5 years ago
|
|
||
|
|
/**
|
||
|
|
* @brief Redraw screen
|
||
|
|
*/
|
||
|
5 years ago
|
void scrollrt_draw_game_screen();
|
||
|
5 years ago
|
|
||
|
|
/**
|
||
|
|
* @brief Render the game
|
||
|
|
*/
|
||
|
7 years ago
|
void DrawAndBlit();
|
||
|
8 years ago
|
|
||
|
5 years ago
|
} // namespace devilution
|