Repository: bakkesmodorg/BakkesModSDK Branch: master Commit: 479e8f571cf5 Files: 187 Total size: 459.6 KB Directory structure: gitextract_mup7u2x1/ ├── README.md ├── bakkes_patchplugin.py ├── include/ │ ├── bakkesmod/ │ │ ├── core/ │ │ │ ├── bot_loadout_structs.h │ │ │ ├── compiler_toggles.h │ │ │ ├── custom_decals_structs.h │ │ │ ├── http_structs.h │ │ │ ├── loadout_structs.h │ │ │ └── replay_structs.h │ │ ├── plugin/ │ │ │ ├── PluginSettingsWindow.h │ │ │ ├── bakkesmodplugin.h │ │ │ ├── bakkesmodsdk.h │ │ │ ├── botplugin.h │ │ │ └── pluginwindow.h │ │ ├── utilities/ │ │ │ ├── DecalUtilities.h │ │ │ └── LoadoutUtilities.h │ │ └── wrappers/ │ │ ├── AIControllerWrapper.h │ │ ├── CareerStatsWrapper.h │ │ ├── ControllerWrapper.h │ │ ├── Engine/ │ │ │ ├── ActorWrapper.h │ │ │ ├── EngineTAWrapper.h │ │ │ ├── EnumWrapper.h │ │ │ ├── ObjectWrapper.h │ │ │ ├── UnrealStringWrapper.h │ │ │ └── WorldInfoWrapper.h │ │ ├── GameEvent/ │ │ │ ├── GameEditorWrapper.h │ │ │ ├── GameEventWrapper.h │ │ │ ├── GameSettingPlaylistWrapper.h │ │ │ ├── ReplayDirectorWrapper.h │ │ │ ├── ReplaySoccarWrapper.h │ │ │ ├── ReplayWrapper.h │ │ │ ├── SaveData/ │ │ │ │ ├── GameEditorSaveDataWrapper.h │ │ │ │ ├── SaveDataWrapper.h │ │ │ │ └── TrainingEditorSaveDataWrapper.h │ │ │ ├── ServerWrapper.h │ │ │ ├── TeamGameEventWrapper.h │ │ │ ├── TrainingEditorWrapper.h │ │ │ └── TutorialWrapper.h │ │ ├── GameObject/ │ │ │ ├── BallBreakoutWrapper.h │ │ │ ├── BallGodWrapper.h │ │ │ ├── BallHauntedWrapper.h │ │ │ ├── BallWrapper.h │ │ │ ├── BaseCameraWrapper.h │ │ │ ├── BoostPickupWrapper.h │ │ │ ├── BreakOutActorPlatformWrapper.h │ │ │ ├── CameraSettingsActorWrapper.h │ │ │ ├── CameraStates/ │ │ │ │ ├── CameraStateBlenderWrapper.h │ │ │ │ ├── CameraStateCarRefWrapper.h │ │ │ │ ├── CameraStateCarWrapper.h │ │ │ │ ├── CameraStateWrapper.h │ │ │ │ └── CameraStateXWrapper.h │ │ │ ├── CameraWrapper.h │ │ │ ├── CameraXWrapper.h │ │ │ ├── CarComponent/ │ │ │ │ ├── AirControlComponentWrapper.h │ │ │ │ ├── BoostWrapper.h │ │ │ │ ├── CarComponentWrapper.h │ │ │ │ ├── DodgeComponentWrapper.h │ │ │ │ ├── DoubleJumpComponentWrapper.h │ │ │ │ ├── FlipCarComponentWrapper.h │ │ │ │ ├── JumpComponentWrapper.h │ │ │ │ ├── PrimitiveComponentWrapper.h │ │ │ │ ├── VehicleSimWrapper.h │ │ │ │ └── WheelWrapper.h │ │ │ ├── CarWrapper.h │ │ │ ├── ClubDetailsWrapper.h │ │ │ ├── ClubSettingsWrapper.h │ │ │ ├── FXActorWrapper.h │ │ │ ├── GoalHoopsWrapper.h │ │ │ ├── GoalWrapper.h │ │ │ ├── MapDataWrapper.h │ │ │ ├── MapListWrapper.h │ │ │ ├── MeshComponents/ │ │ │ │ ├── CarMeshComponentBaseWrapper.h │ │ │ │ ├── MeshComponentWrapper.h │ │ │ │ └── SkeletalMeshComponentWrapper.h │ │ │ ├── PerformanceStats/ │ │ │ │ ├── InputBufferGraphWrapper.h │ │ │ │ ├── NetStatGraphWrapper.h │ │ │ │ ├── PerfStatGraphWrapper.h │ │ │ │ ├── SampleHistoryWrapper.h │ │ │ │ ├── SampleRecordSettingsWrapper.h │ │ │ │ ├── StartGraphSystemWrapper.h │ │ │ │ ├── StatGraphSystemWrapper.h │ │ │ │ └── StatGraphWrapper.h │ │ │ ├── PhysicalMaterialPropertyWrapper.h │ │ │ ├── PlayerReplicationInfoWrapper.h │ │ │ ├── PriWrapper.h │ │ │ ├── PriXWrapper.h │ │ │ ├── RBActorWrapper.h │ │ │ ├── ReplayManagerWrapper.h │ │ │ ├── RumbleComponent/ │ │ │ │ ├── AttachmentPickup.h │ │ │ │ ├── BallCarSpringPickup.h │ │ │ │ ├── BallFreezePickup.h │ │ │ │ ├── BallLassoPickup.h │ │ │ │ ├── BasketballPickup.h │ │ │ │ ├── BattarangPickup.h │ │ │ │ ├── BoostModPickup.h │ │ │ │ ├── BoostOverridePickup.h │ │ │ │ ├── CarSpeedPickup.h │ │ │ │ ├── DemolishPickup.h │ │ │ │ ├── FootballPickupWrapper.h │ │ │ │ ├── GrapplingHookPickup.h │ │ │ │ ├── GravityPickup.h │ │ │ │ ├── HandbrakeOverridePickup.h │ │ │ │ ├── HitForcePickup.h │ │ │ │ ├── RugbyPickupWrapper.h │ │ │ │ ├── RumblePickupComponentWrapper.h │ │ │ │ ├── SpringPickup.h │ │ │ │ ├── SwapperPickup.h │ │ │ │ ├── TargetedPickup.h │ │ │ │ ├── TimeBombPickup.h │ │ │ │ ├── TornadoPickup.h │ │ │ │ └── VelcroPickup.h │ │ │ ├── Stats/ │ │ │ │ └── StatEventWrapper.h │ │ │ ├── TeamInfoWrapper.h │ │ │ ├── TeamWrapper.h │ │ │ ├── VehiclePickupWrapper.h │ │ │ └── VehicleWrapper.h │ │ ├── GameWrapper.h │ │ ├── GuiManagerWrapper.h │ │ ├── ImageWrapper.h │ │ ├── MMRWrapper.h │ │ ├── MatchmakingWrapper.h │ │ ├── MenuStackWrapper.h │ │ ├── PlayerControllerWrapper.h │ │ ├── PluginManagerWrapper.h │ │ ├── ReplayServerWrapper.h │ │ ├── ReplayViewerDataWrapper.h │ │ ├── SettingsWrapper.h │ │ ├── SpectatorHUDWrapper.h │ │ ├── StructArrayWrapper.h │ │ ├── UniqueIDWrapper.h │ │ ├── arraywrapper.h │ │ ├── canvaswrapper.h │ │ ├── cvarmanagerwrapper.h │ │ ├── cvarwrapper.h │ │ ├── gfx/ │ │ │ └── GfxDataTrainingWrapper.h │ │ ├── http/ │ │ │ └── HttpWrapper.h │ │ ├── includes.h │ │ ├── items/ │ │ │ ├── GfxProductsWrapper.h │ │ │ ├── ItemsWrapper.h │ │ │ ├── LoadingProductWrapper.h │ │ │ ├── LoadoutSaveWrapper.h │ │ │ ├── LoadoutSetWrapper.h │ │ │ ├── LoadoutWrapper.h │ │ │ ├── OnlineProductWrapper.h │ │ │ ├── ProductPaintWrapper.h │ │ │ ├── ProductSlotWrapper.h │ │ │ ├── ProductTemplateWrapper.h │ │ │ ├── ProductTradeInWrapper.h │ │ │ ├── ProductWrapper.h │ │ │ ├── TradeWrapper.h │ │ │ ├── assets/ │ │ │ │ ├── ProductAssetBodyWrapper.h │ │ │ │ ├── ProductAssetWrapper.h │ │ │ │ └── ProductEquipProfileWrapper.h │ │ │ ├── attributes/ │ │ │ │ ├── ProductAttributeWrapper.h │ │ │ │ ├── ProductAttribute_AnimatedSkinLabelWrapper.h │ │ │ │ ├── ProductAttribute_BlueprintCostWrapper.h │ │ │ │ ├── ProductAttribute_BlueprintWrapper.h │ │ │ │ ├── ProductAttribute_BodyCompatibilityWrapper.h │ │ │ │ ├── ProductAttribute_CertifiedWrapper.h │ │ │ │ ├── ProductAttribute_CurrencyWrapper.h │ │ │ │ ├── ProductAttribute_PaintedWrapper.h │ │ │ │ ├── ProductAttribute_QualityWrapper.h │ │ │ │ ├── ProductAttribute_SpecialEditionSettingsWrapper.h │ │ │ │ ├── ProductAttribute_SpecialEditionWrapper.h │ │ │ │ ├── ProductAttribute_TeamEditionUploadWrapper.h │ │ │ │ ├── ProductAttribute_TeamEditionWrapper.h │ │ │ │ └── ProductAttribute_UnlockMethodWrapper.h │ │ │ └── dbs/ │ │ │ ├── CertifiedStatDatabaseWrapper.h │ │ │ ├── DataAssetDatabaseWrapper.h │ │ │ ├── DataAssetDatabase_ESportsTeamWrapper.h │ │ │ ├── PaintDatabaseWrapper.h │ │ │ └── SpecialEditionDatabaseWrapper.h │ │ ├── kismet/ │ │ │ ├── SequenceObjectWrapper.h │ │ │ ├── SequenceOpWrapper.h │ │ │ ├── SequenceVariableWrapper.h │ │ │ └── SequenceWrapper.h │ │ ├── linmath.h │ │ ├── modals/ │ │ │ ├── ModalWrapper.h │ │ │ └── TextInputModalWrapper.h │ │ ├── replaywrapper.h │ │ └── wrapperstructs.h │ └── utils/ │ ├── customrotator.h │ ├── expected.hpp │ ├── finiteelement.h │ ├── io.h │ ├── observer.h │ └── parser.h └── lib/ └── pluginsdk.lib ================================================ FILE CONTENTS ================================================ ================================================ FILE: README.md ================================================ # BakkesModSDK BakkesMod is a mod for Rocket League initially built as an enhancement for freeplay. Over time it has grown and now it features enhancements such as a dollycam, variance options to the ingame custom trainer, multiplayer game hosting, POV goal replays and much more. BakkesMod also provides a software development kit/API which interfaces with Rocket League. For now it is mostly used for creating freeplay trainings and replay enhancements (such as analysis tools). The plan is to also extend the SDK so (limited) information can be retrieved from online games, which can be used to for example keep track of advanced statistics during gameplay. Examples of plugins that are embedded with the mod when it is installed can be found [here](https://github.com/Bakkes/BakkesMod2-Plugins). The dollycam plugin is also open source and can be found [here](https://github.com/Bakkes/DollyCamPlugin2) To get started using BakkesMod, simply go to http://bakkesmod.com and download the injector. If you wish to create plugins for the mod follow the steps that are described further down this page. Currently the SDK is being extended to make it easier for plugin developers to create their own multiplayer gamemodes/training scenarios. BakkesMod has the ability to host an online game server which other players can connect to. For now only freeplay is supported but support for Team soccar/rumble is being added. Simply type "host" in the BakkesMod console to host a game, other players need to type "connect 127.0.0.1" to connect to your server (where 127.0.0.1 is your IP of course). In order for this to work you need to have forwarded port 27016 or use an utility such as Hamachi to emulate a LAN environment. ## Getting started In order to create plugins for Rocket League with BakkesMod you need the SDK. By default the SDK will be included with the BakkesMod installation and can be found in %appdata%\bakkesmod\bakkesmod\bakkesmodsdk\. You could also simply clone this repository as this also contains the full SDK and is often more up to date. ### IDE To get started quickly, check out the [template](https://github.com/Martinii89/BakkesmodPluginTemplate) to automatically generate a project skeleton. In order to load your plugin ingame make sure the generated .dll is placed in the plugins folder of BakkesMod. Next, in Rocket League open the console and type ```plugin load filename``` (without the .dll extension!). To unload your plugin you can use ```plugin unload filename```. Any cvars/notifiers/drawables that are registered when a plugin is loaded are automatically removed when a plugin is unloaded, so you don't have to worry about that! ### Command Line You'll still need to have Visual Studio installed for its included compilers. 1. Open `x64 Native Tools Command Prompt for VS 2019`. 2. Replace the paths to `bakkesmodsdk` below with the correct ones for your system and `plugin.cpp` with the actual name of the plugin. ```powershell cl /LD -I bakkesmodsdk/include/ bakkesmodsdk/lib/pluginsdk.lib plugin.cpp ``` ## Help & more info If you have any questions feel free to drop by the [BakkesMod programming discord](https://discord.gg/HMptXSzCvU). This discord is also full of many tutorials on how to get started. ================================================ FILE: bakkes_patchplugin.py ================================================ """Script to hotswap plugin from bakkesmod process. 1. Connects to BakkesMod rcon 2. Unloads plugin 3. Replaces DLL file 4. Loads plugin TODO: save config? """ import sys, os, shutil, websockets, time import asyncio bakkesmod_plugin_folder = "F:/SteamLibrary/steamapps/common/rocketleague/Binaries/Win32/bakkesmod/plugins/" bakkesmod_server = 'ws://127.0.0.1:9002' rcon_password = 'password' swap_file = "" def replace_plugin_file(): filename = os.path.basename(swap_file) dst_file = bakkesmod_plugin_folder + filename print(dst_file) if os.path.exists(dst_file): os.remove(dst_file) shutil.copyfile(swap_file, dst_file) async def main_loop(): try: async with websockets.connect(bakkesmod_server, timeout=.1) as websocket: await websocket.send('rcon_password ' + rcon_password) auth_status = await websocket.recv() assert auth_status == 'authyes' filename = os.path.basename(swap_file) plugin_name = filename[0:filename.index('.')] print("Copying " + filename + "") await websocket.send("plugin unload " + plugin_name) time.sleep(0.1) replace_plugin_file() time.sleep(0.1) await websocket.send("plugin load " + plugin_name) except: replace_plugin_file() if __name__ == '__main__': if len(sys.argv) == 1: exit() swap_file = sys.argv[1] asyncio.get_event_loop().run_until_complete(main_loop()) ================================================ FILE: include/bakkesmod/core/bot_loadout_structs.h ================================================ #pragma once #include #include struct BotLoadoutData { struct Attribute { enum class Type { PAINT, ESPORTWHEEL, SPECIALEDITION }; Type type; int value; }; std::map products; std::map> product_attributes; // not used, but leaving it in here "just in case" for later. unsigned char team = 0; int team_finish_id = 0; int custom_finish_id = 0; unsigned char team_color_id = 0; unsigned char custom_color_id = 0; }; ================================================ FILE: include/bakkesmod/core/compiler_toggles.h ================================================ #pragma once #ifndef BM_CPP20_SUPPORT #if __cplusplus >= 202002L #define BM_CPP20_SUPPORT #elif defined( __cpp_concepts ) #if __cpp_concepts >= 201907L #define BM_CPP20_SUPPORT #endif #elif defined(__cpp_constexpr) #if __cpp_constexpr >= 201806L #define BM_CPP20_SUPPORT #endif #elif #endif #endif #ifdef BM_CPP20_SUPPORT #define DEFAULTEQUALITY(clazz)\ bool operator==(const clazz&) const = default; #define DEFAULTCOMPARE(clazz)\ auto operator<=>(const clazz&) const = default; #else #define DEFAULTEQUALITY(clazz) #define DEFAULTCOMPARE(clazz) #endif ================================================ FILE: include/bakkesmod/core/custom_decals_structs.h ================================================ #pragma once #include "bakkesmod/core/compiler_toggles.h" namespace pluginsdk { using Tex = std::shared_ptr; using TextureOverride = std::map; using ColorOverride = std::map; using ScalarOverride = std::map; struct ShaderOverride { TextureOverride textures; ColorOverride colors; ScalarOverride scalar; DEFAULTEQUALITY(ShaderOverride) }; struct BodyShaderOverride { ShaderOverride body_mic_override; ShaderOverride chassis_mic_override; int body_id = -1; int skin_id = -1; DEFAULTEQUALITY(BodyShaderOverride) }; } ================================================ FILE: include/bakkesmod/core/http_structs.h ================================================ #pragma once /// /// key value pair for field name and field data. /// If you use a file field. the data should be the path to the file /// struct FormField { enum class Type { kString, kFile }; Type field_type; // curlpp doesn't seem to support wstring for the formparts std::string data; std::string name; }; typedef std::function CurlProgressFunction; typedef std::function CurlRequestDoneStringReturn; typedef std::function CurlRequestDoneFileReturn; typedef std::function CurlRequestDoneBinaryReturn; struct CurlRequest { std::string url; std::string verb; //std::vector headers; std::map headers; std::string body; std::vector form_data; CurlProgressFunction progress_function; }; ================================================ FILE: include/bakkesmod/core/loadout_structs.h ================================================ #pragma once #include "bakkesmod/wrappers/wrapperstructs.h" #include "bakkesmod/core/compiler_toggles.h" struct FColorPosition; struct FLoadoutTeamPaint; namespace pluginsdk { enum class Itempaint: int { NONE = 0, CRIMSON = 1, LIME = 2, BLACK = 3, SKYBLUE = 4, COBALT = 5, BURNTSIENNA = 6, FORESTGREEN = 7, PURPLE = 8, PINK = 9, ORANGE = 10, GREY = 11, TITANIUMWHITE = 12, SAFFRON = 13, GOLD = 14, ROSEGOLD = 15, WHITEGOLD = 16, ONYX = 17, PLATINUM = 18 }; enum class Equipslot: int { BODY = 0, DECAL = 1, WHEELS = 2, ROCKETBOOST = 3, ANTENNA = 4, TOPPER = 5, BUMPER = 6, PAINTFINISH = 7, BOT = 8, LOGO = 9, UNDERGLOW = 10, CRATES = 11, CUSTOMFINISH = 12, ENGINEAUDIO = 13, TRAIL = 14, GOALEXPLOSION = 15, PLAYERBANNER = 16, GARAGECOMPLEXROW = 17, GOALSTINGER = 18, PLAYERAVATAR = 19, AVATARBORDER = 20, PLAYERTITLE = 21, ESPORTSTEAM = 22, ARCHIVEDITEMS = 23, BLUEPRINTS = 24, SHOPITEM = 25, CURRENCY = 26, MAX = 27, }; struct TeamPaint { unsigned char team; unsigned char team_color_id = 255; unsigned char custom_color_id = 255; DEFAULTEQUALITY(TeamPaint) }; struct CarColors { std::optional team_paint; inline static LinearColor const default_color{0.0f, 0.0f, 0.0f, 1.0f}; // null or default_color for the overrides means that the value from team_paint will be used std::optional team_color_override = std::nullopt; std::optional custom_color_override = std::nullopt; DEFAULTEQUALITY(CarColors) }; struct ColorPosition { ColorPosition() = default; ColorPosition(int row, int column): row{row}, column{column} {} explicit ColorPosition(const FColorPosition& other); explicit operator FColorPosition() const; int row; int column; DEFAULTEQUALITY(ColorPosition) }; struct PaintFinishColor { LinearColor color{0, 0, 0, 1}; ColorPosition position{-1, -1}; int index = 0; DEFAULTEQUALITY(PaintFinishColor) }; struct ItemAttribute { enum class AttributeType { UNKNOWN, PAINT, ESPORT, SPECIALEDITION, USERCOLOR }; AttributeType type = AttributeType::UNKNOWN; int value = 0; UnrealColor color{0, 0, 0, 0}; DEFAULTEQUALITY(ItemAttribute) }; struct ItemData { Equipslot slot = Equipslot::MAX; int product_id = 0; std::vector attributes = {}; DEFAULTEQUALITY(ItemData) }; using ItemDataMap = std::map; struct Loadout { ItemDataMap items; CarColors paint_finish; DEFAULTEQUALITY(Loadout) }; } ================================================ FILE: include/bakkesmod/core/replay_structs.h ================================================ #pragma once struct FScoredGoal; struct FHighlight; struct FReplayPlayerStats; struct ScoredGoal { ScoredGoal() = default; explicit ScoredGoal(const FScoredGoal& other); explicit operator FScoredGoal() const; int frame{}; std::string player_name; int player_team{}; }; struct Highlight { Highlight() = default; explicit Highlight(const FHighlight& other); explicit operator FHighlight() const; int frame; int car_name_index; int ball_name_index; int goal_actor_name_index; }; struct ReplayPlayerStats { ReplayPlayerStats() = default; explicit ReplayPlayerStats(const FReplayPlayerStats& other); explicit operator FReplayPlayerStats() const; std::string name; unsigned char platform{}; /*U_Types_Core_OnlinePlatform*/ unsigned long long online_id{}; int team{}; int score{}; int goals{}; int assists{}; int saves{}; int shots{}; bool is_bot{}; }; ================================================ FILE: include/bakkesmod/plugin/PluginSettingsWindow.h ================================================ #pragma once namespace BakkesMod::Plugin { class PluginSettingsWindow { public: virtual ~PluginSettingsWindow() = default; /// /// This is where you draw your settings gui. It will be drawn in the BakkesMod plugin tab. /// IMPORTANT: This runs in the render thread. /// So if you call any game function from the wrappers you're very likely to crash the game. /// Solve this by wrapping any game function calls in a gameWrapper->Execute to make it run in the game thread /// virtual void RenderSettings() = 0; virtual std::string GetPluginName() = 0; /// /// Don't call this yourself, BM will call this function with a pointer to the current ImGui context /// /// virtual void SetImGuiContext(uintptr_t ctx) = 0; }; } ================================================ FILE: include/bakkesmod/plugin/bakkesmodplugin.h ================================================ #pragma once #include "bakkesmod/wrappers/CVarManagerWrapper.h" #include "bakkesmod/wrappers/GameWrapper.h" #include "bakkesmodsdk.h" #include //#include #ifndef _WINDEF_ class HINSTANCE__; // Forward or never typedef HINSTANCE__* HINSTANCE; #endif namespace BakkesMod { namespace Plugin { class BakkesModPlugin; typedef uintptr_t(*GetPluginFunc)(); typedef void(*deleteFunc)(); struct PluginInfo { short apiBuildVersion; //The bakkesmod API version this plugin was built for. const char* fileName; //The filename of the built DLL const char* className; //The classname of the plugin which is loaded const char* pluginName; //Name of the plugin, shown to the user const char* pluginVersion; //The version of the plugin, shown to the user const unsigned long pluginType; //The type of plugin, can be freeplay, soccar, replay etc GetPluginFunc initializeFunc; //The function that is called to construct the plugin deleteFunc delFunc; }; typedef PluginInfo*(__stdcall *export_func)(); //Default plugin stuff, which is api version and file path #define BAKKESMOD_STANDARD_PLUGIN_STUFF \ BAKKESMOD_PLUGIN_API_VERSION, \ __FILE__ #define BAKKESMOD_PLUGIN(classType, pluginName, pluginVersion, pluginType) \ static std::shared_ptr singleton;\ extern "C" { \ BAKKESMOD_PLUGIN_EXPORT uintptr_t getPlugin() \ { \ \ if(!singleton) { \ singleton = std::shared_ptr(new classType());\ } \ return reinterpret_cast(&singleton); \ } \ BAKKESMOD_PLUGIN_EXPORT void deleteMe() { \ if(singleton) \ singleton = nullptr;\ }\ BAKKESMOD_PLUGIN_EXPORT BakkesMod::Plugin::PluginInfo exports = \ { \ BAKKESMOD_STANDARD_PLUGIN_STUFF, \ #classType, \ pluginName, \ pluginVersion, \ pluginType, \ getPlugin, \ deleteMe \ }; \ } class BAKKESMOD_PLUGIN_EXPORT BakkesModPlugin { public: __pragma(warning(suppress:4251)); std::shared_ptr cvarManager; __pragma(warning(suppress:4251)); std::shared_ptr gameWrapper; virtual void onLoad() {}; //Unload stuff here, notifiers/cvars are automatically cleared. virtual void onUnload() {}; }; struct LoadedPlugin { std::shared_ptr _details; std::shared_ptr _plugin; HINSTANCE _instance; std::string _filename; std::shared_ptr _typeid; LoadedPlugin(std::shared_ptr details, std::shared_ptr plugin, HINSTANCE instance, std::string filename) { _details = details; _plugin = plugin; _instance = instance; _filename = filename; _typeid = std::make_shared(typeid(*plugin)); } ~LoadedPlugin() { //_details.get()->delFunc(); /*if (_instance) FreeLibrary(_instance);*/ } }; } } ================================================ FILE: include/bakkesmod/plugin/bakkesmodsdk.h ================================================ #pragma once enum PLUGINTYPE { PLUGINTYPE_FREEPLAY = 0x01, PLUGINTYPE_CUSTOM_TRAINING = 0x02, PLUGINTYPE_SPECTATOR = 0x04, PLUGINTYPE_BOTAI = 0x08, PLUGINTYPE_REPLAY = 0x10, PLUGINTYPE_THREADED = 0x20, PLUGINTYPE_THREADEDUNLOAD = 0x40 }; //Permissions you can set for notifiers, 0x00 = ALL enum NOTIFIER_PERMISSION { PERMISSION_ALL = 0, PERMISSION_MENU = (1 << 0), PERMISSION_SOCCAR = (1 << 1), PERMISSION_FREEPLAY = (1 << 2), PERMISSION_CUSTOM_TRAINING = (1 << 3), PERMISSION_ONLINE = (1 << 4), PERMISSION_PAUSEMENU_CLOSED = (1 << 5), PERMISSION_REPLAY = (1 << 6), PERMISSION_OFFLINE = (1 << 7) //Only when not in an online game }; #ifdef _BAKKESMOD //Only define _BAKKESMOD if you're building bakkesmod, don't define it when building a plugin! #define BAKKESMOD_PLUGIN_EXPORT #define BAKKESMOD_PLUGIN_IMPORT __declspec(dllexport) #else #define BAKKESMOD_PLUGIN_EXPORT __declspec(dllexport) #define BAKKESMOD_PLUGIN_IMPORT __declspec(dllimport) #endif #define BAKKESMOD_PLUGIN_API_VERSION 95 ================================================ FILE: include/bakkesmod/plugin/botplugin.h ================================================ #pragma once //#include "bakkesmodplugin.h" namespace BakkesMod { namespace Plugin { class BotPlugin// : public BakkesModPlugin { virtual void OnNewGameEvent(); //Clear your old data and register your new bots here! //TODO: find good cleanup }; } } ================================================ FILE: include/bakkesmod/plugin/pluginwindow.h ================================================ #pragma once #include namespace BakkesMod { namespace Plugin { class PluginWindow { public: /* Do ImGui rendering here */ virtual void Render() = 0; /* Name of the menu that is used to toggle the window. */ virtual std::string GetMenuName() = 0; /* Title to give the menu */ virtual std::string GetMenuTitle() = 0; /* Don't call this yourself, BM will call this function with a pointer to the current ImGui context */ virtual void SetImGuiContext(uintptr_t ctx) = 0; /* Should events such as mouse clicks/key inputs be blocked so they won't reach the game */ virtual bool ShouldBlockInput() = 0; /* Return true if overlay which isn't interacted with */ virtual bool IsActiveOverlay() = 0; /* Called when window is opened */ virtual void OnOpen() = 0; /* Called when window is closed */ virtual void OnClose() = 0; }; } } ================================================ FILE: include/bakkesmod/utilities/DecalUtilities.h ================================================ #pragma once #include "bakkesmod/core/custom_decals_structs.h" #include "../../utils/expected.hpp" struct ApplyDecalToCarResult { bool body_applied = false; bool chassis_applied = false; }; struct BodyAssetIdsCheckResult { int body_id; int skin_id; }; class BAKKESMOD_PLUGIN_IMPORT DecalUtilities { public: _NODISCARD static tl::expected ApplyDecalToCar(const CarWrapper& car_wrapper, const pluginsdk::BodyShaderOverride& custom_body_decal); _NODISCARD static tl::expected GetBodyAssetIds(const CarWrapper& car_wrapper); _NODISCARD static tl::expected ApplyDecalToBall(const BallWrapper& ball_wrapper, const pluginsdk::ShaderOverride& shader_override); }; ================================================ FILE: include/bakkesmod/utilities/LoadoutUtilities.h ================================================ #pragma once #include "bakkesmod/core/loadout_structs.h" class BAKKESMOD_PLUGIN_IMPORT LoadoutUtilities { public: // only works in replays void static SetLoadoutItems(const PriWrapper& pri_wrapper, const pluginsdk::ItemDataMap& loadout); void static SetCarProductAttributes(const CarWrapper& car_wrapper, const pluginsdk::ItemDataMap& loadout); void static SetLoadoutPaintFinishColors(const CarWrapper& car_wrapper, const pluginsdk::CarColors& paint_finish); void static ForceSetLoadout(const PriWrapper& pri_wrapper, const pluginsdk::Loadout& loadout); // can be called any time _NODISCARD static pluginsdk::CarColors GetPaintFinishColors(const CarWrapper& car_wrapper); _NODISCARD static std::optional GetLoadoutFromPri(const PriWrapper& pri_wrapper, int team_index); _NODISCARD static std::vector GetBlueColorSet(); _NODISCARD static std::vector GetOrangeColorSet(); _NODISCARD static std::vector GetCustomColorSet(); }; ================================================ FILE: include/bakkesmod/wrappers/AIControllerWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "WrapperStructs.h" #include "ControllerWrapper.h" class BAKKESMOD_PLUGIN_IMPORT AIControllerWrapper : public ControllerWrapper { public: CONSTRUCTORS(AIControllerWrapper) void DoNothing(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/CareerStatsWrapper.h ================================================ #pragma once class BAKKESMOD_PLUGIN_IMPORT CareerStatsWrapper { public: struct StatValue { std::string stat_name; int private_; int unranked; int ranked; }; _NODISCARD static std::vector GetStatValues(); }; ================================================ FILE: include/bakkesmod/wrappers/ControllerWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "WrapperStructs.h" #include "./Engine/ActorWrapper.h" class PlayerReplicationInfoWrapper; class BAKKESMOD_PLUGIN_IMPORT ControllerWrapper : public ActorWrapper { public: CONSTRUCTORS(ControllerWrapper) PlayerReplicationInfoWrapper GetPlayerReplicationInfo(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/Engine/ActorWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ObjectWrapper.h" class PrimitiveComponentWrapper; class WorldInfoWrapper; class BAKKESMOD_PLUGIN_IMPORT ActorWrapper : public ObjectWrapper { public: CONSTRUCTORS(ActorWrapper) //BEGIN SELF IMPLEMENTED Vector GetLocation(); void SetLocation(const Vector location); Vector GetVelocity(); void SetVelocity(const Vector velocity); void AddVelocity(const Vector velocity); Rotator GetRotation(); void SetRotation(const Rotator rotation); void SetTorque(const Vector torq); void Stop(); Vector GetAngularVelocity(); void SetAngularVelocity(const Vector v, bool addToCurrent); bool IsNull(); bool IsNull() const; explicit operator bool(); explicit operator bool() const; WorldInfoWrapper GetWorldInfo(); //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS float GetDrawScale(); void SetDrawScale(float newDrawScale); Vector GetDrawScale3D(); void SetDrawScale3D(Vector newDrawScale3D); Vector GetPrePivot(); void SetPrePivot(Vector newPrePivot); UnrealColor GetEditorIconColor(); void SetEditorIconColor(UnrealColor newEditorIconColor); float GetCustomTimeDilation(); void SetCustomTimeDilation(float newCustomTimeDilation); unsigned char GetPhysics(); void SetPhysics(unsigned char newPhysics); unsigned char GetRemoteRole(); void SetRemoteRole(unsigned char newRemoteRole); unsigned char GetRole(); void SetRole(unsigned char newRole); unsigned char GetCollisionType(); void SetCollisionType(unsigned char newCollisionType); unsigned char GetReplicatedCollisionType(); void SetReplicatedCollisionType(unsigned char newReplicatedCollisionType); ActorWrapper GetOwner(); ActorWrapper GetBase(); unsigned long GetbStatic(); unsigned long GetbHidden(); unsigned long GetbHiddenSelf(); void SetbHiddenSelf(unsigned long newbHiddenSelf); unsigned long GetbNoDelete(); void SetbNoDelete(unsigned long newbNoDelete); unsigned long GetbDeleteMe(); void SetbDeleteMe(unsigned long newbDeleteMe); unsigned long GetbTicked(); void SetbTicked(unsigned long newbTicked); unsigned long GetbOnlyOwnerSee(); void SetbOnlyOwnerSee(unsigned long newbOnlyOwnerSee); unsigned long GetbTickIsDisabled(); void SetbTickIsDisabled(unsigned long newbTickIsDisabled); unsigned long GetbWorldGeometry(); void SetbWorldGeometry(unsigned long newbWorldGeometry); unsigned long GetbIgnoreRigidBodyPawns(); void SetbIgnoreRigidBodyPawns(unsigned long newbIgnoreRigidBodyPawns); unsigned long GetbOrientOnSlope(); void SetbOrientOnSlope(unsigned long newbOrientOnSlope); unsigned long GetbIsMoving(); unsigned long GetbAlwaysEncroachCheck(); void SetbAlwaysEncroachCheck(unsigned long newbAlwaysEncroachCheck); unsigned long GetbHasAlternateTargetLocation(); unsigned long GetbAlwaysRelevant(); unsigned long GetbReplicateInstigator(); unsigned long GetbReplicateMovement(); unsigned long GetbUpdateSimulatedPosition(); void SetbUpdateSimulatedPosition(unsigned long newbUpdateSimulatedPosition); unsigned long GetbDemoRecording(); void SetbDemoRecording(unsigned long newbDemoRecording); unsigned long GetbDemoOwner(); void SetbDemoOwner(unsigned long newbDemoOwner); unsigned long GetbForceDemoRelevant(); void SetbForceDemoRelevant(unsigned long newbForceDemoRelevant); unsigned long GetbNetInitialRotation(); void SetbNetInitialRotation(unsigned long newbNetInitialRotation); unsigned long GetbReplicateRigidBodyLocation(); void SetbReplicateRigidBodyLocation(unsigned long newbReplicateRigidBodyLocation); unsigned long GetbKillDuringLevelTransition(); void SetbKillDuringLevelTransition(unsigned long newbKillDuringLevelTransition); unsigned long GetbPostRenderIfNotVisible(); void SetbPostRenderIfNotVisible(unsigned long newbPostRenderIfNotVisible); unsigned long GetbForceNetUpdate(); void SetbForceNetUpdate(unsigned long newbForceNetUpdate); unsigned long GetbForcePacketUpdate(); void SetbForcePacketUpdate(unsigned long newbForcePacketUpdate); unsigned long GetbPendingNetUpdate(); void SetbPendingNetUpdate(unsigned long newbPendingNetUpdate); unsigned long GetbGameRelevant(); void SetbGameRelevant(unsigned long newbGameRelevant); unsigned long GetbMovable(); void SetbMovable(unsigned long newbMovable); unsigned long GetbCanTeleport(); void SetbCanTeleport(unsigned long newbCanTeleport); unsigned long GetbAlwaysTick(); void SetbAlwaysTick(unsigned long newbAlwaysTick); unsigned long GetbBlocksNavigation(); void SetbBlocksNavigation(unsigned long newbBlocksNavigation); unsigned long GetBlockRigidBody(); void SetBlockRigidBody(unsigned long newBlockRigidBody); unsigned long GetbCollideWhenPlacing(); void SetbCollideWhenPlacing(unsigned long newbCollideWhenPlacing); unsigned long GetbCollideActors(); void SetbCollideActors(unsigned long newbCollideActors); unsigned long GetbCollideWorld(); void SetbCollideWorld(unsigned long newbCollideWorld); unsigned long GetbCollideComplex(); void SetbCollideComplex(unsigned long newbCollideComplex); unsigned long GetbBlockActors(); void SetbBlockActors(unsigned long newbBlockActors); unsigned long GetbBlocksTeleport(); void SetbBlocksTeleport(unsigned long newbBlocksTeleport); unsigned long GetbPhysRigidBodyOutOfWorldCheck(); void SetbPhysRigidBodyOutOfWorldCheck(unsigned long newbPhysRigidBodyOutOfWorldCheck); unsigned long GetbComponentOutsideWorld(); unsigned long GetbRigidBodyWasAwake(); void SetbRigidBodyWasAwake(unsigned long newbRigidBodyWasAwake); unsigned long GetbCallRigidBodyWakeEvents(); void SetbCallRigidBodyWakeEvents(unsigned long newbCallRigidBodyWakeEvents); unsigned long GetbBounce(); void SetbBounce(unsigned long newbBounce); unsigned long GetbEditable(); void SetbEditable(unsigned long newbEditable); unsigned long GetbLockLocation(); void SetbLockLocation(unsigned long newbLockLocation); float GetNetUpdateTime(); void SetNetUpdateTime(float newNetUpdateTime); float GetNetUpdateFrequency(); void SetNetUpdateFrequency(float newNetUpdateFrequency); float GetNetPriority(); void SetNetPriority(float newNetPriority); float GetLastNetUpdateTime(); float GetLastForcePacketUpdateTime(); void SetLastForcePacketUpdateTime(float newLastForcePacketUpdateTime); float GetTimeSinceLastTick(); float GetLifeSpan(); float GetCreationTime(); float GetLastRenderTime(); unsigned long long GetHiddenEditorViews(); void SetHiddenEditorViews(unsigned long long newHiddenEditorViews); ArrayWrapper GetAttached(); Vector GetRelativeLocation(); void SetRelativeLocation(Vector newRelativeLocation); Rotator GetRelativeRotation(); void SetRelativeRotation(Rotator newRelativeRotation); PrimitiveComponentWrapper GetCollisionComponent(); //AUTO-GENERATED FUNCTION PROXIES void ForceNetUpdatePacket(); void ForceNetUpdate2(); bool WillOverlap(Vector& PosA, Vector& VelA, Vector& PosB, Vector& VelB, float StepSize, float Radius, float* Time); void eventReplicationEnded(); void eventPostDemoRewind(); bool IsInPersistentLevel(unsigned long bIncludeLevelStreamingPersistent); void SetHUDLocation(Vector& NewHUDLocation); void eventSpawnedByKismet(); Vector GetTargetLocation(ActorWrapper RequestedBy, unsigned long bRequestAlternateLoc); unsigned char eventScriptGetTeamNum(); unsigned char GetTeamNum2(); bool IsPlayerOwned(); bool IsStationary(); void eventDebugMessagePlayer(std::string msg); Vector GetGravityAcceleration(); Vector GetGravityDirection(); float GetGravityZ(); bool IsOverlapping(ActorWrapper A); bool ContainsPoint(Vector& Spot); void eventFellOutOfWorld(); void SetTickIsDisabled(unsigned long bInDisabled); void SetPhysics2(unsigned char newPhysics); void SetHidden2(unsigned long bNewHidden); void ChartData(std::string DataName, float DataValue); void DrawDebugString(Vector& TextLocation, std::string Text, ActorWrapper TestBaseActor, UnrealColor& TextColor, float Duration); void DrawDebugCone(Vector& Origin, Vector& Direction, float Length, float AngleWidth, float AngleHeight, int NumSides, UnrealColor& DrawColor, unsigned long bPersistentLines); Vector GetAggregateBaseVelocity(ActorWrapper TestBase); bool IsOwnedBy(ActorWrapper TestActor); bool IsBasedOn(ActorWrapper TestActor); float GetTerminalVelocity(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/Engine/EngineTAWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ObjectWrapper.h" class UnrealStringWrapper; class StatGraphSystemWrapper; class BAKKESMOD_PLUGIN_IMPORT EngineTAWrapper : public ObjectWrapper { public: CONSTRUCTORS(EngineTAWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS unsigned long GetbEnableClientPrediction(); void SetbEnableClientPrediction(unsigned long newbEnableClientPrediction); unsigned long GetbClientPhysicsUpdate(); void SetbClientPhysicsUpdate(unsigned long newbClientPhysicsUpdate); unsigned long GetbDisableClientCorrections(); void SetbDisableClientCorrections(unsigned long newbDisableClientCorrections); unsigned long GetbDebugClientCorrections(); void SetbDebugClientCorrections(unsigned long newbDebugClientCorrections); unsigned long GetbForceClientCorrection(); void SetbForceClientCorrection(unsigned long newbForceClientCorrection); float GetPhysicsFramerate(); void SetPhysicsFramerate(float newPhysicsFramerate); int GetMaxPhysicsSubsteps(); void SetMaxPhysicsSubsteps(int newMaxPhysicsSubsteps); int GetMaxUploadedClientFrames(); void SetMaxUploadedClientFrames(int newMaxUploadedClientFrames); int GetMaxClientReplayFrames(); void SetMaxClientReplayFrames(int newMaxClientReplayFrames); int GetPhysicsFrame(); void SetPhysicsFrame(int newPhysicsFrame); float GetRenderAlpha(); void SetRenderAlpha(float newRenderAlpha); int GetReplicatedPhysicsFrame(); void SetReplicatedPhysicsFrame(int newReplicatedPhysicsFrame); int GetDirtyPhysicsFrame(); void SetDirtyPhysicsFrame(int newDirtyPhysicsFrame); int GetForceCorrectionFrames(); void SetForceCorrectionFrames(int newForceCorrectionFrames); int GetTickNotifyIndex(); void SetTickNotifyIndex(int newTickNotifyIndex); UnrealStringWrapper GetShellArchetypePath(); float GetLastBugReportTime(); void SetLastBugReportTime(float newLastBugReportTime); float GetDebugClientCorrectionStartTime(); void SetDebugClientCorrectionStartTime(float newDebugClientCorrectionStartTime); int GetDebugClientCorrectionCount(); void SetDebugClientCorrectionCount(int newDebugClientCorrectionCount); StatGraphSystemWrapper GetStatGraphs(); void SetStatGraphs(StatGraphSystemWrapper newStatGraphs); float GetLastPhysicsDeltaTimeScale(); void SetLastPhysicsDeltaTimeScale(float newLastPhysicsDeltaTimeScale); //AUTO-GENERATED FUNCTION PROXIES void DebugClientCorrections2(); float GetBulletFixedDeltaTime(); void RunPhysicsStep(int BulletSceneIndex, float DeltaTime); void UpdateReplicatedPhysicsFrame(int ServerFrame); void DebugDedicatedServer(float ForHowLong); float GetPhysicsTime(); void eventRecordAppStart(); void eventInit(); void EventPreAsyncTick(float DeltaTime); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/Engine/EnumWrapper.h ================================================ #pragma once #include "ObjectWrapper.h" #include #include class BAKKESMOD_PLUGIN_IMPORT EnumWrapper: public ObjectWrapper { public: CONSTRUCTORS(EnumWrapper) // Get the name of this enum. _NODISCARD std::string GetEnumName() const; // Throws if invalid value _NODISCARD std::string GetEnumLabel(unsigned char enum_value) const; // Throws if invalid label _NODISCARD unsigned char GetEnumValue(const std::string& enum_label) const; // Get a count of how many values this enum contains _NODISCARD size_t GetEnumValueCount() const; // Get a map with all the possible enum values and their labels _NODISCARD std::map GetPossibleValues() const; // Don't forget the first rule of BMSDK! _NODISCARD bool IsNull() const; explicit operator bool() const; /*U_Types_TA_ETeam*/ _NODISCARD static EnumWrapper GetTeamEnum(); /*AActor_ECollisionType*/ _NODISCARD static EnumWrapper GetActorCollisionTypes(); /*AActor_EForceMode*/ _NODISCARD static EnumWrapper GetActorForceModes(); /*AActor_ENetRole*/ _NODISCARD static EnumWrapper GetActorNetRoles(); /*AActor_EPhysics*/ _NODISCARD static EnumWrapper GetActorPhysics(); /*AActor_ETravelType*/ _NODISCARD static EnumWrapper GetActorTravelModes(); /*AGameEvent_TrainingEditor_TA_EPlayTestType*/ _NODISCARD static EnumWrapper GetTrainingPlayTestTypes(); /*AGameEvent_Tutorial_TA_ERotationType*/ _NODISCARD static EnumWrapper GetTutorialRotationTypes(); /*AVehiclePickup_Boost_TA_EBoostType*/ _NODISCARD static EnumWrapper GetBoostTypes(); /*U_Types_Core_OnlinePlatform*/ _NODISCARD static EnumWrapper GetOnlinePlatforms(); /*U_Types_TA_EAchievementType*/ _NODISCARD static EnumWrapper GetAchievementTypes(); /*U_Types_TA_EBallHitType*/ _NODISCARD static EnumWrapper GetBallHitTypes(); /*U_Types_TA_EBlueprintType*/ _NODISCARD static EnumWrapper GetBlueprintTypes(); /*U_Types_TA_ECarImpactResult*/ _NODISCARD static EnumWrapper GetCarImpactResults(); /*U_Types_TA_EChatChannel*/ _NODISCARD static EnumWrapper GetChatChannels(); /*U_Types_TA_EDemolishSpeed*/ _NODISCARD static EnumWrapper GetDemolishSpeeds(); /*U_Types_TA_EDemolishTarget*/ _NODISCARD static EnumWrapper GetDemolishTargets(); /*U_Types_TA_EDifficulty*/ _NODISCARD static EnumWrapper GetDifficulties(); /*U_Types_TA_EHistoryType*/ _NODISCARD static EnumWrapper GetHistoryTypes(); /*U_Types_TA_ENetworkInputBuffer*/ _NODISCARD static EnumWrapper GetNetworkInputBuffers(); /*U_Types_TA_EPawnType*/ _NODISCARD static EnumWrapper GetPawnTypes(); /*U_Types_TA_EProductQuality*/ _NODISCARD static EnumWrapper GetProductQualities(); /*U_Types_TA_EStatGraphLevel*/ _NODISCARD static EnumWrapper GetStatGraphLevels(); /*U_Types_TA_ETrainingSaveType*/ _NODISCARD static EnumWrapper GetTrainingSaveTypes(); /*U_Types_TA_ETrainingType*/ _NODISCARD static EnumWrapper GetTrainingTypes(); /*U_Types_TA_EUnlockMethod*/ _NODISCARD static EnumWrapper GetUnlockMethods(); /*U_Types_TA_EVoiceFilter*/ _NODISCARD static EnumWrapper GetVoiceFilters(); /*UAudioDevice_ETTSSpeaker*/ _NODISCARD static EnumWrapper GetTTSSpeakers(); /*UClientConnectionTracker_TA_EConnectionQualityState*/ _NODISCARD static EnumWrapper GetConnectionQualityStates(); /*UPrimitiveComponent_ERadialImpulseFalloff*/ _NODISCARD static EnumWrapper GetRadialImpulseFalloffs(); /*UPrimitiveComponent_ERBCollisionChannel*/ _NODISCARD static EnumWrapper GetRBCollisionChannels(); /*UReplay_TA_EReplayState*/ _NODISCARD static EnumWrapper GetReplayStates(); /*USampleHistory_TA_EGraphSummaryType*/ _NODISCARD static EnumWrapper GetGraphSummaryTypes(); /*U_TrainingTypes_TA_ETrainingRoundAttempt*/ _NODISCARD static EnumWrapper GetTrainingRoundAttempts(); //UGFxEngine_EWeatherVariant _NODISCARD static EnumWrapper GetWeatherVariant(); //U_Types_TA_EPaintFinishType _NODISCARD static EnumWrapper GetPaintFinishTyp(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/Engine/ObjectWrapper.h ================================================ #pragma once #include "bakkesmod/plugin/bakkesmodsdk.h" #include "../WrapperStructs.h" #include #include #include class BAKKESMOD_PLUGIN_IMPORT ObjectWrapper { public: std::uintptr_t memory_address; ObjectWrapper(std::uintptr_t mem); }; ================================================ FILE: include/bakkesmod/wrappers/Engine/UnrealStringWrapper.h ================================================ #pragma once #include #include "../WrapperStructs.h" #include "../ArrayWrapper.h" class PrimitiveComponentWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; class BAKKESMOD_PLUGIN_IMPORT UnrealStringWrapper : public ArrayWrapper { public: CONSTRUCTORS(UnrealStringWrapper) public: std::string ToString(); std::wstring ToWideString(); bool IsNull(); explicit operator bool(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/Engine/WorldInfoWrapper.h ================================================ #pragma once #include "ActorWrapper.h" class BAKKESMOD_PLUGIN_IMPORT WorldInfoWrapper : public ActorWrapper { public: CONSTRUCTORS(WorldInfoWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS float GetTimeDilation(); float GetDemoPlayTimeDilation(); float GetTimeSeconds(); float GetRealTimeSeconds(); float GetRealDeltaSeconds(); float GetAudioTimeSeconds(); float GetDeltaSeconds(); float GetPauseDelay(); float GetRealTimeToUnPause(); float GetStallZ(); float GetWorldGravityZ(); float GetDefaultGravityZ(); float GetGlobalGravityZ(); float GetRBPhysicsGravityScaling(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/GameEditorWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameEvent/ServerWrapper.h" class PlayerControllerWrapper; class CarWrapper; class ActorWrapper; class FXActorWrapper; class BAKKESMOD_PLUGIN_IMPORT GameEditorWrapper : public ServerWrapper { public: CONSTRUCTORS(GameEditorWrapper) //AUTO-GENERATED FROM FIELDS int GetActiveRoundNumber(); void SetActiveRoundNumber(int newActiveRoundNumber); int GetMaxRounds(); void SetMaxRounds(int newMaxRounds); int GetHistoryPosition(); void SetHistoryPosition(int newHistoryPosition); int GetMaxUndoHistory(); void SetMaxUndoHistory(int newMaxUndoHistory); FXActorWrapper GetFXActorArchetype(); void SetFXActorArchetype(FXActorWrapper newFXActorArchetype); FXActorWrapper GetFXActor(); void SetFXActor(FXActorWrapper newFXActor); //AUTO-GENERATED FUNCTION PROXIES void RotateActor(PlayerControllerWrapper PC, unsigned long bSnapOrientation); void PrevRound(); void NextRound(); void DecreaseTime(); void IncreaseTime(); void StopEditing(PlayerControllerWrapper PC); void StartEditing(); void CycleActor(PlayerControllerWrapper PC); void ReleaseGrabbedActor(PlayerControllerWrapper PC); void ReleaseRotateActor(PlayerControllerWrapper PC); void ToggleRotateActor(PlayerControllerWrapper PC); void ToggleGrabActor(PlayerControllerWrapper PC); void ToggleReleaseActor(PlayerControllerWrapper PC); void ReleaseActor2(PlayerControllerWrapper PC); void GrabActor2(PlayerControllerWrapper PC); bool CanQueSaveReplay(); bool ShouldUpdateCrosshair(); int GetPlayerTeamNumber(); bool CanAddHistory(); void ToggleEditorRound(); void CommitRedoRound(); void ResetRound(); void Save2(); void Redo2(PlayerControllerWrapper PC); void Undo2(PlayerControllerWrapper PC); unsigned char GetOtherHistoryType(unsigned char HistoryType); void ClampUndoHistory(); void ClearRedoHistory(); void ClearAllHistory(); bool DestroyActor(ActorWrapper A, unsigned char HistoryType); bool IsInEditorMode(); void RemoveAllPointsFromScore(int TeamIndex); void RemovePointsFromScore(int PointsToRemove, int TeamIndex); void DeleteAllExistingActorsBasedOffSpawnList(); bool RoundContainsASwitch(); void EnableTriggers(unsigned long bEnable); void HideCarSpawnPoints(unsigned long bHide); void ResetSpawnLocations(); void OnSpawnedArchetype(ActorWrapper SpawnedActor, unsigned char HistoryType); void SpawnArchetype(PlayerControllerWrapper Controller, int ArchetypeIndex); void IncrementSelectedSpawnArchetypeIndex(int Direction, int* Index); [[deprecated("Removed from Rocket League, defaults to false")]] bool CanChangeTeam(); void ResetBallsToDefaultPosition(); void FireBalls(); void Interact(); bool ShouldResetBalls(); void OnVehicleSetup(CarWrapper Car); void HandleVehicleSetup(CarWrapper Car); void OnPlayerRestarted(CarWrapper PlayerCar); bool ChooseTeam(int TeamIndex, PlayerControllerWrapper Player); void InitFX(); void eventPostBeginPlay(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/GameEventWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ActorWrapper.h" class ControllerWrapper; class PlayerControllerWrapper; class CarWrapper; class UnrealStringWrapper; class GameSettingPlaylistWrapper; class PriWrapper; class WrapperStructs; class TeamInfoWrapper; class BAKKESMOD_PLUGIN_IMPORT GameEventWrapper : public ActorWrapper { public: CONSTRUCTORS(GameEventWrapper) _NODISCARD std::string GetMatchTypeName() const; //AUTO-GENERATED FROM FIELDS unsigned char GetReplicatedStateIndex(); void SetReplicatedStateIndex(unsigned char newReplicatedStateIndex); CarWrapper GetCarArchetype(); void SetCarArchetype(CarWrapper newCarArchetype); int GetCountdownTime(); void SetCountdownTime(int newCountdownTime); int GetFinishTime(); void SetFinishTime(int newFinishTime); unsigned long GetbMultiplayer(); void SetbMultiplayer(unsigned long newbMultiplayer); unsigned long GetbCountdownMessagesDisabled(); void SetbCountdownMessagesDisabled(unsigned long newbCountdownMessagesDisabled); unsigned long GetbFillWithAI(); void SetbFillWithAI(unsigned long newbFillWithAI); unsigned long GetbAllowQueueSaveReplay(); void SetbAllowQueueSaveReplay(unsigned long newbAllowQueueSaveReplay); unsigned long GetbAllowReadyUp(); void SetbAllowReadyUp(unsigned long newbAllowReadyUp); unsigned long GetbRestartingMatch(); void SetbRestartingMatch(unsigned long newbRestartingMatch); unsigned long GetbRandomizedBotLoadouts(); void SetbRandomizedBotLoadouts(unsigned long newbRandomizedBotLoadouts); unsigned long GetbHasLeaveMatchPenalty(); void SetbHasLeaveMatchPenalty(unsigned long newbHasLeaveMatchPenalty); unsigned long GetbCanVoteToForfeit(); void SetbCanVoteToForfeit(unsigned long newbCanVoteToForfeit); unsigned long GetbDisableAimAssist(); void SetbDisableAimAssist(unsigned long newbDisableAimAssist); unsigned long GetbAwardAchievements(); void SetbAwardAchievements(unsigned long newbAwardAchievements); int GetMinPlayers(); void SetMinPlayers(int newMinPlayers); int GetMaxPlayers(); void SetMaxPlayers(int newMaxPlayers); ArrayWrapper GetSpawnPoints(); float GetBotSkill(); void SetBotSkill(float newBotSkill); int GetRespawnTime(); void SetRespawnTime(int newRespawnTime); float GetMatchTimeDilation(); void SetMatchTimeDilation(float newMatchTimeDilation); PlayerControllerWrapper GetActivator(); void SetActivator(PlayerControllerWrapper newActivator); CarWrapper GetActivatorCar(); void SetActivatorCar(CarWrapper newActivatorCar); ArrayWrapper GetPlayers(); ArrayWrapper GetPRIs(); ArrayWrapper GetCars(); ArrayWrapper GetLocalPlayers(); int GetStartPointIndex(); void SetStartPointIndex(int newStartPointIndex); int GetGameStateTimeRemaining(); void SetGameStateTimeRemaining(int newGameStateTimeRemaining); int GetReplicatedGameStateTimeRemaining(); void SetReplicatedGameStateTimeRemaining(int newReplicatedGameStateTimeRemaining); float GetBotBoostThreshold_vsAI(); void SetBotBoostThreshold_vsAI(float newBotBoostThreshold_vsAI); StructArrayWrapper GetForfeitInitiatorIDs(); StructArrayWrapper GetBannedPlayers(); PriWrapper GetGameOwner(); void SetGameOwner(PriWrapper newGameOwner); UnrealStringWrapper GetRichPresenceString(); int GetReplicatedRoundCountDownNumber(); void SetReplicatedRoundCountDownNumber(int newReplicatedRoundCountDownNumber); //AUTO-GENERATED FUNCTION PROXIES void InitCountDown(); void StartCountdownTimer(); void AllowReadyUp2(); PriWrapper FindPlayerPRI(SteamID& UniqueId); void HandlePlayerRemoved(GameEventWrapper GameEvent, PriWrapper PRI); void UpdateGameOwner(); void SetGameOwner2(PriWrapper NewOwner); void __GameEvent_TA__SetAllowReadyUp(PriWrapper P); bool __GameEvent_TA__CheckPlayersReady(PriWrapper P); SteamID __GameEvent_TA__CheckForBannedPlayers(PriWrapper PRI); void __Pylon__ChangeNotifyFunc(); void PlayerResetTraining(); bool SuppressModalDialogs(); bool ShouldShowBallIndicator(); void CheckInitiatedForfeit(PriWrapper PRI); void CheckChatBanned(PlayerControllerWrapper PC); PlayerControllerWrapper FindPCForUniqueID(SteamID& PlayerID); bool AllowSplitScreenPlayer(); void AddPlayerChatMessage(SteamID& PlayerID, unsigned char ChatChannel, TeamInfoWrapper Team, std::string Message); void ConditionalStartSpectatorMatch(); bool IsPlayingTraining(); bool IsPlayingLan(); bool IsPlayingOffline(); bool IsPlayingPrivate(); bool IsPlayingPublic(); bool IsOnlineMultiplayer(); void CreateMatchType(std::string Options); bool AllPlayersSelectedTeam(); bool CanQueSaveReplay(); void ForceMatchStart(); void ConditionalStartMatch(); void SaveLocalPlayerStats(); bool CanUseBallCam(); bool HandleNextGame(); void SetMaxPlayers2(int InMaxPlayers); void SetRestartingMatch(unsigned long bRestart); bool ShouldBeFullScreen(); bool IsFinished(); void OnAllPlayersReady(); void CheckPlayersReady2(); void SetAllowReadyUp2(unsigned long bAllow); void AutoReadyPlayers(); bool ShouldAutoReadyUp(PriWrapper PRI); void SendGoMessage(PlayerControllerWrapper Player); void SendCountdownMessage(int Seconds, PlayerControllerWrapper Player); void BroadcastCountdownMessage(int Seconds); void BroadcastGoMessage(); bool AllowShutdown(); float GetRealDeltaTime(float ElapsedTime); void SetTimeDilation(float NewTimeDilation); void ClearRespawnList(); void ReplaceBotsWithAwaitingPlayers(); int GetRespawnTime2(); void RemoveCar(CarWrapper Car); void AddCar(CarWrapper Car); void TickRespawnTime(float DeltaTime); void SetBotSkill2(float NewSkill); PlayerControllerWrapper GetLocalPrimaryPlayer(); bool HasPlayerNamed(std::string PlayerName); void RandomizeBots(); bool MoveToGround(ActorWrapper Mover, float HeightCheck); void SetAllDriving(unsigned long bDriving); void OnFinished(); void StartCountDown(); void StartInitialCountDown(); void OnGameStateTimeLapsed(); void OnGameStateTimeUpdated(); void UpdateGameStateTime(); void SetGameStateTimeRemaining2(int StateTime, unsigned long bFromReplication); void SetGameStateTime2(int StateTime); void OnPlayerRestarted(CarWrapper PlayerCar); void TeleportCar(CarWrapper PlayerCar); void OnCarSpawned(CarWrapper NewCar); bool SpotIsEncroached(Vector& Spot); void RandomizeSpawnPoints(); void RestartPlayers(); void RemoveLocalPlayer(PlayerControllerWrapper Player); void AddLocalPlayer(PlayerControllerWrapper Player); void RemovePRI(PriWrapper PRI); void AddPRI(PriWrapper PRI); void AddForfeitInitiator(SteamID& PlayerID); void BanPlayerID(SteamID& PlayerID); int GetMaxHumans(); int GetNumHumans(); bool FindBotReplacement(PriWrapper PRI); void UpdateBotCount(); void TimerUpdateBotCount(); void InitBotSkill(); void InitMutators(); void HandleFinished(GameEventWrapper GameEvent); void Init2(PlayerControllerWrapper InActivator); void eventInitGame(std::string Options); void OnGameStateChanged(); void OnCanVoteForfeitChanged(); void UpdateCanVoteToForfeit(); bool ShouldAllowVoteToForfeit(); void OnPenaltyChanged(); void UpdateLeaveMatchPenalty(); GameSettingPlaylistWrapper GetPlaylist(); bool ShouldHaveLeaveMatchPenalty(); void OnMatchSettingsChanged(); void ClearGameScoreFromCustomSettings(); void EventPlayerResetTraining(GameEventWrapper GameEvent); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/GameSettingPlaylistWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ObjectWrapper.h" class UnrealStringWrapper; class BAKKESMOD_PLUGIN_IMPORT GameSettingPlaylistWrapper : public ObjectWrapper { public: CONSTRUCTORS(GameSettingPlaylistWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; std::string GetLocalizedName(); std::string GetName(); //AUTO-GENERATED FROM FIELDS UnrealStringWrapper GetTitle(); UnrealStringWrapper GetDescription(); int GetPlayerCount(); void SetPlayerCount(int newPlayerCount); unsigned long GetbStandard(); void SetbStandard(unsigned long newbStandard); unsigned long GetbRanked(); void SetbRanked(unsigned long newbRanked); unsigned long GetbSolo(); void SetbSolo(unsigned long newbSolo); unsigned long GetbNew(); void SetbNew(unsigned long newbNew); unsigned long GetbApplyQuitPenalty(); void SetbApplyQuitPenalty(unsigned long newbApplyQuitPenalty); unsigned long GetbAllowForfeit(); void SetbAllowForfeit(unsigned long newbAllowForfeit); unsigned long GetbDisableRankedReconnect(); void SetbDisableRankedReconnect(unsigned long newbDisableRankedReconnect); unsigned long GetbIgnoreAssignTeams(); void SetbIgnoreAssignTeams(unsigned long newbIgnoreAssignTeams); unsigned long GetbKickOnMigrate(); void SetbKickOnMigrate(unsigned long newbKickOnMigrate); unsigned long GetbAllowClubs(); void SetbAllowClubs(unsigned long newbAllowClubs); unsigned long GetbPlayersVSBots(); void SetbPlayersVSBots(unsigned long newbPlayersVSBots); int GetPlaylistId(); void SetPlaylistId(int newPlaylistId); UnrealStringWrapper GetServerCommand(); //AUTO-GENERATED FUNCTION PROXIES bool IsLanMatch(); bool IsPrivateMatch(); bool IsTournamentMatch(); bool ShouldUpdateSkills(); bool IsValidID(int InPlaylistID); bool IsValid2(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/ReplayDirectorWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ActorWrapper.h" class TeamWrapper; class GameEventWrapper; class ServerWrapper; class ReplaySoccarWrapper; class ReplayWrapper; class PriWrapper; class TeamGameEventWrapper; class BallWrapper; class GoalWrapper; class BAKKESMOD_PLUGIN_IMPORT ReplayDirectorWrapper : public ActorWrapper { public: CONSTRUCTORS(ReplayDirectorWrapper) //AUTO-GENERATED FROM FIELDS float GetSlomoPreScoreTime(); void SetSlomoPreScoreTime(float newSlomoPreScoreTime); float GetSlomoPostScoreTime(); void SetSlomoPostScoreTime(float newSlomoPostScoreTime); float GetSlomoDefendTime(); void SetSlomoDefendTime(float newSlomoDefendTime); float GetSlomoDefendDistance(); void SetSlomoDefendDistance(float newSlomoDefendDistance); float GetSlomoTimeDilation(); void SetSlomoTimeDilation(float newSlomoTimeDilation); float GetMinReplayTime(); void SetMinReplayTime(float newMinReplayTime); float GetMaxReplayTime(); void SetMaxReplayTime(float newMaxReplayTime); float GetReplayPadding(); void SetReplayPadding(float newReplayPadding); float GetHighlightReplayDuration(); void SetHighlightReplayDuration(float newHighlightReplayDuration); float GetTimeBeforeHighlightReplay(); void SetTimeBeforeHighlightReplay(float newTimeBeforeHighlightReplay); ReplaySoccarWrapper GetReplay(); void SetReplay(ReplaySoccarWrapper newReplay); ActorWrapper GetFocusCar(); void SetFocusCar(ActorWrapper newFocusCar); float GetFocusCarChangeTime(); void SetFocusCarChangeTime(float newFocusCarChangeTime); ActorWrapper GetFocusBall(); void SetFocusBall(ActorWrapper newFocusBall); float GetScoreTime(); void SetScoreTime(float newScoreTime); int GetScoreHitIndex(); void SetScoreHitIndex(int newScoreHitIndex); GoalWrapper GetScoredGoal(); void SetScoredGoal(GoalWrapper newScoredGoal); ReplayScoreData GetReplayScoreData(); unsigned long GetbSlomo(); void SetbSlomo(unsigned long newbSlomo); unsigned long GetbSlomoForDefender(); void SetbSlomoForDefender(unsigned long newbSlomoForDefender); unsigned long GetbAutoSave(); void SetbAutoSave(unsigned long newbAutoSave); int GetFocusHitIndex(); void SetFocusHitIndex(int newFocusHitIndex); int GetFocusCarIdx(); void SetFocusCarIdx(int newFocusCarIdx); float GetReplayStartGameTime(); void SetReplayStartGameTime(float newReplayStartGameTime); float GetBallSpawnTime(); void SetBallSpawnTime(float newBallSpawnTime); ServerWrapper GetSoccarGame(); void SetSoccarGame(ServerWrapper newSoccarGame); unsigned char GetScoredOnTeam(); void SetScoredOnTeam(unsigned char newScoredOnTeam); int GetForceCutToFocusActors(); void SetForceCutToFocusActors(int newForceCutToFocusActors); //AUTO-GENERATED FUNCTION PROXIES void HandleReplayFinished(ReplayWrapper InReplay); bool ShouldSlomo(); void UpdateSlomo(); void UpdateFocusActors(); void PlayRandomHighlight(); int GetNextHighlightFrame(); void SetAutoSave(); void SaveUserKeyframe(); void BuildFocusCars(); void SetSlomo2(unsigned long bNewSlomo); void eventTick(float DeltaTime); void eventDestroyed(); float GetReplayTimeSeconds(); void SetFocusActors(ActorWrapper NewCar, ActorWrapper NewBall); float GetReplayStartTime(); void SetSlomoForDefender(BallWrapper Ball, int DefendingTeam); void OnScoreDataChanged(); void HandleScoreUpdated(TeamWrapper Team); void HandleAllTeamsCreated(TeamGameEventWrapper TeamGame); void RecordPlayers(); void HandleGameStateChanged(GameEventWrapper G); void OnSoccarGameSet(); void SetGameEvent(ServerWrapper InGameEvent); void EventFocusCarChanged(ActorWrapper NewFocusCar); void EventAutoSaveChanged(ReplayDirectorWrapper Director); void EventScoreDataChanged(ReplayDirectorWrapper Director); void EventReplayFinished(ReplayDirectorWrapper Director); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/ReplaySoccarWrapper.h ================================================ #pragma once #include "bakkesmod/wrappers/GameEvent/ReplayWrapper.h" #include "bakkesmod/core/replay_structs.h" class PriWrapper; class BAKKESMOD_PLUGIN_IMPORT ReplaySoccarWrapper : public ReplayWrapper { public: CONSTRUCTORS(ReplaySoccarWrapper) _NODISCARD std::vector GetGoals() const; _NODISCARD std::vector GetHighlights() const; _NODISCARD std::vector GetPlayerStats() const; //AUTO-GENERATED FROM FIELDS int GetTeamSize(); void SetTeamSize(int newTeamSize); int GetUnfairTeamSize(); void SetUnfairTeamSize(int newUnfairTeamSize); unsigned long GetbUnfairBots(); void SetbUnfairBots(unsigned long newbUnfairBots); int GetPrimaryPlayerTeam(); void SetPrimaryPlayerTeam(int newPrimaryPlayerTeam); int GetTeam0Score(); void SetTeam0Score(int newTeam0Score); int GetTeam1Score(); void SetTeam1Score(int newTeam1Score); //AUTO-GENERATED FUNCTION PROXIES void eventPreExport(); void RemoveTimelineKeyframe(int KeyframeIndex); void RecordUserEvent(); void AddPlayer(PriWrapper PRI); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/ReplayWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ObjectWrapper.h" class ActorWrapper; class UnrealStringWrapper; #ifdef __cpp_lib_filesystem #include #endif #undef GetCurrentTime class BAKKESMOD_PLUGIN_IMPORT ReplayWrapper : public ObjectWrapper { public: CONSTRUCTORS(ReplayWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS UnrealStringWrapper GetReplayName(); int GetEngineVersion(); void SetEngineVersion(int newEngineVersion); int GetLicenseeVersion(); void SetLicenseeVersion(int newLicenseeVersion); int GetNetVersion(); void SetNetVersion(int newNetVersion); int GetReplayVersion(); void SetReplayVersion(int newReplayVersion); int GetReplayLastSaveVersion(); void SetReplayLastSaveVersion(int newReplayLastSaveVersion); int GetGameVersion(); void SetGameVersion(int newGameVersion); int GetBuildID(); void SetBuildID(int newBuildID); int GetChangelist(); void SetChangelist(int newChangelist); UnrealStringWrapper GetBuildVersion(); int GetReserveMegabytes(); void SetReserveMegabytes(int newReserveMegabytes); float GetRecordFPS(); void SetRecordFPS(float newRecordFPS); float GetKeyframeDelay(); void SetKeyframeDelay(float newKeyframeDelay); int GetMaxChannels(); void SetMaxChannels(int newMaxChannels); int GetMaxReplaySizeMB(); void SetMaxReplaySizeMB(int newMaxReplaySizeMB); [[deprecated("Removed from Rocket League, returns the same as GetId")]] UnrealStringWrapper GetFilename(); _NODISCARD UnrealStringWrapper GetFilePath() const; UnrealStringWrapper GetId(); UnrealStringWrapper GetDate(); std::string GetMapName() const; int GetNumFrames(); void SetNumFrames(int newNumFrames); std::string GetMatchType() const; UnrealStringWrapper GetPlayerName(); unsigned long GetbFileCorrupted(); void SetbFileCorrupted(unsigned long newbFileCorrupted); unsigned long GetbForceKeyframe(); void SetbForceKeyframe(unsigned long newbForceKeyframe); unsigned long GetbLoadedNetPackages(); void SetbLoadedNetPackages(unsigned long newbLoadedNetPackages); unsigned long GetbDebug(); void SetbDebug(unsigned long newbDebug); unsigned char GetReplayState(); void SetReplayState(unsigned char newReplayState); int GetCurrentFrame(); void SetCurrentFrame(int newCurrentFrame); int GetNextKeyframe(); void SetNextKeyframe(int newNextKeyframe); float GetCurrentTime(); void SetCurrentTime(float newCurrentTime); float GetAccumulatedDeltaTime(); void SetAccumulatedDeltaTime(float newAccumulatedDeltaTime); float GetTimeToSkipTo(); void SetTimeToSkipTo(float newTimeToSkipTo); int GetFrameToSkipTo(); void SetFrameToSkipTo(int newFrameToSkipTo); int GetPlayersOnlyTicks(); void SetPlayersOnlyTicks(int newPlayersOnlyTicks); //AUTO-GENERATED FUNCTION PROXIES float GetPlaybackTime(); bool IsFromBeforeGameVersion(unsigned char BeforeGameVersion); bool IsFromBeforeReplayVersion(unsigned char BeforeReplayVersion); void SetReplayName(std::string NewName); void RemoveTimelineKeyframe(int KeyframeIndex); void eventTrimData(int FirstKeyframe, int FirstFrame); ReplayWrapper CreateCopy(float StartTime); void ImportReplay(std::string Path); void ExportReplay(std::string Path); #ifdef __cpp_lib_filesystem void ImportReplay(std::filesystem::path Path); void ExportReplay(std::filesystem::path Path); #endif void SkipToFrame(int frame, unsigned long bFlush); void SkipToTime(float Time, unsigned long bFlush); float GetReplayTimeSeconds(); void StopPlayback(); void StartPlaybackAtFrame(int StartFrame); void StartPlaybackAtTimeSeconds(float StartTime); void StopRecord(); void StartRecord(); void Tick2(float DeltaTime); void eventPreExport(); void EventPlayedFrame(ReplayWrapper Replay); void EventPostTimeSkip(ReplayWrapper Replay); void EventPreTimeSkip(ReplayWrapper Replay); void EventSpawned(ReplayWrapper Replay, ActorWrapper A); void EventPlaybackStopped(ReplayWrapper Replay); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/SaveData/GameEditorSaveDataWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameEvent/SaveData/SaveDataWrapper.h" class TrainingEditorSaveDataWrapper; class UnrealStringWrapper; class BAKKESMOD_PLUGIN_IMPORT GameEditorSaveDataWrapper : public SaveDataWrapper { public: CONSTRUCTORS(GameEditorSaveDataWrapper) //AUTO-GENERATED FROM FIELDS UnrealStringWrapper GetLoadedSaveName(); TrainingEditorSaveDataWrapper GetTrainingData(); void SetTrainingData(TrainingEditorSaveDataWrapper newTrainingData); int GetPlayerTeamNumber(); void SetPlayerTeamNumber(int newPlayerTeamNumber); unsigned long GetbUnowned(); void SetbUnowned(unsigned long newbUnowned); int GetShotsCompleted(); void SetShotsCompleted(int newShotsCompleted); UnrealStringWrapper GetFavoritesFolderPath(); UnrealStringWrapper GetMyTrainingFolderPath(); UnrealStringWrapper GetDownloadedFolderPath(); //AUTO-GENERATED FUNCTION PROXIES unsigned char GetTrainingSaveType(unsigned long bOwned, unsigned long bFavorited); void Init(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/SaveData/SaveDataWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././Engine/ObjectWrapper.h" class UnrealStringWrapper; class BAKKESMOD_PLUGIN_IMPORT SaveDataWrapper : public ObjectWrapper { public: CONSTRUCTORS(SaveDataWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS UnrealStringWrapper GetDirectoryPath(); UnrealStringWrapper GetSaveType(); UnrealStringWrapper GetSaveExt(); unsigned long GetbExactFileMatch(); void SetbExactFileMatch(unsigned long newbExactFileMatch); //AUTO-GENERATED FUNCTION PROXIES void Init(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/SaveData/TrainingEditorSaveDataWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././Engine/ObjectWrapper.h" class UnrealStringWrapper; class BAKKESMOD_PLUGIN_IMPORT TrainingEditorSaveDataWrapper : public ObjectWrapper { public: CONSTRUCTORS(TrainingEditorSaveDataWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS UnrealStringWrapper GetCode(); UnrealStringWrapper GetTM_Name(); unsigned char GetType(); void SetType(unsigned char newType); unsigned char GetDifficulty(); void SetDifficulty(unsigned char newDifficulty); UnrealStringWrapper GetCreatorName(); UnrealStringWrapper GetDescription(); int GetNumRounds(); void SetNumRounds(int newNumRounds); unsigned long long GetCreatedAt(); void SetCreatedAt(unsigned long long newCreatedAt); unsigned long long GetUpdatedAt(); void SetUpdatedAt(unsigned long long newUpdatedAt); [[deprecated("Use GetCreatorPlayerUniqueID instead")]] SteamID GetCreatorPlayerID(); //DEPRECATED void SetCreatorPlayerID(SteamID newCreatorPlayerID); //AUTO-GENERATED FUNCTION PROXIES void Init(); //SELF-IMPLEMENTED UniqueIDWrapper GetCreatorPlayerUniqueID(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/ServerWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameEvent/TeamGameEventWrapper.h" class ControllerWrapper; class PlayerControllerWrapper; class CarWrapper; class ReplayDirectorWrapper; class TeamWrapper; class ActorWrapper; class PriWrapper; class BallWrapper; class GoalWrapper; class BAKKESMOD_PLUGIN_IMPORT ServerWrapper : public TeamGameEventWrapper { public: CONSTRUCTORS(ServerWrapper) //BEGIN SELF IMPLEMENTED BallWrapper GetBall(); void SpawnCar(int carBody, std::string name); void SpawnBot(int carBody, std::string name); BallWrapper SpawnBall(const Vector position, bool wake, bool spawnCannon); bool HasAuthority(); GETSETH(float, GameSpeed) GETSETH(float, SecondsElapsed) CarWrapper GetGameCar(); bool IsBallMovingTowardsGoal(int goalNo, BallWrapper bw); bool IsInGoal(Vector vec); void DisableGoalReset(); void EnableGoalReset(); //void SpawnCar(int body = 0); //Speed from 0 to 2000 pls Vector GenerateShot(Vector startPos, Vector destination, float speed); Vector GenerateGoalAimLocation(int goalNumber, Vector currentBallLocation); Vector GetGoalExtent(int goalNumber = 0); Vector GetGoalLocation(int goalNumber = 0);//END SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS CarWrapper GetTestCarArchetype(); void SetTestCarArchetype(CarWrapper newTestCarArchetype); BallWrapper GetBallArchetype(); void SetBallArchetype(BallWrapper newBallArchetype); ActorWrapper GetBallSpawnPoint(); void SetBallSpawnPoint(ActorWrapper newBallSpawnPoint); int GetSeriesLength(); void SetSeriesLength(int newSeriesLength); int GetGameTime(); void SetGameTime(int newGameTime); int GetWarmupTime(); void SetWarmupTime(int newWarmupTime); int GetMaxScore(); void SetMaxScore(int newMaxScore); int GetAutoBalanceDifference(); void SetAutoBalanceDifference(int newAutoBalanceDifference); float GetScoreSlomoTime(); void SetScoreSlomoTime(float newScoreSlomoTime); float GetGameTimeRemaining(); void SetGameTimeRemaining(float newGameTimeRemaining); int GetSecondsRemaining(); void SetSecondsRemaining(int newSecondsRemaining); int GetWaitTimeRemaining(); void SetWaitTimeRemaining(int newWaitTimeRemaining); float GetTotalGameTimePlayed(); void SetTotalGameTimePlayed(float newTotalGameTimePlayed); float GetOvertimeTimePlayed(); void SetOvertimeTimePlayed(float newOvertimeTimePlayed); unsigned long GetbRoundActive(); void SetbRoundActive(unsigned long newbRoundActive); unsigned long GetbPlayReplays(); void SetbPlayReplays(unsigned long newbPlayReplays); unsigned long GetbBallHasBeenHit(); void SetbBallHasBeenHit(unsigned long newbBallHasBeenHit); unsigned long GetbOverTime(); void SetbOverTime(unsigned long newbOverTime); unsigned long GetbUnlimitedTime(); void SetbUnlimitedTime(unsigned long newbUnlimitedTime); unsigned long GetbNoContest(); void SetbNoContest(unsigned long newbNoContest); unsigned long GetbDisableGoalDelay(); void SetbDisableGoalDelay(unsigned long newbDisableGoalDelay); unsigned long GetbShowNoScorerGoalMessage(); void SetbShowNoScorerGoalMessage(unsigned long newbShowNoScorerGoalMessage); unsigned long GetbMatchEnded(); void SetbMatchEnded(unsigned long newbMatchEnded); unsigned long GetbShowIntroScene(); void SetbShowIntroScene(unsigned long newbShowIntroScene); unsigned long GetbClubMatch(); void SetbClubMatch(unsigned long newbClubMatch); int GetNextSpawnIndex(); void SetNextSpawnIndex(int newNextSpawnIndex); ReplayDirectorWrapper GetReplayDirectorArchetype(); void SetReplayDirectorArchetype(ReplayDirectorWrapper newReplayDirectorArchetype); ReplayDirectorWrapper GetReplayDirector(); void SetReplayDirector(ReplayDirectorWrapper newReplayDirector); ArrayWrapper GetGameBalls(); int GetTotalGameBalls(); void SetTotalGameBalls(int newTotalGameBalls); float GetPostGoalTime(); void SetPostGoalTime(float newPostGoalTime); ArrayWrapper GetGoals(); int GetSecondsRemainingCountdown(); void SetSecondsRemainingCountdown(int newSecondsRemainingCountdown); Vector GetFieldCenter(); void SetFieldCenter(Vector newFieldCenter); TeamWrapper GetGameWinner(); void SetGameWinner(TeamWrapper newGameWinner); TeamWrapper GetMatchWinner(); void SetMatchWinner(TeamWrapper newMatchWinner); PriWrapper GetMVP(); void SetMVP(PriWrapper newMVP); PriWrapper GetFastestGoalPlayer(); void SetFastestGoalPlayer(PriWrapper newFastestGoalPlayer); PriWrapper GetSlowestGoalPlayer(); void SetSlowestGoalPlayer(PriWrapper newSlowestGoalPlayer); PriWrapper GetFurthestGoalPlayer(); void SetFurthestGoalPlayer(PriWrapper newFurthestGoalPlayer); float GetFastestGoalSpeed(); void SetFastestGoalSpeed(float newFastestGoalSpeed); float GetSlowestGoalSpeed(); void SetSlowestGoalSpeed(float newSlowestGoalSpeed); float GetFurthestGoal(); void SetFurthestGoal(float newFurthestGoal); unsigned char GetReplicatedScoredOnTeam(); void SetReplicatedScoredOnTeam(unsigned char newReplicatedScoredOnTeam); unsigned char GetReplicatedServerPerformanceState(); void SetReplicatedServerPerformanceState(unsigned char newReplicatedServerPerformanceState); int GetRoundNum(); void SetRoundNum(int newRoundNum); float GetAssistMaxTime(); void SetAssistMaxTime(float newAssistMaxTime); float GetBallHasBeenHitStartDelay(); void SetBallHasBeenHitStartDelay(float newBallHasBeenHitStartDelay); float GetPodiumDelay(); void SetPodiumDelay(float newPodiumDelay); float GetPodiumTime(); void SetPodiumTime(float newPodiumTime); int GetLobbyEndCountdown(); void SetLobbyEndCountdown(int newLobbyEndCountdown); int GetLobbyCountdown(); void SetLobbyCountdown(int newLobbyCountdown); float GetLobbyTime(); void SetLobbyTime(float newLobbyTime); int GetLobbySpawnRestartTime(); void SetLobbySpawnRestartTime(int newLobbySpawnRestartTime); PlayerControllerWrapper GetPauser(); void SetPauser(PlayerControllerWrapper newPauser); //AUTO-GENERATED FUNCTION PROXIES void SetNumPlayers(int numPlayers); int GetNumPlayers(); int GetPlayerCarCount(); void ReplicateSkillTiers(); void RemoveTeamSelection(); void CheckStart(); void StartLobbyTimer(); void HandleCountdownTick(); void CheckForCountdownAction(); void LobbyCountdownTick(); bool CanSpawnBots(); void StartRound(); void EndRound(); void SetBallEventListeners(BallWrapper Ball, unsigned long bListen); bool CanAwardPoints(); void HandleCarTouch(BallWrapper Ball, CarWrapper HitCar, unsigned char HitType); void SetBallHasBeenHit2(); int DetermineScoreTouchIndex(BallWrapper Ball, GoalWrapper Goal); int DetermineAssistTouchIndex(BallWrapper Ball, int ScoreIdx); void UpdateTotalGameTimePlayed(float DeltaTime); void UpdateGameTime(float DeltaTime); bool CanUpdateGameTime(); void StartReplay(); void HandleReplayFinished(ReplayDirectorWrapper InReplay); void GotoPodiumSpotlight(); void UpdateSpotlight(); void SpawnPodiumCars(); bool CanEnableCarPodiumMovement(); void FinishEvent(); bool __GameEvent_Soccar_TA__UpdateTeamScores(TeamWrapper T); void __GameEvent_Soccar_TA__SubmitMatchComplete(PriWrapper PRI); void __GameEvent_Soccar_TA__CheckStart(TeamWrapper T); void __GameEvent_Soccar_TA__EndState(TeamWrapper T); void __ReplicatedServerPerformanceState__ChangeNotifyFunc(); void __bClubMatch__ChangeNotifyFunc(); void __bShowIntroScene__ChangeNotifyFunc(); void __WaitTimeRemaining__ChangeNotifyFunc(); void CheckJoinInProgress(PriWrapper PRI); bool AllowDynamicCrowd(); void AddBallTrajectory(BallWrapper InBall); bool ShowScorerGoalMessage(); bool CanUseBallCam(); bool DisableStatXP(); void SetDisableGoalDelay(unsigned long bInDisableGoalDelay); void ForceMatchStart(); void RemoveLocalPlayer(PlayerControllerWrapper Player); void AddLocalPlayer(PlayerControllerWrapper Player); void DestroyGoalIndicators(PlayerControllerWrapper Player); void CreateGoalIndicators(PlayerControllerWrapper Player); void BeginHighlightsReplay(); bool ShouldCountUp(); bool ShouldAllowVoteToForfeit(); bool ShouldHaveLeaveMatchPenalty(); void SetPaused(PlayerControllerWrapper InPauser, unsigned long bInPaused); bool ShouldCountdownResumeFromPause(); void SetScoreAndTime(PlayerControllerWrapper PC, int NewScoreTeam0, int NewScoreTeam1, int InGameTimeRemaining, unsigned long bInOvertime, unsigned long bRestartRound); void SaveLocalPlayerStats(); bool ShouldPlayReplay(); bool ShouldRecordReplay(); void OnBallHasBeenHit(); BallWrapper SpawnBall2(Vector& SpawnLoc, unsigned long bWake, unsigned long bSpawnCannon, std::string BallArch); int GetTotalScore(); void HandleCarSet(PriWrapper InPRI); void RemovePlayer(ControllerWrapper Player); void RemovePRI(PriWrapper PRI); void AddPRI(PriWrapper PRI); void OnMatchWinnerSet(); void OnGameWinnerSet(); int MVPSort(PriWrapper A, PriWrapper B); void HandleHitGoal(BallWrapper Ball, GoalWrapper Goal); void ClearReplicatedScoredOnTeam(); void TriggerScoreChangedEvent(); void HandleScoreUpdated(TeamWrapper Team); void OnAllTeamsCreated(); void TriggerGoalScoreEvent(int TeamScoredOn, CarWrapper Scorer); void SetTotalGameBalls2(int TotalBalls); void RecordRecentPlayers(); void UpdateStats(); void NotifyKismetOfCurrentTime(); bool EnoughTimePassedToForfeit(); void OnGameTimeUpdated(); void OnOvertimeUpdated(); void ForceOvertime(); void StartOvertime(); bool OnMyHalf(Vector& TestLocation, unsigned char TeamNum); TeamWrapper GetWinningTeam(); void ResetPickups(); void ResetPlayers(); void OnBallSpawned(BallWrapper NewBall); void ResetBalls(); void DestroyCars(); void FreezePawns(); void DestroyBalls(); void RemoveGameBall(BallWrapper Ball); void AddGameBall(BallWrapper Ball); void StartNewRound(); void CheckForAutoBalance(); bool HasWinner(); void SubmitMatch2(); void SubmitMatchComplete2(); void OnMatchEnded(); bool ShouldDoPodiumSpotlight(); void EndGame(); void UpdateTeamScores2(); void StartNewGame(); void ResetGame(); void ClearReplicatedStatEvent(); void eventDestroyed(); void InitBotDetection(); void InitCrowdManager(); void InitField(); void InitGameObserver(); void OnInit(); void InitMutators(); void OnClubMatch(); bool CanInitClubMatch(); void AssignCustomTeamSettings(); void InitGame2(std::string Options); std::string GetMatchGUID(); void SetMatchGUID(std::string s); void EventGameWinnerSet(ServerWrapper GameEvent); void EventGoalScored(ServerWrapper GameEvent, BallWrapper Ball, GoalWrapper Goal, int ScoreIndex, int AssistIdx); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/TeamGameEventWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameEvent/GameEventWrapper.h" class PlayerControllerWrapper; class CarWrapper; class PriWrapper; class TeamWrapper; class BAKKESMOD_PLUGIN_IMPORT TeamGameEventWrapper : public GameEventWrapper { public: CONSTRUCTORS(TeamGameEventWrapper) //AUTO-GENERATED FROM FIELDS ArrayWrapper GetTeamArchetypes(); ArrayWrapper GetTeams(); int GetMaxTeamSize(); void SetMaxTeamSize(int newMaxTeamSize); int GetNumBots(); void SetNumBots(int newNumBots); unsigned long GetbMuteOppositeTeams(); void SetbMuteOppositeTeams(unsigned long newbMuteOppositeTeams); unsigned long GetbDisableMutingOtherTeam(); void SetbDisableMutingOtherTeam(unsigned long newbDisableMutingOtherTeam); unsigned long GetbForfeit(); void SetbForfeit(unsigned long newbForfeit); unsigned long GetbUnfairTeams(); void SetbUnfairTeams(unsigned long newbUnfairTeams); unsigned long GetbAlwaysAutoSelectTeam(); void SetbAlwaysAutoSelectTeam(unsigned long newbAlwaysAutoSelectTeam); //AUTO-GENERATED FUNCTION PROXIES void StartRematchVote(); void CheckRematchVote(); bool __GameEvent_Team_TA__AllTeamsHaveHumans(TeamWrapper Team); void UpdatePlayerShortcuts(); void ClearTemporarySpawnSpots(); bool ChooseTeam(int TeamIndex, PlayerControllerWrapper Player); [[deprecated("Removed from Rocket League, defaults to false")]] bool CanChangeTeam(); void OnPenaltyChanged(); void OnTeamForfeited(TeamWrapper Team); void HandleTeamForfeit(TeamWrapper Team); void MuteOppositeTeams2(unsigned long bMute); void UpdateBotCount(); bool FindBotReplacement(PriWrapper PRI); void EndGame(); void ForceNoContest(); void AddTemporarySpawnSpot(TeamWrapper Team, CarWrapper Car); void HandleSelectedLoadout(PriWrapper PlayerPRI); void DestroyTeams(); void OnAllTeamsCreated(); void AssignCustomTeamSettings(); void OnMatchSettingsChanged(); bool AllTeamsHaveHumans2(); bool AllTeamsCreated2(); void SetTeam(int TeamNum, TeamWrapper NewTeam); void CreateTeams(); void PreloadBots(); void OnInit(); void SetMaxTeamSize2(int MaxSize); void UpdateMaxTeamSize(); void SetUnfairTeams(unsigned long bUnfair); void InitBotSkill(); void eventInitGame(std::string Options); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/TrainingEditorWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameEvent/GameEditorWrapper.h" class PlayerControllerWrapper; class UnrealStringWrapper; class ActorWrapper; class GameEditorSaveDataWrapper; class BallWrapper; class BAKKESMOD_PLUGIN_IMPORT TrainingEditorWrapper : public GameEditorWrapper { public: CONSTRUCTORS(TrainingEditorWrapper) //AUTO-GENERATED FROM FIELDS float GetMinRoundTime(); void SetMinRoundTime(float newMinRoundTime); float GetMaxRoundTime(); void SetMaxRoundTime(float newMaxRoundTime); unsigned long GetbNoEditor(); void SetbNoEditor(unsigned long newbNoEditor); unsigned long GetbDisplayedRedoPenaltyMessage(); void SetbDisplayedRedoPenaltyMessage(unsigned long newbDisplayedRedoPenaltyMessage); unsigned long GetbUnsavedChanges(); void SetbUnsavedChanges(unsigned long newbUnsavedChanges); int GetPointsScoredThisRound(); void SetPointsScoredThisRound(int newPointsScoredThisRound); int GetShotAttempt(); void SetShotAttempt(int newShotAttempt); int GetGoalieScore(); void SetGoalieScore(int newGoalieScore); unsigned char GetPlayTestType(); void SetPlayTestType(unsigned char newPlayTestType); ArrayWrapper GetGoalMeshBlockers(); ActorWrapper GetGoalMeshBlockerArchetype(); void SetGoalMeshBlockerArchetype(ActorWrapper newGoalMeshBlockerArchetype); GameEditorSaveDataWrapper GetTrainingData(); void SetTrainingData(GameEditorSaveDataWrapper newTrainingData); float GetSaveDelayTime(); void SetSaveDelayTime(float newSaveDelayTime); float GetSaveCooldown(); void SetSaveCooldown(float newSaveCooldown); UnrealStringWrapper GetTrainingFileName(); //AUTO-GENERATED FUNCTION PROXIES void OnLoadingMovieClosed(); void TagHistoryChanges(); void MarkAsDirty(); void ForceTagHistoryChanges(); void SetTracedCrosshairActor(PlayerControllerWrapper PC, ActorWrapper NewActor); bool DestroyBall(BallWrapper Ball); bool AllowDynamicCrowd(); void BroadcastGoMessage(); int GetTotalRounds(); unsigned char GetDifficulty(); unsigned char GetTrainingType(); void Save2(); void OnTrainingModeLoaded(); void DuplicateRound(int Index); void ReorderRound(int FromIndex, int ToIndex); void SetRoundTimeLimit(float NewRoundTime); bool HandleNextGame(); void ResetBalls(); void Load2(std::string SaveName, PlayerControllerWrapper PC); void DestroyGoalMeshBlockers(); void UpdateGoalMeshBlocker(); int GetScore(); void RemovePointsFromScore(int PointsToRemove, int TeamIndex); bool ShowScorerGoalMessage(); void ShowResetRoundMessage(); bool ShowPenaltyMessage(); int GetPlayerTeamNumber(); int GetBallGoalScoreNumber(); void RemoveAllPointsFromScore(int TeamIndex); bool IncrementRound(unsigned long bLoop); Vector AdjustToFloorLocation(Vector& TraceStart, Vector& CollsionExtent); ActorWrapper SpawnArchetypeAtAndAdjustToFloor(ActorWrapper Archetype, Vector& SpawnLocation, Rotator& SpawnRotation); void SpawnBallAndStartPointAt(Vector& BallSpawnLocation, Rotator& BallSpawnRotation, Vector& StartPointSpawnLocation, Rotator& StartPointSpawnRotation); void SetupDefaultRound(); void SwitchToRoundNumber(int RoundNumber, unsigned long BackupCurrentRound); void DeleteRound(int RoundToDelete); void RestartPlayTest(); void EndPlayTest(); void StartPlayTest(unsigned char InPlayTestType); bool CanPlayTestRoundNumber(int RoundNumber); void SetUnsavedChanges(unsigned long bInUnsavedChanges); void UpdateActiveRoundData(); void StartNewRound(); bool IsValidRoundIndex(int ArrayIndex); void AddLocalPlayer(PlayerControllerWrapper Player); void OnInit(); void eventDestroyed(); void eventPostBeginPlay(); void EventSaveResult(unsigned long bSuccess); void EventUnsavedChanges(unsigned long bOutUnsavedChanges); void EventPlaytestStarted(TrainingEditorWrapper GamEvent); void EventRoundChanged(TrainingEditorWrapper GamEvent); void EventRoundTimeChanged(TrainingEditorWrapper GameEvent); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameEvent/TutorialWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameEvent/ServerWrapper.h" class PlayerControllerWrapper; class UnrealStringWrapper; class CarWrapper; class GameEventWrapper; class BallWrapper; class GoalWrapper; class TeamWrapper; class BAKKESMOD_PLUGIN_IMPORT TutorialWrapper : public ServerWrapper { public: CONSTRUCTORS(TutorialWrapper) //BEGIN SELF IMPLEMENTED void Redo(); Vector GetCarSpawnLocation(); void SetCarSpawnLocation(Vector v); Rotator GetCarSpawnRotation(); void SetCarSpawnRotation(Rotator v); CarWrapper GetGameCar(); bool IsBallMovingTowardsGoal(int goalNo, BallWrapper bw); bool IsInGoal(Vector vec); void DisableGoalReset(); void EnableGoalReset(); //void SpawnCar(int body = 0); //Speed from 0 to 2000 pls Vector GenerateShot(Vector startPos, Vector destination, float speed); Vector GenerateGoalAimLocation(int goalNumber, Vector currentBallLocation); Vector GetGoalExtent(int goalNumber = 0); Vector GetGoalLocation(int goalNumber = 0); //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS Vector GetTotalFieldExtent(); void SetTotalFieldExtent(Vector newTotalFieldExtent); int GetTeamNum(); void SetTeamNum(int newTeamNum); int GetBallGoalNum(); void SetBallGoalNum(int newBallGoalNum); unsigned long GetbOnlyScoreInBallGoalNum(); void SetbOnlyScoreInBallGoalNum(unsigned long newbOnlyScoreInBallGoalNum); unsigned long GetbRedoRound(); void SetbRedoRound(unsigned long newbRedoRound); unsigned long GetbAllowSuperBoost(); void SetbAllowSuperBoost(unsigned long newbAllowSuperBoost); unsigned long GetbDisplayedRedoPenaltyMessage(); void SetbDisplayedRedoPenaltyMessage(unsigned long newbDisplayedRedoPenaltyMessage); unsigned long GetbShowBoostMeter(); void SetbShowBoostMeter(unsigned long newbShowBoostMeter); unsigned char GetDifficulty(); void SetDifficulty(unsigned char newDifficulty); unsigned char GetDebugRotationType(); void SetDebugRotationType(unsigned char newDebugRotationType); float GetGoalDepth(); void SetGoalDepth(float newGoalDepth); int GetGameEventRounds(); void SetGameEventRounds(int newGameEventRounds); float GetEventStartTime(); void SetEventStartTime(float newEventStartTime); Vector GetBallInitialVelocity(); void SetBallInitialVelocity(Vector newBallInitialVelocity); int GetSpawnIndexTypeOverride(); void SetSpawnIndexTypeOverride(int newSpawnIndexTypeOverride); int GetWaveIndex(); void SetWaveIndex(int newWaveIndex); int GetWaveSpawnCount(); void SetWaveSpawnCount(int newWaveSpawnCount); int GetRandomSpawnIndex(); void SetRandomSpawnIndex(int newRandomSpawnIndex); UnrealStringWrapper GetStartMessageArchetype(); Vector GetBallSpawnLocation(); void SetBallSpawnLocation(Vector newBallSpawnLocation); int GetPointsScoredThisRound(); void SetPointsScoredThisRound(int newPointsScoredThisRound); int GetBallSpawnCount(); void SetBallSpawnCount(int newBallSpawnCount); float GetBallBounceScale(); void SetBallBounceScale(float newBallBounceScale); int GetCurrentDebugStepX(); void SetCurrentDebugStepX(int newCurrentDebugStepX); int GetCurrentDebugStepY(); void SetCurrentDebugStepY(int newCurrentDebugStepY); int GetCurrentDebugStepZ(); void SetCurrentDebugStepZ(int newCurrentDebugStepZ); int GetRedoCount(); void SetRedoCount(int newRedoCount); int GetRedoTotal(); void SetRedoTotal(int newRedoTotal); //AUTO-GENERATED FUNCTION PROXIES void InitIntro(); void OnLoadingMovieClosed(); void StartTimers(); void UpdateMVP(); bool AllowDynamicCrowd(); void SetTutorialTip(std::string NewTip); void SetShowBoostMeter(unsigned long bShow); float GetStepLoc(int Steps, float TotalDist, unsigned long bIncrement, int* Out_CurrentStep); Vector GetDebugLocationInExtent(Vector& Extent); void InitDebugSetup(CarWrapper Car); void SkipTutorial(); void UpdateBotCount(); void InitMutators(); bool IsPrimaryPlayer(CarWrapper Car); bool CanAwardPoints(); void ShowResetRoundMessage(); void Destroyed(); bool EndTutorial(); void CommitRedoRound(); void RedoRound2(); bool CanRedoRound(); void StartNewRound(); void SaveLocalPlayerStats(); TeamWrapper GetWinningTeam(); void CleanupRoundActors(); bool CanQueSaveReplay(); void ResetBalls(); int GetScore(); void StartRound(); int GetGameEventRounds2(); int GetTotalRounds(); void ResetRoundTime(); void OnPlayerRestarted(CarWrapper PlayerCar); unsigned char GetTrainingType(); void EndGame(); Vector GetRandomLocationInExtent(Vector& Extent); bool Chance(int Chances); int GetOppositeTeamNum(); Vector GetDirectionToGoal(int GoalNum); bool IsGameEventComplete(); Vector ClampPointToExtent(Vector& ExtentCenter, Vector& Point, Vector& Extent); Vector PredictInitialVelocity(Vector& StartLoc, Vector& EndLoc, float Z); BallWrapper GetGameBall(); CarWrapper GetGamePawn(); void ResetGameEvent(); void CheckForReset(); float GetGoalViewWidth(GoalWrapper Goal, Vector& ViewerLoc); bool IsBallMovingTowardsGoal2(GoalWrapper Goal, BallWrapper Ball, float MinVelocityForDestroy, float InGoalDepth); void SetGoalDepth2(); int GetShuffledSpawnIndex(); void DestroyCannon(); void SetCannonOrientation(Vector& NewLocation, Rotator& NewRotation); BallWrapper SpawnBall(Vector& SpawnLoc, unsigned long bWake, unsigned long bSpawnCannon, std::string BallArch); void InitBallEffects(); void InitBallVelocity(); Vector GetRandomGoalAimLocation(int InTeamNum, Vector& BallLoc); Vector GetGoalExtent2(GoalWrapper Goal); void SetBallVelocity(Vector& InitialVelocity, BallWrapper Ball); void InitGameSetup(CarWrapper Car); bool ShouldAllowSuperBoost(); void OnVehicleSetup(CarWrapper Car); void HandleVehicleSetup(CarWrapper Car); void InitCrowdManager(); void HandleScoreUpdated(TeamWrapper Team); void SetDifficulty2(int InDifficulty); void UpdateStats(); void AddLocalPlayer(PlayerControllerWrapper Player); void HandlePlayerResetTraining(GameEventWrapper GameEvent); void OnInit(); void EventTutorialTipChanged(TutorialWrapper GameEvent, std::string NewTip); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/BallBreakoutWrapper.h ================================================ #pragma once #include "BallWrapper.h" class CarWrapper; struct AppliedBreakoutDamage { unsigned char Id; Vector Location; int DamageIndex; int TotalDamage; }; class BAKKESMOD_PLUGIN_IMPORT BallBreakoutWrapper : public BallWrapper { public: CONSTRUCTORS(BallBreakoutWrapper) //BEGIN SELF IMPLEMENTED AppliedBreakoutDamage GetAppliedBreakoutDamage() const; //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS unsigned int GetbClearTeamOnDamage(); void SetbClearTeamOnDamage(unsigned int bClearTeamOnDamage); unsigned int GetbCanDamageOwnTeam(); void SetbCanDamageOwnTeam(unsigned int bCanDamageOwnTeam); float GetMinDamageVelocity(); void SetMinDamageVelocity(float MinDamageVelocity); float GetMinDamageTime(); void SetMinDamageTime(float MinDamageTime); unsigned int GetMinImpactSpeedForCharge(); void SetMinImpactSpeedForCharge(unsigned int MinImpactSpeedForCharge); float GetDoubleTapTime(); void SetDoubleTapTime(float DoubleTapTime); float GetForceAccumDecayPerSecond(); void SetForceAccumDecayPerSecond(float ForceAccumDecayPerSecond); float GetForceAccumMax(); void SetForceAccumMax(float ForceAccumMax); float GetForceAccumRecent(); void SetForceAccumRecent(float ForceAccumRecent); unsigned char GetLastTeamTouch(); void SetLastTeamTouch(unsigned char LastTeamTouch); CarWrapper GetLastCarTouch(); void SetLastCarTouch(CarWrapper LastCarTouch); unsigned int GetLastDamage(); void SetLastDamage(unsigned int LastDamage); float GetLastDamageTime(); void SetLastDamageTime(float LastDamageTime); unsigned int GetDamageIndex(); void SetDamageIndex(unsigned int DamageIndex); float GetAbsorbedForce(); void SetAbsorbedForce(float AbsorbedForce); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS float GetDamagePercent(); bool WillDamage(); unsigned int GetDamageIndexForForce(float Force); unsigned int GetDamageIndexForTime(float Time); void SetLastTeamTouch2(unsigned char InLastTeamTouch); void ForceDamageIndex(unsigned int InIndex); void SetDamageIndex2(unsigned int InIndex); void OnCarTouch(CarWrapper HitCar, unsigned char HitType); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/BallGodWrapper.h ================================================ #pragma once #include "BallWrapper.h" class BAKKESMOD_PLUGIN_IMPORT BallGodWrapper : public BallWrapper { public: CONSTRUCTORS(BallGodWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS float GetWallBounceSpeed(); void SetWallBounceSpeed(float WallBounceSpeed); float GetWallBounceBlend(); void SetWallBounceBlend(float WallBounceBlend); float GetWallBounceBackDistance(); void SetWallBounceBackDistance(float WallBounceBackDistance); float GetTargetBlendScaleXY(); void SetTargetBlendScaleXY(float TargetBlendScaleXY); float GetTargetBlendScaleZ(); void SetTargetBlendScaleZ(float TargetBlendScaleZ); float GetTargetSpeed(); void SetTargetSpeed(float TargetSpeed); float GetTargetSpeedIncrement(); void SetTargetSpeedIncrement(float TargetSpeedIncrement); float GetTargetSpeedBlend(); void SetTargetSpeedBlend(float TargetSpeedBlend); float GetMaxVelocityPitch(); void SetMaxVelocityPitch(float MaxVelocityPitch); float GetLastSpeedIncrementTime(); void SetLastSpeedIncrementTime(float LastSpeedIncrementTime); float GetTargetSpeedIncrementTime(); void SetTargetSpeedIncrementTime(float TargetSpeedIncrementTime); float GetMinGlowBrightness(); void SetMinGlowBrightness(float MinGlowBrightness); float GetMaxGlowBrightness(); void SetMaxGlowBrightness(float MaxGlowBrightness); float GetPulseSpeedScale(); void SetPulseSpeedScale(float PulseSpeedScale); float GetPulseBrightnessScale(); void SetPulseBrightnessScale(float PulseBrightnessScale); float GetPulseMinBrightness(); void SetPulseMinBrightness(float PulseMinBrightness); float GetPulseLifetime(); void SetPulseLifetime(float PulseLifetime); LinearColor GetGlowDefaultColor(); void SetGlowDefaultColor(LinearColor GlowDefaultColor); LinearColor GetMaxSpeedColor(); void SetMaxSpeedColor(LinearColor MaxSpeedColor); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS Vector GetDirectionToTarget(); Vector GetAimLocation(); LinearColor GetMaxSpeedColor2(); bool AtMaxSpeed(); float GetGlowBrightness(); float GetTargetSpeedAlpha(); void UpdatePulse(); void OnTargetSpeedChanged(); void TryIncrementTargetSpeed(); void UpdateColor(); void OnHitTeamNumChanged(); void SetCarHitTeamNum(unsigned char TeamNum); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/BallHauntedWrapper.h ================================================ #pragma once #include "BallWrapper.h" class GoalWrapper; class CarWrapper; class BAKKESMOD_PLUGIN_IMPORT BallHauntedWrapper : public BallWrapper { public: CONSTRUCTORS(BallHauntedWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS float GetTrappedHoverHeight(); void SetTrappedHoverHeight(float TrappedHoverHeight); float GetHorizontalSpeed(); void SetHorizontalSpeed(float HorizontalSpeed); float GetVerticalSpeed(); void SetVerticalSpeed(float VerticalSpeed); float GetArrivalDistance(); void SetArrivalDistance(float ArrivalDistance); float GetTrappedHorizontalSpeed(); void SetTrappedHorizontalSpeed(float TrappedHorizontalSpeed); float GetTrappedVerticalSpeed(); void SetTrappedVerticalSpeed(float TrappedVerticalSpeed); float GetTrappedCaptureTime(); void SetTrappedCaptureTime(float TrappedCaptureTime); float GetHitPhysicsDuration(); void SetHitPhysicsDuration(float HitPhysicsDuration); unsigned char GetReplicatedBeamBrokenValue(); void SetReplicatedBeamBrokenValue(unsigned char ReplicatedBeamBrokenValue); unsigned char GetLastTeamTouch(); void SetLastTeamTouch(unsigned char LastTeamTouch); unsigned char GetDeactivatedGoalIndex(); void SetDeactivatedGoalIndex(unsigned char DeactivatedGoalIndex); unsigned char GetTotalActiveBeams(); void SetTotalActiveBeams(unsigned char TotalActiveBeams); Vector GetSeekTarget(); void SetSeekTarget(Vector SeekTarget); float GetNextNeutralTime(); void SetNextNeutralTime(float NextNeutralTime); unsigned int GetbHitPhysicsActive(); void SetbHitPhysicsActive(unsigned int bHitPhysicsActive); unsigned int GetbIsBallBeamed(); void SetbIsBallBeamed(unsigned int bIsBallBeamed); unsigned int GetbIsTrapped(); void SetbIsTrapped(unsigned int bIsTrapped); float GetCurrentCaptureTime(); void SetCurrentCaptureTime(float CurrentCaptureTime); float GetCaptureTimePercentage(); void SetCaptureTimePercentage(float CaptureTimePercentage); float GetCaptureTimeAtExit(); void SetCaptureTimeAtExit(float CaptureTimeAtExit); GoalWrapper GetActiveGoal(); void SetActiveGoal(GoalWrapper ActiveGoal); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS Vector GetBallDestination(); float GetVerticalVelocity(Vector& Destination); Vector GetDesiredVelocity(); void AddHauntedForces(); void ScoreTrapGoal(); void SetLastTeamTouch2(unsigned char InLastTeamTouch); void SetBallIsTrapped(unsigned int bValue, GoalWrapper Goal); void SetBallHitData(CarWrapper HitCar, Vector& HitLocation, Vector& HitNormal, unsigned char HitType); void TryBreakBeam(CarWrapper HitCar); void OnCarTouch(CarWrapper HitCar, unsigned char HitType); void ActivateHitPhysics(); void SetBallPhased(unsigned int bValue, unsigned int TeamIndex); void SetBallTarget(); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/BallWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameObject/RBActorWrapper.h" class CarWrapper; class ServerWrapper; class PriWrapper; class FXActorWrapper; class GoalWrapper; class BAKKESMOD_PLUGIN_IMPORT BallWrapper : public RBActorWrapper { public: CONSTRUCTORS(BallWrapper) //BEGIN SELF IMPLEMENTED float GetLastTouchTime(); PredictionInfo PredictPosition(float timeAhead); //END SELF IMPLEMENTED _NODISCARD bool IsDropshotBall() const; _NODISCARD bool IsHauntedtBall() const; _NODISCARD bool IsGodBall() const; void FadeOutBall(); void FadeInBall(); //AUTO-GENERATED FROM FIELDS FXActorWrapper GetEndOfGameFXArchetype(); void SetEndOfGameFXArchetype(FXActorWrapper newEndOfGameFXArchetype); unsigned long GetbAllowPlayerExplosionOverride(); void SetbAllowPlayerExplosionOverride(unsigned long newbAllowPlayerExplosionOverride); unsigned long GetbNotifyGroundHit(); void SetbNotifyGroundHit(unsigned long newbNotifyGroundHit); unsigned long GetbEndOfGameHidden(); void SetbEndOfGameHidden(unsigned long newbEndOfGameHidden); unsigned long GetbFadeIn(); void SetbFadeIn(unsigned long newbFadeIn); unsigned long GetbFadeOut(); void SetbFadeOut(unsigned long newbFadeOut); unsigned long GetbPredictionOnGround(); void SetbPredictionOnGround(unsigned long newbPredictionOnGround); unsigned long GetbCanBeAttached(); void SetbCanBeAttached(unsigned long newbCanBeAttached); unsigned long GetbItemFreeze(); void SetbItemFreeze(unsigned long newbItemFreeze); Vector GetMagnusCoefficient(); void SetMagnusCoefficient(Vector newMagnusCoefficient); float GetRadius(); void SetRadius(float newRadius); float GetVisualRadius(); void SetVisualRadius(float newVisualRadius); float GetLastCalculateCarHit(); Vector GetInitialLocation(); void SetInitialLocation(Vector newInitialLocation); void SetInitialRotation(Rotator newInitialRotation); float GetLastHitWorldTime(); float GetReplicatedBallScale(); void SetReplicatedBallScale(float newReplicatedBallScale); float GetReplicatedWorldBounceScale(); void SetReplicatedWorldBounceScale(float newReplicatedWorldBounceScale); float GetReplicatedBallGravityScale(); void SetReplicatedBallGravityScale(float newReplicatedBallGravityScale); float GetReplicatedBallMaxLinearSpeedScale(); void SetReplicatedBallMaxLinearSpeedScale(float newReplicatedBallMaxLinearSpeedScale); float GetReplicatedAddedCarBounceScale(); void SetReplicatedAddedCarBounceScale(float newReplicatedAddedCarBounceScale); float GetAdditionalCarGroundBounceScaleZ(); void SetAdditionalCarGroundBounceScaleZ(float newAdditionalCarGroundBounceScaleZ); float GetAdditionalCarGroundBounceScaleXY(); void SetAdditionalCarGroundBounceScaleXY(float newAdditionalCarGroundBounceScaleXY); unsigned char GetHitTeamNum(); void SetHitTeamNum(unsigned char newHitTeamNum); ServerWrapper GetGameEvent(); float GetExplosionTime(); void SetExplosionTime(float newExplosionTime); Vector GetOldLocation(); void SetOldLocation(Vector newOldLocation); float GetPredictionTimestep(); void SetPredictionTimestep(float newPredictionTimestep); float GetLastPredictionTime(); void SetLastPredictionTime(float newLastPredictionTime); float GetGroundForce(); void SetGroundForce(float newGroundForce); CarWrapper GetCurrentAffector(); void SetCurrentAffector(CarWrapper newCurrentAffector); //AUTO-GENERATED FUNCTION PROXIES Vector GetTrajectoryStartVelocity(); Rotator GetTrajectoryStartRotation(); Vector GetTrajectoryStartLocation(); bool ShouldDrawTrajectory(); float GetAdditionalCarBounceScaleZ(CarWrapper Car); void SetEndOfGameHidden(); void Explode(GoalWrapper ExplosionGoal, Vector& ExplodeLocation, PriWrapper Scorer); void DoDestroy(); void DoExplode(); void Launch(Vector& LaunchPosition, Vector& LaunchDirection); void OnCarTouch(CarWrapper HitCar, unsigned char HitType); void RecordCarHit(CarWrapper HitCar, Vector& HitLocation, Vector& HitNormal, unsigned char HitType); bool IsGroundHit(Vector& HitNormal); void FellOutOfWorld(); bool IsRoundActive(); void eventOnHitGoal(GoalWrapper Goal, Vector& HitLoc); void TurnOff(); void InitAk(); void SetWorldBounceScale(float NewScale); void SetCarBounceScale(float NewScale); void SetBallMaxLinearSpeedScale(float InMaxLinearSpeedScale); void SetBallGravityScale(float InBallGravityScale); void SetBallScale(float NewScale); void EventHitGoal(BallWrapper Ball, GoalWrapper Goal); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/BaseCameraWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ActorWrapper.h" class BAKKESMOD_PLUGIN_IMPORT BaseCameraWrapper : public ActorWrapper { public: CONSTRUCTORS(BaseCameraWrapper) //AUTO-GENERATED FROM FIELDS float GetDefaultFOV(); void SetDefaultFOV(float newDefaultFOV); unsigned long GetbLockedFOV(); void SetbLockedFOV(unsigned long newbLockedFOV); unsigned long GetbConstrainAspectRatio(); void SetbConstrainAspectRatio(unsigned long newbConstrainAspectRatio); unsigned long GetbEnableFading(); void SetbEnableFading(unsigned long newbEnableFading); unsigned long GetbFadeAudio(); void SetbFadeAudio(unsigned long newbFadeAudio); unsigned long GetbForceDisableTemporalAA(); void SetbForceDisableTemporalAA(unsigned long newbForceDisableTemporalAA); unsigned long GetbEnableColorScaling(); void SetbEnableColorScaling(unsigned long newbEnableColorScaling); unsigned long GetbEnableColorScaleInterp(); void SetbEnableColorScaleInterp(unsigned long newbEnableColorScaleInterp); unsigned long GetbUseClientSideCameraUpdates(); void SetbUseClientSideCameraUpdates(unsigned long newbUseClientSideCameraUpdates); unsigned long GetbDebugClientSideCamera(); void SetbDebugClientSideCamera(unsigned long newbDebugClientSideCamera); unsigned long GetbShouldSendClientSideCameraUpdate(); void SetbShouldSendClientSideCameraUpdate(unsigned long newbShouldSendClientSideCameraUpdate); float GetLockedFOV(); void SetLockedFOV(float newLockedFOV); float GetConstrainedAspectRatio(); void SetConstrainedAspectRatio(float newConstrainedAspectRatio); float GetDefaultAspectRatio(); void SetDefaultAspectRatio(float newDefaultAspectRatio); float GetOffAxisYawAngle(); void SetOffAxisYawAngle(float newOffAxisYawAngle); float GetOffAxisPitchAngle(); void SetOffAxisPitchAngle(float newOffAxisPitchAngle); UnrealColor GetFadeColor(); void SetFadeColor(UnrealColor newFadeColor); float GetFadeAmount(); void SetFadeAmount(float newFadeAmount); float GetCamOverridePostProcessAlpha(); void SetCamOverridePostProcessAlpha(float newCamOverridePostProcessAlpha); Vector GetColorScale(); void SetColorScale(Vector newColorScale); Vector GetDesiredColorScale(); void SetDesiredColorScale(Vector newDesiredColorScale); Vector GetOriginalColorScale(); void SetOriginalColorScale(Vector newOriginalColorScale); float GetColorScaleInterpDuration(); void SetColorScaleInterpDuration(float newColorScaleInterpDuration); float GetColorScaleInterpStartTime(); void SetColorScaleInterpStartTime(float newColorScaleInterpStartTime); ViewTarget GetViewTarget(); void SetViewTarget(ViewTarget newViewTarget); ViewTarget GetPendingViewTarget(); void SetPendingViewTarget(ViewTarget newPendingViewTarget); float GetBlendTimeToGo(); void SetBlendTimeToGo(float newBlendTimeToGo); float GetFreeCamDistance(); void SetFreeCamDistance(float newFreeCamDistance); Vector GetFreeCamOffset(); void SetFreeCamOffset(Vector newFreeCamOffset); float GetFadeTime(); void SetFadeTime(float newFadeTime); float GetFadeTimeRemaining(); void SetFadeTimeRemaining(float newFadeTimeRemaining); //AUTO-GENERATED FUNCTION PROXIES void StopAllCameraAnims(unsigned long bImmediate); void ClearAllCameraShakes(); float CalcRadialShakeScale(BaseCameraWrapper Cam, Vector& Epicenter, float InnerRadius, float OuterRadius, float Falloff); void ClearCameraLensEffects(); void ApplyAudioFade(); void UpdateFade(float DeltaTime); void DoUpdateCamera(float DeltaTime); void eventUpdateCamera(float DeltaTime); void SetDesiredColorScale2(Vector& NewColorScale, float InterpTime); Rotator GetCameraRotation(); void SetFOV(float NewFOV); float GetFOVAngle(); void eventDestroyed(); void PostBeginPlay(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/BoostPickupWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameObject/VehiclePickupWrapper.h" class CarWrapper; class BAKKESMOD_PLUGIN_IMPORT BoostPickupWrapper : public VehiclePickupWrapper { public: CONSTRUCTORS(BoostPickupWrapper) //AUTO-GENERATED FROM FIELDS float GetBoostAmount(); void SetBoostAmount(float newBoostAmount); unsigned char GetBoostType(); void SetBoostType(unsigned char newBoostType); //AUTO-GENERATED FUNCTION PROXIES void PlayPickedUpFX(); void Pickup2(CarWrapper Car); bool CanPickup(CarWrapper Car); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/BreakOutActorPlatformWrapper.h ================================================ #pragma once #include "..\Engine\ActorWrapper.h" class BallWrapper; class PriWrapper; #include struct BreakoutDamageState { unsigned char State; PriWrapper Causer {0}; Vector DamageLocation; bool bDirectDamage; bool bImmediate; }; class BAKKESMOD_PLUGIN_IMPORT BreakOutActorPlatformWrapper : public ActorWrapper { public: CONSTRUCTORS(BreakOutActorPlatformWrapper) //BEGIN SELF IMPLEMENTED // Slow(ish) method! static std::vector GetAllPlatforms(); BreakoutDamageState GetDamagestate() const; //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS unsigned int GetSides(); unsigned int GetbPrimaryPlayerStart(); unsigned int GetTeamIndex(); void SetTeamIndex(unsigned int TeamIndex); unsigned int GetMaxDamage(); void SetMaxDamage(unsigned int MaxDamage); float GetNeighborRadius(); void SetNeighborRadius(float NeighborRadius); ArrayWrapper GetNeighbors(); float GetLastHitTime(); void SetLastHitTime(float LastHitTime); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS bool IsBroken(); bool IsDamaged(); void Reset(); void SetDamageState2(unsigned char InDamageState, PriWrapper InDamageCauser, Vector& InLocation, unsigned int bDirectDamage, unsigned int bImmediate); void IncreaseDamage(PriWrapper DamageCauser, Vector& FromLocation, unsigned int bDirectDamage); bool NeighborDamage(BallWrapper Ball, unsigned int InDamage, Vector& HitLocation); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CameraSettingsActorWrapper.h ================================================ #pragma once class BAKKESMOD_PLUGIN_IMPORT CameraSettingsActorWrapper : public ActorWrapper { public: CONSTRUCTORS(CameraSettingsActorWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED _NODISCARD PriWrapper GetPri() const; _NODISCARD ProfileCameraSettings GetProfileSettings() const; _NODISCARD void SetProfileSettings(const ProfileCameraSettings& profileCameraSettings); _NODISCARD bool GetUsingBehindView() const; void SetUsingBehindView(bool bUsingBehindView); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CameraStates/CameraStateBlenderWrapper.h ================================================ #pragma once #include "CameraStateXWrapper.h" struct FViewTargetTransitionParams; struct FCameraOrientation; struct FCameraTransition; struct ViewTargetTransitionParams { explicit ViewTargetTransitionParams(const FViewTargetTransitionParams&); explicit operator FViewTargetTransitionParams() const; float blend_time; unsigned char blend_function;/*ACamera_EViewTargetBlendFunction*/ float blend_exp; bool lock_outgoing; }; struct CameraOrientation { explicit CameraOrientation(const FCameraOrientation&); explicit operator FCameraOrientation() const; Vector focus; Rotator rotation; float distance; float fov; Vector calculated_location; }; struct CameraTransition { explicit CameraTransition(const FCameraTransition&); explicit operator FCameraTransition() const; void* camera_state; //CameraStateWrapperX ViewTargetTransitionParams blend_params; float remaining_time; CameraOrientation snapshot_pov; bool started; }; class BAKKESMOD_PLUGIN_IMPORT CameraStateBlenderWrapper : public ObjectWrapper { public: CONSTRUCTORS(CameraStateBlenderWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED _NODISCARD CameraStateXWrapper GetCameraState() const; _NODISCARD CameraTransition GetTransition() const; _NODISCARD void SetTransition(const CameraTransition& transition) const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CameraStates/CameraStateCarRefWrapper.h ================================================ #pragma once #include "CameraStateWrapper.h" class BAKKESMOD_PLUGIN_IMPORT CameraStateCarRefWrapper : public CameraStateWrapper { public: CONSTRUCTORS(CameraStateCarRefWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CameraStates/CameraStateCarWrapper.h ================================================ #pragma once #include "CameraStateCarRefWrapper.h" class BAKKESMOD_PLUGIN_IMPORT CameraStateCarWrapper : public CameraStateCarRefWrapper { public: CONSTRUCTORS(CameraStateCarWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; static const CameraStateCarWrapper GetInstanceWithDefaultValues(); //END SELF IMPLEMENTED _NODISCARD float GetInterpToGroundRate() const; _NODISCARD float GetInterpToAirRate() const; _NODISCARD float GetGroundRotationInterpRate() const; _NODISCARD float GetGroundRotationInterpRateWall() const; _NODISCARD float GetFOVInterpSpeed() const; _NODISCARD float GetSupersonicFOVInterpSpeed() const; _NODISCARD float GetGroundNormalInterpRate() const; void SetInterpToGroundRate(float value); void SetInterpToAirRate(float value); void SetGroundRotationInterpRate(float value); void SetGroundRotationInterpRateWall(float value); void SetFOVInterpSpeed(float value); void SetSupersonicFOVInterpSpeed(float value); void SetGroundNormalInterpRate(float value); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CameraStates/CameraStateWrapper.h ================================================ #pragma once #include "CameraStateXWrapper.h" class BAKKESMOD_PLUGIN_IMPORT CameraStateWrapper : public CameraStateXWrapper { public: CONSTRUCTORS(CameraStateWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CameraStates/CameraStateXWrapper.h ================================================ #pragma once #include "bakkesmod/wrappers/Engine/ObjectWrapper.h" class BAKKESMOD_PLUGIN_IMPORT CameraStateXWrapper : public ObjectWrapper { public: CONSTRUCTORS(CameraStateXWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; _NODISCARD std::string GetStateType() const; //END SELF IMPLEMENTED private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CameraWrapper.h ================================================ #pragma once #include "CameraStates/CameraStateBlenderWrapper.h" template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameObject/CameraXWrapper.h" class ActorWrapper; class RBActorWrapper; class WrapperStructs; class CameraSettingsActorWrapper; class BAKKESMOD_PLUGIN_IMPORT CameraWrapper : public CameraXWrapper { public: CONSTRUCTORS(CameraWrapper) //BEGIN SELF IMPLEMENTED Vector GetLocation(); void SetLocation(Vector location); Rotator GetRotation(); void SetRotation(Rotator rotation); ProfileCameraSettings GetCameraSettings(); void SetCameraSettings(ProfileCameraSettings settings); bool IsCameraShakeOn(); POV GetPOV(); void SetPOV(POV pov); void SetFOV(float fov); float GetFOV(); void SetLockedFOV(bool lock); ActorWrapper GetCameraAsActor(); std::string GetCameraState(); void SetCameraState(std::string stateName); Vector linterp(Vector start, Vector end, float elapsed, float speed); //END SELF IMPLEMENTED std::string GetFocusActor(); bool SetFocusActor(std::string actorName); bool SetFlyCamBallTargetMode(); _NODISCARD CameraStateBlenderWrapper GetBlender() const; _NODISCARD CameraSettingsActorWrapper GetCameraSettingsActor() const; //AUTO-GENERATED FROM FIELDS float GetSwivelFastSpeed(); void SetSwivelFastSpeed(float newSwivelFastSpeed); float GetSwivelDieRate(); void SetSwivelDieRate(float newSwivelDieRate); StructArrayWrapper GetCameraPresetSettings(); float GetHorizontalSplitscreenHeightOffset(); void SetHorizontalSplitscreenHeightOffset(float newHorizontalSplitscreenHeightOffset); float GetHorizontalSplitscreenFOVOffset(); void SetHorizontalSplitscreenFOVOffset(float newHorizontalSplitscreenFOVOffset); float GetVerticalSplitscreenFOVOffset(); void SetVerticalSplitscreenFOVOffset(float newVerticalSplitscreenFOVOffset); float GetClipRate(); void SetClipRate(float newClipRate); Rotator GetCurrentSwivel(); void SetCurrentSwivel(Rotator newCurrentSwivel); RBActorWrapper GetDemolisher(); void SetDemolisher(RBActorWrapper newDemolisher); unsigned long GetbDemolished(); void SetbDemolished(unsigned long newbDemolished); //AUTO-GENERATED FUNCTION PROXIES float ClipToField(float CameraLocationZ); void Demolished2(RBActorWrapper InDemolisher); Rotator GetDesiredSwivel(float LookUp, float LookRight); void UpdateSwivel(float DeltaTime); float GetDefaultFOVOffset(); float GetDefaultViewHeightOffset(); void UpdateFOV(); void EventCameraTargetChanged(CameraWrapper Camera, ActorWrapper Target); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CameraXWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameObject/BaseCameraWrapper.h" class ActorWrapper; class BAKKESMOD_PLUGIN_IMPORT CameraXWrapper : public BaseCameraWrapper { public: CONSTRUCTORS(CameraXWrapper) //AUTO-GENERATED FROM FIELDS Rotator GetPCDeltaRotation(); void SetPCDeltaRotation(Rotator newPCDeltaRotation); Rotator GetOldControllerRotation(); void SetOldControllerRotation(Rotator newOldControllerRotation); Vector GetPCDeltaLocation(); void SetPCDeltaLocation(Vector newPCDeltaLocation); Vector GetOldControllerLocation(); void SetOldControllerLocation(Vector newOldControllerLocation); Vector GetShakeLocationOffset(); void SetShakeLocationOffset(Vector newShakeLocationOffset); Rotator GetShakeRotationOffset(); void SetShakeRotationOffset(Rotator newShakeRotationOffset); float GetShakeFOVOffset(); void SetShakeFOVOffset(float newShakeFOVOffset); UnrealColor GetStartFadeColor(); void SetStartFadeColor(UnrealColor newStartFadeColor); UnrealColor GetEndFadeColor(); void SetEndFadeColor(UnrealColor newEndFadeColor); Vector GetClipOffset(); void SetClipOffset(Vector newClipOffset); unsigned long GetbDisableCameraShake(); void SetbDisableCameraShake(unsigned long newbDisableCameraShake); unsigned long GetbSnapNextTransition(); void SetbSnapNextTransition(unsigned long newbSnapNextTransition); //AUTO-GENERATED FUNCTION PROXIES void eventOnViewTargetChanged(); bool IsTransitioning(); void SnapTransition(); void CopyFade(CameraXWrapper Other); void UpdateFade(float DeltaTime); void eventUpdateCamera(float DeltaTime); Rotator RemoveRoll(Rotator& InRot); void UpdateCameraState(); void InstanceCameraStates(); void OnLoadingMovieClosesd(); void eventPostBeginPlay(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CarComponent/AirControlComponentWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/CarComponent/CarComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT AirControlComponentWrapper : public CarComponentWrapper { public: CONSTRUCTORS(AirControlComponentWrapper) //AUTO-GENERATED FROM FIELDS Rotator GetAirTorque(); void SetAirTorque(Rotator newAirTorque); Rotator GetAirDamping(); void SetAirDamping(Rotator newAirDamping); float GetThrottleForce(); void SetThrottleForce(float newThrottleForce); float GetDodgeDisableTimeRemaining(); void SetDodgeDisableTimeRemaining(float newDodgeDisableTimeRemaining); float GetControlScale(); void SetControlScale(float newControlScale); float GetAirControlSensitivity(); void SetAirControlSensitivity(float newAirControlSensitivity); //AUTO-GENERATED FUNCTION PROXIES void ApplyForces(float ActiveTime); void OnCreated(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CarComponent/BoostWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/CarComponent/CarComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT BoostWrapper : public CarComponentWrapper { public: CONSTRUCTORS(BoostWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS float GetBoostConsumptionRate(); void SetBoostConsumptionRate(float newBoostConsumptionRate); float GetMaxBoostAmount(); void SetMaxBoostAmount(float newMaxBoostAmount); float GetStartBoostAmount(); void SetStartBoostAmount(float newStartBoostAmount); float GetCurrentBoostAmount(); void SetCurrentBoostAmount(float newCurrentBoostAmount); float GetBoostModifier(); void SetBoostModifier(float newBoostModifier); float GetLastBoostAmountRequestTime(); void SetLastBoostAmountRequestTime(float newLastBoostAmountRequestTime); float GetLastBoostAmount(); void SetLastBoostAmount(float newLastBoostAmount); unsigned long GetbPendingConfirmBoostAmount(); void SetbPendingConfirmBoostAmount(unsigned long newbPendingConfirmBoostAmount); unsigned long GetbNoBoost(); void SetbNoBoost(unsigned long newbNoBoost); float GetBoostForce(); void SetBoostForce(float newBoostForce); float GetMinBoostTime(); void SetMinBoostTime(float newMinBoostTime); float GetRechargeRate(); void SetRechargeRate(float newRechargeRate); float GetRechargeDelay(); void SetRechargeDelay(float newRechargeDelay); int GetUnlimitedBoostRefCount(); void SetUnlimitedBoostRefCount(int newUnlimitedBoostRefCount); unsigned char GetReplicatedBoostAmount(); void SetReplicatedBoostAmount(unsigned char newReplicatedBoostAmount); //AUTO-GENERATED FUNCTION PROXIES bool ShouldPredictBoostConsumption(); void ReadReplicatedBoostAmount(); void eventSetReplicatedBoostAmount(); void ApplyForces(float ActiveTime); void ClientGiveBoost(float Amount); void ConfirmBoostAmount2(); void SendConfirmBoostAmount(); void ClientFixBoostAmount(float TimeStamp, float Amount); void ServerConfirmBoostAmount(float TimeStamp, float Amount); void SetRechargeDelay2(float InRechargeDelay); void SetRechargeRate2(float InRechargeRate); void SetNoBoost(unsigned long Enabled); void SetUnlimitedBoost2(unsigned long Enabled); void SetUnlimitedBoostDelayed(unsigned long Enabled); void SetBoostModifier2(float Modifier); void SetBoostAmount(float Amount); void GiveBoost2(float Amount); void GiveStartingBoost(); void GiveFullBoost(); float GetPercentBoostFull(); bool IsFull(); void RemoveFromCar(); bool CanDeactivate(); bool CanActivate(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CarComponent/CarComponentWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././Engine/ActorWrapper.h" class CarWrapper; class PriWrapper; class FXActorWrapper; class VehicleWrapper; class BAKKESMOD_PLUGIN_IMPORT CarComponentWrapper : public ActorWrapper { public: CONSTRUCTORS(CarComponentWrapper) //AUTO-GENERATED FROM FIELDS FXActorWrapper GetFXActorArchetype(); void SetFXActorArchetype(FXActorWrapper newFXActorArchetype); unsigned long GetbDisabled(); void SetbDisabled(unsigned long newbDisabled); unsigned long GetbAutoActivate(); void SetbAutoActivate(unsigned long newbAutoActivate); unsigned long GetbSimulateComponent(); void SetbSimulateComponent(unsigned long newbSimulateComponent); unsigned long GetbCreated(); void SetbCreated(unsigned long newbCreated); unsigned long GetbActive(); void SetbActive(unsigned long newbActive); unsigned long GetbRemovedFromCar(); void SetbRemovedFromCar(unsigned long newbRemovedFromCar); unsigned char GetComponentData(); void SetComponentData(unsigned char newComponentData); unsigned char GetReplicatedActive(); void SetReplicatedActive(unsigned char newReplicatedActive); PriWrapper GetActivator(); void SetActivator(PriWrapper newActivator); VehicleWrapper GetVehicle(); void SetVehicle(VehicleWrapper newVehicle); CarWrapper GetCar(); void SetCar(CarWrapper newCar); float GetActivityTime(); void SetActivityTime(float newActivityTime); float GetReplicatedActivityTime(); void SetReplicatedActivityTime(float newReplicatedActivityTime); FXActorWrapper GetFXActor(); void SetFXActor(FXActorWrapper newFXActor); //AUTO-GENERATED FUNCTION PROXIES void eventFellOutOfWorld(); float GetInactiveTime(); float GetActiveTime(); void ApplyForces(float ActiveTime); void PrePhysicsStep(float DeltaTime); void RemoveFromCar(); bool CanDeactivate(); bool ConditionalDeactivate(); bool CanActivate(); bool ConditionalActivate(); void SetActive(unsigned long bNewActive); void Deactivate2(); void Activate2(); void UnregisterCarEvents(); void RegisterCarEvents(); void HandleVehicleSetup(CarWrapper InCar); void OnVehicleSetupComplete(); void Create2(CarWrapper OwnerCar, PriWrapper InActivator); void ClientUpdateActive(); void EventActivationChanged(CarComponentWrapper CarComponent); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CarComponent/DodgeComponentWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/CarComponent/CarComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT DodgeComponentWrapper : public CarComponentWrapper { public: CONSTRUCTORS(DodgeComponentWrapper) //AUTO-GENERATED FROM FIELDS float GetDodgeInputThreshold(); void SetDodgeInputThreshold(float newDodgeInputThreshold); float GetSideDodgeImpulse(); void SetSideDodgeImpulse(float newSideDodgeImpulse); float GetSideDodgeImpulseMaxSpeedScale(); void SetSideDodgeImpulseMaxSpeedScale(float newSideDodgeImpulseMaxSpeedScale); float GetForwardDodgeImpulse(); void SetForwardDodgeImpulse(float newForwardDodgeImpulse); float GetForwardDodgeImpulseMaxSpeedScale(); void SetForwardDodgeImpulseMaxSpeedScale(float newForwardDodgeImpulseMaxSpeedScale); float GetBackwardDodgeImpulse(); void SetBackwardDodgeImpulse(float newBackwardDodgeImpulse); float GetBackwardDodgeImpulseMaxSpeedScale(); void SetBackwardDodgeImpulseMaxSpeedScale(float newBackwardDodgeImpulseMaxSpeedScale); float GetSideDodgeTorque(); void SetSideDodgeTorque(float newSideDodgeTorque); float GetForwardDodgeTorque(); void SetForwardDodgeTorque(float newForwardDodgeTorque); float GetDodgeTorqueTime(); void SetDodgeTorqueTime(float newDodgeTorqueTime); float GetMinDodgeTorqueTime(); void SetMinDodgeTorqueTime(float newMinDodgeTorqueTime); float GetDodgeZDamping(); void SetDodgeZDamping(float newDodgeZDamping); float GetDodgeZDampingDelay(); void SetDodgeZDampingDelay(float newDodgeZDampingDelay); float GetDodgeZDampingUpTime(); void SetDodgeZDampingUpTime(float newDodgeZDampingUpTime); float GetDodgeImpulseScale(); void SetDodgeImpulseScale(float newDodgeImpulseScale); float GetDodgeTorqueScale(); void SetDodgeTorqueScale(float newDodgeTorqueScale); Vector GetDodgeTorque(); void SetDodgeTorque(Vector newDodgeTorque); Vector GetDodgeDirection(); void SetDodgeDirection(Vector newDodgeDirection); //AUTO-GENERATED FUNCTION PROXIES void SetDodgeSettings(); void ApplyTorqueForces(float ActiveTime); void ApplyDodgeImpulse(); Vector GetDodgeImpulse2(Vector& DodgeDir); void ApplyForces(float ActiveTime); bool CanActivate(); void OnCreated(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CarComponent/DoubleJumpComponentWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/CarComponent/CarComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT DoubleJumpComponentWrapper : public CarComponentWrapper { public: CONSTRUCTORS(DoubleJumpComponentWrapper) //AUTO-GENERATED FROM FIELDS void SetJumpImpulse(float newJumpImpulse); float GetImpulseScale(); void SetImpulseScale(float newImpulseScale); //AUTO-GENERATED FUNCTION PROXIES void ApplyForces(float ActiveTime); void OnCreated(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CarComponent/FlipCarComponentWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/CarComponent/CarComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT FlipCarComponentWrapper : public CarComponentWrapper { public: CONSTRUCTORS(FlipCarComponentWrapper) //AUTO-GENERATED FROM FIELDS float GetFlipCarImpulse(); void SetFlipCarImpulse(float newFlipCarImpulse); float GetFlipCarTorque(); void SetFlipCarTorque(float newFlipCarTorque); float GetFlipCarTime(); void SetFlipCarTime(float newFlipCarTime); unsigned long GetbFlipRight(); void SetbFlipRight(unsigned long newbFlipRight); //AUTO-GENERATED FUNCTION PROXIES void InitFlip(); void ApplyForces(float ActiveTime); bool CanActivate(); void OnCreated(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CarComponent/JumpComponentWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/CarComponent/CarComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT JumpComponentWrapper : public CarComponentWrapper { public: CONSTRUCTORS(JumpComponentWrapper) //AUTO-GENERATED FROM FIELDS float GetMinJumpTime(); void SetMinJumpTime(float newMinJumpTime); float GetJumpImpulse(); void SetJumpImpulse(float newJumpImpulse); float GetJumpForce(); void SetJumpForce(float newJumpForce); float GetJumpForceTime(); void SetJumpForceTime(float newJumpForceTime); float GetPodiumJumpForceTime(); void SetPodiumJumpForceTime(float newPodiumJumpForceTime); float GetJumpImpulseSpeed(); void SetJumpImpulseSpeed(float newJumpImpulseSpeed); float GetJumpAccel(); void SetJumpAccel(float newJumpAccel); float GetMaxJumpHeight(); void SetMaxJumpHeight(float newMaxJumpHeight); float GetMaxJumpHeightTime(); void SetMaxJumpHeightTime(float newMaxJumpHeightTime); unsigned long GetbDeactivate(); void SetbDeactivate(unsigned long newbDeactivate); //AUTO-GENERATED FUNCTION PROXIES void ApplyForces(float ActiveTime); void CacheJumpData(); void OnCreated(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CarComponent/PrimitiveComponentWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././Engine/ObjectWrapper.h" class BAKKESMOD_PLUGIN_IMPORT PrimitiveComponentWrapper : public ObjectWrapper { public: CONSTRUCTORS(PrimitiveComponentWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; void SetOwnerNoSee(bool newOwnerNoSee); //AUTO-GENERATED FROM FIELDS unsigned char GetRBChannel(); void SetRBChannel(unsigned char newRBChannel); unsigned char GetRBDominanceGroup(); void SetRBDominanceGroup(unsigned char newRBDominanceGroup); unsigned long GetbOnlyBlockActorMovement(); void SetbOnlyBlockActorMovement(unsigned long newbOnlyBlockActorMovement); unsigned long GetHiddenGame(); void SetHiddenGame(unsigned long newHiddenGame); unsigned long GetbOwnerNoSee(); void SetbOwnerNoSee(unsigned long newbOwnerNoSee); unsigned long GetbOnlyOwnerSee(); void SetbOnlyOwnerSee(unsigned long newbOnlyOwnerSee); unsigned long GetbIgnoreOwnerHidden(); void SetbIgnoreOwnerHidden(unsigned long newbIgnoreOwnerHidden); unsigned long GetbUseAsOccluder(); void SetbUseAsOccluder(unsigned long newbUseAsOccluder); unsigned long GetbAllowApproximateOcclusion(); void SetbAllowApproximateOcclusion(unsigned long newbAllowApproximateOcclusion); unsigned long GetbFirstFrameOcclusion(); void SetbFirstFrameOcclusion(unsigned long newbFirstFrameOcclusion); unsigned long GetbIgnoreNearPlaneIntersection(); void SetbIgnoreNearPlaneIntersection(unsigned long newbIgnoreNearPlaneIntersection); unsigned long GetbAcceptsStaticDecals(); unsigned long GetbAcceptsDynamicDecals(); unsigned long GetbIsRefreshingDecals(); unsigned long GetCastShadow(); void SetCastShadow(unsigned long newCastShadow); unsigned long GetbForceDirectLightMap(); void SetbForceDirectLightMap(unsigned long newbForceDirectLightMap); unsigned long GetbCastDynamicShadow(); void SetbCastDynamicShadow(unsigned long newbCastDynamicShadow); unsigned long GetbCastStaticShadow(); void SetbCastStaticShadow(unsigned long newbCastStaticShadow); unsigned long GetbSelfShadowOnly(); void SetbSelfShadowOnly(unsigned long newbSelfShadowOnly); unsigned long GetbNoModSelfShadow(); void SetbNoModSelfShadow(unsigned long newbNoModSelfShadow); unsigned long GetbAcceptsDynamicDominantLightShadows(); void SetbAcceptsDynamicDominantLightShadows(unsigned long newbAcceptsDynamicDominantLightShadows); unsigned long GetbCastHiddenShadow(); void SetbCastHiddenShadow(unsigned long newbCastHiddenShadow); unsigned long GetbCastShadowAsTwoSided(); void SetbCastShadowAsTwoSided(unsigned long newbCastShadowAsTwoSided); unsigned long GetbAcceptsLights(); void SetbAcceptsLights(unsigned long newbAcceptsLights); unsigned long GetbAcceptsDynamicLights(); void SetbAcceptsDynamicLights(unsigned long newbAcceptsDynamicLights); unsigned long GetbUseOnePassLightingOnTranslucency(); void SetbUseOnePassLightingOnTranslucency(unsigned long newbUseOnePassLightingOnTranslucency); unsigned long GetbUsePrecomputedShadows(); unsigned long GetbHasExplicitShadowParent(); unsigned long GetCollideActors(); void SetCollideActors(unsigned long newCollideActors); unsigned long GetAlwaysCheckCollision(); void SetAlwaysCheckCollision(unsigned long newAlwaysCheckCollision); unsigned long GetBlockActors(); void SetBlockActors(unsigned long newBlockActors); unsigned long GetBlockZeroExtent(); void SetBlockZeroExtent(unsigned long newBlockZeroExtent); unsigned long GetBlockNonZeroExtent(); void SetBlockNonZeroExtent(unsigned long newBlockNonZeroExtent); unsigned long GetCanBlockCamera(); void SetCanBlockCamera(unsigned long newCanBlockCamera); unsigned long GetBlockRigidBody(); void SetBlockRigidBody(unsigned long newBlockRigidBody); unsigned long GetbBlockFootPlacement(); void SetbBlockFootPlacement(unsigned long newbBlockFootPlacement); unsigned long GetbDisableAllRigidBody(); void SetbDisableAllRigidBody(unsigned long newbDisableAllRigidBody); unsigned long GetbSkipRBGeomCreation(); void SetbSkipRBGeomCreation(unsigned long newbSkipRBGeomCreation); unsigned long GetbNotifyRigidBodyCollision(); void SetbNotifyRigidBodyCollision(unsigned long newbNotifyRigidBodyCollision); unsigned long GetbFluidDrain(); void SetbFluidDrain(unsigned long newbFluidDrain); unsigned long GetbFluidTwoWay(); void SetbFluidTwoWay(unsigned long newbFluidTwoWay); unsigned long GetbIgnoreRadialImpulse(); void SetbIgnoreRadialImpulse(unsigned long newbIgnoreRadialImpulse); unsigned long GetbIgnoreRadialForce(); void SetbIgnoreRadialForce(unsigned long newbIgnoreRadialForce); unsigned long GetbIgnoreForceField(); void SetbIgnoreForceField(unsigned long newbIgnoreForceField); unsigned long GetbUseCompartment(); void SetbUseCompartment(unsigned long newbUseCompartment); unsigned long GetAlwaysLoadOnClient(); void SetAlwaysLoadOnClient(unsigned long newAlwaysLoadOnClient); unsigned long GetAlwaysLoadOnServer(); void SetAlwaysLoadOnServer(unsigned long newAlwaysLoadOnServer); unsigned long GetbIgnoreHiddenActorsMembership(); void SetbIgnoreHiddenActorsMembership(unsigned long newbIgnoreHiddenActorsMembership); unsigned long GetAbsoluteTranslation(); void SetAbsoluteTranslation(unsigned long newAbsoluteTranslation); unsigned long GetAbsoluteRotation(); void SetAbsoluteRotation(unsigned long newAbsoluteRotation); unsigned long GetAbsoluteScale(); void SetAbsoluteScale(unsigned long newAbsoluteScale); int GetVisibilityId(); void SetVisibilityId(int newVisibilityId); Vector GetTranslation(); void SetTranslation(Vector newTranslation); Rotator GetRotation(); void SetRotation(Rotator newRotation); float GetScale(); void SetScale(float newScale); Vector GetScale3D(); void SetScale3D(Vector newScale3D); float GetBoundsScale(); void SetBoundsScale(float newBoundsScale); void SetLastSubmitTime(float newLastSubmitTime); float GetLastRenderTime(); float GetScriptRigidBodyCollisionThreshold(); void SetScriptRigidBodyCollisionThreshold(float newScriptRigidBodyCollisionThreshold); //AUTO-GENERATED FUNCTION PROXIES void TermRBPhys(); void InitRBPhys(); void SetNotifyRigidBodyCollision(unsigned long bNewNotifyRigidBodyCollision); void SetRBChannel2(unsigned char Channel); void SetRBCollidesWithChannel(unsigned char Channel, unsigned long bNewCollides); void SetBlockRigidBody2(unsigned long bNewBlockRigidBody); void RetardRBLinearVelocity(Vector& RetardDir, float VelScale); void SetRBAngularVelocity(Vector& NewAngVel, unsigned long bAddToCurrent); void SetRBLinearVelocity(Vector& NewVel, unsigned long bAddToCurrent); void AddRadialForce(Vector& Origin, float Radius, float Strength, unsigned char Falloff); void AddRadialImpulse(Vector& Origin, float Radius, float Strength, unsigned char Falloff, unsigned long bVelChange); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CarComponent/VehicleSimWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././Engine/ObjectWrapper.h" class VehicleWrapper; class CarWrapper; class WheelWrapper; class BAKKESMOD_PLUGIN_IMPORT VehicleSimWrapper : public ObjectWrapper { public: CONSTRUCTORS(VehicleSimWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS ArrayWrapper GetWheels(); float GetDriveTorque(); void SetDriveTorque(float newDriveTorque); float GetBrakeTorque(); void SetBrakeTorque(float newBrakeTorque); float GetStopThreshold(); void SetStopThreshold(float newStopThreshold); float GetIdleBrakeFactor(); void SetIdleBrakeFactor(float newIdleBrakeFactor); float GetOppositeBrakeFactor(); void SetOppositeBrakeFactor(float newOppositeBrakeFactor); unsigned long GetbUseAckermannSteering(); void SetbUseAckermannSteering(unsigned long newbUseAckermannSteering); unsigned long GetbWasAttached(); void SetbWasAttached(unsigned long newbWasAttached); float GetOutputThrottle(); void SetOutputThrottle(float newOutputThrottle); float GetOutputSteer(); void SetOutputSteer(float newOutputSteer); float GetOutputBrake(); void SetOutputBrake(float newOutputBrake); float GetOutputHandbrake(); void SetOutputHandbrake(float newOutputHandbrake); VehicleWrapper GetVehicle(); void SetVehicle(VehicleWrapper newVehicle); CarWrapper GetCar(); void SetCar(CarWrapper newCar); float GetSteeringSensitivity(); void SetSteeringSensitivity(float newSteeringSensitivity); //AUTO-GENERATED FUNCTION PROXIES private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CarComponent/WheelWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././Engine/ObjectWrapper.h" class VehicleSimWrapper; class BAKKESMOD_PLUGIN_IMPORT WheelWrapper : public ObjectWrapper { public: CONSTRUCTORS(WheelWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS float GetSteerFactor(); void SetSteerFactor(float newSteerFactor); float GetWheelRadius(); void SetWheelRadius(float newWheelRadius); float GetSuspensionStiffness(); void SetSuspensionStiffness(float newSuspensionStiffness); float GetSuspensionDampingCompression(); void SetSuspensionDampingCompression(float newSuspensionDampingCompression); float GetSuspensionDampingRelaxation(); void SetSuspensionDampingRelaxation(float newSuspensionDampingRelaxation); float GetSuspensionTravel(); void SetSuspensionTravel(float newSuspensionTravel); float GetSuspensionMaxRaise(); void SetSuspensionMaxRaise(float newSuspensionMaxRaise); float GetContactForceDistance(); void SetContactForceDistance(float newContactForceDistance); float GetSpinSpeedDecayRate(); void SetSpinSpeedDecayRate(float newSpinSpeedDecayRate); Vector GetBoneOffset(); void SetBoneOffset(Vector newBoneOffset); Vector GetPresetRestPosition(); void SetPresetRestPosition(Vector newPresetRestPosition); Vector GetLocalSuspensionRayStart(); void SetLocalSuspensionRayStart(Vector newLocalSuspensionRayStart); Vector GetLocalRestPosition(); void SetLocalRestPosition(Vector newLocalRestPosition); VehicleSimWrapper GetVehicleSim(); void SetVehicleSim(VehicleSimWrapper newVehicleSim); int GetWheelIndex(); void SetWheelIndex(int newWheelIndex); WheelContactData GetContact(); void SetContact(WheelContactData newContact); unsigned long GetbDrawDebug(); void SetbDrawDebug(unsigned long newbDrawDebug); unsigned long GetbHadContact(); void SetbHadContact(unsigned long newbHadContact); float GetFrictionCurveInput(); void SetFrictionCurveInput(float newFrictionCurveInput); float GetAerialThrottleToVelocityFactor(); void SetAerialThrottleToVelocityFactor(float newAerialThrottleToVelocityFactor); float GetAerialAccelerationFactor(); void SetAerialAccelerationFactor(float newAerialAccelerationFactor); float GetSpinSpeed(); void SetSpinSpeed(float newSpinSpeed); //AUTO-GENERATED FUNCTION PROXIES Vector GetRefWheelLocation(); float GetSuspensionDistance(); float GetSteer2(); Vector GetLinearVelocity(); void EventContactChanged(WheelWrapper Wheel); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/CarWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameObject/VehicleWrapper.h" class WheelWrapper; class PriXWrapper; class GameEventWrapper; class RumblePickupComponentWrapper; class ActorWrapper; class RBActorWrapper; class PriWrapper; class FXActorWrapper; class CarComponentWrapper; class FlipCarComponentWrapper; class BallWrapper; class PrimitiveComponentWrapper; class BAKKESMOD_PLUGIN_IMPORT CarWrapper : public VehicleWrapper { public: CONSTRUCTORS(CarWrapper) //BEGIN SELF IMPLEMENTED bool IsBoostCheap(); void SetBoostCheap(bool b); void SetCarRotation(Rotator rotation); void ForceBoost(bool force); std::string GetOwnerName(); void Unfreeze(); ControllerInput GetInput(); void SetInput(ControllerInput input); void Destroy(); void Demolish(); unsigned long HasFlip(); int GetLoadoutBody(); //END SELF IMPLEMENTED PrimitiveComponentWrapper GetNameplateMeshComponent(); //AUTO-GENERATED FROM FIELDS //Only works in freeplay void SetCarColor(LinearColor mainColor, LinearColor secondaryColor); ArrayWrapper GetDefaultCarComponents(); FlipCarComponentWrapper GetFlipComponent(); unsigned char GetDemolishTarget(); void SetDemolishTarget(unsigned char newDemolishTarget); unsigned char GetDemolishSpeed(); void SetDemolishSpeed(unsigned char newDemolishSpeed); unsigned long GetbLoadoutSet(); void SetbLoadoutSet(unsigned long newbLoadoutSet); unsigned long GetbDemolishOnOpposingGround(); void SetbDemolishOnOpposingGround(unsigned long newbDemolishOnOpposingGround); unsigned long GetbWasOnOpposingGround(); void SetbWasOnOpposingGround(unsigned long newbWasOnOpposingGround); unsigned long GetbDemolishOnGoalZone(); void SetbDemolishOnGoalZone(unsigned long newbDemolishOnGoalZone); unsigned long GetbWasInGoalZone(); void SetbWasInGoalZone(unsigned long newbWasInGoalZone); unsigned long GetbOverrideHandbrakeOn(); void SetbOverrideHandbrakeOn(unsigned long newbOverrideHandbrakeOn); unsigned long GetbCollidesWithVehicles(); void SetbCollidesWithVehicles(unsigned long newbCollidesWithVehicles); unsigned long GetbOverrideBoostOn(); void SetbOverrideBoostOn(unsigned long newbOverrideBoostOn); FXActorWrapper GetExitFXArchetype(); void SetExitFXArchetype(FXActorWrapper newExitFXArchetype); float GetMaxTimeForDodge(); void SetMaxTimeForDodge(float newMaxTimeForDodge); float GetLastWheelsHitBallTime(); void SetLastWheelsHitBallTime(float newLastWheelsHitBallTime); float GetReplicatedCarScale(); void SetReplicatedCarScale(float newReplicatedCarScale); FXActorWrapper GetBodyFXActor(); void SetBodyFXActor(FXActorWrapper newBodyFXActor); PriWrapper GetAttackerPRI(); void SetAttackerPRI(PriWrapper newAttackerPRI); Vector GetMouseAccel(); void SetMouseAccel(Vector newMouseAccel); Vector GetMouseAirAccel(); void SetMouseAirAccel(Vector newMouseAirAccel); RumblePickupComponentWrapper GetAttachedPickup(); void SetAttachedPickup(RumblePickupComponentWrapper newAttachedPickup); Vector GetReplayFocusOffset(); void SetReplayFocusOffset(Vector newReplayFocusOffset); float GetAddedBallForceMultiplier(); void SetAddedBallForceMultiplier(float newAddedBallForceMultiplier); float GetAddedCarForceMultiplier(); void SetAddedCarForceMultiplier(float newAddedCarForceMultiplier); GameEventWrapper GetGameEvent(); void SetGameEvent(GameEventWrapper newGameEvent); //AUTO-GENERATED FUNCTION PROXIES float GetMaxDriveBackwardsSpeed(); float GetMaxDriveForwardSpeed(); Vector GetReplayFocusLocation(); void OnPickupChanged(RumblePickupComponentWrapper InPickup); void SetAttachedPickup2(RumblePickupComponentWrapper InPickup); void EnablePodiumMode(); void CopyPushFactorCurve(); void ClearAttacker(); void NotifyNewAttacker(PriWrapper Attacker); void UpdateBallIndicator(); void eventOnSuperSonicChanged(); void eventOnGroundChanged(); void FellOutOfWorld(); void DemolishDestroyTimer(); void Demolish2(RBActorWrapper Demolisher); bool Teleport(Vector& SpawnLocation, Rotator& SpawnRotation, unsigned long bStopVelocity, unsigned long bUpdateRotation, float ExtraForce); void OnJumpReleased(); void OnJumpPressed(); void eventSetVehicleInput(ControllerInput& NewInput); bool CanDemolish(CarWrapper HitCar); bool ShouldDemolish(CarWrapper HitCar, Vector& HitLocation, Vector& HitNormal, unsigned char* Result); unsigned char ApplyCarImpactForces(CarWrapper OtherCar, Vector& HitLocation, Vector& HitNormal); bool IsBumperHit(CarWrapper OtherCar); void ApplyBallImpactForces(BallWrapper Ball, Vector& HitLocation); bool IsDodging(); void OnHitBall(BallWrapper Ball, Vector& HitLocation, Vector& HitNormal); bool AnyWheelTouchingGround(); CarComponentWrapper GiveCarComponent(CarComponentWrapper ComponentArchetype, PriWrapper Activator); void AddDefaultCarComponents(); void DetachPrimitiveComponent(PrimitiveComponentWrapper Component); void HandleWheelBallHit(WheelWrapper Wheel); void RespawnInPlace(); void SetCarScale(float NewScale); void OnClubColorsChanged(); void HandleTeamChanged(PriXWrapper MyPRI); bool UpdateTeamLoadout(); void InitTeamPaint(); int GetLoadoutTeamIndex(); int GetPreviewTeamIndex(); bool HasTeam(); void HandleLoadoutSelected(PriWrapper MyPRI); void HandleGameEventChanged(PriWrapper MyPRI); void OnPRIChanged(); void OnControllerChanged(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/ClubDetailsWrapper.h ================================================ #pragma once #include "../Engine/UnrealStringWrapper.h" #include "../StructArrayWrapper.h" #include "ClubSettingsWrapper.h" #include "../UniqueIDWrapper.h" struct BAKKESMOD_PLUGIN_IMPORT ClubMember { unsigned char paddingForReasons[72]; [[deprecated("Use GetUniqueID instead")]] SteamID GetSteamId(); //DEPRECATED UniqueIDWrapper GetUniqueID(); UnrealStringWrapper GetName(); }; //SteamID steamID; //unsigned char padding[48]; //UnrealStringWrapper name; class BAKKESMOD_PLUGIN_IMPORT ClubDetailsWrapper : public ClubSettingsWrapper { public: CONSTRUCTORS(ClubDetailsWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS unsigned long long GetClubID(); [[deprecated("Use GetOwnerPlayerUniqueID instead")]] SteamID GetOwnerPlayerID(); //DEPRECATED UniqueIDWrapper GetOwnerPlayerUniqueID(); UnrealStringWrapper GetMotD(); unsigned long GetbVerified(); unsigned long long GetLastUpdatedTime(); StructArrayWrapper GetMembers(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/ClubSettingsWrapper.h ================================================ #pragma once #include "../Engine/ObjectWrapper.h" #include "../Engine/UnrealStringWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ClubSettingsWrapper : public ObjectWrapper { public: CONSTRUCTORS(ClubSettingsWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS UnrealStringWrapper GetClubName(); UnrealStringWrapper GetClubTag(); int GetPrimaryColor(); int GetAccentColor(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/FXActorWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ActorWrapper.h" class BAKKESMOD_PLUGIN_IMPORT FXActorWrapper : public ActorWrapper { public: CONSTRUCTORS(FXActorWrapper) //AUTO-GENERATED FROM FIELDS unsigned long GetbDeactivateWhenOwnerDestroyed(); void SetbDeactivateWhenOwnerDestroyed(unsigned long newbDeactivateWhenOwnerDestroyed); unsigned long GetbAllowShadowCasting(); void SetbAllowShadowCasting(unsigned long newbAllowShadowCasting); unsigned long GetbAutoActivate(); void SetbAutoActivate(unsigned long newbAutoActivate); unsigned long GetbRenderInactive(); void SetbRenderInactive(unsigned long newbRenderInactive); unsigned long GetbActive(); void SetbActive(unsigned long newbActive); unsigned long GetbHadOwner(); void SetbHadOwner(unsigned long newbHadOwner); FXActorWrapper GetParent(); void SetParent(FXActorWrapper newParent); ActorWrapper GetAttachmentActor(); void SetAttachmentActor(ActorWrapper newAttachmentActor); float GetDestroyWaitTime(); void SetDestroyWaitTime(float newDestroyWaitTime); float GetDestroyTime(); void SetDestroyTime(float newDestroyTime); int GetEditID(); void SetEditID(int newEditID); //AUTO-GENERATED FUNCTION PROXIES void eventDumpDebugInfo(); void eventDestroyed(); void Inherit(FXActorWrapper Other); void ResetParticles(); void StopAllEffects(); void eventDeactivateAndDestroy(); void UpdateFXStates(); bool IsLocallyControlled(); void Deactivate2(); void Activate2(); void BindTo(FXActorWrapper ParentFXActor); void SetAttachmentActor2(ActorWrapper AttachToActor); void PostBeginPlay(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/GoalHoopsWrapper.h ================================================ #pragma once #include "GoalWrapper.h" class ActorWrapper; class BAKKESMOD_PLUGIN_IMPORT GoalHoopsWrapper : public GoalWrapper { public: CONSTRUCTORS(GoalHoopsWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS ActorWrapper GetBackboard(); float GetRadius(); Vector GetBackboardLocation(); Vector GetBackboardDirection(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/GoalWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ObjectWrapper.h" class FXActorWrapper; class ActorWrapper; class UnrealStringWrapper; class BAKKESMOD_PLUGIN_IMPORT GoalWrapper : public ObjectWrapper { public: CONSTRUCTORS(GoalWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS ActorWrapper GetGoalOrientation(); void SetGoalOrientation(ActorWrapper newGoalOrientation); ArrayWrapper GetOverrideGoalIndicatorOrientations(); unsigned char GetTeamNum(); void SetTeamNum(unsigned char newTeamNum); FXActorWrapper GetScoreFX(); void SetScoreFX(FXActorWrapper newScoreFX); UnrealStringWrapper GetGoalIndicatorArchetype(); unsigned long GetbNoGoalIndicator(); void SetbNoGoalIndicator(unsigned long newbNoGoalIndicator); unsigned long GetbOnlyGoalsFromDirection(); void SetbOnlyGoalsFromDirection(unsigned long newbOnlyGoalsFromDirection); unsigned long GetbShowFocusExtent(); void SetbShowFocusExtent(unsigned long newbShowFocusExtent); ActorWrapper GetGoalDirection(); void SetGoalDirection(ActorWrapper newGoalDirection); int GetPointsToAward(); void SetPointsToAward(int newPointsToAward); Vector GetAutoCamFocusExtent(); void SetAutoCamFocusExtent(Vector newAutoCamFocusExtent); Vector GetGoalFocusLocationOffset(); void SetGoalFocusLocationOffset(Vector newGoalFocusLocationOffset); float GetMaxGoalScorerAttachRadius(); void SetMaxGoalScorerAttachRadius(float newMaxGoalScorerAttachRadius); Vector GetGoalScoredDotDirection(); void SetGoalScoredDotDirection(Vector newGoalScoredDotDirection); float GetMinAttachGoalToScorerDot(); void SetMinAttachGoalToScorerDot(float newMinAttachGoalToScorerDot); Vector GetLocation(); void SetLocation(Vector newLocation); Vector GetDirection(); void SetDirection(Vector newDirection); Vector GetRight(); void SetRight(Vector newRight); Vector GetUp(); void SetUp(Vector newUp); Rotator GetRotation(); void SetRotation(Rotator newRotation); Vector GetLocalExtent(); void SetLocalExtent(Vector newLocalExtent); Vector GetWorldCenter(); void SetWorldCenter(Vector newWorldCenter); Vector GetWorldExtent(); void SetWorldExtent(Vector newWorldExtent); Vector GetWorldFrontCenter(); void SetWorldFrontCenter(Vector newWorldFrontCenter); //AUTO-GENERATED FUNCTION PROXIES Vector GetGoalFocusExtentCenter(); void Init(); void eventBeginPlay(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/MapDataWrapper.h ================================================ #pragma once class BAKKESMOD_PLUGIN_IMPORT MapDataWrapper : public ObjectWrapper { public: CONSTRUCTORS(MapDataWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED _NODISCARD std::string GetName() const; _NODISCARD std::string GetLocalizedName() const; _NODISCARD std::string GetLocalizedVariantName() const; MapDataWrapper GetIsVariantOf() const; /** * \brief Use EnumWrapper::GetWeatherVariant to interpret this value * \return A enum value for the WeatherVariant */ _NODISCARD unsigned char GetWeatherVariant() const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/MapListWrapper.h ================================================ #pragma once #include "MapDataWrapper.h" class BAKKESMOD_PLUGIN_IMPORT MapListWrapper : public ObjectWrapper { public: CONSTRUCTORS(MapListWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED _NODISCARD ArrayWrapper GetSortedMaps() const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/MeshComponents/CarMeshComponentBaseWrapper.h ================================================ #pragma once #include "SkeletalMeshComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT CarMeshComponentBaseWrapper : public SkeletalMeshComponentWrapper { public: CONSTRUCTORS(CarMeshComponentBaseWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; _NODISCARD CarWrapper GetCar() const; //END SELF IMPLEMENTED private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/MeshComponents/MeshComponentWrapper.h ================================================ #pragma once class BAKKESMOD_PLUGIN_IMPORT MeshComponentWrapper : public PrimitiveComponentWrapper { public: CONSTRUCTORS(MeshComponentWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/MeshComponents/SkeletalMeshComponentWrapper.h ================================================ #pragma once #include "MeshComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT SkeletalMeshComponentWrapper : public MeshComponentWrapper { public: CONSTRUCTORS(SkeletalMeshComponentWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/PerformanceStats/InputBufferGraphWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/PerformanceStats/StatGraphWrapper.h" class SampleHistoryWrapper; class BAKKESMOD_PLUGIN_IMPORT InputBufferGraphWrapper : public StatGraphWrapper { public: CONSTRUCTORS(InputBufferGraphWrapper) //AUTO-GENERATED FROM FIELDS SampleHistoryWrapper GetBuffer(); void SetBuffer(SampleHistoryWrapper newBuffer); SampleHistoryWrapper GetBufferTarget(); void SetBufferTarget(SampleHistoryWrapper newBufferTarget); SampleHistoryWrapper GetOverUnderFrames(); void SetOverUnderFrames(SampleHistoryWrapper newOverUnderFrames); SampleHistoryWrapper GetPhysicsRate(); void SetPhysicsRate(SampleHistoryWrapper newPhysicsRate); float GetMaxPhysicsRate(); void SetMaxPhysicsRate(float newMaxPhysicsRate); float GetMinPhysicsRate(); void SetMinPhysicsRate(float newMinPhysicsRate); //AUTO-GENERATED FUNCTION PROXIES SampleHistoryWrapper CreateBufferHistory(std::string Title); void eventConstruct(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/PerformanceStats/NetStatGraphWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/PerformanceStats/StatGraphWrapper.h" class SampleHistoryWrapper; class BAKKESMOD_PLUGIN_IMPORT NetStatGraphWrapper : public StatGraphWrapper { public: CONSTRUCTORS(NetStatGraphWrapper) //AUTO-GENERATED FROM FIELDS SampleHistoryWrapper GetPacketsOut(); void SetPacketsOut(SampleHistoryWrapper newPacketsOut); SampleHistoryWrapper GetPacketsIn(); void SetPacketsIn(SampleHistoryWrapper newPacketsIn); SampleHistoryWrapper GetLostPacketsOut(); void SetLostPacketsOut(SampleHistoryWrapper newLostPacketsOut); SampleHistoryWrapper GetLostPacketsIn(); void SetLostPacketsIn(SampleHistoryWrapper newLostPacketsIn); SampleHistoryWrapper GetBytesOut(); void SetBytesOut(SampleHistoryWrapper newBytesOut); SampleHistoryWrapper GetBytesIn(); void SetBytesIn(SampleHistoryWrapper newBytesIn); SampleHistoryWrapper GetLatency(); void SetLatency(SampleHistoryWrapper newLatency); float GetExpectedOutPacketRate(); void SetExpectedOutPacketRate(float newExpectedOutPacketRate); float GetExpectedInPacketRate(); void SetExpectedInPacketRate(float newExpectedInPacketRate); float GetMaxBytesRate(); void SetMaxBytesRate(float newMaxBytesRate); //AUTO-GENERATED FUNCTION PROXIES void eventUpdateGraphRanges(); SampleHistoryWrapper CreateBytesSummary(std::string Title); SampleHistoryWrapper CreateLossSummary(std::string Title); SampleHistoryWrapper CreatePktSummary(std::string Title); void eventConstruct(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/PerformanceStats/PerfStatGraphWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/PerformanceStats/StatGraphWrapper.h" class SampleHistoryWrapper; class BAKKESMOD_PLUGIN_IMPORT PerfStatGraphWrapper : public StatGraphWrapper { public: CONSTRUCTORS(PerfStatGraphWrapper) //AUTO-GENERATED FROM FIELDS SampleHistoryWrapper GetFPS(); void SetFPS(SampleHistoryWrapper newFPS); SampleHistoryWrapper GetFrameTime(); void SetFrameTime(SampleHistoryWrapper newFrameTime); SampleHistoryWrapper GetGameThreadTime(); void SetGameThreadTime(SampleHistoryWrapper newGameThreadTime); SampleHistoryWrapper GetRenderThreadTime(); void SetRenderThreadTime(SampleHistoryWrapper newRenderThreadTime); SampleHistoryWrapper GetGPUFrameTime(); void SetGPUFrameTime(SampleHistoryWrapper newGPUFrameTime); ArrayWrapper GetFrameTimeHistories(); float GetMaxFPS(); void SetMaxFPS(float newMaxFPS); float GetTargetFPS(); void SetTargetFPS(float newTargetFPS); //AUTO-GENERATED FUNCTION PROXIES void eventUpdateGraphRanges(); SampleHistoryWrapper CreateFrameTimeHistory(std::string Title); SampleHistoryWrapper CreateFpsHistory(std::string Title); void eventConstruct(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/PerformanceStats/SampleHistoryWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././Engine/ObjectWrapper.h" class SampleRecordSettingsWrapper; class WrapperStructs; class UnrealStringWrapper; class BAKKESMOD_PLUGIN_IMPORT SampleHistoryWrapper : public ObjectWrapper { public: CONSTRUCTORS(SampleHistoryWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS SampleRecordSettingsWrapper GetRecordSettings(); void SetRecordSettings(SampleRecordSettingsWrapper newRecordSettings); UnrealStringWrapper GetTitle(); float GetYMin(); void SetYMin(float newYMin); float GetYMax(); void SetYMax(float newYMax); float GetGoodValue(); void SetGoodValue(float newGoodValue); float GetBadValue(); void SetBadValue(float newBadValue); float GetBaseValue(); void SetBaseValue(float newBaseValue); StructArrayWrapper GetSamples(); int GetSampleIndex(); void SetSampleIndex(int newSampleIndex); float GetAccumTime(); void SetAccumTime(float newAccumTime); RecordedSample GetPendingSample(); void SetPendingSample(RecordedSample newPendingSample); unsigned long GetbHasPendingSample(); void SetbHasPendingSample(unsigned long newbHasPendingSample); //AUTO-GENERATED FUNCTION PROXIES void Tick(float DeltaTime); void AddSample(float NewValue); float GetSummaryValue(unsigned char Type, float MaxSampleAge, unsigned long bAbsoluteValue); SampleHistoryWrapper SetBaseValue2(float InBaseValue); SampleHistoryWrapper SetGoodBadValues(float InGoodValue, float InBadValue); SampleHistoryWrapper SetGraphMaxMin(float MaxValue, float MinValue); SampleHistoryWrapper SetTitle(std::string InTitle); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/PerformanceStats/SampleRecordSettingsWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././Engine/ObjectWrapper.h" class BAKKESMOD_PLUGIN_IMPORT SampleRecordSettingsWrapper : public ObjectWrapper { public: CONSTRUCTORS(SampleRecordSettingsWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS float GetMaxSampleAge(); void SetMaxSampleAge(float newMaxSampleAge); float GetRecordRate(); void SetRecordRate(float newRecordRate); //AUTO-GENERATED FUNCTION PROXIES private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/PerformanceStats/StartGraphSystemWrapper.h ================================================ #pragma once template class ArrayWrapper; #include "../../WrapperStructs.h" #include "../.././Engine/ObjectWrapper.h" class InputBufferGraphWrapper; class NetStatGraphWrapper; class PerfStatGraphWrapper; class StatGraphWrapper; class BAKKESMOD_PLUGIN_IMPORT StartGraphSystemWrapper : public ObjectWrapper { public: CONSTRUCTORS(StartGraphSystemWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS float GetGraphSampleTime(); void SetGraphSampleTime(float newGraphSampleTime); unsigned char GetGraphLevel(); void SetGraphLevel(unsigned char newGraphLevel); PerfStatGraphWrapper GetPerfStatGraph(); void SetPerfStatGraph(PerfStatGraphWrapper newPerfStatGraph); NetStatGraphWrapper GetNetStatGraph(); void SetNetStatGraph(NetStatGraphWrapper newNetStatGraph); InputBufferGraphWrapper GetInputBufferGraph(); void SetInputBufferGraph(InputBufferGraphWrapper newInputBufferGraph); ArrayWrapper GetStatGraphs(); ArrayWrapper GetVisibleStatGraphs(); //AUTO-GENERATED FUNCTION PROXIES void Graphtime(float Seconds); void StatGraphNext(); float GetGraphSampleTime2(unsigned char Level); void SetGraphLevel2(unsigned char Level); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/PerformanceStats/StatGraphSystemWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././Engine/ObjectWrapper.h" class StatGraphWrapper; class PerfStatGraphWrapper; class InputBufferGraphWrapper; class NetStatGraphWrapper; class BAKKESMOD_PLUGIN_IMPORT StatGraphSystemWrapper : public ObjectWrapper { public: CONSTRUCTORS(StatGraphSystemWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS float GetGraphSampleTime(); void SetGraphSampleTime(float newGraphSampleTime); unsigned char GetGraphLevel(); void SetGraphLevel(unsigned char newGraphLevel); PerfStatGraphWrapper GetPerfStatGraph(); void SetPerfStatGraph(PerfStatGraphWrapper newPerfStatGraph); NetStatGraphWrapper GetNetStatGraph(); void SetNetStatGraph(NetStatGraphWrapper newNetStatGraph); InputBufferGraphWrapper GetInputBufferGraph(); void SetInputBufferGraph(InputBufferGraphWrapper newInputBufferGraph); ArrayWrapper GetStatGraphs(); ArrayWrapper GetVisibleStatGraphs(); int GetPreallocGraphLines(); void SetPreallocGraphLines(int newPreallocGraphLines); //AUTO-GENERATED FUNCTION PROXIES void __StatGraphSystem_TA__SetGraphLevel(StatGraphWrapper G); void PacketReceived(float Latency); void Graphtime(float Seconds); void StatGraphNext(); float GetGraphSampleTime2(unsigned char Level); void SetGraphLevel2(unsigned char Level); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/PerformanceStats/StatGraphWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././Engine/ObjectWrapper.h" class SampleRecordSettingsWrapper; class SampleHistoryWrapper; class BAKKESMOD_PLUGIN_IMPORT StatGraphWrapper : public ObjectWrapper { public: CONSTRUCTORS(StatGraphWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS SampleRecordSettingsWrapper GetRecordSettings(); void SetRecordSettings(SampleRecordSettingsWrapper newRecordSettings); double GetLastTickTime(); void SetLastTickTime(double newLastTickTime); ArrayWrapper GetSampleHistories(); //AUTO-GENERATED FUNCTION PROXIES void StopDrawing(); SampleHistoryWrapper CreateSampleHistory(std::string Title); SampleHistoryWrapper AddSampleHistory(SampleHistoryWrapper History); void eventConstruct(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/PhysicalMaterialPropertyWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ObjectWrapper.h" class BAKKESMOD_PLUGIN_IMPORT PhysicalMaterialPropertyWrapper : public ObjectWrapper { public: CONSTRUCTORS(PhysicalMaterialPropertyWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //AUTO-GENERATED FROM FIELDS float GetTireFrictionScale(); void SetTireFrictionScale(float newTireFrictionScale); unsigned long GetbStickyWheels(); void SetbStickyWheels(unsigned long newbStickyWheels); unsigned long GetbConsiderForGround(); void SetbConsiderForGround(unsigned long newbConsiderForGround); //AUTO-GENERATED FUNCTION PROXIES private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/PlayerReplicationInfoWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include "../UniqueIDWrapper.h" #include ".././Engine/ActorWrapper.h" class UnrealStringWrapper; class TeamInfoWrapper; class BAKKESMOD_PLUGIN_IMPORT PlayerReplicationInfoWrapper : public ActorWrapper { public: CONSTRUCTORS(PlayerReplicationInfoWrapper) //BEGIN SELF IMPLEMENTED OnlinePlatform GetPlatform(); _NODISCARD bool ChangeNameForScoreboardAndNameplateInReplay(const std::string& name); //sorry for long name.. //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS int GetScore(); void SetScore(int newScore); int GetDeaths(); void SetDeaths(int newDeaths); unsigned char GetPing(); void SetPing(unsigned char newPing); unsigned char GetTTSSpeaker(); void SetTTSSpeaker(unsigned char newTTSSpeaker); int GetNumLives(); void SetNumLives(int newNumLives); UnrealStringWrapper GetPlayerName(); UnrealStringWrapper GetOldName(); int GetPlayerID(); void SetPlayerID(int newPlayerID); TeamInfoWrapper GetTeam(); void SetTeam(TeamInfoWrapper newTeam); unsigned long GetbAdmin(); void SetbAdmin(unsigned long newbAdmin); unsigned long GetbIsSpectator(); void SetbIsSpectator(unsigned long newbIsSpectator); unsigned long GetbOnlySpectator(); void SetbOnlySpectator(unsigned long newbOnlySpectator); unsigned long GetbWaitingPlayer(); void SetbWaitingPlayer(unsigned long newbWaitingPlayer); unsigned long GetbReadyToPlay(); void SetbReadyToPlay(unsigned long newbReadyToPlay); unsigned long GetbOutOfLives(); void SetbOutOfLives(unsigned long newbOutOfLives); unsigned long GetbBot(); void SetbBot(unsigned long newbBot); unsigned long GetbIsInactive(); void SetbIsInactive(unsigned long newbIsInactive); unsigned long GetbFromPreviousLevel(); void SetbFromPreviousLevel(unsigned long newbFromPreviousLevel); unsigned long GetbTimedOut(); void SetbTimedOut(unsigned long newbTimedOut); unsigned long GetbUnregistered(); void SetbUnregistered(unsigned long newbUnregistered); int GetStartTime(); void SetStartTime(int newStartTime); UnrealStringWrapper GetStringSpectating(); UnrealStringWrapper GetStringUnknown(); int GetKills(); void SetKills(int newKills); float GetExactPing(); void SetExactPing(float newExactPing); UnrealStringWrapper GetSavedNetworkAddress(); [[deprecated("Use GetUniqueIdWrapper instead")]] SteamID GetUniqueId();//DEPRECATED [[deprecated("Use SetUniqueId that takes UniqueIDWrapper instead")]] void SetUniqueId(SteamID newUniqueId);//DEPRECATED UniqueIDWrapper GetUniqueIdWrapper(); void SetUniqueId(UniqueIDWrapper newUniqueId); //AUTO-GENERATED FUNCTION PROXIES void UnregisterPlayerFromSession(); void RegisterPlayerWithSession(); bool IsInvalidName(); unsigned char GetTeamNum(); [[deprecated("Use SetUniqueId2 that takes UniqueIDWrapper instead")]] void SetUniqueId2(SteamID& PlayerUniqueId);//DEPRECATED void SetUniqueId2(UniqueIDWrapper& PlayerUniqueId); void SeamlessTravelTo(PlayerReplicationInfoWrapper NewPRI); void IncrementDeaths(int Amt); void CopyProperties(PlayerReplicationInfoWrapper PRI); void OverrideWith(PlayerReplicationInfoWrapper PRI); PlayerReplicationInfoWrapper Duplicate(); void SetWaitingPlayer(unsigned long B); void eventSetPlayerName(std::string S); void Reset(); void eventDestroyed(); void Unregister2(); void UpdatePing(float TimeStamp); void RemoteUserDataReplicated(); void SetPlayerTeam(TeamInfoWrapper NewTeam); void eventClientFillRemoteUserData(); void eventPostBeginPlay(); void eventOnOwnerChanged(); void eventConstruct(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/PriWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameObject/PriXWrapper.h" class UnrealStringWrapper; class CarWrapper; class GameEventWrapper; class FXActorWrapper; class AirControlComponentWrapper; class ClubDetailsWrapper; class UniqueIDWrapper; class CameraSettingsActorWrapper; class BAKKESMOD_PLUGIN_IMPORT PriWrapper : public PriXWrapper { public: CONSTRUCTORS(PriWrapper) //AUTO-GENERATED FROM FIELDS int GetMatchScore(); void SetMatchScore(int newMatchScore); int GetMatchGoals(); void SetMatchGoals(int newMatchGoals); int GetMatchOwnGoals(); void SetMatchOwnGoals(int newMatchOwnGoals); int GetMatchAssists(); void SetMatchAssists(int newMatchAssists); int GetMatchSaves(); void SetMatchSaves(int newMatchSaves); int GetMatchShots(); void SetMatchShots(int newMatchShots); int GetMatchDemolishes(); void SetMatchDemolishes(int newMatchDemolishes); int GetMatchBonusXP(); void SetMatchBonusXP(int newMatchBonusXP); int GetMatchBreakoutDamage(); void SetMatchBreakoutDamage(int newMatchBreakoutDamage); unsigned long GetbMatchMVP(); void SetbMatchMVP(unsigned long newbMatchMVP); unsigned long GetbMatchAdmin(); void SetbMatchAdmin(unsigned long newbMatchAdmin); unsigned long GetbLoadoutSet(); void SetbLoadoutSet(unsigned long newbLoadoutSet); unsigned long GetbOnlineLoadoutSet(); void SetbOnlineLoadoutSet(unsigned long newbOnlineLoadoutSet); unsigned long GetbLoadoutsSet(); void SetbLoadoutsSet(unsigned long newbLoadoutsSet); unsigned long GetbOnlineLoadoutsSet(); void SetbOnlineLoadoutsSet(unsigned long newbOnlineLoadoutsSet); unsigned long GetbTeamPaintSet(); void SetbTeamPaintSet(unsigned long newbTeamPaintSet); unsigned long GetbReady(); void SetbReady(unsigned long newbReady); unsigned long GetbBusy(); void SetbBusy(unsigned long newbBusy); unsigned long GetbUsingSecondaryCamera(); void SetbUsingSecondaryCamera(unsigned long newbUsingSecondaryCamera); unsigned long GetbUsingBehindView(); void SetbUsingBehindView(unsigned long newbUsingBehindView); unsigned long GetbUsingFreecam(); void SetbUsingFreecam(unsigned long newbUsingFreecam); unsigned long GetbIsInSplitScreen(); void SetbIsInSplitScreen(unsigned long newbIsInSplitScreen); unsigned long GetbStartVoteToForfeitDisabled(); void SetbStartVoteToForfeitDisabled(unsigned long newbStartVoteToForfeitDisabled); unsigned long GetbUsingItems(); void SetbUsingItems(unsigned long newbUsingItems); unsigned long GetPlayerHistoryValid(); void SetPlayerHistoryValid(unsigned long newPlayerHistoryValid); GameEventWrapper GetGameEvent(); void SetGameEvent(GameEventWrapper newGameEvent); GameEventWrapper GetReplicatedGameEvent(); void SetReplicatedGameEvent(GameEventWrapper newReplicatedGameEvent); CarWrapper GetCar(); void SetCar(CarWrapper newCar); int GetRespawnTimeRemaining(); void SetRespawnTimeRemaining(int newRespawnTimeRemaining); int GetWaitingStartTime(); void SetWaitingStartTime(int newWaitingStartTime); float GetTotalGameTimePlayed(); void SetTotalGameTimePlayed(float newTotalGameTimePlayed); ProfileCameraSettings GetCameraSettings(); void SetCameraSettings(ProfileCameraSettings newCameraSettings); unsigned char GetCameraPitch(); void SetCameraPitch(unsigned char newCameraPitch); unsigned char GetCameraYaw(); void SetCameraYaw(unsigned char newCameraYaw); unsigned char GetPawnType(); void SetPawnType(unsigned char newPawnType); unsigned char GetReplicatedWorstNetQualityBeyondLatency(); void SetReplicatedWorstNetQualityBeyondLatency(unsigned char newReplicatedWorstNetQualityBeyondLatency); CameraSettingsActorWrapper GetPersistentCamera() const; [[deprecated("Use GetPartyLeaderID instead")]] SteamID GetPartyLeader();//DEPRECATED [[deprecated("Use SetPartyLeader that takes UniqueIDWrapper instead")]] void SetPartyLeader(SteamID newPartyLeader);//DEPRECATED UniqueIDWrapper GetPartyLeaderID(); void SetPartyLeader(UniqueIDWrapper newPartyLeader); float GetDodgeInputThreshold(); void SetDodgeInputThreshold(float newDodgeInputThreshold); float GetSteeringSensitivity(); void SetSteeringSensitivity(float newSteeringSensitivity); float GetAirControlSensitivity(); void SetAirControlSensitivity(float newAirControlSensitivity); float GetNextTimeRestrictedStatEventAllowedTime(); void SetNextTimeRestrictedStatEventAllowedTime(float newNextTimeRestrictedStatEventAllowedTime); float GetLastTimeRestrictedStatEventTime(); void SetLastTimeRestrictedStatEventTime(float newLastTimeRestrictedStatEventTime); int GetTimeTillItem(); void SetTimeTillItem(int newTimeTillItem); int GetMaxTimeTillItem(); void SetMaxTimeTillItem(int newMaxTimeTillItem); int GetBoostPickups(); void SetBoostPickups(int newBoostPickups); int GetBallTouches(); void SetBallTouches(int newBallTouches); int GetCarTouches(); void SetCarTouches(int newCarTouches); PriWrapper GetReplacingBotPRI(); void SetReplacingBotPRI(PriWrapper newReplacingBotPRI); unsigned long long GetClubID(); void SetClubID(unsigned long long newClubID); UnrealStringWrapper GetPublicIP(); int GetSpectatorShortcut(); void SetSpectatorShortcut(int newSpectatorShortcut); ClubDetailsWrapper GetClubDetails(); int GetLastTeamIndex() const; //AUTO-GENERATED FUNCTION PROXIES void __ClubID__ChangeNotifyFunc(); void __PREI__ChangeNotifyFunc(); void __ReplicatedWorstNetQualityBeyondLatency__ChangeNotifyFunc(); void eventDestroyed(); void OnSpectatorShortcutChanged(); void SetSpectatorShortcut2(int InShortcut); void ServerSetPublicIP(std::string IP); void OnUniqueIdChanged(); void UpdatePlayerAvatarBorder(); void UpdatePlayerBanner(); void ClientAchievementProgression(int AchievementId, unsigned char AchievementType, float Progress, float MaxProgress); void ClientUnlockAchievement(int AchievementId, unsigned char AchievementType); void ServerSetPlayerActivatedFX(FXActorWrapper FX); void UpdateCarLocalPlayer(); void OnReplacingBotPRIChanged(); void OnTeamChanged(); void ClearBotReplacement(); void ReportCheater(std::string Reason); bool ValidateLoadoutTeamPaints(); bool ValidateLoadoutSlots(); void ValidateLoadoutDLC(); void OnStartVoteToForfeitDisabledChanged(); void SetStartVoteToForfeitDisabled(unsigned long bDisabled); void ServerVoteToForfeit(); void SetUserCarPreferences(float NewDodgeThreshold, float NewSteeringSensitivity, float NewAirControlSensitivity); void ServerSetUserCarPreferences(float NewDodgeThreshold, float NewSteeringSensitivity, float NewAirControlSensitivity); int ValidateUserInt(std::string Reason, int NewValue, int Min, int Max); float ValidateUserFloat(std::string Reason, float NewValue, float Min, float Max); void OnPawnTypeChanged(); void SetWaitingPlayer(unsigned long B); void SetPawnType2(unsigned char NewPawnType); bool IsPlayer(); bool IsEditor(); bool IsSpectator(); void ServerSpectate(); void ClientChangeTeamFailed(int TeamNum); void ServerChangeTeam(int TeamNum); void ReplicatePodiumTitles(); void OnMatchAdmin(); void OnMVPChange(); void NotifyWonMVP(); bool IsInvalidName(); bool IsInWarmUpMode(); void SetReady(unsigned long bNewReady); void ServerMatchAdminSetPaused(unsigned long bPause); void ServerMatchAdminSetScoreAndTime(int NewScoreTeam0, int NewScoreTeam1, int SecondsRemaining, unsigned long bOverTime, unsigned long bRestartRound); void SetMatchAdmin(unsigned long bIsMatchAdmin); void ServerReadyUp(); bool ShouldBroadCastWelcomeMessage(unsigned long bExiting); void UpdateOnlineProductStats(); void SetWaitingStartTime2(); void OnRespawnTimeRemainingChanged(); void SetRespawnTime2(int NewTime); void ClientScoredGoal(Vector& BallHitLocation); void OnScoredGoal(Vector& BallHitLocation); void OnRep_SteeringSensitivity(); void OnRep_ClientScorePoint(); void ResetScore(); void RemovePoints(int Points); void ScorePoint2(int AdditionalScore); bool CanAwardTimeRestrictedStatEvent(); void RecordTimeRestrictedStatEvent(); void ResetTimeRestrictedStatEvent(); int GetMatchXP(); void CommitStats(); void UpdateFromLoadout(); void UpdateUserCarPreferences(AirControlComponentWrapper AirControlComponent); void HandleAirControl(AirControlComponentWrapper AirControlComp); void SetCar2(CarWrapper NewCar); bool IsClientPlayerPRI(); bool IsLocalPlayerPRI(); void Unregister(); void AddLocalPlayerToGameEvent(); void OnLoadoutsSetInternal(); bool AreLoadoutsSet(); void OnLoadoutsOnlineSet(); void OnLoadoutsSet2(); void RemoveCertifiedProductStat(unsigned long long InstanceID); void InitLoadoutAttributesForTeam(PriXWrapper PRI); bool ShouldValidateOnlineProducts(); void OnSplitScreenStatusChanged(); void ServerSplitScreenStatusChanged(unsigned long bInSplitScreen); void UpdateSplitScreenStatus(); void OnPartyLeaderChanged(); [[deprecated("Function definition is empty and thus will not work")]] void ServerSetPartyLeader(SteamID& InPartyLeader, unsigned long bInParty);//DEPRECATED [[deprecated("Function definition is empty and thus will not work")]] void SetPartyLeader2(SteamID& InPartyLeader, unsigned long bInParty);//DEPRECATED void UpdatePartyStatus(); void OnSkillTierChanged(); void ReplicateSkillTier(int NewTier); void OnTitleChanged(); void SyncPlayerTitle(); void UpdateTitleFromLoadout(); void UpdateTitle2(); void GetNewFriendKey(); void ServerSetPlayerHistoryKey(unsigned char* HistoryKeyArray); void OnRep_UniqueId(); void EventOwnerChanged(PriWrapper PRI); void EventSpectatorShortcutChanged(PriWrapper PRI); void EventServerAchievementProgression(PriWrapper PRI, int AchievementId, unsigned char AchievementType, float Progress, float MaxProgress); void EventStartVoteToForfeitDisabledChanged(PriWrapper PRI); void EventCarPreUpdate(PriWrapper PRI); void EventVanityChanged(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/PriXWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameObject/PlayerReplicationInfoWrapper.h" class TeamInfoWrapper; class BAKKESMOD_PLUGIN_IMPORT PriXWrapper : public PlayerReplicationInfoWrapper { public: CONSTRUCTORS(PriXWrapper) //AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FUNCTION PROXIES void eventDestroyed(); void OnUniqueIdChanged(); [[deprecated("Function definition is empty and thus will not work")]] void SetUniqueId(SteamID& PlayerUniqueId);//DEPRECATED void UnregisterPlayerFromSession(); void RegisterPlayerWithSession(); void OnTeamChanged(); void SetPlayerTeam(TeamInfoWrapper NewTeam); void eventOnOwnerChanged(); void eventSetPlayerName(std::string S); void EventDestroyed(PriXWrapper PRI); void EventTeamChanged(PriXWrapper PRI); void EventUniqueIdChanged(PriXWrapper PRI); void EventPlayerNameChanged(PriXWrapper PRI); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RBActorWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ActorWrapper.h" class FXActorWrapper; class BAKKESMOD_PLUGIN_IMPORT RBActorWrapper : public ActorWrapper { public: CONSTRUCTORS(RBActorWrapper) //AUTO-GENERATED FROM FIELDS float GetMaxLinearSpeed(); void SetMaxLinearSpeed(float newMaxLinearSpeed); float GetMaxAngularSpeed(); void SetMaxAngularSpeed(float newMaxAngularSpeed); unsigned long GetbDisableSleeping(); void SetbDisableSleeping(unsigned long newbDisableSleeping); unsigned long GetbReplayActor(); void SetbReplayActor(unsigned long newbReplayActor); unsigned long GetbFrozen(); void SetbFrozen(unsigned long newbFrozen); unsigned long GetbIgnoreSyncing(); void SetbIgnoreSyncing(unsigned long newbIgnoreSyncing); unsigned long GetbPhysInitialized(); RBState GetOldRBState(); void SetOldRBState(RBState newOldRBState); RBState GetRBState(); void SetRBState(RBState newRBState); RBState GetReplicatedRBState(); void SetReplicatedRBState(RBState newReplicatedRBState); RBState GetClientCorrectionRBState(); void SetClientCorrectionRBState(RBState newClientCorrectionRBState); WorldContactData GetWorldContact(); void SetWorldContact(WorldContactData newWorldContact); Vector GetSyncErrorLocation(); float GetSyncErrorAngle(); Vector GetSyncErrorAxis(); FXActorWrapper GetFXActorArchetype(); void SetFXActorArchetype(FXActorWrapper newFXActorArchetype); FXActorWrapper GetFXActor(); void SetFXActor(FXActorWrapper newFXActor); int GetLastRBCollisionsFrame(); RBActorWrapper GetWeldedActor(); RBActorWrapper GetWeldedTo(); float GetPreWeldMass(); //AUTO-GENERATED FUNCTION PROXIES void SetMass(float NewMass); void SetConstrained3D(Vector& LinearLower, Vector& LinearUpper, Vector& AngularLower, Vector& AngularUpper); void SetConstrained2D(unsigned long bConstrain2D); void SetPhysicsState(RBState& NewState); void SetFrozen(unsigned long bEnabled); void SetMaxAngularSpeed2(float NewMaxSpeed); void SetMaxLinearSpeed2(float NewMaxSpeed); void AddTorque(Vector& Torque, unsigned char ForceMode); void AddForce(Vector& Force, unsigned char ForceMode); void UnWeldRBActor(RBActorWrapper Other); void WeldRBActor2(RBActorWrapper Other, Vector& WeldOffset, Rotator& WeldRotation); void ReInitRBPhys(); void TerminateRBPhys(); Vector GetCurrentRBLocation(); RBState GetCurrentRBState(); int GetPhysicsFrame(); float GetPhysicsTime(); void InitAk(); void eventPreBeginPlay(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/ReplayManagerWrapper.h ================================================ #pragma once class BAKKESMOD_PLUGIN_IMPORT ReplayManagerWrapper : public ObjectWrapper { public: CONSTRUCTORS(ReplayManagerWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED _NODISCARD bool LoadReplaysFromDemoFolder() const; _NODISCARD std::vector GetLoadedReplays() const; _NODISCARD bool IsLoadingReplayHeaders() const; /** * \brief Starts a replay with a optional map and start time * \param replay Replay to open * \param map custom map name * \param start_time Use replay_wrapper.GetCurrentFrame() / replay_wrapper.GetRecordFPS() for a accurate start_time */ void PlayReplay(const ReplayWrapper& replay, const std::string& map = "", float start_time = 0) const; /** * \brief Starts a replay from a file with a optional map and start time * \param file_path absolute path to the replay file * \param map custom map name * \param start_time Use replay_wrapper.GetCurrentFrame() / replay_wrapper.GetRecordFPS() for a accurate start_time */ void PlayReplayFile(const std::string& file_path, const std::string& map = "", float start_time = 0) const; /** * \brief Starts a replay from a replay id with a optional map and start time * \param replay_id id of the replay to open * \param map custom map name * \param start_time Use replay_wrapper.GetCurrentFrame() / replay_wrapper.GetRecordFPS() for a accurate start_time */ void PlayReplayId(const std::string& replay_id, const std::string& map = "", float start_time = 0) const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/AttachmentPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/RumblePickupComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT AttachmentPickup : public RumblePickupComponentWrapper { public: CONSTRUCTORS(AttachmentPickup) //AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FUNCTION PROXIES void PickupEnd(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/BallCarSpringPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/SpringPickup.h" class BAKKESMOD_PLUGIN_IMPORT BallCarSpringPickup : public SpringPickup { public: CONSTRUCTORS(BallCarSpringPickup) //AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FUNCTION PROXIES void ScaleSpringMeshToLocation(Vector& NewLocation, Vector& TargetLocation); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/BallFreezePickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/TargetedPickup.h" class FXActorWrapper; class BallWrapper; class CarWrapper; class BAKKESMOD_PLUGIN_IMPORT BallFreezePickup : public TargetedPickup { public: CONSTRUCTORS(BallFreezePickup) //AUTO-GENERATED FROM FIELDS FXActorWrapper GetFreezeBreakFXArchetype(); void SetFreezeBreakFXArchetype(FXActorWrapper newFreezeBreakFXArchetype); FXActorWrapper GetFreezeFXArchetype(); void SetFreezeFXArchetype(FXActorWrapper newFreezeFXArchetype); unsigned long GetbMaintainMomentum(); void SetbMaintainMomentum(unsigned long newbMaintainMomentum); unsigned long GetbTouched(); void SetbTouched(unsigned long newbTouched); float GetTimeToStop(); void SetTimeToStop(float newTimeToStop); float GetStopMomentumPercentage(); void SetStopMomentumPercentage(float newStopMomentumPercentage); BallWrapper GetBall(); void SetBall(BallWrapper newBall); Vector GetOrigLinearVelocity(); void SetOrigLinearVelocity(Vector newOrigLinearVelocity); Vector GetOrigAngularVelocity(); void SetOrigAngularVelocity(Vector newOrigAngularVelocity); float GetOrigSpeed(); void SetOrigSpeed(float newOrigSpeed); float GetRepOrigSpeed(); void SetRepOrigSpeed(float newRepOrigSpeed); FXActorWrapper GetFreezeFX(); void SetFreezeFX(FXActorWrapper newFreezeFX); //AUTO-GENERATED FUNCTION PROXIES void PickupEnd(); void HandleBallExploded(BallWrapper InBall); void HandleBallHit(BallWrapper InBall, CarWrapper InCar, unsigned char HitType); void ApplyForces(float ActiveTime); void OnTargetChanged(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/BallLassoPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/SpringPickup.h" class BAKKESMOD_PLUGIN_IMPORT BallLassoPickup : public SpringPickup { public: CONSTRUCTORS(BallLassoPickup) //AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FUNCTION PROXIES void ScaleSpringMeshToLocation(Vector& NewLocation, Vector& TargetLocation); void DoSpring(unsigned long bFirstHit); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/BasketballPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/RumblePickupComponentWrapper.h" class BallWrapper; class RBActorWrapper; class CarWrapper; class BAKKESMOD_PLUGIN_IMPORT BasketballPickup : public RumblePickupComponentWrapper { public: CONSTRUCTORS(BasketballPickup) private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/BattarangPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/BallLassoPickup.h" class BAKKESMOD_PLUGIN_IMPORT BattarangPickup : public BallLassoPickup { public: CONSTRUCTORS(BattarangPickup) //AUTO-GENERATED FROM FIELDS float GetSpinSpeed(); void SetSpinSpeed(float newSpinSpeed); float GetCurRotation(); void SetCurRotation(float newCurRotation); //AUTO-GENERATED FUNCTION PROXIES private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/BoostModPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/RumblePickupComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT BoostModPickup : public RumblePickupComponentWrapper { public: CONSTRUCTORS(BoostModPickup) //AUTO-GENERATED FROM FIELDS unsigned long GetbUnlimitedBoost(); void SetbUnlimitedBoost(unsigned long newbUnlimitedBoost); float GetBoostStrength(); void SetBoostStrength(float newBoostStrength); float GetOldBoostStrength(); void SetOldBoostStrength(float newOldBoostStrength); //AUTO-GENERATED FUNCTION PROXIES void PickupEnd(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/BoostOverridePickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/TargetedPickup.h" class CarWrapper; class BAKKESMOD_PLUGIN_IMPORT BoostOverridePickup : public TargetedPickup { public: CONSTRUCTORS(BoostOverridePickup) //AUTO-GENERATED FROM FIELDS CarWrapper GetOtherCar(); void SetOtherCar(CarWrapper newOtherCar); //AUTO-GENERATED FUNCTION PROXIES void PickupEnd(); void OnTargetChanged(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/CarSpeedPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/RumblePickupComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT CarSpeedPickup : public RumblePickupComponentWrapper { public: CONSTRUCTORS(CarSpeedPickup) //AUTO-GENERATED FROM FIELDS float GetGravityScale(); void SetGravityScale(float newGravityScale); Vector GetAddedForce(); void SetAddedForce(Vector newAddedForce); float GetOrigGravityScale(); void SetOrigGravityScale(float newOrigGravityScale); //AUTO-GENERATED FUNCTION PROXIES void PickupEnd(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/DemolishPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/RumblePickupComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT DemolishPickup : public RumblePickupComponentWrapper { public: CONSTRUCTORS(DemolishPickup) //AUTO-GENERATED FROM FIELDS unsigned char GetDemolishTarget(); void SetDemolishTarget(unsigned char newDemolishTarget); unsigned char GetDemolishSpeed(); void SetDemolishSpeed(unsigned char newDemolishSpeed); unsigned char GetOldTarget(); void SetOldTarget(unsigned char newOldTarget); unsigned char GetOldSpeed(); void SetOldSpeed(unsigned char newOldSpeed); //AUTO-GENERATED FUNCTION PROXIES void PickupEnd(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/FootballPickupWrapper.h ================================================ #pragma once #include "RumblePickupComponentWrapper.h" class BallWrapper; class CarWrapper; class BAKKESMOD_PLUGIN_IMPORT FootballPickupWrapper : public RumblePickupComponentWrapper { public: CONSTRUCTORS(FootballPickupWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS float GetAttachTime(); void SetAttachTime(float AttachTime); float GetDetachTime(); void SetDetachTime(float DetachTime); Vector GetAttachOffset(); void SetAttachOffset(Vector AttachOffset); float GetCarFumbleForce(); void SetCarFumbleForce(float CarFumbleForce); float GetDoubleJumpUpForce(); void SetDoubleJumpUpForce(float DoubleJumpUpForce); float GetDemolishUpForce(); void SetDemolishUpForce(float DemolishUpForce); float GetMinBreakTime(); void SetMinBreakTime(float MinBreakTime); float GetMinAttachTime(); void SetMinAttachTime(float MinAttachTime); float GetCheckLastTouchRate(); void SetCheckLastTouchRate(float CheckLastTouchRate); float GetOutOfBoundsZ(); void SetOutOfBoundsZ(float OutOfBoundsZ); BallWrapper GetWeldedBall(); void SetWeldedBall(BallWrapper WeldedBall); float GetLastTouchCheckTime(); void SetLastTouchCheckTime(float LastTouchCheckTime); BallWrapper GetPendingBall(); void SetPendingBall(BallWrapper PendingBall); Vector GetPendingBallDodge(); void SetPendingBallDodge(Vector PendingBallDodge); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS bool IsDrivingOutOfBounds(); bool DisableBallImpactForces(); void DeactivationFX(); void HandleBallExplode(BallWrapper Ball); bool GetShouldHideActivateUI(); bool GetWasRecentlyAttached(); void HandleCarTouch(BallWrapper InBall, CarWrapper InCar, unsigned char HitType); void FumbleBall(float UpwardForce); void ThrowPendingBall(); void HandleHitBall(CarWrapper InCar, BallWrapper InBall, Vector& HitLocation, Vector& HitNormal); void OnWeldedBallChanged(); void PickupTick(float DeltaTime); void PickupEnd(); void PickupStart(); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/GrapplingHookPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/TargetedPickup.h" class BallWrapper; class RBActorWrapper; class BAKKESMOD_PLUGIN_IMPORT GrapplingHookPickup : public TargetedPickup { public: CONSTRUCTORS(GrapplingHookPickup) //AUTO-GENERATED FROM FIELDS float GetImpulse(); void SetImpulse(float newImpulse); float GetForce(); void SetForce(float newForce); float GetMaxRopeLength(); void SetMaxRopeLength(float newMaxRopeLength); float GetPredictionSpeed(); void SetPredictionSpeed(float newPredictionSpeed); unsigned long GetbDeactivateOnTouch(); void SetbDeactivateOnTouch(unsigned long newbDeactivateOnTouch); unsigned long GetbInstant(); void SetbInstant(unsigned long newbInstant); unsigned long GetbBlocked(); void SetbBlocked(unsigned long newbBlocked); unsigned long GetbAttachedToBall(); void SetbAttachedToBall(unsigned long newbAttachedToBall); Vector GetRopeMeshScale(); void SetRopeMeshScale(Vector newRopeMeshScale); float GetRopeMeshInitialSize(); void SetRopeMeshInitialSize(float newRopeMeshInitialSize); Rotator GetRopeRotationOffset(); void SetRopeRotationOffset(Rotator newRopeRotationOffset); Vector GetHookMeshScale(); void SetHookMeshScale(Vector newHookMeshScale); Vector GetHookMeshOffset(); void SetHookMeshOffset(Vector newHookMeshOffset); Rotator GetHookRotationOffset(); void SetHookRotationOffset(Rotator newHookRotationOffset); float GetHitDistanceOffset(); void SetHitDistanceOffset(float newHitDistanceOffset); float GetAfterAttachDuration(); void SetAfterAttachDuration(float newAfterAttachDuration); float GetBlockedRequiredMoveDistance(); void SetBlockedRequiredMoveDistance(float newBlockedRequiredMoveDistance); float GetBlockedRequiredMoveTime(); void SetBlockedRequiredMoveTime(float newBlockedRequiredMoveTime); float GetBlockedStartTime(); void SetBlockedStartTime(float newBlockedStartTime); Vector GetBlockedStartPos(); void SetBlockedStartPos(Vector newBlockedStartPos); BallWrapper GetBall(); void SetBall(BallWrapper newBall); Vector GetRopeOrigin(); void SetRopeOrigin(Vector newRopeOrigin); float GetRopeToTime(); void SetRopeToTime(float newRopeToTime); float GetCurrentRopeLength(); void SetCurrentRopeLength(float newCurrentRopeLength); float GetAttachTime(); void SetAttachTime(float newAttachTime); //AUTO-GENERATED FUNCTION PROXIES void HandleBallExploded(BallWrapper InBall); void PickupEnd(); void ScaleMeshToLocation(Vector& NewLocation, Vector& TargetLocation); Vector GetPredictedBallLocation(BallWrapper InBall); Vector GetTargetedLocation(); void UpdateVisual(float DeltaTime); void PickupTick(float DeltaTime); void ApplyForces(float ActiveTime); void DoAttach(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/GravityPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/RumblePickupComponentWrapper.h" class BallWrapper; class CarWrapper; class BAKKESMOD_PLUGIN_IMPORT GravityPickup : public RumblePickupComponentWrapper { public: CONSTRUCTORS(GravityPickup) //AUTO-GENERATED FROM FIELDS float GetBallGravity(); void SetBallGravity(float newBallGravity); float GetRange(); void SetRange(float newRange); Vector GetOffset(); void SetOffset(Vector newOffset); unsigned long GetbDeactivateOnTouch(); void SetbDeactivateOnTouch(unsigned long newbDeactivateOnTouch); float GetRecordBallHitRate(); void SetRecordBallHitRate(float newRecordBallHitRate); float GetLastRecordedBallHitTime(); void SetLastRecordedBallHitTime(float newLastRecordedBallHitTime); BallWrapper GetPrevBall(); void SetPrevBall(BallWrapper newPrevBall); //AUTO-GENERATED FUNCTION PROXIES void UpdateVisual(); void ApplyForces(float ActiveTime); void PickupEnd(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/HandbrakeOverridePickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/TargetedPickup.h" class CarWrapper; class BAKKESMOD_PLUGIN_IMPORT HandbrakeOverridePickup : public TargetedPickup { public: CONSTRUCTORS(HandbrakeOverridePickup) //AUTO-GENERATED FROM FIELDS CarWrapper GetOtherCar(); void SetOtherCar(CarWrapper newOtherCar); //AUTO-GENERATED FUNCTION PROXIES void PickupEnd(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/HitForcePickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/RumblePickupComponentWrapper.h" class RBActorWrapper; class BAKKESMOD_PLUGIN_IMPORT HitForcePickup : public RumblePickupComponentWrapper { public: CONSTRUCTORS(HitForcePickup) //AUTO-GENERATED FROM FIELDS unsigned long GetbBallForce(); void SetbBallForce(unsigned long newbBallForce); unsigned long GetbCarForce(); void SetbCarForce(unsigned long newbCarForce); unsigned long GetbDemolishCars(); void SetbDemolishCars(unsigned long newbDemolishCars); float GetBallHitForce(); void SetBallHitForce(float newBallHitForce); float GetCarHitForce(); void SetCarHitForce(float newCarHitForce); float GetMinFXTime(); void SetMinFXTime(float newMinFXTime); float GetOrigBallHitForce(); void SetOrigBallHitForce(float newOrigBallHitForce); float GetOrigCarHitForce(); void SetOrigCarHitForce(float newOrigCarHitForce); float GetLastFXTime(); void SetLastFXTime(float newLastFXTime); //AUTO-GENERATED FUNCTION PROXIES void PickupEnd(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/RugbyPickupWrapper.h ================================================ #pragma once #include "RumblePickupComponentWrapper.h" class RBActorWrapper; class BallWrapper; class CarWrapper; class BAKKESMOD_PLUGIN_IMPORT RugbyPickupWrapper : public RumblePickupComponentWrapper { public: CONSTRUCTORS(RugbyPickupWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS float GetAttachTime(); void SetAttachTime(float AttachTime); float GetMinDetachTime(); void SetMinDetachTime(float MinDetachTime); float GetMinBreakTime(); void SetMinBreakTime(float MinBreakTime); float GetMinBreakForce(); void SetMinBreakForce(float MinBreakForce); float GetCheckLastTouchRate(); void SetCheckLastTouchRate(float CheckLastTouchRate); float GetKickOffActivationDelay(); void SetKickOffActivationDelay(float KickOffActivationDelay); BallWrapper GetWeldedBall(); void SetWeldedBall(BallWrapper WeldedBall); float GetLastTouchCheckTime(); void SetLastTouchCheckTime(float LastTouchCheckTime); unsigned int GetbBallWelded(); void SetbBallWelded(unsigned int bBallWelded); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS bool DisableBallImpactForces(); void DeactivationFX(); void HandleBallExploded(BallWrapper Ball); bool GetShouldHideActivateUI(); void DoBreak(); bool GetWasRecentlyAttached(); void HandleCarTouch(BallWrapper InBall, CarWrapper InCar, unsigned char HitType); void HandleHitBall(CarWrapper InCar, BallWrapper InBall, Vector& HitLocation, Vector& HitNormal); void HandleBallWeldedChanged(); void PickupTick(float DeltaTime); void RemovePickupFX(); void PickupEnd(); void InitPickupFX(); void PickupStart(); bool GetCanDetach(); bool TryActivate(RBActorWrapper TargetOverride); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/RumblePickupComponentWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/CarComponent/CarComponentWrapper.h" class BoostWrapper; class UnrealStringWrapper; class CarWrapper; class RBActorWrapper; class FXActorWrapper; class BallWrapper; class BAKKESMOD_PLUGIN_IMPORT RumblePickupComponentWrapper : public CarComponentWrapper { public: CONSTRUCTORS(RumblePickupComponentWrapper) //AUTO-GENERATED FROM FIELDS UnrealStringWrapper GetPickupName(); unsigned long GetbHudIgnoreUseTime(); void SetbHudIgnoreUseTime(unsigned long newbHudIgnoreUseTime); unsigned long GetbHasActivated(); void SetbHasActivated(unsigned long newbHasActivated); unsigned long GetbIsActive(); void SetbIsActive(unsigned long newbIsActive); float GetActivationDuration(); void SetActivationDuration(float newActivationDuration); FXActorWrapper GetPickupFXArchetype(); void SetPickupFXArchetype(FXActorWrapper newPickupFXArchetype); FXActorWrapper GetPickupFX(); void SetPickupFX(FXActorWrapper newPickupFX); //AUTO-GENERATED FUNCTION PROXIES bool HasActivated2(); RBActorWrapper GetClientTarget(); void OnVehicleSetupComplete(); float GetActiveTimePercent(); void PickupEnd(); void PickupStart(); BoostWrapper GetBoostComponent(); void DeactivatePickup(); bool TryActivate(RBActorWrapper TargetOverride); void OnCreated(); bool CanPickup(CarWrapper InCar); void ApplyPickup(CarWrapper InCar); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/SpringPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/TargetedPickup.h" class BallWrapper; class CarWrapper; class BAKKESMOD_PLUGIN_IMPORT SpringPickup : public TargetedPickup { public: CONSTRUCTORS(SpringPickup) //AUTO-GENERATED FROM FIELDS float GetForce(); void SetForce(float newForce); float GetVerticalForce(); void SetVerticalForce(float newVerticalForce); Vector GetTorque(); void SetTorque(Vector newTorque); unsigned long GetbApplyRelativeForce(); void SetbApplyRelativeForce(unsigned long newbApplyRelativeForce); unsigned long GetbApplyConstantForce(); void SetbApplyConstantForce(unsigned long newbApplyConstantForce); unsigned long GetbBreakConstantForceWithHit(); void SetbBreakConstantForceWithHit(unsigned long newbBreakConstantForceWithHit); unsigned long GetbApplyRelativeConstantForce(); void SetbApplyRelativeConstantForce(unsigned long newbApplyRelativeConstantForce); unsigned long GetbInstant(); void SetbInstant(unsigned long newbInstant); unsigned long GetbFollowAfterHit(); void SetbFollowAfterHit(unsigned long newbFollowAfterHit); unsigned long GetbSpringed(); void SetbSpringed(unsigned long newbSpringed); float GetRelativeForceNormalDirection(); void SetRelativeForceNormalDirection(float newRelativeForceNormalDirection); float GetMaxSpringLength(); void SetMaxSpringLength(float newMaxSpringLength); float GetConstantForce(); void SetConstantForce(float newConstantForce); Vector GetFromOffset(); void SetFromOffset(Vector newFromOffset); Vector GetSpringMeshScale(); void SetSpringMeshScale(Vector newSpringMeshScale); float GetSpringMeshInitialSize(); void SetSpringMeshInitialSize(float newSpringMeshInitialSize); Rotator GetSpringRotationOffset(); void SetSpringRotationOffset(Rotator newSpringRotationOffset); Vector GetHittingMeshScale(); void SetHittingMeshScale(Vector newHittingMeshScale); Vector GetHittingMeshOffset(); void SetHittingMeshOffset(Vector newHittingMeshOffset); Rotator GetHittingRotationOffset(); void SetHittingRotationOffset(Rotator newHittingRotationOffset); float GetHitDistanceOffset(); void SetHitDistanceOffset(float newHitDistanceOffset); float GetAfterSpringDuration(); void SetAfterSpringDuration(float newAfterSpringDuration); unsigned char GetBallHitType(); void SetBallHitType(unsigned char newBallHitType); float GetMinSpringLength(); void SetMinSpringLength(float newMinSpringLength); float GetWeldedForceScalar(); void SetWeldedForceScalar(float newWeldedForceScalar); float GetWeldedVerticalForce(); void SetWeldedVerticalForce(float newWeldedVerticalForce); float GetCurrentSpringLength(); void SetCurrentSpringLength(float newCurrentSpringLength); float GetSpringedTime(); void SetSpringedTime(float newSpringedTime); float GetAfterSpringTime(); void SetAfterSpringTime(float newAfterSpringTime); float GetSpringToTime(); void SetSpringToTime(float newSpringToTime); Vector GetSpringOrigin(); void SetSpringOrigin(Vector newSpringOrigin); Vector GetSpringedLocation(); void SetSpringedLocation(Vector newSpringedLocation); Vector GetSpringedNormal(); void SetSpringedNormal(Vector newSpringedNormal); float GetSpringedLength(); void SetSpringedLength(float newSpringedLength); //AUTO-GENERATED FUNCTION PROXIES void PickupEnd(); void HandleCarTouchedBall(BallWrapper Ball, CarWrapper OtherCar, unsigned char HitType); void ScaleSpringMeshToLocation(Vector& NewLocation, Vector& TargetLoction); void ApplyForces(float ActiveTime); Vector GetRelativeConstantForce(Vector& Direction); Vector GetRelativeImpulse(Vector& Direction); void DoSpring(unsigned long bFirstHit); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/SwapperPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/TargetedPickup.h" class CarWrapper; class BAKKESMOD_PLUGIN_IMPORT SwapperPickup : public TargetedPickup { public: CONSTRUCTORS(SwapperPickup) //AUTO-GENERATED FROM FIELDS CarWrapper GetOtherCar(); void SetOtherCar(CarWrapper newOtherCar); //AUTO-GENERATED FUNCTION PROXIES void PickupEnd(); void OnTargetChanged(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/TargetedPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/RumblePickupComponentWrapper.h" class CarWrapper; class RBActorWrapper; class BAKKESMOD_PLUGIN_IMPORT TargetedPickup : public RumblePickupComponentWrapper { public: CONSTRUCTORS(TargetedPickup) //AUTO-GENERATED FROM FIELDS unsigned long GetbCanTargetBall(); void SetbCanTargetBall(unsigned long newbCanTargetBall); unsigned long GetbCanTargetCars(); void SetbCanTargetCars(unsigned long newbCanTargetCars); unsigned long GetbCanTargetEnemyCars(); void SetbCanTargetEnemyCars(unsigned long newbCanTargetEnemyCars); unsigned long GetbCanTargetTeamCars(); void SetbCanTargetTeamCars(unsigned long newbCanTargetTeamCars); unsigned long GetbUseDirectionalTargeting(); void SetbUseDirectionalTargeting(unsigned long newbUseDirectionalTargeting); unsigned long GetbRequireTrace(); void SetbRequireTrace(unsigned long newbRequireTrace); float GetRange(); void SetRange(float newRange); float GetDirectionalTargetingAccuracy(); void SetDirectionalTargetingAccuracy(float newDirectionalTargetingAccuracy); RBActorWrapper GetClientTarget(); void SetClientTarget(RBActorWrapper newClientTarget); RBActorWrapper GetTargeted(); void SetTargeted(RBActorWrapper newTargeted); //AUTO-GENERATED FUNCTION PROXIES RBActorWrapper GetClientTarget2(); void TargetChanged(); void OnTargetChanged(); bool TryActivate(RBActorWrapper TargetOverride); bool ValidateTargetTrace(RBActorWrapper InTarget); bool ValidateTarget2(RBActorWrapper InTarget); RBActorWrapper GetTarget2(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/TimeBombPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/RumblePickupComponentWrapper.h" class BAKKESMOD_PLUGIN_IMPORT TimeBombPickup : public RumblePickupComponentWrapper { public: CONSTRUCTORS(TimeBombPickup) //AUTO-GENERATED FROM FIELDS float GetRadius(); void SetRadius(float newRadius); float GetAlmostReadyDuration(); void SetAlmostReadyDuration(float newAlmostReadyDuration); float GetStartMatSpeed(); void SetStartMatSpeed(float newStartMatSpeed); float GetAlmostReadyMatSpeed(); void SetAlmostReadyMatSpeed(float newAlmostReadyMatSpeed); float GetImpulseForce(); void SetImpulseForce(float newImpulseForce); float GetCarVerticalForce(); void SetCarVerticalForce(float newCarVerticalForce); float GetCarTorque(); void SetCarTorque(float newCarTorque); unsigned long GetbDemolish(); void SetbDemolish(unsigned long newbDemolish); unsigned long GetbImpulse(); void SetbImpulse(unsigned long newbImpulse); //AUTO-GENERATED FUNCTION PROXIES void PickupEnd(); void AlmostReady2(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/TornadoPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/RumblePickupComponentWrapper.h" class RBActorWrapper; class BAKKESMOD_PLUGIN_IMPORT TornadoPickup : public RumblePickupComponentWrapper { public: CONSTRUCTORS(TornadoPickup) //AUTO-GENERATED FROM FIELDS float GetHeight(); void SetHeight(float newHeight); float GetRadius(); void SetRadius(float newRadius); Vector GetOffset(); void SetOffset(Vector newOffset); float GetRotationalForce(); void SetRotationalForce(float newRotationalForce); float GetTorque(); void SetTorque(float newTorque); Vector GetFXScale(); void SetFXScale(Vector newFXScale); Vector GetFXOffset(); void SetFXOffset(Vector newFXOffset); Vector GetMeshOffset(); void SetMeshOffset(Vector newMeshOffset); Vector GetMeshScale(); void SetMeshScale(Vector newMeshScale); float GetMaxVelocityOffset(); void SetMaxVelocityOffset(float newMaxVelocityOffset); float GetBallMultiplier(); void SetBallMultiplier(float newBallMultiplier); unsigned long GetbDebugVis(); void SetbDebugVis(unsigned long newbDebugVis); float GetVelocityEase(); void SetVelocityEase(float newVelocityEase); Vector GetVel(); void SetVel(Vector newVel); ArrayWrapper GetAffecting(); //AUTO-GENERATED FUNCTION PROXIES void ApplyForces(float ActiveTime); void PlayCarSFX(RBActorWrapper InActor); void PlayBallSFX(RBActorWrapper InActor); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/RumbleComponent/VelcroPickup.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../../WrapperStructs.h" #include "../.././GameObject/RumbleComponent/RumblePickupComponentWrapper.h" class BallWrapper; class CarWrapper; class RBActorWrapper; class BAKKESMOD_PLUGIN_IMPORT VelcroPickup : public RumblePickupComponentWrapper { public: CONSTRUCTORS(VelcroPickup) //AUTO-GENERATED FROM FIELDS Vector GetBallOffset(); void SetBallOffset(Vector newBallOffset); unsigned long GetbUseRealOffset(); void SetbUseRealOffset(unsigned long newbUseRealOffset); unsigned long GetbHit(); void SetbHit(unsigned long newbHit); unsigned long GetbBroken(); void SetbBroken(unsigned long newbBroken); float GetAfterHitDuration(); void SetAfterHitDuration(float newAfterHitDuration); float GetPostBreakDuration(); void SetPostBreakDuration(float newPostBreakDuration); float GetMinBreakForce(); void SetMinBreakForce(float newMinBreakForce); float GetMinBreakTime(); void SetMinBreakTime(float newMinBreakTime); float GetCheckLastTouchRate(); void SetCheckLastTouchRate(float newCheckLastTouchRate); BallWrapper GetWeldedBall(); void SetWeldedBall(BallWrapper newWeldedBall); float GetOldBallMass(); void SetOldBallMass(float newOldBallMass); float GetAttachTime(); void SetAttachTime(float newAttachTime); float GetLastTouchCheckTime(); void SetLastTouchCheckTime(float newLastTouchCheckTime); float GetBreakTime(); void SetBreakTime(float newBreakTime); //AUTO-GENERATED FUNCTION PROXIES void DoBreak(); void HandleCarTouch(BallWrapper InBall, CarWrapper InCar, unsigned char HitType); void PickupEnd(); void OnBallHit(); void PickupStart(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/Stats/StatEventWrapper.h ================================================ #pragma once #include "../../Engine/ObjectWrapper.h" #include "../../Engine/UnrealStringWrapper.h" class BAKKESMOD_PLUGIN_IMPORT StatEventWrapper : public ObjectWrapper { public: CONSTRUCTORS(StatEventWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS int GetPoints(); float GetCooldownSeconds(); unsigned long GetbAddToScore(); unsigned long GetbIsLeaderboardStat(); unsigned long GetbNotifyTicker(); unsigned long GetbShowOnHUD(); unsigned long GetbPrimaryStat(); unsigned long GetbSkipReplication(); unsigned long GetbCanMute(); unsigned long GetbCountMultiplied(); UnrealStringWrapper GetLabel(); UnrealStringWrapper GetPluralLabel(); UnrealStringWrapper GetDescription(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS float GetNextCooldownTime(); std::string GetGroupName(); std::string GetEventName(); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/TeamInfoWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ActorWrapper.h" class UnrealStringWrapper; class BAKKESMOD_PLUGIN_IMPORT TeamInfoWrapper : public ActorWrapper { public: CONSTRUCTORS(TeamInfoWrapper) //AUTO-GENERATED FROM FIELDS UnrealStringWrapper GetTeamName(); int GetSize(); void SetSize(int newSize); int GetScore(); void SetScore(int newScore); int GetTeamIndex(); void SetTeamIndex(int newTeamIndex); UnrealColor GetTeamColor(); void SetTeamColor(UnrealColor newTeamColor); //AUTO-GENERATED FUNCTION PROXIES unsigned char GetTeamNum(); void eventDestroyed(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/TeamWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameObject/TeamInfoWrapper.h" class UnrealStringWrapper; class ActorWrapper; class PriWrapper; class TeamGameEventWrapper; class WrapperStructs; class BAKKESMOD_PLUGIN_IMPORT TeamWrapper : public TeamInfoWrapper { public: CONSTRUCTORS(TeamWrapper) //AUTO-GENERATED FROM FIELDS LinearColor GetPrimaryColor(); LinearColor GetSecondaryColor(); LinearColor GetFontColor(); void SetFontColor(LinearColor newFontColor); LinearColor GetColorBlindFontColor(); void SetColorBlindFontColor(LinearColor newColorBlindFontColor); UnrealColor GetTeamControllerColor(); void SetTeamControllerColor(UnrealColor newTeamControllerColor); UnrealColor GetTeamScoreStrobeColor(); void SetTeamScoreStrobeColor(UnrealColor newTeamScoreStrobeColor); StructArrayWrapper GetDefaultColorList(); StructArrayWrapper GetColorBlindColorList(); StructArrayWrapper GetCurrentColorList(); TeamGameEventWrapper GetGameEvent(); void SetGameEvent(TeamGameEventWrapper newGameEvent); ArrayWrapper GetMembers(); UnrealStringWrapper GetCustomTeamName(); UnrealStringWrapper GetSanitizedTeamName(); unsigned long long GetClubID(); void SetClubID(unsigned long long newClubID); unsigned long GetbForfeit(); void SetbForfeit(unsigned long newbForfeit); //AUTO-GENERATED FUNCTION PROXIES bool __Team_TA__GetHumanPlayers(PriWrapper PRI); bool __Team_TA__GetHumanPrimaryPlayers(PriWrapper PRI); bool __Team_TA__GetNumOfMembersThatCanStartForfeit(PriWrapper P); void __Team_TA__EnableAllMembersStartVoteToForfeit(PriWrapper Member); void OnClubColorsChanged(); void Forfeit2(); void EnableAllMembersStartVoteToForfeit2(); void EnableAllMembersStartVoteToForfeitIfNecessary(); void VoteToForfeit22(PriWrapper PRI); void NotifyKismetTeamColorChanged(); void UpdateColors(); void SetLogo(int LogoID, unsigned long bSwapColors); void HandleTeamNameSanitized(std::string Original, std::string Sanitized); void SetClubID2(unsigned long long InClubID); void SetCustomTeamName(std::string NewName); void SetDefaultColors(); bool IsSingleParty(); PriWrapper GetTeamMemberNamed(std::string PlayerName); int GetNumBots(); int GetNumHumans(); void OnScoreUpdated(); void ResetScore(); void RemovePoints(int Points); void SetScore(int Points); void ScorePoint(int AdditionalScore); void MuteOtherTeam(TeamWrapper OtherTeam, unsigned long bMute); void ClearTemporarySpawnSpots(); void ExpireTemporarySpawnSpots(); void AddTemporarySpawnSpot(ActorWrapper AtActor); void OnGameEventSet(); void SetGameEvent2(TeamGameEventWrapper InGameEvent); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/VehiclePickupWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././Engine/ActorWrapper.h" class CarWrapper; class FXActorWrapper; class PrimitiveComponentWrapper; class BAKKESMOD_PLUGIN_IMPORT VehiclePickupWrapper : public ActorWrapper { public: CONSTRUCTORS(VehiclePickupWrapper) //AUTO-GENERATED FROM FIELDS float GetRespawnDelay(); void SetRespawnDelay(float newRespawnDelay); FXActorWrapper GetFXActorArchetype(); void SetFXActorArchetype(FXActorWrapper newFXActorArchetype); FXActorWrapper GetFXActor(); void SetFXActor(FXActorWrapper newFXActor); unsigned long GetbPickedUp(); void SetbPickedUp(unsigned long newbPickedUp); unsigned long GetbNetRelevant(); void SetbNetRelevant(unsigned long newbNetRelevant); unsigned long GetbNoPickup(); void SetbNoPickup(unsigned long newbNoPickup); //AUTO-GENERATED FUNCTION PROXIES void PlayPickedUpFX(); bool IsTouchingAVehicle(); void UpdateTickDisabled(); void SetNetRelevant(unsigned long bRelevant); void Respawn2(); void SetPickedUp(unsigned long bNewPickedUp, CarWrapper InInstigator); void Pickup2(CarWrapper Car); bool CanPickup(CarWrapper Car); void OnTouch(CarWrapper Car); void eventTouch(ActorWrapper Other, PrimitiveComponentWrapper OtherComp, Vector& HitLocation, Vector& HitNormal); void OnPickUp(); void OnSpawn(); void SetNoPickup(); void SetupReplicateNoPickup(); void InitFX(); void eventPostBeginPlay(); void eventPreBeginPlay(); void EventPickedUp(VehiclePickupWrapper Pickup); void EventSpawned(VehiclePickupWrapper Pickup); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameObject/VehicleWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include ".././GameObject/RBActorWrapper.h" class AIControllerWrapper; class PlayerControllerWrapper; class BoostWrapper; class DodgeComponentWrapper; class JumpComponentWrapper; class PriWrapper; class DoubleJumpComponentWrapper; class VehicleSimWrapper; class AirControlComponentWrapper; class BAKKESMOD_PLUGIN_IMPORT VehicleWrapper : public RBActorWrapper { public: CONSTRUCTORS(VehicleWrapper) unsigned long GetbCanJump(); void SetbCanJump(unsigned long newbCanJump); //AUTO-GENERATED FROM FIELDS VehicleSimWrapper GetVehicleSim(); void SetVehicleSim(VehicleSimWrapper newVehicleSim); StickyForceData GetStickyForce(); void SetStickyForce(StickyForceData newStickyForce); unsigned long GetbDriving(); void SetbDriving(unsigned long newbDriving); unsigned long GetbReplicatedHandbrake(); void SetbReplicatedHandbrake(unsigned long newbReplicatedHandbrake); unsigned long GetbJumped(); void SetbJumped(unsigned long newbJumped); unsigned long GetbDoubleJumped(); void SetbDoubleJumped(unsigned long newbDoubleJumped); unsigned long GetbOnGround(); void SetbOnGround(unsigned long newbOnGround); unsigned long GetbSuperSonic(); void SetbSuperSonic(unsigned long newbSuperSonic); unsigned long GetbPodiumMode(); void SetbPodiumMode(unsigned long newbPodiumMode); ControllerInput GetInput(); void SetInput(ControllerInput newInput); unsigned char GetReplicatedThrottle(); void SetReplicatedThrottle(unsigned char newReplicatedThrottle); unsigned char GetReplicatedSteer(); void SetReplicatedSteer(unsigned char newReplicatedSteer); AIControllerWrapper GetAIController(); PlayerControllerWrapper GetPlayerController(); void SetPlayerController(PlayerControllerWrapper newPlayerController); PriWrapper GetPRI(); void SetPRI(PriWrapper newPRI); int GetVehicleUpdateTag(); void SetVehicleUpdateTag(int newVehicleUpdateTag); Vector GetLocalCollisionOffset(); void SetLocalCollisionOffset(Vector newLocalCollisionOffset); Vector GetLocalCollisionExtent(); void SetLocalCollisionExtent(Vector newLocalCollisionExtent); int GetLastBallTouchFrame(); void SetLastBallTouchFrame(int newLastBallTouchFrame); int GetLastBallImpactFrame(); void SetLastBallImpactFrame(int newLastBallImpactFrame); BoostWrapper GetBoostComponent(); DodgeComponentWrapper GetDodgeComponent(); AirControlComponentWrapper GetAirControlComponent(); JumpComponentWrapper GetJumpComponent(); DoubleJumpComponentWrapper GetDoubleJumpComponent(); void SetDoubleJumpComponent(DoubleJumpComponentWrapper newDoubleJumpComponent); float GetTimeBelowSupersonicSpeed(); void SetTimeBelowSupersonicSpeed(float newTimeBelowSupersonicSpeed); //AUTO-GENERATED FUNCTION PROXIES void ForceNetPacketIfNearBall(); bool IsCarWithinForwardEllipticalCone(VehicleWrapper OtherCar, float YawAngleDegrees, float PitchAngleDegrees); float GetForwardSpeed(); float GetTimeOffGround(); float GetTimeOnGround(); Vector GetGroundNormal(); bool IsOnWall(); bool IsOnGround(); int GetNumWheelWorldContacts(); int GetNumWheelContacts(); void ZeroMovementVariables(); void eventSetVehicleInput(ControllerInput& NewInput); void EnablePodiumMode(); void SetDriving(unsigned long bDrive); void InitAudioParams(); void OnPRIChanged(); void OnControllerChanged(); void UnPossessed(); void EventPRIChanged(VehicleWrapper Vehicle); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/GameWrapper.h ================================================ #pragma once #pragma warning(push) #pragma warning(disable:4251) #include #include #include #include #include "canvaswrapper.h" #include "mmrwrapper.h" #include "items/LoadoutSaveWrapper.h" #ifdef __cpp_lib_filesystem #include #endif class GameEventWrapper; class TutorialWrapper; class ServerWrapper; class CameraWrapper; class ReplayServerWrapper; class CanvasWrapper; class CarWrapper; class EngineTAWrapper; class PlayerControllerWrapper; class PluginManagerWrapper; class GuiManagerWrapper; class BindingsWrapper; class SequenceWrapper; class ItemsWrapper; class ClubDetailsWrapper; class UnrealStringWrapper; class MatchmakingWrapper; class SettingsWrapper; class PriWrapper; class ModalWrapper; class TextInputModalWrapper; class MenuStackWrapper; class GfxDataTrainingWrapper; class ReplayManagerWrapper; class MapListWrapper; class BAKKESMOD_PLUGIN_IMPORT GameWrapper { public: GameWrapper(std::uintptr_t mem, long pluginType, std::type_index idx); GameWrapper(const GameWrapper& other); GameWrapper& operator=(GameWrapper rhs); ~GameWrapper(); bool IsInGame(); bool IsInOnlineGame(); //bool IsInTutorial(); //Uncomment this later, but for now dont let plugins compile which use this as they most likely rely on broken functions bool IsInFreeplay(); bool IsInReplay(); bool IsInCustomTraining(); [[deprecated("Doesn't work, use PriWrapper::IsSpectator() instead. (For local player, use GetPlayerController()/*nullcheck*/.GetPRI())")]] bool IsSpectatingInOnlineGame(); bool IsPaused(); bool IsUsingEpicVersion(); bool IsUsingSteamVersion(); int GetSteamVersion(); std::string GetPsyBuildID(); ServerWrapper GetCurrentGameState(); ServerWrapper GetOnlineGame(); //TutorialWrapper GetGameEventAsTutorial(); ServerWrapper GetGameEventAsServer(); ReplayServerWrapper GetGameEventAsReplay(); MMRWrapper GetMMRWrapper(); CarWrapper GetLocalCar(); CameraWrapper GetCamera(); EngineTAWrapper GetEngine(); PluginManagerWrapper GetPluginManager(); GuiManagerWrapper GetGUIManager(); PlayerControllerWrapper GetPlayerController(); ItemsWrapper GetItemsWrapper(); _NODISCARD LoadoutSaveWrapper GetUserLoadoutSave() const; MatchmakingWrapper GetMatchmakingWrapper(); SettingsWrapper GetSettings(); _NODISCARD ReplayManagerWrapper GetReplayManagerWrapper() const; _NODISCARD MapListWrapper GetMapListWrapper() const; ModalWrapper CreateModal(const std::string& title); TextInputModalWrapper CreateTextInputModal(const std::string& title); void OverrideParams(void* src, size_t memsize); void SetTimeout(std::function theLambda, float time); //time in seconds, subject to change to std::shared_ptr void Execute(std::function theLambda); //Use this when calling from a different thread void RegisterDrawable(std::function callback); void UnregisterDrawables(); //Can only unregister every drawable for now, sorry! std::string GetFNameByIndex(int index); int GetFNameIndexByString(std::string name); void HookEvent(std::string eventName, std::function callback); void UnhookEvent(std::string eventName); void HookEventPost(std::string eventName, std::function callback); void UnhookEventPost(std::string eventName); void LogToChatbox(std::string text, std::string sender="BAKKESMOD"); /* Will queue up loading of a texture into memory, only has to be done once, after this it will persistently be stored in memory. Loading will be done at next toast render frame, any errors will be printed to the console. Supported file formats: Whatever D3DXCreateTextureFromFile supports. */ void LoadToastTexture(std::string name, std::string path); void LoadToastTexture(std::string name, std::wstring path); #ifdef __cpp_lib_filesystem void LoadToastTexture(std::string name, std::filesystem::path path); #endif /* Texture is the name of the texture given in LoadToastTexture, not the path! "default" will show the normal BakkesMod logo */ void Toast(std::string title, std::string text, std::string texture = "default", float timeout = 3.5f, uint8_t toastType = 0, float width = 290.f, float height = 60.f); bool IsKeyPressed(int keyName); int IsCursorVisible(); // 1 if due to RL, 2 if ImGui void ExecuteUnrealCommand(std::string command); std::string GetRandomMap(); std::string GetCurrentMap(); unsigned long long GetSteamID(); std::string GetEpicID(); UniqueIDWrapper GetUniqueID(); UnrealStringWrapper GetPlayerName(); ClubDetailsWrapper GetLocalClub(); SequenceWrapper GetMainSequence(); _NODISCARD GfxDataTrainingWrapper GetGfxTrainingData() const; _NODISCARD MenuStackWrapper GetMenuStack() const; [[deprecated("Experimental feature, use at your own risk. implementation and function signature subject to change")]] void SetBotLoadout(PriWrapper& bot_pri, const struct BotLoadoutData& loadout_data); Vector2 GetScreenSize(); float GetDisplayScale(); float GetInterfaceScale(); [[deprecated("Renamed to GetDisplayScale to match the name you see in the official interface")]] float GetSafeZoneRatio(); [[deprecated("Renamed to GetInterfaceScale to match the name you see in the official interface")]] float GetUIScale(); unsigned int GetbMetric(); UnrealStringWrapper GetUILanguage(); bool GetbColorBlind(); // Path utilities #ifdef __cpp_lib_filesystem std::filesystem::path GetBakkesModPath(); std::filesystem::path GetDataFolder(); std::filesystem::path FixRelativePath(std::filesystem::path path); #endif std::wstring GetBakkesModPathW(); std::wstring GetDataFolderW(); int GetBakkesModVersion(); void PlayReplay(const std::wstring& path); void PlayReplayFromTime(const std::wstring& path, float time); template::value>::type* = nullptr> void HookEventWithCaller(std::string eventName, std::function callback); template::value>::type* = nullptr> void HookEventWithCallerPost(std::string eventName, std::function callback); public: struct Impl; std::unique_ptr pimpl; }; #include "includes.h" extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCaller(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCaller(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCaller(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCaller(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCaller(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCaller(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCaller(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCallerPost(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCallerPost(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCallerPost(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCallerPost(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCallerPost(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCallerPost(std::string eventName, std::function callback); extern template void BAKKESMOD_PLUGIN_IMPORT GameWrapper::HookEventWithCallerPost(std::string eventName, std::function callback); #pragma warning(pop) ================================================ FILE: include/bakkesmod/wrappers/GuiManagerWrapper.h ================================================ #pragma once #include "./Engine/ObjectWrapper.h" #include "wrapperstructs.h" //#include "../imgui/imgui.h" #include class BAKKESMOD_PLUGIN_IMPORT GuiManagerWrapper : public ObjectWrapper { public: CONSTRUCTORS(GuiManagerWrapper); void* GetImGuiStyle(); // Path is relative to "bakkesmod/data/fonts/" // the int is a status code // 0: fail // 1: queued for loading // 2: already loaded (ImFont*) will be a valid pointer. std::tuple LoadFont(std::string name, std::string path, int size, const ImFontConfig* = nullptr, const ImWchar* = nullptr); // the core fonts are named: default and title ImFont* GetFont(std::string name); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/ImageWrapper.h ================================================ #pragma once #include #include #include "wrapperstructs.h" #ifdef __cpp_lib_filesystem #include #endif class BAKKESMOD_PLUGIN_IMPORT ImageWrapper { public: explicit ImageWrapper(std::string path, bool canvasLoad = false, bool ImGuiLoad = false); explicit ImageWrapper(std::wstring path, bool canvasLoad = false, bool ImGuiLoad = false); #ifdef __cpp_lib_filesystem explicit ImageWrapper(std::filesystem::path path, bool canvasLoad = false, bool ImGuiLoad = false); #endif // Don't make copies of this object! ImageWrapper(const ImageWrapper&) = delete; ImageWrapper& operator =(const ImageWrapper&) = delete; //ImageWrapper(ImageWrapper&&) = default; //ImageWrapper& operator = (ImageWrapper&&) = default; ~ImageWrapper(); bool LoadForCanvas(); bool IsLoadedForCanvas(); // Will do the load procedure if it haven't been preloaded void* GetCanvasTex(); void LoadForImGui(std::function onLoaded); bool IsLoadedForImGui(); // Will do the load procedure if it haven't been preloaded void* GetImGuiTex(); std::string GetPath(); #ifdef __cpp_lib_filesystem std::filesystem::path GetPathFs(); #endif std::wstring GetPathW(); Vector2 GetSize(); Vector2F GetSizeF(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/MMRWrapper.h ================================================ #pragma once #include "./Engine/ObjectWrapper.h" #include "wrapperstructs.h" #include "UniqueIDWrapper.h" class MMRWrapper; struct BAKKESMOD_PLUGIN_IMPORT MMRNotifierToken { friend class MMRWrapper; // The deconstructor deregisters your plugin for MMR notifications. ~MMRNotifierToken(); // Copying would break the deconstruction logic. MMRNotifierToken(const MMRNotifierToken& other) = delete; MMRNotifierToken& operator=(const MMRNotifierToken& other) = delete; // Move is OK MMRNotifierToken(MMRNotifierToken&& other) noexcept = default; MMRNotifierToken& operator=(MMRNotifierToken&& other) noexcept = default; private: explicit MMRNotifierToken(unsigned long long t); // Do we need pimpl here? unsigned long long token; }; class BAKKESMOD_PLUGIN_IMPORT MMRWrapper : public ObjectWrapper { public: CONSTRUCTORS(MMRWrapper); bool IsSyncing(UniqueIDWrapper playerID); bool IsSyncing(SteamID playerID); bool IsSynced(UniqueIDWrapper playerID, int playlistID); bool IsSynced(SteamID playerID, int playlistID); bool IsRanked(int playlistID); SkillRating GetPlayerSkillRating(UniqueIDWrapper playerID, int playlistID); SkillRank GetPlayerRank(UniqueIDWrapper playerID, int playlistID); float GetPlayerMMR(UniqueIDWrapper playerID, int playlistID); SkillRating GetPlayerSkillRating(SteamID playerID, int playlistID); SkillRank GetPlayerRank(SteamID playerID, int playlistID); float GetPlayerMMR(SteamID playerID, int playlistID); float CalculateMMR(SkillRating sr, bool disregardPlacements); int GetCurrentPlaylist(); /// /// Subscribe to MMR updates. The callback will receive a ID wrapper for the player that the MMR update is relevant for. /// /// The callback that will be called for each mmr update /// a token whos lifetime controls your callback registration. When the token is destroyed, so is your registration. std::unique_ptr RegisterMMRNotifier(std::function); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/MatchmakingWrapper.h ================================================ #pragma once #include #include "Engine/ObjectWrapper.h" enum class Region { // US-East USE = 0, // Europe EU = 1, // US-West USW = 2, // Asia-SE Mainland ASC = 3, // Asia-SE Maritime ASM = 4, // Asia-East JPN = 5, // Middle-East ME = 6, // Oceania OCE = 7, // South Africa SAF = 8, // South America SAM = 9, // India IND = 10 }; enum class Playlist { CASUAL_STANDARD = 0, CASUAL_DOUBLES = 1, CASUAL_DUELS = 2, CASUAL_CHAOS = 3, RANKED_STANDARD = 4, RANKED_DOUBLES = 5, RANKED_DUELS = 6, AUTO_TOURNAMENT = 12, EXTRAS_RUMBLE = 13, EXTRAS_DROPSHOT = 14, EXTRAS_HOOPS = 15, EXTRAS_SNOWDAY = 16 }; enum class PlaylistCategory { CASUAL = 0, RANKED = 1, EXTRAS = 2 }; enum class PlaylistIds { Unknown = -1337, Casual = 0, Duel = 1, Doubles = 2, Standard = 3, Chaos = 4, PrivateMatch = 6, Season = 7, OfflineSplitscreen = 8, Training = 9, RankedSoloDuel = 10, RankedTeamDoubles = 11, RankedStandard = 13, SnowDayPromotion = 15, Experimental = 16, BasketballDoubles = 17, Rumble = 18, Workshop = 19, UGCTrainingEditor = 20, UGCTraining = 21, Tournament = 22, Breakout = 23, TenthAnniversary = 25, FaceIt = 26, RankedBasketballDoubles = 27, RankedRumble = 28, RankedBreakout = 29, RankedSnowDay = 30, HauntedBall = 31, BeachBall = 32, Rugby = 33, AutoTournament = 34, RocketLabs = 35, RumShot = 37, GodBall = 38, CoopVsAI = 40, BoomerBall = 41, GodBallDoubles = 43, SpecialSnowDay = 44, Football = 46, Cubic = 47, TacticalRumble = 48, SpringLoaded = 49, SpeedDemon = 50, RumbleBM = 52, Knockout = 54, Thirdwheel = 55, MagnusFutball = 62 }; struct ClubColorSet { unsigned char TeamColorID = 0; unsigned char CustomColorID = 0; bool bTeamColorSet = false; bool bCustomColorSet = false; }; struct CustomMatchTeamSettings { std::string Name; ClubColorSet Colors; int GameScore = 0; }; struct CustomMatchSettings { // GameTags are the mutators. They should be comma separated (Launch a game manually and check your launch log for potential mutator names - or ask in #programming ) std::string GameTags; std::string MapName; std::string ServerName; std::string Password; CustomMatchTeamSettings BlueTeamSettings; CustomMatchTeamSettings OrangeTeamSettings; int GameMode = 0; // 0 = soccar, 1 = hoops, 2 = snowday, 3 = rumble, 5 = dropshot, 6 = heatseeker, 7 = gridiron, 8 = knockout (might change) int MaxPlayerCount = 8; bool bPartyMembersOnly = false; bool bClubServer; }; class BAKKESMOD_PLUGIN_IMPORT MatchmakingWrapper : public ObjectWrapper { public: CONSTRUCTORS(MatchmakingWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; //Matchmaking queue stuff bool IsSearching(); int GetActiveViewTab(); void SetRegionSelection(Region region, bool bSelected); void SetPlaylistSelection(Playlist playlist, bool bSelected); void SetViewTab(PlaylistCategory playlist_category); void StartMatchmaking(PlaylistCategory playlist_category); void CancelMatchmaking(); // Private match stuff void CreatePrivateMatch(Region region, int playlistID, const CustomMatchSettings& match_settings); /** * \brief Updates the settings of a private match lobby * \param match_settings The lobby settings * \return returns true if updating is successful */ [[nodiscard]] bool UpdatePrivateMatch(const CustomMatchSettings& match_settings) const; void JoinPrivateMatch(const std::string& server_name, const std::string& server_password = ""); // LAN stuff void CreateLanMatch(Region region, const CustomMatchSettings& match_settings) const; void JoinLanMatch(const std::string& server_id, const std::string& password) const; // Season stuff // If no season end date has been revealed yet, these functions will return either 0 or -1. int SeasonEndDays(); int SeasonEndHours(); int SeasonEndMinutes(); int GetSeasonTimeRemaining(); int GetSeasonEndTimeSeconds(); bool HasSeasonEnded(); int GetTotalPopulation(); _NODISCARD int GetTotalPlayersOnline() const; _NODISCARD int GetPlayerCount(PlaylistIds playlist) const; //misc static std::string GetRegionID(Region region); // ID Example: USE static std::string GetRegionLabel(Region region); // Label Example: US-East private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/MenuStackWrapper.h ================================================ #pragma once #include "Engine/ObjectWrapper.h" #include #include /** * Notable Events:\n * Function TAGame.GFxData_MenuStack_TA.PopMenu\n * Function TAGame.GFxData_MenuStack_TA.PushMenu\n */ class BAKKESMOD_PLUGIN_IMPORT MenuStackWrapper : public ObjectWrapper { public: CONSTRUCTORS(MenuStackWrapper) _NODISCARD std::string GetTopMenu() const; _NODISCARD std::vector GetMenuStack() const; _NODISCARD bool IsNull() const; _NODISCARD explicit operator bool() const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/PlayerControllerWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "WrapperStructs.h" #include "./Engine/ActorWrapper.h" //#include "ControllerWrapper.h" class BoostWrapper; class UnrealStringWrapper; class CarWrapper; class PriXWrapper; class GameEventWrapper; class ServerWrapper; class BaseCameraWrapper; class RBActorWrapper; class PriWrapper; class EngineTAWrapper; class PlayerReplicationInfoWrapper; class SpectatorHUDWrapper; class BAKKESMOD_PLUGIN_IMPORT PlayerControllerWrapper : public ActorWrapper /*ControllerWrapper*/ { public: CONSTRUCTORS(PlayerControllerWrapper) //AUTO-GENERATED FROM FIELDS CarWrapper GetCar(); void SetCar(CarWrapper newCar); PriWrapper GetPRI(); void SetPRI(PriWrapper newPRI); ControllerInput GetVehicleInput(); void SetVehicleInput(ControllerInput newVehicleInput); unsigned long GetbReceivedServerShutdownMessage(); void SetbReceivedServerShutdownMessage(unsigned long newbReceivedServerShutdownMessage); unsigned long GetbUseDebugInputs(); void SetbUseDebugInputs(unsigned long newbUseDebugInputs); unsigned long GetbJumpPressed(); void SetbJumpPressed(unsigned long newbJumpPressed); unsigned long GetbBoostPressed(); void SetbBoostPressed(unsigned long newbBoostPressed); unsigned long GetbHandbrakePressed(); void SetbHandbrakePressed(unsigned long newbHandbrakePressed); unsigned long GetbHasPitchedBack(); void SetbHasPitchedBack(unsigned long newbHasPitchedBack); unsigned long GetbAllowAsymmetricalMute(); void SetbAllowAsymmetricalMute(unsigned long newbAllowAsymmetricalMute); unsigned long GetbResetCamera(); void SetbResetCamera(unsigned long newbResetCamera); UnrealStringWrapper GetLoginURL(); unsigned char GetVoiceFilter(); void SetVoiceFilter(unsigned char newVoiceFilter); unsigned char GetChatFilter(); void SetChatFilter(unsigned char newChatFilter); PriWrapper GetFollowTarget(); void SetFollowTarget(PriWrapper newFollowTarget); BaseCameraWrapper GetSpectatorCameraArchetype(); void SetSpectatorCameraArchetype(BaseCameraWrapper newSpectatorCameraArchetype); BaseCameraWrapper GetEditorCameraArchetype(); void SetEditorCameraArchetype(BaseCameraWrapper newEditorCameraArchetype); Vector GetMoveActorGrabOffset(); void SetMoveActorGrabOffset(Vector newMoveActorGrabOffset); float GetMoveActorGrabIncrement(); void SetMoveActorGrabIncrement(float newMoveActorGrabIncrement); float GetMinMoveActorGrabDistance(); void SetMinMoveActorGrabDistance(float newMinMoveActorGrabDistance); float GetMouseIncrementSpeed(); void SetMouseIncrementSpeed(float newMouseIncrementSpeed); float GetBallVelocityIncrementAmount(); void SetBallVelocityIncrementAmount(float newBallVelocityIncrementAmount); int GetBallVelocityIncrementFireCount(); void SetBallVelocityIncrementFireCount(int newBallVelocityIncrementFireCount); float GetBallVelocityIncrementFireCountMax(); void SetBallVelocityIncrementFireCountMax(float newBallVelocityIncrementFireCountMax); float GetBallVelocityIncrementSpeedDefault(); void SetBallVelocityIncrementSpeedDefault(float newBallVelocityIncrementSpeedDefault); float GetBallVelocityIncrementSpeedMax(); void SetBallVelocityIncrementSpeedMax(float newBallVelocityIncrementSpeedMax); float GetCrosshairTraceDistance(); void SetCrosshairTraceDistance(float newCrosshairTraceDistance); ActorWrapper GetTracedCrosshairActor(); void SetTracedCrosshairActor(ActorWrapper newTracedCrosshairActor); Vector GetRotateActorCameraLocationOffset(); void SetRotateActorCameraLocationOffset(Vector newRotateActorCameraLocationOffset); Vector GetRotateActorCameraRotationOffset(); void SetRotateActorCameraRotationOffset(Vector newRotateActorCameraRotationOffset); int GetRotateActorCameraSide(); void SetRotateActorCameraSide(int newRotateActorCameraSide); float GetDesiredCameraSide(); void SetDesiredCameraSide(float newDesiredCameraSide); float GetPawnTypeChangedTime(); void SetPawnTypeChangedTime(float newPawnTypeChangedTime); int GetSelectedSpawnArchetype(); void SetSelectedSpawnArchetype(int newSelectedSpawnArchetype); ControllerInput GetDebugInputs(); void SetDebugInputs(ControllerInput newDebugInputs); int GetMinClientInputRate(); void SetMinClientInputRate(int newMinClientInputRate); int GetMedianClientInputRate(); void SetMedianClientInputRate(int newMedianClientInputRate); int GetMaxClientInputRate(); void SetMaxClientInputRate(int newMaxClientInputRate); int GetConfiguredClientInputRate(); void SetConfiguredClientInputRate(int newConfiguredClientInputRate); float GetTimeSinceLastMovePacket(); void SetTimeSinceLastMovePacket(float newTimeSinceLastMovePacket); float GetTimeLastReplicatedMovePacket(); void SetTimeLastReplicatedMovePacket(float newTimeLastReplicatedMovePacket); float GetMouseXDeadZone(); void SetMouseXDeadZone(float newMouseXDeadZone); float GetMouseYDeadZone(); void SetMouseYDeadZone(float newMouseYDeadZone); float GetMouseXDeadZoneAir(); void SetMouseXDeadZoneAir(float newMouseXDeadZoneAir); float GetMouseYDeadZoneAir(); void SetMouseYDeadZoneAir(float newMouseYDeadZoneAir); ControllerInput GetLastInputs(); void SetLastInputs(ControllerInput newLastInputs); PriWrapper GetPendingViewPRI(); void SetPendingViewPRI(PriWrapper newPendingViewPRI); float GetLastInputPitchUp(); void SetLastInputPitchUp(float newLastInputPitchUp); float GetLastInputPitchDown(); void SetLastInputPitchDown(float newLastInputPitchDown); float GetLastInputYawLeft(); void SetLastInputYawLeft(float newLastInputYawLeft); float GetLastInputYawRight(); void SetLastInputYawRight(float newLastInputYawRight); float GetLastInputPitch(); void SetLastInputPitch(float newLastInputPitch); float GetLastInputYaw(); void SetLastInputYaw(float newLastInputYaw); float GetMouseInputMax(); void SetMouseInputMax(float newMouseInputMax); EngineTAWrapper GetEngineShare(); void SetEngineShare(EngineTAWrapper newEngineShare); _NODISCARD SpectatorHUDWrapper GetSpectatorHud(); //AUTO-GENERATED FUNCTION PROXIES void HandleCarSet(PriWrapper InPRI); void SpawnSelectedArchetype(); bool RemoveActor(); void ToggleGrabActor(); void ToggleRotateActor(); void EditorReleaseActor(); void EditorCycleActor(); void DuplicateShot(); void StopEditing(); void EditorIncreasePower(); void EditorDecreasePower(); void EditorIncreasePowerToggleInterim(); void EditorDecreasePowerToggleInterim(); void EditorIncreasePowerToggle2(unsigned long bToggle); void EditorDecreasePowerToggle2(unsigned long bToggle); void ModifyEditorPower(int Direction); void ToggleCameraPosition(); void EditorUndo(); void EditorRedo(); void EditorIncreaseRoundTime(); void EditorDecreaseRoundTime(); void EditorNextRound(); void EditorPrevRound(); void UpdateCrosshair(); void NetClientInputRate(int Rate); void ServerCreateMatchBroadcast(ServerWrapper GameEvent); void ClampMoveActorGrabOffset(); void RevertToDefaultCameraHUDInput(); void SwitchToEditPawn(); void ServerResetPlayer(unsigned long bFullReset); void ResetPlayerRun(); void ResetPlayerCheckpoint(); void ToggleEditorRound(); void ToggleBetweenCarAndEditPawn(); void Interact(); void StopMovement(unsigned long bOnlyIfNoAccel); Vector GetRotateActorCameraOffset(float DeltaTime, unsigned long bSnap); void RestoreEditorPawnOrientation(); void BackupEditorPawnOrientation(); void UpdateRotatedActorOrientation(float DeltaTime); void OnOpenPauseMenu(); void ResetMouseCenter(); float CalculateMouseAxis(float Center, float CurrentLocation, float Deadzone, float MaxDist); void ShowControllerApplet(); void ShowAccountPicker(); void QueSaveReplay(); void SetFollowTarget2(PriWrapper InTarget); void FollowPlayer(PriWrapper InPlayer); void ClientSplitscreenJoinResponse(SteamID& PlayerID, unsigned long bAllow, std::string Error); void ServerRequestSplitscreenJoin(SteamID& PlayerID, std::string PlayerName); bool eventPreClientTravel(std::string PendingURL, unsigned char TravelType, unsigned long bIsSeamlessTravel); void NotifyGoalScored(int ScoredOnTeam); void eventDestroyed(); bool ShouldBeMuted(PlayerControllerWrapper Other); bool IsCommunicationFiltered(unsigned char Filter, PlayerControllerWrapper Other, unsigned long bPreset); void RefreshMutedPlayers(unsigned long bForceRefresh); void eventServerUnmutePlayer(SteamID& PlayerNetId); void eventServerMutePlayer(SteamID& PlayerNetId); void GameplayUnmutePlayer(SteamID& PlayerNetId); void GameplayMutePlayer(SteamID& PlayerNetId); void ServerSetChatFilter(unsigned char InVoiceFilter); void ServerSetVoiceFilter(unsigned char InVoiceFilter); bool IsExplictlyMuted(SteamID& PlayerNetId); void DebugAI(); void SendPendingRPCs(); bool CanSendMessage(unsigned long bQuickChatMessage); void ClientNotifyChatBanned(unsigned long long ChatBanExpiration); void ClientNotifyChatDisabled(float Time); void ChatMessage_TA(PlayerReplicationInfoWrapper InPRI, std::string Message, unsigned char ChatChannel, unsigned long bPreset); void ServerSayInternal_TA(std::string Message, unsigned char ChatChannel, unsigned long bPreset); void ServerSay_TA(std::string Message, unsigned char ChatChannel, unsigned long bPreset); void Say_TA2(std::string Message, unsigned char ChatChannel, SteamID& Recipient, unsigned long bPreset); bool CanChatWith(PlayerControllerWrapper Other, unsigned long bPreset); bool AllowTextMessage(std::string msg); void PushToTalkEnd(); void PushToTalk2(); void HandleJoinGameMigrationCompleted(unsigned long bSuccess, std::string FailReason); void eventClientUnmutePlayer(SteamID& PlayerNetId); void eventClientMutePlayer(SteamID& PlayerNetId, unsigned long bAddToMuteList); void ClientSetOnlineStatus(); void HandleGameDataSelected(int PlaylistId, int MutatorIndex); GameEventWrapper GetGameEvent(); void ClientArbitratedMatchEnded(); void BannedKick(); void NoReservationKick(); void IdleKick2(); void ServerReportServer(); void ClientUseItem(Vector& UseLocation, Rotator& UseRotation); void ServerTeleportCar(Vector& SpawnLocation, Rotator& NewRotation); void eventTeleportCar(Vector& SpawnLocation, Rotator& NewRotation); void ServerUsePickup(RBActorWrapper Target); void UsePickup2(); void ToggleHandbrake(unsigned long bHandbrake); void ToggleBoost(unsigned long bBoost); void ToggleJump(unsigned long bJump); void TargetSelectLeft(); void TargetSelectRight(); void ReleaseRearCamera(); void PressRearCamera(); void ReleaseSecondaryCamera(); void PressSecondaryCamera(); void ReadyUp(); void Spectate(); void ChangeTeam(int TeamNum); void SwitchTeam(); void SetDefaultCameraMode(); void ResetCameraMode(); void ZeroMoveInput(); void PlayerMove(float DeltaTime); void IgnoreMoveInput(unsigned long bNewMoveInput); void eventSendClientAdjustment(); PlayerControllerWrapper GetPrimaryPlayerController(); void HandleAddBoostComponent(BoostWrapper Boost); void ReplicateLoadout(); void ReplicateCameraRotation(); void SetUsingFreecam(unsigned long bFreecam); void SetUsingBehindView(unsigned long bBehindView); void SetUsingSecondaryCamera(unsigned long bSecondaryCamera); void ReplicateCameraSettings(); void HandleControllerLayoutChanged(PriWrapper InPRI); void HandlePawnTypeChanged(PriWrapper InPRI); void HandlePendingViewCarSet(PriWrapper InPRI); void HandleReplaceBot(PriWrapper InPRI); void HandleTeamChanged(PriXWrapper InPRI); void HandleMatchEnded(ServerWrapper GameEvent); void HandleStartNewRound(ServerWrapper GameEvent); void HandleGameEventChanged(PriWrapper InPRI); void HandlePRICameraChanged(PriWrapper InPRI); void SetupLightBar(); void HandlePersistentCameraSet(PriWrapper InPRI); void OnReceivedPlayerAndPRI(); void UpdateVoiceFilter(); void ReplicateLevelSessionID(); void ServerInitInputBuffer(unsigned char Type); void eventReceivedPlayer(); void eventPostBeginPlay(); void EventChatMessage(PlayerControllerWrapper PC, std::string Message, unsigned long bPreset); void EventResetPlayer(PlayerControllerWrapper PC, unsigned long bFullReset); void EventSelectBallCamTarget(PlayerControllerWrapper PC, int Direction); void EventTrainingEditorActorModified(); void EventMuteChanged(PlayerControllerWrapper PC, SteamID& PlayerID, unsigned long bMuted); void EventLaunchControllerApplet(); void EventLaunchAccountPicker(int ControllerId); bool GetbUsingGamepad(); void SetMouseSensitivity(float NewSensitivity); float GetMouseSensitivity(); void SetAForward(float aForward); float GetAForward(); void SetATurn(float aTurn); float GetATurn(); void SetAStrafe(float aStrafe); float GetAStrafe(); void SetAUp(float aUp); float GetAUp(); void SetALookUp(float aLookUp); float GetALookUp(); void SetLookRightScale(float NewScale); float GetLookRightScale(); void SetLookUpScale(float NewScale); float GetLookUpScale(); void SetGamepadLookScale(float NewScale); float GetGamepadLookScale(); void SetALookRoll(float NewLookRoll); float GetALookRoll(); void SetbRoll(bool NewRoll); bool GetbRoll(); void SetSpectatorCameraAccel(float SpectatorCameraAccel); float GetSpectatorCameraAccel(); void SetSpectatorCameraSpeed(float SpectatorCameraSpeed); float GetSpectatorCameraSpeed(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/PluginManagerWrapper.h ================================================ #pragma once #include "../plugin/bakkesmodplugin.h" #include "./Engine/ObjectWrapper.h" #include "wrapperstructs.h" #include namespace BakkesMod { namespace Plugin { struct LoadedPlugin; } } class BAKKESMOD_PLUGIN_IMPORT PluginManagerWrapper : public ObjectWrapper { public: CONSTRUCTORS(PluginManagerWrapper); std::vector>* GetLoadedPlugins(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/ReplayServerWrapper.h ================================================ #pragma once #include "./GameEvent/ServerWrapper.h" class ReplayWrapper; class BAKKESMOD_PLUGIN_IMPORT ReplayServerWrapper : public ServerWrapper { public: ReplayServerWrapper(std::uintptr_t server, std::uintptr_t gameinfo, std::uintptr_t replaydirector); ReplayServerWrapper(const ReplayServerWrapper& other); ReplayServerWrapper& operator=(ReplayServerWrapper rhs); ~ReplayServerWrapper(); ActorWrapper GetViewTarget(); ReplayWrapper GetReplay(); float GetReplayTimeElapsed(); int GetReplayFPS(); int GetCurrentReplayFrame(); void AddKeyFrame(int frame, std::string name); void RemoveKeyFrame(int frame); void SkipToFrame(int frame); void SkipToTime(float time); void StartPlaybackAtFrame(int frame); void StartPlaybackAtTime(float time); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/ReplayViewerDataWrapper.h ================================================ #pragma once struct LocalizedCameraMode { std::string name; bool disabled; std::string label; std::string description; }; class BAKKESMOD_PLUGIN_IMPORT ReplayViewerDataWrapper : ObjectWrapper { public: CONSTRUCTORS(ReplayViewerDataWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; _NODISCARD int GetCurrentFrame() const; _NODISCARD std::vector GetCameraModes() const; _NODISCARD std::string GetDefaultCameraMode() const; _NODISCARD std::string GetCameraMode() const; _NODISCARD std::string GetFocusActorString() const; _NODISCARD std::string GetLastFocusActorString() const; _NODISCARD unsigned int GetbHighlightFocusActor() const; _NODISCARD unsigned int GetbShowReplayHUD() const; _NODISCARD unsigned int GetbShowMatchInfoHUD() const; _NODISCARD unsigned int GetbShowPlayerNames() const; _NODISCARD unsigned int GetbPausedForScrub() const; _NODISCARD unsigned int GetbChangesMade() const; _NODISCARD float GetSlomo() const; _NODISCARD float GetFOV() const; _NODISCARD int GetViewRoll() const; _NODISCARD ReplayWrapper GetReplay() const; _NODISCARD int GetPendingSkipToFrame() const; void SaveReplayAndExit(); void SetPausedForScrub(unsigned int bPaused); void SetFOV(float inFov); void SetShowPlayerNames(unsigned int bVisible); void SetShowMatchInfoHUD(unsigned int bVisible); void SetShowReplayHUD(unsigned int bVisible); void SetSlomo(float newSlomo); void TimerSkipToFrame(); void AdvanceTime(float deltaTime); void AdvanceToFrame(int frame); void SetCameraMode(const std::string& modeName); void SetFocusActorString(const std::string& inFocusActorString); void RefreshDisabledModes(); void InitCameraModes(); void UpdateReplayData(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/SettingsWrapper.h ================================================ #pragma once #include "WrapperStructs.h" class BAKKESMOD_PLUGIN_IMPORT SettingsWrapper { public: SettingsWrapper(); ~SettingsWrapper(); ProfileCameraSettings GetCameraSettings(); CameraSave GetCameraSaveSettings(); [[deprecated("Use GetAllPCBindings instead")]] std::map GetPCBindings(); [[deprecated("Use GetAllGamepadBindings instead")]] std::map GetGamepadBindings(); std::vector> GetAllPCBindings(); std::vector> GetAllGamepadBindings(); GamepadSettings GetGamepadSettings(); VideoSettings GetVideoSettings(); _NODISCARD bool GetForceDefaultColors() const; void SetForceDefaultColors(bool value); }; ================================================ FILE: include/bakkesmod/wrappers/SpectatorHUDWrapper.h ================================================ #pragma once #include "ReplayViewerDataWrapper.h" // Adding the empty bases, so we are future-proof in case we want to use something from the bases later class BAKKESMOD_PLUGIN_IMPORT HudWrapper : public ActorWrapper { public: CONSTRUCTORS(HudWrapper) private: PIMPL }; class BAKKESMOD_PLUGIN_IMPORT HUDXWrapper: public HudWrapper { public: CONSTRUCTORS(HUDXWrapper) private: PIMPL }; class BAKKESMOD_PLUGIN_IMPORT HUDTABaseWrapper: public HUDXWrapper { public: CONSTRUCTORS(HUDTABaseWrapper) private: PIMPL }; class BAKKESMOD_PLUGIN_IMPORT HUDTAWrapper: public HUDTABaseWrapper { public: CONSTRUCTORS(HUDTAWrapper) private: PIMPL }; class BAKKESMOD_PLUGIN_IMPORT SpectatorHUDWrapper : public HUDTAWrapper { public: CONSTRUCTORS(SpectatorHUDWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; _NODISCARD ReplayViewerDataWrapper GetViewerData() const; _NODISCARD float GetZoomSpeed() const; _NODISCARD float GetZoomClickTime() const; _NODISCARD PriWrapper GetTargetPlayerPRI() const; _NODISCARD unsigned int GetbZoomIn() const; _NODISCARD unsigned int GetbZoomOut() const; _NODISCARD unsigned int GetbReplayTimeSkipped() const; _NODISCARD float GetZoomInTime() const; _NODISCARD float GetZoomOutTime() const; _NODISCARD CarWrapper GetFocusCar(); _NODISCARD PriWrapper GetPRIFromPlayerIDString(const std::string& playerIdString); void ViewCycle(int direction); void ViewPrev(); void ViewNext(); void ViewFly(); void ViewAutoCam(); void ViewDefault(); void SetFocusActorString(const std::string& focusActorString); void ViewPlayer(int team, int player); void OpenReplayFXMenu(); void OpenCameraMenu(); void CycleCamera(); void OpenFocusMenu(); void CycleFocus(); void UpdateHudVisibility(); void CycleHUD(); void ZoomOut(unsigned int bPressed); void ZoomIn(unsigned int bPressed); void AdjustZoom(float deltaFov); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/StructArrayWrapper.h ================================================ #pragma once #pragma warning(push) #pragma warning(disable:4661) #include "WrapperStructs.h" #include "./Engine/ActorWrapper.h" //struct RecordedSample; //struct ProfileCameraSettings; //struct SteamID; //struct LinearColor; struct ClubMember; template class BAKKESMOD_PLUGIN_IMPORT StructArrayWrapper { public: StructArrayWrapper(std::uintptr_t mem); StructArrayWrapper(const StructArrayWrapper& other); StructArrayWrapper& operator=(StructArrayWrapper rhs); ~StructArrayWrapper(); int Count(); T Get(int index); protected: PIMPL }; // template class BAKKESMOD_PLUGIN_IMPORT StructArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT StructArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT StructArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT StructArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT StructArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT StructArrayWrapper; #pragma warning(pop) ================================================ FILE: include/bakkesmod/wrappers/UniqueIDWrapper.h ================================================ #pragma once #pragma warning(push) #pragma warning(disable:4661) #include "WrapperStructs.h" class BAKKESMOD_PLUGIN_IMPORT UniqueIDWrapper { public: //Empty constructor so it can be declared in classes and we can have 0 values UniqueIDWrapper(); UniqueIDWrapper(std::uintptr_t mem); UniqueIDWrapper(const UniqueIDWrapper& other); UniqueIDWrapper& operator=(UniqueIDWrapper rhs); ~UniqueIDWrapper(); OnlinePlatform GetPlatform() const; std::string GetEpicAccountID() const; unsigned long long GetUID() const; unsigned char GetSplitscreenID() const; /* String representation of the ID. Will be the EpicID if nonempty. Uid otherwise */ std::string str() const; /// /// Returns the id in the following format platform|accountId|splitScreenId /// /// std::string GetIdString() const; public: /* Not 100% with the internals here, think it depends on what the game reads. For some functionality you might get away with just the epicAccountID, others might rely on UID & platform. And some others you might even need both. AKA: it's best you just retrieve this wrapper from the game from existing players instead of using this function. This wrapper is an exception to most other wrappers, as in: you're allowed to store this one! woohoo */ static UniqueIDWrapper FromEpicAccountID(std::string epicAccountID, unsigned long long uid, OnlinePlatform platform, unsigned char splitscreenID = 0); bool operator <(const UniqueIDWrapper& rhs) const; bool operator==(const UniqueIDWrapper& rhs) const; bool operator!=(const UniqueIDWrapper& rhs) const; protected: PIMPL }; #pragma warning(pop) ================================================ FILE: include/bakkesmod/wrappers/arraywrapper.h ================================================ #pragma once #pragma warning(push) #pragma warning(disable:4661) #include "./Engine/ActorWrapper.h" #include "./GameObject/CarWrapper.h" #include "./GameObject/BallWrapper.h" #include "./GameObject/PriWrapper.h" #include "./GameObject/CarComponent/WheelWrapper.h" #include "./GameObject/RBActorWrapper.h" #include "./GameObject/CarComponent/CarComponentWrapper.h" #include "./GameObject/TeamWrapper.h" #include "./GameObject/GoalWrapper.h" #include "./GameObject/BoostPickupWrapper.h" #include "GameObject/BreakOutActorPlatformWrapper.h" class ProductPaintWrapper; class MapDataWrapper; class ProductSlotWrapper; class LoadingProductWrapper; class LoadoutSetWrapper; class ActorWrapper; class CarWrapper; class BallWrapper; class WheelWrapper; class RBActorWrapper; class CarComponentWrapper; class TeamWrapper; class GoalWrapper; class BoostPickupWrapper; class SampleHistoryWrapper; class StatGraphWrapper; class ControllerWrapper; class PlayerControllerWrapper; class SequenceWrapper; class SequenceObjectWrapper; class SequenceVariableWrapper; class ProductWrapper; class OnlineProductWrapper; class ProductAttributeWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper { public: ArrayWrapper(std::uintptr_t mem); ArrayWrapper(const ArrayWrapper& other); ArrayWrapper& operator=(ArrayWrapper rhs); ~ArrayWrapper(); int Count(); T Get(int index); bool IsNull(); protected: PIMPL }; template class ArrayWrapperIterator { public: ArrayWrapperIterator(ArrayWrapper& collection, size_t const index) : index(index), collection(collection) { } bool operator!= (ArrayWrapperIterator const& other) const { return index != other.index; } T operator* () const { return collection.Get(index); } ArrayWrapperIterator const& operator++ () { ++index; return *this; } private: size_t index; ArrayWrapper& collection; }; template inline ArrayWrapperIterator begin( ArrayWrapper& collection) { return ArrayWrapperIterator(collection, 0); } template inline ArrayWrapperIterator end( ArrayWrapper& collection) { return ArrayWrapperIterator( collection, collection.Count()); } // template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; //template class BAKKESMOD_PLUGIN_IMPORT ArrayWrapper; #pragma warning(pop) ================================================ FILE: include/bakkesmod/wrappers/canvaswrapper.h ================================================ #pragma once #include "WrapperStructs.h" #include "./Engine/ActorWrapper.h" #include "ImageWrapper.h" #include class BAKKESMOD_PLUGIN_IMPORT CanvasWrapper { public: CONSTRUCTORS(CanvasWrapper) void SetPosition(Vector2F pos); Vector2F GetPositionFloat(); void SetColor(char Red, char Green, char Blue, char Alpha);//0-255 void SetColor(LinearColor color); LinearColor GetColor(); void DrawBox(Vector2F size); void FillBox(Vector2F size); void FillTriangle(Vector2F p1, Vector2F p2, Vector2F p3); void FillTriangle(Vector2F p1, Vector2F p2, Vector2F p3, LinearColor color); void DrawString(std::string text); void DrawString(std::string text, float xScale, float yScale); void DrawString(std::string text, float xScale, float yScale, bool dropShadow, bool wrapText=false); Vector2F GetStringSize(std::string text, float xScale=1, float yScale=1); void DrawLine(Vector2F start, Vector2F end); void DrawLine(Vector2F start, Vector2F end, float width); void DrawRect(Vector2F start, Vector2F end); void DrawTexture(ImageWrapper* img, float scale); void DrawRect(float RectX, float RectY, ImageWrapper* img); // don't ask. try.. void DrawTile(ImageWrapper* img, float XL, float YL, float U, float V, float UL, float VL, LinearColor Color, unsigned int ClipTile, unsigned char Blend); void DrawRotatedTile(ImageWrapper* img, Rotator& Rotation, float XL, float YL, float U, float V, float UL, float VL, float AnchorX, float AnchorY); void SetPosition(Vector2 pos); Vector2 GetPosition(); void DrawBox(Vector2 size); void FillBox(Vector2 size); void FillTriangle(Vector2 p1, Vector2 p2, Vector2 p3); void FillTriangle(Vector2 p1, Vector2 p2, Vector2 p3, LinearColor color); void DrawLine(Vector2 start, Vector2 end); void DrawLine(Vector2 start, Vector2 end, float width); void DrawRect(Vector2 start, Vector2 end); Vector2 Project(Vector location); Vector2F ProjectF(Vector location); /// Converts screen coordinates to world space /// Screen position to deproject /// Pair of (worldOrigin, worldDirection) std::pair DeProject(Vector2F screenPos); Vector2 GetSize(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/cvarmanagerwrapper.h ================================================ #pragma once #include "../plugin/bakkesmodsdk.h" #include #include #include #include "cvarwrapper.h" typedef void (*commandNotifier)(std::vector); class BAKKESMOD_PLUGIN_IMPORT CVarManagerWrapper { public: CVarManagerWrapper(std::uintptr_t mem, std::type_index pluginIdx); CVarManagerWrapper(const CVarManagerWrapper& other); CVarManagerWrapper& operator=(CVarManagerWrapper rhs); ~CVarManagerWrapper(); void executeCommand(std::string command, bool log = true); void registerNotifier(std::string cvar, commandNotifier notifier, std::string description, unsigned char permissions); void registerNotifier(std::string cvar, std::function)> notifier, std::string description, unsigned char permissions); bool removeNotifier(std::string cvar); CVarWrapper registerCvar(std::string cvar, std::string defaultValue, std::string desc = "", bool searchAble = true, bool hasMin = false, float min = 0, bool hasMax = false, float max = 0, bool saveToCfg = true); bool removeCvar(std::string cvar); void log(std::string text); void log(std::wstring text); CVarWrapper getCvar(std::string cvar); std::string getBindStringForKey(std::string key); void setBind(std::string key, std::string command); void removeBind(std::string key); std::string getAlias(std::string alias); void setAlias(std::string key, std::string script); void backupCfg(std::string path); void backupBinds(std::string path); void loadCfg(std::string path); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/cvarwrapper.h ================================================ #pragma once #include "../plugin/bakkesmodsdk.h" #include "wrapperstructs.h" #include #include #include #include class CVarWrapper; class BAKKESMOD_PLUGIN_IMPORT CVarWrapper { public: CVarWrapper(std::uintptr_t mem, std::type_index pluginIdx); CVarWrapper(const CVarWrapper& other); CVarWrapper& operator=(CVarWrapper rhs); ~CVarWrapper(); private: PIMPL public: std::string getCVarName(); int getIntValue(); float getFloatValue(); bool getBoolValue(); LinearColor getColorValue();//Returns {0,0,0,0} if bad formatting. Good: "(R, G, B, A)" (0-255 range), or 6/8 hex ("#123ABC" or "#1234ABCD", capitalization doesn't matter) std::string getStringValue(); std::string getDescription(); const std::string GetDefaultValue(); bool HasMinimum(); bool HasMaximum(); float GetMinimum(); float GetMaximum(); bool IsHidden(); bool ShouldSaveToCfg(); void ResetToDefault(); void notify(); //Will send a notification to all listeners, (for example when new gameevent is loaded or cvar is changed) void setValue(std::string value); void setValue(int value); void setValue(float value); void setValue(LinearColor value);//Input should be 0-255 range void addOnValueChanged(std::function changeFunc); //string is old value, cvarwrapper is cvar now. void removeOnValueChanged(); void bindTo(std::shared_ptr var); void bindTo(std::shared_ptr var); void bindTo(std::shared_ptr var); void bindTo(std::shared_ptr var); void bindTo(std::shared_ptr var); bool IsNull(); explicit operator bool(); }; ================================================ FILE: include/bakkesmod/wrappers/gfx/GfxDataTrainingWrapper.h ================================================ #pragma once template class ArrayWrapper; template class StructArrayWrapper; #include "../WrapperStructs.h" #include "../Engine/ObjectWrapper.h" //#include "../StructArrayWrapper.h" class BAKKESMOD_PLUGIN_IMPORT GfxDataTrainingWrapper : public ObjectWrapper { public: CONSTRUCTORS(GfxDataTrainingWrapper) explicit operator bool(); bool IsNull(); bool CanUseMirroring(); bool CanUsePlaylistOverride(); bool CanUseShuffle(); bool CanUseTrainingUIV2(); bool HasCompletedTraining(const std::string& inType, const std::string& inDifficulty); bool HasCompletedTutorial(int InType); bool HasPerfectedTraining(const std::string& inType, const std::string& inDifficulty); bool UpdateDataFromProgress(); void EndTrainingEditorPlaytest(); void eventOnRemoved(); void eventOnShellSet(); void PlayFreeplayMap(const std::string& Map); void PlayTraining(const std::string& Type, const std::string& trainingDifficulty); void PlayTutorial(bool bAdvanced); void PlayV2Tutorial(int type, bool bAutoEntered); void ResetTrainingProgress(); void SetCurrentPlaylist(const std::string& playlist); void SetTrainingEditorGameEvent(TrainingEditorWrapper inGameEvent); void SetTrainingGameEvent(TutorialWrapper inGameEvent); void StartAtPlaylistIndex(int inPlaylistIndex); std::string GetTrainingType(); int GetCurrentScore(); int GetCurrentRound(); int GetTotalRounds(); UnrealStringWrapper GetDifficulty(); std::string GetSelectedFreeplayMap(); UnrealStringWrapper GetTutorialTip(); StructArrayWrapper GetProgressPerShot(); int GetCurrentPlaylistindex(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/http/HttpWrapper.h ================================================ #pragma once #include "bakkesmod/core/http_structs.h" class BAKKESMOD_PLUGIN_IMPORT HttpWrapper { public: // Don't expect callbacks to be run in the game thread. // Wrap them in GameWrapper->Execute if you call wrapper functions in the callback!. /// /// This one gives you a callback with the response as a string /// Returns a http code of 418 on error /// /// The request options /// Callback that runs when the request finishes (or on error) static void SendCurlRequest(CurlRequest request_data, CurlRequestDoneStringReturn on_complete); /// /// This one gives you a pointer to the raw data in the response, do as you wish with it. /// The pointer is only valid in your callback. copy the data if you intend to use it later /// Returns a http code of 418 on error /// /// The request options /// Callback that runs when the request finishes (or on error) static void SendCurlRequest(CurlRequest request_data, CurlRequestDoneBinaryReturn on_complete); /// /// This one saves the response to a file and gives you a callback with the path to the file (it will just be the file_output you called it with) /// Returns a http code of 418 on error /// /// The request options /// Where the file will be saved /// Callback that runs when the request finishes (or on error) static void SendCurlRequest(CurlRequest request_data, const std::wstring& file_output, CurlRequestDoneFileReturn on_complete); /// /// Adds the Content-Type and Accept headers if not already set. /// Content-Type: application/json /// Accept: application/json /// Returns a http code of 418 on error /// /// The request options /// Callback that runs when the request finishes (or on error) static void SendCurlJsonRequest(CurlRequest request_data, CurlRequestDoneStringReturn on_complete); }; ================================================ FILE: include/bakkesmod/wrappers/includes.h ================================================ #pragma once #pragma warning(push) #pragma warning(disable:4251) #include "./Engine/ActorWrapper.h" #include "./Engine/EngineTAWrapper.h" #include "./Engine/UnrealStringWrapper.h" #include "./GameEvent/GameEditorWrapper.h" #include "./GameEvent/GameEventWrapper.h" #include "./GameEvent/GameSettingPlaylistWrapper.h" #include "./GameEvent/ReplayDirectorWrapper.h" #include "./GameEvent/ReplaySoccarWrapper.h" #include "./GameEvent/ReplayWrapper.h" #include "./GameEvent/SaveData/GameEditorSaveDataWrapper.h" #include "./GameEvent/SaveData/SaveDataWrapper.h" #include "./GameEvent/SaveData/TrainingEditorSaveDataWrapper.h" #include "./GameEvent/ServerWrapper.h" #include "./GameEvent/TeamGameEventWrapper.h" #include "./GameEvent/TrainingEditorWrapper.h" #include "./GameEvent/TutorialWrapper.h" #include "./GameObject/BallWrapper.h" #include "./GameObject/BaseCameraWrapper.h" #include "./GameObject/BoostPickupWrapper.h" #include "./GameObject/CameraWrapper.h" #include "./GameObject/CameraXWrapper.h" #include "./GameObject/CarComponent/AirControlComponentWrapper.h" #include "./GameObject/CarComponent/BoostWrapper.h" #include "./GameObject/CarComponent/CarComponentWrapper.h" #include "./GameObject/CarComponent/DodgeComponentWrapper.h" #include "./GameObject/CarComponent/DoubleJumpComponentWrapper.h" #include "./GameObject/CarComponent/FlipCarComponentWrapper.h" #include "./GameObject/CarComponent/JumpComponentWrapper.h" #include "./GameObject/CarComponent/PrimitiveComponentWrapper.h" #include "./GameObject/CarComponent/VehicleSimWrapper.h" #include "./GameObject/CarComponent/WheelWrapper.h" #include "./GameObject/CarWrapper.h" #include "./GameObject/FXActorWrapper.h" #include "./GameObject/GoalWrapper.h" #include "./GameObject/PerformanceStats/InputBufferGraphWrapper.h" #include "./GameObject/PerformanceStats/NetStatGraphWrapper.h" #include "./GameObject/PerformanceStats/PerfStatGraphWrapper.h" #include "./GameObject/PerformanceStats/SampleHistoryWrapper.h" #include "./GameObject/PerformanceStats/SampleRecordSettingsWrapper.h" #include "./GameObject/PerformanceStats/StatGraphSystemWrapper.h" #include "./GameObject/PerformanceStats/StatGraphWrapper.h" #include "./GameObject/PhysicalMaterialPropertyWrapper.h" #include "./GameObject/PlayerReplicationInfoWrapper.h" #include "./GameObject/PriWrapper.h" #include "./GameObject/PriXWrapper.h" #include "./GameObject/RBActorWrapper.h" #include "./GameObject/RumbleComponent/AttachmentPickup.h" #include "./GameObject/RumbleComponent/BallCarSpringPickup.h" #include "./GameObject/RumbleComponent/BallFreezePickup.h" #include "./GameObject/RumbleComponent/BallLassoPickup.h" #include "./GameObject/RumbleComponent/BattarangPickup.h" #include "./GameObject/RumbleComponent/BoostModPickup.h" #include "./GameObject/RumbleComponent/BoostOverridePickup.h" #include "./GameObject/RumbleComponent/CarSpeedPickup.h" #include "./GameObject/RumbleComponent/DemolishPickup.h" #include "./GameObject/RumbleComponent/GrapplingHookPickup.h" #include "./GameObject/RumbleComponent/GravityPickup.h" #include "./GameObject/RumbleComponent/HandbrakeOverridePickup.h" #include "./GameObject/RumbleComponent/HitForcePickup.h" #include "./GameObject/RumbleComponent/RumblePickupComponentWrapper.h" #include "./GameObject/RumbleComponent/SpringPickup.h" #include "./GameObject/RumbleComponent/SwapperPickup.h" #include "./GameObject/RumbleComponent/TargetedPickup.h" #include "./GameObject/RumbleComponent/TimeBombPickup.h" #include "./GameObject/RumbleComponent/TornadoPickup.h" #include "./GameObject/RumbleComponent/VelcroPickup.h" #include "./GameObject/TeamInfoWrapper.h" #include "./GameObject/TeamWrapper.h" #include "./GameObject/VehiclePickupWrapper.h" #include "./GameObject/VehicleWrapper.h" #include "./AIControllerWrapper.h" #include "./ControllerWrapper.h" #include "./PlayerControllerWrapper.h" #include "./ReplayServerWrapper.h" #include "./GameObject/ClubDetailsWrapper.h" #include "./items/ItemsWrapper.h" #include "./ImageWrapper.h" #include "./MatchmakingWrapper.h" #include "./SettingsWrapper.h" #include "./http/HttpWrapper.h" #include "bakkesmod/core/bot_loadout_structs.h" #include "bakkesmod/wrappers/modals/ModalWrapper.h" #include "bakkesmod/wrappers/modals/TextInputModalWrapper.h" #include "bakkesmod/wrappers/CareerStatsWrapper.h" #include "bakkesmod/wrappers/GameObject/BallBreakoutWrapper.h" #include "bakkesmod/wrappers/GameObject/BallGodWrapper.h" #include "bakkesmod/wrappers/GameObject/BallHauntedWrapper.h" #include "bakkesmod/wrappers/GameObject/BreakOutActorPlatformWrapper.h" #include "bakkesmod/wrappers/GameObject/GoalHoopsWrapper.h" #include "bakkesmod/wrappers/PluginManagerWrapper.h" #include "bakkesmod/wrappers/GameObject/Stats/StatEventWrapper.h" #include "bakkesmod/wrappers/MenuStackWrapper.h" #include "bakkesmod/wrappers/gfx/GfxDataTrainingWrapper.h" #include "bakkesmod/wrappers/items/LoadingProductWrapper.h" #include "bakkesmod/wrappers/items/GfxProductsWrapper.h" #include "bakkesmod/wrappers/SpectatorHUDWrapper.h" #include "bakkesmod/wrappers/ReplayViewerDataWrapper.h" #pragma warning(pop) ================================================ FILE: include/bakkesmod/wrappers/items/GfxProductsWrapper.h ================================================ #pragma once #include "../Engine/ObjectWrapper.h" #include "LoadingProductWrapper.h" #include "../arraywrapper.h" class BAKKESMOD_PLUGIN_IMPORT GfxProductsWrapper : ObjectWrapper { public: CONSTRUCTORS(GfxProductsWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; _NODISCARD ArrayWrapper GetLoadingProducs() const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/ItemsWrapper.h ================================================ #pragma once #include "GfxProductsWrapper.h" #include "../Engine/ObjectWrapper.h" #include "../arraywrapper.h" #include "OnlineProductWrapper.h" #include "ProductSlotWrapper.h" #include "ProductTemplateWrapper.h" #include "ProductWrapper.h" #include "attributes/ProductAttributeWrapper.h" #include "attributes/ProductAttribute_AnimatedSkinLabelWrapper.h" #include "attributes/ProductAttribute_BlueprintCostWrapper.h" #include "attributes/ProductAttribute_BlueprintWrapper.h" #include "attributes/ProductAttribute_BodyCompatibilityWrapper.h" #include "attributes/ProductAttribute_CertifiedWrapper.h" #include "attributes/ProductAttribute_CurrencyWrapper.h" #include "attributes/ProductAttribute_PaintedWrapper.h" #include "attributes/ProductAttribute_QualityWrapper.h" #include "attributes/ProductAttribute_SpecialEditionWrapper.h" #include "attributes/ProductAttribute_SpecialEditionSettingsWrapper.h" #include "attributes/ProductAttribute_TeamEditionUploadWrapper.h" #include "attributes/ProductAttribute_TeamEditionWrapper.h" #include "attributes/ProductAttribute_UnlockMethodWrapper.h" #include "dbs/CertifiedStatDatabaseWrapper.h" #include "dbs/DataAssetDatabaseWrapper.h" #include "dbs/DataAssetDatabase_ESportsTeamWrapper.h" #include "dbs/PaintDatabaseWrapper.h" #include "dbs/SpecialEditionDatabaseWrapper.h" #include "TradeWrapper.h" #include "ProductTradeInWrapper.h" #include "LoadoutWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ItemsWrapper : public ObjectWrapper { public: ItemsWrapper(std::uintptr_t gamedata, std::uintptr_t savedata); ItemsWrapper(const ItemsWrapper& other); ItemsWrapper& operator=(ItemsWrapper rhs); ~ItemsWrapper(); bool IsNull(); explicit operator bool(); ArrayWrapper GetAllProducts(); ArrayWrapper GetAllProductSlots(); ProductWrapper GetProduct(int productId); [[deprecated("Use FProductInstanceID overload")]] OnlineProductWrapper GetOnlineProduct(unsigned long long instanceID); OnlineProductWrapper GetOnlineProduct(const ProductInstanceID& product_instance_id) const; _NODISCARD static bool IsOnlineID(const ProductInstanceID& product_instance_id); _NODISCARD static int GetProductIdFromInstanceId(const ProductInstanceID& product_instance_id); [[deprecated("This will 99% for sure crash")]] ArrayWrapper GetUnlockedProducts(); ArrayWrapper GetCachedUnlockedProducts(); ArrayWrapper GetOwnedProducts(); CertifiedStatDatabaseWrapper GetCertifiedStatDB(); DataAssetDatabase_ESportsTeamWrapper GetEsportTeamDB(); PaintDatabaseWrapper GetPaintDB(); SpecialEditionDatabaseWrapper GetSpecialEditionDB(); UnrealStringWrapper GetCurrentLoadoutName(); LoadoutWrapper GetCurrentLoadout(int teamIndex); TradeWrapper GetTradeWrapper(); ProductTradeInWrapper GetProductTradeInWrapper(); _NODISCARD GfxProductsWrapper GetGfxProductsWrapper(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/LoadingProductWrapper.h ================================================ #pragma once #include "../Engine/ObjectWrapper.h" #include "../arraywrapper.h" #include "OnlineProductWrapper.h" class BAKKESMOD_PLUGIN_IMPORT LoadingProductWrapper : ObjectWrapper { public: CONSTRUCTORS(LoadingProductWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; _NODISCARD int GetProductId() const; _NODISCARD int GetProductHashId() const; _NODISCARD ArrayWrapper GetReferencedViews() const; _NODISCARD OnlineProductWrapper GetOnlineProduct() const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/LoadoutSaveWrapper.h ================================================ #pragma once #include #include "LoadoutSetWrapper.h" class BAKKESMOD_PLUGIN_IMPORT LoadoutSaveWrapper : public ObjectWrapper { public: CONSTRUCTORS(LoadoutSaveWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; _NODISCARD LoadoutSetWrapper GetPreset(const std::string& name) const; _NODISCARD LoadoutSetWrapper GetPreset(int index) const; _NODISCARD ArrayWrapper GetPresets() const; void SetPreviewTeam(int team); _NODISCARD int GetPreviewTeam() const; _NODISCARD LoadoutSetWrapper GetEquippedLoadout() const; void RenamePreset(const LoadoutSetWrapper& preset_wrapper, const std::string& new_name); void EquipPreset(const LoadoutSetWrapper& preset) const; void DeletePreset(const LoadoutSetWrapper& preset_wrapper); _NODISCARD LoadoutSetWrapper AddPreset(); void SwapPreset(const LoadoutSetWrapper& a, const LoadoutSetWrapper& b); _NODISCARD int GetIndex(const LoadoutSetWrapper& preset_wrapper) const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/LoadoutSetWrapper.h ================================================ #pragma once #include "LoadoutWrapper.h" #include "OnlineProductWrapper.h" #include "wrapperstructs.h" struct LoadoutSetData { LoadoutWrapper blue; LoadoutWrapper orange; }; class BAKKESMOD_PLUGIN_IMPORT LoadoutSetWrapper : public ObjectWrapper { public: CONSTRUCTORS(LoadoutSetWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; void CopyFrom(const LoadoutSetWrapper& other); _NODISCARD std::string GetName() const; void Rename(const std::string& new_name); void EquipProduct(const OnlineProductWrapper& online_product, int team); void EquipProduct(const ProductInstanceID& instance_id, int slot_id, int team); _NODISCARD LoadoutSetData GetLoadoutData() const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/LoadoutWrapper.h ================================================ #pragma once #include "../Engine/ObjectWrapper.h" #include "../arraywrapper.h" #include class BAKKESMOD_PLUGIN_IMPORT LoadoutWrapper : public ObjectWrapper { public: CONSTRUCTORS(LoadoutWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; ArrayWrapper GetLoadout(); [[deprecated("Missing half the data")]] ArrayWrapper GetOnlineLoadout(); _NODISCARD std::vector GetOnlineLoadoutV2() const; unsigned char GetPrimaryPaintColorId(); unsigned char GetAccentPaintColorId(); int GetPrimaryFinishId(); int GetAccentFinishId(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/OnlineProductWrapper.h ================================================ #pragma once #include "../Engine/ObjectWrapper.h" #include "../Engine/UnrealStringWrapper.h" #include "../arraywrapper.h" class ProductWrapper; class ProductAttributeWrapper; class BAKKESMOD_PLUGIN_IMPORT OnlineProductWrapper : public ObjectWrapper { public: CONSTRUCTORS(OnlineProductWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; std::string SeriesIdToSeriesName(int seriesID); _NODISCARD bool IsFavorited() const; //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS int GetProductID(); int GetSeriesID(); int GetTradeHold(); // Se wrapperstructs for the enum //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS std::string GetProductSeries(); unsigned char GetQuality(); ArrayWrapper GetAttributes(); UnrealStringWrapper GetLongLabel(); int GetBlueprintSeriesID(); unsigned char GetBlueprintType(); bool IsBlueprint(); ProductWrapper GetProduct(); bool GetIsUntradable(); [[deprecated("Missing half the data. Use GetInstanceIDV2")]] unsigned long long GetInstanceID(); _NODISCARD ProductInstanceID GetInstanceIDV2(); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/ProductPaintWrapper.h ================================================ #pragma once class BAKKESMOD_PLUGIN_IMPORT ProductPaintWrapper : public ObjectWrapper { public: CONSTRUCTORS(ProductPaintWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; _NODISCARD std::string GetLabel() const; _NODISCARD bool GetbVisible() const; _NODISCARD int GetId() const; /** * \brief Use EnumWrapper::GetPaintFinishTyp() to interpret this value * \return A enum value for the WeatherVariant */ _NODISCARD unsigned char GetFinishType() const; _NODISCARD std::vector GetColors() const; //END SELF IMPLEMENTED private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/ProductSlotWrapper.h ================================================ #pragma once #include "../Engine/ObjectWrapper.h" #include "../Engine/UnrealStringWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductSlotWrapper : public ObjectWrapper { public: CONSTRUCTORS(ProductSlotWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS ProductWrapper GetDefaultProduct() const; UnrealStringWrapper GetLabel(); UnrealStringWrapper GetPluralLabel(); UnrealStringWrapper GetDescription(); UnrealStringWrapper GetOnlineLabel(); int GetSlotIndex(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/ProductTemplateWrapper.h ================================================ #pragma once #include "../Engine/ObjectWrapper.h" class ProductWrapper; class ProductSlotWrapper; class BAKKESMOD_PLUGIN_IMPORT ProductTemplateWrapper : public ObjectWrapper { public: CONSTRUCTORS(ProductTemplateWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS ProductSlotWrapper GetSlot(); unsigned char GetUnlockMethod(); // see wrapper structs for the enum unsigned char GetQuality(); // see wrapper structs for the enum ProductWrapper GetRequiredProduct(); unsigned long GetbLicensed(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/ProductTradeInWrapper.h ================================================ #pragma once #include "bakkesmod/wrappers/Engine/ObjectWrapper.h" #include "bakkesmod/wrappers/arraywrapper.h" #include "OnlineProductWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductTradeInWrapper : public ObjectWrapper { public: CONSTRUCTORS(ProductTradeInWrapper) ArrayWrapper GetProducts() const; _NODISCARD bool IsNull() const; explicit operator bool() const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/ProductWrapper.h ================================================ #pragma once #include "ProductTemplateWrapper.h" #include "../Engine/UnrealStringWrapper.h" class ProductAttributeWrapper; class BAKKESMOD_PLUGIN_IMPORT ProductWrapper : public ProductTemplateWrapper { public: CONSTRUCTORS(ProductWrapper) //BEGIN SELF IMPLEMENTED bool IsNull(); explicit operator bool(); bool IsFavorited() const; //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS std::string GetAssetPackageName(); UnrealStringWrapper GetAssetPath(); UnrealStringWrapper GetLabel(); UnrealStringWrapper GetAsciiLabel(); UnrealStringWrapper GetLongLabel(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS bool IsPaintable(); UnrealStringWrapper GetDisplayLabelSlot(); unsigned char GetQuality(); bool IsContainerKey(); bool IsCurrency(); bool IsBlueprint(); bool IsContainerUnlocked(); bool IsContainer(); bool IsSchematic(); bool IsPlatformExclusive(); bool IsLicensed(); bool CanEquip(); ArrayWrapper GetAttributes(); UnrealStringWrapper GetSortLabel(); UnrealStringWrapper GetThumbnailAssetPath(); UnrealStringWrapper GetThumbnailPackageNameForLoad(); std::string GetThumbnailPackageName(); std::string GetThumbnailAssetName(); UnrealStringWrapper GetTrademarkLabel(); int GetID(); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/TradeWrapper.h ================================================ #pragma once #include "../Engine/ObjectWrapper.h" #include "OnlineProductWrapper.h" class BAKKESMOD_PLUGIN_IMPORT TradeWrapper : public ObjectWrapper { public: CONSTRUCTORS(TradeWrapper) struct Currency { int currency_id; int quantity; }; std::vector GetReceivingCurrency() const; std::vector GetSendingCurrency() const; ArrayWrapper GetReceivingProducts(); ArrayWrapper GetSendingProducts(); UniqueIDWrapper GetTradingPlayer() const; GUIDWrapper GetTradeGuid() const; bool IsNull(); explicit operator bool(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/assets/ProductAssetBodyWrapper.h ================================================ #pragma once #include "ProductEquipProfileWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAssetBodyWrapper : public ObjectWrapper { public: CONSTRUCTORS(ProductAssetBodyWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED _NODISCARD ProductEquipProfileWrapper GetEquipProfile() const; _NODISCARD bool CanEquip(const ProductWrapper& product_wrappper) const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/assets/ProductAssetWrapper.h ================================================ #pragma once class BAKKESMOD_PLUGIN_IMPORT ProductAssetWrapper : public ObjectWrapper { public: CONSTRUCTORS(ProductAssetWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED _NODISCARD ProductWrapper GetProduct() const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/assets/ProductEquipProfileWrapper.h ================================================ #pragma once class BAKKESMOD_PLUGIN_IMPORT ProductEquipProfileWrapper : public ObjectWrapper { public: CONSTRUCTORS(ProductEquipProfileWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED _NODISCARD std::vector GetForcedProducts() const; _NODISCARD std::vector GetDefaultProducts() const; _NODISCARD bool CanEquip(const ProductWrapper& product_wrappper) const; private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttributeWrapper.h ================================================ #pragma once #include "../../Engine/ObjectWrapper.h" #include "../../Engine/UnrealStringWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAttributeWrapper : public ObjectWrapper { public: CONSTRUCTORS(ProductAttributeWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; std::string GetAttributeType(); //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS std::string GetTypename(); UnrealStringWrapper GetLabel(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_AnimatedSkinLabelWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_AnimatedSkinLabelWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_AnimatedSkinLabelWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS UnrealStringWrapper GetAnimatedLabel(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_BlueprintCostWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_BlueprintCostWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_BlueprintCostWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS int GetCost(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_BlueprintWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_BlueprintWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_BlueprintWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS int GetProductID(); int GetCachedBlueprintSeriesID(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS UnrealStringWrapper GetSortLabel(); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_BodyCompatibilityWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" class ProductWrapper; class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_BodyCompatibilityWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_BodyCompatibilityWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS ArrayWrapper GetCompatibleBodies(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_CertifiedWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_CertifiedWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_CertifiedWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS std::string GetValueKeyName(); int GetStatId(); int GetStatValue(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS UnrealStringWrapper GetSortLabel(); UnrealStringWrapper GetDescription(); UnrealStringWrapper GetRankLabel(); int GetRank(); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_CurrencyWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_CurrencyWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_CurrencyWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS int GetCurrencyID(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS UnrealStringWrapper GetSortLabel(); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_PaintedWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_PaintedWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_PaintedWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS int GetPaintID(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS UnrealStringWrapper GetSortLabel(); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_QualityWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_QualityWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_QualityWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS unsigned char GetQuality(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS UnrealStringWrapper ProductQualityToString(unsigned char InQuality); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_SpecialEditionSettingsWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" #include struct SpecialEdition { int productId; int editionId; std::string label; }; class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_SpecialEditionSettingsWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_SpecialEditionSettingsWrapper) std::vector GetEditions(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_SpecialEditionWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_SpecialEditionWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_SpecialEditionWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS int GetEditionID(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS UnrealStringWrapper GetSortLabel(); int GetOverrideProductID(int ProductID); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_TeamEditionUploadWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_TeamEditionUploadWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_TeamEditionUploadWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS ArrayWrapper GetSupportedTeamEditions(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_TeamEditionWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_TeamEditionWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_TeamEditionWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS int GetId(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS UnrealStringWrapper GetSortLabel(); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/attributes/ProductAttribute_UnlockMethodWrapper.h ================================================ #pragma once #include "ProductAttributeWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ProductAttribute_UnlockMethodWrapper : public ProductAttributeWrapper { public: CONSTRUCTORS(ProductAttribute_UnlockMethodWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS unsigned char GetUnlockMethod(); //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/dbs/CertifiedStatDatabaseWrapper.h ================================================ #pragma once #include "../../Engine/ObjectWrapper.h" class BAKKESMOD_PLUGIN_IMPORT CertifiedStatDatabaseWrapper : public ObjectWrapper { public: CONSTRUCTORS(CertifiedStatDatabaseWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS std::string GetStatName(int StatId); int GetStatId(std::string& StatName); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/dbs/DataAssetDatabaseWrapper.h ================================================ #pragma once #include "../../Engine/ObjectWrapper.h" class BAKKESMOD_PLUGIN_IMPORT DataAssetDatabaseWrapper : public ObjectWrapper { public: CONSTRUCTORS(DataAssetDatabaseWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS std::string GetName(int DataAssetID); int GetID(std::string& DataAssetName); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/dbs/DataAssetDatabase_ESportsTeamWrapper.h ================================================ #pragma once #include "DataAssetDatabaseWrapper.h" class BAKKESMOD_PLUGIN_IMPORT DataAssetDatabase_ESportsTeamWrapper : public DataAssetDatabaseWrapper { public: CONSTRUCTORS(DataAssetDatabase_ESportsTeamWrapper) //BEGIN SELF IMPLEMENTED //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/dbs/PaintDatabaseWrapper.h ================================================ #pragma once #include "../../Engine/ObjectWrapper.h" #include "ProductPaintWrapper.h" class BAKKESMOD_PLUGIN_IMPORT PaintDatabaseWrapper : public ObjectWrapper { public: CONSTRUCTORS(PaintDatabaseWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; _NODISCARD ArrayWrapper GetPaints() const; _NODISCARD bool AddCustomPaintColor(const std::string& name, const LinearColor& color); _NODISCARD bool UpdateCustomPaintColor(const std::string& name, const LinearColor& color); //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS std::string GetPaintName(int PaintID); int GetPaintID(std::string& PaintName); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/items/dbs/SpecialEditionDatabaseWrapper.h ================================================ #pragma once #include "../../Engine/ObjectWrapper.h" class BAKKESMOD_PLUGIN_IMPORT SpecialEditionDatabaseWrapper : public ObjectWrapper { public: CONSTRUCTORS(SpecialEditionDatabaseWrapper) //BEGIN SELF IMPLEMENTED _NODISCARD bool IsNull() const; explicit operator bool() const; //END SELF IMPLEMENTED //AUTO-GENERATED FROM FIELDS //END AUTO-GENERATED FROM FIELDS //AUTO-GENERATED FROM METHODS std::string GetSpecialEditionName(int EditionID); int GetSpecialEditionId(std::string& EditionName); //END AUTO-GENERATED FROM METHODS private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/kismet/SequenceObjectWrapper.h ================================================ #pragma once #include ".././Engine/ObjectWrapper.h" class SequenceWrapper; class UnrealStringWrapper; class BAKKESMOD_PLUGIN_IMPORT SequenceObjectWrapper : public ObjectWrapper { public: CONSTRUCTORS(SequenceObjectWrapper) _NODISCARD bool IsNull() const; explicit operator bool() const; SequenceWrapper GetParentSequence(); UnrealStringWrapper GetObjName(); UnrealStringWrapper GetObjCategory(); UnrealStringWrapper GetObjComment(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/kismet/SequenceOpWrapper.h ================================================ #pragma once #include "SequenceObjectWrapper.h" class BAKKESMOD_PLUGIN_IMPORT SequenceOpWrapper : public SequenceObjectWrapper { public: CONSTRUCTORS(SequenceOpWrapper) private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/kismet/SequenceVariableWrapper.h ================================================ #pragma once #include "SequenceObjectWrapper.h" class BAKKESMOD_PLUGIN_IMPORT SequenceVariableWrapper : public SequenceObjectWrapper { public: CONSTRUCTORS(SequenceVariableWrapper) std::string GetVarName(); // Custom implementation bool IsInt(); bool IsFloat(); bool IsString(); bool IsVector(); bool IsBool(); bool IsObjectList(); bool IsActor(); float GetFloat(); int GetInt(); std::string GetString(); Vector GetVector(); bool GetBool(); ArrayWrapper GetObjectList(); void SetFloat(float value); void SetInt(int value); void SetString(const std::string& value); void SetVector(Vector value); void SetBool(bool value); ActorWrapper GetActor(); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/kismet/SequenceWrapper.h ================================================ #pragma once #include "SequenceOpWrapper.h" #include "../arraywrapper.h" #include class SequenceVariableWrapper; class BAKKESMOD_PLUGIN_IMPORT SequenceWrapper : public SequenceOpWrapper { public: CONSTRUCTORS(SequenceWrapper) ArrayWrapper GetSequenceObjects(); ArrayWrapper GetNestedSequences(); /// /// Searches this sequence recursively for RemoteEvents with the right name and activates them /// /// The name of the event to activate /// The amount of nodes activated int ActivateRemoteEvents(const std::string& remote_event_name) const; // self implemented // BFS search trough nested sequences and their contained SequenceObjects // don't think they change, so user could probably cache this.. std::map GetAllSequenceVariables(bool reqursive); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/linmath.h ================================================ #ifndef LINMATH_H #define LINMATH_H #include #define LINMATH_H_DEFINE_VEC(n) \ typedef float vec##n[n]; \ static inline void vec##n##_add(vec##n r, vec##n const a, vec##n const b) \ { \ int i; \ for(i=0; ib[i] ? a[i] : b[i]; \ } LINMATH_H_DEFINE_VEC(2) LINMATH_H_DEFINE_VEC(3) LINMATH_H_DEFINE_VEC(4) static inline float vec3_dot(vec3 const a, vec3 const b) { return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; } static inline void vec3_mul_cross(vec3 r, vec3 const a, vec3 const b) { r[0] = a[1]*b[2] - a[2]*b[1]; r[1] = a[2]*b[0] - a[0]*b[2]; r[2] = a[0]*b[1] - a[1]*b[0]; } static inline void vec3_reflect(vec3 r, vec3 const v, vec3 const n) { float p = 2.f*vec3_mul_inner(v, n); int i; for(i=0;i<3;++i) r[i] = v[i] - p*n[i]; } static inline void vec4_mul_cross(vec4 r, vec4 a, vec4 b) { r[0] = a[1]*b[2] - a[2]*b[1]; r[1] = a[2]*b[0] - a[0]*b[2]; r[2] = a[0]*b[1] - a[1]*b[0]; r[3] = 1.f; } static inline void vec4_reflect(vec4 r, vec4 v, vec4 n) { float p = 2.f*vec4_mul_inner(v, n); int i; for(i=0;i<4;++i) r[i] = v[i] - p*n[i]; } typedef vec4 mat4x4[4]; static inline void mat4x4_identity(mat4x4 M) { int i, j; for(i=0; i<4; ++i) for(j=0; j<4; ++j) M[i][j] = i==j ? 1.f : 0.f; } static inline void mat4x4_dup(mat4x4 M, mat4x4 N) { int i, j; for(i=0; i<4; ++i) for(j=0; j<4; ++j) M[i][j] = N[i][j]; } static inline void mat4x4_row(vec4 r, mat4x4 M, int i) { int k; for(k=0; k<4; ++k) r[k] = M[k][i]; } static inline void mat4x4_col(vec4 r, mat4x4 M, int i) { int k; for(k=0; k<4; ++k) r[k] = M[i][k]; } static inline void mat4x4_transpose(mat4x4 M, mat4x4 N) { int i, j; for(j=0; j<4; ++j) for(i=0; i<4; ++i) M[i][j] = N[j][i]; } static inline void mat4x4_add(mat4x4 M, mat4x4 a, mat4x4 b) { int i; for(i=0; i<4; ++i) vec4_add(M[i], a[i], b[i]); } static inline void mat4x4_sub(mat4x4 M, mat4x4 a, mat4x4 b) { int i; for(i=0; i<4; ++i) vec4_sub(M[i], a[i], b[i]); } static inline void mat4x4_scale(mat4x4 M, mat4x4 a, float k) { int i; for(i=0; i<4; ++i) vec4_scale(M[i], a[i], k); } static inline void mat4x4_scale_aniso(mat4x4 M, mat4x4 a, float x, float y, float z) { int i; vec4_scale(M[0], a[0], x); vec4_scale(M[1], a[1], y); vec4_scale(M[2], a[2], z); for(i = 0; i < 4; ++i) { M[3][i] = a[3][i]; } } static inline void mat4x4_mul(mat4x4 M, mat4x4 a, mat4x4 b) { mat4x4 temp; int k, r, c; for(c=0; c<4; ++c) for(r=0; r<4; ++r) { temp[c][r] = 0.f; for(k=0; k<4; ++k) temp[c][r] += a[k][r] * b[c][k]; } mat4x4_dup(M, temp); } static inline void mat4x4_mul_vec4(vec4 r, mat4x4 M, vec4 v) { int i, j; for(j=0; j<4; ++j) { r[j] = 0.f; for(i=0; i<4; ++i) r[j] += M[i][j] * v[i]; } } static inline void mat4x4_translate(mat4x4 T, float x, float y, float z) { mat4x4_identity(T); T[3][0] = x; T[3][1] = y; T[3][2] = z; } static inline void mat4x4_translate_in_place(mat4x4 M, float x, float y, float z) { vec4 t = {x, y, z, 0}; vec4 r; int i; for (i = 0; i < 4; ++i) { mat4x4_row(r, M, i); M[3][i] += vec4_mul_inner(r, t); } } static inline void mat4x4_from_vec3_mul_outer(mat4x4 M, vec3 a, vec3 b) { int i, j; for(i=0; i<4; ++i) for(j=0; j<4; ++j) M[i][j] = i<3 && j<3 ? a[i] * b[j] : 0.f; } static inline void mat4x4_rotate(mat4x4 R, mat4x4 M, float x, float y, float z, float angle) { float s = sinf(angle); float c = cosf(angle); vec3 u = {x, y, z}; if(vec3_len(u) > 1e-4) { vec3_norm(u, u); mat4x4 T; mat4x4_from_vec3_mul_outer(T, u, u); mat4x4 S = { { 0, u[2], -u[1], 0}, {-u[2], 0, u[0], 0}, { u[1], -u[0], 0, 0}, { 0, 0, 0, 0} }; mat4x4_scale(S, S, s); mat4x4 C; mat4x4_identity(C); mat4x4_sub(C, C, T); mat4x4_scale(C, C, c); mat4x4_add(T, T, C); mat4x4_add(T, T, S); T[3][3] = 1.; mat4x4_mul(R, M, T); } else { mat4x4_dup(R, M); } } static inline void mat4x4_rotate_X(mat4x4 Q, mat4x4 M, float angle) { float s = sinf(angle); float c = cosf(angle); mat4x4 R = { {1.f, 0.f, 0.f, 0.f}, {0.f, c, s, 0.f}, {0.f, -s, c, 0.f}, {0.f, 0.f, 0.f, 1.f} }; mat4x4_mul(Q, M, R); } static inline void mat4x4_rotate_Y(mat4x4 Q, mat4x4 M, float angle) { float s = sinf(angle); float c = cosf(angle); mat4x4 R = { { c, 0.f, s, 0.f}, { 0.f, 1.f, 0.f, 0.f}, { -s, 0.f, c, 0.f}, { 0.f, 0.f, 0.f, 1.f} }; mat4x4_mul(Q, M, R); } static inline void mat4x4_rotate_Z(mat4x4 Q, mat4x4 M, float angle) { float s = sinf(angle); float c = cosf(angle); mat4x4 R = { { c, s, 0.f, 0.f}, { -s, c, 0.f, 0.f}, { 0.f, 0.f, 1.f, 0.f}, { 0.f, 0.f, 0.f, 1.f} }; mat4x4_mul(Q, M, R); } static inline void mat4x4_invert(mat4x4 T, mat4x4 M) { float s[6]; float c[6]; s[0] = M[0][0]*M[1][1] - M[1][0]*M[0][1]; s[1] = M[0][0]*M[1][2] - M[1][0]*M[0][2]; s[2] = M[0][0]*M[1][3] - M[1][0]*M[0][3]; s[3] = M[0][1]*M[1][2] - M[1][1]*M[0][2]; s[4] = M[0][1]*M[1][3] - M[1][1]*M[0][3]; s[5] = M[0][2]*M[1][3] - M[1][2]*M[0][3]; c[0] = M[2][0]*M[3][1] - M[3][0]*M[2][1]; c[1] = M[2][0]*M[3][2] - M[3][0]*M[2][2]; c[2] = M[2][0]*M[3][3] - M[3][0]*M[2][3]; c[3] = M[2][1]*M[3][2] - M[3][1]*M[2][2]; c[4] = M[2][1]*M[3][3] - M[3][1]*M[2][3]; c[5] = M[2][2]*M[3][3] - M[3][2]*M[2][3]; /* Assumes it is invertible */ float idet = 1.0f/( s[0]*c[5]-s[1]*c[4]+s[2]*c[3]+s[3]*c[2]-s[4]*c[1]+s[5]*c[0] ); T[0][0] = ( M[1][1] * c[5] - M[1][2] * c[4] + M[1][3] * c[3]) * idet; T[0][1] = (-M[0][1] * c[5] + M[0][2] * c[4] - M[0][3] * c[3]) * idet; T[0][2] = ( M[3][1] * s[5] - M[3][2] * s[4] + M[3][3] * s[3]) * idet; T[0][3] = (-M[2][1] * s[5] + M[2][2] * s[4] - M[2][3] * s[3]) * idet; T[1][0] = (-M[1][0] * c[5] + M[1][2] * c[2] - M[1][3] * c[1]) * idet; T[1][1] = ( M[0][0] * c[5] - M[0][2] * c[2] + M[0][3] * c[1]) * idet; T[1][2] = (-M[3][0] * s[5] + M[3][2] * s[2] - M[3][3] * s[1]) * idet; T[1][3] = ( M[2][0] * s[5] - M[2][2] * s[2] + M[2][3] * s[1]) * idet; T[2][0] = ( M[1][0] * c[4] - M[1][1] * c[2] + M[1][3] * c[0]) * idet; T[2][1] = (-M[0][0] * c[4] + M[0][1] * c[2] - M[0][3] * c[0]) * idet; T[2][2] = ( M[3][0] * s[4] - M[3][1] * s[2] + M[3][3] * s[0]) * idet; T[2][3] = (-M[2][0] * s[4] + M[2][1] * s[2] - M[2][3] * s[0]) * idet; T[3][0] = (-M[1][0] * c[3] + M[1][1] * c[1] - M[1][2] * c[0]) * idet; T[3][1] = ( M[0][0] * c[3] - M[0][1] * c[1] + M[0][2] * c[0]) * idet; T[3][2] = (-M[3][0] * s[3] + M[3][1] * s[1] - M[3][2] * s[0]) * idet; T[3][3] = ( M[2][0] * s[3] - M[2][1] * s[1] + M[2][2] * s[0]) * idet; } static inline void mat4x4_orthonormalize(mat4x4 R, mat4x4 M) { mat4x4_dup(R, M); float s = 1.f; vec3 h; vec3_norm(R[2], R[2]); s = vec3_mul_inner(R[1], R[2]); vec3_scale(h, R[2], s); vec3_sub(R[1], R[1], h); vec3_norm(R[2], R[2]); s = vec3_mul_inner(R[1], R[2]); vec3_scale(h, R[2], s); vec3_sub(R[1], R[1], h); vec3_norm(R[1], R[1]); s = vec3_mul_inner(R[0], R[1]); vec3_scale(h, R[1], s); vec3_sub(R[0], R[0], h); vec3_norm(R[0], R[0]); } static inline void mat4x4_frustum(mat4x4 M, float l, float r, float b, float t, float n, float f) { M[0][0] = 2.f*n/(r-l); M[0][1] = M[0][2] = M[0][3] = 0.f; M[1][1] = 2.f*n/(t-b); M[1][0] = M[1][2] = M[1][3] = 0.f; M[2][0] = (r+l)/(r-l); M[2][1] = (t+b)/(t-b); M[2][2] = -(f+n)/(f-n); M[2][3] = -1.f; M[3][2] = -2.f*(f*n)/(f-n); M[3][0] = M[3][1] = M[3][3] = 0.f; } static inline void mat4x4_ortho(mat4x4 M, float l, float r, float b, float t, float n, float f) { M[0][0] = 2.f/(r-l); M[0][1] = M[0][2] = M[0][3] = 0.f; M[1][1] = 2.f/(t-b); M[1][0] = M[1][2] = M[1][3] = 0.f; M[2][2] = -2.f/(f-n); M[2][0] = M[2][1] = M[2][3] = 0.f; M[3][0] = -(r+l)/(r-l); M[3][1] = -(t+b)/(t-b); M[3][2] = -(f+n)/(f-n); M[3][3] = 1.f; } static inline void mat4x4_perspective(mat4x4 m, float y_fov, float aspect, float n, float f) { /* NOTE: Degrees are an unhandy unit to work with. * linmath.h uses radians for everything! */ float const a = 1.f / tanf(y_fov / 2.f); m[0][0] = a / aspect; m[0][1] = 0.f; m[0][2] = 0.f; m[0][3] = 0.f; m[1][0] = 0.f; m[1][1] = a; m[1][2] = 0.f; m[1][3] = 0.f; m[2][0] = 0.f; m[2][1] = 0.f; m[2][2] = -((f + n) / (f - n)); m[2][3] = -1.f; m[3][0] = 0.f; m[3][1] = 0.f; m[3][2] = -((2.f * f * n) / (f - n)); m[3][3] = 0.f; } static inline void mat4x4_look_at(mat4x4 m, vec3 eye, vec3 center, vec3 up) { /* Adapted from Android's OpenGL Matrix.java. */ /* See the OpenGL GLUT documentation for gluLookAt for a description */ /* of the algorithm. We implement it in a straightforward way: */ /* TODO: The negation of of can be spared by swapping the order of * operands in the following cross products in the right way. */ vec3 f; vec3_sub(f, center, eye); vec3_norm(f, f); vec3 s; vec3_mul_cross(s, f, up); vec3_norm(s, s); vec3 t; vec3_mul_cross(t, s, f); m[0][0] = s[0]; m[0][1] = t[0]; m[0][2] = -f[0]; m[0][3] = 0.f; m[1][0] = s[1]; m[1][1] = t[1]; m[1][2] = -f[1]; m[1][3] = 0.f; m[2][0] = s[2]; m[2][1] = t[2]; m[2][2] = -f[2]; m[2][3] = 0.f; m[3][0] = 0.f; m[3][1] = 0.f; m[3][2] = 0.f; m[3][3] = 1.f; mat4x4_translate_in_place(m, -eye[0], -eye[1], -eye[2]); } typedef float quat[4]; static inline void quat_identity(quat q) { q[0] = q[1] = q[2] = 0.f; q[3] = 1.f; } static inline void quat_add(quat r, quat a, quat b) { int i; for(i=0; i<4; ++i) r[i] = a[i] + b[i]; } static inline void quat_sub(quat r, quat a, quat b) { int i; for(i=0; i<4; ++i) r[i] = a[i] - b[i]; } static inline void quat_mul(quat r, quat p, quat q) { vec3 w; vec3_mul_cross(r, p, q); vec3_scale(w, p, q[3]); vec3_add(r, r, w); vec3_scale(w, q, p[3]); vec3_add(r, r, w); r[3] = p[3]*q[3] - vec3_mul_inner(p, q); } static inline void quat_scale(quat r, quat v, float s) { int i; for(i=0; i<4; ++i) r[i] = v[i] * s; } static inline float quat_inner_product(quat a, quat b) { float p = 0.f; int i; for(i=0; i<4; ++i) p += b[i]*a[i]; return p; } static inline void quat_conj(quat r, quat q) { int i; for(i=0; i<3; ++i) r[i] = -q[i]; r[3] = q[3]; } static inline void quat_rotate(quat r, float angle, vec3 axis) { vec3 v; vec3_scale(v, axis, sinf(angle / 2)); int i; for(i=0; i<3; ++i) r[i] = v[i]; r[3] = cosf(angle / 2); } #define quat_norm vec4_norm static inline void quat_mul_vec3(vec3 r, quat q, vec3 v) { /* * Method by Fabian 'ryg' Giessen (of Farbrausch) t = 2 * cross(q.xyz, v) v' = v + q.w * t + cross(q.xyz, t) */ vec3 t; vec3 q_xyz = {q[0], q[1], q[2]}; vec3 u = {q[0], q[1], q[2]}; vec3_mul_cross(t, q_xyz, v); vec3_scale(t, t, 2); vec3_mul_cross(u, q_xyz, t); vec3_scale(t, t, q[3]); vec3_add(r, v, t); vec3_add(r, r, u); } static inline void mat4x4_from_quat(mat4x4 M, quat q) { float a = q[3]; float b = q[0]; float c = q[1]; float d = q[2]; float a2 = a*a; float b2 = b*b; float c2 = c*c; float d2 = d*d; M[0][0] = a2 + b2 - c2 - d2; M[0][1] = 2.f*(b*c + a*d); M[0][2] = 2.f*(b*d - a*c); M[0][3] = 0.f; M[1][0] = 2*(b*c - a*d); M[1][1] = a2 - b2 + c2 - d2; M[1][2] = 2.f*(c*d + a*b); M[1][3] = 0.f; M[2][0] = 2.f*(b*d + a*c); M[2][1] = 2.f*(c*d - a*b); M[2][2] = a2 - b2 - c2 + d2; M[2][3] = 0.f; M[3][0] = M[3][1] = M[3][2] = 0.f; M[3][3] = 1.f; } static inline void mat4x4o_mul_quat(mat4x4 R, mat4x4 M, quat q) { /* XXX: The way this is written only works for othogonal matrices. */ /* TODO: Take care of non-orthogonal case. */ quat_mul_vec3(R[0], q, M[0]); quat_mul_vec3(R[1], q, M[1]); quat_mul_vec3(R[2], q, M[2]); R[3][0] = R[3][1] = R[3][2] = 0.f; R[3][3] = 1.f; } static inline void quat_from_mat4x4(quat q, mat4x4 M) { float r=0.f; int i; int perm[] = { 0, 1, 2, 0, 1 }; int *p = perm; for(i = 0; i<3; i++) { float m = M[i][i]; if( m < r ) continue; m = r; p = &perm[i]; } r = sqrtf(1.f + M[p[0]][p[0]] - M[p[1]][p[1]] - M[p[2]][p[2]] ); if(r < 1e-6) { q[0] = 1.f; q[1] = q[2] = q[3] = 0.f; return; } q[0] = r/2.f; q[1] = (M[p[0]][p[1]] - M[p[1]][p[0]])/(2.f*r); q[2] = (M[p[2]][p[0]] - M[p[0]][p[2]])/(2.f*r); q[3] = (M[p[2]][p[1]] - M[p[1]][p[2]])/(2.f*r); } #endif ================================================ FILE: include/bakkesmod/wrappers/modals/ModalWrapper.h ================================================ #pragma once #include "../Engine/ObjectWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ModalWrapper : public ObjectWrapper { public: CONSTRUCTORS(ModalWrapper) void ShowModal() const; void CloseModal(); void SetColor(float r, float g, float b); void SetIcon(const std::string& iconName); void SetBody(const std::string& bodyHtml); void AddButton(const std::string& button_text, bool is_cancel_button, std::function click_callback = nullptr); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/modals/TextInputModalWrapper.h ================================================ #pragma once #include "ModalWrapper.h" class BAKKESMOD_PLUGIN_IMPORT TextInputModalWrapper : public ModalWrapper { public: CONSTRUCTORS(TextInputModalWrapper) void SetTextInput(const std::string& defaultText, int32_t max_text_length, bool password, std::function input_callback); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/replaywrapper.h ================================================ #pragma once #include "./GameEvent/ServerWrapper.h" class BAKKESMOD_PLUGIN_IMPORT ReplayWrapper : public ServerWrapper { public: ReplayWrapper(std::uintptr_t server, std::uintptr_t gameinfo, std::uintptr_t replaydirector); ReplayWrapper(const ReplayWrapper& other); ReplayWrapper& operator=(ReplayWrapper rhs); ~ReplayWrapper(); ActorWrapper GetViewTarget(); float GetReplayTimeElapsed(); int GetReplayFPS(); int GetCurrentReplayFrame(); void AddKeyFrame(int frame, string name); void RemoveKeyFrame(int frame); void SkipToFrame(int frame); void SkipToTime(float time); void StartPlaybackAtFrame(int frame); void StartPlaybackAtTime(float time); private: PIMPL }; ================================================ FILE: include/bakkesmod/wrappers/wrapperstructs.h ================================================ #pragma once //#include "../shared.h" #include "linmath.h" #include #include #include #include "../core/compiler_toggles.h" #include "bakkesmod/plugin/bakkesmodsdk.h" #ifndef CONST_RadToUnrRot #define CONST_RadToUnrRot 10430.3783504704527f #endif #ifndef CONST_UnrRotToRad #define CONST_UnrRotToRad 0.00009587379924285f #endif #ifndef CONST_DegToUnrRot #define CONST_DegToUnrRot 182.0444f #endif #ifndef CONST_PI_D #define CONST_PI_D 3.14159265358979323846 #endif #ifndef CONST_PI_F #define CONST_PI_F 3.1415926f #endif enum ToastType { ToastType_Info = 0, ToastType_OK = 1, ToastType_Warning = 2, ToastType_Error = 3 }; #pragma pack ( push, 0x8 ) struct FVector; struct FRotator; // #Vector //Forward declarations of Vector non-member operator overloads struct Vector; inline Vector operator+(const Vector v1, const Vector v2); inline Vector operator-(const Vector v1, const Vector v2); inline Vector operator*(const Vector v1, const Vector v2); inline Vector operator/(const Vector v1, const Vector v2); inline Vector operator+(const Vector v1, const float f); inline Vector operator-(const Vector v1, const float f); inline Vector operator*(const Vector v1, const float f); inline Vector operator/(const Vector v1, const float f); struct Vector { float X, Y, Z; Vector(FVector v); Vector(float x, float y, float z) : X(x), Y(y), Z(z) {} Vector(float def) : X(def), Y(def), Z(def) {} Vector() : Vector(0.0) {} operator FVector(); explicit operator FVector() const; //Vector member operator overloads inline Vector operator+=(const Vector v2) { X += v2.X; Y += v2.Y; Z += v2.Z; return *this; } inline Vector operator-=(const Vector v2) { X -= v2.X; Y -= v2.Y; Z -= v2.Z; return *this; } inline Vector operator*=(const Vector v2) { X *= v2.X; Y *= v2.Y; Z *= v2.Z; return *this; } inline Vector operator/=(const Vector v2) { X /= v2.X; Y /= v2.Y; Z /= v2.Z; return *this; } inline Vector operator+=(const float f) { X += f; Y += f; Z += f; return *this; } inline Vector operator-=(const float f) { X -= f; Y -= f; Z -= f; return *this; } inline Vector operator*=(const float f) { X *= f; Y *= f; Z *= f; return *this; } inline Vector operator/=(const float f) { X /= f; Y /= f; Z /= f; return *this; } inline float magnitude() const { return sqrtf(X * X + Y * Y + Z * Z); } inline void normalize() { float magnitudez = magnitude(); X = X / magnitudez; Y = Y / magnitudez; Z = Z / magnitudez; } inline Vector getNormalized() { Vector normalized = *this; normalized.normalize(); return normalized; } inline Vector clone() const { return Vector(X, Y, Z); } static inline float dot(const Vector v1, const Vector v2) { return v1.X * v2.X + v1.Y * v2.Y + v1.Z * v2.Z; } static inline Vector cross(const Vector v1, const Vector v2) { float x = v1.Y * v2.Z - v1.Z * v2.Y; float y = v1.Z * v2.X - v1.X * v2.Z; float z = v1.X * v2.Y - v1.Y * v2.X; return Vector(x, y, z); } static inline Vector lerp(const Vector v1, const Vector v2, const float t) { float x = (1.0f - t) * v1.X + t * v2.X; float y = (1.0f - t) * v1.Y + t * v2.Y; float z = (1.0f - t) * v1.Z + t * v2.Z; return Vector(x, y, z); } static inline Vector slerp(const Vector v1, const Vector v2, const float t) { Vector a = v1.clone(); Vector b = v2.clone(); float dot = Vector::dot(a, b); float theta = acosf(dot) * t; Vector relVector = b - (a * dot); relVector.normalize(); float cosTheta = cosf(theta); float sinTheta = sinf(theta); return a * cosTheta + relVector * sinTheta; } }; //Vector non-member operator overloads inline Vector operator+(const Vector v1, const Vector v2) { return Vector(v1.X + v2.X, v1.Y + v2.Y, v1.Z + v2.Z); } inline Vector operator-(const Vector v1, const Vector v2) { return Vector(v1.X - v2.X, v1.Y - v2.Y, v1.Z - v2.Z); } inline Vector operator*(const Vector v1, const Vector v2) { return Vector(v1.X * v2.X, v1.Y * v2.Y, v1.Z * v2.Z); } inline Vector operator/(const Vector v1, const Vector v2) { return Vector(v1.X / v2.X, v1.Y / v2.Y, v1.Z / v2.Z); } inline Vector operator+(const Vector v1, const float f) { return Vector(v1.X + f, v1.Y + f, v1.Z + f); } inline Vector operator-(const Vector v1, const float f) { return Vector(v1.X - f, v1.Y - f, v1.Z - f); } inline Vector operator*(const Vector v1, const float f) { return Vector(v1.X * f, v1.Y * f, v1.Z * f); } inline Vector operator/(const Vector v1, const float f) { return Vector(v1.X / f, v1.Y / f, v1.Z / f); } // #Rotator //Forward declarations of Rotator non-member operator overloads struct Rotator; inline Rotator operator+(const Rotator r1, const Rotator r2); inline Rotator operator-(const Rotator r1, const Rotator r2); inline Rotator operator*(const Rotator r1, const Rotator r2); inline Rotator operator/(const Rotator r1, const Rotator r2); struct Rotator { int Pitch, Yaw, Roll; //Player rotation Min(-16364, -32768, -32768) //Player rotation Max(16340, 32764, 32764) Rotator(FRotator r); Rotator(int pitch, int yaw, int roll) : Pitch(pitch), Yaw(yaw), Roll(roll) {} Rotator(int def) : Pitch(def), Yaw(def), Roll(def) {} Rotator() : Rotator(0) {} operator FRotator(); explicit operator FRotator() const; inline Rotator operator+=(const Rotator r2) { Pitch += r2.Pitch; Yaw += r2.Yaw; Roll += r2.Roll; return *this; } inline Rotator operator-=(const Rotator r2) { Pitch -= r2.Pitch; Yaw -= r2.Yaw; Roll -= r2.Roll; return *this; } inline Rotator operator*=(const Rotator r2) { Pitch *= r2.Pitch; Yaw *= r2.Yaw; Roll *= r2.Roll; return *this; } inline Rotator operator/=(const Rotator r2) { Pitch /= r2.Pitch; Yaw /= r2.Yaw; Roll /= r2.Roll; return *this; } }; static inline int fixRotator(int newRotation) {// F THIS FOR NOW return newRotation; //newRotation = (((int)newRotation + 32768) % (32768 + 32764)) - 32768; //newRotation = (((int)newRotation - 32764) % (32768 + 32764)) + 32764; ////if (newRotation >= 32767) { //// newRotation -= 65535; //// //newRotation = -32767 + (newRotation - 32767); ////} ////else if (newRotation <= -32767) { //-35000 //// newRotation += 65535; //// //newRotation = 32767 + (newRotation + 32767); ////} //return newRotation; } static inline int fixPitch(int newRotation) {// F THIS FOR NOW return newRotation; //newRotation = (((int)newRotation + 16384) % (32768)) - 16384; //newRotation = (((int)newRotation - 16384) % (32768)) + 16384; ////if (newRotation >= 16383) { //// newRotation -= 32767; //// //newRotation = -16383 + (newRotation - 16383); ////} ////else if (newRotation <= -16383) { //-35000 //// newRotation += 32767; //// //newRotation = 16383 + (newRotation + 16383); ////} //return newRotation; } //Rotator non-member operator overloads inline Rotator operator+(const Rotator r1, const Rotator r2) { return Rotator(fixPitch(r1.Pitch + r2.Pitch), fixRotator(r1.Yaw + r2.Yaw), fixRotator(r1.Roll + r2.Roll)); } inline Rotator operator-(const Rotator r1, const Rotator r2) { return Rotator(fixPitch(r1.Pitch - r2.Pitch), fixRotator(r1.Yaw - r2.Yaw), fixRotator(r1.Roll - r2.Roll)); } inline Rotator operator*(const Rotator r1, const Rotator r2) { return Rotator(fixPitch(r1.Pitch * r2.Pitch), fixRotator(r1.Yaw * r2.Yaw), fixRotator(r1.Roll * r2.Roll)); } inline Rotator operator/(const Rotator r1, const Rotator r2) { return Rotator(fixPitch(r1.Pitch / r2.Pitch), fixRotator(r1.Yaw / r2.Yaw), fixRotator(r1.Roll / r2.Roll)); } // #VectorRotatorConversions static Rotator inline VectorToRotator(const Vector vVector) { Rotator rRotation; rRotation.Yaw = static_cast(atan2(vVector.Y, vVector.X) * CONST_RadToUnrRot); rRotation.Pitch = static_cast(atan2(vVector.Z, sqrtf(vVector.X * vVector.X + vVector.Y * vVector.Y)) * CONST_RadToUnrRot); rRotation.Roll = 0; return rRotation; } static inline Vector RotatorToVector(const Rotator R) { Vector vec; float fYaw = R.Yaw * static_cast(CONST_UnrRotToRad); float fPitch = R.Pitch * static_cast(CONST_UnrRotToRad); float CosPitch = cosf(fPitch); vec.X = cosf(fYaw) * CosPitch; vec.Y = sinf(fYaw) * CosPitch; vec.Z = sinf(fPitch); return vec; } // #Quat //Forward declaration of Quat non-member operator overload struct Quat; inline Quat operator*(const Quat q1, const Quat q2); struct Quat { float X, Y, Z, W; Quat(float w, float x, float y, float z) : W(w), X(x), Y(y), Z(z) {} Quat() : Quat(1.0, 0.0, 0.0, 0.0) {} inline Quat conjugate() const { return Quat(W, -X, -Y, -Z); } inline Quat normalize() { float mag = sqrtf(X*X + Y*Y + Z*Z + W*W); X /= mag; Y /= mag; Z /= mag; return *this; } inline Quat operator*=(const Quat q2) { float mulW = W * q2.W; mulW -= X * q2.X; mulW -= Y * q2.Y; mulW -= Z * q2.Z; float mulX = W * q2.X; mulX += X * q2.W; mulX += Y * q2.Z; mulX -= Z * q2.Y; float mulY = W * q2.Y; mulY -= X * q2.Z; mulY += Y * q2.W; mulY += Z * q2.X; float mulZ = W * q2.Z; mulZ += X * q2.Y; mulZ -= Y * q2.X; mulZ += Z * q2.W; W = mulW; X = mulX; Y = mulY; Z = mulZ; return *this; } }; //Quat non-member operator overload inline Quat operator*(const Quat q1, const Quat q2) { float mulW = q1.W * q2.W; mulW -= q1.X * q2.X; mulW -= q1.Y * q2.Y; mulW -= q1.Z * q2.Z; float mulX = q1.W * q2.X; mulX += q1.X * q2.W; mulX += q1.Y * q2.Z; mulX -= q1.Z * q2.Y; float mulY = q1.W * q2.Y; mulY -= q1.X * q2.Z; mulY += q1.Y * q2.W; mulY += q1.Z * q2.X; float mulZ = q1.W * q2.Z; mulZ += q1.X * q2.Y; mulZ -= q1.Y * q2.X; mulZ += q1.Z * q2.W; return Quat(mulW, mulX, mulY, mulZ); } static inline Quat QuatSlerp(const Quat q1, const Quat q2, float percent) { //percent range: 0-1 //https://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/index.htm float dot = q1.W*q2.W + q1.X*q2.X + q1.Y*q2.Y + q1.Z*q2.Z; // if qa=qb or qa=-qb then theta = 0 and we can return qa if (abs(dot) >= 1.f) { return q1; } // Calculate temporary values. float halfTheta = acosf(dot); float sinHalfTheta = sqrtf(1.f - dot*dot); // if theta = 180 degrees then result is not fully defined // we could rotate around any axis normal to qa or qb if (fabsf(sinHalfTheta) < 0.001f) { Quat q; q.W = q1.W * 0.5f + q2.W * 0.5f; q.X = q1.X * 0.5f + q2.X * 0.5f; q.Y = q1.Y * 0.5f + q2.Y * 0.5f; q.Z = q1.Z * 0.5f + q2.Z * 0.5f; return q; } float ratioA = sinf((1.f - percent) * halfTheta) / sinHalfTheta; float ratioB = sinf(percent * halfTheta) / sinHalfTheta; Quat q; q.W = (q1.W * ratioA + q2.W * ratioB); q.X = (q1.X * ratioA + q2.X * ratioB); q.Y = (q1.Y * ratioA + q2.Y * ratioB); q.Z = (q1.Z * ratioA + q2.Z * ratioB); return q; } // #RotateVector static inline Vector RotateVectorWithQuat(const Vector v, const Quat q) { Quat p = Quat(0 ,v.X ,v.Y ,v.Z); Quat result = (q * p) * q.conjugate(); return Vector{result.X, result.Y, result.Z}; } // #RotatorQuatConversions static inline Quat RotatorToQuat(const Rotator rot) { float rotatorToRadian = ((CONST_PI_F / 180.f) * .5f) / CONST_DegToUnrRot; float sinPitch = sinf(rot.Pitch * rotatorToRadian); float cosPitch = cosf(rot.Pitch * rotatorToRadian); float sinYaw = sinf(rot.Yaw * rotatorToRadian); float cosYaw = cosf(rot.Yaw * rotatorToRadian); float sinRoll = sinf(rot.Roll * rotatorToRadian); float cosRoll = cosf(rot.Roll * rotatorToRadian); Quat convertedQuat; convertedQuat.X = (cosRoll * sinPitch * sinYaw) - (sinRoll * cosPitch * cosYaw); convertedQuat.Y = (-cosRoll * sinPitch * cosYaw) - (sinRoll * cosPitch * sinYaw); convertedQuat.Z = (cosRoll * cosPitch * sinYaw) - (sinRoll * sinPitch * cosYaw); convertedQuat.W = (cosRoll * cosPitch * cosYaw) + (sinRoll * sinPitch * sinYaw); return convertedQuat; } static inline Rotator QuatToRotator(const Quat q) { //From Arator's HelperFunctions Vector fwd = RotateVectorWithQuat(Vector(1, 0, 0), q); Vector right = RotateVectorWithQuat(Vector(0, 1, 0), q); Vector up = RotateVectorWithQuat(Vector(0, 0, 1), q); fwd.normalize(); right.normalize(); up.normalize(); //Pitch float pitch_f = asinf(fwd.Z); int PITCH = static_cast((pitch_f / (CONST_PI_F / 2.f)) * 16384.f); //Yaw float hor_mag = sqrtf(fwd.X * fwd.X + fwd.Y * fwd.Y); float fwd_y = asinf(fwd.Y / hor_mag); if (fwd_y >= 0) { if (fwd.X < 0) fwd_y = CONST_PI_F - fwd_y; } else { if (fwd.X < 0) fwd_y = -CONST_PI_F - fwd_y; } int YAW = static_cast((fwd_y / CONST_PI_F) * 32768.f); //Roll Vector vert = (up.Z < 0) ? Vector(0, 0, -1) : Vector(0, 0, 1); Vector hor_right = Vector::cross(fwd, vert) * -1;// left-handed coordinate system hor_right.normalize(); float roll_cos = Vector::dot(hor_right, right); float roll_f = acosf(roll_cos); float up_f = asinf(up.Z); if (right.Z >= 0) { if (up.Z >= 0) roll_f = -roll_f; else roll_f = -CONST_PI_F + roll_f; } else { if (up.Z < 0) roll_f = CONST_PI_F - roll_f; } int ROLL = static_cast((roll_f / CONST_PI_F) * 32768.f); return Rotator(PITCH, YAW, ROLL); } // #Vector2 //Forward declarations of Vector2 non-member operator overloads struct Vector2; inline Vector2 operator+(const Vector2 v1, const Vector2 v2); inline Vector2 operator-(const Vector2 v1, const Vector2 v2); inline Vector2 operator*(const Vector2 v1, const Vector2 v2); inline Vector2 operator/(const Vector2 v1, const Vector2 v2); inline Vector2 operator+(const Vector2 v1, const int i); inline Vector2 operator-(const Vector2 v1, const int i); inline Vector2 operator*(const Vector2 v1, const int i); inline Vector2 operator/(const Vector2 v1, const int i); struct Vector2 { int X, Y; Vector2 minus(const Vector2 other) const { return{ X - other.X, Y - other.Y }; } inline Vector2 operator+=(const Vector2 v2) { X += v2.X; Y += v2.Y; return *this; } inline Vector2 operator-=(const Vector2 v2) { X -= v2.X; Y -= v2.Y; return *this; } inline Vector2 operator*=(const Vector2 v2) { X *= v2.X; Y *= v2.Y; return *this; } inline Vector2 operator/=(const Vector2 v2) { X /= v2.X; Y /= v2.Y; return *this; } inline Vector2 operator+=(const int i) { X += i; Y += i; return *this; } inline Vector2 operator-=(const int i) { X -= i; Y -= i; return *this; } inline Vector2 operator*=(const int i) { X *= i; Y *= i; return *this; } inline Vector2 operator/=(const int i) { X /= i; Y /= i; return *this; } }; //Vector2 non-member operator overloads inline Vector2 operator+(const Vector2 v1, const Vector2 v2) { return Vector2{v1.X + v2.X, v1.Y + v2.Y}; } inline Vector2 operator-(const Vector2 v1, const Vector2 v2) { return Vector2{v1.X - v2.X, v1.Y - v2.Y}; } inline Vector2 operator*(const Vector2 v1, const Vector2 v2) { return Vector2{v1.X * v2.X, v1.Y * v2.Y}; } inline Vector2 operator/(const Vector2 v1, const Vector2 v2) { return Vector2{v1.X / v2.X, v1.Y / v2.Y}; } inline Vector2 operator+(const Vector2 v1, const int i) { return Vector2{v1.X + i, v1.Y + i}; } inline Vector2 operator-(const Vector2 v1, const int i) { return Vector2{v1.X - i, v1.Y - i}; } inline Vector2 operator*(const Vector2 v1, const int i) { return Vector2{v1.X * i, v1.Y * i}; } inline Vector2 operator/(const Vector2 v1, const int i) { return Vector2{v1.X / i, v1.Y / i}; } // #Vector2F //Forward declarations of Vector2F non-member operator overloads struct Vector2F; inline Vector2F operator+(const Vector2F v1, const Vector2 v2); inline Vector2F operator-(const Vector2F v1, const Vector2 v2); inline Vector2F operator*(const Vector2F v1, const Vector2 v2); inline Vector2F operator/(const Vector2F v1, const Vector2 v2); inline Vector2F operator+(const Vector2F v1, const Vector2F v2); inline Vector2F operator-(const Vector2F v1, const Vector2F v2); inline Vector2F operator*(const Vector2F v1, const Vector2F v2); inline Vector2F operator/(const Vector2F v1, const Vector2F v2); inline Vector2F operator+(const Vector2F v1, const float f); inline Vector2F operator-(const Vector2F v1, const float f); inline Vector2F operator*(const Vector2F v1, const float f); inline Vector2F operator/(const Vector2F v1, const float f); struct Vector2F { float X, Y; Vector2F minus(const Vector2 other) const { return{ X - static_cast(other.X), Y - static_cast(other.Y) }; } Vector2F minus(const Vector2F other) const { return{ X - other.X, Y - other.Y }; } inline Vector2F operator+=(const Vector2 v2) { X += v2.X; Y += v2.Y; return *this; } inline Vector2F operator-=(const Vector2 v2) { X -= v2.X; Y -= v2.Y; return *this; } inline Vector2F operator*=(const Vector2 v2) { X *= v2.X; Y *= v2.Y; return *this; } inline Vector2F operator/=(const Vector2 v2) { X /= v2.X; Y /= v2.Y; return *this; } inline Vector2F operator+=(const Vector2F v2) { X += v2.X; Y += v2.Y; return *this; } inline Vector2F operator-=(const Vector2F v2) { X -= v2.X; Y -= v2.Y; return *this; } inline Vector2F operator*=(const Vector2F v2) { X *= v2.X; Y *= v2.Y; return *this; } inline Vector2F operator/=(const Vector2F v2) { X /= v2.X; Y /= v2.Y; return *this; } inline Vector2F operator+=(const float f) { X += f; Y += f; return *this; } inline Vector2F operator-=(const float f) { X -= f; Y -= f; return *this; } inline Vector2F operator*=(const float f) { X *= f; Y *= f; return *this; } inline Vector2F operator/=(const float f) { X /= f; Y /= f; return *this; } }; //Vector2F non-member operator overloads inline Vector2F operator+(const Vector2F v1, const Vector2 v2) { return Vector2F{v1.X + v2.X, v1.Y + v2.Y}; } inline Vector2F operator-(const Vector2F v1, const Vector2 v2) { return Vector2F{v1.X - v2.X, v1.Y - v2.Y}; } inline Vector2F operator*(const Vector2F v1, const Vector2 v2) { return Vector2F{v1.X * v2.X, v1.Y * v2.Y}; } inline Vector2F operator/(const Vector2F v1, const Vector2 v2) { return Vector2F{v1.X / v2.X, v1.Y / v2.Y}; } inline Vector2F operator+(const Vector2F v1, const Vector2F v2) { return Vector2F{v1.X + v2.X, v1.Y + v2.Y}; } inline Vector2F operator-(const Vector2F v1, const Vector2F v2) { return Vector2F{v1.X - v2.X, v1.Y - v2.Y}; } inline Vector2F operator*(const Vector2F v1, const Vector2F v2) { return Vector2F{v1.X * v2.X, v1.Y * v2.Y}; } inline Vector2F operator/(const Vector2F v1, const Vector2F v2) { return Vector2F{v1.X / v2.X, v1.Y / v2.Y}; } inline Vector2F operator+(const Vector2F v1, const float f) { return Vector2F{v1.X + f, v1.Y + f}; } inline Vector2F operator-(const Vector2F v1, const float f) { return Vector2F{v1.X - f, v1.Y - f}; } inline Vector2F operator*(const Vector2F v1, const float f) { return Vector2F{v1.X * f, v1.Y * f}; } inline Vector2F operator/(const Vector2F v1, const float f) { return Vector2F{v1.X / f, v1.Y / f}; } // #LinearColor //Forward declarations of LinearColor non-member operator overloads struct LinearColor; struct FLinearColor; inline LinearColor operator*(const LinearColor c1, const float f); inline LinearColor operator/(const LinearColor c1, const float f); inline bool operator==(const LinearColor c1, const LinearColor c2); struct LinearColor { LinearColor() = default; explicit LinearColor(const FLinearColor& r); LinearColor(float r, float g, float b, float a): R{r},G{g},B{b},A{a} {} explicit operator FLinearColor() const; float R, G, B, A; inline LinearColor operator*=(const float f) { R *= f; G *= f; B *= f; A *= f; return *this; } inline LinearColor operator/=(const float f) { R /= f; G /= f; B /= f; A /= f; return *this; } }; //LinearColor non-member operator overloads inline LinearColor operator*(const LinearColor c1, const float f) { return LinearColor{c1.R * f, c1.G * f, c1.B * f, c1.A * f}; } inline LinearColor operator/(const LinearColor c1, const float f) { return LinearColor{c1.R / f, c1.G / f, c1.B / f, c1.A / f}; } inline bool operator==(const LinearColor c1, const LinearColor c2) { return c1.R == c2.R && c1.G == c2.G && c1.B == c2.B && c1.A == c2.A; } inline bool operator!=(const LinearColor c1, const LinearColor c2) { return !(c1 == c2); } // #OtherStructs struct PredictionInfo { float Time; float ArchTopTime; Vector Location; Vector Velocity; Vector ArchTop; Vector ArchTopVelocity; unsigned long bHitWall : 1; unsigned long bHitGround : 1; }; struct SteamID { unsigned long long ID; }; struct SkillRating { float Mu; float Sigma; }; struct SkillRank { int Tier; int Division; int MatchesPlayed; }; struct FColor; struct UnrealColor { unsigned char B; unsigned char G; unsigned char R; unsigned char A; UnrealColor() = default; explicit UnrealColor(const FColor& other); explicit operator FColor() const; UnrealColor(unsigned char b, unsigned char g, unsigned char r, unsigned char a): B{b}, G{g}, R{r}, A{a} {} DEFAULTEQUALITY(UnrealColor) DEFAULTCOMPARE(UnrealColor) }; struct ControllerInput { float Throttle = .0f; float Steer = .0f; float Pitch = .0f; float Yaw = .0f; float Roll = .0f; float DodgeForward = .0f; float DodgeStrafe = .0f; unsigned long Handbrake : 1; unsigned long Jump :1; unsigned long ActivateBoost : 1; unsigned long HoldingBoost : 1; unsigned long Jumped : 1; }; struct RecordedSample { float Low; float High; }; struct POV { Vector location; Rotator rotation; float FOV; }; struct ViewTarget { void* Target; // ActorWrapper(Target) void* Controller; // PlayerControllerWrapper(Controller) struct POV POV; // float AspectRatio; // void* PRI; // PRIWrapper(PRI) }; struct CameraSave { bool InvertSwivelPitch; bool CameraShake; }; struct FProfileCameraSettings; struct ProfileCameraSettings { ProfileCameraSettings() = default; explicit ProfileCameraSettings(const FProfileCameraSettings& other); explicit operator FProfileCameraSettings() const; float FOV; float Height; float Pitch; float Distance; float Stiffness; float SwivelSpeed; float TransitionSpeed; }; struct GamepadSettings { float ControllerDeadzone; float DodgeInputThreshold; float SteeringSensitivity; float AirControlSensitivity; }; struct RBState { Quat Quaternion; Vector Location; Vector LinearVelocity; Vector AngularVelocity; float Time; unsigned long bSleeping : 1; unsigned long bNewData : 1; }; struct WorldContactData { unsigned long bHasContact : 1; Vector Location; Vector Velocity; Vector Normal; }; struct StickyForceData { float Ground; float Wall; }; struct WheelContactData { unsigned long bHasContact : 1; unsigned long bHasContactWithWorldGeometry : 1; float HasContactChangeTime; void* Actor; void* Component; Vector Location; Vector Normal; Vector LatDirection; Vector LongDirection; void* PhysMatProp; }; struct ReplayScoreData { uintptr_t ScoredBy; //PriWrapper uintptr_t AssistedBy; //PriWrapper float Speed; float Time; unsigned char ScoreTeam; }; struct VideoSettings { bool bVsync; bool bShowWeatherFX; bool bShowLightShafts; bool bTranslucentArenaShaders; bool bShowLensFlares; bool bEnableHDRSideBySideVisualizer; bool bUncappedFramerate; float HDRBrightnessScale; float HDRPaperWhiteScale; float HDRGammaScale; int WindowMode; std::string Resolution; int MaxFPS; std::map VideoOptions; }; struct ProductInstanceID { unsigned long long upper_bits; unsigned long long lower_bits; friend bool operator==(const ProductInstanceID& lhs, const ProductInstanceID& rhs) { return lhs.upper_bits == rhs.upper_bits && lhs.lower_bits == rhs.lower_bits; } friend bool operator!=(const ProductInstanceID& lhs, const ProductInstanceID& rhs) { return !(lhs == rhs); } }; struct BAKKESMOD_PLUGIN_IMPORT GUIDWrapper { GUIDWrapper() = default; GUIDWrapper(int32_t a, int32_t b, int32_t c, int32_t d); explicit GUIDWrapper(const struct FGuid& guid); static GUIDWrapper Create(); enum class EGuidFormats : uint8_t { Digits = 0, // Example: 00000000000000000000000000000000 DigitsWithHyphens = 1, // Example: 00000000-0000-0000-0000-000000000000 DigitsWithHyphensInBraces = 2, // Example: {00000000-0000-0000-0000-000000000000} DigitsWithHyphensInParentheses = 3, // Example: (00000000-0000-0000-0000-000000000000) HexValuesInBraces = 4, // Example: {0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} UniqueObjectGuid = 5, // Example: 00000000-00000000-00000000-00000000 }; int32_t A = 0, B = 0, C = 0, D = 0; bool IsValid() const; std::string ToString(EGuidFormats format = EGuidFormats::UniqueObjectGuid) const; }; struct TrainingRoundProgress { int RoundNumber; unsigned char Status; //See: EnumWrapper::GetTrainingRoundAttempts unsigned char Padding[0x3]; }; // #Enums enum TRADEHOLD { TRADEHOLD_P2P = -2, TRADEHOLD_ALL = -1, TRADEHOLD_NONE = 0, }; enum [[deprecated("Not guaranteed to be up to date, use EnumWrapper::GetProductQualities() to future proof your code.")]] PRODUCTQUALITY { Common = 0, Uncommon = 1, Rare = 2, VeryRare = 3, Import = 4, Exotic = 5, BlackMarket = 6, Premium = 7, Limited = 8, Legacy = 9, MAX = 10 }; enum [[deprecated("Not guaranteed to be up to date, use EnumWrapper::GetUnlockMethods() to future proof your code.")]] UNLOCKMETHOD { Default = 0, Drop = 1, Special = 2, Reward = 3, DLC = 4, Never = 5, MAX_ = 6 }; enum [[deprecated("Not guaranteed to be up to date, use the ProductWrappers to future proof your code.")]] CARBODY { CAR_BACKFIRE = 21, CAR_BREAKOUT = 22, CAR_BREAKOUTTYPES = 1416, CAR_OCTANE = 23, CAR_OCTANEZSR = 1568, CAR_PALADIN = 24, CAR_ROADHOG = 25, CAR_ROADHOGXL = 1300, CAR_GIZMO = 26, CAR_SWEETTOOTH = 27, //Will just spawn merc i guess, ps4 exclusive CAR_XDEVIL = 28, CAR_XDEVILMK2 = 1159, CAR_HOTSHOT = 29, CAR_MERC = 30, CAR_VENOM = 31, CAR_TAKUMI = 402, CAR_TAKUMIRXT = 1295, CAR_DOMINUS = 403, CAR_DOMINUSGT = 1018, CAR_SCARAB = 404, CAR_ZIPPY = 523, CAR_DELOREAN = 597, CAR_RIPPER = 600, CAR_GROG = 607, CAR_ARMADILLO = 625, //gears of war car, XBOX exclusive? CAR_WARTHOG = 723, //Halo car, XBOX exclusive CAR_BATMOBILE = 803, CAR_MASAMUNE = 1171, CAR_MARAUDER = 1172, CAR_AFTERSHOCK = 1286, CAR_ESPER = 1317, CAR_PROTEUS = 1475, CAR_TRITON = 1478, CAR_VULCAN = 1533, CAR_TWINMILL = 1603, CAR_BONESHAKER = 1623, CAR_ENDO = 1624, CAR_ICECHARGER = 1675, CAR_MANTIS = 1691, CAR_JOGER619RS = 1856, CAR_CENTIO = 1919, CAR_ANIMUSGP = 1932, }; enum OnlinePlatform { OnlinePlatform_Unknown = 0, OnlinePlatform_Steam = 1, OnlinePlatform_PS4 = 2, OnlinePlatform_PS3 = 3, OnlinePlatform_Dingo = 4, //XBox? OnlinePlatform_QQ = 5, OnlinePlatform_OldNNX = 6, OnlinePlatform_NNX = 7, OnlinePlatform_PsyNet = 8, OnlinePlatform_Deleted = 9, OnlinePlatform_WeGame = 10, OnlinePlatform_Epic = 11, OnlinePlatform_MAX = 12 }; // #Defines #define CONSTRUCTORS(name)\ name(std::uintptr_t mem);\ name(const name& other);\ name& operator=(name rhs);\ ~name(); #define PIMPL \ struct Impl;\ __pragma(warning(suppress:4251));\ std::unique_ptr pimpl; #define GETSETH(type, name) \ void Set##name(type name);\ type Get##name(); #define GETH(type, name)\ type Get##name(); #pragma pack ( pop ) ================================================ FILE: include/utils/customrotator.h ================================================ #pragma once #include "bakkesmod/plugin/bakkesmodsdk.h" #include "bakkesmod/wrappers/WrapperStructs.h" #include "finiteelement.h" //Player rotation Min(-16364, -32768, -32768) //Player rotation Max(16340, 32764, 32764) class BAKKESMOD_PLUGIN_IMPORT CustomRotator { public: FiniteElement Pitch = FiniteElement(0, -16364, 16340); FiniteElement Yaw = FiniteElement(0, -32768, 32764); FiniteElement Roll = FiniteElement(0, -32768, 32764); CustomRotator(); CustomRotator(float defaultValue); CustomRotator(float pitch, float yaw, float roll); CustomRotator(FiniteElement pitch, FiniteElement yaw, FiniteElement roll); CustomRotator(struct Rotator& rot); CustomRotator(const CustomRotator& other); CustomRotator& operator=(CustomRotator& other) noexcept; CustomRotator& operator=(Rotator& other) noexcept; CustomRotator diffTo(CustomRotator& other); //operator Rotator() { return Rotator((float)Pitch, (float)Yaw, (float)Roll); } //Do we actually want this? Rotator ToRotator(); CustomRotator& operator*=(const CustomRotator &other); CustomRotator& operator+=(const CustomRotator &other); CustomRotator& operator-=(const CustomRotator &other); CustomRotator& operator/=(const CustomRotator &other); CustomRotator& operator* (const CustomRotator &other); CustomRotator& operator+ (const CustomRotator &other); CustomRotator& operator- (const CustomRotator &other); CustomRotator& operator/ (const CustomRotator &other); template CustomRotator& operator+=(T2 f) { Pitch += f; Yaw += f; Roll += f; return *this; } template CustomRotator& operator*=(T2 f) { Pitch *= f; Yaw *= f; Roll *= f; return *this; } template CustomRotator& operator-=(T2 f) { Pitch -= f; Yaw -= f; Roll -= f; return *this; } template CustomRotator& operator/=(T2 f) { Pitch /= f; Yaw /= f; Roll /= f; return *this; } }; //template //CustomRotator operator* (T2 f, CustomRotator V) //{ // CustomRotator result = CustomRotator(f, f, f); // result *= V; // return result; //} template CustomRotator operator* (CustomRotator V, T2 f) { CustomRotator result = CustomRotator(V); result *= f; return result; } //template //CustomRotator operator/ (T2 f, CustomRotator V) //{ // CustomRotator result = CustomRotator(f, f, f); // result /= V; // return result; //} template CustomRotator operator/ (CustomRotator V, T2 f) { CustomRotator result = CustomRotator(V); result /= f; return result; } //template //CustomRotator operator+ (T2 f, CustomRotator V) //{ // CustomRotator result = CustomRotator(f, f, f); // result += V; // return result; //} //template //CustomRotator operator+ (CustomRotator V, T2 f) //{ // CustomRotator result = CustomRotator(V); // result += f; // return result; //} //template //CustomRotator operator- (T2 f, CustomRotator V) //{ // CustomRotator result = CustomRotator(f, f, f); // result -= V; // return result; //} template CustomRotator operator- (CustomRotator V, T2 f) { CustomRotator result = CustomRotator(V); result -= f; return result; } ================================================ FILE: include/utils/expected.hpp ================================================ /// // expected - An implementation of std::expected with extensions // Written in 2017 by Sy Brand (tartanllama@gmail.com, @TartanLlama) // // Documentation available at http://tl.tartanllama.xyz/ // // To the extent possible under law, the author(s) have dedicated all // copyright and related and neighboring rights to this software to the // public domain worldwide. This software is distributed without any warranty. // // You should have received a copy of the CC0 Public Domain Dedication // along with this software. If not, see // . /// #ifndef TL_EXPECTED_HPP #define TL_EXPECTED_HPP #define TL_EXPECTED_VERSION_MAJOR 1 #define TL_EXPECTED_VERSION_MINOR 1 #define TL_EXPECTED_VERSION_PATCH 0 #include #include #include #include #if defined(__EXCEPTIONS) || defined(_CPPUNWIND) #define TL_EXPECTED_EXCEPTIONS_ENABLED #endif #if (defined(_MSC_VER) && _MSC_VER == 1900) #define TL_EXPECTED_MSVC2015 #define TL_EXPECTED_MSVC2015_CONSTEXPR #else #define TL_EXPECTED_MSVC2015_CONSTEXPR constexpr #endif #if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 9 && \ !defined(__clang__)) #define TL_EXPECTED_GCC49 #endif #if (defined(__GNUC__) && __GNUC__ == 5 && __GNUC_MINOR__ <= 4 && \ !defined(__clang__)) #define TL_EXPECTED_GCC54 #endif #if (defined(__GNUC__) && __GNUC__ == 5 && __GNUC_MINOR__ <= 5 && \ !defined(__clang__)) #define TL_EXPECTED_GCC55 #endif #if !defined(TL_ASSERT) //can't have assert in constexpr in C++11 and GCC 4.9 has a compiler bug #if (__cplusplus > 201103L) && !defined(TL_EXPECTED_GCC49) #include #define TL_ASSERT(x) assert(x) #else #define TL_ASSERT(x) #endif #endif #if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 9 && \ !defined(__clang__)) // GCC < 5 doesn't support overloading on const&& for member functions #define TL_EXPECTED_NO_CONSTRR // GCC < 5 doesn't support some standard C++11 type traits #define TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \ std::has_trivial_copy_constructor #define TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \ std::has_trivial_copy_assign // This one will be different for GCC 5.7 if it's ever supported #define TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \ std::is_trivially_destructible // GCC 5 < v < 8 has a bug in is_trivially_copy_constructible which breaks // std::vector for non-copyable types #elif (defined(__GNUC__) && __GNUC__ < 8 && !defined(__clang__)) #ifndef TL_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX #define TL_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX namespace tl { namespace detail { template struct is_trivially_copy_constructible : std::is_trivially_copy_constructible {}; #ifdef _GLIBCXX_VECTOR template struct is_trivially_copy_constructible> : std::false_type {}; #endif } // namespace detail } // namespace tl #endif #define TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \ tl::detail::is_trivially_copy_constructible #define TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \ std::is_trivially_copy_assignable #define TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \ std::is_trivially_destructible #else #define TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \ std::is_trivially_copy_constructible #define TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \ std::is_trivially_copy_assignable #define TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \ std::is_trivially_destructible #endif #if __cplusplus > 201103L #define TL_EXPECTED_CXX14 #endif #ifdef TL_EXPECTED_GCC49 #define TL_EXPECTED_GCC49_CONSTEXPR #else #define TL_EXPECTED_GCC49_CONSTEXPR constexpr #endif #if (__cplusplus == 201103L || defined(TL_EXPECTED_MSVC2015) || \ defined(TL_EXPECTED_GCC49)) #define TL_EXPECTED_11_CONSTEXPR #else #define TL_EXPECTED_11_CONSTEXPR constexpr #endif namespace tl { template class expected; #ifndef TL_MONOSTATE_INPLACE_MUTEX #define TL_MONOSTATE_INPLACE_MUTEX class monostate {}; struct in_place_t { explicit in_place_t() = default; }; static constexpr in_place_t in_place{}; #endif template class unexpected { public: static_assert(!std::is_same::value, "E must not be void"); unexpected() = delete; constexpr explicit unexpected(const E &e) : m_val(e) {} constexpr explicit unexpected(E &&e) : m_val(std::move(e)) {} template ::value>::type * = nullptr> constexpr explicit unexpected(Args &&...args) : m_val(std::forward(args)...) {} template < class U, class... Args, typename std::enable_if &, Args &&...>::value>::type * = nullptr> constexpr explicit unexpected(std::initializer_list l, Args &&...args) : m_val(l, std::forward(args)...) {} constexpr const E &value() const & { return m_val; } TL_EXPECTED_11_CONSTEXPR E &value() & { return m_val; } TL_EXPECTED_11_CONSTEXPR E &&value() && { return std::move(m_val); } constexpr const E &&value() const && { return std::move(m_val); } private: E m_val; }; #ifdef __cpp_deduction_guides template unexpected(E) -> unexpected; #endif template constexpr bool operator==(const unexpected &lhs, const unexpected &rhs) { return lhs.value() == rhs.value(); } template constexpr bool operator!=(const unexpected &lhs, const unexpected &rhs) { return lhs.value() != rhs.value(); } template constexpr bool operator<(const unexpected &lhs, const unexpected &rhs) { return lhs.value() < rhs.value(); } template constexpr bool operator<=(const unexpected &lhs, const unexpected &rhs) { return lhs.value() <= rhs.value(); } template constexpr bool operator>(const unexpected &lhs, const unexpected &rhs) { return lhs.value() > rhs.value(); } template constexpr bool operator>=(const unexpected &lhs, const unexpected &rhs) { return lhs.value() >= rhs.value(); } template unexpected::type> make_unexpected(E &&e) { return unexpected::type>(std::forward(e)); } struct unexpect_t { unexpect_t() = default; }; static constexpr unexpect_t unexpect{}; namespace detail { template [[noreturn]] TL_EXPECTED_11_CONSTEXPR void throw_exception(E &&e) { #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED throw std::forward(e); #else (void)e; #ifdef _MSC_VER __assume(0); #else __builtin_unreachable(); #endif #endif } #ifndef TL_TRAITS_MUTEX #define TL_TRAITS_MUTEX // C++14-style aliases for brevity template using remove_const_t = typename std::remove_const::type; template using remove_reference_t = typename std::remove_reference::type; template using decay_t = typename std::decay::type; template using enable_if_t = typename std::enable_if::type; template using conditional_t = typename std::conditional::type; // std::conjunction from C++17 template struct conjunction : std::true_type {}; template struct conjunction : B {}; template struct conjunction : std::conditional, B>::type {}; #if defined(_LIBCPP_VERSION) && __cplusplus == 201103L #define TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND #endif // In C++11 mode, there's an issue in libc++'s std::mem_fn // which results in a hard-error when using it in a noexcept expression // in some cases. This is a check to workaround the common failing case. #ifdef TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND template struct is_pointer_to_non_const_member_func : std::false_type {}; template struct is_pointer_to_non_const_member_func : std::true_type {}; template struct is_pointer_to_non_const_member_func : std::true_type {}; template struct is_pointer_to_non_const_member_func : std::true_type {}; template struct is_pointer_to_non_const_member_func : std::true_type {}; template struct is_pointer_to_non_const_member_func : std::true_type {}; template struct is_pointer_to_non_const_member_func : std::true_type {}; template struct is_const_or_const_ref : std::false_type {}; template struct is_const_or_const_ref : std::true_type {}; template struct is_const_or_const_ref : std::true_type {}; #endif // std::invoke from C++17 // https://stackoverflow.com/questions/38288042/c11-14-invoke-workaround template < typename Fn, typename... Args, #ifdef TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND typename = enable_if_t::value && is_const_or_const_ref::value)>, #endif typename = enable_if_t>::value>, int = 0> constexpr auto invoke(Fn &&f, Args &&...args) noexcept( noexcept(std::mem_fn(f)(std::forward(args)...))) -> decltype(std::mem_fn(f)(std::forward(args)...)) { return std::mem_fn(f)(std::forward(args)...); } template >::value>> constexpr auto invoke(Fn &&f, Args &&...args) noexcept( noexcept(std::forward(f)(std::forward(args)...))) -> decltype(std::forward(f)(std::forward(args)...)) { return std::forward(f)(std::forward(args)...); } // std::invoke_result from C++17 template struct invoke_result_impl; template struct invoke_result_impl< F, decltype(detail::invoke(std::declval(), std::declval()...), void()), Us...> { using type = decltype(detail::invoke(std::declval(), std::declval()...)); }; template using invoke_result = invoke_result_impl; template using invoke_result_t = typename invoke_result::type; #if defined(_MSC_VER) && _MSC_VER <= 1900 // TODO make a version which works with MSVC 2015 template struct is_swappable : std::true_type {}; template struct is_nothrow_swappable : std::true_type {}; #else // https://stackoverflow.com/questions/26744589/what-is-a-proper-way-to-implement-is-swappable-to-test-for-the-swappable-concept namespace swap_adl_tests { // if swap ADL finds this then it would call std::swap otherwise (same // signature) struct tag {}; template tag swap(T &, T &); template tag swap(T (&a)[N], T (&b)[N]); // helper functions to test if an unqualified swap is possible, and if it // becomes std::swap template std::false_type can_swap(...) noexcept(false); template (), std::declval()))> std::true_type can_swap(int) noexcept(noexcept(swap(std::declval(), std::declval()))); template std::false_type uses_std(...); template std::is_same(), std::declval())), tag> uses_std(int); template struct is_std_swap_noexcept : std::integral_constant::value && std::is_nothrow_move_assignable::value> {}; template struct is_std_swap_noexcept : is_std_swap_noexcept {}; template struct is_adl_swap_noexcept : std::integral_constant(0))> {}; } // namespace swap_adl_tests template struct is_swappable : std::integral_constant< bool, decltype(detail::swap_adl_tests::can_swap(0))::value && (!decltype(detail::swap_adl_tests::uses_std(0))::value || (std::is_move_assignable::value && std::is_move_constructible::value))> {}; template struct is_swappable : std::integral_constant< bool, decltype(detail::swap_adl_tests::can_swap(0))::value && (!decltype(detail::swap_adl_tests::uses_std( 0))::value || is_swappable::value)> {}; template struct is_nothrow_swappable : std::integral_constant< bool, is_swappable::value && ((decltype(detail::swap_adl_tests::uses_std(0))::value && detail::swap_adl_tests::is_std_swap_noexcept::value) || (!decltype(detail::swap_adl_tests::uses_std(0))::value && detail::swap_adl_tests::is_adl_swap_noexcept::value))> {}; #endif #endif // Trait for checking if a type is a tl::expected template struct is_expected_impl : std::false_type {}; template struct is_expected_impl> : std::true_type {}; template using is_expected = is_expected_impl>; template using expected_enable_forward_value = detail::enable_if_t< std::is_constructible::value && !std::is_same, in_place_t>::value && !std::is_same, detail::decay_t>::value && !std::is_same, detail::decay_t>::value>; template using expected_enable_from_other = detail::enable_if_t< std::is_constructible::value && std::is_constructible::value && !std::is_constructible &>::value && !std::is_constructible &&>::value && !std::is_constructible &>::value && !std::is_constructible &&>::value && !std::is_convertible &, T>::value && !std::is_convertible &&, T>::value && !std::is_convertible &, T>::value && !std::is_convertible &&, T>::value>; template using is_void_or = conditional_t::value, std::true_type, U>; template using is_copy_constructible_or_void = is_void_or>; template using is_move_constructible_or_void = is_void_or>; template using is_copy_assignable_or_void = is_void_or>; template using is_move_assignable_or_void = is_void_or>; } // namespace detail namespace detail { struct no_init_t {}; static constexpr no_init_t no_init{}; // Implements the storage of the values, and ensures that the destructor is // trivial if it can be. // // This specialization is for where neither `T` or `E` is trivially // destructible, so the destructors must be called on destruction of the // `expected` template ::value, bool = std::is_trivially_destructible::value> struct expected_storage_base { constexpr expected_storage_base() : m_val(T{}), m_has_val(true) {} constexpr expected_storage_base(no_init_t) : m_no_init(), m_has_val(false) {} template ::value> * = nullptr> constexpr expected_storage_base(in_place_t, Args &&...args) : m_val(std::forward(args)...), m_has_val(true) {} template &, Args &&...>::value> * = nullptr> constexpr expected_storage_base(in_place_t, std::initializer_list il, Args &&...args) : m_val(il, std::forward(args)...), m_has_val(true) {} template ::value> * = nullptr> constexpr explicit expected_storage_base(unexpect_t, Args &&...args) : m_unexpect(std::forward(args)...), m_has_val(false) {} template &, Args &&...>::value> * = nullptr> constexpr explicit expected_storage_base(unexpect_t, std::initializer_list il, Args &&...args) : m_unexpect(il, std::forward(args)...), m_has_val(false) {} ~expected_storage_base() { if (m_has_val) { m_val.~T(); } else { m_unexpect.~unexpected(); } } union { T m_val; unexpected m_unexpect; char m_no_init; }; bool m_has_val; }; // This specialization is for when both `T` and `E` are trivially-destructible, // so the destructor of the `expected` can be trivial. template struct expected_storage_base { constexpr expected_storage_base() : m_val(T{}), m_has_val(true) {} constexpr expected_storage_base(no_init_t) : m_no_init(), m_has_val(false) {} template ::value> * = nullptr> constexpr expected_storage_base(in_place_t, Args &&...args) : m_val(std::forward(args)...), m_has_val(true) {} template &, Args &&...>::value> * = nullptr> constexpr expected_storage_base(in_place_t, std::initializer_list il, Args &&...args) : m_val(il, std::forward(args)...), m_has_val(true) {} template ::value> * = nullptr> constexpr explicit expected_storage_base(unexpect_t, Args &&...args) : m_unexpect(std::forward(args)...), m_has_val(false) {} template &, Args &&...>::value> * = nullptr> constexpr explicit expected_storage_base(unexpect_t, std::initializer_list il, Args &&...args) : m_unexpect(il, std::forward(args)...), m_has_val(false) {} ~expected_storage_base() = default; union { T m_val; unexpected m_unexpect; char m_no_init; }; bool m_has_val; }; // T is trivial, E is not. template struct expected_storage_base { constexpr expected_storage_base() : m_val(T{}), m_has_val(true) {} TL_EXPECTED_MSVC2015_CONSTEXPR expected_storage_base(no_init_t) : m_no_init(), m_has_val(false) {} template ::value> * = nullptr> constexpr expected_storage_base(in_place_t, Args &&...args) : m_val(std::forward(args)...), m_has_val(true) {} template &, Args &&...>::value> * = nullptr> constexpr expected_storage_base(in_place_t, std::initializer_list il, Args &&...args) : m_val(il, std::forward(args)...), m_has_val(true) {} template ::value> * = nullptr> constexpr explicit expected_storage_base(unexpect_t, Args &&...args) : m_unexpect(std::forward(args)...), m_has_val(false) {} template &, Args &&...>::value> * = nullptr> constexpr explicit expected_storage_base(unexpect_t, std::initializer_list il, Args &&...args) : m_unexpect(il, std::forward(args)...), m_has_val(false) {} ~expected_storage_base() { if (!m_has_val) { m_unexpect.~unexpected(); } } union { T m_val; unexpected m_unexpect; char m_no_init; }; bool m_has_val; }; // E is trivial, T is not. template struct expected_storage_base { constexpr expected_storage_base() : m_val(T{}), m_has_val(true) {} constexpr expected_storage_base(no_init_t) : m_no_init(), m_has_val(false) {} template ::value> * = nullptr> constexpr expected_storage_base(in_place_t, Args &&...args) : m_val(std::forward(args)...), m_has_val(true) {} template &, Args &&...>::value> * = nullptr> constexpr expected_storage_base(in_place_t, std::initializer_list il, Args &&...args) : m_val(il, std::forward(args)...), m_has_val(true) {} template ::value> * = nullptr> constexpr explicit expected_storage_base(unexpect_t, Args &&...args) : m_unexpect(std::forward(args)...), m_has_val(false) {} template &, Args &&...>::value> * = nullptr> constexpr explicit expected_storage_base(unexpect_t, std::initializer_list il, Args &&...args) : m_unexpect(il, std::forward(args)...), m_has_val(false) {} ~expected_storage_base() { if (m_has_val) { m_val.~T(); } } union { T m_val; unexpected m_unexpect; char m_no_init; }; bool m_has_val; }; // `T` is `void`, `E` is trivially-destructible template struct expected_storage_base { #if __GNUC__ <= 5 //no constexpr for GCC 4/5 bug #else TL_EXPECTED_MSVC2015_CONSTEXPR #endif expected_storage_base() : m_has_val(true) {} constexpr expected_storage_base(no_init_t) : m_val(), m_has_val(false) {} constexpr expected_storage_base(in_place_t) : m_has_val(true) {} template ::value> * = nullptr> constexpr explicit expected_storage_base(unexpect_t, Args &&...args) : m_unexpect(std::forward(args)...), m_has_val(false) {} template &, Args &&...>::value> * = nullptr> constexpr explicit expected_storage_base(unexpect_t, std::initializer_list il, Args &&...args) : m_unexpect(il, std::forward(args)...), m_has_val(false) {} ~expected_storage_base() = default; struct dummy {}; union { unexpected m_unexpect; dummy m_val; }; bool m_has_val; }; // `T` is `void`, `E` is not trivially-destructible template struct expected_storage_base { constexpr expected_storage_base() : m_dummy(), m_has_val(true) {} constexpr expected_storage_base(no_init_t) : m_dummy(), m_has_val(false) {} constexpr expected_storage_base(in_place_t) : m_dummy(), m_has_val(true) {} template ::value> * = nullptr> constexpr explicit expected_storage_base(unexpect_t, Args &&...args) : m_unexpect(std::forward(args)...), m_has_val(false) {} template &, Args &&...>::value> * = nullptr> constexpr explicit expected_storage_base(unexpect_t, std::initializer_list il, Args &&...args) : m_unexpect(il, std::forward(args)...), m_has_val(false) {} ~expected_storage_base() { if (!m_has_val) { m_unexpect.~unexpected(); } } union { unexpected m_unexpect; char m_dummy; }; bool m_has_val; }; // This base class provides some handy member functions which can be used in // further derived classes template struct expected_operations_base : expected_storage_base { using expected_storage_base::expected_storage_base; template void construct(Args &&...args) noexcept { new (std::addressof(this->m_val)) T(std::forward(args)...); this->m_has_val = true; } template void construct_with(Rhs &&rhs) noexcept { new (std::addressof(this->m_val)) T(std::forward(rhs).get()); this->m_has_val = true; } template void construct_error(Args &&...args) noexcept { new (std::addressof(this->m_unexpect)) unexpected(std::forward(args)...); this->m_has_val = false; } #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED // These assign overloads ensure that the most efficient assignment // implementation is used while maintaining the strong exception guarantee. // The problematic case is where rhs has a value, but *this does not. // // This overload handles the case where we can just copy-construct `T` // directly into place without throwing. template ::value> * = nullptr> void assign(const expected_operations_base &rhs) noexcept { if (!this->m_has_val && rhs.m_has_val) { geterr().~unexpected(); construct(rhs.get()); } else { assign_common(rhs); } } // This overload handles the case where we can attempt to create a copy of // `T`, then no-throw move it into place if the copy was successful. template ::value && std::is_nothrow_move_constructible::value> * = nullptr> void assign(const expected_operations_base &rhs) noexcept { if (!this->m_has_val && rhs.m_has_val) { T tmp = rhs.get(); geterr().~unexpected(); construct(std::move(tmp)); } else { assign_common(rhs); } } // This overload is the worst-case, where we have to move-construct the // unexpected value into temporary storage, then try to copy the T into place. // If the construction succeeds, then everything is fine, but if it throws, // then we move the old unexpected value back into place before rethrowing the // exception. template ::value && !std::is_nothrow_move_constructible::value> * = nullptr> void assign(const expected_operations_base &rhs) { if (!this->m_has_val && rhs.m_has_val) { auto tmp = std::move(geterr()); geterr().~unexpected(); #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED try { construct(rhs.get()); } catch (...) { geterr() = std::move(tmp); throw; } #else construct(rhs.get()); #endif } else { assign_common(rhs); } } // These overloads do the same as above, but for rvalues template ::value> * = nullptr> void assign(expected_operations_base &&rhs) noexcept { if (!this->m_has_val && rhs.m_has_val) { geterr().~unexpected(); construct(std::move(rhs).get()); } else { assign_common(std::move(rhs)); } } template ::value> * = nullptr> void assign(expected_operations_base &&rhs) { if (!this->m_has_val && rhs.m_has_val) { auto tmp = std::move(geterr()); geterr().~unexpected(); #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED try { construct(std::move(rhs).get()); } catch (...) { geterr() = std::move(tmp); throw; } #else construct(std::move(rhs).get()); #endif } else { assign_common(std::move(rhs)); } } #else // If exceptions are disabled then we can just copy-construct void assign(const expected_operations_base &rhs) noexcept { if (!this->m_has_val && rhs.m_has_val) { geterr().~unexpected(); construct(rhs.get()); } else { assign_common(rhs); } } void assign(expected_operations_base &&rhs) noexcept { if (!this->m_has_val && rhs.m_has_val) { geterr().~unexpected(); construct(std::move(rhs).get()); } else { assign_common(std::move(rhs)); } } #endif // The common part of move/copy assigning template void assign_common(Rhs &&rhs) { if (this->m_has_val) { if (rhs.m_has_val) { get() = std::forward(rhs).get(); } else { destroy_val(); construct_error(std::forward(rhs).geterr()); } } else { if (!rhs.m_has_val) { geterr() = std::forward(rhs).geterr(); } } } bool has_value() const { return this->m_has_val; } TL_EXPECTED_11_CONSTEXPR T &get() & { return this->m_val; } constexpr const T &get() const & { return this->m_val; } TL_EXPECTED_11_CONSTEXPR T &&get() && { return std::move(this->m_val); } #ifndef TL_EXPECTED_NO_CONSTRR constexpr const T &&get() const && { return std::move(this->m_val); } #endif TL_EXPECTED_11_CONSTEXPR unexpected &geterr() & { return this->m_unexpect; } constexpr const unexpected &geterr() const & { return this->m_unexpect; } TL_EXPECTED_11_CONSTEXPR unexpected &&geterr() && { return std::move(this->m_unexpect); } #ifndef TL_EXPECTED_NO_CONSTRR constexpr const unexpected &&geterr() const && { return std::move(this->m_unexpect); } #endif TL_EXPECTED_11_CONSTEXPR void destroy_val() { get().~T(); } }; // This base class provides some handy member functions which can be used in // further derived classes template struct expected_operations_base : expected_storage_base { using expected_storage_base::expected_storage_base; template void construct() noexcept { this->m_has_val = true; } // This function doesn't use its argument, but needs it so that code in // levels above this can work independently of whether T is void template void construct_with(Rhs &&) noexcept { this->m_has_val = true; } template void construct_error(Args &&...args) noexcept { new (std::addressof(this->m_unexpect)) unexpected(std::forward(args)...); this->m_has_val = false; } template void assign(Rhs &&rhs) noexcept { if (!this->m_has_val) { if (rhs.m_has_val) { geterr().~unexpected(); construct(); } else { geterr() = std::forward(rhs).geterr(); } } else { if (!rhs.m_has_val) { construct_error(std::forward(rhs).geterr()); } } } bool has_value() const { return this->m_has_val; } TL_EXPECTED_11_CONSTEXPR unexpected &geterr() & { return this->m_unexpect; } constexpr const unexpected &geterr() const & { return this->m_unexpect; } TL_EXPECTED_11_CONSTEXPR unexpected &&geterr() && { return std::move(this->m_unexpect); } #ifndef TL_EXPECTED_NO_CONSTRR constexpr const unexpected &&geterr() const && { return std::move(this->m_unexpect); } #endif TL_EXPECTED_11_CONSTEXPR void destroy_val() { // no-op } }; // This class manages conditionally having a trivial copy constructor // This specialization is for when T and E are trivially copy constructible template :: value &&TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(E)::value> struct expected_copy_base : expected_operations_base { using expected_operations_base::expected_operations_base; }; // This specialization is for when T or E are not trivially copy constructible template struct expected_copy_base : expected_operations_base { using expected_operations_base::expected_operations_base; expected_copy_base() = default; expected_copy_base(const expected_copy_base &rhs) : expected_operations_base(no_init) { if (rhs.has_value()) { this->construct_with(rhs); } else { this->construct_error(rhs.geterr()); } } expected_copy_base(expected_copy_base &&rhs) = default; expected_copy_base &operator=(const expected_copy_base &rhs) = default; expected_copy_base &operator=(expected_copy_base &&rhs) = default; }; // This class manages conditionally having a trivial move constructor // Unfortunately there's no way to achieve this in GCC < 5 AFAIK, since it // doesn't implement an analogue to std::is_trivially_move_constructible. We // have to make do with a non-trivial move constructor even if T is trivially // move constructible #ifndef TL_EXPECTED_GCC49 template >::value &&std::is_trivially_move_constructible::value> struct expected_move_base : expected_copy_base { using expected_copy_base::expected_copy_base; }; #else template struct expected_move_base; #endif template struct expected_move_base : expected_copy_base { using expected_copy_base::expected_copy_base; expected_move_base() = default; expected_move_base(const expected_move_base &rhs) = default; expected_move_base(expected_move_base &&rhs) noexcept( std::is_nothrow_move_constructible::value) : expected_copy_base(no_init) { if (rhs.has_value()) { this->construct_with(std::move(rhs)); } else { this->construct_error(std::move(rhs.geterr())); } } expected_move_base &operator=(const expected_move_base &rhs) = default; expected_move_base &operator=(expected_move_base &&rhs) = default; }; // This class manages conditionally having a trivial copy assignment operator template >::value &&TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(E)::value &&TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(E)::value &&TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(E)::value> struct expected_copy_assign_base : expected_move_base { using expected_move_base::expected_move_base; }; template struct expected_copy_assign_base : expected_move_base { using expected_move_base::expected_move_base; expected_copy_assign_base() = default; expected_copy_assign_base(const expected_copy_assign_base &rhs) = default; expected_copy_assign_base(expected_copy_assign_base &&rhs) = default; expected_copy_assign_base &operator=(const expected_copy_assign_base &rhs) { this->assign(rhs); return *this; } expected_copy_assign_base & operator=(expected_copy_assign_base &&rhs) = default; }; // This class manages conditionally having a trivial move assignment operator // Unfortunately there's no way to achieve this in GCC < 5 AFAIK, since it // doesn't implement an analogue to std::is_trivially_move_assignable. We have // to make do with a non-trivial move assignment operator even if T is trivially // move assignable #ifndef TL_EXPECTED_GCC49 template , std::is_trivially_move_constructible, std::is_trivially_move_assignable>>:: value &&std::is_trivially_destructible::value &&std::is_trivially_move_constructible::value &&std::is_trivially_move_assignable::value> struct expected_move_assign_base : expected_copy_assign_base { using expected_copy_assign_base::expected_copy_assign_base; }; #else template struct expected_move_assign_base; #endif template struct expected_move_assign_base : expected_copy_assign_base { using expected_copy_assign_base::expected_copy_assign_base; expected_move_assign_base() = default; expected_move_assign_base(const expected_move_assign_base &rhs) = default; expected_move_assign_base(expected_move_assign_base &&rhs) = default; expected_move_assign_base & operator=(const expected_move_assign_base &rhs) = default; expected_move_assign_base & operator=(expected_move_assign_base &&rhs) noexcept( std::is_nothrow_move_constructible::value &&std::is_nothrow_move_assignable::value) { this->assign(std::move(rhs)); return *this; } }; // expected_delete_ctor_base will conditionally delete copy and move // constructors depending on whether T is copy/move constructible template ::value && std::is_copy_constructible::value), bool EnableMove = (is_move_constructible_or_void::value && std::is_move_constructible::value)> struct expected_delete_ctor_base { expected_delete_ctor_base() = default; expected_delete_ctor_base(const expected_delete_ctor_base &) = default; expected_delete_ctor_base(expected_delete_ctor_base &&) noexcept = default; expected_delete_ctor_base & operator=(const expected_delete_ctor_base &) = default; expected_delete_ctor_base & operator=(expected_delete_ctor_base &&) noexcept = default; }; template struct expected_delete_ctor_base { expected_delete_ctor_base() = default; expected_delete_ctor_base(const expected_delete_ctor_base &) = default; expected_delete_ctor_base(expected_delete_ctor_base &&) noexcept = delete; expected_delete_ctor_base & operator=(const expected_delete_ctor_base &) = default; expected_delete_ctor_base & operator=(expected_delete_ctor_base &&) noexcept = default; }; template struct expected_delete_ctor_base { expected_delete_ctor_base() = default; expected_delete_ctor_base(const expected_delete_ctor_base &) = delete; expected_delete_ctor_base(expected_delete_ctor_base &&) noexcept = default; expected_delete_ctor_base & operator=(const expected_delete_ctor_base &) = default; expected_delete_ctor_base & operator=(expected_delete_ctor_base &&) noexcept = default; }; template struct expected_delete_ctor_base { expected_delete_ctor_base() = default; expected_delete_ctor_base(const expected_delete_ctor_base &) = delete; expected_delete_ctor_base(expected_delete_ctor_base &&) noexcept = delete; expected_delete_ctor_base & operator=(const expected_delete_ctor_base &) = default; expected_delete_ctor_base & operator=(expected_delete_ctor_base &&) noexcept = default; }; // expected_delete_assign_base will conditionally delete copy and move // constructors depending on whether T and E are copy/move constructible + // assignable template ::value && std::is_copy_constructible::value && is_copy_assignable_or_void::value && std::is_copy_assignable::value), bool EnableMove = (is_move_constructible_or_void::value && std::is_move_constructible::value && is_move_assignable_or_void::value && std::is_move_assignable::value)> struct expected_delete_assign_base { expected_delete_assign_base() = default; expected_delete_assign_base(const expected_delete_assign_base &) = default; expected_delete_assign_base(expected_delete_assign_base &&) noexcept = default; expected_delete_assign_base & operator=(const expected_delete_assign_base &) = default; expected_delete_assign_base & operator=(expected_delete_assign_base &&) noexcept = default; }; template struct expected_delete_assign_base { expected_delete_assign_base() = default; expected_delete_assign_base(const expected_delete_assign_base &) = default; expected_delete_assign_base(expected_delete_assign_base &&) noexcept = default; expected_delete_assign_base & operator=(const expected_delete_assign_base &) = default; expected_delete_assign_base & operator=(expected_delete_assign_base &&) noexcept = delete; }; template struct expected_delete_assign_base { expected_delete_assign_base() = default; expected_delete_assign_base(const expected_delete_assign_base &) = default; expected_delete_assign_base(expected_delete_assign_base &&) noexcept = default; expected_delete_assign_base & operator=(const expected_delete_assign_base &) = delete; expected_delete_assign_base & operator=(expected_delete_assign_base &&) noexcept = default; }; template struct expected_delete_assign_base { expected_delete_assign_base() = default; expected_delete_assign_base(const expected_delete_assign_base &) = default; expected_delete_assign_base(expected_delete_assign_base &&) noexcept = default; expected_delete_assign_base & operator=(const expected_delete_assign_base &) = delete; expected_delete_assign_base & operator=(expected_delete_assign_base &&) noexcept = delete; }; // This is needed to be able to construct the expected_default_ctor_base which // follows, while still conditionally deleting the default constructor. struct default_constructor_tag { explicit constexpr default_constructor_tag() = default; }; // expected_default_ctor_base will ensure that expected has a deleted default // consturctor if T is not default constructible. // This specialization is for when T is default constructible template ::value || std::is_void::value> struct expected_default_ctor_base { constexpr expected_default_ctor_base() noexcept = default; constexpr expected_default_ctor_base( expected_default_ctor_base const &) noexcept = default; constexpr expected_default_ctor_base(expected_default_ctor_base &&) noexcept = default; expected_default_ctor_base & operator=(expected_default_ctor_base const &) noexcept = default; expected_default_ctor_base & operator=(expected_default_ctor_base &&) noexcept = default; constexpr explicit expected_default_ctor_base(default_constructor_tag) {} }; // This specialization is for when T is not default constructible template struct expected_default_ctor_base { constexpr expected_default_ctor_base() noexcept = delete; constexpr expected_default_ctor_base( expected_default_ctor_base const &) noexcept = default; constexpr expected_default_ctor_base(expected_default_ctor_base &&) noexcept = default; expected_default_ctor_base & operator=(expected_default_ctor_base const &) noexcept = default; expected_default_ctor_base & operator=(expected_default_ctor_base &&) noexcept = default; constexpr explicit expected_default_ctor_base(default_constructor_tag) {} }; } // namespace detail template class bad_expected_access : public std::exception { public: explicit bad_expected_access(E e) : m_val(std::move(e)) {} virtual const char *what() const noexcept override { return "Bad expected access"; } const E &error() const & { return m_val; } E &error() & { return m_val; } const E &&error() const && { return std::move(m_val); } E &&error() && { return std::move(m_val); } private: E m_val; }; /// An `expected` object is an object that contains the storage for /// another object and manages the lifetime of this contained object `T`. /// Alternatively it could contain the storage for another unexpected object /// `E`. The contained object may not be initialized after the expected object /// has been initialized, and may not be destroyed before the expected object /// has been destroyed. The initialization state of the contained object is /// tracked by the expected object. template class expected : private detail::expected_move_assign_base, private detail::expected_delete_ctor_base, private detail::expected_delete_assign_base, private detail::expected_default_ctor_base { static_assert(!std::is_reference::value, "T must not be a reference"); static_assert(!std::is_same::type>::value, "T must not be in_place_t"); static_assert(!std::is_same::type>::value, "T must not be unexpect_t"); static_assert( !std::is_same>::type>::value, "T must not be unexpected"); static_assert(!std::is_reference::value, "E must not be a reference"); T *valptr() { return std::addressof(this->m_val); } const T *valptr() const { return std::addressof(this->m_val); } unexpected *errptr() { return std::addressof(this->m_unexpect); } const unexpected *errptr() const { return std::addressof(this->m_unexpect); } template ::value> * = nullptr> TL_EXPECTED_11_CONSTEXPR U &val() { return this->m_val; } TL_EXPECTED_11_CONSTEXPR unexpected &err() { return this->m_unexpect; } template ::value> * = nullptr> constexpr const U &val() const { return this->m_val; } constexpr const unexpected &err() const { return this->m_unexpect; } using impl_base = detail::expected_move_assign_base; using ctor_base = detail::expected_default_ctor_base; public: typedef T value_type; typedef E error_type; typedef unexpected unexpected_type; #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55) template TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) & { return and_then_impl(*this, std::forward(f)); } template TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) && { return and_then_impl(std::move(*this), std::forward(f)); } template constexpr auto and_then(F &&f) const & { return and_then_impl(*this, std::forward(f)); } #ifndef TL_EXPECTED_NO_CONSTRR template constexpr auto and_then(F &&f) const && { return and_then_impl(std::move(*this), std::forward(f)); } #endif #else template TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) & -> decltype(and_then_impl(std::declval(), std::forward(f))) { return and_then_impl(*this, std::forward(f)); } template TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) && -> decltype(and_then_impl(std::declval(), std::forward(f))) { return and_then_impl(std::move(*this), std::forward(f)); } template constexpr auto and_then(F &&f) const & -> decltype(and_then_impl( std::declval(), std::forward(f))) { return and_then_impl(*this, std::forward(f)); } #ifndef TL_EXPECTED_NO_CONSTRR template constexpr auto and_then(F &&f) const && -> decltype(and_then_impl( std::declval(), std::forward(f))) { return and_then_impl(std::move(*this), std::forward(f)); } #endif #endif #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55) template TL_EXPECTED_11_CONSTEXPR auto map(F &&f) & { return expected_map_impl(*this, std::forward(f)); } template TL_EXPECTED_11_CONSTEXPR auto map(F &&f) && { return expected_map_impl(std::move(*this), std::forward(f)); } template constexpr auto map(F &&f) const & { return expected_map_impl(*this, std::forward(f)); } template constexpr auto map(F &&f) const && { return expected_map_impl(std::move(*this), std::forward(f)); } #else template TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl( std::declval(), std::declval())) map(F &&f) & { return expected_map_impl(*this, std::forward(f)); } template TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval(), std::declval())) map(F &&f) && { return expected_map_impl(std::move(*this), std::forward(f)); } template constexpr decltype(expected_map_impl(std::declval(), std::declval())) map(F &&f) const & { return expected_map_impl(*this, std::forward(f)); } #ifndef TL_EXPECTED_NO_CONSTRR template constexpr decltype(expected_map_impl(std::declval(), std::declval())) map(F &&f) const && { return expected_map_impl(std::move(*this), std::forward(f)); } #endif #endif #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55) template TL_EXPECTED_11_CONSTEXPR auto transform(F &&f) & { return expected_map_impl(*this, std::forward(f)); } template TL_EXPECTED_11_CONSTEXPR auto transform(F &&f) && { return expected_map_impl(std::move(*this), std::forward(f)); } template constexpr auto transform(F &&f) const & { return expected_map_impl(*this, std::forward(f)); } template constexpr auto transform(F &&f) const && { return expected_map_impl(std::move(*this), std::forward(f)); } #else template TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl( std::declval(), std::declval())) transform(F &&f) & { return expected_map_impl(*this, std::forward(f)); } template TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval(), std::declval())) transform(F &&f) && { return expected_map_impl(std::move(*this), std::forward(f)); } template constexpr decltype(expected_map_impl(std::declval(), std::declval())) transform(F &&f) const & { return expected_map_impl(*this, std::forward(f)); } #ifndef TL_EXPECTED_NO_CONSTRR template constexpr decltype(expected_map_impl(std::declval(), std::declval())) transform(F &&f) const && { return expected_map_impl(std::move(*this), std::forward(f)); } #endif #endif #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55) template TL_EXPECTED_11_CONSTEXPR auto map_error(F &&f) & { return map_error_impl(*this, std::forward(f)); } template TL_EXPECTED_11_CONSTEXPR auto map_error(F &&f) && { return map_error_impl(std::move(*this), std::forward(f)); } template constexpr auto map_error(F &&f) const & { return map_error_impl(*this, std::forward(f)); } template constexpr auto map_error(F &&f) const && { return map_error_impl(std::move(*this), std::forward(f)); } #else template TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval(), std::declval())) map_error(F &&f) & { return map_error_impl(*this, std::forward(f)); } template TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval(), std::declval())) map_error(F &&f) && { return map_error_impl(std::move(*this), std::forward(f)); } template constexpr decltype(map_error_impl(std::declval(), std::declval())) map_error(F &&f) const & { return map_error_impl(*this, std::forward(f)); } #ifndef TL_EXPECTED_NO_CONSTRR template constexpr decltype(map_error_impl(std::declval(), std::declval())) map_error(F &&f) const && { return map_error_impl(std::move(*this), std::forward(f)); } #endif #endif #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55) template TL_EXPECTED_11_CONSTEXPR auto transform_error(F &&f) & { return map_error_impl(*this, std::forward(f)); } template TL_EXPECTED_11_CONSTEXPR auto transform_error(F &&f) && { return map_error_impl(std::move(*this), std::forward(f)); } template constexpr auto transform_error(F &&f) const & { return map_error_impl(*this, std::forward(f)); } template constexpr auto transform_error(F &&f) const && { return map_error_impl(std::move(*this), std::forward(f)); } #else template TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval(), std::declval())) transform_error(F &&f) & { return map_error_impl(*this, std::forward(f)); } template TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval(), std::declval())) transform_error(F &&f) && { return map_error_impl(std::move(*this), std::forward(f)); } template constexpr decltype(map_error_impl(std::declval(), std::declval())) transform_error(F &&f) const & { return map_error_impl(*this, std::forward(f)); } #ifndef TL_EXPECTED_NO_CONSTRR template constexpr decltype(map_error_impl(std::declval(), std::declval())) transform_error(F &&f) const && { return map_error_impl(std::move(*this), std::forward(f)); } #endif #endif template expected TL_EXPECTED_11_CONSTEXPR or_else(F &&f) & { return or_else_impl(*this, std::forward(f)); } template expected TL_EXPECTED_11_CONSTEXPR or_else(F &&f) && { return or_else_impl(std::move(*this), std::forward(f)); } template expected constexpr or_else(F &&f) const & { return or_else_impl(*this, std::forward(f)); } #ifndef TL_EXPECTED_NO_CONSTRR template expected constexpr or_else(F &&f) const && { return or_else_impl(std::move(*this), std::forward(f)); } #endif constexpr expected() = default; constexpr expected(const expected &rhs) = default; constexpr expected(expected &&rhs) = default; expected &operator=(const expected &rhs) = default; expected &operator=(expected &&rhs) = default; template ::value> * = nullptr> constexpr expected(in_place_t, Args &&...args) : impl_base(in_place, std::forward(args)...), ctor_base(detail::default_constructor_tag{}) {} template &, Args &&...>::value> * = nullptr> constexpr expected(in_place_t, std::initializer_list il, Args &&...args) : impl_base(in_place, il, std::forward(args)...), ctor_base(detail::default_constructor_tag{}) {} template ::value> * = nullptr, detail::enable_if_t::value> * = nullptr> explicit constexpr expected(const unexpected &e) : impl_base(unexpect, e.value()), ctor_base(detail::default_constructor_tag{}) {} template < class G = E, detail::enable_if_t::value> * = nullptr, detail::enable_if_t::value> * = nullptr> constexpr expected(unexpected const &e) : impl_base(unexpect, e.value()), ctor_base(detail::default_constructor_tag{}) {} template < class G = E, detail::enable_if_t::value> * = nullptr, detail::enable_if_t::value> * = nullptr> explicit constexpr expected(unexpected &&e) noexcept( std::is_nothrow_constructible::value) : impl_base(unexpect, std::move(e.value())), ctor_base(detail::default_constructor_tag{}) {} template < class G = E, detail::enable_if_t::value> * = nullptr, detail::enable_if_t::value> * = nullptr> constexpr expected(unexpected &&e) noexcept( std::is_nothrow_constructible::value) : impl_base(unexpect, std::move(e.value())), ctor_base(detail::default_constructor_tag{}) {} template ::value> * = nullptr> constexpr explicit expected(unexpect_t, Args &&...args) : impl_base(unexpect, std::forward(args)...), ctor_base(detail::default_constructor_tag{}) {} template &, Args &&...>::value> * = nullptr> constexpr explicit expected(unexpect_t, std::initializer_list il, Args &&...args) : impl_base(unexpect, il, std::forward(args)...), ctor_base(detail::default_constructor_tag{}) {} template ::value && std::is_convertible::value)> * = nullptr, detail::expected_enable_from_other * = nullptr> explicit TL_EXPECTED_11_CONSTEXPR expected(const expected &rhs) : ctor_base(detail::default_constructor_tag{}) { if (rhs.has_value()) { this->construct(*rhs); } else { this->construct_error(rhs.error()); } } template ::value && std::is_convertible::value)> * = nullptr, detail::expected_enable_from_other * = nullptr> TL_EXPECTED_11_CONSTEXPR expected(const expected &rhs) : ctor_base(detail::default_constructor_tag{}) { if (rhs.has_value()) { this->construct(*rhs); } else { this->construct_error(rhs.error()); } } template < class U, class G, detail::enable_if_t::value && std::is_convertible::value)> * = nullptr, detail::expected_enable_from_other * = nullptr> explicit TL_EXPECTED_11_CONSTEXPR expected(expected &&rhs) : ctor_base(detail::default_constructor_tag{}) { if (rhs.has_value()) { this->construct(std::move(*rhs)); } else { this->construct_error(std::move(rhs.error())); } } template < class U, class G, detail::enable_if_t<(std::is_convertible::value && std::is_convertible::value)> * = nullptr, detail::expected_enable_from_other * = nullptr> TL_EXPECTED_11_CONSTEXPR expected(expected &&rhs) : ctor_base(detail::default_constructor_tag{}) { if (rhs.has_value()) { this->construct(std::move(*rhs)); } else { this->construct_error(std::move(rhs.error())); } } template < class U = T, detail::enable_if_t::value> * = nullptr, detail::expected_enable_forward_value * = nullptr> explicit TL_EXPECTED_MSVC2015_CONSTEXPR expected(U &&v) : expected(in_place, std::forward(v)) {} template < class U = T, detail::enable_if_t::value> * = nullptr, detail::expected_enable_forward_value * = nullptr> TL_EXPECTED_MSVC2015_CONSTEXPR expected(U &&v) : expected(in_place, std::forward(v)) {} template < class U = T, class G = T, detail::enable_if_t::value> * = nullptr, detail::enable_if_t::value> * = nullptr, detail::enable_if_t< (!std::is_same, detail::decay_t>::value && !detail::conjunction, std::is_same>>::value && std::is_constructible::value && std::is_assignable::value && std::is_nothrow_move_constructible::value)> * = nullptr> expected &operator=(U &&v) { if (has_value()) { val() = std::forward(v); } else { err().~unexpected(); ::new (valptr()) T(std::forward(v)); this->m_has_val = true; } return *this; } template < class U = T, class G = T, detail::enable_if_t::value> * = nullptr, detail::enable_if_t::value> * = nullptr, detail::enable_if_t< (!std::is_same, detail::decay_t>::value && !detail::conjunction, std::is_same>>::value && std::is_constructible::value && std::is_assignable::value && std::is_nothrow_move_constructible::value)> * = nullptr> expected &operator=(U &&v) { if (has_value()) { val() = std::forward(v); } else { auto tmp = std::move(err()); err().~unexpected(); #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED try { ::new (valptr()) T(std::forward(v)); this->m_has_val = true; } catch (...) { err() = std::move(tmp); throw; } #else ::new (valptr()) T(std::forward(v)); this->m_has_val = true; #endif } return *this; } template ::value && std::is_assignable::value> * = nullptr> expected &operator=(const unexpected &rhs) { if (!has_value()) { err() = rhs; } else { this->destroy_val(); ::new (errptr()) unexpected(rhs); this->m_has_val = false; } return *this; } template ::value && std::is_move_assignable::value> * = nullptr> expected &operator=(unexpected &&rhs) noexcept { if (!has_value()) { err() = std::move(rhs); } else { this->destroy_val(); ::new (errptr()) unexpected(std::move(rhs)); this->m_has_val = false; } return *this; } template ::value> * = nullptr> void emplace(Args &&...args) { if (has_value()) { val().~T(); } else { err().~unexpected(); this->m_has_val = true; } ::new (valptr()) T(std::forward(args)...); } template ::value> * = nullptr> void emplace(Args &&...args) { if (has_value()) { val().~T(); ::new (valptr()) T(std::forward(args)...); } else { auto tmp = std::move(err()); err().~unexpected(); #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED try { ::new (valptr()) T(std::forward(args)...); this->m_has_val = true; } catch (...) { err() = std::move(tmp); throw; } #else ::new (valptr()) T(std::forward(args)...); this->m_has_val = true; #endif } } template &, Args &&...>::value> * = nullptr> void emplace(std::initializer_list il, Args &&...args) { if (has_value()) { T t(il, std::forward(args)...); val() = std::move(t); } else { err().~unexpected(); ::new (valptr()) T(il, std::forward(args)...); this->m_has_val = true; } } template &, Args &&...>::value> * = nullptr> void emplace(std::initializer_list il, Args &&...args) { if (has_value()) { T t(il, std::forward(args)...); val() = std::move(t); } else { auto tmp = std::move(err()); err().~unexpected(); #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED try { ::new (valptr()) T(il, std::forward(args)...); this->m_has_val = true; } catch (...) { err() = std::move(tmp); throw; } #else ::new (valptr()) T(il, std::forward(args)...); this->m_has_val = true; #endif } } private: using t_is_void = std::true_type; using t_is_not_void = std::false_type; using t_is_nothrow_move_constructible = std::true_type; using move_constructing_t_can_throw = std::false_type; using e_is_nothrow_move_constructible = std::true_type; using move_constructing_e_can_throw = std::false_type; void swap_where_both_have_value(expected & /*rhs*/, t_is_void) noexcept { // swapping void is a no-op } void swap_where_both_have_value(expected &rhs, t_is_not_void) { using std::swap; swap(val(), rhs.val()); } void swap_where_only_one_has_value(expected &rhs, t_is_void) noexcept( std::is_nothrow_move_constructible::value) { ::new (errptr()) unexpected_type(std::move(rhs.err())); rhs.err().~unexpected_type(); std::swap(this->m_has_val, rhs.m_has_val); } void swap_where_only_one_has_value(expected &rhs, t_is_not_void) { swap_where_only_one_has_value_and_t_is_not_void( rhs, typename std::is_nothrow_move_constructible::type{}, typename std::is_nothrow_move_constructible::type{}); } void swap_where_only_one_has_value_and_t_is_not_void( expected &rhs, t_is_nothrow_move_constructible, e_is_nothrow_move_constructible) noexcept { auto temp = std::move(val()); val().~T(); ::new (errptr()) unexpected_type(std::move(rhs.err())); rhs.err().~unexpected_type(); ::new (rhs.valptr()) T(std::move(temp)); std::swap(this->m_has_val, rhs.m_has_val); } void swap_where_only_one_has_value_and_t_is_not_void( expected &rhs, t_is_nothrow_move_constructible, move_constructing_e_can_throw) { auto temp = std::move(val()); val().~T(); #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED try { ::new (errptr()) unexpected_type(std::move(rhs.err())); rhs.err().~unexpected_type(); ::new (rhs.valptr()) T(std::move(temp)); std::swap(this->m_has_val, rhs.m_has_val); } catch (...) { val() = std::move(temp); throw; } #else ::new (errptr()) unexpected_type(std::move(rhs.err())); rhs.err().~unexpected_type(); ::new (rhs.valptr()) T(std::move(temp)); std::swap(this->m_has_val, rhs.m_has_val); #endif } void swap_where_only_one_has_value_and_t_is_not_void( expected &rhs, move_constructing_t_can_throw, e_is_nothrow_move_constructible) { auto temp = std::move(rhs.err()); rhs.err().~unexpected_type(); #ifdef TL_EXPECTED_EXCEPTIONS_ENABLED try { ::new (rhs.valptr()) T(std::move(val())); val().~T(); ::new (errptr()) unexpected_type(std::move(temp)); std::swap(this->m_has_val, rhs.m_has_val); } catch (...) { rhs.err() = std::move(temp); throw; } #else ::new (rhs.valptr()) T(std::move(val())); val().~T(); ::new (errptr()) unexpected_type(std::move(temp)); std::swap(this->m_has_val, rhs.m_has_val); #endif } public: template detail::enable_if_t::value && detail::is_swappable::value && (std::is_nothrow_move_constructible::value || std::is_nothrow_move_constructible::value)> swap(expected &rhs) noexcept( std::is_nothrow_move_constructible::value &&detail::is_nothrow_swappable::value &&std::is_nothrow_move_constructible::value &&detail::is_nothrow_swappable::value) { if (has_value() && rhs.has_value()) { swap_where_both_have_value(rhs, typename std::is_void::type{}); } else if (!has_value() && rhs.has_value()) { rhs.swap(*this); } else if (has_value()) { swap_where_only_one_has_value(rhs, typename std::is_void::type{}); } else { using std::swap; swap(err(), rhs.err()); } } constexpr const T *operator->() const { TL_ASSERT(has_value()); return valptr(); } TL_EXPECTED_11_CONSTEXPR T *operator->() { TL_ASSERT(has_value()); return valptr(); } template ::value> * = nullptr> constexpr const U &operator*() const & { TL_ASSERT(has_value()); return val(); } template ::value> * = nullptr> TL_EXPECTED_11_CONSTEXPR U &operator*() & { TL_ASSERT(has_value()); return val(); } template ::value> * = nullptr> constexpr const U &&operator*() const && { TL_ASSERT(has_value()); return std::move(val()); } template ::value> * = nullptr> TL_EXPECTED_11_CONSTEXPR U &&operator*() && { TL_ASSERT(has_value()); return std::move(val()); } constexpr bool has_value() const noexcept { return this->m_has_val; } constexpr explicit operator bool() const noexcept { return this->m_has_val; } template ::value> * = nullptr> TL_EXPECTED_11_CONSTEXPR const U &value() const & { if (!has_value()) detail::throw_exception(bad_expected_access(err().value())); return val(); } template ::value> * = nullptr> TL_EXPECTED_11_CONSTEXPR U &value() & { if (!has_value()) detail::throw_exception(bad_expected_access(err().value())); return val(); } template ::value> * = nullptr> TL_EXPECTED_11_CONSTEXPR const U &&value() const && { if (!has_value()) detail::throw_exception(bad_expected_access(std::move(err()).value())); return std::move(val()); } template ::value> * = nullptr> TL_EXPECTED_11_CONSTEXPR U &&value() && { if (!has_value()) detail::throw_exception(bad_expected_access(std::move(err()).value())); return std::move(val()); } constexpr const E &error() const & { TL_ASSERT(!has_value()); return err().value(); } TL_EXPECTED_11_CONSTEXPR E &error() & { TL_ASSERT(!has_value()); return err().value(); } constexpr const E &&error() const && { TL_ASSERT(!has_value()); return std::move(err().value()); } TL_EXPECTED_11_CONSTEXPR E &&error() && { TL_ASSERT(!has_value()); return std::move(err().value()); } template constexpr T value_or(U &&v) const & { static_assert(std::is_copy_constructible::value && std::is_convertible::value, "T must be copy-constructible and convertible to from U&&"); return bool(*this) ? **this : static_cast(std::forward(v)); } template TL_EXPECTED_11_CONSTEXPR T value_or(U &&v) && { static_assert(std::is_move_constructible::value && std::is_convertible::value, "T must be move-constructible and convertible to from U&&"); return bool(*this) ? std::move(**this) : static_cast(std::forward(v)); } }; namespace detail { template using exp_t = typename detail::decay_t::value_type; template using err_t = typename detail::decay_t::error_type; template using ret_t = expected>; #ifdef TL_EXPECTED_CXX14 template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), *std::declval()))> constexpr auto and_then_impl(Exp &&exp, F &&f) { static_assert(detail::is_expected::value, "F must return an expected"); return exp.has_value() ? detail::invoke(std::forward(f), *std::forward(exp)) : Ret(unexpect, std::forward(exp).error()); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval()))> constexpr auto and_then_impl(Exp &&exp, F &&f) { static_assert(detail::is_expected::value, "F must return an expected"); return exp.has_value() ? detail::invoke(std::forward(f)) : Ret(unexpect, std::forward(exp).error()); } #else template struct TC; template (), *std::declval())), detail::enable_if_t>::value> * = nullptr> auto and_then_impl(Exp &&exp, F &&f) -> Ret { static_assert(detail::is_expected::value, "F must return an expected"); return exp.has_value() ? detail::invoke(std::forward(f), *std::forward(exp)) : Ret(unexpect, std::forward(exp).error()); } template ())), detail::enable_if_t>::value> * = nullptr> constexpr auto and_then_impl(Exp &&exp, F &&f) -> Ret { static_assert(detail::is_expected::value, "F must return an expected"); return exp.has_value() ? detail::invoke(std::forward(f)) : Ret(unexpect, std::forward(exp).error()); } #endif #ifdef TL_EXPECTED_CXX14 template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), *std::declval())), detail::enable_if_t::value> * = nullptr> constexpr auto expected_map_impl(Exp &&exp, F &&f) { using result = ret_t>; return exp.has_value() ? result(detail::invoke(std::forward(f), *std::forward(exp))) : result(unexpect, std::forward(exp).error()); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), *std::declval())), detail::enable_if_t::value> * = nullptr> auto expected_map_impl(Exp &&exp, F &&f) { using result = expected>; if (exp.has_value()) { detail::invoke(std::forward(f), *std::forward(exp)); return result(); } return result(unexpect, std::forward(exp).error()); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval())), detail::enable_if_t::value> * = nullptr> constexpr auto expected_map_impl(Exp &&exp, F &&f) { using result = ret_t>; return exp.has_value() ? result(detail::invoke(std::forward(f))) : result(unexpect, std::forward(exp).error()); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval())), detail::enable_if_t::value> * = nullptr> auto expected_map_impl(Exp &&exp, F &&f) { using result = expected>; if (exp.has_value()) { detail::invoke(std::forward(f)); return result(); } return result(unexpect, std::forward(exp).error()); } #else template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), *std::declval())), detail::enable_if_t::value> * = nullptr> constexpr auto expected_map_impl(Exp &&exp, F &&f) -> ret_t> { using result = ret_t>; return exp.has_value() ? result(detail::invoke(std::forward(f), *std::forward(exp))) : result(unexpect, std::forward(exp).error()); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), *std::declval())), detail::enable_if_t::value> * = nullptr> auto expected_map_impl(Exp &&exp, F &&f) -> expected> { if (exp.has_value()) { detail::invoke(std::forward(f), *std::forward(exp)); return {}; } return unexpected>(std::forward(exp).error()); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval())), detail::enable_if_t::value> * = nullptr> constexpr auto expected_map_impl(Exp &&exp, F &&f) -> ret_t> { using result = ret_t>; return exp.has_value() ? result(detail::invoke(std::forward(f))) : result(unexpect, std::forward(exp).error()); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval())), detail::enable_if_t::value> * = nullptr> auto expected_map_impl(Exp &&exp, F &&f) -> expected> { if (exp.has_value()) { detail::invoke(std::forward(f)); return {}; } return unexpected>(std::forward(exp).error()); } #endif #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55) template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), std::declval().error())), detail::enable_if_t::value> * = nullptr> constexpr auto map_error_impl(Exp &&exp, F &&f) { using result = expected, detail::decay_t>; return exp.has_value() ? result(*std::forward(exp)) : result(unexpect, detail::invoke(std::forward(f), std::forward(exp).error())); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), std::declval().error())), detail::enable_if_t::value> * = nullptr> auto map_error_impl(Exp &&exp, F &&f) { using result = expected, monostate>; if (exp.has_value()) { return result(*std::forward(exp)); } detail::invoke(std::forward(f), std::forward(exp).error()); return result(unexpect, monostate{}); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), std::declval().error())), detail::enable_if_t::value> * = nullptr> constexpr auto map_error_impl(Exp &&exp, F &&f) { using result = expected, detail::decay_t>; return exp.has_value() ? result() : result(unexpect, detail::invoke(std::forward(f), std::forward(exp).error())); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), std::declval().error())), detail::enable_if_t::value> * = nullptr> auto map_error_impl(Exp &&exp, F &&f) { using result = expected, monostate>; if (exp.has_value()) { return result(); } detail::invoke(std::forward(f), std::forward(exp).error()); return result(unexpect, monostate{}); } #else template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), std::declval().error())), detail::enable_if_t::value> * = nullptr> constexpr auto map_error_impl(Exp &&exp, F &&f) -> expected, detail::decay_t> { using result = expected, detail::decay_t>; return exp.has_value() ? result(*std::forward(exp)) : result(unexpect, detail::invoke(std::forward(f), std::forward(exp).error())); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), std::declval().error())), detail::enable_if_t::value> * = nullptr> auto map_error_impl(Exp &&exp, F &&f) -> expected, monostate> { using result = expected, monostate>; if (exp.has_value()) { return result(*std::forward(exp)); } detail::invoke(std::forward(f), std::forward(exp).error()); return result(unexpect, monostate{}); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), std::declval().error())), detail::enable_if_t::value> * = nullptr> constexpr auto map_error_impl(Exp &&exp, F &&f) -> expected, detail::decay_t> { using result = expected, detail::decay_t>; return exp.has_value() ? result() : result(unexpect, detail::invoke(std::forward(f), std::forward(exp).error())); } template >::value> * = nullptr, class Ret = decltype(detail::invoke(std::declval(), std::declval().error())), detail::enable_if_t::value> * = nullptr> auto map_error_impl(Exp &&exp, F &&f) -> expected, monostate> { using result = expected, monostate>; if (exp.has_value()) { return result(); } detail::invoke(std::forward(f), std::forward(exp).error()); return result(unexpect, monostate{}); } #endif #ifdef TL_EXPECTED_CXX14 template (), std::declval().error())), detail::enable_if_t::value> * = nullptr> constexpr auto or_else_impl(Exp &&exp, F &&f) { static_assert(detail::is_expected::value, "F must return an expected"); return exp.has_value() ? std::forward(exp) : detail::invoke(std::forward(f), std::forward(exp).error()); } template (), std::declval().error())), detail::enable_if_t::value> * = nullptr> detail::decay_t or_else_impl(Exp &&exp, F &&f) { return exp.has_value() ? std::forward(exp) : (detail::invoke(std::forward(f), std::forward(exp).error()), std::forward(exp)); } #else template (), std::declval().error())), detail::enable_if_t::value> * = nullptr> auto or_else_impl(Exp &&exp, F &&f) -> Ret { static_assert(detail::is_expected::value, "F must return an expected"); return exp.has_value() ? std::forward(exp) : detail::invoke(std::forward(f), std::forward(exp).error()); } template (), std::declval().error())), detail::enable_if_t::value> * = nullptr> detail::decay_t or_else_impl(Exp &&exp, F &&f) { return exp.has_value() ? std::forward(exp) : (detail::invoke(std::forward(f), std::forward(exp).error()), std::forward(exp)); } #endif } // namespace detail template constexpr bool operator==(const expected &lhs, const expected &rhs) { return (lhs.has_value() != rhs.has_value()) ? false : (!lhs.has_value() ? lhs.error() == rhs.error() : *lhs == *rhs); } template constexpr bool operator!=(const expected &lhs, const expected &rhs) { return (lhs.has_value() != rhs.has_value()) ? true : (!lhs.has_value() ? lhs.error() != rhs.error() : *lhs != *rhs); } template constexpr bool operator==(const expected &lhs, const expected &rhs) { return (lhs.has_value() != rhs.has_value()) ? false : (!lhs.has_value() ? lhs.error() == rhs.error() : true); } template constexpr bool operator!=(const expected &lhs, const expected &rhs) { return (lhs.has_value() != rhs.has_value()) ? true : (!lhs.has_value() ? lhs.error() == rhs.error() : false); } template constexpr bool operator==(const expected &x, const U &v) { return x.has_value() ? *x == v : false; } template constexpr bool operator==(const U &v, const expected &x) { return x.has_value() ? *x == v : false; } template constexpr bool operator!=(const expected &x, const U &v) { return x.has_value() ? *x != v : true; } template constexpr bool operator!=(const U &v, const expected &x) { return x.has_value() ? *x != v : true; } template constexpr bool operator==(const expected &x, const unexpected &e) { return x.has_value() ? false : x.error() == e.value(); } template constexpr bool operator==(const unexpected &e, const expected &x) { return x.has_value() ? false : x.error() == e.value(); } template constexpr bool operator!=(const expected &x, const unexpected &e) { return x.has_value() ? true : x.error() != e.value(); } template constexpr bool operator!=(const unexpected &e, const expected &x) { return x.has_value() ? true : x.error() != e.value(); } template ::value || std::is_move_constructible::value) && detail::is_swappable::value && std::is_move_constructible::value && detail::is_swappable::value> * = nullptr> void swap(expected &lhs, expected &rhs) noexcept(noexcept(lhs.swap(rhs))) { lhs.swap(rhs); } } // namespace tl #endif ================================================ FILE: include/utils/finiteelement.h ================================================ #pragma once template class FiniteElement { //Element that wraps around (min, max) public: T _value; T _min; T _max; FiniteElement(T value, T min, T max) { _min = min; _max = max; _setValue(value); } FiniteElement(const FiniteElement& other) { if (this != &other) { _min = other._min; _max = other._max; _setValue(other._value); } } T _sizeOfField() { return (_max - _min); } T diffTo(FiniteElement end) { return diffTo(end._value); } //Used for interping rotators mostly T diffTo(T end) { //75 -> -25 is either -100 or +50 in (-100, 100), so we want +50 //Field: -50-100, midpoint is 100 - (100 + 50) / 2 FiniteElement tempElem(end, _min, _max); T initialDiff = tempElem._value - _value; T size = _sizeOfField(); if (abs(initialDiff) <= size / 2) //if difference is less than half, we already have the closest diff return initialDiff; //return -(_max - initialDiff); T midPoint = _max - ((_max - _min) / 2); if (tempElem._value < midPoint) { return tempElem._value + size - _value; } else if (tempElem._value >= midPoint) { return tempElem._value - size - _value; } return 0; } //Freezes RL when value is inf (when it is divided by 0). Should replace the while loops with some maths though void _setValue(T value) { T size = _sizeOfField(); _value = value; while (_value < _min) //Theres probably a nicer implementation for this { _value += size; } while (_value > _max) { _value -= size; } } FiniteElement& operator=(T& other) // move assignment { _setValue(other); return *this; } FiniteElement& operator=(FiniteElement& other) // move assignment { _min = other._min; _max = other._max; _setValue(other._value); return *this; } FiniteElement& operator=(const FiniteElement& other) // move assignment { _min = other._min; _max = other._max; _setValue(other._value); return *this; } template FiniteElement& operator*=(T2 f) { _setValue(_value * (T)f); //Determine if this cast is OK when im more awake return *this; } template FiniteElement& operator+=(T2 f) { _setValue(_value + (T)f); return *this; } template FiniteElement& operator-=(T2 f) { _setValue(_value - (T)f); return *this; } template FiniteElement& operator/=(T2 f) { _setValue(_value / (T)f); return *this; } template FiniteElement operator* (T2 f) { FiniteElement result = *this; result *= f; return result; } template FiniteElement operator+ (T2 f) { FiniteElement result = *this; result += f; return result; } template FiniteElement operator- (T2 f) { FiniteElement result = *this; result -= f; return result; } template FiniteElement operator/ (T2 f) { FiniteElement result = *this; result /= f; return result; } template explicit operator T2() { return (T2)_value; } template explicit operator T2() const { return (T2)_value; } }; ================================================ FILE: include/utils/io.h ================================================ #pragma once #include #include #include #include #include #include #include #include #include #include static inline bool file_exists(const std::string& name) { struct stat buffer; return (stat(name.c_str(), &buffer) == 0); } static std::istream& safeGetline(std::istream& is, std::string& t) { t.clear(); // The characters in the stream are read one-by-one using a std::streambuf. // That is faster than reading them one-by-one using the std::istream. // Code that uses streambuf this way must be guarded by a sentry object. // The sentry object performs various tasks, // such as thread synchronization and updating the stream state. std::istream::sentry se(is, true); std::streambuf* sb = is.rdbuf(); for (;;) { int c = sb->sbumpc(); switch (c) { case '\n': return is; case '\r': if (sb->sgetc() == '\n') sb->sbumpc(); return is; case EOF: // Also handle the case when the last line has no line ending if (t.empty()) is.setstate(std::ios::eofbit); return is; default: t += (char)c; } } } ================================================ FILE: include/utils/observer.h ================================================ #pragma once template class assignment_hook { public: typedef void (hook_t)(const T& old_value, const T& new_value); assignment_hook(T& value, hook_t hook) : ref_(value), hook_(hook) {} T& operator=(const T& rhs) { hook_(ref_, rhs); ref_ = rhs; } private: // I'd rather not want to think about copying this assignment_hook(const assignment_hook&); void operator=(const assignment_hook&); T& ref_; hook_t hook_; }; ================================================ FILE: include/utils/parser.h ================================================ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #undef min #undef max static inline int random(int min, int max) { return rand() % (max - min + 1) + min; } static inline float random(float min, float max) { return min + static_cast (rand()) / (static_cast (RAND_MAX / (max - min))); } static inline float random_with_exclude(float min, float max, float minExclude, float maxExclude) { float total_exclude = maxExclude - minExclude; float new_max = max - total_exclude; float result = random(min, new_max); return result > minExclude ? result + total_exclude : result; } static inline float get_safe_float_range(std::string val) { std::string lower = val.substr(1, val.find(",")); std::string upper = val.substr(val.find(",") + 1, val.size() - 1); float lowFloat = stof(lower); float highFloat = stof(upper); if (lowFloat > highFloat) { float temp = highFloat; highFloat = lowFloat; lowFloat = temp; } return random(lowFloat, highFloat); } template std::string to_string_with_precision(const T a_value, const int n = 4) { if (a_value <= 0.01f && a_value >= -0.01f) return "0.0000"; std::ostringstream out; out << std::fixed << std::setprecision(n) << a_value; return out.str(); } static inline bool string_ends_with(std::string const & value, std::string const & ending) { if (ending.size() > value.size()) return false; return std::equal(ending.rbegin(), ending.rend(), value.rbegin()); } static inline bool string_starts_with(std::string const & value, std::string const & begin) { return value.compare(0, begin.length(), begin) == 0; } static inline bool is_parsable(std::string val) { return string_starts_with(val, "(") && string_ends_with(val, ")") && val.find(",") != std::string::npos; } static inline size_t split(const std::string &txt, std::vector &strs, char ch) { size_t pos = txt.find(ch); size_t initialPos = 0; strs.clear(); // Decompose statement while (pos != std::string::npos) { strs.push_back(txt.substr(initialPos, pos - initialPos)); initialPos = pos + 1; pos = txt.find(ch, initialPos); } // Add the last one strs.push_back(txt.substr(initialPos, std::min((size_t)pos, txt.size()) - initialPos)); return strs.size(); } static inline float get_safe_float_range_exclude(std::string val) { val = val.substr(1, val.size() - 1); std::vector values; int range = random(0, (int)(floor(split(val, values, ',') / 2)) - 1); float lower = stof(values.at(range * 2)); float upper = stof(values.at(range * 2 + 1)); return random(lower, upper); } static inline float get_safe_float(std::string val) { try { if (is_parsable(val)) { return get_safe_float_range_exclude(val); /*int comma_amount = std::count(val.begin(), val.end(), ','); if (comma_amount == 3) { return get_safe_float_range_exclude(val); } else { return get_safe_float_range(val); }*/ } return (float)atof(val.c_str()); } catch (std::invalid_argument&) { return 0; } catch (std::out_of_range&) { return 0; } } static inline int get_safe_int(std::string val) { try { if (is_parsable(val)) { std::string lower = val.substr(1, val.find(",")); std::string upper = val.substr(val.find(",") + 1, val.size() - 1); int lowInt = stoi(lower); int highInt = stoi(upper); if (lowInt > highInt) { int temp = highInt; highInt = lowInt; lowInt = temp; } return random(lowInt, highInt); } return stoi(val); } catch (std::invalid_argument&) { return 0; } catch (std::out_of_range&) { return 0; } } static inline bool get_safe_bool(std::string val) { float f = get_safe_float(val); return f >= 0.5; } static inline LinearColor get_safe_color_rgba(std::string val) { LinearColor output = {0,0,0,0}; try { if(is_parsable(val)) { val = val.substr(1, val.size() - 1); std::vector values; split(val, values, ','); if(values.size() == 4) { output.R = stof(values.at(0)); output.G = stof(values.at(1)); output.B = stof(values.at(2)); output.A = stof(values.at(3)); } } return output; } catch (...) { return output; } } //Hexdecimal and LinearColor conversions static inline bool is_hex_valid(std::string val) { //If empty, invalid if(val.empty()) { return false; } //Remove the hashtag if there is one at the front if(val.at(0) == '#') { val.erase(0,1); } //Check if there are enough characters if(val.size() < 6) { return false; } //Check if all characters are within charSet static const std::string chars = "0123456789ABCDEF"; for(const auto& it : val) { if(chars.find(toupper(it)) == std::string::npos) { return false; } } return true; } static int single_hex_char_to_int(char input) { static const std::string Letters = "ABCDEF"; static const std::string Numbers = "0123456789"; if(Letters.find(input) != std::string::npos) { return input - 'A' + 10; } if(Numbers.find(input) != std::string::npos) { return input - '0'; } return 0; } static int hex_chars_to_int(std::string input) { //Convert 2 hex characters to their respective int (0-255) if(input.size() < 2) { return 0; } for(auto& c : input) c = toupper(c); int bigboi = single_hex_char_to_int(input.at(0)) * 16; int lilboi = single_hex_char_to_int(input.at(1)); return bigboi + lilboi; } static char single_hex_char_from_int(int input) { if(input >= 0 && input <= 9) { return ('0' + input); } return ('A' + input - 10); } static std::string int_to_hex_chars(int input) { //Convert int (0-255) to its respective 2 hex chars int bignum = input / 16; int lilnum = input - (16 * bignum); char bigboi = single_hex_char_from_int(bignum); char lilboi = single_hex_char_from_int(lilnum); std::string output; return output + bigboi + lilboi; } static inline LinearColor get_color_from_hex(std::string val) { //Color output will be in 0-255 range LinearColor output = {0,0,0,0}; if(!is_hex_valid(val)) { return output; } //Remove beginning # if it exists if(val.at(0) == '#') { val.erase(0,1); } //Add alpha characters if they don't exist if(val.size() < 8) { if(val.size() == 6) { val += "FF"; } if(val.size() == 7) { val += "F"; } } int R = hex_chars_to_int(val.substr(0,2)); int G = hex_chars_to_int(val.substr(2,2)); int B = hex_chars_to_int(val.substr(4,2)); int A = hex_chars_to_int(val.substr(6,2)); return LinearColor{static_cast(R), static_cast(G), static_cast(B), static_cast(A)}; } static inline std::string get_hex_from_color(LinearColor val) { //Color input must be in 0-255 range int R = static_cast(val.R); int G = static_cast(val.G); int B = static_cast(val.B); int A = static_cast(val.A); std::string output = "#"; output += int_to_hex_chars(R) + int_to_hex_chars(G) + int_to_hex_chars(B) + int_to_hex_chars(A); return output; } static inline std::string to_string_color(const LinearColor val) { return "(" + std::to_string(val.R) + ", " + std::to_string(val.G) + ", " + std::to_string(val.B) + ", " + std::to_string(val.A) + ")"; } // trim from start static inline std::string <rim(std::string &s) { /* error C2039 : 'ptr_fun' : is not a member of 'std'. */ //s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun(std::isspace)))); s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int c) {return !std::isspace(c); })); return s; } // trim from end static inline std::string &rtrim(std::string &s) { /* error C2039 : 'ptr_fun' : is not a member of 'std'. */ //s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun(std::isspace))).base(), s.end()); s.erase(std::find_if(s.rbegin(), s.rend(), [](int c) {return !std::isspace(c); }).base(), s.end()); return s; } // trim from both ends static inline std::string &trim(std::string &s) { return ltrim(rtrim(s)); } inline static std::vector>* parseConsoleInput(std::string input) { std::vector>* commands = new std::vector>(); std::vector currentParams; std::string currentString; char currentQuote = '\0'; for (std::string::size_type i = 0; i < input.length(); i++) { char c = input[i]; // Start/stop quoted block. if ((c == '"' || c == '\'') && (i == 0 || input[i - 1] != '\\')) { if (currentQuote == c) { currentQuote = '\0'; currentParams.push_back(currentString); currentString.clear(); } else if (currentQuote == '\0') currentQuote = c; else currentString += c; } else if (c == '\\' && i + 1 < input.length() && (input[i + 1] == '"' || input[i + 1] == '\'')) continue; // Check if we are in a quoted block. else if (currentQuote != '\0') currentString += c; // Split params. else if (c == ' ') { if (!currentString.empty()) { currentParams.push_back(currentString); currentString.clear(); } } // Grouped params. else if (c == '(') { currentString += "("; while (++i < input.length() && input[i] != ')') currentString += input[i]; currentString += ")"; } // New command. else if (c == ';') { currentParams.push_back(currentString); commands->push_back(currentParams); currentParams.clear(); currentString.clear(); } // Break on comments. else if (c == '/' && i + 1 < input.length() && input[i + 1] == '/') break; else currentString += c; } if (!currentString.empty()) currentParams.push_back(currentString); if (!currentParams.empty()) commands->push_back(currentParams); return commands; } static inline bool replace(std::string& str, const std::string& from, const std::string& to) { size_t start_pos = str.find(from); if (start_pos == std::string::npos) return false; str.replace(start_pos, from.length(), to); return true; } //inline static std::string to_string(std::string s) { // return s; //} // // //inline static std::string to_string(const char* s) { // return std::string(s); //} //inline static std::string to_string(char* s) { // return std::string(s); //} inline static std::string bool_to_string(bool s) { return s ? "1" : "0"; } //inline static std::string to_string(int s) { // return std::to_string(s); //} //inline static std::string to_string(float s) { // return std::to_string(s); //} // //inline static std::string to_string(long s) { // return std::to_string(s); //} // //inline static std::string to_string(double s) { // return std::to_string(s); //} /* base64.cpp and base64.h Copyright (C) 2004-2008 René Nyffenegger This source code is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this source code must not be misrepresented; you must not claim that you wrote the original source code. If you use this source code in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original source code. 3. This notice may not be removed or altered from any source distribution. René Nyffenegger rene.nyffenegger@adp-gmbh.ch */ static const std::string base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static inline bool is_base64(unsigned char c) { return (isalnum(c) || (c == '+') || (c == '/')); } inline static std::string base64_encode(unsigned char const* bytes_to_encode, unsigned int in_len) { std::string ret; int i = 0; int j = 0; unsigned char char_array_3[3]; unsigned char char_array_4[4]; while (in_len--) { char_array_3[i++] = *(bytes_to_encode++); if (i == 3) { char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); char_array_4[3] = char_array_3[2] & 0x3f; for (i = 0; (i <4); i++) ret += base64_chars[char_array_4[i]]; i = 0; } } if (i) { for (j = i; j < 3; j++) char_array_3[j] = '\0'; char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); char_array_4[3] = char_array_3[2] & 0x3f; for (j = 0; (j < i + 1); j++) ret += base64_chars[char_array_4[j]]; while ((i++ < 3)) ret += '='; } return ret; } inline static std::vector base64_decode_bytearr(std::string const& encoded_string) { size_t in_len = encoded_string.size(); int i = 0; int j = 0; int in_ = 0; size_t char_array_4[4], char_array_3[3]; std::vector ret; while (in_len-- && (encoded_string[in_] != '=') && is_base64(encoded_string[in_])) { char_array_4[i++] = encoded_string[in_]; in_++; if (i == 4) { for (i = 0; i <4; i++) char_array_4[i] = base64_chars.find((char)char_array_4[i]); char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; for (i = 0; (i < 3); i++) ret.push_back((char)char_array_3[i]); i = 0; } } if (i) { for (j = i; j <4; j++) char_array_4[j] = 0; for (j = 0; j <4; j++) char_array_4[j] = base64_chars.find((char)char_array_4[j]); char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; for (j = 0; (j < i - 1); j++) ret.push_back((char)char_array_3[j]); } return ret; } inline static std::string base64_decode(std::string const& encoded_string) { size_t in_len = encoded_string.size(); int i = 0; int j = 0; int in_ = 0; size_t char_array_4[4], char_array_3[3]; std::string ret; while (in_len-- && (encoded_string[in_] != '=') && is_base64(encoded_string[in_])) { char_array_4[i++] = encoded_string[in_]; in_++; if (i == 4) { for (i = 0; i <4; i++) char_array_4[i] = base64_chars.find((char)char_array_4[i]); char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; for (i = 0; (i < 3); i++) ret += (char)char_array_3[i]; i = 0; } } if (i) { for (j = i; j <4; j++) char_array_4[j] = 0; for (j = 0; j <4; j++) char_array_4[j] = base64_chars.find((char)char_array_4[j]); char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; for (j = 0; (j < i - 1); j++) ret += (char)char_array_3[j]; } return ret; } /* Binary writer which optimizes for bit size. Programmer has to specify the number of LSB bits to store */ template class BitBinaryWriter { public: const int type_size = sizeof(A) * 8; int current_bit = 0; A* buffer; BitBinaryWriter(int bufferSize) { buffer = (A*)calloc(bufferSize, type_size); } ~BitBinaryWriter() { delete buffer; } template void WriteBits(T t, int useLSBcount = sizeof(T)*8) { T t2 = t; for (int i = 0; i < useLSBcount; i++) { if (t2 & 1) { buffer[current_bit / type_size] |= (1 << (current_bit % type_size)); } else { buffer[current_bit / type_size] &= ~(1 << (current_bit % type_size)); } current_bit++; t2 >>= 1; } } void WriteBool(bool b) { WriteBits(b ? 1 : 0, 1); //Use ternary to ensure last bit contains true false } uint8_t CalculateCRC(int startByte, int endByte) { uint8_t crc = 0b11111111; for (int i = startByte; i < endByte; i++) { crc = crc ^ buffer[i]; } return crc; } std::string ToHex() { return base64_encode(buffer, current_bit / type_size + 1); } }; template class BitBinaryReader { public: const int type_size = sizeof(A) * 8; int current_bit = 0; A* buffer; BitBinaryReader(std::string hexString) { std::vector decodedVector = base64_decode_bytearr(hexString); //std::string decoded = base64_decode(hexString); //const char* data = decoded.c_str(); buffer = (A*)malloc(decodedVector.size()); memcpy(buffer, &decodedVector[0], decodedVector.size()); } BitBinaryReader(A* inBuf) { buffer = inBuf; } ~BitBinaryReader() { delete buffer; } template T ReadBits(int useLSBcount = sizeof(T) * 8) { T t = 0; for (int i = 0; i < useLSBcount; i++) { t |= ((buffer[current_bit / type_size] >> (current_bit % type_size)) & 1) << i; current_bit++; } return t; } uint8_t CalculateCRC(int startByte, int endByte) { uint8_t crc = 0b11111111; for (int i = startByte; i < endByte; i++) { crc = crc ^ buffer[i]; } return crc; } bool VerifyCRC(uint8_t crc, int startByte, int endByte) { return (crc ^ CalculateCRC(startByte, endByte)) == 0; } bool ReadBool() { return ReadBits(1) & 1; //Use ternary to ensure last bit contains true false } }; #include // For va_start, etc. #include // For std::unique_ptr //Source: https://stackoverflow.com/questions/2342162/stdstring-formatting-like-sprintf static inline std::string string_format(const std::string fmt_str, ...) { int final_n, n = ((int)fmt_str.size()) * 2; /* Reserve two times as much as the length of the fmt_str */ std::unique_ptr formatted; va_list ap; while (1) { formatted.reset(new char[n]); /* Wrap the plain char array into the unique_ptr */ strcpy_s(&formatted[0], n, fmt_str.c_str()); va_start(ap, fmt_str); final_n = vsnprintf(&formatted[0], n, fmt_str.c_str(), ap); va_end(ap); if (final_n < 0 || final_n >= n) n += abs(final_n - n + 1); else break; } return std::string(formatted.get()); } static inline std::string wstring_to_string(const std::wstring& InWString) { if (InWString.empty()) return std::string(); int size_needed = WideCharToMultiByte(CP_UTF8, 0, &InWString[0], (int)InWString.size(), NULL, 0, NULL, NULL); std::string strTo(size_needed, 0); WideCharToMultiByte(CP_UTF8, 0, &InWString[0], (int)InWString.size(), &strTo[0], size_needed, NULL, NULL); return strTo; }