summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt1
-rw-r--r--res/fmod/.cache/fsbcache/Desktop/1FE16EE9.fobjbin0 -> 2507 bytes
-rw-r--r--res/fmod/.cache/fsbcache/Desktop/3C7FCD0D.fobjbin0 -> 1426 bytes
-rw-r--r--res/fmod/.cache/fsbcache/Desktop/5A3FB1CD.fobjbin0 -> 2113 bytes
-rw-r--r--res/fmod/.cache/fsbcache/Desktop/7FBDFDEC.fobjbin0 -> 1779 bytes
-rw-r--r--res/fmod/.cache/{223fc849-8f5c-4825-96ab-eab1343156dc}.pdcbin0 -> 904 bytes
-rw-r--r--res/fmod/.cache/{3e43e5bc-3c70-4234-87c4-9767fa6d2499}.pdcbin0 -> 800 bytes
-rw-r--r--res/fmod/.cache/{5f809022-d9c3-4209-8dbf-dfb648b9f1c4}.pdcbin0 -> 480 bytes
-rw-r--r--res/fmod/.cache/{6ada1ede-de39-422a-b62a-f46d14ae1868}.pdcbin0 -> 912 bytes
-rw-r--r--res/fmod/.user/Metadata/Event/{071a4502-d1f7-464c-a3fb-57a183c4cab4}.user.xml37
-rw-r--r--res/fmod/.user/Metadata/Event/{5073fd94-9286-4fa1-87de-fee49c7ef309}.user.xml37
-rw-r--r--res/fmod/.user/Metadata/Event/{c18dc3c5-456c-42a6-ae23-cfd1b5f22fd8}.user.xml37
-rw-r--r--res/fmod/.user/Metadata/Event/{fea336e4-2204-45a2-9ee0-af4cb70b4f27}.user.xml34
-rw-r--r--res/fmod/Assets/Jump01.wavbin0 -> 18796 bytes
-rw-r--r--res/fmod/Assets/Jump02.wavbin0 -> 21636 bytes
-rw-r--r--res/fmod/Assets/MenuCursor01.wavbin0 -> 10684 bytes
-rw-r--r--res/fmod/Assets/MenuValid01.wavbin0 -> 21440 bytes
-rw-r--r--res/fmod/Metadata/AudioFile/{223fc849-8f5c-4825-96ab-eab1343156dc}.xml20
-rw-r--r--res/fmod/Metadata/AudioFile/{3e43e5bc-3c70-4234-87c4-9767fa6d2499}.xml20
-rw-r--r--res/fmod/Metadata/AudioFile/{5f809022-d9c3-4209-8dbf-dfb648b9f1c4}.xml20
-rw-r--r--res/fmod/Metadata/AudioFile/{6ada1ede-de39-422a-b62a-f46d14ae1868}.xml20
-rw-r--r--res/fmod/Metadata/Event/{071a4502-d1f7-464c-a3fb-57a183c4cab4}.xml128
-rw-r--r--res/fmod/Metadata/Event/{5073fd94-9286-4fa1-87de-fee49c7ef309}.xml128
-rw-r--r--res/fmod/Metadata/Event/{c18dc3c5-456c-42a6-ae23-cfd1b5f22fd8}.xml128
-rw-r--r--res/fmod/Metadata/Event/{fea336e4-2204-45a2-9ee0-af4cb70b4f27}.xml128
-rw-r--r--res/menu.pngbin0 -> 9764 bytes
-rw-r--r--res/menu.psdbin0 -> 124876 bytes
-rw-r--r--src/consts.h2
-rw-r--r--src/game.cpp34
-rw-r--r--src/game.h8
-rw-r--r--src/main.cpp15
-rw-r--r--src/menu.cpp109
-rw-r--r--src/menu.h42
-rw-r--r--src/renderer.cpp133
-rw-r--r--src/renderer.h12
36 files changed, 1073 insertions, 21 deletions
diff --git a/.gitignore b/.gitignore index 643dc82..44653cd 100644 --- a/.gitignore +++ b/.gitignore
@@ -4,3 +4,4 @@ build-intrinsic
4.DS_Store 4.DS_Store
5build-new 5build-new
6fade.png 6fade.png
7.unsaved
diff --git a/CMakeLists.txt b/CMakeLists.txt index a40e14f..9f6d26c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -38,6 +38,7 @@ add_executable(Ether
38 src/animation.cpp 38 src/animation.cpp
39 src/game.cpp 39 src/game.cpp
40 src/sign.cpp 40 src/sign.cpp
41 src/menu.cpp
41 vendor/fov.c 42 vendor/fov.c
42) 43)
43 44
diff --git a/res/fmod/.cache/fsbcache/Desktop/1FE16EE9.fobj b/res/fmod/.cache/fsbcache/Desktop/1FE16EE9.fobj new file mode 100644 index 0000000..32ffbc7 --- /dev/null +++ b/res/fmod/.cache/fsbcache/Desktop/1FE16EE9.fobj
Binary files differ
diff --git a/res/fmod/.cache/fsbcache/Desktop/3C7FCD0D.fobj b/res/fmod/.cache/fsbcache/Desktop/3C7FCD0D.fobj new file mode 100644 index 0000000..3cc9fd7 --- /dev/null +++ b/res/fmod/.cache/fsbcache/Desktop/3C7FCD0D.fobj
Binary files differ
diff --git a/res/fmod/.cache/fsbcache/Desktop/5A3FB1CD.fobj b/res/fmod/.cache/fsbcache/Desktop/5A3FB1CD.fobj new file mode 100644 index 0000000..48acbe0 --- /dev/null +++ b/res/fmod/.cache/fsbcache/Desktop/5A3FB1CD.fobj
Binary files differ
diff --git a/res/fmod/.cache/fsbcache/Desktop/7FBDFDEC.fobj b/res/fmod/.cache/fsbcache/Desktop/7FBDFDEC.fobj new file mode 100644 index 0000000..9420705 --- /dev/null +++ b/res/fmod/.cache/fsbcache/Desktop/7FBDFDEC.fobj
Binary files differ
diff --git a/res/fmod/.cache/{223fc849-8f5c-4825-96ab-eab1343156dc}.pdc b/res/fmod/.cache/{223fc849-8f5c-4825-96ab-eab1343156dc}.pdc new file mode 100644 index 0000000..93078d9 --- /dev/null +++ b/res/fmod/.cache/{223fc849-8f5c-4825-96ab-eab1343156dc}.pdc
Binary files differ
diff --git a/res/fmod/.cache/{3e43e5bc-3c70-4234-87c4-9767fa6d2499}.pdc b/res/fmod/.cache/{3e43e5bc-3c70-4234-87c4-9767fa6d2499}.pdc new file mode 100644 index 0000000..dbd598f --- /dev/null +++ b/res/fmod/.cache/{3e43e5bc-3c70-4234-87c4-9767fa6d2499}.pdc
Binary files differ
diff --git a/res/fmod/.cache/{5f809022-d9c3-4209-8dbf-dfb648b9f1c4}.pdc b/res/fmod/.cache/{5f809022-d9c3-4209-8dbf-dfb648b9f1c4}.pdc new file mode 100644 index 0000000..316a4b9 --- /dev/null +++ b/res/fmod/.cache/{5f809022-d9c3-4209-8dbf-dfb648b9f1c4}.pdc
Binary files differ
diff --git a/res/fmod/.cache/{6ada1ede-de39-422a-b62a-f46d14ae1868}.pdc b/res/fmod/.cache/{6ada1ede-de39-422a-b62a-f46d14ae1868}.pdc new file mode 100644 index 0000000..9ed5e36 --- /dev/null +++ b/res/fmod/.cache/{6ada1ede-de39-422a-b62a-f46d14ae1868}.pdc
Binary files differ
diff --git a/res/fmod/.user/Metadata/Event/{071a4502-d1f7-464c-a3fb-57a183c4cab4}.user.xml b/res/fmod/.user/Metadata/Event/{071a4502-d1f7-464c-a3fb-57a183c4cab4}.user.xml new file mode 100644 index 0000000..ea6f59b --- /dev/null +++ b/res/fmod/.user/Metadata/Event/{071a4502-d1f7-464c-a3fb-57a183c4cab4}.user.xml
@@ -0,0 +1,37 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<objects serializationModel="Studio.01.10.00">
3 <object class="Event" id="{071a4502-d1f7-464c-a3fb-57a183c4cab4}">
4 <relationship name="selectables">
5 <destination>{53bb2b11-3105-47b3-aa6e-1faa64319499}</destination>
6 </relationship>
7 <relationship name="uiLastParameterSelection">
8 <destination>{8cff8eab-2c2e-4785-b92f-458b4a1e4bff}</destination>
9 </relationship>
10 </object>
11 <object class="MasterTrack" id="{7df0f75b-07e3-48c0-9526-2749b20383da}"/>
12 <object class="MixerInput" id="{3b5fbaa2-de8d-498d-8836-0deee6f90a0a}"/>
13 <object class="EventAutomatableProperties" id="{7f798dbf-9d7d-4674-965e-a7c4808dd1fa}"/>
14 <object class="MarkerTrack" id="{3e120955-c4a9-478e-b784-01cba5d795af}"/>
15 <object class="GroupTrack" id="{7e91b1fb-b466-40b4-bf1d-d9452b46dfc8}"/>
16 <object class="Timeline" id="{8cff8eab-2c2e-4785-b92f-458b4a1e4bff}">
17 <property name="uiLastRulerScaleRatio">
18 <value>0.016137708445400752</value>
19 </property>
20 </object>
21 <object class="EventMixerMaster" id="{67243c44-2abc-462e-987a-6b7a4dc27f60}">
22 <relationship name="input">
23 <destination>{8f0fdc50-c37e-4cbd-b7e5-c28b36cf933d}</destination>
24 </relationship>
25 </object>
26 <object class="MixerBusEffectChain" id="{467ad434-80de-483a-a9d0-c2fa25032a8e}"/>
27 <object class="MixerBusPanner" id="{391753b5-2e2d-4eca-bd37-63113397e478}"/>
28 <object class="SingleSound" id="{53bb2b11-3105-47b3-aa6e-1faa64319499}"/>
29 <object class="EventMixerGroup" id="{8f0fdc50-c37e-4cbd-b7e5-c28b36cf933d}"/>
30 <object class="MixerBusEffectChain" id="{7281c837-7855-4c6a-884d-897653c130bd}"/>
31 <object class="MixerBusPanner" id="{46025233-27df-4800-aab1-be680116febc}"/>
32 <object class="MixerBusFader" id="{ed5431d0-defa-48d8-acf6-b297d9e30ac6}"/>
33 <object class="MixerBusEffectChain" id="{bc06958b-c6c7-4537-b4a0-9e2815e5e700}"/>
34 <object class="MixerBusPanner" id="{4a645903-54ae-4daf-b2c7-137a239890e7}"/>
35 <object class="MixerBusFader" id="{7c18ed28-8396-442c-aae5-730a95c6af74}"/>
36 <object class="MixerBusFader" id="{a252672d-d5c2-439f-8a61-d109a56345bf}"/>
37</objects>
diff --git a/res/fmod/.user/Metadata/Event/{5073fd94-9286-4fa1-87de-fee49c7ef309}.user.xml b/res/fmod/.user/Metadata/Event/{5073fd94-9286-4fa1-87de-fee49c7ef309}.user.xml new file mode 100644 index 0000000..f109bee --- /dev/null +++ b/res/fmod/.user/Metadata/Event/{5073fd94-9286-4fa1-87de-fee49c7ef309}.user.xml
@@ -0,0 +1,37 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<objects serializationModel="Studio.01.10.00">
3 <object class="Event" id="{5073fd94-9286-4fa1-87de-fee49c7ef309}">
4 <relationship name="selectables">
5 <destination>{b115edd2-8123-4808-9b3b-15c52e92487a}</destination>
6 </relationship>
7 <relationship name="uiLastParameterSelection">
8 <destination>{97841c1e-47f6-4ada-bfc9-c92c4919ece2}</destination>
9 </relationship>
10 </object>
11 <object class="MasterTrack" id="{00de9fab-ae1a-4071-a0ba-3c9dd8a8a1e8}"/>
12 <object class="MixerInput" id="{7af27bd4-4588-4bb0-9bda-8ec8a5a13d82}"/>
13 <object class="EventAutomatableProperties" id="{18f21bef-57b4-43aa-a263-f83a8c0c3dab}"/>
14 <object class="MarkerTrack" id="{61e6ba1d-31af-4385-b4e8-023e06d11401}"/>
15 <object class="GroupTrack" id="{c6841aa9-f288-44ae-8a47-c57680c856f8}"/>
16 <object class="Timeline" id="{97841c1e-47f6-4ada-bfc9-c92c4919ece2}">
17 <property name="uiLastRulerScaleRatio">
18 <value>0.016137708445400752</value>
19 </property>
20 </object>
21 <object class="EventMixerMaster" id="{6fed7a7a-b346-4cfd-9aba-375538342920}">
22 <relationship name="input">
23 <destination>{7cb7e8f7-cf3f-40de-a22e-da0bfde92db9}</destination>
24 </relationship>
25 </object>
26 <object class="MixerBusEffectChain" id="{28ce5d18-6ca1-4fc2-960a-529fc119e355}"/>
27 <object class="MixerBusPanner" id="{31e4157d-3386-4c0b-b9d5-dc14323979e9}"/>
28 <object class="SingleSound" id="{b115edd2-8123-4808-9b3b-15c52e92487a}"/>
29 <object class="EventMixerGroup" id="{7cb7e8f7-cf3f-40de-a22e-da0bfde92db9}"/>
30 <object class="MixerBusEffectChain" id="{738cb9ff-7057-40bd-91ce-5e276d59a2b6}"/>
31 <object class="MixerBusPanner" id="{2183e01c-f308-4b16-96fb-eb9adec3c7b1}"/>
32 <object class="MixerBusFader" id="{350925ce-e002-4afe-b90b-1de2378d3f35}"/>
33 <object class="MixerBusEffectChain" id="{896752b5-9837-4dcd-be3d-ed2bfc2c6f59}"/>
34 <object class="MixerBusPanner" id="{e975f6e7-699a-463c-8de1-d8f7ace49749}"/>
35 <object class="MixerBusFader" id="{31400021-665c-48cf-9f01-0efa8c006fe6}"/>
36 <object class="MixerBusFader" id="{cb9a9e93-2d8a-4f9b-a145-b8e28ca5aaeb}"/>
37</objects>
diff --git a/res/fmod/.user/Metadata/Event/{c18dc3c5-456c-42a6-ae23-cfd1b5f22fd8}.user.xml b/res/fmod/.user/Metadata/Event/{c18dc3c5-456c-42a6-ae23-cfd1b5f22fd8}.user.xml new file mode 100644 index 0000000..db69e7a --- /dev/null +++ b/res/fmod/.user/Metadata/Event/{c18dc3c5-456c-42a6-ae23-cfd1b5f22fd8}.user.xml
@@ -0,0 +1,37 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<objects serializationModel="Studio.01.10.00">
3 <object class="Event" id="{c18dc3c5-456c-42a6-ae23-cfd1b5f22fd8}">
4 <relationship name="selectables">
5 <destination>{e3066025-fe5d-4921-9797-8eb3e71ad669}</destination>
6 </relationship>
7 <relationship name="uiLastParameterSelection">
8 <destination>{7ea9470c-55bc-4ae5-ae64-f0ac6c761a8f}</destination>
9 </relationship>
10 </object>
11 <object class="MasterTrack" id="{49f21566-c529-493b-86d7-377c39683fae}"/>
12 <object class="MixerInput" id="{dd5c7b9d-f25e-451a-8a06-b601d57e0a38}"/>
13 <object class="EventAutomatableProperties" id="{3553fbf8-0f0a-4ca6-bfba-77c9a7ab8a68}"/>
14 <object class="MarkerTrack" id="{d713641e-63f6-4fb7-a010-61b8a7a7d868}"/>
15 <object class="GroupTrack" id="{8899c655-b89a-48d9-88ca-1bb879cf23a1}"/>
16 <object class="Timeline" id="{7ea9470c-55bc-4ae5-ae64-f0ac6c761a8f}">
17 <property name="uiLastRulerScaleRatio">
18 <value>0.00015144074484733824</value>
19 </property>
20 </object>
21 <object class="EventMixerMaster" id="{0d2a061b-3e5e-471b-acc3-af3b5857a9e5}">
22 <relationship name="input">
23 <destination>{af1977d5-3653-437c-a168-bc604872d523}</destination>
24 </relationship>
25 </object>
26 <object class="MixerBusEffectChain" id="{aa21513a-88e3-4bf2-be50-274ec99beeb2}"/>
27 <object class="MixerBusPanner" id="{8fbdb1af-f78c-43f0-8d25-c1d4011f1dbb}"/>
28 <object class="SingleSound" id="{e3066025-fe5d-4921-9797-8eb3e71ad669}"/>
29 <object class="EventMixerGroup" id="{af1977d5-3653-437c-a168-bc604872d523}"/>
30 <object class="MixerBusEffectChain" id="{3b190cad-1fe4-44b3-8e24-5e5a982501cd}"/>
31 <object class="MixerBusPanner" id="{777fe7cc-628a-4c48-b5f0-5abc306db8d1}"/>
32 <object class="MixerBusFader" id="{557b5a12-c5d7-47c8-85ca-af36564599eb}"/>
33 <object class="MixerBusEffectChain" id="{a32eda5f-c555-47fb-a1d5-4f26384f0726}"/>
34 <object class="MixerBusPanner" id="{4243319e-568c-417a-b28c-eccbbce1988d}"/>
35 <object class="MixerBusFader" id="{0235c01a-09bd-4cfb-ae68-3bf1e7a1dcc5}"/>
36 <object class="MixerBusFader" id="{9ab07a58-67bf-4842-bada-47ae28c93e65}"/>
37</objects>
diff --git a/res/fmod/.user/Metadata/Event/{fea336e4-2204-45a2-9ee0-af4cb70b4f27}.user.xml b/res/fmod/.user/Metadata/Event/{fea336e4-2204-45a2-9ee0-af4cb70b4f27}.user.xml new file mode 100644 index 0000000..b765220 --- /dev/null +++ b/res/fmod/.user/Metadata/Event/{fea336e4-2204-45a2-9ee0-af4cb70b4f27}.user.xml
@@ -0,0 +1,34 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<objects serializationModel="Studio.01.10.00">
3 <object class="Event" id="{fea336e4-2204-45a2-9ee0-af4cb70b4f27}">
4 <relationship name="uiLastParameterSelection">
5 <destination>{8d77dd4e-88a6-4f40-a4da-0ff9b399d764}</destination>
6 </relationship>
7 </object>
8 <object class="MasterTrack" id="{220ab1d3-7e25-4714-8dce-6b4f48822c2f}"/>
9 <object class="MixerInput" id="{b0f5fa87-790e-43cd-b0d6-30bc9b025ae5}"/>
10 <object class="EventAutomatableProperties" id="{d0e3ae2c-5c7c-4f4c-bbbc-d9235ffa8a8c}"/>
11 <object class="MarkerTrack" id="{d4d04dfd-a20c-4ce0-b81f-55411cc6ba8f}"/>
12 <object class="GroupTrack" id="{21a0b61a-8256-4ff8-bf47-9d8b438f0bb9}"/>
13 <object class="Timeline" id="{8d77dd4e-88a6-4f40-a4da-0ff9b399d764}">
14 <property name="uiLastRulerScaleRatio">
15 <value>0.016137708445400752</value>
16 </property>
17 </object>
18 <object class="EventMixerMaster" id="{a4878bca-1f26-4f04-a1a7-efce8de54795}">
19 <relationship name="input">
20 <destination>{c8122b59-45a7-4756-94f6-625ed9e16820}</destination>
21 </relationship>
22 </object>
23 <object class="MixerBusEffectChain" id="{c384d94c-b6a0-43bb-916d-590bb50bacc2}"/>
24 <object class="MixerBusPanner" id="{aa76d6d2-be9b-400c-9fac-0d0d99713186}"/>
25 <object class="SingleSound" id="{c58d6fbf-0455-439c-af4e-a15abfc5435f}"/>
26 <object class="EventMixerGroup" id="{c8122b59-45a7-4756-94f6-625ed9e16820}"/>
27 <object class="MixerBusEffectChain" id="{4563e900-85b8-4646-818e-e1a495113068}"/>
28 <object class="MixerBusPanner" id="{98797e74-c137-480a-b038-f9a1c8285bd7}"/>
29 <object class="MixerBusFader" id="{72fe2bc3-a853-4fa0-bccb-f792e1f42949}"/>
30 <object class="MixerBusEffectChain" id="{b24c9fb1-b17a-4bd3-868b-32862e8eabec}"/>
31 <object class="MixerBusPanner" id="{81a22f13-b8af-4980-b16b-566fcc07d513}"/>
32 <object class="MixerBusFader" id="{b5af2eea-dd50-4603-95fa-d47f29935355}"/>
33 <object class="MixerBusFader" id="{c22cf442-67f9-4ee3-b0d7-ebbb485c6934}"/>
34</objects>
diff --git a/res/fmod/Assets/Jump01.wav b/res/fmod/Assets/Jump01.wav new file mode 100644 index 0000000..3122bcc --- /dev/null +++ b/res/fmod/Assets/Jump01.wav
Binary files differ
diff --git a/res/fmod/Assets/Jump02.wav b/res/fmod/Assets/Jump02.wav new file mode 100644 index 0000000..5c45ebc --- /dev/null +++ b/res/fmod/Assets/Jump02.wav
Binary files differ
diff --git a/res/fmod/Assets/MenuCursor01.wav b/res/fmod/Assets/MenuCursor01.wav new file mode 100644 index 0000000..27823ee --- /dev/null +++ b/res/fmod/Assets/MenuCursor01.wav
Binary files differ
diff --git a/res/fmod/Assets/MenuValid01.wav b/res/fmod/Assets/MenuValid01.wav new file mode 100644 index 0000000..dc622d7 --- /dev/null +++ b/res/fmod/Assets/MenuValid01.wav
Binary files differ
diff --git a/res/fmod/Metadata/AudioFile/{223fc849-8f5c-4825-96ab-eab1343156dc}.xml b/res/fmod/Metadata/AudioFile/{223fc849-8f5c-4825-96ab-eab1343156dc}.xml new file mode 100644 index 0000000..2f96c53 --- /dev/null +++ b/res/fmod/Metadata/AudioFile/{223fc849-8f5c-4825-96ab-eab1343156dc}.xml
@@ -0,0 +1,20 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<objects serializationModel="Studio.01.10.00">
3 <object class="AudioFile" id="{223fc849-8f5c-4825-96ab-eab1343156dc}">
4 <property name="assetPath">
5 <value>MenuValid01.wav</value>
6 </property>
7 <property name="frequencyInKHz">
8 <value>44.0999985</value>
9 </property>
10 <property name="channelCount">
11 <value>1</value>
12 </property>
13 <property name="length">
14 <value>0.24258503401360546</value>
15 </property>
16 <relationship name="masterAssetFolder">
17 <destination>{4c4e21c6-cc51-4a2c-b05e-fb67da4f7ed1}</destination>
18 </relationship>
19 </object>
20</objects>
diff --git a/res/fmod/Metadata/AudioFile/{3e43e5bc-3c70-4234-87c4-9767fa6d2499}.xml b/res/fmod/Metadata/AudioFile/{3e43e5bc-3c70-4234-87c4-9767fa6d2499}.xml new file mode 100644 index 0000000..c9d19d8 --- /dev/null +++ b/res/fmod/Metadata/AudioFile/{3e43e5bc-3c70-4234-87c4-9767fa6d2499}.xml
@@ -0,0 +1,20 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<objects serializationModel="Studio.01.10.00">
3 <object class="AudioFile" id="{3e43e5bc-3c70-4234-87c4-9767fa6d2499}">
4 <property name="assetPath">
5 <value>Jump01.wav</value>
6 </property>
7 <property name="frequencyInKHz">
8 <value>44.0999985</value>
9 </property>
10 <property name="channelCount">
11 <value>1</value>
12 </property>
13 <property name="length">
14 <value>0.21260770975056689</value>
15 </property>
16 <relationship name="masterAssetFolder">
17 <destination>{4c4e21c6-cc51-4a2c-b05e-fb67da4f7ed1}</destination>
18 </relationship>
19 </object>
20</objects>
diff --git a/res/fmod/Metadata/AudioFile/{5f809022-d9c3-4209-8dbf-dfb648b9f1c4}.xml b/res/fmod/Metadata/AudioFile/{5f809022-d9c3-4209-8dbf-dfb648b9f1c4}.xml new file mode 100644 index 0000000..7be2a55 --- /dev/null +++ b/res/fmod/Metadata/AudioFile/{5f809022-d9c3-4209-8dbf-dfb648b9f1c4}.xml
@@ -0,0 +1,20 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<objects serializationModel="Studio.01.10.00">
3 <object class="AudioFile" id="{5f809022-d9c3-4209-8dbf-dfb648b9f1c4}">
4 <property name="assetPath">
5 <value>MenuCursor01.wav</value>
6 </property>
7 <property name="frequencyInKHz">
8 <value>44.0999985</value>
9 </property>
10 <property name="channelCount">
11 <value>1</value>
12 </property>
13 <property name="length">
14 <value>0.12063492063492064</value>
15 </property>
16 <relationship name="masterAssetFolder">
17 <destination>{4c4e21c6-cc51-4a2c-b05e-fb67da4f7ed1}</destination>
18 </relationship>
19 </object>
20</objects>
diff --git a/res/fmod/Metadata/AudioFile/{6ada1ede-de39-422a-b62a-f46d14ae1868}.xml b/res/fmod/Metadata/AudioFile/{6ada1ede-de39-422a-b62a-f46d14ae1868}.xml new file mode 100644 index 0000000..7b53bec --- /dev/null +++ b/res/fmod/Metadata/AudioFile/{6ada1ede-de39-422a-b62a-f46d14ae1868}.xml
@@ -0,0 +1,20 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<objects serializationModel="Studio.01.10.00">
3 <object class="AudioFile" id="{6ada1ede-de39-422a-b62a-f46d14ae1868}">
4 <property name="assetPath">
5 <value>Jump02.wav</value>
6 </property>
7 <property name="frequencyInKHz">
8 <value>44.0999985</value>
9 </property>
10 <property name="channelCount">
11 <value>1</value>
12 </property>
13 <property name="length">
14 <value>0.24480725623582766</value>
15 </property>
16 <relationship name="masterAssetFolder">
17 <destination>{4c4e21c6-cc51-4a2c-b05e-fb67da4f7ed1}</destination>
18 </relationship>
19 </object>
20</objects>
diff --git a/res/fmod/Metadata/Event/{071a4502-d1f7-464c-a3fb-57a183c4cab4}.xml b/res/fmod/Metadata/Event/{071a4502-d1f7-464c-a3fb-57a183c4cab4}.xml new file mode 100644 index 0000000..5ed523b --- /dev/null +++ b/res/fmod/Metadata/Event/{071a4502-d1f7-464c-a3fb-57a183c4cab4}.xml
@@ -0,0 +1,128 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<objects serializationModel="Studio.01.10.00">
3 <object class="Event" id="{071a4502-d1f7-464c-a3fb-57a183c4cab4}">
4 <property name="name">
5 <value>menuselect</value>
6 </property>
7 <property name="outputFormat">
8 <value>0</value>
9 </property>
10 <relationship name="folder">
11 <destination>{b10a4c1b-72f0-4676-bbef-b450aaa46cb6}</destination>
12 </relationship>
13 <relationship name="mixer">
14 <destination>{6cc21ffd-1cc7-4fba-8b25-dc22d527bf45}</destination>
15 </relationship>
16 <relationship name="masterTrack">
17 <destination>{7df0f75b-07e3-48c0-9526-2749b20383da}</destination>
18 </relationship>
19 <relationship name="mixerInput">
20 <destination>{3b5fbaa2-de8d-498d-8836-0deee6f90a0a}</destination>
21 </relationship>
22 <relationship name="automatableProperties">
23 <destination>{7f798dbf-9d7d-4674-965e-a7c4808dd1fa}</destination>
24 </relationship>
25 <relationship name="markerTracks">
26 <destination>{3e120955-c4a9-478e-b784-01cba5d795af}</destination>
27 </relationship>
28 <relationship name="groupTracks">
29 <destination>{7e91b1fb-b466-40b4-bf1d-d9452b46dfc8}</destination>
30 </relationship>
31 <relationship name="timeline">
32 <destination>{8cff8eab-2c2e-4785-b92f-458b4a1e4bff}</destination>
33 </relationship>
34 <relationship name="banks">
35 <destination>{a23d2b1c-914e-48d4-8df9-80f6edad6c28}</destination>
36 </relationship>
37 </object>
38 <object class="EventMixer" id="{6cc21ffd-1cc7-4fba-8b25-dc22d527bf45}">
39 <relationship name="masterBus">
40 <destination>{67243c44-2abc-462e-987a-6b7a4dc27f60}</destination>
41 </relationship>
42 </object>
43 <object class="MasterTrack" id="{7df0f75b-07e3-48c0-9526-2749b20383da}">
44 <relationship name="mixerGroup">
45 <destination>{67243c44-2abc-462e-987a-6b7a4dc27f60}</destination>
46 </relationship>
47 </object>
48 <object class="MixerInput" id="{3b5fbaa2-de8d-498d-8836-0deee6f90a0a}">
49 <relationship name="effectChain">
50 <destination>{467ad434-80de-483a-a9d0-c2fa25032a8e}</destination>
51 </relationship>
52 <relationship name="panner">
53 <destination>{391753b5-2e2d-4eca-bd37-63113397e478}</destination>
54 </relationship>
55 <relationship name="output">
56 <destination>{a028aeaa-4166-48ea-881f-bb967c81e6f1}</destination>
57 </relationship>
58 </object>
59 <object class="EventAutomatableProperties" id="{7f798dbf-9d7d-4674-965e-a7c4808dd1fa}"/>
60 <object class="MarkerTrack" id="{3e120955-c4a9-478e-b784-01cba5d795af}"/>
61 <object class="GroupTrack" id="{7e91b1fb-b466-40b4-bf1d-d9452b46dfc8}">
62 <relationship name="modules">
63 <destination>{53bb2b11-3105-47b3-aa6e-1faa64319499}</destination>
64 </relationship>
65 <relationship name="mixerGroup">
66 <destination>{8f0fdc50-c37e-4cbd-b7e5-c28b36cf933d}</destination>
67 </relationship>
68 </object>
69 <object class="Timeline" id="{8cff8eab-2c2e-4785-b92f-458b4a1e4bff}">
70 <relationship name="modules">
71 <destination>{53bb2b11-3105-47b3-aa6e-1faa64319499}</destination>
72 </relationship>
73 </object>
74 <object class="EventMixerMaster" id="{67243c44-2abc-462e-987a-6b7a4dc27f60}">
75 <relationship name="effectChain">
76 <destination>{7281c837-7855-4c6a-884d-897653c130bd}</destination>
77 </relationship>
78 <relationship name="panner">
79 <destination>{46025233-27df-4800-aab1-be680116febc}</destination>
80 </relationship>
81 <relationship name="mixer">
82 <destination>{6cc21ffd-1cc7-4fba-8b25-dc22d527bf45}</destination>
83 </relationship>
84 </object>
85 <object class="MixerBusEffectChain" id="{467ad434-80de-483a-a9d0-c2fa25032a8e}">
86 <relationship name="effects">
87 <destination>{ed5431d0-defa-48d8-acf6-b297d9e30ac6}</destination>
88 </relationship>
89 </object>
90 <object class="MixerBusPanner" id="{391753b5-2e2d-4eca-bd37-63113397e478}"/>
91 <object class="SingleSound" id="{53bb2b11-3105-47b3-aa6e-1faa64319499}">
92 <property name="length">
93 <value>0.24258503401360546</value>
94 </property>
95 <relationship name="audioFile">
96 <destination>{223fc849-8f5c-4825-96ab-eab1343156dc}</destination>
97 </relationship>
98 </object>
99 <object class="EventMixerGroup" id="{8f0fdc50-c37e-4cbd-b7e5-c28b36cf933d}">
100 <property name="name">
101 <value>Audio 1</value>
102 </property>
103 <relationship name="effectChain">
104 <destination>{bc06958b-c6c7-4537-b4a0-9e2815e5e700}</destination>
105 </relationship>
106 <relationship name="panner">
107 <destination>{4a645903-54ae-4daf-b2c7-137a239890e7}</destination>
108 </relationship>
109 <relationship name="output">
110 <destination>{67243c44-2abc-462e-987a-6b7a4dc27f60}</destination>
111 </relationship>
112 </object>
113 <object class="MixerBusEffectChain" id="{7281c837-7855-4c6a-884d-897653c130bd}">
114 <relationship name="effects">
115 <destination>{7c18ed28-8396-442c-aae5-730a95c6af74}</destination>
116 </relationship>
117 </object>
118 <object class="MixerBusPanner" id="{46025233-27df-4800-aab1-be680116febc}"/>
119 <object class="MixerBusFader" id="{ed5431d0-defa-48d8-acf6-b297d9e30ac6}"/>
120 <object class="MixerBusEffectChain" id="{bc06958b-c6c7-4537-b4a0-9e2815e5e700}">
121 <relationship name="effects">
122 <destination>{a252672d-d5c2-439f-8a61-d109a56345bf}</destination>
123 </relationship>
124 </object>
125 <object class="MixerBusPanner" id="{4a645903-54ae-4daf-b2c7-137a239890e7}"/>
126 <object class="MixerBusFader" id="{7c18ed28-8396-442c-aae5-730a95c6af74}"/>
127 <object class="MixerBusFader" id="{a252672d-d5c2-439f-8a61-d109a56345bf}"/>
128</objects>
diff --git a/res/fmod/Metadata/Event/{5073fd94-9286-4fa1-87de-fee49c7ef309}.xml b/res/fmod/Metadata/Event/{5073fd94-9286-4fa1-87de-fee49c7ef309}.xml new file mode 100644 index 0000000..40b70ec --- /dev/null +++ b/res/fmod/Metadata/Event/{5073fd94-9286-4fa1-87de-fee49c7ef309}.xml
@@ -0,0 +1,128 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<objects serializationModel="Studio.01.10.00">
3 <object class="Event" id="{5073fd94-9286-4fa1-87de-fee49c7ef309}">
4 <property name="name">
5 <value>menucursor</value>
6 </property>
7 <property name="outputFormat">
8 <value>0</value>
9 </property>
10 <relationship name="folder">
11 <destination>{b10a4c1b-72f0-4676-bbef-b450aaa46cb6}</destination>
12 </relationship>
13 <relationship name="mixer">
14 <destination>{421d31e7-396d-4632-b69a-86a16d53acc1}</destination>
15 </relationship>
16 <relationship name="masterTrack">
17 <destination>{00de9fab-ae1a-4071-a0ba-3c9dd8a8a1e8}</destination>
18 </relationship>
19 <relationship name="mixerInput">
20 <destination>{7af27bd4-4588-4bb0-9bda-8ec8a5a13d82}</destination>
21 </relationship>
22 <relationship name="automatableProperties">
23 <destination>{18f21bef-57b4-43aa-a263-f83a8c0c3dab}</destination>
24 </relationship>
25 <relationship name="markerTracks">
26 <destination>{61e6ba1d-31af-4385-b4e8-023e06d11401}</destination>
27 </relationship>
28 <relationship name="groupTracks">
29 <destination>{c6841aa9-f288-44ae-8a47-c57680c856f8}</destination>
30 </relationship>
31 <relationship name="timeline">
32 <destination>{97841c1e-47f6-4ada-bfc9-c92c4919ece2}</destination>
33 </relationship>
34 <relationship name="banks">
35 <destination>{a23d2b1c-914e-48d4-8df9-80f6edad6c28}</destination>
36 </relationship>
37 </object>
38 <object class="EventMixer" id="{421d31e7-396d-4632-b69a-86a16d53acc1}">
39 <relationship name="masterBus">
40 <destination>{6fed7a7a-b346-4cfd-9aba-375538342920}</destination>
41 </relationship>
42 </object>
43 <object class="MasterTrack" id="{00de9fab-ae1a-4071-a0ba-3c9dd8a8a1e8}">
44 <relationship name="mixerGroup">
45 <destination>{6fed7a7a-b346-4cfd-9aba-375538342920}</destination>
46 </relationship>
47 </object>
48 <object class="MixerInput" id="{7af27bd4-4588-4bb0-9bda-8ec8a5a13d82}">
49 <relationship name="effectChain">
50 <destination>{28ce5d18-6ca1-4fc2-960a-529fc119e355}</destination>
51 </relationship>
52 <relationship name="panner">
53 <destination>{31e4157d-3386-4c0b-b9d5-dc14323979e9}</destination>
54 </relationship>
55 <relationship name="output">
56 <destination>{a028aeaa-4166-48ea-881f-bb967c81e6f1}</destination>
57 </relationship>
58 </object>
59 <object class="EventAutomatableProperties" id="{18f21bef-57b4-43aa-a263-f83a8c0c3dab}"/>
60 <object class="MarkerTrack" id="{61e6ba1d-31af-4385-b4e8-023e06d11401}"/>
61 <object class="GroupTrack" id="{c6841aa9-f288-44ae-8a47-c57680c856f8}">
62 <relationship name="modules">
63 <destination>{b115edd2-8123-4808-9b3b-15c52e92487a}</destination>
64 </relationship>
65 <relationship name="mixerGroup">
66 <destination>{7cb7e8f7-cf3f-40de-a22e-da0bfde92db9}</destination>
67 </relationship>
68 </object>
69 <object class="Timeline" id="{97841c1e-47f6-4ada-bfc9-c92c4919ece2}">
70 <relationship name="modules">
71 <destination>{b115edd2-8123-4808-9b3b-15c52e92487a}</destination>
72 </relationship>
73 </object>
74 <object class="EventMixerMaster" id="{6fed7a7a-b346-4cfd-9aba-375538342920}">
75 <relationship name="effectChain">
76 <destination>{738cb9ff-7057-40bd-91ce-5e276d59a2b6}</destination>
77 </relationship>
78 <relationship name="panner">
79 <destination>{2183e01c-f308-4b16-96fb-eb9adec3c7b1}</destination>
80 </relationship>
81 <relationship name="mixer">
82 <destination>{421d31e7-396d-4632-b69a-86a16d53acc1}</destination>
83 </relationship>
84 </object>
85 <object class="MixerBusEffectChain" id="{28ce5d18-6ca1-4fc2-960a-529fc119e355}">
86 <relationship name="effects">
87 <destination>{350925ce-e002-4afe-b90b-1de2378d3f35}</destination>
88 </relationship>
89 </object>
90 <object class="MixerBusPanner" id="{31e4157d-3386-4c0b-b9d5-dc14323979e9}"/>
91 <object class="SingleSound" id="{b115edd2-8123-4808-9b3b-15c52e92487a}">
92 <property name="length">
93 <value>0.12063492063492064</value>
94 </property>
95 <relationship name="audioFile">
96 <destination>{5f809022-d9c3-4209-8dbf-dfb648b9f1c4}</destination>
97 </relationship>
98 </object>
99 <object class="EventMixerGroup" id="{7cb7e8f7-cf3f-40de-a22e-da0bfde92db9}">
100 <property name="name">
101 <value>Audio 1</value>
102 </property>
103 <relationship name="effectChain">
104 <destination>{896752b5-9837-4dcd-be3d-ed2bfc2c6f59}</destination>
105 </relationship>
106 <relationship name="panner">
107 <destination>{e975f6e7-699a-463c-8de1-d8f7ace49749}</destination>
108 </relationship>
109 <relationship name="output">
110 <destination>{6fed7a7a-b346-4cfd-9aba-375538342920}</destination>
111 </relationship>
112 </object>
113 <object class="MixerBusEffectChain" id="{738cb9ff-7057-40bd-91ce-5e276d59a2b6}">
114 <relationship name="effects">
115 <destination>{31400021-665c-48cf-9f01-0efa8c006fe6}</destination>
116 </relationship>
117 </object>
118 <object class="MixerBusPanner" id="{2183e01c-f308-4b16-96fb-eb9adec3c7b1}"/>
119 <object class="MixerBusFader" id="{350925ce-e002-4afe-b90b-1de2378d3f35}"/>
120 <object class="MixerBusEffectChain" id="{896752b5-9837-4dcd-be3d-ed2bfc2c6f59}">
121 <relationship name="effects">
122 <destination>{cb9a9e93-2d8a-4f9b-a145-b8e28ca5aaeb}</destination>
123 </relationship>
124 </object>
125 <object class="MixerBusPanner" id="{e975f6e7-699a-463c-8de1-d8f7ace49749}"/>
126 <object class="MixerBusFader" id="{31400021-665c-48cf-9f01-0efa8c006fe6}"/>
127 <object class="MixerBusFader" id="{cb9a9e93-2d8a-4f9b-a145-b8e28ca5aaeb}"/>
128</objects>
diff --git a/res/fmod/Metadata/Event/{c18dc3c5-456c-42a6-ae23-cfd1b5f22fd8}.xml b/res/fmod/Metadata/Event/{c18dc3c5-456c-42a6-ae23-cfd1b5f22fd8}.xml new file mode 100644 index 0000000..c934a6e --- /dev/null +++ b/res/fmod/Metadata/Event/{c18dc3c5-456c-42a6-ae23-cfd1b5f22fd8}.xml
@@ -0,0 +1,128 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<objects serializationModel="Studio.01.10.00">
3 <object class="Event" id="{c18dc3c5-456c-42a6-ae23-cfd1b5f22fd8}">
4 <property name="name">
5 <value>closemenu</value>
6 </property>
7 <property name="outputFormat">
8 <value>0</value>
9 </property>
10 <relationship name="folder">
11 <destination>{b10a4c1b-72f0-4676-bbef-b450aaa46cb6}</destination>
12 </relationship>
13 <relationship name="mixer">
14 <destination>{1e4a6906-6e14-4727-a4f0-9067ffde0927}</destination>
15 </relationship>
16 <relationship name="masterTrack">
17 <destination>{49f21566-c529-493b-86d7-377c39683fae}</destination>
18 </relationship>
19 <relationship name="mixerInput">
20 <destination>{dd5c7b9d-f25e-451a-8a06-b601d57e0a38}</destination>
21 </relationship>
22 <relationship name="automatableProperties">
23 <destination>{3553fbf8-0f0a-4ca6-bfba-77c9a7ab8a68}</destination>
24 </relationship>
25 <relationship name="markerTracks">
26 <destination>{d713641e-63f6-4fb7-a010-61b8a7a7d868}</destination>
27 </relationship>
28 <relationship name="groupTracks">
29 <destination>{8899c655-b89a-48d9-88ca-1bb879cf23a1}</destination>
30 </relationship>
31 <relationship name="timeline">
32 <destination>{7ea9470c-55bc-4ae5-ae64-f0ac6c761a8f}</destination>
33 </relationship>
34 <relationship name="banks">
35 <destination>{a23d2b1c-914e-48d4-8df9-80f6edad6c28}</destination>
36 </relationship>
37 </object>
38 <object class="EventMixer" id="{1e4a6906-6e14-4727-a4f0-9067ffde0927}">
39 <relationship name="masterBus">
40 <destination>{0d2a061b-3e5e-471b-acc3-af3b5857a9e5}</destination>
41 </relationship>
42 </object>
43 <object class="MasterTrack" id="{49f21566-c529-493b-86d7-377c39683fae}">
44 <relationship name="mixerGroup">
45 <destination>{0d2a061b-3e5e-471b-acc3-af3b5857a9e5}</destination>
46 </relationship>
47 </object>
48 <object class="MixerInput" id="{dd5c7b9d-f25e-451a-8a06-b601d57e0a38}">
49 <relationship name="effectChain">
50 <destination>{aa21513a-88e3-4bf2-be50-274ec99beeb2}</destination>
51 </relationship>
52 <relationship name="panner">
53 <destination>{8fbdb1af-f78c-43f0-8d25-c1d4011f1dbb}</destination>
54 </relationship>
55 <relationship name="output">
56 <destination>{a028aeaa-4166-48ea-881f-bb967c81e6f1}</destination>
57 </relationship>
58 </object>
59 <object class="EventAutomatableProperties" id="{3553fbf8-0f0a-4ca6-bfba-77c9a7ab8a68}"/>
60 <object class="MarkerTrack" id="{d713641e-63f6-4fb7-a010-61b8a7a7d868}"/>
61 <object class="GroupTrack" id="{8899c655-b89a-48d9-88ca-1bb879cf23a1}">
62 <relationship name="modules">
63 <destination>{e3066025-fe5d-4921-9797-8eb3e71ad669}</destination>
64 </relationship>
65 <relationship name="mixerGroup">
66 <destination>{af1977d5-3653-437c-a168-bc604872d523}</destination>
67 </relationship>
68 </object>
69 <object class="Timeline" id="{7ea9470c-55bc-4ae5-ae64-f0ac6c761a8f}">
70 <relationship name="modules">
71 <destination>{e3066025-fe5d-4921-9797-8eb3e71ad669}</destination>
72 </relationship>
73 </object>
74 <object class="EventMixerMaster" id="{0d2a061b-3e5e-471b-acc3-af3b5857a9e5}">
75 <relationship name="effectChain">
76 <destination>{3b190cad-1fe4-44b3-8e24-5e5a982501cd}</destination>
77 </relationship>
78 <relationship name="panner">
79 <destination>{777fe7cc-628a-4c48-b5f0-5abc306db8d1}</destination>
80 </relationship>
81 <relationship name="mixer">
82 <destination>{1e4a6906-6e14-4727-a4f0-9067ffde0927}</destination>
83 </relationship>
84 </object>
85 <object class="MixerBusEffectChain" id="{aa21513a-88e3-4bf2-be50-274ec99beeb2}">
86 <relationship name="effects">
87 <destination>{557b5a12-c5d7-47c8-85ca-af36564599eb}</destination>
88 </relationship>
89 </object>
90 <object class="MixerBusPanner" id="{8fbdb1af-f78c-43f0-8d25-c1d4011f1dbb}"/>
91 <object class="SingleSound" id="{e3066025-fe5d-4921-9797-8eb3e71ad669}">
92 <property name="length">
93 <value>0.24480725623582766</value>
94 </property>
95 <relationship name="audioFile">
96 <destination>{6ada1ede-de39-422a-b62a-f46d14ae1868}</destination>
97 </relationship>
98 </object>
99 <object class="EventMixerGroup" id="{af1977d5-3653-437c-a168-bc604872d523}">
100 <property name="name">
101 <value>Audio 1</value>
102 </property>
103 <relationship name="effectChain">
104 <destination>{a32eda5f-c555-47fb-a1d5-4f26384f0726}</destination>
105 </relationship>
106 <relationship name="panner">
107 <destination>{4243319e-568c-417a-b28c-eccbbce1988d}</destination>
108 </relationship>
109 <relationship name="output">
110 <destination>{0d2a061b-3e5e-471b-acc3-af3b5857a9e5}</destination>
111 </relationship>
112 </object>
113 <object class="MixerBusEffectChain" id="{3b190cad-1fe4-44b3-8e24-5e5a982501cd}">
114 <relationship name="effects">
115 <destination>{0235c01a-09bd-4cfb-ae68-3bf1e7a1dcc5}</destination>
116 </relationship>
117 </object>
118 <object class="MixerBusPanner" id="{777fe7cc-628a-4c48-b5f0-5abc306db8d1}"/>
119 <object class="MixerBusFader" id="{557b5a12-c5d7-47c8-85ca-af36564599eb}"/>
120 <object class="MixerBusEffectChain" id="{a32eda5f-c555-47fb-a1d5-4f26384f0726}">
121 <relationship name="effects">
122 <destination>{9ab07a58-67bf-4842-bada-47ae28c93e65}</destination>
123 </relationship>
124 </object>
125 <object class="MixerBusPanner" id="{4243319e-568c-417a-b28c-eccbbce1988d}"/>
126 <object class="MixerBusFader" id="{0235c01a-09bd-4cfb-ae68-3bf1e7a1dcc5}"/>
127 <object class="MixerBusFader" id="{9ab07a58-67bf-4842-bada-47ae28c93e65}"/>
128</objects>
diff --git a/res/fmod/Metadata/Event/{fea336e4-2204-45a2-9ee0-af4cb70b4f27}.xml b/res/fmod/Metadata/Event/{fea336e4-2204-45a2-9ee0-af4cb70b4f27}.xml new file mode 100644 index 0000000..fc045f9 --- /dev/null +++ b/res/fmod/Metadata/Event/{fea336e4-2204-45a2-9ee0-af4cb70b4f27}.xml
@@ -0,0 +1,128 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<objects serializationModel="Studio.01.10.00">
3 <object class="Event" id="{fea336e4-2204-45a2-9ee0-af4cb70b4f27}">
4 <property name="name">
5 <value>openmenu</value>
6 </property>
7 <property name="outputFormat">
8 <value>0</value>
9 </property>
10 <relationship name="folder">
11 <destination>{b10a4c1b-72f0-4676-bbef-b450aaa46cb6}</destination>
12 </relationship>
13 <relationship name="mixer">
14 <destination>{9f3f5bfb-9650-4579-b4b8-0ee6e9e4ca7f}</destination>
15 </relationship>
16 <relationship name="masterTrack">
17 <destination>{220ab1d3-7e25-4714-8dce-6b4f48822c2f}</destination>
18 </relationship>
19 <relationship name="mixerInput">
20 <destination>{b0f5fa87-790e-43cd-b0d6-30bc9b025ae5}</destination>
21 </relationship>
22 <relationship name="automatableProperties">
23 <destination>{d0e3ae2c-5c7c-4f4c-bbbc-d9235ffa8a8c}</destination>
24 </relationship>
25 <relationship name="markerTracks">
26 <destination>{d4d04dfd-a20c-4ce0-b81f-55411cc6ba8f}</destination>
27 </relationship>
28 <relationship name="groupTracks">
29 <destination>{21a0b61a-8256-4ff8-bf47-9d8b438f0bb9}</destination>
30 </relationship>
31 <relationship name="timeline">
32 <destination>{8d77dd4e-88a6-4f40-a4da-0ff9b399d764}</destination>
33 </relationship>
34 <relationship name="banks">
35 <destination>{a23d2b1c-914e-48d4-8df9-80f6edad6c28}</destination>
36 </relationship>
37 </object>
38 <object class="EventMixer" id="{9f3f5bfb-9650-4579-b4b8-0ee6e9e4ca7f}">
39 <relationship name="masterBus">
40 <destination>{a4878bca-1f26-4f04-a1a7-efce8de54795}</destination>
41 </relationship>
42 </object>
43 <object class="MasterTrack" id="{220ab1d3-7e25-4714-8dce-6b4f48822c2f}">
44 <relationship name="mixerGroup">
45 <destination>{a4878bca-1f26-4f04-a1a7-efce8de54795}</destination>
46 </relationship>
47 </object>
48 <object class="MixerInput" id="{b0f5fa87-790e-43cd-b0d6-30bc9b025ae5}">
49 <relationship name="effectChain">
50 <destination>{c384d94c-b6a0-43bb-916d-590bb50bacc2}</destination>
51 </relationship>
52 <relationship name="panner">
53 <destination>{aa76d6d2-be9b-400c-9fac-0d0d99713186}</destination>
54 </relationship>
55 <relationship name="output">
56 <destination>{a028aeaa-4166-48ea-881f-bb967c81e6f1}</destination>
57 </relationship>
58 </object>
59 <object class="EventAutomatableProperties" id="{d0e3ae2c-5c7c-4f4c-bbbc-d9235ffa8a8c}"/>
60 <object class="MarkerTrack" id="{d4d04dfd-a20c-4ce0-b81f-55411cc6ba8f}"/>
61 <object class="GroupTrack" id="{21a0b61a-8256-4ff8-bf47-9d8b438f0bb9}">
62 <relationship name="modules">
63 <destination>{c58d6fbf-0455-439c-af4e-a15abfc5435f}</destination>
64 </relationship>
65 <relationship name="mixerGroup">
66 <destination>{c8122b59-45a7-4756-94f6-625ed9e16820}</destination>
67 </relationship>
68 </object>
69 <object class="Timeline" id="{8d77dd4e-88a6-4f40-a4da-0ff9b399d764}">
70 <relationship name="modules">
71 <destination>{c58d6fbf-0455-439c-af4e-a15abfc5435f}</destination>
72 </relationship>
73 </object>
74 <object class="EventMixerMaster" id="{a4878bca-1f26-4f04-a1a7-efce8de54795}">
75 <relationship name="effectChain">
76 <destination>{4563e900-85b8-4646-818e-e1a495113068}</destination>
77 </relationship>
78 <relationship name="panner">
79 <destination>{98797e74-c137-480a-b038-f9a1c8285bd7}</destination>
80 </relationship>
81 <relationship name="mixer">
82 <destination>{9f3f5bfb-9650-4579-b4b8-0ee6e9e4ca7f}</destination>
83 </relationship>
84 </object>
85 <object class="MixerBusEffectChain" id="{c384d94c-b6a0-43bb-916d-590bb50bacc2}">
86 <relationship name="effects">
87 <destination>{72fe2bc3-a853-4fa0-bccb-f792e1f42949}</destination>
88 </relationship>
89 </object>
90 <object class="MixerBusPanner" id="{aa76d6d2-be9b-400c-9fac-0d0d99713186}"/>
91 <object class="SingleSound" id="{c58d6fbf-0455-439c-af4e-a15abfc5435f}">
92 <property name="length">
93 <value>0.21260770975056689</value>
94 </property>
95 <relationship name="audioFile">
96 <destination>{3e43e5bc-3c70-4234-87c4-9767fa6d2499}</destination>
97 </relationship>
98 </object>
99 <object class="EventMixerGroup" id="{c8122b59-45a7-4756-94f6-625ed9e16820}">
100 <property name="name">
101 <value>Audio 1</value>
102 </property>
103 <relationship name="effectChain">
104 <destination>{b24c9fb1-b17a-4bd3-868b-32862e8eabec}</destination>
105 </relationship>
106 <relationship name="panner">
107 <destination>{81a22f13-b8af-4980-b16b-566fcc07d513}</destination>
108 </relationship>
109 <relationship name="output">
110 <destination>{a4878bca-1f26-4f04-a1a7-efce8de54795}</destination>
111 </relationship>
112 </object>
113 <object class="MixerBusEffectChain" id="{4563e900-85b8-4646-818e-e1a495113068}">
114 <relationship name="effects">
115 <destination>{b5af2eea-dd50-4603-95fa-d47f29935355}</destination>
116 </relationship>
117 </object>
118 <object class="MixerBusPanner" id="{98797e74-c137-480a-b038-f9a1c8285bd7}"/>
119 <object class="MixerBusFader" id="{72fe2bc3-a853-4fa0-bccb-f792e1f42949}"/>
120 <object class="MixerBusEffectChain" id="{b24c9fb1-b17a-4bd3-868b-32862e8eabec}">
121 <relationship name="effects">
122 <destination>{c22cf442-67f9-4ee3-b0d7-ebbb485c6934}</destination>
123 </relationship>
124 </object>
125 <object class="MixerBusPanner" id="{81a22f13-b8af-4980-b16b-566fcc07d513}"/>
126 <object class="MixerBusFader" id="{b5af2eea-dd50-4603-95fa-d47f29935355}"/>
127 <object class="MixerBusFader" id="{c22cf442-67f9-4ee3-b0d7-ebbb485c6934}"/>
128</objects>
diff --git a/res/menu.png b/res/menu.png new file mode 100644 index 0000000..4b6a7b9 --- /dev/null +++ b/res/menu.png
Binary files differ
diff --git a/res/menu.psd b/res/menu.psd new file mode 100644 index 0000000..0f588e8 --- /dev/null +++ b/res/menu.psd
Binary files differ
diff --git a/src/consts.h b/src/consts.h index ecb2306..4c69a58 100644 --- a/src/consts.h +++ b/src/consts.h
@@ -15,5 +15,7 @@ constexpr int NUM_TITLES = 1;
15constexpr int MESSAGE_MARGIN = 64; 15constexpr int MESSAGE_MARGIN = 64;
16constexpr int MESSAGE_TEXT_WIDTH = GAME_WIDTH - MESSAGE_MARGIN * 2; 16constexpr int MESSAGE_TEXT_WIDTH = GAME_WIDTH - MESSAGE_MARGIN * 2;
17constexpr int CHARS_PER_BEEP = 8; 17constexpr int CHARS_PER_BEEP = 8;
18constexpr int MENU_PADDING = 40;
19constexpr int MENU_BORDER = 2;
18 20
19#endif /* end of include guard: CONSTS_H_152EBF56 */ 21#endif /* end of include guard: CONSTS_H_152EBF56 */
diff --git a/src/game.cpp b/src/game.cpp index f8508c2..501722d 100644 --- a/src/game.cpp +++ b/src/game.cpp
@@ -12,6 +12,7 @@
12Game::Game(std::mt19937& rng, Muxer& muxer, Renderer& renderer) : 12Game::Game(std::mt19937& rng, Muxer& muxer, Renderer& renderer) :
13 rng(rng), 13 rng(rng),
14 muxer(muxer), 14 muxer(muxer),
15 renderer(renderer),
15 sign(renderer.getFont()) 16 sign(renderer.getFont())
16{ 17{
17 losePopLampTimer.accumulate(losePopLampTimer.getDt()); 18 losePopLampTimer.accumulate(losePopLampTimer.getDt());
@@ -740,13 +741,7 @@ void Game::updatePlaying(size_t frameTime) {
740 { 741 {
741 if (e.type == SDL_QUIT) 742 if (e.type == SDL_QUIT)
742 { 743 {
743 if (losing != LoseState::None) 744 quit = true;
744 {
745 quit = true;
746 } else {
747 losing = LoseState::PoppingLamps;
748 muxer.stopMusic();
749 }
750 } else if (e.type == SDL_KEYDOWN) 745 } else if (e.type == SDL_KEYDOWN)
751 { 746 {
752 switch (e.key.keysym.sym) 747 switch (e.key.keysym.sym)
@@ -755,10 +750,13 @@ void Game::updatePlaying(size_t frameTime) {
755 { 750 {
756 if (losing != LoseState::None) 751 if (losing != LoseState::None)
757 { 752 {
758 quit = true; 753 if (quitting) {
754 quit = true;
755 } else {
756 losing = LoseState::Done;
757 }
759 } else { 758 } else {
760 losing = LoseState::PoppingLamps; 759 menu.open(*this);
761 muxer.stopMusic();
762 } 760 }
763 761
764 break; 762 break;
@@ -922,11 +920,21 @@ void Game::updatePlaying(size_t frameTime) {
922 { 920 {
923 if (numDust == 0) 921 if (numDust == 0)
924 { 922 {
925 quit = true; 923 if (quitting) {
924 quit = true;
925 } else {
926 losing = LoseState::Done;
927 }
926 } 928 }
927 929
928 break; 930 break;
929 } 931 }
932
933 case LoseState::Done:
934 {
935 // Do nothing.
936 break;
937 }
930 } 938 }
931 939
932 switch (signInstructionState) { 940 switch (signInstructionState) {
@@ -1035,7 +1043,9 @@ void Game::updatePlaying(size_t frameTime) {
1035} 1043}
1036 1044
1037void Game::update(size_t frameTime) { 1045void Game::update(size_t frameTime) {
1038 if (sign.signDisplayState != SignInstructionState::Hidden) { 1046 if (menu.menuState != MenuState::Closed) {
1047 menu.update(frameTime, *this);
1048 } else if (sign.signDisplayState != SignInstructionState::Hidden) {
1039 sign.update(frameTime, *this); 1049 sign.update(frameTime, *this);
1040 } else { 1050 } else {
1041 updatePlaying(frameTime); 1051 updatePlaying(frameTime);
diff --git a/src/game.h b/src/game.h index 5f13672..839be67 100644 --- a/src/game.h +++ b/src/game.h
@@ -12,6 +12,7 @@
12#include "interpolation.h" 12#include "interpolation.h"
13#include "consts.h" 13#include "consts.h"
14#include "sign.h" 14#include "sign.h"
15#include "menu.h"
15 16
16class Renderer; 17class Renderer;
17 18
@@ -23,7 +24,8 @@ enum class LoseState {
23 None, 24 None,
24 PoppingLamps, 25 PoppingLamps,
25 PoppingPlayer, 26 PoppingPlayer,
26 Outro 27 Outro,
28 Done
27}; 29};
28 30
29struct Input { 31struct Input {
@@ -60,8 +62,10 @@ public:
60 62
61 std::mt19937& rng; 63 std::mt19937& rng;
62 Muxer& muxer; 64 Muxer& muxer;
65 Renderer& renderer;
63 66
64 bool quit = false; 67 bool quit = false;
68 bool quitting = false; // <- whether we will quit after losing, vs starting a new game
65 LoseState losing = LoseState::None; 69 LoseState losing = LoseState::None;
66 70
67 Map map; 71 Map map;
@@ -110,6 +114,8 @@ public:
110 Interpolation signFade; 114 Interpolation signFade;
111 Sign sign; 115 Sign sign;
112 116
117 Menu menu;
118
113private: 119private:
114 120
115 void tickDirty(bool onlyDark); 121 void tickDirty(bool onlyDark);
diff --git a/src/main.cpp b/src/main.cpp index 2bd8f3c..ae64079 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -1,6 +1,7 @@
1#include <vector> 1#include <vector>
2#include <fov.h> 2#include <fov.h>
3#include <iostream> 3#include <iostream>
4#include <memory>
4#include "util.h" 5#include "util.h"
5#include "game.h" 6#include "game.h"
6#include "renderer.h" 7#include "renderer.h"
@@ -21,7 +22,7 @@ int main(int, char**)
21 Renderer renderer; 22 Renderer renderer;
22 Muxer muxer; 23 Muxer muxer;
23 24
24 Game game(rng, muxer, renderer); 25 std::unique_ptr<Game> game = std::make_unique<Game>(rng, muxer, renderer);
25 26
26 constexpr int titleFadeLen = 2000; 27 constexpr int titleFadeLen = 2000;
27 bool doneTitles = false; 28 bool doneTitles = false;
@@ -32,22 +33,26 @@ int main(int, char**)
32 titleFade.start(titleFadeLen); 33 titleFade.start(titleFadeLen);
33 34
34 size_t lastTime = SDL_GetTicks(); 35 size_t lastTime = SDL_GetTicks();
35 while (!game.quit) 36 while (!game->quit)
36 { 37 {
37 size_t currentTime = SDL_GetTicks(); 38 size_t currentTime = SDL_GetTicks();
38 size_t frameTime = currentTime - lastTime; 39 size_t frameTime = currentTime - lastTime;
39 lastTime = currentTime; 40 lastTime = currentTime;
40 41
41 if (doneTitles) { 42 if (doneTitles) {
42 game.update(frameTime); 43 game->update(frameTime);
43 renderer.renderGame(game, true); 44 renderer.renderGame(*game, true);
44 muxer.update(); 45 muxer.update();
46
47 if (game->losing == LoseState::Done) {
48 game = std::make_unique<Game>(rng, muxer, renderer);
49 }
45 } else { 50 } else {
46 SDL_Event e; 51 SDL_Event e;
47 52
48 while (SDL_PollEvent(&e)) { 53 while (SDL_PollEvent(&e)) {
49 if (e.type == SDL_QUIT) { 54 if (e.type == SDL_QUIT) {
50 game.quit = true; 55 game->quit = true;
51 } 56 }
52 } 57 }
53 58
diff --git a/src/menu.cpp b/src/menu.cpp new file mode 100644 index 0000000..b9a3ace --- /dev/null +++ b/src/menu.cpp
@@ -0,0 +1,109 @@
1#include "menu.h"
2#include "game.h"
3#include "renderer.h"
4
5Menu::Menu() {
6 items.push_back({.text = "New Game", .activationFunction = [this] (Game& game) {
7 close();
8 game.losing = LoseState::PoppingLamps;
9 game.muxer.stopMusic();
10 }});
11 items.push_back({.text = "Toggle Fullscreen", .activationFunction = [] (Game& game) {
12 game.renderer.toggleFullscreen();
13 }});
14 items.push_back({.text = "Quit", .activationFunction = [this] (Game& game) {
15 close();
16 game.losing = LoseState::PoppingLamps;
17 game.quitting = true;
18 game.muxer.stopMusic();
19 }});
20}
21
22void Menu::open(Game& game) {
23 menuState = MenuState::Opening;
24 menuDisplayProgress.start(200);
25 game.muxer.playSound("openmenu");
26}
27
28void Menu::close() {
29 menuState = MenuState::Closing;
30 menuDisplayProgress.start(200);
31}
32
33void Menu::update(size_t dt, Game& game) {
34 if (menuState != MenuState::Open) {
35 SDL_Event e;
36
37 while (SDL_PollEvent(&e)) {
38 if (e.type == SDL_QUIT) {
39 game.quit = true;
40 }
41 }
42 }
43
44 switch (menuState) {
45 case MenuState::Closed: {
46 // Shouldn't happen.
47 break;
48 }
49 case MenuState::Opening: {
50 menuDisplayProgress.tick(dt);
51 if (menuDisplayProgress.isComplete()) {
52 menuState = MenuState::Open;
53 }
54
55 break;
56 }
57 case MenuState::Closing: {
58 menuDisplayProgress.tick(dt);
59 if (menuDisplayProgress.isComplete()) {
60 menuState = MenuState::Closed;
61 }
62
63 break;
64 }
65 case MenuState::Open: {
66 SDL_Event e;
67
68 while (SDL_PollEvent(&e)) {
69 if (e.type == SDL_QUIT) {
70 game.quit = true;
71 } else if (e.type == SDL_KEYDOWN) {
72 switch (e.key.keysym.sym)
73 {
74 case SDLK_ESCAPE: {
75 close();
76 game.muxer.playSound("closemenu");
77 break;
78 }
79 case SDLK_SPACE: {
80 items[cursor].activationFunction(game);
81 game.muxer.playSound("menuselect");
82 break;
83 }
84 case SDLK_UP:
85 case SDLK_w: {
86 cursor--;
87 if (cursor < 0) {
88 cursor = items.size() - 1;
89 }
90 game.muxer.playSound("menucursor");
91 break;
92 }
93 case SDLK_DOWN:
94 case SDLK_s: {
95 cursor++;
96 if (cursor >= items.size()) {
97 cursor = 0;
98 }
99 game.muxer.playSound("menucursor");
100 break;
101 }
102 }
103 }
104 }
105
106 break;
107 }
108 }
109}
diff --git a/src/menu.h b/src/menu.h new file mode 100644 index 0000000..ac72999 --- /dev/null +++ b/src/menu.h
@@ -0,0 +1,42 @@
1#ifndef MENU_H_61DBBF6A
2#define MENU_H_61DBBF6A
3
4#include <string>
5#include <functional>
6#include <vector>
7#include "interpolation.h"
8
9class Game;
10
11enum class MenuState {
12 Closed,
13 Opening,
14 Open,
15 Closing
16};
17
18struct MenuItem {
19 std::string text;
20 std::function<void(Game&)> activationFunction;
21};
22
23class Menu {
24public:
25
26 Menu();
27
28 void update(size_t dt, Game& game);
29
30 void open(Game& game);
31
32 MenuState menuState = MenuState::Closed;
33 Interpolation menuDisplayProgress;
34 std::vector<MenuItem> items;
35 int cursor = 0;
36
37private:
38
39 void close();
40};
41
42#endif /* end of include guard: MENU_H_61DBBF6A */
diff --git a/src/renderer.cpp b/src/renderer.cpp index b90372e..1aa5cbf 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp
@@ -16,8 +16,6 @@ Renderer::Renderer()
16 GAME_HEIGHT, 16 GAME_HEIGHT,
17 SDL_WINDOW_SHOWN)); 17 SDL_WINDOW_SHOWN));
18 18
19 //SDL_SetWindowFullscreen(win_.get(), SDL_WINDOW_FULLSCREEN_DESKTOP);
20
21 if (!win_) 19 if (!win_)
22 { 20 {
23 throw sdl_error(); 21 throw sdl_error();
@@ -111,6 +109,7 @@ Renderer::Renderer()
111 loadTextureFromFile("../res/runninbloods.png", tileset_); 109 loadTextureFromFile("../res/runninbloods.png", tileset_);
112 loadTextureFromFile("../res/lamp.png", lamp_); 110 loadTextureFromFile("../res/lamp.png", lamp_);
113 loadTextureFromFile("../res/read_instruction.png", readInstruction_); 111 loadTextureFromFile("../res/read_instruction.png", readInstruction_);
112 loadTextureFromFile("../res/menu.png", menuBg_);
114 113
115 loadTextureFromFile("../res/title0.png", titles_[0]); 114 loadTextureFromFile("../res/title0.png", titles_[0]);
116 SDL_QueryTexture(titles_[0].get(), nullptr, nullptr, &titleWidths_[0], &titleHeights_[0]); 115 SDL_QueryTexture(titles_[0].get(), nullptr, nullptr, &titleWidths_[0], &titleHeights_[0]);
@@ -394,6 +393,20 @@ void Renderer::renderGame(
394 393
395 SDL_RenderCopy(ren_.get(), canvas.get(), &zoomRect, nullptr); 394 SDL_RenderCopy(ren_.get(), canvas.get(), &zoomRect, nullptr);
396 395
396 texture_ptr overlays(
397 SDL_CreateTexture(
398 ren_.get(),
399 SDL_PIXELFORMAT_RGBA8888,
400 SDL_TEXTUREACCESS_TARGET,
401 GAME_WIDTH,
402 GAME_HEIGHT));
403
404 SDL_SetTextureBlendMode(overlays.get(), SDL_BLENDMODE_BLEND);
405 SDL_SetRenderTarget(ren_.get(), overlays.get());
406 SDL_SetRenderDrawBlendMode(ren_.get(), SDL_BLENDMODE_BLEND);
407 SDL_SetRenderDrawColor(ren_.get(), 0, 0, 0, 0);
408 SDL_RenderClear(ren_.get());
409
397 if (game.signInstructionState != SignInstructionState::Hidden) { 410 if (game.signInstructionState != SignInstructionState::Hidden) {
398 int instOpacity = 255; 411 int instOpacity = 255;
399 if (game.signInstructionState == SignInstructionState::FadingIn) { 412 if (game.signInstructionState == SignInstructionState::FadingIn) {
@@ -444,7 +457,7 @@ void Renderer::renderGame(
444 srcRect.w, 457 srcRect.w,
445 srcRect.h }; 458 srcRect.h };
446 459
447 SDL_SetRenderTarget(ren_.get(), nullptr); 460 SDL_SetRenderTarget(ren_.get(), overlays.get());
448 SDL_RenderCopy(ren_.get(), messageLines_[lineIndex].renderedTex.get(), &srcRect, &destRect); 461 SDL_RenderCopy(ren_.get(), messageLines_[lineIndex].renderedTex.get(), &srcRect, &destRect);
449 //std::cout << line.charsRevealed << " (" << messageLines_[lineIndex].charIndexToWidth[line.charsRevealed] << "): " << messageLines_[lineIndex].line.substr(0,line.charsRevealed) << std::endl; 462 //std::cout << line.charsRevealed << " (" << messageLines_[lineIndex].charIndexToWidth[line.charsRevealed] << "): " << messageLines_[lineIndex].line.substr(0,line.charsRevealed) << std::endl;
450 } 463 }
@@ -455,6 +468,34 @@ void Renderer::renderGame(
455 } 468 }
456 } 469 }
457 470
471 if (game.menu.menuState != MenuState::Closed) {
472 if (!menu_ || menuSelected_ != game.menu.cursor) {
473 renderMenu(game);
474 }
475
476 SDL_Rect rect {
477 0, 0, GAME_WIDTH, GAME_HEIGHT
478 };
479
480 int opacity = 128;
481 if (game.menu.menuState == MenuState::Opening) {
482 opacity = game.menu.menuDisplayProgress.getProgress(0, 128);
483 rect.y = game.menu.menuDisplayProgress.getProgress(-GAME_HEIGHT, 0);
484 } else if (game.menu.menuState == MenuState::Closing) {
485 opacity = game.menu.menuDisplayProgress.getProgress(128, 0);
486 rect.y = game.menu.menuDisplayProgress.getProgress(0, -GAME_HEIGHT);
487 }
488
489 SDL_SetRenderTarget(ren_.get(), overlays.get());
490 SDL_SetRenderDrawBlendMode(ren_.get(), SDL_BLENDMODE_BLEND);
491 SDL_SetRenderDrawColor(ren_.get(), 0, 0, 0, opacity);
492 SDL_RenderFillRect(ren_.get(), nullptr);
493
494 SDL_RenderCopy(ren_.get(), menu_.get(), nullptr, &rect);
495 }
496
497 SDL_SetRenderTarget(ren_.get(), nullptr);
498 SDL_RenderCopy(ren_.get(), overlays.get(), nullptr, nullptr);
458 SDL_RenderPresent(ren_.get()); 499 SDL_RenderPresent(ren_.get());
459} 500}
460 501
@@ -550,3 +591,89 @@ void Renderer::renderMessageLine(MessageCache& line, const std::string& text, co
550 SDL_RenderCopy(ren_.get(), lineTex.get(), nullptr, &rect); 591 SDL_RenderCopy(ren_.get(), lineTex.get(), nullptr, &rect);
551} 592}
552 593
594void Renderer::renderMenu(const Game& game) {
595 int maxTextWidth = 0;
596 for (const MenuItem& item : game.menu.items) {
597 int width = 0;
598 TTF_SizeText(font_.get(), item.text.c_str(), &width, nullptr);
599 if (width > maxTextWidth) {
600 maxTextWidth = width;
601 }
602 }
603
604 menuWidth_ = maxTextWidth + MENU_PADDING * 2;
605 menuHeight_ = (TTF_FontHeight(font_.get()) + 1) * game.menu.items.size() - 1 + MENU_PADDING * 2;
606
607 menu_.reset(SDL_CreateTexture(
608 ren_.get(),
609 SDL_PIXELFORMAT_RGBA8888,
610 SDL_TEXTUREACCESS_TARGET,
611 GAME_WIDTH,
612 GAME_HEIGHT));
613
614 SDL_SetRenderTarget(ren_.get(), menu_.get());
615 SDL_SetTextureBlendMode(menu_.get(), SDL_BLENDMODE_BLEND);
616 SDL_SetRenderDrawBlendMode(ren_.get(), SDL_BLENDMODE_BLEND);
617 SDL_SetRenderDrawColor(ren_.get(), 0, 0, 0, 0);
618 SDL_RenderClear(ren_.get());
619
620 SDL_Color bgColor {.r = 55, .g = 55, .b = 87, .a = 255};
621 SDL_Color fgColor {.r = 146, .g = 146, .b = 146, .a = 255};
622 SDL_Color selectedColor {.r = 255, .g = 255, .b = 255, .a = 255};
623
624 /*{
625 SDL_Rect drawRect {
626 (GAME_WIDTH - menuWidth_) / 2 - MENU_BORDER,
627 (GAME_HEIGHT - menuHeight_) / 2 - MENU_BORDER,
628 menuWidth_ + MENU_BORDER * 2,
629 menuHeight_ + MENU_BORDER * 2
630 };
631
632 SDL_SetRenderDrawColor(ren_.get(), 200, 200, 200, 255);
633 SDL_RenderFillRect(ren_.get(), &drawRect);
634 }
635
636 {
637 SDL_Rect drawRect {
638 (GAME_WIDTH - menuWidth_) / 2,
639 (GAME_HEIGHT - menuHeight_) / 2,
640 menuWidth_,
641 menuHeight_
642 };
643
644 SDL_SetRenderDrawColor(ren_.get(), bgColor.r, bgColor.g, bgColor.b, 255);
645 SDL_RenderFillRect(ren_.get(), &drawRect);
646
647 std::cout << "(" << drawRect.x << "," << drawRect.y << "),(" << drawRect.w << "," << drawRect.h << ")" << std::endl;
648 }*/
649
650 SDL_RenderCopy(ren_.get(), menuBg_.get(), nullptr, nullptr);
651
652 for (int i=0; i < game.menu.items.size(); i++) {
653 const MenuItem& item = game.menu.items.at(i);
654 int width = 0;
655 TTF_SizeText(font_.get(), item.text.c_str(), &width, nullptr);
656
657 surface_ptr lineSurf = surface_ptr(TTF_RenderText_Shaded(font_.get(), item.text.c_str(), game.menu.cursor == i ? selectedColor : fgColor, bgColor));
658 texture_ptr lineTex = texture_ptr(SDL_CreateTextureFromSurface(ren_.get(), lineSurf.get()));
659
660 SDL_Rect drawRect {
661 (GAME_WIDTH - width) / 2,
662 (GAME_HEIGHT - menuHeight_) / 2 + MENU_PADDING + (TTF_FontHeight(font_.get()) + 1) * i,
663 width,
664 TTF_FontHeight(font_.get())
665 };
666 SDL_RenderCopy(ren_.get(), lineTex.get(), nullptr, &drawRect);
667 }
668
669 menuSelected_ = game.menu.cursor;
670}
671
672void Renderer::toggleFullscreen() {
673 isFullscreen = !isFullscreen;
674 if (isFullscreen) {
675 SDL_SetWindowFullscreen(win_.get(), SDL_WINDOW_FULLSCREEN_DESKTOP);
676 } else {
677 SDL_SetWindowFullscreen(win_.get(), 0);
678 }
679}
diff --git a/src/renderer.h b/src/renderer.h index ce2e7e1..8a74c3c 100644 --- a/src/renderer.h +++ b/src/renderer.h
@@ -165,6 +165,8 @@ public:
165 165
166 TTF_Font* getFont() { return font_.get(); } 166 TTF_Font* getFont() { return font_.get(); }
167 167
168 void toggleFullscreen();
169
168private: 170private:
169 171
170 void loadTextureFromFile(std::string_view path, texture_ptr& texture); 172 void loadTextureFromFile(std::string_view path, texture_ptr& texture);
@@ -183,6 +185,7 @@ private:
183 texture_ptr tileset_; 185 texture_ptr tileset_;
184 texture_ptr lamp_; 186 texture_ptr lamp_;
185 texture_ptr readInstruction_; 187 texture_ptr readInstruction_;
188 texture_ptr menuBg_;
186 189
187 std::array<texture_ptr, NUM_TITLES> titles_; 190 std::array<texture_ptr, NUM_TITLES> titles_;
188 std::array<int, NUM_TITLES> titleWidths_; 191 std::array<int, NUM_TITLES> titleWidths_;
@@ -199,6 +202,15 @@ private:
199 void renderMessageLine(MessageCache& line, const std::string& text, const Game& game); 202 void renderMessageLine(MessageCache& line, const std::string& text, const Game& game);
200 203
201 MessageCache messageLines_[2]; 204 MessageCache messageLines_[2];
205
206 bool isFullscreen = false;
207
208 void renderMenu(const Game& game);
209
210 texture_ptr menu_;
211 int menuWidth_ = 0;
212 int menuHeight_ = 0;
213 int menuSelected_ = 0;
202}; 214};
203 215
204#endif /* end of include guard: RENDERER_H_6A58EC30 */ 216#endif /* end of include guard: RENDERER_H_6A58EC30 */