1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Use CoordsXY for sprite_paint_setup

Co-authored-by: Ted John <ted@brambles.org>
This commit is contained in:
ζeh Matt
2021-09-27 22:29:12 +03:00
parent f7d61c67e6
commit cecf4ac202
2 changed files with 4 additions and 8 deletions

View File

@@ -32,13 +32,8 @@
* Paint Quadrant
* rct2: 0x0069E8B0
*/
void sprite_paint_setup(paint_session* session, const uint16_t x, const uint16_t y)
void sprite_paint_setup(paint_session* session, const CoordsXY& pos)
{
if ((x & 0xe000) | (y & 0xe000))
{
return;
}
if (gTrackDesignSaveMode || (session->ViewFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES))
{
return;
@@ -52,7 +47,7 @@ void sprite_paint_setup(paint_session* session, const uint16_t x, const uint16_t
const bool highlightPathIssues = (session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES);
for (const auto* spr : EntityTileList({ x, y }))
for (const auto* spr : EntityTileList(pos))
{
if (highlightPathIssues)
{

View File

@@ -12,8 +12,9 @@
#include "../../common.h"
struct paint_session;
struct CoordsXY;
void sprite_paint_setup(paint_session* session, const uint16_t x, const uint16_t y);
void sprite_paint_setup(paint_session* session, const CoordsXY& pos);
template<typename T> void PaintEntity(paint_session* session, const T* entity, int32_t imageDirection);