Working on dorm navigation
This commit is contained in:
1 parent
715f2e8c31
commit
8c200974c2
54 files changed
+15832
-15
No files matched your search
+27
-11
@@ -15,8 +15,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
@@ -25,6 +23,7 @@
|
||||
|
||||
namespace ZL
|
||||
{
|
||||
/*
|
||||
void set_Texture(Character& npc, const TextureDataStruct& texture)
|
||||
{
|
||||
auto tt = std::make_shared<Texture>(texture);
|
||||
@@ -34,7 +33,7 @@ namespace ZL
|
||||
{
|
||||
auto tt = std::make_shared<Texture>(texture);
|
||||
npc.setTexture(meshName, tt);
|
||||
}
|
||||
}*/
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
const char* CONST_ZIP_FILE = "resources.zip";
|
||||
@@ -196,7 +195,7 @@ namespace ZL
|
||||
uniInteriorParams.npcsJsonPath = "resources/config2/npcs_uni_interior.json";
|
||||
uniInteriorParams.dialoguesJsonPath = "resources/dialogue/uni_interior_dialogues.json";
|
||||
|
||||
/*
|
||||
|
||||
uniInteriorParams.navigationJsonPaths = {
|
||||
"resources/navigation/uni_interior0_all_locked.txt",
|
||||
"resources/navigation/uni_interior0_hall.txt",
|
||||
@@ -212,9 +211,9 @@ namespace ZL
|
||||
"resources/navigation/uni_interior2_unlocked_n2.txt",
|
||||
"resources/navigation/uni_interior2_unlocked_n3.txt",
|
||||
"resources/navigation/uni_interior2_unlocked_hall.txt"
|
||||
};*/
|
||||
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
uniInteriorParams.navigationJsonPaths = {
|
||||
"resources/navigation/uni_interior0_all_locked.json",
|
||||
"resources/navigation/uni_interior0_hall.json",
|
||||
@@ -231,7 +230,7 @@ namespace ZL
|
||||
"resources/navigation/uni_interior2_unlocked_n3.json",
|
||||
"resources/navigation/uni_interior2_unlocked_hall.json"
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
uniInteriorParams.teleportsJsonPath = "resources/config2/teleports_uni_interior.json";
|
||||
uniInteriorParams.triggerZonesJsonPath = "resources/config2/trigger_zones_uni_interior.json";
|
||||
@@ -251,7 +250,7 @@ namespace ZL
|
||||
uniExteriorParams.gameObjectsJsonPath = "resources/config2/gameobjects_uni_exterior.json";
|
||||
uniExteriorParams.interactiveObjectsJsonPath = "resources/config2/interactive_objects_uni_exterior.json";
|
||||
uniExteriorParams.navigationJsonPaths = {"resources/navigation/uni_exterior1_all.txt"};
|
||||
//uniExteriorParams.navigationJsonPaths = { "resources/navigation/uni_exterior0.json" };
|
||||
//uniExteriorParams.navigationJsonPaths = { "resources/navigation/uni_exterior1_all.json" };
|
||||
uniExteriorParams.teleportsJsonPath = "resources/config2/teleports_uni_exterior.json";
|
||||
uniExteriorParams.triggerZonesJsonPath = "resources/config2/trigger_zones_uni_exterior.json";
|
||||
uniExteriorParams.scriptPath = "resources/start_uni_exterior.lua";
|
||||
@@ -271,8 +270,25 @@ namespace ZL
|
||||
params_dorm.gameObjectsJsonPath = "resources/config2/gameobjects_dorm.json";
|
||||
params_dorm.npcsJsonPath = "resources/config2/npcs_dorm.json";
|
||||
params_dorm.dialoguesJsonPath = "resources/dialogue/dorm_dialogues.json";
|
||||
//params_dorm.navigationJsonPaths = {"resources/config2/navigation_dorm.json", "resources/config2/navigation_dorm_tutorial001.json" };
|
||||
params_dorm.navigationJsonPaths = { "resources/w/nav_dorm.txt", "resources/w/nav_dorm.txt" };
|
||||
|
||||
/*
|
||||
params_dorm.navigationJsonPaths = {
|
||||
"resources/navigation/dorm2_bca2.json",
|
||||
"resources/navigation/dorm2_ca.json",
|
||||
"resources/navigation/dorm2_ba.json",
|
||||
"resources/navigation/dorm2_a.json",
|
||||
"resources/navigation/dorm2_b.json",
|
||||
"resources/navigation/dorm2_all_open.json",
|
||||
};*/
|
||||
params_dorm.navigationJsonPaths = {
|
||||
"resources/navigation/dorm2_bca2.txt",
|
||||
"resources/navigation/dorm2_ca.txt",
|
||||
"resources/navigation/dorm2_ba.txt",
|
||||
"resources/navigation/dorm2_a.txt",
|
||||
"resources/navigation/dorm2_b.txt",
|
||||
"resources/navigation/dorm2_all_open.txt",
|
||||
};
|
||||
|
||||
|
||||
params_dorm.teleportsJsonPath = "resources/config2/teleports_dorm.json";
|
||||
params_dorm.triggerZonesJsonPath = "resources/config2/trigger_zones_dorm.json";
|
||||
|
||||
@@ -334,11 +334,14 @@ namespace ZL {
|
||||
try {
|
||||
if (!npcData.meshTextures.empty()) {
|
||||
for (const auto& entry : npcData.meshTextures) {
|
||||
set_Texture(*npc, entry.first, CreateTextureDataFromPng(entry.second, zipPath.c_str()));
|
||||
//set_Texture(*npc, entry.first, CreateTextureDataFromPng(entry.second, zipPath.c_str()));
|
||||
npc->setTexture(entry.first, std::make_shared<Texture>(CreateTextureDataFromPng(entry.second, zipPath.c_str())));
|
||||
|
||||
std::cout << " -> mesh '" << entry.first << "'" << std::endl;
|
||||
}
|
||||
} else {
|
||||
set_Texture(*npc, CreateTextureDataFromPng(npcData.texturePath, zipPath.c_str()));
|
||||
//set_Texture(*npc, CreateTextureDataFromPng(npcData.texturePath, zipPath.c_str()));
|
||||
npc->setTexture(std::make_shared<Texture>(CreateTextureDataFromPng(npcData.texturePath, zipPath.c_str())));
|
||||
std::cout << " Loaded texture: " << npcData.texturePath << std::endl;
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
|
||||
Reference in new issue
Block a user