Mercurial > molko
diff libmlk-core/mlk/core/state.h @ 645:83781cc87fca
core: rework game stack state mechanism
The current model was fundamentally broken as the state could continue its
execution when calling mlk_game_pop from itself (e.g. in update).
The current model uses a sjlj mechanism with mlk_game_push/pop being disallowed
in special state function like end, finish, suspend.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 04 Feb 2024 15:24:00 +0100 |
parents | 7fb5a859bcb4 |
children |
line wrap: on
line diff
--- a/libmlk-core/mlk/core/state.h Sat Dec 23 09:34:04 2023 +0100 +++ b/libmlk-core/mlk/core/state.h Sun Feb 04 15:24:00 2024 +0100 @@ -44,6 +44,13 @@ void *data; /** + * (read-write, borrowed, optional) + * + * Arbitrary state name for diagnostic purposes. + */ + const char *name; + + /** * (read-write, optional) * * Invoked when the state starts, which is called only one time.