archivemuh
This commit is contained in:
10
src/engine/CMakeLists.txt
Normal file
10
src/engine/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2025 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${DUSK_TARGET_NAME}
|
||||
PRIVATE
|
||||
engine.c
|
||||
)
|
30
src/engine/engine.c
Normal file
30
src/engine/engine.c
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Copyright (c) 2025 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include "engine.h"
|
||||
#include "util/memory.h"
|
||||
#include "time/time.h"
|
||||
#include "console/console.h"
|
||||
|
||||
engine_t ENGINE;
|
||||
|
||||
void engineInit(void) {
|
||||
memoryZero(&ENGINE, sizeof(engine_t));
|
||||
ENGINE.running = true;
|
||||
|
||||
// Init systems. Order is important.
|
||||
timeInit();
|
||||
consoleInit();
|
||||
}
|
||||
|
||||
void engineUpdate(void) {
|
||||
timeUpdate();
|
||||
consoleUpdate();
|
||||
}
|
||||
|
||||
void engineDispose(void) {
|
||||
}
|
30
src/engine/engine.h
Normal file
30
src/engine/engine.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* 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 {
|
||||
bool_t running;
|
||||
} engine_t;
|
||||
|
||||
extern engine_t ENGINE;
|
||||
|
||||
/**
|
||||
* Initializes the engine.
|
||||
*/
|
||||
void engineInit(void);
|
||||
|
||||
/**
|
||||
* Updates the engine.
|
||||
*/
|
||||
void engineUpdate(void);
|
||||
|
||||
/**
|
||||
* Shuts down the engine.
|
||||
*/
|
||||
void engineDispose(void);
|
Reference in New Issue
Block a user