int api_writeln(lua_State * L) { if(lua_gettop(L) != 2 and lua_gettop(L) != 3) return 1; luaVirtualMachine * LVM = (luaVirtualMachine*) lua_tointeger(L, 1); LVM -> output += lua_tostring(L, 2); LVM -> output += '\n'; LVM -> outColor = (lua_gettop(L) == 2 and lua_tointeger(L, 3) == 0) ? sf::Color(40, 40, 255) : sf::Color(240, 20, 20); api_flush(L); return 1; }
int apiFlush (void) { if (!apiStarted) return 1; return api_flush(&brl); }