| 3411 | } |
| 3412 | |
| 3413 | void GuiController::DrawCompass(ItemInfo* item) |
| 3414 | { |
| 3415 | if (!Lara.Inventory.HasCompass) |
| 3416 | return; |
| 3417 | |
| 3418 | constexpr auto POS_2D = Vector2(130.0f, 450.0f); |
| 3419 | constexpr auto LERP_ALPHA = 0.1f; |
| 3420 | |
| 3421 | auto needleOrient = EulerAngles(0, CompassNeedleAngle, 0); |
| 3422 | needleOrient.Lerp(EulerAngles(0, item->Pose.Orientation.y, 0), LERP_ALPHA); |
| 3423 | |
| 3424 | float wibble = std::sin((float(GlobalCounter & 0x3F) / (float)0x3F) * PI_MUL_2); |
| 3425 | CompassNeedleAngle = needleOrient.y + ANGLE(wibble); |
| 3426 | |
| 3427 | // HACK: Needle is rotated in the draw function. |
| 3428 | const auto& invObject = InventoryObjectTable[INV_OBJECT_COMPASS]; |
| 3429 | g_Renderer.DrawObjectIn2DSpace(ID_COMPASS_ITEM, POS_2D, EulerAngles::Identity, invObject.Scale1 * 1.5f); |
| 3430 | } |
| 3431 | |
| 3432 | int GuiController::GetLoadSaveSelection() |
| 3433 | { |
no test coverage detected