mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-01 01:08:01 +03:00
15 lines
381 B
C++
15 lines
381 B
C++
#include "framework.h"
|
|
#include "generic_bridge.h"
|
|
#include "floordata.h"
|
|
#include "level.h"
|
|
|
|
using namespace T5M::Floordata;
|
|
|
|
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;
|
|
}
|