Skip to content
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

Pointer Cache #140

Closed
wants to merge 10 commits into from
Closed

Pointer Cache #140

wants to merge 10 commits into from

Conversation

Rxann
Copy link
Contributor

@Rxann Rxann commented May 3, 2024

Implements a pointer cache that drastically improves load times with the menu. This makes it so much more user friendly.

@Rxann
Copy link
Contributor Author

Rxann commented May 28, 2024

@MarkEcza opinions on this?

@@ -129,6 +133,8 @@ namespace YimMenu
{
bool Init();
void Restore();
// BUMP VERSION EVERYTIME AN UPDATE IS MADE TO POINTERS
PointerCache Cache{1};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having to manually bump it can you not write the queue size to the file each time and compare it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this approach, wouldn't we have to scan for the pointer to get the size? I could be misunderstanding, but if I am interpreting it correctly, that would kind of defeat the purpose of not having to scan for it in the first place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this approach, wouldn't we have to scan for the pointer to get the size? I could be misunderstanding, but if I am interpreting it correctly, that would kind of defeat the purpose of not having to scan for it in the first place.

I mean before scanning when it's added to the queue. Also you can do game version checks if you still haven't.
E8 ? ? ? ? 4C 8D 4C 24 ? 89 5D 68 + 1 .rip as func const char*(*)() will give you the build version if the sig didn't update

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, so I should be saving the length of the sig too and I can check if the lengths match then update them or not. I will have to rewrite a lot with this because I won't be able to use std::pair. I mean I could just have another pair with the signature and the length. That would work too.

Copy link

Download the artifacts for this pull request:

@Rxann Rxann closed this Aug 15, 2024
@Rxann Rxann deleted the pointer-cache branch August 15, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants