This commit is contained in:
wooshings
2026-09-30 20:36:42 -07:00
parent 5152eb3f31
commit e75f92ea4b
3 changed files with 20 additions and 12 deletions
+7 -2
View File
@@ -1,6 +1,5 @@
package shoal
import "core:text/table"
import rl "vendor:raylib"
STARTUP := 0
@@ -12,7 +11,7 @@ App :: struct {
update_systems: [dynamic]proc(),
draw_systems: [dynamic]proc(),
plugins: [dynamic]proc(app: ^App),
entities: [dynamic]Entity,
entities: map[int][dynamic]struct{},
}
add_system :: proc(app: ^App, schedule: int, system: proc()) {
@@ -30,6 +29,12 @@ add_plugin :: proc(app: ^App, plugin: proc(app: ^App)) {
append(&app.plugins, plugin)
}
spawn_entity :: proc(app: ^App, components: [dynamic]struct{}) {
entity_len := len(&app.entities)
app.entities[entity_len] = components
}
run :: proc(app: ^App) {
rl.InitWindow(800, 600, "shoal window")