Emu vs Real!

This commit is contained in:
2026-02-05 08:43:49 -06:00
parent 5cf299a1c7
commit dd697d5650
5 changed files with 101 additions and 61 deletions

View File

@@ -75,7 +75,31 @@ errorret_t sceneSet(const char_t *script) {
// Create a new script context.
errorChain(scriptContextInit(&SCENE.scriptContext));
errorChain(scriptContextExecFile(&SCENE.scriptContext, script));
// errorChain(scriptContextExecFile(&SCENE.scriptContext, script));
errorChain(scriptContextExec(&SCENE.scriptContext,
"module('spritebatch')\n"
"module('camera')\n"
"module('color')\n"
"module('text')\n"
"module('screen')\n"
"module('time')\n"
"module('map')\n"
"module('glm')\n"
"screenSetBackground(colorLime())\n"
"mapCamera = cameraCreate()\n"
"text = 'Hello World'\n"
"function sceneDispose()\n"
"end\n"
"function sceneUpdate()\n"
"end\n"
"function sceneRender()\n"
" mapCamera.position = vec3(4, 4, 4)\n"
" cameraPushMatrix(mapCamera)\n"
" spriteBatchPush(nil, -1, -1, 1, 1, colorBlue())\n"
" spriteBatchFlush()\n"
" cameraPopMatrix()\n"
"end\n"
));
errorOk();
}