diff --git a/GlyphsJuke.vcxproj b/GlyphsJuke.vcxproj
index 0a20daa..62b1492 100644
--- a/GlyphsJuke.vcxproj
+++ b/GlyphsJuke.vcxproj
@@ -148,6 +148,7 @@
+
@@ -155,6 +156,8 @@
+
+
@@ -166,6 +169,7 @@
+
@@ -181,6 +185,7 @@
+
diff --git a/GlyphsJuke.vcxproj.filters b/GlyphsJuke.vcxproj.filters
index 53a31df..faa7d5c 100644
--- a/GlyphsJuke.vcxproj.filters
+++ b/GlyphsJuke.vcxproj.filters
@@ -39,6 +39,9 @@
Source Files
+
+ Source Files
+
@@ -155,6 +158,18 @@
Header Files
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
diff --git a/src/ElementStore.h b/src/ElementStore.h
index f4565ee..5dce7aa 100644
--- a/src/ElementStore.h
+++ b/src/ElementStore.h
@@ -53,6 +53,7 @@ class ElementStore {
for (auto& eptr : performing_) {
iElement* e = eptr.get();
if (e->period.end <= now) {
+ e->Finalize();
eptr = nullptr;
} else {
e->Update(frame, e->period.Normalize(now));
diff --git a/src/Frame.h b/src/Frame.h
index 4932477..3709b79 100644
--- a/src/Frame.h
+++ b/src/Frame.h
@@ -1,5 +1,6 @@
#pragma once
+#include
#include
#include "iDrawable.h"
@@ -46,6 +47,8 @@ class Frame : public iDrawable, public iWritable {
}
}
+ std::string input;
+
private:
std::vector draw_;
std::vector write_;
diff --git a/src/Game.h b/src/Game.h
index afe836e..b2c26c8 100644
--- a/src/Game.h
+++ b/src/Game.h
@@ -36,10 +36,12 @@ class Game : public iDrawable, public iWritable {
Game(Param&& p);
- void Update() {
+ void Update(const std::string& input) {
clock_.Tick();
frame_.Clear();
+ frame_.input = input;
+
UniqPtr next = scene_->Update(frame_);
if (next) {
scene_ = std::move(next);
diff --git a/src/GlyphElementFactory.h b/src/GlyphElementFactory.h
index ccfebe9..9ddf32e 100644
--- a/src/GlyphElementFactory.h
+++ b/src/GlyphElementFactory.h
@@ -30,7 +30,7 @@ class GlyphElementFactory : public iElementFactory {
const intmax_t size = std::get(param.custom[2]);
auto& font = FindOrCreateFont(name);
- auto tex = std::move(font.RenderGlyphs(ConvertUtf8ToUtf16(text), size)); /* TODO */
+ auto tex = std::move(font.RenderGlyphs(ConvertStrToWstr(text), size)); /* TODO */
return alloc_->MakeUniq(
param.period, std::move(tex), std::move(param.driver));
diff --git a/src/HiraganaMatcher.cc b/src/HiraganaMatcher.cc
new file mode 100644
index 0000000..d3fd70f
--- /dev/null
+++ b/src/HiraganaMatcher.cc
@@ -0,0 +1,99 @@
+#include "HiraganaMatcher.h"
+
+#include
+#include