Added keyboard support
This commit is contained in:
+4
-5
@@ -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);
|
||||
Reference in New Issue
Block a user