mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Reduce includes in common.h
This commit is contained in:
committed by
Michał Janiszewski
parent
fe59637823
commit
54cc1ebcdf
@@ -30,8 +30,6 @@
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
using sint8 = int8_t;
|
||||
|
||||
@@ -14,9 +14,10 @@
|
||||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#include "../platform/platform.h"
|
||||
#include <cstdio>
|
||||
|
||||
#include "Console.hpp"
|
||||
#include "../platform/platform.h"
|
||||
|
||||
namespace Console
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <typeinfo>
|
||||
#include "../common.h"
|
||||
|
||||
@@ -90,7 +90,7 @@ void gfx_draw_line_software(rct_drawpixelinfo *dpi, sint32 x1, sint32 y1, sint32
|
||||
// Bresenham's algorithm
|
||||
|
||||
// If vertical plot points upwards
|
||||
sint32 steep = abs(y2 - y1) > abs(x2 - x1);
|
||||
sint32 steep = std::abs(y2 - y1) > std::abs(x2 - x1);
|
||||
if (steep){
|
||||
sint32 temp_y2 = y2;
|
||||
sint32 temp_x2 = x2;
|
||||
@@ -111,7 +111,7 @@ void gfx_draw_line_software(rct_drawpixelinfo *dpi, sint32 x1, sint32 y1, sint32
|
||||
}
|
||||
|
||||
sint32 delta_x = x2 - x1;
|
||||
sint32 delta_y = abs(y2 - y1);
|
||||
sint32 delta_y = std::abs(y2 - y1);
|
||||
sint32 error = delta_x / 2;
|
||||
sint32 y_step;
|
||||
sint32 y = y1;
|
||||
|
||||
Reference in New Issue
Block a user