mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-04 02:38:00 +03:00

* Tier 1 * Tier 2 * Remove old GetRoomList implementation and use CollectConnectedRooms one * Tier 3 * Tier 4 * Tier 5 * Tier 6 * Tier 7 Co-authored-by: Lwmte <initiator@nm.ru>
20 lines
467 B
C++
20 lines
467 B
C++
#include "framework.h"
|
|
#include "level.h"
|
|
#include "generic_bridge.h"
|
|
#include "collision/floordata.h"
|
|
|
|
using namespace TEN::Floordata;
|
|
|
|
void InitialiseBridge(short itemNumber)
|
|
{
|
|
UpdateBridgeItem(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;
|
|
}
|