#include #include #include #include "scenes.h" #include "liquid.h" #include "analog.h" #include "graphics/nokia.h" #include "graphics/drawing.h" struct BootScene { struct Scene base; uint32_t cnt; }; static struct SceneEvent Boot_onTick(struct BootScene *self) { self->cnt += 10; // ms if (self->cnt == 2000) { return SceneEvent_Close(0, NULL); } return SceneEvent_None(); } static void Boot_paint(struct BootScene *self) { LCD_clearDisplay(0); LCD_setBitmap(Bitmap_Get("boot_logo")->bytes); } struct Scene *NewScene_Boot(void) { struct BootScene *scene = calloc(1, sizeof(struct BootScene)); scene->base.paint = (Scene_paint_t) Boot_paint; scene->base.onTick = (Scene_onTick_t) Boot_onTick; return (struct Scene *) scene; }