Events starting
This commit is contained in:
8
src/dusk/event/event.c
Normal file
8
src/dusk/event/event.c
Normal 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
29
src/dusk/event/event.h
Normal 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;
|
15
src/dusk/event/eventtext.h
Normal file
15
src/dusk/event/eventtext.h
Normal 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];
|
Reference in New Issue
Block a user