You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many structs and classes are designed to match the internal memory layout used in Outpost2.exe. As such, they are size and padding sensitive. We should add static_assert checks to ensure structs and classes have, at minimum, a size that matches what Outpost2.exe uses.
Particular attention should be paid to structs or classes that use varying size enums, such as map_id. Pull Request #17 touched on this.
A proposal for a helper macro is in Pull Request #18.
The text was updated successfully, but these errors were encountered:
A quick grep of the source shows there's still much more work to do. I'll probably try to complete this in sections.
Adding a space after "struct" helps filter some of the noise, and shows both struct definitions and the static size checks recently added. That gives a quick glance of what needs to be done. Should probably do this for classes too.
Many structs and classes are designed to match the internal memory layout used in Outpost2.exe. As such, they are size and padding sensitive. We should add
static_assert
checks to ensure structs and classes have, at minimum, a size that matches what Outpost2.exe uses.Particular attention should be paid to structs or classes that use varying size enums, such as
map_id
. Pull Request #17 touched on this.A proposal for a helper macro is in Pull Request #18.
The text was updated successfully, but these errors were encountered: