sketch out os api, binary stream writer in js, app sleep when no animation, local and universal time

This commit is contained in:
krzosa
2025-01-04 11:03:36 +01:00
parent 6f795b7ea6
commit dcd1266477
13 changed files with 316 additions and 87 deletions

View File

@@ -1,8 +1,12 @@
#include "core/core_inc.h"
#include "core/core_inc.c"
#include "app/app.h"
#include "os/os.h"
#include "core/core_inc.c"
#include "app/app.c"
#include "os/os.c"
#include "gfx2d/gfx2d.c"
// #include "ui.c"
gfx_t *gfx = NULL;
@@ -10,9 +14,14 @@ gfx_t *gfx = NULL;
void app_init(void) {
ma_arena_t *perm = &tcx._perm;
gfx = ma_push_type(perm, gfx_t);
os_date_t ldate = os_local_time_now();
os_date_t udate = os_universal_time_now();
assert(ldate.hour == (udate.hour + 1));
}
void app_update(app_event_list_t events) {
b32 app_update(app_event_list_t events) {
for (app_event_t *ev = events.first; ev; ev = ev->next) {
// update
}
@@ -31,4 +40,5 @@ void app_update(app_event_list_t events) {
gfx_end(gfx);
}
return false;
}