Working on web version
This commit is contained in:
parent
360d6999c2
commit
920376d686
BIN
audio/ETM_Titles_track.ogg
(Stored with Git LFS)
Normal file
BIN
audio/ETM_Titles_track.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
audio/naprtyag_loop.ogg
(Stored with Git LFS)
Normal file
BIN
audio/naprtyag_loop.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -77,6 +77,8 @@ set(SOURCES
|
|||||||
../src/AudioPlayerAsync.h
|
../src/AudioPlayerAsync.h
|
||||||
../src/BoneAnimatedModel.cpp
|
../src/BoneAnimatedModel.cpp
|
||||||
../src/BoneAnimatedModel.h
|
../src/BoneAnimatedModel.h
|
||||||
|
../src/BoneAnimatedModelNew.cpp
|
||||||
|
../src/BoneAnimatedModelNew.h
|
||||||
../src/render/OpenGlExtensions.cpp
|
../src/render/OpenGlExtensions.cpp
|
||||||
../src/render/OpenGlExtensions.h
|
../src/render/OpenGlExtensions.h
|
||||||
../src/utils/Utils.cpp
|
../src/utils/Utils.cpp
|
||||||
|
|||||||
@ -13,19 +13,19 @@
|
|||||||
{
|
{
|
||||||
"type": "StaticImage",
|
"type": "StaticImage",
|
||||||
"name": "aboutImage",
|
"name": "aboutImage",
|
||||||
"width": 400,
|
"width": 512,
|
||||||
"height": 300,
|
"height": 512,
|
||||||
"texture": "resources/loading.png"
|
"texture": "resources/e/menu/about.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Button",
|
"type": "Button",
|
||||||
"name": "backButton",
|
"name": "backButton",
|
||||||
"width": 200,
|
"width": 512,
|
||||||
"height": 60,
|
"height": 128,
|
||||||
"textures": {
|
"textures": {
|
||||||
"normal": "resources/loading.png",
|
"normal": "resources/e/menu/button_back.png",
|
||||||
"hover": "resources/loading.png",
|
"hover": "resources/e/menu/button_back.png",
|
||||||
"pressed": "resources/loading.png"
|
"pressed": "resources/e/menu/button_back.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -13,19 +13,19 @@
|
|||||||
{
|
{
|
||||||
"type": "StaticImage",
|
"type": "StaticImage",
|
||||||
"name": "helpImage",
|
"name": "helpImage",
|
||||||
"width": 400,
|
"width": 512,
|
||||||
"height": 300,
|
"height": 512,
|
||||||
"texture": "resources/loading.png"
|
"texture": "resources/e/menu/help.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Button",
|
"type": "Button",
|
||||||
"name": "backButton",
|
"name": "backButton",
|
||||||
"width": 200,
|
"width": 512,
|
||||||
"height": 60,
|
"height": 128,
|
||||||
"textures": {
|
"textures": {
|
||||||
"normal": "resources/loading.png",
|
"normal": "resources/e/menu/button_back.png",
|
||||||
"hover": "resources/loading.png",
|
"hover": "resources/e/menu/button_back.png",
|
||||||
"pressed": "resources/loading.png"
|
"pressed": "resources/e/menu/button_back.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -13,41 +13,41 @@
|
|||||||
{
|
{
|
||||||
"type": "StaticImage",
|
"type": "StaticImage",
|
||||||
"name": "title",
|
"name": "title",
|
||||||
"width": 300,
|
"width": 512,
|
||||||
"height": 100,
|
"height": 128,
|
||||||
"texture": "resources/loading.png"
|
"texture": "resources/e/menu/title.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Button",
|
"type": "Button",
|
||||||
"name": "startButton",
|
"name": "startButton",
|
||||||
"width": 300,
|
"width": 512,
|
||||||
"height": 60,
|
"height": 128,
|
||||||
"textures": {
|
"textures": {
|
||||||
"normal": "resources/loading.png",
|
"normal": "resources/e/menu/button_start.png",
|
||||||
"hover": "resources/loading.png",
|
"hover": "resources/e/menu/button_start.png",
|
||||||
"pressed": "resources/loading.png"
|
"pressed": "resources/e/menu/button_start.png"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Button",
|
"type": "Button",
|
||||||
"name": "helpButton",
|
"name": "helpButton",
|
||||||
"width": 300,
|
"width": 512,
|
||||||
"height": 60,
|
"height": 128,
|
||||||
"textures": {
|
"textures": {
|
||||||
"normal": "resources/loading.png",
|
"normal": "resources/e/menu/button_help.png",
|
||||||
"hover": "resources/loading.png",
|
"hover": "resources/e/menu/button_help.png",
|
||||||
"pressed": "resources/loading.png"
|
"pressed": "resources/e/menu/button_help.png"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Button",
|
"type": "Button",
|
||||||
"name": "aboutButton",
|
"name": "aboutButton",
|
||||||
"width": 300,
|
"width": 512,
|
||||||
"height": 60,
|
"height": 128,
|
||||||
"textures": {
|
"textures": {
|
||||||
"normal": "resources/loading.png",
|
"normal": "resources/e/menu/button_about.png",
|
||||||
"hover": "resources/loading.png",
|
"hover": "resources/e/menu/button_about.png",
|
||||||
"pressed": "resources/loading.png"
|
"pressed": "resources/e/menu/button_about.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
BIN
resources/e/menu/about.png
(Stored with Git LFS)
Normal file
BIN
resources/e/menu/about.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
resources/e/menu/button_about.png
(Stored with Git LFS)
Normal file
BIN
resources/e/menu/button_about.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
resources/e/menu/button_back.png
(Stored with Git LFS)
Normal file
BIN
resources/e/menu/button_back.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
resources/e/menu/button_help.png
(Stored with Git LFS)
Normal file
BIN
resources/e/menu/button_help.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
resources/e/menu/button_start.png
(Stored with Git LFS)
Normal file
BIN
resources/e/menu/button_start.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
resources/e/menu/help.png
(Stored with Git LFS)
Normal file
BIN
resources/e/menu/help.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
resources/e/menu/title.png
(Stored with Git LFS)
Normal file
BIN
resources/e/menu/title.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
resources/loading.png
(Stored with Git LFS)
BIN
resources/loading.png
(Stored with Git LFS)
Binary file not shown.
@ -15,7 +15,7 @@ function step1()
|
|||||||
game_api.npc_walk_to(0, 2.0, 0.0, -2.0, step2)
|
game_api.npc_walk_to(0, 2.0, 0.0, -2.0, step2)
|
||||||
end
|
end
|
||||||
|
|
||||||
step1()
|
--step1()
|
||||||
|
|
||||||
-- ============================================
|
-- ============================================
|
||||||
-- ITEM PICKUP HANDLER
|
-- ITEM PICKUP HANDLER
|
||||||
|
|||||||
28
src/Game.cpp
28
src/Game.cpp
@ -100,7 +100,8 @@ namespace ZL
|
|||||||
minDimension = width;
|
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();
|
loadingMesh.RefreshVBO();
|
||||||
|
|
||||||
#ifdef EMSCRIPTEN
|
#ifdef EMSCRIPTEN
|
||||||
@ -157,8 +158,8 @@ namespace ZL
|
|||||||
this->changeLocation(locId);
|
this->changeLocation(locId);
|
||||||
};
|
};
|
||||||
|
|
||||||
//currentLocation = defaultLocation;
|
currentLocation = defaultLocation;
|
||||||
currentLocation = forestLocation;
|
//currentLocation = forestLocation;
|
||||||
|
|
||||||
std::cout << "Load resurces step 5" << std::endl;
|
std::cout << "Load resurces step 5" << std::endl;
|
||||||
|
|
||||||
@ -224,6 +225,7 @@ namespace ZL
|
|||||||
//menuManager.setupMainMenu();
|
//menuManager.setupMainMenu();
|
||||||
loadingCompleted = true;
|
loadingCompleted = true;
|
||||||
|
|
||||||
|
|
||||||
if (audioPlayer->init()) {
|
if (audioPlayer->init()) {
|
||||||
audioPlayer->setMusicVolume(100);
|
audioPlayer->setMusicVolume(100);
|
||||||
audioPlayer->setSoundVolume(80);
|
audioPlayer->setSoundVolume(80);
|
||||||
@ -380,6 +382,10 @@ namespace ZL
|
|||||||
if (mainMenuTimeout < 0 && loadingCompleted)
|
if (mainMenuTimeout < 0 && loadingCompleted)
|
||||||
{
|
{
|
||||||
menuManager.setupMainMenu();
|
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) {
|
if (event.type == SDL_KEYDOWN && event.key.repeat == 0) {
|
||||||
switch (event.key.keysym.sym) {
|
switch (event.key.keysym.sym) {
|
||||||
case SDLK_1:
|
/*case SDLK_1:
|
||||||
if (audioPlayer) audioPlayer->playSoundAsync("audio/background.wav");
|
if (audioPlayer) audioPlayer->playSoundAsync("audio/background.wav");
|
||||||
break;
|
break;
|
||||||
case SDLK_2:
|
case SDLK_2:
|
||||||
@ -559,7 +565,7 @@ namespace ZL
|
|||||||
break;
|
break;
|
||||||
case SDLK_3:
|
case SDLK_3:
|
||||||
if (audioPlayer) audioPlayer->stopMusicAsync();
|
if (audioPlayer) audioPlayer->stopMusicAsync();
|
||||||
break;
|
break;*/
|
||||||
case SDLK_c:
|
case SDLK_c:
|
||||||
{
|
{
|
||||||
if (menuManager.getState() == GameState::Gameplay) {
|
if (menuManager.getState() == GameState::Gameplay) {
|
||||||
@ -700,9 +706,11 @@ namespace ZL
|
|||||||
case GameState::MainMenu:
|
case GameState::MainMenu:
|
||||||
case GameState::AboutMenu:
|
case GameState::AboutMenu:
|
||||||
case GameState::HelpScreen:
|
case GameState::HelpScreen:
|
||||||
musicTrack = "audio/background.wav";
|
musicTrack = "audio/ETM_Titles_track.ogg";
|
||||||
|
break;
|
||||||
|
case GameState::Gameplay:
|
||||||
|
musicTrack = "audio/naprtyag_loop.ogg";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -723,13 +731,13 @@ namespace ZL
|
|||||||
std::string musicTrack;
|
std::string musicTrack;
|
||||||
|
|
||||||
if (locationId == "default") {
|
if (locationId == "default") {
|
||||||
musicTrack = "audio/lullaby-music-vol20-186394--online-audio-convert.com.ogg";
|
musicTrack = "audio/naprtyag_loop.ogg";
|
||||||
}
|
}
|
||||||
else if (locationId == "forest") {
|
else if (locationId == "forest") {
|
||||||
musicTrack = "audio/background.wav";
|
musicTrack = "audio/naprtyag_loop.ogg";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
musicTrack = "audio/lullaby-music-vol20-186394--online-audio-convert.com.ogg";
|
musicTrack = "audio/naprtyag_loop.ogg";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentMusicTrack == musicTrack) {
|
if (currentMusicTrack == musicTrack) {
|
||||||
|
|||||||
@ -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/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/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/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/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/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}
|
{"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)
|
void Location::handleKeyDown(int sdlKey)
|
||||||
{
|
{
|
||||||
switch (sdlKey) {
|
switch (sdlKey) {
|
||||||
case SDLK_l:
|
case SDLK_e:
|
||||||
{
|
{
|
||||||
if (!player) break;
|
if (!player) break;
|
||||||
if (playerFrozen) break;
|
if (playerFrozen) break;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user