-
Notifications
You must be signed in to change notification settings - Fork 39
API v1 #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
WSSDude
wants to merge
2
commits into
wopss:master
Choose a base branch
from
WSSDude:features/api-update
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
API v1 #178
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
exclude: ^vendor/ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
exclude: ^vendor/ | ||
- id: end-of-file-fixer | ||
exclude: ^vendor/ | ||
- id: check-added-large-files | ||
exclude: ^vendor/ | ||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v19.1.7 | ||
hooks: | ||
- id: clang-format | ||
exclude: ^vendor/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ namespace RED4ext | |
enum class EMainReason : uint8_t | ||
{ | ||
Load = 0, | ||
Unload | ||
Unload, | ||
Run | ||
}; | ||
} // namespace RED4ext |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#pragma once | ||
|
||
#include <RED4ext/Api/v0/FileVer.hpp> | ||
#include <RED4ext/Api/v1/FileVer.hpp> | ||
|
||
/** | ||
* @brief Creates a file version using the latest version info type. | ||
*/ | ||
#define RED4EXT_FILEVER(major, minor, build, revision) RED4EXT_V0_FILEVER(major, minor, build, revision) | ||
#define RED4EXT_FILEVER(major, minor, build, revision) RED4EXT_V1_FILEVER(major, minor, build, revision) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
#pragma once | ||
|
||
#include <Windows.h> | ||
|
||
namespace RED4ext | ||
{ | ||
/** | ||
* @brief The identifier of the plugin. | ||
*/ | ||
using PluginHandle = HMODULE; | ||
using PluginHandle = void*; | ||
} // namespace RED4ext |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
#pragma once | ||
|
||
#include <RED4ext/Api/v0/Runtime.hpp> | ||
#include <RED4ext/Api/v1/Runtime.hpp> | ||
|
||
#define RED4EXT_RUNTIME_1_50 RED4EXT_V0_RUNTIME_1_50 | ||
#define RED4EXT_RUNTIME_1_50_HOTFIX_1 RED4EXT_V0_RUNTIME_1_50_HOTFIX_1 | ||
#define RED4EXT_RUNTIME_1_50_HOTFIX_2 RED4EXT_V0_RUNTIME_1_50_HOTFIX_2 | ||
#define RED4EXT_RUNTIME_1_52 RED4EXT_V0_RUNTIME_1_52 | ||
#define RED4EXT_RUNTIME_1_52_HOTFIX_1 RED4EXT_V0_RUNTIME_1_52_HOTFIX_1 | ||
#define RED4EXT_RUNTIME_1_60 RED4EXT_V0_RUNTIME_1_60 | ||
#define RED4EXT_RUNTIME_1_61 RED4EXT_V0_RUNTIME_1_61 | ||
#define RED4EXT_RUNTIME_1_61_HOTFIX_1 RED4EXT_V0_RUNTIME_1_61_HOTFIX_1 | ||
#define RED4EXT_RUNTIME_1_62 RED4EXT_V0_RUNTIME_1_62 | ||
#define RED4EXT_RUNTIME_1_62_HOTFIX_1 RED4EXT_V0_RUNTIME_1_62_HOTFIX_1 | ||
#define RED4EXT_RUNTIME_1_63 RED4EXT_V0_RUNTIME_1_63 | ||
#define RED4EXT_RUNTIME_1_63_HOTFIX_1 RED4EXT_V0_RUNTIME_1_63_HOTFIX_1 | ||
#define RED4EXT_RUNTIME_2_00 RED4EXT_V0_RUNTIME_2_00 | ||
#define RED4EXT_RUNTIME_2_01 RED4EXT_V0_RUNTIME_2_01 | ||
#define RED4EXT_RUNTIME_2_02 RED4EXT_V0_RUNTIME_2_02 | ||
#define RED4EXT_RUNTIME_2_10 RED4EXT_V0_RUNTIME_2_10 | ||
#define RED4EXT_RUNTIME_2_11 RED4EXT_V0_RUNTIME_2_11 | ||
#define RED4EXT_RUNTIME_2_12 RED4EXT_V0_RUNTIME_2_12 | ||
#define RED4EXT_RUNTIME_2_12_HOTFIX_1 RED4EXT_V0_RUNTIME_2_12_HOTFIX_1 | ||
#define RED4EXT_RUNTIME_2_13 RED4EXT_V0_RUNTIME_2_13 | ||
#define RED4EXT_RUNTIME_2_20 RED4EXT_V0_RUNTIME_2_20 | ||
#define RED4EXT_RUNTIME_2_21 RED4EXT_V0_RUNTIME_2_21 | ||
#define RED4EXT_RUNTIME_1_50 RED4EXT_V1_RUNTIME_1_50 | ||
#define RED4EXT_RUNTIME_1_50_HOTFIX_1 RED4EXT_V1_RUNTIME_1_50_HOTFIX_1 | ||
#define RED4EXT_RUNTIME_1_50_HOTFIX_2 RED4EXT_V1_RUNTIME_1_50_HOTFIX_2 | ||
#define RED4EXT_RUNTIME_1_52 RED4EXT_V1_RUNTIME_1_52 | ||
#define RED4EXT_RUNTIME_1_52_HOTFIX_1 RED4EXT_V1_RUNTIME_1_52_HOTFIX_1 | ||
#define RED4EXT_RUNTIME_1_60 RED4EXT_V1_RUNTIME_1_60 | ||
#define RED4EXT_RUNTIME_1_61 RED4EXT_V1_RUNTIME_1_61 | ||
#define RED4EXT_RUNTIME_1_61_HOTFIX_1 RED4EXT_V1_RUNTIME_1_61_HOTFIX_1 | ||
#define RED4EXT_RUNTIME_1_62 RED4EXT_V1_RUNTIME_1_62 | ||
#define RED4EXT_RUNTIME_1_62_HOTFIX_1 RED4EXT_V1_RUNTIME_1_62_HOTFIX_1 | ||
#define RED4EXT_RUNTIME_1_63 RED4EXT_V1_RUNTIME_1_63 | ||
#define RED4EXT_RUNTIME_1_63_HOTFIX_1 RED4EXT_V1_RUNTIME_1_63_HOTFIX_1 | ||
#define RED4EXT_RUNTIME_2_00 RED4EXT_V1_RUNTIME_2_00 | ||
#define RED4EXT_RUNTIME_2_01 RED4EXT_V1_RUNTIME_2_01 | ||
#define RED4EXT_RUNTIME_2_02 RED4EXT_V1_RUNTIME_2_02 | ||
#define RED4EXT_RUNTIME_2_10 RED4EXT_V1_RUNTIME_2_10 | ||
#define RED4EXT_RUNTIME_2_11 RED4EXT_V1_RUNTIME_2_11 | ||
#define RED4EXT_RUNTIME_2_12 RED4EXT_V1_RUNTIME_2_12 | ||
#define RED4EXT_RUNTIME_2_12_HOTFIX_1 RED4EXT_V1_RUNTIME_2_12_HOTFIX_1 | ||
#define RED4EXT_RUNTIME_2_13 RED4EXT_V1_RUNTIME_2_13 | ||
#define RED4EXT_RUNTIME_2_20 RED4EXT_V1_RUNTIME_2_20 | ||
#define RED4EXT_RUNTIME_2_21 RED4EXT_V1_RUNTIME_2_21 | ||
|
||
/** | ||
* @brief Supports all game versions. | ||
* @note Only use this if you do not use RED4ext.SDK library, but you want to use RED4ext as a loader only. | ||
*/ | ||
#define RED4EXT_RUNTIME_INDEPENDENT RED4EXT_V0_RUNTIME_INDEPENDENT | ||
#define RED4EXT_RUNTIME_INDEPENDENT RED4EXT_V1_RUNTIME_INDEPENDENT | ||
|
||
/* | ||
* @brief The latest game version. | ||
*/ | ||
#define RED4EXT_RUNTIME_LATEST RED4EXT_V0_RUNTIME_LATEST | ||
#define RED4EXT_RUNTIME_LATEST RED4EXT_V1_RUNTIME_LATEST |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,59 @@ | ||
#pragma once | ||
|
||
#include <RED4ext/Api/v0/PluginInfo.hpp> | ||
#include <RED4ext/Api/v0/Sdk.hpp> | ||
#include <RED4ext/Api/v1/PluginInfo.hpp> | ||
#include <RED4ext/Api/v1/Sdk.hpp> | ||
|
||
namespace RED4ext | ||
{ | ||
/** | ||
* @brief The latest plugin info type. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd delete "the latest" from all comments. |
||
*/ | ||
using PluginInfo = v0::PluginInfo; | ||
using PluginInfo = v1::PluginInfo; | ||
|
||
/** | ||
* @brief The latest version info type. | ||
*/ | ||
using SemVer = v0::SemVer; | ||
using SemVer = v1::SemVer; | ||
|
||
/** | ||
* @brief The latest version info type. | ||
*/ | ||
using FileVer = v0::FileVer; | ||
using FileVer = v1::FileVer; | ||
|
||
/** | ||
* @brief The latest RED4ext. | ||
*/ | ||
using Sdk = v0::Sdk; | ||
using Sdk = v1::Sdk; | ||
|
||
/** | ||
* @brief The latest hooking. | ||
* @brief The latest logger. | ||
*/ | ||
using Logger = v0::Logger; | ||
using Logger = v1::Logger; | ||
|
||
/** | ||
* @brief The latest hooking. | ||
*/ | ||
using Hooking = v0::Hooking; | ||
using Hooking = v1::Hooking; | ||
|
||
/** | ||
* @brief The latest game state handler. | ||
*/ | ||
using GameStates = v1::GameStates; | ||
|
||
/** | ||
* @brief The latest game state type. | ||
* @brief The latest game state for hooking. | ||
*/ | ||
using GameStates = v0::GameStates; | ||
using GameState = v1::GameState; | ||
|
||
/** | ||
* @brief The latest game state type. | ||
* @brief The latest scripts compiler interface. | ||
*/ | ||
using GameState = v0::GameState; | ||
using Scripts = v1::Scripts; | ||
|
||
/** | ||
* @brief The latest game state type. | ||
* @brief The latest game state hook result. | ||
*/ | ||
using Scripts = v0::Scripts; | ||
using EGameStateResult = v1::EGameStateResult; | ||
} // namespace RED4ext | ||
|
||
/* | ||
|
@@ -60,5 +65,5 @@ using Scripts = v0::Scripts; | |
*/ | ||
#ifndef RED4EXT_OFFSET_TO_ADDR | ||
#define RED4EXT_OFFSET_TO_ADDR(offset) \ | ||
reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(GetModuleHandle(nullptr)) + offset) | ||
reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(GetModuleHandleW(nullptr)) + offset) | ||
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#pragma once | ||
|
||
#include <RED4ext/Api/v0/SemVer.hpp> | ||
#include <RED4ext/Api/v1/SemVer.hpp> | ||
|
||
/** | ||
* @brief Creates a semantic version using the latest version info type. | ||
*/ | ||
#define RED4EXT_SEMVER_EX(major, minor, patch, prereleaseType, prereleaseNumber) \ | ||
RED4EXT_V0_SEMVER_EX(major, minor, patch, prereleaseType, prereleaseNumber) | ||
RED4EXT_V1_SEMVER_EX(major, minor, patch, prereleaseType, prereleaseNumber) | ||
|
||
/** | ||
* @brief Creates a semantic version using the latest version info type. | ||
*/ | ||
#define RED4EXT_SEMVER(major, minor, patch) RED4EXT_V0_SEMVER(major, minor, patch) | ||
#define RED4EXT_SEMVER(major, minor, patch) RED4EXT_V1_SEMVER(major, minor, patch) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.