Some clean up, web version prepare
This commit is contained in:
1 parent
e9c888e2bf
commit
0975f3b9cd
104 files changed
+779
-1483
No files matched your search
@@ -3,12 +3,12 @@
|
||||
#include "utils/Utils.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace ZL
|
||||
namespace FRG
|
||||
{
|
||||
extern const char* CONST_ZIP_FILE;
|
||||
}
|
||||
|
||||
namespace ZL::Dialogue {
|
||||
namespace FRG::Dialogue {
|
||||
|
||||
NodeType DialogueDatabase::parseNodeType(const std::string& value) {
|
||||
if (value == "Choice") return NodeType::Choice;
|
||||
@@ -174,4 +174,4 @@ const DialogueDefinition* DialogueDatabase::findDialogue(const std::string& id)
|
||||
return (it != dialogues.end()) ? &it->second : nullptr;
|
||||
}
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
} // namespace FRG::Dialogue
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace ZL::Dialogue {
|
||||
namespace FRG::Dialogue {
|
||||
|
||||
class DialogueDatabase {
|
||||
public:
|
||||
@@ -29,4 +29,4 @@ private:
|
||||
static DialogueDefinition parseDialogue(const json& j);
|
||||
};
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
} // namespace FRG::Dialogue
|
||||
@@ -6,13 +6,13 @@
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
namespace ZL
|
||||
namespace FRG
|
||||
{
|
||||
extern float x;
|
||||
extern float y;
|
||||
}
|
||||
|
||||
namespace ZL::Dialogue {
|
||||
namespace FRG::Dialogue {
|
||||
|
||||
bool DialogueOverlay::init(Renderer& renderer, const std::string& zipFile) {
|
||||
rendererRef = &renderer;
|
||||
@@ -447,4 +447,4 @@ bool DialogueOverlay::rectContains(const UiRect& rect, float x, float y) {
|
||||
return x >= rect.x && x <= rect.x + rect.w && y >= rect.y && y <= rect.y + rect.h;
|
||||
}
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
} // namespace FRG::Dialogue
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace ZL::Dialogue {
|
||||
namespace FRG::Dialogue {
|
||||
|
||||
class DialogueOverlay {
|
||||
public:
|
||||
@@ -62,4 +62,4 @@ private:
|
||||
void drawPortrait(Renderer& renderer, const PresentationModel& model);
|
||||
};
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
} // namespace FRG::Dialogue
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
namespace ZL::Dialogue {
|
||||
namespace FRG::Dialogue {
|
||||
|
||||
static std::pair<std::string, std::string> splitDot(const std::string& s) {
|
||||
const auto dot = s.find('.');
|
||||
@@ -414,4 +414,4 @@ void DialogueRuntime::load(const nlohmann::json& in)
|
||||
revealCharacters = static_cast<float>(presentation.fullText.size());
|
||||
}
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
} // namespace FRG::Dialogue
|
||||
@@ -11,9 +11,9 @@
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
namespace ZL::Dialogue {
|
||||
namespace FRG::Dialogue {
|
||||
|
||||
class DialogueRuntime : public ZL::ISaveable {
|
||||
class DialogueRuntime : public FRG::ISaveable {
|
||||
public:
|
||||
void setDatabase(const DialogueDatabase* value);
|
||||
void setTranslationDatabase(const TranslationDatabase* value);
|
||||
@@ -92,4 +92,4 @@ private:
|
||||
std::string tr(const std::string& s) const;
|
||||
};
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
} // namespace FRG::Dialogue
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "dialogue/DialogueSystem.h"
|
||||
|
||||
namespace ZL::Dialogue {
|
||||
namespace FRG::Dialogue {
|
||||
|
||||
bool DialogueSystem::init(Renderer& renderer, const std::string& zipFile) {
|
||||
dialogueRuntime.setDatabase(&database);
|
||||
@@ -221,4 +221,4 @@ void DialogueSystem::setOnDialogueAdvanced(std::function<void()> cb) {
|
||||
onDialogueAdvancedCallback = std::move(cb);
|
||||
}
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
} // namespace FRG::Dialogue
|
||||
@@ -12,9 +12,9 @@
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
namespace ZL::Dialogue {
|
||||
namespace FRG::Dialogue {
|
||||
|
||||
class DialogueSystem : public ZL::ISaveable {
|
||||
class DialogueSystem : public FRG::ISaveable {
|
||||
public:
|
||||
bool init(Renderer& renderer, const std::string& zipFile = "");
|
||||
|
||||
@@ -71,10 +71,10 @@ private:
|
||||
DialogueRuntime dialogueRuntime;
|
||||
DialogueOverlay dialogueOverlay;
|
||||
|
||||
ZL::Cutscene::CutsceneDatabase cutsceneDatabase;
|
||||
FRG::Cutscene::CutsceneDatabase cutsceneDatabase;
|
||||
TranslationDatabase cutsceneTranslationDatabase;
|
||||
ZL::Cutscene::CutsceneRuntime cutsceneRuntime;
|
||||
ZL::Cutscene::CutsceneOverlay cutsceneOverlay;
|
||||
FRG::Cutscene::CutsceneRuntime cutsceneRuntime;
|
||||
FRG::Cutscene::CutsceneOverlay cutsceneOverlay;
|
||||
|
||||
std::function<void()> onDialogueAdvancedCallback;
|
||||
std::function<void()> onCutsceneStartedCallback;
|
||||
@@ -87,4 +87,4 @@ private:
|
||||
void onCutsceneFinishedInternal(const std::string& id);
|
||||
};
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
} // namespace FRG::Dialogue
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
namespace ZL::Dialogue {
|
||||
namespace FRG::Dialogue {
|
||||
|
||||
enum class NodeType {
|
||||
Line,
|
||||
@@ -121,9 +121,9 @@ struct PresentationModel {
|
||||
bool showCutsceneSubtitle = false;
|
||||
bool cutsceneSkippable = false;
|
||||
|
||||
std::vector<ZL::Cutscene::PresentedCutsceneImage> cutsceneImages;
|
||||
std::vector<FRG::Cutscene::PresentedCutsceneImage> cutsceneImages;
|
||||
float cutsceneGlobalFadeAlpha = 1.0f;
|
||||
float cutsceneBlackAlpha = 0.0f;
|
||||
};
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
} // namespace FRG::Dialogue
|
||||
@@ -3,12 +3,12 @@
|
||||
#include "utils/Utils.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace ZL
|
||||
namespace FRG
|
||||
{
|
||||
extern const char* CONST_ZIP_FILE;
|
||||
}
|
||||
|
||||
namespace ZL::Dialogue {
|
||||
namespace FRG::Dialogue {
|
||||
|
||||
bool TranslationDatabase::loadFromFile(const std::string& path) {
|
||||
entries.clear();
|
||||
@@ -94,4 +94,4 @@ const std::string& TranslationDatabase::translateRef(const std::string& key, Lan
|
||||
return key;
|
||||
}
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
} // namespace FRG::Dialogue
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace ZL::Dialogue {
|
||||
namespace FRG::Dialogue {
|
||||
|
||||
// Loads a shared translation file mapping dialogue "key" strings (the literal
|
||||
// speaker/text/choice text found in dialogue config files) to per-language text.
|
||||
@@ -24,4 +24,4 @@ private:
|
||||
std::unordered_map<std::string, std::unordered_map<std::string, std::string>> entries;
|
||||
};
|
||||
|
||||
} // namespace ZL::Dialogue
|
||||
} // namespace FRG::Dialogue
|
||||
Reference in new issue
Block a user