starting the rewrite of forespend.

This commit is contained in:
kin fuyuki 2025-12-25 13:21:58 -03:00
commit d36dc68f8a
No known key found for this signature in database
GPG key ID: 0E4E8E519FB71401
19 changed files with 833 additions and 290 deletions

View file

@ -1,14 +1,16 @@
#pragma once
#include "nodes.h"
#include <list>
namespace enginend {
struct scene{
std::list<enginend::node*> nodes;
std::list<enginend::nodes::node*> nodes;
virtual void boot() {
int i=0;
tiny::echo((char*)"initializing scene");
for (enginend::node* n : nodes) {
for (enginend::nodes::node* n : nodes) {
tiny::echo((char*)"initializing object of ID: %i",i++);
n->boot();
}
@ -17,18 +19,18 @@ namespace enginend {
ClearBackground(BLANK);
BeginDrawing();
for (enginend::node* n : nodes) {
for (enginend::nodes::node* n : nodes) {
n->draw();
}
EndDrawing();
}
virtual void tick() {
for (enginend::node* n : nodes) {
for (enginend::nodes::node* n : nodes) {
n->tick();
}
}
virtual void exit() {
for (enginend::node* n : nodes) {
for (enginend::nodes::node* n : nodes) {
n->exit();
}
}