summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorRay <[email protected]>2023-10-26 23:59:19 +0200
committerRay <[email protected]>2023-10-26 23:59:19 +0200
commit99dac5451cad1c45c0a6b1da5c6175a7575f3403 (patch)
tree9d57e05269c3816369ed4f494436757b82436935 /src/raylib.h
parent067dbe8657436e4778a91ea69c260f5beba48ec6 (diff)
downloadraylib-99dac5451cad1c45c0a6b1da5c6175a7575f3403.tar.gz
raylib-99dac5451cad1c45c0a6b1da5c6175a7575f3403.zip
ADDED: Automation Events System, exposed to users
Added new API to record and play events Added examples illustrating functionality
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/raylib.h b/src/raylib.h
index b172562d..7b3eddae 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -506,6 +506,20 @@ typedef struct FilePathList {
char **paths; // Filepaths entries
} FilePathList;
+// Automation event (opaque struct)
+typedef struct AutomationEvent {
+ unsigned int frame; // Event frame
+ unsigned int type; // Event type (AutomationEventType)
+ int params[4]; // Event parameters (if required)
+} AutomationEvent;
+
+// Automation event list
+typedef struct AutomationEventList {
+ unsigned int capacity; // Events max entries (MAX_AUTOMATION_EVENTS)
+ unsigned int count; // Events entries count
+ AutomationEvent *events; // Events entries
+} AutomationEventList;
+
//----------------------------------------------------------------------------------
// Enumerators Definition
//----------------------------------------------------------------------------------
@@ -1114,6 +1128,15 @@ RLAPI unsigned char *DecompressData(const unsigned char *compData, int compDataS
RLAPI char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string, memory must be MemFree()
RLAPI unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree()
+// Automation events functionality
+RLAPI AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
+RLAPI void UnloadAutomationEventList(AutomationEventList *list); // Unload automation events list from file
+RLAPI bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file
+RLAPI void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to
+RLAPI void StartAutomationEventRecording(void); // Start recording automation events (AutomationEventList must be set)
+RLAPI void StopAutomationEventRecording(void); // Stop recording automation events
+RLAPI void PlayAutomationEvent(AutomationEvent event); // Play a recorded automation event
+
//------------------------------------------------------------------------------------
// Input Handling Functions (Module: core)
//------------------------------------------------------------------------------------