You've already forked OpenRCT2-Unity
mirror of
https://github.com/izzy2lost/OpenRCT2-Unity.git
synced 2026-03-10 12:38:22 -07:00
Format project, apply custom clang-format only to Unity bindings project
This commit is contained in:
@@ -24,7 +24,6 @@ BraceWrapping:
|
||||
AfterClass: true
|
||||
AfterControlStatement: true
|
||||
AfterEnum: true
|
||||
AfterExternBlock: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterStruct: true
|
||||
@@ -63,7 +62,6 @@ IncludeCategories:
|
||||
- Regex: '^<'
|
||||
Priority: 2
|
||||
IndentCaseLabels: true
|
||||
IndentExternBlock: true
|
||||
IndentPPDirectives: AfterHash
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: true
|
||||
|
||||
6
src/openrct2-bindings/.clang-format
Normal file
6
src/openrct2-bindings/.clang-format
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
BasedOnStyle: InheritParentConfig
|
||||
BraceWrapping:
|
||||
AfterExternBlock: true
|
||||
IndentExternBlock: true
|
||||
...
|
||||
@@ -73,7 +73,7 @@ extern "C"
|
||||
EXPORT void GetPathElementAt(int x, int y, int index, PathInfo* element)
|
||||
{
|
||||
const TileElement* source = GetTileElementAt(x, y, index, TileElementType::Path);
|
||||
SetPathInfo(x, y, index, source, element);
|
||||
SetPathInfo(x, y, index, source, element);
|
||||
}
|
||||
|
||||
// Writes all the path element details to the specified buffer.
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
#include "../Utilities/Logging.h"
|
||||
#include "../Utilities/TileElementHelper.h"
|
||||
|
||||
#include <openrct2/object/ObjectManager.h>
|
||||
#include <openrct2/object/TerrainEdgeObject.h>
|
||||
#include <openrct2/object/TerrainSurfaceObject.h>
|
||||
#include <openrct2/paint/tile_element/Paint.Surface.h>
|
||||
#include <openrct2/paint/tile_element/Paint.Surface.cpp>
|
||||
#include <openrct2/world/Map.h>
|
||||
|
||||
extern "C"
|
||||
@@ -32,9 +30,9 @@ extern "C"
|
||||
uint8_t grassLength = surface->GetGrassLength();
|
||||
auto imageId = ImageId(surfaceObject->GetImageId({ x, y }, grassLength, element->GetDirection(), 0, false, false));
|
||||
if (surfaceObject->Colour != 255)
|
||||
{
|
||||
{
|
||||
imageId = imageId.WithPrimary(surfaceObject->Colour);
|
||||
}
|
||||
}
|
||||
return imageId.ToUInt32();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ extern "C"
|
||||
static void SetTrackInfo(int x, int y, int index, const TileElement* source, TrackInfo* target)
|
||||
{
|
||||
const TrackElement* track = source->AsTrack();
|
||||
|
||||
|
||||
if (track == nullptr)
|
||||
{
|
||||
dll_log("Could not find track element at %i, %i, index %i", x, y, index);
|
||||
|
||||
@@ -93,7 +93,7 @@ extern "C"
|
||||
const TileElement* source = GetTileElementAt(x, y, index, TileElementType::Wall);
|
||||
SetWallInfo(x, y, index, source, element);
|
||||
}
|
||||
|
||||
|
||||
// Writes all the wall element details to the specified buffer.
|
||||
EXPORT int GetAllWallElementsAt(int x, int y, WallInfo* elements, int length)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user