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

Dynamic variable allocation #18

Open
x87 opened this issue Aug 1, 2017 · 1 comment
Open

Dynamic variable allocation #18

x87 opened this issue Aug 1, 2017 · 1 comment

Comments

@x87
Copy link
Contributor

x87 commented Aug 1, 2017

idea mentioned there thelink2012/gta3sc#117
needs a design.

@x87 x87 added the new feature label Aug 1, 2017
@thelink2012
Copy link
Member

thelink2012 commented Sep 11, 2017

My idea was primarily based on creating some pluggable way to extend the CRunningScript structure (#14), and then CLEO itself could make use of this interface to allocate more variables.

A custom header would be added to the script file indicating that it wishes to use the dynamic variable system, This header would inform the scripting system how many variables should be allocated as well This way, we don't need to keep things on the TLS array. All scripts wishing to use more variables would basically be accepting the contract of not relying on the TLS array offset, and instead using the GET_VAR_POINTER command.

Some prototype of the pluggable system is on some branch at some fork of mine. It's no more than a prototype, given its use of slow data structures for the task. See #14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants