diff --git a/src/ride/track_paint.c b/src/ride/track_paint.c index 423b5d756e..cee1c1f7c5 100644 --- a/src/ride/track_paint.c +++ b/src/ride/track_paint.c @@ -227,7 +227,7 @@ bool track_paint_util_has_fence(enum edge edge, rct_xy16 position, rct_map_eleme uint16 entranceLoc = ((position.x / 32) + offset.x) | - (((position.y / 32) + offset.y) << 8); + (((position.y / 32) + offset.y) * (1 << 8)); int entranceId = map_get_station(mapElement); diff --git a/test/testpaint/generate.cpp b/test/testpaint/generate.cpp index 6e023fc84f..b2694924b3 100644 --- a/test/testpaint/generate.cpp +++ b/test/testpaint/generate.cpp @@ -237,7 +237,7 @@ private: { 19, TRACK_ELEM_RIGHT_LARGE_HALF_LOOP_DOWN, TRACK_ELEM_RIGHT_LARGE_HALF_LOOP_UP }, }; - for (int i = 0; i < (sizeof(mirrorTable) / sizeof(mirrorTable[0])); i++) + for (size_t i = 0; i < (sizeof(mirrorTable) / sizeof(mirrorTable[0])); i++) { if (mirrorTable[i][1] == trackType) { diff --git a/test/testpaint/intercept.c b/test/testpaint/intercept.c index 3f4346df49..b2a17a114d 100644 --- a/test/testpaint/intercept.c +++ b/test/testpaint/intercept.c @@ -430,7 +430,7 @@ static void printFunctionCall(utf8string *out, function_call call) { static void printFunctionCallArray(utf8string *out, function_call calls[], uint8 count) { for (int i = 0; i < count; i++) { - utf8string callOut = malloc(128); + utf8string callOut = malloc(1024); printFunctionCall(&callOut, calls[i]); sprintf(*out + strlen(*out), "%s\n", callOut); } diff --git a/test/testpaint/intercept_2.cpp b/test/testpaint/intercept_2.cpp index d4a55f47d7..d6ef3e3ab2 100644 --- a/test/testpaint/intercept_2.cpp +++ b/test/testpaint/intercept_2.cpp @@ -481,10 +481,6 @@ namespace Intercept2 g_currently_drawn_item = &mapElement; - rct_map_element surfaceElement = {0}; - surfaceElement.type = MAP_ELEMENT_TYPE_SURFACE; - surfaceElement.base_height = 2; - gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; gTrackColours[SCHEME_TRACK] = DEFAULT_SCHEME_TRACK; gTrackColours[SCHEME_SUPPORTS] = DEFAULT_SCHEME_SUPPORTS; @@ -677,10 +673,6 @@ namespace Intercept2 g_currently_drawn_item = &mapElement; - rct_map_element surfaceElement = {0}; - surfaceElement.type = MAP_ELEMENT_TYPE_SURFACE; - surfaceElement.base_height = 2; - gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; gTrackColours[SCHEME_TRACK] = DEFAULT_SCHEME_TRACK; gTrackColours[SCHEME_SUPPORTS] = DEFAULT_SCHEME_SUPPORTS;