-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
2,629 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* SDK module for Trilogy Online modification. | ||
* The author of this file is the lead developer of Trilogy Online. | ||
* Detailed information can be found on the website. | ||
* https://trilogy-online.com/ | ||
*/ | ||
|
||
module; | ||
|
||
export module TrilogyOnline.SDK.AccessVoilationException; | ||
|
||
import TrilogyOnline.SDK.Exception; | ||
|
||
export namespace TrilogyOnline | ||
{ | ||
namespace API | ||
{ | ||
class CAccessVoilationException : public CException | ||
{ | ||
public: | ||
CAccessVoilationException() noexcept = default; | ||
|
||
CAccessVoilationException(const char16_t* const errorMessage) noexcept : | ||
CException{ errorMessage } { } | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
/* | ||
* SDK module for Trilogy Online modification. | ||
* The author of this file is the lead developer of Trilogy Online. | ||
* Detailed information can be found on the website. | ||
* https://trilogy-online.com/ | ||
*/ | ||
|
||
module; | ||
|
||
export module TrilogyOnline.SDK.Blip; | ||
|
||
import TrilogyOnline.SDK.Fundamental; | ||
import TrilogyOnline.SDK.Placeable; | ||
|
||
export namespace TrilogyOnline | ||
{ | ||
namespace API | ||
{ | ||
class CPlayer; | ||
|
||
class CBlip : public CPlaceable | ||
{ | ||
public: | ||
static constexpr auto Maximum = 100000u; | ||
|
||
enum class ESprite : UInt8 | ||
{ | ||
None, | ||
White, | ||
Centre, | ||
MapHere, | ||
North, | ||
Airyard, | ||
AmmuGun, | ||
Barbers, | ||
BigSmoke, | ||
Boatyard, | ||
BurgerShot, | ||
Bulldozer, | ||
CatalinaPink, | ||
CesarViapando, | ||
Chicken, | ||
CJ, | ||
CRASH, | ||
Diner, | ||
EmmetGun, | ||
EnemyAttack, | ||
Fire, | ||
Girlfriend, | ||
Hostpital, | ||
LocoSyndicate, | ||
MaddDogg, | ||
MafiaCasino, | ||
MCStrap, | ||
ModGarage, | ||
OGLoc, | ||
Pizza, | ||
Police, | ||
PropertyGreen, | ||
PropertyRed, | ||
Race, | ||
Ryder, | ||
SaveGame, | ||
School, | ||
QuestionMark, | ||
Sweet, | ||
Tattoo, | ||
TheTruth, | ||
Waypoint, | ||
TorenoRanch, | ||
Triads, | ||
TriadsCasino, | ||
Tshirt, | ||
Woozie, | ||
Zero, | ||
Disco, | ||
Drink, | ||
Food, | ||
Truck, | ||
Cash, | ||
Flag, | ||
GYM, | ||
Impound, | ||
Light, | ||
Runway, | ||
GangBlue, | ||
GangPurple, | ||
GangYellow, | ||
GangN, // N? | ||
GangGreen, | ||
Spray | ||
}; | ||
|
||
enum class EColor : UInt8 | ||
{ | ||
Red, | ||
Green, | ||
Blue, | ||
White, | ||
Yellow, | ||
RedCopy, | ||
BlueCopy, | ||
Threat, | ||
Destination | ||
}; | ||
|
||
class CState | ||
{ | ||
public: | ||
virtual void OnStreamIn(CBlip& blip, CPlayer& forPlayer) = 0; | ||
|
||
virtual void OnStreamOut(CBlip& blip, CPlayer& forPlayer) = 0; | ||
|
||
#ifdef TRILOGY_ONLINE_CLIENT | ||
virtual void OnSyncingUserDataUpdated(CBlip& blip, const UInt64 oldValue, const UInt64 newValue) = 0; | ||
#endif | ||
}; | ||
|
||
virtual void SetState(CState* const value) noexcept = 0; | ||
|
||
[[nodiscard]] | ||
virtual CState* GetState() const noexcept = 0; | ||
|
||
virtual void SetSprite(const ESprite value) = 0; | ||
|
||
[[nodiscard]] | ||
virtual ESprite GetSprite() const = 0; | ||
|
||
virtual void SetColor(const EColor value) = 0; | ||
|
||
[[nodiscard]] | ||
virtual EColor GetColor() const = 0; | ||
|
||
virtual void ToggleShortRange(const bool value) = 0; | ||
|
||
[[nodiscard]] | ||
virtual bool IsShortRange() const = 0; | ||
|
||
virtual void SetScale(const UInt16 value) = 0; | ||
|
||
[[nodiscard]] | ||
virtual UInt16 GetScale() const = 0; | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
/* | ||
* SDK module for Trilogy Online modification. | ||
* The author of this file is the lead developer of Trilogy Online. | ||
* Detailed information can be found on the website. | ||
* https://trilogy-online.com/ | ||
*/ | ||
|
||
module; | ||
|
||
#include <string> | ||
#include <vector> | ||
#include <map> | ||
#include <memory> | ||
|
||
export module TrilogyOnline.SDK.Browser; | ||
|
||
import TrilogyOnline.SDK.Fundamental; | ||
|
||
export namespace TrilogyOnline | ||
{ | ||
namespace API | ||
{ | ||
class CBrowser | ||
{ | ||
public: | ||
class CMultiArgument | ||
{ | ||
public: | ||
enum class EType : UInt8 | ||
{ | ||
Bool, | ||
Int8, | ||
UInt8, | ||
Int16, | ||
UInt16, | ||
Int32, | ||
UInt32, | ||
Int64, | ||
UInt64, | ||
Float, | ||
Double, | ||
LongDouble, | ||
String, | ||
ArrayView, | ||
ObjectView, | ||
Array, | ||
Object | ||
}; | ||
|
||
virtual ~CMultiArgument() noexcept = default; | ||
|
||
[[nodiscard]] | ||
virtual EType GetType() const noexcept = 0; | ||
|
||
[[nodiscard]] | ||
virtual bool& AsBool() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const bool& AsBool() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual Int8& AsInt8() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const Int8& AsInt8() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual UInt8& AsUInt8() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const UInt8& AsUInt8() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual Int16& AsInt16() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const Int16& AsInt16() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual UInt16& AsUInt16() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const UInt16& AsUInt16() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual Int32& AsInt32() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const Int32& AsInt32() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual UInt32& AsUInt32() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const UInt32& AsUInt32() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual Int64& AsInt64() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const Int64& AsInt64() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual UInt64& AsUInt64() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const UInt64& AsUInt64() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual float& AsFloat() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const float& AsFloat() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual double& AsDouble() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const double& AsDouble() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual long double& AsLongDouble() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const long double& AsLongDouble() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual std::u16string& AsString() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const std::u16string& AsString() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual std::vector<CMultiArgument*>& AsArrayView() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const std::vector<CMultiArgument*>& AsArrayView() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual std::map<std::u16string, CMultiArgument*>& AsObjectView() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const std::map<std::u16string, CMultiArgument*>& AsObjectView() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual std::vector<std::unique_ptr<CMultiArgument>>& AsArray() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const std::vector<std::unique_ptr<CMultiArgument>>& AsArray() const = 0; | ||
|
||
[[nodiscard]] | ||
virtual std::map<std::u16string, std::unique_ptr<CMultiArgument>>& AsObject() = 0; | ||
|
||
[[nodiscard]] | ||
virtual const std::map<std::u16string, std::unique_ptr<CMultiArgument>>& AsObject() const = 0; | ||
}; | ||
|
||
virtual ~CBrowser() noexcept = default; | ||
|
||
virtual void SetUserData(void* const value) noexcept = 0; | ||
|
||
[[nodiscard]] | ||
virtual void* GetUserData() const noexcept = 0; | ||
|
||
virtual void Emit(const std::u16string_view eventName, const std::vector<CMultiArgument*>& multiArguments) = 0; | ||
|
||
virtual void Emit(const std::u16string_view eventName, const std::vector<std::unique_ptr<CMultiArgument>>& multiArguments) = 0; | ||
}; | ||
} | ||
} |
Oops, something went wrong.