From 4ee632304449b77689bf075d3dbcd2466210e118 Mon Sep 17 00:00:00 2001 From: tpart Date: Sun, 6 Oct 2024 21:17:52 +0200 Subject: Reorganize map files; Fix location of some theme files --- client/menu/communicate/item/item_message.gd | 2 +- client/menu/menu_background.gdshader | 36 ---------------------- client/menu/menu_background.tscn | 2 +- client/menu/printed.gdshader | 22 ------------- client/menu/printed_material.tres | 6 ---- client/menu/rating/rating.tscn | 2 +- client/menu/theme/materials/printed_material.tres | 6 ++++ client/menu/theme/shaders/menu_background.gdshader | 36 ++++++++++++++++++++++ client/menu/theme/shaders/printed.gdshader | 22 +++++++++++++ 9 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 client/menu/menu_background.gdshader delete mode 100644 client/menu/printed.gdshader delete mode 100644 client/menu/printed_material.tres create mode 100644 client/menu/theme/materials/printed_material.tres create mode 100644 client/menu/theme/shaders/menu_background.gdshader create mode 100644 client/menu/theme/shaders/printed.gdshader (limited to 'client/menu') diff --git a/client/menu/communicate/item/item_message.gd b/client/menu/communicate/item/item_message.gd index 17d2a629..dfbaf232 100644 --- a/client/menu/communicate/item/item_message.gd +++ b/client/menu/communicate/item/item_message.gd @@ -17,7 +17,7 @@ class_name ItemMessage extends Control -const PRINTED_MAT := preload("res://menu/printed_material.tres") +const PRINTED_MAT := preload("res://menu/theme/materials/printed_material.tres") @export var enable_rotation := true @export var enable_grayscale := false diff --git a/client/menu/menu_background.gdshader b/client/menu/menu_background.gdshader deleted file mode 100644 index 91b94601..00000000 --- a/client/menu/menu_background.gdshader +++ /dev/null @@ -1,36 +0,0 @@ -/* - Hurry Curry! - a game about cooking - Copyright 2024 metamuffin - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, version 3 of the License only. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -*/ -shader_type spatial; -render_mode unshaded; - -uniform sampler2D noise : source_color; -uniform vec3 ccloud : source_color; -uniform vec3 csky : source_color; - -void fragment() { - vec2 uv = UV * 0.9; - uv += TIME * vec2(0.001,0.002); - - float f = texture(noise, uv).x; - f = 1. - f; - f = pow(f, 1.5); - f = floor(f*5.)/5.; - f = pow(f, 2.); - - ALBEDO = mix(csky, ccloud, f); -} diff --git a/client/menu/menu_background.tscn b/client/menu/menu_background.tscn index 19f0d506..c8cd7c53 100644 --- a/client/menu/menu_background.tscn +++ b/client/menu/menu_background.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://menu/menu_background.gd" id="1_ijsg0"] [ext_resource type="Script" path="res://map/auto_setup/environment_setup.gd" id="2_rkilw"] -[ext_resource type="Shader" path="res://menu/menu_background.gdshader" id="3_5mp8y"] +[ext_resource type="Shader" path="res://menu/theme/shaders/menu_background.gdshader" id="3_5mp8y"] [ext_resource type="PackedScene" uid="uid://b4gone8fu53r7" path="res://map/map.tscn" id="3_p80a7"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_uw50b"] diff --git a/client/menu/printed.gdshader b/client/menu/printed.gdshader deleted file mode 100644 index 3b35faa8..00000000 --- a/client/menu/printed.gdshader +++ /dev/null @@ -1,22 +0,0 @@ -/* - Hurry Curry! - a game about cooking - Copyright 2024 metamuffin - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, version 3 of the License only. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -*/ -shader_type canvas_item; - -void fragment() { - COLOR = floor(COLOR*5.)/5.; -} diff --git a/client/menu/printed_material.tres b/client/menu/printed_material.tres deleted file mode 100644 index 595248fd..00000000 --- a/client/menu/printed_material.tres +++ /dev/null @@ -1,6 +0,0 @@ -[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://dogdyoqrmy6ft"] - -[ext_resource type="Shader" path="res://menu/printed.gdshader" id="1_v4ily"] - -[resource] -shader = ExtResource("1_v4ily") diff --git a/client/menu/rating/rating.tscn b/client/menu/rating/rating.tscn index dc4ed714..a1f48c64 100644 --- a/client/menu/rating/rating.tscn +++ b/client/menu/rating/rating.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=12 format=3 uid="uid://buu3cdpigs8qq"] -[ext_resource type="Texture2D" uid="uid://b10goh4dsa3b0" path="res://player/star.webp" id="1_7qv7r"] +[ext_resource type="Texture2D" uid="uid://b10goh4dsa3b0" path="res://player/particles/satisfied/star.webp" id="1_7qv7r"] [ext_resource type="Shader" path="res://menu/rating/desaturate.gdshader" id="1_pddsm"] [ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme/theme.tres" id="1_uwajf"] [ext_resource type="Script" path="res://menu/rating/rating.gd" id="2_cq0se"] diff --git a/client/menu/theme/materials/printed_material.tres b/client/menu/theme/materials/printed_material.tres new file mode 100644 index 00000000..5695d5a5 --- /dev/null +++ b/client/menu/theme/materials/printed_material.tres @@ -0,0 +1,6 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://dogdyoqrmy6ft"] + +[ext_resource type="Shader" path="res://menu/theme/shaders/printed.gdshader" id="1_sevww"] + +[resource] +shader = ExtResource("1_sevww") diff --git a/client/menu/theme/shaders/menu_background.gdshader b/client/menu/theme/shaders/menu_background.gdshader new file mode 100644 index 00000000..91b94601 --- /dev/null +++ b/client/menu/theme/shaders/menu_background.gdshader @@ -0,0 +1,36 @@ +/* + Hurry Curry! - a game about cooking + Copyright 2024 metamuffin + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, version 3 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +*/ +shader_type spatial; +render_mode unshaded; + +uniform sampler2D noise : source_color; +uniform vec3 ccloud : source_color; +uniform vec3 csky : source_color; + +void fragment() { + vec2 uv = UV * 0.9; + uv += TIME * vec2(0.001,0.002); + + float f = texture(noise, uv).x; + f = 1. - f; + f = pow(f, 1.5); + f = floor(f*5.)/5.; + f = pow(f, 2.); + + ALBEDO = mix(csky, ccloud, f); +} diff --git a/client/menu/theme/shaders/printed.gdshader b/client/menu/theme/shaders/printed.gdshader new file mode 100644 index 00000000..3b35faa8 --- /dev/null +++ b/client/menu/theme/shaders/printed.gdshader @@ -0,0 +1,22 @@ +/* + Hurry Curry! - a game about cooking + Copyright 2024 metamuffin + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, version 3 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +*/ +shader_type canvas_item; + +void fragment() { + COLOR = floor(COLOR*5.)/5.; +} -- cgit v1.2.3-70-g09d2