Script.h 386 B

12345678910111213141516171819202122
  1. #ifndef SCRIPT_H
  2. #define SCRIPT_H
  3. #include "Object.h"
  4. #define SCRIPT_STACK_SIZE 50
  5. typedef struct Script {
  6. const char* error;
  7. unsigned char* byteCode;
  8. int byteCodeLength;
  9. int readIndex;
  10. Object stack[SCRIPT_STACK_SIZE];
  11. int stackIndex;
  12. } Script;
  13. Script* sInit(unsigned char* byteCode, int codeLength);
  14. void sDelete(Script* sc);
  15. void sRun(Script* sc);
  16. #endif