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

[WIP] Warn mod developer about reaching the GoldSrc sentences limits #413

Merged
merged 2 commits into from
Jan 28, 2024

Conversation

a1batross
Copy link
Member

Quick draft for an idea suggested by @FreeSlave

Should it be more complicated? Should this check be removed without GOLDSOURCE_SUPPORT, which is only for client.dll now?

@FreeSlave
Copy link
Member

Will you apply proposed changes and merge it? You can request review from other members.

@nekonomicon
Copy link
Member

What I can say, there may be useful dynamic arrays for platforms with low memory.
If you don't have other ideas or suggestions I will merge it.

@FreeSlave
Copy link
Member

Can 48 KB make a significant difference in this context though?
And if it's a real problem, are there any other places in hlsdk where we could optimize for size? Maybe add another compile-time variable then?

@a1batross
Copy link
Member Author

The sentence array size definitely must match the engine. There is no reason not to. If some port is limited by memory, the sizes must be decreased in engine first, and then applied to HLSDK.

As for dynamic allocations... it might be useful, I agree. But this isn't something I wanted to do in such PR.


By the way, why I didn't hide these warnings under SUPPORT_GOLDSOURCE_ENGINE? To me, it makes sense.

@FreeSlave
Copy link
Member

The GOLDSOURCE_SUPPORT is used only on client now. You'll need to forward the definition in server CMakeLists as well.

@nekonomicon
Copy link
Member

Can 48 KB make a significant difference in this context though?

It's may be crititcal on psp and ps vita at least.
With current change will be 64KiB on disk and in memory.
In android builds will be 256KiB on disk.
Plus array on engine side eats the same free space too.

And if it's a real problem, are there any other places in hlsdk where we could optimize for size?

Array for textures in pm_shared.c probably.

@nekonomicon nekonomicon merged commit 6e47281 into master Jan 28, 2024
8 checks passed
@nekonomicon nekonomicon deleted the sentencewarn branch January 28, 2024 09:17
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.

3 participants