File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,40 @@ void Engine::resolveIds()
123123 }
124124 }
125125 }
126+
127+ for (auto monitor : m_monitors) {
128+ auto block = monitor->block ();
129+ auto container = blockSectionContainer (block->opcode ());
130+ const auto &fields = block->fields ();
131+ Target *target;
132+
133+ if (monitor->sprite ())
134+ target = monitor->sprite ();
135+ else
136+ target = stage ();
137+
138+ assert (target);
139+
140+ for (auto field : fields) {
141+ field->setValuePtr (getEntity (field->valueId ()));
142+
143+ if (container) {
144+ field->setFieldId (container->resolveField (field->name ()));
145+
146+ if (!field->valuePtr ())
147+ field->setSpecialValueId (container->resolveFieldValue (field->value ().toString ()));
148+ }
149+
150+ // TODO: Move field information out of Engine
151+ if (field->name () == " VARIABLE" )
152+ field->setValuePtr (target->variableAt (target->findVariable (field->value ().toString ())));
153+ else if (field->name () == " LIST" )
154+ field->setValuePtr (target->listAt (target->findList (field->value ().toString ())));
155+ }
156+
157+ block->updateInputMap ();
158+ block->updateFieldMap ();
159+ }
126160}
127161
128162void Engine::compile ()
You can’t perform that action at this time.
0 commit comments