CheatMenuSA/src/teleport.h

50 lines
1.1 KiB
C
Raw Normal View History

2020-12-02 16:19:16 -05:00
#pragma once
2021-10-25 10:03:27 -04:00
#include "pch.h"
2020-12-02 16:19:16 -05:00
2022-07-29 16:12:34 -04:00
enum class eTeleportType
{
Marker,
MapPosition,
Coordinate,
};
2022-07-31 21:03:25 -04:00
/*
Teleport Class
Contains code for the Teleport menu page
*/
2020-12-02 16:19:16 -05:00
class Teleport
{
private:
2022-01-07 03:18:00 -05:00
static inline bool m_bInsertCoord;
2022-07-06 15:11:53 -04:00
static inline bool m_bTeleportMarker;
2022-07-31 21:03:25 -04:00
static inline bool m_bQuickTeleport;
static inline ImVec2 m_fMapSize;
2021-08-06 11:53:18 -04:00
#ifdef GTASA
2022-06-28 16:23:03 -04:00
static inline DataStore m_SpriteData {"sprites"};
2022-01-07 03:18:00 -05:00
/*
Generates radar sprite coordinates on the fly.
Shouldn't get saved in 'teleport.json', needs to be cleared at game shutdown.
*/
static void FetchRadarSpriteData();
2021-08-06 11:53:18 -04:00
#endif
public:
2022-07-31 21:03:25 -04:00
static inline ResourceStore m_locData{"locations", eResourceType::TYPE_TEXT};
Teleport() = delete;
Teleport(const Teleport&) = delete;
static void Init();
2022-07-31 21:03:25 -04:00
// Warp player to position, marker, map etc
2022-07-29 16:12:34 -04:00
template<eTeleportType Type = eTeleportType::Coordinate>
static void WarpPlayer(CVector pos = CVector(0, 0, 0), int interiorID = 0);
2022-07-31 21:03:25 -04:00
// Returns true if quick teleport feature is active
static bool IsQuickTeleportActive();
// Draws the teleport menu page
2022-01-20 02:04:45 -05:00
static void ShowPage();
2021-06-18 12:49:11 -04:00
};