mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 22:13:07 +01:00
Clang tidy Part 1: Ui Project Function Names (#15956)
* Add NOLINT around STL using classes and vendor functions * Apply clang-tidy to ui project function names * Undo scripting clang-format * Upper case OpenRCT2 and RCT2
This commit is contained in:
@@ -146,39 +146,39 @@ static constexpr const uint16_t RideKeyColours[] = {
|
||||
MapColour(PALETTE_INDEX_161), // COLOUR_KEY_TOILETS
|
||||
};
|
||||
|
||||
static void window_map_close(rct_window* w);
|
||||
static void window_map_resize(rct_window* w);
|
||||
static void window_map_mouseup(rct_window* w, rct_widgetindex widgetIndex);
|
||||
static void window_map_mousedown(rct_window* w, rct_widgetindex widgetIndex, rct_widget* widget);
|
||||
static void window_map_update(rct_window* w);
|
||||
static void window_map_toolupdate(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void window_map_tooldown(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void window_map_tooldrag(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void window_map_toolabort(rct_window* w, rct_widgetindex widgetIndex);
|
||||
static void window_map_scrollgetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height);
|
||||
static void window_map_scrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void window_map_textinput(rct_window* w, rct_widgetindex widgetIndex, char* text);
|
||||
static void window_map_invalidate(rct_window* w);
|
||||
static void window_map_paint(rct_window* w, rct_drawpixelinfo* dpi);
|
||||
static void window_map_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex);
|
||||
static void WindowMapClose(rct_window* w);
|
||||
static void WindowMapResize(rct_window* w);
|
||||
static void WindowMapMouseup(rct_window* w, rct_widgetindex widgetIndex);
|
||||
static void WindowMapMousedown(rct_window* w, rct_widgetindex widgetIndex, rct_widget* widget);
|
||||
static void WindowMapUpdate(rct_window* w);
|
||||
static void WindowMapToolupdate(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMapTooldown(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMapTooldrag(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMapToolabort(rct_window* w, rct_widgetindex widgetIndex);
|
||||
static void WindowMapScrollgetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height);
|
||||
static void WindowMapScrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMapTextinput(rct_window* w, rct_widgetindex widgetIndex, char* text);
|
||||
static void WindowMapInvalidate(rct_window* w);
|
||||
static void WindowMapPaint(rct_window* w, rct_drawpixelinfo* dpi);
|
||||
static void WindowMapScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex);
|
||||
|
||||
static rct_window_event_list window_map_events([](auto& events) {
|
||||
events.close = &window_map_close;
|
||||
events.mouse_up = &window_map_mouseup;
|
||||
events.resize = &window_map_resize;
|
||||
events.mouse_down = &window_map_mousedown;
|
||||
events.update = &window_map_update;
|
||||
events.tool_update = &window_map_toolupdate;
|
||||
events.tool_down = &window_map_tooldown;
|
||||
events.tool_drag = &window_map_tooldrag;
|
||||
events.tool_abort = &window_map_toolabort;
|
||||
events.get_scroll_size = &window_map_scrollgetsize;
|
||||
events.scroll_mousedown = &window_map_scrollmousedown;
|
||||
events.scroll_mousedrag = &window_map_scrollmousedown;
|
||||
events.text_input = &window_map_textinput;
|
||||
events.invalidate = &window_map_invalidate;
|
||||
events.paint = &window_map_paint;
|
||||
events.scroll_paint = &window_map_scrollpaint;
|
||||
events.close = &WindowMapClose;
|
||||
events.mouse_up = &WindowMapMouseup;
|
||||
events.resize = &WindowMapResize;
|
||||
events.mouse_down = &WindowMapMousedown;
|
||||
events.update = &WindowMapUpdate;
|
||||
events.tool_update = &WindowMapToolupdate;
|
||||
events.tool_down = &WindowMapTooldown;
|
||||
events.tool_drag = &WindowMapTooldrag;
|
||||
events.tool_abort = &WindowMapToolabort;
|
||||
events.get_scroll_size = &WindowMapScrollgetsize;
|
||||
events.scroll_mousedown = &WindowMapScrollmousedown;
|
||||
events.scroll_mousedrag = &WindowMapScrollmousedown;
|
||||
events.text_input = &WindowMapTextinput;
|
||||
events.invalidate = &WindowMapInvalidate;
|
||||
events.paint = &WindowMapPaint;
|
||||
events.scroll_paint = &WindowMapScrollpaint;
|
||||
});
|
||||
|
||||
/** rct2: 0x00F1AD61 */
|
||||
@@ -192,32 +192,32 @@ static std::vector<uint8_t> _mapImageData;
|
||||
|
||||
static uint16_t _landRightsToolSize;
|
||||
|
||||
static void window_map_init_map();
|
||||
static void window_map_centre_on_view_point();
|
||||
static void window_map_show_default_scenario_editor_buttons(rct_window* w);
|
||||
static void window_map_draw_tab_images(rct_window* w, rct_drawpixelinfo* dpi);
|
||||
static void window_map_paint_peep_overlay(rct_drawpixelinfo* dpi);
|
||||
static void window_map_paint_train_overlay(rct_drawpixelinfo* dpi);
|
||||
static void window_map_paint_hud_rectangle(rct_drawpixelinfo* dpi);
|
||||
static void window_map_inputsize_land(rct_window* w);
|
||||
static void window_map_inputsize_map(rct_window* w);
|
||||
static void WindowMapInitMap();
|
||||
static void WindowMapCentreOnViewPoint();
|
||||
static void WindowMapShowDefaultScenarioEditorButtons(rct_window* w);
|
||||
static void WindowMapDrawTabImages(rct_window* w, rct_drawpixelinfo* dpi);
|
||||
static void WindowMapPaintPeepOverlay(rct_drawpixelinfo* dpi);
|
||||
static void WindowMapPaintTrainOverlay(rct_drawpixelinfo* dpi);
|
||||
static void WindowMapPaintHudRectangle(rct_drawpixelinfo* dpi);
|
||||
static void WindowMapInputsizeLand(rct_window* w);
|
||||
static void WindowMapInputsizeMap(rct_window* w);
|
||||
|
||||
static void window_map_set_land_rights_tool_update(const ScreenCoordsXY& screenCoords);
|
||||
static void window_map_place_park_entrance_tool_update(const ScreenCoordsXY& screenCoords);
|
||||
static void window_map_set_peep_spawn_tool_update(const ScreenCoordsXY& screenCoords);
|
||||
static void window_map_place_park_entrance_tool_down(const ScreenCoordsXY& screenCoords);
|
||||
static void window_map_set_peep_spawn_tool_down(const ScreenCoordsXY& screenCoords);
|
||||
static void map_window_increase_map_size();
|
||||
static void map_window_decrease_map_size();
|
||||
static void map_window_set_pixels(rct_window* w);
|
||||
static void WindowMapSetLandRightsToolUpdate(const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMapPlaceParkEntranceToolUpdate(const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMapSetPeepSpawnToolUpdate(const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMapPlaceParkEntranceToolDown(const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMapSetPeepSpawnToolDown(const ScreenCoordsXY& screenCoords);
|
||||
static void MapWindowIncreaseMapSize();
|
||||
static void MapWindowDecreaseMapSize();
|
||||
static void MapWindowSetPixels(rct_window* w);
|
||||
|
||||
static CoordsXY map_window_screen_to_map(ScreenCoordsXY screenCoords);
|
||||
static CoordsXY MapWindowScreenToMap(ScreenCoordsXY screenCoords);
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x0068C88A
|
||||
*/
|
||||
rct_window* window_map_open()
|
||||
rct_window* WindowMapOpen()
|
||||
{
|
||||
rct_window* w;
|
||||
|
||||
@@ -256,9 +256,9 @@ rct_window* window_map_open()
|
||||
|
||||
w->map.rotation = get_current_rotation();
|
||||
|
||||
window_map_init_map();
|
||||
WindowMapInitMap();
|
||||
gWindowSceneryRotation = 0;
|
||||
window_map_centre_on_view_point();
|
||||
WindowMapCentreOnViewPoint();
|
||||
|
||||
// Reset land rights tool size
|
||||
_landRightsToolSize = 1;
|
||||
@@ -266,7 +266,7 @@ rct_window* window_map_open()
|
||||
return w;
|
||||
}
|
||||
|
||||
void window_map_reset()
|
||||
void WindowMapReset()
|
||||
{
|
||||
rct_window* w;
|
||||
|
||||
@@ -277,15 +277,15 @@ void window_map_reset()
|
||||
return;
|
||||
}
|
||||
|
||||
window_map_init_map();
|
||||
window_map_centre_on_view_point();
|
||||
WindowMapInitMap();
|
||||
WindowMapCentreOnViewPoint();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x0068D0F1
|
||||
*/
|
||||
static void window_map_close(rct_window* w)
|
||||
static void WindowMapClose(rct_window* w)
|
||||
{
|
||||
_mapImageData.clear();
|
||||
_mapImageData.shrink_to_fit();
|
||||
@@ -300,7 +300,7 @@ static void window_map_close(rct_window* w)
|
||||
*
|
||||
* rct2: 0x0068CFC1
|
||||
*/
|
||||
static void window_map_mouseup(rct_window* w, rct_widgetindex widgetIndex)
|
||||
static void WindowMapMouseup(rct_window* w, rct_widgetindex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
@@ -374,10 +374,10 @@ static void window_map_mouseup(rct_window* w, rct_widgetindex widgetIndex)
|
||||
show_construction_rights();
|
||||
break;
|
||||
case WIDX_LAND_TOOL:
|
||||
window_map_inputsize_land(w);
|
||||
WindowMapInputsizeLand(w);
|
||||
break;
|
||||
case WIDX_MAP_SIZE_SPINNER:
|
||||
window_map_inputsize_map(w);
|
||||
WindowMapInputsizeMap(w);
|
||||
break;
|
||||
case WIDX_MAP_GENERATOR:
|
||||
context_open_window(WC_MAPGEN);
|
||||
@@ -399,7 +399,7 @@ static void window_map_mouseup(rct_window* w, rct_widgetindex widgetIndex)
|
||||
*
|
||||
* rct2: 0x0068D7DC
|
||||
*/
|
||||
static void window_map_resize(rct_window* w)
|
||||
static void WindowMapResize(rct_window* w)
|
||||
{
|
||||
w->flags |= WF_RESIZABLE;
|
||||
w->min_width = 245;
|
||||
@@ -412,15 +412,15 @@ static void window_map_resize(rct_window* w)
|
||||
*
|
||||
* rct2: 0x0068D040
|
||||
*/
|
||||
static void window_map_mousedown(rct_window* w, rct_widgetindex widgetIndex, rct_widget* widget)
|
||||
static void WindowMapMousedown(rct_window* w, rct_widgetindex widgetIndex, rct_widget* widget)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_MAP_SIZE_SPINNER_UP:
|
||||
map_window_increase_map_size();
|
||||
MapWindowIncreaseMapSize();
|
||||
break;
|
||||
case WIDX_MAP_SIZE_SPINNER_DOWN:
|
||||
map_window_decrease_map_size();
|
||||
MapWindowDecreaseMapSize();
|
||||
break;
|
||||
case WIDX_LAND_TOOL_SMALLER:
|
||||
// Decrement land rights tool size
|
||||
@@ -441,17 +441,17 @@ static void window_map_mousedown(rct_window* w, rct_widgetindex widgetIndex, rct
|
||||
*
|
||||
* rct2: 0x0068D7FB
|
||||
*/
|
||||
static void window_map_update(rct_window* w)
|
||||
static void WindowMapUpdate(rct_window* w)
|
||||
{
|
||||
if (get_current_rotation() != w->map.rotation)
|
||||
{
|
||||
w->map.rotation = get_current_rotation();
|
||||
window_map_init_map();
|
||||
window_map_centre_on_view_point();
|
||||
WindowMapInitMap();
|
||||
WindowMapCentreOnViewPoint();
|
||||
}
|
||||
|
||||
for (int32_t i = 0; i < 16; i++)
|
||||
map_window_set_pixels(w);
|
||||
MapWindowSetPixels(w);
|
||||
|
||||
w->Invalidate();
|
||||
|
||||
@@ -478,18 +478,18 @@ static void window_map_update(rct_window* w)
|
||||
*
|
||||
* rct2: 0x0068D093
|
||||
*/
|
||||
static void window_map_toolupdate(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMapToolupdate(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_SET_LAND_RIGHTS:
|
||||
window_map_set_land_rights_tool_update(screenCoords);
|
||||
WindowMapSetLandRightsToolUpdate(screenCoords);
|
||||
break;
|
||||
case WIDX_BUILD_PARK_ENTRANCE:
|
||||
window_map_place_park_entrance_tool_update(screenCoords);
|
||||
WindowMapPlaceParkEntranceToolUpdate(screenCoords);
|
||||
break;
|
||||
case WIDX_PEOPLE_STARTING_POSITION:
|
||||
window_map_set_peep_spawn_tool_update(screenCoords);
|
||||
WindowMapSetPeepSpawnToolUpdate(screenCoords);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -498,15 +498,15 @@ static void window_map_toolupdate(rct_window* w, rct_widgetindex widgetIndex, co
|
||||
*
|
||||
* rct2: 0x0068D074
|
||||
*/
|
||||
static void window_map_tooldown(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMapTooldown(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_BUILD_PARK_ENTRANCE:
|
||||
window_map_place_park_entrance_tool_down(screenCoords);
|
||||
WindowMapPlaceParkEntranceToolDown(screenCoords);
|
||||
break;
|
||||
case WIDX_PEOPLE_STARTING_POSITION:
|
||||
window_map_set_peep_spawn_tool_down(screenCoords);
|
||||
WindowMapSetPeepSpawnToolDown(screenCoords);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -515,7 +515,7 @@ static void window_map_tooldown(rct_window* w, rct_widgetindex widgetIndex, cons
|
||||
*
|
||||
* rct2: 0x0068D088
|
||||
*/
|
||||
static void window_map_tooldrag(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMapTooldrag(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
@@ -535,7 +535,7 @@ static void window_map_tooldrag(rct_window* w, rct_widgetindex widgetIndex, cons
|
||||
*
|
||||
* rct2: 0x0068D055
|
||||
*/
|
||||
static void window_map_toolabort(rct_window* w, rct_widgetindex widgetIndex)
|
||||
static void WindowMapToolabort(rct_window* w, rct_widgetindex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
@@ -565,9 +565,9 @@ static void window_map_toolabort(rct_window* w, rct_widgetindex widgetIndex)
|
||||
*
|
||||
* rct2: 0x0068D7CC
|
||||
*/
|
||||
static void window_map_scrollgetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height)
|
||||
static void WindowMapScrollgetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height)
|
||||
{
|
||||
window_map_invalidate(w);
|
||||
WindowMapInvalidate(w);
|
||||
|
||||
*width = MAP_WINDOW_MAP_SIZE;
|
||||
*height = MAP_WINDOW_MAP_SIZE;
|
||||
@@ -577,9 +577,9 @@ static void window_map_scrollgetsize(rct_window* w, int32_t scrollIndex, int32_t
|
||||
*
|
||||
* rct2: 0x0068D726
|
||||
*/
|
||||
static void window_map_scrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMapScrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
CoordsXY c = map_window_screen_to_map(screenCoords);
|
||||
CoordsXY c = MapWindowScreenToMap(screenCoords);
|
||||
auto mapCoords = CoordsXY{ std::clamp(c.x, 0, MAXIMUM_MAP_SIZE_BIG - 1), std::clamp(c.y, 0, MAXIMUM_MAP_SIZE_BIG - 1) };
|
||||
auto mapZ = tile_element_height(mapCoords);
|
||||
|
||||
@@ -589,7 +589,7 @@ static void window_map_scrollmousedown(rct_window* w, int32_t scrollIndex, const
|
||||
window_scroll_to_location(mainWindow, { mapCoords, mapZ });
|
||||
}
|
||||
|
||||
if (land_tool_is_active())
|
||||
if (scenery_tool_is_active())
|
||||
{
|
||||
// Set land terrain
|
||||
int32_t landToolSize = std::max<int32_t>(1, gLandToolSize);
|
||||
@@ -631,7 +631,7 @@ static void window_map_scrollmousedown(rct_window* w, int32_t scrollIndex, const
|
||||
}
|
||||
}
|
||||
|
||||
static void window_map_textinput(rct_window* w, rct_widgetindex widgetIndex, char* text)
|
||||
static void WindowMapTextinput(rct_window* w, rct_widgetindex widgetIndex, char* text)
|
||||
{
|
||||
int32_t size;
|
||||
char* end;
|
||||
@@ -670,7 +670,7 @@ static void window_map_textinput(rct_window* w, rct_widgetindex widgetIndex, cha
|
||||
*
|
||||
* rct2: 0x0068CA8F
|
||||
*/
|
||||
static void window_map_invalidate(rct_window* w)
|
||||
static void WindowMapInvalidate(rct_window* w)
|
||||
{
|
||||
uint64_t pressedWidgets;
|
||||
int32_t i, height;
|
||||
@@ -779,7 +779,7 @@ static void window_map_invalidate(rct_window* w)
|
||||
// if not in set land rights mode: show the default scenario editor buttons
|
||||
if (gCurrentToolWidget.widget_index != WIDX_SET_LAND_RIGHTS)
|
||||
{
|
||||
window_map_show_default_scenario_editor_buttons(w);
|
||||
WindowMapShowDefaultScenarioEditorButtons(w);
|
||||
}
|
||||
else
|
||||
{ // if in set land rights mode: show land tool buttons + modes
|
||||
@@ -796,7 +796,7 @@ static void window_map_invalidate(rct_window* w)
|
||||
else
|
||||
{
|
||||
// if no tool is active: show the default scenario editor buttons
|
||||
window_map_show_default_scenario_editor_buttons(w);
|
||||
WindowMapShowDefaultScenarioEditorButtons(w);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -805,10 +805,10 @@ static void window_map_invalidate(rct_window* w)
|
||||
*
|
||||
* rct2: 0x0068CDA9
|
||||
*/
|
||||
static void window_map_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
||||
static void WindowMapPaint(rct_window* w, rct_drawpixelinfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(w, dpi);
|
||||
window_map_draw_tab_images(w, dpi);
|
||||
WindowMapDrawTabImages(w, dpi);
|
||||
|
||||
auto screenCoords = w->windowPos
|
||||
+ ScreenCoordsXY{ window_map_widgets[WIDX_LAND_TOOL].midX(), window_map_widgets[WIDX_LAND_TOOL].midY() };
|
||||
@@ -868,7 +868,7 @@ static void window_map_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
||||
*
|
||||
* rct2: 0x0068CF23
|
||||
*/
|
||||
static void window_map_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex)
|
||||
static void WindowMapScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex)
|
||||
{
|
||||
gfx_clear(dpi, PALETTE_INDEX_10);
|
||||
|
||||
@@ -884,20 +884,20 @@ static void window_map_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_
|
||||
|
||||
if (w->selected_tab == PAGE_PEEPS)
|
||||
{
|
||||
window_map_paint_peep_overlay(dpi);
|
||||
WindowMapPaintPeepOverlay(dpi);
|
||||
}
|
||||
else
|
||||
{
|
||||
window_map_paint_train_overlay(dpi);
|
||||
WindowMapPaintTrainOverlay(dpi);
|
||||
}
|
||||
window_map_paint_hud_rectangle(dpi);
|
||||
WindowMapPaintHudRectangle(dpi);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x0068CA6C
|
||||
*/
|
||||
static void window_map_init_map()
|
||||
static void WindowMapInitMap()
|
||||
{
|
||||
std::fill(_mapImageData.begin(), _mapImageData.end(), PALETTE_INDEX_10);
|
||||
_currentLine = 0;
|
||||
@@ -907,7 +907,7 @@ static void window_map_init_map()
|
||||
*
|
||||
* rct2: 0x0068C990
|
||||
*/
|
||||
static void window_map_centre_on_view_point()
|
||||
static void WindowMapCentreOnViewPoint()
|
||||
{
|
||||
rct_window* w = window_get_main();
|
||||
rct_window* w_map;
|
||||
@@ -960,7 +960,7 @@ static void window_map_centre_on_view_point()
|
||||
*
|
||||
* rct2: 0x0068CD35 (part of 0x0068CA8F)
|
||||
*/
|
||||
static void window_map_show_default_scenario_editor_buttons(rct_window* w)
|
||||
static void WindowMapShowDefaultScenarioEditorButtons(rct_window* w)
|
||||
{
|
||||
w->widgets[WIDX_BUILD_PARK_ENTRANCE].type = WindowWidgetType::FlatBtn;
|
||||
w->widgets[WIDX_PEOPLE_STARTING_POSITION].type = WindowWidgetType::FlatBtn;
|
||||
@@ -977,23 +977,23 @@ static void window_map_show_default_scenario_editor_buttons(rct_window* w)
|
||||
ft.Add<uint16_t>(gMapSize - 2);
|
||||
}
|
||||
|
||||
static void window_map_inputsize_land(rct_window* w)
|
||||
static void WindowMapInputsizeLand(rct_window* w)
|
||||
{
|
||||
Formatter ft;
|
||||
ft.Add<int16_t>(MINIMUM_TOOL_SIZE);
|
||||
ft.Add<int16_t>(MAXIMUM_TOOL_SIZE);
|
||||
window_text_input_open(w, WIDX_LAND_TOOL, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, STR_NONE, STR_NONE, 3);
|
||||
WindowTextInputOpen(w, WIDX_LAND_TOOL, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, ft, STR_NONE, STR_NONE, 3);
|
||||
}
|
||||
|
||||
static void window_map_inputsize_map(rct_window* w)
|
||||
static void WindowMapInputsizeMap(rct_window* w)
|
||||
{
|
||||
Formatter ft;
|
||||
ft.Add<int16_t>(MINIMUM_MAP_SIZE_PRACTICAL);
|
||||
ft.Add<int16_t>(MAXIMUM_MAP_SIZE_PRACTICAL);
|
||||
window_text_input_open(w, WIDX_MAP_SIZE_SPINNER, STR_MAP_SIZE_2, STR_ENTER_MAP_SIZE, ft, STR_NONE, STR_NONE, 4);
|
||||
WindowTextInputOpen(w, WIDX_MAP_SIZE_SPINNER, STR_MAP_SIZE_2, STR_ENTER_MAP_SIZE, ft, STR_NONE, STR_NONE, 4);
|
||||
}
|
||||
|
||||
static void window_map_draw_tab_images(rct_window* w, rct_drawpixelinfo* dpi)
|
||||
static void WindowMapDrawTabImages(rct_window* w, rct_drawpixelinfo* dpi)
|
||||
{
|
||||
uint32_t image;
|
||||
|
||||
@@ -1019,7 +1019,7 @@ static void window_map_draw_tab_images(rct_window* w, rct_drawpixelinfo* dpi)
|
||||
*
|
||||
* part of window_map_paint_peep_overlay and window_map_paint_train_overlay
|
||||
*/
|
||||
static MapCoordsXY window_map_transform_to_map_coords(CoordsXY c)
|
||||
static MapCoordsXY WindowMapTransformToMapCoords(CoordsXY c)
|
||||
{
|
||||
int32_t x = c.x, y = c.y;
|
||||
|
||||
@@ -1051,7 +1051,7 @@ static void DrawMapPeepPixel(Peep* peep, const uint8_t flashColour, rct_drawpixe
|
||||
if (peep->x == LOCATION_NULL)
|
||||
return;
|
||||
|
||||
MapCoordsXY c = window_map_transform_to_map_coords({ peep->x, peep->y });
|
||||
MapCoordsXY c = WindowMapTransformToMapCoords({ peep->x, peep->y });
|
||||
auto leftTop = ScreenCoordsXY{ c.x, c.y };
|
||||
auto rightBottom = leftTop;
|
||||
uint8_t colour = DefaultPeepMapColour;
|
||||
@@ -1096,7 +1096,7 @@ static uint8_t MapGetStaffFlashColour()
|
||||
*
|
||||
* rct2: 0x0068DADA
|
||||
*/
|
||||
static void window_map_paint_peep_overlay(rct_drawpixelinfo* dpi)
|
||||
static void WindowMapPaintPeepOverlay(rct_drawpixelinfo* dpi)
|
||||
{
|
||||
auto flashColour = MapGetGuestFlashColour();
|
||||
for (auto guest : EntityList<Guest>())
|
||||
@@ -1114,7 +1114,7 @@ static void window_map_paint_peep_overlay(rct_drawpixelinfo* dpi)
|
||||
*
|
||||
* rct2: 0x0068DBC1
|
||||
*/
|
||||
static void window_map_paint_train_overlay(rct_drawpixelinfo* dpi)
|
||||
static void WindowMapPaintTrainOverlay(rct_drawpixelinfo* dpi)
|
||||
{
|
||||
for (auto train : TrainManager::View())
|
||||
{
|
||||
@@ -1123,7 +1123,7 @@ static void window_map_paint_train_overlay(rct_drawpixelinfo* dpi)
|
||||
if (vehicle->x == LOCATION_NULL)
|
||||
continue;
|
||||
|
||||
MapCoordsXY c = window_map_transform_to_map_coords({ vehicle->x, vehicle->y });
|
||||
MapCoordsXY c = WindowMapTransformToMapCoords({ vehicle->x, vehicle->y });
|
||||
|
||||
gfx_fill_rect(dpi, { { c.x, c.y }, { c.x, c.y } }, PALETTE_INDEX_171);
|
||||
}
|
||||
@@ -1136,7 +1136,7 @@ static void window_map_paint_train_overlay(rct_drawpixelinfo* dpi)
|
||||
*
|
||||
* rct2: 0x0068D8CE
|
||||
*/
|
||||
static void window_map_paint_hud_rectangle(rct_drawpixelinfo* dpi)
|
||||
static void WindowMapPaintHudRectangle(rct_drawpixelinfo* dpi)
|
||||
{
|
||||
rct_window* main_window = window_get_main();
|
||||
if (main_window == nullptr)
|
||||
@@ -1174,7 +1174,7 @@ static void window_map_paint_hud_rectangle(rct_drawpixelinfo* dpi)
|
||||
*
|
||||
* rct2: 0x0068D24E
|
||||
*/
|
||||
static void window_map_set_land_rights_tool_update(const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMapSetLandRightsToolUpdate(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
rct_viewport* viewport;
|
||||
|
||||
@@ -1205,7 +1205,7 @@ static void window_map_set_land_rights_tool_update(const ScreenCoordsXY& screenC
|
||||
*
|
||||
* rct2: 0x00666EEF
|
||||
*/
|
||||
static CoordsXYZD place_park_entrance_get_map_position(const ScreenCoordsXY& screenCoords)
|
||||
static CoordsXYZD PlaceParkEntranceGetMapPosition(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
CoordsXYZD parkEntranceMapPosition{ 0, 0, 0, INVALID_DIRECTION };
|
||||
const CoordsXY mapCoords = ViewportInteractionGetTileStartAtCursor(screenCoords);
|
||||
@@ -1241,7 +1241,7 @@ static CoordsXYZD place_park_entrance_get_map_position(const ScreenCoordsXY& scr
|
||||
*
|
||||
* rct2: 0x00666FD0
|
||||
*/
|
||||
static void window_map_place_park_entrance_tool_update(const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMapPlaceParkEntranceToolUpdate(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
int32_t sideDirection;
|
||||
|
||||
@@ -1250,7 +1250,7 @@ static void window_map_place_park_entrance_tool_update(const ScreenCoordsXY& scr
|
||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE;
|
||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW;
|
||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT;
|
||||
CoordsXYZD parkEntrancePosition = place_park_entrance_get_map_position(screenCoords);
|
||||
CoordsXYZD parkEntrancePosition = PlaceParkEntranceGetMapPosition(screenCoords);
|
||||
if (parkEntrancePosition.IsNull())
|
||||
{
|
||||
park_entrance_remove_ghost();
|
||||
@@ -1283,7 +1283,7 @@ static void window_map_place_park_entrance_tool_update(const ScreenCoordsXY& scr
|
||||
*
|
||||
* rct2: 0x0068D4E9
|
||||
*/
|
||||
static void window_map_set_peep_spawn_tool_update(const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMapSetPeepSpawnToolUpdate(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
int32_t mapZ, direction;
|
||||
TileElement* tileElement;
|
||||
@@ -1318,11 +1318,11 @@ static void window_map_set_peep_spawn_tool_update(const ScreenCoordsXY& screenCo
|
||||
*
|
||||
* rct2: 0x006670A4
|
||||
*/
|
||||
static void window_map_place_park_entrance_tool_down(const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMapPlaceParkEntranceToolDown(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
park_entrance_remove_ghost();
|
||||
|
||||
CoordsXYZD parkEntrancePosition = place_park_entrance_get_map_position(screenCoords);
|
||||
CoordsXYZD parkEntrancePosition = PlaceParkEntranceGetMapPosition(screenCoords);
|
||||
if (!parkEntrancePosition.IsNull())
|
||||
{
|
||||
auto gameAction = PlaceParkEntranceAction(parkEntrancePosition, gFootpathSelectedId);
|
||||
@@ -1338,7 +1338,7 @@ static void window_map_place_park_entrance_tool_down(const ScreenCoordsXY& scree
|
||||
*
|
||||
* rct2: 0x0068D573
|
||||
*/
|
||||
static void window_map_set_peep_spawn_tool_down(const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMapSetPeepSpawnToolDown(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
TileElement* tileElement;
|
||||
int32_t mapZ, direction;
|
||||
@@ -1362,7 +1362,7 @@ static void window_map_set_peep_spawn_tool_down(const ScreenCoordsXY& screenCoor
|
||||
*
|
||||
* rct2: 0x0068D641
|
||||
*/
|
||||
static void map_window_increase_map_size()
|
||||
static void MapWindowIncreaseMapSize()
|
||||
{
|
||||
auto increaseMapSizeAction = ChangeMapSizeAction(gMapSize + 1);
|
||||
GameActions::Execute(&increaseMapSizeAction);
|
||||
@@ -1372,7 +1372,7 @@ static void map_window_increase_map_size()
|
||||
*
|
||||
* rct2: 0x0068D6B4
|
||||
*/
|
||||
static void map_window_decrease_map_size()
|
||||
static void MapWindowDecreaseMapSize()
|
||||
{
|
||||
auto decreaseMapSizeAction = ChangeMapSizeAction(gMapSize - 1);
|
||||
GameActions::Execute(&decreaseMapSizeAction);
|
||||
@@ -1418,7 +1418,7 @@ static constexpr const uint16_t ElementTypeAddColour[] = {
|
||||
MapColour(PALETTE_INDEX_0), // TILE_ELEMENT_TYPE_BANNER
|
||||
};
|
||||
|
||||
static uint16_t map_window_get_pixel_colour_peep(const CoordsXY& c)
|
||||
static uint16_t MapWindowGetPixelColourPeep(const CoordsXY& c)
|
||||
{
|
||||
auto* surfaceElement = map_get_surface_element_at(c);
|
||||
if (surfaceElement == nullptr)
|
||||
@@ -1452,7 +1452,7 @@ static uint16_t map_window_get_pixel_colour_peep(const CoordsXY& c)
|
||||
return colour;
|
||||
}
|
||||
|
||||
static uint16_t map_window_get_pixel_colour_ride(const CoordsXY& c)
|
||||
static uint16_t MapWindowGetPixelColourRide(const CoordsXY& c)
|
||||
{
|
||||
Ride* ride;
|
||||
uint16_t colourA = 0; // highlight colour
|
||||
@@ -1511,7 +1511,7 @@ static uint16_t map_window_get_pixel_colour_ride(const CoordsXY& c)
|
||||
return colourB;
|
||||
}
|
||||
|
||||
static void map_window_set_pixels(rct_window* w)
|
||||
static void MapWindowSetPixels(rct_window* w)
|
||||
{
|
||||
uint16_t colour = 0;
|
||||
int32_t x = 0, y = 0, dx = 0, dy = 0;
|
||||
@@ -1554,10 +1554,10 @@ static void map_window_set_pixels(rct_window* w)
|
||||
switch (w->selected_tab)
|
||||
{
|
||||
case PAGE_PEEPS:
|
||||
colour = map_window_get_pixel_colour_peep({ x, y });
|
||||
colour = MapWindowGetPixelColourPeep({ x, y });
|
||||
break;
|
||||
case PAGE_RIDES:
|
||||
colour = map_window_get_pixel_colour_ride({ x, y });
|
||||
colour = MapWindowGetPixelColourRide({ x, y });
|
||||
break;
|
||||
}
|
||||
destination[0] = (colour >> 8) & 0xFF;
|
||||
@@ -1575,7 +1575,7 @@ static void map_window_set_pixels(rct_window* w)
|
||||
_currentLine = 0;
|
||||
}
|
||||
|
||||
static CoordsXY map_window_screen_to_map(ScreenCoordsXY screenCoords)
|
||||
static CoordsXY MapWindowScreenToMap(ScreenCoordsXY screenCoords)
|
||||
{
|
||||
screenCoords.x = ((screenCoords.x + 8) - MAXIMUM_MAP_SIZE_TECHNICAL) / 2;
|
||||
screenCoords.y = ((screenCoords.y + 8)) / 2;
|
||||
|
||||
Reference in New Issue
Block a user