From 22ab705903e09e40875b0a3ff42d8a616b8e7af3 Mon Sep 17 00:00:00 2001 From: Ratstail91 Date: Mon, 27 Feb 2023 09:40:20 +1100 Subject: [PATCH] Whoops, how did that not break stuff? --- assets/scripts/frames.toy | 3 +++ box/lib_node.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/scripts/frames.toy b/assets/scripts/frames.toy index e54519b..a7b993c 100644 --- a/assets/scripts/frames.toy +++ b/assets/scripts/frames.toy @@ -14,6 +14,9 @@ fn onStep(node: opaque) { if (counter >= 60) { counter = 0; node.incrementCurrentNodeFrame(); + print "---"; + print node.getCurrentNodeFrame(); + print node.getNodeFrames(); } } diff --git a/box/lib_node.c b/box/lib_node.c index cf8eb12..2830aff 100644 --- a/box/lib_node.c +++ b/box/lib_node.c @@ -514,7 +514,7 @@ static int nativeGetNodeFrames(Toy_Interpreter* interpreter, Toy_LiteralArray* a Box_EngineNode* node = (Box_EngineNode*)TOY_AS_OPAQUE(nodeLiteral); Toy_Literal framesLiteral = TOY_TO_INTEGER_LITERAL(node->frames); - Toy_pushLiteralArray(interpreter, framesLiteral); + Toy_pushLiteralArray(&interpreter->stack, framesLiteral); //cleanup @@ -589,8 +589,7 @@ static int nativeGetCurrentNodeFrame(Toy_Interpreter* interpreter, Toy_LiteralAr Box_EngineNode* node = (Box_EngineNode*)TOY_AS_OPAQUE(nodeLiteral); Toy_Literal currentFrameLiteral = TOY_TO_INTEGER_LITERAL(node->currentFrame); - Toy_pushLiteralArray(interpreter, currentFrameLiteral); - + Toy_pushLiteralArray(&interpreter->stack, currentFrameLiteral); //cleanup Toy_freeLiteral(nodeLiteral);