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

State refactor #407

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

State refactor #407

wants to merge 25 commits into from

Conversation

Mr-Auto
Copy link
Contributor

@Mr-Auto Mr-Auto commented Dec 30, 2024

  • implement struct for the custom allocated heap
  • move functions from State to StateMemory or standalone
  • find better place for all the hooks initialization
  • get rid of the State struct

… save/load save state saving/loading from/to slot 5 which is not guaranteed to be the main after online session
src/game_api/thread_utils.hpp Outdated Show resolved Hide resolved
src/game_api/thread_utils.hpp Outdated Show resolved Hide resolved
@@ -18,6 +18,7 @@ Illumination* create_illumination(Vec2 pos, Color col, LIGHT_TYPE type, float si

typedef Illumination* create_illumination_func(custom_vector<Illumination*>*, Vec2*, Color, LIGHT_TYPE, float, uint8_t light_flags, int32_t uid, uint8_t layer);
static create_illumination_func* cif = (create_illumination_func*)(offset);
// enum_to_layer here does not use offset which you could argue should be used, since this function is comparable with spawn type function
Copy link
Contributor Author

@Mr-Auto Mr-Auto Jan 4, 2025

Choose a reason for hiding this comment

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

Should i change this, or you recon this has been in API for too long like this and potentially breaking change for some mods is not worth it?

src/game_api/thread_utils.hpp Outdated Show resolved Hide resolved
@Mr-Auto Mr-Auto marked this pull request as ready for review January 7, 2025 21:29
@Mr-Auto Mr-Auto mentioned this pull request Jan 9, 2025
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