1.16.6.1 patch
|
@ -1034,7 +1034,7 @@
|
||||||
{"name":"s_node_pb_layer","order":18,"path":"sprites/s_node_pb_layer/s_node_pb_layer.yy",},
|
{"name":"s_node_pb_layer","order":18,"path":"sprites/s_node_pb_layer/s_node_pb_layer.yy",},
|
||||||
{"name":"FirebaseREST_HTTP_Success_Firestore","order":19,"path":"scripts/FirebaseREST_HTTP_Success_Firestore/FirebaseREST_HTTP_Success_Firestore.yy",},
|
{"name":"FirebaseREST_HTTP_Success_Firestore","order":19,"path":"scripts/FirebaseREST_HTTP_Success_Firestore/FirebaseREST_HTTP_Success_Firestore.yy",},
|
||||||
{"name":"s_node_pb_draw_rectangle","order":13,"path":"sprites/s_node_pb_draw_rectangle/s_node_pb_draw_rectangle.yy",},
|
{"name":"s_node_pb_draw_rectangle","order":13,"path":"sprites/s_node_pb_draw_rectangle/s_node_pb_draw_rectangle.yy",},
|
||||||
{"name":"panel_animation","order":1,"path":"scripts/panel_animation/panel_animation.yy",},
|
{"name":"panel_animation","order":3,"path":"scripts/panel_animation/panel_animation.yy",},
|
||||||
{"name":"sh_blend_edge_blend","order":1,"path":"shaders/sh_blend_edge_blend/sh_blend_edge_blend.yy",},
|
{"name":"sh_blend_edge_blend","order":1,"path":"shaders/sh_blend_edge_blend/sh_blend_edge_blend.yy",},
|
||||||
{"name":"sh_bend_arc","order":13,"path":"shaders/sh_bend_arc/sh_bend_arc.yy",},
|
{"name":"sh_bend_arc","order":13,"path":"shaders/sh_bend_arc/sh_bend_arc.yy",},
|
||||||
{"name":"node_array_rearrange","order":19,"path":"scripts/node_array_rearrange/node_array_rearrange.yy",},
|
{"name":"node_array_rearrange","order":19,"path":"scripts/node_array_rearrange/node_array_rearrange.yy",},
|
||||||
|
@ -1403,7 +1403,7 @@
|
||||||
{"name":"sh_perlin_extra","order":9,"path":"shaders/sh_perlin_extra/sh_perlin_extra.yy",},
|
{"name":"sh_perlin_extra","order":9,"path":"shaders/sh_perlin_extra/sh_perlin_extra.yy",},
|
||||||
{"name":"s_node_plot_linear_type","order":10,"path":"sprites/s_node_plot_linear_type/s_node_plot_linear_type.yy",},
|
{"name":"s_node_plot_linear_type","order":10,"path":"sprites/s_node_plot_linear_type/s_node_plot_linear_type.yy",},
|
||||||
{"name":"node_text","order":9,"path":"scripts/node_text/node_text.yy",},
|
{"name":"node_text","order":9,"path":"scripts/node_text/node_text.yy",},
|
||||||
{"name":"panel_collection","order":3,"path":"scripts/panel_collection/panel_collection.yy",},
|
{"name":"panel_collection","order":1,"path":"scripts/panel_collection/panel_collection.yy",},
|
||||||
{"name":"node_delay","order":5,"path":"scripts/node_delay/node_delay.yy",},
|
{"name":"node_delay","order":5,"path":"scripts/node_delay/node_delay.yy",},
|
||||||
{"name":"node_string_trim","order":4,"path":"scripts/node_string_trim/node_string_trim.yy",},
|
{"name":"node_string_trim","order":4,"path":"scripts/node_string_trim/node_string_trim.yy",},
|
||||||
{"name":"node_mk_rain","order":1,"path":"scripts/node_mk_rain/node_mk_rain.yy",},
|
{"name":"node_mk_rain","order":1,"path":"scripts/node_mk_rain/node_mk_rain.yy",},
|
||||||
|
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
@ -43,6 +43,8 @@
|
||||||
kb_hold = false;
|
kb_hold = false;
|
||||||
kb_hkey = 0;
|
kb_hkey = 0;
|
||||||
|
|
||||||
|
watcher_surface = surface_create(1, 1);
|
||||||
|
|
||||||
panelInit();
|
panelInit();
|
||||||
|
|
||||||
addHotkey("", "New file", "N", MOD_KEY.ctrl, NEW);
|
addHotkey("", "New file", "N", MOD_KEY.ctrl, NEW);
|
||||||
|
|
|
@ -31,6 +31,11 @@ _HOVERING_ELEMENT = noone;
|
||||||
}
|
}
|
||||||
|
|
||||||
CURSOR = cr_default;
|
CURSOR = cr_default;
|
||||||
|
|
||||||
|
if(!is_surface(watcher_surface)) {
|
||||||
|
RENDER_ALL
|
||||||
|
watcher_surface = surface_create(1, 1);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region focus
|
#region focus
|
||||||
|
|
|
@ -153,7 +153,7 @@ function Node_Custom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
|
|
||||||
matrix_set(matrix_world, matrix_build(0, 0, 0, 0, 0, 0,
|
matrix_set(matrix_world, matrix_build(0, 0, 0, 0, 0, 0,
|
||||||
surface_get_width_safe(_surf), surface_get_height_safe(_surf), 1));
|
surface_get_width_safe(_surf), surface_get_height_safe(_surf), 1));
|
||||||
vertex_submit(global.HLSL_VB, pr_trianglestrip, surface_get_texture(_surf));
|
vertex_submit(global.HLSL_VB_PLANE, pr_trianglestrip, surface_get_texture(_surf));
|
||||||
matrix_set(matrix_world, matrix_build_identity());
|
matrix_set(matrix_world, matrix_build_identity());
|
||||||
|
|
||||||
d3d11_shader_override_vs(-1);
|
d3d11_shader_override_vs(-1);
|
||||||
|
|
|
@ -65,9 +65,7 @@ function ase_layer(name) constructor {
|
||||||
cels = [];
|
cels = [];
|
||||||
tag = noone;
|
tag = noone;
|
||||||
|
|
||||||
static setFrameCel = function(index, cel) {
|
static setFrameCel = function(index, cel) { INLINE cels[index] = cel; }
|
||||||
cels[index] = cel;
|
|
||||||
}
|
|
||||||
|
|
||||||
static getCel = function(index = CURRENT_FRAME) {
|
static getCel = function(index = CURRENT_FRAME) {
|
||||||
var ind;
|
var ind;
|
||||||
|
|
|
@ -35,11 +35,11 @@
|
||||||
return make_color_rgba(rg.x, rg.y, rg.z, a);
|
return make_color_rgba(rg.x, rg.y, rg.z, a);
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
function make_color_srgba(r, g, b, a) { #region
|
function make_color_srgba(rgb, a) { #region
|
||||||
INLINE
|
INLINE
|
||||||
r = power(r, 1 / 2.2) * 255;
|
var r = power(rgb[0], 1 / 2.2) * 255;
|
||||||
g = power(g, 1 / 2.2) * 255;
|
var g = power(rgb[1], 1 / 2.2) * 255;
|
||||||
b = power(b, 1 / 2.2) * 255;
|
var b = power(rgb[2], 1 / 2.2) * 255;
|
||||||
|
|
||||||
return int64(round(r) + (round(g) << 8) + (round(b) << 16) + (round(a) << 24));
|
return int64(round(r) + (round(g) << 8) + (round(b) << 16) + (round(a) << 24));
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION;
|
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION;
|
||||||
|
|
||||||
LATEST_VERSION = 11600;
|
LATEST_VERSION = 11600;
|
||||||
VERSION = 11660;
|
VERSION = 11661;
|
||||||
SAVE_VERSION = 11660;
|
SAVE_VERSION = 11660;
|
||||||
VERSION_STRING = "1.16.6.0";
|
VERSION_STRING = "1.16.6.1";
|
||||||
BUILD_NUMBER = 11660;
|
BUILD_NUMBER = 11661;
|
||||||
|
|
||||||
globalvar APPEND_MAP;
|
globalvar APPEND_MAP;
|
||||||
APPEND_MAP = ds_map_create();
|
APPEND_MAP = ds_map_create();
|
||||||
|
|
|
@ -280,10 +280,11 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
}
|
}
|
||||||
|
|
||||||
update_on_frame = false;
|
update_on_frame = false;
|
||||||
for( var i = 0, n = array_length(layers); i < n; i++ ) {
|
|
||||||
if(!struct_has(layers[i], "cel")) continue;
|
|
||||||
|
|
||||||
var cel = layers[i].cel;
|
for( var i = 0, n = array_length(layers); i < n; i++ ) {
|
||||||
|
if(!struct_has(layers[i], "cels")) continue;
|
||||||
|
|
||||||
|
var cel = layers[i].cels;
|
||||||
if(array_length(cel)) update_on_frame = true;
|
if(array_length(cel)) update_on_frame = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,6 +305,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
static update = function(frame = CURRENT_FRAME) { #region
|
static update = function(frame = CURRENT_FRAME) { #region
|
||||||
var path = getInputData(0);
|
var path = getInputData(0);
|
||||||
var current_tag = getInputData(2);
|
var current_tag = getInputData(2);
|
||||||
|
|
||||||
if(path_current != path) updatePaths(path);
|
if(path_current != path) updatePaths(path);
|
||||||
if(ds_map_empty(content)) return;
|
if(ds_map_empty(content)) return;
|
||||||
|
|
||||||
|
@ -348,7 +350,6 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
|
|
||||||
draw_surface_safe(_inSurf, xx, yy);
|
draw_surface_safe(_inSurf, xx, yy);
|
||||||
}
|
}
|
||||||
|
|
||||||
surface_reset_target();
|
surface_reset_target();
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
|
|
@ -347,17 +347,9 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
array_resize(canvas_buffer, fr);
|
array_resize(canvas_buffer, fr);
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
function getCanvasSurface(index = preview_index) { #region
|
function getCanvasSurface(index = preview_index) { INLINE return array_safe_get(canvas_surface, index); }
|
||||||
INLINE
|
|
||||||
|
|
||||||
return array_safe_get(canvas_surface, index);
|
function setCanvasSurface(surface, index = preview_index) { INLINE canvas_surface[index] = surface; }
|
||||||
} #endregion
|
|
||||||
|
|
||||||
function setCanvasSurface(surface, index = preview_index) { #region
|
|
||||||
INLINE
|
|
||||||
|
|
||||||
canvas_surface[index] = surface;
|
|
||||||
} #endregion
|
|
||||||
|
|
||||||
function storeAction() { #region
|
function storeAction() { #region
|
||||||
var action = recordAction(ACTION_TYPE.custom, function(data) {
|
var action = recordAction(ACTION_TYPE.custom, function(data) {
|
||||||
|
@ -387,10 +379,13 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
var cDep = attrDepth();
|
var cDep = attrDepth();
|
||||||
|
|
||||||
var _canvas_surface = getCanvasSurface(index);
|
var _canvas_surface = getCanvasSurface(index);
|
||||||
|
print($"Applying surface {index} - {_canvas_surface} [{is_surface(_canvas_surface)}]");
|
||||||
|
|
||||||
if(!is_surface(_canvas_surface)) {
|
if(!is_surface(_canvas_surface)) { // recover surface
|
||||||
setCanvasSurface(surface_create_from_buffer(_dim[0], _dim[1], canvas_buffer[index]));
|
//print($"recovering surface from buffer {random(1)}");
|
||||||
} else if(surface_get_width_safe(_canvas_surface) != _dim[0] || surface_get_height_safe(_canvas_surface) != _dim[1]) {
|
|
||||||
|
setCanvasSurface(surface_create_from_buffer(_dim[0], _dim[1], canvas_buffer[index]), index);
|
||||||
|
} else if(surface_get_width_safe(_canvas_surface) != _dim[0] || surface_get_height_safe(_canvas_surface) != _dim[1]) { // resize surface
|
||||||
var _cbuff = array_safe_get(canvas_buffer, index);
|
var _cbuff = array_safe_get(canvas_buffer, index);
|
||||||
if(buffer_exists(_cbuff)) buffer_delete(_cbuff);
|
if(buffer_exists(_cbuff)) buffer_delete(_cbuff);
|
||||||
|
|
||||||
|
@ -752,10 +747,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
|
|
||||||
var _canvas_surface = getCanvasSurface();
|
var _canvas_surface = getCanvasSurface();
|
||||||
|
|
||||||
if(!surface_exists(_canvas_surface)) {
|
if(!surface_exists(_canvas_surface)) return;
|
||||||
surface_store_buffer();
|
|
||||||
_canvas_surface = getCanvasSurface();
|
|
||||||
}
|
|
||||||
|
|
||||||
var _surf_w = surface_get_width_safe(_canvas_surface);
|
var _surf_w = surface_get_width_safe(_canvas_surface);
|
||||||
var _surf_h = surface_get_height_safe(_canvas_surface);
|
var _surf_h = surface_get_height_safe(_canvas_surface);
|
||||||
|
@ -911,7 +903,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
surface_reset_shader();
|
surface_reset_shader();
|
||||||
|
|
||||||
mouse_holding = true;
|
mouse_holding = true;
|
||||||
if(mouse_pre_draw_x != undefined && mouse_pre_draw_y != undefined && key_mod_press(SHIFT)) { ///////////////// LINE
|
if(mouse_pre_draw_x != undefined && mouse_pre_draw_y != undefined && key_mod_press(SHIFT)) { ///////////////// shift line
|
||||||
surface_set_shader(drawing_surface, noone, true, BLEND.alpha);
|
surface_set_shader(drawing_surface, noone, true, BLEND.alpha);
|
||||||
brush_next_dist = 0;
|
brush_next_dist = 0;
|
||||||
draw_line_size(mouse_pre_draw_x, mouse_pre_draw_y, mouse_cur_x, mouse_cur_y, true);
|
draw_line_size(mouse_pre_draw_x, mouse_pre_draw_y, mouse_cur_x, mouse_cur_y, true);
|
||||||
|
@ -925,7 +917,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
mouse_pre_draw_y = mouse_cur_y;
|
mouse_pre_draw_y = mouse_cur_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mouse_holding && mouse_click(mb_left, active)) {
|
if(mouse_holding) {
|
||||||
var _move = mouse_pre_draw_x != mouse_cur_x || mouse_pre_draw_y != mouse_cur_y;
|
var _move = mouse_pre_draw_x != mouse_cur_x || mouse_pre_draw_y != mouse_cur_y;
|
||||||
var _1stp = brush_dist_min == brush_dist_max && brush_dist_min == 1;
|
var _1stp = brush_dist_min == brush_dist_max && brush_dist_min == 1;
|
||||||
|
|
||||||
|
@ -938,13 +930,12 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
|
|
||||||
mouse_pre_draw_x = mouse_cur_x;
|
mouse_pre_draw_x = mouse_cur_x;
|
||||||
mouse_pre_draw_y = mouse_cur_y;
|
mouse_pre_draw_y = mouse_cur_y;
|
||||||
}
|
|
||||||
|
|
||||||
if(mouse_holding && mouse_release(mb_left)) {
|
if(mouse_release(mb_left)) {
|
||||||
mouse_holding = false;
|
mouse_holding = false;
|
||||||
|
|
||||||
apply_draw_surface();
|
apply_draw_surface();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BLEND_NORMAL;
|
BLEND_NORMAL;
|
||||||
|
|
||||||
|
|
|
@ -1466,6 +1466,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
||||||
if(active) return;
|
if(active) return;
|
||||||
enable();
|
enable();
|
||||||
ds_list_add(group == noone? PROJECT.nodes : group.getNodeList(), self);
|
ds_list_add(group == noone? PROJECT.nodes : group.getNodeList(), self);
|
||||||
|
|
||||||
|
RENDER_ALL_REORDER
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static onValidate = function() { #region
|
static onValidate = function() { #region
|
||||||
|
|
|
@ -5,24 +5,26 @@
|
||||||
vertex_format_add_texcoord();
|
vertex_format_add_texcoord();
|
||||||
global.HLSL_VB_FORMAT = vertex_format_end();
|
global.HLSL_VB_FORMAT = vertex_format_end();
|
||||||
|
|
||||||
global.HLSL_VB = vertex_create_buffer();
|
global.HLSL_VB_PLANE = vertex_create_buffer();
|
||||||
vertex_begin(global.HLSL_VB, global.HLSL_VB_FORMAT);
|
vertex_begin(global.HLSL_VB_PLANE, global.HLSL_VB_FORMAT);
|
||||||
vertex_position(global.HLSL_VB, 0, 0);
|
|
||||||
vertex_color(global.HLSL_VB, c_white, 1);
|
|
||||||
vertex_texcoord(global.HLSL_VB, 0, 0);
|
|
||||||
|
|
||||||
vertex_position(global.HLSL_VB, 0, 1);
|
vertex_position(global.HLSL_VB_PLANE, 0, 0);
|
||||||
vertex_color(global.HLSL_VB, c_white, 1);
|
vertex_color( global.HLSL_VB_PLANE, c_white, 1);
|
||||||
vertex_texcoord(global.HLSL_VB, 0, 1);
|
vertex_texcoord(global.HLSL_VB_PLANE, 0, 0);
|
||||||
|
|
||||||
vertex_position(global.HLSL_VB, 1, 0);
|
vertex_position(global.HLSL_VB_PLANE, 0, 1);
|
||||||
vertex_color(global.HLSL_VB, c_white, 1);
|
vertex_color( global.HLSL_VB_PLANE, c_white, 1);
|
||||||
vertex_texcoord(global.HLSL_VB, 1, 0);
|
vertex_texcoord(global.HLSL_VB_PLANE, 0, 1);
|
||||||
|
|
||||||
vertex_position(global.HLSL_VB, 1, 1);
|
vertex_position(global.HLSL_VB_PLANE, 1, 0);
|
||||||
vertex_color(global.HLSL_VB, c_white, 1);
|
vertex_color( global.HLSL_VB_PLANE, c_white, 1);
|
||||||
vertex_texcoord(global.HLSL_VB, 1, 1);
|
vertex_texcoord(global.HLSL_VB_PLANE, 1, 0);
|
||||||
vertex_end(global.HLSL_VB);
|
|
||||||
|
vertex_position(global.HLSL_VB_PLANE, 1, 1);
|
||||||
|
vertex_color( global.HLSL_VB_PLANE, c_white, 1);
|
||||||
|
vertex_texcoord(global.HLSL_VB_PLANE, 1, 1);
|
||||||
|
|
||||||
|
vertex_end(global.HLSL_VB_PLANE);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
function Node_HLSL(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
function Node_HLSL(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
|
@ -290,9 +292,11 @@ struct PixelShaderOutput {
|
||||||
surface_set_target(_output);
|
surface_set_target(_output);
|
||||||
DRAW_CLEAR
|
DRAW_CLEAR
|
||||||
|
|
||||||
|
// ############################ SET SHADER ############################
|
||||||
d3d11_shader_override_vs(shader.vs);
|
d3d11_shader_override_vs(shader.vs);
|
||||||
d3d11_shader_override_ps(shader.fs);
|
d3d11_shader_override_ps(shader.fs);
|
||||||
|
|
||||||
|
#region uniforms
|
||||||
var uTypes = array_create(8, 0);
|
var uTypes = array_create(8, 0);
|
||||||
var sampler_slot = 1;
|
var sampler_slot = 1;
|
||||||
|
|
||||||
|
@ -357,14 +361,15 @@ struct PixelShaderOutput {
|
||||||
buffer_delete(_buffer);
|
buffer_delete(_buffer);
|
||||||
|
|
||||||
d3d11_shader_set_cbuffer_ps(10, cbuff);
|
d3d11_shader_set_cbuffer_ps(10, cbuff);
|
||||||
|
#endregion
|
||||||
|
|
||||||
matrix_set(matrix_world, matrix_build(0, 0, 0, 0, 0, 0,
|
matrix_set(matrix_world, matrix_build(0, 0, 0, 0, 0, 0, surface_get_width_safe(_surf), surface_get_height_safe(_surf), 1));
|
||||||
surface_get_width_safe(_surf), surface_get_height_safe(_surf), 1));
|
vertex_submit(global.HLSL_VB_PLANE, pr_trianglestrip, surface_get_texture(_surf));
|
||||||
vertex_submit(global.HLSL_VB, pr_trianglestrip, surface_get_texture(_surf));
|
|
||||||
matrix_set(matrix_world, matrix_build_identity());
|
matrix_set(matrix_world, matrix_build_identity());
|
||||||
|
|
||||||
d3d11_shader_override_vs(-1);
|
d3d11_shader_override_vs(-1);
|
||||||
d3d11_shader_override_ps(-1);
|
d3d11_shader_override_ps(-1);
|
||||||
|
|
||||||
surface_reset_target();
|
surface_reset_target();
|
||||||
|
|
||||||
return _output;
|
return _output;
|
||||||
|
|
|
@ -7,7 +7,7 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
inputs[| 1] = nodeValue("Background texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
inputs[| 1] = nodeValue("Background texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Corner (18 sprites)", "Corner + Side (55 sprites)" ] );
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "GMS Corner (18 sprites)", "GMS Corner + Side (55 sprites)", "Godot Blob (48 sprites)" ] );
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Output type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 3] = nodeValue("Output type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Sheet", "Array" ] );
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Sheet", "Array" ] );
|
||||||
|
@ -75,6 +75,8 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
0, /**/ 0, 0, 1, /**/ 4, 0,
|
0, /**/ 0, 0, 1, /**/ 4, 0,
|
||||||
0, /**/ 0, 0, 2, /**/ 4, 3];
|
0, /**/ 0, 0, 2, /**/ 4, 3];
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
index_55 = [208, 224, 104, /**/ 64, /**/ 80, 120, 216, 72, /**/ 88, 219, -1,
|
index_55 = [208, 224, 104, /**/ 64, /**/ 80, 120, 216, 72, /**/ 88, 219, -1,
|
||||||
148, 255, 41, /**/ 66, /**/ 86, 127, 223, 75, /**/ 95, 126, -1,
|
148, 255, 41, /**/ 66, /**/ 86, 127, 223, 75, /**/ 95, 126, -1,
|
||||||
22, 7, 11, /**/ 2, /**/ 210, 251, 254, 106, /**/ 250, 218, 122,
|
22, 7, 11, /**/ 2, /**/ 210, 251, 254, 106, /**/ 250, 218, 122,
|
||||||
|
@ -104,6 +106,34 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
0, 0, 2, /**/ 2, /**/ 4, 4, 0, 1, /**/ 4, 4, 6,
|
0, 0, 2, /**/ 2, /**/ 4, 4, 0, 1, /**/ 4, 4, 6,
|
||||||
0, 0, 5, /**/ 5, /**/ 4, 4, 0, 2, /**/ 4, 3, 6,
|
0, 0, 5, /**/ 5, /**/ 4, 4, 0, 2, /**/ 4, 3, 6,
|
||||||
0, 0, 0, /**/ 0, /**/ 6, 6, 0, 1, /**/ 6, 0, 0, ];
|
0, 0, 0, /**/ 0, /**/ 6, 6, 0, 1, /**/ 6, 0, 0, ];
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
index_48 = [ 64, 80, 88, 72, /**/ 91, 216, 120, 94, /**/ 208, 250, 224, 104,
|
||||||
|
66, 82, 90, 74, /**/ 210, 254, 251, 106, /**/ 148, 126, -1, 123,
|
||||||
|
2, 18, 26, 10, /**/ 86, 223, 127, 75, /**/ 222, 255, 219, 41,
|
||||||
|
0, 16, 24, 8, /**/ 122, 30, 27, 218, /**/ 22, 7, 95, 11, ];
|
||||||
|
|
||||||
|
index_48_et = [ 5, 0, 1, 2, 4, 1, 1, 3, 0, 6, 1, 2,
|
||||||
|
0, 3, 6, 4, 3, 4, 3, 4, 0, 4, 0, 3,
|
||||||
|
0, 3, 6, 4, 0, 0, 0, 0, 4, 0, 3, 0,
|
||||||
|
5, 0, 1, 2, 6, 4, 3, 6, 0, 0, 0, 0, ];
|
||||||
|
|
||||||
|
index_48_eb = [ 0, 3, 6, 4, 6, 4, 3, 6, 0, 0, 0, 0,
|
||||||
|
0, 3, 6, 4, 0, 0, 0, 0, 0, 3, 0, 3,
|
||||||
|
5, 0, 1, 2, 3, 4, 3, 4, 4, 0, 4, 0,
|
||||||
|
5, 0, 1, 2, 3, 1, 1, 4, 0, 1, 6, 2, ];
|
||||||
|
|
||||||
|
index_48_el = [ 0, 0, 4, 3, 3, 3, 0, 6, 0, 4, 0, 0,
|
||||||
|
1, 1, 6, 6, 1, 4, 0, 4, 1, 4, 0, 0,
|
||||||
|
2, 2, 4, 4, 1, 3, 0, 3, 6, 0, 3, 0,
|
||||||
|
5, 5, 0, 0, 4, 4, 0, 6, 2, 0, 4, 0, ];
|
||||||
|
|
||||||
|
index_48_er = [ 0, 3, 3, 0, 6, 0, 3, 3, 0, 4, 0, 0,
|
||||||
|
1, 6, 6, 1, 4, 0, 4, 1, 0, 3, 0, 6,
|
||||||
|
2, 4, 4, 2, 3, 0, 3, 1, 0, 0, 4, 1,
|
||||||
|
5, 0, 0, 5, 6, 0, 4, 4, 0, 0, 3, 2, ];
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
|
||||||
|
@ -121,105 +151,9 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
inputs[| 13].setVisible(_edgType == 0);
|
inputs[| 13].setVisible(_edgType == 0);
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static generate18 = function(_data, _tex0, _tex1, _edge, _crop) { #region
|
static generateFull = function(_data, _tex0, _tex1, _edge, _crop, indMain, indEdge_et, indEdge_eb, indEdge_el, indEdge_er) { #region
|
||||||
var _sprs = array_create(18);
|
var _len = array_length(indMain);
|
||||||
var _use1 = is_surface(_tex1);
|
var _sprs = array_create(_len);
|
||||||
var _sw = surface_get_width_safe(_tex0);
|
|
||||||
var _sh = surface_get_height_safe(_tex0);
|
|
||||||
|
|
||||||
var r = _crop[0];
|
|
||||||
var t = _crop[1];
|
|
||||||
var l = _crop[2];
|
|
||||||
var b = _crop[3];
|
|
||||||
|
|
||||||
var _edgeShf = _data[10];
|
|
||||||
var _edgFull = _data[11];
|
|
||||||
|
|
||||||
for( var i = 0; i < 18; i++ ) {
|
|
||||||
var _index = index_18[i];
|
|
||||||
if(_index < 0) {
|
|
||||||
_sprs[i] = noone;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
var _s = surface_verify(temp_surface[i], _sw, _sh);
|
|
||||||
|
|
||||||
surface_set_target(_s);
|
|
||||||
DRAW_CLEAR
|
|
||||||
BLEND_ALPHA_MULP
|
|
||||||
|
|
||||||
if(_index == 15) draw_surface(_tex0, 0, 0);
|
|
||||||
else if(_use1) draw_surface(_tex1, 0, 0);
|
|
||||||
|
|
||||||
if(_index & 0b0001) draw_surface_part(_tex0, 0, 0, _sw - r, _sh - b, 0, 0);
|
|
||||||
if(_index & 0b0010) draw_surface_part(_tex0, l, 0, _sw - l, _sh - b, l, 0);
|
|
||||||
if(_index & 0b0100) draw_surface_part(_tex0, 0, t, _sw - r, _sh - t, 0, t);
|
|
||||||
if(_index & 0b1000) draw_surface_part(_tex0, l, t, _sw - l, _sh - t, l, t);
|
|
||||||
|
|
||||||
if(_index & 0b1100 >= 0b1100) draw_surface_part(_tex0, 0, t, _sw, _sh - t, 0, t);
|
|
||||||
if(_index & 0b1010 >= 0b1010) draw_surface_part(_tex0, l, 0, _sw - l, _sh, l, 0);
|
|
||||||
if(_index & 0b0101 >= 0b0101) draw_surface_part(_tex0, 0, 0, _sw - r, _sh, 0, 0);
|
|
||||||
if(_index & 0b0011 >= 0b0011) draw_surface_part(_tex0, 0, 0, _sw, _sh - b, 0, 0);
|
|
||||||
|
|
||||||
var _et = _edge[0][index_18_et[i]];
|
|
||||||
var _eb = _edge[1][index_18_eb[i]];
|
|
||||||
var _el = _edge[2][index_18_el[i]];
|
|
||||||
var _er = _edge[3][index_18_er[i]];
|
|
||||||
|
|
||||||
if(_el != noone) { #region
|
|
||||||
shader_set(sh_mk_tile18_edge_l);
|
|
||||||
shader_set_f("dimension", _sw, _sh);
|
|
||||||
shader_set_f("crop", _crop);
|
|
||||||
shader_set_i("edge", _index);
|
|
||||||
shader_set_i("fullEdge", bool(_edgFull & 0b0100));
|
|
||||||
|
|
||||||
draw_surface_ext(_el, 0, 0, 1, 1, 0, c_white, 1);
|
|
||||||
shader_reset();
|
|
||||||
} #endregion
|
|
||||||
|
|
||||||
if(_er != noone) { #region
|
|
||||||
shader_set(sh_mk_tile18_edge_r);
|
|
||||||
shader_set_f("dimension", _sw, _sh);
|
|
||||||
shader_set_f("crop", _crop);
|
|
||||||
shader_set_i("edge", _index);
|
|
||||||
shader_set_i("fullEdge", bool(_edgFull & 0b1000));
|
|
||||||
|
|
||||||
draw_surface_ext(_er, 0, 0, 1, 1, 0, c_white, 1);
|
|
||||||
shader_reset();
|
|
||||||
} #endregion
|
|
||||||
|
|
||||||
if(_et != noone) { #region
|
|
||||||
shader_set(sh_mk_tile18_edge_t);
|
|
||||||
shader_set_f("dimension", _sw, _sh);
|
|
||||||
shader_set_f("crop", _crop);
|
|
||||||
shader_set_i("edge", _index);
|
|
||||||
shader_set_i("fullEdge", bool(_edgFull & 0b0001));
|
|
||||||
|
|
||||||
draw_surface_ext(_et, 0, 0, 1, 1, 0, c_white, 1);
|
|
||||||
shader_reset();
|
|
||||||
} #endregion
|
|
||||||
|
|
||||||
if(_eb != noone) { #region
|
|
||||||
shader_set(sh_mk_tile18_edge_b);
|
|
||||||
shader_set_f("dimension", _sw, _sh);
|
|
||||||
shader_set_f("crop", _crop);
|
|
||||||
shader_set_i("edge", _index);
|
|
||||||
shader_set_i("fullEdge", bool(_edgFull & 0b0010));
|
|
||||||
|
|
||||||
draw_surface_ext(_eb, 0, 0, 1, 1, 0, c_white, 1);
|
|
||||||
shader_reset();
|
|
||||||
} #endregion
|
|
||||||
|
|
||||||
BLEND_NORMAL
|
|
||||||
surface_reset_target();
|
|
||||||
|
|
||||||
_sprs[i] = _s;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _sprs;
|
|
||||||
} #endregion
|
|
||||||
|
|
||||||
static generate55 = function(_data, _tex0, _tex1, _edge, _crop) { #region
|
|
||||||
var _sprs = array_create(55);
|
|
||||||
var _use1 = is_surface(_tex1);
|
var _use1 = is_surface(_tex1);
|
||||||
var _sw = surface_get_width_safe(_tex0);
|
var _sw = surface_get_width_safe(_tex0);
|
||||||
var _sh = surface_get_height_safe(_tex0);
|
var _sh = surface_get_height_safe(_tex0);
|
||||||
|
@ -231,8 +165,8 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
|
|
||||||
var _edgFull = _data[11];
|
var _edgFull = _data[11];
|
||||||
|
|
||||||
for( var i = 0; i < 55; i++ ) {
|
for( var i = 0; i < _len; i++ ) {
|
||||||
var _index = index_55[i];
|
var _index = indMain[i];
|
||||||
if(_index < 0) {
|
if(_index < 0) {
|
||||||
_sprs[i] = noone;
|
_sprs[i] = noone;
|
||||||
continue;
|
continue;
|
||||||
|
@ -264,10 +198,10 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
if(_index & 0b0000_1011 >= 0b0000_1011) draw_surface_part(_tex0, 0, 0, _sw - r, _sh - b, 0, 0);
|
if(_index & 0b0000_1011 >= 0b0000_1011) draw_surface_part(_tex0, 0, 0, _sw - r, _sh - b, 0, 0);
|
||||||
if(_index & 0b0001_0110 >= 0b0001_0110) draw_surface_part(_tex0, l, 0, _sw - l, _sh - b, l, 0);
|
if(_index & 0b0001_0110 >= 0b0001_0110) draw_surface_part(_tex0, l, 0, _sw - l, _sh - b, l, 0);
|
||||||
|
|
||||||
var _et = _edge[0][index_55_et[i]];
|
var _et = _edge[0][indEdge_et[i]];
|
||||||
var _eb = _edge[1][index_55_eb[i]];
|
var _eb = _edge[1][indEdge_eb[i]];
|
||||||
var _el = _edge[2][index_55_el[i]];
|
var _el = _edge[2][indEdge_el[i]];
|
||||||
var _er = _edge[3][index_55_er[i]];
|
var _er = _edge[3][indEdge_er[i]];
|
||||||
|
|
||||||
if(_el != noone) { #region
|
if(_el != noone) { #region
|
||||||
shader_set(sh_mk_tile55_edge_l);
|
shader_set(sh_mk_tile55_edge_l);
|
||||||
|
@ -322,6 +256,118 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
return _sprs;
|
return _sprs;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
static generateSimple = function(_data, _tex0, _tex1, _edge, _crop, indMain, indEdge_et, indEdge_eb, indEdge_el, indEdge_er) { #region
|
||||||
|
var _sprs = array_create(18);
|
||||||
|
var _use1 = is_surface(_tex1);
|
||||||
|
var _sw = surface_get_width_safe(_tex0);
|
||||||
|
var _sh = surface_get_height_safe(_tex0);
|
||||||
|
|
||||||
|
var r = _crop[0];
|
||||||
|
var t = _crop[1];
|
||||||
|
var l = _crop[2];
|
||||||
|
var b = _crop[3];
|
||||||
|
|
||||||
|
var _edgeShf = _data[10];
|
||||||
|
var _edgFull = _data[11];
|
||||||
|
|
||||||
|
for( var i = 0; i < 18; i++ ) {
|
||||||
|
var _index = indMain[i];
|
||||||
|
if(_index < 0) {
|
||||||
|
_sprs[i] = noone;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
var _s = surface_verify(temp_surface[i], _sw, _sh);
|
||||||
|
|
||||||
|
surface_set_target(_s);
|
||||||
|
DRAW_CLEAR
|
||||||
|
BLEND_ALPHA_MULP
|
||||||
|
|
||||||
|
if(_index == 15) draw_surface(_tex0, 0, 0);
|
||||||
|
else if(_use1) draw_surface(_tex1, 0, 0);
|
||||||
|
|
||||||
|
if(_index & 0b0001) draw_surface_part(_tex0, 0, 0, _sw - r, _sh - b, 0, 0);
|
||||||
|
if(_index & 0b0010) draw_surface_part(_tex0, l, 0, _sw - l, _sh - b, l, 0);
|
||||||
|
if(_index & 0b0100) draw_surface_part(_tex0, 0, t, _sw - r, _sh - t, 0, t);
|
||||||
|
if(_index & 0b1000) draw_surface_part(_tex0, l, t, _sw - l, _sh - t, l, t);
|
||||||
|
|
||||||
|
if(_index & 0b1100 >= 0b1100) draw_surface_part(_tex0, 0, t, _sw, _sh - t, 0, t);
|
||||||
|
if(_index & 0b1010 >= 0b1010) draw_surface_part(_tex0, l, 0, _sw - l, _sh, l, 0);
|
||||||
|
if(_index & 0b0101 >= 0b0101) draw_surface_part(_tex0, 0, 0, _sw - r, _sh, 0, 0);
|
||||||
|
if(_index & 0b0011 >= 0b0011) draw_surface_part(_tex0, 0, 0, _sw, _sh - b, 0, 0);
|
||||||
|
|
||||||
|
var _et = _edge[0][indEdge_et[i]];
|
||||||
|
var _eb = _edge[1][indEdge_eb[i]];
|
||||||
|
var _el = _edge[2][indEdge_el[i]];
|
||||||
|
var _er = _edge[3][indEdge_er[i]];
|
||||||
|
|
||||||
|
if(_el != noone) { #region
|
||||||
|
shader_set(sh_mk_tile18_edge_l);
|
||||||
|
shader_set_f("dimension", _sw, _sh);
|
||||||
|
shader_set_f("crop", _crop);
|
||||||
|
shader_set_i("edge", _index);
|
||||||
|
shader_set_i("fullEdge", bool(_edgFull & 0b0100));
|
||||||
|
|
||||||
|
draw_surface_ext(_el, 0, 0, 1, 1, 0, c_white, 1);
|
||||||
|
shader_reset();
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
if(_er != noone) { #region
|
||||||
|
shader_set(sh_mk_tile18_edge_r);
|
||||||
|
shader_set_f("dimension", _sw, _sh);
|
||||||
|
shader_set_f("crop", _crop);
|
||||||
|
shader_set_i("edge", _index);
|
||||||
|
shader_set_i("fullEdge", bool(_edgFull & 0b1000));
|
||||||
|
|
||||||
|
draw_surface_ext(_er, 0, 0, 1, 1, 0, c_white, 1);
|
||||||
|
shader_reset();
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
if(_et != noone) { #region
|
||||||
|
shader_set(sh_mk_tile18_edge_t);
|
||||||
|
shader_set_f("dimension", _sw, _sh);
|
||||||
|
shader_set_f("crop", _crop);
|
||||||
|
shader_set_i("edge", _index);
|
||||||
|
shader_set_i("fullEdge", bool(_edgFull & 0b0001));
|
||||||
|
|
||||||
|
draw_surface_ext(_et, 0, 0, 1, 1, 0, c_white, 1);
|
||||||
|
shader_reset();
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
if(_eb != noone) { #region
|
||||||
|
shader_set(sh_mk_tile18_edge_b);
|
||||||
|
shader_set_f("dimension", _sw, _sh);
|
||||||
|
shader_set_f("crop", _crop);
|
||||||
|
shader_set_i("edge", _index);
|
||||||
|
shader_set_i("fullEdge", bool(_edgFull & 0b0010));
|
||||||
|
|
||||||
|
draw_surface_ext(_eb, 0, 0, 1, 1, 0, c_white, 1);
|
||||||
|
shader_reset();
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
BLEND_NORMAL
|
||||||
|
surface_reset_target();
|
||||||
|
|
||||||
|
_sprs[i] = _s;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _sprs;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static generate18 = function(_data, _tex0, _tex1, _edge, _crop) {
|
||||||
|
INLINE
|
||||||
|
return generateSimple(_data, _tex0, _tex1, _edge, _crop, index_18, index_18_et, index_18_eb, index_18_el, index_18_er);
|
||||||
|
}
|
||||||
|
|
||||||
|
static generate55 = function(_data, _tex0, _tex1, _edge, _crop) {
|
||||||
|
INLINE
|
||||||
|
return generateFull(_data, _tex0, _tex1, _edge, _crop, index_55, index_55_et, index_55_eb, index_55_el, index_55_er);
|
||||||
|
}
|
||||||
|
|
||||||
|
static generate48 = function(_data, _tex0, _tex1, _edge, _crop) {
|
||||||
|
INLINE
|
||||||
|
return generateFull(_data, _tex0, _tex1, _edge, _crop, index_48, index_48_et, index_48_eb, index_48_el, index_48_er);
|
||||||
|
}
|
||||||
|
|
||||||
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
||||||
var _tex0 = _data[0];
|
var _tex0 = _data[0];
|
||||||
var _tex1 = _data[1];
|
var _tex1 = _data[1];
|
||||||
|
@ -374,7 +420,7 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
_edges = __edge_uniform;
|
_edges = __edge_uniform;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
for( var i = 0; i < 4; i++ ) {
|
for( var i = 0; i < 4; i++ ) { #region edges
|
||||||
var _ed = _edges[i];
|
var _ed = _edges[i];
|
||||||
var _edShf = _edgeShf[_shi[i]];
|
var _edShf = _edgeShf[_shi[i]];
|
||||||
|
|
||||||
|
@ -502,20 +548,40 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
|
|
||||||
edge_surface[i][j] = __edge_surface[_sIndx];
|
edge_surface[i][j] = __edge_surface[_sIndx];
|
||||||
}
|
}
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
_edge = edge_surface;
|
_edge = edge_surface;
|
||||||
|
|
||||||
if(!is_surface(_tex0)) return _outSurf;
|
if(!is_surface(_tex0)) return _outSurf;
|
||||||
|
|
||||||
var _surfs = _type == 0? generate18(_data, _tex0, _tex1, _edge, _crop) : generate55(_data, _tex0, _tex1, _edge, _crop);
|
var _surfs = [];
|
||||||
|
var _col = 1;
|
||||||
|
var _row = 1;
|
||||||
|
|
||||||
|
switch(_type) {
|
||||||
|
case 0 :
|
||||||
|
_surfs = generate18(_data, _tex0, _tex1, _edge, _crop);
|
||||||
|
_col = 6;
|
||||||
|
_row = 3;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1 :
|
||||||
|
_surfs = generate55(_data, _tex0, _tex1, _edge, _crop);
|
||||||
|
_col = 11;
|
||||||
|
_row = 5;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2 :
|
||||||
|
_surfs = generate48(_data, _tex0, _tex1, _edge, _crop);
|
||||||
|
_col = 12;
|
||||||
|
_row = 4;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(_outp == 1) return _surfs;
|
if(_outp == 1) return _surfs;
|
||||||
|
|
||||||
var _sw = surface_get_width_safe(_tex0);
|
var _sw = surface_get_width_safe(_tex0);
|
||||||
var _sh = surface_get_height_safe(_tex0);
|
var _sh = surface_get_height_safe(_tex0);
|
||||||
var _col = _type == 0? 6 : 11;
|
|
||||||
var _row = _type == 0? 3 : 5;
|
|
||||||
|
|
||||||
var _w = _sw * _col;
|
var _w = _sw * _col;
|
||||||
var _h = _sh * _row;
|
var _h = _sh * _row;
|
||||||
|
|
|
@ -562,6 +562,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
|
|
||||||
if(!array_empty(anchors)) {
|
if(!array_empty(anchors)) {
|
||||||
draw_set_color(isUsingTool(0)? c_white : COLORS._main_accent);
|
draw_set_color(isUsingTool(0)? c_white : COLORS._main_accent);
|
||||||
|
|
||||||
for( var i = 0, n = array_length(segments); i < n; i++ ) { #region draw path
|
for( var i = 0, n = array_length(segments); i < n; i++ ) { #region draw path
|
||||||
var _seg = segments[i];
|
var _seg = segments[i];
|
||||||
var _ox = 0, _oy = 0, _nx = 0, _ny = 0, p = 0;
|
var _ox = 0, _oy = 0, _nx = 0, _ny = 0, p = 0;
|
||||||
|
@ -570,6 +571,9 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
_nx = _x + _seg[j][0] * _s;
|
_nx = _x + _seg[j][0] * _s;
|
||||||
_ny = _y + _seg[j][1] * _s;
|
_ny = _y + _seg[j][1] * _s;
|
||||||
|
|
||||||
|
minx = min(minx, _nx); maxx = max(maxx, _nx);
|
||||||
|
miny = min(miny, _ny); maxy = max(maxy, _ny);
|
||||||
|
|
||||||
if(j) {
|
if(j) {
|
||||||
if((key_mod_press(CTRL) || isUsingTool(1)) && distance_to_line(_mx, _my, _ox, _oy, _nx, _ny) < 4)
|
if((key_mod_press(CTRL) || isUsingTool(1)) && distance_to_line(_mx, _my, _ox, _oy, _nx, _ny) < 4)
|
||||||
_line_hover = i;
|
_line_hover = i;
|
||||||
|
@ -808,7 +812,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
var l = 0, _ox = 0, _oy = 0, _nx = 0, _ny = 0, p = 0;
|
var l = 0, _ox = 0, _oy = 0, _nx = 0, _ny = 0, p = 0;
|
||||||
var sg = array_create(sample);
|
var sg = array_create(sample);
|
||||||
|
|
||||||
for(var j = 0; j < sample; j++) {
|
for(var j = 0; j <= sample; j++) {
|
||||||
p = eval_bezier(j / sample, _a0[0], _a0[1], _a1[0], _a1[1],
|
p = eval_bezier(j / sample, _a0[0], _a0[1], _a1[0], _a1[1],
|
||||||
_a0[0] + _a0[4], _a0[1] + _a0[5],
|
_a0[0] + _a0[4], _a0[1] + _a0[5],
|
||||||
_a1[0] + _a1[2], _a1[1] + _a1[3]);
|
_a1[0] + _a1[2], _a1[1] + _a1[3]);
|
||||||
|
|
|
@ -22,6 +22,7 @@ function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
||||||
cached_pos = ds_map_create();
|
cached_pos = ds_map_create();
|
||||||
|
|
||||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
|
||||||
|
var pth = getInputData(0);
|
||||||
var pos = getInputData(4);
|
var pos = getInputData(4);
|
||||||
var px = _x + pos[0] * _s;
|
var px = _x + pos[0] * _s;
|
||||||
var py = _y + pos[1] * _s;
|
var py = _y + pos[1] * _s;
|
||||||
|
|
|
@ -187,7 +187,7 @@ function value_color(i) { #region
|
||||||
#4da6ff, //flipfluid
|
#4da6ff, //flipfluid
|
||||||
];
|
];
|
||||||
|
|
||||||
if(i == 99) return $5dde8f;
|
if(i == 99) return #8fde5d;
|
||||||
return JUNCTION_COLORS[safe_mod(max(0, i), array_length(JUNCTION_COLORS))];
|
return JUNCTION_COLORS[safe_mod(max(0, i), array_length(JUNCTION_COLORS))];
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"isCompatibility": false,
|
"isCompatibility": false,
|
||||||
"isDnD": false,
|
"isDnD": false,
|
||||||
"parent": {
|
"parent": {
|
||||||
"name": "_others",
|
"name": "animation",
|
||||||
"path": "folders/panels/_others.yy",
|
"path": "folders/panels/animation.yy",
|
||||||
},
|
},
|
||||||
}
|
}
|
|
@ -5,7 +5,7 @@
|
||||||
"isCompatibility": false,
|
"isCompatibility": false,
|
||||||
"isDnD": false,
|
"isDnD": false,
|
||||||
"parent": {
|
"parent": {
|
||||||
"name": "_others",
|
"name": "collection",
|
||||||
"path": "folders/panels/_others.yy",
|
"path": "folders/panels/collection.yy",
|
||||||
},
|
},
|
||||||
}
|
}
|
|
@ -1070,6 +1070,7 @@ function Panel_Preview() : PanelContent() constructor {
|
||||||
if(mouse_wheel_up()) preview_x_to = clamp(preview_x_to + prev_size * SCROLL_SPEED, - preview_x_max, 0);
|
if(mouse_wheel_up()) preview_x_to = clamp(preview_x_to + prev_size * SCROLL_SPEED, - preview_x_max, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region surface array
|
||||||
preview_x_max = 0;
|
preview_x_max = 0;
|
||||||
var _xx = tool_side_drawing * ui(40);
|
var _xx = tool_side_drawing * ui(40);
|
||||||
var xx = _xx + preview_x + ui(8);
|
var xx = _xx + preview_x + ui(8);
|
||||||
|
@ -1111,6 +1112,8 @@ function Panel_Preview() : PanelContent() constructor {
|
||||||
xx += prev_sw + ui(8);
|
xx += prev_sw + ui(8);
|
||||||
preview_x_max += prev_sw + ui(8);
|
preview_x_max += prev_sw + ui(8);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
preview_x_max = max(preview_x_max - ui(100), 0);
|
preview_x_max = max(preview_x_max - ui(100), 0);
|
||||||
|
|
||||||
#region ++++ sequence control ++++
|
#region ++++ sequence control ++++
|
||||||
|
|
|
@ -417,7 +417,7 @@ function textArea(_input, _onModify) : textInput(_input, _onModify) constructor
|
||||||
if(cursor_select != -1) {
|
if(cursor_select != -1) {
|
||||||
var minc = min(cursor, cursor_select);
|
var minc = min(cursor, cursor_select);
|
||||||
var maxc = max(cursor, cursor_select);
|
var maxc = max(cursor, cursor_select);
|
||||||
clipboard_set_text(string_copy(_input_text, minc, maxc - minc));
|
clipboard_set_text(string_copy(_input_text, minc + 1, maxc - minc));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(key_mod_press(CTRL) && keyboard_check_pressed(ord("V")))
|
if(key_mod_press(CTRL) && keyboard_check_pressed(ord("V")))
|
||||||
|
|
|
@ -177,7 +177,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
|
||||||
if(cursor_select != -1) {
|
if(cursor_select != -1) {
|
||||||
var minc = min(cursor, cursor_select);
|
var minc = min(cursor, cursor_select);
|
||||||
var maxc = max(cursor, cursor_select);
|
var maxc = max(cursor, cursor_select);
|
||||||
clipboard_set_text(string_copy(_input_text, minc, maxc - minc));
|
clipboard_set_text(string_copy(_input_text, minc + 1, maxc - minc));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(key_mod_press(CTRL) && keyboard_check_pressed(ord("V"))) {
|
if(key_mod_press(CTRL) && keyboard_check_pressed(ord("V"))) {
|
||||||
|
|