diff --git a/PixelComposer.yyp b/PixelComposer.yyp index b991503cb..c2e55a7aa 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -1183,14 +1183,9 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"workshop_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"workshop_frame.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"0 introduction.png","CopyToMask":-1,"filePath":"datafiles/Getting started",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"1 image import.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"2 animation.png","CopyToMask":-1,"filePath":"datafiles/Getting started",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"3 Group and collection.png","CopyToMask":-1,"filePath":"datafiles/Getting started",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"2 animation.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"3 Group and collection.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"0 introduction.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"1 image import.png","CopyToMask":-1,"filePath":"datafiles/Getting started",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"5 Particle and effectors.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"arrowRight.png","CopyToMask":-1,"filePath":"datafiles/Getting started",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"card_back.png","CopyToMask":-1,"filePath":"datafiles/Getting started",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"card_clubs_02.png","CopyToMask":-1,"filePath":"datafiles/Getting started",}, @@ -1207,20 +1202,15 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"multi file dialog.png","CopyToMask":-1,"filePath":"datafiles/Getting started",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"5 Particle and effectors.png","CopyToMask":-1,"filePath":"datafiles/Getting started",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"tile_0044.png","CopyToMask":-1,"filePath":"datafiles/Getting started",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"4 Looping operation.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"tile_0067.png","CopyToMask":-1,"filePath":"datafiles/Getting started",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"tile_0126.png","CopyToMask":-1,"filePath":"datafiles/Getting started",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"LICENSE.txt","CopyToMask":-1,"filePath":"datafiles/ImageMagick",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"convert.exe","CopyToMask":-1,"filePath":"datafiles/ImageMagick",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Bevel.png","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Broken heart.png","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Broken heart.pxc","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Cards flipping.png","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Cards flipping.pxc","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Dice.png","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Dice.pxc","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Shiny gem.png","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Shiny gem.pxc","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Tree sway.png","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Tree sway.pxc","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"arrowRight.png","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, @@ -1437,7 +1427,6 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphics x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_surface_halign.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_surface_valign.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Collections.zip","CopyToMask":-1,"filePath":"datafiles/data",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Assets.zip","CopyToMask":-1,"filePath":"datafiles/data",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"workshop_badge.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",}, @@ -1447,6 +1436,17 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_noti_icon_file_save.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"default.zip","CopyToMask":-1,"filePath":"datafiles/data/themes",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"magick.exe","CopyToMask":-1,"filePath":"datafiles/ImageMagick",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Collections.zip","CopyToMask":-1,"filePath":"datafiles/data",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"0 introduction.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"1 image import.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"2 animation.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"3 Group and collection.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"4 Looping operation.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"5 Particle and effectors.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Broken heart.pxc","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Cards flipping.pxc","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Dice.pxc","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Shiny gem.pxc","CopyToMask":-1,"filePath":"datafiles/Sample Projects",}, ], "MetaData": { "IDEVersion": "2022.11.1.56", diff --git a/objects/o_dialog_splash/Create_0.gml b/objects/o_dialog_splash/Create_0.gml index 5fb194dfb..3f953f5c4 100644 --- a/objects/o_dialog_splash/Create_0.gml +++ b/objects/o_dialog_splash/Create_0.gml @@ -7,7 +7,9 @@ event_inherited(); dialog_w = ui(960); dialog_h = ui(600); - pages = ["Sample projects", "Steam Workshop"]; + pages = ["Sample projects"]; + if(STEAM_ENABLED) + array_push(pages, "Steam Workshop"); project_page = 0; #endregion diff --git a/scripts/draw_surface_blend/draw_surface_blend.gml b/scripts/draw_surface_blend/draw_surface_blend.gml index 5b2eff5d1..4cc44032e 100644 --- a/scripts/draw_surface_blend/draw_surface_blend.gml +++ b/scripts/draw_surface_blend/draw_surface_blend.gml @@ -1,5 +1,5 @@ globalvar BLEND_TYPES; -BLEND_TYPES = [ "Normal", "Add", "Subtract", "Subtract keep alpha", "Multiply", "Multiply keep Alpha", "Screen", "Screen keep Alpha", "Contrast", "Overlay", "Maximum", "Minimum" ]; +BLEND_TYPES = [ "Normal", "Add", "Subtract", "Multiply", "Screen", "Contrast", "Overlay", "Hue", "Saturation", "Luminosity", "Maximum", "Minimum" ]; enum BLEND_MODE { normal, @@ -60,7 +60,7 @@ function draw_surface_blend(background, foreground, blend, alpha, _pre_alp = tru shader_set_uniform_i(uniform_tile, tile); } - BLEND_OVERRIDE + BLEND_OVER_ALPHA draw_surface_stretched_safe(background, 0, 0, surf_w, surf_h); BLEND_NORMAL shader_reset(); diff --git a/scripts/node_blend/node_blend.gml b/scripts/node_blend/node_blend.gml index 35830f3d1..d97c58795 100644 --- a/scripts/node_blend/node_blend.gml +++ b/scripts/node_blend/node_blend.gml @@ -128,8 +128,8 @@ function Node_Blend(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constr hh = surface_get_height(_mask); break; case 3 : - ww = max(surface_get_width(_back), surface_get_width(_foreDraw), surface_get_width(_mask)); - hh = max(surface_get_height(_back), surface_get_height(_foreDraw), surface_get_height(_mask)); + ww = max(surface_get_width(_back), surface_get_width(_fore), surface_get_width(_mask)); + hh = max(surface_get_height(_back), surface_get_height(_fore), surface_get_height(_mask)); break; case 4 : ww = _out_dim[0]; diff --git a/scripts/panel_menu/panel_menu.gml b/scripts/panel_menu/panel_menu.gml index 950fb6461..0af2f5050 100644 --- a/scripts/panel_menu/panel_menu.gml +++ b/scripts/panel_menu/panel_menu.gml @@ -126,10 +126,14 @@ function Panel_Menu() : PanelContent() constructor { [ get_text("panel_menu_steam", "Steam page"), function() { url_open("https://store.steampowered.com/app/2299510/Pixel_Composer"); } ], - -1, + -1, [ get_text("panel_menu_directory", "Open local directory"), function() { shellOpenExplorer(DIRECTORY); } ], + [ get_text("panel_menu_reset_default", "Reset default collection, assets"), function() { + zip_unzip("data/Collections.zip", DIRECTORY + "Collections"); + zip_unzip("data/Assets.zip", DIRECTORY + "Assets"); + } ], ]], ] diff --git a/scripts/point_rect_overlap/point_rect_overlap.gml b/scripts/point_rect_overlap/point_rect_overlap.gml index 0551eb18c..fa23ba73d 100644 --- a/scripts/point_rect_overlap/point_rect_overlap.gml +++ b/scripts/point_rect_overlap/point_rect_overlap.gml @@ -21,4 +21,8 @@ function point_rectangle_overlap(w, h, angle) { } return [x0, y0]; +} + +function point_in_rectangle_points(px, py, x0, y0, x1, y1, x2, y2, x3, y3) { + return point_in_triangle(px, py, x0, y0, x1, y1, x2, y2) || point_in_triangle(px, py, x1, y1, x2, y2, x3, y3); } \ No newline at end of file diff --git a/scripts/steam_ugc_functions/steam_ugc_functions.gml b/scripts/steam_ugc_functions/steam_ugc_functions.gml index 52f53dbfd..5ecca7938 100644 --- a/scripts/steam_ugc_functions/steam_ugc_functions.gml +++ b/scripts/steam_ugc_functions/steam_ugc_functions.gml @@ -4,6 +4,7 @@ function __initSteamUGC() { STEAM_COLLECTION = ds_list_create(); STEAM_PROJECTS = ds_list_create(); + if(DEMO) return; if(!STEAM_ENABLED) return; steam_ugc_get_subscribed_items(STEAM_SUBS); diff --git a/shaders/sh_blend_normal/sh_blend_normal.fsh b/shaders/sh_blend_normal/sh_blend_normal.fsh index 97023cba3..4b729284d 100644 --- a/shaders/sh_blend_normal/sh_blend_normal.fsh +++ b/shaders/sh_blend_normal/sh_blend_normal.fsh @@ -35,7 +35,6 @@ void main() { float al = _col0.a + _col1.a * (1. - _col0.a); vec4 res = ((_col0 * _col0.a) + (_col1 * _col1.a * (1. - _col0.a))) / al; res.a = al; - if(preserveAlpha == 1) res.a = _col1.a; gl_FragColor = res; }