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

Save states I guess #370

Merged
merged 5 commits into from
Feb 4, 2024
Merged

Save states I guess #370

merged 5 commits into from
Feb 4, 2024

Conversation

Dregu
Copy link
Collaborator

@Dregu Dregu commented Feb 3, 2024

Estebanfer just dropped this feature in the Discord, I only added API, UI and some checks...

  • save_state(slot) Save current level state to slot 1..4
  • load_state(slot) Load saved slot
  • StateMemory* get_save_state(slot) 1..5

I believe these state copies are invalid after unloading the current level (at least loading from next level just crashed a lot), but not cleared, so I added a thing to invalidate them on level unload. Death screen is automatically cleared if loading from UI, but I'm not even sure if that's already messing with fate too much, or should it be part of the api too...

@Dregu Dregu merged commit 188dddd into main Feb 4, 2024
10 checks passed
@Dregu Dregu deleted the SaveStates branch February 4, 2024 21:33
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.

1 participant