update examples with the refactor file structure and its features

This commit is contained in:
2026-10-06 12:31:00 +02:00
parent 5ad2d899fe
commit cc00883a57
3 changed files with 18 additions and 8 deletions
+7 -3
View File
@@ -1,4 +1,6 @@
#include "engine.h"
#include <dangerzone/engine.h>
#include <dangerzone/render/misc.h>
#include <dangerzone/render/text.h>
// polling events every frame
void
@@ -28,8 +30,8 @@ client_update_framebuffer()
// single green demo pixel
game_state->framebuffer[0] = 0x00FF00;
put_rect(0, 0, 1100, 200, 0xFFFF00);
put_string("Hello, traveller. You have come\nto the right place!",
clear_framebuffer(0xFFFF00);
put_string("Welcome to the most\n*DANGEROUS* 2048 game!",
20, 20, 2, 2, 3, 0x000000, 0xFFFF00
);
}
@@ -39,6 +41,8 @@ main()
{
// initialize the engine
if (engine_init(
500, 500,
"Dangerous 2048",
client_poll_event,
client_update_framebuffer
)) {