diff --git a/Toy b/Toy index f84cdff..f2f8aed 160000 --- a/Toy +++ b/Toy @@ -1 +1 @@ -Subproject commit f84cdff88319108d1a8e0f910700ec5d570af9f4 +Subproject commit f2f8aed23a1b9721b83125ae6ceaeb3f64abe976 diff --git a/assets/scripts/gameplay/scene.toy b/assets/scripts/gameplay/scene.toy index bd3534b..f13dec8 100644 --- a/assets/scripts/gameplay/scene.toy +++ b/assets/scripts/gameplay/scene.toy @@ -100,7 +100,7 @@ fn generateLevel(node: opaque, seed: int, width: int, height: int) { var y = 0; //while generated spot is a collision, or too close to the player - while ((x == 0 && y == 0) || node.getCollisionAt(x, y) == false || (x < (width / 6 * 2) && y < (height / 6 * 2))) { //TODO: toy bug - no short-circuiting? + while (x == 0 && y == 0 || node.getCollisionAt(x, y) == false || x < width / 6 * 2 && y < height / 6 * 2) { x = rng.generateRandomNumber() % width; y = rng.generateRandomNumber() % height; } diff --git a/box/box_engine.c b/box/box_engine.c index d9783dd..ce96a36 100644 --- a/box/box_engine.c +++ b/box/box_engine.c @@ -374,7 +374,7 @@ static inline void execEvents() { } args.count = 0; } - break; //TODO: remove copied code + break; //mouse wheel case SDL_MOUSEWHEEL: { diff --git a/box/lib_node.c b/box/lib_node.c index 3293468..96e9c9f 100644 --- a/box/lib_node.c +++ b/box/lib_node.c @@ -368,7 +368,7 @@ static int nativeLoadNodeTexture(Toy_Interpreter* interpreter, Toy_LiteralArray* Toy_freeLiteral(drivePathLiteral); //not needed anymore - //actually load TODO: number the opaques, and check the numbers + //actually load TODO: number the opaques, and check the tag Box_EngineNode* node = (Box_EngineNode*)TOY_AS_OPAQUE(nodeLiteral); if (node->texture != NULL) { diff --git a/box/repl_tools.c b/box/repl_tools.c index e26b861..fd44bd7 100644 --- a/box/repl_tools.c +++ b/box/repl_tools.c @@ -78,10 +78,10 @@ const unsigned char* Toy_compileString(const char* source, size_t* size) { Toy_initParser(&parser, &lexer); Toy_initCompiler(&compiler); - //run the parser until the end of the source + //step 1 - run the parser until the end of the source Toy_ASTNode* node = Toy_scanParser(&parser); while(node != NULL) { - //pack up and leave + //on error, pack up and leave if (node->type == TOY_AST_NODE_ERROR) { Toy_freeASTNode(node); Toy_freeCompiler(&compiler); @@ -94,7 +94,7 @@ const unsigned char* Toy_compileString(const char* source, size_t* size) { node = Toy_scanParser(&parser); } - //get the bytecode dump + //step 2 - get the bytecode dump const unsigned char* tb = Toy_collateCompiler(&compiler, size); //cleanup