2024-02-26 02:38:53 +00:00
|
|
|
#include <assert.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "sys.h"
|
|
|
|
|
|
|
|
bool sys_initialized = false;
|
|
|
|
|
|
|
|
void sys_init() {
|
|
|
|
assert(!sys_get_initialized());
|
|
|
|
sys_initialized = true;
|
|
|
|
|
|
|
|
// reset graphics
|
|
|
|
sys_clip_reset();
|
|
|
|
sys_camera_reset();
|
|
|
|
sys_spal_reset();
|
|
|
|
sys_dpal_reset();
|
|
|
|
}
|
|
|
|
|
2024-02-28 05:07:15 +00:00
|
|
|
void sys_update() {
|
|
|
|
sys_input_update();
|
|
|
|
}
|
|
|
|
|
2024-02-26 02:38:53 +00:00
|
|
|
bool sys_get_initialized() {
|
|
|
|
return sys_initialized;
|
|
|
|
}
|
|
|
|
|
|
|
|
void sys_destroy() {
|
|
|
|
assert(sys_get_initialized());
|
|
|
|
sys_initialized = false;
|
|
|
|
}
|