mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 20:13:07 +01:00
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier. I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
/*****************************************************************************
|
|
* Copyright (c) 2014-2018 OpenRCT2 developers
|
|
*
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
|
*
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
|
*****************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include <openrct2/common.h>
|
|
#include <openrct2/paint/Paint.h>
|
|
|
|
struct SegmentSupportCall
|
|
{
|
|
uint16 segments;
|
|
sint32 height;
|
|
sint16 slope;
|
|
|
|
bool operator<(const SegmentSupportCall &other) const {
|
|
if (height != other.height) {
|
|
return height < other.height;
|
|
}
|
|
|
|
if (segments != other.segments) {
|
|
return segments < other.segments;
|
|
}
|
|
|
|
return slope < other.slope;
|
|
}
|
|
};
|
|
|
|
class SegmentSupportHeightCall {
|
|
public:
|
|
static std::vector<SegmentSupportCall> getSegmentCalls(support_height supports[9], uint8 rotation);
|
|
static bool CallsMatch(std::vector<SegmentSupportCall> tileSegmentSupportCalls[4]);
|
|
static bool CallsEqual(std::vector<SegmentSupportCall> lhs, std::vector<SegmentSupportCall> rhs);
|
|
static bool FindMostCommonSupportCall(std::vector<SegmentSupportCall> calls[4], std::vector<SegmentSupportCall> * out);
|
|
};
|