neonucleus/src/component.h
IonutParau 3546fe1093 new call cost system
TODO: change all the ctrls from latency to amount per tick.
2025-07-03 12:36:47 +02:00

35 lines
712 B
C

#ifndef NEONUCLEUS_COMPONENT_H
#define NEONUCLEUS_COMPONENT_H
#include "neonucleus.h"
#include "computer.h"
typedef struct nn_method {
char *name;
nn_componentMethod *method;
void *userdata;
char *doc;
bool direct;
} nn_method;
typedef struct nn_componentTable {
char *name;
nn_Alloc alloc;
void *userdata;
nn_componentConstructor *constructor;
nn_componentDestructor *destructor;
nn_method methods[NN_MAX_METHODS];
size_t methodCount;
} nn_componentTable;
typedef struct nn_component {
nn_address address;
int slot;
float indirectBufferProgress;
nn_componentTable *table;
void *statePtr;
nn_computer *computer;
} nn_component;
#endif