diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index 03953da69..4ca929040 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -103,6 +103,7 @@ {"name":"generators","order":1,"path":"folders/nodes/data/simulation/VFX/generators.yy",}, {"name":"tiler","order":31,"path":"folders/nodes/data/tiler.yy",}, {"name":"shaders","order":2,"path":"folders/nodes/data/tiler/shaders.yy",}, + {"name":"sprites","order":4,"path":"folders/nodes/data/tiler/sprites.yy",}, {"name":"tools","order":1,"path":"folders/nodes/data/tiler/tools.yy",}, {"name":"transform","order":28,"path":"folders/nodes/data/transform.yy",}, {"name":"value","order":29,"path":"folders/nodes/data/value.yy",}, @@ -405,8 +406,9 @@ {"name":"__strandSim","order":2,"path":"scripts/__strandSim/__strandSim.yy",}, {"name":"__surface","order":7,"path":"scripts/__surface/__surface.yy",}, {"name":"__tiler_animated","order":1,"path":"scripts/__tiler_animated/__tiler_animated.yy",}, - {"name":"__tiler_autotile","order":6,"path":"scripts/__tiler_autotile/__tiler_autotile.yy",}, + {"name":"__tiler_autoterrain","order":6,"path":"scripts/__tiler_autoterrain/__tiler_autoterrain.yy",}, {"name":"__tiler_brush","order":2,"path":"scripts/__tiler_brush/__tiler_brush.yy",}, + {"name":"__tiler_rule","order":7,"path":"scripts/__tiler_rule/__tiler_rule.yy",}, {"name":"__tiler_tool","order":2,"path":"scripts/__tiler_tool/__tiler_tool.yy",}, {"name":"__vec2","order":7,"path":"scripts/__vec2/__vec2.yy",}, {"name":"__vec3","order":8,"path":"scripts/__vec3/__vec3.yy",}, @@ -1327,6 +1329,7 @@ {"name":"path_reader","order":5,"path":"scripts/path_reader/path_reader.yy",}, {"name":"pathAnchorBox","order":17,"path":"scripts/pathAnchorBox/pathAnchorBox.yy",}, {"name":"pathArrayBox","order":12,"path":"scripts/pathArrayBox/pathArrayBox.yy",}, + {"name":"pathnodeBox","order":17,"path":"scripts/pathnodeBox/pathnodeBox.yy",}, {"name":"pcx_parse","order":3,"path":"scripts/pcx_parse/pcx_parse.yy",}, {"name":"pcx_server","order":2,"path":"scripts/pcx_server/pcx_server.yy",}, {"name":"perlin_noise","order":5,"path":"scripts/perlin_noise/perlin_noise.yy",}, @@ -1764,8 +1767,8 @@ {"name":"sh_texture_remap","order":11,"path":"shaders/sh_texture_remap/sh_texture_remap.yy",}, {"name":"sh_threshold","order":18,"path":"shaders/sh_threshold/sh_threshold.yy",}, {"name":"sh_tile_random","order":32,"path":"shaders/sh_tile_random/sh_tile_random.yy",}, - {"name":"sh_tiler_autotile_apply","order":8,"path":"shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.yy",}, - {"name":"sh_tiler_autotile_mask","order":7,"path":"shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.yy",}, + {"name":"sh_tiler_autoterrain_apply","order":8,"path":"shaders/sh_tiler_autoterrain_apply/sh_tiler_autoterrain_apply.yy",}, + {"name":"sh_tiler_autoterrain_mask","order":7,"path":"shaders/sh_tiler_autoterrain_mask/sh_tiler_autoterrain_mask.yy",}, {"name":"sh_time_remap","order":2,"path":"shaders/sh_time_remap/sh_time_remap.yy",}, {"name":"sh_trail_filler_pass1","order":26,"path":"shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.yy",}, {"name":"sh_trail_filler_pass2","order":28,"path":"shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.yy",}, @@ -1823,6 +1826,9 @@ {"name":"s_arrow_16","order":22,"path":"sprites/s_arrow_16/s_arrow_16.yy",}, {"name":"s_arrow_back_32","order":23,"path":"sprites/s_arrow_back_32/s_arrow_back_32.yy",}, {"name":"s_arrow_wire_16","order":24,"path":"sprites/s_arrow_wire_16/s_arrow_wire_16.yy",}, + {"name":"s_autotile_11x5","order":3,"path":"sprites/s_autotile_11x5/s_autotile_11x5.yy",}, + {"name":"s_autotile_5x3","order":1,"path":"sprites/s_autotile_5x3/s_autotile_5x3.yy",}, + {"name":"s_autotile_8x6","order":2,"path":"sprites/s_autotile_8x6/s_autotile_8x6.yy",}, {"name":"s_biterator_b_grey_long","order":7,"path":"sprites/s_biterator_b_grey_long/s_biterator_b_grey_long.yy",}, {"name":"s_biterator_b_grey_short","order":8,"path":"sprites/s_biterator_b_grey_short/s_biterator_b_grey_short.yy",}, {"name":"s_biterator_b_labels","order":9,"path":"sprites/s_biterator_b_labels/s_biterator_b_labels.yy",}, @@ -2332,6 +2338,7 @@ {"name":"s_node_lua_global","order":19,"path":"sprites/s_node_lua_global/s_node_lua_global.yy",}, {"name":"s_node_lua_surface","order":18,"path":"sprites/s_node_lua_surface/s_node_lua_surface.yy",}, {"name":"s_node_magnitude","order":18,"path":"sprites/s_node_magnitude/s_node_magnitude.yy",}, + {"name":"s_node_math_operators","order":31,"path":"sprites/s_node_math_operators/s_node_math_operators.yy",}, {"name":"s_node_math","order":6,"path":"sprites/s_node_math/s_node_math.yy",}, {"name":"s_node_mesh_transform","order":1,"path":"sprites/s_node_mesh_transform/s_node_mesh_transform.yy",}, {"name":"s_node_mesh_type","order":15,"path":"sprites/s_node_mesh_type/s_node_mesh_type.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 9fa6119a0..14d4eb206 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -201,6 +201,7 @@ {"$GMFolder":"","%Name":"generators","folderPath":"folders/nodes/data/simulation/VFX/generators.yy","name":"generators","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"tiler","folderPath":"folders/nodes/data/tiler.yy","name":"tiler","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"shaders","folderPath":"folders/nodes/data/tiler/shaders.yy","name":"shaders","resourceType":"GMFolder","resourceVersion":"2.0",}, + {"$GMFolder":"","%Name":"sprites","folderPath":"folders/nodes/data/tiler/sprites.yy","name":"sprites","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"tools","folderPath":"folders/nodes/data/tiler/tools.yy","name":"tools","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"transform","folderPath":"folders/nodes/data/transform.yy","name":"transform","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"value","folderPath":"folders/nodes/data/value.yy","name":"value","resourceType":"GMFolder","resourceVersion":"2.0",}, @@ -356,6 +357,7 @@ "IncludedFiles":[ {"$GMIncludedFile":"","%Name":"Actions.zip","CopyToMask":-1,"filePath":"datafiles/data","name":"Actions.zip","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"icons.afdesign","CopyToMask":-1,"filePath":"datafiles/data/Actions","name":"icons.afdesign","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, + {"$GMIncludedFile":"","%Name":"icons.afdesign~lock~","CopyToMask":-1,"filePath":"datafiles/data/Actions","name":"icons.afdesign~lock~","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"Armature Build.json","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes","name":"Armature Build.json","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"Armature Build.png","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes","name":"Armature Build.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"Follow Path.json","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes","name":"Follow Path.json","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, @@ -364,6 +366,8 @@ {"$GMIncludedFile":"","%Name":"Iso cube.png","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes","name":"Iso cube.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"Line from Path.json","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes","name":"Line from Path.json","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"Line from Path.png","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes","name":"Line from Path.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, + {"$GMIncludedFile":"","%Name":"Pixel iso cube.json","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes","name":"Pixel iso cube.json","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, + {"$GMIncludedFile":"","%Name":"Pixel iso cube.png","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes","name":"Pixel iso cube.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"Addons.zip","CopyToMask":-1,"filePath":"datafiles/data","name":"Addons.zip","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"Assets.zip","CopyToMask":-1,"filePath":"datafiles/data","name":"Assets.zip","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"Collections.zip","CopyToMask":-1,"filePath":"datafiles/data","name":"Collections.zip","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, @@ -894,8 +898,9 @@ {"id":{"name":"__strandSim","path":"scripts/__strandSim/__strandSim.yy",},}, {"id":{"name":"__surface","path":"scripts/__surface/__surface.yy",},}, {"id":{"name":"__tiler_animated","path":"scripts/__tiler_animated/__tiler_animated.yy",},}, - {"id":{"name":"__tiler_autotile","path":"scripts/__tiler_autotile/__tiler_autotile.yy",},}, + {"id":{"name":"__tiler_autoterrain","path":"scripts/__tiler_autoterrain/__tiler_autoterrain.yy",},}, {"id":{"name":"__tiler_brush","path":"scripts/__tiler_brush/__tiler_brush.yy",},}, + {"id":{"name":"__tiler_rule","path":"scripts/__tiler_rule/__tiler_rule.yy",},}, {"id":{"name":"__tiler_tool","path":"scripts/__tiler_tool/__tiler_tool.yy",},}, {"id":{"name":"__vec2","path":"scripts/__vec2/__vec2.yy",},}, {"id":{"name":"__vec3","path":"scripts/__vec3/__vec3.yy",},}, @@ -1953,6 +1958,7 @@ {"id":{"name":"path_reader","path":"scripts/path_reader/path_reader.yy",},}, {"id":{"name":"pathAnchorBox","path":"scripts/pathAnchorBox/pathAnchorBox.yy",},}, {"id":{"name":"pathArrayBox","path":"scripts/pathArrayBox/pathArrayBox.yy",},}, + {"id":{"name":"pathnodeBox","path":"scripts/pathnodeBox/pathnodeBox.yy",},}, {"id":{"name":"patreon_email_check","path":"scripts/patreon_email_check/patreon_email_check.yy",},}, {"id":{"name":"pcx_ast","path":"scripts/pcx_ast/pcx_ast.yy",},}, {"id":{"name":"pcx_parse","path":"scripts/pcx_parse/pcx_parse.yy",},}, @@ -2467,8 +2473,8 @@ {"id":{"name":"sh_texture_repeat","path":"shaders/sh_texture_repeat/sh_texture_repeat.yy",},}, {"id":{"name":"sh_threshold","path":"shaders/sh_threshold/sh_threshold.yy",},}, {"id":{"name":"sh_tile_random","path":"shaders/sh_tile_random/sh_tile_random.yy",},}, - {"id":{"name":"sh_tiler_autotile_apply","path":"shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.yy",},}, - {"id":{"name":"sh_tiler_autotile_mask","path":"shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.yy",},}, + {"id":{"name":"sh_tiler_autoterrain_apply","path":"shaders/sh_tiler_autoterrain_apply/sh_tiler_autoterrain_apply.yy",},}, + {"id":{"name":"sh_tiler_autoterrain_mask","path":"shaders/sh_tiler_autoterrain_mask/sh_tiler_autoterrain_mask.yy",},}, {"id":{"name":"sh_time_remap","path":"shaders/sh_time_remap/sh_time_remap.yy",},}, {"id":{"name":"sh_trail_filler_pass1","path":"shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.yy",},}, {"id":{"name":"sh_trail_filler_pass2","path":"shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.yy",},}, @@ -2533,6 +2539,10 @@ {"id":{"name":"s_arrow_16","path":"sprites/s_arrow_16/s_arrow_16.yy",},}, {"id":{"name":"s_arrow_back_32","path":"sprites/s_arrow_back_32/s_arrow_back_32.yy",},}, {"id":{"name":"s_arrow_wire_16","path":"sprites/s_arrow_wire_16/s_arrow_wire_16.yy",},}, + {"id":{"name":"s_autotile_11x5","path":"sprites/s_autotile_11x5/s_autotile_11x5.yy",},}, + {"id":{"name":"s_autotile_3x3","path":"sprites/s_autotile_3x3/s_autotile_3x3.yy",},}, + {"id":{"name":"s_autotile_5x3","path":"sprites/s_autotile_5x3/s_autotile_5x3.yy",},}, + {"id":{"name":"s_autotile_8x6","path":"sprites/s_autotile_8x6/s_autotile_8x6.yy",},}, {"id":{"name":"s_biterator_b_grey_long","path":"sprites/s_biterator_b_grey_long/s_biterator_b_grey_long.yy",},}, {"id":{"name":"s_biterator_b_grey_short","path":"sprites/s_biterator_b_grey_short/s_biterator_b_grey_short.yy",},}, {"id":{"name":"s_biterator_b_labels","path":"sprites/s_biterator_b_labels/s_biterator_b_labels.yy",},}, @@ -3073,6 +3083,7 @@ {"id":{"name":"s_node_lua_global","path":"sprites/s_node_lua_global/s_node_lua_global.yy",},}, {"id":{"name":"s_node_lua_surface","path":"sprites/s_node_lua_surface/s_node_lua_surface.yy",},}, {"id":{"name":"s_node_magnitude","path":"sprites/s_node_magnitude/s_node_magnitude.yy",},}, + {"id":{"name":"s_node_math_operators","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},}, {"id":{"name":"s_node_math","path":"sprites/s_node_math/s_node_math.yy",},}, {"id":{"name":"s_node_mesh_path","path":"sprites/s_node_mesh_path/s_node_mesh_path.yy",},}, {"id":{"name":"s_node_mesh_transform","path":"sprites/s_node_mesh_transform/s_node_mesh_transform.yy",},}, diff --git a/datafiles/data/Actions.zip b/datafiles/data/Actions.zip index 8bbdf590a..1dd42a197 100644 Binary files a/datafiles/data/Actions.zip and b/datafiles/data/Actions.zip differ diff --git a/datafiles/data/Actions/Nodes/Iso cube.json b/datafiles/data/Actions/Nodes/Iso cube.json index 7b954a0bf..86a27a820 100644 --- a/datafiles/data/Actions/Nodes/Iso cube.json +++ b/datafiles/data/Actions/Nodes/Iso cube.json @@ -11,7 +11,7 @@ { "index": "orthographic_scale", "value": 0.5 }, { "index": "postioning_mode", "value": 2 }, { "index": "horizontal_angle", "value": 45 }, - { "index": "vertical_angle", "value": 30 }, + { "index": "vertical_angle", "value": 35.264 }, { "index": "l1_h_angle", "value": 0 }, { "index": "l1_v_angle", "value": 75 }, { "index": "l2_intensity", "value": 0 } diff --git a/datafiles/data/Actions/Nodes/Iso cube.png b/datafiles/data/Actions/Nodes/Iso cube.png index 4f21b393c..edd82eb85 100644 Binary files a/datafiles/data/Actions/Nodes/Iso cube.png and b/datafiles/data/Actions/Nodes/Iso cube.png differ diff --git a/datafiles/data/Actions/Nodes/Pixel iso cube.json b/datafiles/data/Actions/Nodes/Pixel iso cube.json new file mode 100644 index 000000000..f83b84a56 --- /dev/null +++ b/datafiles/data/Actions/Nodes/Pixel iso cube.json @@ -0,0 +1,24 @@ +{ + "name": "Pixel iso cube", + "tags": [], + "tooltip": "", + "location": ["3D", "3D"], + "sprPath": "./Pixel iso cube.png", + "nodes": [ + { "id": "cube", "node": "Node_3D_Mesh_Cube", "x": 0, "y": 0 }, + { "id": "camera", "node": "Node_3D_Camera_Set", "x": 320, "y": 0, + "setValues": [ { "index": "projection", "value": 1 }, + { "index": "orthographic_scale", "value": 0.5 }, + { "index": "postioning_mode", "value": 2 }, + { "index": "horizontal_angle", "value": 45 }, + { "index": "vertical_angle", "value": 30 }, + { "index": "l1_h_angle", "value": 0 }, + { "index": "l1_v_angle", "value": 75 }, + { "index": "l2_intensity", "value": 0 } + ] + } + ], + "connections": [ + { "from": "cube", "fromIndex": 0, "to": "camera", "toIndex": "scene" } + ] +} \ No newline at end of file diff --git a/datafiles/data/Actions/Nodes/Pixel iso cube.png b/datafiles/data/Actions/Nodes/Pixel iso cube.png new file mode 100644 index 000000000..a1771a4dc Binary files /dev/null and b/datafiles/data/Actions/Nodes/Pixel iso cube.png differ diff --git a/datafiles/data/Actions/icons.afdesign b/datafiles/data/Actions/icons.afdesign index 58d7597db..b31c7add5 100644 Binary files a/datafiles/data/Actions/icons.afdesign and b/datafiles/data/Actions/icons.afdesign differ diff --git a/datafiles/data/Actions/icons.afdesign~lock~ b/datafiles/data/Actions/icons.afdesign~lock~ new file mode 100644 index 000000000..cce0de609 Binary files /dev/null and b/datafiles/data/Actions/icons.afdesign~lock~ differ diff --git a/objects/o_dialog_scrollbox/Create_0.gml b/objects/o_dialog_scrollbox/Create_0.gml index 7d542734c..b2ec61cfd 100644 --- a/objects/o_dialog_scrollbox/Create_0.gml +++ b/objects/o_dialog_scrollbox/Create_0.gml @@ -111,7 +111,7 @@ event_inherited(); if(sc_content.hover && point_in_rectangle(_m[0], _m[1], 0, _ly, _dw, _ly + hght - 1)) { sc_content.hover_content = true; selecting = i; - hov = i; + hov = _val; } if(selecting == i) { @@ -158,7 +158,7 @@ event_inherited(); if(update_hover) { UNDO_HOLDING = true; - if(hov != noone) scrollbox.onModify(hov); + if(hov != noone) scrollbox.onModify(array_find(scrollbox.data, hov)); else if(initVal > -1) scrollbox.onModify(initVal); UNDO_HOLDING = false; diff --git a/scripts/__tiler_autotile/__tiler_autotile.gml b/scripts/__tiler_autoterrain/__tiler_autoterrain.gml similarity index 64% rename from scripts/__tiler_autotile/__tiler_autotile.gml rename to scripts/__tiler_autoterrain/__tiler_autoterrain.gml index 51cb3befd..155e29fec 100644 --- a/scripts/__tiler_autotile/__tiler_autotile.gml +++ b/scripts/__tiler_autoterrain/__tiler_autoterrain.gml @@ -1,13 +1,14 @@ -enum AUTOTILE_TYPE { +enum AUTOTERRAIN_TYPE { box9, side15, top48, top55, } -function tiler_brush_autotile(_type, _index) constructor { - name = "autotile"; - type = _type; +global.autoterrain_amount = [ 9, 15, 48, 55, ]; + +function tiler_brush_autoterrain(_type, _index) constructor { + name = "autoterrain"; index = _index; mask_surface = noone; @@ -21,6 +22,21 @@ function tiler_brush_autotile(_type, _index) constructor { open = false; + sc_type = new scrollBox(["Simple box (3x3)", "Side platform (5x3)", "Godot tile (12x4)", "Gamemaker tileset (11x5)"], function(ind) /*=>*/ { setType(ind); }); + sc_type.font = f_p3; + + static setType = function(_type) { + type = _type; + + switch(type) { + case 0 : index = array_verify_ext(index, 9, function() /*=>*/ {return -1}); break; + case 1 : index = array_verify_ext(index, 15, function() /*=>*/ {return -1}); break; + case 2 : index = array_verify_ext(index, 48, function() /*=>*/ {return -1}); break; + case 3 : index = array_verify_ext(index, 55, function() /*=>*/ {return -1}); break; + } + + } setType(_type); + static drawing_start = function(surface, _erase = false) { target_surface = surface; eraseMode = _erase; @@ -45,12 +61,12 @@ function tiler_brush_autotile(_type, _index) constructor { mask_surface = surface_verify(mask_surface, _dim[0], _dim[1], surface_r8unorm); update_surface = surface_verify(update_surface, _dim[0], _dim[1], surface_rgba16float); - // autotile mask - // #000000 : not part of autotile - // #808080 : part of autotile, read only - // #FFFFFF : part of autotile, writable + // autoterrain mask + // #000000 : not part of autoterrain + // #808080 : part of autoterrain, read only + // #FFFFFF : part of autoterrain, writable - surface_set_shader(mask_surface, sh_tiler_autotile_mask); + surface_set_shader(mask_surface, sh_tiler_autoterrain_mask); shader_set_surface("drawSurface", drawing_surface); shader_set_i("indexes", index); shader_set_i("indexSize", array_length(index)); @@ -58,7 +74,7 @@ function tiler_brush_autotile(_type, _index) constructor { draw_surface(target_surface, 0, 0); surface_reset_shader(); - surface_set_shader(update_surface, sh_tiler_autotile_apply); + surface_set_shader(update_surface, sh_tiler_autoterrain_apply); shader_set_2("dimension", _dim); shader_set_surface("maskSurface", mask_surface); diff --git a/scripts/__tiler_autoterrain/__tiler_autoterrain.yy b/scripts/__tiler_autoterrain/__tiler_autoterrain.yy new file mode 100644 index 000000000..16ab5ce78 --- /dev/null +++ b/scripts/__tiler_autoterrain/__tiler_autoterrain.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"v1", + "%Name":"__tiler_autoterrain", + "isCompatibility":false, + "isDnD":false, + "name":"__tiler_autoterrain", + "parent":{ + "name":"tools", + "path":"folders/nodes/data/tiler/tools.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/__tiler_brush/__tiler_brush.gml b/scripts/__tiler_brush/__tiler_brush.gml index 786dae6c9..4e636774a 100644 --- a/scripts/__tiler_brush/__tiler_brush.gml +++ b/scripts/__tiler_brush/__tiler_brush.gml @@ -5,7 +5,7 @@ function tiler_brush(node) constructor { brush_height = 0; brush_surface = noone; brush_erase = false; - autotiler = noone; + autoterrain = noone; brush_sizing = false; brush_sizing_s = 0; diff --git a/scripts/__tiler_rule/__tiler_rule.gml b/scripts/__tiler_rule/__tiler_rule.gml new file mode 100644 index 000000000..71f27f43f --- /dev/null +++ b/scripts/__tiler_rule/__tiler_rule.gml @@ -0,0 +1,10 @@ +function tiler_rule() constructor { + name = "rule"; + open = false; + + static deserialize = function(_struct) { + name = struct_try_get(_struct, "name", name); + + return self; + } +} \ No newline at end of file diff --git a/scripts/__tiler_autotile/__tiler_autotile.yy b/scripts/__tiler_rule/__tiler_rule.yy similarity index 77% rename from scripts/__tiler_autotile/__tiler_autotile.yy rename to scripts/__tiler_rule/__tiler_rule.yy index e77fe84fa..8778a82d5 100644 --- a/scripts/__tiler_autotile/__tiler_autotile.yy +++ b/scripts/__tiler_rule/__tiler_rule.yy @@ -1,9 +1,9 @@ { "$GMScript":"v1", - "%Name":"__tiler_autotile", + "%Name":"__tiler_rule", "isCompatibility":false, "isDnD":false, - "name":"__tiler_autotile", + "name":"__tiler_rule", "parent":{ "name":"tools", "path":"folders/nodes/data/tiler/tools.yy", diff --git a/scripts/array_functions/array_functions.gml b/scripts/array_functions/array_functions.gml index e188b5787..5513ee4e4 100644 --- a/scripts/array_functions/array_functions.gml +++ b/scripts/array_functions/array_functions.gml @@ -52,7 +52,8 @@ function array_resize_fill(arr, size, fill = 0) { enum ARRAY_OVERFLOW { _default, loop, - pingpong + pingpong, + clamp } #macro aGetF array_safe_get_fast @@ -71,7 +72,10 @@ function array_safe_get(arr, index, def = 0, overflow = ARRAY_OVERFLOW._default) var len = array_length(arr); if(len == 0) return def; - if(overflow == ARRAY_OVERFLOW.loop) { + if(overflow == ARRAY_OVERFLOW.clamp) { + index = clamp(index, 0, len - 1); + + } else if(overflow == ARRAY_OVERFLOW.loop) { if(index < 0) index = len - safe_mod(abs(index), len); index = index % len; diff --git a/scripts/buffer_functions/buffer_functions.gml b/scripts/buffer_functions/buffer_functions.gml index 2020f858b..65a9c157f 100644 --- a/scripts/buffer_functions/buffer_functions.gml +++ b/scripts/buffer_functions/buffer_functions.gml @@ -1,3 +1,13 @@ +function buffer_verify(buffer, _size, buffer_kind = buffer_fixed) { + if(buffer <= 0) return buffer_create(_size, buffer_kind, 1); + if(!buffer_exists(buffer)) return buffer_create(_size, buffer_kind, 1); + + var _s = buffer_get_size(buffer); + if(_s != _size) buffer_resize(buffer, _size); + + return buffer; +} + function buffer_get_color(buffer, _x, _y, w, h) { buffer_seek(buffer, buffer_seek_start, (w * _y + _x) * 4); var c = buffer_read(buffer, buffer_u32); @@ -45,13 +55,13 @@ function buffer_from_string(str) { return _b; } -function buffer_from_surface(surface, header = true) { +function buffer_from_surface(surface, header = true, buffer_kind = buffer_fixed) { static header_length = 24; if(!is_surface(surface)) return noone; var bitSize = surface_format_get_bytes(surface_get_format(surface)); - var _b = buffer_create((header_length * header) + surface_get_width_safe(surface) * surface_get_height_safe(surface) * bitSize, buffer_fixed, 1); + var _b = buffer_create((header_length * header) + surface_get_width_safe(surface) * surface_get_height_safe(surface) * bitSize, buffer_kind, 1); if(header) { buffer_write(_b, buffer_text, "PXCS"); buffer_write(_b, buffer_u16, surface_get_width_safe(surface)); diff --git a/scripts/button/button.gml b/scripts/button/button.gml index d6675eec4..7fb904d6b 100644 --- a/scripts/button/button.gml +++ b/scripts/button/button.gml @@ -102,16 +102,22 @@ function buttonClass(_onClick, _icon = noone) : widget() constructor { } var aa = interactable * 0.25 + 0.75; - if(icon) { - var ind = is_array(icon_index)? icon_index[0]() : icon_index; - draw_sprite_ui_uniform(icon, ind, _x + _w / 2, _y + _h / 2, icon_size, icon_blend, aa); - } + var bx = _x + _w / 2; if(text != "") { - draw_set_alpha(aa); - draw_set_text(font, fa_center, fa_center, COLORS._main_text); - draw_text_add(_x + _w / 2, _y + _h / 2, text); + var tx = _x + _w / 2; + if(icon) tx += ui(8); + + draw_set_text(font, fa_center, fa_center, COLORS._main_text, aa); + draw_text_add(tx, _y + _h / 2, text); draw_set_alpha(1); + + bx = tx - string_width(text) / 2 - ui(12); + } + + if(icon) { + var ind = is_array(icon_index)? icon_index[0]() : icon_index; + draw_sprite_ui_uniform(icon, ind, bx, _y + _h / 2, icon_size, icon_blend, aa); } if(WIDGET_CURRENT == self) draw_sprite_stretched_ext(THEME.widget_selecting, 0, _x - ui(3), _y - ui(3), _w + ui(6), _h + ui(6), COLORS._main_accent, 1); diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index ca138d899..b97cada8a 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -42,7 +42,7 @@ LATEST_VERSION = 1_18_00_0; VERSION = 1_18_01_0; SAVE_VERSION = 1_18_02_0; - VERSION_STRING = MAC? "1.18.003m" : "1.18.3.004"; + VERSION_STRING = MAC? "1.18.003m" : "1.18.3.005"; BUILD_NUMBER = 1_18_01_0; HOTKEYS = ds_map_create(); diff --git a/scripts/node_blur_path/node_blur_path.gml b/scripts/node_blur_path/node_blur_path.gml index 1de9f213c..39b5bb2b8 100644 --- a/scripts/node_blur_path/node_blur_path.gml +++ b/scripts/node_blur_path/node_blur_path.gml @@ -43,6 +43,18 @@ function Node_Blur_Path(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) __step_mask_modifier(); } + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + var _hov = false; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); + + return _hov; + } + + static getTool = function() { + var _path = getInputData(1); + return is_instanceof(_path, Node)? _path : self; + } + static processData = function(_outSurf, _data, _output_index, _array_index) { if(!is_surface(_data[0])) return _outSurf; diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index 628a1e274..2d651ca01 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -2387,7 +2387,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { static attributeDeserialize = function(attr) { struct_append(attributes, attr); - if(LOADING_VERSION < 1_18_02_0) { + if(!CLONING && LOADING_VERSION < 1_18_02_0) { if(struct_has(attr, "color_depth")) attributes.color_depth += (!array_empty(inputs) && inputs[0].type == VALUE_TYPE.surface)? 1 : 2; if(struct_has(attr, "interpolate")) attributes.interpolate++; if(struct_has(attr, "oversample")) attributes.oversample++; diff --git a/scripts/node_line/node_line.gml b/scripts/node_line/node_line.gml index 31744e382..c8523002f 100644 --- a/scripts/node_line/node_line.gml +++ b/scripts/node_line/node_line.gml @@ -120,16 +120,24 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons } var _dtype = getInputData(27); - var _hov = false; + var hv, _hov = false; - if(_dtype == 3) { - var hv = inputs[32].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); - var hv = inputs[33].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); + if(_dtype == 1) { + hv = inputs[7].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); + + } else if(_dtype == 3) { + hv = inputs[32].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); + hv = inputs[33].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); } return _hov; } + static getTool = function() { + var _path = getInputData(7); + return is_instanceof(_path, Node)? _path : self; + } + static step = function() { var px = !getInputData(17); var _tex = inputs[18].value_from != noone; diff --git a/scripts/node_math/node_math.gml b/scripts/node_math/node_math.gml index 366c03834..486c1816f 100644 --- a/scripts/node_math/node_math.gml +++ b/scripts/node_math/node_math.gml @@ -1,87 +1,62 @@ enum MATH_OPERATOR { - add, - subtract, - multiply, - divide, - power, - root, + add, // 0 + subtract, // 1 + multiply, // 2 + divide, // 3 + power, // 4 + root, // 5 - sin, - cos, - tan, + sin, // 6 + cos, // 7 + tan, // 8 - modulo, + modulo, // 9 - floor, - ceiling, - round, + floor, // 10 + ceiling, // 11 + round, // 12 - lerp, - abs, + lerp, // 13 + abs, // 14 - clamp, - snap, + clamp, // 15 + snap, // 16 + fract, // 17 } -#region create - global.node_math_keys = [ "add", "subtract", "multiply", "divide", "power", "root", "+", "-", "*", "/", "^", - "sin", "cos", "tan", - "modulo", - "round", "ceiling", "floor", - "lerp", "abs", - "clamp", "snap" ]; - - function Node_create_Math(_x, _y, _group = noone, _param = {}) { - var query = struct_try_get(_param, "query", ""); - var node = new Node_Math(_x, _y, _group).skipDefault(); - - switch(query) { #region - case "add" : - case "+" : - node.inputs[0].setValue(MATH_OPERATOR.add); break; - case "subtract" : - case "-" : - node.inputs[0].setValue(MATH_OPERATOR.subtract); break; - case "multiply" : - case "*" : - node.inputs[0].setValue(MATH_OPERATOR.multiply); break; - case "divide" : - case "/" : - node.inputs[0].setValue(MATH_OPERATOR.divide); break; - case "power" : - case "^" : - node.inputs[0].setValue(MATH_OPERATOR.power); break; - case "root" : node.inputs[0].setValue(MATH_OPERATOR.root); break; - - case "sin" : node.inputs[0].setValue(MATH_OPERATOR.sin); break; - case "cos" : node.inputs[0].setValue(MATH_OPERATOR.cos); break; - case "tan" : node.inputs[0].setValue(MATH_OPERATOR.tan); break; - - case "modulo" : node.inputs[0].setValue(MATH_OPERATOR.modulo); break; - - case "floor" : node.inputs[0].setValue(MATH_OPERATOR.floor); break; - case "ceiling" : node.inputs[0].setValue(MATH_OPERATOR.ceiling); break; - case "round" : node.inputs[0].setValue(MATH_OPERATOR.round); break; - - case "lerp" : node.inputs[0].setValue(MATH_OPERATOR.lerp); break; - case "abs" : node.inputs[0].setValue(MATH_OPERATOR.abs); break; - - case "clamp" : node.inputs[0].setValue(MATH_OPERATOR.clamp); break; - case "snap" : node.inputs[0].setValue(MATH_OPERATOR.snap); break; - } #endregion - - return node; - } -#endregion +global.node_math_keys = [ "add", "subtract", "multiply", "divide", "power", "root", + "+", "-", "*", "/", "^", + "sin", "cos", "tan", "modulo", "round", + "ceiling", "floor", "lerp", "abs", "fract", + "clamp", "snap" ]; + +global.node_math_keys_map = [ MATH_OPERATOR.add, MATH_OPERATOR.subtract, MATH_OPERATOR.multiply, MATH_OPERATOR.divide, MATH_OPERATOR.power, MATH_OPERATOR.root, + MATH_OPERATOR.add, MATH_OPERATOR.subtract, MATH_OPERATOR.multiply, MATH_OPERATOR.divide, MATH_OPERATOR.power, + MATH_OPERATOR.sin, MATH_OPERATOR.cos, MATH_OPERATOR.tan, MATH_OPERATOR.modulo, MATH_OPERATOR.round, + MATH_OPERATOR.ceiling, MATH_OPERATOR.floor, MATH_OPERATOR.lerp, MATH_OPERATOR.abs, MATH_OPERATOR.fract, + MATH_OPERATOR.clamp, MATH_OPERATOR.snap ]; + +global.node_math_names = [ /* 0 - 9*/ "Add", "Subtract", "Multiply", "Divide", "Power", "Root", "Sin", "Cos", "Tan", "Modulo", + /*10 - 20*/ "Floor", "Ceil", "Round", "Lerp", "Abs", "Clamp", "Snap", "Fract" ]; + +global.node_math_scroll = array_create_ext(array_length(global.node_math_names), function(i) /*=>*/ {return new scrollItem(global.node_math_names[i], s_node_math_operators, i)}); + +function Node_create_Math(_x, _y, _group = noone, _param = {}) { + var query = struct_try_get(_param, "query", ""); + var node = new Node_Math(_x, _y, _group).skipDefault(); + + var ind = array_find(global.node_math_keys, query); + if(ind != -1) node.inputs[0].setValue(global.node_math_keys_map[ind]); + + return node; +} function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Math"; color = COLORS.node_blend_number; setDimension(96, 48); - newInput(0, nodeValue_Enum_Scroll("Type", self, 0, [ - /* 0 - 9*/ "Add", "Subtract", "Multiply", "Divide", "Power", "Root", "Sin", "Cos", "Tan", "Modulo", - /*10 - 20*/ "Floor", "Ceil", "Round", "Lerp", "Abs", "Clamp", "Snap" ])) + newInput(0, nodeValue_Enum_Scroll("Type", self, 0, global.node_math_scroll)) .rejectArray(); newInput(1, nodeValue_Float("a", self, 0)) @@ -109,31 +84,7 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(index != 0) return; var _type = inputs[0].getValue(); - - switch(_type) { - case MATH_OPERATOR.add : setDisplayName("Add") break; - case MATH_OPERATOR.subtract : setDisplayName("Subtract"); break; - case MATH_OPERATOR.multiply : setDisplayName("Multiply"); break; - case MATH_OPERATOR.divide : setDisplayName("Divide"); break; - - case MATH_OPERATOR.power : setDisplayName("Power"); break; - case MATH_OPERATOR.root : setDisplayName("Root"); break; - - case MATH_OPERATOR.sin : setDisplayName("Sin"); break; - case MATH_OPERATOR.cos : setDisplayName("Cos"); break; - case MATH_OPERATOR.tan : setDisplayName("Tan"); break; - case MATH_OPERATOR.modulo : setDisplayName("Modulo"); break; - - case MATH_OPERATOR.floor : setDisplayName("Floor"); break; - case MATH_OPERATOR.ceiling : setDisplayName("Ceiling"); break; - case MATH_OPERATOR.round : setDisplayName("Round"); break; - - case MATH_OPERATOR.lerp : setDisplayName("Lerp"); break; - case MATH_OPERATOR.abs : setDisplayName("Abs"); break; - - case MATH_OPERATOR.clamp : setDisplayName("Clamp"); break; - case MATH_OPERATOR.snap : setDisplayName("Snap"); break; - } + setDisplayName(global.node_math_names[_type]); } static _eval = function(a, b, c = 0) { @@ -160,6 +111,7 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { case MATH_OPERATOR.clamp : return clamp(a, b, c); case MATH_OPERATOR.snap : return value_snap(a, b); + case MATH_OPERATOR.fract : return frac(a); } return 0; } @@ -167,15 +119,16 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static step = function() { var mode = getInputData(0); + inputs[2].setVisible(false, false); + inputs[3].setVisible(false, false); + inputs[5].setVisible(false, false); + switch(mode) { case MATH_OPERATOR.sin : case MATH_OPERATOR.cos : case MATH_OPERATOR.tan : inputs[3].setVisible(true); break; - default: - inputs[3].setVisible(false); - break; } switch(mode) { @@ -195,8 +148,6 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { break; } - inputs[5].setVisible(false); - switch(mode) { case MATH_OPERATOR.add : case MATH_OPERATOR.subtract : @@ -218,13 +169,6 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { inputs[2].setVisible(true, true); break; - case MATH_OPERATOR.floor : - case MATH_OPERATOR.ceiling : - case MATH_OPERATOR.round : - case MATH_OPERATOR.abs : - inputs[2].setVisible(false); - break; - case MATH_OPERATOR.lerp : inputs[2].name = "To"; inputs[5].name = "Amount"; @@ -295,29 +239,14 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); var str = ""; - switch(getInputData(0)) { - case MATH_OPERATOR.add : str = "+"; break; - case MATH_OPERATOR.subtract : str = "-"; break; - case MATH_OPERATOR.multiply : str = "*"; break; - case MATH_OPERATOR.divide : str = "/"; break; - case MATH_OPERATOR.power : str = "pow"; break; - case MATH_OPERATOR.root : str = "root"; break; - - case MATH_OPERATOR.sin : str = "sin"; break; - case MATH_OPERATOR.cos : str = "cos"; break; - case MATH_OPERATOR.tan : str = "tan"; break; - case MATH_OPERATOR.modulo : str = "mod"; break; - - case MATH_OPERATOR.floor : str = "floor"; break; - case MATH_OPERATOR.ceiling : str = "ceil"; break; - case MATH_OPERATOR.round : str = "round"; break; - - case MATH_OPERATOR.lerp : str = "lerp"; break; - case MATH_OPERATOR.abs : str = "abs"; break; - - case MATH_OPERATOR.clamp : str = "clamp"; break; - case MATH_OPERATOR.snap : str = "snap"; break; - default: return; + var typ = getInputData(0); + + switch(typ) { + case MATH_OPERATOR.add : str = "+"; break; + case MATH_OPERATOR.subtract : str = "-"; break; + case MATH_OPERATOR.multiply : str = "*"; break; + case MATH_OPERATOR.divide : str = "/"; break; + default: str = string_lower(global.node_math_names[typ]); } var bbox = drawGetBbox(xx, yy, _s); diff --git a/scripts/node_mesh_create_path/node_mesh_create_path.gml b/scripts/node_mesh_create_path/node_mesh_create_path.gml index d47cab4ec..fb324e281 100644 --- a/scripts/node_mesh_create_path/node_mesh_create_path.gml +++ b/scripts/node_mesh_create_path/node_mesh_create_path.gml @@ -13,6 +13,9 @@ function Node_Mesh_Create_Path(_x, _y, _group = noone) : Node(_x, _y, _group) co newOutput(0, nodeValue_Output("Mesh", self, VALUE_TYPE.mesh, noone)); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + var _hov = false; + var hv = inputs[0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); + var mesh = outputs[0].getValue(); if(mesh == noone) return; diff --git a/scripts/node_path/node_path.gml b/scripts/node_path/node_path.gml index b33f9d739..5b5580751 100644 --- a/scripts/node_path/node_path.gml +++ b/scripts/node_path/node_path.gml @@ -663,7 +663,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { #endregion } - if(hover == -1) return; + if(hover == -1) return false; line_hover = _line_hover; /////////////////////////////////////////////////////// TOOLS /////////////////////////////////////////////////////// @@ -826,6 +826,8 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { RENDER_ALL } } + + return true; } static updateLength = function() { @@ -956,12 +958,13 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { _a0 = anchors[(i + 0) % ansize]; _a1 = anchors[(i + 1) % ansize]; - if(_dist > lengths[i]) { - _dist -= lengths[i]; + var _l = array_safe_get(lengths, i, 0, ARRAY_OVERFLOW.clamp); + if(_dist > _l) { + _dist -= _l; continue; } - var _t = lengths[i] == 0? 0 : _dist / lengths[i]; + var _t = _l == 0? 0 : _dist / _l; if(_a0[4] == 0 && _a0[5] == 0 && _a1[2] == 0 && _a1[3] == 0) { out.x = lerp(_a0[0], _a1[0], _t); diff --git a/scripts/node_pixel_math/node_pixel_math.gml b/scripts/node_pixel_math/node_pixel_math.gml index 6a3811ff6..f54d7630b 100644 --- a/scripts/node_pixel_math/node_pixel_math.gml +++ b/scripts/node_pixel_math/node_pixel_math.gml @@ -1,3 +1,14 @@ +function Node_create_Pixel_Math(_x, _y, _group = noone, _param = {}) { + var query = struct_try_get(_param, "query", ""); + var node = new Node_Pixel_Math(_x, _y, _group).skipDefault(); + + var ind = array_find(global.node_math_keys, query); + if(ind != -1) node.inputs[7].setValue(global.node_math_keys_map[ind]); + + return node; +} + + function Node_Pixel_Math(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pixel Math"; @@ -15,9 +26,7 @@ function Node_Pixel_Math(_x, _y, _group = noone) : Node_Processor(_x, _y, _group __init_mask_modifier(2); // inputs 5, 6, - oprList = [ "Add", "Subtract", "Multiply", "Divide", "Power", "Root", "Sin", "Cos", "Tan", "Modulo", - "Floor", "Ceil", "Round", "Abs", "Clamp" ]; - newInput(7, nodeValue_Enum_Scroll("Operator", self, 0, oprList)); + newInput(7, nodeValue_Enum_Scroll("Operator", self, 0, global.node_math_scroll)); newInput(8, nodeValue_Vec4("Operand", self, [ 0, 0, 0, 0 ])); @@ -27,11 +36,14 @@ function Node_Pixel_Math(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(11, nodeValue_Surface("Operand surface", self)); + newInput(12, nodeValue_Float("Mix", self, .5)) + .setDisplay(VALUE_DISPLAY.slider); + newOutput(0, nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone)); input_display_list = [ 1, 4, ["Surfaces", false], 0, 2, 3, 5, 6, - ["Operation", false], 7, 10, 8, 9, 11, + ["Operation", false], 7, 10, 8, 9, 12, 11, ] attribute_surface_depth(); @@ -46,54 +58,41 @@ function Node_Pixel_Math(_x, _y, _group = noone) : Node_Processor(_x, _y, _group var op2 = _data[9]; var opType = _data[10]; var opS = _data[11]; + var mixAmo = _data[12]; - var _oprand = oprList[type]; + var _oprand = global.node_math_scroll[type]; setDisplayName(_oprand); + inputs[ 8].setVisible(false); + inputs[ 9].setVisible(false); + inputs[11].setVisible(opType, opType); + inputs[12].setVisible(type == MATH_OPERATOR.lerp); + if(opType == 0) { - switch(_oprand) { - case "Add" : - case "Subtract" : - case "Multiply" : - case "Divide" : - case "Power" : - case "Root" : - case "Modulo" : + switch(type) { + case MATH_OPERATOR.add : + case MATH_OPERATOR.subtract : + case MATH_OPERATOR.multiply : + case MATH_OPERATOR.divide : + case MATH_OPERATOR.power : + case MATH_OPERATOR.root : + case MATH_OPERATOR.modulo : + case MATH_OPERATOR.snap : inputs[8].setVisible( true); - inputs[9].setVisible(false); break; - case "Sin" : - case "Cos" : - case "Tan" : - - case "Floor" : - case "Ceil" : - case "Round" : - case "Abs" : - inputs[8].setVisible(false); - inputs[9].setVisible(false); - break; - - case "Clamp" : - inputs[8].setVisible(false); + case MATH_OPERATOR.clamp : inputs[9].setVisible( true); break; } - - inputs[11].setVisible(false, false); - - } else { - inputs[ 8].setVisible(false); - inputs[ 9].setVisible(false); - inputs[11].setVisible(true, true); } surface_set_shader(_outSurf, sh_pixel_math); shader_set_i("operator", type); shader_set_i("operandType", opType ); + shader_set_f("mixAmount", mixAmo ); shader_set_surface("operandSurf", opS ); shader_set_4("operand", _oprand == "Clamp"? [ op2[0], op2[1], 0, 0] : op4 ); diff --git a/scripts/node_plot_linear/node_plot_linear.gml b/scripts/node_plot_linear/node_plot_linear.gml index 45e6c85cd..45965642e 100644 --- a/scripts/node_plot_linear/node_plot_linear.gml +++ b/scripts/node_plot_linear/node_plot_linear.gml @@ -138,10 +138,16 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou active &= !a; } + var a = inputs[20].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; var a = inputs[28].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !a; var a = inputs[30].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !a; } + static getTool = function() { + var _path = getInputData(20); + return is_instanceof(_path, Node)? _path : self; + } + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[ 0]; var _dat = _data[ 1]; diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index c69170aa9..ef040ec27 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -649,7 +649,7 @@ function __initNodes() { addNodeObject(filter, "JPEG", s_node_JPEG, "Node_JPEG", [1, Node_JPEG],, "Apply JPEG compression to the image.").setVersion(11730); addNodeObject(filter, "Interlace", s_node_interlace, "Node_Interlaced", [1, Node_Interlaced],, "Apply interlace effect to an image.").setVersion(11760); addNodeObject(filter, "Blend Edge", s_node_blend_edge, "Node_Blend_Edge", [1, Node_Blend_Edge],, "Blend the edges of an image to create tilable patterns.").setVersion(11740); - addNodeObject(filter, "Pixel Math", s_node_pixel_math, "Node_Pixel_Math", [1, Node_Pixel_Math],, "Apply mathematical operation directly on RGBA value.").setVersion(1_18_02_0); + addNodeObject(filter, "Pixel Math", s_node_pixel_math, "Node_Pixel_Math", [0, Node_create_Pixel_Math], global.node_math_keys, "Apply mathematical operation directly on RGBA value.").setVersion(1_18_02_0); ds_list_add(filter, "Colors"); addNodeObject(filter, "Replace Palette", s_node_replace_palette, "Node_Color_replace", [1, Node_Color_replace], ["isolate color", "select color", "palette swap", "color replace"], "Match image to a palette then remap it to another palette."); diff --git a/scripts/node_repeat/node_repeat.gml b/scripts/node_repeat/node_repeat.gml index 4049280c5..0d52f1cc5 100644 --- a/scripts/node_repeat/node_repeat.gml +++ b/scripts/node_repeat/node_repeat.gml @@ -269,7 +269,8 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co else if(_pat == 2) { var hv = inputs[8].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; } var hv = inputs[31].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[1]); active &= !hv; _hov |= hv; - + var hv = inputs[11].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var _ani_amo = getInputAmount(); if(_ani_amo == 0) return _hov; @@ -279,17 +280,18 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var _prop = current_data[_ind + 0]; var _selc = current_data[_ind + 1]; - if(_selc == 0) { - - - } else if(_selc == 1) { + if(_selc == 1) { var hv = inputs[_ind + 9].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; - } return _hov; } + static getTool = function() { + var _path = getInputData(11); + return is_instanceof(_path, Node)? _path : self; + } + static preGetInputs = function() { var _arr = getSingleValue(16); var _pat = getSingleValue(3); diff --git a/scripts/node_scatter/node_scatter.gml b/scripts/node_scatter/node_scatter.gml index d69c689f5..e825f7057 100644 --- a/scripts/node_scatter/node_scatter.gml +++ b/scripts/node_scatter/node_scatter.gml @@ -162,12 +162,19 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var _distType = current_data[6]; var _hov = false; - if(_distType < 3) { var hv = inputs[5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; } + if(_distType < 3) { var hv = inputs[ 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; } + if(_distType == 4) { var hv = inputs[19].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; } + var hv = inputs[29].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[1]); active &= !hv; _hov |= hv; return _hov; } + static getTool = function() { + var _path = getInputData(19); + return is_instanceof(_path, Node)? _path : self; + } + static onValueUpdate = function(index) { if(index == 15) { var _arr = getInputData(15); diff --git a/scripts/node_shape/node_shape.gml b/scripts/node_shape/node_shape.gml index 814b833c4..a9b79f00b 100644 --- a/scripts/node_shape/node_shape.gml +++ b/scripts/node_shape/node_shape.gml @@ -176,6 +176,9 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ox = nx; oy = ny; } + + var hv = inputs[14].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); + return _hov; } @@ -258,6 +261,11 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con return _hov; } + static getTool = function() { + var _path = getInputData(14); + return is_instanceof(_path, Node)? _path : self; + } + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _bg = _data[1]; diff --git a/scripts/node_strand_create/node_strand_create.gml b/scripts/node_strand_create/node_strand_create.gml index 6adcfa31f..5d2a41466 100644 --- a/scripts/node_strand_create/node_strand_create.gml +++ b/scripts/node_strand_create/node_strand_create.gml @@ -115,7 +115,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const tool_grabbing = []; #endregion - static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _typ = getInputData(0); var _pre = getInputData(16); if(!attributes.use_groom) @@ -418,9 +418,9 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const tool_dmx = __mx; tool_dmy = __my; - } #endregion + } - static step = function() { #region + static step = function() { var _typ = getInputData(0); inputs[ 5].setVisible(_typ == 1, _typ == 1); @@ -430,9 +430,9 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const inputs[15].editWidget.text = attributes.use_groom? "Unbake" : "Bake"; inputs[15].editWidget.blend = attributes.use_groom? COLORS._main_value_negative : COLORS._main_value_positive; - } #endregion + } - static strandUpdate = function(willReset = false) { #region + static strandUpdate = function(willReset = false) { var _typ = getInputData(0); var _den = getInputData(1); var _len = getInputData(2); @@ -531,30 +531,30 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const ind++; } - } #endregion + } - static update = function(frame = CURRENT_FRAME) { #region + static update = function(frame = CURRENT_FRAME) { strandUpdate(IS_FIRST_FRAME); - } #endregion + } - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); draw_sprite_fit(s_node_strandSim_create, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); - } #endregion + } - static attributeSerialize = function() { #region + static attributeSerialize = function() { var att = {}; att.use_groom = attributes.use_groom; att.fixStrand = groomed.serialize(); return att; - } #endregion + } - static attributeDeserialize = function(attr) { #region + static attributeDeserialize = function(attr) { struct_append(attributes, attr); if(struct_has(attr, "fixStrand")) groomed.deserialize(attr.fixStrand); attributes.use_groom = struct_try_get(attr, "use_groom", false); - } #endregion + } } \ No newline at end of file diff --git a/scripts/node_text/node_text.gml b/scripts/node_text/node_text.gml index 84e2c6b87..b88149a0b 100644 --- a/scripts/node_text/node_text.gml +++ b/scripts/node_text/node_text.gml @@ -139,6 +139,18 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons return random_range_seed(-1, 1, _x + seed) * __wave_ampli; } + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + var _hov = false; + var hv = inputs[13].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); + + return _hov; + } + + static getTool = function() { + var _path = getInputData(13); + return is_instanceof(_path, Node)? _path : self; + } + static processData = function(_outSurf, _data, _output_index, _array_index) { var str = _data[0], strRaw = str; var _font = _data[1]; diff --git a/scripts/node_tiler/node_tiler.gml b/scripts/node_tiler/node_tiler.gml index a6a386478..7dcff2957 100644 --- a/scripts/node_tiler/node_tiler.gml +++ b/scripts/node_tiler/node_tiler.gml @@ -12,10 +12,11 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput( 2, nodeValue_Bool("Animated", self, false)); input_display_list = [ 1, 0 ]; - input_display_list_tileset = ["Tileset", false, noone, noone]; - input_display_list_autotiles = ["Autotiles", true, noone, noone]; - input_display_list_palette = ["Palette", true, noone, noone]; - input_display_list_animated = ["Animated", true, 2, noone]; + input_display_list_tileset = ["Tileset", false, noone, noone]; + input_display_list_autoterrains = ["Autoterrain", true, noone, noone]; + input_display_list_palette = ["Palette", true, noone, noone]; + input_display_list_animated = ["Animated", true, 2, noone]; + input_display_list_rule = ["Rule", true, noone, noone]; newOutput(0, nodeValue_Output("Tile output", self, VALUE_TYPE.surface, noone)); @@ -24,9 +25,11 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newOutput(2, nodeValue_Output("Index array", self, VALUE_TYPE.integer, [])) .setArrayDepth(1); + output_display_list = [ 0, 1 ]; + #region ++++ data ++++ canvas_surface = surface_create_empty(1, 1, surface_rgba16float); - canvas_buffer = buffer_create(1 * 1 * 2, buffer_grow, 2); + canvas_buffer = buffer_create(1, buffer_grow, 4); drawing_surface = noone; draw_stack = ds_list_create(); @@ -163,9 +166,9 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou if(_tool) { var brush = tileset.brush; - brush.node = self; - brush.brush_size = tool_attribute.size; - brush.autotiler = array_safe_get(tileset.autotiles, tileset.autotile_selecting, noone); + brush.node = self; + brush.brush_size = tool_attribute.size; + brush.autoterrain = array_safe_get(tileset.autoterrains, tileset.autoterrain_selecting, noone); _tool.brush = brush; _tool.subtool = _currTool.selecting; @@ -242,7 +245,7 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou #endregion - //if(!array_empty(autotiles)) draw_surface_ext(autotiles[0].mask_surface, 32, 32, 8, 8, 0, c_white, 1); + //if(!array_empty(autoterrains)) draw_surface_ext(autoterrains[0].mask_surface, 32, 32, 8, 8, 0, c_white, 1); // draw_surface_ext(canvas_surface, 32, 32, 8, 8, 0, c_white, 1); // draw_surface_ext(drawing_surface, 232, 32, 8, 8, 0, c_white, 1); // draw_surface_ext(preview_draw_overlay, 432, 32, 8, 8, 0, c_white, 1); @@ -256,16 +259,18 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou return _outData; } - input_display_list_tileset[3] = tileset.tile_selector_toggler; - input_display_list_autotiles[3] = tileset.autotile_selector_toggler; - input_display_list_palette[3] = tileset.palette_viewer_toggler; - input_display_list_animated[3] = tileset.animated_viewer_toggler; + input_display_list_tileset[3] = tileset.tile_selector_toggler; + input_display_list_autoterrains[3] = tileset.autoterrain_selector_toggler; + input_display_list_palette[3] = tileset.palette_viewer_toggler; + input_display_list_animated[3] = tileset.animated_viewer_toggler; + input_display_list_rule[3] = tileset.rules_viewer_toggler; input_display_list = [ 1, 0, - input_display_list_tileset, tileset.tile_selector, - input_display_list_autotiles, tileset.autotile_selector, - input_display_list_palette, tileset.palette_viewer, - input_display_list_animated, tileset.animated_viewer, + input_display_list_tileset, tileset.tile_selector, + input_display_list_autoterrains, tileset.autoterrain_selector, + input_display_list_palette, tileset.palette_viewer, + input_display_list_animated, tileset.animated_viewer, + input_display_list_rule, tileset.rules_viewer, ] var _tileSet = tileset.texture; @@ -290,17 +295,13 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou if(!is_surface(_tileSet)) return _outData; - var _tileOut = _outData[0]; - var _tileMap = _outData[1]; - var _arrIndx = _outData[2]; - var _outDim = [ _tileSiz[0] * _mapSize[0], _tileSiz[1] * _mapSize[1] ]; - _tileOut = surface_verify(_tileOut, _outDim[0], _outDim[1]); - _tileMap = surface_verify(_tileMap, _mapSize[0], _mapSize[1], surface_rgba16float); - _arrIndx = array_verify(_arrIndx, _mapSize[0] * _mapSize[1]); + var _tileOut = surface_verify(_outData[0], _outDim[0], _outDim[1]); + var _tileMap = surface_verify(_outData[1], _mapSize[0], _mapSize[1], surface_rgba16float); + var _arrIndx = array_verify( _outData[2], _mapSize[0] * _mapSize[1]); - buffer_resize(canvas_buffer, _mapSize[0] * _mapSize[1] * 2); + canvas_buffer = buffer_verify(canvas_buffer, _mapSize[0] * _mapSize[1] * 8); buffer_get_surface(canvas_buffer, canvas_surface, 0); surface_set_shader(_tileMap, sh_sample, true, BLEND.over); @@ -329,33 +330,22 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - static doSerialize = function(_map) { - _map.surface = buffer_serialize(canvas_buffer); - } - - static doApplyDeserialize = function() { - canvas_buffer = buffer_deserialize(load_map.surface); - canvas_surface = surface_verify(canvas_surface, attributes.dimension[0], attributes.dimension[1], surface_rgba16float); - drawing_surface = surface_verify(drawing_surface, attributes.dimension[0], attributes.dimension[1], surface_rgba16float); - - buffer_set_surface(canvas_buffer, canvas_surface, 0); - buffer_set_surface(canvas_buffer, drawing_surface, 0); - } - static attributeSerialize = function() { - var _attr = { - canvas: buffer_from_surface(canvas_surface) - }; + attributes.canvas = surface_encode(canvas_surface); - return _attr; + return attributes; } static attributeDeserialize = function(attr) { var _canv = struct_try_get(attr, "canvas", noone); - if(_canv) { + if(_canv != noone) { surface_free_safe(canvas_surface); - canvas_surface = surface_from_buffer(_canv); + canvas_surface = surface_decode(_canv); + + var _dim = surface_get_dimension(canvas_surface); + buffer_delete_safe(canvas_buffer); + canvas_buffer = buffer_from_surface(canvas_surface, false, buffer_grow); } } } \ No newline at end of file diff --git a/scripts/node_tiler_tileset/node_tiler_tileset.gml b/scripts/node_tiler_tileset/node_tiler_tileset.gml index c2112bf02..cd7a9cf89 100644 --- a/scripts/node_tiler_tileset/node_tiler_tileset.gml +++ b/scripts/node_tiler_tileset/node_tiler_tileset.gml @@ -1,9 +1,11 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { - name = "Tileset"; + name = "Tileset"; + min_h = 128; + bypass_grid = true; renaming = noone; rename_text = ""; - tb_rename = new textBox(TEXTBOX_INPUT.text, function(_name) { + tb_rename = new textBox(TEXTBOX_INPUT.text, function(_name) { if(renaming == noone) return; renaming.name = _name; renaming = noone; @@ -39,7 +41,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr selecting_surface = noone; selecting_surface_tile = noone; - autotile_selector_mask = 0; + autoterrain_selector_mask = 0; grid_draw = true; brush = new tiler_brush(self); @@ -90,7 +92,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _yy, _w, _tsh, COLORS.node_composite_bg_blend, 1); tile_selector_surface = surface_verify(tile_selector_surface, _sw, _sh); tile_selector_mask = surface_verify(tile_selector_mask, _sw, _sh); - autotile_selector_mask = surface_verify(autotile_selector_mask, _sw, _sh); + autoterrain_selector_mask = surface_verify(autoterrain_selector_mask, _sw, _sh); if(!is_surface(_tileSet)) return _h; var _tdim = surface_get_dimension(_tileSet); @@ -156,18 +158,18 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr draw_rectangle_width(_tileHov_x, _tileHov_y, _tileHov_x + _tileSel_w - 1, _tileHov_y + _tileSel_h - 1, 1); if(mouse_press(mb_left, _focus)) { - if(autotile_subtile_selecting == noone) { - autotile_selecting = noone; + if(autoterrain_subtile_selecting == noone) { + autoterrain_selecting = noone; animated_selecting = noone; tile_selecting = true; tile_select_ss = [ _mtx, _mty ]; } else { - autotiles[autotile_selecting].index[autotile_subtile_selecting] = _mid; - autotile_subtile_selecting++; - if(autotile_subtile_selecting >= array_length(autotiles[autotile_selecting].index)) - autotile_subtile_selecting = noone; + autoterrain[autoterrain_selecting].index[autoterrain_subtile_selecting] = _mid; + autoterrain_subtile_selecting++; + if(autoterrain_subtile_selecting >= array_length(autoterrain[autoterrain_selecting].index)) + autoterrain_subtile_selecting = noone; } palette_using = false; @@ -275,10 +277,10 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr draw_surface_ext(tile_selector_mask, _sx, _sy, 1, 1, 0, _cc, 1); shader_reset(); - if(autotile_selecting != noone) { // autotile - var _att = autotiles[autotile_selecting]; + if(autoterrain_selecting != noone) { // autoterrain + var _att = autoterrain[autoterrain_selecting]; - surface_set_target(autotile_selector_mask); + surface_set_target(autoterrain_selector_mask); DRAW_CLEAR draw_set_color(c_white); @@ -294,7 +296,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr shader_set(sh_brush_outline); shader_set_f("dimension", _sw, _sh); - draw_surface_ext(autotile_selector_mask, _sx, _sy, 1, 1, 0, COLORS._main_accent, 1); + draw_surface_ext(autoterrain_selector_mask, _sx, _sy, 1, 1, 0, COLORS._main_accent, 1); shader_reset(); } @@ -368,15 +370,15 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr }); #endregion - #region ++++ auto tile ++++ - autotiles = []; + #region ++++ auto terrain ++++ + autoterrain = []; - autotile_selecting = noone; - autotile_selector_h = 0; + autoterrain_selecting = noone; + autoterrain_selector_h = 0; - autotile_subtile_selecting = noone; + autoterrain_subtile_selecting = noone; - autotile_selector = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus, _panel = noone) { + autoterrain_selector = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus, _panel = noone) { var _yy = _y; var _h = 0; @@ -393,12 +395,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _brush_tiles = brush.brush_width * brush.brush_height; var _fromSel = (_brush_tiles == 9 || _brush_tiles == 15 || _brush_tiles == 48 || _brush_tiles == 55); - if(!_fromSel) { - draw_sprite_uniform(THEME.add_16, 0, bx + bs / 2, by + bs / 2, 1, COLORS._main_icon); - if(_hover && point_in_rectangle(_m[0], _m[1], bx, by, bx + bs, by + bs)) - TOOLTIP = "Select region with valid size for autotiling (3x3, 5x3, 12x4, 11x5)."; - - } else if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, "New autotile from selection", THEME.add_16, 0, COLORS._main_value_positive) == 2) { + if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, _fromSel? "New autoterrain from selection" : "New autoterrain", THEME.add_16, 0, COLORS._main_value_positive) == 2) { var _new_at = noone; var _indx = array_create(brush.brush_width * brush.brush_height); @@ -406,16 +403,17 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr for( var j = 0, m = brush.brush_width; j < m; j++ ) _indx[i * brush.brush_width + j] = brush.brush_indices[i][j][0]; - if(_brush_tiles == 9) _new_at = new tiler_brush_autotile(AUTOTILE_TYPE.box9, _indx); - else if(_brush_tiles == 15) _new_at = new tiler_brush_autotile(AUTOTILE_TYPE.side15, _indx); - else if(_brush_tiles == 48) _new_at = new tiler_brush_autotile(AUTOTILE_TYPE.top48, _indx); - else if(_brush_tiles == 55) _new_at = new tiler_brush_autotile(AUTOTILE_TYPE.top55, _indx); + if(_brush_tiles == 9) _new_at = new tiler_brush_autoterrain(AUTOTERRAIN_TYPE.box9, _indx); + else if(_brush_tiles == 15) _new_at = new tiler_brush_autoterrain(AUTOTERRAIN_TYPE.side15, _indx); + else if(_brush_tiles == 48) _new_at = new tiler_brush_autoterrain(AUTOTERRAIN_TYPE.top48, _indx); + else if(_brush_tiles == 55) _new_at = new tiler_brush_autoterrain(AUTOTERRAIN_TYPE.top55, _indx); + else _new_at = new tiler_brush_autoterrain(AUTOTERRAIN_TYPE.box9, _indx); - if(_new_at != noone) { - autotile_selecting = array_length(autotiles); - animated_selecting = noone; - array_push(autotiles, _new_at); - + autoterrain_selecting = array_length(autoterrain); + animated_selecting = noone; + array_push(autoterrain, _new_at); + + if(!array_empty(_indx)) { brush.brush_indices = [[ [ _new_at.index[0], 0 ] ]]; brush.brush_width = 1; brush.brush_height = 1; @@ -429,13 +427,13 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _ah = _pd * 2; var del = -1; - draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _yy, _w, autotile_selector_h, COLORS.node_composite_bg_blend, 1); + draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _yy, _w, autoterrain_selector_h, COLORS.node_composite_bg_blend, 1); _yy += _pd; - for( var i = 0, n = array_length(autotiles); i < n; i++ ) { + for( var i = 0, n = array_length(autoterrain); i < n; i++ ) { var _hg = ui(32); - var _at = autotiles[i]; + var _at = autoterrain[i]; var _pw = ui(24); var _ph = ui(24); @@ -447,6 +445,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr if(_prin == noone) { draw_set_color(COLORS._main_icon); draw_rectangle(_px, _py, _px + _pw, _py + _ph, true); + } else { var _prc = safe_mod(_prin, _tileAmo[0]); var _prr = floor(_prin / _tileAmo[0]); @@ -462,7 +461,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _tx = _px + _pw + ui(8); var _hov = _hover && point_in_rectangle(_m[0], _m[1], _x, _yy, _x + _w, _yy + _hg - 1); - var _cc = i == autotile_selecting? COLORS._main_accent : (_hov? COLORS._main_text : COLORS._main_text_sub); + var _cc = i == autoterrain_selecting? COLORS._main_accent : (_hov? COLORS._main_text : COLORS._main_text_sub); if(renaming == _at) { tb_rename.setFocusHover(_focus, _hover); @@ -473,33 +472,36 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr draw_text_add(_tx, _yy + _hg / 2, _at.name); var bs = ui(24); - var bx = _w - bs; + var bx = _w - bs - ui(4); var by = _yy + _hg / 2 - bs / 2; if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, "", THEME.minus_16, 0, _hov? COLORS._main_value_negative : COLORS._main_icon) == 2) del = i; } if(_hov && _m[0] < _x + _w - ui(32)) { - if(DOUBLE_CLICK && _focus) { - renaming = _at; - rename_text = _at.name; - - tb_rename._current_text = _at.name; - tb_rename.activate(); - - } else if(mouse_press(mb_left, _focus)) { - if(_m[0] > _tx) { - autotile_selecting = autotile_selecting == i? noone : i; + if(_m[0] > _tx) { + if(DOUBLE_CLICK && _focus) { + renaming = _at; + rename_text = _at.name; + + tb_rename._current_text = _at.name; + tb_rename.activate(); + + } else if(mouse_press(mb_left, _focus)) { + autoterrain_selecting = autoterrain_selecting == i? noone : i; animated_selecting = noone; brush.brush_indices = [[ [ _prin, 0 ] ]]; brush.brush_width = 1; brush.brush_height = 1; palette_using = false; - - } else { - _at.open = !_at.open; - } + } + } else { + draw_set_color(COLORS._main_accent); + draw_rectangle(_px, _py, _px + _pw, _py + _ph, true); + + if(mouse_press(mb_left, _focus)) + _at.open = !_at.open; } } @@ -510,24 +512,36 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr _yy += ui(4); _ah += ui(4); + var _atWid = _at.sc_type; + var _scx = _x + ui(8); + var _scy = _yy; + var _scw = ui(200); + var _sch = ui(24); + + _atWid.setFocusHover(_focus, _hover); + _atWid.draw(_scx, _scy, _scw, _sch, _at.type, _m, autoterrain_selector.rx, autoterrain_selector.ry); + + _yy += _sch + ui(8); + _ah += _sch + ui(8); + var _atIdx = _at.index; var _coll = floor(_w - ui(16)) / _tileSiz[0]; + var _over = noone; + var _roww; switch(_at.type) { - case AUTOTILE_TYPE.box9 : _coll = 3; break; - case AUTOTILE_TYPE.side15 : _coll = 5; break; - case AUTOTILE_TYPE.top48 : _coll = 8; break; - case AUTOTILE_TYPE.top55 : _coll = 11; break; + case AUTOTERRAIN_TYPE.box9 : _coll = 3; _roww = 3; _over = s_autoterrain_3x3; break; + case AUTOTERRAIN_TYPE.side15 : _coll = 5; _roww = 3; _over = s_autoterrain_5x3; break; + case AUTOTERRAIN_TYPE.top48 : _coll = 12; _roww = 4; _over = s_autoterrain_8x6; break; + case AUTOTERRAIN_TYPE.top55 : _coll = 11; _roww = 5; _over = s_autoterrain_11x5; break; } - var _roww = ceil(array_length(_atIdx) / _coll); - var _pre_sx = _x + ui(8); var _pre_sy = _yy; var _pre_sw = _coll * _tileSiz[0]; var _pre_sh = _roww * _tileSiz[1]; - var _ss = (_w - ui(16)) / _pre_sw; + var _ss = min((_w - ui(16)) / _pre_sw, ui(64) / _tileSiz[1]); var _bw = power(2, ceil(log2(_coll))); var _bh = power(2, ceil(log2(_roww))); @@ -547,8 +561,6 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr } surface_reset_shader(); - var _tileSetDim = surface_get_dimension(_tileSet); - surface_set_shader(_at.preview_surface_tile, sh_draw_tile_map, true, BLEND.over); shader_set_2("dimension", surface_get_dimension(_at.preview_surface_tile)); @@ -560,8 +572,35 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr draw_empty(); surface_reset_shader(); + if(_over != noone) draw_sprite_ext(_over, 0, _pre_sx, _pre_sy, _ss * _tileSiz[0] / 4, _ss * _tileSiz[1] / 4, 0, COLORS._main_icon, 0.5); draw_surface_ext(_at.preview_surface_tile, _pre_sx, _pre_sy, _ss, _ss, 0, c_white, 1); + if(grid_draw) { + var _gw = _tileSiz[0] * _ss; + var _gh = _tileSiz[1] * _ss; + + var gw = _pre_sw / _tileSiz[0]; + var gh = _pre_sh / _tileSiz[1]; + + var cx = _pre_sx - 1; + var cy = _pre_sy - 1; + + draw_set_color(PROJECT.previewGrid.color); + draw_set_alpha(PROJECT.previewGrid.opacity); + + for( var j = 1; j < gw; j++ ) { + var _lxx = cx + j * _gw; + draw_line(_lxx, cy, _lxx, cy + _pre_sh * _ss); + } + + for( var j = 1; j < gh; j++ ) { + var _lyy = cy + j * _gh; + draw_line(cx, _lyy, cx + _pre_sw * _ss, _lyy); + } + + draw_set_alpha(1); + } + draw_set_color(COLORS._main_icon); draw_rectangle(_pre_sx, _pre_sy, _pre_sx + _pre_sw * _ss, _pre_sy + _pre_sh * _ss, true); @@ -581,9 +620,9 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr draw_rectangle(_at_c_sx, _at_c_sy, _at_c_sx + _dtile_w, _at_c_sy + _dtile_h, true); if(mouse_press(mb_left, _focus)) { - autotile_selecting = i; + autoterrain_selecting = i; animated_selecting = noone; - autotile_subtile_selecting = autotile_subtile_selecting == _at_id? noone : _at_id; + autoterrain_subtile_selecting = autoterrain_subtile_selecting == _at_id? noone : _at_id; } if(mouse_press(mb_right, _focus)) @@ -591,9 +630,9 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr } } - if(autotile_selecting == i && autotile_subtile_selecting != noone) { - var _at_sl_x = autotile_subtile_selecting % _coll; - var _at_sl_y = floor(autotile_subtile_selecting / _coll); + if(autoterrain_selecting == i && autoterrain_subtile_selecting != noone) { + var _at_sl_x = autoterrain_subtile_selecting % _coll; + var _at_sl_y = floor(autoterrain_subtile_selecting / _coll); var _at_c_sx = _pre_sx + _at_sl_x * _dtile_w; var _at_c_sy = _pre_sy + _at_sl_y * _dtile_h; @@ -609,11 +648,11 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr } if(del != -1) { - array_delete(autotiles, del, 1); - autotile_selecting = noone; + array_delete(autoterrain, del, 1); + autoterrain_selecting = noone; } - autotile_selector_h = max(ui(12), _ah); + autoterrain_selector_h = max(ui(12), _ah); return _h + _ah; }); #endregion @@ -621,7 +660,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr #region ++++ brush palette ++++ brush_palette_h = ui(320); - brush_palette = surface_create(16, 16, surface_rgba16float); + brush_palette = surface_create(64, 64, surface_rgba16float); brush_palette_buffer = noone; brush_palette_tile = noone; brush_palette_prev = noone; @@ -707,7 +746,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr if(brush_palette_buffer && buffer_exists(brush_palette_buffer)) brush_palette = surface_from_buffer(brush_palette_buffer); else - brush_palette = surface_create(16, 16, surface_rgba16float); + brush_palette = surface_create(64, 64, surface_rgba16float); } var _bpdim = surface_get_dimension(brush_palette); @@ -765,8 +804,8 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr var gw = _tdim[0] / _tileSiz[0]; var gh = _tdim[1] / _tileSiz[1]; - var cx = palette_selector_x; - var cy = palette_selector_y; + var cx = palette_selector_x - 1; + var cy = palette_selector_y - 1; draw_set_color(PROJECT.previewGrid.color); draw_set_alpha(PROJECT.previewGrid.opacity); @@ -798,7 +837,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr } if(palette_tool == 0 && mouse_press(mb_left, _focus)) { - autotile_selecting = noone; + autoterrain_selecting = noone; animated_selecting = noone; palette_selecting = true; palette_using = true; @@ -1074,7 +1113,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr if(_new_at != noone) { animated_selecting = array_length(animatedTiles); - autotile_selecting = noone; + autoterrain_selecting = noone; array_push(animatedTiles, _new_at); brush.brush_indices = [[ [ -(animated_selecting + 2), 0 ] ]]; @@ -1137,7 +1176,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr draw_text_add(_tx, _yy + _hg / 2, _at.name); var bs = ui(24); - var bx = _w - bs; + var bx = _w - bs - ui(4); var by = _yy + _hg / 2 - bs / 2; if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, "", THEME.minus_16, 0, _hov? COLORS._main_value_negative : COLORS._main_icon) == 2) del = i; @@ -1154,7 +1193,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr } else if(mouse_press(mb_left, _focus)) { if(_m[0] > _tx) { animated_selecting = animated_selecting == i? noone : i; - autotile_selecting = noone; + autoterrain_selecting = noone; brush.brush_indices = [[ [ - (i + 2), 0 ] ]]; brush.brush_width = 1; @@ -1238,7 +1277,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr if(mouse_press(mb_left, _focus)) { animated_selecting = i; - autotile_selecting = noone; + autoterrain_selecting = noone; animated_subtile_selecting = animated_subtile_selecting == _at_id? noone : _at_id; } @@ -1276,19 +1315,139 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr }); #endregion + #region ++++ rules ++++ + ruleTiles = []; + + rule_selecting = noone; + rule_selector_h = 0; + rule_subtile_selecting = noone; + + rules_viewer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus, _panel = noone) { + var _yy = _y; + var _h = 0; + + var _tileSet = getInputData(0); + var _tileSiz = getInputData(1); + + if(!is_surface(_tileSet)) return _h; + var _tdim = surface_get_dimension(_tileSet); + var _tileAmo = [ floor(_tdim[0] / _tileSiz[0]), floor(_tdim[1] / _tileSiz[1]) ]; + + var bx = _x; + var by = _yy; + var bs = ui(24); + + if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, "New rule", THEME.add_16, 0, COLORS._main_value_positive) == 2) { + var _new_rl = new tiler_rule(); + array_push(ruleTiles, _new_rl); + } + + _h += bs + ui(4); + _yy += bs + ui(4); + + var _pd = ui(4); + var _ah = _pd * 2; + var del = -1; + + draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _yy, _w, rule_selector_h, COLORS.node_composite_bg_blend, 1); + + _yy += _pd; + + for( var i = 0, n = array_length(ruleTiles); i < n; i++ ) { + var _hg = ui(32); + var _rl = ruleTiles[i]; + + var _pw = ui(24); + var _ph = ui(24); + var _px = _x + ui(8); + var _py = _yy + ui(4); + + var _prin = 0; + + if(_prin == noone) { + draw_set_color(COLORS._main_icon); + draw_rectangle(_px, _py, _px + _pw, _py + _ph, true); + + } else { + var _prc = safe_mod(_prin, _tileAmo[0]); + var _prr = floor(_prin / _tileAmo[0]); + + var _pr_tx = _prc * _tileSiz[0]; + var _pr_ty = _prr * _tileSiz[1]; + + var _pr_sx = _pw / _tileSiz[0]; + var _pr_sy = _ph / _tileSiz[1]; + + draw_surface_part_ext(_tileSet, _pr_tx, _pr_ty, _tileSiz[0], _tileSiz[1], _px, _py, _pr_sx, _pr_sy, c_white, 1); + } + + var _tx = _px + _pw + ui(8); + var _hov = _hover && point_in_rectangle(_m[0], _m[1], _x, _yy, _x + _w, _yy + _hg - 1); + var _cc = _hov? COLORS._main_text : COLORS._main_text_sub; + + if(renaming == _rl) { + tb_rename.setFocusHover(_focus, _hover); + tb_rename.draw(_tx, _yy, _w - _pw - ui(8), _hg, rename_text, _m); + + } else { + draw_set_text(f_p2, fa_left, fa_center, _cc); + draw_text_add(_tx, _yy + _hg / 2, _rl.name); + + var bs = ui(24); + var bx = _w - bs - ui(4); + var by = _yy + _hg / 2 - bs / 2; + if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, "", THEME.minus_16, 0, _hov? COLORS._main_value_negative : COLORS._main_icon) == 2) + del = i; + } + + if(_hov && _m[0] < _x + _w - ui(32)) { + if(DOUBLE_CLICK && _focus) { + renaming = _rl; + rename_text = _rl.name; + + tb_rename._current_text = _rl.name; + tb_rename.activate(); + + } else if(mouse_press(mb_left, _focus)) { + if(_m[0] > _tx) { + + } else { + _rl.open = !_rl.open; + } + } + } + + _yy += _hg; + _ah += _hg; + + if(_at.open) { + _yy += ui(4); + _ah += ui(4); + } + } + + if(del != -1) array_delete(ruleTiles, del, 1); + + rule_selector_h = max(ui(12), _ah); + return _h + _ah; + }); + #endregion + texture = noone; tileSize = [ 1, 1 ]; - tile_selector_toggler = button(function() /*=>*/ { tile_selector.togglePopup("Tileset"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75); - autotile_selector_toggler = button(function() /*=>*/ { autotile_selector.togglePopup("Autotile"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75); - palette_viewer_toggler = button(function() /*=>*/ { palette_viewer.togglePopup("Tile Palette"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75); - animated_viewer_toggler = button(function() /*=>*/ { animated_viewer.togglePopup("Animated Tile"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75); + tile_selector_toggler = button(function() /*=>*/ { tile_selector.togglePopup("Tileset"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75); + autoterrain_selector_toggler = button(function() /*=>*/ { autoterrain_selector.togglePopup("Autoterrain"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75); + palette_viewer_toggler = button(function() /*=>*/ { palette_viewer.togglePopup("Tile Palette"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75); + animated_viewer_toggler = button(function() /*=>*/ { animated_viewer.togglePopup("Animated Tile"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75); + rules_viewer_toggler = button(function() /*=>*/ { rules_viewer.togglePopup("Tile Riles"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75); input_display_list = [ 1, 0, - ["Tileset", false, noone, tile_selector_toggler ], tile_selector, - ["Autotiles", true, noone, autotile_selector_toggler ], autotile_selector, - ["Palette", true, noone, palette_viewer_toggler ], palette_viewer, - ["Animated", true, 2, animated_viewer_toggler ], animated_viewer, + ["Tileset", false, noone, tile_selector_toggler ], tile_selector, + ["Autoterrain", true, noone, autoterrain_selector_toggler ], autoterrain_selector, + ["Palette", true, noone, palette_viewer_toggler ], palette_viewer, + ["Animated", true, 2, animated_viewer_toggler ], animated_viewer, + ["Rules", true, noone, rules_viewer_toggler ], rules_viewer, ]; static shader_submit = function() { @@ -1303,10 +1462,11 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static step = function() { - tile_selector_toggler.icon_blend = tile_selector.popupPanel == noone? COLORS._main_icon : COLORS._main_accent; - autotile_selector_toggler.icon_blend = autotile_selector.popupPanel == noone? COLORS._main_icon : COLORS._main_accent; - palette_viewer_toggler.icon_blend = palette_viewer.popupPanel == noone? COLORS._main_icon : COLORS._main_accent; - animated_viewer_toggler.icon_blend = animated_viewer.popupPanel == noone? COLORS._main_icon : COLORS._main_accent; + tile_selector_toggler.icon_blend = tile_selector.popupPanel == noone? COLORS._main_icon : COLORS._main_accent; + autoterrain_selector_toggler.icon_blend = autoterrain_selector.popupPanel == noone? COLORS._main_icon : COLORS._main_accent; + palette_viewer_toggler.icon_blend = palette_viewer.popupPanel == noone? COLORS._main_icon : COLORS._main_accent; + animated_viewer_toggler.icon_blend = animated_viewer.popupPanel == noone? COLORS._main_icon : COLORS._main_accent; + rules_viewer_toggler.icon_blend = rules_viewer.popupPanel == noone? COLORS._main_icon : COLORS._main_accent; } static update = function(frame = CURRENT_FRAME) { @@ -1321,21 +1481,24 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr static attributeSerialize = function() { var _attr = { - autotiles, animatedTiles, - palette: buffer_from_surface(brush_palette), + autoterrain, + animatedTiles, + ruleTiles, + palette: surface_encode(brush_palette), }; return _attr; } static attributeDeserialize = function(attr) { - var _auto = struct_try_get(attr, "autotiles", []); + var _auto = struct_try_get(attr, "autoterrain", []); var _anim = struct_try_get(attr, "animatedTiles", []); - var _palt = struct_try_get(attr, "palette", noone); + var _rule = struct_try_get(attr, "ruleTiles", []); + var _palt = struct_try_get(attr, "palette", noone); for( var i = 0, n = array_length(_auto); i < n; i++ ) { - autotiles[i] = new tiler_brush_autotile(_auto[i].type, _auto[i].index); - autotiles[i].name = _auto[i].name; + autoterrain[i] = new tiler_brush_autoterrain(_auto[i].type, _auto[i].index); + autoterrain[i].name = _auto[i].name; } for( var i = 0, n = array_length(_anim); i < n; i++ ) { @@ -1343,12 +1506,19 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr animatedTiles[i].name = _anim[i].name; } - if(_palt) { + for( var i = 0, n = array_length(_rule); i < n; i++ ) + ruleTiles[i] = new tiler_rule().deserialize(_rule[i]); + + if(_palt != noone) { surface_free_safe(brush_palette); - brush_palette_buffer = _palt; - brush_palette = surface_from_buffer(_palt); + brush_palette = surface_decode(_palt); + + var _dim = surface_get_dimension(brush_palette); + buffer_delete_safe(brush_palette_buffer); + brush_palette_buffer = buffer_from_surface(brush_palette, false, buffer_grow); } refreshAnimatedData(); } + } \ No newline at end of file diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 9260f083b..29167262d 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -982,6 +982,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru break; case VALUE_TYPE.pathnode : + editWidget = new pathnodeBox(self); extract_node = "Node_Path"; break; @@ -991,6 +992,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru case VALUE_TYPE.tileset : editWidget = new tilesetBox(self); + extract_node = "Node_Tile_Tileset"; break; case VALUE_TYPE.particle : @@ -1827,42 +1829,52 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru } updateColor(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - if(type != VALUE_TYPE.integer && type != VALUE_TYPE.float) return -1; - if(value_from != noone) return -1; if(expUse) return -1; var arc = 9; - switch(display_type) { - case VALUE_DISPLAY._default : - case VALUE_DISPLAY.slider : - var _angle = argument_count > arc + 0? argument[arc + 0] : 0; - var _scale = argument_count > arc + 1? argument[arc + 1] : 1; - var _spr = argument_count > arc + 2? argument[arc + 2] : 0; - return preview_overlay_scalar(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _angle, _scale, _spr); + switch(type) { + case VALUE_TYPE.integer : + case VALUE_TYPE.float : + if(value_from != noone) return -1; + switch(display_type) { + case VALUE_DISPLAY._default : + case VALUE_DISPLAY.slider : + var _angle = argument_count > arc + 0? argument[arc + 0] : 0; + var _scale = argument_count > arc + 1? argument[arc + 1] : 1; + var _spr = argument_count > arc + 2? argument[arc + 2] : 0; + return preview_overlay_scalar(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _angle, _scale, _spr); + + case VALUE_DISPLAY.rotation : + var _rad = argument_count > arc + 0? argument[ arc + 0] : 64; + return preview_overlay_rotation(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _rad); + + case VALUE_DISPLAY.vector : + var _typ = argument_count > arc + 0? argument[arc + 0] : 0; + var _sca = argument_count > arc + 1? argument[arc + 1] : 1; + return preview_overlay_vector(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _typ); - case VALUE_DISPLAY.rotation : - var _rad = argument_count > arc + 0? argument[ arc + 0] : 64; - return preview_overlay_rotation(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _rad); + case VALUE_DISPLAY.gradient_range : + var _dim = argument[arc]; - case VALUE_DISPLAY.vector : - var _typ = argument_count > arc + 0? argument[arc + 0] : 0; - var _sca = argument_count > arc + 1? argument[arc + 1] : 1; - return preview_overlay_vector(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _typ); - - case VALUE_DISPLAY.gradient_range : - var _dim = argument[arc]; - - if(mappedJunc.attributes.mapped) - return preview_overlay_gradient_range(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _dim); + if(mappedJunc.attributes.mapped) + return preview_overlay_gradient_range(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _dim); + break; + + case VALUE_DISPLAY.area : + var _flag = argument_count > arc + 0? argument[arc + 0] : 0b0011; + return preview_overlay_area(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _flag, struct_try_get(display_data, "onSurfaceSize")); + + case VALUE_DISPLAY.puppet_control : + return preview_overlay_puppet(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + } + break; + + case VALUE_TYPE.pathnode : + var _path = getValue(); + if(struct_has(_path, "drawOverlay")) + return _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); break; - - case VALUE_DISPLAY.area : - var _flag = argument_count > arc + 0? argument[arc + 0] : 0b0011; - return preview_overlay_area(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _flag, struct_try_get(display_data, "onSurfaceSize")); - - case VALUE_DISPLAY.puppet_control : - return preview_overlay_puppet(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } return -1; diff --git a/scripts/node_value_int/node_value_int.gml b/scripts/node_value_int/node_value_int.gml index 945c0088b..8b57137ee 100644 --- a/scripts/node_value_int/node_value_int.gml +++ b/scripts/node_value_int/node_value_int.gml @@ -7,7 +7,7 @@ function __NodeValue_Int(_name, _node, _value, _tooltip = "") : NodeValue(_name, static valueProcess = function(value, nodeFrom = undefined, applyUnit = true, arrIndex = 0) { if(validator != noone) value = validator.validate(value); value = applyUnit? unit.apply(value, arrIndex) : value; - return round(value); + return is_real(value)? round(value) : value; } static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index 576425e1f..23eb44aad 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -276,6 +276,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { highlight : false, show_control : false, + show_tooltip : true, } connection_param = new connectionParameter(); @@ -693,6 +694,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { _blend.inputs[1].setFrom(_canvas.outputs[0]); } + function setFocusingNode(_node) { nodes_selecting = [ _node ]; return self; } + function getFocusingNode() { return array_empty(nodes_selecting)? noone : nodes_selecting[0]; } //// =========== Menus =========== @@ -2647,43 +2650,45 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { ////////////////////////////////// Tooltip Overlay ////////////////////////////////// - var _over = variable_struct_get_names(tooltip_overlay); - if(!array_empty(_over)) { - var _tx = ui(16); - var _ty = h - toolbar_height - ui(10); - - for( var j = 0, m = array_length(_over); j < m; j++ ) { - var _title = _over[j]; - var _keys = tooltip_overlay[$ _title]; + if(display_parameter.show_tooltip) { + var _over = variable_struct_get_names(tooltip_overlay); + if(!array_empty(_over)) { + var _tx = ui(16); + var _ty = h - toolbar_height - ui(10); - draw_set_text(f_p2, fa_left, fa_bottom, COLORS._main_text); - - var _tw = 0; - for( var i = 0, n = array_length(_keys); i < n; i++ ) - _tw = max(_tw, string_width(_keys[i][0])); - var _ttx = _tx + _tw + ui(16); - - for( var i = array_length(_keys) - 1; i >= 0; i-- ) { - draw_set_color(COLORS._main_icon); - draw_set_alpha(0.5); - draw_text_add(_tx, _ty, _keys[i][0]); + for( var j = 0, m = array_length(_over); j < m; j++ ) { + var _title = _over[j]; + var _keys = tooltip_overlay[$ _title]; + + draw_set_text(f_p2, fa_left, fa_bottom, COLORS._main_text); - draw_set_color(COLORS._main_text); - draw_set_alpha(0.5); - draw_text_add(_ttx, _ty, _keys[i][1]); + var _tw = 0; + for( var i = 0, n = array_length(_keys); i < n; i++ ) + _tw = max(_tw, string_width(_keys[i][0])); + var _ttx = _tx + _tw + ui(16); - _ty -= line_get_height(); - } + for( var i = array_length(_keys) - 1; i >= 0; i-- ) { + draw_set_color(COLORS._main_icon); + draw_set_alpha(0.5); + draw_text_add(_tx, _ty, _keys[i][0]); + + draw_set_color(COLORS._main_text); + draw_set_alpha(0.5); + draw_text_add(_ttx, _ty, _keys[i][1]); + + _ty -= line_get_height(); + } + + _ty -= ui(4); + draw_set_text(f_p1b, fa_left, fa_bottom, COLORS._main_text); + draw_set_alpha(0.5); + draw_text_add(_tx, _ty, _title); + + _ty -= line_get_height() + ui(8); + } - _ty -= ui(4); - draw_set_text(f_p1b, fa_left, fa_bottom, COLORS._main_text); - draw_set_alpha(0.5); - draw_text_add(_tx, _ty, _title); - - _ty -= line_get_height() + ui(8); - } - - draw_set_alpha(1); + draw_set_alpha(1); + } } tooltip_overlay = {}; diff --git a/scripts/panel_graph_view_settings/panel_graph_view_settings.gml b/scripts/panel_graph_view_settings/panel_graph_view_settings.gml index c0a60842a..ead8b0928 100644 --- a/scripts/panel_graph_view_settings/panel_graph_view_settings.gml +++ b/scripts/panel_graph_view_settings/panel_graph_view_settings.gml @@ -62,6 +62,14 @@ function Panel_Graph_View_Setting(graphPanel, display) : Panel_Linear_Setting() function(val) /*=>*/ { graphPanel.show_view_control = val; }, 1, ), + new __Panel_Linear_Setting_Item( + __txtx("graph_visibility_tooltip", "Show Tooltip"), + new checkBox(function() /*=>*/ { display_parameter.show_tooltip = !display_parameter.show_tooltip; }), + function() /*=>*/ {return display_parameter.show_tooltip}, + function(val) /*=>*/ { display_parameter.show_tooltip = val; }, + true, + [ "Graph", "Toggle Tooltip" ], + ), ]; setHeight(); diff --git a/scripts/panel_inspector/panel_inspector.gml b/scripts/panel_inspector/panel_inspector.gml index affaeb0b5..ca667dccd 100644 --- a/scripts/panel_inspector/panel_inspector.gml +++ b/scripts/panel_inspector/panel_inspector.gml @@ -817,22 +817,12 @@ function Panel_Inspector() : PanelContent() constructor { } var righ = array_safe_get_fast(jun, 3, noone); - if(righ != noone) { - lbw -= ui(40); - - var _bx = lbx + lbw + ui(8); - var _by = yy; - var _bw = ui(32); - var _bh = lbh; - - draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, _bx, _by, _bw, _bh, COLORS.panel_inspector_group_bg, 1); - righ.setFocusHover(pFOCUS, pHOVER); - righ.draw(_bx + ui(2), _by + ui(2), _bw - ui(4), _bh - ui(4), _m, THEME.button_hide_fill); - } + if(righ != noone) + lbw -= ui(32); if(_hover && point_in_rectangle(_m[0], _m[1], lbx, yy, lbx + lbw, yy + lbh)) { contentPane.hover_content = true; - draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, lbx, yy, lbw, lbh, COLORS.panel_inspector_group_hover, 1); + draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, lbx, yy, con_w - lbx, lbh, COLORS.panel_inspector_group_hover, 1); if(mouse_press(mb_left, pFOCUS)) jun[@ 1] = !coll; @@ -840,8 +830,19 @@ function Panel_Inspector() : PanelContent() constructor { if(mouse_press(mb_right, pFOCUS)) menuCall("inspector_group_menu", group_menu, 0, 0, fa_left); } else - draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, lbx, yy, lbw, lbh, COLORS.panel_inspector_group_bg, 1); + draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, lbx, yy, con_w - lbx, lbh, COLORS.panel_inspector_group_bg, 1); + if(righ != noone) { + var _bx = lbx + lbw; + var _by = yy; + var _bw = ui(32); + var _bh = lbh; + + // draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, _bx, _by, _bw, _bh, COLORS.panel_inspector_group_bg, 1); + righ.setFocusHover(pFOCUS, pHOVER); + righ.draw(_bx + ui(2), _by + ui(2), _bw - ui(4), _bh - ui(4), _m, THEME.button_hide_fill); + } + if(filter_text == "") draw_sprite_ui(THEME.arrow, 0, lbx + ui(16), yy + lbh / 2, 1, 1, -90 + coll * 90, COLORS.panel_inspector_group_bg, 1); @@ -1107,7 +1108,12 @@ function Panel_Inspector() : PanelContent() constructor { if(inspectGroup == 1) txt = $"[{array_length(PANEL_GRAPH.nodes_selecting)}] {txt}"; else if(inspectGroup == -1) txt = $"[{array_length(PANEL_GRAPH.nodes_selecting)}] Multiple nodes"; - tb_node_name.draw(ui(64), ui(14), w - ui(128), ui(32), txt, [ mx, my ]); + var tb_x = ui(64); + var tb_y = ui(14); + var tb_w = w - ui(128); + var tb_h = ui(32); + + tb_node_name.draw(tb_x, tb_y, tb_w, tb_h, txt, [ mx, my ]); if(inspectGroup >= 0) { draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text_sub); @@ -1128,7 +1134,21 @@ function Panel_Inspector() : PanelContent() constructor { var ly = ui(56 - 8); if(buttonInstant(THEME.button_hide, lx, ly, ui(16), ui(16), [mx, my], pFOCUS, pHOVER, __txt("Lock"), THEME.lock_12, !locked, locked? COLORS._main_icon_light : COLORS._main_icon) == 2) locked = !locked; - + + // draw_set_font(f_p3); + // var lw = string_width(inspecting.internalName); + // var lx = w / 2 - lw / 2 - ui(4 + 16); + // var ly = ui(76 - 8); + // if(buttonInstant(noone, lx, ly, ui(16), ui(16), [mx, my], pFOCUS, pHOVER, __txt("Previous"), THEME.arrow_wire_16, 2, COLORS._main_icon, 0.6) == 2) { + // } + + // var lx = w / 2 + lw / 2 + ui(4); + // var ly = ui(76 - 8); + // if(buttonInstant(noone, lx, ly, ui(16), ui(16), [mx, my], pFOCUS, pHOVER, __txt("Next"), THEME.arrow_wire_16, 0, COLORS._main_icon, 0.6) == 2) { + // } + + // --------------------------------------- // + if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, __txt("Presets"), THEME.preset, 1) == 2) dialogPanelCall(new Panel_Presets(inspecting), x + bx, y + by + ui(36)); } else { diff --git a/scripts/pathnodeBox/pathnodeBox.gml b/scripts/pathnodeBox/pathnodeBox.gml new file mode 100644 index 000000000..11a5f74df --- /dev/null +++ b/scripts/pathnodeBox/pathnodeBox.gml @@ -0,0 +1,72 @@ +function pathnodeBox(_junction) : widget() constructor { + self.junction = _junction; + + b_newTileset = button(function() /*=>*/ { + var b = nodeBuild("Node_Path", junction.node.x - 128, junction.ry - 32); + junction.setFrom(b.outputs[1]); + }); + + b_newTileset.text = __txt("New path"); + b_newTileset.icon = THEME.add_16; + b_newTileset.icon_size = .75; + b_newTileset.icon_blend = COLORS._main_value_positive; + + static trigger = function() { } + + static drawParam = function(params) { + setParam(params); + return draw(params.x, params.y, params.w, params.data, params.m); + } + + static draw = function(_x, _y, _w, _path, _m) { + x = _x; + y = _y; + w = _w; + h = TEXTBOX_HEIGHT; + + // if(junction.connect_type == CONNECT_TYPE.output) { + + // return h; + // } + + if(_path == noone) { + b_newTileset.setFocusHover(active, hover); + var param = new widgetParam(x, y, w, h, noone, {}, _m, rx, ry); + b_newTileset.drawParam(param); + + } else { + var ic = s_node_path; + + switch(instanceof(_path)) { + case "Node_Path" : ic = s_node_path; break; + } + + var iw = ui(24); + var _s = (iw - ui(8)) / max(sprite_get_width(ic), sprite_get_height(ic)); + var bi = 0; + + if(ihover && point_in_rectangle(_m[0], _m[1], x, y, x + iw, y + h)) { + TOOLTIP = __txt("Go to node"); + bi = 1; + + if(mouse_click(mb_left, iactive)) + bi = 2; + + if(mouse_press(mb_left, iactive)) + PANEL_GRAPH.setFocusingNode(_path); + } + + draw_sprite_stretched_ext(THEME.button_def, bi, x, y, iw, h); + + draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, x + iw + ui(4), y, w - iw - ui(4), h, COLORS._main_icon_light); + draw_sprite_ext(ic, 0, x + iw / 2, y + h / 2, _s, _s); + + draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text_sub); + draw_text_add(x + iw + ui(4 + 8), y + h / 2, _path.getDisplayName()); + } + + return h; + } + + static clone = function() { return new pathnodeBox(); } +} diff --git a/scripts/pathnodeBox/pathnodeBox.yy b/scripts/pathnodeBox/pathnodeBox.yy new file mode 100644 index 000000000..6881dacdd --- /dev/null +++ b/scripts/pathnodeBox/pathnodeBox.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"v1", + "%Name":"pathnodeBox", + "isCompatibility":false, + "isDnD":false, + "name":"pathnodeBox", + "parent":{ + "name":"widgets", + "path":"folders/widgets.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/project_data/project_data.gml b/scripts/project_data/project_data.gml index 2364c2505..38f7fbea2 100644 --- a/scripts/project_data/project_data.gml +++ b/scripts/project_data/project_data.gml @@ -71,6 +71,7 @@ highlight : false, show_control : false, + show_tooltip : true, } addons = {}; diff --git a/scripts/surface_functions/surface_functions.gml b/scripts/surface_functions/surface_functions.gml index ea5e30eda..523c39f8e 100644 --- a/scripts/surface_functions/surface_functions.gml +++ b/scripts/surface_functions/surface_functions.gml @@ -4,7 +4,7 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw #region ==================================== DRAW ==================================== - function draw_surface_safe(surface, _x = 0, _y = 0) { #region + function draw_surface_safe(surface, _x = 0, _y = 0) { INLINE if(is_struct(surface)) { @@ -19,9 +19,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw __channel_pre(surface); draw_surface(surface, _x, _y); __channel_pos(surface); - } #endregion + } - function draw_surface_stretched_safe(surface, _x, _y, _w, _h) { #region + function draw_surface_stretched_safe(surface, _x, _y, _w, _h) { INLINE if(is_struct(surface)) { @@ -36,9 +36,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw __channel_pre(surface); draw_surface_stretched(surface, _x, _y, _w, _h); __channel_pos(surface); - } #endregion + } - function draw_surface_ext_safe(surface, _x = 0, _y = 0, _xs = 1, _ys = 1, _rot = 0, _col = c_white, _alpha = 1) { #region + function draw_surface_ext_safe(surface, _x = 0, _y = 0, _xs = 1, _ys = 1, _rot = 0, _col = c_white, _alpha = 1) { INLINE if(is_struct(surface)) { @@ -54,9 +54,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw __channel_pre(surface); draw_surface_ext(surface, _x, _y, _xs, _ys, _rot, _col, _alpha); __channel_pos(surface); - } #endregion + } - function draw_surface_tiled_safe(surface, _x = 0, _y = 0) { #region + function draw_surface_tiled_safe(surface, _x = 0, _y = 0) { INLINE if(is_struct(surface)) { @@ -71,9 +71,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw __channel_pre(surface); draw_surface_tiled(surface, _x, _y); __channel_pos(surface); - } #endregion + } - function draw_surface_tiled_ext_safe(surface, _x = 0, _y = 0, _xs = 1, _ys = 1, _rot = 0, _col = c_white, _alpha = 1) { #region + function draw_surface_tiled_ext_safe(surface, _x = 0, _y = 0, _xs = 1, _ys = 1, _rot = 0, _col = c_white, _alpha = 1) { INLINE if(is_struct(surface)) { @@ -97,30 +97,30 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw draw_surface_stretched_ext(surface, 0, 0, bdim[0], bdim[1], _col, _alpha); shader_reset(); - } #endregion - - function draw_surface_part_ext_safe(surface, _l, _t, _w, _h, _x, _y, _xs = 1, _ys = 1, _rot = 0, _col = c_white, _alpha = 1) { #region - INLINE - - if(is_struct(surface)) { - if(is_instanceof(surface, dynaSurf)) { - surface.drawPart(_l, _t, _w, _h, _x, _y, _xs, _ys, _rot, _col, _alpha); - return; - } else if(is_instanceof(surface, SurfaceAtlas)) - surface = surface.getSurface(); } - if(is_array(surface) || !surface_exists(surface)) return; - - __channel_pre(surface); - draw_surface_part_ext(surface, _l, _t, _w, _h, _x, _y, _xs, _ys, _col, _alpha); - __channel_pos(surface); -} #endregion + + function draw_surface_part_ext_safe(surface, _l, _t, _w, _h, _x, _y, _xs = 1, _ys = 1, _rot = 0, _col = c_white, _alpha = 1) { + INLINE + if(is_struct(surface)) { + if(is_instanceof(surface, dynaSurf)) { + surface.drawPart(_l, _t, _w, _h, _x, _y, _xs, _ys, _rot, _col, _alpha); + return; + } else if(is_instanceof(surface, SurfaceAtlas)) + surface = surface.getSurface(); + } + if(is_array(surface) || !surface_exists(surface)) return; + + __channel_pre(surface); + draw_surface_part_ext(surface, _l, _t, _w, _h, _x, _y, _xs, _ys, _col, _alpha); + __channel_pos(surface); + } + #endregion ==================================== DRAW ==================================== #region ==================================== CHECK =================================== - function is_surface(s) { #region + function is_surface(s) { INLINE return !is_array(s) && ( @@ -129,16 +129,16 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw (is_numeric(s) && s > 0 && surface_exists(s)) ); - } #endregion + } - function surface_verify(surf, w, h, format = surface_rgba8unorm) { #region + function surface_verify(surf, w, h, format = surface_rgba8unorm) { INLINE if(!is_surface(surf)) return surface_create_valid(w, h, format); return surface_size_to(surf, w, h, format, true); - } #endregion + } - function surface_valid(surf, w, h, format = surface_rgba8unorm) { #region + function surface_valid(surf, w, h, format = surface_rgba8unorm) { INLINE if(!is_surface(surf)) return false; @@ -146,14 +146,14 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw var _sh = surface_get_height(surf); var _f = surface_get_format(surf); - return _sw == w && _sh == h && _f == format; -} #endregion + return _sw == w && _sh == h && _f == format; + } #endregion ==================================== CHECK ==================================== #region ==================================== GET ===================================== - function surface_get_width_safe(s, crop = true) { #region + function surface_get_width_safe(s, crop = true) { INLINE if(!is_surface(s)) return 1; @@ -164,9 +164,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw } return surface_get_width(s); - } #endregion + } - function surface_get_height_safe(s, crop = true) { #region + function surface_get_height_safe(s, crop = true) { INLINE if(!is_surface(s)) return 1; @@ -177,9 +177,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw } return surface_get_height(s); - } #endregion + } - function surface_get_format_safe(s, crop = true) { #region + function surface_get_format_safe(s, crop = true) { INLINE if(is_struct(s)) { @@ -189,16 +189,16 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw } return surface_get_format(s); - } #endregion + } - function surface_get_dimension(s) { #region + function surface_get_dimension(s) { INLINE if(!is_surface(s)) return [ 1, 1 ]; return [ surface_get_width_safe(s), surface_get_height_safe(s) ]; - } #endregion + } - function surface_get_pixel(surface, _x, _y) { #region + function surface_get_pixel(surface, _x, _y) { INLINE if(!is_surface(surface)) return; @@ -223,9 +223,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw merge_color(p2, p3, rx), ry); - } #endregion + } - function surface_get_pixel_ext(surface, _x, _y) { #region + function surface_get_pixel_ext(surface, _x, _y) { INLINE if(is_instanceof(surface, SurfaceAtlas)) surface = surface.surface.get(); @@ -234,42 +234,42 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw if(is_numeric(px)) return int64(px); return round(px[0] * (255 * power(256, 0))) + round(px[1] * (255 * power(256, 1))) + round(px[2] * (255 * power(256, 2))) + round(px[3] * (255 * power(256, 3))); - } #endregion + } #endregion ==================================== GET ==================================== #region =================================== CREATE =================================== - function surface_create_empty(w, h, format = surface_rgba8unorm) { #region + function surface_create_empty(w, h, format = surface_rgba8unorm) { INLINE var s = surface_create(w, h, format); surface_clear(s); return s; - } #endregion + } - function surface_create_size(surface, format = surface_rgba8unorm) { #region + function surface_create_size(surface, format = surface_rgba8unorm) { INLINE return surface_create_valid(surface_get_width_safe(surface), surface_get_height_safe(surface), format); - } #endregion + } - function surface_create_valid(w, h, format = surface_rgba8unorm) { #region + function surface_create_valid(w, h, format = surface_rgba8unorm) { INLINE return surface_create_empty(surface_valid_size(w), surface_valid_size(h), format); - } #endregion + } - function surface_create_from_buffer(w, h, buff, format = surface_rgba8unorm) { #region + function surface_create_from_buffer(w, h, buff, format = surface_rgba8unorm) { INLINE if(buff < 0) return; var s = surface_create_valid(surface_valid_size(w), surface_valid_size(h), format); buffer_set_surface(buff, s, 0); return s; - } #endregion + } - function surface_from_buffer(buff) { #region + function surface_from_buffer(buff) { static header_length = 24; if(!buffer_exists(buff)) return noone; @@ -288,9 +288,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw var s = surface_create(w, h, format); buffer_set_surface(buff, s, header_length); return s; - } #endregion + } - function surface_create_from_sprite(spr) { #region + function surface_create_from_sprite(spr) { if(!sprite_exists(spr)) return noone; if(sprite_get_number(spr) == 1) @@ -302,9 +302,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw } return s; - } #endregion + } - function surface_create_from_sprite_ext(spr, ind, format = surface_rgba8unorm) { #region + function surface_create_from_sprite_ext(spr, ind, format = surface_rgba8unorm) { if(!sprite_exists(spr)) return noone; var sw = sprite_get_width(spr); var sh = sprite_get_height(spr); @@ -318,9 +318,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw surface_reset_target(); return s; - } #endregion + } - function surface_size_lim(surface, width, height) { #region + function surface_size_lim(surface, width, height) { var sw = surface_get_width_safe(surface); var sh = surface_get_height_safe(surface); if(sw <= width && sh <= height) return surface; @@ -332,9 +332,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw draw_surface_ext_safe(surface, 0, 0, ss, ss, 0, c_white, 1); surface_reset_target(); return s; - } #endregion + } - function surface_size_to(surface, width, height, format = noone, skipCheck = false) { #region + function surface_size_to(surface, width, height, format = noone, skipCheck = false) { INLINE if(!skipCheck && !is_surface(surface)) return surface; if(!is_numeric(width) || !is_numeric(height)) return surface; @@ -357,18 +357,18 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw //surface_clear(surface); return surface; - } #endregion + } - function surface_clear(surface) { #region + function surface_clear(surface) { INLINE if(!is_surface(surface)) return; surface_set_target(surface); DRAW_CLEAR surface_reset_target(); - } #endregion + } - function surface_copy_from(dst, src, format = noone) { #region + function surface_copy_from(dst, src, format = noone) { INLINE surface_set_target(dst); @@ -377,9 +377,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw draw_surface_safe(src); BLEND_NORMAL surface_reset_target(); - } #endregion + } - function surface_clone(surface, destination = noone, format = noone) { #region + function surface_clone(surface, destination = noone, format = noone) { INLINE if(is_struct(surface) && is_instanceof(surface, dynaSurf)) @@ -396,13 +396,13 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw surface_reset_target(); return destination; - } #endregion + } #endregion ==================================== CREATE ==================================== #region =================================== MODIFY =================================== - function surface_stretch(surf, _w, _h) { #region + function surface_stretch(surf, _w, _h) { INLINE if(!is_surface(surf)) return noone; @@ -418,9 +418,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw surface_free(surf); return _surf; - } #endregion + } - function surface_mirror(surf, _h, _v) { #region + function surface_mirror(surf, _h, _v) { INLINE if(!is_surface(surf)) return noone; @@ -437,9 +437,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw surface_free(surf); return _surf; - } #endregion + } - function surface_project_posterize(surf) { #region + function surface_project_posterize(surf) { INLINE if(!PROJECT.attributes.palette_fix) return surf; @@ -458,13 +458,13 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw surface_free(surf); return _surf; - } #endregion + } #endregion ==================================== MODIFY ==================================== #region =================================== OTHERS =================================== - function surface_copy_size(dest, source, format = noone) { #region + function surface_copy_size(dest, source, format = noone) { INLINE if(!is_surface(dest)) return; @@ -476,17 +476,17 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw surface_reset_target(); surface_copy_from(dest, source); - } #endregion + } - function surface_valid_size(s) { #region + function surface_valid_size(s) { INLINE if(!is_numeric(s)) return 1; if(is_infinity(s)) return 1; return clamp(round(s), 1, 8192); - } #endregion + } - function surface_array_free(arr) { #region + function surface_array_free(arr) { INLINE if(!is_array(arr)) { @@ -496,9 +496,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw for( var i = 0, n = array_length(arr); i < n; i++ ) surface_array_free(arr[i]); - } #endregion + } - function surface_array_clone(arr) { #region + function surface_array_clone(arr) { if(!is_array(arr)) { if(is_surface(arr)) return surface_clone(arr); @@ -512,83 +512,9 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw _arr[i] = surface_array_clone(arr[i]); return _arr; - } #endregion + } - function surface_array_serialize(arr) { #region - INLINE - - var _arr = __surface_array_serialize(arr); - return json_stringify(_arr); - } #endregion - - function __surface_array_serialize(arr) { #region - if(!is_array(arr)) { - if(is_surface(arr)) { - var buff = buffer_create(surface_get_width_safe(arr) * surface_get_height_safe(arr) * 4, buffer_fixed, 1); - buffer_get_surface(buff, arr, 0); - var comp = buffer_compress(buff, 0, buffer_get_size(buff)); - var enc = buffer_base64_encode(comp, 0, buffer_get_size(comp)); - buffer_delete(buff); - return { width: surface_get_width_safe(arr), height: surface_get_height_safe(arr), buffer: enc }; - } else - return arr; - } - - var _arr = []; - - for( var i = 0, n = array_length(arr); i < n; i++ ) - _arr[i] = __surface_array_serialize(arr[i]); - - return _arr; - } #endregion - - function surface_array_deserialize(arr, index = -1) { #region - INLINE - - var _arr = json_try_parse(arr); - return index == -1? __surface_array_deserialize(_arr) : __surface_array_deserialize(_arr[index]); - } #endregion - - function __surface_array_deserialize(arr) { #region - if(!is_array(arr)) { - if(!is_struct(arr) || !struct_has(arr, "buffer")) - return noone; - - var buff = buffer_base64_decode(arr.buffer); - buff = buffer_decompress(buff); - return surface_create_from_buffer(arr.width, arr.height, buff); - } - - var _arr = []; - - for( var i = 0, n = array_length(arr); i < n; i++ ) - _arr[i] = __surface_array_deserialize(arr[i]); - - return _arr; - } #endregion - - function surface_encode(surface, stringify = true) { #region - if(is_instanceof(surface, SurfaceAtlas)) surface = surface.surface.get(); - if(is_array(surface) || !surface_exists(surface)) return ""; - - var buff = buffer_create(surface_get_width_safe(surface) * surface_get_height_safe(surface) * 4, buffer_fixed, 1); - - buffer_get_surface(buff, surface, 0); - var comp = buffer_compress(buff, 0, buffer_get_size(buff)); - var enc = buffer_base64_encode(comp, 0, buffer_get_size(comp)); - var str = { width: surface_get_width_safe(surface), height: surface_get_height_safe(surface), buffer: enc }; - buffer_delete(buff); - - return stringify? json_stringify(str) : str; - } #endregion - - function surface_decode(_struct) { #region - var buff = buffer_base64_decode(_struct.buffer); - var buff = buffer_decompress(buff); - return surface_create_from_buffer(_struct.width, _struct.height, buff); - } #endregion - - function surface_format_get_bytes(format) { #region + function surface_format_get_bytes(format) { switch(format) { case surface_rgba4unorm : return 4 * 0.5; break; case surface_rgba8unorm : return 4 * 1; break; @@ -600,35 +526,35 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw case surface_r32float : return 1 * 3; break; } return 1; - } #endregion + } - function surface_get_size(surface) { #region + function surface_get_size(surface) { INLINE var sw = surface_get_width_safe(surface); var sh = surface_get_height_safe(surface); var sz = sw * sh * surface_format_get_bytes(surface_get_format(surface)); return sz; - } #endregion + } - function surface_texture(surface) { #region + function surface_texture(surface) { INLINE if(!is_surface(surface)) return -1; return surface_get_texture(surface); - } #endregion + } #macro surface_free surface_free_safe #macro __surface_free surface_free - function surface_free_safe(surface) { #region + function surface_free_safe(surface) { INLINE if(!is_surface(surface)) return; __surface_free(surface); - } #endregion + } - function surface_save_safe(surface, path) { #region + function surface_save_safe(surface, path) { if(!is_surface(surface)) return; if(is_instanceof(surface, SurfaceAtlas)) surface = surface.surface.get(); @@ -671,32 +597,124 @@ function surface_reset_target_override() { __surface_reset_target(); winwin_draw surface_save(s, path); surface_free(s); return; - } #endregion - - function surface_cvt_8unorm(target, surface) { #region - if(!is_surface(surface)) return target; - - target = surface_verify(target, surface_get_width_safe(surface), surface_get_height_safe(surface)); - var _typ = surface_get_format(surface); - - switch(_typ) { - case surface_rgba4unorm : - case surface_rgba8unorm : - case surface_rgba16float : - case surface_rgba32float : - surface_set_shader(target, sh_draw_normal); - break; - case surface_r8unorm : - case surface_r16float : - case surface_r32float : - surface_set_shader(target, sh_draw_single_channel); - break; } - - draw_surface_safe(surface); - surface_reset_shader(); - - return target; -} #endregion -#endregion =================================== OTHERS =================================== \ No newline at end of file + function surface_cvt_8unorm(target, surface) { + if(!is_surface(surface)) return target; + + target = surface_verify(target, surface_get_width_safe(surface), surface_get_height_safe(surface)); + var _typ = surface_get_format(surface); + + switch(_typ) { + case surface_rgba4unorm : + case surface_rgba8unorm : + case surface_rgba16float : + case surface_rgba32float : + surface_set_shader(target, sh_draw_normal); + break; + case surface_r8unorm : + case surface_r16float : + case surface_r32float : + surface_set_shader(target, sh_draw_single_channel); + break; + } + + draw_surface_safe(surface); + surface_reset_shader(); + + return target; + } + +#endregion =================================== OTHERS =================================== + +#region ================================= SERIALIZE ================================== + + function surface_array_serialize(arr) { + INLINE + + var _arr = __surface_array_serialize(arr); + return json_stringify(_arr); + } + + function __surface_array_serialize(arr) { + if(!is_array(arr)) { + if(is_surface(arr)) { + var buff = buffer_create(surface_get_width_safe(arr) * surface_get_height_safe(arr) * 4, buffer_fixed, 1); + buffer_get_surface(buff, arr, 0); + var comp = buffer_compress(buff, 0, buffer_get_size(buff)); + var enc = buffer_base64_encode(comp, 0, buffer_get_size(comp)); + buffer_delete(buff); + return { width: surface_get_width_safe(arr), height: surface_get_height_safe(arr), buffer: enc }; + } else + return arr; + } + + var _arr = []; + + for( var i = 0, n = array_length(arr); i < n; i++ ) + _arr[i] = __surface_array_serialize(arr[i]); + + return _arr; + } + + function surface_array_deserialize(arr, index = -1) { + INLINE + + var _arr = json_try_parse(arr); + return index == -1? __surface_array_deserialize(_arr) : __surface_array_deserialize(_arr[index]); + } + + function __surface_array_deserialize(arr) { + if(!is_array(arr)) { + if(!is_struct(arr) || !struct_has(arr, "buffer")) + return noone; + + var buff = buffer_base64_decode(arr.buffer); + buff = buffer_decompress(buff); + return surface_create_from_buffer(arr.width, arr.height, buff); + } + + var _arr = []; + + for( var i = 0, n = array_length(arr); i < n; i++ ) + _arr[i] = __surface_array_deserialize(arr[i]); + + return _arr; + } + + function surface_encode(surface, stringify = true) { + if(is_instanceof(surface, SurfaceAtlas)) surface = surface.surface.get(); + if(is_array(surface) || !surface_exists(surface)) return ""; + + var _sw = surface_get_width_safe(surface); + var _sh = surface_get_height_safe(surface); + var _sf = surface_get_format(surface); + var buff = buffer_create(_sw * _sh * surface_format_get_bytes(_sf), buffer_fixed, 1); + + buffer_get_surface(buff, surface, 0); + var comp = buffer_compress(buff, 0, buffer_get_size(buff)); + var enc = buffer_base64_encode(comp, 0, buffer_get_size(comp)); + var str = { + width: _sw, + height: _sh, + buffer: enc, + format: _sf, + }; + + buffer_delete(buff); + + return stringify? json_stringify(str) : str; + } + + function surface_decode(_struct) { + if(is_string(_struct)) _struct = json_try_parse(_struct); + if(!is_struct(_struct)) return noone; + if(!struct_has(_struct, "buffer")) return noone; + + var buff = buffer_base64_decode(_struct.buffer); + var buff = buffer_decompress(buff); + var form = struct_try_get(_struct, "format", surface_rgba8unorm); + return surface_create_from_buffer(_struct.width, _struct.height, buff, form); + } + +#endregion ================================= SERIALIZE ================================= diff --git a/scripts/tiler_tool_brush/tiler_tool_brush.gml b/scripts/tiler_tool_brush/tiler_tool_brush.gml index 7079fd050..ea3280dd8 100644 --- a/scripts/tiler_tool_brush/tiler_tool_brush.gml +++ b/scripts/tiler_tool_brush/tiler_tool_brush.gml @@ -24,7 +24,7 @@ function tiler_tool_brush(node, _brush, eraser = false) : tiler_tool(node) const mouse_cur_x = floor(round((_mx - _x) / _s - 0.5) / tile_size[0]); mouse_cur_y = floor(round((_my - _y) / _s - 0.5) / tile_size[1]); - var _auto = brush.autotiler; + var _auto = brush.autoterrain; if(mouse_pre_draw_x != undefined && mouse_pre_draw_y != undefined && key_mod_presses(SHIFT, CTRL)) { diff --git a/scripts/tiler_tool_brush_shape/tiler_tool_brush_shape.gml b/scripts/tiler_tool_brush_shape/tiler_tool_brush_shape.gml index b82824094..3077f7e05 100644 --- a/scripts/tiler_tool_brush_shape/tiler_tool_brush_shape.gml +++ b/scripts/tiler_tool_brush_shape/tiler_tool_brush_shape.gml @@ -15,7 +15,7 @@ function tiler_tool_shape(node, _brush, _shape) : tiler_tool(node) constructor { mouse_cur_x = floor(round((_mx - _x) / _s - 0.5) / tile_size[0]); mouse_cur_y = floor(round((_my - _y) / _s - 0.5) / tile_size[1]); - var _auto = brush.autotiler; + var _auto = brush.autoterrain; if(mouse_holding && key_mod_press(SHIFT)) { var ww = mouse_cur_x - mouse_pre_x; diff --git a/scripts/tiler_tool_fill/tiler_tool_fill.gml b/scripts/tiler_tool_fill/tiler_tool_fill.gml index 526fc8e4f..2e1983f36 100644 --- a/scripts/tiler_tool_fill/tiler_tool_fill.gml +++ b/scripts/tiler_tool_fill/tiler_tool_fill.gml @@ -15,7 +15,7 @@ function tiler_tool_fill(node, _brush, toolAttr) : tiler_tool(node) constructor surface_w = surface_get_width(drawing_surface); surface_h = surface_get_height(drawing_surface); - var _auto = brush.autotiler; + var _auto = brush.autoterrain; if(mouse_press(mb_left, active) && point_in_rectangle(mouse_cur_x, mouse_cur_y, 0, 0, surface_w - 1, surface_h - 1)) { surface_set_target(drawing_surface); diff --git a/scripts/tilesetBox/tilesetBox.gml b/scripts/tilesetBox/tilesetBox.gml index 33add80ec..1b3b80d0b 100644 --- a/scripts/tilesetBox/tilesetBox.gml +++ b/scripts/tilesetBox/tilesetBox.gml @@ -2,11 +2,14 @@ function tilesetBox(_junction) : widget() constructor { self.junction = _junction; b_newTileset = button(function() /*=>*/ { - var b = nodeBuild("Node_Tile_Tileset", junction.node.x - 160, junction.node.y); + var b = nodeBuild("Node_Tile_Tileset", junction.node.x - 160, junction.ry - 32); junction.setFrom(b.outputs[0]); }); - b_newTileset.text = __txt("New tileset"); + b_newTileset.text = __txt("New tileset"); + b_newTileset.icon = THEME.add_16; + b_newTileset.icon_size = .75; + b_newTileset.icon_blend = COLORS._main_value_positive; static trigger = function() { } @@ -27,11 +30,38 @@ function tilesetBox(_junction) : widget() constructor { b_newTileset.drawParam(param); } else { - draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, x, y, w, h, COLORS._main_icon_light); + var ic = s_node_tileset; + + switch(instanceof(_tileset)) { + case "Node_Tile_Tileset" : ic = s_node_tileset; break; + } + + var iw = ui(24); + var _s = (iw - ui(8)) / max(sprite_get_width(ic), sprite_get_height(ic)); + var bi = 0; + + if(ihover && point_in_rectangle(_m[0], _m[1], x, y, x + iw, y + h)) { + TOOLTIP = __txt("Go to node"); + bi = 1; + + if(mouse_click(mb_left, iactive)) + bi = 2; + + if(mouse_press(mb_left, iactive)) + PANEL_GRAPH.setFocusingNode(_tileset); + } + + draw_sprite_stretched_ext(THEME.button_def, bi, x, y, iw, h); + + draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, x + iw + ui(4), y, w - iw - ui(4), h, COLORS._main_icon_light); + draw_sprite_ext(ic, 0, x + iw / 2, y + h / 2, _s, _s); + + draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text_sub); + draw_text_add(x + iw + ui(4 + 8), y + h / 2, _tileset.getDisplayName()); } return h; } - static clone = function() { return new outputBox(); } + static clone = function() { return new tilesetBox(); } } diff --git a/shaders/sh_pixel_math/sh_pixel_math.fsh b/shaders/sh_pixel_math/sh_pixel_math.fsh index 9683f95f6..162b3def7 100644 --- a/shaders/sh_pixel_math/sh_pixel_math.fsh +++ b/shaders/sh_pixel_math/sh_pixel_math.fsh @@ -1,8 +1,9 @@ varying vec2 v_vTexcoord; varying vec4 v_vColour; -uniform int operator; -uniform vec4 operand; +uniform int operator; +uniform vec4 operand; +uniform float mixAmount; uniform int operandType; uniform sampler2D operandSurf; @@ -72,17 +73,35 @@ void main() { res.a = round(res.a); } else if(operator == 13) { + res.r = mix(res.r, op.r, mixAmount); + res.g = mix(res.g, op.g, mixAmount); + res.b = mix(res.b, op.b, mixAmount); + res.a = mix(res.a, op.a, mixAmount); + + } else if(operator == 14) { res.r = abs(res.r); res.g = abs(res.g); res.b = abs(res.b); res.a = abs(res.a); - } else if(operator == 14) { + } else if(operator == 15) { res.r = clamp(res.r, op.x, op.y); res.g = clamp(res.g, op.x, op.y); res.b = clamp(res.b, op.x, op.y); res.a = clamp(res.a, op.x, op.y); + } else if(operator == 16) { + res.r = floor(res.r / op.r) * op.r; + res.g = floor(res.g / op.g) * op.g; + res.b = floor(res.b / op.b) * op.b; + res.a = floor(res.a / op.a) * op.a; + + } else if(operator == 17) { + res.r = fract(res.r); + res.g = fract(res.g); + res.b = fract(res.b); + res.a = fract(res.a); + } gl_FragColor = res; diff --git a/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.fsh b/shaders/sh_tiler_autoterrain_apply/sh_tiler_autoterrain_apply.fsh similarity index 100% rename from shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.fsh rename to shaders/sh_tiler_autoterrain_apply/sh_tiler_autoterrain_apply.fsh diff --git a/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.vsh b/shaders/sh_tiler_autoterrain_apply/sh_tiler_autoterrain_apply.vsh similarity index 100% rename from shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.vsh rename to shaders/sh_tiler_autoterrain_apply/sh_tiler_autoterrain_apply.vsh diff --git a/shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.yy b/shaders/sh_tiler_autoterrain_apply/sh_tiler_autoterrain_apply.yy similarity index 69% rename from shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.yy rename to shaders/sh_tiler_autoterrain_apply/sh_tiler_autoterrain_apply.yy index edfbc91a2..e58ec7ac0 100644 --- a/shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.yy +++ b/shaders/sh_tiler_autoterrain_apply/sh_tiler_autoterrain_apply.yy @@ -1,7 +1,7 @@ { "$GMShader":"", - "%Name":"sh_tiler_autotile_mask", - "name":"sh_tiler_autotile_mask", + "%Name":"sh_tiler_autoterrain_apply", + "name":"sh_tiler_autoterrain_apply", "parent":{ "name":"shaders", "path":"folders/nodes/data/tiler/shaders.yy", diff --git a/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.fsh_mod b/shaders/sh_tiler_autoterrain_apply/sh_tiler_autotile_apply.fsh_mod similarity index 100% rename from shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.fsh_mod rename to shaders/sh_tiler_autoterrain_apply/sh_tiler_autotile_apply.fsh_mod diff --git a/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.vsh_mod b/shaders/sh_tiler_autoterrain_apply/sh_tiler_autotile_apply.vsh_mod similarity index 100% rename from shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.vsh_mod rename to shaders/sh_tiler_autoterrain_apply/sh_tiler_autotile_apply.vsh_mod diff --git a/shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.fsh b/shaders/sh_tiler_autoterrain_mask/sh_tiler_autoterrain_mask.fsh similarity index 100% rename from shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.fsh rename to shaders/sh_tiler_autoterrain_mask/sh_tiler_autoterrain_mask.fsh diff --git a/shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.vsh b/shaders/sh_tiler_autoterrain_mask/sh_tiler_autoterrain_mask.vsh similarity index 100% rename from shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.vsh rename to shaders/sh_tiler_autoterrain_mask/sh_tiler_autoterrain_mask.vsh diff --git a/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.yy b/shaders/sh_tiler_autoterrain_mask/sh_tiler_autoterrain_mask.yy similarity index 69% rename from shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.yy rename to shaders/sh_tiler_autoterrain_mask/sh_tiler_autoterrain_mask.yy index 49377bcbf..d76b870e9 100644 --- a/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.yy +++ b/shaders/sh_tiler_autoterrain_mask/sh_tiler_autoterrain_mask.yy @@ -1,7 +1,7 @@ { "$GMShader":"", - "%Name":"sh_tiler_autotile_apply", - "name":"sh_tiler_autotile_apply", + "%Name":"sh_tiler_autoterrain_mask", + "name":"sh_tiler_autoterrain_mask", "parent":{ "name":"shaders", "path":"folders/nodes/data/tiler/shaders.yy", diff --git a/shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.fsh_mod b/shaders/sh_tiler_autoterrain_mask/sh_tiler_autotile_mask.fsh_mod similarity index 100% rename from shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.fsh_mod rename to shaders/sh_tiler_autoterrain_mask/sh_tiler_autotile_mask.fsh_mod diff --git a/shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.vsh_mod b/shaders/sh_tiler_autoterrain_mask/sh_tiler_autotile_mask.vsh_mod similarity index 100% rename from shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.vsh_mod rename to shaders/sh_tiler_autoterrain_mask/sh_tiler_autotile_mask.vsh_mod diff --git a/sprites/s_autotile_11x5/01232f7d-baf1-431a-a423-87f5315b841e.png b/sprites/s_autotile_11x5/01232f7d-baf1-431a-a423-87f5315b841e.png new file mode 100644 index 000000000..6d930af6a Binary files /dev/null and b/sprites/s_autotile_11x5/01232f7d-baf1-431a-a423-87f5315b841e.png differ diff --git a/sprites/s_autotile_11x5/layers/01232f7d-baf1-431a-a423-87f5315b841e/ebef9aaa-f543-4c23-9c83-7b884a011c18.png b/sprites/s_autotile_11x5/layers/01232f7d-baf1-431a-a423-87f5315b841e/ebef9aaa-f543-4c23-9c83-7b884a011c18.png new file mode 100644 index 000000000..6d930af6a Binary files /dev/null and b/sprites/s_autotile_11x5/layers/01232f7d-baf1-431a-a423-87f5315b841e/ebef9aaa-f543-4c23-9c83-7b884a011c18.png differ diff --git a/sprites/s_autotile_11x5/s_autotile_11x5.yy b/sprites/s_autotile_11x5/s_autotile_11x5.yy new file mode 100644 index 000000000..d9f4b85e3 --- /dev/null +++ b/sprites/s_autotile_11x5/s_autotile_11x5.yy @@ -0,0 +1,90 @@ +{ + "$GMSprite":"", + "%Name":"s_autotile_11x5", + "bboxMode":0, + "bbox_bottom":19, + "bbox_left":1, + "bbox_right":43, + "bbox_top":0, + "collisionKind":1, + "collisionTolerance":0, + "DynamicTexturePage":false, + "edgeFiltering":false, + "For3D":false, + "frames":[ + {"$GMSpriteFrame":"","%Name":"01232f7d-baf1-431a-a423-87f5315b841e","name":"01232f7d-baf1-431a-a423-87f5315b841e","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + ], + "gridX":0, + "gridY":0, + "height":20, + "HTile":false, + "layers":[ + {"$GMImageLayer":"","%Name":"ebef9aaa-f543-4c23-9c83-7b884a011c18","blendMode":0,"displayName":"default","isLocked":false,"name":"ebef9aaa-f543-4c23-9c83-7b884a011c18","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, + ], + "name":"s_autotile_11x5", + "nineSlice":null, + "origin":0, + "parent":{ + "name":"sprites", + "path":"folders/nodes/data/tiler/sprites.yy", + }, + "preMultiplyAlpha":false, + "resourceType":"GMSprite", + "resourceVersion":"2.0", + "sequence":{ + "$GMSequence":"", + "%Name":"s_autotile_11x5", + "autoRecord":true, + "backdropHeight":768, + "backdropImageOpacity":0.5, + "backdropImagePath":"", + "backdropWidth":1366, + "backdropXOffset":0.0, + "backdropYOffset":0.0, + "events":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "eventStubScript":null, + "eventToFunction":{}, + "length":1.0, + "lockOrigin":false, + "moments":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "name":"s_autotile_11x5", + "playback":1, + "playbackSpeed":30.0, + "playbackSpeedType":0, + "resourceType":"GMSequence", + "resourceVersion":"2.0", + "showBackdrop":true, + "showBackdropImage":false, + "timeUnits":1, + "tracks":[ + {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"01232f7d-baf1-431a-a423-87f5315b841e","path":"sprites/s_autotile_11x5/s_autotile_11x5.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"c2970cc7-3433-47a3-b228-86e7fc0ccfd3","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange":null, + "volume":1.0, + "xorigin":0, + "yorigin":0, + }, + "swatchColours":null, + "swfPrecision":0.5, + "textureGroupId":{ + "name":"Default", + "path":"texturegroups/Default", + }, + "type":0, + "VTile":false, + "width":44, +} \ No newline at end of file diff --git a/sprites/s_autotile_3x3/489436ec-6bcc-43d3-937c-b67a3080c21b.png b/sprites/s_autotile_3x3/489436ec-6bcc-43d3-937c-b67a3080c21b.png new file mode 100644 index 000000000..4464080d5 Binary files /dev/null and b/sprites/s_autotile_3x3/489436ec-6bcc-43d3-937c-b67a3080c21b.png differ diff --git a/sprites/s_autotile_3x3/layers/489436ec-6bcc-43d3-937c-b67a3080c21b/991afa55-558a-473d-a893-36b42e44b7d0.png b/sprites/s_autotile_3x3/layers/489436ec-6bcc-43d3-937c-b67a3080c21b/991afa55-558a-473d-a893-36b42e44b7d0.png new file mode 100644 index 000000000..4464080d5 Binary files /dev/null and b/sprites/s_autotile_3x3/layers/489436ec-6bcc-43d3-937c-b67a3080c21b/991afa55-558a-473d-a893-36b42e44b7d0.png differ diff --git a/sprites/s_autotile_3x3/s_autotile_3x3.yy b/sprites/s_autotile_3x3/s_autotile_3x3.yy new file mode 100644 index 000000000..8da2dde4d --- /dev/null +++ b/sprites/s_autotile_3x3/s_autotile_3x3.yy @@ -0,0 +1,90 @@ +{ + "$GMSprite":"", + "%Name":"s_autotile_3x3", + "bboxMode":0, + "bbox_bottom":10, + "bbox_left":1, + "bbox_right":10, + "bbox_top":1, + "collisionKind":1, + "collisionTolerance":0, + "DynamicTexturePage":false, + "edgeFiltering":false, + "For3D":false, + "frames":[ + {"$GMSpriteFrame":"","%Name":"489436ec-6bcc-43d3-937c-b67a3080c21b","name":"489436ec-6bcc-43d3-937c-b67a3080c21b","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + ], + "gridX":0, + "gridY":0, + "height":12, + "HTile":false, + "layers":[ + {"$GMImageLayer":"","%Name":"991afa55-558a-473d-a893-36b42e44b7d0","blendMode":0,"displayName":"default","isLocked":false,"name":"991afa55-558a-473d-a893-36b42e44b7d0","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, + ], + "name":"s_autotile_3x3", + "nineSlice":null, + "origin":0, + "parent":{ + "name":"sprites", + "path":"folders/nodes/data/tiler/sprites.yy", + }, + "preMultiplyAlpha":false, + "resourceType":"GMSprite", + "resourceVersion":"2.0", + "sequence":{ + "$GMSequence":"", + "%Name":"s_autotile_3x3", + "autoRecord":true, + "backdropHeight":768, + "backdropImageOpacity":0.5, + "backdropImagePath":"", + "backdropWidth":1366, + "backdropXOffset":0.0, + "backdropYOffset":0.0, + "events":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "eventStubScript":null, + "eventToFunction":{}, + "length":1.0, + "lockOrigin":false, + "moments":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "name":"s_autotile_3x3", + "playback":1, + "playbackSpeed":30.0, + "playbackSpeedType":0, + "resourceType":"GMSequence", + "resourceVersion":"2.0", + "showBackdrop":true, + "showBackdropImage":false, + "timeUnits":1, + "tracks":[ + {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"489436ec-6bcc-43d3-937c-b67a3080c21b","path":"sprites/s_autotile_3x3/s_autotile_3x3.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"a8508d65-3502-4f18-a8ee-8c1db13c8fa2","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange":null, + "volume":1.0, + "xorigin":0, + "yorigin":0, + }, + "swatchColours":null, + "swfPrecision":0.5, + "textureGroupId":{ + "name":"Default", + "path":"texturegroups/Default", + }, + "type":0, + "VTile":false, + "width":12, +} \ No newline at end of file diff --git a/sprites/s_autotile_5x3/e3f83286-9b7e-4bd4-b2ea-c08183709b23.png b/sprites/s_autotile_5x3/e3f83286-9b7e-4bd4-b2ea-c08183709b23.png new file mode 100644 index 000000000..95c7a8bc1 Binary files /dev/null and b/sprites/s_autotile_5x3/e3f83286-9b7e-4bd4-b2ea-c08183709b23.png differ diff --git a/sprites/s_autotile_5x3/layers/e3f83286-9b7e-4bd4-b2ea-c08183709b23/9fb628f1-89bb-421e-86a4-4569f01ce93e.png b/sprites/s_autotile_5x3/layers/e3f83286-9b7e-4bd4-b2ea-c08183709b23/9fb628f1-89bb-421e-86a4-4569f01ce93e.png new file mode 100644 index 000000000..95c7a8bc1 Binary files /dev/null and b/sprites/s_autotile_5x3/layers/e3f83286-9b7e-4bd4-b2ea-c08183709b23/9fb628f1-89bb-421e-86a4-4569f01ce93e.png differ diff --git a/sprites/s_autotile_5x3/s_autotile_5x3.yy b/sprites/s_autotile_5x3/s_autotile_5x3.yy new file mode 100644 index 000000000..047b62843 --- /dev/null +++ b/sprites/s_autotile_5x3/s_autotile_5x3.yy @@ -0,0 +1,90 @@ +{ + "$GMSprite":"", + "%Name":"s_autotile_5x3", + "bboxMode":0, + "bbox_bottom":11, + "bbox_left":1, + "bbox_right":19, + "bbox_top":0, + "collisionKind":1, + "collisionTolerance":0, + "DynamicTexturePage":false, + "edgeFiltering":false, + "For3D":false, + "frames":[ + {"$GMSpriteFrame":"","%Name":"e3f83286-9b7e-4bd4-b2ea-c08183709b23","name":"e3f83286-9b7e-4bd4-b2ea-c08183709b23","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + ], + "gridX":0, + "gridY":0, + "height":12, + "HTile":false, + "layers":[ + {"$GMImageLayer":"","%Name":"9fb628f1-89bb-421e-86a4-4569f01ce93e","blendMode":0,"displayName":"default","isLocked":false,"name":"9fb628f1-89bb-421e-86a4-4569f01ce93e","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, + ], + "name":"s_autotile_5x3", + "nineSlice":null, + "origin":0, + "parent":{ + "name":"sprites", + "path":"folders/nodes/data/tiler/sprites.yy", + }, + "preMultiplyAlpha":false, + "resourceType":"GMSprite", + "resourceVersion":"2.0", + "sequence":{ + "$GMSequence":"", + "%Name":"s_autotile_5x3", + "autoRecord":true, + "backdropHeight":768, + "backdropImageOpacity":0.5, + "backdropImagePath":"", + "backdropWidth":1366, + "backdropXOffset":0.0, + "backdropYOffset":0.0, + "events":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "eventStubScript":null, + "eventToFunction":{}, + "length":1.0, + "lockOrigin":false, + "moments":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "name":"s_autotile_5x3", + "playback":1, + "playbackSpeed":30.0, + "playbackSpeedType":0, + "resourceType":"GMSequence", + "resourceVersion":"2.0", + "showBackdrop":true, + "showBackdropImage":false, + "timeUnits":1, + "tracks":[ + {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"e3f83286-9b7e-4bd4-b2ea-c08183709b23","path":"sprites/s_autotile_5x3/s_autotile_5x3.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"36ea370b-9cec-43d4-8aa3-92b69e692782","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange":null, + "volume":1.0, + "xorigin":0, + "yorigin":0, + }, + "swatchColours":null, + "swfPrecision":0.5, + "textureGroupId":{ + "name":"Default", + "path":"texturegroups/Default", + }, + "type":0, + "VTile":false, + "width":20, +} \ No newline at end of file diff --git a/sprites/s_autotile_8x6/b83bc046-0985-4dc1-8946-97dfc2b07310.png b/sprites/s_autotile_8x6/b83bc046-0985-4dc1-8946-97dfc2b07310.png new file mode 100644 index 000000000..9214ca7d8 Binary files /dev/null and b/sprites/s_autotile_8x6/b83bc046-0985-4dc1-8946-97dfc2b07310.png differ diff --git a/sprites/s_autotile_8x6/layers/b83bc046-0985-4dc1-8946-97dfc2b07310/f68055ce-ac86-4b01-82e6-52237403ebaf.png b/sprites/s_autotile_8x6/layers/b83bc046-0985-4dc1-8946-97dfc2b07310/f68055ce-ac86-4b01-82e6-52237403ebaf.png new file mode 100644 index 000000000..9214ca7d8 Binary files /dev/null and b/sprites/s_autotile_8x6/layers/b83bc046-0985-4dc1-8946-97dfc2b07310/f68055ce-ac86-4b01-82e6-52237403ebaf.png differ diff --git a/sprites/s_autotile_8x6/s_autotile_8x6.yy b/sprites/s_autotile_8x6/s_autotile_8x6.yy new file mode 100644 index 000000000..ab38ce979 --- /dev/null +++ b/sprites/s_autotile_8x6/s_autotile_8x6.yy @@ -0,0 +1,90 @@ +{ + "$GMSprite":"", + "%Name":"s_autotile_8x6", + "bboxMode":0, + "bbox_bottom":15, + "bbox_left":1, + "bbox_right":47, + "bbox_top":0, + "collisionKind":1, + "collisionTolerance":0, + "DynamicTexturePage":false, + "edgeFiltering":false, + "For3D":false, + "frames":[ + {"$GMSpriteFrame":"","%Name":"b83bc046-0985-4dc1-8946-97dfc2b07310","name":"b83bc046-0985-4dc1-8946-97dfc2b07310","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + ], + "gridX":0, + "gridY":0, + "height":16, + "HTile":false, + "layers":[ + {"$GMImageLayer":"","%Name":"f68055ce-ac86-4b01-82e6-52237403ebaf","blendMode":0,"displayName":"default","isLocked":false,"name":"f68055ce-ac86-4b01-82e6-52237403ebaf","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, + ], + "name":"s_autotile_8x6", + "nineSlice":null, + "origin":0, + "parent":{ + "name":"sprites", + "path":"folders/nodes/data/tiler/sprites.yy", + }, + "preMultiplyAlpha":false, + "resourceType":"GMSprite", + "resourceVersion":"2.0", + "sequence":{ + "$GMSequence":"", + "%Name":"s_autotile_8x6", + "autoRecord":true, + "backdropHeight":768, + "backdropImageOpacity":0.5, + "backdropImagePath":"", + "backdropWidth":1366, + "backdropXOffset":0.0, + "backdropYOffset":0.0, + "events":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "eventStubScript":null, + "eventToFunction":{}, + "length":1.0, + "lockOrigin":false, + "moments":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "name":"s_autotile_8x6", + "playback":1, + "playbackSpeed":30.0, + "playbackSpeedType":0, + "resourceType":"GMSequence", + "resourceVersion":"2.0", + "showBackdrop":true, + "showBackdropImage":false, + "timeUnits":1, + "tracks":[ + {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"b83bc046-0985-4dc1-8946-97dfc2b07310","path":"sprites/s_autotile_8x6/s_autotile_8x6.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"71c3750d-2b37-491b-82a1-e81aa5777085","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange":null, + "volume":1.0, + "xorigin":0, + "yorigin":0, + }, + "swatchColours":null, + "swfPrecision":0.5, + "textureGroupId":{ + "name":"Default", + "path":"texturegroups/Default", + }, + "type":0, + "VTile":false, + "width":48, +} \ No newline at end of file diff --git a/sprites/s_node_math_operators/05ed81e9-3bf0-40f4-ab12-ca5c842d04ae.png b/sprites/s_node_math_operators/05ed81e9-3bf0-40f4-ab12-ca5c842d04ae.png new file mode 100644 index 000000000..0ac638eb1 Binary files /dev/null and b/sprites/s_node_math_operators/05ed81e9-3bf0-40f4-ab12-ca5c842d04ae.png differ diff --git a/sprites/s_node_math_operators/17870787-665c-4252-b6a1-f3acd3e6b1f0.png b/sprites/s_node_math_operators/17870787-665c-4252-b6a1-f3acd3e6b1f0.png new file mode 100644 index 000000000..1480bd8c4 Binary files /dev/null and b/sprites/s_node_math_operators/17870787-665c-4252-b6a1-f3acd3e6b1f0.png differ diff --git a/sprites/s_node_math_operators/1b7a1272-8a80-49fe-88d9-08dbc6f391c7.png b/sprites/s_node_math_operators/1b7a1272-8a80-49fe-88d9-08dbc6f391c7.png new file mode 100644 index 000000000..42fb61514 Binary files /dev/null and b/sprites/s_node_math_operators/1b7a1272-8a80-49fe-88d9-08dbc6f391c7.png differ diff --git a/sprites/s_node_math_operators/20dc04b3-645c-4864-9048-7d7e30b3bc39.png b/sprites/s_node_math_operators/20dc04b3-645c-4864-9048-7d7e30b3bc39.png new file mode 100644 index 000000000..8713a8bcc Binary files /dev/null and b/sprites/s_node_math_operators/20dc04b3-645c-4864-9048-7d7e30b3bc39.png differ diff --git a/sprites/s_node_math_operators/2c7bb612-fe21-4b66-9719-679fe7e41398.png b/sprites/s_node_math_operators/2c7bb612-fe21-4b66-9719-679fe7e41398.png new file mode 100644 index 000000000..28a99af1b Binary files /dev/null and b/sprites/s_node_math_operators/2c7bb612-fe21-4b66-9719-679fe7e41398.png differ diff --git a/sprites/s_node_math_operators/661f6ac5-d321-43d3-b9e9-d70c7e6c2c42.png b/sprites/s_node_math_operators/661f6ac5-d321-43d3-b9e9-d70c7e6c2c42.png new file mode 100644 index 000000000..9d0ae74ce Binary files /dev/null and b/sprites/s_node_math_operators/661f6ac5-d321-43d3-b9e9-d70c7e6c2c42.png differ diff --git a/sprites/s_node_math_operators/759d1ad9-5777-4d16-949f-90293cb9d0d9.png b/sprites/s_node_math_operators/759d1ad9-5777-4d16-949f-90293cb9d0d9.png new file mode 100644 index 000000000..e9cbe1559 Binary files /dev/null and b/sprites/s_node_math_operators/759d1ad9-5777-4d16-949f-90293cb9d0d9.png differ diff --git a/sprites/s_node_math_operators/9d67e14a-5585-40cb-bb4d-192a3dde46cc.png b/sprites/s_node_math_operators/9d67e14a-5585-40cb-bb4d-192a3dde46cc.png new file mode 100644 index 000000000..00b0428d8 Binary files /dev/null and b/sprites/s_node_math_operators/9d67e14a-5585-40cb-bb4d-192a3dde46cc.png differ diff --git a/sprites/s_node_math_operators/a0430f25-2101-439f-a99f-251c62ae52c3.png b/sprites/s_node_math_operators/a0430f25-2101-439f-a99f-251c62ae52c3.png new file mode 100644 index 000000000..1cb69f8c1 Binary files /dev/null and b/sprites/s_node_math_operators/a0430f25-2101-439f-a99f-251c62ae52c3.png differ diff --git a/sprites/s_node_math_operators/ab5f1642-3f42-40d4-a486-8f80ce3b6abb.png b/sprites/s_node_math_operators/ab5f1642-3f42-40d4-a486-8f80ce3b6abb.png new file mode 100644 index 000000000..a0efe6e0b Binary files /dev/null and b/sprites/s_node_math_operators/ab5f1642-3f42-40d4-a486-8f80ce3b6abb.png differ diff --git a/sprites/s_node_math_operators/b1bb9bbe-a103-46fe-b664-ce60653c0d87.png b/sprites/s_node_math_operators/b1bb9bbe-a103-46fe-b664-ce60653c0d87.png new file mode 100644 index 000000000..fcf35a27e Binary files /dev/null and b/sprites/s_node_math_operators/b1bb9bbe-a103-46fe-b664-ce60653c0d87.png differ diff --git a/sprites/s_node_math_operators/c71d0e67-0fc9-4af4-bd32-9bc8c8a5f2c4.png b/sprites/s_node_math_operators/c71d0e67-0fc9-4af4-bd32-9bc8c8a5f2c4.png new file mode 100644 index 000000000..b9539666e Binary files /dev/null and b/sprites/s_node_math_operators/c71d0e67-0fc9-4af4-bd32-9bc8c8a5f2c4.png differ diff --git a/sprites/s_node_math_operators/d2d30ca6-b7c6-4c5e-a4f0-de11a924a362.png b/sprites/s_node_math_operators/d2d30ca6-b7c6-4c5e-a4f0-de11a924a362.png new file mode 100644 index 000000000..c31c44d2a Binary files /dev/null and b/sprites/s_node_math_operators/d2d30ca6-b7c6-4c5e-a4f0-de11a924a362.png differ diff --git a/sprites/s_node_math_operators/e40ed675-229d-4f98-8ae7-1c8d4cd78405.png b/sprites/s_node_math_operators/e40ed675-229d-4f98-8ae7-1c8d4cd78405.png new file mode 100644 index 000000000..b3e06ef67 Binary files /dev/null and b/sprites/s_node_math_operators/e40ed675-229d-4f98-8ae7-1c8d4cd78405.png differ diff --git a/sprites/s_node_math_operators/f081ce06-d44e-4810-ac9f-c104afd2105c.png b/sprites/s_node_math_operators/f081ce06-d44e-4810-ac9f-c104afd2105c.png new file mode 100644 index 000000000..532e08e86 Binary files /dev/null and b/sprites/s_node_math_operators/f081ce06-d44e-4810-ac9f-c104afd2105c.png differ diff --git a/sprites/s_node_math_operators/f0f202e0-76b7-436e-8ca3-7b5c24f54e24.png b/sprites/s_node_math_operators/f0f202e0-76b7-436e-8ca3-7b5c24f54e24.png new file mode 100644 index 000000000..82fc0aeb7 Binary files /dev/null and b/sprites/s_node_math_operators/f0f202e0-76b7-436e-8ca3-7b5c24f54e24.png differ diff --git a/sprites/s_node_math_operators/fbba9d21-8034-455b-8bc3-cc7defdd69fe.png b/sprites/s_node_math_operators/fbba9d21-8034-455b-8bc3-cc7defdd69fe.png new file mode 100644 index 000000000..303410356 Binary files /dev/null and b/sprites/s_node_math_operators/fbba9d21-8034-455b-8bc3-cc7defdd69fe.png differ diff --git a/sprites/s_node_math_operators/fe4a7f0c-db9c-4ca4-85cf-6f9854f4ce18.png b/sprites/s_node_math_operators/fe4a7f0c-db9c-4ca4-85cf-6f9854f4ce18.png new file mode 100644 index 000000000..658e3010c Binary files /dev/null and b/sprites/s_node_math_operators/fe4a7f0c-db9c-4ca4-85cf-6f9854f4ce18.png differ diff --git a/sprites/s_node_math_operators/layers/05ed81e9-3bf0-40f4-ab12-ca5c842d04ae/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/05ed81e9-3bf0-40f4-ab12-ca5c842d04ae/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..0ac638eb1 Binary files /dev/null and b/sprites/s_node_math_operators/layers/05ed81e9-3bf0-40f4-ab12-ca5c842d04ae/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/17870787-665c-4252-b6a1-f3acd3e6b1f0/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/17870787-665c-4252-b6a1-f3acd3e6b1f0/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..1480bd8c4 Binary files /dev/null and b/sprites/s_node_math_operators/layers/17870787-665c-4252-b6a1-f3acd3e6b1f0/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/1b7a1272-8a80-49fe-88d9-08dbc6f391c7/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/1b7a1272-8a80-49fe-88d9-08dbc6f391c7/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..42fb61514 Binary files /dev/null and b/sprites/s_node_math_operators/layers/1b7a1272-8a80-49fe-88d9-08dbc6f391c7/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/20dc04b3-645c-4864-9048-7d7e30b3bc39/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/20dc04b3-645c-4864-9048-7d7e30b3bc39/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..8713a8bcc Binary files /dev/null and b/sprites/s_node_math_operators/layers/20dc04b3-645c-4864-9048-7d7e30b3bc39/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/2c7bb612-fe21-4b66-9719-679fe7e41398/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/2c7bb612-fe21-4b66-9719-679fe7e41398/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..28a99af1b Binary files /dev/null and b/sprites/s_node_math_operators/layers/2c7bb612-fe21-4b66-9719-679fe7e41398/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/661f6ac5-d321-43d3-b9e9-d70c7e6c2c42/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/661f6ac5-d321-43d3-b9e9-d70c7e6c2c42/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..9d0ae74ce Binary files /dev/null and b/sprites/s_node_math_operators/layers/661f6ac5-d321-43d3-b9e9-d70c7e6c2c42/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/759d1ad9-5777-4d16-949f-90293cb9d0d9/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/759d1ad9-5777-4d16-949f-90293cb9d0d9/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..e9cbe1559 Binary files /dev/null and b/sprites/s_node_math_operators/layers/759d1ad9-5777-4d16-949f-90293cb9d0d9/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/9d67e14a-5585-40cb-bb4d-192a3dde46cc/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/9d67e14a-5585-40cb-bb4d-192a3dde46cc/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..00b0428d8 Binary files /dev/null and b/sprites/s_node_math_operators/layers/9d67e14a-5585-40cb-bb4d-192a3dde46cc/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/a0430f25-2101-439f-a99f-251c62ae52c3/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/a0430f25-2101-439f-a99f-251c62ae52c3/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..1cb69f8c1 Binary files /dev/null and b/sprites/s_node_math_operators/layers/a0430f25-2101-439f-a99f-251c62ae52c3/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/ab5f1642-3f42-40d4-a486-8f80ce3b6abb/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/ab5f1642-3f42-40d4-a486-8f80ce3b6abb/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..a0efe6e0b Binary files /dev/null and b/sprites/s_node_math_operators/layers/ab5f1642-3f42-40d4-a486-8f80ce3b6abb/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/b1bb9bbe-a103-46fe-b664-ce60653c0d87/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/b1bb9bbe-a103-46fe-b664-ce60653c0d87/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..fcf35a27e Binary files /dev/null and b/sprites/s_node_math_operators/layers/b1bb9bbe-a103-46fe-b664-ce60653c0d87/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/c71d0e67-0fc9-4af4-bd32-9bc8c8a5f2c4/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/c71d0e67-0fc9-4af4-bd32-9bc8c8a5f2c4/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..b9539666e Binary files /dev/null and b/sprites/s_node_math_operators/layers/c71d0e67-0fc9-4af4-bd32-9bc8c8a5f2c4/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/d2d30ca6-b7c6-4c5e-a4f0-de11a924a362/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/d2d30ca6-b7c6-4c5e-a4f0-de11a924a362/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..c31c44d2a Binary files /dev/null and b/sprites/s_node_math_operators/layers/d2d30ca6-b7c6-4c5e-a4f0-de11a924a362/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/e40ed675-229d-4f98-8ae7-1c8d4cd78405/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/e40ed675-229d-4f98-8ae7-1c8d4cd78405/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..b3e06ef67 Binary files /dev/null and b/sprites/s_node_math_operators/layers/e40ed675-229d-4f98-8ae7-1c8d4cd78405/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/f081ce06-d44e-4810-ac9f-c104afd2105c/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/f081ce06-d44e-4810-ac9f-c104afd2105c/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..532e08e86 Binary files /dev/null and b/sprites/s_node_math_operators/layers/f081ce06-d44e-4810-ac9f-c104afd2105c/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/f0f202e0-76b7-436e-8ca3-7b5c24f54e24/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/f0f202e0-76b7-436e-8ca3-7b5c24f54e24/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..82fc0aeb7 Binary files /dev/null and b/sprites/s_node_math_operators/layers/f0f202e0-76b7-436e-8ca3-7b5c24f54e24/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/fbba9d21-8034-455b-8bc3-cc7defdd69fe/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/fbba9d21-8034-455b-8bc3-cc7defdd69fe/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..303410356 Binary files /dev/null and b/sprites/s_node_math_operators/layers/fbba9d21-8034-455b-8bc3-cc7defdd69fe/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/layers/fe4a7f0c-db9c-4ca4-85cf-6f9854f4ce18/8e4fee5c-c652-4b72-9e27-55f6e158d666.png b/sprites/s_node_math_operators/layers/fe4a7f0c-db9c-4ca4-85cf-6f9854f4ce18/8e4fee5c-c652-4b72-9e27-55f6e158d666.png new file mode 100644 index 000000000..658e3010c Binary files /dev/null and b/sprites/s_node_math_operators/layers/fe4a7f0c-db9c-4ca4-85cf-6f9854f4ce18/8e4fee5c-c652-4b72-9e27-55f6e158d666.png differ diff --git a/sprites/s_node_math_operators/s_node_math_operators.yy b/sprites/s_node_math_operators/s_node_math_operators.yy new file mode 100644 index 000000000..81d0fa56d --- /dev/null +++ b/sprites/s_node_math_operators/s_node_math_operators.yy @@ -0,0 +1,158 @@ +{ + "$GMSprite":"", + "%Name":"s_node_math_operators", + "bboxMode":0, + "bbox_bottom":20, + "bbox_left":2, + "bbox_right":22, + "bbox_top":2, + "collisionKind":1, + "collisionTolerance":0, + "DynamicTexturePage":false, + "edgeFiltering":false, + "For3D":false, + "frames":[ + {"$GMSpriteFrame":"","%Name":"2c7bb612-fe21-4b66-9719-679fe7e41398","name":"2c7bb612-fe21-4b66-9719-679fe7e41398","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"e40ed675-229d-4f98-8ae7-1c8d4cd78405","name":"e40ed675-229d-4f98-8ae7-1c8d4cd78405","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"661f6ac5-d321-43d3-b9e9-d70c7e6c2c42","name":"661f6ac5-d321-43d3-b9e9-d70c7e6c2c42","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"c71d0e67-0fc9-4af4-bd32-9bc8c8a5f2c4","name":"c71d0e67-0fc9-4af4-bd32-9bc8c8a5f2c4","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"a0430f25-2101-439f-a99f-251c62ae52c3","name":"a0430f25-2101-439f-a99f-251c62ae52c3","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"b1bb9bbe-a103-46fe-b664-ce60653c0d87","name":"b1bb9bbe-a103-46fe-b664-ce60653c0d87","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"20dc04b3-645c-4864-9048-7d7e30b3bc39","name":"20dc04b3-645c-4864-9048-7d7e30b3bc39","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"759d1ad9-5777-4d16-949f-90293cb9d0d9","name":"759d1ad9-5777-4d16-949f-90293cb9d0d9","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"fbba9d21-8034-455b-8bc3-cc7defdd69fe","name":"fbba9d21-8034-455b-8bc3-cc7defdd69fe","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"17870787-665c-4252-b6a1-f3acd3e6b1f0","name":"17870787-665c-4252-b6a1-f3acd3e6b1f0","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"9d67e14a-5585-40cb-bb4d-192a3dde46cc","name":"9d67e14a-5585-40cb-bb4d-192a3dde46cc","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"ab5f1642-3f42-40d4-a486-8f80ce3b6abb","name":"ab5f1642-3f42-40d4-a486-8f80ce3b6abb","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"f081ce06-d44e-4810-ac9f-c104afd2105c","name":"f081ce06-d44e-4810-ac9f-c104afd2105c","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"1b7a1272-8a80-49fe-88d9-08dbc6f391c7","name":"1b7a1272-8a80-49fe-88d9-08dbc6f391c7","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"05ed81e9-3bf0-40f4-ab12-ca5c842d04ae","name":"05ed81e9-3bf0-40f4-ab12-ca5c842d04ae","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"fe4a7f0c-db9c-4ca4-85cf-6f9854f4ce18","name":"fe4a7f0c-db9c-4ca4-85cf-6f9854f4ce18","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"f0f202e0-76b7-436e-8ca3-7b5c24f54e24","name":"f0f202e0-76b7-436e-8ca3-7b5c24f54e24","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"d2d30ca6-b7c6-4c5e-a4f0-de11a924a362","name":"d2d30ca6-b7c6-4c5e-a4f0-de11a924a362","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + ], + "gridX":0, + "gridY":0, + "height":24, + "HTile":false, + "layers":[ + {"$GMImageLayer":"","%Name":"8e4fee5c-c652-4b72-9e27-55f6e158d666","blendMode":0,"displayName":"default","isLocked":false,"name":"8e4fee5c-c652-4b72-9e27-55f6e158d666","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, + ], + "name":"s_node_math_operators", + "nineSlice":null, + "origin":4, + "parent":{ + "name":"nodes", + "path":"folders/sprites/nodes.yy", + }, + "preMultiplyAlpha":false, + "resourceType":"GMSprite", + "resourceVersion":"2.0", + "sequence":{ + "$GMSequence":"", + "%Name":"s_node_math_operators", + "autoRecord":true, + "backdropHeight":768, + "backdropImageOpacity":0.5, + "backdropImagePath":"", + "backdropWidth":1366, + "backdropXOffset":0.0, + "backdropYOffset":0.0, + "events":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "eventStubScript":null, + "eventToFunction":{}, + "length":18.0, + "lockOrigin":false, + "moments":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "name":"s_node_math_operators", + "playback":1, + "playbackSpeed":30.0, + "playbackSpeedType":0, + "resourceType":"GMSequence", + "resourceVersion":"2.0", + "showBackdrop":true, + "showBackdropImage":false, + "timeUnits":1, + "tracks":[ + {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"2c7bb612-fe21-4b66-9719-679fe7e41398","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"bb6c55f6-b428-4412-b1cf-45234b105e2c","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"e40ed675-229d-4f98-8ae7-1c8d4cd78405","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"c529a43b-eb54-4a30-9645-9b48d72c7812","IsCreationKey":false,"Key":1.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"661f6ac5-d321-43d3-b9e9-d70c7e6c2c42","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"93f88ad2-3a53-42d2-bdb8-0e868576d9ad","IsCreationKey":false,"Key":2.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"c71d0e67-0fc9-4af4-bd32-9bc8c8a5f2c4","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"0bbb23e0-ec32-4e00-82f1-323abf710ec9","IsCreationKey":false,"Key":3.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"a0430f25-2101-439f-a99f-251c62ae52c3","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"984c02f4-d4bc-4b20-a641-165cf1e3456d","IsCreationKey":false,"Key":4.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"b1bb9bbe-a103-46fe-b664-ce60653c0d87","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"c03f1bd5-1654-4dec-a71e-19a0d1317a22","IsCreationKey":false,"Key":5.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"20dc04b3-645c-4864-9048-7d7e30b3bc39","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"bf53a693-eb18-418e-bff4-5ce4ed8902db","IsCreationKey":false,"Key":6.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"759d1ad9-5777-4d16-949f-90293cb9d0d9","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"79a19327-c2b8-463f-8728-bd593f1394e2","IsCreationKey":false,"Key":7.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"fbba9d21-8034-455b-8bc3-cc7defdd69fe","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"6e54be29-f351-4e9c-9069-69452886ab25","IsCreationKey":false,"Key":8.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"17870787-665c-4252-b6a1-f3acd3e6b1f0","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"de5920db-4dcf-4f7f-b89f-7762109f270d","IsCreationKey":false,"Key":9.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"9d67e14a-5585-40cb-bb4d-192a3dde46cc","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"19739d4c-784c-499c-af64-ed83df4eee5e","IsCreationKey":false,"Key":10.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"ab5f1642-3f42-40d4-a486-8f80ce3b6abb","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"6ebf9d15-45a8-4868-b5f0-ff66bf446a45","IsCreationKey":false,"Key":11.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"f081ce06-d44e-4810-ac9f-c104afd2105c","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"bc564611-a868-493c-8c5b-d64c0498ad90","IsCreationKey":false,"Key":12.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"1b7a1272-8a80-49fe-88d9-08dbc6f391c7","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"813f73f8-64c6-4ba3-9488-5a36cb06d0a6","IsCreationKey":false,"Key":13.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"05ed81e9-3bf0-40f4-ab12-ca5c842d04ae","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"78fe1051-b678-4a6d-a93c-ce6683400c48","IsCreationKey":false,"Key":14.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"fe4a7f0c-db9c-4ca4-85cf-6f9854f4ce18","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"abfac7f5-69bd-4dbe-96ad-ae8bb7144bcf","IsCreationKey":false,"Key":15.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"f0f202e0-76b7-436e-8ca3-7b5c24f54e24","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"5ffd938a-0361-463e-8ce7-e7f3b28a61b3","IsCreationKey":false,"Key":16.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + {"$Keyframe":"","Channels":{ + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"d2d30ca6-b7c6-4c5e-a4f0-de11a924a362","path":"sprites/s_node_math_operators/s_node_math_operators.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"af5f1f87-8678-4810-ab1d-f078d96ae0b6","IsCreationKey":false,"Key":17.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange":null, + "volume":1.0, + "xorigin":12, + "yorigin":12, + }, + "swatchColours":null, + "swfPrecision":0.5, + "textureGroupId":{ + "name":"Default", + "path":"texturegroups/Default", + }, + "type":0, + "VTile":false, + "width":24, +} \ No newline at end of file