Events starting

This commit is contained in:
2025-06-24 23:56:31 -05:00
parent 5520945022
commit 6ba03235dd
9 changed files with 188 additions and 10 deletions

8
src/dusk/event/event.c Normal file
View File

@ -0,0 +1,8 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "event.h"

29
src/dusk/event/event.h Normal file
View File

@ -0,0 +1,29 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "eventtext.h"
typedef enum {
EVENT_TYPE_NULL = 0,
EVENT_TYPE_TEXT,
} eventtype_t;
typedef struct _eventitem_t {
eventtype_t type;
union {
eventtext_t texts;
};
} eventitem_t;
#define EVENT_ITEM_COUNT_MAX 32
typedef struct {
uint8_t itemCount;
eventitem_t items[EVENT_ITEM_COUNT_MAX];
} event_t;

View File

@ -0,0 +1,15 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "dusk.h"
typedef struct _eventitem_t eventitem_t;
#define EVENT_TEXT_STRING_COUNT_MAX 8
typedef const char_t* eventtext_t[EVENT_TEXT_STRING_COUNT_MAX];