Dolphin_srv: fix state load on startup (#731)
* Dolphin_srv: fix dolphin state load on startup * Dolphin: new sync and async API, state autosave. Makefile: properly escaped asterisks. Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -8,14 +8,16 @@
|
||||
|
||||
typedef enum {
|
||||
DolphinEventTypeDeed,
|
||||
DolphinEventTypeSave,
|
||||
DolphinEventTypeTick,
|
||||
DolphinEventTypeStats,
|
||||
DolphinEventTypeFlush,
|
||||
} DolphinEventType;
|
||||
|
||||
typedef struct {
|
||||
DolphinEventType type;
|
||||
osEventFlagsId_t flag;
|
||||
union {
|
||||
DolphinDeed deed;
|
||||
DolphinStats* stats;
|
||||
};
|
||||
} DolphinEvent;
|
||||
|
||||
@@ -29,3 +31,9 @@ struct Dolphin {
|
||||
Dolphin* dolphin_alloc();
|
||||
|
||||
void dolphin_free(Dolphin* dolphin);
|
||||
|
||||
void dolphin_event_send_async(Dolphin* dolphin, DolphinEvent* event);
|
||||
|
||||
void dolphin_event_send_wait(Dolphin* dolphin, DolphinEvent* event);
|
||||
|
||||
void dolphin_event_release(Dolphin* dolphin, DolphinEvent* event);
|
||||
|
Reference in New Issue
Block a user