Implement partial parallelisation of non-map mode viewport rendering

This commit is contained in:
Jonathan G Rennison
2022-11-09 22:24:31 +00:00
parent 07b752fe69
commit 7685c36f35
12 changed files with 479 additions and 269 deletions

View File

@@ -18,6 +18,7 @@
#include "vehicle_base.h"
struct TileInfo;
struct ViewportDrawerDynamic;
static const int TILE_HEIGHT_STEP = 50; ///< One Z unit tile height difference is displayed as 50m.
@@ -69,7 +70,7 @@ void DrawGroundSprite(SpriteID image, PaletteID pal, const SubSprite *sub = null
void DrawGroundSpriteAt(SpriteID image, PaletteID pal, int32 x, int32 y, int z, const SubSprite *sub = nullptr, int extra_offs_x = 0, int extra_offs_y = 0);
void AddSortableSpriteToDraw(SpriteID image, PaletteID pal, int x, int y, int w, int h, int dz, int z, bool transparent = false, int bb_offset_x = 0, int bb_offset_y = 0, int bb_offset_z = 0, const SubSprite *sub = nullptr);
void AddChildSpriteScreen(SpriteID image, PaletteID pal, int x, int y, bool transparent = false, const SubSprite *sub = nullptr, bool scale = true, bool relative = true);
void ViewportAddString(const DrawPixelInfo *dpi, ZoomLevel small_from, const ViewportSign *sign, StringID string_normal, StringID string_small, StringID string_small_shadow, uint64 params_1, uint64 params_2 = 0, Colours colour = INVALID_COLOUR);
void ViewportAddString(ViewportDrawerDynamic *vdd, const DrawPixelInfo *dpi, ZoomLevel small_from, const ViewportSign *sign, StringID string_normal, StringID string_small, StringID string_small_shadow, uint64 params_1, uint64 params_2 = 0, Colours colour = INVALID_COLOUR);
void StartSpriteCombine();
@@ -87,7 +88,8 @@ void SetRedErrorSquare(TileIndex tile);
void SetTileSelectSize(int w, int h);
void SetTileSelectBigSize(int ox, int oy, int sx, int sy);
void ViewportDoDraw(Viewport *vp, int left, int top, int right, int bottom);
void ViewportDoDraw(Viewport *vp, int left, int top, int right, int bottom, uint8 display_flags);
void ViewportDoDrawProcessAllPending();
bool ScrollWindowToTile(TileIndex tile, Window *w, bool instant = false);
bool ScrollWindowTo(int x, int y, int z, Window *w, bool instant = false);