From 6a3f0d6ecc727ff651674bdf513c9a67fc92f95c Mon Sep 17 00:00:00 2001 From: xensik Date: Mon, 3 Oct 2022 12:46:34 +0200 Subject: [PATCH] fix T6 vectors --- src/t6/xsk/compiler.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/t6/xsk/compiler.cpp b/src/t6/xsk/compiler.cpp index 8e43a1e8..5403c161 100644 --- a/src/t6/xsk/compiler.cpp +++ b/src/t6/xsk/compiler.cpp @@ -1772,7 +1772,6 @@ void compiler::emit_expr_object(const ast::expr& expr) void compiler::emit_expr_vector(const ast::expr_vector::ptr& expr) { std::vector data; - bool isexpr = false; bool isconst = true; auto flags = 0; @@ -1798,7 +1797,6 @@ void compiler::emit_expr_vector(const ast::expr_vector::ptr& expr) } else { - isexpr = true; isconst = false; } @@ -1824,7 +1822,6 @@ void compiler::emit_expr_vector(const ast::expr_vector::ptr& expr) } else { - isexpr = true; isconst = false; } @@ -1850,7 +1847,6 @@ void compiler::emit_expr_vector(const ast::expr_vector::ptr& expr) } else { - isexpr = true; isconst = false; } @@ -1858,17 +1854,14 @@ void compiler::emit_expr_vector(const ast::expr_vector::ptr& expr) { emit_opcode(opcode::OP_VectorConstant, utils::string::va("%d", flags)); } - else if (isexpr) + else { + // OP_GetVector seems to be broken, always use OP_Vector emit_expr(expr->z); emit_expr(expr->y); emit_expr(expr->x); emit_opcode(opcode::OP_Vector); } - else - { - emit_opcode(opcode::OP_GetVector, data); - } } void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)