diff --git a/audio/ETM_Titles_track.ogg b/audio/ETM_Titles_track.ogg new file mode 100644 index 0000000..210ad14 --- /dev/null +++ b/audio/ETM_Titles_track.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a07c629753cfae0c86cf95bba38693fa53dc4e298b5146eb0f959c0c53530d86 +size 6934226 diff --git a/audio/naprtyag_loop.ogg b/audio/naprtyag_loop.ogg new file mode 100644 index 0000000..d0a0b2a --- /dev/null +++ b/audio/naprtyag_loop.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13d34dd2881e05d4d290dd483b0a24a20d3e6849067af2b287d96249c528d12e +size 7468451 diff --git a/proj-web/CMakeLists.txt b/proj-web/CMakeLists.txt index f97fb5f..ef08cc7 100644 --- a/proj-web/CMakeLists.txt +++ b/proj-web/CMakeLists.txt @@ -77,6 +77,8 @@ set(SOURCES ../src/AudioPlayerAsync.h ../src/BoneAnimatedModel.cpp ../src/BoneAnimatedModel.h + ../src/BoneAnimatedModelNew.cpp + ../src/BoneAnimatedModelNew.h ../src/render/OpenGlExtensions.cpp ../src/render/OpenGlExtensions.h ../src/utils/Utils.cpp diff --git a/resources/config2/about.json b/resources/config2/about.json index 2ea3954..7e7ea88 100644 --- a/resources/config2/about.json +++ b/resources/config2/about.json @@ -13,19 +13,19 @@ { "type": "StaticImage", "name": "aboutImage", - "width": 400, - "height": 300, - "texture": "resources/loading.png" + "width": 512, + "height": 512, + "texture": "resources/e/menu/about.png" }, { "type": "Button", "name": "backButton", - "width": 200, - "height": 60, + "width": 512, + "height": 128, "textures": { - "normal": "resources/loading.png", - "hover": "resources/loading.png", - "pressed": "resources/loading.png" + "normal": "resources/e/menu/button_back.png", + "hover": "resources/e/menu/button_back.png", + "pressed": "resources/e/menu/button_back.png" } } ] diff --git a/resources/config2/help.json b/resources/config2/help.json index 63553f7..19a46f8 100644 --- a/resources/config2/help.json +++ b/resources/config2/help.json @@ -13,19 +13,19 @@ { "type": "StaticImage", "name": "helpImage", - "width": 400, - "height": 300, - "texture": "resources/loading.png" + "width": 512, + "height": 512, + "texture": "resources/e/menu/help.png" }, { "type": "Button", "name": "backButton", - "width": 200, - "height": 60, + "width": 512, + "height": 128, "textures": { - "normal": "resources/loading.png", - "hover": "resources/loading.png", - "pressed": "resources/loading.png" + "normal": "resources/e/menu/button_back.png", + "hover": "resources/e/menu/button_back.png", + "pressed": "resources/e/menu/button_back.png" } } ] diff --git a/resources/config2/main_menu.json b/resources/config2/main_menu.json index 2b8e036..568eb2d 100644 --- a/resources/config2/main_menu.json +++ b/resources/config2/main_menu.json @@ -13,41 +13,41 @@ { "type": "StaticImage", "name": "title", - "width": 300, - "height": 100, - "texture": "resources/loading.png" + "width": 512, + "height": 128, + "texture": "resources/e/menu/title.png" }, { "type": "Button", "name": "startButton", - "width": 300, - "height": 60, + "width": 512, + "height": 128, "textures": { - "normal": "resources/loading.png", - "hover": "resources/loading.png", - "pressed": "resources/loading.png" + "normal": "resources/e/menu/button_start.png", + "hover": "resources/e/menu/button_start.png", + "pressed": "resources/e/menu/button_start.png" } }, { "type": "Button", "name": "helpButton", - "width": 300, - "height": 60, + "width": 512, + "height": 128, "textures": { - "normal": "resources/loading.png", - "hover": "resources/loading.png", - "pressed": "resources/loading.png" + "normal": "resources/e/menu/button_help.png", + "hover": "resources/e/menu/button_help.png", + "pressed": "resources/e/menu/button_help.png" } }, { "type": "Button", "name": "aboutButton", - "width": 300, - "height": 60, + "width": 512, + "height": 128, "textures": { - "normal": "resources/loading.png", - "hover": "resources/loading.png", - "pressed": "resources/loading.png" + "normal": "resources/e/menu/button_about.png", + "hover": "resources/e/menu/button_about.png", + "pressed": "resources/e/menu/button_about.png" } } ] diff --git a/resources/e/menu/about.png b/resources/e/menu/about.png new file mode 100644 index 0000000..57b43cb --- /dev/null +++ b/resources/e/menu/about.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99b8adbf35d1d4d08d54341e18718df347a4decc8b4af0acde1deb1b11a2daa2 +size 41344 diff --git a/resources/e/menu/button_about.png b/resources/e/menu/button_about.png new file mode 100644 index 0000000..40a7ca2 --- /dev/null +++ b/resources/e/menu/button_about.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:243cb39511c507c1fd58870c3376f996d60ba8c886a904a5d6d0dbba5af393da +size 4184 diff --git a/resources/e/menu/button_back.png b/resources/e/menu/button_back.png new file mode 100644 index 0000000..b9ee611 --- /dev/null +++ b/resources/e/menu/button_back.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:207404c48c0b559b4bf709b4d389092ab2eb8e28c54a7d329412cd54c4442e3b +size 2291 diff --git a/resources/e/menu/button_help.png b/resources/e/menu/button_help.png new file mode 100644 index 0000000..60d3d73 --- /dev/null +++ b/resources/e/menu/button_help.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:830108d43069ea343f012e9044542261925e4261ff5954362c1298d376a6e90a +size 2978 diff --git a/resources/e/menu/button_start.png b/resources/e/menu/button_start.png new file mode 100644 index 0000000..dc8f080 --- /dev/null +++ b/resources/e/menu/button_start.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:413994db76f81caa6fcd62da6c2af5b3cca5f0086b338997ebed8f69b532dc4e +size 3703 diff --git a/resources/e/menu/help.png b/resources/e/menu/help.png new file mode 100644 index 0000000..15f0048 --- /dev/null +++ b/resources/e/menu/help.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccab4640e7ead9727d34d7c47dc95f68a5a84b47783c27c4ec5e2a34c4d0c0d4 +size 51762 diff --git a/resources/e/menu/title.png b/resources/e/menu/title.png new file mode 100644 index 0000000..d0ba41d --- /dev/null +++ b/resources/e/menu/title.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0994fd176734d5c5e54a61bf44a4b04fe6746d42f7d1ac48e662f7008e76729 +size 4648 diff --git a/resources/loading.png b/resources/loading.png index a31d7fa..e4fafd1 100644 --- a/resources/loading.png +++ b/resources/loading.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f5c05b59ffb6170102aef205bafaf95fa88abb76ec549722d408600154c2b4f0 -size 13592 +oid sha256:6a228464f80a1cc25f0c6499fa5197a48d0c0b0a3ba8d0d0a86eafa4293d7b18 +size 43720 diff --git a/resources/start.lua b/resources/start.lua index b7d46aa..27459c3 100644 --- a/resources/start.lua +++ b/resources/start.lua @@ -15,7 +15,7 @@ function step1() game_api.npc_walk_to(0, 2.0, 0.0, -2.0, step2) end -step1() +--step1() -- ============================================ -- ITEM PICKUP HANDLER diff --git a/src/Game.cpp b/src/Game.cpp index 11273e3..acb2775 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -100,7 +100,8 @@ namespace ZL minDimension = width; } - loadingMesh.data = CreateRect2D({ 0.0f, 0.0f }, { minDimension*0.5f, minDimension*0.5f }, 3); + //loadingMesh.data = CreateRect2D({ 0.0f, 0.0f }, { minDimension*0.5f, minDimension*0.5f }, 3); + loadingMesh.data = CreateRect2D({ 0.0f, 0.0f }, { minDimension * 0.5f, minDimension * 0.25f }, 3); loadingMesh.RefreshVBO(); #ifdef EMSCRIPTEN @@ -157,8 +158,8 @@ namespace ZL this->changeLocation(locId); }; - //currentLocation = defaultLocation; - currentLocation = forestLocation; + currentLocation = defaultLocation; + //currentLocation = forestLocation; std::cout << "Load resurces step 5" << std::endl; @@ -224,6 +225,7 @@ namespace ZL //menuManager.setupMainMenu(); loadingCompleted = true; + if (audioPlayer->init()) { audioPlayer->setMusicVolume(100); audioPlayer->setSoundVolume(80); @@ -380,6 +382,10 @@ namespace ZL if (mainMenuTimeout < 0 && loadingCompleted) { menuManager.setupMainMenu(); + /*if (audioPlayer) { + audioPlayer->stopMusicAsync(); + audioPlayer->playMusicAsync("audio/ETM_Titles_track.ogg", -1); + }*/ } } @@ -551,7 +557,7 @@ namespace ZL if (event.type == SDL_KEYDOWN && event.key.repeat == 0) { switch (event.key.keysym.sym) { - case SDLK_1: + /*case SDLK_1: if (audioPlayer) audioPlayer->playSoundAsync("audio/background.wav"); break; case SDLK_2: @@ -559,7 +565,7 @@ namespace ZL break; case SDLK_3: if (audioPlayer) audioPlayer->stopMusicAsync(); - break; + break;*/ case SDLK_c: { if (menuManager.getState() == GameState::Gameplay) { @@ -700,9 +706,11 @@ namespace ZL case GameState::MainMenu: case GameState::AboutMenu: case GameState::HelpScreen: - musicTrack = "audio/background.wav"; + musicTrack = "audio/ETM_Titles_track.ogg"; + break; + case GameState::Gameplay: + musicTrack = "audio/naprtyag_loop.ogg"; break; - default: return; } @@ -723,13 +731,13 @@ namespace ZL std::string musicTrack; if (locationId == "default") { - musicTrack = "audio/lullaby-music-vol20-186394--online-audio-convert.com.ogg"; + musicTrack = "audio/naprtyag_loop.ogg"; } else if (locationId == "forest") { - musicTrack = "audio/background.wav"; + musicTrack = "audio/naprtyag_loop.ogg"; } else { - musicTrack = "audio/lullaby-music-vol20-186394--online-audio-convert.com.ogg"; + musicTrack = "audio/naprtyag_loop.ogg"; } if (currentMusicTrack == musicTrack) { diff --git a/src/Location.cpp b/src/Location.cpp index 198e2d1..0e1405d 100644 --- a/src/Location.cpp +++ b/src/Location.cpp @@ -178,7 +178,7 @@ void Location::setup() {"resources/e/azs/AzsRoof.txt", "resources/e/azs/AzsRoof_Base_color_1001.png", azsShift, 2.0f}, {"resources/e/azs/floor.txt", "resources/e/azs/floor_Base_color_1001.png", azsShift, 2.0f}, {"resources/e/azs/roof.txt", "resources/e/azs/roof_Base_color_1001.png", azsShift, 2.0f}, - {"resources/e/azs/Walls.txt", "resources/e/azs/Walls_Base_color_1001.png", azsShift, 2.0f}, + {"resources/e/azs/Walls.txt", "resources/e/azs/walls_Base_color_1001.png", azsShift, 2.0f}, {"resources/e/azs/shelves.txt", "resources/e/azs/shelves_Base_color_1001.png", azsShift, 2.0f}, {"resources/e/azs/showcase.txt", "resources/e/azs/showcase_Base_color_1001.png", azsShift, 2.0f}, {"resources/e/azs/table.txt", "resources/e/azs/table_Base_color_1001.png", azsShift, 2.0f} @@ -1864,7 +1864,7 @@ void Location::setup() void Location::handleKeyDown(int sdlKey) { switch (sdlKey) { - case SDLK_l: + case SDLK_e: { if (!player) break; if (playerFrozen) break;