diff --git a/global.gd b/global.gd index ee7011b..b9b1f8e 100644 --- a/global.gd +++ b/global.gd @@ -49,7 +49,7 @@ var firstrun const musictracks = ["res://music/midorinoakuma.wav", "res://music/seahorse.wav", "res://music/chinesegoat.wav", "res://music/doyoufeelold.wav", "res://music/doyiuneedahealer.wav", "res://music/adayatceres.wav", "res://music/twintroublemakers.wav", "res://music/easyquiz.wav", "res://music/neowave.wav", "res://music/multivectorsubmarines.wav", "res://music/halfgeniegirls.wav", "res://music/rusianmaverickfairy.wav", "res://music/blacksmithofdestruction.wav", "res://music/shininglikefireworks.wav", "res://music/sadtrashcan.wav", "res://music/akikoletter.wav", "res://music/asadcat.wav", "res://music/lilydesire.wav", "res://music/scholartrip.wav", "res://music/quantumice.wav", "res://music/unreeeal.wav", "res://music/alsa.wav", "res://music/silverblue.wav"] const sfxtracks = ["res://sfx/braindamage.wav", "res://sfx/gaugefill.wav", "res://sfx/boomboombakudan.wav"] var debug = false -const release = "R0.1.8-alpha" +const release = "R0.1.8-dev" var sk = false var xm = 0 var ym = 0 diff --git a/levels/ui/alsatest.gd b/levels/ui/alsatest.gd new file mode 100644 index 0000000..8a41536 --- /dev/null +++ b/levels/ui/alsatest.gd @@ -0,0 +1,29 @@ +extends Control +var bgsound := AudioStreamPlayer.new() +var fl := AudioStreamPlayer2D.new() +var fr := AudioStreamPlayer2D.new() + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + add_child(bgsound) + add_child(fl) + add_child(fr) + bgsound.stream = load(Global.musictracks[21]) + fl.stream = load("res://sfx/Front_Left.wav") + fr.stream = load("res://sfx/Front_Right.wav") + bgsound.set_volume_db(-10) + fl.set_volume_db(10) + fr.set_volume_db(10) + bgsound.play(0) + +func _input(event): + # Mouse in viewport coordinates. + if Input.is_action_just_pressed("ui_cancel"): + get_tree().change_scene_to_file("res://levels/ui/soundtest.tscn") + elif Input.is_action_just_pressed("ui_left"): + fl.play(0) + elif Input.is_action_just_pressed("ui_right"): + fr.play(0) +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/levels/ui/alsatest.tscn b/levels/ui/alsatest.tscn new file mode 100644 index 0000000..401c2af --- /dev/null +++ b/levels/ui/alsatest.tscn @@ -0,0 +1,57 @@ +[gd_scene load_steps=7 format=3 uid="uid://bivi1ncwnunrp"] + +[ext_resource type="Script" path="res://levels/ui/alsatest.gd" id="1_hqlyt"] +[ext_resource type="Texture2D" uid="uid://bxa27c7gnivwx" path="res://backgounds/night-sky-at-ceres.jpg" id="2_ribwb"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_2tyrv"] +[ext_resource type="Script" path="res://Game name.gd" id="3_iuwjb"] +[ext_resource type="Script" path="res://start.gd" id="4_cp7hy"] +[ext_resource type="Script" path="res://exit.gd" id="5_aogyx"] + +[node name="Alsatest" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_hqlyt") + +[node name="Night Sky" type="TextureRect" parent="."] +layout_mode = 0 +offset_right = 1280.0 +offset_bottom = 720.0 +texture = ExtResource("2_ribwb") + +[node name="Game name" type="Label" parent="."] +offset_left = 35.0 +offset_top = 308.0 +offset_right = 1241.0 +offset_bottom = 438.0 +theme_override_font_sizes/font_size = 95 +text = "Advanced Linein +Sound Architects" +horizontal_alignment = 1 +script = ExtResource("3_iuwjb") + +[node name="start" type="Label" parent="."] +offset_left = 46.0 +offset_top = 92.0 +offset_right = 1224.0 +offset_bottom = 147.0 +theme_override_font_sizes/font_size = 40 +text = "ALSA_TEST_SPK" +horizontal_alignment = 1 +script = ExtResource("4_cp7hy") + +[node name="exit" type="Label" parent="."] +offset_left = 47.0 +offset_top = 602.0 +offset_right = 1208.0 +offset_bottom = 657.0 +theme_override_font_sizes/font_size = 40 +text = "TEXT_EXIT" +horizontal_alignment = 1 +script = ExtResource("5_aogyx") + +[node name="Bottomhud" parent="." instance=ExtResource("3_2tyrv")] +layout_mode = 1 diff --git a/levels/ui/soundtest.gd b/levels/ui/soundtest.gd index 62b2d76..78455e6 100644 --- a/levels/ui/soundtest.gd +++ b/levels/ui/soundtest.gd @@ -1,7 +1,11 @@ extends Control +var alsatest func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) + alsatest = $VBoxContainer/ALSA $"VBoxContainer/Music".grab_focus() + if OS.get_name() == "Linux": + alsatest.disabled = false # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): @@ -38,3 +42,7 @@ func _on_music_pressed(): func _on_sfx_pressed(): get_tree().change_scene_to_file("res://levels/ui/sfxtest.tscn") + + +func _on_alsa_pressed() -> void: + get_tree().change_scene_to_file("res://levels/ui/alsatest.tscn") diff --git a/levels/ui/soundtest.tscn b/levels/ui/soundtest.tscn index 9ec61a0..6ef8413 100644 --- a/levels/ui/soundtest.tscn +++ b/levels/ui/soundtest.tscn @@ -66,6 +66,13 @@ theme_override_font_sizes/font_size = 80 theme_override_styles/focus = SubResource("StyleBoxFlat_4arqn") text = "BUTTON_SFXTEST" +[node name="ALSA" type="Button" parent="VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 80 +theme_override_styles/focus = SubResource("StyleBoxFlat_4arqn") +disabled = true +text = "ALSA_TEST_MENU" + [node name="Back" type="Button" parent="VBoxContainer"] layout_mode = 2 theme_override_font_sizes/font_size = 80 @@ -74,4 +81,5 @@ text = "BUTTON_RETURN" [connection signal="pressed" from="VBoxContainer/Music" to="." method="_on_music_pressed"] [connection signal="pressed" from="VBoxContainer/Sfx" to="." method="_on_sfx_pressed"] +[connection signal="pressed" from="VBoxContainer/ALSA" to="." method="_on_alsa_pressed"] [connection signal="pressed" from="VBoxContainer/Back" to="." method="_on_back_pressed"] diff --git a/sfx/Front_Left.wav b/sfx/Front_Left.wav new file mode 100644 index 0000000..dfcb052 Binary files /dev/null and b/sfx/Front_Left.wav differ diff --git a/sfx/Front_Left.wav.import b/sfx/Front_Left.wav.import new file mode 100644 index 0000000..c701daf --- /dev/null +++ b/sfx/Front_Left.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://blllkdxk3sj0g" +path="res://.godot/imported/Front_Left.wav-142bb3eaab87398a319a0a03130bc93f.sample" + +[deps] + +source_file="res://sfx/Front_Left.wav" +dest_files=["res://.godot/imported/Front_Left.wav-142bb3eaab87398a319a0a03130bc93f.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sfx/Front_Right.wav b/sfx/Front_Right.wav new file mode 100644 index 0000000..16c8066 Binary files /dev/null and b/sfx/Front_Right.wav differ diff --git a/sfx/Front_Right.wav.import b/sfx/Front_Right.wav.import new file mode 100644 index 0000000..46dcd53 --- /dev/null +++ b/sfx/Front_Right.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://dpn17gurdra0l" +path="res://.godot/imported/Front_Right.wav-5dd70c9f039cc4ed6c8a029a67225842.sample" + +[deps] + +source_file="res://sfx/Front_Right.wav" +dest_files=["res://.godot/imported/Front_Right.wav-5dd70c9f039cc4ed6c8a029a67225842.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/text.csv b/text.csv index 31416d1..dc24ff4 100644 --- a/text.csv +++ b/text.csv @@ -81,6 +81,8 @@ SONG21_LABEL;ALSA Audio Calibration;Calibración de Audio ALSA;ALSA オーディ SONG21_INFO;MrGamer\nHostlov\nA song made to calibrate your sound system while playing this game.\nThis does not work with bluetooth headset or weird kernels;MrGamer\nHostlov\nUna canción hecha para calibrar tu sistema de sonido mientras juegas a este juego.\nEsto no funciona con auriculares bluetooth o kernels extraños;MrGamer\nHostlov\nこのゲームをプレイ中にサウンドシステムを調整するために作られた曲。Bluetoothヘッドセットや奇妙なカーネルでは動作しません SONG22_LABEL;Elysium Fields;Campos Elíseos;エリジウム フィールド SONG22_INFO;4mat\nEternity\nA song about eternity and immutability;4mat\nEternity\nUna canción sobre la eternidad y la inmutabilidad;4mat\nEternity\n永遠と不変性についての歌 +ALSA_TEST_MENU;ALSA Audio Calibration;Calibración de Audio ALSA;ALSA オーディオキャリブレーション +ALSA_TEST_SPK;Use Left and Right to test speakers;Utilice izquierda y derecha para probar los altavoces;左と右を使ってスピーカーをテストする DIALOG_TEST_0;What is this place?;¿Qué es este lugar?;この場所は何ですか? DIALOG_TEST_1;I'm here;Estoy aquí;私はここにいます DIALOG_TEST_2;I got you, cheap copy;Te atrapé, copia barata;手に入れたよ、安物コピー