diff --git a/Include/Core/Classes/ItemInfo.hpp b/Include/Core/Classes/ItemInfo.hpp index fd9c860..ca90c2f 100644 --- a/Include/Core/Classes/ItemInfo.hpp +++ b/Include/Core/Classes/ItemInfo.hpp @@ -36,6 +36,7 @@ namespace Internal std::vector GetStackAmounts() const; std::vector GetStackModelIDs() const; std::int32_t GetStackable() const; + bool GetTradable() const; }; } diff --git a/Include/Core/Globals.hpp b/Include/Core/Globals.hpp index f7975bc..39a0253 100644 --- a/Include/Core/Globals.hpp +++ b/Include/Core/Globals.hpp @@ -152,7 +152,7 @@ namespace Globals //************ Minimap.cpp ************// // 0 - Fixed; 1 - Resizable; 2 - Resizable + Side Panels - const WidgetDef MINIMAP_MIDDLE[3] = { { 548, 8 }, { 161, 27 }, { 164, 27 } }; + const WidgetDef MINIMAP_MIDDLE[3] = { { 548, 8 }, { 161, 28 }, { 164, 28 } }; const WidgetDef MINIMAP_COMPASS[3] = { { 548, 7 }, { 161, 26 }, { 164, 26 } }; const WidgetDef MINIMAP_CURE = { 160, 6 }; const WidgetDef MINIMAP_QUICK_PRAYER = { 160, 14 }; @@ -207,21 +207,21 @@ namespace Globals // These are the "Sprite" widgets, these widgets' sprite IDs change when opened or closed // 0 - Fixed; 1 - Resizable; 2 - Resizable + Side Panels - const WidgetDef TAB_COMBAT[3] = { { 548, 50 }, { 161, 53 }, { 164, 52 } }; - const WidgetDef TAB_STATS[3] = { { 548, 51 }, { 161, 54 }, { 164, 53 } }; - const WidgetDef TAB_QUESTS[3] = { { 548, 52 }, { 161, 55 }, { 164, 54 } }; - const WidgetDef TAB_INVENTORY[3] = { { 548, 53 }, { 161, 56 }, { 164, 55 } }; - const WidgetDef TAB_EQUIPMENT[3] = { { 548, 54 }, { 161, 57 }, { 164, 56 } }; - const WidgetDef TAB_PRAYER[3] = { { 548, 55 }, { 161, 58 }, { 164, 57 } }; - const WidgetDef TAB_MAGIC[3] = { { 548, 56 }, { 161, 59 }, { 164, 58 } }; + const WidgetDef TAB_COMBAT[3] = { { 548, 51 }, { 161, 54 }, { 164, 53 } }; + const WidgetDef TAB_STATS[3] = { { 548, 52 }, { 161, 55 }, { 164, 54 } }; + const WidgetDef TAB_QUESTS[3] = { { 548, 53 }, { 161, 56 }, { 164, 55 } }; + const WidgetDef TAB_INVENTORY[3] = { { 548, 54 }, { 161, 57 }, { 164, 56 } }; + const WidgetDef TAB_EQUIPMENT[3] = { { 548, 55 }, { 161, 58 }, { 164, 57 } }; + const WidgetDef TAB_PRAYER[3] = { { 548, 56 }, { 161, 59 }, { 164, 58 } }; + const WidgetDef TAB_MAGIC[3] = { { 548, 57 }, { 161, 60 }, { 164, 59 } }; - const WidgetDef TAB_CLAN[3] = { { 548, 33 }, { 161, 37 }, { 164, 37 } }; - const WidgetDef TAB_FRIENDS[3] = { { 548, 35 }, { 161, 39 }, { 164, 39 } }; - const WidgetDef TAB_ACCOUNT_MANAGEMENT[3] = { { 548, 34 }, { 161, 38 }, { 164, 38 } }; - const WidgetDef TAB_LOGOUT[3] = { { 548, 36 }, { 161, 40 }, { 164, 31 } }; - const WidgetDef TAB_OPTIONS[3] = { { 548, 37 }, { 161, 41 }, { 164, 40 } }; - const WidgetDef TAB_EMOTES[3] = { { 548, 38 }, { 161, 42 }, { 164, 41 } }; - const WidgetDef TAB_MUSIC[3] = { { 548, 39 }, { 161, 43 }, { 164, 42 } }; + const WidgetDef TAB_CLAN[3] = { { 548, 34 }, { 161, 38 }, { 164, 38 } }; + const WidgetDef TAB_FRIENDS[3] = { { 548, 36 }, { 161, 40 }, { 164, 40 } }; + const WidgetDef TAB_ACCOUNT_MANAGEMENT[3] = { { 548, 35 }, { 161, 39 }, { 164, 39 } }; + const WidgetDef TAB_LOGOUT[3] = { { 548, 37 }, { 161, 41 }, { 164, 32 } }; + const WidgetDef TAB_OPTIONS[3] = { { 548, 38 }, { 161, 42 }, { 164, 41 } }; + const WidgetDef TAB_EMOTES[3] = { { 548, 39 }, { 161, 43 }, { 164, 42 } }; + const WidgetDef TAB_MUSIC[3] = { { 548, 40 }, { 161, 44 }, { 164, 43 } }; //************ Combat.cpp ************// diff --git a/Include/Core/Internal.hpp b/Include/Core/Internal.hpp index 2e5ba6d..958f304 100644 --- a/Include/Core/Internal.hpp +++ b/Include/Core/Internal.hpp @@ -287,6 +287,8 @@ namespace Internal std::int32_t GetSettings(std::int32_t ID); std::int32_t GetVarbitSettings(std::int32_t VarbitSettingIndex); Point TileToMainscreen(const Tile& T, std::int32_t X, std::int32_t Y, std::int32_t Z); + std::vector TileToMainscreenBox(const Tile& T, std::int32_t X, std::int32_t Y, std::int32_t Z, + std::int32_t OffsetX, std::int32_t OffsetY, std::int32_t OffsetZ); std::string GetItemName(std::int32_t ID); bool IsItemPlaceholder(std::int32_t ID); bool IsItemStackable(std::int32_t ID); diff --git a/Include/Core/Types/Box.hpp b/Include/Core/Types/Box.hpp index 1db2e96..7f7a1ed 100644 --- a/Include/Core/Types/Box.hpp +++ b/Include/Core/Types/Box.hpp @@ -10,142 +10,46 @@ class Point; class Box { public: - /** - * @brief The X of where the Box starts - * @par Description - * The X of where the Box starts - */ - std::int32_t X; - /** - * @brief The Y of where the Box starts - * @par Description - * The Y of where the Box starts - */ - std::int32_t Y; - /** - * @brief The Width of the Box - * @par Description - * The Width of the Box - */ - std::int32_t Width; - /** - * @brief The Height of the Box - * @par Description - * The Height of the Box - */ - std::int32_t Height; - - /** - * @brief Default Constructor, constructs a Box with -1 as the X, Y, Width, and Height - * @par Description - * Default Constructor, constructs a Box with -1 as the X, Y, Width, and Height - */ Box(); - /** - * @brief Constructs a Box based on X, Y, Width, and Height - * @param std::int32_t X The X of where the Box begins - * @param std::int32_t Y The Y of where the Box begins - * @param std::int32_t Width The Width of the Box to be constructed - * @param std::int32_t Height The Height of the Box to be constructed - */ + /*! + * @param X Top-left x-axis coordinate of the box to construct + * @param Y Top-left y-axis coordinate of the box to construct + * @param Width The width of the box to construct + * @param Height The Height of the box to construct + */ Box(std::int32_t X, std::int32_t Y, std::int32_t Width, std::int32_t Height); - /** - * @brief Constructs a Box, by copying another - * @param const Box& B The Box to "copy" - */ Box(const Box& B); - /** - * @brief Returns a random Point using Uniform Distribution - * @return A random Point using Uniform Distribution - * @see @ref UniformRandomDocs - * @see @ref MissChanceFollowupDocs - */ + std::int32_t X; //!< The top-left x-axis coordinate + std::int32_t Y; //!< The top-left y-axis coordinate + std::int32_t Width; + std::int32_t Height; + + bool Contains(const Point& P) const; + bool Contains(const Box& B) const; + bool Contains(std::int32_t X, std::int32_t Y) const; + + Point GetMiddle() const; + std::int32_t GetX2() const; + std::int32_t GetY2() const; + + bool OnScreen() const; //!< @returns True if the box is within the client canvas bounds + bool IsValid() const; //!< @returns True if the x and y axis coordinates, width and height are greater than or equal to zero + Point GetUniformRandomPoint() const; - /** - * @brief Returns a random Point using Binomial Distribution - * @return A random Point using Binomial Distribution - * @see @ref BinomialRandomDocs - * @see @ref MissChanceFollowupDocs - */ Point GetBinomialRandomPoint(double ProbabilityX, double ProbabilityY) const; - /** - * @brief Returns a random Point using Normal Distribution - * @return A random Point using Normal Distribution - * @see @ref NormalRandomDocs - * @see @ref MissChanceFollowupDocs - */ Point GetNormalRandomPoint(double PercentageDeviationX, double PercentageDeviationY) const; Point GetHybridRandomPoint(double ProbabilityX, double ProbabilityY, double StandardDeviationX, double StandardDeviationY, double PointGenAccuracy) const; Point GetProfileHybridRandomPoint() const; Point GetProfileHybridRandomPoint(double PointGenAccuracy) const; - /** - * @brief Returns True if the Box contains a Point - * @return True if the Box contains a Point - * @par Example - * @code - * Box B(25, 25, 100, 100); - * Debug::Info << B.contains(Point(30, 30)); - * @endcode - */ - bool Contains(Point P) const; - /** - * @brief Returns True if the Box contains both X, and Y - * @return True if the Box contains both X, and Y - * @par Example - * @code - * Box B(25, 25, 100, 100); - * Debug::Info << B.contains(30, 30); - * @endcode - */ - bool Contains(std::int32_t X, std::int32_t Y) const; - /** - * @brief Returns True if the Box contains another Box - * @return True if the Box contains another Box - * @par Example - * @code - * Box A(25, 25, 100, 100); - * Box B(30, 30, 10, 10); - * Debug::Info << A.contains(B); - * @endcode - */ - bool Contains(Box Box) const; - /** - * @brief Returns the X2 of the Box - * @return The X2 of the Box - * @par Example - * @code - * Box B(25, 25, 100, 100); - * Debug::Info << B.GetX2() << ", " << B.GetY2(); - * @endcode - */ - std::int32_t GetX2() const; - /** - * @brief Returns the Y2 of the Box - * @return The Y2 of the Box - * @par Example - * @code - * Box B(25, 25, 100, 100); - * Debug::Info << B.GetX2() << ", " << B.GetY2(); - * @endcode - */ - std::int32_t GetY2() const; - /** - * @brief Returns True if the Box is within the bounds of Client Canvas - * @return True if the Box is within the bounds of Client Canvas - */ - bool OnScreen() const; - /** - * @brief Returns True if the Box's X, Y, Width, and Height are greater than greater than or equal to 0 - * @return True if the Box's X, Y, Width, and Height are greater than or equal to 0 - */ - bool IsValid() const; bool operator==(const Box& B) const; bool operator!=(const Box& B) const; + friend std::ostream& operator<<(std::ostream& OS, const Box& B); - operator bool() const; + operator bool() const; //!< @returns True if the x and y axis coordinates, width and height are greater than or equal to zero + ~Box(); }; diff --git a/Include/Core/Types/Point.hpp b/Include/Core/Types/Point.hpp index 2bda4ed..262701f 100644 --- a/Include/Core/Types/Point.hpp +++ b/Include/Core/Types/Point.hpp @@ -9,74 +9,42 @@ class Box; class Point { public: - /** - * @brief The X of the Point - * @par Description - * The X of the Point - */ - std::int32_t X; - /** - * @brief The Y of the Point - * @par Description - * The Y of the Point - */ - std::int32_t Y; - - /** - * @brief Default Constructor, constructs a Point with -1 as the X, Y, and Plane - * @par Description - * Default Constructor, constructs a Point with -1 as the X, Y, and Plane - */ Point(); - /** - * @brief Constructs a Point based on an X and Y - * @param std::int32_t X The X of the Point - * @param std::int32_t Y The Y of the Point - */ + /*! + * @param X The X-axis coordinate + * @param Y The Y-axis coordinate + */ Point(std::int32_t X, std::int32_t Y); - /** - * @brief Constructs a Point, by copying another - * @param const Point& P The Point to "copy" - */ Point(const Point& P); - /** - * @brief Returns the distance from one Point to another - * @return The distance from one Point to another - */ + std::int32_t X; //!< The X-axis coordinate + std::int32_t Y; //!< The Y-axis coordinate + double DistanceFrom(const Point& P) const; - /** - * @brief Returns True if the Point is inside the passed Box - * @return True if the Point is inside the passed Box - */ + bool InBox(const Box& B) const; - /** - * @brief Returns True if the Point is inside a Circle defined by a starting Point, and Radius - * @return True if the Point is inside a Circle defined by a starting Point, and Radius - */ + + /*! + * @param P The center of the circle + * @param Radius The radius of the circle + * @return True if this lies within the circle + */ bool InCircle(const Point& P, std::int32_t Radius) const; - /** - * @brief Returns True if the Point is less than 0, not equal to - * @return True if the Point is less than 0, not equal to - */ - bool IsNegative() const; - /** - * @brief Returns True if the Point is greater than 0, not equal to - * @return True if the Point is greater than 0, not equal to - */ - bool IsPositive() const; - /** - * @brief Returns True if the Point is within the bounds of Client Canvas - * @return True if the Point is within the bounds of Client Canvas - */ - bool OnScreen() const; + + bool IsNegative() const; //!< @returns True if either the x-axis or y-axis coordinate are negative + bool IsPositive() const; //!< @returns True if the x-axis or y-axis coordinates are both positive + bool OnScreen() const; //!< @returns True if the point is within the client canvas bounds + bool operator==(const Point& P) const; bool operator!=(const Point& P) const; Point operator+(const Point& P) const; Point operator-(const Point& P) const; Point& operator+=(const Point& P); Point& operator-=(const Point& P); + + operator bool() const; //!< @returns True if this is not negative @see IsNegative friend std::ostream& operator<<(std::ostream& OS, const Point& P); + ~Point(); }; diff --git a/Include/Core/Types/Tile.hpp b/Include/Core/Types/Tile.hpp index cd0e5e4..a7430cf 100644 --- a/Include/Core/Types/Tile.hpp +++ b/Include/Core/Types/Tile.hpp @@ -7,69 +7,34 @@ class Tile { public: - /** - * @brief The X of the Tile - * @par Description - * The X of the Tile - */ - std::int32_t X; - /** - * @brief The Y of the Tile - * @par Description - * The Y of the Tile - */ - std::int32_t Y; - /** - * @brief The Plane the Tile is on - * @par Description - * The Plane the Tile is on - */ - std::int32_t Plane; - - /** - * @brief Default Constructor, constructs a Tile with -1 as the X, Y, and Plane - * @par Description - * Default Constructor, constructs a Tile with -1 as the X, Y, and Plane - */ Tile(); - /** - * @brief Constructs a Tile based on an X, Y, and a Plane - * @param std::int32_t X The X of the Tile - * @param std::int32_t Y The Y of the Tile - * @param std::int32_t Y The Plane the Tile is on - */ - Tile(std::int32_t X, std::int32_t Y, std::int32_t Plane); - /** - * @brief Constructs a Tile, by copying another - * @param const Tile& T The Tile to "copy" - */ + /*! + * @param X The X-axis coordinate + * @param Y The Y-axis coordinate + * @param Plane The plane the tile exists on (usually 0-4) + */ + Tile(std::int32_t X, std::int32_t Y, std::int32_t Plane = 0); Tile(const Tile& T); - /** - * @brief Returns the distance from one Tile to another - * @return The distance from one Tile to another - */ + + std::int32_t X; //!< The x-axis coordinate + std::int32_t Y; //!< The y-axis coordinate + std::int32_t Plane; //!< The plane the tile exists on (usually 0-4) + double DistanceFrom(const Tile& T) const; - /** - * @brief Returns True if the Tile is less than 0, not equal to - * @return True if the Tile is less than 0, not equal to - */ - bool IsNegative() const; - /** - * @brief Returns True if the Tile is greater than 0, not equal to - * @return True if the Tile is greater than 0, not equal to - */ - bool IsPositive() const; - bool operator==(const Tile& T) const; - bool operator!=(const Tile& T) const; - Tile operator+(const Tile& T) const; - Tile operator-(const Tile& T) const; - Tile& operator+=(const Tile& T); - Tile& operator-=(const Tile& T); + bool IsNegative() const; //!< @returns True if any of x, y, or plane are negative in value + bool IsPositive() const; //!< @returns True if all of x, y, and plane are positive in value - operator bool() const; + bool operator==(const Tile& T) const; //!< @returns True if the comparative tile x, y, and plane are all equal + bool operator!=(const Tile& T) const; //!< @returns True if any of the comparative tile x, y, or plane are not equal + Tile operator+(const Tile& T) const; //!< Adds the x-axis and y-axis coordinates, plane is ignored + Tile operator-(const Tile& T) const; //!< Subtracts the x-axis and y-axis coordinates, plane is ignored + Tile& operator+=(const Tile& T); //!< Adds the x-axis and y-axis coordinates, plane is ignored + Tile& operator-=(const Tile& T); //!< Subtracts the x-axis and y-axis coordinates, plane is ignored + operator bool() const; //!< @returns True if this is not negative @see IsNegative friend std::ostream& operator<<(std::ostream& OS, const Tile& T); + ~Tile(); }; diff --git a/Include/Core/Types/Timer.hpp b/Include/Core/Types/Timer.hpp index a568112..04d64c5 100644 --- a/Include/Core/Types/Timer.hpp +++ b/Include/Core/Types/Timer.hpp @@ -7,70 +7,17 @@ class Timer { public: - - /** - * @brief Constructs a Timer, and optionally starts it - * @param bool Start - * @par Description - * Constructs a Timer, and starts it - */ Timer(bool Start = true); - - /** - * @brief Restarts the Timer - * @par Detailed Description - * Sets the Timer start time to the current time - */ void Restart(); - /** - * @brief Increases the Timer's elapsed time by MS - * @return Returns the Time's elapsed time by MS - * @par Description - * Increases the Timer's elapsed time by MS - */ - std::int64_t FastForward(std::uint32_t Duration); + std::int64_t FastForward(std::uint32_t Duration); // returns time elapsed + std::int64_t Rewind(std::uint32_t Duration); // returns time elapsed + std::int64_t Suspend(); // returns time elapsed + std::int64_t Resume(); // returns time elapsed - /** - * @brief Decreases the Timer's elapsed time by MS - * @return Returns the Time's elapsed time by MS - * @par Description - * Decreases the Timer's elapsed time by MS - */ - std::int64_t Rewind(std::uint32_t Duration); - - /** - * @brief Pauses the Timer - * @return Returns the Time's elapsed time by MS - * @par Description - * Pauses the Timer - */ - std::int64_t Suspend(); - - /** - * @brief Resumes the Timer - * @return Returns the Timer's elapsed time by MS - * @par Description - * Resumes the Timer - */ - std::int64_t Resume(); - - /** - * @brief Returns when the Timer started, in MS - * @return When the Timer started, in MS - */ std::uint64_t GetStartTime() const; - - /** - * @brief Returns the Timer's elapsed Time, in MS - * @return The Timer's elapsed Time, in MS - */ std::int64_t GetTimeElapsed() const; - /** - * @brief Returns True if the Timer is currently Paused - * @return True if the Timer is currently Paused - */ bool Paused() const; friend std::ostream& operator<<(std::ostream& OS, const Timer& T); diff --git a/Include/Game/Interfaces/Login.hpp b/Include/Game/Interfaces/Login.hpp index 1dbbdc6..58887d9 100644 --- a/Include/Game/Interfaces/Login.hpp +++ b/Include/Game/Interfaces/Login.hpp @@ -28,6 +28,8 @@ namespace Login TOTAL_SKILL_REQUIRED, DISCONNECTED, ERROR_CONNECTING, + CONNECTION_TIMED_OUT, + TOO_MANY_ATTEMPTS, CONNECTING, LOADING, LOBBY_SCREEN, diff --git a/Include/Game/Interfaces/Mainscreen.hpp b/Include/Game/Interfaces/Mainscreen.hpp index 7e08b80..984438e 100644 --- a/Include/Game/Interfaces/Mainscreen.hpp +++ b/Include/Game/Interfaces/Mainscreen.hpp @@ -31,15 +31,7 @@ namespace Mainscreen RED } CROSSHAIR_STATE; - /** - * @brief Returns the current SCREEN_STATE - * @return The current SCREEN_STATE - */ Mainscreen::SCREEN_STATE GetState(); - /** - * @brief Returns the current CROSSHAIR_STATE - * @return The current CROSSHAIR_STATE - */ Mainscreen::CROSSHAIR_STATE GetCrosshairState(); /** @@ -60,94 +52,26 @@ namespace Mainscreen */ bool IsAnimating(); - /** - * @brief Returns The %mainscreen uptext found in the top left-hand corner - * @return The %mainscreen uptext found in the top left-hand corner - */ std::string GetUpText(); - /** - * @brief Returns true if the %mainscreen uptext is equal to the passed string - * @param UpText String to compare - * @return True if the %mainscreen uptext is equal to the passed string - */ bool IsUpText(const std::string& UpText); - /** - * @brief Returns true if the %mainscreen uptext is equal to any of the passed strings - * @param UpTexts Strings to compare - * @return True if the %mainscreen uptext is equal to any of the passed strings - */ bool IsUpText(const std::vector& UpTexts); - /** - * @brief Returns true if the %mainscreen uptext contains the passed string - * @param UpText String to check - * @return True if the %mainscreen uptext contains the passed string - */ bool UpTextContains(const std::string& UpText); - /** - * @brief Returns true if the %mainscreen uptext contains any of the passed strings - * @param UpTexts Strings to check - * @return True if the %mainscreen uptext contains any of the passed strings - */ bool UpTextContains(const std::vector& UpTexts); - - /** - * @brief Extended function of UpTextContains - * @description - * This function will loop over (CheckTime) milliseconds, if the passed string isn't found within the uptext - * it will go into a nested loop over (FailCheckTime) milliseconds, if the passed string still isn't found within the 'Fail' loop - * the function will exit (false) - * @param UpText String to check - * @param CheckTime The passed string must be found in the mainscreen uptext for this long, to return true - * @param FailCheckTime If the passed string isn't found within the mainscreen uptext, - * this is how long it will continue to try and find the passed string in the mainscreen uptext before returning false - */ bool UpTextContains(const std::string& UpText, std::uint32_t CheckTime, std::uint32_t FailCheckTime); - /** - * @brief Extended function of UpTextContains - * @description - * This function will loop over (CheckTime) milliseconds, if one of the passed strings isn't found within the uptext - * it will go into a nested loop over (FailCheckTime) milliseconds, if one of the passed strings isn't still isn't found within the 'Fail' loop - * the function will exit (false) - * @param UpText String to check - * @param CheckTime The passed string must be found in the mainscreen uptext for this long, to return true - * @param FailCheckTime If the passed string isn't found within the mainscreen uptext, - * this is how long it will continue to try and find the passed string in the mainscreen uptext before returning false - */ bool UpTextContains(const std::vector& UpTexts, std::uint32_t CheckTime, std::uint32_t FailCheckTime); - /** - * @brief Waits until the %mainscreen uptext is equal to the passed string - * @see WaitFunc - */ bool WaitIsUpText(std::uint32_t Duration, std::uint32_t Step, const std::string& UpText); - /** - * @brief Waits until the %mainscreen uptext contains the passed string - * @see UpTextContains - * @see WaitFunc - */ bool WaitUpTextContains(std::uint32_t Duration, std::uint32_t Step, const std::string& UpText); - /** - * @brief Waits until the %mainscreen uptext contains any of the passed strings - * @see UpTextContains - * @see WaitFunc - */ bool WaitUpTextContains(std::uint32_t Duration, std::uint32_t Step, const std::vector& UpTexts); bool IsTileOn(const Tile& T); - - /** - * @brief Clicks on a tile on the %mainscreen - * @return True if the tile was clicked - * @return False if the distance from the tile is >= 8; !(Minimap::GetPosition().DistanceFrom(T) < 8) or it fails to click - */ bool ClickTile(const Tile& T); - bool WalkPath(const std::vector& Path, std::int32_t Distance, std::function Func); - bool WalkPath(const std::vector& Path, std::int32_t Distance); + bool WalkPath(const std::vector& Path, std::int32_t Distance, std::function Func); std::vector GetBlockingWidgetBoxes(); } diff --git a/Include/Game/Interfaces/Menu.hpp b/Include/Game/Interfaces/Menu.hpp index c23862b..362a64b 100644 --- a/Include/Game/Interfaces/Menu.hpp +++ b/Include/Game/Interfaces/Menu.hpp @@ -11,10 +11,7 @@ */ namespace Menu { - /** - * @brief Returns true if the right-click menu is open - * @return true if the right-click menu is open - */ + bool IsOpen(); /** @@ -23,20 +20,10 @@ namespace Menu * @return false if WaitFunc fails - WaitFunc(1000, 100, Menu::IsOpen, true); */ bool Open(); - - /** - * @brief Closes the menu by moving the mouse to either left or right of the menu, uses the current mouse position as a base point - * @return true if the menu isn't open, or closed by moving the mouse - * @return false if the generated point is off-screen, or WaitFunc fails - WaitFunc(1000, 100, Menu::IsOpen, false); - */ bool Close(); - /** - * @brief Get the number of menu options - * @return the number of menu options - * @note The menu does not need to be open for this to be accurate - */ + std::int32_t GetCount(); /** @@ -49,7 +36,7 @@ namespace Menu /** * @brief Get the menu actions * - * @description Actions are almost always the very first word in a menu option + * Actions are almost always the very first word in a menu option * 'Use' - action 'gold bar' - target * 'Attack' - action 'Guard (level-21)' - target * @return std::vector array of menu actions @@ -60,7 +47,7 @@ namespace Menu /** * @brief Get the menu targets * - * @description Targets are almost always everything after the action + * Targets are almost always everything after the action * 'Use' - action 'gold bar' - target * 'Attack' - action 'Guard (level-21)' - target * @return std::vector array of menu targets @@ -71,7 +58,6 @@ namespace Menu /** * @brief Get the menu options * - * @description * 'Use' - action 'gold bar' - target * 'Attack' - action 'Guard (level-21)' - target * 'Use gold bar' - option @@ -83,7 +69,6 @@ namespace Menu /** * @brief Get the menu options split into pairs instead of whole strings * - * @description * 'Use' - action 'gold bar' - target * 'Attack' - action 'Guard (level-21)' - target * 'Use gold bar' - option @@ -98,7 +83,7 @@ namespace Menu /** * @brief Get the index of the found option * - * @description This function will find the first menu option containing the string 'Option' + * This function will find the first menu option containing the string 'Option' * This means passing 'Att' or 'Attack' will return the first found menu option containing 'Att' or 'Attack' * If you want to find a very specific menu option, the more the 'Option' string contains, the more specific it'll be * @@ -116,7 +101,7 @@ namespace Menu /** * @brief Get the index of the first found option * - * @description This function will return the first found index, of the first found option. + * This function will return the first found index, of the first found option. * This function is just Menu::IndexOf(const std::string& Option), but instead of looking for one single option, this function looks for multiple * * @param Options %Menu options to look for, returns on first option found, the more specific the options, the more accurate the result will be @@ -279,7 +264,6 @@ namespace Menu std::vector GetOptionBoxes(); /** - * @brief Get the full menu box * @return Box representing the full menu, returns a null box if the menu isn't open */ Box GetBox(); diff --git a/Include/Game/Tools/Camera.hpp b/Include/Game/Tools/Camera.hpp index 75a2f84..43db181 100644 --- a/Include/Game/Tools/Camera.hpp +++ b/Include/Game/Tools/Camera.hpp @@ -21,54 +21,19 @@ namespace Camera HIGHEST = 383 } CAMERA_PITCH; - /** - * @brief Returns the cameras X - * - * @return Camera X - */ std::int32_t GetX(); - /** - * @brief Returns the cameras Z - * - * @return Camera Z - */ std::int32_t GetY(); - /** - * @brief Returns the cameras Z - * - * @return Camera Z - */ std::int32_t GetZ(); - /** - * @brief Returns the cameras Yaw - * - * @return Camera Yaw - */ std::int32_t GetYaw(); - - /** - * @brief Returns the camera/compass angle in degrees - * - * @return the camera/compass angle in degrees - */ double GetAngle(); - /** - * @brief Returns the camera pitch - * - * @return the camera pitch - */ std::int32_t GetPitch(); - /** - * @brief Returns the camera zoom as a percentage - * - * @return the camera zoom as a percentage (0.00 - 1.00) - */ double GetZoom(); /** * @brief Rotates the camera to the passed angle/degree * * @param Angle or degree + * @param Tolerance angle tolerance used to determine if it no longer needs to keep rotating (+/-) * @return true if it rotates within (+/-) 10 of the passed angle */ bool RotateTo(std::int32_t Angle, std::int32_t Tolerance = 10); @@ -76,6 +41,7 @@ namespace Camera * @brief Rotates the camera to the passed direction (Camera::NORTH/EAST/SOUTH/WEST) * * @param Direction Camera::NORTH / EAST / SOUTH / WEST + * @param Tolerance angle tolerance used to determine if it no longer needs to keep rotating (+/-) * @return true if it rotates within (+/-) 10 of the passed direction */ bool RotateTo(COMPASS_DIRECTION Direction, std::int32_t Tolerance = 10); @@ -84,6 +50,7 @@ namespace Camera * * @param T tile to rotate to * @param Angle optional desired angle of where the tile should be in relation to the player, defaulted to 0 or North + * @param Tolerance angle tolerance used to determine if it no longer needs to keep rotating (+/-) * @return true if it rotates within (+/-) 10 of the passed tile and angle */ bool RotateTo(const Tile& T, std::int32_t Angle = 0, std::int32_t Tolerance = 10); @@ -91,6 +58,7 @@ namespace Camera * @brief Rotates the camera to the passed tile, with an optional desired direction * * @param T tile to rotate to + * @param Tolerance angle tolerance used to determine if it no longer needs to keep rotating (+/-) * @param Direction optional desired angle of where the tile should be in relation to the player (NORTH/EAST/SOUTH/WEST), defaulted to North * @return true if it rotates within (+/-) 10 of the passed tile and direction */ @@ -110,6 +78,13 @@ namespace Camera * @return true if the camera sets the pitch (+/-) 10 of the passed pitch */ bool SetPitch(CAMERA_PITCH Pitch); + +/* *//** + * @brief Sets the zoom of the camera + * + * @param Zoom desired zoom 0.00 (all the way out) - 1.00 (all the way in) + *//* + bool SetZoom(double Zoom);*/ } #endif // CAMERA_HPP_INCLUDED diff --git a/Library/libAlpacaLibrary.a b/Library/libAlpacaLibrary.a index 360e75d..18c5476 100644 Binary files a/Library/libAlpacaLibrary.a and b/Library/libAlpacaLibrary.a differ