Working on web version

This commit is contained in:
Vladislav Khorev committed 2026-04-19 17:13:48 +03:00
1 parent 360d6999c2
commit 920376d686
17 files changed
+86 -49

No files matched your search

Binary file not shown.
BIN
View File
Binary file not shown.
+2
View File
@@ -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
+8 -8
View File
@@ -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"
}
}
]
+8 -8
View File
@@ -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"
}
}
]
+18 -18
View File
@@ -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"
}
}
]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -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
+18 -10
View File
@@ -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) {
+2 -2
View File
@@ -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;