mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 16:57:57 +03:00
20 lines
450 B
C++
20 lines
450 B
C++
#include "framework.h"
|
|
#include "level.h"
|
|
#include "generic_bridge.h"
|
|
#include "floordata.h"
|
|
|
|
using namespace TEN::Floordata;
|
|
|
|
void InitialiseBridge(short itemNumber)
|
|
{
|
|
AddBridge(itemNumber);
|
|
}
|
|
|
|
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;
|
|
}
|