diff --git a/cutsceneEditor/src/constants/images.ts b/cutsceneEditor/src/constants/images.ts index f99c32b..9ad3312 100644 --- a/cutsceneEditor/src/constants/images.ts +++ b/cutsceneEditor/src/constants/images.ts @@ -9,5 +9,7 @@ export const AVAILABLE_IMAGES: string[] = [ 'resources/w/cutscenes/cutscene3/cs2_foreground.png', 'resources/black.png', 'resources/w/cutscenes/cutscene_exit_darklands/img.png', + 'resources/w/cutscenes/cutscene_exit_darklands/img2.png', + 'resources/w/cutscenes/cutscene3/img.png', 'resources/w/white.png', ]; diff --git a/proj-web/index.html b/proj-web/index.html index a75f384..5555a9f 100644 --- a/proj-web/index.html +++ b/proj-web/index.html @@ -18,22 +18,10 @@ border: none; } - #fs-button { - position: absolute; - top: 10px; left: 10px; - padding: 10px; - z-index: 10; - background: rgba(255,255,255,0.3); - color: white; border: 1px solid white; - cursor: pointer; - font-family: sans-serif; - border-radius: 5px; - } #status { color: white; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } -
Downloading...
@@ -56,16 +44,6 @@ document.body.appendChild(s); } - document.getElementById('fs-button').addEventListener('click', function() { - if (!document.fullscreenElement) { - document.documentElement.requestFullscreen().catch(function(e) { - console.error('Fullscreen error: ' + e.message); - }); - } else { - document.exitFullscreen(); - } - }); - document.addEventListener('DOMContentLoaded', function() { prepareModuleEnvironment(); loadGameScript(); diff --git a/proj-windows/CMakeLists.txt b/proj-windows/CMakeLists.txt index 3d9f6e5..7b56de5 100644 --- a/proj-windows/CMakeLists.txt +++ b/proj-windows/CMakeLists.txt @@ -5,10 +5,6 @@ project(witcher001 LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -# Build option (Windows-only): when ON, the game launches in fullscreen. -# When OFF (default), it launches in a 1280x720 window like before. -option(FULLSCREEN "Launch the game in fullscreen mode" OFF) - include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/ThirdParty.cmake) # =========================================== @@ -124,10 +120,6 @@ target_compile_definitions(witcher001 PRIVATE # SHOW_PATH ) -if(FULLSCREEN) - target_compile_definitions(witcher001 PRIVATE FULLSCREEN) -endif() - # Линкуем с SDL2main, если он вообще установлен target_link_libraries(witcher001 PRIVATE SDL2main_external_lib) diff --git a/resources/config2/npcs_uni_interior.json b/resources/config2/npcs_uni_interior.json index df6e78d..84d09eb 100644 --- a/resources/config2/npcs_uni_interior.json +++ b/resources/config2/npcs_uni_interior.json @@ -2,7 +2,7 @@ "npcs": [ { "id": "npc_teacher01", - "name": "Аида Дженибекова", + "name": "Aida Dzhenibekovna", "animationIdlePath": "resources/w/new_anims/teacher_stand_idle001_small.anim", "animationWalkPath": "resources/w/new_anims/teacher_walk001_small.anim", "meshTextures": { @@ -22,7 +22,7 @@ }, { "id": "npc_02_woman", - "name": "Айпери", + "name": "Aiperi", "animationIdlePath": "resources/w/girlfriend/girlfriend_idle003_small.anim", "animationWalkPath": "resources/w/girlfriend/girlfriend_walk003_small.anim", "meshTextures": { @@ -43,7 +43,7 @@ }, { "id": "npc_04_ghost", - "name": "Призрак", + "name": "Ghost", "animationIdlePath": "resources/w/ghost/ghost_idle004_small.anim", "animationWalkPath": "resources/w/ghost/ghost_idle004_small.anim", "meshTextures": { @@ -64,7 +64,7 @@ }, { "id": "ghost_01x", - "name": "Тень", + "name": "Shadow", "meshTextures": { "Shadow_NPC_Rigged": "resources/w/shadow/Shadow_BaseColor.png" }, @@ -90,7 +90,7 @@ }, { "id": "ghost_02x", - "name": "Тень", + "name": "Shadow", "meshTextures": { "Shadow_NPC_Rigged": "resources/w/shadow/Shadow_BaseColor.png" }, @@ -116,7 +116,7 @@ }, { "id": "ghost_03x", - "name": "Тень", + "name": "Shadow", "meshTextures": { "Shadow_NPC_Rigged": "resources/w/shadow/Shadow_BaseColor.png" }, @@ -142,7 +142,7 @@ }, { "id": "npc_02_woman", - "name": "Алтынай", + "name": "Altynai", "animationIdlePath": "resources/w/girl/girl_idle001_small.anim", "animationWalkPath": "resources/w/girl/girl_walk010_small.anim", "meshTextures": { diff --git a/resources/dialogue/cutscenes006.json b/resources/dialogue/cutscenes006.json deleted file mode 100644 index d0b20a4..0000000 --- a/resources/dialogue/cutscenes006.json +++ /dev/null @@ -1,889 +0,0 @@ -{ - "cutscenes": [ - { - "id": "lection_cutscene001", - "skippable": true, - "durationMs": 37000, - "fadeOutMs": 500, - "fadeInMs": 500, - "endFadeOutMs": 0, - "endFadeInMs": 2000, - "onFadeInCallback": "on_lection_cutscene_fadein_callback", - "imageSegments": [ - { - "path": "resources/black.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 37052, - "fadeInMs": 0, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_wall_x.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 6133, - "fadeInMs": 0, - "fadeOutMs": 2000, - "easing": "Linear", - "from": { - "centerX": 0.51, - "centerY": 0.5, - "scale": 1.2 - }, - "to": { - "centerX": 0.58, - "centerY": 0.5, - "scale": 1.15 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_aida1_x.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 6150, - "fadeInMs": 0, - "fadeOutMs": 2000, - "easing": "Linear", - "from": { - "centerX": 0.52, - "centerY": 0.5, - "scale": 1.2 - }, - "to": { - "centerX": 0.575, - "centerY": 0.5, - "scale": 1.15 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_heads_x.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 6167, - "fadeInMs": 0, - "fadeOutMs": 2000, - "easing": "Linear", - "from": { - "centerX": 0.56, - "centerY": 0.36, - "scale": 1.3 - }, - "to": { - "centerX": 0.5, - "centerY": 0.37, - "scale": 1.4 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_wall_x.png", - "width": 1280, - "height": 720, - "startMs": 6000, - "endMs": 15100, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.56, - "centerY": 0.5, - "scale": 1.2 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1.1 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_aida3_x.png", - "width": 1280, - "height": 720, - "startMs": 6050, - "endMs": 15166, - "fadeInMs": 1100, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.52, - "centerY": 0.5, - "scale": 1.2 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1.1 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_heads_x.png", - "width": 1280, - "height": 720, - "startMs": 6066, - "endMs": 15083, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.3, - "scale": 1.3 - }, - "to": { - "centerX": 0.58, - "centerY": 0.3, - "scale": 1.2 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_wall_x.png", - "width": 1280, - "height": 720, - "startMs": 14436, - "endMs": 21470, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.59, - "centerY": 0.5, - "scale": 1.3 - }, - "to": { - "centerX": 0.49, - "centerY": 0.5, - "scale": 1.2 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_aida2_x.png", - "width": 1280, - "height": 720, - "startMs": 15348, - "endMs": 21481, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.53, - "centerY": 0.5, - "scale": 1.3 - }, - "to": { - "centerX": 0.49, - "centerY": 0.5, - "scale": 1.2 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_heads_x.png", - "width": 1280, - "height": 720, - "startMs": 15388, - "endMs": 21587, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.45, - "centerY": 0.2, - "scale": 1.3 - }, - "to": { - "centerX": 0.6, - "centerY": 0.2, - "scale": 1.26 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_wall_x.png", - "width": 1280, - "height": 720, - "startMs": 26588, - "endMs": 32621, - "fadeInMs": 500, - "fadeOutMs": 500, - "easing": "Linear", - "from": { - "centerX": 0.64, - "centerY": 0.7, - "scale": 2 - }, - "to": { - "centerX": 0.5, - "centerY": 0.7, - "scale": 2 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_aida3_x.png", - "width": 1280, - "height": 720, - "startMs": 26637, - "endMs": 32621, - "fadeInMs": 500, - "fadeOutMs": 500, - "easing": "Linear", - "from": { - "centerX": 0.63, - "centerY": 0.7, - "scale": 2 - }, - "to": { - "centerX": 0.51, - "centerY": 0.7, - "scale": 2 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_wall_x.png", - "width": 1280, - "height": 720, - "startMs": 20744, - "endMs": 26861, - "fadeInMs": 1000, - "fadeOutMs": 700, - "easing": "EaseOutSine", - "from": { - "centerX": 0.25, - "centerY": 0.8, - "scale": 2.3 - }, - "to": { - "centerX": 0.3, - "centerY": 0.8, - "scale": 2.3 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_wall_x.png", - "width": 1280, - "height": 720, - "startMs": 32546, - "endMs": 36229, - "fadeInMs": 500, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.45, - "centerY": 0.5, - "scale": 1.1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_aida2_x.png", - "width": 1280, - "height": 720, - "startMs": 32542, - "endMs": 35675, - "fadeInMs": 500, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.43, - "centerY": 0.5, - "scale": 1.1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_heads_x.png", - "width": 1280, - "height": 720, - "startMs": 32497, - "endMs": 35580, - "fadeInMs": 0, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.35, - "scale": 1.2 - }, - "to": { - "centerX": 0.5, - "centerY": 0.4, - "scale": 1.2 - } - } - ], - "lines": [ - { - "speaker": "Аида Дженибековна", - "text": "Опаздывающие, заходите скорее и занимайте свои места! Лекция начинается!", - "durationMs": 4000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "В эпизоде \"Семетей\" трилогии \"Манас\", изменники Канчоро и Кыяз захватывают власть над кыргызами.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "Чтобы спасти раненого богатыря Семетея, фея Кёкмончок с помощью заклинания уводит его в иной мир.", - "durationMs": 3201, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "Этот мир описан в эпосе Манас как Кайып или Аль-Гайб, но некоторые ученые называют его миром теней.", - "durationMs": 3202, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "В этом мире обитают феи, духи и джинны. Простым смертным в этот мир дорога закрыта.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "Время там течет по другому - за один день в теневом мире могут пройти годы жизни обычного мира.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "Обычно, мир теней никак не пересекается с нашим миром живых людей.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "Но в критические моменты для народа, обитатели теневого мира могут приходить в наш мир.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "Совсем недавно закончилась пандемия, а сегодня мир захлестнули кровавые войны.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "В такие кризисные моменты истории, грань между мирами становится особенно тонкой.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "На сегодня лекция завершена. Все свободны! Задания на этот модуль вы получите индивидуально!", - "durationMs": 4000, - "waitForConfirm": false, - "luaCallback": "" - } - ] - }, - { - "id": "computer_cutscene001", - "skippable": true, - "durationMs": 12000, - "fadeOutMs": 500, - "fadeInMs": 500, - "endFadeOutMs": 0, - "endFadeInMs": 500, - "onFadeInCallback": "on_sleep_cutscene", - "imageSegments": [ - { - "path": "resources/black.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 13000, - "fadeInMs": 0, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_background.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 11984, - "fadeInMs": 0, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_books.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 11550, - "fadeInMs": 0, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.46, - "centerY": 0.5, - "scale": 1.1 - }, - "to": { - "centerX": 0.58, - "centerY": 0.5, - "scale": 1.2 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_chair.png", - "width": 1280, - "height": 720, - "startMs": 17, - "endMs": 10767, - "fadeInMs": 0, - "fadeOutMs": 300, - "easing": "Linear", - "from": { - "centerX": 0.47, - "centerY": 0.5, - "scale": 1.1 - }, - "to": { - "centerX": 0.57, - "centerY": 0.5, - "scale": 1.3 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_gg001.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 3083, - "fadeInMs": 0, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.47, - "centerY": 0.5, - "scale": 1.1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1.15 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_gg002.png", - "width": 1280, - "height": 720, - "startMs": 1850, - "endMs": 4883, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1.15 - }, - "to": { - "centerX": 0.53, - "centerY": 0.5, - "scale": 1.2 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_gg003.png", - "width": 1280, - "height": 720, - "startMs": 3950, - "endMs": 7083, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.49, - "centerY": 0.5, - "scale": 1.05 - }, - "to": { - "centerX": 0.55, - "centerY": 0.5, - "scale": 1.1 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_gg004.png", - "width": 1280, - "height": 720, - "startMs": 6050, - "endMs": 10100, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.47, - "centerY": 0.5, - "scale": 1.1 - }, - "to": { - "centerX": 0.53, - "centerY": 0.5, - "scale": 1.2 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_foreground.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 10100, - "fadeInMs": 0, - "fadeOutMs": 3000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - } - ], - "lines": [ - { - "speaker": "", - "text": "Я сел за компьютер и начал писать эссе по книге", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Книга была очень скучной. Как будто кто-то наложил на книгу чары сна.", - "durationMs": 4000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Неудивительно что я стал понемногу засыпать...", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - } - ] - }, - { - "id": "darklands_exit001", - "skippable": true, - "durationMs": 12500, - "fadeOutMs": 0, - "fadeInMs": 500, - "endFadeOutMs": 0, - "endFadeInMs": 500, - "onFadeInCallback": "on_darklands_over", - "imageSegments": [ - { - "path": "resources/w/cutscenes/cutscene_exit_darklands/img.png", - "width": 1280, - "height": 720, - "startMs": 1016, - "endMs": 10549, - "fadeInMs": 0, - "fadeOutMs": 0, - "easing": "EaseInOutQuad", - "from": { - "centerX": 0.85, - "centerY": 0.35, - "scale": 3 - }, - "to": { - "centerX": 0.6, - "centerY": 0.5, - "scale": 1.3 - } - }, - { - "path": "resources/black.png", - "width": 1280, - "height": 720, - "startMs": 9400, - "endMs": 12500, - "fadeInMs": 1000, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/white.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 2033, - "fadeInMs": 0, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - } - ], - "lines": [ - { - "speaker": "", - "text": "Мгновенно как я упал без сил, что-то сверкнуло.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Я очнулся и понял, что я по-прежнему в универе.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Все тело болело, как будто я всю ночь таскал мешки с цементом.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "А еще мне сильно хотелось спать...", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - } - ] - }, - { - "id": "sleep_cutscene001", - "skippable": true, - "durationMs": 9000, - "fadeOutMs": 500, - "fadeInMs": 500, - "endFadeOutMs": 0, - "endFadeInMs": 500, - "onFadeInCallback": "on_sleep_cutscene", - "imageSegments": [ - { - "path": "resources/w/cutscenes/cutscene_sleep/img.png", - "width": 1280, - "height": 720, - "startMs": 933, - "endMs": 8033, - "fadeInMs": 0, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.75, - "centerY": 0.5, - "scale": 3 - } - }, - { - "path": "resources/black.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 2117, - "fadeInMs": 0, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/black.png", - "width": 1280, - "height": 720, - "startMs": 4967, - "endMs": 9000, - "fadeInMs": 1000, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - } - ], - "lines": [ - { - "speaker": "", - "text": "Я лег спать и уснул.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Долгожданный сон полностью восстановил мои силы.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Я проснулся на следующий день уже после обеда.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - } - ] - }, - { - "id": "game_complete_cutscene001", - "skippable": true, - "durationMs": 12000, - "fadeOutMs": 0, - "fadeInMs": 500, - "endFadeOutMs": 0, - "endFadeInMs": 0, - "onFadeInCallback": "", - "imageSegments": [ - { - "path": "resources/black.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 13500, - "fadeInMs": 0, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - } - ], - "lines": [ - { - "speaker": "", - "text": "Все призраки исчезли, вокруг стало тихо.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Кажется, у меня получилось изгнать призрака.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Теперь надо добавить этот пункт к себе в резюме.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "В тот момент я еще не знал, что мои приключения еще только начинаются...", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - } - ] - } - ] -} \ No newline at end of file diff --git a/resources/dialogue/cutscenes007.json b/resources/dialogue/cutscenes007.json deleted file mode 100644 index 5599bb6..0000000 --- a/resources/dialogue/cutscenes007.json +++ /dev/null @@ -1,929 +0,0 @@ -{ - "cutscenes": [ - { - "id": "lection_cutscene001", - "skippable": true, - "durationMs": 37000, - "fadeOutMs": 500, - "fadeInMs": 500, - "endFadeOutMs": 0, - "endFadeInMs": 2000, - "onFadeInCallback": "on_lection_cutscene_fadein_callback", - "imageSegments": [ - { - "path": "resources/black.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 37052, - "fadeInMs": 0, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_wall_x.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 6133, - "fadeInMs": 0, - "fadeOutMs": 2000, - "easing": "Linear", - "from": { - "centerX": 0.51, - "centerY": 0.5, - "scale": 1.2 - }, - "to": { - "centerX": 0.58, - "centerY": 0.5, - "scale": 1.15 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_aida1_x.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 6150, - "fadeInMs": 0, - "fadeOutMs": 2000, - "easing": "Linear", - "from": { - "centerX": 0.52, - "centerY": 0.5, - "scale": 1.2 - }, - "to": { - "centerX": 0.575, - "centerY": 0.5, - "scale": 1.15 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_heads_x.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 6167, - "fadeInMs": 0, - "fadeOutMs": 2000, - "easing": "Linear", - "from": { - "centerX": 0.56, - "centerY": 0.36, - "scale": 1.3 - }, - "to": { - "centerX": 0.5, - "centerY": 0.37, - "scale": 1.4 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_wall_x.png", - "width": 1280, - "height": 720, - "startMs": 6000, - "endMs": 15100, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.56, - "centerY": 0.5, - "scale": 1.2 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1.1 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_aida3_x.png", - "width": 1280, - "height": 720, - "startMs": 6050, - "endMs": 15166, - "fadeInMs": 1100, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.52, - "centerY": 0.5, - "scale": 1.2 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1.1 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_heads_x.png", - "width": 1280, - "height": 720, - "startMs": 6066, - "endMs": 15083, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.3, - "scale": 1.3 - }, - "to": { - "centerX": 0.58, - "centerY": 0.3, - "scale": 1.2 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_wall_x.png", - "width": 1280, - "height": 720, - "startMs": 14436, - "endMs": 21470, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.59, - "centerY": 0.5, - "scale": 1.3 - }, - "to": { - "centerX": 0.49, - "centerY": 0.5, - "scale": 1.2 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_aida2_x.png", - "width": 1280, - "height": 720, - "startMs": 15348, - "endMs": 21481, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.53, - "centerY": 0.5, - "scale": 1.3 - }, - "to": { - "centerX": 0.49, - "centerY": 0.5, - "scale": 1.2 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_heads_x.png", - "width": 1280, - "height": 720, - "startMs": 15388, - "endMs": 21587, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.45, - "centerY": 0.2, - "scale": 1.3 - }, - "to": { - "centerX": 0.6, - "centerY": 0.2, - "scale": 1.26 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_wall_x.png", - "width": 1280, - "height": 720, - "startMs": 26588, - "endMs": 32621, - "fadeInMs": 500, - "fadeOutMs": 500, - "easing": "Linear", - "from": { - "centerX": 0.64, - "centerY": 0.7, - "scale": 2 - }, - "to": { - "centerX": 0.5, - "centerY": 0.7, - "scale": 2 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_aida3_x.png", - "width": 1280, - "height": 720, - "startMs": 26637, - "endMs": 32621, - "fadeInMs": 500, - "fadeOutMs": 500, - "easing": "Linear", - "from": { - "centerX": 0.63, - "centerY": 0.7, - "scale": 2 - }, - "to": { - "centerX": 0.51, - "centerY": 0.7, - "scale": 2 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_wall_x.png", - "width": 1280, - "height": 720, - "startMs": 20744, - "endMs": 26861, - "fadeInMs": 1000, - "fadeOutMs": 700, - "easing": "EaseOutSine", - "from": { - "centerX": 0.25, - "centerY": 0.8, - "scale": 2.3 - }, - "to": { - "centerX": 0.3, - "centerY": 0.8, - "scale": 2.3 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_wall_x.png", - "width": 1280, - "height": 720, - "startMs": 32546, - "endMs": 36229, - "fadeInMs": 500, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.45, - "centerY": 0.5, - "scale": 1.1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_aida2_x.png", - "width": 1280, - "height": 720, - "startMs": 32542, - "endMs": 35675, - "fadeInMs": 500, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.43, - "centerY": 0.5, - "scale": 1.1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/cutscenes/cutscene1/cutscene1_heads_x.png", - "width": 1280, - "height": 720, - "startMs": 32497, - "endMs": 35580, - "fadeInMs": 0, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.35, - "scale": 1.2 - }, - "to": { - "centerX": 0.5, - "centerY": 0.4, - "scale": 1.2 - } - } - ], - "lines": [ - { - "speaker": "Аида Дженибековна", - "text": "Опаздывающие, заходите скорее и занимайте свои места! Лекция начинается!", - "durationMs": 4000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "В эпизоде \"Семетей\" трилогии \"Манас\", изменники Канчоро и Кыяз захватывают власть над кыргызами.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "Чтобы спасти раненого богатыря Семетея, фея Кёкмончок с помощью заклинания уводит его в иной мир.", - "durationMs": 3201, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "Этот мир описан в эпосе Манас как Кайып или Аль-Гайб, но некоторые ученые называют его миром теней.", - "durationMs": 3202, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "В этом мире обитают феи, духи и джинны. Простым смертным в этот мир дорога закрыта.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "Время там течет по другому - за один день в теневом мире могут пройти годы жизни обычного мира.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "Обычно, мир теней никак не пересекается с нашим миром живых людей.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "Но в критические моменты для народа, обитатели теневого мира могут приходить в наш мир.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "Совсем недавно закончилась пандемия, а сегодня мир захлестнули кровавые войны.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "В такие кризисные моменты истории, грань между мирами становится особенно тонкой.", - "durationMs": 3200, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "Аида Дженибековна", - "text": "На сегодня лекция завершена. Все свободны! Задания на этот модуль вы получите индивидуально!", - "durationMs": 4000, - "waitForConfirm": false, - "luaCallback": "" - } - ] - }, - { - "id": "computer_cutscene001", - "skippable": true, - "durationMs": 12000, - "fadeOutMs": 500, - "fadeInMs": 500, - "endFadeOutMs": 0, - "endFadeInMs": 500, - "onFadeInCallback": "on_sleep_cutscene", - "imageSegments": [ - { - "path": "resources/black.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 13000, - "fadeInMs": 0, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_background.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 11984, - "fadeInMs": 0, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_books.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 11550, - "fadeInMs": 0, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.46, - "centerY": 0.5, - "scale": 1.1 - }, - "to": { - "centerX": 0.58, - "centerY": 0.5, - "scale": 1.2 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_chair.png", - "width": 1280, - "height": 720, - "startMs": 17, - "endMs": 10767, - "fadeInMs": 0, - "fadeOutMs": 300, - "easing": "Linear", - "from": { - "centerX": 0.47, - "centerY": 0.5, - "scale": 1.1 - }, - "to": { - "centerX": 0.57, - "centerY": 0.5, - "scale": 1.3 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_gg001.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 3083, - "fadeInMs": 0, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.47, - "centerY": 0.5, - "scale": 1.1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1.15 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_gg002.png", - "width": 1280, - "height": 720, - "startMs": 1850, - "endMs": 4883, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1.15 - }, - "to": { - "centerX": 0.53, - "centerY": 0.5, - "scale": 1.2 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_gg003.png", - "width": 1280, - "height": 720, - "startMs": 3950, - "endMs": 7083, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.49, - "centerY": 0.5, - "scale": 1.05 - }, - "to": { - "centerX": 0.55, - "centerY": 0.5, - "scale": 1.1 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_gg004.png", - "width": 1280, - "height": 720, - "startMs": 6050, - "endMs": 10100, - "fadeInMs": 1000, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.47, - "centerY": 0.5, - "scale": 1.1 - }, - "to": { - "centerX": 0.53, - "centerY": 0.5, - "scale": 1.2 - } - }, - { - "path": "resources/w/cutscenes/cutscene2/cs2_foreground.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 10100, - "fadeInMs": 0, - "fadeOutMs": 3000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - } - ], - "lines": [ - { - "speaker": "", - "text": "Я сел за компьютер и начал писать эссе по книге", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Книга была очень скучной. Как будто кто-то наложил на книгу чары сна.", - "durationMs": 4000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Неудивительно что я стал понемногу засыпать...", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - } - ] - }, - { - "id": "darklands_exit001", - "skippable": true, - "durationMs": 12500, - "fadeOutMs": 0, - "fadeInMs": 500, - "endFadeOutMs": 0, - "endFadeInMs": 500, - "onFadeInCallback": "on_darklands_over", - "imageSegments": [ - { - "path": "resources/w/cutscenes/cutscene_exit_darklands/img.png", - "width": 1280, - "height": 720, - "startMs": 999, - "endMs": 10115, - "fadeInMs": 0, - "fadeOutMs": 0, - "easing": "EaseInOutQuad", - "from": { - "centerX": 0.85, - "centerY": 0.35, - "scale": 3 - }, - "to": { - "centerX": 0.6, - "centerY": 0.5, - "scale": 1.3 - } - }, - { - "path": "resources/w/cutscenes/cutscene_exit_darklands/img2.png", - "width": 1280, - "height": 720, - "startMs": 3000, - "endMs": 10567, - "fadeInMs": 2000, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.85, - "centerY": 0.44, - "scale": 2.4 - }, - "to": { - "centerX": 0.68, - "centerY": 0.53, - "scale": 1.5 - } - }, - { - "path": "resources/black.png", - "width": 1280, - "height": 720, - "startMs": 9400, - "endMs": 12500, - "fadeInMs": 1000, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/white.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 2033, - "fadeInMs": 0, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - } - ], - "lines": [ - { - "speaker": "", - "text": "Мгновенно как я упал без сил, что-то сверкнуло.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Я очнулся и понял, что я по-прежнему в универе.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Все тело болело, как будто я всю ночь таскал мешки с цементом.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "А еще мне сильно хотелось спать...", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - } - ] - }, - { - "id": "sleep_cutscene001", - "skippable": true, - "durationMs": 9000, - "fadeOutMs": 500, - "fadeInMs": 500, - "endFadeOutMs": 0, - "endFadeInMs": 500, - "onFadeInCallback": "on_sleep_cutscene", - "imageSegments": [ - { - "path": "resources/w/cutscenes/cutscene_sleep/img.png", - "width": 1280, - "height": 720, - "startMs": 933, - "endMs": 8033, - "fadeInMs": 0, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.55, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.75, - "centerY": 0.5, - "scale": 3 - } - }, - { - "path": "resources/black.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 2117, - "fadeInMs": 0, - "fadeOutMs": 1000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/black.png", - "width": 1280, - "height": 720, - "startMs": 4967, - "endMs": 9000, - "fadeInMs": 1000, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - } - ], - "lines": [ - { - "speaker": "", - "text": "Я лег спать и уснул.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Долгожданный сон полностью восстановил мои силы.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Я проснулся на следующий день уже после обеда.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - } - ] - }, - { - "id": "game_complete_cutscene001", - "skippable": true, - "durationMs": 12000, - "fadeOutMs": 0, - "fadeInMs": 500, - "endFadeOutMs": 0, - "endFadeInMs": 0, - "onFadeInCallback": "", - "imageSegments": [ - { - "path": "resources/black.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 13500, - "fadeInMs": 0, - "fadeOutMs": 0, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - }, - "to": { - "centerX": 0.5, - "centerY": 0.5, - "scale": 1 - } - }, - { - "path": "resources/w/cutscenes/cutscene3/img.png", - "width": 1280, - "height": 720, - "startMs": 0, - "endMs": 11117, - "fadeInMs": 2000, - "fadeOutMs": 2000, - "easing": "Linear", - "from": { - "centerX": 0.5, - "centerY": 0.53, - "scale": 2.3 - }, - "to": { - "centerX": 0.5, - "centerY": 0.65, - "scale": 1.3 - } - } - ], - "lines": [ - { - "speaker": "", - "text": "Все призраки исчезли, вокруг стало тихо.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Кажется, у меня получилось изгнать призрака.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "Теперь надо добавить этот пункт к себе в резюме.", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - }, - { - "speaker": "", - "text": "В тот момент я еще не знал, что мои приключения еще только начинаются...", - "durationMs": 3000, - "waitForConfirm": false, - "luaCallback": "" - } - ] - } - ] -} \ No newline at end of file diff --git a/resources/shaders/default_shadow_web.fragment b/resources/shaders/default_shadow_web.fragment index 52a8b75..b6989bc 100644 --- a/resources/shaders/default_shadow_web.fragment +++ b/resources/shaders/default_shadow_web.fragment @@ -1,4 +1,4 @@ -precision mediump float; +precision highp float; uniform sampler2D Texture; uniform sampler2D uShadowMap; diff --git a/resources/shaders/fog_shadow_web.fragment b/resources/shaders/fog_shadow_web.fragment index 5077b47..6cfc06b 100644 --- a/resources/shaders/fog_shadow_web.fragment +++ b/resources/shaders/fog_shadow_web.fragment @@ -1,4 +1,4 @@ -precision mediump float; +precision highp float; uniform sampler2D Texture; uniform sampler2D uShadowMap; diff --git a/resources/start_dorm.lua b/resources/start_dorm.lua index b988d47..1887a4b 100644 --- a/resources/start_dorm.lua +++ b/resources/start_dorm.lua @@ -107,6 +107,7 @@ function alik_door_open_callback() game_api.fade_object("Room_Cover_LivingRoom_W_S_2_001", 0, 0.5, function() game_api.deactivate_interactive_object("Room_Cover_LivingRoom_W_S_2_001") game_api.set_npc_enabled(0, true) + game_api.npc_rotate_to(0, 90) end) if (bathroom_door_opened) then diff --git a/resources/start_uni_interior.lua b/resources/start_uni_interior.lua index 930cbfc..685976b 100644 --- a/resources/start_uni_interior.lua +++ b/resources/start_uni_interior.lua @@ -391,6 +391,7 @@ function on_hall_door_click() end) game_api.set_npc_enabled(0, true) game_api.set_npc_enabled(6, true) + game_api.npc_rotate_to(6, 180) end else if (game_api.is_night()) then @@ -556,6 +557,7 @@ game_api.set_cutscene_callback("lection_cutscene001", function() game_api.setIntValue("lection_is_over", 1) game_api.set_npc_enabled(1, true) + game_api.npc_rotate_to(1, 180) game_api.npc_walk_to(0, 0.758123, 0, 6.50063, on_teacher_arrived_intermediate) game_api.npc_walk_to(6, 5.28998, 0, -5.525, on_student_arrived) diff --git a/resources/w/cutscenes/cutscene2/cs2_gg001.png b/resources/w/cutscenes/cutscene2/cs2_gg001.png index 1bb5a8e..c38561a 100644 --- a/resources/w/cutscenes/cutscene2/cs2_gg001.png +++ b/resources/w/cutscenes/cutscene2/cs2_gg001.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b11e17bd6674d3121cfdd6f6da1573f69dfd1af649d9df3c24793710374c58c7 -size 452463 +oid sha256:3b94f174e245198a0b082dc293c8505ce1e98daef330f872ef2944b0fd7ef72b +size 450563 diff --git a/resources/w/cutscenes/cutscene2/cs2_gg002.png b/resources/w/cutscenes/cutscene2/cs2_gg002.png index bcfa832..8006de5 100644 --- a/resources/w/cutscenes/cutscene2/cs2_gg002.png +++ b/resources/w/cutscenes/cutscene2/cs2_gg002.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:47e67c70c4931bf108d7308364a1ff975e5b6127d74f58b9ab3455d3b0c07ed0 -size 451811 +oid sha256:eb9f723880ab184a2ff18732989c2eaf98328021bb113166954f66c9c18e88da +size 449786 diff --git a/resources/w/cutscenes/cutscene2/cs2_gg003.png b/resources/w/cutscenes/cutscene2/cs2_gg003.png index 656fc73..1c1827e 100644 --- a/resources/w/cutscenes/cutscene2/cs2_gg003.png +++ b/resources/w/cutscenes/cutscene2/cs2_gg003.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:824a6ef3d15dcce7d7f846837399b866f5b42f876f24af76ddd5066b0d7ed4a2 -size 432272 +oid sha256:761ef193bba21ca5a35283a1ba87147ef9da20606256818ab3f41dbd7c372b54 +size 429904 diff --git a/resources/w/gg/UniV_Grid_2K_Base_color.png b/resources/w/gg/UniV_Grid_2K_Base_color.png deleted file mode 100644 index f2e648f..0000000 --- a/resources/w/gg/UniV_Grid_2K_Base_color.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6b1d50a1ee95a08db41d959f40355b34399d69c5ac918a5989bdbf9014dbfcd3 -size 5721385 diff --git a/resources/w/gg/UniV_Grid_2K_Base_color001.png b/resources/w/gg/UniV_Grid_2K_Base_color001.png new file mode 100644 index 0000000..9509b37 --- /dev/null +++ b/resources/w/gg/UniV_Grid_2K_Base_color001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:732611b2d33229f1fe06151a2ce2d382a15fc036ee3494a3fb2e0ea7ba78a45e +size 5923483 diff --git a/resources/w/ui/img/Location_dorm.png b/resources/w/ui/img/Location_dorm.png index 59893fa..ae8c1c7 100644 --- a/resources/w/ui/img/Location_dorm.png +++ b/resources/w/ui/img/Location_dorm.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:85eccf4af29786e12776382a4eb4a4fd578827127474d4ca8bda0ee1518650cd +oid sha256:39fa72280c55bd7027bec49c58520f788bd6ec920b6881ab72c002eeaf45190c size 24779 diff --git a/resources/w/ui/img/Location_uni_ext.png b/resources/w/ui/img/Location_uni_ext.png index 242bf5e..5e1c975 100644 --- a/resources/w/ui/img/Location_uni_ext.png +++ b/resources/w/ui/img/Location_uni_ext.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31aa37e6d6347485a1a736a1c97e4f88951e8138a34369071c9717b97c514806 +oid sha256:74d4774cf530a0f25ad7caefbb0726fa47e22a2777c8cf626bef24eb831a55b4 size 23452 diff --git a/resources/w/ui/img/Location_uni_int.png b/resources/w/ui/img/Location_uni_int.png index d3d795f..1c87587 100644 --- a/resources/w/ui/img/Location_uni_int.png +++ b/resources/w/ui/img/Location_uni_int.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fbeb6a2d4598c91eefff4826b125198bd6ae8c19768483258ca17dcac3d67b09 -size 24434 +oid sha256:82f5270961fcc566003280d7016a415672eeed884a277745c9ef88cda4707cc2 +size 25205 diff --git a/resources/w/ui/img/main/MenuBkg001_v001.png b/resources/w/ui/img/main/MenuBkg001_v001.png new file mode 100644 index 0000000..7feca4c --- /dev/null +++ b/resources/w/ui/img/main/MenuBkg001_v001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34052bc2e395a8b1446d650293358b3bee5e45b327fd30b964906ccac6494277 +size 1861804 diff --git a/resources/w/ui/img/main/letters002.png b/resources/w/ui/img/main/letters002.png new file mode 100644 index 0000000..f2ee163 --- /dev/null +++ b/resources/w/ui/img/main/letters002.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74501c0e2647aca4ae2ef61a2d31417170e5a50c3f7c77e3b66c39e74bc29ebb +size 162843 diff --git a/resources/w/ui/img/main/main002.png b/resources/w/ui/img/main/main002.png new file mode 100644 index 0000000..3436b68 --- /dev/null +++ b/resources/w/ui/img/main/main002.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36f4d7ab9c337e99ccf0ed437bbe0a72728be5daace25a704483b389c7e4c6a2 +size 6078469 diff --git a/resources/w/ui/img/main/under_letters001.png b/resources/w/ui/img/main/under_letters001.png new file mode 100644 index 0000000..66835fe --- /dev/null +++ b/resources/w/ui/img/main/under_letters001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fae196de373bc007ce04cde78079e5851cd19dbf8ad8a8e293bfa502fdbef99d +size 53618 diff --git a/resources/w/ui/screen_credits.json b/resources/w/ui/screen_credits.json new file mode 100644 index 0000000..b131d23 --- /dev/null +++ b/resources/w/ui/screen_credits.json @@ -0,0 +1,42 @@ +{ + "root": { + "type": "FrameLayout", + "width": "match_parent", + "height": "match_parent", + "children": [ + { + "type": "StaticImage", + "name": "creditsBkg", + "width": "match_parent", + "height": "match_parent", + "texture": "resources/w/ui/img/main/bkg.png" + }, + { + "type": "StaticImage", + "name": "creditsImage", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "width": 800, + "height": 500, + "texture": "resources/w/ui/img/main/about.png" + }, + { + "type": "Button", + "name": "skipButton", + "horizontal_gravity": "right", + "vertical_gravity": "top", + "x": -23, + "y": -35, + "width": 200, + "height": 200, + "clickZoneWidth": 176, + "clickZoneHeight": 176, + "textures": { + "normal": "resources/w/ui/img/RedClose001_State=Default001.png", + "hover": "resources/w/ui/img/RedClose001_State=Selected001.png", + "pressed": "resources/w/ui/img/RedClose001_State=Tap001.png" + } + } + ] + } +} diff --git a/resources/w/ui/screen_main_menu.json b/resources/w/ui/screen_main_menu.json index c5f054e..b73d1c5 100644 --- a/resources/w/ui/screen_main_menu.json +++ b/resources/w/ui/screen_main_menu.json @@ -7,9 +7,36 @@ { "type": "StaticImage", "name": "mainMenuBkg", - "width": "match_parent", + "width": 2186, + "height": 1536, + "texture": "resources/w/ui/img/main/MenuBkg001_v001.png" + }, + { + "type": "StaticImage", + "name": "mainMenuBkg2", + "horizontal_gravity": "center", + "vertical_gravity": "bottom", + "width": 720, + "height": 720, + "texture": "resources/w/ui/img/main/main002.png" + }, + { + "type": "StaticImage", + "name": "mainMenuUnderLetterBkg", + "horizontal_gravity": "center", + "width": 450, "height": "match_parent", - "texture": "resources/w/ui/img/main/bkg.png" + "texture": "resources/w/ui/img/main/under_letters001.png" + }, + { + "type": "StaticImage", + "name": "mainMenuLogo", + "horizontal_gravity": "center", + "vertical_gravity": "center", + "width": 350, + "height": 175, + "y": 235, + "texture": "resources/w/ui/img/main/letters002.png" }, { "type": "LinearLayout", @@ -17,6 +44,7 @@ "horizontal_align": "center", "vertical_align": "center", "spacing": 24, + "y": 120, "width": "match_parent", "height": "match_parent", "children": [ @@ -76,7 +104,7 @@ "y": 10, "width": 160, "height": 36, - "text": "v. 0.6", + "text": "v. 0.7", "fontSize": 24, "textCentered": false, "topAligned": true, diff --git a/resources/w/ui/screen_settings.json b/resources/w/ui/screen_settings.json index a030aad..05dca2c 100644 --- a/resources/w/ui/screen_settings.json +++ b/resources/w/ui/screen_settings.json @@ -100,6 +100,16 @@ "fontSize": 32, "textCentered": true, "color": [0.2, 0.9, 0.2, 1.0] + }, + { + "type": "TextButton", + "name": "fullScreenToggleButton", + "width": 500, + "height": 60, + "text": "Full Screen: OFF", + "fontSize": 32, + "textCentered": true, + "color": [0.2, 0.9, 0.2, 1.0] } ] }, diff --git a/src/Environment.cpp b/src/Environment.cpp index ee2ae8c..b9c289e 100644 --- a/src/Environment.cpp +++ b/src/Environment.cpp @@ -8,9 +8,14 @@ #else #include #endif + +#ifdef EMSCRIPTEN +#include +#endif + namespace ZL { - + int Environment::windowHeaderHeight = 0; int Environment::width = CONST_DEFAULT_WIDTH; @@ -20,6 +25,12 @@ float Environment::zoom = DEFAULT_ZOOM; SDL_Window* Environment::window = nullptr; +#ifdef EMSCRIPTEN +bool Environment::isFullscreen = false; +#else +bool Environment::isFullscreen = true; +#endif + bool Environment::showMouse = false; bool Environment::exitGameLoop = false; @@ -55,4 +66,25 @@ void Environment::computeProjectionDimensions() } } +void Environment::setFullscreen(bool enable) { +#ifdef EMSCRIPTEN + if (enable) { + EmscriptenFullscreenStrategy strategy{}; + strategy.scaleMode = EMSCRIPTEN_FULLSCREEN_SCALE_STRETCH; + strategy.canvasResolutionScaleMode = EMSCRIPTEN_FULLSCREEN_CANVAS_SCALE_STDDEF; + strategy.filteringMode = EMSCRIPTEN_FULLSCREEN_FILTERING_DEFAULT; + emscripten_request_fullscreen_strategy("#canvas", EM_TRUE, &strategy); + } else { + emscripten_exit_fullscreen(); + } + // isFullscreen is updated by onFullscreenChanged once the browser confirms — + // the request above is deferred/async and can fail silently (e.g. denied). +#else + if (window) { + SDL_SetWindowFullscreen(window, enable ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); + } + isFullscreen = enable; +#endif +} + } // namespace ZL diff --git a/src/Environment.h b/src/Environment.h index 47e91d0..50b66bd 100644 --- a/src/Environment.h +++ b/src/Environment.h @@ -30,6 +30,9 @@ public: static SDL_Window* window; + static bool isFullscreen; + static void setFullscreen(bool enable); + static bool showMouse; static bool exitGameLoop; diff --git a/src/Game.cpp b/src/Game.cpp index 6b4dfff..59d3392 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -15,7 +15,6 @@ #include #endif - #ifdef EMSCRIPTEN #include #endif @@ -1508,12 +1507,24 @@ namespace ZL currentLocation()->state.isNight = gameState.isNight; currentLocation()->scriptEngine.callTriggerNightEnterCallback(); } + + audioPlayer->crossFadeMusicAsync("audio/bishkek night.ogg"); + } else { gameState.isDarklands = !gameState.isDarklands; // Change HUD menuManager.setDarklandsMode(gameState.isDarklands); + if (gameState.isDarklands) + { + audioPlayer->crossFadeMusicAsync("audio/bishkek fight calm.ogg"); + } + else + { + audioPlayer->crossFadeMusicAsync("audio/bishkek night.ogg"); + } + if (currentLocation()) { currentLocation()->state.isDarklands = gameState.isDarklands; if (gameState.isDarklands) @@ -1622,6 +1633,25 @@ namespace ZL } catch (const std::exception& e) { std::cerr << "[save] Failed to parse save file " << path << ": " << e.what() << std::endl; } + + if (gameState.isDarklands) + { + audioPlayer->crossFadeMusicAsync("audio/bishkek fight calm.ogg"); + } + else if (gameState.isNight) + { + audioPlayer->crossFadeMusicAsync("audio/bishkek night.ogg"); + } + else + { + if (gameState.currentLocationName == "location_dorm") { + audioPlayer->crossFadeMusicAsync("audio/obshaga.ogg"); + } + else + { + audioPlayer->crossFadeMusicAsync("audio/bishkek univer day.ogg"); + } + } } } // namespace ZL \ No newline at end of file diff --git a/src/Location.cpp b/src/Location.cpp index b05957b..5354fe2 100644 --- a/src/Location.cpp +++ b/src/Location.cpp @@ -93,7 +93,8 @@ namespace ZL interactiveObjects = GameObjectLoader::loadAndCreateInteractiveObjects(params.interactiveObjectsJsonPath, renderer, CONST_ZIP_FILE); //auto playerTexture = std::make_shared(CreateTextureDataFromPng("resources/w/gg/IMG_20260413_182354_992.png", CONST_ZIP_FILE)); - auto playerTexture = renderer.textureManager.LoadFromPng("resources/w/gg/UniV_Grid_2K_Base_color.png", CONST_ZIP_FILE); + //auto playerTexture = renderer.textureManager.LoadFromPng("resources/w/gg/UniV_Grid_2K_Base_color.png", CONST_ZIP_FILE); + auto playerTexture = renderer.textureManager.LoadFromPng("resources/w/gg/UniV_Grid_2K_Base_color001.png", CONST_ZIP_FILE); auto sparkTexture = renderer.textureManager.LoadFromPng("resources/w/spark.png", CONST_ZIP_FILE); diff --git a/src/MenuManager.cpp b/src/MenuManager.cpp index 7a118d4..157462f 100644 --- a/src/MenuManager.cpp +++ b/src/MenuManager.cpp @@ -360,9 +360,17 @@ namespace ZL { ? std::array{ 0.2f, 0.9f, 0.2f, 1.0f } : std::array{ 0.9f, 0.2f, 0.2f, 1.0f }); }; + auto refreshFullscreenToggle = [this]() { + const bool on = Environment::isFullscreen; + uiManager.setTextButtonText("fullScreenToggleButton", on ? "Full Screen: ON" : "Full Screen: OFF"); + uiManager.setTextButtonColor("fullScreenToggleButton", on + ? std::array{ 0.2f, 0.9f, 0.2f, 1.0f } + : std::array{ 0.9f, 0.2f, 0.2f, 1.0f }); + }; refreshMusicToggle(); refreshSoundToggle(); + refreshFullscreenToggle(); uiManager.setTextButtonCallback("musicToggleButton", [this](const std::string&) { audioPlayer_.setMusicEnabled(!audioPlayer_.isMusicEnabled()); @@ -380,6 +388,10 @@ namespace ZL { ? std::array{ 0.2f, 0.9f, 0.2f, 1.0f } : std::array{ 0.9f, 0.2f, 0.2f, 1.0f }); }); + uiManager.setTextButtonCallback("fullScreenToggleButton", [this, refreshFullscreenToggle](const std::string&) { + Environment::setFullscreen(!Environment::isFullscreen); + refreshFullscreenToggle(); + }); } void MenuManager::showLoadGameScreen() @@ -1783,6 +1795,7 @@ namespace ZL { root["soundVolume"] = audioPlayer_.getSoundVolume(); root["musicEnabled"] = audioPlayer_.isMusicEnabled(); root["soundEnabled"] = audioPlayer_.isSoundEnabled(); + root["fullscreen"] = Environment::isFullscreen; std::ofstream file("settings.json"); if (file.is_open()) { @@ -1793,6 +1806,10 @@ namespace ZL { } void MenuManager::loadSettings() { + // Note: on desktop, main() already reads settings.json and creates the window + // directly in the right fullscreen state (see WIN32 main() in main.cpp) to avoid + // a windowed -> fullscreen flash. The block below just keeps Environment::isFullscreen + // in sync in case this is ever called from a path that didn't pre-apply it. const std::string content = ZL::readTextFile("settings.json"); if (content.empty()) return; try { @@ -1805,6 +1822,11 @@ namespace ZL { audioPlayer_.setMusicEnabled(root["musicEnabled"].get()); if (root.contains("soundEnabled")) audioPlayer_.setSoundEnabled(root["soundEnabled"].get()); + if (root.contains("fullscreen")) { +#ifndef EMSCRIPTEN + Environment::setFullscreen(root["fullscreen"].get()); +#endif + } } catch (const std::exception& e) { std::cerr << "[settings] Failed to parse settings.json: " << e.what() << std::endl; } diff --git a/src/main.cpp b/src/main.cpp index 01761a8..2b690b4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,6 @@ #include "Game.h" #include "Environment.h" +#include "utils/Utils.h" #include #ifdef __ANDROID__ #include @@ -85,6 +86,8 @@ EM_BOOL onWindowResized(int /*eventType*/, const EmscriptenUiEvent* e, void* /*u } EM_BOOL onFullscreenChanged(int /*eventType*/, const EmscriptenFullscreenChangeEvent* e, void* /*userData*/) { + ZL::Environment::isFullscreen = e->isFullscreen; + // Вместо window.innerWidth, попробуйте запросить размер целевого элемента // так как после перехода в FS именно он растягивается на весь экран. double clientW, clientH; @@ -245,11 +248,27 @@ int main(int argc, char *argv[]) { SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); -#ifdef FULLSCREEN - const Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_FULLSCREEN_DESKTOP; -#else - const Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_RESIZABLE; -#endif + // Read the persisted fullscreen preference (if any) before creating the + // window, so it opens directly in the right mode instead of flashing + // windowed -> fullscreen once settings are loaded later during setupPart2(). + { + const std::string settingsContent = ZL::readTextFile("settings.json"); + if (!settingsContent.empty()) { + try { + const nlohmann::json settingsRoot = nlohmann::json::parse(settingsContent); + if (settingsRoot.contains("fullscreen")) { + ZL::Environment::isFullscreen = settingsRoot["fullscreen"].get(); + } + } catch (const std::exception& e) { + std::cerr << "[settings] Failed to parse settings.json: " << e.what() << std::endl; + } + } + } + + Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_RESIZABLE; + if (ZL::Environment::isFullscreen) { + windowFlags |= SDL_WINDOW_FULLSCREEN_DESKTOP; + } ZL::Environment::window = SDL_CreateWindow( "Shadow Over Bishkek",