Whoops, how did that not break stuff?

This commit is contained in:
2023-02-27 09:40:20 +11:00
parent 2c16c10558
commit 22ab705903
2 changed files with 5 additions and 3 deletions

View File

@@ -14,6 +14,9 @@ fn onStep(node: opaque) {
if (counter >= 60) { if (counter >= 60) {
counter = 0; counter = 0;
node.incrementCurrentNodeFrame(); node.incrementCurrentNodeFrame();
print "---";
print node.getCurrentNodeFrame();
print node.getNodeFrames();
} }
} }

View File

@@ -514,7 +514,7 @@ static int nativeGetNodeFrames(Toy_Interpreter* interpreter, Toy_LiteralArray* a
Box_EngineNode* node = (Box_EngineNode*)TOY_AS_OPAQUE(nodeLiteral); Box_EngineNode* node = (Box_EngineNode*)TOY_AS_OPAQUE(nodeLiteral);
Toy_Literal framesLiteral = TOY_TO_INTEGER_LITERAL(node->frames); Toy_Literal framesLiteral = TOY_TO_INTEGER_LITERAL(node->frames);
Toy_pushLiteralArray(interpreter, framesLiteral); Toy_pushLiteralArray(&interpreter->stack, framesLiteral);
//cleanup //cleanup
@@ -589,8 +589,7 @@ static int nativeGetCurrentNodeFrame(Toy_Interpreter* interpreter, Toy_LiteralAr
Box_EngineNode* node = (Box_EngineNode*)TOY_AS_OPAQUE(nodeLiteral); Box_EngineNode* node = (Box_EngineNode*)TOY_AS_OPAQUE(nodeLiteral);
Toy_Literal currentFrameLiteral = TOY_TO_INTEGER_LITERAL(node->currentFrame); Toy_Literal currentFrameLiteral = TOY_TO_INTEGER_LITERAL(node->currentFrame);
Toy_pushLiteralArray(interpreter, currentFrameLiteral); Toy_pushLiteralArray(&interpreter->stack, currentFrameLiteral);
//cleanup //cleanup
Toy_freeLiteral(nodeLiteral); Toy_freeLiteral(nodeLiteral);