Merge branch 'master' into jgrpp

# Conflicts:
#	.github/workflows/release-linux.yml
#	src/base_consist.h
#	src/blitter/32bpp_optimized.cpp
#	src/blitter/32bpp_optimized.hpp
#	src/blitter/32bpp_sse2.hpp
#	src/blitter/8bpp_optimized.hpp
#	src/gfx_func.h
#	src/industry_cmd.cpp
#	src/industrytype.h
#	src/linkgraph/linkgraphjob.cpp
#	src/mixer.cpp
#	src/newgrf_callbacks.h
#	src/openttd.cpp
#	src/os/macosx/macos.mm
#	src/os/windows/win32.cpp
#	src/pathfinder/npf/npf.cpp
#	src/road_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/sound.cpp
#	src/spritecache.cpp
#	src/spriteloader/spriteloader.hpp
#	src/station_map.h
#	src/timetable_cmd.cpp
#	src/timetable_cmd.h
#	src/timetable_gui.cpp
#	src/town_cmd.cpp
#	src/vehicle_cmd.cpp
#	src/vehicle_gui_base.h
#	src/video/opengl.cpp
#	src/video/opengl.h
#	src/viewport.cpp
This commit is contained in:
Jonathan G Rennison
2023-12-17 22:36:44 +00:00
126 changed files with 750 additions and 1562 deletions

View File

@@ -486,6 +486,21 @@ void DrawBox(const DrawPixelInfo *dpi, int x, int y, int dx1, int dy1, int dx2,
GfxDrawLineUnscaled(dpi, x + dx3, y + dy3, x + dx3 + dx2, y + dy3 + dy2, colour);
}
/**
* Draw the outline of a Rect
* @param r Rect to draw.
* @param colour Colour of the outline.
* @param width Width of the outline.
* @param dash Length of dashes for dashed lines. 0 means solid lines.
*/
void DrawRectOutline(const Rect &r, int colour, int width, int dash)
{
GfxDrawLine(r.left, r.top, r.right, r.top, colour, width, dash);
GfxDrawLine(r.left, r.top, r.left, r.bottom, colour, width, dash);
GfxDrawLine(r.right, r.top, r.right, r.bottom, colour, width, dash);
GfxDrawLine(r.left, r.bottom, r.right, r.bottom, colour, width, dash);
}
/**
* Set the colour remap to be for the given colour.
* @param colour the new colour of the remap.