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

Release texture after use #91

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

4z0t
Copy link
Member

@4z0t 4z0t commented Oct 1, 2024

Fixes unreleased texture in custom world rendering.

@4z0t 4z0t requested a review from Hdt80bro October 1, 2024 13:43
section/DrawFunc.cpp Outdated Show resolved Hide resolved
asm("call 0x004260B0;" : : [t] "a"(t) : "edx", "ecx");
void *ReleaseTexture(Texture *t) {
void *__result;
asm("call 0x004260B0;" : "=a"(__result) : [t] "a"(t) : "edx", "ecx");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Function 0x004260B0 doesn't return anything

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but it alters eax register. I'm not sure how compiler may behave without return value, since it is different from argument.

Copy link
Member Author

Choose a reason for hiding this comment

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

And you can't put it in clobbers eaither

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