2020-12-21 13:16:29 -03:00
|
|
|
#include "framework.h"
|
2021-07-23 21:41:44 +01:00
|
|
|
#include "level.h"
|
2020-12-21 13:16:29 -03:00
|
|
|
#include "generic_bridge.h"
|
|
|
|
#include "floordata.h"
|
|
|
|
|
2021-08-30 18:03:21 +03:00
|
|
|
using namespace TEN::Floordata;
|
2020-12-21 13:16:29 -03:00
|
|
|
|
2021-01-06 17:53:13 -03:00
|
|
|
void InitialiseBridge(short itemNumber)
|
|
|
|
{
|
|
|
|
AddBridge(itemNumber);
|
|
|
|
}
|
|
|
|
|
2020-12-21 13:16:29 -03:00
|
|
|
int GetOffset(short angle, int x, int z)
|
|
|
|
{
|
|
|
|
const auto point = GetSectorPoint(x, z);
|
|
|
|
auto vector = Vector2(point.x, point.y);
|
|
|
|
const auto matrix = Matrix::CreateRotationZ(TO_RAD(angle));
|
|
|
|
Vector2::Transform(vector, matrix, vector);
|
|
|
|
return -vector.x;
|
|
|
|
}
|