Minesweeper prog
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#pragma once
|
||||
#include "dusk.h"
|
||||
#include "error/error.h"
|
||||
#include "display/color.h"
|
||||
|
||||
#define SCENE_FLAG_ACTIVE (1 << 0)
|
||||
#define SCENE_FLAG_INITIALIZED (1 << 1)
|
||||
@@ -24,4 +25,5 @@ typedef struct {
|
||||
void (*sleep)(void);
|
||||
|
||||
uint8_t flags;
|
||||
color_t background;
|
||||
} scene_t;
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "util/memory.h"
|
||||
#include "assert/assert.h"
|
||||
#include "console/console.h"
|
||||
#include "display/framebuffer/framebuffer.h"
|
||||
#include "util/string.h"
|
||||
|
||||
scenemanager_t SCENE_MANAGER;
|
||||
@@ -94,6 +95,11 @@ void sceneManagerRender(void) {
|
||||
SCENE_MANAGER.current->flags & SCENE_FLAG_INITIALIZED,
|
||||
"Current scene not initialized"
|
||||
);
|
||||
|
||||
frameBufferClear(
|
||||
FRAMEBUFFER_CLEAR_COLOR | FRAMEBUFFER_CLEAR_DEPTH,
|
||||
SCENE_MANAGER.current->background
|
||||
);
|
||||
|
||||
if(SCENE_MANAGER.current->render) SCENE_MANAGER.current->render();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user