Added keyboard support

This commit is contained in:
2026-05-26 18:54:49 +10:00
parent 67dda3fa49
commit 1c1473339f
9 changed files with 267 additions and 121 deletions
+4 -5
View File
@@ -1,5 +1,6 @@
#pragma once
#include "opaque_type.h"
#include "toy_vm.h"
#include "toy_function.h"
#include "raylib.h"
@@ -13,21 +14,19 @@ typedef struct SpriteData {
//Actors loaded from scripts
typedef struct ActorData {
OpaqueType type;
SpriteData* sprite;
Toy_Function* onStep;
Vector2 position;
bool enabled;
} ActorData;
//object pool system
//opaque API
void initActorAPI(Toy_VM* vm);
void freeActorAPI(Toy_VM* vm);
void processActors(Toy_VM* vm);
void drawActors(Toy_VM* vm);
void loadSprite(Toy_Bucket** bucketHandle, Toy_Value key, const char* fname, int width, int height);
ActorData* spawnActorAt(Toy_Bucket** bucketHandle, Toy_Value key, Toy_Function* onStep, int xpos, int ypos);
//opaque hook
//opaque binding
Toy_Value handleActorAttributes(Toy_VM* vm, Toy_Value compound, Toy_Value attribute);