aboutsummaryrefslogtreecommitdiff
path: root/src/executor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/executor.cc')
-rw-r--r--src/executor.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/executor.cc b/src/executor.cc
index 0d428e9..5ff76d2 100644
--- a/src/executor.cc
+++ b/src/executor.cc
@@ -88,6 +88,21 @@ Result Executor::Execute(Engine* engine,
Engine::Debugger* debugger = nullptr;
+ // Load data to buffers
+ for (const auto& buf : script->GetBuffers()) {
+ if (buf->GetDataFile().empty())
+ continue;
+
+ BufferInfo info;
+ Result r = options->delegate->LoadBufferData(buf->GetDataFile(), &info);
+ if (!r.IsSuccess())
+ return r;
+
+ buf->SetData(info.values);
+ buf->SetWidth(info.width);
+ buf->SetHeight(info.height);
+ }
+
// Process Commands
for (const auto& cmd : script->GetCommands()) {
if (options->delegate && options->delegate->LogExecuteCalls()) {