-
Notifications
You must be signed in to change notification settings - Fork 37
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
Promote v0 to v1, extend v1 and extend GpuApi #178
Draft
WSSDude
wants to merge
5
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.
Draft
Changes from all commits
Commits
Show all changes
5 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 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 |
---|---|---|
|
@@ -111,6 +111,7 @@ else() | |
RED4EXT_STATIC_LIB | ||
PRIVATE | ||
WIN32_LEAN_AND_MEAN | ||
NOMINMAX | ||
) | ||
|
||
if(RED4EXT_USE_PCH) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ namespace RED4ext | |
enum class EMainReason : uint8_t | ||
{ | ||
Load = 0, | ||
Unload | ||
Unload, | ||
Run | ||
}; | ||
} // namespace RED4ext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 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 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 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 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 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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the advantage of having this instead of just using GameStates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@psiberx wanted to include this for those that do not need to be hooking but only know that the game initialized and is running. He even suggested to call it from Running::OnEnter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about calling it on
Running::OnTick
and change it toTick
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess at that point, you may hook the game state. Believe psi wanted this as a one-off notification before first OnTick. Also am uncertain from this if you mean there would be some continuous notification, then I suppose it may as well truly be a game state hook 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only advantage is easier entry for beginners. I didn't suggest adding it though, just gave an example of how it could be handled. In
Load
you can't even do anything engine/game related. The game states are hard to understand and at least need a better description, explaining which systems exactly are initialized at what point.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was unsure now if I should keep it or not, kept it for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with keeping it.