25 lines
434 B
C
25 lines
434 B
C
|
#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();
|
||
|
}
|
||
|
|
||
|
bool sys_get_initialized() {
|
||
|
return sys_initialized;
|
||
|
}
|
||
|
|
||
|
void sys_destroy() {
|
||
|
assert(sys_get_initialized());
|
||
|
sys_initialized = false;
|
||
|
}
|