-
Notifications
You must be signed in to change notification settings - Fork 127
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] abi2 prototype #468
base: master
Are you sure you want to change the base?
[WIP] abi2 prototype #468
Conversation
…roken engine headers * It must be safest commit in this branch, as we only replace int by string_t, which is already int by default.
* Entity Interface call pfnCreateNamedEntity actually accepts string_t * viewmodel and weaponmodel in entvars_t are actually used as string_t
* we define a new class called string_t that's only allowed to be converted from and to ptrdiff_t * it specifically doesn't allow conversion to int on 64-bit platform only to ptrdiff_t. For now it just checks defined XASH_64BIT macro but check better be remade with some std::enable_if magic * mark ABI2 binaries with _st64 prefix
I also think it must be pretty much possible to load both abi1 and abi2 binaries on engine side. |
Stuff like It's already defined in save restore as FIELD_INTEGER. I think the string could be moved elsewhere, I don't see where it's used by the engine, and it's not really used by game dll as a string value that much. But it's more porting existing code compared to ABI1 anyway. |
Could you provide more context on what it is? |
@FreeSlave yeah. Historically, But it has few downsides:
By just making |
By making process of 64-bit porting a bit more complicated. In short, first ABI was easier on HLSDK side but harder for engine. ABI2 makes it very easy for engine but harder for HLSDK and mostly because of fixing up for buggy |
This is just a prototype. Now made in more thoughtful process, and proper class wrapper that helps to avoid string_t<>int conversions.
Though I'm really have mixed feelings on how it turned it anyway, especially with broken engine headers.